diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 1a084802c334..cefcba3222ec 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs-mono-repo:latest - digest: sha256:f4c4b25acd731314f08ff8965e837f8a3088f2dac5691031ce3b9f3ab65cb6c7 + digest: sha256:89526e4d0c2f9e11da737d8f00373b459459390811b9d47af68bd66a8a65984a +# created: 2025-11-03T16:04:39.848021946Z diff --git a/.github/workflows/continuous.yaml b/.github/workflows/continuous.yaml index c84403768ee0..c9dfb820b116 100644 --- a/.github/workflows/continuous.yaml +++ b/.github/workflows/continuous.yaml @@ -10,7 +10,7 @@ jobs: matrix: node: [18, 20, 22] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: pnpm/action-setup@v4 with: version: ^7.0.0 diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index 816d9a709a26..531054022d14 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -10,7 +10,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: node-version: 18 diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index cbf7ad29ef79..062e95c43436 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -8,7 +8,7 @@ jobs: matrix: node: [18, 20, 22] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 300 - uses: pnpm/action-setup@v4 diff --git a/.github/workflows/response.yml b/.github/workflows/response.yml index 6ed37326feab..e81a3603af52 100644 --- a/.github/workflows/response.yml +++ b/.github/workflows/response.yml @@ -13,7 +13,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/github-script@v7 with: script: | @@ -27,7 +27,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/github-script@v7 with: script: | diff --git a/.github/workflows/update-api-list.yaml b/.github/workflows/update-api-list.yaml index f5a2b455ed24..ee64496f9d85 100644 --- a/.github/workflows/update-api-list.yaml +++ b/.github/workflows/update-api-list.yaml @@ -7,7 +7,7 @@ jobs: update-api-list: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: node-version: 18 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 241f9d61d4ca..d8eae04199f1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { - "packages/gapic-node-processing": "0.1.5", - "packages/google-ai-generativelanguage": "3.4.1", + "packages/gapic-node-processing": "0.1.6", + "packages/google-ai-generativelanguage": "3.5.0", "packages/google-analytics-admin": "9.0.1", "packages/google-analytics-data": "5.2.1", "packages/google-api-apikeys": "2.2.1", @@ -11,7 +11,7 @@ "packages/google-area120-tables": "4.2.1", "packages/google-cloud-accessapproval": "4.2.1", "packages/google-cloud-advisorynotifications": "2.2.1", - "packages/google-cloud-aiplatform": "5.8.0", + "packages/google-cloud-aiplatform": "5.14.0", "packages/google-cloud-alloydb": "2.2.1", "packages/google-cloud-apigateway": "4.2.1", "packages/google-cloud-apigeeconnect": "4.2.1", @@ -20,13 +20,13 @@ "packages/google-cloud-assuredworkloads": "5.1.1", "packages/google-cloud-automl": "5.1.1", "packages/google-cloud-baremetalsolution": "2.1.1", - "packages/google-cloud-batch": "2.2.1", + "packages/google-cloud-batch": "2.3.0", "packages/google-cloud-beyondcorp-appconnections": "2.1.1", "packages/google-cloud-beyondcorp-appconnectors": "2.1.1", "packages/google-cloud-beyondcorp-appgateways": "2.1.1", "packages/google-cloud-beyondcorp-clientconnectorservices": "3.1.1", "packages/google-cloud-beyondcorp-clientgateways": "2.1.1", - "packages/google-cloud-bigquery-analyticshub": "2.3.1", + "packages/google-cloud-bigquery-analyticshub": "2.4.0", "packages/google-cloud-bigquery-connection": "4.1.1", "packages/google-cloud-bigquery-dataexchange": "2.1.1", "packages/google-cloud-bigquery-datapolicies": "2.3.1", @@ -40,7 +40,7 @@ "packages/google-cloud-channel": "4.1.1", "packages/google-cloud-clouddms": "4.1.1", "packages/google-cloud-commerce-consumer-procurement": "0.7.1", - "packages/google-cloud-compute": "6.4.0", + "packages/google-cloud-compute": "6.5.0", "packages/google-cloud-confidentialcomputing": "2.2.2", "packages/google-cloud-config": "0.11.1", "packages/google-cloud-connectors": "0.5.1", @@ -51,14 +51,14 @@ "packages/google-cloud-dataform": "2.2.1", "packages/google-cloud-datafusion": "4.1.1", "packages/google-cloud-datalabeling": "5.1.1", - "packages/google-cloud-dataplex": "5.1.1", + "packages/google-cloud-dataplex": "5.3.0", "packages/google-cloud-dataproc": "6.2.1", "packages/google-cloud-dataqna": "4.1.1", "packages/google-cloud-datastream": "4.3.1", "packages/google-cloud-deploy": "5.2.1", - "packages/google-cloud-dialogflow": "7.2.1", - "packages/google-cloud-dialogflow-cx": "5.4.0", - "packages/google-cloud-discoveryengine": "2.5.1", + "packages/google-cloud-dialogflow": "7.4.0", + "packages/google-cloud-dialogflow-cx": "5.5.0", + "packages/google-cloud-discoveryengine": "2.5.2", "packages/google-cloud-dns": "5.3.1", "packages/google-cloud-documentai": "9.5.0", "packages/google-cloud-domains": "4.2.1", @@ -86,11 +86,11 @@ "packages/google-cloud-metastore": "5.2.1", "packages/google-cloud-migrationcenter": "2.2.1", "packages/google-cloud-monitoring": "5.3.1", - "packages/google-cloud-netapp": "0.14.1", + "packages/google-cloud-netapp": "0.15.0", "packages/google-cloud-networkconnectivity": "4.5.1", "packages/google-cloud-networkmanagement": "5.1.1", "packages/google-cloud-networksecurity": "3.3.1", - "packages/google-cloud-networkservices": "0.11.1", + "packages/google-cloud-networkservices": "0.12.0", "packages/google-cloud-notebooks": "4.2.1", "packages/google-cloud-orchestration-airflow-service": "4.3.1", "packages/google-cloud-orgpolicy": "4.3.1", @@ -116,14 +116,14 @@ "packages/google-cloud-servicedirectory": "6.1.1", "packages/google-cloud-shell": "4.1.1", "packages/google-cloud-speech": "7.2.1", - "packages/google-cloud-sql": "0.21.1", + "packages/google-cloud-sql": "0.23.0", "packages/google-cloud-storageinsights": "2.2.1", "packages/google-cloud-support": "2.2.1", "packages/google-cloud-talent": "7.1.1", "packages/google-cloud-tasks": "6.2.1", - "packages/google-cloud-texttospeech": "6.3.1", + "packages/google-cloud-texttospeech": "6.4.0", "packages/google-cloud-tpu": "4.1.1", - "packages/google-cloud-translate": "9.2.1", + "packages/google-cloud-translate": "9.3.0", "packages/google-cloud-video-livestream": "2.2.1", "packages/google-cloud-video-stitcher": "3.2.1", "packages/google-cloud-video-transcoder": "4.4.1", @@ -136,9 +136,9 @@ "packages/google-cloud-websecurityscanner": "4.2.1", "packages/google-cloud-workflows-executions": "5.0.0", "packages/google-cloud-workstations": "2.2.1", - "packages/google-container": "6.4.1", + "packages/google-container": "6.6.0", "packages/google-dataflow": "4.1.1", - "packages/google-devtools-artifactregistry": "4.3.1", + "packages/google-devtools-artifactregistry": "4.4.0", "packages/google-devtools-cloudbuild": "5.3.1", "packages/google-devtools-cloudprofiler": "0.9.1", "packages/google-devtools-containeranalysis": "6.3.1", @@ -147,14 +147,14 @@ "packages/google-identity-accesscontextmanager": "4.2.1", "packages/google-maps-addressvalidation": "3.2.1", "packages/google-maps-mapsplatformdatasets": "3.1.1", - "packages/google-maps-places": "2.1.1", + "packages/google-maps-places": "2.2.0", "packages/google-maps-routing": "2.1.1", "packages/google-monitoring-dashboard": "4.1.1", "packages/google-privacy-dlp": "6.5.0", "packages/google-storagetransfer": "4.2.1", "packages/grafeas": "6.1.1", "packages/typeless-sample-bot": "3.1.1", - "packages/google-cloud-edgenetwork": "0.10.1", + "packages/google-cloud-edgenetwork": "0.11.0", "packages/google-shopping-merchant-reports": "0.13.1", "packages/google-shopping-merchant-inventories": "0.11.1", "packages/google-shopping-css": "0.10.1", @@ -166,22 +166,22 @@ "packages/google-cloud-cloudcontrolspartner": "0.6.1", "packages/google-cloud-telcoautomation": "0.5.1", "packages/google-cloud-apphub": "0.6.1", - "packages/google-chat": "0.19.1", - "packages/google-shopping-merchant-quota": "0.8.1", + "packages/google-chat": "0.21.0", + "packages/google-shopping-merchant-quota": "0.9.0", "packages/google-storage-control": "0.6.1", - "packages/google-cloud-backupdr": "0.5.1", + "packages/google-cloud-backupdr": "0.7.0", "packages/google-cloud-securesourcemanager": "0.8.1", "packages/google-shopping-merchant-notifications": "0.8.1", "packages/google-shopping-merchant-lfp": "0.9.1", "packages/google-cloud-securitycentermanagement": "0.7.1", "packages/google-shopping-merchant-conversions": "0.7.1", "packages/google-maps-solar": "0.5.1", - "packages/google-maps-routeoptimization": "0.5.1", + "packages/google-maps-routeoptimization": "0.6.0", "packages/google-maps-fleetengine-delivery": "0.6.1", "packages/google-streetview-publish": "0.4.1", "packages/google-maps-fleetengine": "0.8.1", "packages/google-shopping-merchant-promotions": "0.5.1", - "packages/google-shopping-merchant-datasources": "0.9.1", + "packages/google-shopping-merchant-datasources": "0.10.0", "packages/google-cloud-managedkafka": "0.8.1", "packages/google-cloud-developerconnect": "0.6.1", "packages/google-cloud-privilegedaccessmanager": "0.6.1", @@ -189,9 +189,9 @@ "packages/google-shopping-merchant-accounts": "3.0.1", "packages/google-cloud-gdchardwaremanagement": "0.9.1", "packages/google-cloud-apihub": "0.5.1", - "packages/google-marketingplatform-admin": "0.3.1", - "packages/google-cloud-oracledatabase": "0.6.1", - "packages/google-ads-admanager": "0.4.1", + "packages/google-marketingplatform-admin": "0.4.0", + "packages/google-cloud-oracledatabase": "0.7.0", + "packages/google-ads-admanager": "0.5.0", "packages/google-shopping-merchant-reviews": "0.5.1", "packages/google-cloud-memorystore": "0.3.1", "packages/google-cloud-parametermanager": "0.5.1", @@ -210,7 +210,9 @@ "packages/google-cloud-licensemanager": "0.1.1", "packages/google-cloud-configdelivery": "0.1.1", "packages/google-cloud-saasplatform-saasservicemgmt": "0.1.1", - "packages/google-cloud-cloudsecuritycompliance": "0.1.1", - "packages/google-cloud-capacityplanner": "0.1.1", - "packages/google-cloud-locationfinder": "0.1.1" + "packages/google-cloud-cloudsecuritycompliance": "0.2.0", + "packages/google-cloud-capacityplanner": "0.1.2", + "packages/google-cloud-locationfinder": "0.1.1", + "packages/google-cloud-geminidataanalytics": "0.2.0", + "packages/google-ads-datamanager": "0.1.0" } diff --git a/README.md b/README.md index ab01b056ac26..182fb93f8842 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,9 @@ applications that interact with individual Google Cloud services: | [Chronicle API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-chronicle) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/chronicle)](https://npm.im/@google-cloud/chronicle) | | [Config Delivery API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-configdelivery) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/configdelivery)](https://npm.im/@google-cloud/configdelivery) | | [CSS API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-css) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/css)](https://npm.im/@google-shopping/css) | +| [Data Analytics API with Gemini](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-geminidataanalytics) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/geminidataanalytics)](https://npm.im/@google-cloud/geminidataanalytics) | | [Data Labeling](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datalabeling) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/datalabeling)](https://npm.im/@google-cloud/datalabeling) | +| [Data Manager API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ads-datamanager) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-ads/datamanager)](https://npm.im/@google-ads/datamanager) | | [Data QnA](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataqna) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/data-qna)](https://npm.im/@google-cloud/data-qna) | | [Dataflow](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-dataflow) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataflow)](https://npm.im/@google-cloud/dataflow) | | [Dataform API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataform)](https://npm.im/@google-cloud/dataform) | @@ -225,7 +227,6 @@ applications that interact with individual Google Cloud services: | [Security Compliance API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-cloudsecuritycompliance) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/cloudsecuritycompliance)](https://npm.im/@google-cloud/cloudsecuritycompliance) | | [Solar API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-solar) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/solar)](https://npm.im/@googlemaps/solar) | | [Storage Batch Operations API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storagebatchoperations) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storagebatchoperations)](https://npm.im/@google-cloud/storagebatchoperations) | -| [Trace](https://github.com/googleapis/cloud-trace-nodejs) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/trace-agent)](https://npm.im/@google-cloud/trace-agent) | If the service is not listed above, [google-api-nodejs-client](https://github.com/googleapis/google-api-nodejs-client) interfaces diff --git a/changelog.json b/changelog.json index 993bf863435d..a558e0e7e0aa 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,784 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "1403b5b709a040898dbcd15b390485804840b778", + "message": "[marketingplatformadminapi] add the `ListOrganizations`, `FindSalesPartnerManagedClients`, and `ReportPropertyUsage` methods", + "issues": [ + "6858" + ] + } + ], + "version": "0.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/marketing-platform-admin", + "id": "d121492d-957b-4b9c-98ed-4fe833a0a826", + "createTime": "2025-11-21T23:14:19.352Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b26f79d452a55f26a309166362ca3a6a1cda89c1", + "message": "[backupdr] Adding new fields for CMEK and Retention Inheritance features", + "issues": [ + "6901" + ] + } + ], + "version": "0.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/backupdr", + "id": "fea4a715-ca58-401c-8207-ff5ab55c3a74", + "createTime": "2025-11-21T23:14:19.333Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "7e76acee01946bf65d665ed04cd6305cdc331297", + "message": "[merchantapi] Add the AccountLimit resource and its service to the quota bundle", + "issues": [ + "6883" + ] + } + ], + "version": "0.9.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/quota", + "id": "6837c0fd-e0c4-4905-86b3-3e244d2222b6", + "createTime": "2025-11-21T23:14:19.317Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ce760fd66ce4e290b00205f3c9f6a81863622fd1", + "message": "[artifactregistry] add image_manifest field in DockerImage", + "issues": [ + "6888" + ] + } + ], + "version": "4.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/artifact-registry", + "id": "f14ff9af-5137-4a00-92e6-57fb778b46da", + "createTime": "2025-11-21T23:14:19.298Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f3c58114c24765dfb3d3969ba5e411fb9fb9b3f8", + "message": "[sql] introduces auto_upgrade_enabled option for MySQL in DatabaseInstance.Settings", + "issues": [ + "6904" + ] + } + ], + "version": "0.23.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/sql", + "id": "bbc70fe6-2114-40df-85dc-adc75100651c", + "createTime": "2025-11-21T23:14:19.282Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e77b12e03a97fa7c42df57561af6ab1c3bae3a3f", + "message": "[netapp] Add Squash Mode to Export Policy", + "issues": [ + "6905" + ] + } + ], + "version": "0.15.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/netapp", + "id": "f0bebda4-5efb-4f4c-b40e-3d6a12cee012", + "createTime": "2025-11-21T23:14:19.263Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "54e3b03149fd8f91ea076b691ec0e32d45748421", + "message": "[cx] add support for defining custom actions in code. See https://cloud.google.com/dialogflow/cx/docs/concept/playbook/code-block for more information", + "issues": [ + "6879" + ] + } + ], + "version": "5.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "b1a6810a-6fc7-41e9-b27d-932746a0dbe6", + "createTime": "2025-11-21T23:14:19.240Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "68d767e5690cee2f953657ef74412d18212e056e", + "message": "[compute] Update Compute Engine v1beta API to revision 20251019", + "issues": [ + "6869" + ] + } + ], + "version": "6.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/compute", + "id": "19a0c325-49f7-4c7a-ac8a-8fea111a475d", + "createTime": "2025-11-21T23:14:19.212Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ea62cf5717fb0fcb8eb4d3e37260c9f89c3b8076", + "message": "[batch] added new provisioning models", + "issues": [ + "6902" + ] + } + ], + "version": "2.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/batch", + "id": "a2d7bf44-244d-4313-a9e9-47eb54eaff9d", + "createTime": "2025-11-21T23:14:19.189Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "7b6c79b20551dde858cd932174c1fb558408172f", + "message": "Add support for developer connect based deployment", + "issues": [ + "6900" + ] + }, + { + "type": "feat", + "sha": "beb5cac2dbd8cad292d67e3641306824c3ecab85", + "message": "Add `ReplicatedVoiceConfig` to `VoiceConfig` to enable Gemini TTS voice replication", + "issues": [ + "6899" + ] + } + ], + "version": "5.14.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "6748c978-c276-4f5d-a0a0-997afac91035", + "createTime": "2025-11-21T23:14:19.156Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a637d5caaa14186adaae5e8a708f5faee3a17084", + "message": "[geminidataanalytics] Adding a new SchemaRelationship message to define relationships between table schema", + "issues": [ + "6871" + ] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/geminidataanalytics", + "id": "2dfbc409-ea8e-4078-af9c-cd183563fd6e", + "createTime": "2025-11-11T01:02:09.511Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "947fcf5468e0923866bbe7c28c262830d748f5ca", + "message": "Add initial files for google.ads.datamanager.v1", + "issues": [ + "6841" + ] + }, + { + "type": "fix", + "sha": "41c2ff2851b5fdadabf4f9bd3500167c34b32ff7", + "message": "[gkeconnect-gateway] remove unused GatewayServiceClient", + "issues": [ + "6775" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/datamanager", + "id": "0b41663d-a553-454b-a7b8-9a85e02081be", + "createTime": "2025-11-11T01:02:09.476Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "e1c953ae47d7f6697bd9f048d82d5584239ba0d1", + "message": "Doc linter issues", + "issues": [] + } + ], + "version": "0.1.2", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/capacityplanner", + "id": "e04b2af3-2a2b-4a8a-9aa0-5934b2b135d0", + "createTime": "2025-11-11T01:02:09.433Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "44f08c6d3e7d9377e7e070c8ba3dcb949e2642c1", + "message": "[backupdr] Adding `unreachable` field to `ListDataSourceReferences` API", + "issues": [ + "6865" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/backupdr", + "id": "e25c6aee-80cd-429a-b90c-7dd6d81f7c69", + "createTime": "2025-11-11T01:02:09.384Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c9d8b6ad53d584999a6a76073ae1f3e47fae3d37", + "message": "[translate] Adds support for RefineText", + "issues": [ + "6867" + ] + } + ], + "version": "9.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/translate", + "id": "1f7f6610-7132-4522-9d79-ba50be4992ae", + "createTime": "2025-11-11T01:02:09.356Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "4bc9aa903b6385f9eec79c71320959da9c65764a", + "message": "[networkservices] Add support for LbEdgeExtension resource in NetworkServices API", + "issues": [ + "6863" + ] + } + ], + "version": "0.12.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/networkservices", + "id": "5e913f31-ef5e-4b21-aa73-4162f971225d", + "createTime": "2025-11-11T01:02:09.276Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e6cfcdea780819b0c84daf0325127be322803fac", + "message": "[dialogflow] add agentDesktopSource field to the Participant object", + "issues": [ + "6878" + ] + } + ], + "version": "7.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "3769165e-658d-4ec5-8032-e3c8f820452b", + "createTime": "2025-11-11T01:02:09.233Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "524ca3cabe52d2e58e83467f94968cdf28c79fe9", + "message": "Add GetIamPolicy method for DataProduct resources", + "issues": [], + "scope": "dataplex" + }, + { + "type": "feat", + "sha": "524ca3cabe52d2e58e83467f94968cdf28c79fe9", + "message": "[dataplex] Allow publishing Data Profile scan results to the Dataplex Catalog", + "issues": [ + "6868" + ], + "scope": "dataplex" + } + ], + "version": "5.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "8d0b52de-7190-4af2-9f4c-bdab414c2d39", + "createTime": "2025-11-11T01:02:09.189Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e4faaba9f6d3c28cf81d816fbd3758af80b6a45d", + "message": "[bigquery-analyticshub] add Stored Procedure Sharing support for analyticshub listings", + "issues": [ + "6866" + ] + } + ], + "version": "2.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-analyticshub", + "id": "430fa686-b6b5-442a-b3ae-8ad3ff60b6c6", + "createTime": "2025-11-11T01:02:09.157Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8d71bbf30bc7ae1a54a3e37b8740d46dfbe418dd", + "message": "Add order_by to list_events", + "issues": [ + "6864" + ] + } + ], + "version": "5.13.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "6d4d35b4-76a7-40e5-b14f-c0a431c721ee", + "createTime": "2025-11-11T01:02:09.120Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "91207939dad2b0c1e258bd8f24ec70d6a0bbe35b", + "message": "[merchantapi] An existing field `contains_custom_rules` is removed from message `.google.shopping.merchant.datasources.v1.PrimaryProductDataSource`", + "issues": [ + "6860" + ], + "breakingChangeNote": "[merchantapi] An existing field `contains_custom_rules` is removed from message `.google.shopping.merchant.datasources.v1.PrimaryProductDataSource` ([#6860](https://github.com/googleapis/google-cloud-node/issues/6860))" + } + ], + "version": "0.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/datasources", + "id": "957907c1-ae3a-487b-a2ca-56b1f1c4e3b7", + "createTime": "2025-10-31T23:33:45.328Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "90ffcd969537de0668c80caf611eaafd6beb1273", + "message": "[sql] introduces POSTGRES_17 and POSTGRES_18 database versions in the SqlDatabaseVersion enum type", + "issues": [ + "6854" + ] + } + ], + "version": "0.22.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/sql", + "id": "90282008-1e6c-4dcb-9117-455644e600ac", + "createTime": "2025-10-31T23:33:45.297Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c1bfaf1f5b0b3dc1c9abbcd06ca4583e2e9b92c3", + "message": "Add initial files for google.cloud.geminidataanalytics.v1beta", + "issues": [ + "6839" + ] + }, + { + "type": "fix", + "sha": "41c2ff2851b5fdadabf4f9bd3500167c34b32ff7", + "message": "[gkeconnect-gateway] remove unused GatewayServiceClient", + "issues": [ + "6775" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/geminidataanalytics", + "id": "71695e47-01c0-4fd6-879c-1ddf07f2a885", + "createTime": "2025-10-29T18:52:27.981Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "704574fd5a774a5444938ae1c7229bb7a2d4563e", + "message": "[cloudsecuritycompliance] add Audit API surface", + "issues": [ + "6852" + ] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudsecuritycompliance", + "id": "b2360679-1bd7-4216-9243-89f1f3b0dbdb", + "createTime": "2025-10-29T18:52:27.904Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "d904acc7ba1474e5acc9cb8ad4a38033e57f927e", + "message": "[edgenetwork] A new field `remote_peering_network_type` is added to message `google.cloud.edgenetwork.v1.Interconnect`", + "issues": [ + "6851" + ] + } + ], + "version": "0.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/edgenetwork", + "id": "5757c07c-f80b-476d-9fa6-b31f7ab254dc", + "createTime": "2025-10-29T18:52:27.846Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "84654a5c0cc56d940b96a85b0e439dc6ac140699", + "message": "[chat] add ROLE_ASSISTANT_MANAGER to the MembershipRole enum in the Membership proto and assistant_managers_allowed to the PermissionSetting", + "issues": [ + "6843" + ] + } + ], + "version": "0.21.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/chat", + "id": "81e740ea-4ebf-476c-81a6-e7a129e6020d", + "createTime": "2025-10-25T03:59:34.796Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "da2c71816dc16c6ec4d64d74b7913ae5e399a0bc", + "message": "Add EmbedContent method v1", + "issues": [ + "6844" + ] + } + ], + "version": "5.12.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "07134093-8517-44f5-840b-6c0829e742fe", + "createTime": "2025-10-25T03:59:34.776Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "468c23374a64c1dbdbfb52707d43169fc8fda2dc", + "message": "Bug in system test deletion logic", + "issues": [ + "6845" + ] + } + ], + "version": "0.1.6", + "language": "JAVASCRIPT", + "artifactName": "gapic-node-processing", + "id": "e34cd443-08c5-4aeb-a38f-2a8c9a0102af", + "createTime": "2025-10-24T20:55:51.632Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "79e9ddf22a87f114cb7c692be5ee3b34424ad5d5", + "message": "[admanager] Added Application resource", + "issues": [ + "6834" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/admanager", + "id": "94298076-8858-42a8-8b9f-8b6370d80955", + "createTime": "2025-10-23T17:47:01.168Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "31da8eb0033e4edd861695715eda47830a5b447a", + "message": "[places] Add Review.visitDate field to indicate when the review author visited", + "issues": [ + "6836" + ] + } + ], + "version": "2.2.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/places", + "id": "f388a30b-05a1-4a26-8564-26e8c906801d", + "createTime": "2025-10-23T17:47:01.135Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "7f614ac2228003354479fd3b5959f631c67e7cc6", + "message": "[container] add node_kernel_module_loading field to LinuxNodeConfig", + "issues": [ + "6832" + ] + } + ], + "version": "6.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "8ec4f74a-a4f0-4146-bf30-7006d5aaec55", + "createTime": "2025-10-23T17:47:01.110Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b334162c5081489ffc9a970157723b3ffb9cc063", + "message": "[dialogflow] Added support for Build Your Own Assist feature", + "issues": [ + "6835" + ] + } + ], + "version": "7.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "ecb31434-3d2f-4a23-8453-6bc11b682833", + "createTime": "2025-10-23T17:47:01.088Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8cd5a4acb6460d56f4267abff60b00be93cf2a55", + "message": "[dataplex] A new message `DataDocumentationSpec` is added representing Data Documentation Spec", + "issues": [ + "6837" + ] + } + ], + "version": "5.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "b2b095af-7e83-4b4e-a51e-7b1f721bfcd5", + "createTime": "2025-10-23T17:47:01.058Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8a7ce8e898273557543277bcdb664d5aee9183ce", + "message": "Add EmbedContent method v1beta1", + "issues": [ + "6833" + ] + } + ], + "version": "5.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "26103632-b6d9-4ab5-9884-4e2befff013b", + "createTime": "2025-10-23T17:47:01.027Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a00faa8f3da51868df3e5d7a4a418bdb2f0de840", + "message": "[oracledatabase] Expand Oracle Database v1 API to add support for Exadata Exascale (`ExadbVmCluster`, `ExascaleDbStorageVault`), Base Database (`DbSystem`, `Database`, `PluggableDatabase`), and Networking (`OdbNetwork`, `OdbSubnet`). Adds enhance...", + "issues": [ + "6831" + ] + } + ], + "version": "0.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/oracledatabase", + "id": "6d3ec81f-7403-4f83-99f4-0b5d44151e04", + "createTime": "2025-10-21T17:28:44.603Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "eeaccdba2f06c01d6fca5427bc5b2fa9b22b5021", + "message": "[texttospeech] add `relax_safety_filters` proto field for Gemini TTS", + "issues": [ + "6823" + ] + } + ], + "version": "6.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/text-to-speech", + "id": "28359df8-7d94-46bc-93d7-c85cfe331741", + "createTime": "2025-10-21T17:28:44.582Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "9eb1fef3ff79fc73a5b890d69b5187baf87897e3", + "message": "[discoveryengine] Include AssistAnswer as a part of the Session", + "issues": [ + "6824" + ] + } + ], + "version": "2.5.2", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/discoveryengine", + "id": "d5d0986d-d100-4b61-a199-5580180ff3b5", + "createTime": "2025-10-21T17:28:44.529Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "6001de8c9b62274d067b58b346e835c97dc249ea", + "message": "Add FunctionResponsePart and excluded_predefined_functions in ComputerUse", + "issues": [ + "6829" + ] + }, + { + "type": "feat", + "sha": "0d3274e0fa00cf2cf9cc15488b2f33672a97fe00", + "message": "Add FunctionResponsePart and excluded_predefined_functions in ComputerUse", + "issues": [ + "6825" + ] + } + ], + "version": "5.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "1c80e9b3-5187-4056-b7b8-57a3123dd690", + "createTime": "2025-10-21T17:28:44.493Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "68fd63cd8c3d91e7f0c8e0193c9521e51fdeb33f", + "message": "[routeoptimization] add experimental Load Costs feature", + "issues": [ + "6819" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/routeoptimization", + "id": "a1715bbf-a7df-48ba-ace1-6b85ba2e9a91", + "createTime": "2025-10-16T22:02:18.319Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "7365b32f30e259c4839aad81e4c5cc5a91e6ebee", + "message": "[chat] Add `Carousel` widget", + "issues": [ + "6821" + ] + } + ], + "version": "0.20.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/chat", + "id": "172efab2-620e-4d79-8138-7cffc0efeebe", + "createTime": "2025-10-16T22:02:18.267Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ee1aabfb23f3e6c6c6b26298188ab3411f4073ae", + "message": "[container] Add SwapConfig to enable and configure swap memory for node pools", + "issues": [ + "6818" + ] + } + ], + "version": "6.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "4105c77e-5e88-41ce-888d-d9f8adcb7134", + "createTime": "2025-10-16T22:02:18.235Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "9f40bf125a2e32fee4da4cd391265e9d4b380bcd", + "message": "Add aspect_ratio and image_config for v1 version", + "issues": [ + "6817" + ] + }, + { + "type": "feat", + "sha": "8d38a0919218be1c4ba6de4e283786facf2eb0b4", + "message": "Add aspect_ratio and image_config for v1beta1 version", + "issues": [ + "6814" + ] + } + ], + "version": "5.9.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "0735d357-7175-4d65-8d4a-4ecab5d85566", + "createTime": "2025-10-16T22:02:18.199Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3290633a3b1d99a8c696aebe79f38984fda44460", + "message": "[generativelanguage] add support for additional reasons to stop image generation", + "issues": [ + "6820" + ] + } + ], + "version": "3.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "95a3c5b0-6374-415f-989e-b7a77f3636df", + "createTime": "2025-10-16T22:02:18.146Z" + }, { "changes": [ { @@ -66327,5 +67105,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2025-10-13T16:25:08.956Z" + "updateTime": "2025-11-21T23:14:19.352Z" } \ No newline at end of file diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 69bb5018afe6..31ce02061114 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -70,23 +70,4 @@ units) esac set -e -# Run flakybot for non-presubmit builds -if [ ${BUILD_TYPE} != "presubmit" ]; then - if [ ${TEST_TYPE} == "system" ] || [ ${TEST_TYPE} == "samples" ]; then - if [ -f "${PROJECT}_sponge_log.xml" ]; then - echo "Contents in ${PROJECT}_sponge_log.xml:" - cat ${PROJECT}_sponge_log.xml - - echo "Calling flakybot --repo ${REPO_OWNER}/${REPO_NAME} --commit_hash ${COMMIT_SHA} --build_url https://console.cloud.google.com/cloud-build/builds;region=global/${BUILD_ID}?project=${PROJECT_ID}" - flakybot \ - --repo "${REPO_OWNER}/${REPO_NAME}" \ - --commit_hash "${COMMIT_SHA}" \ - --build_url \ - "https://console.cloud.google.com/cloud-build/builds;region=global/${BUILD_ID}?project=${PROJECT_ID}" - else - echo "Missing sponge log: ${PROJECT}_sponge_log.xml" - fi - fi -fi - exit ${retval} diff --git a/libraries.json b/libraries.json index bf9463232541..7f7117bd92b3 100644 --- a/libraries.json +++ b/libraries.json @@ -3080,6 +3080,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-css", "support_documentation": "https://developers.google.com/comparison-shopping-services/api/docs/getting-support" }, + { + "name": "geminidataanalytics", + "name_pretty": "Data Analytics API with Gemini", + "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/geminidataanalytics/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/geminidataanalytics", + "api_id": "geminidataanalytics.googleapis.com", + "default_version": "v1beta", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "geminidataanalytics", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-geminidataanalytics", + "support_documentation": "https://cloud.google.com/gemini/docs/getting-support" + }, { "default_version": "v1beta1", "release_level": "preview", @@ -3099,6 +3117,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datalabeling", "support_documentation": "https://cloud.google.com/data-labeling/docs/getting-support" }, + { + "name": "datamanager", + "name_pretty": "Data Manager API", + "product_documentation": "https://developers.google.com/data-manager", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datamanager/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-ads/datamanager", + "api_id": "datamanager.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "datamanager", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ads-datamanager", + "support_documentation": "https://developers.google.com/data-manager/docs/getting-support" + }, { "language": "nodejs", "requires_billing": true, @@ -3908,22 +3944,5 @@ "api_shortname": "storagebatchoperations", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storagebatchoperations", "support_documentation": "https://cloud.google.com/storage/docs/getting-support" - }, - { - "name": "trace", - "name_pretty": "Trace", - "product_documentation": "https://cloud.google.com/trace", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/trace-agent/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559776", - "release_level": "preview", - "language": "nodejs", - "repo": "googleapis/cloud-trace-nodejs", - "distribution_name": "@google-cloud/trace-agent", - "api_id": "cloudtrace.googleapis.com", - "codeowner_team": "@googleapis/google-cloud-trace", - "api_shortname": "cloudtrace", - "library_type": "AGENT", - "linkToRepoHomepage": "https://github.com/googleapis/cloud-trace-nodejs", - "support_documentation": "https://cloud.google.com/trace/docs/getting-support" } ] \ No newline at end of file diff --git a/packages/gapic-node-processing/CHANGELOG.md b/packages/gapic-node-processing/CHANGELOG.md index 6d2edbdb62da..6c2f0e0fd88a 100644 --- a/packages/gapic-node-processing/CHANGELOG.md +++ b/packages/gapic-node-processing/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.6](https://github.com/googleapis/google-cloud-node/compare/gapic-node-processing-v0.1.5...gapic-node-processing-v0.1.6) (2025-10-24) + + +### Bug Fixes + +* Bug in system test deletion logic ([#6845](https://github.com/googleapis/google-cloud-node/issues/6845)) ([468c233](https://github.com/googleapis/google-cloud-node/commit/468c23374a64c1dbdbfb52707d43169fc8fda2dc)) + ## [0.1.5](https://github.com/googleapis/google-cloud-node/compare/gapic-node-processing-v0.1.4...gapic-node-processing-v0.1.5) (2025-10-13) diff --git a/packages/gapic-node-processing/package.json b/packages/gapic-node-processing/package.json index dc5a2dfe21b1..f114b7e91f20 100644 --- a/packages/gapic-node-processing/package.json +++ b/packages/gapic-node-processing/package.json @@ -1,6 +1,6 @@ { "name": "gapic-node-processing", - "version": "0.1.5", + "version": "0.1.6", "description": "Does various processing functions for Nodejs gapic libraries", "bin": "./build/src/cli.js", "scripts": { diff --git a/packages/gapic-node-processing/src/combine-libraries.ts b/packages/gapic-node-processing/src/combine-libraries.ts index 070d6a7520d6..4c8b693aa87e 100644 --- a/packages/gapic-node-processing/src/combine-libraries.ts +++ b/packages/gapic-node-processing/src/combine-libraries.ts @@ -201,12 +201,13 @@ export function setOnlyDefaultSystemTests( 'system-test/fixtures/sample/src', ); - for (const filePathObj of filePaths) { + for (let i = filePaths.length - 1; i >= 0; i--) { + const filePathObj = filePaths[i]; if ( systemTestRegex.test(filePathObj.filePath) && !filePathObj.filePath.includes(defaultVersion) ) { - filePaths.splice(filePaths.indexOf(filePathObj), 1); + filePaths.splice(i, 1); } } } diff --git a/packages/gapic-node-processing/test/combine-libraries.test.ts b/packages/gapic-node-processing/test/combine-libraries.test.ts index 743a11e3df7b..cf7915f0c51b 100644 --- a/packages/gapic-node-processing/test/combine-libraries.test.ts +++ b/packages/gapic-node-processing/test/combine-libraries.test.ts @@ -31,6 +31,8 @@ export const LIB_PRE_COMBINATION_ESM = 'google-cloud-tasks-nodejs'; export const LIB_PRE_COMBINATION = 'google-cloud-speech-nodejs'; export const LIB_POST_COMBINATION_ESM = 'google-cloud-tasks'; export const LIB_POST_COMBINATION = 'google-cloud-speech'; +export const LIB_PRE_COMBINATION_DEFAULT_SYSTEM_TEST = 'google-analytics-data-nodejs'; +export const LIB_POST_COMBINATION_DEFAULT_SYSTEM_TEST = 'google-analytics-data'; const libraryConfigCJS = new LibraryConfig({ sourcePath: path.resolve(TEST_FIXTURES_PATH, LIB_PRE_COMBINATION), @@ -50,6 +52,18 @@ const libraryConfigESM = new LibraryConfig({ defaultVersion: 'v1', isEsm: true, }); +const libraryConfigDefaultSystemTest = new LibraryConfig({ + sourcePath: path.resolve( + TEST_FIXTURES_PATH, + LIB_PRE_COMBINATION_DEFAULT_SYSTEM_TEST, + ), + destinationPath: path.resolve( + TEST_FIXTURES_PATH, + LIB_POST_COMBINATION_DEFAULT_SYSTEM_TEST, + ), + defaultVersion: 'v1beta', + isEsm: false, +}); describe('combine libraries', () => { it('should throw an error if the library is not in a "pre" combo state', async () => { @@ -197,55 +211,32 @@ describe('combine libraries', () => { }); it('should only have default system tests', async () => { - await combineLibraries(libraryConfigCJS); + await combineLibraries(libraryConfigDefaultSystemTest); assert.match( await fs.readFile( path.resolve( TEST_FIXTURES_PATH, - LIB_POST_COMBINATION, + LIB_POST_COMBINATION_DEFAULT_SYSTEM_TEST, 'system-test/fixtures/sample/src/index.js', ), 'utf-8', ), - /AdaptationClient/, + /BetaAnalyticsDataClient/, ); assert.match( await fs.readFile( path.resolve( TEST_FIXTURES_PATH, - LIB_POST_COMBINATION, - 'system-test/fixtures/sample/src/index.js', - ), - 'utf-8', - ), - /SpeechClient/, - ); - - assert.match( - await fs.readFile( - path.resolve( - TEST_FIXTURES_PATH, - LIB_POST_COMBINATION, + LIB_POST_COMBINATION_DEFAULT_SYSTEM_TEST, 'system-test/fixtures/sample/src/index.ts', ), 'utf-8', ), - /AdaptationClient/, + /BetaAnalyticsDataClient/, ); - assert.match( - await fs.readFile( - path.resolve( - TEST_FIXTURES_PATH, - LIB_POST_COMBINATION, - 'system-test/fixtures/sample/src/index.ts', - ), - 'utf-8', - ), - /SpeechClient/, - ); }); it('should create a directory and write files', async () => { diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintrc.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitattributes b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.jsdoc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.jsdoc.js new file mode 100644 index 000000000000..717522242d93 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/data', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.mocharc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.mocharc.js new file mode 100644 index 000000000000..24e9d15257f9 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.nycrc b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierrc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierrc.js new file mode 100644 index 000000000000..d89a632f90b0 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CODE_OF_CONDUCT.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CONTRIBUTING.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CONTRIBUTING.md new file mode 100644 index 000000000000..11f6908f30cf --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-shopping-merchant-accounts/LICENSE.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/LICENSE similarity index 100% rename from packages/google-shopping-merchant-accounts/LICENSE.md rename to packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/LICENSE diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/README.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/README.md new file mode 100644 index 000000000000..1b19eee45c37 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/README.md @@ -0,0 +1,108 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Google Analytics Data API: Nodejs Client][homepage] + +[//]: # "releaseLevel" + +[![npm version](https://img.shields.io/npm/v/@google-cloud/data.svg)](https://www.npmjs.org/package/@google-cloud/data) + +Google Analytics Data API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Google Analytics Data API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/data/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Analytics Data API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/data +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +[//]: # "samples" + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/data@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/package.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/package.json new file mode 100644 index 000000000000..a60aee8e2247 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/data", + "version": "0.1.0", + "description": "Data client for Node.js", + "repository": "googleapis/nodejs-data", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google data", + "data", + "alpha analytics data" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^5.1.1-rc.1" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.11", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.3", + "gts": "^6.0.2", + "jsdoc": "^4.0.5", + "jsdoc-fresh": "^5.0.2", + "jsdoc-region-tag": "^4.0.1", + "mocha": "^11.7.4", + "pack-n-play": "^4.2.1", + "typescript": "5.8.3", + "sinon": "^21.0.0" + }, + "engines": { + "node": ">=v18" + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/analytics_data_api.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/analytics_data_api.proto new file mode 100644 index 000000000000..47c4f3b278cd --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/analytics_data_api.proto @@ -0,0 +1,1304 @@ +// Copyright 2025 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.analytics.data.v1alpha; + +import "google/analytics/data/v1alpha/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service AlphaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly," + "https://www.googleapis.com/auth/drive," + "https://www.googleapis.com/auth/drive.file," + "https://www.googleapis.com/auth/spreadsheets"; + + // Returns a customized funnel report of your Google Analytics event data. The + // data returned from the API is as a table with columns for the requested + // dimensions and metrics. + // + // Funnel exploration lets you visualize the steps your users take to complete + // a task and quickly see how well they are succeeding or failing at each + // step. For example, how do prospects become shoppers and then become buyers? + // How do one time buyers become repeat buyers? With this information, you can + // improve inefficient or abandoned customer journeys. To learn more, see [GA4 + // Funnel Explorations](https://support.google.com/analytics/answer/9327974). + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the [Google Analytics Data API Funnel + // Reporting + // Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + rpc RunFunnelReport(RunFunnelReportRequest) + returns (RunFunnelReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:runFunnelReport" + body: "*" + }; + } + + // Creates an audience list for later retrieval. This method quickly returns + // the audience list's resource name and initiates a long running asynchronous + // request to form an audience list. To list the users in an audience list, + // first create the audience list through this method and then send the + // audience resource name to the `QueryAudienceList` method. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // An audience list is a snapshot of the users currently in the audience at + // the time of audience list creation. Creating audience lists for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience lists contain + // the users in each audience. + // + // This method is available at beta stability at + // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceList(CreateAudienceListRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/audienceLists" + body: "audience_list" + }; + option (google.api.method_signature) = "parent,audience_list"; + option (google.longrunning.operation_info) = { + response_type: "AudienceList" + metadata_type: "AudienceListMetadata" + }; + } + + // Retrieves an audience list of users. After creating an audience, the users + // are not immediately available for listing. First, a request to + // `CreateAudienceList` is necessary to create an audience list of users, and + // then second, this method is used to retrieve the users in the audience + // list. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // This method is available at beta stability at + // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceList(QueryAudienceListRequest) + returns (QueryAudienceListResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audienceLists/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Exports an audience list of users to a Google Sheet. After creating an + // audience, the users are not immediately available for listing. First, a + // request to `CreateAudienceList` is necessary to create an audience list of + // users, and then second, this method is used to export those users in the + // audience list to a Google Sheet. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc SheetExportAudienceList(SheetExportAudienceListRequest) + returns (SheetExportAudienceListResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience list. This method + // can be used to understand an audience list after it has been created. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/audienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience lists for a property. This method can be used for you to + // find and reuse existing audience lists rather than creating unnecessary new + // audience lists. The same audience can have multiple audience lists that + // represent the list of users that were in an audience on different days. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceLists(ListAudienceListsRequest) + returns (ListAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/audienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a recurring audience list. Recurring audience lists produces new + // audience lists each day. Audience lists are users in an audience at the + // time of the list's creation. + // + // A recurring audience list ensures that you have audience list based on the + // most recent data available for use each day. If you manually create + // audience list, you don't know when an audience list based on an additional + // day's data is available. This recurring audience list automates the + // creation of an audience list when an additional day's data is available. + // You will consume fewer quota tokens by using recurring audience list versus + // manually creating audience list at various times of day trying to guess + // when an additional day's data is ready. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + body: "recurring_audience_list" + }; + option (google.api.method_signature) = "parent,recurring_audience_list"; + } + + // Gets configuration metadata about a specific recurring audience list. This + // method can be used to understand a recurring audience list's state after it + // has been created. For example, a recurring audience list resource will + // generate audience list instances for each day, and this method can be used + // to get the resource name of the most recent audience list instance. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all recurring audience lists for a property. This method can be used + // for you to find and reuse existing recurring audience lists rather than + // creating unnecessary new recurring audience lists. The same audience can + // have multiple recurring audience lists that represent different dimension + // combinations; for example, just the dimension `deviceId` or both the + // dimensions `deviceId` and `userId`. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) + returns (ListRecurringAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Get all property quotas organized by quota category for a given property. + // This will charge 1 property quota from the category with the most quota. + rpc GetPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest) + returns (PropertyQuotasSnapshot) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + }; + option (google.api.method_signature) = "name"; + } + + // Initiates the creation of a report task. This method quickly + // returns a report task and initiates a long running + // asynchronous request to form a customized report of your Google Analytics + // event data. + // + // A report task will be retained and available for querying for 72 hours + // after it has been created. + // + // A report task created by one user can be listed and queried by all users + // who have access to the property. + rpc CreateReportTask(CreateReportTaskRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/reportTasks" + body: "report_task" + }; + option (google.api.method_signature) = "parent,report_task"; + option (google.longrunning.operation_info) = { + response_type: "ReportTask" + metadata_type: "ReportTaskMetadata" + }; + } + + // Retrieves a report task's content. After requesting the `CreateReportTask`, + // you are able to retrieve the report content once the report is + // ACTIVE. This method will return an error if the report task's state is not + // `ACTIVE`. A query response will return the tabular row & column values of + // the report. + rpc QueryReportTask(QueryReportTaskRequest) + returns (QueryReportTaskResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/reportTasks/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets report metadata about a specific report task. After creating a report + // task, use this method to check its processing state or inspect its + // report definition. + rpc GetReportTask(GetReportTaskRequest) returns (ReportTask) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/reportTasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all report tasks for a property. + rpc ListReportTasks(ListReportTasksRequest) + returns (ListReportTasksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/reportTasks" + }; + option (google.api.method_signature) = "parent"; + } +} + +// A request to create a new recurring audience list. +message CreateRecurringAudienceListRequest { + // Required. The parent resource where this recurring audience list will be + // created. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Required. The recurring audience list to create. + RecurringAudienceList recurring_audience_list = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A recurring audience list produces new audience lists each day. Audience +// lists are users in an audience at the time of the list's creation. A +// recurring audience list ensures that you have audience list based on the most +// recent data available for use each day. +message RecurringAudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" + plural: "recurringAudienceLists" + singular: "recurringAudienceList" + }; + + // Output only. Identifier. The recurring audience list resource name assigned + // during creation. This resource name identifies this + // `RecurringAudienceList`. + // + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the audience list + // response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of remaining days that a recurring audience export + // will produce an audience list instance. This counter decreases by one each + // day, and when it reaches zero, no new audience lists will be created. + // + // Recurring audience list request for Analytics 360 properties default to 180 + // days and have a maximum of 365 days. Requests for standard Analytics + // properties default to 14 days and have a maximum of 30 days. + // + // The minimum value allowed during creation is 1. Requests above their + // respective maximum will be coerced to their maximum. + optional int32 active_days_remaining = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Audience list resource names for audience list instances + // created for this recurring audience list. One audience list is created for + // each day, and the audience list will be listed here. + // + // This list is ordered with the most recently created audience list first. + repeated string audience_lists = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when a recurring audience + // list creates new audience lists. Webhooks allow a notification to be sent + // to your servers & avoid the need for polling. + // + // Two POST requests will be sent each time a recurring audience list creates + // an audience list. This happens once per day until a recurring audience list + // reaches 0 active days remaining. The first request will be sent showing a + // newly created audience list in its CREATING state. The second request will + // be sent after the audience list completes creation (either the ACTIVE or + // FAILED state). + optional WebhookNotification webhook_notification = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configures a long-running operation resource to send a webhook notification +// from the Google Analytics Data API to your webhook server when the resource +// updates. +// +// Notification configurations contain private values & are only visible to your +// GCP project. Different GCP projects may attach different webhook +// notifications to the same long-running operation resource. +message WebhookNotification { + // Optional. The web address that will receive the webhook notification. This + // address will receive POST requests as the state of the long running + // operation resource changes. The POST request will contain both a JSON + // version of the long running operation resource in the body and a + // `sentTimestamp` field. The sent timestamp will specify the unix + // microseconds since the epoch that the request was sent; this lets you + // identify replayed notifications. + // + // An example URI is + // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`. + // + // The URI must use HTTPS and point to a site with a valid SSL certificate on + // the web server. The URI must have a maximum string length of 128 characters + // & use only the allowlisted characters from [RFC + // 1738](https://www.rfc-editor.org/rfc/rfc1738). + // + // When your webhook server receives a notification, it is expected to reply + // with an HTTP response status code of 200 within 5 seconds. + // + // A URI is required to use webhook notifications. + // + // Requests to this webhook server will contain an ID token authenticating the + // service account + // `google-analytics-audience-export@system.gserviceaccount.com`. To learn + // more about ID tokens, see + // https://cloud.google.com/docs/authentication/token-types#id. For Google + // Cloud Functions, this lets you configure your function to require + // authentication. In Cloud IAM, you will need to grant the service account + // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud + // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook + // post request to pass Google Cloud Functions authentication. This API can + // send webhook notifications to arbitrary URIs; for webhook servers other + // than Google Cloud Functions, this ID token in the authorization bearer + // header should be ignored if it is not needed. + optional string uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The channel token is an arbitrary string value and must have a + // maximum string length of 64 characters. Channel tokens allow you to verify + // the source of a webhook notification. This guards against the message being + // spoofed. The channel token will be specified in the `X-Goog-Channel-Token` + // HTTP header of the webhook POST request. + // + // A channel token is not required to use webhook notifications. + optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to retrieve configuration metadata about a specific recurring +// audience list. +message GetRecurringAudienceListRequest { + // Required. The recurring audience list resource name. + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; +} + +// A request to list all recurring audience lists for a property. +message ListRecurringAudienceListsRequest { + // Required. All recurring audience lists for this property will be listed in + // the response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Optional. The maximum number of recurring audience lists to return. The + // service may return fewer than this value. If unspecified, at most 200 + // recurring audience lists will be returned. The maximum value is 1000 + // (higher values will be coerced to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListRecurringAudienceLists` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all recurring audience lists for a property. +message ListRecurringAudienceListsResponse { + // Each recurring audience list for a property. + repeated RecurringAudienceList recurring_audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to return the PropertyQuotasSnapshot for a given category. +message GetPropertyQuotasSnapshotRequest { + // Required. Quotas from this property will be listed in the response. + // Format: `properties/{property}/propertyQuotasSnapshot` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + ]; +} + +// Current state of all Property Quotas organized by quota category. +message PropertyQuotasSnapshot { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + pattern: "properties/{property}/propertyQuotasSnapshot" + plural: "propertyQuotasSnapshots" + singular: "propertyQuotasSnapshot" + }; + + // Identifier. The property quota snapshot resource name. + string name = 4 [(google.api.field_behavior) = IDENTIFIER]; + + // Property Quota for core property tokens + PropertyQuota core_property_quota = 1; + + // Property Quota for realtime property tokens + PropertyQuota realtime_property_quota = 2; + + // Property Quota for funnel property tokens + PropertyQuota funnel_property_quota = 3; +} + +// A request to retrieve configuration metadata about a specific audience list. +message GetAudienceListRequest { + // Required. The audience list resource name. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceList" + } + ]; +} + +// A request to list all audience lists for a property. +message ListAudienceListsRequest { + // Required. All audience lists for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Optional. The maximum number of audience lists to return. The service may + // return fewer than this value. If unspecified, at most 200 audience lists + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceLists` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceLists` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience lists for a property. +message ListAudienceListsResponse { + // Each audience list for a property. + repeated AudienceList audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience list. +message CreateAudienceListRequest { + // Required. The parent resource where this audience list will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Required. The audience list to create. + AudienceList audience_list = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience list is a list of users in an audience at the time of the list's +// creation. One audience may have multiple audience lists created for different +// days. +message AudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceList" + pattern: "properties/{property}/audienceLists/{audience_list}" + plural: "audienceLists" + singular: "audienceList" + }; + + // The AudienceList currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceList is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceList call. + CREATING = 1; + + // The AudienceList is fully created and ready for querying. An AudienceList + // is updated to active asynchronously from a request; this occurs some + // time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceList failed to be created. It is possible that re-requesting + // this audience list will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience list resource name assigned during + // creation. This resource name identifies this `AudienceList`. + // + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceList. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceList was called and the + // AudienceList began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceList. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceList + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceList result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience list fails during + // creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recurring audience list that created this audience list. + // Recurring audience lists create audience lists daily. + // + // If audience lists are created directly, they will have no associated + // recurring audience list, and this field will be blank. + optional string recurring_audience_list = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when an audience list is + // ready to be used. Webhooks allow a notification to be sent to your servers + // & avoid the need for polling. + // + // Either one or two POST requests will be sent to the webhook. The first POST + // request will be sent immediately showing the newly created audience list in + // its CREATING state. The second POST request will be sent after the audience + // list completes creation (either the ACTIVE or FAILED state). + // + // If identical audience lists are requested in quick succession, the second & + // subsequent audience lists can be served from cache. In that case, the + // audience list create method can return an audience list is already ACTIVE. + // In this scenario, only one POST request will be sent to the webhook. + optional WebhookNotification webhook_notification = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// This metadata is currently blank. +message AudienceListMetadata {} + +// A request to list users in an audience list. +message QueryAudienceListRequest { + // Required. The name of the audience list to retrieve users from. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience list. +message QueryAudienceListResponse { + // Configuration data about AudienceList being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceList correspond to the columns in the AudienceRows. + optional AudienceList audience_list = 1; + + // Rows for each user in an audience list. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceList result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// A request to export users in an audience list to a Google Sheet. +message SheetExportAudienceListRequest { + // Required. The name of the audience list to retrieve users from. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The created Google Sheet with the list of users in an audience list. +message SheetExportAudienceListResponse { + // A uri for you to visit in your browser to view the Google Sheet. + optional string spreadsheet_uri = 1; + + // An ID that identifies the created Google Sheet resource. + optional string spreadsheet_id = 2; + + // The total number of rows in the AudienceList result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; + + // Configuration data about AudienceList being exported. Returned to help + // interpret the AudienceList in the Google Sheet of this response. + // + // For example, the AudienceList may have more rows than are present in the + // Google Sheet, and in that case, you may want to send an additional sheet + // export request with a different `offset` value to retrieve the next page of + // rows in an additional Google Sheet. + optional AudienceList audience_list = 4; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceListResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The request for a funnel report. +message RunFunnelReportRequest { + // Controls the dimensions present in the funnel visualization sub report + // response. + enum FunnelVisualizationType { + // Unspecified type. + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0; + + // A standard (stepped) funnel. The funnel visualization sub report in the + // response will not contain date. + STANDARD_FUNNEL = 1; + + // A trended (line chart) funnel. The funnel visualization sub report in the + // response will contain the date dimension. + TRENDED_FUNNEL = 2; + } + + // Optional. A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. + repeated DateRange date_ranges = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration of this request's funnel. This funnel + // configuration is required. + Funnel funnel = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, this breakdown adds a dimension to the funnel table + // sub report response. This breakdown dimension expands each funnel step to + // the unique values of the breakdown dimension. For example, a breakdown by + // the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + // `desktop`, and the total. + FunnelBreakdown funnel_breakdown = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, next action adds a dimension to the funnel + // visualization sub report response. This next action dimension expands each + // funnel step to the unique values of the next action. For example a next + // action of the `eventName` dimension will create rows for several events + // (for example `session_start` & `click`) and the total. + // + // Next action only supports `eventName` and most Page / Screen dimensions + // like `pageTitle` and `pagePath`. + FunnelNextAction funnel_next_action = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The funnel visualization type controls the dimensions present in + // the funnel visualization sub report response. If not specified, + // `STANDARD_FUNNEL` is used. + FunnelVisualizationType funnel_visualization_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configurations of segments. Segments are subsets of a + // property's data. In a funnel report with segments, the funnel is evaluated + // in each segment. + // + // Each segment specified in this request + // produces a separate row in the response; in the response, each segment + // identified by its name. + // + // The segments parameter is optional. Requests are limited to 4 segments. + repeated Segment segments = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + int64 limit = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters allow you to ask for only specific dimension + // values in the report. To learn more, see [Creating a Report: Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Toggles whether to return the current state of this Analytics + // Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The funnel report response contains two sub reports. The two sub reports are +// different combinations of dimensions and metrics. +message RunFunnelReportResponse { + // The funnel table is a report with the funnel step, segment, breakdown + // dimension, active users, completion rate, abandonments, and abandonments + // rate. + // + // The segment dimension is only present in this response if a segment was + // requested. The breakdown dimension is only present in this response if it + // was requested. + FunnelSubReport funnel_table = 1; + + // The funnel visualization is a report with the funnel step, segment, date, + // next action dimension, and active users. + // + // The segment dimension is only present in this response if a segment was + // requested. The date dimension is only present in this response if it was + // requested through the `TRENDED_FUNNEL` funnel type. The next action + // dimension is only present in the response if it was requested. + FunnelSubReport funnel_visualization = 2; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 3; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runFunnelReport". Useful to distinguish between + // response types in JSON. + string kind = 4; +} + +// A specific report task configuration. +message ReportTask { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/ReportTask" + pattern: "properties/{property}/reportTasks/{report_task}" + plural: "reportTasks" + singular: "reportTask" + }; + + // The definition of how a report should be run. + message ReportDefinition { + // Optional. The dimensions requested and displayed. + repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metrics requested and displayed. + repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. + // If two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. In a cohort request, + // this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters let you ask for only specific dimension + // values in the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter clause of metrics. Applied after aggregating the + // report's rows, similar to SQL having-clause. Dimensions cannot be used in + // this filter. + FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The row count of the start row from Google Analytics Storage. + // The first row is counted as row 0. + // + // When creating a report task, the `offset` and `limit` parameters define + // the subset of data rows from Google Analytics storage to be included in + // the generated report. For example, if there are a total of 300,000 rows + // in Google Analytics storage, the initial report task may have the + // first 10,000 rows with a limit of 10,000 and an offset of 0. + // Subsequently, another report task could cover the next 10,000 rows with a + // limit of 10,000 and an offset of 10,000. + int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return in the Report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if + // you set `limit` to a higher value. + int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregation of metrics. Aggregated metric values will be shown + // in rows where the dimension_values are set to + // "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cohort group associated with this request. If there is a cohort + // group in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If false or unspecified, each row with all metrics equal to 0 + // will not be returned. If true, these rows will be returned if they are + // not separately removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // containing eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The report's sampling level. + optional SamplingLevel sampling_level = 14 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The report metadata for a specific report task. + message ReportMetadata { + // The processing state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The report is currently creating and will be available in the + // future. Creating occurs immediately after the CreateReport call. + CREATING = 1; + + // The report is fully created and ready for querying. + ACTIVE = 2; + + // The report failed to be created. + FAILED = 3; + } + + // Output only. The current state for this report task. + optional State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when `CreateReportTask` was called and the report + // began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // report. Because this token count is based on activity from the `CREATING` + // state, this tokens charge will be fixed once a report task enters the + // `ACTIVE` or `FAILED` state. + int32 creation_quota_tokens_charged = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the report result. This field + // will be populated when the state is active. You can utilize + // `task_row_count` for pagination within the confines of their existing + // report. + optional int32 task_row_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated if a report task fails during + // creation. + optional string error_message = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in Google Analytics storage. If you + // want to query additional data rows beyond the current report, they can + // initiate a new report task based on the `total_row_count`. + // + // The `task_row_count` represents the number of rows specifically + // pertaining to the current report, whereas `total_row_count` encompasses + // the total count of rows across all data retrieved from Google + // Analytics storage. + // + // For example, suppose the current report's `task_row_count` is 20, + // displaying the data from the first 20 rows. Simultaneously, the + // `total_row_count` is 30, indicating the presence of data for all 30 rows. + // The `task_row_count` can be utilizated to paginate through the initial 20 + // rows. To expand the report and include data from all 30 rows, a new + // report task can be created using the total_row_count to access the full + // set of 30 rows' worth of data. + optional int32 total_row_count = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The report task resource name assigned during + // creation. Format: "properties/{property}/reportTasks/{report_task}" + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. A report definition to fetch report data, which describes the + // structure of a report. It typically includes the fields that will be + // included in the report and the criteria that will be used to filter the + // data. + ReportDefinition report_definition = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The report metadata for a specific report task, which provides + // information about a report. It typically includes the following + // information: the resource name of the report, the state of the report, the + // timestamp the report was created, etc, + ReportMetadata report_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to create a report task. +message CreateReportTaskRequest { + // Required. The parent resource where this report task will be created. + // Format: `properties/{propertyId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Required. The report task configuration to create. + ReportTask report_task = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the metadata of a long-running operation. Currently, this metadata +// is blank. +message ReportTaskMetadata {} + +// A request to fetch the report content for a report task. +message QueryReportTaskRequest { + // Required. The report source name. + // Format: `properties/{property}/reportTasks/{report}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row in the report. The first row is + // counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return from the report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. The number of rows + // available to a QueryReportTaskRequest is further limited by the limit of + // the associated ReportTask. A query can retrieve at most ReportTask.limit + // rows. For example, if the ReportTask has a limit of 1,000, then a + // QueryReportTask request with offset=900 and limit=500 will return at most + // 100 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The report content corresponding to a report task. +message QueryReportTaskResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; +} + +// A request to retrieve configuration metadata about a specific report task. +message GetReportTaskRequest { + // Required. The report task resource name. + // Format: `properties/{property}/reportTasks/{report_task}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/ReportTask" + } + ]; +} + +// A request to list all report tasks for a property. +message ListReportTasksRequest { + // Required. All report tasks for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Optional. The maximum number of report tasks to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReportTasks` call. + // Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all report tasks for a property. +message ListReportTasksResponse { + // Each report task for a property. + repeated ReportTask report_tasks = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/data.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/data.proto new file mode 100644 index 000000000000..0315a16711bc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/google/analytics/data/v1alpha/data.proto @@ -0,0 +1,1611 @@ +// Copyright 2025 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.analytics.data.v1alpha; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The dimension name or metric name. Must be a name defined in dimensions + // or metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 2; + + // A filter for in list values. + InListFilter in_list_filter = 3; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 4; + + // A filter for between two values. + BetweenFilter between_filter = 5; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 6; + } +} + +// The filter for string +message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; +} + +// The result needs to be in a list of string values. +message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; +} + +// Filters for numeric or date values. +message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// To express that the result needs to be between two numbers (inclusive). +message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; +} + +// Filter for empty values. +message EmptyFilter {} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630) and [About + // Demographics and + // Interests](https://support.google.com/analytics/answer/2799357). + optional bool subject_to_thresholding = 8; + + // If this report's results are + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in the order that date + // ranges were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} + +// Breakdowns add a dimension to the funnel table sub report response. +message FunnelBreakdown { + // The dimension column added to the funnel table sub report response. The + // breakdown dimension breaks down each funnel step. A valid + // `breakdownDimension` is required if `funnelBreakdown` is specified. + Dimension breakdown_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 15. + optional int64 limit = 2; +} + +// Next actions state the value for a dimension after the user has achieved +// a step but before the same user has achieved the next step. For example if +// the `nextActionDimension` is `eventName`, then `nextActionDimension` in the +// `i`th funnel step row will return first event after the event that qualified +// the user into the `i`th funnel step but before the user achieved the `i+1`th +// funnel step. +message FunnelNextAction { + // The dimension column added to the funnel visualization sub report response. + // The next action dimension returns the next dimension value of this + // dimension after the user has attained the `i`th funnel step. + // + // `nextActionDimension` currently only supports `eventName` and most Page / + // Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + // cannot be a dimension expression. + Dimension next_action_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 5. + optional int64 limit = 2; +} + +// Configures the funnel in a funnel report request. A funnel reports on users +// as they pass through a sequence of steps. +// +// Funnel exploration lets you visualize the steps your users take to complete a +// task and quickly see how well they are succeeding or failing at each step. +// For example, how do prospects become shoppers and then become buyers? How do +// one time buyers become repeat buyers? With this information, you can improve +// inefficient or abandoned customer journeys. +message Funnel { + // In an open funnel, users can enter the funnel in any step, and in a closed + // funnel, users must enter the funnel in the first step. Optional. If + // unspecified, a closed funnel is used. + bool is_open_funnel = 1; + + // The sequential steps of this funnel. + repeated FunnelStep steps = 2; +} + +// Steps define the user journey you want to measure. Steps contain one or +// more conditions that your users must meet to be included in that step of +// the funnel journey. +message FunnelStep { + // The distinctive name for this step. If unspecified, steps will be named + // by a 1 based indexed name (for example "0. ", "1. ", etc.). This name + // defines string value returned by the `funnelStepName` dimension. For + // example, specifying `name = Purchase` in the request's third funnel step + // will produce `3. Purchase` in the funnel report response. + string name = 1; + + // If true, this step must directly follow the previous step. If false, + // there can be events between the previous step and this step. If + // unspecified, `isDirectlyFollowedBy` is treated as false. + bool is_directly_followed_by = 2; + + // If specified, this step must complete within this duration of the + // completion of the prior step. `withinDurationFromPriorStep` is inclusive + // of the endpoint at the microsecond granularity. For example a duration of + // 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 + // microsecond. + // + // `withinDurationFromPriorStep` is optional, and if unspecified, steps may + // be separated by any time duration. + optional google.protobuf.Duration within_duration_from_prior_step = 3; + + // The condition that your users must meet to be included in this step of + // the funnel journey. + FunnelFilterExpression filter_expression = 4; +} + +// Funnel sub reports contain the dimension and metric data values. For example, +// 12 users reached the second step of the funnel. +message FunnelSubReport { + // Describes dimension columns. Funnel reports always include the funnel step + // dimension in sub report responses. Additional dimensions like breakdowns, + // dates, and next actions may be present in the response if requested. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. Funnel reports always include active users in sub + // report responses. The funnel table includes additional metrics like + // completion rate, abandonments, and abandonments rate. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // Metadata for the funnel report. + FunnelResponseMetadata metadata = 4; +} + +// User segments are subsets of users who engaged with your site or app. For +// example, users who have previously purchased; users who added items to their +// shopping carts, but didn’t complete a purchase. +message UserSegment { + // Defines which users are included in this segment. Optional. + UserSegmentCriteria user_inclusion_criteria = 1; + + // Defines which users are excluded in this segment. Optional. + UserSegmentExclusion exclusion = 2; +} + +// A user matches a criteria if the user's events meet the conditions in the +// criteria. +message UserSegmentCriteria { + // A user matches this criteria if the user matches each of these + // `andConditionGroups` and each of the `andSequenceGroups`. + // `andConditionGroups` may be empty if `andSequenceGroups` are specified. + repeated UserSegmentConditionGroup and_condition_groups = 1; + + // A user matches this criteria if the user matches each of these + // `andSequenceGroups` and each of the `andConditionGroups`. + // `andSequenceGroups` may be empty if `andConditionGroups` are specified. + repeated UserSegmentSequenceGroup and_sequence_groups = 2; +} + +// Scoping specifies which events are considered when evaluating if a user +// meets a criteria. +enum UserCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + USER_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_SESSION = 2; + + // If the criteria is satisfied by any events for the user, the user + // matches the criteria. + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message UserSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this user. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a single + // event, and then, the condition group is determined to be matched or not for + // this user. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Define conditions that must occur in a specific order for the user to be +// a member of the segment. +message UserSegmentSequenceGroup { + // All sequence steps must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, all sequence steps must complete within + // one session for the user to match the sequence. `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT` is not supported. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping sequence_scoping = 1; + + // Defines the time period in which the whole sequence must occur; for + // example, 30 Minutes. `sequenceMaximumDuration` is inclusive + // of the endpoint at the microsecond granularity. For example a sequence + // with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 + // seconds, but not 5 seconds and 1 microsecond. + // + // `sequenceMaximumDuration` is optional, and if unspecified, sequences can + // be completed in any time duration. + google.protobuf.Duration sequence_maximum_duration = 2; + + // An ordered sequence of condition steps. A user's events must complete + // each step in order for the user to match the + // `UserSegmentSequenceGroup`. + repeated UserSequenceStep user_sequence_steps = 3; +} + +// A condition that must occur in the specified step order for this user +// to match the sequence. +message UserSequenceStep { + // If true, the event satisfying this step must be the very next event + // after the event satifying the last step. If false, this step indirectly + // follows the prior step; for example, there may be events between the + // prior step and this step. `isDirectlyFollowedBy` must be false for + // the first step. + bool is_directly_followed_by = 1; + + // This sequence step must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // WITHIN_SAME_SESSION`, this sequence steps must complete within one + // session for the user to match the sequence. `stepScoping = + // ACROSS_ALL_SESSIONS` is only allowed if the `sequenceScoping = + // ACROSS_ALL_SESSIONS`. + // + // Optional. If unspecified, `stepScoping` uses the same + // `UserCriteriaScoping` as the `sequenceScoping`. + UserCriteriaScoping step_scoping = 2; + + // A user matches this sequence step if their events match this + // expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 3; +} + +// Specifies which users are excluded in this segment. +message UserSegmentExclusion { + // Specifies how long an exclusion will last if a user matches the + // `userExclusionCriteria`. + // + // Optional. If unspecified, `userExclusionDuration` of + // `USER_EXCLUSION_TEMPORARY` is used. + UserExclusionDuration user_exclusion_duration = 1; + + // If a user meets this condition, the user is excluded from membership in + // the segment for the `userExclusionDuration`. + UserSegmentCriteria user_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a user matches +// the `userExclusionCriteria`. +enum UserExclusionDuration { + // Unspecified exclusion duration. Do not specify. + USER_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude users from the segment during periods when the + // user meets the `userExclusionCriteria` condition. + USER_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude users from the segment if the user ever meets the + // `userExclusionCriteria` condition. + USER_EXCLUSION_PERMANENT = 2; +} + +// Session segments are subsets of the sessions that occurred on your site or +// app: for example, all the sessions that originated from a particular +// advertising campaign. +message SessionSegment { + // Defines which sessions are included in this segment. Optional. + SessionSegmentCriteria session_inclusion_criteria = 1; + + // Defines which sessions are excluded in this segment. Optional. + SessionSegmentExclusion exclusion = 2; +} + +// A session matches a criteria if the session's events meet the conditions in +// the criteria. +message SessionSegmentCriteria { + // A session matches this criteria if the session matches each of these + // `andConditionGroups`. + repeated SessionSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if a +// session meets a criteria. +enum SessionCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the session matches the + // criteria. + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the session matches + // the criteria. + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message SessionSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this session. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a + // single event, and then, the condition group is determined to be matched or + // not for this session. + // + // Optional. If unspecified, a `conditionScoping` of `WITHIN_SAME_SESSION` + // is used. + SessionCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which sessions are excluded in this segment. +message SessionSegmentExclusion { + // Specifies how long an exclusion will last if a session matches the + // `sessionExclusionCriteria`. + // + // Optional. If unspecified, a `sessionExclusionDuration` of + // `SESSION_EXCLUSION_TEMPORARY` is used. + SessionExclusionDuration session_exclusion_duration = 1; + + // If a session meets this condition, the session is excluded from + // membership in the segment for the `sessionExclusionDuration`. + SessionSegmentCriteria session_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a session +// matches the `sessionExclusionCriteria`. +enum SessionExclusionDuration { + // Unspecified exclusion duration. Do not specify. + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude sessions from the segment during periods when the + // session meets the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude sessions from the segment if the session ever meets + // the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_PERMANENT = 2; +} + +// Event segments are subsets of events that were triggered on your site or app. +// for example, all purchase events made in a particular location; app_exception +// events that occurred on a specific operating system. +message EventSegment { + // Defines which events are included in this segment. Optional. + EventSegmentCriteria event_inclusion_criteria = 1; + + // Defines which events are excluded in this segment. Optional. + EventSegmentExclusion exclusion = 2; +} + +// An event matches a criteria if the event meet the conditions in the +// criteria. +message EventSegmentCriteria { + // An event matches this criteria if the event matches each of these + // `andConditionGroups`. + repeated EventSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if an event +// meets a criteria. +enum EventCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the event matches the + // criteria. + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message EventSegmentConditionGroup { + // `conditionScoping` should always be `EVENT_CRITERIA_WITHIN_SAME_EVENT`. + // + // Optional. If unspecified, a `conditionScoping` of + // `EVENT_CRITERIA_WITHIN_SAME_EVENT` is used. + EventCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which events are excluded in this segment. +message EventSegmentExclusion { + // `eventExclusionDuration` should always be `PERMANENTLY_EXCLUDE`. + // + // Optional. If unspecified, an `eventExclusionDuration` of + // `EVENT_EXCLUSION_PERMANENT` is used. + EventExclusionDuration event_exclusion_duration = 1; + + // If an event meets this condition, the event is excluded from membership + // in the segment for the `eventExclusionDuration`. + EventSegmentCriteria event_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if an event +// matches the `eventExclusionCriteria`. +enum EventExclusionDuration { + // Unspecified exclusion duration. Do not specify. + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Permanently exclude events from the segment if the event ever meets + // the `eventExclusionCriteria` condition. + EVENT_EXCLUSION_PERMANENT = 1; +} + +// A segment is a subset of your Analytics data. For example, of your entire set +// of users, one segment might be users from a particular country or city. +// Another segment might be users who purchase a particular line of products or +// who visit a specific part of your site or trigger certain events in your app. +// +// To learn more, see [Segment +// Builder](https://support.google.com/analytics/answer/9304353). +message Segment { + // The name for this segment. If unspecified, segments are named "Segment". + // This name defines string value returned by the `segment` dimension. The + // `segment` dimension prefixes segment names by the 1-based index number of + // the segment in the request (for example "1. Segment", "2. Segment", etc.). + string name = 1; + + // A segment is specified in one scope. + oneof one_segment_scope { + // User segments are subsets of users who engaged with your site or app. + UserSegment user_segment = 2; + + // Session segments are subsets of the sessions that occurred on your site + // or app. + SessionSegment session_segment = 3; + + // Event segments are subsets of events that were triggered on your site or + // app. + EventSegment event_segment = 4; + } +} + +// Expresses combinations of segment filters. +message SegmentFilterExpression { + // Specify one type of filter for `SegmentFilterExpression`. + oneof expr { + // The SegmentFilterExpression in `andGroup` have an AND relationship. + SegmentFilterExpressionList and_group = 1; + + // The SegmentFilterExpression in `orGroup` have an OR relationship. + SegmentFilterExpressionList or_group = 2; + + // The SegmentFilterExpression is NOT of `notExpression`. + SegmentFilterExpression not_expression = 3; + + // A primitive segment filter. + SegmentFilter segment_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + SegmentEventFilter segment_event_filter = 5; + } +} + +// A list of segment filter expressions. +message SegmentFilterExpressionList { + // The list of segment filter expressions + repeated SegmentFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message SegmentFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentFilterScoping filter_scoping = 8; +} + +// Scopings specify how the dimensions & metrics of multiple events +// should be considered when evaluating a segment filter. +message SegmentFilterScoping { + // If `atAnyPointInTime` is true, this filter evaluates to true for all + // events if it evaluates to true for any event in the date range of the + // request. + // + // This `atAnyPointInTime` parameter does not extend the date range of + // events in the report. If `atAnyPointInTime` is true, only events within + // the report's date range are considered when evaluating this filter. + // + // This `atAnyPointInTime` is only able to be specified if the criteria + // scoping is `ACROSS_ALL_SESSIONS` and is not able to be specified in + // sequences. + // + // If the criteria scoping is `ACROSS_ALL_SESSIONS`, `atAnyPointInTime` = + // false is used if unspecified. + optional bool at_any_point_in_time = 1; +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message SegmentEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional SegmentParameterFilterExpression + segment_parameter_filter_expression = 2; +} + +// Expresses combinations of segment filter on parameters. +message SegmentParameterFilterExpression { + // Specify one type of filter for `SegmentParameterFilterExpression`. + oneof expr { + // The SegmentParameterFilterExpression in `andGroup` have an AND + // relationship. + SegmentParameterFilterExpressionList and_group = 1; + + // The SegmentParameterFilterExpression in `orGroup` have an OR + // relationship. + SegmentParameterFilterExpressionList or_group = 2; + + // The SegmentParameterFilterExpression is NOT of `notExpression`. + SegmentParameterFilterExpression not_expression = 3; + + // A primitive segment parameter filter. + SegmentParameterFilter segment_parameter_filter = 4; + } +} + +// A list of segment parameter filter expressions. +message SegmentParameterFilterExpressionList { + // The list of segment parameter filter expressions. + repeated SegmentParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a segment. +message SegmentParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentParameterFilterScoping filter_scoping = 8; +} + +// Scopings specify how multiple events should be considered when evaluating a +// segment parameter filter. +message SegmentParameterFilterScoping { + // Accumulates the parameter over the specified period of days before + // applying the filter. Only supported if criteria scoping is + // `ACROSS_ALL_SESSIONS` or `WITHIN_SAME_SESSION`. Only supported if the + // parameter is `event_count`. + // + // For example if `inAnyNDayPeriod` is 3, the event_name is "purchase", + // the event parameter is "event_count", and the Filter's criteria is + // greater than 5, this filter will accumulate the event count of purchase + // events over every 3 consecutive day period in the report's date range; a + // user will pass this Filter's criteria to be included in this segment if + // their count of purchase events exceeds 5 in any 3 consecutive day period. + // For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to + // 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered. + // + // The date range is not extended for the purpose of having a full N day + // window near the start of the date range. For example if a report is for + // 2021-11-01 to 2021-11-10 and `inAnyNDayPeriod` = 3, the first two day + // period will be effectively shortened because no event data outside the + // report's date range will be read. For example, the first four periods + // will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, + // 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04. + // + // `inAnyNDayPeriod` is optional. If not specified, the + // `segmentParameterFilter` is applied to each event individually. + optional int64 in_any_n_day_period = 1; +} + +// Expresses combinations of funnel filters. +message FunnelFilterExpression { + // Specify one type of filter for `FunnelFilterExpression`. + oneof expr { + // The FunnelFilterExpression in `andGroup` have an AND relationship. + FunnelFilterExpressionList and_group = 1; + + // The FunnelFilterExpression in `orGroup` have an OR relationship. + FunnelFilterExpressionList or_group = 2; + + // The FunnelFilterExpression is NOT of `notExpression`. + FunnelFilterExpression not_expression = 3; + + // A funnel filter for a dimension or metric. + FunnelFieldFilter funnel_field_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + FunnelEventFilter funnel_event_filter = 5; + } +} + +// A list of funnel filter expressions. +message FunnelFilterExpressionList { + // The list of funnel filter expressions. + repeated FunnelFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message FunnelFieldFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message FunnelEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional FunnelParameterFilterExpression funnel_parameter_filter_expression = + 2; +} + +// Expresses combinations of funnel filters on parameters. +message FunnelParameterFilterExpression { + // Specify one type of filter for `FunnelParameterFilterExpression`. + oneof expr { + // The FunnelParameterFilterExpression in `andGroup` have an AND + // relationship. + FunnelParameterFilterExpressionList and_group = 1; + + // The FunnelParameterFilterExpression in `orGroup` have an OR + // relationship. + FunnelParameterFilterExpressionList or_group = 2; + + // The FunnelParameterFilterExpression is NOT of `notExpression`. + FunnelParameterFilterExpression not_expression = 3; + + // A primitive funnel parameter filter. + FunnelParameterFilter funnel_parameter_filter = 4; + } +} + +// A list of funnel parameter filter expressions. +message FunnelParameterFilterExpressionList { + // The list of funnel parameter filter expressions. + repeated FunnelParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a funnel. +message FunnelParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// The funnel report's response metadata carries additional information about +// the funnel report. +message FunnelResponseMetadata { + // If funnel report results are + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes what percentage of events were used in this funnel report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in the order that date + // ranges were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 1; +} + +// If funnel report results are +// [sampled](https://support.google.com/analytics/answer/13331292), this +// metadata describes what percentage of events were used in this funnel +// report for a date range. Sampling is the practice of analyzing a subset of +// all data in order to uncover the meaningful information in the larger data +// set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this funnel report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this funnel report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // funnel report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// Categories of sampling levels for the requests. +enum SamplingLevel { + // Unspecified type. + SAMPLING_LEVEL_UNSPECIFIED = 0; + + // Applies a sampling level of 10 million to standard properties and + // 100 million to Google Analytics 360 properties. + LOW = 1; + + // Exclusive to Google Analytics 360 properties with a sampling level of 1 + // billion. + MEDIUM = 2; + + // Exclusive to Google Analytics 360 properties. Unsampled explorations are + // more accurate and can reveal insights that aren't visible in standard + // explorations. To learn more, see + // https://support.google.com/analytics/answer/10896953. + UNSAMPLED = 3; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.d.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.d.ts new file mode 100644 index 000000000000..3834f3310998 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.d.ts @@ -0,0 +1,19422 @@ +// Copyright 2025 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * 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.IDuration, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Duration; + + /** + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** 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?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * 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); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * 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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.ExtensionRangeOptions; + + /** + * 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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * 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.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** 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); + + /** 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 FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: 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 FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.IFieldDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.FieldDescriptorProto; + + /** + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.IOneofDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.OneofDescriptorProto; + + /** + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.IEnumDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.EnumDescriptorProto; + + /** + * 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.IEnumValueDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueDescriptorProto; + + /** + * 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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * 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.IServiceDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceDescriptorProto; + + /** + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @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; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * 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.IMethodDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.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 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 features */ + features?: (google.protobuf.IFeatureSet|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; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * 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 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [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; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * 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.IMessageOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MessageOptions; + + /** + * 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 a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * 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.IFieldOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.FieldOptions; + + /** + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * 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.IOneofOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.OneofOptions; + + /** + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * 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.IEnumOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumOptions; + + /** + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * 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.IEnumValueOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueOptions; + + /** + * 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * 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.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * 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.IServiceOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceOptions; + + /** + * 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * 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.IMethodOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MethodOptions; + + /** + * 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * 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.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @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|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * 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.IUninterpretedOption, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.UninterpretedOption; + + /** + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 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; + + /** + * 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); + + /** + * 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 FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @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); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * 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.ISourceCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SourceCodeInfo; + + /** + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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 { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * 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.IGeneratedCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.GeneratedCodeInfo; + + /** + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Any; + + /** + * 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 an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * 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.IEmpty, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Empty; + + /** + * 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Timestamp; + + /** + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 analytics. */ + namespace analytics { + + /** Namespace data. */ + namespace data { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Represents an AlphaAnalyticsData */ + class AlphaAnalyticsData extends $protobuf.rpc.Service { + + /** + * Constructs a new AlphaAnalyticsData service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AlphaAnalyticsData 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): AlphaAnalyticsData; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunFunnelReportResponse + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback): void; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @returns Promise + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest): Promise; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback): void; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @returns Promise + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest): Promise; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAudienceListResponse + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback): void; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @returns Promise + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest): Promise; + + /** + * Calls SheetExportAudienceList. + * @param request SheetExportAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse + */ + public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback): void; + + /** + * Calls SheetExportAudienceList. + * @param request SheetExportAudienceListRequest message or plain object + * @returns Promise + */ + public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): Promise; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceList + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback): void; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @returns Promise + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest): Promise; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceListsResponse + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback): void; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @returns Promise + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest): Promise; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback): void; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): Promise; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback): void; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): Promise; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback): void; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @returns Promise + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): Promise; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback): void; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @returns Promise + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): Promise; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback): void; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @returns Promise + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest): Promise; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryReportTaskResponse + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback): void; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @returns Promise + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest): Promise; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportTask + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback): void; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @returns Promise + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest): Promise; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportTasksResponse + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback): void; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @returns Promise + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest): Promise; + } + + namespace AlphaAnalyticsData { + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @param error Error, if any + * @param [response] RunFunnelReportResponse + */ + type RunFunnelReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunFunnelReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAudienceListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @param error Error, if any + * @param [response] QueryAudienceListResponse + */ + type QueryAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryAudienceListResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. + * @param error Error, if any + * @param [response] SheetExportAudienceListResponse + */ + type SheetExportAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.SheetExportAudienceListResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @param error Error, if any + * @param [response] AudienceList + */ + type GetAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.AudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @param error Error, if any + * @param [response] ListAudienceListsResponse + */ + type ListAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type CreateRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type GetRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @param error Error, if any + * @param [response] ListRecurringAudienceListsResponse + */ + type ListRecurringAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @param error Error, if any + * @param [response] PropertyQuotasSnapshot + */ + type GetPropertyQuotasSnapshotCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.PropertyQuotasSnapshot) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReportTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @param error Error, if any + * @param [response] QueryReportTaskResponse + */ + type QueryReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryReportTaskResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @param error Error, if any + * @param [response] ReportTask + */ + type GetReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ReportTask) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @param error Error, if any + * @param [response] ListReportTasksResponse + */ + type ListReportTasksCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListReportTasksResponse) => void; + } + + /** Properties of a CreateRecurringAudienceListRequest. */ + interface ICreateRecurringAudienceListRequest { + + /** CreateRecurringAudienceListRequest parent */ + parent?: (string|null); + + /** CreateRecurringAudienceListRequest recurringAudienceList */ + recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + } + + /** Represents a CreateRecurringAudienceListRequest. */ + class CreateRecurringAudienceListRequest implements ICreateRecurringAudienceListRequest { + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest); + + /** CreateRecurringAudienceListRequest parent. */ + public parent: string; + + /** CreateRecurringAudienceListRequest recurringAudienceList. */ + public recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRecurringAudienceListRequest + * @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.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRecurringAudienceListRequest + * @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.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Verifies a CreateRecurringAudienceListRequest 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 CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecurringAudienceList. */ + interface IRecurringAudienceList { + + /** RecurringAudienceList name */ + name?: (string|null); + + /** RecurringAudienceList audience */ + audience?: (string|null); + + /** RecurringAudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** RecurringAudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** RecurringAudienceList activeDaysRemaining */ + activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists */ + audienceLists?: (string[]|null); + + /** RecurringAudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents a RecurringAudienceList. */ + class RecurringAudienceList implements IRecurringAudienceList { + + /** + * Constructs a new RecurringAudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRecurringAudienceList); + + /** RecurringAudienceList name. */ + public name: string; + + /** RecurringAudienceList audience. */ + public audience: string; + + /** RecurringAudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** RecurringAudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** RecurringAudienceList activeDaysRemaining. */ + public activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists. */ + public audienceLists: string[]; + + /** RecurringAudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringAudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRecurringAudienceList): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringAudienceList + * @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.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringAudienceList + * @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.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Verifies a RecurringAudienceList 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 RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringAudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @param message RecurringAudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RecurringAudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringAudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringAudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebhookNotification. */ + interface IWebhookNotification { + + /** WebhookNotification uri */ + uri?: (string|null); + + /** WebhookNotification channelToken */ + channelToken?: (string|null); + } + + /** Represents a WebhookNotification. */ + class WebhookNotification implements IWebhookNotification { + + /** + * Constructs a new WebhookNotification. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IWebhookNotification); + + /** WebhookNotification uri. */ + public uri?: (string|null); + + /** WebhookNotification channelToken. */ + public channelToken?: (string|null); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookNotification instance + */ + public static create(properties?: google.analytics.data.v1alpha.IWebhookNotification): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookNotification + * @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.analytics.data.v1alpha.WebhookNotification; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebhookNotification + * @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.analytics.data.v1alpha.WebhookNotification; + + /** + * Verifies a WebhookNotification 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 WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebhookNotification + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @param message WebhookNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.WebhookNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebhookNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebhookNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRecurringAudienceListRequest. */ + interface IGetRecurringAudienceListRequest { + + /** GetRecurringAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetRecurringAudienceListRequest. */ + class GetRecurringAudienceListRequest implements IGetRecurringAudienceListRequest { + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest); + + /** GetRecurringAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRecurringAudienceListRequest + * @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.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRecurringAudienceListRequest + * @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.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Verifies a GetRecurringAudienceListRequest 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 GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message GetRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsRequest. */ + interface IListRecurringAudienceListsRequest { + + /** ListRecurringAudienceListsRequest parent */ + parent?: (string|null); + + /** ListRecurringAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListRecurringAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsRequest. */ + class ListRecurringAudienceListsRequest implements IListRecurringAudienceListsRequest { + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest); + + /** ListRecurringAudienceListsRequest parent. */ + public parent: string; + + /** ListRecurringAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListRecurringAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsRequest + * @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.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsRequest + * @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.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Verifies a ListRecurringAudienceListsRequest 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 ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsResponse. */ + interface IListRecurringAudienceListsResponse { + + /** ListRecurringAudienceListsResponse recurringAudienceLists */ + recurringAudienceLists?: (google.analytics.data.v1alpha.IRecurringAudienceList[]|null); + + /** ListRecurringAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsResponse. */ + class ListRecurringAudienceListsResponse implements IListRecurringAudienceListsResponse { + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse); + + /** ListRecurringAudienceListsResponse recurringAudienceLists. */ + public recurringAudienceLists: google.analytics.data.v1alpha.IRecurringAudienceList[]; + + /** ListRecurringAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsResponse + * @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.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsResponse + * @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.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Verifies a ListRecurringAudienceListsResponse 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 ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPropertyQuotasSnapshotRequest. */ + interface IGetPropertyQuotasSnapshotRequest { + + /** GetPropertyQuotasSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetPropertyQuotasSnapshotRequest. */ + class GetPropertyQuotasSnapshotRequest implements IGetPropertyQuotasSnapshotRequest { + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest); + + /** GetPropertyQuotasSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPropertyQuotasSnapshotRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPropertyQuotasSnapshotRequest + * @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.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPropertyQuotasSnapshotRequest + * @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.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest 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 GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPropertyQuotasSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @param message GetPropertyQuotasSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPropertyQuotasSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuotasSnapshot. */ + interface IPropertyQuotasSnapshot { + + /** PropertyQuotasSnapshot name */ + name?: (string|null); + + /** PropertyQuotasSnapshot corePropertyQuota */ + corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota */ + realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota */ + funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + } + + /** Represents a PropertyQuotasSnapshot. */ + class PropertyQuotasSnapshot implements IPropertyQuotasSnapshot { + + /** + * Constructs a new PropertyQuotasSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot); + + /** PropertyQuotasSnapshot name. */ + public name: string; + + /** PropertyQuotasSnapshot corePropertyQuota. */ + public corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota. */ + public realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota. */ + public funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuotasSnapshot instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuotasSnapshot + * @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.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuotasSnapshot + * @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.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Verifies a PropertyQuotasSnapshot 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 PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuotasSnapshot + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @param message PropertyQuotasSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuotasSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceListRequest. */ + interface IGetAudienceListRequest { + + /** GetAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceListRequest. */ + class GetAudienceListRequest implements IGetAudienceListRequest { + + /** + * Constructs a new GetAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest); + + /** GetAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceListRequest + * @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.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceListRequest + * @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.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Verifies a GetAudienceListRequest 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 GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @param message GetAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsRequest. */ + interface IListAudienceListsRequest { + + /** ListAudienceListsRequest parent */ + parent?: (string|null); + + /** ListAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudienceListsRequest. */ + class ListAudienceListsRequest implements IListAudienceListsRequest { + + /** + * Constructs a new ListAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest); + + /** ListAudienceListsRequest parent. */ + public parent: string; + + /** ListAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsRequest + * @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.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsRequest + * @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.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Verifies a ListAudienceListsRequest 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 ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsResponse. */ + interface IListAudienceListsResponse { + + /** ListAudienceListsResponse audienceLists */ + audienceLists?: (google.analytics.data.v1alpha.IAudienceList[]|null); + + /** ListAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudienceListsResponse. */ + class ListAudienceListsResponse implements IListAudienceListsResponse { + + /** + * Constructs a new ListAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse); + + /** ListAudienceListsResponse audienceLists. */ + public audienceLists: google.analytics.data.v1alpha.IAudienceList[]; + + /** ListAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsResponse + * @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.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsResponse + * @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.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Verifies a ListAudienceListsResponse 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 ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceListRequest. */ + interface ICreateAudienceListRequest { + + /** CreateAudienceListRequest parent */ + parent?: (string|null); + + /** CreateAudienceListRequest audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + } + + /** Represents a CreateAudienceListRequest. */ + class CreateAudienceListRequest implements ICreateAudienceListRequest { + + /** + * Constructs a new CreateAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest); + + /** CreateAudienceListRequest parent. */ + public parent: string; + + /** CreateAudienceListRequest audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceListRequest + * @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.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceListRequest + * @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.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Verifies a CreateAudienceListRequest 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 CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceList. */ + interface IAudienceList { + + /** AudienceList name */ + name?: (string|null); + + /** AudienceList audience */ + audience?: (string|null); + + /** AudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** AudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** AudienceList state */ + state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** AudienceList rowCount */ + rowCount?: (number|null); + + /** AudienceList errorMessage */ + errorMessage?: (string|null); + + /** AudienceList percentageCompleted */ + percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList */ + recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents an AudienceList. */ + class AudienceList implements IAudienceList { + + /** + * Constructs a new AudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceList); + + /** AudienceList name. */ + public name: string; + + /** AudienceList audience. */ + public audience: string; + + /** AudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** AudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** AudienceList state. */ + public state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** AudienceList rowCount. */ + public rowCount?: (number|null); + + /** AudienceList errorMessage. */ + public errorMessage?: (string|null); + + /** AudienceList percentageCompleted. */ + public percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList. */ + public recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new AudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceList): google.analytics.data.v1alpha.AudienceList; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceList + * @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.analytics.data.v1alpha.AudienceList; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceList + * @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.analytics.data.v1alpha.AudienceList; + + /** + * Verifies an AudienceList 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 AudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceList; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @param message AudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceList { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + + /** Properties of an AudienceListMetadata. */ + interface IAudienceListMetadata { + } + + /** Represents an AudienceListMetadata. */ + class AudienceListMetadata implements IAudienceListMetadata { + + /** + * Constructs a new AudienceListMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceListMetadata); + + /** + * Creates a new AudienceListMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceListMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceListMetadata): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceListMetadata + * @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.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceListMetadata + * @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.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Verifies an AudienceListMetadata 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 AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceListMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @param message AudienceListMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceListMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceListMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceListMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListRequest. */ + interface IQueryAudienceListRequest { + + /** QueryAudienceListRequest name */ + name?: (string|null); + + /** QueryAudienceListRequest offset */ + offset?: (number|Long|string|null); + + /** QueryAudienceListRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryAudienceListRequest. */ + class QueryAudienceListRequest implements IQueryAudienceListRequest { + + /** + * Constructs a new QueryAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest); + + /** QueryAudienceListRequest name. */ + public name: string; + + /** QueryAudienceListRequest offset. */ + public offset: (number|Long|string); + + /** QueryAudienceListRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListRequest + * @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.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListRequest + * @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.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Verifies a QueryAudienceListRequest 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 QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @param message QueryAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListResponse. */ + interface IQueryAudienceListResponse { + + /** QueryAudienceListResponse audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows */ + audienceRows?: (google.analytics.data.v1alpha.IAudienceRow[]|null); + + /** QueryAudienceListResponse rowCount */ + rowCount?: (number|null); + } + + /** Represents a QueryAudienceListResponse. */ + class QueryAudienceListResponse implements IQueryAudienceListResponse { + + /** + * Constructs a new QueryAudienceListResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse); + + /** QueryAudienceListResponse audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows. */ + public audienceRows: google.analytics.data.v1alpha.IAudienceRow[]; + + /** QueryAudienceListResponse rowCount. */ + public rowCount?: (number|null); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListResponse + * @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.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListResponse + * @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.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Verifies a QueryAudienceListResponse 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 QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @param message QueryAudienceListResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SheetExportAudienceListRequest. */ + interface ISheetExportAudienceListRequest { + + /** SheetExportAudienceListRequest name */ + name?: (string|null); + + /** SheetExportAudienceListRequest offset */ + offset?: (number|Long|string|null); + + /** SheetExportAudienceListRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a SheetExportAudienceListRequest. */ + class SheetExportAudienceListRequest implements ISheetExportAudienceListRequest { + + /** + * Constructs a new SheetExportAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest); + + /** SheetExportAudienceListRequest name. */ + public name: string; + + /** SheetExportAudienceListRequest offset. */ + public offset: (number|Long|string); + + /** SheetExportAudienceListRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new SheetExportAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SheetExportAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): google.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @param message SheetExportAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @param message SheetExportAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SheetExportAudienceListRequest + * @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.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SheetExportAudienceListRequest + * @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.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Verifies a SheetExportAudienceListRequest 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 SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SheetExportAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. + * @param message SheetExportAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SheetExportAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SheetExportAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SheetExportAudienceListResponse. */ + interface ISheetExportAudienceListResponse { + + /** SheetExportAudienceListResponse spreadsheetUri */ + spreadsheetUri?: (string|null); + + /** SheetExportAudienceListResponse spreadsheetId */ + spreadsheetId?: (string|null); + + /** SheetExportAudienceListResponse rowCount */ + rowCount?: (number|null); + + /** SheetExportAudienceListResponse audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + } + + /** Represents a SheetExportAudienceListResponse. */ + class SheetExportAudienceListResponse implements ISheetExportAudienceListResponse { + + /** + * Constructs a new SheetExportAudienceListResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse); + + /** SheetExportAudienceListResponse spreadsheetUri. */ + public spreadsheetUri?: (string|null); + + /** SheetExportAudienceListResponse spreadsheetId. */ + public spreadsheetId?: (string|null); + + /** SheetExportAudienceListResponse rowCount. */ + public rowCount?: (number|null); + + /** SheetExportAudienceListResponse audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** + * Creates a new SheetExportAudienceListResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SheetExportAudienceListResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse): google.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @param message SheetExportAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @param message SheetExportAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SheetExportAudienceListResponse + * @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.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SheetExportAudienceListResponse + * @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.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Verifies a SheetExportAudienceListResponse 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 SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SheetExportAudienceListResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. + * @param message SheetExportAudienceListResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SheetExportAudienceListResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SheetExportAudienceListResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceRow. */ + interface IAudienceRow { + + /** AudienceRow dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IAudienceDimensionValue[]|null); + } + + /** Represents an AudienceRow. */ + class AudienceRow implements IAudienceRow { + + /** + * Constructs a new AudienceRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceRow); + + /** AudienceRow dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IAudienceDimensionValue[]; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceRow instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceRow): google.analytics.data.v1alpha.AudienceRow; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceRow + * @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.analytics.data.v1alpha.AudienceRow; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceRow + * @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.analytics.data.v1alpha.AudienceRow; + + /** + * Verifies an AudienceRow 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 AudienceRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceRow; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @param message AudienceRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimension. */ + interface IAudienceDimension { + + /** AudienceDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AudienceDimension. */ + class AudienceDimension implements IAudienceDimension { + + /** + * Constructs a new AudienceDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimension); + + /** AudienceDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimension): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimension + * @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.analytics.data.v1alpha.AudienceDimension; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimension + * @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.analytics.data.v1alpha.AudienceDimension; + + /** + * Verifies an AudienceDimension 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 AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @param message AudienceDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimensionValue. */ + interface IAudienceDimensionValue { + + /** AudienceDimensionValue value */ + value?: (string|null); + } + + /** Represents an AudienceDimensionValue. */ + class AudienceDimensionValue implements IAudienceDimensionValue { + + /** + * Constructs a new AudienceDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue); + + /** AudienceDimensionValue value. */ + public value?: (string|null); + + /** AudienceDimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionValue + * @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.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionValue + * @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.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Verifies an AudienceDimensionValue 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 AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @param message AudienceDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunFunnelReportRequest. */ + interface IRunFunnelReportRequest { + + /** RunFunnelReportRequest property */ + property?: (string|null); + + /** RunFunnelReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** RunFunnelReportRequest funnel */ + funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown */ + funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction */ + funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType */ + funnelVisualizationType?: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null); + + /** RunFunnelReportRequest segments */ + segments?: (google.analytics.data.v1alpha.ISegment[]|null); + + /** RunFunnelReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunFunnelReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + } + + /** Represents a RunFunnelReportRequest. */ + class RunFunnelReportRequest implements IRunFunnelReportRequest { + + /** + * Constructs a new RunFunnelReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest); + + /** RunFunnelReportRequest property. */ + public property: string; + + /** RunFunnelReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** RunFunnelReportRequest funnel. */ + public funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown. */ + public funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction. */ + public funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType. */ + public funnelVisualizationType: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType); + + /** RunFunnelReportRequest segments. */ + public segments: google.analytics.data.v1alpha.ISegment[]; + + /** RunFunnelReportRequest limit. */ + public limit: (number|Long|string); + + /** RunFunnelReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportRequest + * @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.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportRequest + * @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.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Verifies a RunFunnelReportRequest 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 RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @param message RunFunnelReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RunFunnelReportRequest { + + /** FunnelVisualizationType enum. */ + enum FunnelVisualizationType { + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0, + STANDARD_FUNNEL = 1, + TRENDED_FUNNEL = 2 + } + } + + /** Properties of a RunFunnelReportResponse. */ + interface IRunFunnelReportResponse { + + /** RunFunnelReportResponse funnelTable */ + funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization */ + funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunFunnelReportResponse. */ + class RunFunnelReportResponse implements IRunFunnelReportResponse { + + /** + * Constructs a new RunFunnelReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse); + + /** RunFunnelReportResponse funnelTable. */ + public funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization. */ + public funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportResponse + * @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.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportResponse + * @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.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Verifies a RunFunnelReportResponse 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 RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @param message RunFunnelReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTask. */ + interface IReportTask { + + /** ReportTask name */ + name?: (string|null); + + /** ReportTask reportDefinition */ + reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata */ + reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + } + + /** Represents a ReportTask. */ + class ReportTask implements IReportTask { + + /** + * Constructs a new ReportTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTask); + + /** ReportTask name. */ + public name: string; + + /** ReportTask reportDefinition. */ + public reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata. */ + public reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + + /** + * Creates a new ReportTask instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTask instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTask): google.analytics.data.v1alpha.ReportTask; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTask + * @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.analytics.data.v1alpha.ReportTask; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTask + * @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.analytics.data.v1alpha.ReportTask; + + /** + * Verifies a ReportTask 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 ReportTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTask + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @param message ReportTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportTask { + + /** Properties of a ReportDefinition. */ + interface IReportDefinition { + + /** ReportDefinition dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); + + /** ReportDefinition metrics */ + metrics?: (google.analytics.data.v1alpha.IMetric[]|null); + + /** ReportDefinition dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** ReportDefinition dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter */ + metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset */ + offset?: (number|Long|string|null); + + /** ReportDefinition limit */ + limit?: (number|Long|string|null); + + /** ReportDefinition metricAggregations */ + metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); + + /** ReportDefinition orderBys */ + orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); + + /** ReportDefinition currencyCode */ + currencyCode?: (string|null); + + /** ReportDefinition cohortSpec */ + cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** ReportDefinition samplingLevel */ + samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + } + + /** Represents a ReportDefinition. */ + class ReportDefinition implements IReportDefinition { + + /** + * Constructs a new ReportDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition); + + /** ReportDefinition dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimension[]; + + /** ReportDefinition metrics. */ + public metrics: google.analytics.data.v1alpha.IMetric[]; + + /** ReportDefinition dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** ReportDefinition dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter. */ + public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset. */ + public offset: (number|Long|string); + + /** ReportDefinition limit. */ + public limit: (number|Long|string); + + /** ReportDefinition metricAggregations. */ + public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; + + /** ReportDefinition orderBys. */ + public orderBys: google.analytics.data.v1alpha.IOrderBy[]; + + /** ReportDefinition currencyCode. */ + public currencyCode: string; + + /** ReportDefinition cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** ReportDefinition samplingLevel. */ + public samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDefinition instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDefinition + * @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.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDefinition + * @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.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Verifies a ReportDefinition 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 ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDefinition + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @param message ReportDefinition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDefinition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDefinition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportMetadata. */ + interface IReportMetadata { + + /** ReportMetadata state */ + state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** ReportMetadata taskRowCount */ + taskRowCount?: (number|null); + + /** ReportMetadata errorMessage */ + errorMessage?: (string|null); + + /** ReportMetadata totalRowCount */ + totalRowCount?: (number|null); + } + + /** Represents a ReportMetadata. */ + class ReportMetadata implements IReportMetadata { + + /** + * Constructs a new ReportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata); + + /** ReportMetadata state. */ + public state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** ReportMetadata taskRowCount. */ + public taskRowCount?: (number|null); + + /** ReportMetadata errorMessage. */ + public errorMessage?: (string|null); + + /** ReportMetadata totalRowCount. */ + public totalRowCount?: (number|null); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportMetadata + * @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.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportMetadata + * @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.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Verifies a ReportMetadata 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 ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @param message ReportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + } + + /** Properties of a CreateReportTaskRequest. */ + interface ICreateReportTaskRequest { + + /** CreateReportTaskRequest parent */ + parent?: (string|null); + + /** CreateReportTaskRequest reportTask */ + reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + } + + /** Represents a CreateReportTaskRequest. */ + class CreateReportTaskRequest implements ICreateReportTaskRequest { + + /** + * Constructs a new CreateReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest); + + /** CreateReportTaskRequest parent. */ + public parent: string; + + /** CreateReportTaskRequest reportTask. */ + public reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReportTaskRequest + * @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.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReportTaskRequest + * @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.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Verifies a CreateReportTaskRequest 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 CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @param message CreateReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTaskMetadata. */ + interface IReportTaskMetadata { + } + + /** Represents a ReportTaskMetadata. */ + class ReportTaskMetadata implements IReportTaskMetadata { + + /** + * Constructs a new ReportTaskMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTaskMetadata); + + /** + * Creates a new ReportTaskMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTaskMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTaskMetadata): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTaskMetadata + * @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.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTaskMetadata + * @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.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Verifies a ReportTaskMetadata 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 ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTaskMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @param message ReportTaskMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTaskMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTaskMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskRequest. */ + interface IQueryReportTaskRequest { + + /** QueryReportTaskRequest name */ + name?: (string|null); + + /** QueryReportTaskRequest offset */ + offset?: (number|Long|string|null); + + /** QueryReportTaskRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryReportTaskRequest. */ + class QueryReportTaskRequest implements IQueryReportTaskRequest { + + /** + * Constructs a new QueryReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest); + + /** QueryReportTaskRequest name. */ + public name: string; + + /** QueryReportTaskRequest offset. */ + public offset: (number|Long|string); + + /** QueryReportTaskRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskRequest + * @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.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskRequest + * @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.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Verifies a QueryReportTaskRequest 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 QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @param message QueryReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskResponse. */ + interface IQueryReportTaskResponse { + + /** QueryReportTaskResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** QueryReportTaskResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** QueryReportTaskResponse rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse totals */ + totals?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse maximums */ + maximums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse minimums */ + minimums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse rowCount */ + rowCount?: (number|null); + + /** QueryReportTaskResponse metadata */ + metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + } + + /** Represents a QueryReportTaskResponse. */ + class QueryReportTaskResponse implements IQueryReportTaskResponse { + + /** + * Constructs a new QueryReportTaskResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse); + + /** QueryReportTaskResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** QueryReportTaskResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** QueryReportTaskResponse rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse totals. */ + public totals: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse maximums. */ + public maximums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse minimums. */ + public minimums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse rowCount. */ + public rowCount: number; + + /** QueryReportTaskResponse metadata. */ + public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskResponse + * @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.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskResponse + * @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.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Verifies a QueryReportTaskResponse 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 QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @param message QueryReportTaskResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportTaskRequest. */ + interface IGetReportTaskRequest { + + /** GetReportTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetReportTaskRequest. */ + class GetReportTaskRequest implements IGetReportTaskRequest { + + /** + * Constructs a new GetReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest); + + /** GetReportTaskRequest name. */ + public name: string; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportTaskRequest + * @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.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportTaskRequest + * @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.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Verifies a GetReportTaskRequest 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 GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @param message GetReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksRequest. */ + interface IListReportTasksRequest { + + /** ListReportTasksRequest parent */ + parent?: (string|null); + + /** ListReportTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListReportTasksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListReportTasksRequest. */ + class ListReportTasksRequest implements IListReportTasksRequest { + + /** + * Constructs a new ListReportTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksRequest); + + /** ListReportTasksRequest parent. */ + public parent: string; + + /** ListReportTasksRequest pageSize. */ + public pageSize: number; + + /** ListReportTasksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksRequest): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksRequest + * @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.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksRequest + * @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.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Verifies a ListReportTasksRequest 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 ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. + * @param message ListReportTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksResponse. */ + interface IListReportTasksResponse { + + /** ListReportTasksResponse reportTasks */ + reportTasks?: (google.analytics.data.v1alpha.IReportTask[]|null); + + /** ListReportTasksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListReportTasksResponse. */ + class ListReportTasksResponse implements IListReportTasksResponse { + + /** + * Constructs a new ListReportTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksResponse); + + /** ListReportTasksResponse reportTasks. */ + public reportTasks: google.analytics.data.v1alpha.IReportTask[]; + + /** ListReportTasksResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksResponse): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksResponse + * @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.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksResponse + * @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.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Verifies a ListReportTasksResponse 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 ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @param message ListReportTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange startDate */ + startDate?: (string|null); + + /** DateRange endDate */ + endDate?: (string|null); + + /** DateRange name */ + name?: (string|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDateRange); + + /** DateRange startDate. */ + public startDate: string; + + /** DateRange endDate. */ + public endDate: string; + + /** DateRange name. */ + public name: string; + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @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.analytics.data.v1alpha.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @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.analytics.data.v1alpha.DateRange; + + /** + * Verifies a DateRange 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 DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension name */ + name?: (string|null); + + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimension); + + /** Dimension name. */ + public name: string; + + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @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.analytics.data.v1alpha.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @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.analytics.data.v1alpha.Dimension; + + /** + * Verifies a Dimension 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 Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { + + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + } + + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { + + /** + * Constructs a new DimensionExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); + + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionExpression + * @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.analytics.data.v1alpha.DimensionExpression; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionExpression + * @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.analytics.data.v1alpha.DimensionExpression; + + /** + * Verifies a DimensionExpression 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 DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionExpression { + + /** Properties of a CaseExpression. */ + interface ICaseExpression { + + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } + + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { + + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); + + /** CaseExpression dimensionName. */ + public dimensionName: string; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @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.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @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.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Verifies a CaseExpression 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 CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { + + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); + + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } + + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { + + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); + + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; + + /** ConcatenateExpression delimiter. */ + public delimiter: string; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @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.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @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.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression 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 ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric expression. */ + public expression: string; + + /** Metric invisible. */ + public invisible: boolean; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @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.analytics.data.v1alpha.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @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.analytics.data.v1alpha.Metric; + + /** + * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpression. */ + interface IFilterExpression { + + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1alpha.IFilter|null); + } + + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { + + /** + * Constructs a new FilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); + + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1alpha.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpression + * @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.analytics.data.v1alpha.FilterExpression; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpression + * @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.analytics.data.v1alpha.FilterExpression; + + /** + * Verifies a FilterExpression 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 FilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { + + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); + } + + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { + + /** + * Constructs a new FilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); + + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFilterExpression[]; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpressionList + * @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.analytics.data.v1alpha.FilterExpressionList; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpressionList + * @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.analytics.data.v1alpha.FilterExpressionList; + + /** + * Verifies a FilterExpressionList 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 FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldName */ + fieldName?: (string|null); + + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilter); + + /** Filter fieldName. */ + public fieldName: string; + + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @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.analytics.data.v1alpha.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @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.analytics.data.v1alpha.Filter; + + /** + * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @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.analytics.data.v1alpha.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @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.analytics.data.v1alpha.StringFilter; + + /** + * Verifies a StringFilter 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 StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @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.analytics.data.v1alpha.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @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.analytics.data.v1alpha.InListFilter; + + /** + * Verifies an InListFilter 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 InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @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.analytics.data.v1alpha.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @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.analytics.data.v1alpha.NumericFilter; + + /** + * Verifies a NumericFilter 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 NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @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.analytics.data.v1alpha.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @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.analytics.data.v1alpha.OrderBy; + + /** + * Verifies an OrderBy 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 OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @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.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @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.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy 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 MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @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.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @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.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy 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 DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @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.analytics.data.v1alpha.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @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.analytics.data.v1alpha.BetweenFilter; + + /** + * Verifies a BetweenFilter 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 BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @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.analytics.data.v1alpha.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @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.analytics.data.v1alpha.EmptyFilter; + + /** + * Verifies an EmptyFilter 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 EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @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.analytics.data.v1alpha.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @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.analytics.data.v1alpha.NumericValue; + + /** + * Verifies a NumericValue 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 NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortSpec. */ + interface ICohortSpec { + + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); + + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + } + + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { + + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); + + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1alpha.ICohort[]; + + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @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.analytics.data.v1alpha.CohortSpec; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @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.analytics.data.v1alpha.CohortSpec; + + /** + * Verifies a CohortSpec 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 CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cohort. */ + interface ICohort { + + /** Cohort name */ + name?: (string|null); + + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + } + + /** Represents a Cohort. */ + class Cohort implements ICohort { + + /** + * Constructs a new Cohort. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohort); + + /** Cohort name. */ + public name: string; + + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + + /** + * Creates a new Cohort instance using the specified properties. + * @param [properties] Properties to set + * @returns Cohort instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cohort + * @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.analytics.data.v1alpha.Cohort; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cohort + * @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.analytics.data.v1alpha.Cohort; + + /** + * Verifies a Cohort 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 Cohort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cohort + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cohort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cohort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { + + /** + * Constructs a new CohortsRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortsRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortsRange + * @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.analytics.data.v1alpha.CohortsRange; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortsRange + * @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.analytics.data.v1alpha.CohortsRange; + + /** + * Verifies a CohortsRange 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 CohortsRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortsRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortsRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortsRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CohortsRange { + + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } + + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); + } + + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { + + /** + * Constructs a new CohortReportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); + + /** CohortReportSettings accumulate. */ + public accumulate: boolean; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortReportSettings instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortReportSettings + * @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.analytics.data.v1alpha.CohortReportSettings; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortReportSettings + * @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.analytics.data.v1alpha.CohortReportSettings; + + /** + * Verifies a CohortReportSettings 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 CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortReportSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortReportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortReportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { + + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); + + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + } + + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { + + /** + * Constructs a new ResponseMetaData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); + + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetaData instance + */ + public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetaData + * @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.analytics.data.v1alpha.ResponseMetaData; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetaData + * @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.analytics.data.v1alpha.ResponseMetaData; + + /** + * Verifies a ResponseMetaData 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 ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetaData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse 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 SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction 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 ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { + + /** DimensionHeader name */ + name?: (string|null); + } + + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { + + /** + * Constructs a new DimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); + + /** DimensionHeader name. */ + public name: string; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionHeader + * @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.analytics.data.v1alpha.DimensionHeader; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionHeader + * @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.analytics.data.v1alpha.DimensionHeader; + + /** + * Verifies a DimensionHeader 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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricHeader. */ + interface IMetricHeader { + + /** MetricHeader name */ + name?: (string|null); + + /** MetricHeader type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); + } + + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { + + /** + * Constructs a new MetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); + + /** MetricHeader name. */ + public name: string; + + /** MetricHeader type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); + + /** + * Creates a new MetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricHeader + * @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.analytics.data.v1alpha.MetricHeader; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricHeader + * @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.analytics.data.v1alpha.MetricHeader; + + /** + * Verifies a MetricHeader 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 MetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); + + /** Row metricValues */ + metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1alpha.IMetricValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.analytics.data.v1alpha.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.analytics.data.v1alpha.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionValue. */ + interface IDimensionValue { + + /** DimensionValue value */ + value?: (string|null); + } + + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { + + /** + * Constructs a new DimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); + + /** DimensionValue value. */ + public value?: (string|null); + + /** DimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new DimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionValue + * @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.analytics.data.v1alpha.DimensionValue; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionValue + * @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.analytics.data.v1alpha.DimensionValue; + + /** + * Verifies a DimensionValue 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 DimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValue. */ + interface IMetricValue { + + /** MetricValue value */ + value?: (string|null); + } + + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { + + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricValue); + + /** MetricValue value. */ + public value?: (string|null); + + /** MetricValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @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.analytics.data.v1alpha.MetricValue; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @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.analytics.data.v1alpha.MetricValue; + + /** + * Verifies a MetricValue 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 MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { + + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + } + + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { + + /** + * Constructs a new PropertyQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); + + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuota instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuota + * @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.analytics.data.v1alpha.PropertyQuota; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuota + * @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.analytics.data.v1alpha.PropertyQuota; + + /** + * Verifies a PropertyQuota 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 PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { + + /** QuotaStatus consumed */ + consumed?: (number|null); + + /** QuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { + + /** + * Constructs a new QuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); + + /** QuotaStatus consumed. */ + public consumed: number; + + /** QuotaStatus remaining. */ + public remaining: number; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaStatus instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaStatus + * @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.analytics.data.v1alpha.QuotaStatus; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaStatus + * @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.analytics.data.v1alpha.QuotaStatus; + + /** + * Verifies a QuotaStatus 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 QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelBreakdown. */ + interface IFunnelBreakdown { + + /** FunnelBreakdown breakdownDimension */ + breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelBreakdown. */ + class FunnelBreakdown implements IFunnelBreakdown { + + /** + * Constructs a new FunnelBreakdown. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); + + /** FunnelBreakdown breakdownDimension. */ + public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelBreakdown instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelBreakdown + * @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.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelBreakdown + * @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.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Verifies a FunnelBreakdown 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 FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelBreakdown + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @param message FunnelBreakdown + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelBreakdown to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelBreakdown + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelNextAction. */ + interface IFunnelNextAction { + + /** FunnelNextAction nextActionDimension */ + nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelNextAction. */ + class FunnelNextAction implements IFunnelNextAction { + + /** + * Constructs a new FunnelNextAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); + + /** FunnelNextAction nextActionDimension. */ + public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelNextAction instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelNextAction + * @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.analytics.data.v1alpha.FunnelNextAction; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelNextAction + * @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.analytics.data.v1alpha.FunnelNextAction; + + /** + * Verifies a FunnelNextAction 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 FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelNextAction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @param message FunnelNextAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelNextAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelNextAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Funnel. */ + interface IFunnel { + + /** Funnel isOpenFunnel */ + isOpenFunnel?: (boolean|null); + + /** Funnel steps */ + steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); + } + + /** Represents a Funnel. */ + class Funnel implements IFunnel { + + /** + * Constructs a new Funnel. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnel); + + /** Funnel isOpenFunnel. */ + public isOpenFunnel: boolean; + + /** Funnel steps. */ + public steps: google.analytics.data.v1alpha.IFunnelStep[]; + + /** + * Creates a new Funnel instance using the specified properties. + * @param [properties] Properties to set + * @returns Funnel instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Funnel + * @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.analytics.data.v1alpha.Funnel; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Funnel + * @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.analytics.data.v1alpha.Funnel; + + /** + * Verifies a Funnel 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 Funnel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Funnel + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @param message Funnel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Funnel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Funnel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelStep. */ + interface IFunnelStep { + + /** FunnelStep name */ + name?: (string|null); + + /** FunnelStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** FunnelStep withinDurationFromPriorStep */ + withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression */ + filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + } + + /** Represents a FunnelStep. */ + class FunnelStep implements IFunnelStep { + + /** + * Constructs a new FunnelStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); + + /** FunnelStep name. */ + public name: string; + + /** FunnelStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** FunnelStep withinDurationFromPriorStep. */ + public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression. */ + public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelStep + * @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.analytics.data.v1alpha.FunnelStep; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelStep + * @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.analytics.data.v1alpha.FunnelStep; + + /** + * Verifies a FunnelStep 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 FunnelStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @param message FunnelStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelSubReport. */ + interface IFunnelSubReport { + + /** FunnelSubReport dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** FunnelSubReport metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** FunnelSubReport rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** FunnelSubReport metadata */ + metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + } + + /** Represents a FunnelSubReport. */ + class FunnelSubReport implements IFunnelSubReport { + + /** + * Constructs a new FunnelSubReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); + + /** FunnelSubReport dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** FunnelSubReport metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** FunnelSubReport rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** FunnelSubReport metadata. */ + public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelSubReport instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelSubReport + * @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.analytics.data.v1alpha.FunnelSubReport; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelSubReport + * @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.analytics.data.v1alpha.FunnelSubReport; + + /** + * Verifies a FunnelSubReport 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 FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelSubReport + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @param message FunnelSubReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelSubReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelSubReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegment. */ + interface IUserSegment { + + /** UserSegment userInclusionCriteria */ + userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + } + + /** Represents a UserSegment. */ + class UserSegment implements IUserSegment { + + /** + * Constructs a new UserSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegment); + + /** UserSegment userInclusionCriteria. */ + public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + + /** + * Creates a new UserSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegment + * @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.analytics.data.v1alpha.UserSegment; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegment + * @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.analytics.data.v1alpha.UserSegment; + + /** + * Verifies a UserSegment 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 UserSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @param message UserSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentCriteria. */ + interface IUserSegmentCriteria { + + /** UserSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); + + /** UserSegmentCriteria andSequenceGroups */ + andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); + } + + /** Represents a UserSegmentCriteria. */ + class UserSegmentCriteria implements IUserSegmentCriteria { + + /** + * Constructs a new UserSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); + + /** UserSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; + + /** UserSegmentCriteria andSequenceGroups. */ + public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentCriteria + * @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.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentCriteria + * @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.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Verifies a UserSegmentCriteria 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 UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @param message UserSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserCriteriaScoping enum. */ + enum UserCriteriaScoping { + USER_CRITERIA_SCOPING_UNSPECIFIED = 0, + USER_CRITERIA_WITHIN_SAME_EVENT = 1, + USER_CRITERIA_WITHIN_SAME_SESSION = 2, + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 + } + + /** Properties of a UserSegmentConditionGroup. */ + interface IUserSegmentConditionGroup { + + /** UserSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSegmentConditionGroup. */ + class UserSegmentConditionGroup implements IUserSegmentConditionGroup { + + /** + * Constructs a new UserSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); + + /** UserSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentConditionGroup + * @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.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentConditionGroup + * @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.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Verifies a UserSegmentConditionGroup 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 UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @param message UserSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentSequenceGroup. */ + interface IUserSegmentSequenceGroup { + + /** UserSegmentSequenceGroup sequenceScoping */ + sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentSequenceGroup sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps */ + userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); + } + + /** Represents a UserSegmentSequenceGroup. */ + class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { + + /** + * Constructs a new UserSegmentSequenceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); + + /** UserSegmentSequenceGroup sequenceScoping. */ + public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentSequenceGroup sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps. */ + public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentSequenceGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentSequenceGroup + * @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.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentSequenceGroup + * @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.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Verifies a UserSegmentSequenceGroup 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 UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentSequenceGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @param message UserSegmentSequenceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSequenceStep. */ + interface IUserSequenceStep { + + /** UserSequenceStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** UserSequenceStep stepScoping */ + stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSequenceStep segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSequenceStep. */ + class UserSequenceStep implements IUserSequenceStep { + + /** + * Constructs a new UserSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); + + /** UserSequenceStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** UserSequenceStep stepScoping. */ + public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSequenceStep segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSequenceStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSequenceStep + * @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.analytics.data.v1alpha.UserSequenceStep; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSequenceStep + * @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.analytics.data.v1alpha.UserSequenceStep; + + /** + * Verifies a UserSequenceStep 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 UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @param message UserSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentExclusion. */ + interface IUserSegmentExclusion { + + /** UserSegmentExclusion userExclusionDuration */ + userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); + + /** UserSegmentExclusion userExclusionCriteria */ + userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + } + + /** Represents a UserSegmentExclusion. */ + class UserSegmentExclusion implements IUserSegmentExclusion { + + /** + * Constructs a new UserSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); + + /** UserSegmentExclusion userExclusionDuration. */ + public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); + + /** UserSegmentExclusion userExclusionCriteria. */ + public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentExclusion + * @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.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentExclusion + * @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.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Verifies a UserSegmentExclusion 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 UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @param message UserSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserExclusionDuration enum. */ + enum UserExclusionDuration { + USER_EXCLUSION_DURATION_UNSPECIFIED = 0, + USER_EXCLUSION_TEMPORARY = 1, + USER_EXCLUSION_PERMANENT = 2 + } + + /** Properties of a SessionSegment. */ + interface ISessionSegment { + + /** SessionSegment sessionInclusionCriteria */ + sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + } + + /** Represents a SessionSegment. */ + class SessionSegment implements ISessionSegment { + + /** + * Constructs a new SessionSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); + + /** SessionSegment sessionInclusionCriteria. */ + public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + + /** + * Creates a new SessionSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegment + * @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.analytics.data.v1alpha.SessionSegment; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegment + * @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.analytics.data.v1alpha.SessionSegment; + + /** + * Verifies a SessionSegment 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 SessionSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @param message SessionSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentCriteria. */ + interface ISessionSegmentCriteria { + + /** SessionSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); + } + + /** Represents a SessionSegmentCriteria. */ + class SessionSegmentCriteria implements ISessionSegmentCriteria { + + /** + * Constructs a new SessionSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); + + /** SessionSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentCriteria + * @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.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentCriteria + * @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.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Verifies a SessionSegmentCriteria 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 SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @param message SessionSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionCriteriaScoping enum. */ + enum SessionCriteriaScoping { + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 + } + + /** Properties of a SessionSegmentConditionGroup. */ + interface ISessionSegmentConditionGroup { + + /** SessionSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); + + /** SessionSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a SessionSegmentConditionGroup. */ + class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { + + /** + * Constructs a new SessionSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); + + /** SessionSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); + + /** SessionSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentConditionGroup + * @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.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentConditionGroup + * @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.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Verifies a SessionSegmentConditionGroup 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 SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @param message SessionSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentExclusion. */ + interface ISessionSegmentExclusion { + + /** SessionSegmentExclusion sessionExclusionDuration */ + sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); + + /** SessionSegmentExclusion sessionExclusionCriteria */ + sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + } + + /** Represents a SessionSegmentExclusion. */ + class SessionSegmentExclusion implements ISessionSegmentExclusion { + + /** + * Constructs a new SessionSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); + + /** SessionSegmentExclusion sessionExclusionDuration. */ + public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); + + /** SessionSegmentExclusion sessionExclusionCriteria. */ + public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentExclusion + * @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.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentExclusion + * @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.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Verifies a SessionSegmentExclusion 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 SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @param message SessionSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionExclusionDuration enum. */ + enum SessionExclusionDuration { + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, + SESSION_EXCLUSION_TEMPORARY = 1, + SESSION_EXCLUSION_PERMANENT = 2 + } + + /** Properties of an EventSegment. */ + interface IEventSegment { + + /** EventSegment eventInclusionCriteria */ + eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + } + + /** Represents an EventSegment. */ + class EventSegment implements IEventSegment { + + /** + * Constructs a new EventSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegment); + + /** EventSegment eventInclusionCriteria. */ + public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + + /** + * Creates a new EventSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegment + * @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.analytics.data.v1alpha.EventSegment; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegment + * @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.analytics.data.v1alpha.EventSegment; + + /** + * Verifies an EventSegment 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 EventSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @param message EventSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentCriteria. */ + interface IEventSegmentCriteria { + + /** EventSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); + } + + /** Represents an EventSegmentCriteria. */ + class EventSegmentCriteria implements IEventSegmentCriteria { + + /** + * Constructs a new EventSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); + + /** EventSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentCriteria + * @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.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentCriteria + * @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.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Verifies an EventSegmentCriteria 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 EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @param message EventSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventCriteriaScoping enum. */ + enum EventCriteriaScoping { + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 + } + + /** Properties of an EventSegmentConditionGroup. */ + interface IEventSegmentConditionGroup { + + /** EventSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); + + /** EventSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents an EventSegmentConditionGroup. */ + class EventSegmentConditionGroup implements IEventSegmentConditionGroup { + + /** + * Constructs a new EventSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); + + /** EventSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); + + /** EventSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentConditionGroup + * @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.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentConditionGroup + * @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.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Verifies an EventSegmentConditionGroup 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 EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @param message EventSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentExclusion. */ + interface IEventSegmentExclusion { + + /** EventSegmentExclusion eventExclusionDuration */ + eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); + + /** EventSegmentExclusion eventExclusionCriteria */ + eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + } + + /** Represents an EventSegmentExclusion. */ + class EventSegmentExclusion implements IEventSegmentExclusion { + + /** + * Constructs a new EventSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); + + /** EventSegmentExclusion eventExclusionDuration. */ + public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); + + /** EventSegmentExclusion eventExclusionCriteria. */ + public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentExclusion + * @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.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentExclusion + * @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.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Verifies an EventSegmentExclusion 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 EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @param message EventSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventExclusionDuration enum. */ + enum EventExclusionDuration { + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, + EVENT_EXCLUSION_PERMANENT = 1 + } + + /** Properties of a Segment. */ + interface ISegment { + + /** Segment name */ + name?: (string|null); + + /** Segment userSegment */ + userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment */ + sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment */ + eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + } + + /** Represents a Segment. */ + class Segment implements ISegment { + + /** + * Constructs a new Segment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegment); + + /** Segment name. */ + public name: string; + + /** Segment userSegment. */ + public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment. */ + public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment. */ + public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + + /** Segment oneSegmentScope. */ + public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); + + /** + * Creates a new Segment instance using the specified properties. + * @param [properties] Properties to set + * @returns Segment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Segment + * @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.analytics.data.v1alpha.Segment; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Segment + * @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.analytics.data.v1alpha.Segment; + + /** + * Verifies a Segment 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 Segment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Segment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @param message Segment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Segment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Segment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpression. */ + interface ISegmentFilterExpression { + + /** SegmentFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter */ + segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter */ + segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + } + + /** Represents a SegmentFilterExpression. */ + class SegmentFilterExpression implements ISegmentFilterExpression { + + /** + * Constructs a new SegmentFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); + + /** SegmentFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter. */ + public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter. */ + public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + + /** SegmentFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpression + * @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.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpression + * @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.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Verifies a SegmentFilterExpression 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 SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @param message SegmentFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpressionList. */ + interface ISegmentFilterExpressionList { + + /** SegmentFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); + } + + /** Represents a SegmentFilterExpressionList. */ + class SegmentFilterExpressionList implements ISegmentFilterExpressionList { + + /** + * Constructs a new SegmentFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); + + /** SegmentFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpressionList + * @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.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpressionList + * @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.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Verifies a SegmentFilterExpressionList 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 SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilter. */ + interface ISegmentFilter { + + /** SegmentFilter fieldName */ + fieldName?: (string|null); + + /** SegmentFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + } + + /** Represents a SegmentFilter. */ + class SegmentFilter implements ISegmentFilter { + + /** + * Constructs a new SegmentFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); + + /** SegmentFilter fieldName. */ + public fieldName: string; + + /** SegmentFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + + /** SegmentFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilter + * @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.analytics.data.v1alpha.SegmentFilter; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilter + * @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.analytics.data.v1alpha.SegmentFilter; + + /** + * Verifies a SegmentFilter 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 SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @param message SegmentFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterScoping. */ + interface ISegmentFilterScoping { + + /** SegmentFilterScoping atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); + } + + /** Represents a SegmentFilterScoping. */ + class SegmentFilterScoping implements ISegmentFilterScoping { + + /** + * Constructs a new SegmentFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); + + /** SegmentFilterScoping atAnyPointInTime. */ + public atAnyPointInTime?: (boolean|null); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterScoping + * @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.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterScoping + * @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.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Verifies a SegmentFilterScoping 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 SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @param message SegmentFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentEventFilter. */ + interface ISegmentEventFilter { + + /** SegmentEventFilter eventName */ + eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression */ + segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + } + + /** Represents a SegmentEventFilter. */ + class SegmentEventFilter implements ISegmentEventFilter { + + /** + * Constructs a new SegmentEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); + + /** SegmentEventFilter eventName. */ + public eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression. */ + public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentEventFilter + * @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.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentEventFilter + * @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.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Verifies a SegmentEventFilter 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 SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @param message SegmentEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpression. */ + interface ISegmentParameterFilterExpression { + + /** SegmentParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter */ + segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + } + + /** Represents a SegmentParameterFilterExpression. */ + class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { + + /** + * Constructs a new SegmentParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); + + /** SegmentParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter. */ + public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + + /** SegmentParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpression + * @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.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpression + * @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.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Verifies a SegmentParameterFilterExpression 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 SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpressionList. */ + interface ISegmentParameterFilterExpressionList { + + /** SegmentParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); + } + + /** Represents a SegmentParameterFilterExpressionList. */ + class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); + + /** SegmentParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpressionList + * @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.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpressionList + * @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.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Verifies a SegmentParameterFilterExpressionList 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 SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilter. */ + interface ISegmentParameterFilter { + + /** SegmentParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + } + + /** Represents a SegmentParameterFilter. */ + class SegmentParameterFilter implements ISegmentParameterFilter { + + /** + * Constructs a new SegmentParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); + + /** SegmentParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + + /** SegmentParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** SegmentParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilter + * @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.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilter + * @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.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Verifies a SegmentParameterFilter 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 SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @param message SegmentParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterScoping. */ + interface ISegmentParameterFilterScoping { + + /** SegmentParameterFilterScoping inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|Long|string|null); + } + + /** Represents a SegmentParameterFilterScoping. */ + class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { + + /** + * Constructs a new SegmentParameterFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); + + /** SegmentParameterFilterScoping inAnyNDayPeriod. */ + public inAnyNDayPeriod?: (number|Long|string|null); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterScoping + * @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.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterScoping + * @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.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Verifies a SegmentParameterFilterScoping 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 SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @param message SegmentParameterFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpression. */ + interface IFunnelFilterExpression { + + /** FunnelFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter */ + funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter */ + funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + } + + /** Represents a FunnelFilterExpression. */ + class FunnelFilterExpression implements IFunnelFilterExpression { + + /** + * Constructs a new FunnelFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); + + /** FunnelFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter. */ + public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter. */ + public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + + /** FunnelFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpression + * @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.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpression + * @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.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Verifies a FunnelFilterExpression 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 FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @param message FunnelFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpressionList. */ + interface IFunnelFilterExpressionList { + + /** FunnelFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); + } + + /** Represents a FunnelFilterExpressionList. */ + class FunnelFilterExpressionList implements IFunnelFilterExpressionList { + + /** + * Constructs a new FunnelFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); + + /** FunnelFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpressionList + * @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.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpressionList + * @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.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Verifies a FunnelFilterExpressionList 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 FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFieldFilter. */ + interface IFunnelFieldFilter { + + /** FunnelFieldFilter fieldName */ + fieldName?: (string|null); + + /** FunnelFieldFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelFieldFilter. */ + class FunnelFieldFilter implements IFunnelFieldFilter { + + /** + * Constructs a new FunnelFieldFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); + + /** FunnelFieldFilter fieldName. */ + public fieldName: string; + + /** FunnelFieldFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelFieldFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFieldFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFieldFilter + * @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.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFieldFilter + * @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.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Verifies a FunnelFieldFilter 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 FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFieldFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @param message FunnelFieldFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelEventFilter. */ + interface IFunnelEventFilter { + + /** FunnelEventFilter eventName */ + eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression */ + funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + } + + /** Represents a FunnelEventFilter. */ + class FunnelEventFilter implements IFunnelEventFilter { + + /** + * Constructs a new FunnelEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); + + /** FunnelEventFilter eventName. */ + public eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression. */ + public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelEventFilter + * @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.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelEventFilter + * @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.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Verifies a FunnelEventFilter 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 FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @param message FunnelEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpression. */ + interface IFunnelParameterFilterExpression { + + /** FunnelParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter */ + funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + } + + /** Represents a FunnelParameterFilterExpression. */ + class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { + + /** + * Constructs a new FunnelParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); + + /** FunnelParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter. */ + public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + + /** FunnelParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpression + * @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.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpression + * @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.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Verifies a FunnelParameterFilterExpression 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 FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpressionList. */ + interface IFunnelParameterFilterExpressionList { + + /** FunnelParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); + } + + /** Represents a FunnelParameterFilterExpressionList. */ + class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); + + /** FunnelParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpressionList + * @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.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpressionList + * @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.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Verifies a FunnelParameterFilterExpressionList 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 FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilter. */ + interface IFunnelParameterFilter { + + /** FunnelParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelParameterFilter. */ + class FunnelParameterFilter implements IFunnelParameterFilter { + + /** + * Constructs a new FunnelParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); + + /** FunnelParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** FunnelParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilter + * @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.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilter + * @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.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Verifies a FunnelParameterFilter 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 FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @param message FunnelParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelResponseMetadata. */ + interface IFunnelResponseMetadata { + + /** FunnelResponseMetadata samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + } + + /** Represents a FunnelResponseMetadata. */ + class FunnelResponseMetadata implements IFunnelResponseMetadata { + + /** + * Constructs a new FunnelResponseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); + + /** FunnelResponseMetadata samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelResponseMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelResponseMetadata + * @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.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelResponseMetadata + * @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.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Verifies a FunnelResponseMetadata 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 FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelResponseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @param message FunnelResponseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { + + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); + + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); + } + + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { + + /** + * Constructs a new SamplingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); + + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SamplingMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SamplingMetadata + * @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.analytics.data.v1alpha.SamplingMetadata; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SamplingMetadata + * @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.analytics.data.v1alpha.SamplingMetadata; + + /** + * Verifies a SamplingMetadata 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 SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SamplingMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SamplingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SamplingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } + + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + + /** SamplingLevel enum. */ + enum SamplingLevel { + SAMPLING_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + UNSAMPLED = 3 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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, + IDENTIFIER = 8 + } + + /** 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; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * 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); + + /** + * 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; + + /** + * 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; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * 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; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * 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; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * 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; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * 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; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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 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 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 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 Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.GetOperationRequest; + + /** + * 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.ListOperationsResponse; + + /** + * 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.CancelOperationRequest; + + /** + * 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.DeleteOperationRequest; + + /** + * 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.WaitOperationRequest; + + /** + * 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.OperationInfo; + + /** + * 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * 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.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** 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 Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.rpc.Status; + + /** + * 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 Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * 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.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.js new file mode 100644 index 000000000000..dc3cd47b59ab --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.js @@ -0,0 +1,50897 @@ +// Copyright 2025 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_data_protos || ($protobuf.roots._google_cloud_data_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.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); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @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.Duration} Duration + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @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 + */ + Duration.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"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + 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; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.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; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + 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 {google.protobuf.Edition|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 {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * 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 14, wireType 0 =*/112).int32(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.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, error) { + 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(); + if (tag === error) + break; + 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())); + 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 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @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 + */ + FileDescriptorProto.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 (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")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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.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.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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.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 = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + 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.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 = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.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); + }; + + /** + * 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"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + 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 + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @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.protobuf.DescriptorProto} DescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + 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())); + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @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 + */ + DescriptorProto.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.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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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 DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.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.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.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; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + 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 + */ + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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()); + }; + + /** + * 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 "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); + } + 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; + }; + + /** + * 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"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * 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]]; + } + + /** + * 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; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @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.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @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 + */ + ExtensionRangeOptions.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.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + 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 + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.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.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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(); + break; + } + case 2: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 3: + case 2: + 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_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * 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_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * 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.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @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); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @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 + */ + 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; + }; + + /** + * 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 + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + 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 + */ + 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; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + 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; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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); + }; + + /** + * 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.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @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 + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @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 + */ + 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.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; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + 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); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + 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. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * 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); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 "method." + 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. + * @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]); + } + } + 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. + * @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); + }; + + /** + * 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"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (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 + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * 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 + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @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.FileOptions} FileOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + FileOptions.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.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + 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.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.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"; + }; + + /** + * 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 FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @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 + */ + 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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 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 + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @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.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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()); + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + 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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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); + }; + + /** + * 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"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @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 {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $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; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.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.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @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.FieldOptions} FieldOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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: + case 8: + break; + } + } + 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; + } + 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.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.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; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + 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"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + 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.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * 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; + })(); + + /** + * 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; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * 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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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 {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 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 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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()); + }; + + /** + * 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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 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 OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @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.EnumOptions} EnumOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @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 + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @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.EnumValueOptions} EnumValueOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @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 + */ + EnumValueOptions.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @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.ServiceOptions} ServiceOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + 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; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @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 + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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[".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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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[".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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + 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 {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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 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; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * 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 + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * 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 + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * 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 + */ + 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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; + }; + + /** + * 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 + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + MethodOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + }; + + /** + * 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 + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + }; + + /** + * 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 + */ + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 + */ + 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.features = null; + 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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * 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; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * 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 + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @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.UninterpretedOption} UninterpretedOption + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 "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. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + 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; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @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); + } + 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 UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * 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 + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @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) { + 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; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + 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; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 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; + }; + + /** + * 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 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 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 Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @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 + */ + GeneratedCodeInfo.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; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @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 GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.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); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * 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 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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: + 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + /** + * 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 Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * 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 + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + Any.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * 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.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @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.Empty} Empty + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @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 + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * 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.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.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); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @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.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @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 + */ + Timestamp.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"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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 Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.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; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.analytics = (function() { + + /** + * Namespace analytics. + * @memberof google + * @namespace + */ + var analytics = {}; + + analytics.data = (function() { + + /** + * Namespace data. + * @memberof google.analytics + * @namespace + */ + var data = {}; + + data.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.analytics.data + * @namespace + */ + var v1alpha = {}; + + v1alpha.AlphaAnalyticsData = (function() { + + /** + * Constructs a new AlphaAnalyticsData service. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AlphaAnalyticsData + * @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 AlphaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AlphaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlphaAnalyticsData; + + /** + * Creates new AlphaAnalyticsData service using the specified rpc implementation. + * @function create + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @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 {AlphaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. + */ + AlphaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef RunFunnelReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} [response] RunFunnelReportResponse + */ + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback} callback Node-style callback called with the error, if any, and RunFunnelReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.runFunnelReport = function runFunnelReport(request, callback) { + return this.rpcCall(runFunnelReport, $root.google.analytics.data.v1alpha.RunFunnelReportRequest, $root.google.analytics.data.v1alpha.RunFunnelReportResponse, request, callback); + }, "name", { value: "RunFunnelReport" }); + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createAudienceList = function createAudienceList(request, callback) { + return this.rpcCall(createAudienceList, $root.google.analytics.data.v1alpha.CreateAudienceListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAudienceList" }); + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} [response] QueryAudienceListResponse + */ + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback} callback Node-style callback called with the error, if any, and QueryAudienceListResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryAudienceList = function queryAudienceList(request, callback) { + return this.rpcCall(queryAudienceList, $root.google.analytics.data.v1alpha.QueryAudienceListRequest, $root.google.analytics.data.v1alpha.QueryAudienceListResponse, request, callback); + }, "name", { value: "QueryAudienceList" }); + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef SheetExportAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} [response] SheetExportAudienceListResponse + */ + + /** + * Calls SheetExportAudienceList. + * @function sheetExportAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback} callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.sheetExportAudienceList = function sheetExportAudienceList(request, callback) { + return this.rpcCall(sheetExportAudienceList, $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest, $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse, request, callback); + }, "name", { value: "SheetExportAudienceList" }); + + /** + * Calls SheetExportAudienceList. + * @function sheetExportAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.AudienceList} [response] AudienceList + */ + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback} callback Node-style callback called with the error, if any, and AudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getAudienceList = function getAudienceList(request, callback) { + return this.rpcCall(getAudienceList, $root.google.analytics.data.v1alpha.GetAudienceListRequest, $root.google.analytics.data.v1alpha.AudienceList, request, callback); + }, "name", { value: "GetAudienceList" }); + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} [response] ListAudienceListsResponse + */ + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback} callback Node-style callback called with the error, if any, and ListAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listAudienceLists = function listAudienceLists(request, callback) { + return this.rpcCall(listAudienceLists, $root.google.analytics.data.v1alpha.ListAudienceListsRequest, $root.google.analytics.data.v1alpha.ListAudienceListsResponse, request, callback); + }, "name", { value: "ListAudienceLists" }); + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createRecurringAudienceList = function createRecurringAudienceList(request, callback) { + return this.rpcCall(createRecurringAudienceList, $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "CreateRecurringAudienceList" }); + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getRecurringAudienceList = function getRecurringAudienceList(request, callback) { + return this.rpcCall(getRecurringAudienceList, $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "GetRecurringAudienceList" }); + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListRecurringAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} [response] ListRecurringAudienceListsResponse + */ + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback} callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listRecurringAudienceLists = function listRecurringAudienceLists(request, callback) { + return this.rpcCall(listRecurringAudienceLists, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, request, callback); + }, "name", { value: "ListRecurringAudienceLists" }); + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetPropertyQuotasSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} [response] PropertyQuotasSnapshot + */ + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback} callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getPropertyQuotasSnapshot = function getPropertyQuotasSnapshot(request, callback) { + return this.rpcCall(getPropertyQuotasSnapshot, $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot, request, callback); + }, "name", { value: "GetPropertyQuotasSnapshot" }); + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createReportTask = function createReportTask(request, callback) { + return this.rpcCall(createReportTask, $root.google.analytics.data.v1alpha.CreateReportTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReportTask" }); + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} [response] QueryReportTaskResponse + */ + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback} callback Node-style callback called with the error, if any, and QueryReportTaskResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryReportTask = function queryReportTask(request, callback) { + return this.rpcCall(queryReportTask, $root.google.analytics.data.v1alpha.QueryReportTaskRequest, $root.google.analytics.data.v1alpha.QueryReportTaskResponse, request, callback); + }, "name", { value: "QueryReportTask" }); + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ReportTask} [response] ReportTask + */ + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback} callback Node-style callback called with the error, if any, and ReportTask + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getReportTask = function getReportTask(request, callback) { + return this.rpcCall(getReportTask, $root.google.analytics.data.v1alpha.GetReportTaskRequest, $root.google.analytics.data.v1alpha.ReportTask, request, callback); + }, "name", { value: "GetReportTask" }); + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListReportTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} [response] ListReportTasksResponse + */ + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback} callback Node-style callback called with the error, if any, and ListReportTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listReportTasks = function listReportTasks(request, callback) { + return this.rpcCall(listReportTasks, $root.google.analytics.data.v1alpha.ListReportTasksRequest, $root.google.analytics.data.v1alpha.ListReportTasksResponse, request, callback); + }, "name", { value: "ListReportTasks" }); + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AlphaAnalyticsData; + })(); + + v1alpha.CreateRecurringAudienceListRequest = (function() { + + /** + * Properties of a CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateRecurringAudienceListRequest + * @property {string|null} [parent] CreateRecurringAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IRecurringAudienceList|null} [recurringAudienceList] CreateRecurringAudienceListRequest recurringAudienceList + */ + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateRecurringAudienceListRequest. + * @implements ICreateRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + */ + function CreateRecurringAudienceListRequest(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]]; + } + + /** + * CreateRecurringAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.parent = ""; + + /** + * CreateRecurringAudienceListRequest recurringAudienceList. + * @member {google.analytics.data.v1alpha.IRecurringAudienceList|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.recurringAudienceList = null; + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest instance + */ + CreateRecurringAudienceListRequest.create = function create(properties) { + return new CreateRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.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.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRecurringAudienceListRequest.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.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceList); + if (error) + return "recurringAudienceList." + error; + } + return null; + }; + + /** + * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + */ + CreateRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.recurringAudienceList != null) { + if (typeof object.recurringAudienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.recurringAudienceList: object expected"); + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRecurringAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.recurringAudienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) + object.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceList, options); + return object; + }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateRecurringAudienceListRequest"; + }; + + return CreateRecurringAudienceListRequest; + })(); + + v1alpha.RecurringAudienceList = (function() { + + /** + * Properties of a RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IRecurringAudienceList + * @property {string|null} [name] RecurringAudienceList name + * @property {string|null} [audience] RecurringAudienceList audience + * @property {string|null} [audienceDisplayName] RecurringAudienceList audienceDisplayName + * @property {Array.|null} [dimensions] RecurringAudienceList dimensions + * @property {number|null} [activeDaysRemaining] RecurringAudienceList activeDaysRemaining + * @property {Array.|null} [audienceLists] RecurringAudienceList audienceLists + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] RecurringAudienceList webhookNotification + */ + + /** + * Constructs a new RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RecurringAudienceList. + * @implements IRecurringAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + */ + function RecurringAudienceList(properties) { + this.dimensions = []; + this.audienceLists = []; + 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]]; + } + + /** + * RecurringAudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.name = ""; + + /** + * RecurringAudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audience = ""; + + /** + * RecurringAudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceDisplayName = ""; + + /** + * RecurringAudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.dimensions = $util.emptyArray; + + /** + * RecurringAudienceList activeDaysRemaining. + * @member {number|null|undefined} activeDaysRemaining + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.activeDaysRemaining = null; + + /** + * RecurringAudienceList audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceLists = $util.emptyArray; + + /** + * RecurringAudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_activeDaysRemaining", { + get: $util.oneOfGetter($oneOfFields = ["activeDaysRemaining"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList instance + */ + RecurringAudienceList.create = function create(properties) { + return new RecurringAudienceList(properties); + }; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.activeDaysRemaining != null && Object.hasOwnProperty.call(message, "activeDaysRemaining")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activeDaysRemaining); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.audienceLists[i]); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.activeDaysRemaining = reader.int32(); + break; + } + case 6: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push(reader.string()); + break; + } + case 8: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringAudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringAudienceList.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.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + properties._activeDaysRemaining = 1; + if (!$util.isInteger(message.activeDaysRemaining)) + return "activeDaysRemaining: integer expected"; + } + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) + if (!$util.isString(message.audienceLists[i])) + return "audienceLists: string[] expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + */ + RecurringAudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RecurringAudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + if (object.activeDaysRemaining != null) + message.activeDaysRemaining = object.activeDaysRemaining | 0; + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) + message.audienceLists[i] = String(object.audienceLists[i]); + } + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.RecurringAudienceList} message RecurringAudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringAudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.audienceLists = []; + } + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + object.activeDaysRemaining = message.activeDaysRemaining; + if (options.oneofs) + object._activeDaysRemaining = "activeDaysRemaining"; + } + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = message.audienceLists[j]; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this RecurringAudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + * @returns {Object.} JSON object + */ + RecurringAudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecurringAudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringAudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RecurringAudienceList"; + }; + + return RecurringAudienceList; + })(); + + v1alpha.WebhookNotification = (function() { + + /** + * Properties of a WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @interface IWebhookNotification + * @property {string|null} [uri] WebhookNotification uri + * @property {string|null} [channelToken] WebhookNotification channelToken + */ + + /** + * Constructs a new WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a WebhookNotification. + * @implements IWebhookNotification + * @constructor + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + */ + function WebhookNotification(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]]; + } + + /** + * WebhookNotification uri. + * @member {string|null|undefined} uri + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.uri = null; + + /** + * WebhookNotification channelToken. + * @member {string|null|undefined} channelToken + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.channelToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_uri", { + get: $util.oneOfGetter($oneOfFields = ["uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_channelToken", { + get: $util.oneOfGetter($oneOfFields = ["channelToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification instance + */ + WebhookNotification.create = function create(properties) { + return new WebhookNotification(properties); + }; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.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.channelToken != null && Object.hasOwnProperty.call(message, "channelToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelToken); + return writer; + }; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.channelToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookNotification message. + * @function verify + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties._uri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + properties._channelToken = 1; + if (!$util.isString(message.channelToken)) + return "channelToken: string expected"; + } + return null; + }; + + /** + * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + */ + WebhookNotification.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.WebhookNotification) + return object; + var message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.channelToken != null) + message.channelToken = String(object.channelToken); + return message; + }; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.WebhookNotification} message WebhookNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object._uri = "uri"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + object.channelToken = message.channelToken; + if (options.oneofs) + object._channelToken = "channelToken"; + } + return object; + }; + + /** + * Converts this WebhookNotification to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + * @returns {Object.} JSON object + */ + WebhookNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookNotification + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.WebhookNotification"; + }; + + return WebhookNotification; + })(); + + v1alpha.GetRecurringAudienceListRequest = (function() { + + /** + * Properties of a GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetRecurringAudienceListRequest + * @property {string|null} [name] GetRecurringAudienceListRequest name + */ + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetRecurringAudienceListRequest. + * @implements IGetRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + */ + function GetRecurringAudienceListRequest(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]]; + } + + /** + * GetRecurringAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + */ + GetRecurringAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest instance + */ + GetRecurringAudienceListRequest.create = function create(properties) { + return new GetRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + */ + GetRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} message GetRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetRecurringAudienceListRequest"; + }; + + return GetRecurringAudienceListRequest; + })(); + + v1alpha.ListRecurringAudienceListsRequest = (function() { + + /** + * Properties of a ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsRequest + * @property {string|null} [parent] ListRecurringAudienceListsRequest parent + * @property {number|null} [pageSize] ListRecurringAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListRecurringAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsRequest. + * @implements IListRecurringAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + */ + function ListRecurringAudienceListsRequest(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]]; + } + + /** + * ListRecurringAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.parent = ""; + + /** + * ListRecurringAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListRecurringAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest instance + */ + ListRecurringAudienceListsRequest.create = function create(properties) { + return new ListRecurringAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsRequest.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"; + return null; + }; + + /** + * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + */ + ListRecurringAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + 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 ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsRequest.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; + return object; + }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsRequest"; + }; + + return ListRecurringAudienceListsRequest; + })(); + + v1alpha.ListRecurringAudienceListsResponse = (function() { + + /** + * Properties of a ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsResponse + * @property {Array.|null} [recurringAudienceLists] ListRecurringAudienceListsResponse recurringAudienceLists + * @property {string|null} [nextPageToken] ListRecurringAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsResponse. + * @implements IListRecurringAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + */ + function ListRecurringAudienceListsResponse(properties) { + this.recurringAudienceLists = []; + 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]]; + } + + /** + * ListRecurringAudienceListsResponse recurringAudienceLists. + * @member {Array.} recurringAudienceLists + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.recurringAudienceLists = $util.emptyArray; + + /** + * ListRecurringAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListRecurringAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse instance + */ + ListRecurringAudienceListsResponse.create = function create(properties) { + return new ListRecurringAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurringAudienceLists != null && message.recurringAudienceLists.length) + for (var i = 0; i < message.recurringAudienceLists.length; ++i) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceLists[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 ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.recurringAudienceLists && message.recurringAudienceLists.length)) + message.recurringAudienceLists = []; + message.recurringAudienceLists.push($root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.recurringAudienceLists != null && message.hasOwnProperty("recurringAudienceLists")) { + if (!Array.isArray(message.recurringAudienceLists)) + return "recurringAudienceLists: array expected"; + for (var i = 0; i < message.recurringAudienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceLists[i]); + if (error) + return "recurringAudienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + */ + ListRecurringAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + if (object.recurringAudienceLists) { + if (!Array.isArray(object.recurringAudienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: array expected"); + message.recurringAudienceLists = []; + for (var i = 0; i < object.recurringAudienceLists.length; ++i) { + if (typeof object.recurringAudienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: object expected"); + message.recurringAudienceLists[i] = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.recurringAudienceLists = []; + if (message.recurringAudienceLists && message.recurringAudienceLists.length) { + object.recurringAudienceLists = []; + for (var j = 0; j < message.recurringAudienceLists.length; ++j) + object.recurringAudienceLists[j] = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsResponse"; + }; + + return ListRecurringAudienceListsResponse; + })(); + + v1alpha.GetPropertyQuotasSnapshotRequest = (function() { + + /** + * Properties of a GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetPropertyQuotasSnapshotRequest + * @property {string|null} [name] GetPropertyQuotasSnapshotRequest name + */ + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetPropertyQuotasSnapshotRequest. + * @implements IGetPropertyQuotasSnapshotRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + */ + function GetPropertyQuotasSnapshotRequest(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]]; + } + + /** + * GetPropertyQuotasSnapshotRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + */ + GetPropertyQuotasSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest instance + */ + GetPropertyQuotasSnapshotRequest.create = function create(properties) { + return new GetPropertyQuotasSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + */ + GetPropertyQuotasSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetPropertyQuotasSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPropertyQuotasSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest"; + }; + + return GetPropertyQuotasSnapshotRequest; + })(); + + v1alpha.PropertyQuotasSnapshot = (function() { + + /** + * Properties of a PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuotasSnapshot + * @property {string|null} [name] PropertyQuotasSnapshot name + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [corePropertyQuota] PropertyQuotasSnapshot corePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [realtimePropertyQuota] PropertyQuotasSnapshot realtimePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [funnelPropertyQuota] PropertyQuotasSnapshot funnelPropertyQuota + */ + + /** + * Constructs a new PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuotasSnapshot. + * @implements IPropertyQuotasSnapshot + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + */ + function PropertyQuotasSnapshot(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]]; + } + + /** + * PropertyQuotasSnapshot name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.name = ""; + + /** + * PropertyQuotasSnapshot corePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} corePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.corePropertyQuota = null; + + /** + * PropertyQuotasSnapshot realtimePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} realtimePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.realtimePropertyQuota = null; + + /** + * PropertyQuotasSnapshot funnelPropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} funnelPropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.funnelPropertyQuota = null; + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot instance + */ + PropertyQuotasSnapshot.create = function create(properties) { + return new PropertyQuotasSnapshot(properties); + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.corePropertyQuota != null && Object.hasOwnProperty.call(message, "corePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.corePropertyQuota, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.realtimePropertyQuota != null && Object.hasOwnProperty.call(message, "realtimePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.realtimePropertyQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnelPropertyQuota != null && Object.hasOwnProperty.call(message, "funnelPropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.funnelPropertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 2: { + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 3: { + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuotasSnapshot message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuotasSnapshot.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.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.corePropertyQuota); + if (error) + return "corePropertyQuota." + error; + } + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.realtimePropertyQuota); + if (error) + return "realtimePropertyQuota." + error; + } + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.funnelPropertyQuota); + if (error) + return "funnelPropertyQuota." + error; + } + return null; + }; + + /** + * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + */ + PropertyQuotasSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.corePropertyQuota != null) { + if (typeof object.corePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.corePropertyQuota: object expected"); + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.corePropertyQuota); + } + if (object.realtimePropertyQuota != null) { + if (typeof object.realtimePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.realtimePropertyQuota: object expected"); + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.realtimePropertyQuota); + } + if (object.funnelPropertyQuota != null) { + if (typeof object.funnelPropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.funnelPropertyQuota: object expected"); + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.funnelPropertyQuota); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} message PropertyQuotasSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuotasSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.corePropertyQuota = null; + object.realtimePropertyQuota = null; + object.funnelPropertyQuota = null; + object.name = ""; + } + if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) + object.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.corePropertyQuota, options); + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) + object.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.realtimePropertyQuota, options); + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) + object.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.funnelPropertyQuota, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + * @returns {Object.} JSON object + */ + PropertyQuotasSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuotasSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuotasSnapshot"; + }; + + return PropertyQuotasSnapshot; + })(); + + v1alpha.GetAudienceListRequest = (function() { + + /** + * Properties of a GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetAudienceListRequest + * @property {string|null} [name] GetAudienceListRequest name + */ + + /** + * Constructs a new GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetAudienceListRequest. + * @implements IGetAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + */ + function GetAudienceListRequest(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]]; + } + + /** + * GetAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + */ + GetAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest instance + */ + GetAudienceListRequest.create = function create(properties) { + return new GetAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.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 GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceListRequest.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 GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + */ + GetAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetAudienceListRequest} message GetAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceListRequest.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 GetAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetAudienceListRequest"; + }; + + return GetAudienceListRequest; + })(); + + v1alpha.ListAudienceListsRequest = (function() { + + /** + * Properties of a ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsRequest + * @property {string|null} [parent] ListAudienceListsRequest parent + * @property {number|null} [pageSize] ListAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsRequest. + * @implements IListAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + */ + function ListAudienceListsRequest(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]]; + } + + /** + * ListAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.parent = ""; + + /** + * ListAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest instance + */ + ListAudienceListsRequest.create = function create(properties) { + return new ListAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsRequest.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"; + return null; + }; + + /** + * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + */ + ListAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + 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 ListAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsRequest} message ListAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsRequest.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; + return object; + }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsRequest"; + }; + + return ListAudienceListsRequest; + })(); + + v1alpha.ListAudienceListsResponse = (function() { + + /** + * Properties of a ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsResponse + * @property {Array.|null} [audienceLists] ListAudienceListsResponse audienceLists + * @property {string|null} [nextPageToken] ListAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsResponse. + * @implements IListAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + */ + function ListAudienceListsResponse(properties) { + this.audienceLists = []; + 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]]; + } + + /** + * ListAudienceListsResponse audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.audienceLists = $util.emptyArray; + + /** + * ListAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse instance + */ + ListAudienceListsResponse.create = function create(properties) { + return new ListAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceLists[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 ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push($root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceLists[i]); + if (error) + return "audienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + */ + ListAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) { + if (typeof object.audienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: object expected"); + message.audienceLists[i] = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} message ListAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceLists = []; + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsResponse"; + }; + + return ListAudienceListsResponse; + })(); + + v1alpha.CreateAudienceListRequest = (function() { + + /** + * Properties of a CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateAudienceListRequest + * @property {string|null} [parent] CreateAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] CreateAudienceListRequest audienceList + */ + + /** + * Constructs a new CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateAudienceListRequest. + * @implements ICreateAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + */ + function CreateAudienceListRequest(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]]; + } + + /** + * CreateAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.parent = ""; + + /** + * CreateAudienceListRequest audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.audienceList = null; + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest instance + */ + CreateAudienceListRequest.create = function create(properties) { + return new CreateAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.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.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceListRequest.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.audienceList != null && message.hasOwnProperty("audienceList")) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + */ + CreateAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateAudienceListRequest.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateAudienceListRequest} message CreateAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + return object; + }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateAudienceListRequest"; + }; + + return CreateAudienceListRequest; + })(); + + v1alpha.AudienceList = (function() { + + /** + * Properties of an AudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceList + * @property {string|null} [name] AudienceList name + * @property {string|null} [audience] AudienceList audience + * @property {string|null} [audienceDisplayName] AudienceList audienceDisplayName + * @property {Array.|null} [dimensions] AudienceList dimensions + * @property {google.analytics.data.v1alpha.AudienceList.State|null} [state] AudienceList state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceList beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] AudienceList creationQuotaTokensCharged + * @property {number|null} [rowCount] AudienceList rowCount + * @property {string|null} [errorMessage] AudienceList errorMessage + * @property {number|null} [percentageCompleted] AudienceList percentageCompleted + * @property {string|null} [recurringAudienceList] AudienceList recurringAudienceList + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] AudienceList webhookNotification + */ + + /** + * Constructs a new AudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceList. + * @implements IAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + */ + function AudienceList(properties) { + this.dimensions = []; + 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]]; + } + + /** + * AudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.name = ""; + + /** + * AudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audience = ""; + + /** + * AudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audienceDisplayName = ""; + + /** + * AudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.dimensions = $util.emptyArray; + + /** + * AudienceList state. + * @member {google.analytics.data.v1alpha.AudienceList.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.state = null; + + /** + * AudienceList beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.beginCreatingTime = null; + + /** + * AudienceList creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.creationQuotaTokensCharged = 0; + + /** + * AudienceList rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.rowCount = null; + + /** + * AudienceList errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.errorMessage = null; + + /** + * AudienceList percentageCompleted. + * @member {number|null|undefined} percentageCompleted + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.percentageCompleted = null; + + /** + * AudienceList recurringAudienceList. + * @member {string|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.recurringAudienceList = null; + + /** + * AudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_percentageCompleted", { + get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_recurringAudienceList", { + get: $util.oneOfGetter($oneOfFields = ["recurringAudienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList instance + */ + AudienceList.create = function create(properties) { + return new AudienceList(properties); + }; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], 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.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); + if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) + writer.uint32(/* id 11, wireType 1 =*/89).double(message.percentageCompleted); + if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.recurringAudienceList); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 8: { + message.rowCount = reader.int32(); + break; + } + case 9: { + message.errorMessage = reader.string(); + break; + } + case 11: { + message.percentageCompleted = reader.double(); + break; + } + case 12: { + message.recurringAudienceList = reader.string(); + break; + } + case 13: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceList.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.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + properties._percentageCompleted = 1; + if (typeof message.percentageCompleted !== "number") + return "percentageCompleted: number expected"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + properties._recurringAudienceList = 1; + if (!$util.isString(message.recurringAudienceList)) + return "recurringAudienceList: string expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + */ + AudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentageCompleted != null) + message.percentageCompleted = Number(object.percentageCompleted); + if (object.recurringAudienceList != null) + message.recurringAudienceList = String(object.recurringAudienceList); + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.AudienceList} message AudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + object.creationQuotaTokensCharged = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.AudienceList.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.AudienceList.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; + if (options.oneofs) + object._percentageCompleted = "percentageCompleted"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + object.recurringAudienceList = message.recurringAudienceList; + if (options.oneofs) + object._recurringAudienceList = "recurringAudienceList"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this AudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + * @returns {Object.} JSON object + */ + AudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceList"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.AudienceList.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + AudienceList.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return AudienceList; + })(); + + v1alpha.AudienceListMetadata = (function() { + + /** + * Properties of an AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceListMetadata + */ + + /** + * Constructs a new AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceListMetadata. + * @implements IAudienceListMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + */ + function AudienceListMetadata(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 AudienceListMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata instance + */ + AudienceListMetadata.create = function create(properties) { + return new AudienceListMetadata(properties); + }; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceListMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceListMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + */ + AudienceListMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceListMetadata) + return object; + return new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + }; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.AudienceListMetadata} message AudienceListMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceListMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AudienceListMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @instance + * @returns {Object.} JSON object + */ + AudienceListMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceListMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceListMetadata"; + }; + + return AudienceListMetadata; + })(); + + v1alpha.QueryAudienceListRequest = (function() { + + /** + * Properties of a QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListRequest + * @property {string|null} [name] QueryAudienceListRequest name + * @property {number|Long|null} [offset] QueryAudienceListRequest offset + * @property {number|Long|null} [limit] QueryAudienceListRequest limit + */ + + /** + * Constructs a new QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListRequest. + * @implements IQueryAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + */ + function QueryAudienceListRequest(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]]; + } + + /** + * QueryAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.name = ""; + + /** + * QueryAudienceListRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryAudienceListRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest instance + */ + QueryAudienceListRequest.create = function create(properties) { + return new QueryAudienceListRequest(properties); + }; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + */ + QueryAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListRequest} message QueryAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListRequest"; + }; + + return QueryAudienceListRequest; + })(); + + v1alpha.QueryAudienceListResponse = (function() { + + /** + * Properties of a QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListResponse + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] QueryAudienceListResponse audienceList + * @property {Array.|null} [audienceRows] QueryAudienceListResponse audienceRows + * @property {number|null} [rowCount] QueryAudienceListResponse rowCount + */ + + /** + * Constructs a new QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListResponse. + * @implements IQueryAudienceListResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + */ + function QueryAudienceListResponse(properties) { + this.audienceRows = []; + 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]]; + } + + /** + * QueryAudienceListResponse audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceList = null; + + /** + * QueryAudienceListResponse audienceRows. + * @member {Array.} audienceRows + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceRows = $util.emptyArray; + + /** + * QueryAudienceListResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.rowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_audienceList", { + get: $util.oneOfGetter($oneOfFields = ["audienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse instance + */ + QueryAudienceListResponse.create = function create(properties) { + return new QueryAudienceListResponse(properties); + }; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceRows != null && message.audienceRows.length) + for (var i = 0; i < message.audienceRows.length; ++i) + $root.google.analytics.data.v1alpha.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.audienceRows && message.audienceRows.length)) + message.audienceRows = []; + message.audienceRows.push($root.google.analytics.data.v1alpha.AudienceRow.decode(reader, reader.uint32())); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + properties._audienceList = 1; + { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + } + if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { + if (!Array.isArray(message.audienceRows)) + return "audienceRows: array expected"; + for (var i = 0; i < message.audienceRows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceRow.verify(message.audienceRows[i]); + if (error) + return "audienceRows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + return null; + }; + + /** + * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + */ + QueryAudienceListResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + if (object.audienceRows) { + if (!Array.isArray(object.audienceRows)) + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: array expected"); + message.audienceRows = []; + for (var i = 0; i < object.audienceRows.length; ++i) { + if (typeof object.audienceRows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: object expected"); + message.audienceRows[i] = $root.google.analytics.data.v1alpha.AudienceRow.fromObject(object.audienceRows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} message QueryAudienceListResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceRows = []; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + if (options.oneofs) + object._audienceList = "audienceList"; + } + if (message.audienceRows && message.audienceRows.length) { + object.audienceRows = []; + for (var j = 0; j < message.audienceRows.length; ++j) + object.audienceRows[j] = $root.google.analytics.data.v1alpha.AudienceRow.toObject(message.audienceRows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + return object; + }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListResponse"; + }; + + return QueryAudienceListResponse; + })(); + + v1alpha.SheetExportAudienceListRequest = (function() { + + /** + * Properties of a SheetExportAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ISheetExportAudienceListRequest + * @property {string|null} [name] SheetExportAudienceListRequest name + * @property {number|Long|null} [offset] SheetExportAudienceListRequest offset + * @property {number|Long|null} [limit] SheetExportAudienceListRequest limit + */ + + /** + * Constructs a new SheetExportAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SheetExportAudienceListRequest. + * @implements ISheetExportAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set + */ + function SheetExportAudienceListRequest(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]]; + } + + /** + * SheetExportAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.name = ""; + + /** + * SheetExportAudienceListRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SheetExportAudienceListRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SheetExportAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest instance + */ + SheetExportAudienceListRequest.create = function create(properties) { + return new SheetExportAudienceListRequest(properties); + }; + + /** + * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SheetExportAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SheetExportAudienceListRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + */ + SheetExportAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.SheetExportAudienceListRequest} message SheetExportAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SheetExportAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this SheetExportAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + SheetExportAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SheetExportAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SheetExportAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListRequest"; + }; + + return SheetExportAudienceListRequest; + })(); + + v1alpha.SheetExportAudienceListResponse = (function() { + + /** + * Properties of a SheetExportAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @interface ISheetExportAudienceListResponse + * @property {string|null} [spreadsheetUri] SheetExportAudienceListResponse spreadsheetUri + * @property {string|null} [spreadsheetId] SheetExportAudienceListResponse spreadsheetId + * @property {number|null} [rowCount] SheetExportAudienceListResponse rowCount + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] SheetExportAudienceListResponse audienceList + */ + + /** + * Constructs a new SheetExportAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SheetExportAudienceListResponse. + * @implements ISheetExportAudienceListResponse + * @constructor + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set + */ + function SheetExportAudienceListResponse(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]]; + } + + /** + * SheetExportAudienceListResponse spreadsheetUri. + * @member {string|null|undefined} spreadsheetUri + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.spreadsheetUri = null; + + /** + * SheetExportAudienceListResponse spreadsheetId. + * @member {string|null|undefined} spreadsheetId + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.spreadsheetId = null; + + /** + * SheetExportAudienceListResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.rowCount = null; + + /** + * SheetExportAudienceListResponse audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.audienceList = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetUri", { + get: $util.oneOfGetter($oneOfFields = ["spreadsheetUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetId", { + get: $util.oneOfGetter($oneOfFields = ["spreadsheetId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_audienceList", { + get: $util.oneOfGetter($oneOfFields = ["audienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SheetExportAudienceListResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse instance + */ + SheetExportAudienceListResponse.create = function create(properties) { + return new SheetExportAudienceListResponse(properties); + }; + + /** + * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.spreadsheetUri != null && Object.hasOwnProperty.call(message, "spreadsheetUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.spreadsheetUri); + if (message.spreadsheetId != null && Object.hasOwnProperty.call(message, "spreadsheetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.spreadsheetId); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.spreadsheetUri = reader.string(); + break; + } + case 2: { + message.spreadsheetId = reader.string(); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + case 4: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SheetExportAudienceListResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SheetExportAudienceListResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { + properties._spreadsheetUri = 1; + if (!$util.isString(message.spreadsheetUri)) + return "spreadsheetUri: string expected"; + } + if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { + properties._spreadsheetId = 1; + if (!$util.isString(message.spreadsheetId)) + return "spreadsheetId: string expected"; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + properties._audienceList = 1; + { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + } + return null; + }; + + /** + * Creates a SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + */ + SheetExportAudienceListResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); + if (object.spreadsheetUri != null) + message.spreadsheetUri = String(object.spreadsheetUri); + if (object.spreadsheetId != null) + message.spreadsheetId = String(object.spreadsheetId); + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.SheetExportAudienceListResponse.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + return message; + }; + + /** + * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} message SheetExportAudienceListResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SheetExportAudienceListResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { + object.spreadsheetUri = message.spreadsheetUri; + if (options.oneofs) + object._spreadsheetUri = "spreadsheetUri"; + } + if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { + object.spreadsheetId = message.spreadsheetId; + if (options.oneofs) + object._spreadsheetId = "spreadsheetId"; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + if (options.oneofs) + object._audienceList = "audienceList"; + } + return object; + }; + + /** + * Converts this SheetExportAudienceListResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + * @returns {Object.} JSON object + */ + SheetExportAudienceListResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SheetExportAudienceListResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SheetExportAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListResponse"; + }; + + return SheetExportAudienceListResponse; + })(); + + v1alpha.AudienceRow = (function() { + + /** + * Properties of an AudienceRow. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + */ + + /** + * Constructs a new AudienceRow. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + */ + function AudienceRow(properties) { + this.dimensionValues = []; + 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]]; + } + + /** + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + */ + AudienceRow.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance + */ + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); + }; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceRow message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + */ + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this AudienceRow to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + * @returns {Object.} JSON object + */ + AudienceRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceRow + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; + }; + + return AudienceRow; + })(); + + v1alpha.AudienceDimension = (function() { + + /** + * Properties of an AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName + */ + + /** + * Constructs a new AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + */ + function AudienceDimension(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]]; + } + + /** + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + */ + AudienceDimension.prototype.dimensionName = ""; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance + */ + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); + }; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + */ + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AudienceDimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + * @returns {Object.} JSON object + */ + AudienceDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; + }; + + return AudienceDimension; + })(); + + v1alpha.AudienceDimensionValue = (function() { + + /** + * Properties of an AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value + */ + + /** + * Constructs a new AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + */ + function AudienceDimensionValue(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]]; + } + + /** + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance + */ + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); + }; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + */ + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; + }; + + return AudienceDimensionValue; + })(); + + v1alpha.RunFunnelReportRequest = (function() { + + /** + * Properties of a RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportRequest + * @property {string|null} [property] RunFunnelReportRequest property + * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel + * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown + * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction + * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType + * @property {Array.|null} [segments] RunFunnelReportRequest segments + * @property {number|Long|null} [limit] RunFunnelReportRequest limit + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter + * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota + */ + + /** + * Constructs a new RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportRequest. + * @implements IRunFunnelReportRequest + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + */ + function RunFunnelReportRequest(properties) { + this.dateRanges = []; + this.segments = []; + 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]]; + } + + /** + * RunFunnelReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.property = ""; + + /** + * RunFunnelReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunFunnelReportRequest funnel. + * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnel = null; + + /** + * RunFunnelReportRequest funnelBreakdown. + * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelBreakdown = null; + + /** + * RunFunnelReportRequest funnelNextAction. + * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelNextAction = null; + + /** + * RunFunnelReportRequest funnelVisualizationType. + * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelVisualizationType = 0; + + /** + * RunFunnelReportRequest segments. + * @member {Array.} segments + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.segments = $util.emptyArray; + + /** + * RunFunnelReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunFunnelReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dimensionFilter = null; + + /** + * RunFunnelReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.returnPropertyQuota = false; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance + */ + RunFunnelReportRequest.create = function create(properties) { + return new RunFunnelReportRequest(properties); + }; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) + $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) + $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) + $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 3: { + message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); + break; + } + case 6: { + message.funnelVisualizationType = reader.int32(); + break; + } + case 7: { + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); + break; + } + case 9: { + message.limit = reader.int64(); + break; + } + case 10: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 12: { + message.returnPropertyQuota = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.funnel != null && message.hasOwnProperty("funnel")) { + var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); + if (error) + return "funnel." + error; + } + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { + var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); + if (error) + return "funnelBreakdown." + error; + } + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { + var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); + if (error) + return "funnelNextAction." + error; + } + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + switch (message.funnelVisualizationType) { + default: + return "funnelVisualizationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + return null; + }; + + /** + * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + */ + RunFunnelReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.funnel != null) { + if (typeof object.funnel !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); + message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); + } + if (object.funnelBreakdown != null) { + if (typeof object.funnelBreakdown !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); + } + if (object.funnelNextAction != null) { + if (typeof object.funnelNextAction !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); + } + switch (object.funnelVisualizationType) { + default: + if (typeof object.funnelVisualizationType === "number") { + message.funnelVisualizationType = object.funnelVisualizationType; + break; + } + break; + case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": + case 0: + message.funnelVisualizationType = 0; + break; + case "STANDARD_FUNNEL": + case 1: + message.funnelVisualizationType = 1; + break; + case "TRENDED_FUNNEL": + case 2: + message.funnelVisualizationType = 2; + break; + } + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); + message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); + } + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dateRanges = []; + object.segments = []; + } + if (options.defaults) { + object.property = ""; + object.funnel = null; + object.funnelBreakdown = null; + object.funnelNextAction = null; + object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.dimensionFilter = null; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.funnel != null && message.hasOwnProperty("funnel")) + object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) + object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) + object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + return object; + }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; + }; + + /** + * FunnelVisualizationType enum. + * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType + * @enum {number} + * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value + * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value + * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value + */ + RunFunnelReportRequest.FunnelVisualizationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_FUNNEL"] = 1; + values[valuesById[2] = "TRENDED_FUNNEL"] = 2; + return values; + })(); + + return RunFunnelReportRequest; + })(); + + v1alpha.RunFunnelReportResponse = (function() { + + /** + * Properties of a RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportResponse + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota + * @property {string|null} [kind] RunFunnelReportResponse kind + */ + + /** + * Constructs a new RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportResponse. + * @implements IRunFunnelReportResponse + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + */ + function RunFunnelReportResponse(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]]; + } + + /** + * RunFunnelReportResponse funnelTable. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelTable = null; + + /** + * RunFunnelReportResponse funnelVisualization. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelVisualization = null; + + /** + * RunFunnelReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.propertyQuota = null; + + /** + * RunFunnelReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.kind = ""; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance + */ + RunFunnelReportResponse.create = function create(properties) { + return new RunFunnelReportResponse(properties); + }; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 4: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); + if (error) + return "funnelTable." + error; + } + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); + if (error) + return "funnelVisualization." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + */ + RunFunnelReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + if (object.funnelTable != null) { + if (typeof object.funnelTable !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); + } + if (object.funnelVisualization != null) { + if (typeof object.funnelVisualization !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.funnelTable = null; + object.funnelVisualization = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) + object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) + object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; + }; + + return RunFunnelReportResponse; + })(); + + v1alpha.ReportTask = (function() { + + /** + * Properties of a ReportTask. + * @memberof google.analytics.data.v1alpha + * @interface IReportTask + * @property {string|null} [name] ReportTask name + * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition + * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata + */ + + /** + * Constructs a new ReportTask. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTask. + * @implements IReportTask + * @constructor + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + */ + function ReportTask(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]]; + } + + /** + * ReportTask name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.name = ""; + + /** + * ReportTask reportDefinition. + * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportDefinition = null; + + /** + * ReportTask reportMetadata. + * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportMetadata = null; + + /** + * Creates a new ReportTask instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance + */ + ReportTask.create = function create(properties) { + return new ReportTask(properties); + }; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.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.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) + $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) + $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); + break; + } + case 3: { + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTask message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTask.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.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); + if (error) + return "reportDefinition." + error; + } + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); + if (error) + return "reportMetadata." + error; + } + return null; + }; + + /** + * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + */ + ReportTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask(); + if (object.name != null) + message.name = String(object.name); + if (object.reportDefinition != null) { + if (typeof object.reportDefinition !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); + } + if (object.reportMetadata != null) { + if (typeof object.reportMetadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); + } + return message; + }; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.reportDefinition = null; + object.reportMetadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) + object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) + object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); + return object; + }; + + /** + * Converts this ReportTask to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + * @returns {Object.} JSON object + */ + ReportTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTask + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; + }; + + ReportTask.ReportDefinition = (function() { + + /** + * Properties of a ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportDefinition + * @property {Array.|null} [dimensions] ReportDefinition dimensions + * @property {Array.|null} [metrics] ReportDefinition metrics + * @property {Array.|null} [dateRanges] ReportDefinition dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter + * @property {number|Long|null} [offset] ReportDefinition offset + * @property {number|Long|null} [limit] ReportDefinition limit + * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations + * @property {Array.|null} [orderBys] ReportDefinition orderBys + * @property {string|null} [currencyCode] ReportDefinition currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec + * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows + * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel + */ + + /** + * Constructs a new ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportDefinition. + * @implements IReportDefinition + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + */ + function ReportDefinition(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + 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]]; + } + + /** + * ReportDefinition dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensions = $util.emptyArray; + + /** + * ReportDefinition metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metrics = $util.emptyArray; + + /** + * ReportDefinition dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dateRanges = $util.emptyArray; + + /** + * ReportDefinition dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensionFilter = null; + + /** + * ReportDefinition metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricFilter = null; + + /** + * ReportDefinition offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricAggregations = $util.emptyArray; + + /** + * ReportDefinition orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.orderBys = $util.emptyArray; + + /** + * ReportDefinition currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.currencyCode = ""; + + /** + * ReportDefinition cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.cohortSpec = null; + + /** + * ReportDefinition keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.keepEmptyRows = false; + + /** + * ReportDefinition samplingLevel. + * @member {google.analytics.data.v1alpha.SamplingLevel|null|undefined} samplingLevel + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.samplingLevel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportDefinition.prototype, "_samplingLevel", { + get: $util.oneOfGetter($oneOfFields = ["samplingLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition instance + */ + ReportDefinition.create = function create(properties) { + return new ReportDefinition(properties); + }; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.samplingLevel != null && Object.hasOwnProperty.call(message, "samplingLevel")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.samplingLevel); + return writer; + }; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.samplingLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDefinition message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDefinition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + properties._samplingLevel = 1; + switch (message.samplingLevel) { + default: + return "samplingLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + */ + ReportDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + switch (object.samplingLevel) { + default: + if (typeof object.samplingLevel === "number") { + message.samplingLevel = object.samplingLevel; + break; + } + break; + case "SAMPLING_LEVEL_UNSPECIFIED": + case 0: + message.samplingLevel = 0; + break; + case "LOW": + case 1: + message.samplingLevel = 1; + break; + case "MEDIUM": + case 2: + message.samplingLevel = 2; + break; + case "UNSAMPLED": + case 3: + message.samplingLevel = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportDefinition} message ReportDefinition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDefinition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + } + if (options.defaults) { + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + object.samplingLevel = options.enums === String ? $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] === undefined ? message.samplingLevel : $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] : message.samplingLevel; + if (options.oneofs) + object._samplingLevel = "samplingLevel"; + } + return object; + }; + + /** + * Converts this ReportDefinition to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + * @returns {Object.} JSON object + */ + ReportDefinition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDefinition + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportDefinition"; + }; + + return ReportDefinition; + })(); + + ReportTask.ReportMetadata = (function() { + + /** + * Properties of a ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportMetadata + * @property {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null} [state] ReportMetadata state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] ReportMetadata beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] ReportMetadata creationQuotaTokensCharged + * @property {number|null} [taskRowCount] ReportMetadata taskRowCount + * @property {string|null} [errorMessage] ReportMetadata errorMessage + * @property {number|null} [totalRowCount] ReportMetadata totalRowCount + */ + + /** + * Constructs a new ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportMetadata. + * @implements IReportMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + */ + function ReportMetadata(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]]; + } + + /** + * ReportMetadata state. + * @member {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.state = null; + + /** + * ReportMetadata beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.beginCreatingTime = null; + + /** + * ReportMetadata creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.creationQuotaTokensCharged = 0; + + /** + * ReportMetadata taskRowCount. + * @member {number|null|undefined} taskRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.taskRowCount = null; + + /** + * ReportMetadata errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.errorMessage = null; + + /** + * ReportMetadata totalRowCount. + * @member {number|null|undefined} totalRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.totalRowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_taskRowCount", { + get: $util.oneOfGetter($oneOfFields = ["taskRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_totalRowCount", { + get: $util.oneOfGetter($oneOfFields = ["totalRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata instance + */ + ReportMetadata.create = function create(properties) { + return new ReportMetadata(properties); + }; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.creationQuotaTokensCharged); + if (message.taskRowCount != null && Object.hasOwnProperty.call(message, "taskRowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.taskRowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorMessage); + if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalRowCount); + return writer; + }; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 4: { + message.taskRowCount = reader.int32(); + break; + } + case 5: { + message.errorMessage = reader.string(); + break; + } + case 6: { + message.totalRowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + properties._taskRowCount = 1; + if (!$util.isInteger(message.taskRowCount)) + return "taskRowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + properties._totalRowCount = 1; + if (!$util.isInteger(message.totalRowCount)) + return "totalRowCount: integer expected"; + } + return null; + }; + + /** + * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + */ + ReportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportMetadata.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.taskRowCount != null) + message.taskRowCount = object.taskRowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.totalRowCount != null) + message.totalRowCount = object.totalRowCount | 0; + return message; + }; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportMetadata} message ReportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.creationQuotaTokensCharged = 0; + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + object.taskRowCount = message.taskRowCount; + if (options.oneofs) + object._taskRowCount = "taskRowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + object.totalRowCount = message.totalRowCount; + if (options.oneofs) + object._totalRowCount = "totalRowCount"; + } + return object; + }; + + /** + * Converts this ReportMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportMetadata"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.ReportTask.ReportMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + ReportMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return ReportMetadata; + })(); + + return ReportTask; + })(); + + v1alpha.CreateReportTaskRequest = (function() { + + /** + * Properties of a CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateReportTaskRequest + * @property {string|null} [parent] CreateReportTaskRequest parent + * @property {google.analytics.data.v1alpha.IReportTask|null} [reportTask] CreateReportTaskRequest reportTask + */ + + /** + * Constructs a new CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateReportTaskRequest. + * @implements ICreateReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + */ + function CreateReportTaskRequest(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]]; + } + + /** + * CreateReportTaskRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.parent = ""; + + /** + * CreateReportTaskRequest reportTask. + * @member {google.analytics.data.v1alpha.IReportTask|null|undefined} reportTask + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.reportTask = null; + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest instance + */ + CreateReportTaskRequest.create = function create(properties) { + return new CreateReportTaskRequest(properties); + }; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.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.reportTask != null && Object.hasOwnProperty.call(message, "reportTask")) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReportTaskRequest.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.reportTask != null && message.hasOwnProperty("reportTask")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTask); + if (error) + return "reportTask." + error; + } + return null; + }; + + /** + * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + */ + CreateReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reportTask != null) { + if (typeof object.reportTask !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateReportTaskRequest.reportTask: object expected"); + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTask); + } + return message; + }; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.CreateReportTaskRequest} message CreateReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reportTask = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reportTask != null && message.hasOwnProperty("reportTask")) + object.reportTask = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTask, options); + return object; + }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateReportTaskRequest"; + }; + + return CreateReportTaskRequest; + })(); + + v1alpha.ReportTaskMetadata = (function() { + + /** + * Properties of a ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IReportTaskMetadata + */ + + /** + * Constructs a new ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTaskMetadata. + * @implements IReportTaskMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + */ + function ReportTaskMetadata(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 ReportTaskMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata instance + */ + ReportTaskMetadata.create = function create(properties) { + return new ReportTaskMetadata(properties); + }; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTaskMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTaskMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + */ + ReportTaskMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTaskMetadata) + return object; + return new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + }; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTaskMetadata} message ReportTaskMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTaskMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportTaskMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTaskMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTaskMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTaskMetadata"; + }; + + return ReportTaskMetadata; + })(); + + v1alpha.QueryReportTaskRequest = (function() { + + /** + * Properties of a QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskRequest + * @property {string|null} [name] QueryReportTaskRequest name + * @property {number|Long|null} [offset] QueryReportTaskRequest offset + * @property {number|Long|null} [limit] QueryReportTaskRequest limit + */ + + /** + * Constructs a new QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskRequest. + * @implements IQueryReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + */ + function QueryReportTaskRequest(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]]; + } + + /** + * QueryReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.name = ""; + + /** + * QueryReportTaskRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryReportTaskRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest instance + */ + QueryReportTaskRequest.create = function create(properties) { + return new QueryReportTaskRequest(properties); + }; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + */ + QueryReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskRequest} message QueryReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskRequest"; + }; + + return QueryReportTaskRequest; + })(); + + v1alpha.QueryReportTaskResponse = (function() { + + /** + * Properties of a QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskResponse + * @property {Array.|null} [dimensionHeaders] QueryReportTaskResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] QueryReportTaskResponse metricHeaders + * @property {Array.|null} [rows] QueryReportTaskResponse rows + * @property {Array.|null} [totals] QueryReportTaskResponse totals + * @property {Array.|null} [maximums] QueryReportTaskResponse maximums + * @property {Array.|null} [minimums] QueryReportTaskResponse minimums + * @property {number|null} [rowCount] QueryReportTaskResponse rowCount + * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] QueryReportTaskResponse metadata + */ + + /** + * Constructs a new QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskResponse. + * @implements IQueryReportTaskResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + */ + function QueryReportTaskResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + 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]]; + } + + /** + * QueryReportTaskResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rows = $util.emptyArray; + + /** + * QueryReportTaskResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.totals = $util.emptyArray; + + /** + * QueryReportTaskResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.maximums = $util.emptyArray; + + /** + * QueryReportTaskResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.minimums = $util.emptyArray; + + /** + * QueryReportTaskResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rowCount = 0; + + /** + * QueryReportTaskResponse metadata. + * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metadata = null; + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse instance + */ + QueryReportTaskResponse.create = function create(properties) { + return new QueryReportTaskResponse(properties); + }; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + */ + QueryReportTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} message QueryReportTaskResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskResponse"; + }; + + return QueryReportTaskResponse; + })(); + + v1alpha.GetReportTaskRequest = (function() { + + /** + * Properties of a GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetReportTaskRequest + * @property {string|null} [name] GetReportTaskRequest name + */ + + /** + * Constructs a new GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetReportTaskRequest. + * @implements IGetReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + */ + function GetReportTaskRequest(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]]; + } + + /** + * GetReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + */ + GetReportTaskRequest.prototype.name = ""; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest instance + */ + GetReportTaskRequest.create = function create(properties) { + return new GetReportTaskRequest(properties); + }; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.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 GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportTaskRequest.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 GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + */ + GetReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.GetReportTaskRequest} message GetReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportTaskRequest.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 GetReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetReportTaskRequest"; + }; + + return GetReportTaskRequest; + })(); + + v1alpha.ListReportTasksRequest = (function() { + + /** + * Properties of a ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksRequest + * @property {string|null} [parent] ListReportTasksRequest parent + * @property {number|null} [pageSize] ListReportTasksRequest pageSize + * @property {string|null} [pageToken] ListReportTasksRequest pageToken + */ + + /** + * Constructs a new ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksRequest. + * @implements IListReportTasksRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + */ + function ListReportTasksRequest(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]]; + } + + /** + * ListReportTasksRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.parent = ""; + + /** + * ListReportTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageSize = 0; + + /** + * ListReportTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest instance + */ + ListReportTasksRequest.create = function create(properties) { + return new ListReportTasksRequest(properties); + }; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.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); + return writer; + }; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksRequest.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"; + return null; + }; + + /** + * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + */ + ListReportTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + 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 ListReportTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksRequest} message ListReportTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksRequest.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; + return object; + }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksRequest"; + }; + + return ListReportTasksRequest; + })(); + + v1alpha.ListReportTasksResponse = (function() { + + /** + * Properties of a ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksResponse + * @property {Array.|null} [reportTasks] ListReportTasksResponse reportTasks + * @property {string|null} [nextPageToken] ListReportTasksResponse nextPageToken + */ + + /** + * Constructs a new ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksResponse. + * @implements IListReportTasksResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + */ + function ListReportTasksResponse(properties) { + this.reportTasks = []; + 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]]; + } + + /** + * ListReportTasksResponse reportTasks. + * @member {Array.} reportTasks + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.reportTasks = $util.emptyArray; + + /** + * ListReportTasksResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListReportTasksResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse instance + */ + ListReportTasksResponse.create = function create(properties) { + return new ListReportTasksResponse(properties); + }; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportTasks != null && message.reportTasks.length) + for (var i = 0; i < message.reportTasks.length; ++i) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTasks[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 ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reportTasks && message.reportTasks.length)) + message.reportTasks = []; + message.reportTasks.push($root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reportTasks != null && message.hasOwnProperty("reportTasks")) { + if (!Array.isArray(message.reportTasks)) + return "reportTasks: array expected"; + for (var i = 0; i < message.reportTasks.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTasks[i]); + if (error) + return "reportTasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + */ + ListReportTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + if (object.reportTasks) { + if (!Array.isArray(object.reportTasks)) + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: array expected"); + message.reportTasks = []; + for (var i = 0; i < object.reportTasks.length; ++i) { + if (typeof object.reportTasks[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: object expected"); + message.reportTasks[i] = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} message ListReportTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reportTasks = []; + if (message.reportTasks && message.reportTasks.length) { + object.reportTasks = []; + for (var j = 0; j < message.reportTasks.length; ++j) + object.reportTasks[j] = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksResponse"; + }; + + return ListReportTasksResponse; + })(); + + v1alpha.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.analytics.data.v1alpha + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name + */ + + /** + * Constructs a new DateRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + */ + function DateRange(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]]; + } + + /** + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.startDate = ""; + + /** + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.endDate = ""; + + /** + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.name = ""; + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DateRange) + return object; + var message = new $root.google.analytics.data.v1alpha.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; + }; + + return DateRange; + })(); + + v1alpha.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.analytics.data.v1alpha + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + */ + + /** + * Constructs a new Dimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + */ + function Dimension(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]]; + } + + /** + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.name = ""; + + /** + * Dimension dimensionExpression. + * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.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.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.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.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Dimension) + return object; + var message = new $root.google.analytics.data.v1alpha.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; + }; + + return Dimension; + })(); + + v1alpha.DimensionExpression = (function() { + + /** + * Properties of a DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionExpression + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + */ + + /** + * Constructs a new DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + */ + function DimensionExpression(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]]; + } + + /** + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.lowerCase = null; + + /** + * DimensionExpression upperCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.upperCase = null; + + /** + * DimensionExpression concatenate. + * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.concatenate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance + */ + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); + }; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (error) + return "lowerCase." + error; + } + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); + if (error) + return "upperCase." + error; + } + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (error) + return "concatenate." + error; + } + } + return null; + }; + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + */ + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); + } + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); + } + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + } + return message; + }; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); + if (options.oneofs) + object.oneExpression = "lowerCase"; + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); + if (options.oneofs) + object.oneExpression = "upperCase"; + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (options.oneofs) + object.oneExpression = "concatenate"; + } + return object; + }; + + /** + * Converts this DimensionExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + * @returns {Object.} JSON object + */ + DimensionExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; + }; + + DimensionExpression.CaseExpression = (function() { + + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ + + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(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]]; + } + + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; + }; + + return CaseExpression; + })(); + + DimensionExpression.ConcatenateExpression = (function() { + + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ + + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + 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]]; + } + + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; + }; + + return ConcatenateExpression; + })(); + + return DimensionExpression; + })(); + + v1alpha.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.analytics.data.v1alpha + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible + */ + + /** + * Constructs a new Metric. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + */ + function Metric(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]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.expression = ""; + + /** + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.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.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.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.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metric) + return object; + var message = new $root.google.analytics.data.v1alpha.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expression = ""; + object.invisible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; + }; + + return Metric; + })(); + + v1alpha.FilterExpression = (function() { + + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpression + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter + */ + + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(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]]; + } + + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; + + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; + + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; + + /** + * FilterExpression filter. + * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; + }; + + return FilterExpression; + })(); + + v1alpha.FilterExpressionList = (function() { + + /** + * Properties of a FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions + */ + + /** + * Constructs a new FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + */ + function FilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + */ + FilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance + */ + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); + }; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + */ + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; + }; + + return FilterExpressionList; + })(); + + v1alpha.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.analytics.data.v1alpha + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + */ + + /** + * Constructs a new Filter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + */ + function Filter(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]]; + } + + /** + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Filter) + return object; + var message = new $root.google.analytics.data.v1alpha.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; + }; + + return Filter; + })(); + + v1alpha.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.data.v1alpha + * @interface IStringFilter + * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + */ + function StringFilter(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]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.data.v1alpha.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + v1alpha.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.data.v1alpha + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; + }; + + return InListFilter; + })(); + + v1alpha.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.data.v1alpha + * @interface INumericFilter + * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(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]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1alpha.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + v1alpha.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1alpha + * @interface IOrderBy + * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + */ + function OrderBy(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]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(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]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(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]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return OrderBy; + })(); + + v1alpha.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @interface IBetweenFilter + * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(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]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + v1alpha.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(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 EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) + return object; + return new $root.google.analytics.data.v1alpha.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + v1alpha.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1alpha + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + */ + function NumericValue(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]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; + }; + + return NumericValue; + })(); + + v1alpha.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1alpha + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + 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]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1alpha.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1alpha + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + */ + function Cohort(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]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.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.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.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.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Cohort) + return object; + var message = new $root.google.analytics.data.v1alpha.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; + }; + + return Cohort; + })(); + + v1alpha.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1alpha + * @interface ICohortsRange + * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(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]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1alpha.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1alpha.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(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]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + v1alpha.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + 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]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) + object.dataLossFromOtherRow = false; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + 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]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + 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]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; + + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; + })(); + + v1alpha.DimensionHeader = (function() { + + /** + * Properties of a DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name + */ + + /** + * Constructs a new DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + */ + function DimensionHeader(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]]; + } + + /** + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + */ + DimensionHeader.prototype.name = ""; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance + */ + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); + }; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.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 DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionHeader.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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + */ + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionHeader.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 DimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + * @returns {Object.} JSON object + */ + DimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; + }; + + return DimensionHeader; + })(); + + v1alpha.MetricHeader = (function() { + + /** + * Properties of a MetricHeader. + * @memberof google.analytics.data.v1alpha + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type + */ + + /** + * Constructs a new MetricHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader + * @constructor + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + */ + function MetricHeader(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]]; + } + + /** + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.name = ""; + + /** + * MetricHeader type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance + */ + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); + }; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricHeader.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + */ + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + return object; + }; + + /** + * Converts this MetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + * @returns {Object.} JSON object + */ + MetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; + }; + + return MetricHeader; + })(); + + v1alpha.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.analytics.data.v1alpha + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues + */ + + /** + * Constructs a new Row. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; + 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]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Row) + return object; + var message = new $root.google.analytics.data.v1alpha.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; + }; + + return Row; + })(); + + v1alpha.DimensionValue = (function() { + + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ + + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(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]]; + } + + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; + }; + + return DimensionValue; + })(); + + v1alpha.MetricValue = (function() { + + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1alpha + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ + + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + */ + function MetricValue(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]]; + } + + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + MetricValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; + }; + + return MetricValue; + })(); + + v1alpha.PropertyQuota = (function() { + + /** + * Properties of a PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuota + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + */ + function PropertyQuota(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]]; + } + + /** + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerDay = null; + + /** + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance + */ + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); + }; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuota message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + */ + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this PropertyQuota to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + * @returns {Object.} JSON object + */ + PropertyQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuota + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; + }; + + return PropertyQuota; + })(); + + v1alpha.QuotaStatus = (function() { + + /** + * Properties of a QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining + */ + + /** + * Constructs a new QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus + * @constructor + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + */ + function QuotaStatus(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]]; + } + + /** + * QuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.consumed = 0; + + /** + * QuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.remaining = 0; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance + */ + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); + }; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaStatus message. + * @function verify + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + return null; + }; + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + */ + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) + return object; + var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consumed = 0; + object.remaining = 0; + } + if (message.consumed != null && message.hasOwnProperty("consumed")) + object.consumed = message.consumed; + if (message.remaining != null && message.hasOwnProperty("remaining")) + object.remaining = message.remaining; + return object; + }; + + /** + * Converts this QuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + * @returns {Object.} JSON object + */ + QuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaStatus + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; + }; + + return QuotaStatus; + })(); + + v1alpha.FunnelBreakdown = (function() { + + /** + * Properties of a FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelBreakdown + * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension + * @property {number|Long|null} [limit] FunnelBreakdown limit + */ + + /** + * Constructs a new FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelBreakdown. + * @implements IFunnelBreakdown + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + */ + function FunnelBreakdown(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]]; + } + + /** + * FunnelBreakdown breakdownDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.breakdownDimension = null; + + /** + * FunnelBreakdown limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelBreakdown.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance + */ + FunnelBreakdown.create = function create(properties) { + return new FunnelBreakdown(properties); + }; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelBreakdown message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelBreakdown.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); + if (error) + return "breakdownDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + */ + FunnelBreakdown.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + if (object.breakdownDimension != null) { + if (typeof object.breakdownDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelBreakdown.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.breakdownDimension = null; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) + object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelBreakdown to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + * @returns {Object.} JSON object + */ + FunnelBreakdown.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelBreakdown + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; + }; + + return FunnelBreakdown; + })(); + + v1alpha.FunnelNextAction = (function() { + + /** + * Properties of a FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelNextAction + * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension + * @property {number|Long|null} [limit] FunnelNextAction limit + */ + + /** + * Constructs a new FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelNextAction. + * @implements IFunnelNextAction + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + */ + function FunnelNextAction(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]]; + } + + /** + * FunnelNextAction nextActionDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.nextActionDimension = null; + + /** + * FunnelNextAction limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelNextAction.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance + */ + FunnelNextAction.create = function create(properties) { + return new FunnelNextAction(properties); + }; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelNextAction message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelNextAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); + if (error) + return "nextActionDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + */ + FunnelNextAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + if (object.nextActionDimension != null) { + if (typeof object.nextActionDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelNextAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nextActionDimension = null; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) + object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelNextAction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + * @returns {Object.} JSON object + */ + FunnelNextAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelNextAction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; + }; + + return FunnelNextAction; + })(); + + v1alpha.Funnel = (function() { + + /** + * Properties of a Funnel. + * @memberof google.analytics.data.v1alpha + * @interface IFunnel + * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel + * @property {Array.|null} [steps] Funnel steps + */ + + /** + * Constructs a new Funnel. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Funnel. + * @implements IFunnel + * @constructor + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + */ + function Funnel(properties) { + this.steps = []; + 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]]; + } + + /** + * Funnel isOpenFunnel. + * @member {boolean} isOpenFunnel + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.isOpenFunnel = false; + + /** + * Funnel steps. + * @member {Array.} steps + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.steps = $util.emptyArray; + + /** + * Creates a new Funnel instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance + */ + Funnel.create = function create(properties) { + return new Funnel(properties); + }; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isOpenFunnel = reader.bool(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Funnel message. + * @function verify + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Funnel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + if (typeof message.isOpenFunnel !== "boolean") + return "isOpenFunnel: boolean expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; + + /** + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + */ + Funnel.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Funnel) + return object; + var message = new $root.google.analytics.data.v1alpha.Funnel(); + if (object.isOpenFunnel != null) + message.isOpenFunnel = Boolean(object.isOpenFunnel); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); + message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.Funnel} message Funnel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Funnel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.isOpenFunnel = false; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + object.isOpenFunnel = message.isOpenFunnel; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); + } + return object; + }; + + /** + * Converts this Funnel to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + * @returns {Object.} JSON object + */ + Funnel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Funnel + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; + }; + + return Funnel; + })(); + + v1alpha.FunnelStep = (function() { + + /** + * Properties of a FunnelStep. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelStep + * @property {string|null} [name] FunnelStep name + * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy + * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression + */ + + /** + * Constructs a new FunnelStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelStep. + * @implements IFunnelStep + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + */ + function FunnelStep(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]]; + } + + /** + * FunnelStep name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.name = ""; + + /** + * FunnelStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.isDirectlyFollowedBy = false; + + /** + * FunnelStep withinDurationFromPriorStep. + * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.withinDurationFromPriorStep = null; + + /** + * FunnelStep filterExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.filterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { + get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance + */ + FunnelStep.create = function create(properties) { + return new FunnelStep(properties); + }; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.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.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); + if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) + $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 3: { + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelStep.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.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + properties._withinDurationFromPriorStep = 1; + { + var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); + if (error) + return "withinDurationFromPriorStep." + error; + } + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + */ + FunnelStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelStep(); + if (object.name != null) + message.name = String(object.name); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + if (object.withinDurationFromPriorStep != null) { + if (typeof object.withinDurationFromPriorStep !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.isDirectlyFollowedBy = false; + object.filterExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); + if (options.oneofs) + object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this FunnelStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + * @returns {Object.} JSON object + */ + FunnelStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; + }; + + return FunnelStep; + })(); + + v1alpha.FunnelSubReport = (function() { + + /** + * Properties of a FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelSubReport + * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders + * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders + * @property {Array.|null} [rows] FunnelSubReport rows + * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata + */ + + /** + * Constructs a new FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelSubReport. + * @implements IFunnelSubReport + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + */ + function FunnelSubReport(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + 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]]; + } + + /** + * FunnelSubReport dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; + + /** + * FunnelSubReport metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metricHeaders = $util.emptyArray; + + /** + * FunnelSubReport rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.rows = $util.emptyArray; + + /** + * FunnelSubReport metadata. + * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metadata = null; + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance + */ + FunnelSubReport.create = function create(properties) { + return new FunnelSubReport(properties); + }; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelSubReport message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelSubReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + */ + FunnelSubReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelSubReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + } + if (options.defaults) + object.metadata = null; + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this FunnelSubReport to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + * @returns {Object.} JSON object + */ + FunnelSubReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelSubReport + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; + }; + + return FunnelSubReport; + })(); + + v1alpha.UserSegment = (function() { + + /** + * Properties of a UserSegment. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegment + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria + * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion + */ + + /** + * Constructs a new UserSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegment. + * @implements IUserSegment + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + */ + function UserSegment(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]]; + } + + /** + * UserSegment userInclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.userInclusionCriteria = null; + + /** + * UserSegment exclusion. + * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.exclusion = null; + + /** + * Creates a new UserSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance + */ + UserSegment.create = function create(properties) { + return new UserSegment(properties); + }; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); + if (error) + return "userInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + */ + UserSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegment(); + if (object.userInclusionCriteria != null) { + if (typeof object.userInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userInclusionCriteria = null; + object.exclusion = null; + } + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) + object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this UserSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + * @returns {Object.} JSON object + */ + UserSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; + }; + + return UserSegment; + })(); + + v1alpha.UserSegmentCriteria = (function() { + + /** + * Properties of a UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentCriteria + * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups + * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups + */ + + /** + * Constructs a new UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentCriteria. + * @implements IUserSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + */ + function UserSegmentCriteria(properties) { + this.andConditionGroups = []; + this.andSequenceGroups = []; + 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]]; + } + + /** + * UserSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * UserSegmentCriteria andSequenceGroups. + * @member {Array.} andSequenceGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance + */ + UserSegmentCriteria.create = function create(properties) { + return new UserSegmentCriteria(properties); + }; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.andSequenceGroups != null && message.andSequenceGroups.length) + for (var i = 0; i < message.andSequenceGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.andSequenceGroups && message.andSequenceGroups.length)) + message.andSequenceGroups = []; + message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { + if (!Array.isArray(message.andSequenceGroups)) + return "andSequenceGroups: array expected"; + for (var i = 0; i < message.andSequenceGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); + if (error) + return "andSequenceGroups." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + */ + UserSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + if (object.andSequenceGroups) { + if (!Array.isArray(object.andSequenceGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); + message.andSequenceGroups = []; + for (var i = 0; i < object.andSequenceGroups.length; ++i) { + if (typeof object.andSequenceGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); + message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.andConditionGroups = []; + object.andSequenceGroups = []; + } + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + if (message.andSequenceGroups && message.andSequenceGroups.length) { + object.andSequenceGroups = []; + for (var j = 0; j < message.andSequenceGroups.length; ++j) + object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + UserSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; + }; + + return UserSegmentCriteria; + })(); + + /** + * UserCriteriaScoping enum. + * @name google.analytics.data.v1alpha.UserCriteriaScoping + * @enum {number} + * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value + * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value + */ + v1alpha.UserCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.UserSegmentConditionGroup = (function() { + + /** + * Properties of a UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentConditionGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentConditionGroup. + * @implements IUserSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + */ + function UserSegmentConditionGroup(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]]; + } + + /** + * UserSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * UserSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance + */ + UserSegmentConditionGroup.create = function create(properties) { + return new UserSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + */ + UserSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.conditionScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; + }; + + return UserSegmentConditionGroup; + })(); + + v1alpha.UserSegmentSequenceGroup = (function() { + + /** + * Properties of a UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentSequenceGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration + * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps + */ + + /** + * Constructs a new UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentSequenceGroup. + * @implements IUserSegmentSequenceGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + */ + function UserSegmentSequenceGroup(properties) { + this.userSequenceSteps = []; + 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]]; + } + + /** + * UserSegmentSequenceGroup sequenceScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceScoping = 0; + + /** + * UserSegmentSequenceGroup sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; + + /** + * UserSegmentSequenceGroup userSequenceSteps. + * @member {Array.} userSequenceSteps + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance + */ + UserSegmentSequenceGroup.create = function create(properties) { + return new UserSegmentSequenceGroup(properties); + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userSequenceSteps != null && message.userSequenceSteps.length) + for (var i = 0; i < message.userSequenceSteps.length; ++i) + $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sequenceScoping = reader.int32(); + break; + } + case 2: { + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.userSequenceSteps && message.userSequenceSteps.length)) + message.userSequenceSteps = []; + message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentSequenceGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentSequenceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + switch (message.sequenceScoping) { + default: + return "sequenceScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (error) + return "sequenceMaximumDuration." + error; + } + if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { + if (!Array.isArray(message.userSequenceSteps)) + return "userSequenceSteps: array expected"; + for (var i = 0; i < message.userSequenceSteps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); + if (error) + return "userSequenceSteps." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + */ + UserSegmentSequenceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + switch (object.sequenceScoping) { + default: + if (typeof object.sequenceScoping === "number") { + message.sequenceScoping = object.sequenceScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.sequenceScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.sequenceScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.sequenceScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.sequenceScoping = 3; + break; + } + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.userSequenceSteps) { + if (!Array.isArray(object.userSequenceSteps)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); + message.userSequenceSteps = []; + for (var i = 0; i < object.userSequenceSteps.length; ++i) { + if (typeof object.userSequenceSteps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); + message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentSequenceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userSequenceSteps = []; + if (options.defaults) { + object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.userSequenceSteps && message.userSequenceSteps.length) { + object.userSequenceSteps = []; + for (var j = 0; j < message.userSequenceSteps.length; ++j) + object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; + }; + + return UserSegmentSequenceGroup; + })(); + + v1alpha.UserSequenceStep = (function() { + + /** + * Properties of a UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @interface IUserSequenceStep + * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression + */ + + /** + * Constructs a new UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSequenceStep. + * @implements IUserSequenceStep + * @constructor + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + */ + function UserSequenceStep(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]]; + } + + /** + * UserSequenceStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.isDirectlyFollowedBy = false; + + /** + * UserSequenceStep stepScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.stepScoping = 0; + + /** + * UserSequenceStep segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance + */ + UserSequenceStep.create = function create(properties) { + return new UserSequenceStep(properties); + }; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); + if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 2: { + message.stepScoping = reader.int32(); + break; + } + case 3: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSequenceStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSequenceStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + switch (message.stepScoping) { + default: + return "stepScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + */ + UserSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + switch (object.stepScoping) { + default: + if (typeof object.stepScoping === "number") { + message.stepScoping = object.stepScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.stepScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.stepScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.stepScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.stepScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSequenceStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isDirectlyFollowedBy = false; + object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSequenceStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + * @returns {Object.} JSON object + */ + UserSequenceStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSequenceStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; + }; + + return UserSequenceStep; + })(); + + v1alpha.UserSegmentExclusion = (function() { + + /** + * Properties of a UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentExclusion + * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria + */ + + /** + * Constructs a new UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentExclusion. + * @implements IUserSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + */ + function UserSegmentExclusion(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]]; + } + + /** + * UserSegmentExclusion userExclusionDuration. + * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionDuration = 0; + + /** + * UserSegmentExclusion userExclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionCriteria = null; + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance + */ + UserSegmentExclusion.create = function create(properties) { + return new UserSegmentExclusion(properties); + }; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); + if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userExclusionDuration = reader.int32(); + break; + } + case 2: { + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + switch (message.userExclusionDuration) { + default: + return "userExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); + if (error) + return "userExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + */ + UserSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + switch (object.userExclusionDuration) { + default: + if (typeof object.userExclusionDuration === "number") { + message.userExclusionDuration = object.userExclusionDuration; + break; + } + break; + case "USER_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.userExclusionDuration = 0; + break; + case "USER_EXCLUSION_TEMPORARY": + case 1: + message.userExclusionDuration = 1; + break; + case "USER_EXCLUSION_PERMANENT": + case 2: + message.userExclusionDuration = 2; + break; + } + if (object.userExclusionCriteria != null) { + if (typeof object.userExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.userExclusionCriteria = null; + } + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) + object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); + return object; + }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + UserSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; + }; + + return UserSegmentExclusion; + })(); + + /** + * UserExclusionDuration enum. + * @name google.analytics.data.v1alpha.UserExclusionDuration + * @enum {number} + * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value + * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value + */ + v1alpha.UserExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.SessionSegment = (function() { + + /** + * Properties of a SessionSegment. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegment + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria + * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion + */ + + /** + * Constructs a new SessionSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegment. + * @implements ISessionSegment + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + */ + function SessionSegment(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]]; + } + + /** + * SessionSegment sessionInclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.sessionInclusionCriteria = null; + + /** + * SessionSegment exclusion. + * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.exclusion = null; + + /** + * Creates a new SessionSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance + */ + SessionSegment.create = function create(properties) { + return new SessionSegment(properties); + }; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); + if (error) + return "sessionInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + */ + SessionSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegment(); + if (object.sessionInclusionCriteria != null) { + if (typeof object.sessionInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionInclusionCriteria = null; + object.exclusion = null; + } + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) + object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this SessionSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + * @returns {Object.} JSON object + */ + SessionSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; + }; + + return SessionSegment; + })(); + + v1alpha.SessionSegmentCriteria = (function() { + + /** + * Properties of a SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentCriteria + * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentCriteria. + * @implements ISessionSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + */ + function SessionSegmentCriteria(properties) { + this.andConditionGroups = []; + 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]]; + } + + /** + * SessionSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + */ + SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance + */ + SessionSegmentCriteria.create = function create(properties) { + return new SessionSegmentCriteria(properties); + }; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + */ + SessionSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; + }; + + return SessionSegmentCriteria; + })(); + + /** + * SessionCriteriaScoping enum. + * @name google.analytics.data.v1alpha.SessionCriteriaScoping + * @enum {number} + * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value + */ + v1alpha.SessionCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; + return values; + })(); + + v1alpha.SessionSegmentConditionGroup = (function() { + + /** + * Properties of a SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentConditionGroup + * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentConditionGroup. + * @implements ISessionSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + */ + function SessionSegmentConditionGroup(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]]; + } + + /** + * SessionSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * SessionSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance + */ + SessionSegmentConditionGroup.create = function create(properties) { + return new SessionSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + */ + SessionSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "SESSION_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "SESSION_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; + }; + + return SessionSegmentConditionGroup; + })(); + + v1alpha.SessionSegmentExclusion = (function() { + + /** + * Properties of a SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentExclusion + * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria + */ + + /** + * Constructs a new SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentExclusion. + * @implements ISessionSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + */ + function SessionSegmentExclusion(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]]; + } + + /** + * SessionSegmentExclusion sessionExclusionDuration. + * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; + + /** + * SessionSegmentExclusion sessionExclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance + */ + SessionSegmentExclusion.create = function create(properties) { + return new SessionSegmentExclusion(properties); + }; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); + if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionExclusionDuration = reader.int32(); + break; + } + case 2: { + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + switch (message.sessionExclusionDuration) { + default: + return "sessionExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); + if (error) + return "sessionExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + */ + SessionSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + switch (object.sessionExclusionDuration) { + default: + if (typeof object.sessionExclusionDuration === "number") { + message.sessionExclusionDuration = object.sessionExclusionDuration; + break; + } + break; + case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.sessionExclusionDuration = 0; + break; + case "SESSION_EXCLUSION_TEMPORARY": + case 1: + message.sessionExclusionDuration = 1; + break; + case "SESSION_EXCLUSION_PERMANENT": + case 2: + message.sessionExclusionDuration = 2; + break; + } + if (object.sessionExclusionCriteria != null) { + if (typeof object.sessionExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.sessionExclusionCriteria = null; + } + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) + object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); + return object; + }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; + }; + + return SessionSegmentExclusion; + })(); + + /** + * SessionExclusionDuration enum. + * @name google.analytics.data.v1alpha.SessionExclusionDuration + * @enum {number} + * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value + * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value + */ + v1alpha.SessionExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.EventSegment = (function() { + + /** + * Properties of an EventSegment. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegment + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria + * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion + */ + + /** + * Constructs a new EventSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegment. + * @implements IEventSegment + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + */ + function EventSegment(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]]; + } + + /** + * EventSegment eventInclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.eventInclusionCriteria = null; + + /** + * EventSegment exclusion. + * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.exclusion = null; + + /** + * Creates a new EventSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance + */ + EventSegment.create = function create(properties) { + return new EventSegment(properties); + }; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); + if (error) + return "eventInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + */ + EventSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegment(); + if (object.eventInclusionCriteria != null) { + if (typeof object.eventInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventInclusionCriteria = null; + object.exclusion = null; + } + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) + object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this EventSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + * @returns {Object.} JSON object + */ + EventSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; + }; + + return EventSegment; + })(); + + v1alpha.EventSegmentCriteria = (function() { + + /** + * Properties of an EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentCriteria + * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentCriteria. + * @implements IEventSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + */ + function EventSegmentCriteria(properties) { + this.andConditionGroups = []; + 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]]; + } + + /** + * EventSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + */ + EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance + */ + EventSegmentCriteria.create = function create(properties) { + return new EventSegmentCriteria(properties); + }; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + */ + EventSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + EventSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; + }; + + return EventSegmentCriteria; + })(); + + /** + * EventCriteriaScoping enum. + * @name google.analytics.data.v1alpha.EventCriteriaScoping + * @enum {number} + * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value + */ + v1alpha.EventCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; + return values; + })(); + + v1alpha.EventSegmentConditionGroup = (function() { + + /** + * Properties of an EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentConditionGroup + * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentConditionGroup. + * @implements IEventSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + */ + function EventSegmentConditionGroup(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]]; + } + + /** + * EventSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * EventSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance + */ + EventSegmentConditionGroup.create = function create(properties) { + return new EventSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + */ + EventSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "EVENT_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + EventSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; + }; + + return EventSegmentConditionGroup; + })(); + + v1alpha.EventSegmentExclusion = (function() { + + /** + * Properties of an EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentExclusion + * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria + */ + + /** + * Constructs a new EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentExclusion. + * @implements IEventSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + */ + function EventSegmentExclusion(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]]; + } + + /** + * EventSegmentExclusion eventExclusionDuration. + * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionDuration = 0; + + /** + * EventSegmentExclusion eventExclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionCriteria = null; + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance + */ + EventSegmentExclusion.create = function create(properties) { + return new EventSegmentExclusion(properties); + }; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); + if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventExclusionDuration = reader.int32(); + break; + } + case 2: { + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + switch (message.eventExclusionDuration) { + default: + return "eventExclusionDuration: enum value expected"; + case 0: + case 1: + break; + } + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); + if (error) + return "eventExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + */ + EventSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + switch (object.eventExclusionDuration) { + default: + if (typeof object.eventExclusionDuration === "number") { + message.eventExclusionDuration = object.eventExclusionDuration; + break; + } + break; + case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.eventExclusionDuration = 0; + break; + case "EVENT_EXCLUSION_PERMANENT": + case 1: + message.eventExclusionDuration = 1; + break; + } + if (object.eventExclusionCriteria != null) { + if (typeof object.eventExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.eventExclusionCriteria = null; + } + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) + object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); + return object; + }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + EventSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; + }; + + return EventSegmentExclusion; + })(); + + /** + * EventExclusionDuration enum. + * @name google.analytics.data.v1alpha.EventExclusionDuration + * @enum {number} + * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value + */ + v1alpha.EventExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; + return values; + })(); + + v1alpha.Segment = (function() { + + /** + * Properties of a Segment. + * @memberof google.analytics.data.v1alpha + * @interface ISegment + * @property {string|null} [name] Segment name + * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment + * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment + * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment + */ + + /** + * Constructs a new Segment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Segment. + * @implements ISegment + * @constructor + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + */ + function Segment(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]]; + } + + /** + * Segment name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.name = ""; + + /** + * Segment userSegment. + * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.userSegment = null; + + /** + * Segment sessionSegment. + * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.sessionSegment = null; + + /** + * Segment eventSegment. + * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.eventSegment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Segment oneSegmentScope. + * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "oneSegmentScope", { + get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Segment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Segment} Segment instance + */ + Segment.create = function create(properties) { + return new Segment(properties); + }; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.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.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) + $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) + $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) + $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Segment message. + * @function verify + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Segment.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.userSegment != null && message.hasOwnProperty("userSegment")) { + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); + if (error) + return "userSegment." + error; + } + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); + if (error) + return "sessionSegment." + error; + } + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); + if (error) + return "eventSegment." + error; + } + } + return null; + }; + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Segment} Segment + */ + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Segment) + return object; + var message = new $root.google.analytics.data.v1alpha.Segment(); + if (object.name != null) + message.name = String(object.name); + if (object.userSegment != null) { + if (typeof object.userSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); + } + if (object.sessionSegment != null) { + if (typeof object.sessionSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); + } + if (object.eventSegment != null) { + if (typeof object.eventSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); + } + return message; + }; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.Segment} message Segment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Segment.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 (message.userSegment != null && message.hasOwnProperty("userSegment")) { + object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); + if (options.oneofs) + object.oneSegmentScope = "userSegment"; + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); + if (options.oneofs) + object.oneSegmentScope = "sessionSegment"; + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); + if (options.oneofs) + object.oneSegmentScope = "eventSegment"; + } + return object; + }; + + /** + * Converts this Segment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Segment + * @instance + * @returns {Object.} JSON object + */ + Segment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Segment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; + }; + + return Segment; + })(); + + v1alpha.SegmentFilterExpression = (function() { + + /** + * Properties of a SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter + * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter + */ + + /** + * Constructs a new SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpression. + * @implements ISegmentFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + */ + function SegmentFilterExpression(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]]; + } + + /** + * SegmentFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.andGroup = null; + + /** + * SegmentFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.orGroup = null; + + /** + * SegmentFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.notExpression = null; + + /** + * SegmentFilterExpression segmentFilter. + * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentFilter = null; + + /** + * SegmentFilterExpression segmentEventFilter. + * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + Object.defineProperty(SegmentFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance + */ + SegmentFilterExpression.create = function create(properties) { + return new SegmentFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) + $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) + $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); + if (error) + return "segmentFilter." + error; + } + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); + if (error) + return "segmentEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + */ + SegmentFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); + } + if (object.segmentFilter != null) { + if (typeof object.segmentFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); + } + if (object.segmentEventFilter != null) { + if (typeof object.segmentEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); + if (options.oneofs) + object.expr = "segmentFilter"; + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); + if (options.oneofs) + object.expr = "segmentEventFilter"; + } + return object; + }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; + }; + + return SegmentFilterExpression; + })(); + + v1alpha.SegmentFilterExpressionList = (function() { + + /** + * Properties of a SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpressionList + * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpressionList. + * @implements ISegmentFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + */ + function SegmentFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * SegmentFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + */ + SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance + */ + SegmentFilterExpressionList.create = function create(properties) { + return new SegmentFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + */ + SegmentFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; + }; + + return SegmentFilterExpressionList; + })(); + + v1alpha.SegmentFilter = (function() { + + /** + * Properties of a SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilter + * @property {string|null} [fieldName] SegmentFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping + */ + + /** + * Constructs a new SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilter. + * @implements ISegmentFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + */ + function SegmentFilter(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]]; + } + + /** + * SegmentFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.fieldName = ""; + + /** + * SegmentFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.stringFilter = null; + + /** + * SegmentFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.inListFilter = null; + + /** + * SegmentFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.numericFilter = null; + + /** + * SegmentFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.betweenFilter = null; + + /** + * SegmentFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + Object.defineProperty(SegmentFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance + */ + SegmentFilter.create = function create(properties) { + return new SegmentFilter(properties); + }; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + */ + SegmentFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.filterScoping = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; + }; + + return SegmentFilter; + })(); + + v1alpha.SegmentFilterScoping = (function() { + + /** + * Properties of a SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterScoping + * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime + */ + + /** + * Constructs a new SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterScoping. + * @implements ISegmentFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + */ + function SegmentFilterScoping(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]]; + } + + /** + * SegmentFilterScoping atAnyPointInTime. + * @member {boolean|null|undefined} atAnyPointInTime + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + */ + SegmentFilterScoping.prototype.atAnyPointInTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { + get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance + */ + SegmentFilterScoping.create = function create(properties) { + return new SegmentFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); + return writer; + }; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.atAnyPointInTime = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + properties._atAnyPointInTime = 1; + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + } + return null; + }; + + /** + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + */ + SegmentFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + return message; + }; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + object.atAnyPointInTime = message.atAnyPointInTime; + if (options.oneofs) + object._atAnyPointInTime = "atAnyPointInTime"; + } + return object; + }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; + }; + + return SegmentFilterScoping; + })(); + + v1alpha.SegmentEventFilter = (function() { + + /** + * Properties of a SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentEventFilter + * @property {string|null} [eventName] SegmentEventFilter eventName + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression + */ + + /** + * Constructs a new SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentEventFilter. + * @implements ISegmentEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + */ + function SegmentEventFilter(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]]; + } + + /** + * SegmentEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.eventName = null; + + /** + * SegmentEventFilter segmentParameterFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.segmentParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance + */ + SegmentEventFilter.create = function create(properties) { + return new SegmentEventFilter(properties); + }; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + properties._segmentParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); + if (error) + return "segmentParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + */ + SegmentEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.segmentParameterFilterExpression != null) { + if (typeof object.segmentParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); + if (options.oneofs) + object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this SegmentEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; + }; + + return SegmentEventFilter; + })(); + + v1alpha.SegmentParameterFilterExpression = (function() { + + /** + * Properties of a SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter + */ + + /** + * Constructs a new SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpression. + * @implements ISegmentParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + */ + function SegmentParameterFilterExpression(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]]; + } + + /** + * SegmentParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.andGroup = null; + + /** + * SegmentParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.orGroup = null; + + /** + * SegmentParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.notExpression = null; + + /** + * SegmentParameterFilterExpression segmentParameterFilter. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance + */ + SegmentParameterFilterExpression.create = function create(properties) { + return new SegmentParameterFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) + $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); + if (error) + return "segmentParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + */ + SegmentParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); + } + if (object.segmentParameterFilter != null) { + if (typeof object.segmentParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); + if (options.oneofs) + object.expr = "segmentParameterFilter"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; + }; + + return SegmentParameterFilterExpression; + })(); + + v1alpha.SegmentParameterFilterExpressionList = (function() { + + /** + * Properties of a SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpressionList + * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpressionList. + * @implements ISegmentParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + */ + function SegmentParameterFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * SegmentParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + */ + SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance + */ + SegmentParameterFilterExpressionList.create = function create(properties) { + return new SegmentParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + */ + SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; + }; + + return SegmentParameterFilterExpressionList; + })(); + + v1alpha.SegmentParameterFilter = (function() { + + /** + * Properties of a SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilter + * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName + * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping + */ + + /** + * Constructs a new SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilter. + * @implements ISegmentParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + */ + function SegmentParameterFilter(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]]; + } + + /** + * SegmentParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.eventParameterName = null; + + /** + * SegmentParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.itemParameterName = null; + + /** + * SegmentParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.stringFilter = null; + + /** + * SegmentParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.inListFilter = null; + + /** + * SegmentParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.numericFilter = null; + + /** + * SegmentParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.betweenFilter = null; + + /** + * SegmentParameterFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SegmentParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance + */ + SegmentParameterFilter.create = function create(properties) { + return new SegmentParameterFilter(properties); + }; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + */ + SegmentParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filterScoping = null; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; + }; + + return SegmentParameterFilter; + })(); + + v1alpha.SegmentParameterFilterScoping = (function() { + + /** + * Properties of a SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterScoping + * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod + */ + + /** + * Constructs a new SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterScoping. + * @implements ISegmentParameterFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + */ + function SegmentParameterFilterScoping(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]]; + } + + /** + * SegmentParameterFilterScoping inAnyNDayPeriod. + * @member {number|Long|null|undefined} inAnyNDayPeriod + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + */ + SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { + get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance + */ + SegmentParameterFilterScoping.create = function create(properties) { + return new SegmentParameterFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inAnyNDayPeriod = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + properties._inAnyNDayPeriod = 1; + if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) + return "inAnyNDayPeriod: integer|Long expected"; + } + return null; + }; + + /** + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + */ + SegmentParameterFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + if (object.inAnyNDayPeriod != null) + if ($util.Long) + (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; + else if (typeof object.inAnyNDayPeriod === "string") + message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); + else if (typeof object.inAnyNDayPeriod === "number") + message.inAnyNDayPeriod = object.inAnyNDayPeriod; + else if (typeof object.inAnyNDayPeriod === "object") + message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + if (typeof message.inAnyNDayPeriod === "number") + object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; + else + object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; + if (options.oneofs) + object._inAnyNDayPeriod = "inAnyNDayPeriod"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; + }; + + return SegmentParameterFilterScoping; + })(); + + v1alpha.FunnelFilterExpression = (function() { + + /** + * Properties of a FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter + * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter + */ + + /** + * Constructs a new FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpression. + * @implements IFunnelFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + */ + function FunnelFilterExpression(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]]; + } + + /** + * FunnelFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.andGroup = null; + + /** + * FunnelFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.orGroup = null; + + /** + * FunnelFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.notExpression = null; + + /** + * FunnelFilterExpression funnelFieldFilter. + * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelFieldFilter = null; + + /** + * FunnelFilterExpression funnelEventFilter. + * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + Object.defineProperty(FunnelFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance + */ + FunnelFilterExpression.create = function create(properties) { + return new FunnelFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) + $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) + $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); + if (error) + return "funnelFieldFilter." + error; + } + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); + if (error) + return "funnelEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + */ + FunnelFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); + } + if (object.funnelFieldFilter != null) { + if (typeof object.funnelFieldFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); + } + if (object.funnelEventFilter != null) { + if (typeof object.funnelEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); + if (options.oneofs) + object.expr = "funnelFieldFilter"; + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); + if (options.oneofs) + object.expr = "funnelEventFilter"; + } + return object; + }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; + }; + + return FunnelFilterExpression; + })(); + + v1alpha.FunnelFilterExpressionList = (function() { + + /** + * Properties of a FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpressionList + * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpressionList. + * @implements IFunnelFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + */ + function FunnelFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FunnelFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + */ + FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance + */ + FunnelFilterExpressionList.create = function create(properties) { + return new FunnelFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + */ + FunnelFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; + }; + + return FunnelFilterExpressionList; + })(); + + v1alpha.FunnelFieldFilter = (function() { + + /** + * Properties of a FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFieldFilter + * @property {string|null} [fieldName] FunnelFieldFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter + */ + + /** + * Constructs a new FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFieldFilter. + * @implements IFunnelFieldFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + */ + function FunnelFieldFilter(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]]; + } + + /** + * FunnelFieldFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.fieldName = ""; + + /** + * FunnelFieldFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.stringFilter = null; + + /** + * FunnelFieldFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.inListFilter = null; + + /** + * FunnelFieldFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.numericFilter = null; + + /** + * FunnelFieldFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFieldFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance + */ + FunnelFieldFilter.create = function create(properties) { + return new FunnelFieldFilter(properties); + }; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFieldFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFieldFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + */ + FunnelFieldFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFieldFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelFieldFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFieldFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; + }; + + return FunnelFieldFilter; + })(); + + v1alpha.FunnelEventFilter = (function() { + + /** + * Properties of a FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelEventFilter + * @property {string|null} [eventName] FunnelEventFilter eventName + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression + */ + + /** + * Constructs a new FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelEventFilter. + * @implements IFunnelEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + */ + function FunnelEventFilter(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]]; + } + + /** + * FunnelEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.eventName = null; + + /** + * FunnelEventFilter funnelParameterFilterExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.funnelParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance + */ + FunnelEventFilter.create = function create(properties) { + return new FunnelEventFilter(properties); + }; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + properties._funnelParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); + if (error) + return "funnelParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + */ + FunnelEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.funnelParameterFilterExpression != null) { + if (typeof object.funnelParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); + if (options.oneofs) + object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this FunnelEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; + }; + + return FunnelEventFilter; + })(); + + v1alpha.FunnelParameterFilterExpression = (function() { + + /** + * Properties of a FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter + */ + + /** + * Constructs a new FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpression. + * @implements IFunnelParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + */ + function FunnelParameterFilterExpression(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]]; + } + + /** + * FunnelParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.andGroup = null; + + /** + * FunnelParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.orGroup = null; + + /** + * FunnelParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.notExpression = null; + + /** + * FunnelParameterFilterExpression funnelParameterFilter. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance + */ + FunnelParameterFilterExpression.create = function create(properties) { + return new FunnelParameterFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) + $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); + if (error) + return "funnelParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + */ + FunnelParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); + } + if (object.funnelParameterFilter != null) { + if (typeof object.funnelParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); + if (options.oneofs) + object.expr = "funnelParameterFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; + }; + + return FunnelParameterFilterExpression; + })(); + + v1alpha.FunnelParameterFilterExpressionList = (function() { + + /** + * Properties of a FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpressionList + * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpressionList. + * @implements IFunnelParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + */ + function FunnelParameterFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FunnelParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + */ + FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance + */ + FunnelParameterFilterExpressionList.create = function create(properties) { + return new FunnelParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + */ + FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; + }; + + return FunnelParameterFilterExpressionList; + })(); + + v1alpha.FunnelParameterFilter = (function() { + + /** + * Properties of a FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilter + * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName + * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter + */ + + /** + * Constructs a new FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilter. + * @implements IFunnelParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + */ + function FunnelParameterFilter(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]]; + } + + /** + * FunnelParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.eventParameterName = null; + + /** + * FunnelParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.itemParameterName = null; + + /** + * FunnelParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.stringFilter = null; + + /** + * FunnelParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.inListFilter = null; + + /** + * FunnelParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.numericFilter = null; + + /** + * FunnelParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FunnelParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance + */ + FunnelParameterFilter.create = function create(properties) { + return new FunnelParameterFilter(properties); + }; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + */ + FunnelParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; + }; + + return FunnelParameterFilter; + })(); + + v1alpha.FunnelResponseMetadata = (function() { + + /** + * Properties of a FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelResponseMetadata + * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas + */ + + /** + * Constructs a new FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelResponseMetadata. + * @implements IFunnelResponseMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + */ + function FunnelResponseMetadata(properties) { + this.samplingMetadatas = []; + 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]]; + } + + /** + * FunnelResponseMetadata samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + */ + FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance + */ + FunnelResponseMetadata.create = function create(properties) { + return new FunnelResponseMetadata(properties); + }; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelResponseMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelResponseMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + */ + FunnelResponseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelResponseMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + * @returns {Object.} JSON object + */ + FunnelResponseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; + }; + + return FunnelResponseMetadata; + })(); + + v1alpha.SamplingMetadata = (function() { + + /** + * Properties of a SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + */ + + /** + * Constructs a new SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + */ + function SamplingMetadata(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]]; + } + + /** + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance + */ + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); + }; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + return writer; + }; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.samplesReadCount = reader.int64(); + break; + } + case 2: { + message.samplingSpaceSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SamplingMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SamplingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; + return null; + }; + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + */ + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SamplingMetadata.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.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; + } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + return object; + }; + + /** + * Converts this SamplingMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + * @returns {Object.} JSON object + */ + SamplingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1alpha.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1alpha.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1alpha.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1alpha.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1alpha.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1alpha.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + /** + * SamplingLevel enum. + * @name google.analytics.data.v1alpha.SamplingLevel + * @enum {number} + * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} UNSAMPLED=3 UNSAMPLED value + */ + v1alpha.SamplingLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "UNSAMPLED"] = 3; + return values; + })(); + + return v1alpha; + })(); + + return data; + })(); + + return analytics; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + 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 + * @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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + return api; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * 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); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * 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); + }; + + /** + * 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 + */ + + /** + * 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" }); + + /** + * 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * 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) + }); + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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.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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(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]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @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 + */ + GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @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"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + 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]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @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.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @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 + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + 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 ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(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]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @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 + */ + CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + 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]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @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 + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * 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 WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(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]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * 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.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.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 WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @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 + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + 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 WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(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]]; + } + + /** + * 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.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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 OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @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.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @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 + */ + 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + 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 OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * 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 Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + 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]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * 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.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @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.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @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 + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + 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 Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + 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 Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.json new file mode 100644 index 000000000000..7b80b827f2ea --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/protos/protos.json @@ -0,0 +1,4982 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "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": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "analytics": { + "nested": { + "data": { + "nested": { + "v1alpha": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data", + "java_multiple_files": true, + "java_outer_classname": "ReportingApiProto", + "java_package": "com.google.analytics.data.v1alpha", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource_definition).pattern": "properties/{property}" + }, + "nested": { + "AlphaAnalyticsData": { + "options": { + "(google.api.default_host)": "analyticsdata.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/spreadsheets" + }, + "methods": { + "RunFunnelReport": { + "requestType": "RunFunnelReportRequest", + "responseType": "RunFunnelReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:runFunnelReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:runFunnelReport", + "body": "*" + } + } + ] + }, + "CreateAudienceList": { + "requestType": "CreateAudienceListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.http).body": "audience_list", + "(google.api.method_signature)": "parent,audience_list", + "(google.longrunning.operation_info).response_type": "AudienceList", + "(google.longrunning.operation_info).metadata_type": "AudienceListMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/audienceLists", + "body": "audience_list" + } + }, + { + "(google.api.method_signature)": "parent,audience_list" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AudienceList", + "metadata_type": "AudienceListMetadata" + } + } + ] + }, + "QueryAudienceList": { + "requestType": "QueryAudienceListRequest", + "responseType": "QueryAudienceListResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SheetExportAudienceList": { + "requestType": "SheetExportAudienceListRequest", + "responseType": "SheetExportAudienceListResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudienceList": { + "requestType": "GetAudienceListRequest", + "responseType": "AudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/audienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/audienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudienceLists": { + "requestType": "ListAudienceListsRequest", + "responseType": "ListAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/audienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateRecurringAudienceList": { + "requestType": "CreateRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.http).body": "recurring_audience_list", + "(google.api.method_signature)": "parent,recurring_audience_list" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "body": "recurring_audience_list" + } + }, + { + "(google.api.method_signature)": "parent,recurring_audience_list" + } + ] + }, + "GetRecurringAudienceList": { + "requestType": "GetRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListRecurringAudienceLists": { + "requestType": "ListRecurringAudienceListsRequest", + "responseType": "ListRecurringAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/recurringAudienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPropertyQuotasSnapshot": { + "requestType": "GetPropertyQuotasSnapshotRequest", + "responseType": "PropertyQuotasSnapshot", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReportTask": { + "requestType": "CreateReportTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.http).body": "report_task", + "(google.api.method_signature)": "parent,report_task", + "(google.longrunning.operation_info).response_type": "ReportTask", + "(google.longrunning.operation_info).metadata_type": "ReportTaskMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/reportTasks", + "body": "report_task" + } + }, + { + "(google.api.method_signature)": "parent,report_task" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ReportTask", + "metadata_type": "ReportTaskMetadata" + } + } + ] + }, + "QueryReportTask": { + "requestType": "QueryReportTaskRequest", + "responseType": "QueryReportTaskResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetReportTask": { + "requestType": "GetReportTaskRequest", + "responseType": "ReportTask", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/reportTasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/reportTasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReportTasks": { + "requestType": "ListReportTasksRequest", + "responseType": "ListReportTasksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/reportTasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateRecurringAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "recurringAudienceList": { + "type": "RecurringAudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RecurringAudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/RecurringAudienceList", + "(google.api.resource).pattern": "properties/{property}/recurringAudienceLists/{recurring_audience_list}", + "(google.api.resource).plural": "recurringAudienceLists", + "(google.api.resource).singular": "recurringAudienceList" + }, + "oneofs": { + "_activeDaysRemaining": { + "oneof": [ + "activeDaysRemaining" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDaysRemaining": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "audienceLists": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "WebhookNotification": { + "oneofs": { + "_uri": { + "oneof": [ + "uri" + ] + }, + "_channelToken": { + "oneof": [ + "channelToken" + ] + } + }, + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "channelToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "GetRecurringAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + } + } + }, + "ListRecurringAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRecurringAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "recurringAudienceLists": { + "rule": "repeated", + "type": "RecurringAudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "GetPropertyQuotasSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + } + } + }, + "PropertyQuotasSnapshot": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot", + "(google.api.resource).pattern": "properties/{property}/propertyQuotasSnapshot", + "(google.api.resource).plural": "propertyQuotasSnapshots", + "(google.api.resource).singular": "propertyQuotasSnapshot" + }, + "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "corePropertyQuota": { + "type": "PropertyQuota", + "id": 1 + }, + "realtimePropertyQuota": { + "type": "PropertyQuota", + "id": 2 + }, + "funnelPropertyQuota": { + "type": "PropertyQuota", + "id": 3 + } + } + }, + "GetAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" + } + } + } + }, + "ListAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "audienceLists": { + "rule": "repeated", + "type": "AudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "audienceList": { + "type": "AudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceList", + "(google.api.resource).pattern": "properties/{property}/audienceLists/{audience_list}", + "(google.api.resource).plural": "audienceLists", + "(google.api.resource).singular": "audienceList" + }, + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_percentageCompleted": { + "oneof": [ + "percentageCompleted" + ] + }, + "_recurringAudienceList": { + "oneof": [ + "recurringAudienceList" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowCount": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "percentageCompleted": { + "type": "double", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recurringAudienceList": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + }, + "AudienceListMetadata": { + "fields": {} + }, + "QueryAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryAudienceListResponse": { + "oneofs": { + "_audienceList": { + "oneof": [ + "audienceList" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + } + }, + "fields": { + "audienceList": { + "type": "AudienceList", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceRows": { + "rule": "repeated", + "type": "AudienceRow", + "id": 2 + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "SheetExportAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SheetExportAudienceListResponse": { + "oneofs": { + "_spreadsheetUri": { + "oneof": [ + "spreadsheetUri" + ] + }, + "_spreadsheetId": { + "oneof": [ + "spreadsheetId" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_audienceList": { + "oneof": [ + "audienceList" + ] + } + }, + "fields": { + "spreadsheetUri": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "spreadsheetId": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "audienceList": { + "type": "AudienceList", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "AudienceRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AudienceDimensionValue", + "id": 1 + } + } + }, + "AudienceDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceDimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "RunFunnelReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnel": { + "type": "Funnel", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelBreakdown": { + "type": "FunnelBreakdown", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelNextAction": { + "type": "FunnelNextAction", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelVisualizationType": { + "type": "FunnelVisualizationType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "segments": { + "rule": "repeated", + "type": "Segment", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnPropertyQuota": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "FunnelVisualizationType": { + "values": { + "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": 0, + "STANDARD_FUNNEL": 1, + "TRENDED_FUNNEL": 2 + } + } + } + }, + "RunFunnelReportResponse": { + "fields": { + "funnelTable": { + "type": "FunnelSubReport", + "id": 1 + }, + "funnelVisualization": { + "type": "FunnelSubReport", + "id": 2 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 3 + }, + "kind": { + "type": "string", + "id": 4 + } + } + }, + "ReportTask": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/ReportTask", + "(google.api.resource).pattern": "properties/{property}/reportTasks/{report_task}", + "(google.api.resource).plural": "reportTasks", + "(google.api.resource).singular": "reportTask" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportDefinition": { + "type": "ReportDefinition", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reportMetadata": { + "type": "ReportMetadata", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ReportDefinition": { + "oneofs": { + "_samplingLevel": { + "oneof": [ + "samplingLevel" + ] + } + }, + "fields": { + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "keepEmptyRows": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "samplingLevel": { + "type": "SamplingLevel", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ReportMetadata": { + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_taskRowCount": { + "oneof": [ + "taskRowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_totalRowCount": { + "oneof": [ + "totalRowCount" + ] + } + }, + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "taskRowCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "totalRowCount": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + } + } + }, + "CreateReportTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "reportTask": { + "type": "ReportTask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReportTaskMetadata": { + "fields": {} + }, + "QueryReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryReportTaskResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + } + } + }, + "GetReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/ReportTask" + } + } + } + }, + "ListReportTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReportTasksResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "reportTasks": { + "rule": "repeated", + "type": "ReportTask", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "Dimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimensionExpression": { + "type": "DimensionExpression", + "id": 2 + } + } + }, + "DimensionExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "lowerCase", + "upperCase", + "concatenate" + ] + } + }, + "fields": { + "lowerCase": { + "type": "CaseExpression", + "id": 4 + }, + "upperCase": { + "type": "CaseExpression", + "id": 5 + }, + "concatenate": { + "type": "ConcatenateExpression", + "id": 6 + } + }, + "nested": { + "CaseExpression": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "ConcatenateExpression": { + "fields": { + "dimensionNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Metric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expression": { + "type": "string", + "id": 2 + }, + "invisible": { + "type": "bool", + "id": 3 + } + } + }, + "FilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FilterExpression", + "id": 3 + }, + "filter": { + "type": "Filter", + "id": 4 + } + } + }, + "FilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FilterExpression", + "id": 1 + } + } + }, + "Filter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter", + "emptyFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 5 + }, + "emptyFilter": { + "type": "EmptyFilter", + "id": 6 + } + } + }, + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "OrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "desc": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "EmptyFilter": { + "fields": {} + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "CohortSpec": { + "fields": { + "cohorts": { + "rule": "repeated", + "type": "Cohort", + "id": 1 + }, + "cohortsRange": { + "type": "CohortsRange", + "id": 2 + }, + "cohortReportSettings": { + "type": "CohortReportSettings", + "id": 3 + } + } + }, + "Cohort": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimension": { + "type": "string", + "id": 2 + }, + "dateRange": { + "type": "DateRange", + "id": 3 + } + } + }, + "CohortsRange": { + "fields": { + "granularity": { + "type": "Granularity", + "id": 1 + }, + "startOffset": { + "type": "int32", + "id": 2 + }, + "endOffset": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Granularity": { + "values": { + "GRANULARITY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2, + "MONTHLY": 3 + } + } + } + }, + "CohortReportSettings": { + "fields": { + "accumulate": { + "type": "bool", + "id": 1 + } + } + }, + "ResponseMetaData": { + "oneofs": { + "_schemaRestrictionResponse": { + "oneof": [ + "schemaRestrictionResponse" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_timeZone": { + "oneof": [ + "timeZone" + ] + }, + "_emptyReason": { + "oneof": [ + "emptyReason" + ] + }, + "_subjectToThresholding": { + "oneof": [ + "subjectToThresholding" + ] + } + }, + "fields": { + "dataLossFromOtherRow": { + "type": "bool", + "id": 3 + }, + "schemaRestrictionResponse": { + "type": "SchemaRestrictionResponse", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "timeZone": { + "type": "string", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "emptyReason": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "subjectToThresholding": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 9 + } + }, + "nested": { + "SchemaRestrictionResponse": { + "fields": { + "activeMetricRestrictions": { + "rule": "repeated", + "type": "ActiveMetricRestriction", + "id": 1 + } + }, + "nested": { + "ActiveMetricRestriction": { + "oneofs": { + "_metricName": { + "oneof": [ + "metricName" + ] + } + }, + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "restrictedMetricTypes": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 2 + } + } + } + } + } + } + }, + "DimensionHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MetricType", + "id": 2 + } + } + }, + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "MetricValue", + "id": 2 + } + } + }, + "DimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "MetricValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 4 + } + } + }, + "PropertyQuota": { + "fields": { + "tokensPerDay": { + "type": "QuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "QuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "QuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "QuotaStatus", + "id": 4 + }, + "potentiallyThresholdedRequestsPerHour": { + "type": "QuotaStatus", + "id": 5 + }, + "tokensPerProjectPerHour": { + "type": "QuotaStatus", + "id": 6 + } + } + }, + "QuotaStatus": { + "fields": { + "consumed": { + "type": "int32", + "id": 1 + }, + "remaining": { + "type": "int32", + "id": 2 + } + } + }, + "FunnelBreakdown": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "breakdownDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelNextAction": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "nextActionDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "Funnel": { + "fields": { + "isOpenFunnel": { + "type": "bool", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "FunnelStep", + "id": 2 + } + } + }, + "FunnelStep": { + "oneofs": { + "_withinDurationFromPriorStep": { + "oneof": [ + "withinDurationFromPriorStep" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "isDirectlyFollowedBy": { + "type": "bool", + "id": 2 + }, + "withinDurationFromPriorStep": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "filterExpression": { + "type": "FunnelFilterExpression", + "id": 4 + } + } + }, + "FunnelSubReport": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "metadata": { + "type": "FunnelResponseMetadata", + "id": 4 + } + } + }, + "UserSegment": { + "fields": { + "userInclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "UserSegmentExclusion", + "id": 2 + } + } + }, + "UserSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "UserSegmentConditionGroup", + "id": 1 + }, + "andSequenceGroups": { + "rule": "repeated", + "type": "UserSegmentSequenceGroup", + "id": 2 + } + } + }, + "UserCriteriaScoping": { + "values": { + "USER_CRITERIA_SCOPING_UNSPECIFIED": 0, + "USER_CRITERIA_WITHIN_SAME_EVENT": 1, + "USER_CRITERIA_WITHIN_SAME_SESSION": 2, + "USER_CRITERIA_ACROSS_ALL_SESSIONS": 3 + } + }, + "UserSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "UserSegmentSequenceGroup": { + "fields": { + "sequenceScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "sequenceMaximumDuration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "userSequenceSteps": { + "rule": "repeated", + "type": "UserSequenceStep", + "id": 3 + } + } + }, + "UserSequenceStep": { + "fields": { + "isDirectlyFollowedBy": { + "type": "bool", + "id": 1 + }, + "stepScoping": { + "type": "UserCriteriaScoping", + "id": 2 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 3 + } + } + }, + "UserSegmentExclusion": { + "fields": { + "userExclusionDuration": { + "type": "UserExclusionDuration", + "id": 1 + }, + "userExclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 2 + } + } + }, + "UserExclusionDuration": { + "values": { + "USER_EXCLUSION_DURATION_UNSPECIFIED": 0, + "USER_EXCLUSION_TEMPORARY": 1, + "USER_EXCLUSION_PERMANENT": 2 + } + }, + "SessionSegment": { + "fields": { + "sessionInclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "SessionSegmentExclusion", + "id": 2 + } + } + }, + "SessionSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "SessionSegmentConditionGroup", + "id": 1 + } + } + }, + "SessionCriteriaScoping": { + "values": { + "SESSION_CRITERIA_SCOPING_UNSPECIFIED": 0, + "SESSION_CRITERIA_WITHIN_SAME_EVENT": 1, + "SESSION_CRITERIA_WITHIN_SAME_SESSION": 2 + } + }, + "SessionSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "SessionCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "SessionSegmentExclusion": { + "fields": { + "sessionExclusionDuration": { + "type": "SessionExclusionDuration", + "id": 1 + }, + "sessionExclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 2 + } + } + }, + "SessionExclusionDuration": { + "values": { + "SESSION_EXCLUSION_DURATION_UNSPECIFIED": 0, + "SESSION_EXCLUSION_TEMPORARY": 1, + "SESSION_EXCLUSION_PERMANENT": 2 + } + }, + "EventSegment": { + "fields": { + "eventInclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "EventSegmentExclusion", + "id": 2 + } + } + }, + "EventSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "EventSegmentConditionGroup", + "id": 1 + } + } + }, + "EventCriteriaScoping": { + "values": { + "EVENT_CRITERIA_SCOPING_UNSPECIFIED": 0, + "EVENT_CRITERIA_WITHIN_SAME_EVENT": 1 + } + }, + "EventSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "EventCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "EventSegmentExclusion": { + "fields": { + "eventExclusionDuration": { + "type": "EventExclusionDuration", + "id": 1 + }, + "eventExclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 2 + } + } + }, + "EventExclusionDuration": { + "values": { + "EVENT_EXCLUSION_DURATION_UNSPECIFIED": 0, + "EVENT_EXCLUSION_PERMANENT": 1 + } + }, + "Segment": { + "oneofs": { + "oneSegmentScope": { + "oneof": [ + "userSegment", + "sessionSegment", + "eventSegment" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "userSegment": { + "type": "UserSegment", + "id": 2 + }, + "sessionSegment": { + "type": "SessionSegment", + "id": 3 + }, + "eventSegment": { + "type": "EventSegment", + "id": 4 + } + } + }, + "SegmentFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentFilter", + "segmentEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentFilterExpression", + "id": 3 + }, + "segmentFilter": { + "type": "SegmentFilter", + "id": 4 + }, + "segmentEventFilter": { + "type": "SegmentEventFilter", + "id": 5 + } + } + }, + "SegmentFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentFilterExpression", + "id": 1 + } + } + }, + "SegmentFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentFilterScoping", + "id": 8 + } + } + }, + "SegmentFilterScoping": { + "oneofs": { + "_atAnyPointInTime": { + "oneof": [ + "atAnyPointInTime" + ] + } + }, + "fields": { + "atAnyPointInTime": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_segmentParameterFilterExpression": { + "oneof": [ + "segmentParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "segmentParameterFilterExpression": { + "type": "SegmentParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentParameterFilterExpression", + "id": 3 + }, + "segmentParameterFilter": { + "type": "SegmentParameterFilter", + "id": 4 + } + } + }, + "SegmentParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentParameterFilterExpression", + "id": 1 + } + } + }, + "SegmentParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentParameterFilterScoping", + "id": 8 + } + } + }, + "SegmentParameterFilterScoping": { + "oneofs": { + "_inAnyNDayPeriod": { + "oneof": [ + "inAnyNDayPeriod" + ] + } + }, + "fields": { + "inAnyNDayPeriod": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelFieldFilter", + "funnelEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelFilterExpression", + "id": 3 + }, + "funnelFieldFilter": { + "type": "FunnelFieldFilter", + "id": 4 + }, + "funnelEventFilter": { + "type": "FunnelEventFilter", + "id": 5 + } + } + }, + "FunnelFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelFilterExpression", + "id": 1 + } + } + }, + "FunnelFieldFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_funnelParameterFilterExpression": { + "oneof": [ + "funnelParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "funnelParameterFilterExpression": { + "type": "FunnelParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelParameterFilterExpression", + "id": 3 + }, + "funnelParameterFilter": { + "type": "FunnelParameterFilter", + "id": 4 + } + } + }, + "FunnelParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelParameterFilterExpression", + "id": 1 + } + } + }, + "FunnelParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelResponseMetadata": { + "fields": { + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 1 + } + } + }, + "SamplingMetadata": { + "fields": { + "samplesReadCount": { + "type": "int64", + "id": 1 + }, + "samplingSpaceSize": { + "type": "int64", + "id": 2 + } + } + }, + "MetricAggregation": { + "values": { + "METRIC_AGGREGATION_UNSPECIFIED": 0, + "TOTAL": 1, + "MINIMUM": 5, + "MAXIMUM": 6, + "COUNT": 4 + } + }, + "MetricType": { + "values": { + "METRIC_TYPE_UNSPECIFIED": 0, + "TYPE_INTEGER": 1, + "TYPE_FLOAT": 2, + "TYPE_SECONDS": 4, + "TYPE_MILLISECONDS": 5, + "TYPE_MINUTES": 6, + "TYPE_HOURS": 7, + "TYPE_STANDARD": 8, + "TYPE_CURRENCY": 9, + "TYPE_FEET": 10, + "TYPE_MILES": 11, + "TYPE_METERS": 12, + "TYPE_KILOMETERS": 13 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + }, + "SamplingLevel": { + "values": { + "SAMPLING_LEVEL_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "UNSAMPLED": 3 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js new file mode 100644 index 000000000000..31d9ca59a583 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, audienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience list to create. + */ + // const audienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateAudienceList() { + // Construct request + const request = { + parent, + audienceList, + }; + + // Run request + const [operation] = await dataClient.createAudienceList(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js new file mode 100644 index 000000000000..0614d1ff3721 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, recurringAudienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The recurring audience list to create. + */ + // const recurringAudienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateRecurringAudienceList() { + // Construct request + const request = { + parent, + recurringAudienceList, + }; + + // Run request + const response = await dataClient.createRecurringAudienceList(request); + console.log(response); + } + + callCreateRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js new file mode 100644 index 000000000000..9a708a76b384 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, reportTask) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + */ + // const parent = 'abc123' + /** + * Required. The report task configuration to create. + */ + // const reportTask = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateReportTask() { + // Construct request + const request = { + parent, + reportTask, + }; + + // Run request + const [operation] = await dataClient.createReportTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js new file mode 100644 index 000000000000..93071bc5252c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_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 audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceList(request); + console.log(response); + } + + callGetAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js new file mode 100644 index 000000000000..fb28a3e75de6 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_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. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetPropertyQuotasSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getPropertyQuotasSnapshot(request); + console.log(response); + } + + callGetPropertyQuotasSnapshot(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js new file mode 100644 index 000000000000..755d23763a3c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js @@ -0,0 +1,63 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_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 recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetRecurringAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getRecurringAudienceList(request); + console.log(response); + } + + callGetRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js new file mode 100644 index 000000000000..80ce2bdca388 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_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 report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getReportTask(request); + console.log(response); + } + + callGetReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js new file mode 100644 index 000000000000..70137ac512f4 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js @@ -0,0 +1,78 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_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. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js new file mode 100644 index 000000000000..325e8be6580c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js @@ -0,0 +1,80 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_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. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListRecurringAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listRecurringAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRecurringAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js new file mode 100644 index 000000000000..3ad6cd8f9659 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js @@ -0,0 +1,73 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_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. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of report tasks to return. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListReportTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listReportTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportTasks(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js new file mode 100644 index 000000000000..e0938dd0d5ad --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_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 audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceList(request); + console.log(response); + } + + callQueryAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js new file mode 100644 index 000000000000..dd7d26e860ef --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js @@ -0,0 +1,88 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_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 report source name. + * Format: `properties/{property}/reportTasks/{report}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryReportTask(request); + console.log(response); + } + + callQueryReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js new file mode 100644 index 000000000000..c67db6639ddc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js @@ -0,0 +1,132 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_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. + */ + /** + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + */ + // const dateRanges = [1,2,3,4] + /** + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + */ + // const funnel = {} + /** + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + */ + // const funnelBreakdown = {} + /** + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + */ + // const funnelNextAction = {} + /** + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + */ + // const funnelVisualizationType = {} + /** + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * The segments parameter is optional. Requests are limited to 4 segments. + */ + // const segments = [1,2,3,4] + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + */ + // const limit = 1234 + /** + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see Creating a Report: Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callRunFunnelReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runFunnelReport(request); + console.log(response); + } + + callRunFunnelReport(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js new file mode 100644 index 000000000000..68fdc871ad1b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_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 audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callSheetExportAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.sheetExportAudienceList(request); + console.log(response); + } + + callSheetExportAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json new file mode 100644 index 000000000000..92dbb6896d17 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -0,0 +1,671 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async", + "title": "AlphaAnalyticsData runFunnelReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see [GA4 Funnel Explorations](https://support.google.com/analytics/answer/9327974). This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Data API Funnel Reporting Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).", + "canonical": true, + "file": "alpha_analytics_data.run_funnel_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 124, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "funnel", + "type": ".google.analytics.data.v1alpha.Funnel" + }, + { + "name": "funnel_breakdown", + "type": ".google.analytics.data.v1alpha.FunnelBreakdown" + }, + { + "name": "funnel_next_action", + "type": ".google.analytics.data.v1alpha.FunnelNextAction" + }, + { + "name": "funnel_visualization_type", + "type": ".google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType" + }, + { + "name": "segments", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.data.v1alpha.RunFunnelReportResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async", + "title": "AlphaAnalyticsData createAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience list for later retrieval. This method quickly returns the audience list's resource name and initiates a long running asynchronous request to form an audience list. To list the users in an audience list, first create the audience list through this method and then send the audience resource name to the `QueryAudienceList` method. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. An audience list is a snapshot of the users currently in the audience at the time of audience list creation. Creating audience lists for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience lists contain the users in each audience. This method is available at beta stability at [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_list", + "type": ".google.analytics.data.v1alpha.AudienceList" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async", + "title": "AlphaAnalyticsData queryAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience list of users. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to retrieve the users in the audience list. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is available at beta stability at [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.query_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryAudienceListResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async", + "title": "AlphaAnalyticsData sheetExportAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Exports an audience list of users to a Google Sheet. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to export those users in the audience list to a Google Sheet. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.sheet_export_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SheetExportAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.SheetExportAudienceListResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "SheetExportAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async", + "title": "AlphaAnalyticsData getAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience list. This method can be used to understand an audience list after it has been created. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.AudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async", + "title": "AlphaAnalyticsData listAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience lists for a property. This method can be used for you to find and reuse existing audience lists rather than creating unnecessary new audience lists. The same audience can have multiple audience lists that represent the list of users that were in an audience on different days. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async", + "title": "AlphaAnalyticsData createRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates a recurring audience list. Recurring audience lists produces new audience lists each day. Audience lists are users in an audience at the time of the list's creation. A recurring audience list ensures that you have audience list based on the most recent data available for use each day. If you manually create audience list, you don't know when an audience list based on an additional day's data is available. This recurring audience list automates the creation of an audience list when an additional day's data is available. You will consume fewer quota tokens by using recurring audience list versus manually creating audience list at various times of day trying to guess when an additional day's data is ready. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "recurring_audience_list", + "type": ".google.analytics.data.v1alpha.RecurringAudienceList" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async", + "title": "AlphaAnalyticsData getRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific recurring audience list. This method can be used to understand a recurring audience list's state after it has been created. For example, a recurring audience list resource will generate audience list instances for each day, and this method can be used to get the resource name of the most recent audience list instance. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async", + "title": "AlphaAnalyticsData listRecurringAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all recurring audience lists for a property. This method can be used for you to find and reuse existing recurring audience lists rather than creating unnecessary new recurring audience lists. The same audience can have multiple recurring audience lists that represent different dimension combinations; for example, just the dimension `deviceId` or both the dimensions `deviceId` and `userId`. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_recurring_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async", + "title": "AlphaAnalyticsData getPropertyQuotasSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Get all property quotas organized by quota category for a given property. This will charge 1 property quota from the category with the most quota.", + "canonical": true, + "file": "alpha_analytics_data.get_property_quotas_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.PropertyQuotasSnapshot", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async", + "title": "AlphaAnalyticsData createReportTask Sample", + "origin": "API_DEFINITION", + "description": " Initiates the creation of a report task. This method quickly returns a report task and initiates a long running asynchronous request to form a customized report of your Google Analytics event data. A report task will be retained and available for querying for 72 hours after it has been created. A report task created by one user can be listed and queried by all users who have access to the property.", + "canonical": true, + "file": "alpha_analytics_data.create_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "report_task", + "type": ".google.analytics.data.v1alpha.ReportTask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async", + "title": "AlphaAnalyticsData queryReportTask Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a report task's content. After requesting the `CreateReportTask`, you are able to retrieve the report content once the report is ACTIVE. This method will return an error if the report task's state is not `ACTIVE`. A query response will return the tabular row & column values of the report.", + "canonical": true, + "file": "alpha_analytics_data.query_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryReportTaskResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async", + "title": "AlphaAnalyticsData getReportTask Sample", + "origin": "API_DEFINITION", + "description": " Gets report metadata about a specific report task. After creating a report task, use this method to check its processing state or inspect its report definition.", + "canonical": true, + "file": "alpha_analytics_data.get_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ReportTask", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async", + "title": "AlphaAnalyticsData listReportTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists all report tasks for a property.", + "canonical": true, + "file": "alpha_analytics_data.list_report_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListReportTasksResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + } + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/index.ts new file mode 100644 index 000000000000..c997dce80e3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2025 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. ** + +import * as v1alpha from './v1alpha'; +const AlphaAnalyticsDataClient = v1alpha.AlphaAnalyticsDataClient; +type AlphaAnalyticsDataClient = v1alpha.AlphaAnalyticsDataClient; +export {v1alpha, AlphaAnalyticsDataClient}; +export default {v1alpha, AlphaAnalyticsDataClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client.ts new file mode 100644 index 000000000000..e2a88475a62d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client.ts @@ -0,0 +1,2782 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/alpha_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './alpha_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1alpha + */ +export class AlphaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + alphaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AlphaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AlphaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AlphaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceLists/{audience_list}' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/propertyQuotasSnapshot' + ), + recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/recurringAudienceLists/{recurring_audience_list}' + ), + reportTaskPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/reportTasks/{report_task}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'), + listRecurringAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'), + listReportTasks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceListResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceList') as gax.protobuf.Type; + const createAudienceListMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceListMetadata') as gax.protobuf.Type; + const createReportTaskResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTask') as gax.protobuf.Type; + const createReportTaskMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTaskMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceListResponse.decode.bind(createAudienceListResponse), + createAudienceListMetadata.decode.bind(createAudienceListMetadata)), + createReportTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReportTaskResponse.decode.bind(createReportTaskResponse), + createReportTaskMetadata.decode.bind(createReportTaskMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.alphaAnalyticsDataStub) { + return this.alphaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1alpha.AlphaAnalyticsData. + this.alphaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1alpha.AlphaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1alpha.AlphaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const alphaAnalyticsDataStubMethods = + ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'sheetExportAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks']; + for (const methodName of alphaAnalyticsDataStubMethods) { + const callPromise = this.alphaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.alphaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly', + 'https://www.googleapis.com/auth/drive', + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/spreadsheets' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized funnel report of your Google Analytics event data. The + * data returned from the API is as a table with columns for the requested + * dimensions and metrics. + * + * Funnel exploration lets you visualize the steps your users take to complete + * a task and quickly see how well they are succeeding or failing at each + * step. For example, how do prospects become shoppers and then become buyers? + * How do one time buyers become repeat buyers? With this information, you can + * improve inefficient or abandoned customer journeys. To learn more, see [GA4 + * Funnel Explorations](https://support.google.com/analytics/answer/9327974). + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the [Google Analytics Data API Funnel + * Reporting + * Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.property] + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} [request.dateRanges] + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + * @param {google.analytics.data.v1alpha.Funnel} [request.funnel] + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + * @param {google.analytics.data.v1alpha.FunnelBreakdown} [request.funnelBreakdown] + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + * @param {google.analytics.data.v1alpha.FunnelNextAction} [request.funnelNextAction] + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} [request.funnelVisualizationType] + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + * @param {number[]} [request.segments] + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * + * The segments parameter is optional. Requests are limited to 4 segments. + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see [Creating a Report: Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {boolean} [request.returnPropertyQuota] + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @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 protos.google.analytics.data.v1alpha.RunFunnelReportResponse|RunFunnelReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async + */ + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined + ]>; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runFunnelReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runFunnelReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runFunnelReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runFunnelReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience list of users. After creating an audience, the users + * are not immediately available for listing. First, a request to + * `CreateAudienceList` is necessary to create an audience list of users, and + * then second, this method is used to retrieve the users in the audience + * list. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * This method is available at beta stability at + * [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.QueryAudienceListResponse|QueryAudienceListResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async + */ + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined + ]>; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|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().catch(err => {throw err}); + this._log.info('queryAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Exports an audience list of users to a Google Sheet. After creating an + * audience, the users are not immediately available for listing. First, a + * request to `CreateAudienceList` is necessary to create an audience list of + * users, and then second, this method is used to export those users in the + * audience list to a Google Sheet. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse|SheetExportAudienceListResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async + */ + sheetExportAudienceList( + request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, {}|undefined + ]>; + sheetExportAudienceList( + request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): void; + sheetExportAudienceList( + request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): void; + sheetExportAudienceList( + request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|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().catch(err => {throw err}); + this._log.info('sheetExportAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('sheetExportAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.sheetExportAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('sheetExportAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience list. This method + * can be used to understand an audience list after it has been created. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async + */ + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined + ]>; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|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().catch(err => {throw err}); + this._log.info('getAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a recurring audience list. Recurring audience lists produces new + * audience lists each day. Audience lists are users in an audience at the + * time of the list's creation. + * + * A recurring audience list ensures that you have audience list based on the + * most recent data available for use each day. If you manually create + * audience list, you don't know when an audience list based on an additional + * day's data is available. This recurring audience list automates the + * creation of an audience list when an additional day's data is available. + * You will consume fewer quota tokens by using recurring audience list versus + * manually creating audience list at various times of day trying to guess + * when an additional day's data is ready. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.RecurringAudienceList} request.recurringAudienceList + * Required. The recurring audience list to create. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async + */ + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined + ]>; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|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().catch(err => {throw err}); + this._log.info('createRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('createRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific recurring audience list. This + * method can be used to understand a recurring audience list's state after it + * has been created. For example, a recurring audience list resource will + * generate audience list instances for each day, and this method can be used + * to get the resource name of the most recent audience list instance. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async + */ + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined + ]>; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|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().catch(err => {throw err}); + this._log.info('getRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get all property quotas organized by quota category for a given property. + * This will charge 1 property quota from the category with the most quota. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + * @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 protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot|PropertyQuotasSnapshot}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async + */ + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined + ]>; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|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().catch(err => {throw err}); + this._log.info('getPropertyQuotasSnapshot request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPropertyQuotasSnapshot(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves a report task's content. After requesting the `CreateReportTask`, + * you are able to retrieve the report content once the report is + * ACTIVE. This method will return an error if the report task's state is not + * `ACTIVE`. A query response will return the tabular row & column values of + * the report. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report source name. + * Format: `properties/{property}/reportTasks/{report}` + * @param {number} [request.offset] + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.QueryReportTaskResponse|QueryReportTaskResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async + */ + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined + ]>; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|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().catch(err => {throw err}); + this._log.info('queryReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets report metadata about a specific report task. After creating a report + * task, use this method to check its processing state or inspect its + * report definition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async + */ + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined + ]>; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|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().catch(err => {throw err}); + this._log.info('getReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('getReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience list for later retrieval. This method quickly returns + * the audience list's resource name and initiates a long running asynchronous + * request to form an audience list. To list the users in an audience list, + * first create the audience list through this method and then send the + * audience resource name to the `QueryAudienceList` method. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * An audience list is a snapshot of the users currently in the audience at + * the time of audience list creation. Creating audience lists for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience lists contain + * the users in each audience. + * + * This method is available at beta stability at + * [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.AudienceList} request.audienceList + * Required. The audience list to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceList response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceList request %j', request); + return this.innerApiCalls.createAudienceList(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceList response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceList()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + async checkCreateAudienceListProgress(name: string): Promise>{ + this._log.info('createAudienceList long-running'); + 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.createAudienceList, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Initiates the creation of a report task. This method quickly + * returns a report task and initiates a long running + * asynchronous request to form a customized report of your Google Analytics + * event data. + * + * A report task will be retained and available for querying for 72 hours + * after it has been created. + * + * A report task created by one user can be listed and queried by all users + * who have access to the property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + * @param {google.analytics.data.v1alpha.ReportTask} request.reportTask + * Required. The report task configuration to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createReportTask response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createReportTask request %j', request); + return this.innerApiCalls.createReportTask(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createReportTask response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createReportTask()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + async checkCreateReportTaskProgress(name: string): Promise>{ + this._log.info('createReportTask long-running'); + 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.createReportTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience lists for a property. This method can be used for you to + * find and reuse existing audience lists rather than creating unnecessary new + * audience lists. The same audience can have multiple audience lists that + * represent the list of users that were in an audience on different days. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * 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 `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceLists request %j', request); + return this.innerApiCalls + .listAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]) => { + this._log.info('listAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList} 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 `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + 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['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists stream %j', request); + return this.descriptors.page.listAudienceLists.createStream( + this.innerApiCalls.listAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceLists`, 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. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async + */ + listAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + 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['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists iterate %j', request); + return this.descriptors.page.listAudienceLists.asyncIterate( + this.innerApiCalls['listAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all recurring audience lists for a property. This method can be used + * for you to find and reuse existing recurring audience lists rather than + * creating unnecessary new recurring audience lists. The same audience can + * have multiple recurring audience lists that represent different dimension + * combinations; for example, just the dimension `deviceId` or both the + * dimensions `deviceId` and `userId`. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * 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 `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRecurringAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRecurringAudienceLists request %j', request); + return this.innerApiCalls + .listRecurringAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]) => { + this._log.info('listRecurringAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRecurringAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList} 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 `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + 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['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists stream %j', request); + return this.descriptors.page.listRecurringAudienceLists.createStream( + this.innerApiCalls.listRecurringAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRecurringAudienceLists`, 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. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async + */ + listRecurringAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + 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['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists iterate %j', request); + return this.descriptors.page.listRecurringAudienceLists.asyncIterate( + this.innerApiCalls['listRecurringAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all report tasks for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * 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 `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listReportTasks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listReportTasks request %j', request); + return this.innerApiCalls + .listReportTasks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]) => { + this._log.info('listReportTasks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listReportTasks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask} 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 `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasksStream( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + 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['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks stream %j', request); + return this.descriptors.page.listReportTasks.createStream( + this.innerApiCalls.listReportTasks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listReportTasks`, 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. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async + */ + listReportTasksAsync( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + 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['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks iterate %j', request); + return this.descriptors.page.listReportTasks.asyncIterate( + this.innerApiCalls['listReportTasks'] 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, + optionsOrCallback?: + | 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]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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 { + 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 ?? '', + }); + 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, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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, + optionsOrCallback?: + | 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 { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceList resource name string. + * + * @param {string} property + * @param {string} audience_list + * @returns {string} Resource name string. + */ + audienceListPath(property:string,audienceList:string) { + return this.pathTemplates.audienceListPathTemplate.render({ + property: property, + audience_list: audienceList, + }); + } + + /** + * Parse the property from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).property; + } + + /** + * Parse the audience_list from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the audience_list. + */ + matchAudienceListFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Return a fully-qualified propertyQuotasSnapshot resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyQuotasSnapshotPath(property:string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from PropertyQuotasSnapshot resource. + * + * @param {string} propertyQuotasSnapshotName + * A fully-qualified path representing PropertyQuotasSnapshot resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName: string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.match(propertyQuotasSnapshotName).property; + } + + /** + * Return a fully-qualified recurringAudienceList resource name string. + * + * @param {string} property + * @param {string} recurring_audience_list + * @returns {string} Resource name string. + */ + recurringAudienceListPath(property:string,recurringAudienceList:string) { + return this.pathTemplates.recurringAudienceListPathTemplate.render({ + property: property, + recurring_audience_list: recurringAudienceList, + }); + } + + /** + * Parse the property from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).property; + } + + /** + * Parse the recurring_audience_list from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the recurring_audience_list. + */ + matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).recurring_audience_list; + } + + /** + * Return a fully-qualified reportTask resource name string. + * + * @param {string} property + * @param {string} report_task + * @returns {string} Resource name string. + */ + reportTaskPath(property:string,reportTask:string) { + return this.pathTemplates.reportTaskPathTemplate.render({ + property: property, + report_task: reportTask, + }); + } + + /** + * Parse the property from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).property; + } + + /** + * Parse the report_task from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the report_task. + */ + matchReportTaskFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).report_task; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.alphaAnalyticsDataStub && !this._terminated) { + return this.alphaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client_config.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client_config.json new file mode 100644 index 000000000000..2fcd35e324d9 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_client_config.json @@ -0,0 +1,108 @@ +{ + "interfaces": { + "google.analytics.data.v1alpha.AlphaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunFunnelReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SheetExportAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListRecurringAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetPropertyQuotasSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListReportTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_proto_list.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_proto_list.json new file mode 100644 index 000000000000..5047e31ed5c6 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/alpha_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1alpha/analytics_data_api.proto", + "../../protos/google/analytics/data/v1alpha/data.proto" +] diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/gapic_metadata.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..3421a0a0ced8 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/gapic_metadata.json @@ -0,0 +1,175 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1alpha", + "libraryPackage": "@google-cloud/data", + "services": { + "AlphaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "SheetExportAudienceList": { + "methods": [ + "sheetExportAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "SheetExportAudienceList": { + "methods": [ + "sheetExportAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/index.ts new file mode 100644 index 000000000000..74c468809b3d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 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. ** + +export {AlphaAnalyticsDataClient} from './alpha_analytics_data_client'; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..a5c74110d340 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const data = require('@google-cloud/data'); + +function main() { + const alphaAnalyticsDataClient = new data.AlphaAnalyticsDataClient(); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..ea8b42947b25 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 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. ** + +import {AlphaAnalyticsDataClient} from '@google-cloud/data'; + +// check that the client class type name can be used +function doStuffWithAlphaAnalyticsDataClient(client: AlphaAnalyticsDataClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const alphaAnalyticsDataClient = new AlphaAnalyticsDataClient(); + doStuffWithAlphaAnalyticsDataClient(alphaAnalyticsDataClient); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/install.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 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. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/test/gapic_alpha_analytics_data_v1alpha.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/test/gapic_alpha_analytics_data_v1alpha.ts new file mode 100644 index 000000000000..4e211f29c9cb --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/test/gapic_alpha_analytics_data_v1alpha.ts @@ -0,0 +1,2724 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as alphaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +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 +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : 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) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.AlphaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.alphaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.alphaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runFunnelReport', () => { + it('invokes runFunnelReport without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCall(expectedResponse); + const [response] = await client.runFunnelReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runFunnelReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunFunnelReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runFunnelReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runFunnelReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runFunnelReport(request), expectedError); + }); + }); + + describe('queryAudienceList', () => { + it('invokes queryAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryAudienceListResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceList(request), expectedError); + }); + }); + + describe('sheetExportAudienceList', () => { + it('invokes sheetExportAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() + ); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.sheetExportAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() + ); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.sheetExportAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.sheetExportAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.sheetExportAudienceList(request), expectedError); + }); + }); + + describe('getAudienceList', () => { + it('invokes getAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceList(request), expectedError); + }); + }); + + describe('createRecurringAudienceList', () => { + it('invokes createRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.createRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + }); + }); + + describe('getRecurringAudienceList', () => { + it('invokes getRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + }); + }); + + describe('getPropertyQuotasSnapshot', () => { + it('invokes getPropertyQuotasSnapshot without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getPropertyQuotasSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPropertyQuotasSnapshot( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + }); + }); + + describe('queryReportTask', () => { + it('invokes queryReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.queryReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryReportTaskResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryReportTask(request), expectedError); + }); + }); + + describe('getReportTask', () => { + it('invokes getReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.getReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getReportTask(request), expectedError); + }); + }); + + describe('createAudienceList', () => { + it('invokes createAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceList( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceList(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceListProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateAudienceListProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceListProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceListProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createReportTask', () => { + it('invokes createReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createReportTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReportTask( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createReportTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReportTaskProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateReportTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReportTaskProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateReportTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceLists', () => { + it('invokes listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + 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.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + const iterable = client.listAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRecurringAudienceLists', () => { + it('invokes listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listRecurringAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRecurringAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRecurringAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + 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.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRecurringAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + const iterable = client.listRecurringAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRecurringAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReportTasks', () => { + it('invokes listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listReportTasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReportTasks( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReportTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReportTasks(request), expectedError); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasksStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + 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.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReportTasksStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + const iterable = client.listReportTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReportTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceList', async () => { + const fakePath = "/rendered/path/audienceList"; + const expectedParameters = { + property: "propertyValue", + audience_list: "audienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceListPath', () => { + const result = client.audienceListPath("propertyValue", "audienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceListName', () => { + const result = client.matchPropertyFromAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceListFromAudienceListName', () => { + const result = client.matchAudienceListFromAudienceListName(fakePath); + assert.strictEqual(result, "audienceListValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('propertyQuotasSnapshot', async () => { + const fakePath = "/rendered/path/propertyQuotasSnapshot"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyQuotasSnapshotPath', () => { + const result = client.propertyQuotasSnapshotPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyQuotasSnapshotName', () => { + const result = client.matchPropertyFromPropertyQuotasSnapshotName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('recurringAudienceList', async () => { + const fakePath = "/rendered/path/recurringAudienceList"; + const expectedParameters = { + property: "propertyValue", + recurring_audience_list: "recurringAudienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.recurringAudienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.recurringAudienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('recurringAudienceListPath', () => { + const result = client.recurringAudienceListPath("propertyValue", "recurringAudienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.recurringAudienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromRecurringAudienceListName', () => { + const result = client.matchPropertyFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRecurringAudienceListFromRecurringAudienceListName', () => { + const result = client.matchRecurringAudienceListFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "recurringAudienceListValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('reportTask', async () => { + const fakePath = "/rendered/path/reportTask"; + const expectedParameters = { + property: "propertyValue", + report_task: "reportTaskValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportTaskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportTaskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportTaskPath', () => { + const result = client.reportTaskPath("propertyValue", "reportTaskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportTaskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromReportTaskName', () => { + const result = client.matchPropertyFromReportTaskName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportTaskFromReportTaskName', () => { + const result = client.matchReportTaskFromReportTaskName(fakePath); + assert.strictEqual(result, "reportTaskValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/tsconfig.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/webpack.config.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/webpack.config.js new file mode 100644 index 000000000000..f5f52a892738 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/analytics-data-v1alpha-nodejs/webpack.config.js @@ -0,0 +1,64 @@ +// 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 +// +// 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'AlphaAnalyticsData', + filename: './alpha-analytics-data.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintrc.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitattributes b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.jsdoc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.jsdoc.js new file mode 100644 index 000000000000..eefc169441e0 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-analytics/data', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.mocharc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.mocharc.js new file mode 100644 index 000000000000..24e9d15257f9 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.nycrc b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierrc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierrc.js new file mode 100644 index 000000000000..d89a632f90b0 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CODE_OF_CONDUCT.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CONTRIBUTING.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CONTRIBUTING.md new file mode 100644 index 000000000000..11f6908f30cf --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/LICENSE b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/README.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/README.md new file mode 100644 index 000000000000..2bad2498319b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/README.md @@ -0,0 +1,108 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Google Analytics Data API: Nodejs Client][homepage] + +[//]: # "releaseLevel" + +[![npm version](https://img.shields.io/npm/v/@google-analytics/data.svg)](https://www.npmjs.org/package/@google-analytics/data) + +Google Analytics Data API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Google Analytics Data API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/data/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Analytics Data API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-analytics/data +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +[//]: # "samples" + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-analytics/data@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/package.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/package.json new file mode 100644 index 000000000000..d2e1726b8605 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-analytics/data", + "version": "0.1.0", + "description": "Data client for Node.js", + "repository": "googleapis/nodejs-data", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google data", + "data", + "beta analytics data" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^5.1.1-rc.1" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.11", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.3", + "gts": "^6.0.2", + "jsdoc": "^4.0.5", + "jsdoc-fresh": "^5.0.2", + "jsdoc-region-tag": "^4.0.1", + "mocha": "^11.7.4", + "pack-n-play": "^4.2.1", + "typescript": "5.8.3", + "sinon": "^21.0.0" + }, + "engines": { + "node": ">=v18" + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/analytics_data_api.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/analytics_data_api.proto new file mode 100644 index 000000000000..7bb264ea5ac7 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/analytics_data_api.proto @@ -0,0 +1,1001 @@ +// Copyright 2025 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.analytics.data.v1beta; + +import "google/analytics/data/v1beta/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1beta"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service BetaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + // + // For a guide to constructing requests & understanding responses, see + // [Creating a + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns a customized pivot report of your Google Analytics event data. + // Pivot reports are more advanced and expressive formats than regular + // reports. In a pivot report, dimensions are only visible if they are + // included in a pivot. Multiple pivots can be specified to further dissect + // your data. + rpc RunPivotReport(RunPivotReportRequest) returns (RunPivotReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runPivotReport" + body: "*" + }; + } + + // Returns multiple reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunReports(BatchRunReportsRequest) + returns (BatchRunReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunReports" + body: "*" + }; + } + + // Returns multiple pivot reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunPivotReports(BatchRunPivotReportsRequest) + returns (BatchRunPivotReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunPivotReports" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics property identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a customized report of realtime event data for your property. + // Events appear in realtime reports seconds after they have been sent to + // the Google Analytics. Realtime reports show events and usage data for the + // periods of time ranging from the present moment to 30 minutes ago (up to + // 60 minutes for Google Analytics 360 properties). + // + // For a guide to constructing realtime requests & understanding responses, + // see [Creating a Realtime + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + rpc RunRealtimeReport(RunRealtimeReportRequest) + returns (RunRealtimeReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runRealtimeReport" + body: "*" + }; + } + + // This compatibility method lists dimensions and metrics that can be added to + // a report request and maintain compatibility. This method fails if the + // request's dimensions and metrics are incompatible. + // + // In Google Analytics, reports fail if they request incompatible dimensions + // and/or metrics; in that case, you will need to remove dimensions and/or + // metrics from the incompatible report until the report is compatible. + // + // The Realtime and Core reports have different compatibility rules. This + // method checks compatibility for Core reports. + rpc CheckCompatibility(CheckCompatibilityRequest) + returns (CheckCompatibilityResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:checkCompatibility" + body: "*" + }; + } + + // Creates an audience export for later retrieval. This method quickly returns + // the audience export's resource name and initiates a long running + // asynchronous request to form an audience export. To export the users in an + // audience export, first create the audience export through this method and + // then send the audience resource name to the `QueryAudienceExport` method. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // An audience export is a snapshot of the users currently in the audience at + // the time of audience export creation. Creating audience exports for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience exports + // contain the users in each audience. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceExport(CreateAudienceExportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/audienceExports" + body: "audience_export" + }; + option (google.api.method_signature) = "parent,audience_export"; + option (google.longrunning.operation_info) = { + response_type: "AudienceExport" + metadata_type: "AudienceExportMetadata" + }; + } + + // Retrieves an audience export of users. After creating an audience, the + // users are not immediately available for exporting. First, a request to + // `CreateAudienceExport` is necessary to create an audience export of users, + // and then second, this method is used to retrieve the users in the audience + // export. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceExport(QueryAudienceExportRequest) + returns (QueryAudienceExportResponse) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/audienceExports/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience export. This method + // can be used to understand an audience export after it has been created. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceExport(GetAudienceExportRequest) returns (AudienceExport) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/audienceExports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience exports for a property. This method can be used for you + // to find and reuse existing audience exports rather than creating + // unnecessary new audience exports. The same audience can have multiple + // audience exports that represent the export of users that were in an + // audience on different days. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceExports(ListAudienceExportsRequest) + returns (ListAudienceExportsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/audienceExports" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The request for compatibility information for a report's dimensions and +// metrics. Check compatibility provides a preview of the compatibility of a +// report; fields shared with the `runReport` request should be the same values +// as in your `runReport` request. +message CheckCompatibilityRequest { + // A Google Analytics property identifier whose events are tracked. To + // learn more, see [where to find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // `property` should be the same value as in your `runReport` request. + // + // Example: properties/1234 + string property = 1; + + // The dimensions in this report. `dimensions` should be the same value as in + // your `runReport` request. + repeated Dimension dimensions = 2; + + // The metrics in this report. `metrics` should be the same value as in your + // `runReport` request. + repeated Metric metrics = 3; + + // The filter clause of dimensions. `dimensionFilter` should be the same value + // as in your `runReport` request. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. `metricFilter` should be the same value as in + // your `runReport` request + FilterExpression metric_filter = 5; + + // Filters the dimensions and metrics in the response to just this + // compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + // to only return compatible dimensions & metrics. + Compatibility compatibility_filter = 6; +} + +// The compatibility response with the compatibility of each dimension & metric. +message CheckCompatibilityResponse { + // The compatibility of each dimension. + repeated DimensionCompatibility dimension_compatibilities = 1; + + // The compatibility of each metric. + repeated MetricCompatibility metric_compatibilities = 2; +} + +// The dimensions, metrics and comparisons currently accepted in reporting +// methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; + + // The comparison descriptions. + repeated ComparisonMetadata comparisons = 4; +} + +// The request to generate a report. +message RunReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // Date ranges of data to read. If multiple date ranges are requested, each + // response row will contain a zero based date range index. If two date + // ranges overlap, the event data for the overlapping days is included in the + // response rows for both date ranges. In a cohort request, this `dateRanges` + // must be unspecified. + repeated DateRange date_ranges = 4; + + // Dimension filters let you ask for only specific dimension values in + // the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5; + + // The filter clause of metrics. Applied after aggregating the report's rows, + // similar to SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 6; + + // The row count of the start row. The first row is counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + // Aggregates including both comparisons and multiple date ranges will + // be aggregated based on the date ranges. + repeated MetricAggregation metric_aggregations = 9; + + // Specifies how rows are ordered in the response. + // Requests including both comparisons and multiple date ranges will + // have order bys applied on the comparisons. + repeated OrderBy order_bys = 10; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14; + + // Optional. The configuration of comparisons requested and displayed. The + // request only requires a comparisons field in order to receive a comparison + // column in the response. + repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 9; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runReport". Useful to distinguish between + // response types in JSON. + string kind = 10; +} + +// The request to generate a pivot report. +message RunPivotReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested. All defined dimensions must be used by one of the + // following: dimension_expression, dimension_filter, pivots, order_bys. + repeated Dimension dimensions = 2; + + // The metrics requested, at least one metric needs to be specified. All + // defined metrics must be used by one of the following: metric_expression, + // metric_filter, order_bys. + repeated Metric metrics = 3; + + // The date range to retrieve event data for the report. If multiple date + // ranges are specified, event data from each date range is used in the + // report. A special dimension with field name "dateRange" can be included in + // a Pivot's field names; if included, the report compares between date + // ranges. In a cohort request, this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4; + + // Describes the visual format of the report's dimensions in columns or rows. + // The union of the fieldNames (dimension names) in all pivots must be a + // subset of dimension names defined in Dimensions. No two pivots can share a + // dimension. A dimension is only visible if it appears in a pivot. + repeated Pivot pivots = 5; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 6; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 7; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 8; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 9; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 10; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 11; + + // Optional. The configuration of comparisons requested and displayed. The + // request requires both a comparisons field and a comparisons dimension to + // receive a comparison column in the response. + repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response pivot report table corresponding to a pivot request. +message RunPivotReportResponse { + // Summarizes the columns and rows created by a pivot. Each pivot in the + // request produces one header in the response. If we have a request like + // this: + // + // "pivots": [{ + // "fieldNames": ["country", + // "city"] + // }, + // { + // "fieldNames": "eventName" + // }] + // + // We will have the following `pivotHeaders` in the response: + // + // "pivotHeaders" : [{ + // "dimensionHeaders": [{ + // "dimensionValues": [ + // { "value": "United Kingdom" }, + // { "value": "London" } + // ] + // }, + // { + // "dimensionValues": [ + // { "value": "Japan" }, + // { "value": "Osaka" } + // ] + // }] + // }, + // { + // "dimensionHeaders": [{ + // "dimensionValues": [{ "value": "session_start" }] + // }, + // { + // "dimensionValues": [{ "value": "scroll" }] + // }] + // }] + repeated PivotHeader pivot_headers = 1; + + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 2; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 3; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 4; + + // Aggregation of metric values. Can be totals, minimums, or maximums. The + // returned aggregations are controlled by the metric_aggregations in the + // pivot. The type of aggregation returned in each row is shown by the + // dimension_values which are set to "RESERVED_". + repeated Row aggregates = 5; + + // Metadata for the report. + ResponseMetaData metadata = 6; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 7; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runPivotReport". Useful to distinguish between + // response types in JSON. + string kind = 8; +} + +// The batch request containing multiple report requests. +message BatchRunReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate report response. Each + // batch request is allowed up to 5 requests. + repeated RunReportRequest requests = 2; +} + +// The batch response containing multiple reports. +message BatchRunReportsResponse { + // Individual responses. Each response has a separate report request. + repeated RunReportResponse reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunReports". Useful to distinguish between + // response types in JSON. + string kind = 2; +} + +// The batch request containing multiple pivot report requests. +message BatchRunPivotReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunPivotReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate pivot report response. + // Each batch request is allowed up to 5 requests. + repeated RunPivotReportRequest requests = 2; +} + +// The batch response containing multiple pivot reports. +message BatchRunPivotReportsResponse { + // Individual responses. Each response has a separate pivot report request. + repeated RunPivotReportResponse pivot_reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunPivotReports". Useful to distinguish + // between response types in JSON. + string kind = 2; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The request to generate a realtime report. +message RunRealtimeReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // The filter clause of dimensions. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 5; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + int64 limit = 6; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 7; + + // Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 8; + + // Toggles whether to return the current state of this Google Analytics + // property's Realtime quota. Quota is returned in + // [PropertyQuota](#PropertyQuota). + bool return_property_quota = 9; + + // The minute ranges of event data to read. If unspecified, one minute range + // for the last 30 minutes will be used. If multiple minute ranges are + // requested, each response row will contain a zero based minute range index. + // If two minute ranges overlap, the event data for the overlapping minutes is + // included in the response rows for both minute ranges. + repeated MinuteRange minute_ranges = 10; +} + +// The response realtime report table corresponding to a request. +message RunRealtimeReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response and the `limit` request + // parameter. For example if a query returns 175 rows and includes `limit` + // of 50 in the API request, the response will contain `rowCount` of 175 but + // only 50 rows. + int32 row_count = 7; + + // This Google Analytics property's Realtime quota state including this + // request. + PropertyQuota property_quota = 8; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runRealtimeReport". Useful to distinguish + // between response types in JSON. + string kind = 9; +} + +// A request to retrieve configuration metadata about a specific audience +// export. +message GetAudienceExportRequest { + // Required. The audience export resource name. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; +} + +// A request to list all audience exports for a property. +message ListAudienceExportsRequest { + // Required. All audience exports for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Optional. The maximum number of audience exports to return. The service may + // return fewer than this value. If unspecified, at most 200 audience exports + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceExports` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceExports` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience exports for a property. +message ListAudienceExportsResponse { + // Each audience export for a property. + repeated AudienceExport audience_exports = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience export. +message CreateAudienceExportRequest { + // Required. The parent resource where this audience export will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Required. The audience export to create. + AudienceExport audience_export = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience export is a list of users in an audience at the time of the +// list's creation. One audience may have multiple audience exports created for +// different days. +message AudienceExport { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceExport" + pattern: "properties/{property}/audienceExports/{audience_export}" + plural: "audienceExports" + singular: "audienceExport" + }; + + // The AudienceExport currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceExport is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceExport call. + CREATING = 1; + + // The AudienceExport is fully created and ready for querying. An + // AudienceExport is updated to active asynchronously from a request; this + // occurs some time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceExport failed to be created. It is possible that + // re-requesting this audience export will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience export resource name assigned during + // creation. This resource name identifies this `AudienceExport`. + // + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceExport. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceExport was called and the + // AudienceExport began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceExport. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceExport + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceExport result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience export fails + // during creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This metadata is currently blank. +message AudienceExportMetadata {} + +// A request to list users in an audience export. +message QueryAudienceExportRequest { + // Required. The name of the audience export to retrieve users from. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience export. +message QueryAudienceExportResponse { + // Configuration data about AudienceExport being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceExport correspond to the columns in the AudienceRows. + optional AudienceExport audience_export = 1; + + // Rows for each user in an audience export. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceExport result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceExportResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/data.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/data.proto new file mode 100644 index 000000000000..8cfa6e491f7d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/google/analytics/data/v1beta/data.proto @@ -0,0 +1,1082 @@ +// Copyright 2025 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.analytics.data.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1beta"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., +// `endMinutesAgo`. Requests are allowed up to 2 minute ranges. +message MinuteRange { + // The inclusive start minute for the query as a number of minutes before now. + // For example, `"startMinutesAgo": 29` specifies the report should include + // event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. + // + // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics + // properties can request up to the last 30 minutes of event data + // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to + // the last 60 minutes of event data (`startMinutesAgo <= 59`). + optional int32 start_minutes_ago = 1; + + // The inclusive end minute for the query as a number of minutes before now. + // Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15` + // specifies the report should include event data from prior to 15 minutes + // ago. + // + // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics + // properties can request any minute in the last 30 minutes of event data + // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any + // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`). + optional int32 end_minutes_ago = 2; + + // Assigns a name to this minute range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, minute ranges are named by their zero based index + // in the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +// Requests are allowed up to 9 dimensions. +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// Defines an individual comparison. Most requests will include multiple +// comparisons so that the report compares between the comparisons. +message Comparison { + // Each comparison produces separate rows in the response. In the response, + // this comparison is identified by this name. If name is unspecified, we will + // use the saved comparisons display name. + optional string name = 1; + + // One kind of comparison value + oneof one_comparison { + // A basic comparison. + FilterExpression dimension_filter = 2; + + // A saved comparison identified by the comparison's resource name. + // For example, 'comparisons/1234'. + string comparison = 3; + } +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The filter for string + message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; + } + + // The result needs to be in a list of string values. + message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; + } + + // Filters for numeric or date values. + message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; + } + + // To express that the result needs to be between two numbers (inclusive). + message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; + } + + // Filter for empty values. + message EmptyFilter {} + + // The dimension name or metric name. + // + // In most methods, dimensions & metrics can be used for the first time in + // this field. However in a RunPivotReportRequest, this field must be + // additionally specified by name in the RunPivotReportRequest's dimensions or + // metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 3; + + // A filter for in list values. + InListFilter in_list_filter = 4; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 5; + + // A filter for two values. + BetweenFilter between_filter = 6; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 8; + } +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Sorts by a pivot column group. + message PivotOrderBy { + // A pair of dimension names and values. Rows with this dimension pivot pair + // are ordered by the metric's value. + // + // For example if pivots = {{"browser", "Chrome"}} and + // metric_name = "Sessions", + // then the rows will be sorted based on Sessions in Chrome. + // + // ---------|----------|----------------|----------|---------------- + // | Chrome | Chrome | Safari | Safari + // ---------|----------|----------------|----------|---------------- + // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions + // ---------|----------|----------------|----------|---------------- + // US | 2 | 2 | 3 | 1 + // ---------|----------|----------------|----------|---------------- + // Canada | 3 | 1 | 4 | 1 + // ---------|----------|----------------|----------|---------------- + message PivotSelection { + // Must be a dimension name from the request. + string dimension_name = 1; + + // Order by only when the named dimension is this value. + string dimension_value = 2; + } + + // In the response to order by, order rows by this column. Must be a metric + // name from the request. + string metric_name = 1; + + // Used to select a dimension name and value pivot. If multiple pivot + // selections are given, the sort occurs on rows where all pivot selection + // dimension name and value pairs match the row's dimension name and value + // pair. + repeated PivotSelection pivot_selections = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + + // Sorts results by a metric's values within a pivot column group. + PivotOrderBy pivot = 3; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// Describes the visible dimension columns and rows in the report response. +message Pivot { + // Dimension names for visible columns in the report response. Including + // "dateRange" produces a date range column; for each row in the response, + // dimension values in the date range column will indicate the corresponding + // date range from the request. + repeated string field_names = 1; + + // Specifies how dimensions are ordered in the pivot. In the first Pivot, the + // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent + // Pivots, the OrderBys determine only PivotDimensionHeader ordering. + // Dimensions specified in these OrderBys must be a subset of + // Pivot.field_names. + repeated OrderBy order_bys = 2; + + // The row count of the start row. The first row is counted as row 0. + int64 offset = 3; + + // The number of unique combinations of dimension values to return in this + // pivot. The `limit` parameter is required. A `limit` of 10,000 is common for + // single pivot requests. + // + // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` + // must not exceed 250,000. For example, a two pivot request with `limit: + // 1000` in each pivot will fail because the product is `1,000,000`. + int64 limit = 4; + + // Aggregate the metrics by dimensions in this pivot using the specified + // metric_aggregations. + repeated MetricAggregation metric_aggregations = 5; +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630). + optional bool subject_to_thresholding = 8; + + // If this report results is + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; +} + +// If this report results is +// [sampled](https://support.google.com/analytics/answer/13331292), this +// describes the percentage of events used in this report. Sampling is the +// practice of analyzing a subset of all data in order to uncover the meaningful +// information in the larger data set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Dimensions' values in a single pivot. +message PivotHeader { + // The size is the same as the cardinality of the corresponding dimension + // combinations. + repeated PivotDimensionHeader pivot_dimension_headers = 1; + + // The cardinality of the pivot. The total number of rows for this pivot's + // fields regardless of how the parameters `offset` and `limit` are specified + // in the request. + int32 row_count = 2; +} + +// Summarizes dimension values from a row for this pivot. +message PivotDimensionHeader { + // Values of multiple dimensions in a pivot. + repeated DimensionValue dimension_values = 1; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + optional int32 consumed = 1; + + // Quota remaining after this request. + optional int32 remaining = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is custom to this property. This includes user, + // event, & item scoped custom dimensions; to learn more about custom + // dimensions, see https://support.google.com/analytics/answer/14240153. This + // also include custom channel groups; to learn more about custom channel + // groups, see https://support.google.com/analytics/answer/13051316. + bool custom_definition = 5; + + // The display name of the category that this dimension belongs to. Similar + // dimensions and metrics are categorized together. + string category = 7; +} + +// Explains a metric. +message MetricMetadata { + // Justifications for why this metric is blocked. + enum BlockedReason { + // Will never be specified in API response. + BLOCKED_REASON_UNSPECIFIED = 0; + + // If present, your access is blocked to revenue related metrics for this + // property, and this metric is revenue related. + NO_REVENUE_METRICS = 1; + + // If present, your access is blocked to cost related metrics for this + // property, and this metric is cost related. + NO_COST_METRICS = 2; + } + + // A metric name. Useable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; + + // If reasons are specified, your access is blocked to this metric for this + // property. API requests from you to this property for this metric will + // succeed; however, the report will contain only zeros for this metric. API + // requests with metric filters on blocked metrics will fail. If reasons are + // empty, you have access to this metric. + // + // To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + repeated BlockedReason blocked_reasons = 8; + + // The display name of the category that this metrics belongs to. Similar + // dimensions and metrics are categorized together. + string category = 10; +} + +// The metadata for a single comparison. +message ComparisonMetadata { + // This comparison's resource name. Useable in [Comparison](#Comparison)'s + // `comparison` field. For example, 'comparisons/1234'. + string api_name = 1; + + // This comparison's name within the Google Analytics user interface. + string ui_name = 2; + + // This comparison's description. + string description = 3; +} + +// The compatibility for a single dimension. +message DimensionCompatibility { + // The dimension metadata contains the API name for this compatibility + // information. The dimension metadata also contains other helpful information + // like the UI name and description. + optional DimensionMetadata dimension_metadata = 1; + + // The compatibility of this dimension. If the compatibility is COMPATIBLE, + // this dimension can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// The compatibility for a single metric. +message MetricCompatibility { + // The metric metadata contains the API name for this compatibility + // information. The metric metadata also contains other helpful information + // like the UI name and description. + optional MetricMetadata metric_metadata = 1; + + // The compatibility of this metric. If the compatibility is COMPATIBLE, + // this metric can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// The compatibility types for a single dimension or metric. +enum Compatibility { + // Unspecified compatibility. + COMPATIBILITY_UNSPECIFIED = 0; + + // The dimension or metric is compatible. This dimension or metric can be + // successfully added to a report. + COMPATIBLE = 1; + + // The dimension or metric is incompatible. This dimension or metric cannot be + // successfully added to a report. + INCOMPATIBLE = 2; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.d.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.d.ts new file mode 100644 index 000000000000..587a4d351596 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.d.ts @@ -0,0 +1,15922 @@ +// Copyright 2025 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace analytics. */ + namespace analytics { + + /** Namespace data. */ + namespace data { + + /** Namespace v1beta. */ + namespace v1beta { + + /** Represents a BetaAnalyticsData */ + class BetaAnalyticsData extends $protobuf.rpc.Service { + + /** + * Constructs a new BetaAnalyticsData service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BetaAnalyticsData 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): BetaAnalyticsData; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunReportResponse + */ + public runReport(request: google.analytics.data.v1beta.IRunReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback): void; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @returns Promise + */ + public runReport(request: google.analytics.data.v1beta.IRunReportRequest): Promise; + + /** + * Calls RunPivotReport. + * @param request RunPivotReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunPivotReportResponse + */ + public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback): void; + + /** + * Calls RunPivotReport. + * @param request RunPivotReportRequest message or plain object + * @returns Promise + */ + public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest): Promise; + + /** + * Calls BatchRunReports. + * @param request BatchRunReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchRunReportsResponse + */ + public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback): void; + + /** + * Calls BatchRunReports. + * @param request BatchRunReportsRequest message or plain object + * @returns Promise + */ + public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest): Promise; + + /** + * Calls BatchRunPivotReports. + * @param request BatchRunPivotReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse + */ + public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback): void; + + /** + * Calls BatchRunPivotReports. + * @param request BatchRunPivotReportsRequest message or plain object + * @returns Promise + */ + public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): Promise; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Metadata + */ + public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback): void; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @returns Promise + */ + public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest): Promise; + + /** + * Calls RunRealtimeReport. + * @param request RunRealtimeReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunRealtimeReportResponse + */ + public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback): void; + + /** + * Calls RunRealtimeReport. + * @param request RunRealtimeReportRequest message or plain object + * @returns Promise + */ + public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest): Promise; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + */ + public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback): void; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @returns Promise + */ + public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest): Promise; + + /** + * Calls CreateAudienceExport. + * @param request CreateAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback): void; + + /** + * Calls CreateAudienceExport. + * @param request CreateAudienceExportRequest message or plain object + * @returns Promise + */ + public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest): Promise; + + /** + * Calls QueryAudienceExport. + * @param request QueryAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAudienceExportResponse + */ + public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback): void; + + /** + * Calls QueryAudienceExport. + * @param request QueryAudienceExportRequest message or plain object + * @returns Promise + */ + public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest): Promise; + + /** + * Calls GetAudienceExport. + * @param request GetAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceExport + */ + public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback): void; + + /** + * Calls GetAudienceExport. + * @param request GetAudienceExportRequest message or plain object + * @returns Promise + */ + public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest): Promise; + + /** + * Calls ListAudienceExports. + * @param request ListAudienceExportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceExportsResponse + */ + public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback): void; + + /** + * Calls ListAudienceExports. + * @param request ListAudienceExportsRequest message or plain object + * @returns Promise + */ + public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest): Promise; + } + + namespace BetaAnalyticsData { + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. + * @param error Error, if any + * @param [response] RunReportResponse + */ + type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. + * @param error Error, if any + * @param [response] RunPivotReportResponse + */ + type RunPivotReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunPivotReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. + * @param error Error, if any + * @param [response] BatchRunReportsResponse + */ + type BatchRunReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunReportsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. + * @param error Error, if any + * @param [response] BatchRunPivotReportsResponse + */ + type BatchRunPivotReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunPivotReportsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. + * @param error Error, if any + * @param [response] Metadata + */ + type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1beta.Metadata) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. + * @param error Error, if any + * @param [response] RunRealtimeReportResponse + */ + type RunRealtimeReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunRealtimeReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. + * @param error Error, if any + * @param [response] CheckCompatibilityResponse + */ + type CheckCompatibilityCallback = (error: (Error|null), response?: google.analytics.data.v1beta.CheckCompatibilityResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAudienceExportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. + * @param error Error, if any + * @param [response] QueryAudienceExportResponse + */ + type QueryAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.QueryAudienceExportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. + * @param error Error, if any + * @param [response] AudienceExport + */ + type GetAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.AudienceExport) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. + * @param error Error, if any + * @param [response] ListAudienceExportsResponse + */ + type ListAudienceExportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.ListAudienceExportsResponse) => void; + } + + /** Properties of a CheckCompatibilityRequest. */ + interface ICheckCompatibilityRequest { + + /** CheckCompatibilityRequest property */ + property?: (string|null); + + /** CheckCompatibilityRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** CheckCompatibilityRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** CheckCompatibilityRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest compatibilityFilter */ + compatibilityFilter?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a CheckCompatibilityRequest. */ + class CheckCompatibilityRequest implements ICheckCompatibilityRequest { + + /** + * Constructs a new CheckCompatibilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest); + + /** CheckCompatibilityRequest property. */ + public property: string; + + /** CheckCompatibilityRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** CheckCompatibilityRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** CheckCompatibilityRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest compatibilityFilter. */ + public compatibilityFilter: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility); + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityRequest + * @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.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityRequest + * @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.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Verifies a CheckCompatibilityRequest 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 CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @param message CheckCompatibilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckCompatibilityResponse. */ + interface ICheckCompatibilityResponse { + + /** CheckCompatibilityResponse dimensionCompatibilities */ + dimensionCompatibilities?: (google.analytics.data.v1beta.IDimensionCompatibility[]|null); + + /** CheckCompatibilityResponse metricCompatibilities */ + metricCompatibilities?: (google.analytics.data.v1beta.IMetricCompatibility[]|null); + } + + /** Represents a CheckCompatibilityResponse. */ + class CheckCompatibilityResponse implements ICheckCompatibilityResponse { + + /** + * Constructs a new CheckCompatibilityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse); + + /** CheckCompatibilityResponse dimensionCompatibilities. */ + public dimensionCompatibilities: google.analytics.data.v1beta.IDimensionCompatibility[]; + + /** CheckCompatibilityResponse metricCompatibilities. */ + public metricCompatibilities: google.analytics.data.v1beta.IMetricCompatibility[]; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityResponse + * @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.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityResponse + * @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.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Verifies a CheckCompatibilityResponse 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 CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @param message CheckCompatibilityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata name */ + name?: (string|null); + + /** Metadata dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimensionMetadata[]|null); + + /** Metadata metrics */ + metrics?: (google.analytics.data.v1beta.IMetricMetadata[]|null); + + /** Metadata comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparisonMetadata[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetadata); + + /** Metadata name. */ + public name: string; + + /** Metadata dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimensionMetadata[]; + + /** Metadata metrics. */ + public metrics: google.analytics.data.v1beta.IMetricMetadata[]; + + /** Metadata comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparisonMetadata[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetadata): google.analytics.data.v1beta.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @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.analytics.data.v1beta.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @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.analytics.data.v1beta.Metadata; + + /** + * Verifies a Metadata 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 Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportRequest. */ + interface IRunReportRequest { + + /** RunReportRequest property */ + property?: (string|null); + + /** RunReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); + + /** RunReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest offset */ + offset?: (number|Long|string|null); + + /** RunReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + + /** RunReportRequest orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** RunReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunReportRequest comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparison[]|null); + } + + /** Represents a RunReportRequest. */ + class RunReportRequest implements IRunReportRequest { + + /** + * Constructs a new RunReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunReportRequest); + + /** RunReportRequest property. */ + public property: string; + + /** RunReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1beta.IDateRange[]; + + /** RunReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest offset. */ + public offset: (number|Long|string); + + /** RunReportRequest limit. */ + public limit: (number|Long|string); + + /** RunReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** RunReportRequest orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** RunReportRequest currencyCode. */ + public currencyCode: string; + + /** RunReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunReportRequest comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparison[]; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunReportRequest): google.analytics.data.v1beta.RunReportRequest; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportRequest + * @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.analytics.data.v1beta.RunReportRequest; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportRequest + * @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.analytics.data.v1beta.RunReportRequest; + + /** + * Verifies a RunReportRequest 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 RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportRequest; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @param message RunReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportResponse. */ + interface IRunReportResponse { + + /** RunReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse totals */ + totals?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse maximums */ + maximums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse minimums */ + minimums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse rowCount */ + rowCount?: (number|null); + + /** RunReportResponse metadata */ + metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunReportResponse. */ + class RunReportResponse implements IRunReportResponse { + + /** + * Constructs a new RunReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunReportResponse); + + /** RunReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse totals. */ + public totals: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse maximums. */ + public maximums: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse minimums. */ + public minimums: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse rowCount. */ + public rowCount: number; + + /** RunReportResponse metadata. */ + public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunReportResponse): google.analytics.data.v1beta.RunReportResponse; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportResponse + * @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.analytics.data.v1beta.RunReportResponse; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportResponse + * @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.analytics.data.v1beta.RunReportResponse; + + /** + * Verifies a RunReportResponse 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 RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportResponse; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @param message RunReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunPivotReportRequest. */ + interface IRunPivotReportRequest { + + /** RunPivotReportRequest property */ + property?: (string|null); + + /** RunPivotReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunPivotReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunPivotReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); + + /** RunPivotReportRequest pivots */ + pivots?: (google.analytics.data.v1beta.IPivot[]|null); + + /** RunPivotReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunPivotReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunPivotReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunPivotReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunPivotReportRequest comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparison[]|null); + } + + /** Represents a RunPivotReportRequest. */ + class RunPivotReportRequest implements IRunPivotReportRequest { + + /** + * Constructs a new RunPivotReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunPivotReportRequest); + + /** RunPivotReportRequest property. */ + public property: string; + + /** RunPivotReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunPivotReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunPivotReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1beta.IDateRange[]; + + /** RunPivotReportRequest pivots. */ + public pivots: google.analytics.data.v1beta.IPivot[]; + + /** RunPivotReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest currencyCode. */ + public currencyCode: string; + + /** RunPivotReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunPivotReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunPivotReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunPivotReportRequest comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparison[]; + + /** + * Creates a new RunPivotReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunPivotReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunPivotReportRequest): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @param message RunPivotReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @param message RunPivotReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunPivotReportRequest + * @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.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunPivotReportRequest + * @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.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Verifies a RunPivotReportRequest 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 RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunPivotReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. + * @param message RunPivotReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunPivotReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunPivotReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunPivotReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunPivotReportResponse. */ + interface IRunPivotReportResponse { + + /** RunPivotReportResponse pivotHeaders */ + pivotHeaders?: (google.analytics.data.v1beta.IPivotHeader[]|null); + + /** RunPivotReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunPivotReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunPivotReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunPivotReportResponse aggregates */ + aggregates?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunPivotReportResponse metadata */ + metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunPivotReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunPivotReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunPivotReportResponse. */ + class RunPivotReportResponse implements IRunPivotReportResponse { + + /** + * Constructs a new RunPivotReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunPivotReportResponse); + + /** RunPivotReportResponse pivotHeaders. */ + public pivotHeaders: google.analytics.data.v1beta.IPivotHeader[]; + + /** RunPivotReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunPivotReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunPivotReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunPivotReportResponse aggregates. */ + public aggregates: google.analytics.data.v1beta.IRow[]; + + /** RunPivotReportResponse metadata. */ + public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunPivotReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunPivotReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunPivotReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunPivotReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunPivotReportResponse): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @param message RunPivotReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @param message RunPivotReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunPivotReportResponse + * @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.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunPivotReportResponse + * @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.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Verifies a RunPivotReportResponse 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 RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunPivotReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. + * @param message RunPivotReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunPivotReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunPivotReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunPivotReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunReportsRequest. */ + interface IBatchRunReportsRequest { + + /** BatchRunReportsRequest property */ + property?: (string|null); + + /** BatchRunReportsRequest requests */ + requests?: (google.analytics.data.v1beta.IRunReportRequest[]|null); + } + + /** Represents a BatchRunReportsRequest. */ + class BatchRunReportsRequest implements IBatchRunReportsRequest { + + /** + * Constructs a new BatchRunReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest); + + /** BatchRunReportsRequest property. */ + public property: string; + + /** BatchRunReportsRequest requests. */ + public requests: google.analytics.data.v1beta.IRunReportRequest[]; + + /** + * Creates a new BatchRunReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunReportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @param message BatchRunReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @param message BatchRunReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunReportsRequest + * @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.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunReportsRequest + * @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.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Verifies a BatchRunReportsRequest 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 BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. + * @param message BatchRunReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunReportsResponse. */ + interface IBatchRunReportsResponse { + + /** BatchRunReportsResponse reports */ + reports?: (google.analytics.data.v1beta.IRunReportResponse[]|null); + + /** BatchRunReportsResponse kind */ + kind?: (string|null); + } + + /** Represents a BatchRunReportsResponse. */ + class BatchRunReportsResponse implements IBatchRunReportsResponse { + + /** + * Constructs a new BatchRunReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse); + + /** BatchRunReportsResponse reports. */ + public reports: google.analytics.data.v1beta.IRunReportResponse[]; + + /** BatchRunReportsResponse kind. */ + public kind: string; + + /** + * Creates a new BatchRunReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunReportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @param message BatchRunReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @param message BatchRunReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunReportsResponse + * @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.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunReportsResponse + * @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.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Verifies a BatchRunReportsResponse 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 BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. + * @param message BatchRunReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunPivotReportsRequest. */ + interface IBatchRunPivotReportsRequest { + + /** BatchRunPivotReportsRequest property */ + property?: (string|null); + + /** BatchRunPivotReportsRequest requests */ + requests?: (google.analytics.data.v1beta.IRunPivotReportRequest[]|null); + } + + /** Represents a BatchRunPivotReportsRequest. */ + class BatchRunPivotReportsRequest implements IBatchRunPivotReportsRequest { + + /** + * Constructs a new BatchRunPivotReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest); + + /** BatchRunPivotReportsRequest property. */ + public property: string; + + /** BatchRunPivotReportsRequest requests. */ + public requests: google.analytics.data.v1beta.IRunPivotReportRequest[]; + + /** + * Creates a new BatchRunPivotReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunPivotReportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @param message BatchRunPivotReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @param message BatchRunPivotReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunPivotReportsRequest + * @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.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunPivotReportsRequest + * @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.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Verifies a BatchRunPivotReportsRequest 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 BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunPivotReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. + * @param message BatchRunPivotReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunPivotReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunPivotReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunPivotReportsResponse. */ + interface IBatchRunPivotReportsResponse { + + /** BatchRunPivotReportsResponse pivotReports */ + pivotReports?: (google.analytics.data.v1beta.IRunPivotReportResponse[]|null); + + /** BatchRunPivotReportsResponse kind */ + kind?: (string|null); + } + + /** Represents a BatchRunPivotReportsResponse. */ + class BatchRunPivotReportsResponse implements IBatchRunPivotReportsResponse { + + /** + * Constructs a new BatchRunPivotReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse); + + /** BatchRunPivotReportsResponse pivotReports. */ + public pivotReports: google.analytics.data.v1beta.IRunPivotReportResponse[]; + + /** BatchRunPivotReportsResponse kind. */ + public kind: string; + + /** + * Creates a new BatchRunPivotReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunPivotReportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @param message BatchRunPivotReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @param message BatchRunPivotReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunPivotReportsResponse + * @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.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunPivotReportsResponse + * @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.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Verifies a BatchRunPivotReportsResponse 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 BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunPivotReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. + * @param message BatchRunPivotReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunPivotReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunPivotReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMetadataRequest. */ + interface IGetMetadataRequest { + + /** GetMetadataRequest name */ + name?: (string|null); + } + + /** Represents a GetMetadataRequest. */ + class GetMetadataRequest implements IGetMetadataRequest { + + /** + * Constructs a new GetMetadataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IGetMetadataRequest); + + /** GetMetadataRequest name. */ + public name: string; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetadataRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IGetMetadataRequest): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetadataRequest + * @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.analytics.data.v1beta.GetMetadataRequest; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetadataRequest + * @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.analytics.data.v1beta.GetMetadataRequest; + + /** + * Verifies a GetMetadataRequest 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 GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetadataRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @param message GetMetadataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMetadataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMetadataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunRealtimeReportRequest. */ + interface IRunRealtimeReportRequest { + + /** RunRealtimeReportRequest property */ + property?: (string|null); + + /** RunRealtimeReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunRealtimeReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunRealtimeReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunRealtimeReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + + /** RunRealtimeReportRequest orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** RunRealtimeReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunRealtimeReportRequest minuteRanges */ + minuteRanges?: (google.analytics.data.v1beta.IMinuteRange[]|null); + } + + /** Represents a RunRealtimeReportRequest. */ + class RunRealtimeReportRequest implements IRunRealtimeReportRequest { + + /** + * Constructs a new RunRealtimeReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest); + + /** RunRealtimeReportRequest property. */ + public property: string; + + /** RunRealtimeReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunRealtimeReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunRealtimeReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest limit. */ + public limit: (number|Long|string); + + /** RunRealtimeReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** RunRealtimeReportRequest orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** RunRealtimeReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunRealtimeReportRequest minuteRanges. */ + public minuteRanges: google.analytics.data.v1beta.IMinuteRange[]; + + /** + * Creates a new RunRealtimeReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunRealtimeReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @param message RunRealtimeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @param message RunRealtimeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunRealtimeReportRequest + * @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.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunRealtimeReportRequest + * @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.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Verifies a RunRealtimeReportRequest 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 RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunRealtimeReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. + * @param message RunRealtimeReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunRealtimeReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunRealtimeReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunRealtimeReportResponse. */ + interface IRunRealtimeReportResponse { + + /** RunRealtimeReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunRealtimeReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunRealtimeReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse totals */ + totals?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse maximums */ + maximums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse minimums */ + minimums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse rowCount */ + rowCount?: (number|null); + + /** RunRealtimeReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunRealtimeReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunRealtimeReportResponse. */ + class RunRealtimeReportResponse implements IRunRealtimeReportResponse { + + /** + * Constructs a new RunRealtimeReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse); + + /** RunRealtimeReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunRealtimeReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunRealtimeReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse totals. */ + public totals: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse maximums. */ + public maximums: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse minimums. */ + public minimums: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse rowCount. */ + public rowCount: number; + + /** RunRealtimeReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunRealtimeReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunRealtimeReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunRealtimeReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @param message RunRealtimeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @param message RunRealtimeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunRealtimeReportResponse + * @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.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunRealtimeReportResponse + * @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.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Verifies a RunRealtimeReportResponse 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 RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunRealtimeReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. + * @param message RunRealtimeReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunRealtimeReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunRealtimeReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceExportRequest. */ + interface IGetAudienceExportRequest { + + /** GetAudienceExportRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceExportRequest. */ + class GetAudienceExportRequest implements IGetAudienceExportRequest { + + /** + * Constructs a new GetAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest); + + /** GetAudienceExportRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @param message GetAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @param message GetAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceExportRequest + * @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.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceExportRequest + * @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.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Verifies a GetAudienceExportRequest 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 GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. + * @param message GetAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.GetAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceExportsRequest. */ + interface IListAudienceExportsRequest { + + /** ListAudienceExportsRequest parent */ + parent?: (string|null); + + /** ListAudienceExportsRequest pageSize */ + pageSize?: (number|null); + + /** ListAudienceExportsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudienceExportsRequest. */ + class ListAudienceExportsRequest implements IListAudienceExportsRequest { + + /** + * Constructs a new ListAudienceExportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest); + + /** ListAudienceExportsRequest parent. */ + public parent: string; + + /** ListAudienceExportsRequest pageSize. */ + public pageSize: number; + + /** ListAudienceExportsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudienceExportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceExportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @param message ListAudienceExportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @param message ListAudienceExportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceExportsRequest + * @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.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceExportsRequest + * @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.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Verifies a ListAudienceExportsRequest 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 ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceExportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Creates a plain object from a ListAudienceExportsRequest message. Also converts values to other types if specified. + * @param message ListAudienceExportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceExportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceExportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceExportsResponse. */ + interface IListAudienceExportsResponse { + + /** ListAudienceExportsResponse audienceExports */ + audienceExports?: (google.analytics.data.v1beta.IAudienceExport[]|null); + + /** ListAudienceExportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudienceExportsResponse. */ + class ListAudienceExportsResponse implements IListAudienceExportsResponse { + + /** + * Constructs a new ListAudienceExportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse); + + /** ListAudienceExportsResponse audienceExports. */ + public audienceExports: google.analytics.data.v1beta.IAudienceExport[]; + + /** ListAudienceExportsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListAudienceExportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceExportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @param message ListAudienceExportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @param message ListAudienceExportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceExportsResponse + * @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.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceExportsResponse + * @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.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Verifies a ListAudienceExportsResponse 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 ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceExportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. + * @param message ListAudienceExportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceExportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceExportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceExportRequest. */ + interface ICreateAudienceExportRequest { + + /** CreateAudienceExportRequest parent */ + parent?: (string|null); + + /** CreateAudienceExportRequest audienceExport */ + audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + } + + /** Represents a CreateAudienceExportRequest. */ + class CreateAudienceExportRequest implements ICreateAudienceExportRequest { + + /** + * Constructs a new CreateAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest); + + /** CreateAudienceExportRequest parent. */ + public parent: string; + + /** CreateAudienceExportRequest audienceExport. */ + public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** + * Creates a new CreateAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @param message CreateAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @param message CreateAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceExportRequest + * @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.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceExportRequest + * @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.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Verifies a CreateAudienceExportRequest 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 CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. + * @param message CreateAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CreateAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceExport. */ + interface IAudienceExport { + + /** AudienceExport name */ + name?: (string|null); + + /** AudienceExport audience */ + audience?: (string|null); + + /** AudienceExport audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** AudienceExport dimensions */ + dimensions?: (google.analytics.data.v1beta.IAudienceDimension[]|null); + + /** AudienceExport state */ + state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); + + /** AudienceExport beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceExport creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** AudienceExport rowCount */ + rowCount?: (number|null); + + /** AudienceExport errorMessage */ + errorMessage?: (string|null); + + /** AudienceExport percentageCompleted */ + percentageCompleted?: (number|null); + } + + /** Represents an AudienceExport. */ + class AudienceExport implements IAudienceExport { + + /** + * Constructs a new AudienceExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceExport); + + /** AudienceExport name. */ + public name: string; + + /** AudienceExport audience. */ + public audience: string; + + /** AudienceExport audienceDisplayName. */ + public audienceDisplayName: string; + + /** AudienceExport dimensions. */ + public dimensions: google.analytics.data.v1beta.IAudienceDimension[]; + + /** AudienceExport state. */ + public state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); + + /** AudienceExport beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceExport creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** AudienceExport rowCount. */ + public rowCount?: (number|null); + + /** AudienceExport errorMessage. */ + public errorMessage?: (string|null); + + /** AudienceExport percentageCompleted. */ + public percentageCompleted?: (number|null); + + /** + * Creates a new AudienceExport instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceExport instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceExport): google.analytics.data.v1beta.AudienceExport; + + /** + * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @param message AudienceExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @param message AudienceExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceExport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceExport + * @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.analytics.data.v1beta.AudienceExport; + + /** + * Decodes an AudienceExport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceExport + * @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.analytics.data.v1beta.AudienceExport; + + /** + * Verifies an AudienceExport 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 AudienceExport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceExport + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExport; + + /** + * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. + * @param message AudienceExport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceExport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceExport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceExport { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + + /** Properties of an AudienceExportMetadata. */ + interface IAudienceExportMetadata { + } + + /** Represents an AudienceExportMetadata. */ + class AudienceExportMetadata implements IAudienceExportMetadata { + + /** + * Constructs a new AudienceExportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceExportMetadata); + + /** + * Creates a new AudienceExportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceExportMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceExportMetadata): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @param message AudienceExportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @param message AudienceExportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceExportMetadata + * @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.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceExportMetadata + * @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.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Verifies an AudienceExportMetadata 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 AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceExportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. + * @param message AudienceExportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceExportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceExportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceExportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceExportRequest. */ + interface IQueryAudienceExportRequest { + + /** QueryAudienceExportRequest name */ + name?: (string|null); + + /** QueryAudienceExportRequest offset */ + offset?: (number|Long|string|null); + + /** QueryAudienceExportRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryAudienceExportRequest. */ + class QueryAudienceExportRequest implements IQueryAudienceExportRequest { + + /** + * Constructs a new QueryAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest); + + /** QueryAudienceExportRequest name. */ + public name: string; + + /** QueryAudienceExportRequest offset. */ + public offset: (number|Long|string); + + /** QueryAudienceExportRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @param message QueryAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @param message QueryAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceExportRequest + * @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.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceExportRequest + * @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.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Verifies a QueryAudienceExportRequest 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 QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. + * @param message QueryAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceExportResponse. */ + interface IQueryAudienceExportResponse { + + /** QueryAudienceExportResponse audienceExport */ + audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** QueryAudienceExportResponse audienceRows */ + audienceRows?: (google.analytics.data.v1beta.IAudienceRow[]|null); + + /** QueryAudienceExportResponse rowCount */ + rowCount?: (number|null); + } + + /** Represents a QueryAudienceExportResponse. */ + class QueryAudienceExportResponse implements IQueryAudienceExportResponse { + + /** + * Constructs a new QueryAudienceExportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse); + + /** QueryAudienceExportResponse audienceExport. */ + public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** QueryAudienceExportResponse audienceRows. */ + public audienceRows: google.analytics.data.v1beta.IAudienceRow[]; + + /** QueryAudienceExportResponse rowCount. */ + public rowCount?: (number|null); + + /** + * Creates a new QueryAudienceExportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceExportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @param message QueryAudienceExportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @param message QueryAudienceExportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceExportResponse + * @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.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceExportResponse + * @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.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Verifies a QueryAudienceExportResponse 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 QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceExportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. + * @param message QueryAudienceExportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceExportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceExportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceRow. */ + interface IAudienceRow { + + /** AudienceRow dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IAudienceDimensionValue[]|null); + } + + /** Represents an AudienceRow. */ + class AudienceRow implements IAudienceRow { + + /** + * Constructs a new AudienceRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceRow); + + /** AudienceRow dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IAudienceDimensionValue[]; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceRow instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceRow): google.analytics.data.v1beta.AudienceRow; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceRow + * @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.analytics.data.v1beta.AudienceRow; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceRow + * @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.analytics.data.v1beta.AudienceRow; + + /** + * Verifies an AudienceRow 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 AudienceRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceRow; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @param message AudienceRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimension. */ + interface IAudienceDimension { + + /** AudienceDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AudienceDimension. */ + class AudienceDimension implements IAudienceDimension { + + /** + * Constructs a new AudienceDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceDimension); + + /** AudienceDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimension instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceDimension): google.analytics.data.v1beta.AudienceDimension; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimension + * @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.analytics.data.v1beta.AudienceDimension; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimension + * @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.analytics.data.v1beta.AudienceDimension; + + /** + * Verifies an AudienceDimension 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 AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimension; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @param message AudienceDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimensionValue. */ + interface IAudienceDimensionValue { + + /** AudienceDimensionValue value */ + value?: (string|null); + } + + /** Represents an AudienceDimensionValue. */ + class AudienceDimensionValue implements IAudienceDimensionValue { + + /** + * Constructs a new AudienceDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceDimensionValue); + + /** AudienceDimensionValue value. */ + public value?: (string|null); + + /** AudienceDimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceDimensionValue): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionValue + * @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.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionValue + * @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.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Verifies an AudienceDimensionValue 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 AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @param message AudienceDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange startDate */ + startDate?: (string|null); + + /** DateRange endDate */ + endDate?: (string|null); + + /** DateRange name */ + name?: (string|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDateRange); + + /** DateRange startDate. */ + public startDate: string; + + /** DateRange endDate. */ + public endDate: string; + + /** DateRange name. */ + public name: string; + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.analytics.data.v1beta.IDateRange): google.analytics.data.v1beta.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @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.analytics.data.v1beta.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @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.analytics.data.v1beta.DateRange; + + /** + * Verifies a DateRange 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 DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MinuteRange. */ + interface IMinuteRange { + + /** MinuteRange startMinutesAgo */ + startMinutesAgo?: (number|null); + + /** MinuteRange endMinutesAgo */ + endMinutesAgo?: (number|null); + + /** MinuteRange name */ + name?: (string|null); + } + + /** Represents a MinuteRange. */ + class MinuteRange implements IMinuteRange { + + /** + * Constructs a new MinuteRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMinuteRange); + + /** MinuteRange startMinutesAgo. */ + public startMinutesAgo?: (number|null); + + /** MinuteRange endMinutesAgo. */ + public endMinutesAgo?: (number|null); + + /** MinuteRange name. */ + public name: string; + + /** + * Creates a new MinuteRange instance using the specified properties. + * @param [properties] Properties to set + * @returns MinuteRange instance + */ + public static create(properties?: google.analytics.data.v1beta.IMinuteRange): google.analytics.data.v1beta.MinuteRange; + + /** + * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @param message MinuteRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @param message MinuteRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MinuteRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MinuteRange + * @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.analytics.data.v1beta.MinuteRange; + + /** + * Decodes a MinuteRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MinuteRange + * @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.analytics.data.v1beta.MinuteRange; + + /** + * Verifies a MinuteRange 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 MinuteRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MinuteRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MinuteRange; + + /** + * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. + * @param message MinuteRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MinuteRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MinuteRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MinuteRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension name */ + name?: (string|null); + + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimension); + + /** Dimension name. */ + public name: string; + + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimension): google.analytics.data.v1beta.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @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.analytics.data.v1beta.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @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.analytics.data.v1beta.Dimension; + + /** + * Verifies a Dimension 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 Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { + + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); + } + + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { + + /** + * Constructs a new DimensionExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionExpression); + + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionExpression): google.analytics.data.v1beta.DimensionExpression; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionExpression + * @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.analytics.data.v1beta.DimensionExpression; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionExpression + * @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.analytics.data.v1beta.DimensionExpression; + + /** + * Verifies a DimensionExpression 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 DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionExpression { + + /** Properties of a CaseExpression. */ + interface ICaseExpression { + + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } + + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { + + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression); + + /** CaseExpression dimensionName. */ + public dimensionName: string; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @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.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @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.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Verifies a CaseExpression 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 CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { + + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); + + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } + + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { + + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression); + + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; + + /** ConcatenateExpression delimiter. */ + public delimiter: string; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @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.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @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.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression 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 ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric expression. */ + public expression: string; + + /** Metric invisible. */ + public invisible: boolean; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetric): google.analytics.data.v1beta.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @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.analytics.data.v1beta.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @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.analytics.data.v1beta.Metric; + + /** + * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Comparison. */ + interface IComparison { + + /** Comparison name */ + name?: (string|null); + + /** Comparison dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** Comparison comparison */ + comparison?: (string|null); + } + + /** Represents a Comparison. */ + class Comparison implements IComparison { + + /** + * Constructs a new Comparison. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IComparison); + + /** Comparison name. */ + public name?: (string|null); + + /** Comparison dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** Comparison comparison. */ + public comparison?: (string|null); + + /** Comparison oneComparison. */ + public oneComparison?: ("dimensionFilter"|"comparison"); + + /** + * Creates a new Comparison instance using the specified properties. + * @param [properties] Properties to set + * @returns Comparison instance + */ + public static create(properties?: google.analytics.data.v1beta.IComparison): google.analytics.data.v1beta.Comparison; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Comparison + * @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.analytics.data.v1beta.Comparison; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Comparison + * @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.analytics.data.v1beta.Comparison; + + /** + * Verifies a Comparison 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 Comparison message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Comparison + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Comparison; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @param message Comparison + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Comparison to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Comparison + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpression. */ + interface IFilterExpression { + + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1beta.IFilter|null); + } + + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { + + /** + * Constructs a new FilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilterExpression); + + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1beta.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilterExpression): google.analytics.data.v1beta.FilterExpression; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpression + * @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.analytics.data.v1beta.FilterExpression; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpression + * @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.analytics.data.v1beta.FilterExpression; + + /** + * Verifies a FilterExpression 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 FilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpression; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { + + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1beta.IFilterExpression[]|null); + } + + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { + + /** + * Constructs a new FilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilterExpressionList); + + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1beta.IFilterExpression[]; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilterExpressionList): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpressionList + * @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.analytics.data.v1beta.FilterExpressionList; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpressionList + * @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.analytics.data.v1beta.FilterExpressionList; + + /** + * Verifies a FilterExpressionList 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 FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldName */ + fieldName?: (string|null); + + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); + + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); + + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); + + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); + + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilter); + + /** Filter fieldName. */ + public fieldName: string; + + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); + + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); + + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); + + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilter): google.analytics.data.v1beta.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @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.analytics.data.v1beta.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @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.analytics.data.v1beta.Filter; + + /** + * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Filter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IStringFilter): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @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.analytics.data.v1beta.Filter.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @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.analytics.data.v1beta.Filter.StringFilter; + + /** + * Verifies a StringFilter 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 StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IInListFilter): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @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.analytics.data.v1beta.Filter.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @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.analytics.data.v1beta.Filter.InListFilter; + + /** + * Verifies an InListFilter 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 InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1beta.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1beta.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.INumericFilter): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @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.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @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.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Verifies a NumericFilter 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 NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1beta.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @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.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @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.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Verifies a BetweenFilter 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 BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @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.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @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.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Verifies an EmptyFilter 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 EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); + + /** OrderBy pivot */ + pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); + + /** OrderBy pivot. */ + public pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"|"pivot"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.IOrderBy): google.analytics.data.v1beta.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @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.analytics.data.v1beta.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @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.analytics.data.v1beta.OrderBy; + + /** + * Verifies an OrderBy 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 OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @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.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @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.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy 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 MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @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.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @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.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy 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 DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + + /** Properties of a PivotOrderBy. */ + interface IPivotOrderBy { + + /** PivotOrderBy metricName */ + metricName?: (string|null); + + /** PivotOrderBy pivotSelections */ + pivotSelections?: (google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]|null); + } + + /** Represents a PivotOrderBy. */ + class PivotOrderBy implements IPivotOrderBy { + + /** + * Constructs a new PivotOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy); + + /** PivotOrderBy metricName. */ + public metricName: string; + + /** PivotOrderBy pivotSelections. */ + public pivotSelections: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]; + + /** + * Creates a new PivotOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @param message PivotOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @param message PivotOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotOrderBy + * @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.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotOrderBy + * @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.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Verifies a PivotOrderBy 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 PivotOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. + * @param message PivotOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PivotOrderBy { + + /** Properties of a PivotSelection. */ + interface IPivotSelection { + + /** PivotSelection dimensionName */ + dimensionName?: (string|null); + + /** PivotSelection dimensionValue */ + dimensionValue?: (string|null); + } + + /** Represents a PivotSelection. */ + class PivotSelection implements IPivotSelection { + + /** + * Constructs a new PivotSelection. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection); + + /** PivotSelection dimensionName. */ + public dimensionName: string; + + /** PivotSelection dimensionValue. */ + public dimensionValue: string; + + /** + * Creates a new PivotSelection instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotSelection instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @param message PivotSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @param message PivotSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotSelection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotSelection + * @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.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Decodes a PivotSelection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotSelection + * @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.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Verifies a PivotSelection 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 PivotSelection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotSelection + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. + * @param message PivotSelection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotSelection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotSelection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Pivot. */ + interface IPivot { + + /** Pivot fieldNames */ + fieldNames?: (string[]|null); + + /** Pivot orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** Pivot offset */ + offset?: (number|Long|string|null); + + /** Pivot limit */ + limit?: (number|Long|string|null); + + /** Pivot metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + } + + /** Represents a Pivot. */ + class Pivot implements IPivot { + + /** + * Constructs a new Pivot. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivot); + + /** Pivot fieldNames. */ + public fieldNames: string[]; + + /** Pivot orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** Pivot offset. */ + public offset: (number|Long|string); + + /** Pivot limit. */ + public limit: (number|Long|string); + + /** Pivot metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** + * Creates a new Pivot instance using the specified properties. + * @param [properties] Properties to set + * @returns Pivot instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivot): google.analytics.data.v1beta.Pivot; + + /** + * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @param message Pivot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @param message Pivot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pivot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pivot + * @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.analytics.data.v1beta.Pivot; + + /** + * Decodes a Pivot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pivot + * @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.analytics.data.v1beta.Pivot; + + /** + * Verifies a Pivot 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 Pivot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pivot + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Pivot; + + /** + * Creates a plain object from a Pivot message. Also converts values to other types if specified. + * @param message Pivot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Pivot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pivot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pivot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortSpec. */ + interface ICohortSpec { + + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1beta.ICohort[]|null); + + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); + + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); + } + + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { + + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortSpec); + + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1beta.ICohort[]; + + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); + + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); + + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortSpec): google.analytics.data.v1beta.CohortSpec; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @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.analytics.data.v1beta.CohortSpec; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @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.analytics.data.v1beta.CohortSpec; + + /** + * Verifies a CohortSpec 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 CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortSpec; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cohort. */ + interface ICohort { + + /** Cohort name */ + name?: (string|null); + + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1beta.IDateRange|null); + } + + /** Represents a Cohort. */ + class Cohort implements ICohort { + + /** + * Constructs a new Cohort. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohort); + + /** Cohort name. */ + public name: string; + + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1beta.IDateRange|null); + + /** + * Creates a new Cohort instance using the specified properties. + * @param [properties] Properties to set + * @returns Cohort instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohort): google.analytics.data.v1beta.Cohort; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cohort + * @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.analytics.data.v1beta.Cohort; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cohort + * @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.analytics.data.v1beta.Cohort; + + /** + * Verifies a Cohort 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 Cohort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cohort + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Cohort; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cohort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cohort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { + + /** + * Constructs a new CohortsRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortsRange instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortsRange): google.analytics.data.v1beta.CohortsRange; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortsRange + * @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.analytics.data.v1beta.CohortsRange; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortsRange + * @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.analytics.data.v1beta.CohortsRange; + + /** + * Verifies a CohortsRange 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 CohortsRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortsRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortsRange; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortsRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortsRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CohortsRange { + + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } + + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); + } + + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { + + /** + * Constructs a new CohortReportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortReportSettings); + + /** CohortReportSettings accumulate. */ + public accumulate: boolean; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortReportSettings instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortReportSettings): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortReportSettings + * @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.analytics.data.v1beta.CohortReportSettings; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortReportSettings + * @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.analytics.data.v1beta.CohortReportSettings; + + /** + * Verifies a CohortReportSettings 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 CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortReportSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortReportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortReportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { + + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); + + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1beta.ISamplingMetadata[]|null); + } + + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { + + /** + * Constructs a new ResponseMetaData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IResponseMetaData); + + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1beta.ISamplingMetadata[]; + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetaData instance + */ + public static create(properties?: google.analytics.data.v1beta.IResponseMetaData): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetaData + * @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.analytics.data.v1beta.ResponseMetaData; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetaData + * @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.analytics.data.v1beta.ResponseMetaData; + + /** + * Verifies a ResponseMetaData 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 ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetaData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse 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 SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1beta.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1beta.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @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.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @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.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction 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 ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { + + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); + + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); + } + + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { + + /** + * Constructs a new SamplingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ISamplingMetadata); + + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SamplingMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.ISamplingMetadata): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SamplingMetadata + * @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.analytics.data.v1beta.SamplingMetadata; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SamplingMetadata + * @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.analytics.data.v1beta.SamplingMetadata; + + /** + * Verifies a SamplingMetadata 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 SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SamplingMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SamplingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SamplingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { + + /** DimensionHeader name */ + name?: (string|null); + } + + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { + + /** + * Constructs a new DimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionHeader); + + /** DimensionHeader name. */ + public name: string; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionHeader): google.analytics.data.v1beta.DimensionHeader; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionHeader + * @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.analytics.data.v1beta.DimensionHeader; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionHeader + * @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.analytics.data.v1beta.DimensionHeader; + + /** + * Verifies a DimensionHeader 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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionHeader; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricHeader. */ + interface IMetricHeader { + + /** MetricHeader name */ + name?: (string|null); + + /** MetricHeader type */ + type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); + } + + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { + + /** + * Constructs a new MetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricHeader); + + /** MetricHeader name. */ + public name: string; + + /** MetricHeader type. */ + public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); + + /** + * Creates a new MetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricHeader): google.analytics.data.v1beta.MetricHeader; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricHeader + * @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.analytics.data.v1beta.MetricHeader; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricHeader + * @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.analytics.data.v1beta.MetricHeader; + + /** + * Verifies a MetricHeader 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 MetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricHeader; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PivotHeader. */ + interface IPivotHeader { + + /** PivotHeader pivotDimensionHeaders */ + pivotDimensionHeaders?: (google.analytics.data.v1beta.IPivotDimensionHeader[]|null); + + /** PivotHeader rowCount */ + rowCount?: (number|null); + } + + /** Represents a PivotHeader. */ + class PivotHeader implements IPivotHeader { + + /** + * Constructs a new PivotHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivotHeader); + + /** PivotHeader pivotDimensionHeaders. */ + public pivotDimensionHeaders: google.analytics.data.v1beta.IPivotDimensionHeader[]; + + /** PivotHeader rowCount. */ + public rowCount: number; + + /** + * Creates a new PivotHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivotHeader): google.analytics.data.v1beta.PivotHeader; + + /** + * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @param message PivotHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @param message PivotHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotHeader + * @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.analytics.data.v1beta.PivotHeader; + + /** + * Decodes a PivotHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotHeader + * @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.analytics.data.v1beta.PivotHeader; + + /** + * Verifies a PivotHeader 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 PivotHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotHeader; + + /** + * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. + * @param message PivotHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PivotHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PivotDimensionHeader. */ + interface IPivotDimensionHeader { + + /** PivotDimensionHeader dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); + } + + /** Represents a PivotDimensionHeader. */ + class PivotDimensionHeader implements IPivotDimensionHeader { + + /** + * Constructs a new PivotDimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivotDimensionHeader); + + /** PivotDimensionHeader dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; + + /** + * Creates a new PivotDimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotDimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivotDimensionHeader): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @param message PivotDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @param message PivotDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotDimensionHeader + * @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.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotDimensionHeader + * @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.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Verifies a PivotDimensionHeader 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 PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotDimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. + * @param message PivotDimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PivotDimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotDimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotDimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); + + /** Row metricValues */ + metricValues?: (google.analytics.data.v1beta.IMetricValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1beta.IMetricValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.analytics.data.v1beta.IRow): google.analytics.data.v1beta.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.analytics.data.v1beta.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.analytics.data.v1beta.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionValue. */ + interface IDimensionValue { + + /** DimensionValue value */ + value?: (string|null); + } + + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { + + /** + * Constructs a new DimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionValue); + + /** DimensionValue value. */ + public value?: (string|null); + + /** DimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new DimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionValue): google.analytics.data.v1beta.DimensionValue; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionValue + * @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.analytics.data.v1beta.DimensionValue; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionValue + * @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.analytics.data.v1beta.DimensionValue; + + /** + * Verifies a DimensionValue 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 DimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionValue; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValue. */ + interface IMetricValue { + + /** MetricValue value */ + value?: (string|null); + } + + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { + + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricValue); + + /** MetricValue value. */ + public value?: (string|null); + + /** MetricValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricValue): google.analytics.data.v1beta.MetricValue; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @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.analytics.data.v1beta.MetricValue; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @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.analytics.data.v1beta.MetricValue; + + /** + * Verifies a MetricValue 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 MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricValue; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1beta.INumericValue): google.analytics.data.v1beta.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @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.analytics.data.v1beta.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @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.analytics.data.v1beta.NumericValue; + + /** + * Verifies a NumericValue 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 NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { + + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + } + + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { + + /** + * Constructs a new PropertyQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPropertyQuota); + + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuota instance + */ + public static create(properties?: google.analytics.data.v1beta.IPropertyQuota): google.analytics.data.v1beta.PropertyQuota; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuota + * @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.analytics.data.v1beta.PropertyQuota; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuota + * @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.analytics.data.v1beta.PropertyQuota; + + /** + * Verifies a PropertyQuota 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 PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PropertyQuota; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { + + /** QuotaStatus consumed */ + consumed?: (number|null); + + /** QuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { + + /** + * Constructs a new QuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQuotaStatus); + + /** QuotaStatus consumed. */ + public consumed?: (number|null); + + /** QuotaStatus remaining. */ + public remaining?: (number|null); + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaStatus instance + */ + public static create(properties?: google.analytics.data.v1beta.IQuotaStatus): google.analytics.data.v1beta.QuotaStatus; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaStatus + * @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.analytics.data.v1beta.QuotaStatus; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaStatus + * @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.analytics.data.v1beta.QuotaStatus; + + /** + * Verifies a QuotaStatus 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 QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QuotaStatus; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionMetadata. */ + interface IDimensionMetadata { + + /** DimensionMetadata apiName */ + apiName?: (string|null); + + /** DimensionMetadata uiName */ + uiName?: (string|null); + + /** DimensionMetadata description */ + description?: (string|null); + + /** DimensionMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** DimensionMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** DimensionMetadata category */ + category?: (string|null); + } + + /** Represents a DimensionMetadata. */ + class DimensionMetadata implements IDimensionMetadata { + + /** + * Constructs a new DimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionMetadata); + + /** DimensionMetadata apiName. */ + public apiName: string; + + /** DimensionMetadata uiName. */ + public uiName: string; + + /** DimensionMetadata description. */ + public description: string; + + /** DimensionMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** DimensionMetadata customDefinition. */ + public customDefinition: boolean; + + /** DimensionMetadata category. */ + public category: string; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionMetadata): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionMetadata + * @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.analytics.data.v1beta.DimensionMetadata; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionMetadata + * @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.analytics.data.v1beta.DimensionMetadata; + + /** + * Verifies a DimensionMetadata 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 DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @param message DimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricMetadata. */ + interface IMetricMetadata { + + /** MetricMetadata apiName */ + apiName?: (string|null); + + /** MetricMetadata uiName */ + uiName?: (string|null); + + /** MetricMetadata description */ + description?: (string|null); + + /** MetricMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** MetricMetadata type */ + type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); + + /** MetricMetadata expression */ + expression?: (string|null); + + /** MetricMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** MetricMetadata blockedReasons */ + blockedReasons?: (google.analytics.data.v1beta.MetricMetadata.BlockedReason[]|null); + + /** MetricMetadata category */ + category?: (string|null); + } + + /** Represents a MetricMetadata. */ + class MetricMetadata implements IMetricMetadata { + + /** + * Constructs a new MetricMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricMetadata); + + /** MetricMetadata apiName. */ + public apiName: string; + + /** MetricMetadata uiName. */ + public uiName: string; + + /** MetricMetadata description. */ + public description: string; + + /** MetricMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** MetricMetadata type. */ + public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); + + /** MetricMetadata expression. */ + public expression: string; + + /** MetricMetadata customDefinition. */ + public customDefinition: boolean; + + /** MetricMetadata blockedReasons. */ + public blockedReasons: google.analytics.data.v1beta.MetricMetadata.BlockedReason[]; + + /** MetricMetadata category. */ + public category: string; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricMetadata): google.analytics.data.v1beta.MetricMetadata; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricMetadata + * @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.analytics.data.v1beta.MetricMetadata; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricMetadata + * @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.analytics.data.v1beta.MetricMetadata; + + /** + * Verifies a MetricMetadata 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 MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricMetadata; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @param message MetricMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetricMetadata { + + /** BlockedReason enum. */ + enum BlockedReason { + BLOCKED_REASON_UNSPECIFIED = 0, + NO_REVENUE_METRICS = 1, + NO_COST_METRICS = 2 + } + } + + /** Properties of a ComparisonMetadata. */ + interface IComparisonMetadata { + + /** ComparisonMetadata apiName */ + apiName?: (string|null); + + /** ComparisonMetadata uiName */ + uiName?: (string|null); + + /** ComparisonMetadata description */ + description?: (string|null); + } + + /** Represents a ComparisonMetadata. */ + class ComparisonMetadata implements IComparisonMetadata { + + /** + * Constructs a new ComparisonMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IComparisonMetadata); + + /** ComparisonMetadata apiName. */ + public apiName: string; + + /** ComparisonMetadata uiName. */ + public uiName: string; + + /** ComparisonMetadata description. */ + public description: string; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ComparisonMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IComparisonMetadata): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComparisonMetadata + * @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.analytics.data.v1beta.ComparisonMetadata; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComparisonMetadata + * @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.analytics.data.v1beta.ComparisonMetadata; + + /** + * Verifies a ComparisonMetadata 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 ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComparisonMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @param message ComparisonMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComparisonMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComparisonMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionCompatibility. */ + interface IDimensionCompatibility { + + /** DimensionCompatibility dimensionMetadata */ + dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); + + /** DimensionCompatibility compatibility */ + compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a DimensionCompatibility. */ + class DimensionCompatibility implements IDimensionCompatibility { + + /** + * Constructs a new DimensionCompatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionCompatibility); + + /** DimensionCompatibility dimensionMetadata. */ + public dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); + + /** DimensionCompatibility compatibility. */ + public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + + /** + * Creates a new DimensionCompatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionCompatibility instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionCompatibility): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @param message DimensionCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @param message DimensionCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionCompatibility + * @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.analytics.data.v1beta.DimensionCompatibility; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionCompatibility + * @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.analytics.data.v1beta.DimensionCompatibility; + + /** + * Verifies a DimensionCompatibility 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 DimensionCompatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionCompatibility + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. + * @param message DimensionCompatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionCompatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionCompatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricCompatibility. */ + interface IMetricCompatibility { + + /** MetricCompatibility metricMetadata */ + metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); + + /** MetricCompatibility compatibility */ + compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a MetricCompatibility. */ + class MetricCompatibility implements IMetricCompatibility { + + /** + * Constructs a new MetricCompatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricCompatibility); + + /** MetricCompatibility metricMetadata. */ + public metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); + + /** MetricCompatibility compatibility. */ + public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + + /** + * Creates a new MetricCompatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricCompatibility instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricCompatibility): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @param message MetricCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @param message MetricCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricCompatibility + * @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.analytics.data.v1beta.MetricCompatibility; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricCompatibility + * @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.analytics.data.v1beta.MetricCompatibility; + + /** + * Verifies a MetricCompatibility 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 MetricCompatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricCompatibility + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. + * @param message MetricCompatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricCompatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricCompatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } + + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + + /** Compatibility enum. */ + enum Compatibility { + COMPATIBILITY_UNSPECIFIED = 0, + COMPATIBLE = 1, + INCOMPATIBLE = 2 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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, + IDENTIFIER = 8 + } + + /** 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; + } + } + + /** 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; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** 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?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * 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); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * 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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.ExtensionRangeOptions; + + /** + * 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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * 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.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** 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); + + /** 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 FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: 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 FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.IFieldDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.FieldDescriptorProto; + + /** + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.IOneofDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.OneofDescriptorProto; + + /** + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.IEnumDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.EnumDescriptorProto; + + /** + * 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.IEnumValueDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueDescriptorProto; + + /** + * 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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * 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.IServiceDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceDescriptorProto; + + /** + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @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; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * 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.IMethodDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.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 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 features */ + features?: (google.protobuf.IFeatureSet|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; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * 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 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [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; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * 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.IMessageOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MessageOptions; + + /** + * 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 a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * 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.IFieldOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.FieldOptions; + + /** + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * 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.IOneofOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.OneofOptions; + + /** + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * 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.IEnumOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumOptions; + + /** + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * 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.IEnumValueOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueOptions; + + /** + * 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * 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.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * 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.IServiceOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceOptions; + + /** + * 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * 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.IMethodOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MethodOptions; + + /** + * 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * 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.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @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|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * 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.IUninterpretedOption, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.UninterpretedOption; + + /** + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 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; + + /** + * 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); + + /** + * 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 FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @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); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * 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.ISourceCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SourceCodeInfo; + + /** + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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 { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * 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.IGeneratedCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.GeneratedCodeInfo; + + /** + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** 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 a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * 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.IDuration, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Duration; + + /** + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Any; + + /** + * 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 an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * 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.IEmpty, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Empty; + + /** + * 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Timestamp; + + /** + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * 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); + + /** + * 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; + + /** + * 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; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * 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; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * 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; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * 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; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * 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; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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 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 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 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 Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.GetOperationRequest; + + /** + * 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.ListOperationsResponse; + + /** + * 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.CancelOperationRequest; + + /** + * 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.DeleteOperationRequest; + + /** + * 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.WaitOperationRequest; + + /** + * 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.OperationInfo; + + /** + * 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * 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.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** 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 Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.rpc.Status; + + /** + * 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 Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * 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.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.js new file mode 100644 index 000000000000..251b287570c4 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.js @@ -0,0 +1,42770 @@ +// Copyright 2025 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_analytics_data_protos || ($protobuf.roots._google_analytics_data_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.analytics = (function() { + + /** + * Namespace analytics. + * @memberof google + * @namespace + */ + var analytics = {}; + + analytics.data = (function() { + + /** + * Namespace data. + * @memberof google.analytics + * @namespace + */ + var data = {}; + + data.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.analytics.data + * @namespace + */ + var v1beta = {}; + + v1beta.BetaAnalyticsData = (function() { + + /** + * Constructs a new BetaAnalyticsData service. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BetaAnalyticsData + * @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 BetaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BetaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BetaAnalyticsData; + + /** + * Creates new BetaAnalyticsData service using the specified rpc implementation. + * @function create + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @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 {BetaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. + */ + BetaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunReportResponse} [response] RunReportResponse + */ + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runReport = function runReport(request, callback) { + return this.rpcCall(runReport, $root.google.analytics.data.v1beta.RunReportRequest, $root.google.analytics.data.v1beta.RunReportResponse, request, callback); + }, "name", { value: "RunReport" }); + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunPivotReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunPivotReportResponse} [response] RunPivotReportResponse + */ + + /** + * Calls RunPivotReport. + * @function runPivotReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback} callback Node-style callback called with the error, if any, and RunPivotReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runPivotReport = function runPivotReport(request, callback) { + return this.rpcCall(runPivotReport, $root.google.analytics.data.v1beta.RunPivotReportRequest, $root.google.analytics.data.v1beta.RunPivotReportResponse, request, callback); + }, "name", { value: "RunPivotReport" }); + + /** + * Calls RunPivotReport. + * @function runPivotReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef BatchRunReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.BatchRunReportsResponse} [response] BatchRunReportsResponse + */ + + /** + * Calls BatchRunReports. + * @function batchRunReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback} callback Node-style callback called with the error, if any, and BatchRunReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.batchRunReports = function batchRunReports(request, callback) { + return this.rpcCall(batchRunReports, $root.google.analytics.data.v1beta.BatchRunReportsRequest, $root.google.analytics.data.v1beta.BatchRunReportsResponse, request, callback); + }, "name", { value: "BatchRunReports" }); + + /** + * Calls BatchRunReports. + * @function batchRunReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef BatchRunPivotReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} [response] BatchRunPivotReportsResponse + */ + + /** + * Calls BatchRunPivotReports. + * @function batchRunPivotReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback} callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.batchRunPivotReports = function batchRunPivotReports(request, callback) { + return this.rpcCall(batchRunPivotReports, $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest, $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse, request, callback); + }, "name", { value: "BatchRunPivotReports" }); + + /** + * Calls BatchRunPivotReports. + * @function batchRunPivotReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef GetMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.Metadata} [response] Metadata + */ + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { + return this.rpcCall(getMetadata, $root.google.analytics.data.v1beta.GetMetadataRequest, $root.google.analytics.data.v1beta.Metadata, request, callback); + }, "name", { value: "GetMetadata" }); + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunRealtimeReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} [response] RunRealtimeReportResponse + */ + + /** + * Calls RunRealtimeReport. + * @function runRealtimeReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback} callback Node-style callback called with the error, if any, and RunRealtimeReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runRealtimeReport = function runRealtimeReport(request, callback) { + return this.rpcCall(runRealtimeReport, $root.google.analytics.data.v1beta.RunRealtimeReportRequest, $root.google.analytics.data.v1beta.RunRealtimeReportResponse, request, callback); + }, "name", { value: "RunRealtimeReport" }); + + /** + * Calls RunRealtimeReport. + * @function runRealtimeReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef CheckCompatibilityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} [response] CheckCompatibilityResponse + */ + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.checkCompatibility = function checkCompatibility(request, callback) { + return this.rpcCall(checkCompatibility, $root.google.analytics.data.v1beta.CheckCompatibilityRequest, $root.google.analytics.data.v1beta.CheckCompatibilityResponse, request, callback); + }, "name", { value: "CheckCompatibility" }); + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef CreateAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAudienceExport. + * @function createAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.createAudienceExport = function createAudienceExport(request, callback) { + return this.rpcCall(createAudienceExport, $root.google.analytics.data.v1beta.CreateAudienceExportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAudienceExport" }); + + /** + * Calls CreateAudienceExport. + * @function createAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef QueryAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} [response] QueryAudienceExportResponse + */ + + /** + * Calls QueryAudienceExport. + * @function queryAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback} callback Node-style callback called with the error, if any, and QueryAudienceExportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.queryAudienceExport = function queryAudienceExport(request, callback) { + return this.rpcCall(queryAudienceExport, $root.google.analytics.data.v1beta.QueryAudienceExportRequest, $root.google.analytics.data.v1beta.QueryAudienceExportResponse, request, callback); + }, "name", { value: "QueryAudienceExport" }); + + /** + * Calls QueryAudienceExport. + * @function queryAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef GetAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.AudienceExport} [response] AudienceExport + */ + + /** + * Calls GetAudienceExport. + * @function getAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback} callback Node-style callback called with the error, if any, and AudienceExport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.getAudienceExport = function getAudienceExport(request, callback) { + return this.rpcCall(getAudienceExport, $root.google.analytics.data.v1beta.GetAudienceExportRequest, $root.google.analytics.data.v1beta.AudienceExport, request, callback); + }, "name", { value: "GetAudienceExport" }); + + /** + * Calls GetAudienceExport. + * @function getAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef ListAudienceExportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} [response] ListAudienceExportsResponse + */ + + /** + * Calls ListAudienceExports. + * @function listAudienceExports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback} callback Node-style callback called with the error, if any, and ListAudienceExportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.listAudienceExports = function listAudienceExports(request, callback) { + return this.rpcCall(listAudienceExports, $root.google.analytics.data.v1beta.ListAudienceExportsRequest, $root.google.analytics.data.v1beta.ListAudienceExportsResponse, request, callback); + }, "name", { value: "ListAudienceExports" }); + + /** + * Calls ListAudienceExports. + * @function listAudienceExports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BetaAnalyticsData; + })(); + + v1beta.CheckCompatibilityRequest = (function() { + + /** + * Properties of a CheckCompatibilityRequest. + * @memberof google.analytics.data.v1beta + * @interface ICheckCompatibilityRequest + * @property {string|null} [property] CheckCompatibilityRequest property + * @property {Array.|null} [dimensions] CheckCompatibilityRequest dimensions + * @property {Array.|null} [metrics] CheckCompatibilityRequest metrics + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] CheckCompatibilityRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] CheckCompatibilityRequest metricFilter + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibilityFilter] CheckCompatibilityRequest compatibilityFilter + */ + + /** + * Constructs a new CheckCompatibilityRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CheckCompatibilityRequest. + * @implements ICheckCompatibilityRequest + * @constructor + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set + */ + function CheckCompatibilityRequest(properties) { + this.dimensions = []; + this.metrics = []; + 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]]; + } + + /** + * CheckCompatibilityRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.property = ""; + + /** + * CheckCompatibilityRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.dimensions = $util.emptyArray; + + /** + * CheckCompatibilityRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.metrics = $util.emptyArray; + + /** + * CheckCompatibilityRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.dimensionFilter = null; + + /** + * CheckCompatibilityRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.metricFilter = null; + + /** + * CheckCompatibilityRequest compatibilityFilter. + * @member {google.analytics.data.v1beta.Compatibility} compatibilityFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.compatibilityFilter = 0; + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest instance + */ + CheckCompatibilityRequest.create = function create(properties) { + return new CheckCompatibilityRequest(properties); + }; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.compatibilityFilter != null && Object.hasOwnProperty.call(message, "compatibilityFilter")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.compatibilityFilter); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.compatibilityFilter = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) + switch (message.compatibilityFilter) { + default: + return "compatibilityFilter: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + */ + CheckCompatibilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityRequest) + return object; + var message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + switch (object.compatibilityFilter) { + default: + if (typeof object.compatibilityFilter === "number") { + message.compatibilityFilter = object.compatibilityFilter; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibilityFilter = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibilityFilter = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibilityFilter = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.CheckCompatibilityRequest} message CheckCompatibilityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + object.compatibilityFilter = options.enums === String ? "COMPATIBILITY_UNSPECIFIED" : 0; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) + object.compatibilityFilter = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] === undefined ? message.compatibilityFilter : $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] : message.compatibilityFilter; + return object; + }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityRequest"; + }; + + return CheckCompatibilityRequest; + })(); + + v1beta.CheckCompatibilityResponse = (function() { + + /** + * Properties of a CheckCompatibilityResponse. + * @memberof google.analytics.data.v1beta + * @interface ICheckCompatibilityResponse + * @property {Array.|null} [dimensionCompatibilities] CheckCompatibilityResponse dimensionCompatibilities + * @property {Array.|null} [metricCompatibilities] CheckCompatibilityResponse metricCompatibilities + */ + + /** + * Constructs a new CheckCompatibilityResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CheckCompatibilityResponse. + * @implements ICheckCompatibilityResponse + * @constructor + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set + */ + function CheckCompatibilityResponse(properties) { + this.dimensionCompatibilities = []; + this.metricCompatibilities = []; + 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]]; + } + + /** + * CheckCompatibilityResponse dimensionCompatibilities. + * @member {Array.} dimensionCompatibilities + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.dimensionCompatibilities = $util.emptyArray; + + /** + * CheckCompatibilityResponse metricCompatibilities. + * @member {Array.} metricCompatibilities + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.metricCompatibilities = $util.emptyArray; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse instance + */ + CheckCompatibilityResponse.create = function create(properties) { + return new CheckCompatibilityResponse(properties); + }; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionCompatibilities != null && message.dimensionCompatibilities.length) + for (var i = 0; i < message.dimensionCompatibilities.length; ++i) + $root.google.analytics.data.v1beta.DimensionCompatibility.encode(message.dimensionCompatibilities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricCompatibilities != null && message.metricCompatibilities.length) + for (var i = 0; i < message.metricCompatibilities.length; ++i) + $root.google.analytics.data.v1beta.MetricCompatibility.encode(message.metricCompatibilities[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionCompatibilities && message.dimensionCompatibilities.length)) + message.dimensionCompatibilities = []; + message.dimensionCompatibilities.push($root.google.analytics.data.v1beta.DimensionCompatibility.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricCompatibilities && message.metricCompatibilities.length)) + message.metricCompatibilities = []; + message.metricCompatibilities.push($root.google.analytics.data.v1beta.MetricCompatibility.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionCompatibilities != null && message.hasOwnProperty("dimensionCompatibilities")) { + if (!Array.isArray(message.dimensionCompatibilities)) + return "dimensionCompatibilities: array expected"; + for (var i = 0; i < message.dimensionCompatibilities.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionCompatibility.verify(message.dimensionCompatibilities[i]); + if (error) + return "dimensionCompatibilities." + error; + } + } + if (message.metricCompatibilities != null && message.hasOwnProperty("metricCompatibilities")) { + if (!Array.isArray(message.metricCompatibilities)) + return "metricCompatibilities: array expected"; + for (var i = 0; i < message.metricCompatibilities.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricCompatibility.verify(message.metricCompatibilities[i]); + if (error) + return "metricCompatibilities." + error; + } + } + return null; + }; + + /** + * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + */ + CheckCompatibilityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityResponse) + return object; + var message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); + if (object.dimensionCompatibilities) { + if (!Array.isArray(object.dimensionCompatibilities)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: array expected"); + message.dimensionCompatibilities = []; + for (var i = 0; i < object.dimensionCompatibilities.length; ++i) { + if (typeof object.dimensionCompatibilities[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: object expected"); + message.dimensionCompatibilities[i] = $root.google.analytics.data.v1beta.DimensionCompatibility.fromObject(object.dimensionCompatibilities[i]); + } + } + if (object.metricCompatibilities) { + if (!Array.isArray(object.metricCompatibilities)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: array expected"); + message.metricCompatibilities = []; + for (var i = 0; i < object.metricCompatibilities.length; ++i) { + if (typeof object.metricCompatibilities[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: object expected"); + message.metricCompatibilities[i] = $root.google.analytics.data.v1beta.MetricCompatibility.fromObject(object.metricCompatibilities[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} message CheckCompatibilityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionCompatibilities = []; + object.metricCompatibilities = []; + } + if (message.dimensionCompatibilities && message.dimensionCompatibilities.length) { + object.dimensionCompatibilities = []; + for (var j = 0; j < message.dimensionCompatibilities.length; ++j) + object.dimensionCompatibilities[j] = $root.google.analytics.data.v1beta.DimensionCompatibility.toObject(message.dimensionCompatibilities[j], options); + } + if (message.metricCompatibilities && message.metricCompatibilities.length) { + object.metricCompatibilities = []; + for (var j = 0; j < message.metricCompatibilities.length; ++j) + object.metricCompatibilities[j] = $root.google.analytics.data.v1beta.MetricCompatibility.toObject(message.metricCompatibilities[j], options); + } + return object; + }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityResponse"; + }; + + return CheckCompatibilityResponse; + })(); + + v1beta.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.analytics.data.v1beta + * @interface IMetadata + * @property {string|null} [name] Metadata name + * @property {Array.|null} [dimensions] Metadata dimensions + * @property {Array.|null} [metrics] Metadata metrics + * @property {Array.|null} [comparisons] Metadata comparisons + */ + + /** + * Constructs a new Metadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.dimensions = []; + this.metrics = []; + this.comparisons = []; + 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]]; + } + + /** + * Metadata name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.name = ""; + + /** + * Metadata dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.dimensions = $util.emptyArray; + + /** + * Metadata metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.metrics = $util.emptyArray; + + /** + * Metadata comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.name = reader.string(); + break; + } + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.ComparisonMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.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.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.ComparisonMetadata.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Metadata) + return object; + var message = new $root.google.analytics.data.v1beta.Metadata(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metrics[i]); + } + } + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.ComparisonMetadata.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.comparisons = []; + } + if (options.defaults) + object.name = ""; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metrics[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.ComparisonMetadata.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Metadata"; + }; + + return Metadata; + })(); + + v1beta.RunReportRequest = (function() { + + /** + * Properties of a RunReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunReportRequest + * @property {string|null} [property] RunReportRequest property + * @property {Array.|null} [dimensions] RunReportRequest dimensions + * @property {Array.|null} [metrics] RunReportRequest metrics + * @property {Array.|null} [dateRanges] RunReportRequest dateRanges + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter + * @property {number|Long|null} [offset] RunReportRequest offset + * @property {number|Long|null} [limit] RunReportRequest limit + * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunReportRequest orderBys + * @property {string|null} [currencyCode] RunReportRequest currencyCode + * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunReportRequest comparisons + */ + + /** + * Constructs a new RunReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunReportRequest. + * @implements IRunReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set + */ + function RunReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + this.comparisons = []; + 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]]; + } + + /** + * RunReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.property = ""; + + /** + * RunReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensionFilter = null; + + /** + * RunReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricFilter = null; + + /** + * RunReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricAggregations = $util.emptyArray; + + /** + * RunReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.currencyCode = ""; + + /** + * RunReportRequest cohortSpec. + * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.cohortSpec = null; + + /** + * RunReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.keepEmptyRows = false; + + /** + * RunReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest instance + */ + RunReportRequest.create = function create(properties) { + return new RunReportRequest(properties); + }; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 15: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + */ + RunReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.RunReportRequest} message RunReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this RunReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportRequest"; + }; + + return RunReportRequest; + })(); + + v1beta.RunReportResponse = (function() { + + /** + * Properties of a RunReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunReportResponse + * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders + * @property {Array.|null} [rows] RunReportResponse rows + * @property {Array.|null} [totals] RunReportResponse totals + * @property {Array.|null} [maximums] RunReportResponse maximums + * @property {Array.|null} [minimums] RunReportResponse minimums + * @property {number|null} [rowCount] RunReportResponse rowCount + * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunReportResponse metadata + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota + * @property {string|null} [kind] RunReportResponse kind + */ + + /** + * Constructs a new RunReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunReportResponse. + * @implements IRunReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set + */ + function RunReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + 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]]; + } + + /** + * RunReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.totals = $util.emptyArray; + + /** + * RunReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rowCount = 0; + + /** + * RunReportResponse metadata. + * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metadata = null; + + /** + * RunReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.propertyQuota = null; + + /** + * RunReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.kind = ""; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse instance + */ + RunReportResponse.create = function create(properties) { + return new RunReportResponse(properties); + }; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 10: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + */ + RunReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.RunReportResponse} message RunReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportResponse"; + }; + + return RunReportResponse; + })(); + + v1beta.RunPivotReportRequest = (function() { + + /** + * Properties of a RunPivotReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunPivotReportRequest + * @property {string|null} [property] RunPivotReportRequest property + * @property {Array.|null} [dimensions] RunPivotReportRequest dimensions + * @property {Array.|null} [metrics] RunPivotReportRequest metrics + * @property {Array.|null} [dateRanges] RunPivotReportRequest dateRanges + * @property {Array.|null} [pivots] RunPivotReportRequest pivots + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunPivotReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunPivotReportRequest metricFilter + * @property {string|null} [currencyCode] RunPivotReportRequest currencyCode + * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunPivotReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunPivotReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunPivotReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunPivotReportRequest comparisons + */ + + /** + * Constructs a new RunPivotReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunPivotReportRequest. + * @implements IRunPivotReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set + */ + function RunPivotReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.pivots = []; + this.comparisons = []; + 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]]; + } + + /** + * RunPivotReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.property = ""; + + /** + * RunPivotReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunPivotReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunPivotReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunPivotReportRequest pivots. + * @member {Array.} pivots + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.pivots = $util.emptyArray; + + /** + * RunPivotReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dimensionFilter = null; + + /** + * RunPivotReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.metricFilter = null; + + /** + * RunPivotReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.currencyCode = ""; + + /** + * RunPivotReportRequest cohortSpec. + * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.cohortSpec = null; + + /** + * RunPivotReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.keepEmptyRows = false; + + /** + * RunPivotReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunPivotReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new RunPivotReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest instance + */ + RunPivotReportRequest.create = function create(properties) { + return new RunPivotReportRequest(properties); + }; + + /** + * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pivots != null && message.pivots.length) + for (var i = 0; i < message.pivots.length; ++i) + $root.google.analytics.data.v1beta.Pivot.encode(message.pivots[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.pivots && message.pivots.length)) + message.pivots = []; + message.pivots.push($root.google.analytics.data.v1beta.Pivot.decode(reader, reader.uint32())); + break; + } + case 6: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 8: { + message.currencyCode = reader.string(); + break; + } + case 9: { + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 10: { + message.keepEmptyRows = reader.bool(); + break; + } + case 11: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 12: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunPivotReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunPivotReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.pivots != null && message.hasOwnProperty("pivots")) { + if (!Array.isArray(message.pivots)) + return "pivots: array expected"; + for (var i = 0; i < message.pivots.length; ++i) { + var error = $root.google.analytics.data.v1beta.Pivot.verify(message.pivots[i]); + if (error) + return "pivots." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + */ + RunPivotReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.pivots) { + if (!Array.isArray(object.pivots)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: array expected"); + message.pivots = []; + for (var i = 0; i < object.pivots.length; ++i) { + if (typeof object.pivots[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: object expected"); + message.pivots[i] = $root.google.analytics.data.v1beta.Pivot.fromObject(object.pivots[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.RunPivotReportRequest} message RunPivotReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunPivotReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.pivots = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); + } + if (message.pivots && message.pivots.length) { + object.pivots = []; + for (var j = 0; j < message.pivots.length; ++j) + object.pivots[j] = $root.google.analytics.data.v1beta.Pivot.toObject(message.pivots[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this RunPivotReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunPivotReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunPivotReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunPivotReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportRequest"; + }; + + return RunPivotReportRequest; + })(); + + v1beta.RunPivotReportResponse = (function() { + + /** + * Properties of a RunPivotReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunPivotReportResponse + * @property {Array.|null} [pivotHeaders] RunPivotReportResponse pivotHeaders + * @property {Array.|null} [dimensionHeaders] RunPivotReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunPivotReportResponse metricHeaders + * @property {Array.|null} [rows] RunPivotReportResponse rows + * @property {Array.|null} [aggregates] RunPivotReportResponse aggregates + * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunPivotReportResponse metadata + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunPivotReportResponse propertyQuota + * @property {string|null} [kind] RunPivotReportResponse kind + */ + + /** + * Constructs a new RunPivotReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunPivotReportResponse. + * @implements IRunPivotReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set + */ + function RunPivotReportResponse(properties) { + this.pivotHeaders = []; + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.aggregates = []; + 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]]; + } + + /** + * RunPivotReportResponse pivotHeaders. + * @member {Array.} pivotHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.pivotHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunPivotReportResponse aggregates. + * @member {Array.} aggregates + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.aggregates = $util.emptyArray; + + /** + * RunPivotReportResponse metadata. + * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.metadata = null; + + /** + * RunPivotReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.propertyQuota = null; + + /** + * RunPivotReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.kind = ""; + + /** + * Creates a new RunPivotReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse instance + */ + RunPivotReportResponse.create = function create(properties) { + return new RunPivotReportResponse(properties); + }; + + /** + * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotHeaders != null && message.pivotHeaders.length) + for (var i = 0; i < message.pivotHeaders.length; ++i) + $root.google.analytics.data.v1beta.PivotHeader.encode(message.pivotHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregates != null && message.aggregates.length) + for (var i = 0; i < message.aggregates.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.aggregates[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotHeaders && message.pivotHeaders.length)) + message.pivotHeaders = []; + message.pivotHeaders.push($root.google.analytics.data.v1beta.PivotHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.aggregates && message.aggregates.length)) + message.aggregates = []; + message.aggregates.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 8: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunPivotReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunPivotReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotHeaders != null && message.hasOwnProperty("pivotHeaders")) { + if (!Array.isArray(message.pivotHeaders)) + return "pivotHeaders: array expected"; + for (var i = 0; i < message.pivotHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.PivotHeader.verify(message.pivotHeaders[i]); + if (error) + return "pivotHeaders." + error; + } + } + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.aggregates != null && message.hasOwnProperty("aggregates")) { + if (!Array.isArray(message.aggregates)) + return "aggregates: array expected"; + for (var i = 0; i < message.aggregates.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.aggregates[i]); + if (error) + return "aggregates." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + */ + RunPivotReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); + if (object.pivotHeaders) { + if (!Array.isArray(object.pivotHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: array expected"); + message.pivotHeaders = []; + for (var i = 0; i < object.pivotHeaders.length; ++i) { + if (typeof object.pivotHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: object expected"); + message.pivotHeaders[i] = $root.google.analytics.data.v1beta.PivotHeader.fromObject(object.pivotHeaders[i]); + } + } + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.aggregates) { + if (!Array.isArray(object.aggregates)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: array expected"); + message.aggregates = []; + for (var i = 0; i < object.aggregates.length; ++i) { + if (typeof object.aggregates[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: object expected"); + message.aggregates[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.aggregates[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.RunPivotReportResponse} message RunPivotReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunPivotReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pivotHeaders = []; + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.aggregates = []; + } + if (options.defaults) { + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.pivotHeaders && message.pivotHeaders.length) { + object.pivotHeaders = []; + for (var j = 0; j < message.pivotHeaders.length; ++j) + object.pivotHeaders[j] = $root.google.analytics.data.v1beta.PivotHeader.toObject(message.pivotHeaders[j], options); + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.aggregates && message.aggregates.length) { + object.aggregates = []; + for (var j = 0; j < message.aggregates.length; ++j) + object.aggregates[j] = $root.google.analytics.data.v1beta.Row.toObject(message.aggregates[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunPivotReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunPivotReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunPivotReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunPivotReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportResponse"; + }; + + return RunPivotReportResponse; + })(); + + v1beta.BatchRunReportsRequest = (function() { + + /** + * Properties of a BatchRunReportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunReportsRequest + * @property {string|null} [property] BatchRunReportsRequest property + * @property {Array.|null} [requests] BatchRunReportsRequest requests + */ + + /** + * Constructs a new BatchRunReportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunReportsRequest. + * @implements IBatchRunReportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set + */ + function BatchRunReportsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchRunReportsRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + */ + BatchRunReportsRequest.prototype.property = ""; + + /** + * BatchRunReportsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + */ + BatchRunReportsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchRunReportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest instance + */ + BatchRunReportsRequest.create = function create(properties) { + return new BatchRunReportsRequest(properties); + }; + + /** + * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.data.v1beta.RunReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.data.v1beta.RunReportRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunReportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunReportRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + */ + BatchRunReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.data.v1beta.RunReportRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.BatchRunReportsRequest} message BatchRunReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.data.v1beta.RunReportRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchRunReportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchRunReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunReportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsRequest"; + }; + + return BatchRunReportsRequest; + })(); + + v1beta.BatchRunReportsResponse = (function() { + + /** + * Properties of a BatchRunReportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunReportsResponse + * @property {Array.|null} [reports] BatchRunReportsResponse reports + * @property {string|null} [kind] BatchRunReportsResponse kind + */ + + /** + * Constructs a new BatchRunReportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunReportsResponse. + * @implements IBatchRunReportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set + */ + function BatchRunReportsResponse(properties) { + this.reports = []; + 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]]; + } + + /** + * BatchRunReportsResponse reports. + * @member {Array.} reports + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + */ + BatchRunReportsResponse.prototype.reports = $util.emptyArray; + + /** + * BatchRunReportsResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + */ + BatchRunReportsResponse.prototype.kind = ""; + + /** + * Creates a new BatchRunReportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse instance + */ + BatchRunReportsResponse.create = function create(properties) { + return new BatchRunReportsResponse(properties); + }; + + /** + * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reports != null && message.reports.length) + for (var i = 0; i < message.reports.length; ++i) + $root.google.analytics.data.v1beta.RunReportResponse.encode(message.reports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + return writer; + }; + + /** + * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reports && message.reports.length)) + message.reports = []; + message.reports.push($root.google.analytics.data.v1beta.RunReportResponse.decode(reader, reader.uint32())); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunReportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reports != null && message.hasOwnProperty("reports")) { + if (!Array.isArray(message.reports)) + return "reports: array expected"; + for (var i = 0; i < message.reports.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunReportResponse.verify(message.reports[i]); + if (error) + return "reports." + error; + } + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + */ + BatchRunReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); + if (object.reports) { + if (!Array.isArray(object.reports)) + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: array expected"); + message.reports = []; + for (var i = 0; i < object.reports.length; ++i) { + if (typeof object.reports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: object expected"); + message.reports[i] = $root.google.analytics.data.v1beta.RunReportResponse.fromObject(object.reports[i]); + } + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.BatchRunReportsResponse} message BatchRunReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reports = []; + if (options.defaults) + object.kind = ""; + if (message.reports && message.reports.length) { + object.reports = []; + for (var j = 0; j < message.reports.length; ++j) + object.reports[j] = $root.google.analytics.data.v1beta.RunReportResponse.toObject(message.reports[j], options); + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this BatchRunReportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchRunReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunReportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsResponse"; + }; + + return BatchRunReportsResponse; + })(); + + v1beta.BatchRunPivotReportsRequest = (function() { + + /** + * Properties of a BatchRunPivotReportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunPivotReportsRequest + * @property {string|null} [property] BatchRunPivotReportsRequest property + * @property {Array.|null} [requests] BatchRunPivotReportsRequest requests + */ + + /** + * Constructs a new BatchRunPivotReportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunPivotReportsRequest. + * @implements IBatchRunPivotReportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set + */ + function BatchRunPivotReportsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchRunPivotReportsRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + */ + BatchRunPivotReportsRequest.prototype.property = ""; + + /** + * BatchRunPivotReportsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + */ + BatchRunPivotReportsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchRunPivotReportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest instance + */ + BatchRunPivotReportsRequest.create = function create(properties) { + return new BatchRunPivotReportsRequest(properties); + }; + + /** + * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.data.v1beta.RunPivotReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.data.v1beta.RunPivotReportRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunPivotReportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunPivotReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunPivotReportRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + */ + BatchRunPivotReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.data.v1beta.RunPivotReportRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.BatchRunPivotReportsRequest} message BatchRunPivotReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunPivotReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.data.v1beta.RunPivotReportRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchRunPivotReportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchRunPivotReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunPivotReportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunPivotReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsRequest"; + }; + + return BatchRunPivotReportsRequest; + })(); + + v1beta.BatchRunPivotReportsResponse = (function() { + + /** + * Properties of a BatchRunPivotReportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunPivotReportsResponse + * @property {Array.|null} [pivotReports] BatchRunPivotReportsResponse pivotReports + * @property {string|null} [kind] BatchRunPivotReportsResponse kind + */ + + /** + * Constructs a new BatchRunPivotReportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunPivotReportsResponse. + * @implements IBatchRunPivotReportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set + */ + function BatchRunPivotReportsResponse(properties) { + this.pivotReports = []; + 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]]; + } + + /** + * BatchRunPivotReportsResponse pivotReports. + * @member {Array.} pivotReports + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + */ + BatchRunPivotReportsResponse.prototype.pivotReports = $util.emptyArray; + + /** + * BatchRunPivotReportsResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + */ + BatchRunPivotReportsResponse.prototype.kind = ""; + + /** + * Creates a new BatchRunPivotReportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse instance + */ + BatchRunPivotReportsResponse.create = function create(properties) { + return new BatchRunPivotReportsResponse(properties); + }; + + /** + * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotReports != null && message.pivotReports.length) + for (var i = 0; i < message.pivotReports.length; ++i) + $root.google.analytics.data.v1beta.RunPivotReportResponse.encode(message.pivotReports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + return writer; + }; + + /** + * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotReports && message.pivotReports.length)) + message.pivotReports = []; + message.pivotReports.push($root.google.analytics.data.v1beta.RunPivotReportResponse.decode(reader, reader.uint32())); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunPivotReportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunPivotReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotReports != null && message.hasOwnProperty("pivotReports")) { + if (!Array.isArray(message.pivotReports)) + return "pivotReports: array expected"; + for (var i = 0; i < message.pivotReports.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunPivotReportResponse.verify(message.pivotReports[i]); + if (error) + return "pivotReports." + error; + } + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + */ + BatchRunPivotReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); + if (object.pivotReports) { + if (!Array.isArray(object.pivotReports)) + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: array expected"); + message.pivotReports = []; + for (var i = 0; i < object.pivotReports.length; ++i) { + if (typeof object.pivotReports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: object expected"); + message.pivotReports[i] = $root.google.analytics.data.v1beta.RunPivotReportResponse.fromObject(object.pivotReports[i]); + } + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} message BatchRunPivotReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunPivotReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotReports = []; + if (options.defaults) + object.kind = ""; + if (message.pivotReports && message.pivotReports.length) { + object.pivotReports = []; + for (var j = 0; j < message.pivotReports.length; ++j) + object.pivotReports[j] = $root.google.analytics.data.v1beta.RunPivotReportResponse.toObject(message.pivotReports[j], options); + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this BatchRunPivotReportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchRunPivotReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunPivotReportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunPivotReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsResponse"; + }; + + return BatchRunPivotReportsResponse; + })(); + + v1beta.GetMetadataRequest = (function() { + + /** + * Properties of a GetMetadataRequest. + * @memberof google.analytics.data.v1beta + * @interface IGetMetadataRequest + * @property {string|null} [name] GetMetadataRequest name + */ + + /** + * Constructs a new GetMetadataRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a GetMetadataRequest. + * @implements IGetMetadataRequest + * @constructor + * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set + */ + function GetMetadataRequest(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]]; + } + + /** + * GetMetadataRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @instance + */ + GetMetadataRequest.prototype.name = ""; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest instance + */ + GetMetadataRequest.create = function create(properties) { + return new GetMetadataRequest(properties); + }; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.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 GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataRequest.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 GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + */ + GetMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.GetMetadataRequest) + return object; + var message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.GetMetadataRequest} message GetMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataRequest.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 GetMetadataRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.GetMetadataRequest"; + }; + + return GetMetadataRequest; + })(); + + v1beta.RunRealtimeReportRequest = (function() { + + /** + * Properties of a RunRealtimeReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunRealtimeReportRequest + * @property {string|null} [property] RunRealtimeReportRequest property + * @property {Array.|null} [dimensions] RunRealtimeReportRequest dimensions + * @property {Array.|null} [metrics] RunRealtimeReportRequest metrics + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunRealtimeReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunRealtimeReportRequest metricFilter + * @property {number|Long|null} [limit] RunRealtimeReportRequest limit + * @property {Array.|null} [metricAggregations] RunRealtimeReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunRealtimeReportRequest orderBys + * @property {boolean|null} [returnPropertyQuota] RunRealtimeReportRequest returnPropertyQuota + * @property {Array.|null} [minuteRanges] RunRealtimeReportRequest minuteRanges + */ + + /** + * Constructs a new RunRealtimeReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunRealtimeReportRequest. + * @implements IRunRealtimeReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set + */ + function RunRealtimeReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.metricAggregations = []; + this.orderBys = []; + this.minuteRanges = []; + 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]]; + } + + /** + * RunRealtimeReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.property = ""; + + /** + * RunRealtimeReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunRealtimeReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunRealtimeReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.dimensionFilter = null; + + /** + * RunRealtimeReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metricFilter = null; + + /** + * RunRealtimeReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunRealtimeReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metricAggregations = $util.emptyArray; + + /** + * RunRealtimeReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunRealtimeReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunRealtimeReportRequest minuteRanges. + * @member {Array.} minuteRanges + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.minuteRanges = $util.emptyArray; + + /** + * Creates a new RunRealtimeReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest instance + */ + RunRealtimeReportRequest.create = function create(properties) { + return new RunRealtimeReportRequest(properties); + }; + + /** + * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.returnPropertyQuota); + if (message.minuteRanges != null && message.minuteRanges.length) + for (var i = 0; i < message.minuteRanges.length; ++i) + $root.google.analytics.data.v1beta.MinuteRange.encode(message.minuteRanges[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.limit = reader.int64(); + break; + } + case 7: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 8: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 9: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 10: { + if (!(message.minuteRanges && message.minuteRanges.length)) + message.minuteRanges = []; + message.minuteRanges.push($root.google.analytics.data.v1beta.MinuteRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunRealtimeReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunRealtimeReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.minuteRanges != null && message.hasOwnProperty("minuteRanges")) { + if (!Array.isArray(message.minuteRanges)) + return "minuteRanges: array expected"; + for (var i = 0; i < message.minuteRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.MinuteRange.verify(message.minuteRanges[i]); + if (error) + return "minuteRanges." + error; + } + } + return null; + }; + + /** + * Creates a RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + */ + RunRealtimeReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.minuteRanges) { + if (!Array.isArray(object.minuteRanges)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: array expected"); + message.minuteRanges = []; + for (var i = 0; i < object.minuteRanges.length; ++i) { + if (typeof object.minuteRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: object expected"); + message.minuteRanges[i] = $root.google.analytics.data.v1beta.MinuteRange.fromObject(object.minuteRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.RunRealtimeReportRequest} message RunRealtimeReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunRealtimeReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.metricAggregations = []; + object.orderBys = []; + object.minuteRanges = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.minuteRanges && message.minuteRanges.length) { + object.minuteRanges = []; + for (var j = 0; j < message.minuteRanges.length; ++j) + object.minuteRanges[j] = $root.google.analytics.data.v1beta.MinuteRange.toObject(message.minuteRanges[j], options); + } + return object; + }; + + /** + * Converts this RunRealtimeReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunRealtimeReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunRealtimeReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunRealtimeReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportRequest"; + }; + + return RunRealtimeReportRequest; + })(); + + v1beta.RunRealtimeReportResponse = (function() { + + /** + * Properties of a RunRealtimeReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunRealtimeReportResponse + * @property {Array.|null} [dimensionHeaders] RunRealtimeReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunRealtimeReportResponse metricHeaders + * @property {Array.|null} [rows] RunRealtimeReportResponse rows + * @property {Array.|null} [totals] RunRealtimeReportResponse totals + * @property {Array.|null} [maximums] RunRealtimeReportResponse maximums + * @property {Array.|null} [minimums] RunRealtimeReportResponse minimums + * @property {number|null} [rowCount] RunRealtimeReportResponse rowCount + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunRealtimeReportResponse propertyQuota + * @property {string|null} [kind] RunRealtimeReportResponse kind + */ + + /** + * Constructs a new RunRealtimeReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunRealtimeReportResponse. + * @implements IRunRealtimeReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set + */ + function RunRealtimeReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + 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]]; + } + + /** + * RunRealtimeReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunRealtimeReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunRealtimeReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunRealtimeReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.totals = $util.emptyArray; + + /** + * RunRealtimeReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunRealtimeReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunRealtimeReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.rowCount = 0; + + /** + * RunRealtimeReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.propertyQuota = null; + + /** + * RunRealtimeReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.kind = ""; + + /** + * Creates a new RunRealtimeReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse instance + */ + RunRealtimeReportResponse.create = function create(properties) { + return new RunRealtimeReportResponse(properties); + }; + + /** + * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 9: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunRealtimeReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunRealtimeReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + */ + RunRealtimeReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} message RunRealtimeReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunRealtimeReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.propertyQuota = null; + object.kind = ""; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunRealtimeReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunRealtimeReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunRealtimeReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunRealtimeReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportResponse"; + }; + + return RunRealtimeReportResponse; + })(); + + v1beta.GetAudienceExportRequest = (function() { + + /** + * Properties of a GetAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface IGetAudienceExportRequest + * @property {string|null} [name] GetAudienceExportRequest name + */ + + /** + * Constructs a new GetAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a GetAudienceExportRequest. + * @implements IGetAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set + */ + function GetAudienceExportRequest(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]]; + } + + /** + * GetAudienceExportRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @instance + */ + GetAudienceExportRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest instance + */ + GetAudienceExportRequest.create = function create(properties) { + return new GetAudienceExportRequest(properties); + }; + + /** + * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceExportRequest.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 GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceExportRequest.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 GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + */ + GetAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.GetAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.GetAudienceExportRequest} message GetAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceExportRequest.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 GetAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.GetAudienceExportRequest"; + }; + + return GetAudienceExportRequest; + })(); + + v1beta.ListAudienceExportsRequest = (function() { + + /** + * Properties of a ListAudienceExportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IListAudienceExportsRequest + * @property {string|null} [parent] ListAudienceExportsRequest parent + * @property {number|null} [pageSize] ListAudienceExportsRequest pageSize + * @property {string|null} [pageToken] ListAudienceExportsRequest pageToken + */ + + /** + * Constructs a new ListAudienceExportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ListAudienceExportsRequest. + * @implements IListAudienceExportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set + */ + function ListAudienceExportsRequest(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]]; + } + + /** + * ListAudienceExportsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.parent = ""; + + /** + * ListAudienceExportsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.pageSize = 0; + + /** + * ListAudienceExportsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudienceExportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest instance + */ + ListAudienceExportsRequest.create = function create(properties) { + return new ListAudienceExportsRequest(properties); + }; + + /** + * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceExportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceExportsRequest.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"; + return null; + }; + + /** + * Creates a ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + */ + ListAudienceExportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); + 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 ListAudienceExportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.ListAudienceExportsRequest} message ListAudienceExportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceExportsRequest.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; + return object; + }; + + /** + * Converts this ListAudienceExportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudienceExportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceExportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceExportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsRequest"; + }; + + return ListAudienceExportsRequest; + })(); + + v1beta.ListAudienceExportsResponse = (function() { + + /** + * Properties of a ListAudienceExportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IListAudienceExportsResponse + * @property {Array.|null} [audienceExports] ListAudienceExportsResponse audienceExports + * @property {string|null} [nextPageToken] ListAudienceExportsResponse nextPageToken + */ + + /** + * Constructs a new ListAudienceExportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ListAudienceExportsResponse. + * @implements IListAudienceExportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set + */ + function ListAudienceExportsResponse(properties) { + this.audienceExports = []; + 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]]; + } + + /** + * ListAudienceExportsResponse audienceExports. + * @member {Array.} audienceExports + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + */ + ListAudienceExportsResponse.prototype.audienceExports = $util.emptyArray; + + /** + * ListAudienceExportsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + */ + ListAudienceExportsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListAudienceExportsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListAudienceExportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse instance + */ + ListAudienceExportsResponse.create = function create(properties) { + return new ListAudienceExportsResponse(properties); + }; + + /** + * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceExports != null && message.audienceExports.length) + for (var i = 0; i < message.audienceExports.length; ++i) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExports[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 ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.audienceExports && message.audienceExports.length)) + message.audienceExports = []; + message.audienceExports.push($root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceExportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceExportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceExports != null && message.hasOwnProperty("audienceExports")) { + if (!Array.isArray(message.audienceExports)) + return "audienceExports: array expected"; + for (var i = 0; i < message.audienceExports.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExports[i]); + if (error) + return "audienceExports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + */ + ListAudienceExportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); + if (object.audienceExports) { + if (!Array.isArray(object.audienceExports)) + throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: array expected"); + message.audienceExports = []; + for (var i = 0; i < object.audienceExports.length; ++i) { + if (typeof object.audienceExports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: object expected"); + message.audienceExports[i] = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} message ListAudienceExportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceExportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceExports = []; + if (message.audienceExports && message.audienceExports.length) { + object.audienceExports = []; + for (var j = 0; j < message.audienceExports.length; ++j) + object.audienceExports[j] = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListAudienceExportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudienceExportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceExportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceExportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsResponse"; + }; + + return ListAudienceExportsResponse; + })(); + + v1beta.CreateAudienceExportRequest = (function() { + + /** + * Properties of a CreateAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface ICreateAudienceExportRequest + * @property {string|null} [parent] CreateAudienceExportRequest parent + * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] CreateAudienceExportRequest audienceExport + */ + + /** + * Constructs a new CreateAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CreateAudienceExportRequest. + * @implements ICreateAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set + */ + function CreateAudienceExportRequest(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]]; + } + + /** + * CreateAudienceExportRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + */ + CreateAudienceExportRequest.prototype.parent = ""; + + /** + * CreateAudienceExportRequest audienceExport. + * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + */ + CreateAudienceExportRequest.prototype.audienceExport = null; + + /** + * Creates a new CreateAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest instance + */ + CreateAudienceExportRequest.create = function create(properties) { + return new CreateAudienceExportRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceExportRequest.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.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceExportRequest.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.audienceExport != null && message.hasOwnProperty("audienceExport")) { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); + if (error) + return "audienceExport." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + */ + CreateAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CreateAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audienceExport != null) { + if (typeof object.audienceExport !== "object") + throw TypeError(".google.analytics.data.v1beta.CreateAudienceExportRequest.audienceExport: object expected"); + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.CreateAudienceExportRequest} message CreateAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audienceExport = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) + object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); + return object; + }; + + /** + * Converts this CreateAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CreateAudienceExportRequest"; + }; + + return CreateAudienceExportRequest; + })(); + + v1beta.AudienceExport = (function() { + + /** + * Properties of an AudienceExport. + * @memberof google.analytics.data.v1beta + * @interface IAudienceExport + * @property {string|null} [name] AudienceExport name + * @property {string|null} [audience] AudienceExport audience + * @property {string|null} [audienceDisplayName] AudienceExport audienceDisplayName + * @property {Array.|null} [dimensions] AudienceExport dimensions + * @property {google.analytics.data.v1beta.AudienceExport.State|null} [state] AudienceExport state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceExport beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] AudienceExport creationQuotaTokensCharged + * @property {number|null} [rowCount] AudienceExport rowCount + * @property {string|null} [errorMessage] AudienceExport errorMessage + * @property {number|null} [percentageCompleted] AudienceExport percentageCompleted + */ + + /** + * Constructs a new AudienceExport. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceExport. + * @implements IAudienceExport + * @constructor + * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set + */ + function AudienceExport(properties) { + this.dimensions = []; + 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]]; + } + + /** + * AudienceExport name. + * @member {string} name + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.name = ""; + + /** + * AudienceExport audience. + * @member {string} audience + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.audience = ""; + + /** + * AudienceExport audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.audienceDisplayName = ""; + + /** + * AudienceExport dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.dimensions = $util.emptyArray; + + /** + * AudienceExport state. + * @member {google.analytics.data.v1beta.AudienceExport.State|null|undefined} state + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.state = null; + + /** + * AudienceExport beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.beginCreatingTime = null; + + /** + * AudienceExport creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.creationQuotaTokensCharged = 0; + + /** + * AudienceExport rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.rowCount = null; + + /** + * AudienceExport errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.errorMessage = null; + + /** + * AudienceExport percentageCompleted. + * @member {number|null|undefined} percentageCompleted + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.percentageCompleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_percentageCompleted", { + get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceExport instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport instance + */ + AudienceExport.create = function create(properties) { + return new AudienceExport(properties); + }; + + /** + * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExport.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.AudienceDimension.encode(message.dimensions[i], 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.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); + if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) + writer.uint32(/* id 10, wireType 1 =*/81).double(message.percentageCompleted); + return writer; + }; + + /** + * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceExport message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 8: { + message.rowCount = reader.int32(); + break; + } + case 9: { + message.errorMessage = reader.string(); + break; + } + case 10: { + message.percentageCompleted = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceExport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceExport message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceExport.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.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + properties._percentageCompleted = 1; + if (typeof message.percentageCompleted !== "number") + return "percentageCompleted: number expected"; + } + return null; + }; + + /** + * Creates an AudienceExport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + */ + AudienceExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceExport) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceExport(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.AudienceDimension.fromObject(object.dimensions[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceExport.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentageCompleted != null) + message.percentageCompleted = Number(object.percentageCompleted); + return message; + }; + + /** + * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.AudienceExport} message AudienceExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + object.creationQuotaTokensCharged = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1beta.AudienceExport.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1beta.AudienceExport.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; + if (options.oneofs) + object._percentageCompleted = "percentageCompleted"; + } + return object; + }; + + /** + * Converts this AudienceExport to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + * @returns {Object.} JSON object + */ + AudienceExport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceExport + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExport"; + }; + + /** + * State enum. + * @name google.analytics.data.v1beta.AudienceExport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + AudienceExport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return AudienceExport; + })(); + + v1beta.AudienceExportMetadata = (function() { + + /** + * Properties of an AudienceExportMetadata. + * @memberof google.analytics.data.v1beta + * @interface IAudienceExportMetadata + */ + + /** + * Constructs a new AudienceExportMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceExportMetadata. + * @implements IAudienceExportMetadata + * @constructor + * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set + */ + function AudienceExportMetadata(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 AudienceExportMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata instance + */ + AudienceExportMetadata.create = function create(properties) { + return new AudienceExportMetadata(properties); + }; + + /** + * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceExportMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceExportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + */ + AudienceExportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceExportMetadata) + return object; + return new $root.google.analytics.data.v1beta.AudienceExportMetadata(); + }; + + /** + * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.AudienceExportMetadata} message AudienceExportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceExportMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AudienceExportMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @instance + * @returns {Object.} JSON object + */ + AudienceExportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceExportMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceExportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExportMetadata"; + }; + + return AudienceExportMetadata; + })(); + + v1beta.QueryAudienceExportRequest = (function() { + + /** + * Properties of a QueryAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface IQueryAudienceExportRequest + * @property {string|null} [name] QueryAudienceExportRequest name + * @property {number|Long|null} [offset] QueryAudienceExportRequest offset + * @property {number|Long|null} [limit] QueryAudienceExportRequest limit + */ + + /** + * Constructs a new QueryAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QueryAudienceExportRequest. + * @implements IQueryAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set + */ + function QueryAudienceExportRequest(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]]; + } + + /** + * QueryAudienceExportRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.name = ""; + + /** + * QueryAudienceExportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryAudienceExportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest instance + */ + QueryAudienceExportRequest.create = function create(properties) { + return new QueryAudienceExportRequest(properties); + }; + + /** + * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceExportRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + */ + QueryAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.QueryAudienceExportRequest} message QueryAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportRequest"; + }; + + return QueryAudienceExportRequest; + })(); + + v1beta.QueryAudienceExportResponse = (function() { + + /** + * Properties of a QueryAudienceExportResponse. + * @memberof google.analytics.data.v1beta + * @interface IQueryAudienceExportResponse + * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] QueryAudienceExportResponse audienceExport + * @property {Array.|null} [audienceRows] QueryAudienceExportResponse audienceRows + * @property {number|null} [rowCount] QueryAudienceExportResponse rowCount + */ + + /** + * Constructs a new QueryAudienceExportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QueryAudienceExportResponse. + * @implements IQueryAudienceExportResponse + * @constructor + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set + */ + function QueryAudienceExportResponse(properties) { + this.audienceRows = []; + 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]]; + } + + /** + * QueryAudienceExportResponse audienceExport. + * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.audienceExport = null; + + /** + * QueryAudienceExportResponse audienceRows. + * @member {Array.} audienceRows + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.audienceRows = $util.emptyArray; + + /** + * QueryAudienceExportResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.rowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceExportResponse.prototype, "_audienceExport", { + get: $util.oneOfGetter($oneOfFields = ["audienceExport"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceExportResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryAudienceExportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse instance + */ + QueryAudienceExportResponse.create = function create(properties) { + return new QueryAudienceExportResponse(properties); + }; + + /** + * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceRows != null && message.audienceRows.length) + for (var i = 0; i < message.audienceRows.length; ++i) + $root.google.analytics.data.v1beta.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.audienceRows && message.audienceRows.length)) + message.audienceRows = []; + message.audienceRows.push($root.google.analytics.data.v1beta.AudienceRow.decode(reader, reader.uint32())); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceExportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceExportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { + properties._audienceExport = 1; + { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); + if (error) + return "audienceExport." + error; + } + } + if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { + if (!Array.isArray(message.audienceRows)) + return "audienceRows: array expected"; + for (var i = 0; i < message.audienceRows.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceRow.verify(message.audienceRows[i]); + if (error) + return "audienceRows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + return null; + }; + + /** + * Creates a QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + */ + QueryAudienceExportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); + if (object.audienceExport != null) { + if (typeof object.audienceExport !== "object") + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceExport: object expected"); + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); + } + if (object.audienceRows) { + if (!Array.isArray(object.audienceRows)) + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: array expected"); + message.audienceRows = []; + for (var i = 0; i < object.audienceRows.length; ++i) { + if (typeof object.audienceRows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: object expected"); + message.audienceRows[i] = $root.google.analytics.data.v1beta.AudienceRow.fromObject(object.audienceRows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} message QueryAudienceExportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceExportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceRows = []; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { + object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); + if (options.oneofs) + object._audienceExport = "audienceExport"; + } + if (message.audienceRows && message.audienceRows.length) { + object.audienceRows = []; + for (var j = 0; j < message.audienceRows.length; ++j) + object.audienceRows[j] = $root.google.analytics.data.v1beta.AudienceRow.toObject(message.audienceRows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + return object; + }; + + /** + * Converts this QueryAudienceExportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceExportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceExportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceExportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportResponse"; + }; + + return QueryAudienceExportResponse; + })(); + + v1beta.AudienceRow = (function() { + + /** + * Properties of an AudienceRow. + * @memberof google.analytics.data.v1beta + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + */ + + /** + * Constructs a new AudienceRow. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow + * @constructor + * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set + */ + function AudienceRow(properties) { + this.dimensionValues = []; + 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]]; + } + + /** + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.AudienceRow + * @instance + */ + AudienceRow.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow instance + */ + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); + }; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.AudienceDimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceRow message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + */ + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceRow) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.AudienceRow} message AudienceRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this AudienceRow to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceRow + * @instance + * @returns {Object.} JSON object + */ + AudienceRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceRow + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceRow"; + }; + + return AudienceRow; + })(); + + v1beta.AudienceDimension = (function() { + + /** + * Properties of an AudienceDimension. + * @memberof google.analytics.data.v1beta + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName + */ + + /** + * Constructs a new AudienceDimension. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension + * @constructor + * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set + */ + function AudienceDimension(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]]; + } + + /** + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.AudienceDimension + * @instance + */ + AudienceDimension.prototype.dimensionName = ""; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension instance + */ + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); + }; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimension message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + */ + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceDimension) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.AudienceDimension} message AudienceDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AudienceDimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceDimension + * @instance + * @returns {Object.} JSON object + */ + AudienceDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimension + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimension"; + }; + + return AudienceDimension; + })(); + + v1beta.AudienceDimensionValue = (function() { + + /** + * Properties of an AudienceDimensionValue. + * @memberof google.analytics.data.v1beta + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value + */ + + /** + * Constructs a new AudienceDimensionValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue + * @constructor + * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set + */ + function AudienceDimensionValue(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]]; + } + + /** + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + */ + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue instance + */ + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); + }; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionValue message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + */ + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceDimensionValue) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.AudienceDimensionValue} message AudienceDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimensionValue"; + }; + + return AudienceDimensionValue; + })(); + + v1beta.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.analytics.data.v1beta + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name + */ + + /** + * Constructs a new DateRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set + */ + function DateRange(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]]; + } + + /** + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.startDate = ""; + + /** + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.endDate = ""; + + /** + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.name = ""; + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DateRange) + return object; + var message = new $root.google.analytics.data.v1beta.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DateRange"; + }; + + return DateRange; + })(); + + v1beta.MinuteRange = (function() { + + /** + * Properties of a MinuteRange. + * @memberof google.analytics.data.v1beta + * @interface IMinuteRange + * @property {number|null} [startMinutesAgo] MinuteRange startMinutesAgo + * @property {number|null} [endMinutesAgo] MinuteRange endMinutesAgo + * @property {string|null} [name] MinuteRange name + */ + + /** + * Constructs a new MinuteRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MinuteRange. + * @implements IMinuteRange + * @constructor + * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set + */ + function MinuteRange(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]]; + } + + /** + * MinuteRange startMinutesAgo. + * @member {number|null|undefined} startMinutesAgo + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.startMinutesAgo = null; + + /** + * MinuteRange endMinutesAgo. + * @member {number|null|undefined} endMinutesAgo + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.endMinutesAgo = null; + + /** + * MinuteRange name. + * @member {string} name + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.name = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MinuteRange.prototype, "_startMinutesAgo", { + get: $util.oneOfGetter($oneOfFields = ["startMinutesAgo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MinuteRange.prototype, "_endMinutesAgo", { + get: $util.oneOfGetter($oneOfFields = ["endMinutesAgo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MinuteRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange instance + */ + MinuteRange.create = function create(properties) { + return new MinuteRange(properties); + }; + + /** + * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinuteRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startMinutesAgo != null && Object.hasOwnProperty.call(message, "startMinutesAgo")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startMinutesAgo); + if (message.endMinutesAgo != null && Object.hasOwnProperty.call(message, "endMinutesAgo")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endMinutesAgo); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinuteRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MinuteRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinuteRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MinuteRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startMinutesAgo = reader.int32(); + break; + } + case 2: { + message.endMinutesAgo = reader.int32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MinuteRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinuteRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MinuteRange message. + * @function verify + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MinuteRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { + properties._startMinutesAgo = 1; + if (!$util.isInteger(message.startMinutesAgo)) + return "startMinutesAgo: integer expected"; + } + if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { + properties._endMinutesAgo = 1; + if (!$util.isInteger(message.endMinutesAgo)) + return "endMinutesAgo: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a MinuteRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + */ + MinuteRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MinuteRange) + return object; + var message = new $root.google.analytics.data.v1beta.MinuteRange(); + if (object.startMinutesAgo != null) + message.startMinutesAgo = object.startMinutesAgo | 0; + if (object.endMinutesAgo != null) + message.endMinutesAgo = object.endMinutesAgo | 0; + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.MinuteRange} message MinuteRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MinuteRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { + object.startMinutesAgo = message.startMinutesAgo; + if (options.oneofs) + object._startMinutesAgo = "startMinutesAgo"; + } + if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { + object.endMinutesAgo = message.endMinutesAgo; + if (options.oneofs) + object._endMinutesAgo = "endMinutesAgo"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this MinuteRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + * @returns {Object.} JSON object + */ + MinuteRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MinuteRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MinuteRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MinuteRange"; + }; + + return MinuteRange; + })(); + + v1beta.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.analytics.data.v1beta + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1beta.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + */ + + /** + * Constructs a new Dimension. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set + */ + function Dimension(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]]; + } + + /** + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Dimension + * @instance + */ + Dimension.prototype.name = ""; + + /** + * Dimension dimensionExpression. + * @member {google.analytics.data.v1beta.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1beta.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.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.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1beta.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.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.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1beta.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Dimension) + return object; + var message = new $root.google.analytics.data.v1beta.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1beta.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.fromObject(object.dimensionExpression); + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.toObject(message.dimensionExpression, options); + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Dimension"; + }; + + return Dimension; + })(); + + v1beta.DimensionExpression = (function() { + + /** + * Properties of a DimensionExpression. + * @memberof google.analytics.data.v1beta + * @interface IDimensionExpression + * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + */ + + /** + * Constructs a new DimensionExpression. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression + * @constructor + * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set + */ + function DimensionExpression(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]]; + } + + /** + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.lowerCase = null; + + /** + * DimensionExpression upperCase. + * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.upperCase = null; + + /** + * DimensionExpression concatenate. + * @member {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.concatenate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression instance + */ + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); + }; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (error) + return "lowerCase." + error; + } + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.upperCase); + if (error) + return "upperCase." + error; + } + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (error) + return "concatenate." + error; + } + } + return null; + }; + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + */ + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.lowerCase); + } + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.upperCase); + } + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + } + return message; + }; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression} message DimensionExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); + if (options.oneofs) + object.oneExpression = "lowerCase"; + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.upperCase, options); + if (options.oneofs) + object.oneExpression = "upperCase"; + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (options.oneofs) + object.oneExpression = "concatenate"; + } + return object; + }; + + /** + * Converts this DimensionExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + * @returns {Object.} JSON object + */ + DimensionExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression"; + }; + + DimensionExpression.CaseExpression = (function() { + + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ + + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(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]]; + } + + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.CaseExpression"; + }; + + return CaseExpression; + })(); + + DimensionExpression.ConcatenateExpression = (function() { + + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ + + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + 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]]; + } + + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression"; + }; + + return ConcatenateExpression; + })(); + + return DimensionExpression; + })(); + + v1beta.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.analytics.data.v1beta + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible + */ + + /** + * Constructs a new Metric. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set + */ + function Metric(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]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.expression = ""; + + /** + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.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.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.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.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Metric) + return object; + var message = new $root.google.analytics.data.v1beta.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expression = ""; + object.invisible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Metric"; + }; + + return Metric; + })(); + + v1beta.Comparison = (function() { + + /** + * Properties of a Comparison. + * @memberof google.analytics.data.v1beta + * @interface IComparison + * @property {string|null} [name] Comparison name + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter + * @property {string|null} [comparison] Comparison comparison + */ + + /** + * Constructs a new Comparison. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Comparison. + * @implements IComparison + * @constructor + * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set + */ + function Comparison(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]]; + } + + /** + * Comparison name. + * @member {string|null|undefined} name + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.name = null; + + /** + * Comparison dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.dimensionFilter = null; + + /** + * Comparison comparison. + * @member {string|null|undefined} comparison + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.comparison = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Comparison.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Comparison oneComparison. + * @member {"dimensionFilter"|"comparison"|undefined} oneComparison + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Object.defineProperty(Comparison.prototype, "oneComparison", { + get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Comparison instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Comparison} Comparison instance + */ + Comparison.create = function create(properties) { + return new Comparison(properties); + }; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.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.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); + return writer; + }; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Comparison(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 3: { + message.comparison = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Comparison message. + * @function verify + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Comparison.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + properties.oneComparison = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + if (properties.oneComparison === 1) + return "oneComparison: multiple values"; + properties.oneComparison = 1; + if (!$util.isString(message.comparison)) + return "comparison: string expected"; + } + return null; + }; + + /** + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Comparison} Comparison + */ + Comparison.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Comparison) + return object; + var message = new $root.google.analytics.data.v1beta.Comparison(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Comparison.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.comparison != null) + message.comparison = String(object.comparison); + return message; + }; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.Comparison} message Comparison + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Comparison.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (options.oneofs) + object.oneComparison = "dimensionFilter"; + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + object.comparison = message.comparison; + if (options.oneofs) + object.oneComparison = "comparison"; + } + return object; + }; + + /** + * Converts this Comparison to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Comparison + * @instance + * @returns {Object.} JSON object + */ + Comparison.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Comparison + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Comparison"; + }; + + return Comparison; + })(); + + v1beta.FilterExpression = (function() { + + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1beta + * @interface IFilterExpression + * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1beta.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1beta.IFilter|null} [filter] FilterExpression filter + */ + + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(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]]; + } + + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; + + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; + + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; + + /** + * FilterExpression filter. + * @member {google.analytics.data.v1beta.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1beta.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filter = $root.google.analytics.data.v1beta.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1beta.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1beta.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1beta.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpression"; + }; + + return FilterExpression; + })(); + + v1beta.FilterExpressionList = (function() { + + /** + * Properties of a FilterExpressionList. + * @memberof google.analytics.data.v1beta + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions + */ + + /** + * Constructs a new FilterExpressionList. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList + * @constructor + * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set + */ + function FilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @instance + */ + FilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList instance + */ + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); + }; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + */ + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.FilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1beta.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.FilterExpressionList} message FilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpressionList"; + }; + + return FilterExpressionList; + })(); + + v1beta.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.analytics.data.v1beta + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1beta.Filter.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1beta.Filter.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1beta.Filter.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1beta.Filter.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1beta.Filter.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + */ + + /** + * Constructs a new Filter. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set + */ + function Filter(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]]; + } + + /** + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1beta.Filter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1beta.Filter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1beta.Filter.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1beta.Filter.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1beta.Filter.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1beta.Filter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1beta.Filter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1beta.Filter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1beta.Filter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1beta.Filter.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 3: { + message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.fromObject(object.emptyFilter); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter"; + }; + + Filter.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IStringFilter + * @property {google.analytics.data.v1beta.Filter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(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]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.data.v1beta.Filter.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.StringFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.data.v1beta.Filter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + Filter.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.InListFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1beta.Filter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.InListFilter"; + }; + + return InListFilter; + })(); + + Filter.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface INumericFilter + * @property {google.analytics.data.v1beta.Filter.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1beta.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(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]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.data.v1beta.Filter.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.NumericFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1beta.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1beta.Filter.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + Filter.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IBetweenFilter + * @property {google.analytics.data.v1beta.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1beta.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(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]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + Filter.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(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 EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.EmptyFilter) + return object; + return new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + return Filter; + })(); + + v1beta.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1beta + * @interface IOrderBy + * @property {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null} [pivot] OrderBy pivot + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set + */ + function OrderBy(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]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy pivot. + * @member {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null|undefined} pivot + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.pivot = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|"pivot"|undefined} oneOrderBy + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension", "pivot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pivot != null && Object.hasOwnProperty.call(message, "pivot")) + $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.encode(message.pivot, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.pivot != null && message.hasOwnProperty("pivot")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify(message.pivot); + if (error) + return "pivot." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.pivot != null) { + if (typeof object.pivot !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.pivot: object expected"); + message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.fromObject(object.pivot); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.pivot != null && message.hasOwnProperty("pivot")) { + object.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.toObject(message.pivot, options); + if (options.oneofs) + object.oneOrderBy = "pivot"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(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]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(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]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + OrderBy.PivotOrderBy = (function() { + + /** + * Properties of a PivotOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IPivotOrderBy + * @property {string|null} [metricName] PivotOrderBy metricName + * @property {Array.|null} [pivotSelections] PivotOrderBy pivotSelections + */ + + /** + * Constructs a new PivotOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a PivotOrderBy. + * @implements IPivotOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set + */ + function PivotOrderBy(properties) { + this.pivotSelections = []; + 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]]; + } + + /** + * PivotOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + */ + PivotOrderBy.prototype.metricName = ""; + + /** + * PivotOrderBy pivotSelections. + * @member {Array.} pivotSelections + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + */ + PivotOrderBy.prototype.pivotSelections = $util.emptyArray; + + /** + * Creates a new PivotOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy instance + */ + PivotOrderBy.create = function create(properties) { + return new PivotOrderBy(properties); + }; + + /** + * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.pivotSelections != null && message.pivotSelections.length) + for (var i = 0; i < message.pivotSelections.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.encode(message.pivotSelections[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.pivotSelections && message.pivotSelections.length)) + message.pivotSelections = []; + message.pivotSelections.push($root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.pivotSelections != null && message.hasOwnProperty("pivotSelections")) { + if (!Array.isArray(message.pivotSelections)) + return "pivotSelections: array expected"; + for (var i = 0; i < message.pivotSelections.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify(message.pivotSelections[i]); + if (error) + return "pivotSelections." + error; + } + } + return null; + }; + + /** + * Creates a PivotOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + */ + PivotOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.pivotSelections) { + if (!Array.isArray(object.pivotSelections)) + throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: array expected"); + message.pivotSelections = []; + for (var i = 0; i < object.pivotSelections.length; ++i) { + if (typeof object.pivotSelections[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: object expected"); + message.pivotSelections[i] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.fromObject(object.pivotSelections[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy} message PivotOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotSelections = []; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.pivotSelections && message.pivotSelections.length) { + object.pivotSelections = []; + for (var j = 0; j < message.pivotSelections.length; ++j) + object.pivotSelections[j] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.toObject(message.pivotSelections[j], options); + } + return object; + }; + + /** + * Converts this PivotOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + * @returns {Object.} JSON object + */ + PivotOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy"; + }; + + PivotOrderBy.PivotSelection = (function() { + + /** + * Properties of a PivotSelection. + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @interface IPivotSelection + * @property {string|null} [dimensionName] PivotSelection dimensionName + * @property {string|null} [dimensionValue] PivotSelection dimensionValue + */ + + /** + * Constructs a new PivotSelection. + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @classdesc Represents a PivotSelection. + * @implements IPivotSelection + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set + */ + function PivotSelection(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]]; + } + + /** + * PivotSelection dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + */ + PivotSelection.prototype.dimensionName = ""; + + /** + * PivotSelection dimensionValue. + * @member {string} dimensionValue + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + */ + PivotSelection.prototype.dimensionValue = ""; + + /** + * Creates a new PivotSelection instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection instance + */ + PivotSelection.create = function create(properties) { + return new PivotSelection(properties); + }; + + /** + * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotSelection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.dimensionValue != null && Object.hasOwnProperty.call(message, "dimensionValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimensionValue); + return writer; + }; + + /** + * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotSelection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotSelection message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotSelection.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.dimensionValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotSelection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotSelection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotSelection message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotSelection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) + if (!$util.isString(message.dimensionValue)) + return "dimensionValue: string expected"; + return null; + }; + + /** + * Creates a PivotSelection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + */ + PivotSelection.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + if (object.dimensionValue != null) + message.dimensionValue = String(object.dimensionValue); + return message; + }; + + /** + * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} message PivotSelection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotSelection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.dimensionValue = ""; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) + object.dimensionValue = message.dimensionValue; + return object; + }; + + /** + * Converts this PivotSelection to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + * @returns {Object.} JSON object + */ + PivotSelection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotSelection + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotSelection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection"; + }; + + return PivotSelection; + })(); + + return PivotOrderBy; + })(); + + return OrderBy; + })(); + + v1beta.Pivot = (function() { + + /** + * Properties of a Pivot. + * @memberof google.analytics.data.v1beta + * @interface IPivot + * @property {Array.|null} [fieldNames] Pivot fieldNames + * @property {Array.|null} [orderBys] Pivot orderBys + * @property {number|Long|null} [offset] Pivot offset + * @property {number|Long|null} [limit] Pivot limit + * @property {Array.|null} [metricAggregations] Pivot metricAggregations + */ + + /** + * Constructs a new Pivot. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Pivot. + * @implements IPivot + * @constructor + * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set + */ + function Pivot(properties) { + this.fieldNames = []; + this.orderBys = []; + this.metricAggregations = []; + 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]]; + } + + /** + * Pivot fieldNames. + * @member {Array.} fieldNames + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.fieldNames = $util.emptyArray; + + /** + * Pivot orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.orderBys = $util.emptyArray; + + /** + * Pivot offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Pivot limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Pivot metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.metricAggregations = $util.emptyArray; + + /** + * Creates a new Pivot instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Pivot} Pivot instance + */ + Pivot.create = function create(properties) { + return new Pivot(properties); + }; + + /** + * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pivot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldNames != null && message.fieldNames.length) + for (var i = 0; i < message.fieldNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldNames[i]); + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pivot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pivot message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Pivot} Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pivot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Pivot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fieldNames && message.fieldNames.length)) + message.fieldNames = []; + message.fieldNames.push(reader.string()); + break; + } + case 2: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 3: { + message.offset = reader.int64(); + break; + } + case 4: { + message.limit = reader.int64(); + break; + } + case 5: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pivot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Pivot} Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pivot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pivot message. + * @function verify + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pivot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldNames != null && message.hasOwnProperty("fieldNames")) { + if (!Array.isArray(message.fieldNames)) + return "fieldNames: array expected"; + for (var i = 0; i < message.fieldNames.length; ++i) + if (!$util.isString(message.fieldNames[i])) + return "fieldNames: string[] expected"; + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a Pivot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Pivot} Pivot + */ + Pivot.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Pivot) + return object; + var message = new $root.google.analytics.data.v1beta.Pivot(); + if (object.fieldNames) { + if (!Array.isArray(object.fieldNames)) + throw TypeError(".google.analytics.data.v1beta.Pivot.fieldNames: array expected"); + message.fieldNames = []; + for (var i = 0; i < object.fieldNames.length; ++i) + message.fieldNames[i] = String(object.fieldNames[i]); + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.Pivot.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Pivot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.Pivot} message Pivot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pivot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fieldNames = []; + object.orderBys = []; + object.metricAggregations = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.fieldNames && message.fieldNames.length) { + object.fieldNames = []; + for (var j = 0; j < message.fieldNames.length; ++j) + object.fieldNames[j] = message.fieldNames[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + return object; + }; + + /** + * Converts this Pivot to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Pivot + * @instance + * @returns {Object.} JSON object + */ + Pivot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Pivot + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pivot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Pivot"; + }; + + return Pivot; + })(); + + v1beta.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1beta + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1beta.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1beta.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + 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]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1beta.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1beta.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1beta.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1beta.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1beta.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1beta.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1beta.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1beta.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1beta.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1beta.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1beta.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1beta.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1beta.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1beta + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1beta.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set + */ + function Cohort(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]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1beta.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.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.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.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.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Cohort) + return object; + var message = new $root.google.analytics.data.v1beta.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1beta.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Cohort"; + }; + + return Cohort; + })(); + + v1beta.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1beta + * @interface ICohortsRange + * @property {google.analytics.data.v1beta.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(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]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1beta.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1beta.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1beta.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1beta.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1beta + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(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]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1beta.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + v1beta.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1beta + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + 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]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1beta.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1beta.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1beta.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1beta.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) + object.dataLossFromOtherRow = false; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1beta.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + 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]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + 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]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; + + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; + })(); + + v1beta.SamplingMetadata = (function() { + + /** + * Properties of a SamplingMetadata. + * @memberof google.analytics.data.v1beta + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + */ + + /** + * Constructs a new SamplingMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata + * @constructor + * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set + */ + function SamplingMetadata(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]]; + } + + /** + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata instance + */ + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); + }; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + return writer; + }; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.SamplingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.samplesReadCount = reader.int64(); + break; + } + case 2: { + message.samplingSpaceSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SamplingMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SamplingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; + return null; + }; + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + */ + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.SamplingMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.SamplingMetadata} message SamplingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SamplingMetadata.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.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; + } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + return object; + }; + + /** + * Converts this SamplingMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + * @returns {Object.} JSON object + */ + SamplingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + v1beta.DimensionHeader = (function() { + + /** + * Properties of a DimensionHeader. + * @memberof google.analytics.data.v1beta + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name + */ + + /** + * Constructs a new DimensionHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader + * @constructor + * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set + */ + function DimensionHeader(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]]; + } + + /** + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1beta.DimensionHeader + * @instance + */ + DimensionHeader.prototype.name = ""; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader instance + */ + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); + }; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.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 DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionHeader.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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + */ + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionHeader) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.DimensionHeader} message DimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionHeader.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 DimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionHeader + * @instance + * @returns {Object.} JSON object + */ + DimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionHeader"; + }; + + return DimensionHeader; + })(); + + v1beta.MetricHeader = (function() { + + /** + * Properties of a MetricHeader. + * @memberof google.analytics.data.v1beta + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricHeader type + */ + + /** + * Constructs a new MetricHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader + * @constructor + * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set + */ + function MetricHeader(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]]; + } + + /** + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + */ + MetricHeader.prototype.name = ""; + + /** + * MetricHeader type. + * @member {google.analytics.data.v1beta.MetricType} type + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader instance + */ + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); + }; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricHeader.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + */ + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricHeader) + return object; + var message = new $root.google.analytics.data.v1beta.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.MetricHeader} message MetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; + return object; + }; + + /** + * Converts this MetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + * @returns {Object.} JSON object + */ + MetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricHeader"; + }; + + return MetricHeader; + })(); + + v1beta.PivotHeader = (function() { + + /** + * Properties of a PivotHeader. + * @memberof google.analytics.data.v1beta + * @interface IPivotHeader + * @property {Array.|null} [pivotDimensionHeaders] PivotHeader pivotDimensionHeaders + * @property {number|null} [rowCount] PivotHeader rowCount + */ + + /** + * Constructs a new PivotHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PivotHeader. + * @implements IPivotHeader + * @constructor + * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set + */ + function PivotHeader(properties) { + this.pivotDimensionHeaders = []; + 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]]; + } + + /** + * PivotHeader pivotDimensionHeaders. + * @member {Array.} pivotDimensionHeaders + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + */ + PivotHeader.prototype.pivotDimensionHeaders = $util.emptyArray; + + /** + * PivotHeader rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + */ + PivotHeader.prototype.rowCount = 0; + + /** + * Creates a new PivotHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader instance + */ + PivotHeader.create = function create(properties) { + return new PivotHeader(properties); + }; + + /** + * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotDimensionHeaders != null && message.pivotDimensionHeaders.length) + for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.PivotDimensionHeader.encode(message.pivotDimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotDimensionHeaders && message.pivotDimensionHeaders.length)) + message.pivotDimensionHeaders = []; + message.pivotDimensionHeaders.push($root.google.analytics.data.v1beta.PivotDimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotDimensionHeaders != null && message.hasOwnProperty("pivotDimensionHeaders")) { + if (!Array.isArray(message.pivotDimensionHeaders)) + return "pivotDimensionHeaders: array expected"; + for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.PivotDimensionHeader.verify(message.pivotDimensionHeaders[i]); + if (error) + return "pivotDimensionHeaders." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + return null; + }; + + /** + * Creates a PivotHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + */ + PivotHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PivotHeader) + return object; + var message = new $root.google.analytics.data.v1beta.PivotHeader(); + if (object.pivotDimensionHeaders) { + if (!Array.isArray(object.pivotDimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: array expected"); + message.pivotDimensionHeaders = []; + for (var i = 0; i < object.pivotDimensionHeaders.length; ++i) { + if (typeof object.pivotDimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: object expected"); + message.pivotDimensionHeaders[i] = $root.google.analytics.data.v1beta.PivotDimensionHeader.fromObject(object.pivotDimensionHeaders[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.PivotHeader} message PivotHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotDimensionHeaders = []; + if (options.defaults) + object.rowCount = 0; + if (message.pivotDimensionHeaders && message.pivotDimensionHeaders.length) { + object.pivotDimensionHeaders = []; + for (var j = 0; j < message.pivotDimensionHeaders.length; ++j) + object.pivotDimensionHeaders[j] = $root.google.analytics.data.v1beta.PivotDimensionHeader.toObject(message.pivotDimensionHeaders[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + return object; + }; + + /** + * Converts this PivotHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + * @returns {Object.} JSON object + */ + PivotHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PivotHeader"; + }; + + return PivotHeader; + })(); + + v1beta.PivotDimensionHeader = (function() { + + /** + * Properties of a PivotDimensionHeader. + * @memberof google.analytics.data.v1beta + * @interface IPivotDimensionHeader + * @property {Array.|null} [dimensionValues] PivotDimensionHeader dimensionValues + */ + + /** + * Constructs a new PivotDimensionHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PivotDimensionHeader. + * @implements IPivotDimensionHeader + * @constructor + * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set + */ + function PivotDimensionHeader(properties) { + this.dimensionValues = []; + 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]]; + } + + /** + * PivotDimensionHeader dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @instance + */ + PivotDimensionHeader.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new PivotDimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader instance + */ + PivotDimensionHeader.create = function create(properties) { + return new PivotDimensionHeader(properties); + }; + + /** + * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotDimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotDimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotDimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotDimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotDimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotDimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates a PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + */ + PivotDimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PivotDimensionHeader) + return object; + var message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.PivotDimensionHeader} message PivotDimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotDimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this PivotDimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @instance + * @returns {Object.} JSON object + */ + PivotDimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotDimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotDimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PivotDimensionHeader"; + }; + + return PivotDimensionHeader; + })(); + + v1beta.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.analytics.data.v1beta + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues + */ + + /** + * Constructs a new Row. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; + 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]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1beta.Row + * @instance + */ + Row.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1beta.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1beta.MetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Row) + return object; + var message = new $root.google.analytics.data.v1beta.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1beta.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1beta.MetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1beta.MetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Row"; + }; + + return Row; + })(); + + v1beta.DimensionValue = (function() { + + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1beta + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ + + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(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]]; + } + + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionValue"; + }; + + return DimensionValue; + })(); + + v1beta.MetricValue = (function() { + + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1beta + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ + + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set + */ + function MetricValue(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]]; + } + + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + */ + MetricValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricValue) + return object; + var message = new $root.google.analytics.data.v1beta.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricValue"; + }; + + return MetricValue; + })(); + + v1beta.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1beta + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set + */ + function NumericValue(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]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.NumericValue) + return object; + var message = new $root.google.analytics.data.v1beta.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.NumericValue"; + }; + + return NumericValue; + })(); + + v1beta.PropertyQuota = (function() { + + /** + * Properties of a PropertyQuota. + * @memberof google.analytics.data.v1beta + * @interface IPropertyQuota + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new PropertyQuota. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota + * @constructor + * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set + */ + function PropertyQuota(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]]; + } + + /** + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerDay = null; + + /** + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota instance + */ + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); + }; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PropertyQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuota message. + * @function verify + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + */ + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PropertyQuota) + return object; + var message = new $root.google.analytics.data.v1beta.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.PropertyQuota} message PropertyQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this PropertyQuota to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + * @returns {Object.} JSON object + */ + PropertyQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuota + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PropertyQuota"; + }; + + return PropertyQuota; + })(); + + v1beta.QuotaStatus = (function() { + + /** + * Properties of a QuotaStatus. + * @memberof google.analytics.data.v1beta + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining + */ + + /** + * Constructs a new QuotaStatus. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus + * @constructor + * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set + */ + function QuotaStatus(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]]; + } + + /** + * QuotaStatus consumed. + * @member {number|null|undefined} consumed + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + */ + QuotaStatus.prototype.consumed = null; + + /** + * QuotaStatus remaining. + * @member {number|null|undefined} remaining + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + */ + QuotaStatus.prototype.remaining = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuotaStatus.prototype, "_consumed", { + get: $util.oneOfGetter($oneOfFields = ["consumed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuotaStatus.prototype, "_remaining", { + get: $util.oneOfGetter($oneOfFields = ["remaining"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus instance + */ + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); + }; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaStatus message. + * @function verify + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumed != null && message.hasOwnProperty("consumed")) { + properties._consumed = 1; + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + } + if (message.remaining != null && message.hasOwnProperty("remaining")) { + properties._remaining = 1; + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + } + return null; + }; + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + */ + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QuotaStatus) + return object; + var message = new $root.google.analytics.data.v1beta.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.QuotaStatus} message QuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.consumed != null && message.hasOwnProperty("consumed")) { + object.consumed = message.consumed; + if (options.oneofs) + object._consumed = "consumed"; + } + if (message.remaining != null && message.hasOwnProperty("remaining")) { + object.remaining = message.remaining; + if (options.oneofs) + object._remaining = "remaining"; + } + return object; + }; + + /** + * Converts this QuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + * @returns {Object.} JSON object + */ + QuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaStatus + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QuotaStatus"; + }; + + return QuotaStatus; + })(); + + v1beta.DimensionMetadata = (function() { + + /** + * Properties of a DimensionMetadata. + * @memberof google.analytics.data.v1beta + * @interface IDimensionMetadata + * @property {string|null} [apiName] DimensionMetadata apiName + * @property {string|null} [uiName] DimensionMetadata uiName + * @property {string|null} [description] DimensionMetadata description + * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames + * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition + * @property {string|null} [category] DimensionMetadata category + */ + + /** + * Constructs a new DimensionMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionMetadata. + * @implements IDimensionMetadata + * @constructor + * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set + */ + function DimensionMetadata(properties) { + this.deprecatedApiNames = []; + 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]]; + } + + /** + * DimensionMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.apiName = ""; + + /** + * DimensionMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.uiName = ""; + + /** + * DimensionMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.description = ""; + + /** + * DimensionMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * DimensionMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.customDefinition = false; + + /** + * DimensionMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.category = ""; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata instance + */ + DimensionMetadata.create = function create(properties) { + return new DimensionMetadata(properties); + }; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.category); + return writer; + }; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.customDefinition = reader.bool(); + break; + } + case 7: { + message.category = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + return null; + }; + + /** + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + */ + DimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1beta.DimensionMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.category != null) + message.category = String(object.category); + return message; + }; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.DimensionMetadata} message DimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deprecatedApiNames = []; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + return object; + }; + + /** + * Converts this DimensionMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + DimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionMetadata"; + }; + + return DimensionMetadata; + })(); + + v1beta.MetricMetadata = (function() { + + /** + * Properties of a MetricMetadata. + * @memberof google.analytics.data.v1beta + * @interface IMetricMetadata + * @property {string|null} [apiName] MetricMetadata apiName + * @property {string|null} [uiName] MetricMetadata uiName + * @property {string|null} [description] MetricMetadata description + * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames + * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricMetadata type + * @property {string|null} [expression] MetricMetadata expression + * @property {boolean|null} [customDefinition] MetricMetadata customDefinition + * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons + * @property {string|null} [category] MetricMetadata category + */ + + /** + * Constructs a new MetricMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricMetadata. + * @implements IMetricMetadata + * @constructor + * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set + */ + function MetricMetadata(properties) { + this.deprecatedApiNames = []; + this.blockedReasons = []; + 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]]; + } + + /** + * MetricMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.apiName = ""; + + /** + * MetricMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.uiName = ""; + + /** + * MetricMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.description = ""; + + /** + * MetricMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * MetricMetadata type. + * @member {google.analytics.data.v1beta.MetricType} type + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.type = 0; + + /** + * MetricMetadata expression. + * @member {string} expression + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.expression = ""; + + /** + * MetricMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.customDefinition = false; + + /** + * MetricMetadata blockedReasons. + * @member {Array.} blockedReasons + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.blockedReasons = $util.emptyArray; + + /** + * MetricMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.category = ""; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata instance + */ + MetricMetadata.create = function create(properties) { + return new MetricMetadata(properties); + }; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); + if (message.blockedReasons != null && message.blockedReasons.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockedReasons.length; ++i) + writer.int32(message.blockedReasons[i]); + writer.ldelim(); + } + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.category); + return writer; + }; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.expression = reader.string(); + break; + } + case 7: { + message.customDefinition = reader.bool(); + break; + } + case 8: { + if (!(message.blockedReasons && message.blockedReasons.length)) + message.blockedReasons = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockedReasons.push(reader.int32()); + } else + message.blockedReasons.push(reader.int32()); + break; + } + case 10: { + message.category = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { + if (!Array.isArray(message.blockedReasons)) + return "blockedReasons: array expected"; + for (var i = 0; i < message.blockedReasons.length; ++i) + switch (message.blockedReasons[i]) { + default: + return "blockedReasons: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + return null; + }; + + /** + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + */ + MetricMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.MetricMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1beta.MetricMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + if (object.expression != null) + message.expression = String(object.expression); + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.blockedReasons) { + if (!Array.isArray(object.blockedReasons)) + throw TypeError(".google.analytics.data.v1beta.MetricMetadata.blockedReasons: array expected"); + message.blockedReasons = []; + for (var i = 0; i < object.blockedReasons.length; ++i) + switch (object.blockedReasons[i]) { + default: + if (typeof object.blockedReasons[i] === "number") { + message.blockedReasons[i] = object.blockedReasons[i]; + break; + } + case "BLOCKED_REASON_UNSPECIFIED": + case 0: + message.blockedReasons[i] = 0; + break; + case "NO_REVENUE_METRICS": + case 1: + message.blockedReasons[i] = 1; + break; + case "NO_COST_METRICS": + case 2: + message.blockedReasons[i] = 2; + break; + } + } + if (object.category != null) + message.category = String(object.category); + return message; + }; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.MetricMetadata} message MetricMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.blockedReasons = []; + } + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + object.expression = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.blockedReasons && message.blockedReasons.length) { + object.blockedReasons = []; + for (var j = 0; j < message.blockedReasons.length; ++j) + object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + return object; + }; + + /** + * Converts this MetricMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricMetadata"; + }; + + /** + * BlockedReason enum. + * @name google.analytics.data.v1beta.MetricMetadata.BlockedReason + * @enum {number} + * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value + * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value + * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value + */ + MetricMetadata.BlockedReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; + values[valuesById[2] = "NO_COST_METRICS"] = 2; + return values; + })(); + + return MetricMetadata; + })(); + + v1beta.ComparisonMetadata = (function() { + + /** + * Properties of a ComparisonMetadata. + * @memberof google.analytics.data.v1beta + * @interface IComparisonMetadata + * @property {string|null} [apiName] ComparisonMetadata apiName + * @property {string|null} [uiName] ComparisonMetadata uiName + * @property {string|null} [description] ComparisonMetadata description + */ + + /** + * Constructs a new ComparisonMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ComparisonMetadata. + * @implements IComparisonMetadata + * @constructor + * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set + */ + function ComparisonMetadata(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]]; + } + + /** + * ComparisonMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.apiName = ""; + + /** + * ComparisonMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.uiName = ""; + + /** + * ComparisonMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.description = ""; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata instance + */ + ComparisonMetadata.create = function create(properties) { + return new ComparisonMetadata(properties); + }; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComparisonMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComparisonMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + */ + ComparisonMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ComparisonMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.ComparisonMetadata} message ComparisonMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComparisonMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ComparisonMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + * @returns {Object.} JSON object + */ + ComparisonMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComparisonMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ComparisonMetadata"; + }; + + return ComparisonMetadata; + })(); + + v1beta.DimensionCompatibility = (function() { + + /** + * Properties of a DimensionCompatibility. + * @memberof google.analytics.data.v1beta + * @interface IDimensionCompatibility + * @property {google.analytics.data.v1beta.IDimensionMetadata|null} [dimensionMetadata] DimensionCompatibility dimensionMetadata + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] DimensionCompatibility compatibility + */ + + /** + * Constructs a new DimensionCompatibility. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionCompatibility. + * @implements IDimensionCompatibility + * @constructor + * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set + */ + function DimensionCompatibility(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]]; + } + + /** + * DimensionCompatibility dimensionMetadata. + * @member {google.analytics.data.v1beta.IDimensionMetadata|null|undefined} dimensionMetadata + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + */ + DimensionCompatibility.prototype.dimensionMetadata = null; + + /** + * DimensionCompatibility compatibility. + * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + */ + DimensionCompatibility.prototype.compatibility = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DimensionCompatibility.prototype, "_dimensionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["dimensionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DimensionCompatibility.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionCompatibility instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility instance + */ + DimensionCompatibility.create = function create(properties) { + return new DimensionCompatibility(properties); + }; + + /** + * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionCompatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionMetadata != null && Object.hasOwnProperty.call(message, "dimensionMetadata")) + $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensionMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); + return writer; + }; + + /** + * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionCompatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionCompatibility.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.compatibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionCompatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionCompatibility message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionCompatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { + properties._dimensionMetadata = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensionMetadata); + if (error) + return "dimensionMetadata." + error; + } + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a DimensionCompatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + */ + DimensionCompatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionCompatibility) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); + if (object.dimensionMetadata != null) { + if (typeof object.dimensionMetadata !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionCompatibility.dimensionMetadata: object expected"); + message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensionMetadata); + } + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibility = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibility = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.DimensionCompatibility} message DimensionCompatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionCompatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { + object.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensionMetadata, options); + if (options.oneofs) + object._dimensionMetadata = "dimensionMetadata"; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + return object; + }; + + /** + * Converts this DimensionCompatibility to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + * @returns {Object.} JSON object + */ + DimensionCompatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionCompatibility + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionCompatibility"; + }; + + return DimensionCompatibility; + })(); + + v1beta.MetricCompatibility = (function() { + + /** + * Properties of a MetricCompatibility. + * @memberof google.analytics.data.v1beta + * @interface IMetricCompatibility + * @property {google.analytics.data.v1beta.IMetricMetadata|null} [metricMetadata] MetricCompatibility metricMetadata + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] MetricCompatibility compatibility + */ + + /** + * Constructs a new MetricCompatibility. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricCompatibility. + * @implements IMetricCompatibility + * @constructor + * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set + */ + function MetricCompatibility(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]]; + } + + /** + * MetricCompatibility metricMetadata. + * @member {google.analytics.data.v1beta.IMetricMetadata|null|undefined} metricMetadata + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + */ + MetricCompatibility.prototype.metricMetadata = null; + + /** + * MetricCompatibility compatibility. + * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + */ + MetricCompatibility.prototype.compatibility = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MetricCompatibility.prototype, "_metricMetadata", { + get: $util.oneOfGetter($oneOfFields = ["metricMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MetricCompatibility.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricCompatibility instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility instance + */ + MetricCompatibility.create = function create(properties) { + return new MetricCompatibility(properties); + }; + + /** + * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricCompatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricMetadata != null && Object.hasOwnProperty.call(message, "metricMetadata")) + $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metricMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); + return writer; + }; + + /** + * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricCompatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricCompatibility.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricCompatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.compatibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricCompatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricCompatibility message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricCompatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { + properties._metricMetadata = 1; + { + var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metricMetadata); + if (error) + return "metricMetadata." + error; + } + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a MetricCompatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + */ + MetricCompatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricCompatibility) + return object; + var message = new $root.google.analytics.data.v1beta.MetricCompatibility(); + if (object.metricMetadata != null) { + if (typeof object.metricMetadata !== "object") + throw TypeError(".google.analytics.data.v1beta.MetricCompatibility.metricMetadata: object expected"); + message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metricMetadata); + } + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibility = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibility = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.MetricCompatibility} message MetricCompatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricCompatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { + object.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metricMetadata, options); + if (options.oneofs) + object._metricMetadata = "metricMetadata"; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + return object; + }; + + /** + * Converts this MetricCompatibility to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + * @returns {Object.} JSON object + */ + MetricCompatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricCompatibility + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricCompatibility"; + }; + + return MetricCompatibility; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1beta.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1beta.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1beta.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1beta.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1beta.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1beta.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + /** + * Compatibility enum. + * @name google.analytics.data.v1beta.Compatibility + * @enum {number} + * @property {number} COMPATIBILITY_UNSPECIFIED=0 COMPATIBILITY_UNSPECIFIED value + * @property {number} COMPATIBLE=1 COMPATIBLE value + * @property {number} INCOMPATIBLE=2 INCOMPATIBLE value + */ + v1beta.Compatibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPATIBILITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPATIBLE"] = 1; + values[valuesById[2] = "INCOMPATIBLE"] = 2; + return values; + })(); + + return v1beta; + })(); + + return data; + })(); + + return analytics; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + 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 + * @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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + 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 {google.protobuf.Edition|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 {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * 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 14, wireType 0 =*/112).int32(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.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, error) { + 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(); + if (tag === error) + break; + 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())); + 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 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @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 + */ + FileDescriptorProto.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 (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")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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.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.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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.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 = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + 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.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 = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.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); + }; + + /** + * 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"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + 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 + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @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.protobuf.DescriptorProto} DescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + 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())); + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @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 + */ + DescriptorProto.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.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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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 DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.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.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.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; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + 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 + */ + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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()); + }; + + /** + * 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 "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); + } + 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; + }; + + /** + * 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"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * 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]]; + } + + /** + * 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; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @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.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @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 + */ + ExtensionRangeOptions.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.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + 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 + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.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.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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(); + break; + } + case 2: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 3: + case 2: + 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_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * 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_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * 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.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @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); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @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 + */ + 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; + }; + + /** + * 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 + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + 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 + */ + 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; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + 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; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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); + }; + + /** + * 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.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @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 + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @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 + */ + 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.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; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + 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); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + 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. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * 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); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 "method." + 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. + * @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]); + } + } + 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. + * @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); + }; + + /** + * 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"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (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 + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * 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 + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @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.FileOptions} FileOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + FileOptions.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.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + 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.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.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"; + }; + + /** + * 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 FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @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 + */ + 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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 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 + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @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.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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()); + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + 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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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); + }; + + /** + * 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"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @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 {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $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; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.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.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @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.FieldOptions} FieldOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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: + case 8: + break; + } + } + 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; + } + 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.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.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; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + 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"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + 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.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * 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; + })(); + + /** + * 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; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * 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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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 {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 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 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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()); + }; + + /** + * 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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 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 OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @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.EnumOptions} EnumOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @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 + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @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.EnumValueOptions} EnumValueOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @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 + */ + EnumValueOptions.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @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.ServiceOptions} ServiceOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + 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; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @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 + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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[".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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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[".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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + 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 {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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 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; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * 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 + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * 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 + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * 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 + */ + 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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; + }; + + /** + * 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 + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + MethodOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + }; + + /** + * 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 + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + }; + + /** + * 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 + */ + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 + */ + 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.features = null; + 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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * 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; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * 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 + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @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.UninterpretedOption} UninterpretedOption + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 "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. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + 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; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @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); + } + 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 UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * 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 + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @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) { + 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; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + 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; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 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; + }; + + /** + * 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 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 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 Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @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 + */ + GeneratedCodeInfo.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; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @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 GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.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); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * 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 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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: + 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + /** + * 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 Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.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); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @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.Duration} Duration + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @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 + */ + Duration.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"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + 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; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.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; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * 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 + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + Any.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * 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.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @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.Empty} Empty + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @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 + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * 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.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.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); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @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.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @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 + */ + Timestamp.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"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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 Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.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; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * 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); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * 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); + }; + + /** + * 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 + */ + + /** + * 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" }); + + /** + * 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * 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) + }); + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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.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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(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]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @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 + */ + GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @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"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + 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]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @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.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @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 + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + 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 ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(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]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @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 + */ + CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + 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]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @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 + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * 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 WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(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]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * 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.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.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 WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @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 + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + 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 WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(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]]; + } + + /** + * 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.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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 OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @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.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @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 + */ + 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + 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 OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * 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 Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + 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]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * 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.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @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.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @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 + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + 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 Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + 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 Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.json new file mode 100644 index 000000000000..ccf265e3e0bf --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/protos/protos.json @@ -0,0 +1,4072 @@ +{ + "nested": { + "google": { + "nested": { + "analytics": { + "nested": { + "data": { + "nested": { + "v1beta": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1beta;data", + "java_multiple_files": true, + "java_outer_classname": "ReportingApiProto", + "java_package": "com.google.analytics.data.v1beta", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource_definition).pattern": "properties/{property}" + }, + "nested": { + "BetaAnalyticsData": { + "options": { + "(google.api.default_host)": "analyticsdata.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" + }, + "methods": { + "RunReport": { + "requestType": "RunReportRequest", + "responseType": "RunReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runReport", + "body": "*" + } + } + ] + }, + "RunPivotReport": { + "requestType": "RunPivotReportRequest", + "responseType": "RunPivotReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runPivotReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runPivotReport", + "body": "*" + } + } + ] + }, + "BatchRunReports": { + "requestType": "BatchRunReportsRequest", + "responseType": "BatchRunReportsResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunReports", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:batchRunReports", + "body": "*" + } + } + ] + }, + "BatchRunPivotReports": { + "requestType": "BatchRunPivotReportsRequest", + "responseType": "BatchRunPivotReportsResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunPivotReports", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:batchRunPivotReports", + "body": "*" + } + } + ] + }, + "GetMetadata": { + "requestType": "GetMetadataRequest", + "responseType": "Metadata", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/metadata}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/metadata}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "RunRealtimeReport": { + "requestType": "RunRealtimeReportRequest", + "responseType": "RunRealtimeReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runRealtimeReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runRealtimeReport", + "body": "*" + } + } + ] + }, + "CheckCompatibility": { + "requestType": "CheckCompatibilityRequest", + "responseType": "CheckCompatibilityResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:checkCompatibility", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:checkCompatibility", + "body": "*" + } + } + ] + }, + "CreateAudienceExport": { + "requestType": "CreateAudienceExportRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/audienceExports", + "(google.api.http).body": "audience_export", + "(google.api.method_signature)": "parent,audience_export", + "(google.longrunning.operation_info).response_type": "AudienceExport", + "(google.longrunning.operation_info).metadata_type": "AudienceExportMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/audienceExports", + "body": "audience_export" + } + }, + { + "(google.api.method_signature)": "parent,audience_export" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AudienceExport", + "metadata_type": "AudienceExportMetadata" + } + } + ] + }, + "QueryAudienceExport": { + "requestType": "QueryAudienceExportRequest", + "responseType": "QueryAudienceExportResponse", + "options": { + "(google.api.http).post": "/v1beta/{name=properties/*/audienceExports/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=properties/*/audienceExports/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudienceExport": { + "requestType": "GetAudienceExportRequest", + "responseType": "AudienceExport", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/audienceExports/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/audienceExports/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudienceExports": { + "requestType": "ListAudienceExportsRequest", + "responseType": "ListAudienceExportsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/audienceExports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/audienceExports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CheckCompatibilityRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 4 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 5 + }, + "compatibilityFilter": { + "type": "Compatibility", + "id": 6 + } + } + }, + "CheckCompatibilityResponse": { + "fields": { + "dimensionCompatibilities": { + "rule": "repeated", + "type": "DimensionCompatibility", + "id": 1 + }, + "metricCompatibilities": { + "rule": "repeated", + "type": "MetricCompatibility", + "id": 2 + } + } + }, + "Metadata": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", + "(google.api.resource).pattern": "properties/{property}/metadata" + }, + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "dimensions": { + "rule": "repeated", + "type": "DimensionMetadata", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "MetricMetadata", + "id": 2 + }, + "comparisons": { + "rule": "repeated", + "type": "ComparisonMetadata", + "id": 4 + } + } + }, + "RunReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6 + }, + "offset": { + "type": "int64", + "id": 7 + }, + "limit": { + "type": "int64", + "id": 8 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10 + }, + "currencyCode": { + "type": "string", + "id": 11 + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12 + }, + "keepEmptyRows": { + "type": "bool", + "id": 13 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 14 + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 9 + }, + "kind": { + "type": "string", + "id": 10 + } + } + }, + "RunPivotReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4 + }, + "pivots": { + "rule": "repeated", + "type": "Pivot", + "id": 5 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 6 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 7 + }, + "currencyCode": { + "type": "string", + "id": 8 + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 9 + }, + "keepEmptyRows": { + "type": "bool", + "id": 10 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 11 + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunPivotReportResponse": { + "fields": { + "pivotHeaders": { + "rule": "repeated", + "type": "PivotHeader", + "id": 1 + }, + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 2 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 3 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "aggregates": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 6 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 7 + }, + "kind": { + "type": "string", + "id": 8 + } + } + }, + "BatchRunReportsRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "requests": { + "rule": "repeated", + "type": "RunReportRequest", + "id": 2 + } + } + }, + "BatchRunReportsResponse": { + "fields": { + "reports": { + "rule": "repeated", + "type": "RunReportResponse", + "id": 1 + }, + "kind": { + "type": "string", + "id": 2 + } + } + }, + "BatchRunPivotReportsRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "requests": { + "rule": "repeated", + "type": "RunPivotReportRequest", + "id": 2 + } + } + }, + "BatchRunPivotReportsResponse": { + "fields": { + "pivotReports": { + "rule": "repeated", + "type": "RunPivotReportResponse", + "id": 1 + }, + "kind": { + "type": "string", + "id": 2 + } + } + }, + "GetMetadataRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" + } + } + } + }, + "RunRealtimeReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 4 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 5 + }, + "limit": { + "type": "int64", + "id": 6 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 7 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 8 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 9 + }, + "minuteRanges": { + "rule": "repeated", + "type": "MinuteRange", + "id": 10 + } + } + }, + "RunRealtimeReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 8 + }, + "kind": { + "type": "string", + "id": 9 + } + } + }, + "GetAudienceExportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceExport" + } + } + } + }, + "ListAudienceExportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAudienceExportsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "audienceExports": { + "rule": "repeated", + "type": "AudienceExport", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateAudienceExportRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" + } + }, + "audienceExport": { + "type": "AudienceExport", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceExport": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceExport", + "(google.api.resource).pattern": "properties/{property}/audienceExports/{audience_export}", + "(google.api.resource).plural": "audienceExports", + "(google.api.resource).singular": "audienceExport" + }, + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_percentageCompleted": { + "oneof": [ + "percentageCompleted" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowCount": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "percentageCompleted": { + "type": "double", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + }, + "AudienceExportMetadata": { + "fields": {} + }, + "QueryAudienceExportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryAudienceExportResponse": { + "oneofs": { + "_audienceExport": { + "oneof": [ + "audienceExport" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + } + }, + "fields": { + "audienceExport": { + "type": "AudienceExport", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceRows": { + "rule": "repeated", + "type": "AudienceRow", + "id": 2 + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "AudienceRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AudienceDimensionValue", + "id": 1 + } + } + }, + "AudienceDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceDimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "DateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "MinuteRange": { + "oneofs": { + "_startMinutesAgo": { + "oneof": [ + "startMinutesAgo" + ] + }, + "_endMinutesAgo": { + "oneof": [ + "endMinutesAgo" + ] + } + }, + "fields": { + "startMinutesAgo": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "endMinutesAgo": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "Dimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimensionExpression": { + "type": "DimensionExpression", + "id": 2 + } + } + }, + "DimensionExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "lowerCase", + "upperCase", + "concatenate" + ] + } + }, + "fields": { + "lowerCase": { + "type": "CaseExpression", + "id": 4 + }, + "upperCase": { + "type": "CaseExpression", + "id": 5 + }, + "concatenate": { + "type": "ConcatenateExpression", + "id": 6 + } + }, + "nested": { + "CaseExpression": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "ConcatenateExpression": { + "fields": { + "dimensionNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Metric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expression": { + "type": "string", + "id": 2 + }, + "invisible": { + "type": "bool", + "id": 3 + } + } + }, + "Comparison": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "oneComparison": { + "oneof": [ + "dimensionFilter", + "comparison" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 2 + }, + "comparison": { + "type": "string", + "id": 3 + } + } + }, + "FilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FilterExpression", + "id": 3 + }, + "filter": { + "type": "Filter", + "id": 4 + } + } + }, + "FilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FilterExpression", + "id": 1 + } + } + }, + "Filter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter", + "emptyFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 3 + }, + "inListFilter": { + "type": "InListFilter", + "id": 4 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 5 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 6 + }, + "emptyFilter": { + "type": "EmptyFilter", + "id": 8 + } + }, + "nested": { + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "EmptyFilter": { + "fields": {} + } + } + }, + "OrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension", + "pivot" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "pivot": { + "type": "PivotOrderBy", + "id": 3 + }, + "desc": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + }, + "PivotOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + }, + "pivotSelections": { + "rule": "repeated", + "type": "PivotSelection", + "id": 2 + } + }, + "nested": { + "PivotSelection": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "dimensionValue": { + "type": "string", + "id": 2 + } + } + } + } + } + } + }, + "Pivot": { + "fields": { + "fieldNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 2 + }, + "offset": { + "type": "int64", + "id": 3 + }, + "limit": { + "type": "int64", + "id": 4 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 5 + } + } + }, + "CohortSpec": { + "fields": { + "cohorts": { + "rule": "repeated", + "type": "Cohort", + "id": 1 + }, + "cohortsRange": { + "type": "CohortsRange", + "id": 2 + }, + "cohortReportSettings": { + "type": "CohortReportSettings", + "id": 3 + } + } + }, + "Cohort": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimension": { + "type": "string", + "id": 2 + }, + "dateRange": { + "type": "DateRange", + "id": 3 + } + } + }, + "CohortsRange": { + "fields": { + "granularity": { + "type": "Granularity", + "id": 1 + }, + "startOffset": { + "type": "int32", + "id": 2 + }, + "endOffset": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Granularity": { + "values": { + "GRANULARITY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2, + "MONTHLY": 3 + } + } + } + }, + "CohortReportSettings": { + "fields": { + "accumulate": { + "type": "bool", + "id": 1 + } + } + }, + "ResponseMetaData": { + "oneofs": { + "_schemaRestrictionResponse": { + "oneof": [ + "schemaRestrictionResponse" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_timeZone": { + "oneof": [ + "timeZone" + ] + }, + "_emptyReason": { + "oneof": [ + "emptyReason" + ] + }, + "_subjectToThresholding": { + "oneof": [ + "subjectToThresholding" + ] + } + }, + "fields": { + "dataLossFromOtherRow": { + "type": "bool", + "id": 3 + }, + "schemaRestrictionResponse": { + "type": "SchemaRestrictionResponse", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "timeZone": { + "type": "string", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "emptyReason": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "subjectToThresholding": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 9 + } + }, + "nested": { + "SchemaRestrictionResponse": { + "fields": { + "activeMetricRestrictions": { + "rule": "repeated", + "type": "ActiveMetricRestriction", + "id": 1 + } + }, + "nested": { + "ActiveMetricRestriction": { + "oneofs": { + "_metricName": { + "oneof": [ + "metricName" + ] + } + }, + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "restrictedMetricTypes": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 2 + } + } + } + } + } + } + }, + "SamplingMetadata": { + "fields": { + "samplesReadCount": { + "type": "int64", + "id": 1 + }, + "samplingSpaceSize": { + "type": "int64", + "id": 2 + } + } + }, + "DimensionHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MetricType", + "id": 2 + } + } + }, + "PivotHeader": { + "fields": { + "pivotDimensionHeaders": { + "rule": "repeated", + "type": "PivotDimensionHeader", + "id": 1 + }, + "rowCount": { + "type": "int32", + "id": 2 + } + } + }, + "PivotDimensionHeader": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + } + } + }, + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "MetricValue", + "id": 2 + } + } + }, + "DimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "MetricValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 4 + } + } + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "PropertyQuota": { + "fields": { + "tokensPerDay": { + "type": "QuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "QuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "QuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "QuotaStatus", + "id": 4 + }, + "potentiallyThresholdedRequestsPerHour": { + "type": "QuotaStatus", + "id": 5 + }, + "tokensPerProjectPerHour": { + "type": "QuotaStatus", + "id": 6 + } + } + }, + "QuotaStatus": { + "oneofs": { + "_consumed": { + "oneof": [ + "consumed" + ] + }, + "_remaining": { + "oneof": [ + "remaining" + ] + } + }, + "fields": { + "consumed": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "remaining": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DimensionMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customDefinition": { + "type": "bool", + "id": 5 + }, + "category": { + "type": "string", + "id": 7 + } + } + }, + "MetricMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "type": { + "type": "MetricType", + "id": 5 + }, + "expression": { + "type": "string", + "id": 6 + }, + "customDefinition": { + "type": "bool", + "id": 7 + }, + "blockedReasons": { + "rule": "repeated", + "type": "BlockedReason", + "id": 8 + }, + "category": { + "type": "string", + "id": 10 + } + }, + "nested": { + "BlockedReason": { + "values": { + "BLOCKED_REASON_UNSPECIFIED": 0, + "NO_REVENUE_METRICS": 1, + "NO_COST_METRICS": 2 + } + } + } + }, + "ComparisonMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + }, + "DimensionCompatibility": { + "oneofs": { + "_dimensionMetadata": { + "oneof": [ + "dimensionMetadata" + ] + }, + "_compatibility": { + "oneof": [ + "compatibility" + ] + } + }, + "fields": { + "dimensionMetadata": { + "type": "DimensionMetadata", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "compatibility": { + "type": "Compatibility", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "MetricCompatibility": { + "oneofs": { + "_metricMetadata": { + "oneof": [ + "metricMetadata" + ] + }, + "_compatibility": { + "oneof": [ + "compatibility" + ] + } + }, + "fields": { + "metricMetadata": { + "type": "MetricMetadata", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "compatibility": { + "type": "Compatibility", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "MetricAggregation": { + "values": { + "METRIC_AGGREGATION_UNSPECIFIED": 0, + "TOTAL": 1, + "MINIMUM": 5, + "MAXIMUM": 6, + "COUNT": 4 + } + }, + "MetricType": { + "values": { + "METRIC_TYPE_UNSPECIFIED": 0, + "TYPE_INTEGER": 1, + "TYPE_FLOAT": 2, + "TYPE_SECONDS": 4, + "TYPE_MILLISECONDS": 5, + "TYPE_MINUTES": 6, + "TYPE_HOURS": 7, + "TYPE_STANDARD": 8, + "TYPE_CURRENCY": 9, + "TYPE_FEET": 10, + "TYPE_MILES": 11, + "TYPE_METERS": 12, + "TYPE_KILOMETERS": 13 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + }, + "Compatibility": { + "values": { + "COMPATIBILITY_UNSPECIFIED": 0, + "COMPATIBLE": 1, + "INCOMPATIBLE": 2 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "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": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js new file mode 100644 index 000000000000..59e24ffc7bdc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js @@ -0,0 +1,72 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunPivotReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunPivotReports(request); + console.log(response); + } + + callBatchRunPivotReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js new file mode 100644 index 000000000000..0129024105dc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js @@ -0,0 +1,72 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunReports(request); + console.log(response); + } + + callBatchRunReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.check_compatibility.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.check_compatibility.js new file mode 100644 index 000000000000..55addaeadc4e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.check_compatibility.js @@ -0,0 +1,90 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. To + * learn more, see where to find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + */ + // const metricFilter = {} + /** + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + */ + // const compatibilityFilter = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCheckCompatibility() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.checkCompatibility(request); + console.log(response); + } + + callCheckCompatibility(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.create_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.create_audience_export.js new file mode 100644 index 000000000000..ff8af7aa5a3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.create_audience_export.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, audienceExport) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience export to create. + */ + // const audienceExport = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCreateAudienceExport() { + // Construct request + const request = { + parent, + audienceExport, + }; + + // Run request + const [operation] = await dataClient.createAudienceExport(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_audience_export.js new file mode 100644 index 000000000000..9e77a30f3e63 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_audience_export.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_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 audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceExport(request); + console.log(response); + } + + callGetAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_metadata.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_metadata.js new file mode 100644 index 000000000000..61d7b0bdca3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.get_metadata.js @@ -0,0 +1,69 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_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 resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see where to find + * your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234/metadata + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetMetadata() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getMetadata(request); + console.log(response); + } + + callGetMetadata(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js new file mode 100644 index 000000000000..74c3ca4c1e8b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js @@ -0,0 +1,78 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_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. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callListAudienceExports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceExportsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceExports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.query_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.query_audience_export.js new file mode 100644 index 000000000000..8025224680bc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.query_audience_export.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_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 audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callQueryAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceExport(request); + console.log(response); + } + + callQueryAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js new file mode 100644 index 000000000000..83323ae80e93 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js @@ -0,0 +1,135 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + */ + // const metrics = [1,2,3,4] + /** + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + */ + // const pivots = [1,2,3,4] + /** + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunPivotReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runPivotReport(request); + console.log(response); + } + + callRunPivotReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js new file mode 100644 index 000000000000..0fc4305a2141 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js @@ -0,0 +1,115 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + */ + // const orderBys = [1,2,3,4] + /** + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + */ + // const minuteRanges = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunRealtimeReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runRealtimeReport(request); + console.log(response); + } + + callRunRealtimeReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_report.js new file mode 100644 index 000000000000..991f0e32237a --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/beta_analytics_data.run_report.js @@ -0,0 +1,162 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The row count of the start row. The first row is counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + */ + // const orderBys = [1,2,3,4] + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runReport(request); + console.log(response); + } + + callRunReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json new file mode 100644 index 000000000000..ba79913e3173 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json @@ -0,0 +1,639 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", + "title": "BetaAnalyticsData runReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).", + "canonical": true, + "file": "beta_analytics_data.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 154, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", + "title": "BetaAnalyticsData runPivotReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", + "canonical": true, + "file": "beta_analytics_data.run_pivot_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 127, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "pivots", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunPivotReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async", + "title": "BetaAnalyticsData batchRunReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async", + "title": "BetaAnalyticsData batchRunPivotReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_pivot_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunPivotReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", + "title": "BetaAnalyticsData getMetadata Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "canonical": true, + "file": "beta_analytics_data.get_metadata.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.Metadata", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", + "title": "BetaAnalyticsData runRealtimeReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).", + "canonical": true, + "file": "beta_analytics_data.run_realtime_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 107, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "minute_ranges", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunRealtimeReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", + "title": "BetaAnalyticsData checkCompatibility Sample", + "origin": "API_DEFINITION", + "description": " This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.", + "canonical": true, + "file": "beta_analytics_data.check_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "compatibility_filter", + "type": ".google.analytics.data.v1beta.Compatibility" + } + ], + "resultType": ".google.analytics.data.v1beta.CheckCompatibilityResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async", + "title": "BetaAnalyticsData createAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.create_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_export", + "type": ".google.analytics.data.v1beta.AudienceExport" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async", + "title": "BetaAnalyticsData queryAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.query_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1beta.QueryAudienceExportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async", + "title": "BetaAnalyticsData getAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.get_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.AudienceExport", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async", + "title": "BetaAnalyticsData listAudienceExports Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.list_audience_exports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.ListAudienceExportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + } + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/index.ts new file mode 100644 index 000000000000..50ce34df5b6c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2025 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. ** + +import * as v1beta from './v1beta'; +const BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; +type BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; +export {v1beta, BetaAnalyticsDataClient}; +export default {v1beta, BetaAnalyticsDataClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client.ts new file mode 100644 index 000000000000..adc80ffc8b60 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client.ts @@ -0,0 +1,2233 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/beta_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './beta_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1beta + */ +export class BetaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + betaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BetaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BetaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BetaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceExportPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceExports/{audience_export}' + ), + metadataPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/metadata' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceExports: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceExportResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExport') as gax.protobuf.Type; + const createAudienceExportMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExportMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceExport: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceExportResponse.decode.bind(createAudienceExportResponse), + createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.betaAnalyticsDataStub) { + return this.betaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1beta.BetaAnalyticsData. + this.betaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1beta.BetaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1beta.BetaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const betaAnalyticsDataStubMethods = + ['runReport', 'runPivotReport', 'batchRunReports', 'batchRunPivotReports', 'getMetadata', 'runRealtimeReport', 'checkCompatibility', 'createAudienceExport', 'queryAudienceExport', 'getAudienceExport', 'listAudienceExports']; + for (const methodName of betaAnalyticsDataStubMethods) { + const callPromise = this.betaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.betaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized report of your Google Analytics event data. Reports + * contain statistics derived from data collected by the Google Analytics + * tracking code. The data returned from the API is as a table with columns + * for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or + * event count. Dimensions break down metrics across some common criteria, + * such as country or event name. + * + * For a guide to constructing requests & understanding responses, see + * [Creating a + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {number[]} request.dateRanges + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.offset + * The row count of the start row. The first row is counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + * @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 protos.google.analytics.data.v1beta.RunReportResponse|RunReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async + */ + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined + ]>; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized pivot report of your Google Analytics event data. + * Pivot reports are more advanced and expressive formats than regular + * reports. In a pivot report, dimensions are only visible if they are + * included in a pivot. Multiple pivots can be specified to further dissect + * your data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + * @param {number[]} request.metrics + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + * @param {number[]} request.dateRanges + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + * @param {number[]} request.pivots + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + * @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 protos.google.analytics.data.v1beta.RunPivotReportResponse|RunPivotReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async + */ + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined + ]>; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runPivotReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runPivotReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runPivotReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runPivotReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + * @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 protos.google.analytics.data.v1beta.BatchRunReportsResponse|BatchRunReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async + */ + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined + ]>; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple pivot reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + * @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 protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async + */ + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined + ]>; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunPivotReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunPivotReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunPivotReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunPivotReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns metadata for dimensions and metrics available in reporting methods. + * Used to explore the dimensions and metrics. In this method, a Google + * Analytics property identifier is specified in the request, and + * the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + * For example if a custom metric with parameter name `levels_unlocked` is + * registered to a property, the Metadata response will contain + * `customEvent:levels_unlocked`. Universal metadata are dimensions and + * metrics applicable to any property such as `country` and `totalUsers`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see [where to find + * your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234/metadata + * + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + * @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 protos.google.analytics.data.v1beta.Metadata|Metadata}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_metadata.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async + */ + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined + ]>; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|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().catch(err => {throw err}); + this._log.info('getMetadata request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMetadata response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMetadata(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMetadata response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized report of realtime event data for your property. + * Events appear in realtime reports seconds after they have been sent to + * the Google Analytics. Realtime reports show events and usage data for the + * periods of time ranging from the present moment to 30 minutes ago (up to + * 60 minutes for Google Analytics 360 properties). + * + * For a guide to constructing realtime requests & understanding responses, + * see [Creating a Realtime + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * [PropertyQuota](#PropertyQuota). + * @param {number[]} request.minuteRanges + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + * @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 protos.google.analytics.data.v1beta.RunRealtimeReportResponse|RunRealtimeReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async + */ + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined + ]>; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runRealtimeReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runRealtimeReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runRealtimeReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runRealtimeReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * This compatibility method lists dimensions and metrics that can be added to + * a report request and maintain compatibility. This method fails if the + * request's dimensions and metrics are incompatible. + * + * In Google Analytics, reports fail if they request incompatible dimensions + * and/or metrics; in that case, you will need to remove dimensions and/or + * metrics from the incompatible report until the report is compatible. + * + * The Realtime and Core reports have different compatibility rules. This + * method checks compatibility for Core reports. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. To + * learn more, see [where to find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + * @param {number[]} request.metrics + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + * @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + * @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 protos.google.analytics.data.v1beta.CheckCompatibilityResponse|CheckCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async + */ + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined + ]>; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('checkCompatibility request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkCompatibility response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.checkCompatibility(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, + {}|undefined + ]) => { + this._log.info('checkCompatibility response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience export of users. After creating an audience, the + * users are not immediately available for exporting. First, a request to + * `CreateAudienceExport` is necessary to create an audience export of users, + * and then second, this method is used to retrieve the users in the audience + * export. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1beta.QueryAudienceExportResponse|QueryAudienceExportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async + */ + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined + ]>; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|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().catch(err => {throw err}); + this._log.info('queryAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience export. This method + * can be used to understand an audience export after it has been created. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async + */ + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined + ]>; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|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().catch(err => {throw err}); + this._log.info('getAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience export for later retrieval. This method quickly returns + * the audience export's resource name and initiates a long running + * asynchronous request to form an audience export. To export the users in an + * audience export, first create the audience export through this method and + * then send the audience resource name to the `QueryAudienceExport` method. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * An audience export is a snapshot of the users currently in the audience at + * the time of audience export creation. Creating audience exports for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience exports + * contain the users in each audience. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1beta.AudienceExport} request.audienceExport + * Required. The audience export to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceExport response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceExport request %j', request); + return this.innerApiCalls.createAudienceExport(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceExport response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceExport()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + async checkCreateAudienceExportProgress(name: string): Promise>{ + this._log.info('createAudienceExport long-running'); + 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.createAudienceExport, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience exports for a property. This method can be used for you + * to find and reuse existing audience exports rather than creating + * unnecessary new audience exports. The same audience can have multiple + * audience exports that represent the export of users that were in an + * audience on different days. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * 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 `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>, + callback?: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceExports values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceExports request %j', request); + return this.innerApiCalls + .listAudienceExports(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]) => { + this._log.info('listAudienceExports values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceExports`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport} 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 `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExportsStream( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + 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['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports stream %j', request); + return this.descriptors.page.listAudienceExports.createStream( + this.innerApiCalls.listAudienceExports as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceExports`, 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. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async + */ + listAudienceExportsAsync( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + 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['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports iterate %j', request); + return this.descriptors.page.listAudienceExports.asyncIterate( + this.innerApiCalls['listAudienceExports'] 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, + optionsOrCallback?: + | 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]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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 { + 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 ?? '', + }); + 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, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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, + optionsOrCallback?: + | 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 { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceExport resource name string. + * + * @param {string} property + * @param {string} audience_export + * @returns {string} Resource name string. + */ + audienceExportPath(property:string,audienceExport:string) { + return this.pathTemplates.audienceExportPathTemplate.render({ + property: property, + audience_export: audienceExport, + }); + } + + /** + * Parse the property from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property; + } + + /** + * Parse the audience_export from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the audience_export. + */ + matchAudienceExportFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export; + } + + /** + * Return a fully-qualified metadata resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + metadataPath(property:string) { + return this.pathTemplates.metadataPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Metadata resource. + * + * @param {string} metadataName + * A fully-qualified path representing Metadata resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMetadataName(metadataName: string) { + return this.pathTemplates.metadataPathTemplate.match(metadataName).property; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.betaAnalyticsDataStub && !this._terminated) { + return this.betaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client_config.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client_config.json new file mode 100644 index 000000000000..271a9f86be46 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_client_config.json @@ -0,0 +1,93 @@ +{ + "interfaces": { + "google.analytics.data.v1beta.BetaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunPivotReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunPivotReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMetadata": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunRealtimeReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckCompatibility": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceExports": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_proto_list.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_proto_list.json new file mode 100644 index 000000000000..89471a4231ae --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/beta_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1beta/analytics_data_api.proto", + "../../protos/google/analytics/data/v1beta/data.proto" +] diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/gapic_metadata.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..e4f8c132470a --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/gapic_metadata.json @@ -0,0 +1,137 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1beta", + "libraryPackage": "@google-analytics/data", + "services": { + "BetaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/index.ts new file mode 100644 index 000000000000..1419ddab29cb --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/src/v1beta/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 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. ** + +export {BetaAnalyticsDataClient} from './beta_analytics_data_client'; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..6997f6a03d18 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const data = require('@google-analytics/data'); + +function main() { + const betaAnalyticsDataClient = new data.BetaAnalyticsDataClient(); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..a52eeae48da3 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 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. ** + +import {BetaAnalyticsDataClient} from '@google-analytics/data'; + +// check that the client class type name can be used +function doStuffWithBetaAnalyticsDataClient(client: BetaAnalyticsDataClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const betaAnalyticsDataClient = new BetaAnalyticsDataClient(); + doStuffWithBetaAnalyticsDataClient(betaAnalyticsDataClient); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/install.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 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. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/test/gapic_beta_analytics_data_v1beta.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/test/gapic_beta_analytics_data_v1beta.ts new file mode 100644 index 000000000000..57822eee0577 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/test/gapic_beta_analytics_data_v1beta.ts @@ -0,0 +1,2004 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as betaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +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 +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : 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) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.BetaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.betaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.betaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runReport', () => { + it('invokes runReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); + const [response] = await client.runReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runReport(request), expectedError); + }); + }); + + describe('runPivotReport', () => { + it('invokes runPivotReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCall(expectedResponse); + const [response] = await client.runPivotReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runPivotReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunPivotReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runPivotReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runPivotReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runPivotReport(request), expectedError); + }); + }); + + describe('batchRunReports', () => { + it('invokes batchRunReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunReports(request), expectedError); + }); + }); + + describe('batchRunPivotReports', () => { + it('invokes batchRunPivotReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunPivotReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunPivotReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + }); + }); + + describe('getMetadata', () => { + it('invokes getMetadata without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadata(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadata( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IMetadata|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadata(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMetadata(request), expectedError); + }); + }); + + describe('runRealtimeReport', () => { + it('invokes runRealtimeReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(expectedResponse); + const [response] = await client.runRealtimeReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runRealtimeReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunRealtimeReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runRealtimeReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runRealtimeReport(request), expectedError); + }); + }); + + describe('checkCompatibility', () => { + it('invokes checkCompatibility without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkCompatibility( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.ICheckCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.checkCompatibility(request), expectedError); + }); + }); + + describe('queryAudienceExport', () => { + it('invokes queryAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IQueryAudienceExportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceExport(request), expectedError); + }); + }); + + describe('getAudienceExport', () => { + it('invokes getAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceExport(request), expectedError); + }); + }); + + describe('createAudienceExport', () => { + it('invokes createAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceExport(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceExport( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with call error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with LRO error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceExport(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceExportProgress without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateAudienceExportProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceExportProgress with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceExportProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceExports', () => { + it('invokes listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceExports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceExports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceExports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceExports(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExportsStream without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + 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.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceExportsStream with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + const iterable = client.listAudienceExportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceExportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceExport', async () => { + const fakePath = "/rendered/path/audienceExport"; + const expectedParameters = { + property: "propertyValue", + audience_export: "audienceExportValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceExportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceExportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceExportPath', () => { + const result = client.audienceExportPath("propertyValue", "audienceExportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceExportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceExportName', () => { + const result = client.matchPropertyFromAudienceExportName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceExportFromAudienceExportName', () => { + const result = client.matchAudienceExportFromAudienceExportName(fakePath); + assert.strictEqual(result, "audienceExportValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadata', async () => { + const fakePath = "/rendered/path/metadata"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.metadataPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataPath', () => { + const result = client.metadataPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromMetadataName', () => { + const result = client.matchPropertyFromMetadataName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/tsconfig.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/webpack.config.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/webpack.config.js new file mode 100644 index 000000000000..f830d3fe109b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data-nodejs/google-analytics-data-v1beta-nodejs/webpack.config.js @@ -0,0 +1,64 @@ +// 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 +// +// 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'BetaAnalyticsData', + filename: './beta-analytics-data.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintrc.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitattributes b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.jsdoc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.jsdoc.js new file mode 100644 index 000000000000..717522242d93 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/data', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.mocharc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.mocharc.js new file mode 100644 index 000000000000..24e9d15257f9 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.nycrc b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierignore b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierrc.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierrc.js new file mode 100644 index 000000000000..d89a632f90b0 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CODE_OF_CONDUCT.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CONTRIBUTING.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CONTRIBUTING.md new file mode 100644 index 000000000000..11f6908f30cf --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/LICENSE b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/README.md b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/README.md new file mode 100644 index 000000000000..1b19eee45c37 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/README.md @@ -0,0 +1,108 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Google Analytics Data API: Nodejs Client][homepage] + +[//]: # "releaseLevel" + +[![npm version](https://img.shields.io/npm/v/@google-cloud/data.svg)](https://www.npmjs.org/package/@google-cloud/data) + +Google Analytics Data API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Google Analytics Data API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/data/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Analytics Data API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/data +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +[//]: # "samples" + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/data@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/package.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/package.json new file mode 100644 index 000000000000..a60aee8e2247 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/data", + "version": "0.1.0", + "description": "Data client for Node.js", + "repository": "googleapis/nodejs-data", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google data", + "data", + "alpha analytics data" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^5.1.1-rc.1" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.11", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.3", + "gts": "^6.0.2", + "jsdoc": "^4.0.5", + "jsdoc-fresh": "^5.0.2", + "jsdoc-region-tag": "^4.0.1", + "mocha": "^11.7.4", + "pack-n-play": "^4.2.1", + "typescript": "5.8.3", + "sinon": "^21.0.0" + }, + "engines": { + "node": ">=v18" + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto new file mode 100644 index 000000000000..47c4f3b278cd --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto @@ -0,0 +1,1304 @@ +// Copyright 2025 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.analytics.data.v1alpha; + +import "google/analytics/data/v1alpha/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service AlphaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly," + "https://www.googleapis.com/auth/drive," + "https://www.googleapis.com/auth/drive.file," + "https://www.googleapis.com/auth/spreadsheets"; + + // Returns a customized funnel report of your Google Analytics event data. The + // data returned from the API is as a table with columns for the requested + // dimensions and metrics. + // + // Funnel exploration lets you visualize the steps your users take to complete + // a task and quickly see how well they are succeeding or failing at each + // step. For example, how do prospects become shoppers and then become buyers? + // How do one time buyers become repeat buyers? With this information, you can + // improve inefficient or abandoned customer journeys. To learn more, see [GA4 + // Funnel Explorations](https://support.google.com/analytics/answer/9327974). + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the [Google Analytics Data API Funnel + // Reporting + // Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + rpc RunFunnelReport(RunFunnelReportRequest) + returns (RunFunnelReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:runFunnelReport" + body: "*" + }; + } + + // Creates an audience list for later retrieval. This method quickly returns + // the audience list's resource name and initiates a long running asynchronous + // request to form an audience list. To list the users in an audience list, + // first create the audience list through this method and then send the + // audience resource name to the `QueryAudienceList` method. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // An audience list is a snapshot of the users currently in the audience at + // the time of audience list creation. Creating audience lists for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience lists contain + // the users in each audience. + // + // This method is available at beta stability at + // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceList(CreateAudienceListRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/audienceLists" + body: "audience_list" + }; + option (google.api.method_signature) = "parent,audience_list"; + option (google.longrunning.operation_info) = { + response_type: "AudienceList" + metadata_type: "AudienceListMetadata" + }; + } + + // Retrieves an audience list of users. After creating an audience, the users + // are not immediately available for listing. First, a request to + // `CreateAudienceList` is necessary to create an audience list of users, and + // then second, this method is used to retrieve the users in the audience + // list. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // This method is available at beta stability at + // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceList(QueryAudienceListRequest) + returns (QueryAudienceListResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audienceLists/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Exports an audience list of users to a Google Sheet. After creating an + // audience, the users are not immediately available for listing. First, a + // request to `CreateAudienceList` is necessary to create an audience list of + // users, and then second, this method is used to export those users in the + // audience list to a Google Sheet. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc SheetExportAudienceList(SheetExportAudienceListRequest) + returns (SheetExportAudienceListResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience list. This method + // can be used to understand an audience list after it has been created. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/audienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience lists for a property. This method can be used for you to + // find and reuse existing audience lists rather than creating unnecessary new + // audience lists. The same audience can have multiple audience lists that + // represent the list of users that were in an audience on different days. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceLists(ListAudienceListsRequest) + returns (ListAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/audienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a recurring audience list. Recurring audience lists produces new + // audience lists each day. Audience lists are users in an audience at the + // time of the list's creation. + // + // A recurring audience list ensures that you have audience list based on the + // most recent data available for use each day. If you manually create + // audience list, you don't know when an audience list based on an additional + // day's data is available. This recurring audience list automates the + // creation of an audience list when an additional day's data is available. + // You will consume fewer quota tokens by using recurring audience list versus + // manually creating audience list at various times of day trying to guess + // when an additional day's data is ready. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + body: "recurring_audience_list" + }; + option (google.api.method_signature) = "parent,recurring_audience_list"; + } + + // Gets configuration metadata about a specific recurring audience list. This + // method can be used to understand a recurring audience list's state after it + // has been created. For example, a recurring audience list resource will + // generate audience list instances for each day, and this method can be used + // to get the resource name of the most recent audience list instance. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all recurring audience lists for a property. This method can be used + // for you to find and reuse existing recurring audience lists rather than + // creating unnecessary new recurring audience lists. The same audience can + // have multiple recurring audience lists that represent different dimension + // combinations; for example, just the dimension `deviceId` or both the + // dimensions `deviceId` and `userId`. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) + returns (ListRecurringAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Get all property quotas organized by quota category for a given property. + // This will charge 1 property quota from the category with the most quota. + rpc GetPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest) + returns (PropertyQuotasSnapshot) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + }; + option (google.api.method_signature) = "name"; + } + + // Initiates the creation of a report task. This method quickly + // returns a report task and initiates a long running + // asynchronous request to form a customized report of your Google Analytics + // event data. + // + // A report task will be retained and available for querying for 72 hours + // after it has been created. + // + // A report task created by one user can be listed and queried by all users + // who have access to the property. + rpc CreateReportTask(CreateReportTaskRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/reportTasks" + body: "report_task" + }; + option (google.api.method_signature) = "parent,report_task"; + option (google.longrunning.operation_info) = { + response_type: "ReportTask" + metadata_type: "ReportTaskMetadata" + }; + } + + // Retrieves a report task's content. After requesting the `CreateReportTask`, + // you are able to retrieve the report content once the report is + // ACTIVE. This method will return an error if the report task's state is not + // `ACTIVE`. A query response will return the tabular row & column values of + // the report. + rpc QueryReportTask(QueryReportTaskRequest) + returns (QueryReportTaskResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/reportTasks/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets report metadata about a specific report task. After creating a report + // task, use this method to check its processing state or inspect its + // report definition. + rpc GetReportTask(GetReportTaskRequest) returns (ReportTask) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/reportTasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all report tasks for a property. + rpc ListReportTasks(ListReportTasksRequest) + returns (ListReportTasksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/reportTasks" + }; + option (google.api.method_signature) = "parent"; + } +} + +// A request to create a new recurring audience list. +message CreateRecurringAudienceListRequest { + // Required. The parent resource where this recurring audience list will be + // created. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Required. The recurring audience list to create. + RecurringAudienceList recurring_audience_list = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A recurring audience list produces new audience lists each day. Audience +// lists are users in an audience at the time of the list's creation. A +// recurring audience list ensures that you have audience list based on the most +// recent data available for use each day. +message RecurringAudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" + plural: "recurringAudienceLists" + singular: "recurringAudienceList" + }; + + // Output only. Identifier. The recurring audience list resource name assigned + // during creation. This resource name identifies this + // `RecurringAudienceList`. + // + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the audience list + // response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of remaining days that a recurring audience export + // will produce an audience list instance. This counter decreases by one each + // day, and when it reaches zero, no new audience lists will be created. + // + // Recurring audience list request for Analytics 360 properties default to 180 + // days and have a maximum of 365 days. Requests for standard Analytics + // properties default to 14 days and have a maximum of 30 days. + // + // The minimum value allowed during creation is 1. Requests above their + // respective maximum will be coerced to their maximum. + optional int32 active_days_remaining = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Audience list resource names for audience list instances + // created for this recurring audience list. One audience list is created for + // each day, and the audience list will be listed here. + // + // This list is ordered with the most recently created audience list first. + repeated string audience_lists = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when a recurring audience + // list creates new audience lists. Webhooks allow a notification to be sent + // to your servers & avoid the need for polling. + // + // Two POST requests will be sent each time a recurring audience list creates + // an audience list. This happens once per day until a recurring audience list + // reaches 0 active days remaining. The first request will be sent showing a + // newly created audience list in its CREATING state. The second request will + // be sent after the audience list completes creation (either the ACTIVE or + // FAILED state). + optional WebhookNotification webhook_notification = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configures a long-running operation resource to send a webhook notification +// from the Google Analytics Data API to your webhook server when the resource +// updates. +// +// Notification configurations contain private values & are only visible to your +// GCP project. Different GCP projects may attach different webhook +// notifications to the same long-running operation resource. +message WebhookNotification { + // Optional. The web address that will receive the webhook notification. This + // address will receive POST requests as the state of the long running + // operation resource changes. The POST request will contain both a JSON + // version of the long running operation resource in the body and a + // `sentTimestamp` field. The sent timestamp will specify the unix + // microseconds since the epoch that the request was sent; this lets you + // identify replayed notifications. + // + // An example URI is + // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`. + // + // The URI must use HTTPS and point to a site with a valid SSL certificate on + // the web server. The URI must have a maximum string length of 128 characters + // & use only the allowlisted characters from [RFC + // 1738](https://www.rfc-editor.org/rfc/rfc1738). + // + // When your webhook server receives a notification, it is expected to reply + // with an HTTP response status code of 200 within 5 seconds. + // + // A URI is required to use webhook notifications. + // + // Requests to this webhook server will contain an ID token authenticating the + // service account + // `google-analytics-audience-export@system.gserviceaccount.com`. To learn + // more about ID tokens, see + // https://cloud.google.com/docs/authentication/token-types#id. For Google + // Cloud Functions, this lets you configure your function to require + // authentication. In Cloud IAM, you will need to grant the service account + // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud + // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook + // post request to pass Google Cloud Functions authentication. This API can + // send webhook notifications to arbitrary URIs; for webhook servers other + // than Google Cloud Functions, this ID token in the authorization bearer + // header should be ignored if it is not needed. + optional string uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The channel token is an arbitrary string value and must have a + // maximum string length of 64 characters. Channel tokens allow you to verify + // the source of a webhook notification. This guards against the message being + // spoofed. The channel token will be specified in the `X-Goog-Channel-Token` + // HTTP header of the webhook POST request. + // + // A channel token is not required to use webhook notifications. + optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to retrieve configuration metadata about a specific recurring +// audience list. +message GetRecurringAudienceListRequest { + // Required. The recurring audience list resource name. + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; +} + +// A request to list all recurring audience lists for a property. +message ListRecurringAudienceListsRequest { + // Required. All recurring audience lists for this property will be listed in + // the response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Optional. The maximum number of recurring audience lists to return. The + // service may return fewer than this value. If unspecified, at most 200 + // recurring audience lists will be returned. The maximum value is 1000 + // (higher values will be coerced to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListRecurringAudienceLists` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all recurring audience lists for a property. +message ListRecurringAudienceListsResponse { + // Each recurring audience list for a property. + repeated RecurringAudienceList recurring_audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to return the PropertyQuotasSnapshot for a given category. +message GetPropertyQuotasSnapshotRequest { + // Required. Quotas from this property will be listed in the response. + // Format: `properties/{property}/propertyQuotasSnapshot` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + ]; +} + +// Current state of all Property Quotas organized by quota category. +message PropertyQuotasSnapshot { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + pattern: "properties/{property}/propertyQuotasSnapshot" + plural: "propertyQuotasSnapshots" + singular: "propertyQuotasSnapshot" + }; + + // Identifier. The property quota snapshot resource name. + string name = 4 [(google.api.field_behavior) = IDENTIFIER]; + + // Property Quota for core property tokens + PropertyQuota core_property_quota = 1; + + // Property Quota for realtime property tokens + PropertyQuota realtime_property_quota = 2; + + // Property Quota for funnel property tokens + PropertyQuota funnel_property_quota = 3; +} + +// A request to retrieve configuration metadata about a specific audience list. +message GetAudienceListRequest { + // Required. The audience list resource name. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceList" + } + ]; +} + +// A request to list all audience lists for a property. +message ListAudienceListsRequest { + // Required. All audience lists for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Optional. The maximum number of audience lists to return. The service may + // return fewer than this value. If unspecified, at most 200 audience lists + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceLists` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceLists` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience lists for a property. +message ListAudienceListsResponse { + // Each audience list for a property. + repeated AudienceList audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience list. +message CreateAudienceListRequest { + // Required. The parent resource where this audience list will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Required. The audience list to create. + AudienceList audience_list = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience list is a list of users in an audience at the time of the list's +// creation. One audience may have multiple audience lists created for different +// days. +message AudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceList" + pattern: "properties/{property}/audienceLists/{audience_list}" + plural: "audienceLists" + singular: "audienceList" + }; + + // The AudienceList currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceList is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceList call. + CREATING = 1; + + // The AudienceList is fully created and ready for querying. An AudienceList + // is updated to active asynchronously from a request; this occurs some + // time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceList failed to be created. It is possible that re-requesting + // this audience list will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience list resource name assigned during + // creation. This resource name identifies this `AudienceList`. + // + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceList. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceList was called and the + // AudienceList began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceList. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceList + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceList result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience list fails during + // creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recurring audience list that created this audience list. + // Recurring audience lists create audience lists daily. + // + // If audience lists are created directly, they will have no associated + // recurring audience list, and this field will be blank. + optional string recurring_audience_list = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when an audience list is + // ready to be used. Webhooks allow a notification to be sent to your servers + // & avoid the need for polling. + // + // Either one or two POST requests will be sent to the webhook. The first POST + // request will be sent immediately showing the newly created audience list in + // its CREATING state. The second POST request will be sent after the audience + // list completes creation (either the ACTIVE or FAILED state). + // + // If identical audience lists are requested in quick succession, the second & + // subsequent audience lists can be served from cache. In that case, the + // audience list create method can return an audience list is already ACTIVE. + // In this scenario, only one POST request will be sent to the webhook. + optional WebhookNotification webhook_notification = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// This metadata is currently blank. +message AudienceListMetadata {} + +// A request to list users in an audience list. +message QueryAudienceListRequest { + // Required. The name of the audience list to retrieve users from. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience list. +message QueryAudienceListResponse { + // Configuration data about AudienceList being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceList correspond to the columns in the AudienceRows. + optional AudienceList audience_list = 1; + + // Rows for each user in an audience list. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceList result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// A request to export users in an audience list to a Google Sheet. +message SheetExportAudienceListRequest { + // Required. The name of the audience list to retrieve users from. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The created Google Sheet with the list of users in an audience list. +message SheetExportAudienceListResponse { + // A uri for you to visit in your browser to view the Google Sheet. + optional string spreadsheet_uri = 1; + + // An ID that identifies the created Google Sheet resource. + optional string spreadsheet_id = 2; + + // The total number of rows in the AudienceList result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; + + // Configuration data about AudienceList being exported. Returned to help + // interpret the AudienceList in the Google Sheet of this response. + // + // For example, the AudienceList may have more rows than are present in the + // Google Sheet, and in that case, you may want to send an additional sheet + // export request with a different `offset` value to retrieve the next page of + // rows in an additional Google Sheet. + optional AudienceList audience_list = 4; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceListResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The request for a funnel report. +message RunFunnelReportRequest { + // Controls the dimensions present in the funnel visualization sub report + // response. + enum FunnelVisualizationType { + // Unspecified type. + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0; + + // A standard (stepped) funnel. The funnel visualization sub report in the + // response will not contain date. + STANDARD_FUNNEL = 1; + + // A trended (line chart) funnel. The funnel visualization sub report in the + // response will contain the date dimension. + TRENDED_FUNNEL = 2; + } + + // Optional. A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. + repeated DateRange date_ranges = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration of this request's funnel. This funnel + // configuration is required. + Funnel funnel = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, this breakdown adds a dimension to the funnel table + // sub report response. This breakdown dimension expands each funnel step to + // the unique values of the breakdown dimension. For example, a breakdown by + // the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + // `desktop`, and the total. + FunnelBreakdown funnel_breakdown = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, next action adds a dimension to the funnel + // visualization sub report response. This next action dimension expands each + // funnel step to the unique values of the next action. For example a next + // action of the `eventName` dimension will create rows for several events + // (for example `session_start` & `click`) and the total. + // + // Next action only supports `eventName` and most Page / Screen dimensions + // like `pageTitle` and `pagePath`. + FunnelNextAction funnel_next_action = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The funnel visualization type controls the dimensions present in + // the funnel visualization sub report response. If not specified, + // `STANDARD_FUNNEL` is used. + FunnelVisualizationType funnel_visualization_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configurations of segments. Segments are subsets of a + // property's data. In a funnel report with segments, the funnel is evaluated + // in each segment. + // + // Each segment specified in this request + // produces a separate row in the response; in the response, each segment + // identified by its name. + // + // The segments parameter is optional. Requests are limited to 4 segments. + repeated Segment segments = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + int64 limit = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters allow you to ask for only specific dimension + // values in the report. To learn more, see [Creating a Report: Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Toggles whether to return the current state of this Analytics + // Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The funnel report response contains two sub reports. The two sub reports are +// different combinations of dimensions and metrics. +message RunFunnelReportResponse { + // The funnel table is a report with the funnel step, segment, breakdown + // dimension, active users, completion rate, abandonments, and abandonments + // rate. + // + // The segment dimension is only present in this response if a segment was + // requested. The breakdown dimension is only present in this response if it + // was requested. + FunnelSubReport funnel_table = 1; + + // The funnel visualization is a report with the funnel step, segment, date, + // next action dimension, and active users. + // + // The segment dimension is only present in this response if a segment was + // requested. The date dimension is only present in this response if it was + // requested through the `TRENDED_FUNNEL` funnel type. The next action + // dimension is only present in the response if it was requested. + FunnelSubReport funnel_visualization = 2; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 3; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runFunnelReport". Useful to distinguish between + // response types in JSON. + string kind = 4; +} + +// A specific report task configuration. +message ReportTask { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/ReportTask" + pattern: "properties/{property}/reportTasks/{report_task}" + plural: "reportTasks" + singular: "reportTask" + }; + + // The definition of how a report should be run. + message ReportDefinition { + // Optional. The dimensions requested and displayed. + repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metrics requested and displayed. + repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. + // If two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. In a cohort request, + // this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters let you ask for only specific dimension + // values in the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter clause of metrics. Applied after aggregating the + // report's rows, similar to SQL having-clause. Dimensions cannot be used in + // this filter. + FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The row count of the start row from Google Analytics Storage. + // The first row is counted as row 0. + // + // When creating a report task, the `offset` and `limit` parameters define + // the subset of data rows from Google Analytics storage to be included in + // the generated report. For example, if there are a total of 300,000 rows + // in Google Analytics storage, the initial report task may have the + // first 10,000 rows with a limit of 10,000 and an offset of 0. + // Subsequently, another report task could cover the next 10,000 rows with a + // limit of 10,000 and an offset of 10,000. + int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return in the Report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if + // you set `limit` to a higher value. + int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregation of metrics. Aggregated metric values will be shown + // in rows where the dimension_values are set to + // "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cohort group associated with this request. If there is a cohort + // group in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If false or unspecified, each row with all metrics equal to 0 + // will not be returned. If true, these rows will be returned if they are + // not separately removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // containing eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The report's sampling level. + optional SamplingLevel sampling_level = 14 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The report metadata for a specific report task. + message ReportMetadata { + // The processing state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The report is currently creating and will be available in the + // future. Creating occurs immediately after the CreateReport call. + CREATING = 1; + + // The report is fully created and ready for querying. + ACTIVE = 2; + + // The report failed to be created. + FAILED = 3; + } + + // Output only. The current state for this report task. + optional State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when `CreateReportTask` was called and the report + // began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // report. Because this token count is based on activity from the `CREATING` + // state, this tokens charge will be fixed once a report task enters the + // `ACTIVE` or `FAILED` state. + int32 creation_quota_tokens_charged = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the report result. This field + // will be populated when the state is active. You can utilize + // `task_row_count` for pagination within the confines of their existing + // report. + optional int32 task_row_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated if a report task fails during + // creation. + optional string error_message = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in Google Analytics storage. If you + // want to query additional data rows beyond the current report, they can + // initiate a new report task based on the `total_row_count`. + // + // The `task_row_count` represents the number of rows specifically + // pertaining to the current report, whereas `total_row_count` encompasses + // the total count of rows across all data retrieved from Google + // Analytics storage. + // + // For example, suppose the current report's `task_row_count` is 20, + // displaying the data from the first 20 rows. Simultaneously, the + // `total_row_count` is 30, indicating the presence of data for all 30 rows. + // The `task_row_count` can be utilizated to paginate through the initial 20 + // rows. To expand the report and include data from all 30 rows, a new + // report task can be created using the total_row_count to access the full + // set of 30 rows' worth of data. + optional int32 total_row_count = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The report task resource name assigned during + // creation. Format: "properties/{property}/reportTasks/{report_task}" + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. A report definition to fetch report data, which describes the + // structure of a report. It typically includes the fields that will be + // included in the report and the criteria that will be used to filter the + // data. + ReportDefinition report_definition = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The report metadata for a specific report task, which provides + // information about a report. It typically includes the following + // information: the resource name of the report, the state of the report, the + // timestamp the report was created, etc, + ReportMetadata report_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to create a report task. +message CreateReportTaskRequest { + // Required. The parent resource where this report task will be created. + // Format: `properties/{propertyId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Required. The report task configuration to create. + ReportTask report_task = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the metadata of a long-running operation. Currently, this metadata +// is blank. +message ReportTaskMetadata {} + +// A request to fetch the report content for a report task. +message QueryReportTaskRequest { + // Required. The report source name. + // Format: `properties/{property}/reportTasks/{report}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row in the report. The first row is + // counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return from the report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. The number of rows + // available to a QueryReportTaskRequest is further limited by the limit of + // the associated ReportTask. A query can retrieve at most ReportTask.limit + // rows. For example, if the ReportTask has a limit of 1,000, then a + // QueryReportTask request with offset=900 and limit=500 will return at most + // 100 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The report content corresponding to a report task. +message QueryReportTaskResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; +} + +// A request to retrieve configuration metadata about a specific report task. +message GetReportTaskRequest { + // Required. The report task resource name. + // Format: `properties/{property}/reportTasks/{report_task}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/ReportTask" + } + ]; +} + +// A request to list all report tasks for a property. +message ListReportTasksRequest { + // Required. All report tasks for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Optional. The maximum number of report tasks to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReportTasks` call. + // Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all report tasks for a property. +message ListReportTasksResponse { + // Each report task for a property. + repeated ReportTask report_tasks = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto new file mode 100644 index 000000000000..0315a16711bc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto @@ -0,0 +1,1611 @@ +// Copyright 2025 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.analytics.data.v1alpha; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The dimension name or metric name. Must be a name defined in dimensions + // or metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 2; + + // A filter for in list values. + InListFilter in_list_filter = 3; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 4; + + // A filter for between two values. + BetweenFilter between_filter = 5; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 6; + } +} + +// The filter for string +message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; +} + +// The result needs to be in a list of string values. +message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; +} + +// Filters for numeric or date values. +message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// To express that the result needs to be between two numbers (inclusive). +message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; +} + +// Filter for empty values. +message EmptyFilter {} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630) and [About + // Demographics and + // Interests](https://support.google.com/analytics/answer/2799357). + optional bool subject_to_thresholding = 8; + + // If this report's results are + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in the order that date + // ranges were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} + +// Breakdowns add a dimension to the funnel table sub report response. +message FunnelBreakdown { + // The dimension column added to the funnel table sub report response. The + // breakdown dimension breaks down each funnel step. A valid + // `breakdownDimension` is required if `funnelBreakdown` is specified. + Dimension breakdown_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 15. + optional int64 limit = 2; +} + +// Next actions state the value for a dimension after the user has achieved +// a step but before the same user has achieved the next step. For example if +// the `nextActionDimension` is `eventName`, then `nextActionDimension` in the +// `i`th funnel step row will return first event after the event that qualified +// the user into the `i`th funnel step but before the user achieved the `i+1`th +// funnel step. +message FunnelNextAction { + // The dimension column added to the funnel visualization sub report response. + // The next action dimension returns the next dimension value of this + // dimension after the user has attained the `i`th funnel step. + // + // `nextActionDimension` currently only supports `eventName` and most Page / + // Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + // cannot be a dimension expression. + Dimension next_action_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 5. + optional int64 limit = 2; +} + +// Configures the funnel in a funnel report request. A funnel reports on users +// as they pass through a sequence of steps. +// +// Funnel exploration lets you visualize the steps your users take to complete a +// task and quickly see how well they are succeeding or failing at each step. +// For example, how do prospects become shoppers and then become buyers? How do +// one time buyers become repeat buyers? With this information, you can improve +// inefficient or abandoned customer journeys. +message Funnel { + // In an open funnel, users can enter the funnel in any step, and in a closed + // funnel, users must enter the funnel in the first step. Optional. If + // unspecified, a closed funnel is used. + bool is_open_funnel = 1; + + // The sequential steps of this funnel. + repeated FunnelStep steps = 2; +} + +// Steps define the user journey you want to measure. Steps contain one or +// more conditions that your users must meet to be included in that step of +// the funnel journey. +message FunnelStep { + // The distinctive name for this step. If unspecified, steps will be named + // by a 1 based indexed name (for example "0. ", "1. ", etc.). This name + // defines string value returned by the `funnelStepName` dimension. For + // example, specifying `name = Purchase` in the request's third funnel step + // will produce `3. Purchase` in the funnel report response. + string name = 1; + + // If true, this step must directly follow the previous step. If false, + // there can be events between the previous step and this step. If + // unspecified, `isDirectlyFollowedBy` is treated as false. + bool is_directly_followed_by = 2; + + // If specified, this step must complete within this duration of the + // completion of the prior step. `withinDurationFromPriorStep` is inclusive + // of the endpoint at the microsecond granularity. For example a duration of + // 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 + // microsecond. + // + // `withinDurationFromPriorStep` is optional, and if unspecified, steps may + // be separated by any time duration. + optional google.protobuf.Duration within_duration_from_prior_step = 3; + + // The condition that your users must meet to be included in this step of + // the funnel journey. + FunnelFilterExpression filter_expression = 4; +} + +// Funnel sub reports contain the dimension and metric data values. For example, +// 12 users reached the second step of the funnel. +message FunnelSubReport { + // Describes dimension columns. Funnel reports always include the funnel step + // dimension in sub report responses. Additional dimensions like breakdowns, + // dates, and next actions may be present in the response if requested. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. Funnel reports always include active users in sub + // report responses. The funnel table includes additional metrics like + // completion rate, abandonments, and abandonments rate. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // Metadata for the funnel report. + FunnelResponseMetadata metadata = 4; +} + +// User segments are subsets of users who engaged with your site or app. For +// example, users who have previously purchased; users who added items to their +// shopping carts, but didn’t complete a purchase. +message UserSegment { + // Defines which users are included in this segment. Optional. + UserSegmentCriteria user_inclusion_criteria = 1; + + // Defines which users are excluded in this segment. Optional. + UserSegmentExclusion exclusion = 2; +} + +// A user matches a criteria if the user's events meet the conditions in the +// criteria. +message UserSegmentCriteria { + // A user matches this criteria if the user matches each of these + // `andConditionGroups` and each of the `andSequenceGroups`. + // `andConditionGroups` may be empty if `andSequenceGroups` are specified. + repeated UserSegmentConditionGroup and_condition_groups = 1; + + // A user matches this criteria if the user matches each of these + // `andSequenceGroups` and each of the `andConditionGroups`. + // `andSequenceGroups` may be empty if `andConditionGroups` are specified. + repeated UserSegmentSequenceGroup and_sequence_groups = 2; +} + +// Scoping specifies which events are considered when evaluating if a user +// meets a criteria. +enum UserCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + USER_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_SESSION = 2; + + // If the criteria is satisfied by any events for the user, the user + // matches the criteria. + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message UserSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this user. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a single + // event, and then, the condition group is determined to be matched or not for + // this user. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Define conditions that must occur in a specific order for the user to be +// a member of the segment. +message UserSegmentSequenceGroup { + // All sequence steps must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, all sequence steps must complete within + // one session for the user to match the sequence. `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT` is not supported. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping sequence_scoping = 1; + + // Defines the time period in which the whole sequence must occur; for + // example, 30 Minutes. `sequenceMaximumDuration` is inclusive + // of the endpoint at the microsecond granularity. For example a sequence + // with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 + // seconds, but not 5 seconds and 1 microsecond. + // + // `sequenceMaximumDuration` is optional, and if unspecified, sequences can + // be completed in any time duration. + google.protobuf.Duration sequence_maximum_duration = 2; + + // An ordered sequence of condition steps. A user's events must complete + // each step in order for the user to match the + // `UserSegmentSequenceGroup`. + repeated UserSequenceStep user_sequence_steps = 3; +} + +// A condition that must occur in the specified step order for this user +// to match the sequence. +message UserSequenceStep { + // If true, the event satisfying this step must be the very next event + // after the event satifying the last step. If false, this step indirectly + // follows the prior step; for example, there may be events between the + // prior step and this step. `isDirectlyFollowedBy` must be false for + // the first step. + bool is_directly_followed_by = 1; + + // This sequence step must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // WITHIN_SAME_SESSION`, this sequence steps must complete within one + // session for the user to match the sequence. `stepScoping = + // ACROSS_ALL_SESSIONS` is only allowed if the `sequenceScoping = + // ACROSS_ALL_SESSIONS`. + // + // Optional. If unspecified, `stepScoping` uses the same + // `UserCriteriaScoping` as the `sequenceScoping`. + UserCriteriaScoping step_scoping = 2; + + // A user matches this sequence step if their events match this + // expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 3; +} + +// Specifies which users are excluded in this segment. +message UserSegmentExclusion { + // Specifies how long an exclusion will last if a user matches the + // `userExclusionCriteria`. + // + // Optional. If unspecified, `userExclusionDuration` of + // `USER_EXCLUSION_TEMPORARY` is used. + UserExclusionDuration user_exclusion_duration = 1; + + // If a user meets this condition, the user is excluded from membership in + // the segment for the `userExclusionDuration`. + UserSegmentCriteria user_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a user matches +// the `userExclusionCriteria`. +enum UserExclusionDuration { + // Unspecified exclusion duration. Do not specify. + USER_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude users from the segment during periods when the + // user meets the `userExclusionCriteria` condition. + USER_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude users from the segment if the user ever meets the + // `userExclusionCriteria` condition. + USER_EXCLUSION_PERMANENT = 2; +} + +// Session segments are subsets of the sessions that occurred on your site or +// app: for example, all the sessions that originated from a particular +// advertising campaign. +message SessionSegment { + // Defines which sessions are included in this segment. Optional. + SessionSegmentCriteria session_inclusion_criteria = 1; + + // Defines which sessions are excluded in this segment. Optional. + SessionSegmentExclusion exclusion = 2; +} + +// A session matches a criteria if the session's events meet the conditions in +// the criteria. +message SessionSegmentCriteria { + // A session matches this criteria if the session matches each of these + // `andConditionGroups`. + repeated SessionSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if a +// session meets a criteria. +enum SessionCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the session matches the + // criteria. + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the session matches + // the criteria. + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message SessionSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this session. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a + // single event, and then, the condition group is determined to be matched or + // not for this session. + // + // Optional. If unspecified, a `conditionScoping` of `WITHIN_SAME_SESSION` + // is used. + SessionCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which sessions are excluded in this segment. +message SessionSegmentExclusion { + // Specifies how long an exclusion will last if a session matches the + // `sessionExclusionCriteria`. + // + // Optional. If unspecified, a `sessionExclusionDuration` of + // `SESSION_EXCLUSION_TEMPORARY` is used. + SessionExclusionDuration session_exclusion_duration = 1; + + // If a session meets this condition, the session is excluded from + // membership in the segment for the `sessionExclusionDuration`. + SessionSegmentCriteria session_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a session +// matches the `sessionExclusionCriteria`. +enum SessionExclusionDuration { + // Unspecified exclusion duration. Do not specify. + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude sessions from the segment during periods when the + // session meets the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude sessions from the segment if the session ever meets + // the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_PERMANENT = 2; +} + +// Event segments are subsets of events that were triggered on your site or app. +// for example, all purchase events made in a particular location; app_exception +// events that occurred on a specific operating system. +message EventSegment { + // Defines which events are included in this segment. Optional. + EventSegmentCriteria event_inclusion_criteria = 1; + + // Defines which events are excluded in this segment. Optional. + EventSegmentExclusion exclusion = 2; +} + +// An event matches a criteria if the event meet the conditions in the +// criteria. +message EventSegmentCriteria { + // An event matches this criteria if the event matches each of these + // `andConditionGroups`. + repeated EventSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if an event +// meets a criteria. +enum EventCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the event matches the + // criteria. + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message EventSegmentConditionGroup { + // `conditionScoping` should always be `EVENT_CRITERIA_WITHIN_SAME_EVENT`. + // + // Optional. If unspecified, a `conditionScoping` of + // `EVENT_CRITERIA_WITHIN_SAME_EVENT` is used. + EventCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which events are excluded in this segment. +message EventSegmentExclusion { + // `eventExclusionDuration` should always be `PERMANENTLY_EXCLUDE`. + // + // Optional. If unspecified, an `eventExclusionDuration` of + // `EVENT_EXCLUSION_PERMANENT` is used. + EventExclusionDuration event_exclusion_duration = 1; + + // If an event meets this condition, the event is excluded from membership + // in the segment for the `eventExclusionDuration`. + EventSegmentCriteria event_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if an event +// matches the `eventExclusionCriteria`. +enum EventExclusionDuration { + // Unspecified exclusion duration. Do not specify. + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Permanently exclude events from the segment if the event ever meets + // the `eventExclusionCriteria` condition. + EVENT_EXCLUSION_PERMANENT = 1; +} + +// A segment is a subset of your Analytics data. For example, of your entire set +// of users, one segment might be users from a particular country or city. +// Another segment might be users who purchase a particular line of products or +// who visit a specific part of your site or trigger certain events in your app. +// +// To learn more, see [Segment +// Builder](https://support.google.com/analytics/answer/9304353). +message Segment { + // The name for this segment. If unspecified, segments are named "Segment". + // This name defines string value returned by the `segment` dimension. The + // `segment` dimension prefixes segment names by the 1-based index number of + // the segment in the request (for example "1. Segment", "2. Segment", etc.). + string name = 1; + + // A segment is specified in one scope. + oneof one_segment_scope { + // User segments are subsets of users who engaged with your site or app. + UserSegment user_segment = 2; + + // Session segments are subsets of the sessions that occurred on your site + // or app. + SessionSegment session_segment = 3; + + // Event segments are subsets of events that were triggered on your site or + // app. + EventSegment event_segment = 4; + } +} + +// Expresses combinations of segment filters. +message SegmentFilterExpression { + // Specify one type of filter for `SegmentFilterExpression`. + oneof expr { + // The SegmentFilterExpression in `andGroup` have an AND relationship. + SegmentFilterExpressionList and_group = 1; + + // The SegmentFilterExpression in `orGroup` have an OR relationship. + SegmentFilterExpressionList or_group = 2; + + // The SegmentFilterExpression is NOT of `notExpression`. + SegmentFilterExpression not_expression = 3; + + // A primitive segment filter. + SegmentFilter segment_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + SegmentEventFilter segment_event_filter = 5; + } +} + +// A list of segment filter expressions. +message SegmentFilterExpressionList { + // The list of segment filter expressions + repeated SegmentFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message SegmentFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentFilterScoping filter_scoping = 8; +} + +// Scopings specify how the dimensions & metrics of multiple events +// should be considered when evaluating a segment filter. +message SegmentFilterScoping { + // If `atAnyPointInTime` is true, this filter evaluates to true for all + // events if it evaluates to true for any event in the date range of the + // request. + // + // This `atAnyPointInTime` parameter does not extend the date range of + // events in the report. If `atAnyPointInTime` is true, only events within + // the report's date range are considered when evaluating this filter. + // + // This `atAnyPointInTime` is only able to be specified if the criteria + // scoping is `ACROSS_ALL_SESSIONS` and is not able to be specified in + // sequences. + // + // If the criteria scoping is `ACROSS_ALL_SESSIONS`, `atAnyPointInTime` = + // false is used if unspecified. + optional bool at_any_point_in_time = 1; +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message SegmentEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional SegmentParameterFilterExpression + segment_parameter_filter_expression = 2; +} + +// Expresses combinations of segment filter on parameters. +message SegmentParameterFilterExpression { + // Specify one type of filter for `SegmentParameterFilterExpression`. + oneof expr { + // The SegmentParameterFilterExpression in `andGroup` have an AND + // relationship. + SegmentParameterFilterExpressionList and_group = 1; + + // The SegmentParameterFilterExpression in `orGroup` have an OR + // relationship. + SegmentParameterFilterExpressionList or_group = 2; + + // The SegmentParameterFilterExpression is NOT of `notExpression`. + SegmentParameterFilterExpression not_expression = 3; + + // A primitive segment parameter filter. + SegmentParameterFilter segment_parameter_filter = 4; + } +} + +// A list of segment parameter filter expressions. +message SegmentParameterFilterExpressionList { + // The list of segment parameter filter expressions. + repeated SegmentParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a segment. +message SegmentParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentParameterFilterScoping filter_scoping = 8; +} + +// Scopings specify how multiple events should be considered when evaluating a +// segment parameter filter. +message SegmentParameterFilterScoping { + // Accumulates the parameter over the specified period of days before + // applying the filter. Only supported if criteria scoping is + // `ACROSS_ALL_SESSIONS` or `WITHIN_SAME_SESSION`. Only supported if the + // parameter is `event_count`. + // + // For example if `inAnyNDayPeriod` is 3, the event_name is "purchase", + // the event parameter is "event_count", and the Filter's criteria is + // greater than 5, this filter will accumulate the event count of purchase + // events over every 3 consecutive day period in the report's date range; a + // user will pass this Filter's criteria to be included in this segment if + // their count of purchase events exceeds 5 in any 3 consecutive day period. + // For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to + // 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered. + // + // The date range is not extended for the purpose of having a full N day + // window near the start of the date range. For example if a report is for + // 2021-11-01 to 2021-11-10 and `inAnyNDayPeriod` = 3, the first two day + // period will be effectively shortened because no event data outside the + // report's date range will be read. For example, the first four periods + // will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, + // 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04. + // + // `inAnyNDayPeriod` is optional. If not specified, the + // `segmentParameterFilter` is applied to each event individually. + optional int64 in_any_n_day_period = 1; +} + +// Expresses combinations of funnel filters. +message FunnelFilterExpression { + // Specify one type of filter for `FunnelFilterExpression`. + oneof expr { + // The FunnelFilterExpression in `andGroup` have an AND relationship. + FunnelFilterExpressionList and_group = 1; + + // The FunnelFilterExpression in `orGroup` have an OR relationship. + FunnelFilterExpressionList or_group = 2; + + // The FunnelFilterExpression is NOT of `notExpression`. + FunnelFilterExpression not_expression = 3; + + // A funnel filter for a dimension or metric. + FunnelFieldFilter funnel_field_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + FunnelEventFilter funnel_event_filter = 5; + } +} + +// A list of funnel filter expressions. +message FunnelFilterExpressionList { + // The list of funnel filter expressions. + repeated FunnelFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message FunnelFieldFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message FunnelEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional FunnelParameterFilterExpression funnel_parameter_filter_expression = + 2; +} + +// Expresses combinations of funnel filters on parameters. +message FunnelParameterFilterExpression { + // Specify one type of filter for `FunnelParameterFilterExpression`. + oneof expr { + // The FunnelParameterFilterExpression in `andGroup` have an AND + // relationship. + FunnelParameterFilterExpressionList and_group = 1; + + // The FunnelParameterFilterExpression in `orGroup` have an OR + // relationship. + FunnelParameterFilterExpressionList or_group = 2; + + // The FunnelParameterFilterExpression is NOT of `notExpression`. + FunnelParameterFilterExpression not_expression = 3; + + // A primitive funnel parameter filter. + FunnelParameterFilter funnel_parameter_filter = 4; + } +} + +// A list of funnel parameter filter expressions. +message FunnelParameterFilterExpressionList { + // The list of funnel parameter filter expressions. + repeated FunnelParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a funnel. +message FunnelParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// The funnel report's response metadata carries additional information about +// the funnel report. +message FunnelResponseMetadata { + // If funnel report results are + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes what percentage of events were used in this funnel report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in the order that date + // ranges were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 1; +} + +// If funnel report results are +// [sampled](https://support.google.com/analytics/answer/13331292), this +// metadata describes what percentage of events were used in this funnel +// report for a date range. Sampling is the practice of analyzing a subset of +// all data in order to uncover the meaningful information in the larger data +// set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this funnel report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this funnel report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // funnel report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// Categories of sampling levels for the requests. +enum SamplingLevel { + // Unspecified type. + SAMPLING_LEVEL_UNSPECIFIED = 0; + + // Applies a sampling level of 10 million to standard properties and + // 100 million to Google Analytics 360 properties. + LOW = 1; + + // Exclusive to Google Analytics 360 properties with a sampling level of 1 + // billion. + MEDIUM = 2; + + // Exclusive to Google Analytics 360 properties. Unsampled explorations are + // more accurate and can reveal insights that aren't visible in standard + // explorations. To learn more, see + // https://support.google.com/analytics/answer/10896953. + UNSAMPLED = 3; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto new file mode 100644 index 000000000000..7bb264ea5ac7 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto @@ -0,0 +1,1001 @@ +// Copyright 2025 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.analytics.data.v1beta; + +import "google/analytics/data/v1beta/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1beta"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service BetaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + // + // For a guide to constructing requests & understanding responses, see + // [Creating a + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns a customized pivot report of your Google Analytics event data. + // Pivot reports are more advanced and expressive formats than regular + // reports. In a pivot report, dimensions are only visible if they are + // included in a pivot. Multiple pivots can be specified to further dissect + // your data. + rpc RunPivotReport(RunPivotReportRequest) returns (RunPivotReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runPivotReport" + body: "*" + }; + } + + // Returns multiple reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunReports(BatchRunReportsRequest) + returns (BatchRunReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunReports" + body: "*" + }; + } + + // Returns multiple pivot reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunPivotReports(BatchRunPivotReportsRequest) + returns (BatchRunPivotReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunPivotReports" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics property identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a customized report of realtime event data for your property. + // Events appear in realtime reports seconds after they have been sent to + // the Google Analytics. Realtime reports show events and usage data for the + // periods of time ranging from the present moment to 30 minutes ago (up to + // 60 minutes for Google Analytics 360 properties). + // + // For a guide to constructing realtime requests & understanding responses, + // see [Creating a Realtime + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + rpc RunRealtimeReport(RunRealtimeReportRequest) + returns (RunRealtimeReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runRealtimeReport" + body: "*" + }; + } + + // This compatibility method lists dimensions and metrics that can be added to + // a report request and maintain compatibility. This method fails if the + // request's dimensions and metrics are incompatible. + // + // In Google Analytics, reports fail if they request incompatible dimensions + // and/or metrics; in that case, you will need to remove dimensions and/or + // metrics from the incompatible report until the report is compatible. + // + // The Realtime and Core reports have different compatibility rules. This + // method checks compatibility for Core reports. + rpc CheckCompatibility(CheckCompatibilityRequest) + returns (CheckCompatibilityResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:checkCompatibility" + body: "*" + }; + } + + // Creates an audience export for later retrieval. This method quickly returns + // the audience export's resource name and initiates a long running + // asynchronous request to form an audience export. To export the users in an + // audience export, first create the audience export through this method and + // then send the audience resource name to the `QueryAudienceExport` method. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // An audience export is a snapshot of the users currently in the audience at + // the time of audience export creation. Creating audience exports for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience exports + // contain the users in each audience. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceExport(CreateAudienceExportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/audienceExports" + body: "audience_export" + }; + option (google.api.method_signature) = "parent,audience_export"; + option (google.longrunning.operation_info) = { + response_type: "AudienceExport" + metadata_type: "AudienceExportMetadata" + }; + } + + // Retrieves an audience export of users. After creating an audience, the + // users are not immediately available for exporting. First, a request to + // `CreateAudienceExport` is necessary to create an audience export of users, + // and then second, this method is used to retrieve the users in the audience + // export. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceExport(QueryAudienceExportRequest) + returns (QueryAudienceExportResponse) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/audienceExports/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience export. This method + // can be used to understand an audience export after it has been created. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceExport(GetAudienceExportRequest) returns (AudienceExport) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/audienceExports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience exports for a property. This method can be used for you + // to find and reuse existing audience exports rather than creating + // unnecessary new audience exports. The same audience can have multiple + // audience exports that represent the export of users that were in an + // audience on different days. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceExports(ListAudienceExportsRequest) + returns (ListAudienceExportsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/audienceExports" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The request for compatibility information for a report's dimensions and +// metrics. Check compatibility provides a preview of the compatibility of a +// report; fields shared with the `runReport` request should be the same values +// as in your `runReport` request. +message CheckCompatibilityRequest { + // A Google Analytics property identifier whose events are tracked. To + // learn more, see [where to find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // `property` should be the same value as in your `runReport` request. + // + // Example: properties/1234 + string property = 1; + + // The dimensions in this report. `dimensions` should be the same value as in + // your `runReport` request. + repeated Dimension dimensions = 2; + + // The metrics in this report. `metrics` should be the same value as in your + // `runReport` request. + repeated Metric metrics = 3; + + // The filter clause of dimensions. `dimensionFilter` should be the same value + // as in your `runReport` request. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. `metricFilter` should be the same value as in + // your `runReport` request + FilterExpression metric_filter = 5; + + // Filters the dimensions and metrics in the response to just this + // compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + // to only return compatible dimensions & metrics. + Compatibility compatibility_filter = 6; +} + +// The compatibility response with the compatibility of each dimension & metric. +message CheckCompatibilityResponse { + // The compatibility of each dimension. + repeated DimensionCompatibility dimension_compatibilities = 1; + + // The compatibility of each metric. + repeated MetricCompatibility metric_compatibilities = 2; +} + +// The dimensions, metrics and comparisons currently accepted in reporting +// methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; + + // The comparison descriptions. + repeated ComparisonMetadata comparisons = 4; +} + +// The request to generate a report. +message RunReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // Date ranges of data to read. If multiple date ranges are requested, each + // response row will contain a zero based date range index. If two date + // ranges overlap, the event data for the overlapping days is included in the + // response rows for both date ranges. In a cohort request, this `dateRanges` + // must be unspecified. + repeated DateRange date_ranges = 4; + + // Dimension filters let you ask for only specific dimension values in + // the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5; + + // The filter clause of metrics. Applied after aggregating the report's rows, + // similar to SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 6; + + // The row count of the start row. The first row is counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + // Aggregates including both comparisons and multiple date ranges will + // be aggregated based on the date ranges. + repeated MetricAggregation metric_aggregations = 9; + + // Specifies how rows are ordered in the response. + // Requests including both comparisons and multiple date ranges will + // have order bys applied on the comparisons. + repeated OrderBy order_bys = 10; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14; + + // Optional. The configuration of comparisons requested and displayed. The + // request only requires a comparisons field in order to receive a comparison + // column in the response. + repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 9; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runReport". Useful to distinguish between + // response types in JSON. + string kind = 10; +} + +// The request to generate a pivot report. +message RunPivotReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested. All defined dimensions must be used by one of the + // following: dimension_expression, dimension_filter, pivots, order_bys. + repeated Dimension dimensions = 2; + + // The metrics requested, at least one metric needs to be specified. All + // defined metrics must be used by one of the following: metric_expression, + // metric_filter, order_bys. + repeated Metric metrics = 3; + + // The date range to retrieve event data for the report. If multiple date + // ranges are specified, event data from each date range is used in the + // report. A special dimension with field name "dateRange" can be included in + // a Pivot's field names; if included, the report compares between date + // ranges. In a cohort request, this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4; + + // Describes the visual format of the report's dimensions in columns or rows. + // The union of the fieldNames (dimension names) in all pivots must be a + // subset of dimension names defined in Dimensions. No two pivots can share a + // dimension. A dimension is only visible if it appears in a pivot. + repeated Pivot pivots = 5; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 6; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 7; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 8; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 9; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 10; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 11; + + // Optional. The configuration of comparisons requested and displayed. The + // request requires both a comparisons field and a comparisons dimension to + // receive a comparison column in the response. + repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response pivot report table corresponding to a pivot request. +message RunPivotReportResponse { + // Summarizes the columns and rows created by a pivot. Each pivot in the + // request produces one header in the response. If we have a request like + // this: + // + // "pivots": [{ + // "fieldNames": ["country", + // "city"] + // }, + // { + // "fieldNames": "eventName" + // }] + // + // We will have the following `pivotHeaders` in the response: + // + // "pivotHeaders" : [{ + // "dimensionHeaders": [{ + // "dimensionValues": [ + // { "value": "United Kingdom" }, + // { "value": "London" } + // ] + // }, + // { + // "dimensionValues": [ + // { "value": "Japan" }, + // { "value": "Osaka" } + // ] + // }] + // }, + // { + // "dimensionHeaders": [{ + // "dimensionValues": [{ "value": "session_start" }] + // }, + // { + // "dimensionValues": [{ "value": "scroll" }] + // }] + // }] + repeated PivotHeader pivot_headers = 1; + + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 2; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 3; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 4; + + // Aggregation of metric values. Can be totals, minimums, or maximums. The + // returned aggregations are controlled by the metric_aggregations in the + // pivot. The type of aggregation returned in each row is shown by the + // dimension_values which are set to "RESERVED_". + repeated Row aggregates = 5; + + // Metadata for the report. + ResponseMetaData metadata = 6; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 7; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runPivotReport". Useful to distinguish between + // response types in JSON. + string kind = 8; +} + +// The batch request containing multiple report requests. +message BatchRunReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate report response. Each + // batch request is allowed up to 5 requests. + repeated RunReportRequest requests = 2; +} + +// The batch response containing multiple reports. +message BatchRunReportsResponse { + // Individual responses. Each response has a separate report request. + repeated RunReportResponse reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunReports". Useful to distinguish between + // response types in JSON. + string kind = 2; +} + +// The batch request containing multiple pivot report requests. +message BatchRunPivotReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunPivotReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate pivot report response. + // Each batch request is allowed up to 5 requests. + repeated RunPivotReportRequest requests = 2; +} + +// The batch response containing multiple pivot reports. +message BatchRunPivotReportsResponse { + // Individual responses. Each response has a separate pivot report request. + repeated RunPivotReportResponse pivot_reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunPivotReports". Useful to distinguish + // between response types in JSON. + string kind = 2; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The request to generate a realtime report. +message RunRealtimeReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // The filter clause of dimensions. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 5; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + int64 limit = 6; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 7; + + // Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 8; + + // Toggles whether to return the current state of this Google Analytics + // property's Realtime quota. Quota is returned in + // [PropertyQuota](#PropertyQuota). + bool return_property_quota = 9; + + // The minute ranges of event data to read. If unspecified, one minute range + // for the last 30 minutes will be used. If multiple minute ranges are + // requested, each response row will contain a zero based minute range index. + // If two minute ranges overlap, the event data for the overlapping minutes is + // included in the response rows for both minute ranges. + repeated MinuteRange minute_ranges = 10; +} + +// The response realtime report table corresponding to a request. +message RunRealtimeReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response and the `limit` request + // parameter. For example if a query returns 175 rows and includes `limit` + // of 50 in the API request, the response will contain `rowCount` of 175 but + // only 50 rows. + int32 row_count = 7; + + // This Google Analytics property's Realtime quota state including this + // request. + PropertyQuota property_quota = 8; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runRealtimeReport". Useful to distinguish + // between response types in JSON. + string kind = 9; +} + +// A request to retrieve configuration metadata about a specific audience +// export. +message GetAudienceExportRequest { + // Required. The audience export resource name. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; +} + +// A request to list all audience exports for a property. +message ListAudienceExportsRequest { + // Required. All audience exports for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Optional. The maximum number of audience exports to return. The service may + // return fewer than this value. If unspecified, at most 200 audience exports + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceExports` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceExports` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience exports for a property. +message ListAudienceExportsResponse { + // Each audience export for a property. + repeated AudienceExport audience_exports = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience export. +message CreateAudienceExportRequest { + // Required. The parent resource where this audience export will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Required. The audience export to create. + AudienceExport audience_export = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience export is a list of users in an audience at the time of the +// list's creation. One audience may have multiple audience exports created for +// different days. +message AudienceExport { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceExport" + pattern: "properties/{property}/audienceExports/{audience_export}" + plural: "audienceExports" + singular: "audienceExport" + }; + + // The AudienceExport currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceExport is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceExport call. + CREATING = 1; + + // The AudienceExport is fully created and ready for querying. An + // AudienceExport is updated to active asynchronously from a request; this + // occurs some time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceExport failed to be created. It is possible that + // re-requesting this audience export will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience export resource name assigned during + // creation. This resource name identifies this `AudienceExport`. + // + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceExport. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceExport was called and the + // AudienceExport began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceExport. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceExport + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceExport result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience export fails + // during creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This metadata is currently blank. +message AudienceExportMetadata {} + +// A request to list users in an audience export. +message QueryAudienceExportRequest { + // Required. The name of the audience export to retrieve users from. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience export. +message QueryAudienceExportResponse { + // Configuration data about AudienceExport being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceExport correspond to the columns in the AudienceRows. + optional AudienceExport audience_export = 1; + + // Rows for each user in an audience export. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceExport result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceExportResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/data.proto b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/data.proto new file mode 100644 index 000000000000..8cfa6e491f7d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/google/analytics/data/v1beta/data.proto @@ -0,0 +1,1082 @@ +// Copyright 2025 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.analytics.data.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1beta"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., +// `endMinutesAgo`. Requests are allowed up to 2 minute ranges. +message MinuteRange { + // The inclusive start minute for the query as a number of minutes before now. + // For example, `"startMinutesAgo": 29` specifies the report should include + // event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. + // + // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics + // properties can request up to the last 30 minutes of event data + // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to + // the last 60 minutes of event data (`startMinutesAgo <= 59`). + optional int32 start_minutes_ago = 1; + + // The inclusive end minute for the query as a number of minutes before now. + // Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15` + // specifies the report should include event data from prior to 15 minutes + // ago. + // + // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics + // properties can request any minute in the last 30 minutes of event data + // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any + // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`). + optional int32 end_minutes_ago = 2; + + // Assigns a name to this minute range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, minute ranges are named by their zero based index + // in the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +// Requests are allowed up to 9 dimensions. +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// Defines an individual comparison. Most requests will include multiple +// comparisons so that the report compares between the comparisons. +message Comparison { + // Each comparison produces separate rows in the response. In the response, + // this comparison is identified by this name. If name is unspecified, we will + // use the saved comparisons display name. + optional string name = 1; + + // One kind of comparison value + oneof one_comparison { + // A basic comparison. + FilterExpression dimension_filter = 2; + + // A saved comparison identified by the comparison's resource name. + // For example, 'comparisons/1234'. + string comparison = 3; + } +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The filter for string + message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; + } + + // The result needs to be in a list of string values. + message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; + } + + // Filters for numeric or date values. + message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; + } + + // To express that the result needs to be between two numbers (inclusive). + message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; + } + + // Filter for empty values. + message EmptyFilter {} + + // The dimension name or metric name. + // + // In most methods, dimensions & metrics can be used for the first time in + // this field. However in a RunPivotReportRequest, this field must be + // additionally specified by name in the RunPivotReportRequest's dimensions or + // metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 3; + + // A filter for in list values. + InListFilter in_list_filter = 4; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 5; + + // A filter for two values. + BetweenFilter between_filter = 6; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 8; + } +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Sorts by a pivot column group. + message PivotOrderBy { + // A pair of dimension names and values. Rows with this dimension pivot pair + // are ordered by the metric's value. + // + // For example if pivots = {{"browser", "Chrome"}} and + // metric_name = "Sessions", + // then the rows will be sorted based on Sessions in Chrome. + // + // ---------|----------|----------------|----------|---------------- + // | Chrome | Chrome | Safari | Safari + // ---------|----------|----------------|----------|---------------- + // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions + // ---------|----------|----------------|----------|---------------- + // US | 2 | 2 | 3 | 1 + // ---------|----------|----------------|----------|---------------- + // Canada | 3 | 1 | 4 | 1 + // ---------|----------|----------------|----------|---------------- + message PivotSelection { + // Must be a dimension name from the request. + string dimension_name = 1; + + // Order by only when the named dimension is this value. + string dimension_value = 2; + } + + // In the response to order by, order rows by this column. Must be a metric + // name from the request. + string metric_name = 1; + + // Used to select a dimension name and value pivot. If multiple pivot + // selections are given, the sort occurs on rows where all pivot selection + // dimension name and value pairs match the row's dimension name and value + // pair. + repeated PivotSelection pivot_selections = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + + // Sorts results by a metric's values within a pivot column group. + PivotOrderBy pivot = 3; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// Describes the visible dimension columns and rows in the report response. +message Pivot { + // Dimension names for visible columns in the report response. Including + // "dateRange" produces a date range column; for each row in the response, + // dimension values in the date range column will indicate the corresponding + // date range from the request. + repeated string field_names = 1; + + // Specifies how dimensions are ordered in the pivot. In the first Pivot, the + // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent + // Pivots, the OrderBys determine only PivotDimensionHeader ordering. + // Dimensions specified in these OrderBys must be a subset of + // Pivot.field_names. + repeated OrderBy order_bys = 2; + + // The row count of the start row. The first row is counted as row 0. + int64 offset = 3; + + // The number of unique combinations of dimension values to return in this + // pivot. The `limit` parameter is required. A `limit` of 10,000 is common for + // single pivot requests. + // + // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` + // must not exceed 250,000. For example, a two pivot request with `limit: + // 1000` in each pivot will fail because the product is `1,000,000`. + int64 limit = 4; + + // Aggregate the metrics by dimensions in this pivot using the specified + // metric_aggregations. + repeated MetricAggregation metric_aggregations = 5; +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630). + optional bool subject_to_thresholding = 8; + + // If this report results is + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; +} + +// If this report results is +// [sampled](https://support.google.com/analytics/answer/13331292), this +// describes the percentage of events used in this report. Sampling is the +// practice of analyzing a subset of all data in order to uncover the meaningful +// information in the larger data set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Dimensions' values in a single pivot. +message PivotHeader { + // The size is the same as the cardinality of the corresponding dimension + // combinations. + repeated PivotDimensionHeader pivot_dimension_headers = 1; + + // The cardinality of the pivot. The total number of rows for this pivot's + // fields regardless of how the parameters `offset` and `limit` are specified + // in the request. + int32 row_count = 2; +} + +// Summarizes dimension values from a row for this pivot. +message PivotDimensionHeader { + // Values of multiple dimensions in a pivot. + repeated DimensionValue dimension_values = 1; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + optional int32 consumed = 1; + + // Quota remaining after this request. + optional int32 remaining = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is custom to this property. This includes user, + // event, & item scoped custom dimensions; to learn more about custom + // dimensions, see https://support.google.com/analytics/answer/14240153. This + // also include custom channel groups; to learn more about custom channel + // groups, see https://support.google.com/analytics/answer/13051316. + bool custom_definition = 5; + + // The display name of the category that this dimension belongs to. Similar + // dimensions and metrics are categorized together. + string category = 7; +} + +// Explains a metric. +message MetricMetadata { + // Justifications for why this metric is blocked. + enum BlockedReason { + // Will never be specified in API response. + BLOCKED_REASON_UNSPECIFIED = 0; + + // If present, your access is blocked to revenue related metrics for this + // property, and this metric is revenue related. + NO_REVENUE_METRICS = 1; + + // If present, your access is blocked to cost related metrics for this + // property, and this metric is cost related. + NO_COST_METRICS = 2; + } + + // A metric name. Useable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; + + // If reasons are specified, your access is blocked to this metric for this + // property. API requests from you to this property for this metric will + // succeed; however, the report will contain only zeros for this metric. API + // requests with metric filters on blocked metrics will fail. If reasons are + // empty, you have access to this metric. + // + // To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + repeated BlockedReason blocked_reasons = 8; + + // The display name of the category that this metrics belongs to. Similar + // dimensions and metrics are categorized together. + string category = 10; +} + +// The metadata for a single comparison. +message ComparisonMetadata { + // This comparison's resource name. Useable in [Comparison](#Comparison)'s + // `comparison` field. For example, 'comparisons/1234'. + string api_name = 1; + + // This comparison's name within the Google Analytics user interface. + string ui_name = 2; + + // This comparison's description. + string description = 3; +} + +// The compatibility for a single dimension. +message DimensionCompatibility { + // The dimension metadata contains the API name for this compatibility + // information. The dimension metadata also contains other helpful information + // like the UI name and description. + optional DimensionMetadata dimension_metadata = 1; + + // The compatibility of this dimension. If the compatibility is COMPATIBLE, + // this dimension can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// The compatibility for a single metric. +message MetricCompatibility { + // The metric metadata contains the API name for this compatibility + // information. The metric metadata also contains other helpful information + // like the UI name and description. + optional MetricMetadata metric_metadata = 1; + + // The compatibility of this metric. If the compatibility is COMPATIBLE, + // this metric can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// The compatibility types for a single dimension or metric. +enum Compatibility { + // Unspecified compatibility. + COMPATIBILITY_UNSPECIFIED = 0; + + // The dimension or metric is compatible. This dimension or metric can be + // successfully added to a report. + COMPATIBLE = 1; + + // The dimension or metric is incompatible. This dimension or metric cannot be + // successfully added to a report. + INCOMPATIBLE = 2; +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.d.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.d.ts new file mode 100644 index 000000000000..3834f3310998 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.d.ts @@ -0,0 +1,19422 @@ +// Copyright 2025 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * 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.IDuration, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Duration; + + /** + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** 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?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * 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); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * 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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.ExtensionRangeOptions; + + /** + * 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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * 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.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** 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); + + /** 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 FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: 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 FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.IFieldDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.FieldDescriptorProto; + + /** + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.IOneofDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.OneofDescriptorProto; + + /** + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.IEnumDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.EnumDescriptorProto; + + /** + * 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.IEnumValueDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueDescriptorProto; + + /** + * 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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * 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.IServiceDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceDescriptorProto; + + /** + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @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; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * 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.IMethodDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.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 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 features */ + features?: (google.protobuf.IFeatureSet|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; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * 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 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [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; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * 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.IMessageOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MessageOptions; + + /** + * 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 a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * 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.IFieldOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.FieldOptions; + + /** + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * 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.IOneofOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.OneofOptions; + + /** + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * 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.IEnumOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumOptions; + + /** + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * 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.IEnumValueOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueOptions; + + /** + * 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * 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.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * 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.IServiceOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceOptions; + + /** + * 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * 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.IMethodOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MethodOptions; + + /** + * 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * 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.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @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|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * 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.IUninterpretedOption, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.UninterpretedOption; + + /** + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 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; + + /** + * 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); + + /** + * 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 FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @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); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * 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.ISourceCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SourceCodeInfo; + + /** + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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 { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * 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.IGeneratedCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.GeneratedCodeInfo; + + /** + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Any; + + /** + * 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 an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * 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.IEmpty, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Empty; + + /** + * 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Timestamp; + + /** + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 analytics. */ + namespace analytics { + + /** Namespace data. */ + namespace data { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Represents an AlphaAnalyticsData */ + class AlphaAnalyticsData extends $protobuf.rpc.Service { + + /** + * Constructs a new AlphaAnalyticsData service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AlphaAnalyticsData 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): AlphaAnalyticsData; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunFunnelReportResponse + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback): void; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @returns Promise + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest): Promise; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback): void; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @returns Promise + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest): Promise; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAudienceListResponse + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback): void; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @returns Promise + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest): Promise; + + /** + * Calls SheetExportAudienceList. + * @param request SheetExportAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse + */ + public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback): void; + + /** + * Calls SheetExportAudienceList. + * @param request SheetExportAudienceListRequest message or plain object + * @returns Promise + */ + public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): Promise; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceList + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback): void; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @returns Promise + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest): Promise; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceListsResponse + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback): void; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @returns Promise + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest): Promise; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback): void; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): Promise; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback): void; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): Promise; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback): void; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @returns Promise + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): Promise; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback): void; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @returns Promise + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): Promise; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback): void; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @returns Promise + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest): Promise; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryReportTaskResponse + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback): void; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @returns Promise + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest): Promise; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportTask + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback): void; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @returns Promise + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest): Promise; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportTasksResponse + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback): void; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @returns Promise + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest): Promise; + } + + namespace AlphaAnalyticsData { + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @param error Error, if any + * @param [response] RunFunnelReportResponse + */ + type RunFunnelReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunFunnelReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAudienceListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @param error Error, if any + * @param [response] QueryAudienceListResponse + */ + type QueryAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryAudienceListResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. + * @param error Error, if any + * @param [response] SheetExportAudienceListResponse + */ + type SheetExportAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.SheetExportAudienceListResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @param error Error, if any + * @param [response] AudienceList + */ + type GetAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.AudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @param error Error, if any + * @param [response] ListAudienceListsResponse + */ + type ListAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type CreateRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type GetRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @param error Error, if any + * @param [response] ListRecurringAudienceListsResponse + */ + type ListRecurringAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @param error Error, if any + * @param [response] PropertyQuotasSnapshot + */ + type GetPropertyQuotasSnapshotCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.PropertyQuotasSnapshot) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReportTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @param error Error, if any + * @param [response] QueryReportTaskResponse + */ + type QueryReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryReportTaskResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @param error Error, if any + * @param [response] ReportTask + */ + type GetReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ReportTask) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @param error Error, if any + * @param [response] ListReportTasksResponse + */ + type ListReportTasksCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListReportTasksResponse) => void; + } + + /** Properties of a CreateRecurringAudienceListRequest. */ + interface ICreateRecurringAudienceListRequest { + + /** CreateRecurringAudienceListRequest parent */ + parent?: (string|null); + + /** CreateRecurringAudienceListRequest recurringAudienceList */ + recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + } + + /** Represents a CreateRecurringAudienceListRequest. */ + class CreateRecurringAudienceListRequest implements ICreateRecurringAudienceListRequest { + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest); + + /** CreateRecurringAudienceListRequest parent. */ + public parent: string; + + /** CreateRecurringAudienceListRequest recurringAudienceList. */ + public recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRecurringAudienceListRequest + * @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.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRecurringAudienceListRequest + * @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.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Verifies a CreateRecurringAudienceListRequest 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 CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecurringAudienceList. */ + interface IRecurringAudienceList { + + /** RecurringAudienceList name */ + name?: (string|null); + + /** RecurringAudienceList audience */ + audience?: (string|null); + + /** RecurringAudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** RecurringAudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** RecurringAudienceList activeDaysRemaining */ + activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists */ + audienceLists?: (string[]|null); + + /** RecurringAudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents a RecurringAudienceList. */ + class RecurringAudienceList implements IRecurringAudienceList { + + /** + * Constructs a new RecurringAudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRecurringAudienceList); + + /** RecurringAudienceList name. */ + public name: string; + + /** RecurringAudienceList audience. */ + public audience: string; + + /** RecurringAudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** RecurringAudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** RecurringAudienceList activeDaysRemaining. */ + public activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists. */ + public audienceLists: string[]; + + /** RecurringAudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringAudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRecurringAudienceList): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringAudienceList + * @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.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringAudienceList + * @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.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Verifies a RecurringAudienceList 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 RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringAudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @param message RecurringAudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RecurringAudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringAudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringAudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebhookNotification. */ + interface IWebhookNotification { + + /** WebhookNotification uri */ + uri?: (string|null); + + /** WebhookNotification channelToken */ + channelToken?: (string|null); + } + + /** Represents a WebhookNotification. */ + class WebhookNotification implements IWebhookNotification { + + /** + * Constructs a new WebhookNotification. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IWebhookNotification); + + /** WebhookNotification uri. */ + public uri?: (string|null); + + /** WebhookNotification channelToken. */ + public channelToken?: (string|null); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookNotification instance + */ + public static create(properties?: google.analytics.data.v1alpha.IWebhookNotification): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookNotification + * @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.analytics.data.v1alpha.WebhookNotification; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebhookNotification + * @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.analytics.data.v1alpha.WebhookNotification; + + /** + * Verifies a WebhookNotification 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 WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebhookNotification + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @param message WebhookNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.WebhookNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebhookNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebhookNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRecurringAudienceListRequest. */ + interface IGetRecurringAudienceListRequest { + + /** GetRecurringAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetRecurringAudienceListRequest. */ + class GetRecurringAudienceListRequest implements IGetRecurringAudienceListRequest { + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest); + + /** GetRecurringAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRecurringAudienceListRequest + * @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.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRecurringAudienceListRequest + * @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.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Verifies a GetRecurringAudienceListRequest 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 GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message GetRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsRequest. */ + interface IListRecurringAudienceListsRequest { + + /** ListRecurringAudienceListsRequest parent */ + parent?: (string|null); + + /** ListRecurringAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListRecurringAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsRequest. */ + class ListRecurringAudienceListsRequest implements IListRecurringAudienceListsRequest { + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest); + + /** ListRecurringAudienceListsRequest parent. */ + public parent: string; + + /** ListRecurringAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListRecurringAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsRequest + * @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.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsRequest + * @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.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Verifies a ListRecurringAudienceListsRequest 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 ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsResponse. */ + interface IListRecurringAudienceListsResponse { + + /** ListRecurringAudienceListsResponse recurringAudienceLists */ + recurringAudienceLists?: (google.analytics.data.v1alpha.IRecurringAudienceList[]|null); + + /** ListRecurringAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsResponse. */ + class ListRecurringAudienceListsResponse implements IListRecurringAudienceListsResponse { + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse); + + /** ListRecurringAudienceListsResponse recurringAudienceLists. */ + public recurringAudienceLists: google.analytics.data.v1alpha.IRecurringAudienceList[]; + + /** ListRecurringAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsResponse + * @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.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsResponse + * @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.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Verifies a ListRecurringAudienceListsResponse 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 ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPropertyQuotasSnapshotRequest. */ + interface IGetPropertyQuotasSnapshotRequest { + + /** GetPropertyQuotasSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetPropertyQuotasSnapshotRequest. */ + class GetPropertyQuotasSnapshotRequest implements IGetPropertyQuotasSnapshotRequest { + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest); + + /** GetPropertyQuotasSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPropertyQuotasSnapshotRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPropertyQuotasSnapshotRequest + * @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.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPropertyQuotasSnapshotRequest + * @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.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest 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 GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPropertyQuotasSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @param message GetPropertyQuotasSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPropertyQuotasSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuotasSnapshot. */ + interface IPropertyQuotasSnapshot { + + /** PropertyQuotasSnapshot name */ + name?: (string|null); + + /** PropertyQuotasSnapshot corePropertyQuota */ + corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota */ + realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota */ + funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + } + + /** Represents a PropertyQuotasSnapshot. */ + class PropertyQuotasSnapshot implements IPropertyQuotasSnapshot { + + /** + * Constructs a new PropertyQuotasSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot); + + /** PropertyQuotasSnapshot name. */ + public name: string; + + /** PropertyQuotasSnapshot corePropertyQuota. */ + public corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota. */ + public realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota. */ + public funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuotasSnapshot instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuotasSnapshot + * @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.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuotasSnapshot + * @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.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Verifies a PropertyQuotasSnapshot 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 PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuotasSnapshot + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @param message PropertyQuotasSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuotasSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceListRequest. */ + interface IGetAudienceListRequest { + + /** GetAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceListRequest. */ + class GetAudienceListRequest implements IGetAudienceListRequest { + + /** + * Constructs a new GetAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest); + + /** GetAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceListRequest + * @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.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceListRequest + * @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.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Verifies a GetAudienceListRequest 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 GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @param message GetAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsRequest. */ + interface IListAudienceListsRequest { + + /** ListAudienceListsRequest parent */ + parent?: (string|null); + + /** ListAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudienceListsRequest. */ + class ListAudienceListsRequest implements IListAudienceListsRequest { + + /** + * Constructs a new ListAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest); + + /** ListAudienceListsRequest parent. */ + public parent: string; + + /** ListAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsRequest + * @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.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsRequest + * @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.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Verifies a ListAudienceListsRequest 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 ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsResponse. */ + interface IListAudienceListsResponse { + + /** ListAudienceListsResponse audienceLists */ + audienceLists?: (google.analytics.data.v1alpha.IAudienceList[]|null); + + /** ListAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudienceListsResponse. */ + class ListAudienceListsResponse implements IListAudienceListsResponse { + + /** + * Constructs a new ListAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse); + + /** ListAudienceListsResponse audienceLists. */ + public audienceLists: google.analytics.data.v1alpha.IAudienceList[]; + + /** ListAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsResponse + * @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.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsResponse + * @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.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Verifies a ListAudienceListsResponse 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 ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceListRequest. */ + interface ICreateAudienceListRequest { + + /** CreateAudienceListRequest parent */ + parent?: (string|null); + + /** CreateAudienceListRequest audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + } + + /** Represents a CreateAudienceListRequest. */ + class CreateAudienceListRequest implements ICreateAudienceListRequest { + + /** + * Constructs a new CreateAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest); + + /** CreateAudienceListRequest parent. */ + public parent: string; + + /** CreateAudienceListRequest audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceListRequest + * @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.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceListRequest + * @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.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Verifies a CreateAudienceListRequest 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 CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceList. */ + interface IAudienceList { + + /** AudienceList name */ + name?: (string|null); + + /** AudienceList audience */ + audience?: (string|null); + + /** AudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** AudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** AudienceList state */ + state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** AudienceList rowCount */ + rowCount?: (number|null); + + /** AudienceList errorMessage */ + errorMessage?: (string|null); + + /** AudienceList percentageCompleted */ + percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList */ + recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents an AudienceList. */ + class AudienceList implements IAudienceList { + + /** + * Constructs a new AudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceList); + + /** AudienceList name. */ + public name: string; + + /** AudienceList audience. */ + public audience: string; + + /** AudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** AudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** AudienceList state. */ + public state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** AudienceList rowCount. */ + public rowCount?: (number|null); + + /** AudienceList errorMessage. */ + public errorMessage?: (string|null); + + /** AudienceList percentageCompleted. */ + public percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList. */ + public recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new AudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceList): google.analytics.data.v1alpha.AudienceList; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceList + * @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.analytics.data.v1alpha.AudienceList; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceList + * @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.analytics.data.v1alpha.AudienceList; + + /** + * Verifies an AudienceList 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 AudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceList; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @param message AudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceList { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + + /** Properties of an AudienceListMetadata. */ + interface IAudienceListMetadata { + } + + /** Represents an AudienceListMetadata. */ + class AudienceListMetadata implements IAudienceListMetadata { + + /** + * Constructs a new AudienceListMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceListMetadata); + + /** + * Creates a new AudienceListMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceListMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceListMetadata): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceListMetadata + * @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.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceListMetadata + * @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.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Verifies an AudienceListMetadata 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 AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceListMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @param message AudienceListMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceListMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceListMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceListMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListRequest. */ + interface IQueryAudienceListRequest { + + /** QueryAudienceListRequest name */ + name?: (string|null); + + /** QueryAudienceListRequest offset */ + offset?: (number|Long|string|null); + + /** QueryAudienceListRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryAudienceListRequest. */ + class QueryAudienceListRequest implements IQueryAudienceListRequest { + + /** + * Constructs a new QueryAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest); + + /** QueryAudienceListRequest name. */ + public name: string; + + /** QueryAudienceListRequest offset. */ + public offset: (number|Long|string); + + /** QueryAudienceListRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListRequest + * @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.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListRequest + * @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.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Verifies a QueryAudienceListRequest 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 QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @param message QueryAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListResponse. */ + interface IQueryAudienceListResponse { + + /** QueryAudienceListResponse audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows */ + audienceRows?: (google.analytics.data.v1alpha.IAudienceRow[]|null); + + /** QueryAudienceListResponse rowCount */ + rowCount?: (number|null); + } + + /** Represents a QueryAudienceListResponse. */ + class QueryAudienceListResponse implements IQueryAudienceListResponse { + + /** + * Constructs a new QueryAudienceListResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse); + + /** QueryAudienceListResponse audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows. */ + public audienceRows: google.analytics.data.v1alpha.IAudienceRow[]; + + /** QueryAudienceListResponse rowCount. */ + public rowCount?: (number|null); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListResponse + * @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.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListResponse + * @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.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Verifies a QueryAudienceListResponse 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 QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @param message QueryAudienceListResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SheetExportAudienceListRequest. */ + interface ISheetExportAudienceListRequest { + + /** SheetExportAudienceListRequest name */ + name?: (string|null); + + /** SheetExportAudienceListRequest offset */ + offset?: (number|Long|string|null); + + /** SheetExportAudienceListRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a SheetExportAudienceListRequest. */ + class SheetExportAudienceListRequest implements ISheetExportAudienceListRequest { + + /** + * Constructs a new SheetExportAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest); + + /** SheetExportAudienceListRequest name. */ + public name: string; + + /** SheetExportAudienceListRequest offset. */ + public offset: (number|Long|string); + + /** SheetExportAudienceListRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new SheetExportAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SheetExportAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): google.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @param message SheetExportAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @param message SheetExportAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SheetExportAudienceListRequest + * @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.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SheetExportAudienceListRequest + * @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.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Verifies a SheetExportAudienceListRequest 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 SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SheetExportAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListRequest; + + /** + * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. + * @param message SheetExportAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SheetExportAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SheetExportAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SheetExportAudienceListResponse. */ + interface ISheetExportAudienceListResponse { + + /** SheetExportAudienceListResponse spreadsheetUri */ + spreadsheetUri?: (string|null); + + /** SheetExportAudienceListResponse spreadsheetId */ + spreadsheetId?: (string|null); + + /** SheetExportAudienceListResponse rowCount */ + rowCount?: (number|null); + + /** SheetExportAudienceListResponse audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + } + + /** Represents a SheetExportAudienceListResponse. */ + class SheetExportAudienceListResponse implements ISheetExportAudienceListResponse { + + /** + * Constructs a new SheetExportAudienceListResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse); + + /** SheetExportAudienceListResponse spreadsheetUri. */ + public spreadsheetUri?: (string|null); + + /** SheetExportAudienceListResponse spreadsheetId. */ + public spreadsheetId?: (string|null); + + /** SheetExportAudienceListResponse rowCount. */ + public rowCount?: (number|null); + + /** SheetExportAudienceListResponse audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** + * Creates a new SheetExportAudienceListResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SheetExportAudienceListResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse): google.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @param message SheetExportAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @param message SheetExportAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SheetExportAudienceListResponse + * @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.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SheetExportAudienceListResponse + * @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.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Verifies a SheetExportAudienceListResponse 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 SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SheetExportAudienceListResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListResponse; + + /** + * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. + * @param message SheetExportAudienceListResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SheetExportAudienceListResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SheetExportAudienceListResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceRow. */ + interface IAudienceRow { + + /** AudienceRow dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IAudienceDimensionValue[]|null); + } + + /** Represents an AudienceRow. */ + class AudienceRow implements IAudienceRow { + + /** + * Constructs a new AudienceRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceRow); + + /** AudienceRow dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IAudienceDimensionValue[]; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceRow instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceRow): google.analytics.data.v1alpha.AudienceRow; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceRow + * @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.analytics.data.v1alpha.AudienceRow; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceRow + * @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.analytics.data.v1alpha.AudienceRow; + + /** + * Verifies an AudienceRow 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 AudienceRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceRow; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @param message AudienceRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimension. */ + interface IAudienceDimension { + + /** AudienceDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AudienceDimension. */ + class AudienceDimension implements IAudienceDimension { + + /** + * Constructs a new AudienceDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimension); + + /** AudienceDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimension): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimension + * @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.analytics.data.v1alpha.AudienceDimension; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimension + * @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.analytics.data.v1alpha.AudienceDimension; + + /** + * Verifies an AudienceDimension 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 AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @param message AudienceDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimensionValue. */ + interface IAudienceDimensionValue { + + /** AudienceDimensionValue value */ + value?: (string|null); + } + + /** Represents an AudienceDimensionValue. */ + class AudienceDimensionValue implements IAudienceDimensionValue { + + /** + * Constructs a new AudienceDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue); + + /** AudienceDimensionValue value. */ + public value?: (string|null); + + /** AudienceDimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionValue + * @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.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionValue + * @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.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Verifies an AudienceDimensionValue 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 AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @param message AudienceDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunFunnelReportRequest. */ + interface IRunFunnelReportRequest { + + /** RunFunnelReportRequest property */ + property?: (string|null); + + /** RunFunnelReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** RunFunnelReportRequest funnel */ + funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown */ + funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction */ + funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType */ + funnelVisualizationType?: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null); + + /** RunFunnelReportRequest segments */ + segments?: (google.analytics.data.v1alpha.ISegment[]|null); + + /** RunFunnelReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunFunnelReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + } + + /** Represents a RunFunnelReportRequest. */ + class RunFunnelReportRequest implements IRunFunnelReportRequest { + + /** + * Constructs a new RunFunnelReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest); + + /** RunFunnelReportRequest property. */ + public property: string; + + /** RunFunnelReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** RunFunnelReportRequest funnel. */ + public funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown. */ + public funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction. */ + public funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType. */ + public funnelVisualizationType: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType); + + /** RunFunnelReportRequest segments. */ + public segments: google.analytics.data.v1alpha.ISegment[]; + + /** RunFunnelReportRequest limit. */ + public limit: (number|Long|string); + + /** RunFunnelReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportRequest + * @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.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportRequest + * @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.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Verifies a RunFunnelReportRequest 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 RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @param message RunFunnelReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RunFunnelReportRequest { + + /** FunnelVisualizationType enum. */ + enum FunnelVisualizationType { + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0, + STANDARD_FUNNEL = 1, + TRENDED_FUNNEL = 2 + } + } + + /** Properties of a RunFunnelReportResponse. */ + interface IRunFunnelReportResponse { + + /** RunFunnelReportResponse funnelTable */ + funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization */ + funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunFunnelReportResponse. */ + class RunFunnelReportResponse implements IRunFunnelReportResponse { + + /** + * Constructs a new RunFunnelReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse); + + /** RunFunnelReportResponse funnelTable. */ + public funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization. */ + public funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportResponse + * @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.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportResponse + * @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.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Verifies a RunFunnelReportResponse 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 RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @param message RunFunnelReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTask. */ + interface IReportTask { + + /** ReportTask name */ + name?: (string|null); + + /** ReportTask reportDefinition */ + reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata */ + reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + } + + /** Represents a ReportTask. */ + class ReportTask implements IReportTask { + + /** + * Constructs a new ReportTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTask); + + /** ReportTask name. */ + public name: string; + + /** ReportTask reportDefinition. */ + public reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata. */ + public reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + + /** + * Creates a new ReportTask instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTask instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTask): google.analytics.data.v1alpha.ReportTask; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTask + * @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.analytics.data.v1alpha.ReportTask; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTask + * @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.analytics.data.v1alpha.ReportTask; + + /** + * Verifies a ReportTask 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 ReportTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTask + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @param message ReportTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportTask { + + /** Properties of a ReportDefinition. */ + interface IReportDefinition { + + /** ReportDefinition dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); + + /** ReportDefinition metrics */ + metrics?: (google.analytics.data.v1alpha.IMetric[]|null); + + /** ReportDefinition dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** ReportDefinition dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter */ + metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset */ + offset?: (number|Long|string|null); + + /** ReportDefinition limit */ + limit?: (number|Long|string|null); + + /** ReportDefinition metricAggregations */ + metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); + + /** ReportDefinition orderBys */ + orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); + + /** ReportDefinition currencyCode */ + currencyCode?: (string|null); + + /** ReportDefinition cohortSpec */ + cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** ReportDefinition samplingLevel */ + samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + } + + /** Represents a ReportDefinition. */ + class ReportDefinition implements IReportDefinition { + + /** + * Constructs a new ReportDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition); + + /** ReportDefinition dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimension[]; + + /** ReportDefinition metrics. */ + public metrics: google.analytics.data.v1alpha.IMetric[]; + + /** ReportDefinition dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** ReportDefinition dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter. */ + public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset. */ + public offset: (number|Long|string); + + /** ReportDefinition limit. */ + public limit: (number|Long|string); + + /** ReportDefinition metricAggregations. */ + public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; + + /** ReportDefinition orderBys. */ + public orderBys: google.analytics.data.v1alpha.IOrderBy[]; + + /** ReportDefinition currencyCode. */ + public currencyCode: string; + + /** ReportDefinition cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** ReportDefinition samplingLevel. */ + public samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDefinition instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDefinition + * @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.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDefinition + * @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.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Verifies a ReportDefinition 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 ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDefinition + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @param message ReportDefinition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDefinition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDefinition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportMetadata. */ + interface IReportMetadata { + + /** ReportMetadata state */ + state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** ReportMetadata taskRowCount */ + taskRowCount?: (number|null); + + /** ReportMetadata errorMessage */ + errorMessage?: (string|null); + + /** ReportMetadata totalRowCount */ + totalRowCount?: (number|null); + } + + /** Represents a ReportMetadata. */ + class ReportMetadata implements IReportMetadata { + + /** + * Constructs a new ReportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata); + + /** ReportMetadata state. */ + public state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** ReportMetadata taskRowCount. */ + public taskRowCount?: (number|null); + + /** ReportMetadata errorMessage. */ + public errorMessage?: (string|null); + + /** ReportMetadata totalRowCount. */ + public totalRowCount?: (number|null); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportMetadata + * @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.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportMetadata + * @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.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Verifies a ReportMetadata 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 ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @param message ReportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + } + + /** Properties of a CreateReportTaskRequest. */ + interface ICreateReportTaskRequest { + + /** CreateReportTaskRequest parent */ + parent?: (string|null); + + /** CreateReportTaskRequest reportTask */ + reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + } + + /** Represents a CreateReportTaskRequest. */ + class CreateReportTaskRequest implements ICreateReportTaskRequest { + + /** + * Constructs a new CreateReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest); + + /** CreateReportTaskRequest parent. */ + public parent: string; + + /** CreateReportTaskRequest reportTask. */ + public reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReportTaskRequest + * @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.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReportTaskRequest + * @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.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Verifies a CreateReportTaskRequest 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 CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @param message CreateReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTaskMetadata. */ + interface IReportTaskMetadata { + } + + /** Represents a ReportTaskMetadata. */ + class ReportTaskMetadata implements IReportTaskMetadata { + + /** + * Constructs a new ReportTaskMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTaskMetadata); + + /** + * Creates a new ReportTaskMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTaskMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTaskMetadata): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTaskMetadata + * @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.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTaskMetadata + * @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.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Verifies a ReportTaskMetadata 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 ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTaskMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @param message ReportTaskMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTaskMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTaskMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskRequest. */ + interface IQueryReportTaskRequest { + + /** QueryReportTaskRequest name */ + name?: (string|null); + + /** QueryReportTaskRequest offset */ + offset?: (number|Long|string|null); + + /** QueryReportTaskRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryReportTaskRequest. */ + class QueryReportTaskRequest implements IQueryReportTaskRequest { + + /** + * Constructs a new QueryReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest); + + /** QueryReportTaskRequest name. */ + public name: string; + + /** QueryReportTaskRequest offset. */ + public offset: (number|Long|string); + + /** QueryReportTaskRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskRequest + * @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.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskRequest + * @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.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Verifies a QueryReportTaskRequest 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 QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @param message QueryReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskResponse. */ + interface IQueryReportTaskResponse { + + /** QueryReportTaskResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** QueryReportTaskResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** QueryReportTaskResponse rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse totals */ + totals?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse maximums */ + maximums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse minimums */ + minimums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse rowCount */ + rowCount?: (number|null); + + /** QueryReportTaskResponse metadata */ + metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + } + + /** Represents a QueryReportTaskResponse. */ + class QueryReportTaskResponse implements IQueryReportTaskResponse { + + /** + * Constructs a new QueryReportTaskResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse); + + /** QueryReportTaskResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** QueryReportTaskResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** QueryReportTaskResponse rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse totals. */ + public totals: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse maximums. */ + public maximums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse minimums. */ + public minimums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse rowCount. */ + public rowCount: number; + + /** QueryReportTaskResponse metadata. */ + public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskResponse + * @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.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskResponse + * @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.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Verifies a QueryReportTaskResponse 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 QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @param message QueryReportTaskResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportTaskRequest. */ + interface IGetReportTaskRequest { + + /** GetReportTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetReportTaskRequest. */ + class GetReportTaskRequest implements IGetReportTaskRequest { + + /** + * Constructs a new GetReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest); + + /** GetReportTaskRequest name. */ + public name: string; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportTaskRequest + * @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.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportTaskRequest + * @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.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Verifies a GetReportTaskRequest 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 GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @param message GetReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksRequest. */ + interface IListReportTasksRequest { + + /** ListReportTasksRequest parent */ + parent?: (string|null); + + /** ListReportTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListReportTasksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListReportTasksRequest. */ + class ListReportTasksRequest implements IListReportTasksRequest { + + /** + * Constructs a new ListReportTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksRequest); + + /** ListReportTasksRequest parent. */ + public parent: string; + + /** ListReportTasksRequest pageSize. */ + public pageSize: number; + + /** ListReportTasksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksRequest): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksRequest + * @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.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksRequest + * @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.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Verifies a ListReportTasksRequest 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 ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. + * @param message ListReportTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksResponse. */ + interface IListReportTasksResponse { + + /** ListReportTasksResponse reportTasks */ + reportTasks?: (google.analytics.data.v1alpha.IReportTask[]|null); + + /** ListReportTasksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListReportTasksResponse. */ + class ListReportTasksResponse implements IListReportTasksResponse { + + /** + * Constructs a new ListReportTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksResponse); + + /** ListReportTasksResponse reportTasks. */ + public reportTasks: google.analytics.data.v1alpha.IReportTask[]; + + /** ListReportTasksResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksResponse): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksResponse + * @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.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksResponse + * @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.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Verifies a ListReportTasksResponse 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 ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @param message ListReportTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange startDate */ + startDate?: (string|null); + + /** DateRange endDate */ + endDate?: (string|null); + + /** DateRange name */ + name?: (string|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDateRange); + + /** DateRange startDate. */ + public startDate: string; + + /** DateRange endDate. */ + public endDate: string; + + /** DateRange name. */ + public name: string; + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @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.analytics.data.v1alpha.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @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.analytics.data.v1alpha.DateRange; + + /** + * Verifies a DateRange 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 DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension name */ + name?: (string|null); + + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimension); + + /** Dimension name. */ + public name: string; + + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @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.analytics.data.v1alpha.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @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.analytics.data.v1alpha.Dimension; + + /** + * Verifies a Dimension 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 Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { + + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + } + + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { + + /** + * Constructs a new DimensionExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); + + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionExpression + * @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.analytics.data.v1alpha.DimensionExpression; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionExpression + * @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.analytics.data.v1alpha.DimensionExpression; + + /** + * Verifies a DimensionExpression 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 DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionExpression { + + /** Properties of a CaseExpression. */ + interface ICaseExpression { + + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } + + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { + + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); + + /** CaseExpression dimensionName. */ + public dimensionName: string; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @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.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @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.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Verifies a CaseExpression 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 CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { + + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); + + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } + + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { + + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); + + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; + + /** ConcatenateExpression delimiter. */ + public delimiter: string; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @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.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @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.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression 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 ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric expression. */ + public expression: string; + + /** Metric invisible. */ + public invisible: boolean; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @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.analytics.data.v1alpha.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @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.analytics.data.v1alpha.Metric; + + /** + * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpression. */ + interface IFilterExpression { + + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1alpha.IFilter|null); + } + + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { + + /** + * Constructs a new FilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); + + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1alpha.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpression + * @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.analytics.data.v1alpha.FilterExpression; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpression + * @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.analytics.data.v1alpha.FilterExpression; + + /** + * Verifies a FilterExpression 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 FilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { + + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); + } + + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { + + /** + * Constructs a new FilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); + + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFilterExpression[]; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpressionList + * @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.analytics.data.v1alpha.FilterExpressionList; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpressionList + * @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.analytics.data.v1alpha.FilterExpressionList; + + /** + * Verifies a FilterExpressionList 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 FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldName */ + fieldName?: (string|null); + + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilter); + + /** Filter fieldName. */ + public fieldName: string; + + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @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.analytics.data.v1alpha.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @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.analytics.data.v1alpha.Filter; + + /** + * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @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.analytics.data.v1alpha.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @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.analytics.data.v1alpha.StringFilter; + + /** + * Verifies a StringFilter 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 StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @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.analytics.data.v1alpha.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @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.analytics.data.v1alpha.InListFilter; + + /** + * Verifies an InListFilter 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 InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @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.analytics.data.v1alpha.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @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.analytics.data.v1alpha.NumericFilter; + + /** + * Verifies a NumericFilter 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 NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @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.analytics.data.v1alpha.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @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.analytics.data.v1alpha.OrderBy; + + /** + * Verifies an OrderBy 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 OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @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.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @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.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy 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 MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @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.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @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.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy 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 DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @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.analytics.data.v1alpha.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @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.analytics.data.v1alpha.BetweenFilter; + + /** + * Verifies a BetweenFilter 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 BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @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.analytics.data.v1alpha.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @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.analytics.data.v1alpha.EmptyFilter; + + /** + * Verifies an EmptyFilter 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 EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @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.analytics.data.v1alpha.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @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.analytics.data.v1alpha.NumericValue; + + /** + * Verifies a NumericValue 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 NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortSpec. */ + interface ICohortSpec { + + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); + + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + } + + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { + + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); + + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1alpha.ICohort[]; + + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @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.analytics.data.v1alpha.CohortSpec; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @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.analytics.data.v1alpha.CohortSpec; + + /** + * Verifies a CohortSpec 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 CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cohort. */ + interface ICohort { + + /** Cohort name */ + name?: (string|null); + + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + } + + /** Represents a Cohort. */ + class Cohort implements ICohort { + + /** + * Constructs a new Cohort. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohort); + + /** Cohort name. */ + public name: string; + + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + + /** + * Creates a new Cohort instance using the specified properties. + * @param [properties] Properties to set + * @returns Cohort instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cohort + * @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.analytics.data.v1alpha.Cohort; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cohort + * @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.analytics.data.v1alpha.Cohort; + + /** + * Verifies a Cohort 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 Cohort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cohort + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cohort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cohort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { + + /** + * Constructs a new CohortsRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortsRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortsRange + * @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.analytics.data.v1alpha.CohortsRange; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortsRange + * @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.analytics.data.v1alpha.CohortsRange; + + /** + * Verifies a CohortsRange 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 CohortsRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortsRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortsRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortsRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CohortsRange { + + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } + + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); + } + + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { + + /** + * Constructs a new CohortReportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); + + /** CohortReportSettings accumulate. */ + public accumulate: boolean; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortReportSettings instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortReportSettings + * @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.analytics.data.v1alpha.CohortReportSettings; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortReportSettings + * @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.analytics.data.v1alpha.CohortReportSettings; + + /** + * Verifies a CohortReportSettings 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 CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortReportSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortReportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortReportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { + + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); + + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + } + + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { + + /** + * Constructs a new ResponseMetaData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); + + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetaData instance + */ + public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetaData + * @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.analytics.data.v1alpha.ResponseMetaData; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetaData + * @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.analytics.data.v1alpha.ResponseMetaData; + + /** + * Verifies a ResponseMetaData 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 ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetaData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse 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 SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @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.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction 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 ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { + + /** DimensionHeader name */ + name?: (string|null); + } + + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { + + /** + * Constructs a new DimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); + + /** DimensionHeader name. */ + public name: string; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionHeader + * @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.analytics.data.v1alpha.DimensionHeader; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionHeader + * @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.analytics.data.v1alpha.DimensionHeader; + + /** + * Verifies a DimensionHeader 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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricHeader. */ + interface IMetricHeader { + + /** MetricHeader name */ + name?: (string|null); + + /** MetricHeader type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); + } + + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { + + /** + * Constructs a new MetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); + + /** MetricHeader name. */ + public name: string; + + /** MetricHeader type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); + + /** + * Creates a new MetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricHeader + * @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.analytics.data.v1alpha.MetricHeader; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricHeader + * @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.analytics.data.v1alpha.MetricHeader; + + /** + * Verifies a MetricHeader 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 MetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); + + /** Row metricValues */ + metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1alpha.IMetricValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.analytics.data.v1alpha.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.analytics.data.v1alpha.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionValue. */ + interface IDimensionValue { + + /** DimensionValue value */ + value?: (string|null); + } + + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { + + /** + * Constructs a new DimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); + + /** DimensionValue value. */ + public value?: (string|null); + + /** DimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new DimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionValue + * @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.analytics.data.v1alpha.DimensionValue; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionValue + * @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.analytics.data.v1alpha.DimensionValue; + + /** + * Verifies a DimensionValue 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 DimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValue. */ + interface IMetricValue { + + /** MetricValue value */ + value?: (string|null); + } + + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { + + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricValue); + + /** MetricValue value. */ + public value?: (string|null); + + /** MetricValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @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.analytics.data.v1alpha.MetricValue; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @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.analytics.data.v1alpha.MetricValue; + + /** + * Verifies a MetricValue 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 MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { + + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + } + + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { + + /** + * Constructs a new PropertyQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); + + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuota instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuota + * @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.analytics.data.v1alpha.PropertyQuota; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuota + * @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.analytics.data.v1alpha.PropertyQuota; + + /** + * Verifies a PropertyQuota 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 PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { + + /** QuotaStatus consumed */ + consumed?: (number|null); + + /** QuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { + + /** + * Constructs a new QuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); + + /** QuotaStatus consumed. */ + public consumed: number; + + /** QuotaStatus remaining. */ + public remaining: number; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaStatus instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaStatus + * @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.analytics.data.v1alpha.QuotaStatus; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaStatus + * @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.analytics.data.v1alpha.QuotaStatus; + + /** + * Verifies a QuotaStatus 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 QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelBreakdown. */ + interface IFunnelBreakdown { + + /** FunnelBreakdown breakdownDimension */ + breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelBreakdown. */ + class FunnelBreakdown implements IFunnelBreakdown { + + /** + * Constructs a new FunnelBreakdown. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); + + /** FunnelBreakdown breakdownDimension. */ + public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelBreakdown instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelBreakdown + * @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.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelBreakdown + * @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.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Verifies a FunnelBreakdown 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 FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelBreakdown + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @param message FunnelBreakdown + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelBreakdown to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelBreakdown + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelNextAction. */ + interface IFunnelNextAction { + + /** FunnelNextAction nextActionDimension */ + nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelNextAction. */ + class FunnelNextAction implements IFunnelNextAction { + + /** + * Constructs a new FunnelNextAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); + + /** FunnelNextAction nextActionDimension. */ + public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelNextAction instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelNextAction + * @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.analytics.data.v1alpha.FunnelNextAction; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelNextAction + * @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.analytics.data.v1alpha.FunnelNextAction; + + /** + * Verifies a FunnelNextAction 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 FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelNextAction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @param message FunnelNextAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelNextAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelNextAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Funnel. */ + interface IFunnel { + + /** Funnel isOpenFunnel */ + isOpenFunnel?: (boolean|null); + + /** Funnel steps */ + steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); + } + + /** Represents a Funnel. */ + class Funnel implements IFunnel { + + /** + * Constructs a new Funnel. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnel); + + /** Funnel isOpenFunnel. */ + public isOpenFunnel: boolean; + + /** Funnel steps. */ + public steps: google.analytics.data.v1alpha.IFunnelStep[]; + + /** + * Creates a new Funnel instance using the specified properties. + * @param [properties] Properties to set + * @returns Funnel instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Funnel + * @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.analytics.data.v1alpha.Funnel; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Funnel + * @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.analytics.data.v1alpha.Funnel; + + /** + * Verifies a Funnel 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 Funnel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Funnel + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @param message Funnel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Funnel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Funnel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelStep. */ + interface IFunnelStep { + + /** FunnelStep name */ + name?: (string|null); + + /** FunnelStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** FunnelStep withinDurationFromPriorStep */ + withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression */ + filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + } + + /** Represents a FunnelStep. */ + class FunnelStep implements IFunnelStep { + + /** + * Constructs a new FunnelStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); + + /** FunnelStep name. */ + public name: string; + + /** FunnelStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** FunnelStep withinDurationFromPriorStep. */ + public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression. */ + public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelStep + * @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.analytics.data.v1alpha.FunnelStep; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelStep + * @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.analytics.data.v1alpha.FunnelStep; + + /** + * Verifies a FunnelStep 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 FunnelStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @param message FunnelStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelSubReport. */ + interface IFunnelSubReport { + + /** FunnelSubReport dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** FunnelSubReport metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** FunnelSubReport rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** FunnelSubReport metadata */ + metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + } + + /** Represents a FunnelSubReport. */ + class FunnelSubReport implements IFunnelSubReport { + + /** + * Constructs a new FunnelSubReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); + + /** FunnelSubReport dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** FunnelSubReport metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** FunnelSubReport rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** FunnelSubReport metadata. */ + public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelSubReport instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelSubReport + * @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.analytics.data.v1alpha.FunnelSubReport; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelSubReport + * @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.analytics.data.v1alpha.FunnelSubReport; + + /** + * Verifies a FunnelSubReport 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 FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelSubReport + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @param message FunnelSubReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelSubReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelSubReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegment. */ + interface IUserSegment { + + /** UserSegment userInclusionCriteria */ + userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + } + + /** Represents a UserSegment. */ + class UserSegment implements IUserSegment { + + /** + * Constructs a new UserSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegment); + + /** UserSegment userInclusionCriteria. */ + public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + + /** + * Creates a new UserSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegment + * @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.analytics.data.v1alpha.UserSegment; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegment + * @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.analytics.data.v1alpha.UserSegment; + + /** + * Verifies a UserSegment 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 UserSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @param message UserSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentCriteria. */ + interface IUserSegmentCriteria { + + /** UserSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); + + /** UserSegmentCriteria andSequenceGroups */ + andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); + } + + /** Represents a UserSegmentCriteria. */ + class UserSegmentCriteria implements IUserSegmentCriteria { + + /** + * Constructs a new UserSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); + + /** UserSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; + + /** UserSegmentCriteria andSequenceGroups. */ + public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentCriteria + * @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.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentCriteria + * @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.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Verifies a UserSegmentCriteria 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 UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @param message UserSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserCriteriaScoping enum. */ + enum UserCriteriaScoping { + USER_CRITERIA_SCOPING_UNSPECIFIED = 0, + USER_CRITERIA_WITHIN_SAME_EVENT = 1, + USER_CRITERIA_WITHIN_SAME_SESSION = 2, + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 + } + + /** Properties of a UserSegmentConditionGroup. */ + interface IUserSegmentConditionGroup { + + /** UserSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSegmentConditionGroup. */ + class UserSegmentConditionGroup implements IUserSegmentConditionGroup { + + /** + * Constructs a new UserSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); + + /** UserSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentConditionGroup + * @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.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentConditionGroup + * @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.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Verifies a UserSegmentConditionGroup 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 UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @param message UserSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentSequenceGroup. */ + interface IUserSegmentSequenceGroup { + + /** UserSegmentSequenceGroup sequenceScoping */ + sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentSequenceGroup sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps */ + userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); + } + + /** Represents a UserSegmentSequenceGroup. */ + class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { + + /** + * Constructs a new UserSegmentSequenceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); + + /** UserSegmentSequenceGroup sequenceScoping. */ + public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentSequenceGroup sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps. */ + public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentSequenceGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentSequenceGroup + * @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.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentSequenceGroup + * @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.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Verifies a UserSegmentSequenceGroup 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 UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentSequenceGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @param message UserSegmentSequenceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSequenceStep. */ + interface IUserSequenceStep { + + /** UserSequenceStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** UserSequenceStep stepScoping */ + stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSequenceStep segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSequenceStep. */ + class UserSequenceStep implements IUserSequenceStep { + + /** + * Constructs a new UserSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); + + /** UserSequenceStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** UserSequenceStep stepScoping. */ + public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSequenceStep segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSequenceStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSequenceStep + * @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.analytics.data.v1alpha.UserSequenceStep; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSequenceStep + * @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.analytics.data.v1alpha.UserSequenceStep; + + /** + * Verifies a UserSequenceStep 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 UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @param message UserSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentExclusion. */ + interface IUserSegmentExclusion { + + /** UserSegmentExclusion userExclusionDuration */ + userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); + + /** UserSegmentExclusion userExclusionCriteria */ + userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + } + + /** Represents a UserSegmentExclusion. */ + class UserSegmentExclusion implements IUserSegmentExclusion { + + /** + * Constructs a new UserSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); + + /** UserSegmentExclusion userExclusionDuration. */ + public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); + + /** UserSegmentExclusion userExclusionCriteria. */ + public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentExclusion + * @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.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentExclusion + * @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.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Verifies a UserSegmentExclusion 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 UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @param message UserSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserExclusionDuration enum. */ + enum UserExclusionDuration { + USER_EXCLUSION_DURATION_UNSPECIFIED = 0, + USER_EXCLUSION_TEMPORARY = 1, + USER_EXCLUSION_PERMANENT = 2 + } + + /** Properties of a SessionSegment. */ + interface ISessionSegment { + + /** SessionSegment sessionInclusionCriteria */ + sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + } + + /** Represents a SessionSegment. */ + class SessionSegment implements ISessionSegment { + + /** + * Constructs a new SessionSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); + + /** SessionSegment sessionInclusionCriteria. */ + public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + + /** + * Creates a new SessionSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegment + * @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.analytics.data.v1alpha.SessionSegment; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegment + * @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.analytics.data.v1alpha.SessionSegment; + + /** + * Verifies a SessionSegment 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 SessionSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @param message SessionSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentCriteria. */ + interface ISessionSegmentCriteria { + + /** SessionSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); + } + + /** Represents a SessionSegmentCriteria. */ + class SessionSegmentCriteria implements ISessionSegmentCriteria { + + /** + * Constructs a new SessionSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); + + /** SessionSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentCriteria + * @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.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentCriteria + * @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.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Verifies a SessionSegmentCriteria 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 SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @param message SessionSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionCriteriaScoping enum. */ + enum SessionCriteriaScoping { + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 + } + + /** Properties of a SessionSegmentConditionGroup. */ + interface ISessionSegmentConditionGroup { + + /** SessionSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); + + /** SessionSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a SessionSegmentConditionGroup. */ + class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { + + /** + * Constructs a new SessionSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); + + /** SessionSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); + + /** SessionSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentConditionGroup + * @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.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentConditionGroup + * @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.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Verifies a SessionSegmentConditionGroup 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 SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @param message SessionSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentExclusion. */ + interface ISessionSegmentExclusion { + + /** SessionSegmentExclusion sessionExclusionDuration */ + sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); + + /** SessionSegmentExclusion sessionExclusionCriteria */ + sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + } + + /** Represents a SessionSegmentExclusion. */ + class SessionSegmentExclusion implements ISessionSegmentExclusion { + + /** + * Constructs a new SessionSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); + + /** SessionSegmentExclusion sessionExclusionDuration. */ + public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); + + /** SessionSegmentExclusion sessionExclusionCriteria. */ + public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentExclusion + * @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.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentExclusion + * @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.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Verifies a SessionSegmentExclusion 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 SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @param message SessionSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionExclusionDuration enum. */ + enum SessionExclusionDuration { + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, + SESSION_EXCLUSION_TEMPORARY = 1, + SESSION_EXCLUSION_PERMANENT = 2 + } + + /** Properties of an EventSegment. */ + interface IEventSegment { + + /** EventSegment eventInclusionCriteria */ + eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + } + + /** Represents an EventSegment. */ + class EventSegment implements IEventSegment { + + /** + * Constructs a new EventSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegment); + + /** EventSegment eventInclusionCriteria. */ + public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + + /** + * Creates a new EventSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegment + * @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.analytics.data.v1alpha.EventSegment; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegment + * @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.analytics.data.v1alpha.EventSegment; + + /** + * Verifies an EventSegment 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 EventSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @param message EventSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentCriteria. */ + interface IEventSegmentCriteria { + + /** EventSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); + } + + /** Represents an EventSegmentCriteria. */ + class EventSegmentCriteria implements IEventSegmentCriteria { + + /** + * Constructs a new EventSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); + + /** EventSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentCriteria + * @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.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentCriteria + * @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.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Verifies an EventSegmentCriteria 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 EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @param message EventSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventCriteriaScoping enum. */ + enum EventCriteriaScoping { + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 + } + + /** Properties of an EventSegmentConditionGroup. */ + interface IEventSegmentConditionGroup { + + /** EventSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); + + /** EventSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents an EventSegmentConditionGroup. */ + class EventSegmentConditionGroup implements IEventSegmentConditionGroup { + + /** + * Constructs a new EventSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); + + /** EventSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); + + /** EventSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentConditionGroup + * @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.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentConditionGroup + * @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.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Verifies an EventSegmentConditionGroup 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 EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @param message EventSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentExclusion. */ + interface IEventSegmentExclusion { + + /** EventSegmentExclusion eventExclusionDuration */ + eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); + + /** EventSegmentExclusion eventExclusionCriteria */ + eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + } + + /** Represents an EventSegmentExclusion. */ + class EventSegmentExclusion implements IEventSegmentExclusion { + + /** + * Constructs a new EventSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); + + /** EventSegmentExclusion eventExclusionDuration. */ + public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); + + /** EventSegmentExclusion eventExclusionCriteria. */ + public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentExclusion + * @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.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentExclusion + * @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.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Verifies an EventSegmentExclusion 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 EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @param message EventSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventExclusionDuration enum. */ + enum EventExclusionDuration { + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, + EVENT_EXCLUSION_PERMANENT = 1 + } + + /** Properties of a Segment. */ + interface ISegment { + + /** Segment name */ + name?: (string|null); + + /** Segment userSegment */ + userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment */ + sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment */ + eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + } + + /** Represents a Segment. */ + class Segment implements ISegment { + + /** + * Constructs a new Segment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegment); + + /** Segment name. */ + public name: string; + + /** Segment userSegment. */ + public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment. */ + public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment. */ + public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + + /** Segment oneSegmentScope. */ + public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); + + /** + * Creates a new Segment instance using the specified properties. + * @param [properties] Properties to set + * @returns Segment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Segment + * @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.analytics.data.v1alpha.Segment; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Segment + * @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.analytics.data.v1alpha.Segment; + + /** + * Verifies a Segment 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 Segment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Segment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @param message Segment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Segment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Segment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpression. */ + interface ISegmentFilterExpression { + + /** SegmentFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter */ + segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter */ + segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + } + + /** Represents a SegmentFilterExpression. */ + class SegmentFilterExpression implements ISegmentFilterExpression { + + /** + * Constructs a new SegmentFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); + + /** SegmentFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter. */ + public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter. */ + public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + + /** SegmentFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpression + * @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.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpression + * @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.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Verifies a SegmentFilterExpression 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 SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @param message SegmentFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpressionList. */ + interface ISegmentFilterExpressionList { + + /** SegmentFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); + } + + /** Represents a SegmentFilterExpressionList. */ + class SegmentFilterExpressionList implements ISegmentFilterExpressionList { + + /** + * Constructs a new SegmentFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); + + /** SegmentFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpressionList + * @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.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpressionList + * @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.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Verifies a SegmentFilterExpressionList 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 SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilter. */ + interface ISegmentFilter { + + /** SegmentFilter fieldName */ + fieldName?: (string|null); + + /** SegmentFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + } + + /** Represents a SegmentFilter. */ + class SegmentFilter implements ISegmentFilter { + + /** + * Constructs a new SegmentFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); + + /** SegmentFilter fieldName. */ + public fieldName: string; + + /** SegmentFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + + /** SegmentFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilter + * @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.analytics.data.v1alpha.SegmentFilter; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilter + * @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.analytics.data.v1alpha.SegmentFilter; + + /** + * Verifies a SegmentFilter 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 SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @param message SegmentFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterScoping. */ + interface ISegmentFilterScoping { + + /** SegmentFilterScoping atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); + } + + /** Represents a SegmentFilterScoping. */ + class SegmentFilterScoping implements ISegmentFilterScoping { + + /** + * Constructs a new SegmentFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); + + /** SegmentFilterScoping atAnyPointInTime. */ + public atAnyPointInTime?: (boolean|null); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterScoping + * @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.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterScoping + * @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.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Verifies a SegmentFilterScoping 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 SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @param message SegmentFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentEventFilter. */ + interface ISegmentEventFilter { + + /** SegmentEventFilter eventName */ + eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression */ + segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + } + + /** Represents a SegmentEventFilter. */ + class SegmentEventFilter implements ISegmentEventFilter { + + /** + * Constructs a new SegmentEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); + + /** SegmentEventFilter eventName. */ + public eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression. */ + public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentEventFilter + * @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.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentEventFilter + * @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.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Verifies a SegmentEventFilter 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 SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @param message SegmentEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpression. */ + interface ISegmentParameterFilterExpression { + + /** SegmentParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter */ + segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + } + + /** Represents a SegmentParameterFilterExpression. */ + class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { + + /** + * Constructs a new SegmentParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); + + /** SegmentParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter. */ + public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + + /** SegmentParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpression + * @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.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpression + * @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.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Verifies a SegmentParameterFilterExpression 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 SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpressionList. */ + interface ISegmentParameterFilterExpressionList { + + /** SegmentParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); + } + + /** Represents a SegmentParameterFilterExpressionList. */ + class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); + + /** SegmentParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpressionList + * @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.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpressionList + * @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.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Verifies a SegmentParameterFilterExpressionList 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 SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilter. */ + interface ISegmentParameterFilter { + + /** SegmentParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + } + + /** Represents a SegmentParameterFilter. */ + class SegmentParameterFilter implements ISegmentParameterFilter { + + /** + * Constructs a new SegmentParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); + + /** SegmentParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + + /** SegmentParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** SegmentParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilter + * @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.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilter + * @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.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Verifies a SegmentParameterFilter 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 SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @param message SegmentParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterScoping. */ + interface ISegmentParameterFilterScoping { + + /** SegmentParameterFilterScoping inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|Long|string|null); + } + + /** Represents a SegmentParameterFilterScoping. */ + class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { + + /** + * Constructs a new SegmentParameterFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); + + /** SegmentParameterFilterScoping inAnyNDayPeriod. */ + public inAnyNDayPeriod?: (number|Long|string|null); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterScoping + * @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.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterScoping + * @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.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Verifies a SegmentParameterFilterScoping 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 SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @param message SegmentParameterFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpression. */ + interface IFunnelFilterExpression { + + /** FunnelFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter */ + funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter */ + funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + } + + /** Represents a FunnelFilterExpression. */ + class FunnelFilterExpression implements IFunnelFilterExpression { + + /** + * Constructs a new FunnelFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); + + /** FunnelFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter. */ + public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter. */ + public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + + /** FunnelFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpression + * @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.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpression + * @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.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Verifies a FunnelFilterExpression 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 FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @param message FunnelFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpressionList. */ + interface IFunnelFilterExpressionList { + + /** FunnelFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); + } + + /** Represents a FunnelFilterExpressionList. */ + class FunnelFilterExpressionList implements IFunnelFilterExpressionList { + + /** + * Constructs a new FunnelFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); + + /** FunnelFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpressionList + * @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.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpressionList + * @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.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Verifies a FunnelFilterExpressionList 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 FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFieldFilter. */ + interface IFunnelFieldFilter { + + /** FunnelFieldFilter fieldName */ + fieldName?: (string|null); + + /** FunnelFieldFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelFieldFilter. */ + class FunnelFieldFilter implements IFunnelFieldFilter { + + /** + * Constructs a new FunnelFieldFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); + + /** FunnelFieldFilter fieldName. */ + public fieldName: string; + + /** FunnelFieldFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelFieldFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFieldFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFieldFilter + * @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.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFieldFilter + * @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.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Verifies a FunnelFieldFilter 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 FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFieldFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @param message FunnelFieldFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelEventFilter. */ + interface IFunnelEventFilter { + + /** FunnelEventFilter eventName */ + eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression */ + funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + } + + /** Represents a FunnelEventFilter. */ + class FunnelEventFilter implements IFunnelEventFilter { + + /** + * Constructs a new FunnelEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); + + /** FunnelEventFilter eventName. */ + public eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression. */ + public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelEventFilter + * @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.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelEventFilter + * @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.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Verifies a FunnelEventFilter 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 FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @param message FunnelEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpression. */ + interface IFunnelParameterFilterExpression { + + /** FunnelParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter */ + funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + } + + /** Represents a FunnelParameterFilterExpression. */ + class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { + + /** + * Constructs a new FunnelParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); + + /** FunnelParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter. */ + public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + + /** FunnelParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpression + * @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.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpression + * @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.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Verifies a FunnelParameterFilterExpression 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 FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpressionList. */ + interface IFunnelParameterFilterExpressionList { + + /** FunnelParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); + } + + /** Represents a FunnelParameterFilterExpressionList. */ + class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); + + /** FunnelParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpressionList + * @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.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpressionList + * @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.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Verifies a FunnelParameterFilterExpressionList 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 FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilter. */ + interface IFunnelParameterFilter { + + /** FunnelParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelParameterFilter. */ + class FunnelParameterFilter implements IFunnelParameterFilter { + + /** + * Constructs a new FunnelParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); + + /** FunnelParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** FunnelParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilter + * @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.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilter + * @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.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Verifies a FunnelParameterFilter 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 FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @param message FunnelParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelResponseMetadata. */ + interface IFunnelResponseMetadata { + + /** FunnelResponseMetadata samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + } + + /** Represents a FunnelResponseMetadata. */ + class FunnelResponseMetadata implements IFunnelResponseMetadata { + + /** + * Constructs a new FunnelResponseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); + + /** FunnelResponseMetadata samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelResponseMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelResponseMetadata + * @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.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelResponseMetadata + * @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.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Verifies a FunnelResponseMetadata 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 FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelResponseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @param message FunnelResponseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { + + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); + + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); + } + + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { + + /** + * Constructs a new SamplingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); + + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SamplingMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SamplingMetadata + * @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.analytics.data.v1alpha.SamplingMetadata; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SamplingMetadata + * @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.analytics.data.v1alpha.SamplingMetadata; + + /** + * Verifies a SamplingMetadata 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 SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SamplingMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SamplingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SamplingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } + + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + + /** SamplingLevel enum. */ + enum SamplingLevel { + SAMPLING_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + UNSAMPLED = 3 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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, + IDENTIFIER = 8 + } + + /** 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; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * 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); + + /** + * 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; + + /** + * 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; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * 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; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * 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; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * 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; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * 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; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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 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 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 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 Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.GetOperationRequest; + + /** + * 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * 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.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.ListOperationsResponse; + + /** + * 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * 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.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.CancelOperationRequest; + + /** + * 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * 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.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.DeleteOperationRequest; + + /** + * 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * 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.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.WaitOperationRequest; + + /** + * 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * 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.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.longrunning.OperationInfo; + + /** + * 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * 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.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** 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 Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.rpc.Status; + + /** + * 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 Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * 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.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.js new file mode 100644 index 000000000000..dc3cd47b59ab --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.js @@ -0,0 +1,50897 @@ +// Copyright 2025 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_data_protos || ($protobuf.roots._google_cloud_data_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.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); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @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.Duration} Duration + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @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 + */ + Duration.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"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + 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; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.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; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + 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 {google.protobuf.Edition|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 {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * 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 14, wireType 0 =*/112).int32(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.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, error) { + 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(); + if (tag === error) + break; + 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())); + 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 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @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 + */ + FileDescriptorProto.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 (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")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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.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.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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.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 = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + 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.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 = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.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); + }; + + /** + * 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"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + 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 + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @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.protobuf.DescriptorProto} DescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + 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())); + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @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 + */ + DescriptorProto.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.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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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 DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.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.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.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; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + 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 + */ + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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()); + }; + + /** + * 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 "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); + } + 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; + }; + + /** + * 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"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * 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]]; + } + + /** + * 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; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @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.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @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 + */ + ExtensionRangeOptions.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.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + 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 + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.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.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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(); + break; + } + case 2: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 3: + case 2: + 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_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * 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_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * 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.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @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); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @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 + */ + 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; + }; + + /** + * 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 + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + 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 + */ + 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; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + 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; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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); + }; + + /** + * 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.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @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 + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @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 + */ + 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.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; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + 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); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + 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. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * 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); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 "method." + 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. + * @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]); + } + } + 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. + * @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); + }; + + /** + * 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"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (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 + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * 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 + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @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.FileOptions} FileOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + FileOptions.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.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + 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.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.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"; + }; + + /** + * 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 FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @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 + */ + 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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 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 + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @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.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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()); + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + 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; + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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); + }; + + /** + * 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"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @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 {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $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; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.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.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @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.FieldOptions} FieldOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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: + case 8: + break; + } + } + 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; + } + 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.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.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; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + 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"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + 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.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * 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; + })(); + + /** + * 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; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * 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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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 {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 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 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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()); + }; + + /** + * 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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 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 OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @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.EnumOptions} EnumOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @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 + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @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.EnumValueOptions} EnumValueOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @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 + */ + EnumValueOptions.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @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.ServiceOptions} ServiceOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + 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; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @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 + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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[".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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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[".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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + 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 {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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 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; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * 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 + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * 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 + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * 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 + */ + 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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; + }; + + /** + * 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 + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + MethodOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + }; + + /** + * 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 + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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; + }; + + /** + * 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 + */ + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 + */ + 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.features = null; + 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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * 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; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * 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 + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @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.UninterpretedOption} UninterpretedOption + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 "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. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + 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; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @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); + } + 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 UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * 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 + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @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) { + 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; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + 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; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 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; + }; + + /** + * 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 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 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 Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @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 + */ + GeneratedCodeInfo.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; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @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 GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.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); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * 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 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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: + 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + /** + * 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 Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * 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 + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + Any.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * 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.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @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.Empty} Empty + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @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 + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * 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.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.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); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @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.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @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 + */ + Timestamp.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"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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 Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.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; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.analytics = (function() { + + /** + * Namespace analytics. + * @memberof google + * @namespace + */ + var analytics = {}; + + analytics.data = (function() { + + /** + * Namespace data. + * @memberof google.analytics + * @namespace + */ + var data = {}; + + data.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.analytics.data + * @namespace + */ + var v1alpha = {}; + + v1alpha.AlphaAnalyticsData = (function() { + + /** + * Constructs a new AlphaAnalyticsData service. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AlphaAnalyticsData + * @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 AlphaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AlphaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlphaAnalyticsData; + + /** + * Creates new AlphaAnalyticsData service using the specified rpc implementation. + * @function create + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @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 {AlphaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. + */ + AlphaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef RunFunnelReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} [response] RunFunnelReportResponse + */ + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback} callback Node-style callback called with the error, if any, and RunFunnelReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.runFunnelReport = function runFunnelReport(request, callback) { + return this.rpcCall(runFunnelReport, $root.google.analytics.data.v1alpha.RunFunnelReportRequest, $root.google.analytics.data.v1alpha.RunFunnelReportResponse, request, callback); + }, "name", { value: "RunFunnelReport" }); + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createAudienceList = function createAudienceList(request, callback) { + return this.rpcCall(createAudienceList, $root.google.analytics.data.v1alpha.CreateAudienceListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAudienceList" }); + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} [response] QueryAudienceListResponse + */ + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback} callback Node-style callback called with the error, if any, and QueryAudienceListResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryAudienceList = function queryAudienceList(request, callback) { + return this.rpcCall(queryAudienceList, $root.google.analytics.data.v1alpha.QueryAudienceListRequest, $root.google.analytics.data.v1alpha.QueryAudienceListResponse, request, callback); + }, "name", { value: "QueryAudienceList" }); + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef SheetExportAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} [response] SheetExportAudienceListResponse + */ + + /** + * Calls SheetExportAudienceList. + * @function sheetExportAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback} callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.sheetExportAudienceList = function sheetExportAudienceList(request, callback) { + return this.rpcCall(sheetExportAudienceList, $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest, $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse, request, callback); + }, "name", { value: "SheetExportAudienceList" }); + + /** + * Calls SheetExportAudienceList. + * @function sheetExportAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.AudienceList} [response] AudienceList + */ + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback} callback Node-style callback called with the error, if any, and AudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getAudienceList = function getAudienceList(request, callback) { + return this.rpcCall(getAudienceList, $root.google.analytics.data.v1alpha.GetAudienceListRequest, $root.google.analytics.data.v1alpha.AudienceList, request, callback); + }, "name", { value: "GetAudienceList" }); + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} [response] ListAudienceListsResponse + */ + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback} callback Node-style callback called with the error, if any, and ListAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listAudienceLists = function listAudienceLists(request, callback) { + return this.rpcCall(listAudienceLists, $root.google.analytics.data.v1alpha.ListAudienceListsRequest, $root.google.analytics.data.v1alpha.ListAudienceListsResponse, request, callback); + }, "name", { value: "ListAudienceLists" }); + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createRecurringAudienceList = function createRecurringAudienceList(request, callback) { + return this.rpcCall(createRecurringAudienceList, $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "CreateRecurringAudienceList" }); + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getRecurringAudienceList = function getRecurringAudienceList(request, callback) { + return this.rpcCall(getRecurringAudienceList, $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "GetRecurringAudienceList" }); + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListRecurringAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} [response] ListRecurringAudienceListsResponse + */ + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback} callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listRecurringAudienceLists = function listRecurringAudienceLists(request, callback) { + return this.rpcCall(listRecurringAudienceLists, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, request, callback); + }, "name", { value: "ListRecurringAudienceLists" }); + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetPropertyQuotasSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} [response] PropertyQuotasSnapshot + */ + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback} callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getPropertyQuotasSnapshot = function getPropertyQuotasSnapshot(request, callback) { + return this.rpcCall(getPropertyQuotasSnapshot, $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot, request, callback); + }, "name", { value: "GetPropertyQuotasSnapshot" }); + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createReportTask = function createReportTask(request, callback) { + return this.rpcCall(createReportTask, $root.google.analytics.data.v1alpha.CreateReportTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReportTask" }); + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} [response] QueryReportTaskResponse + */ + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback} callback Node-style callback called with the error, if any, and QueryReportTaskResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryReportTask = function queryReportTask(request, callback) { + return this.rpcCall(queryReportTask, $root.google.analytics.data.v1alpha.QueryReportTaskRequest, $root.google.analytics.data.v1alpha.QueryReportTaskResponse, request, callback); + }, "name", { value: "QueryReportTask" }); + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ReportTask} [response] ReportTask + */ + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback} callback Node-style callback called with the error, if any, and ReportTask + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getReportTask = function getReportTask(request, callback) { + return this.rpcCall(getReportTask, $root.google.analytics.data.v1alpha.GetReportTaskRequest, $root.google.analytics.data.v1alpha.ReportTask, request, callback); + }, "name", { value: "GetReportTask" }); + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListReportTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} [response] ListReportTasksResponse + */ + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback} callback Node-style callback called with the error, if any, and ListReportTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listReportTasks = function listReportTasks(request, callback) { + return this.rpcCall(listReportTasks, $root.google.analytics.data.v1alpha.ListReportTasksRequest, $root.google.analytics.data.v1alpha.ListReportTasksResponse, request, callback); + }, "name", { value: "ListReportTasks" }); + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AlphaAnalyticsData; + })(); + + v1alpha.CreateRecurringAudienceListRequest = (function() { + + /** + * Properties of a CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateRecurringAudienceListRequest + * @property {string|null} [parent] CreateRecurringAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IRecurringAudienceList|null} [recurringAudienceList] CreateRecurringAudienceListRequest recurringAudienceList + */ + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateRecurringAudienceListRequest. + * @implements ICreateRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + */ + function CreateRecurringAudienceListRequest(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]]; + } + + /** + * CreateRecurringAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.parent = ""; + + /** + * CreateRecurringAudienceListRequest recurringAudienceList. + * @member {google.analytics.data.v1alpha.IRecurringAudienceList|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.recurringAudienceList = null; + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest instance + */ + CreateRecurringAudienceListRequest.create = function create(properties) { + return new CreateRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.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.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRecurringAudienceListRequest.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.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceList); + if (error) + return "recurringAudienceList." + error; + } + return null; + }; + + /** + * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + */ + CreateRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.recurringAudienceList != null) { + if (typeof object.recurringAudienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.recurringAudienceList: object expected"); + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRecurringAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.recurringAudienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) + object.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceList, options); + return object; + }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateRecurringAudienceListRequest"; + }; + + return CreateRecurringAudienceListRequest; + })(); + + v1alpha.RecurringAudienceList = (function() { + + /** + * Properties of a RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IRecurringAudienceList + * @property {string|null} [name] RecurringAudienceList name + * @property {string|null} [audience] RecurringAudienceList audience + * @property {string|null} [audienceDisplayName] RecurringAudienceList audienceDisplayName + * @property {Array.|null} [dimensions] RecurringAudienceList dimensions + * @property {number|null} [activeDaysRemaining] RecurringAudienceList activeDaysRemaining + * @property {Array.|null} [audienceLists] RecurringAudienceList audienceLists + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] RecurringAudienceList webhookNotification + */ + + /** + * Constructs a new RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RecurringAudienceList. + * @implements IRecurringAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + */ + function RecurringAudienceList(properties) { + this.dimensions = []; + this.audienceLists = []; + 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]]; + } + + /** + * RecurringAudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.name = ""; + + /** + * RecurringAudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audience = ""; + + /** + * RecurringAudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceDisplayName = ""; + + /** + * RecurringAudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.dimensions = $util.emptyArray; + + /** + * RecurringAudienceList activeDaysRemaining. + * @member {number|null|undefined} activeDaysRemaining + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.activeDaysRemaining = null; + + /** + * RecurringAudienceList audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceLists = $util.emptyArray; + + /** + * RecurringAudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_activeDaysRemaining", { + get: $util.oneOfGetter($oneOfFields = ["activeDaysRemaining"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList instance + */ + RecurringAudienceList.create = function create(properties) { + return new RecurringAudienceList(properties); + }; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.activeDaysRemaining != null && Object.hasOwnProperty.call(message, "activeDaysRemaining")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activeDaysRemaining); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.audienceLists[i]); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.activeDaysRemaining = reader.int32(); + break; + } + case 6: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push(reader.string()); + break; + } + case 8: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringAudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringAudienceList.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.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + properties._activeDaysRemaining = 1; + if (!$util.isInteger(message.activeDaysRemaining)) + return "activeDaysRemaining: integer expected"; + } + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) + if (!$util.isString(message.audienceLists[i])) + return "audienceLists: string[] expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + */ + RecurringAudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RecurringAudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + if (object.activeDaysRemaining != null) + message.activeDaysRemaining = object.activeDaysRemaining | 0; + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) + message.audienceLists[i] = String(object.audienceLists[i]); + } + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.RecurringAudienceList} message RecurringAudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringAudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.audienceLists = []; + } + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + object.activeDaysRemaining = message.activeDaysRemaining; + if (options.oneofs) + object._activeDaysRemaining = "activeDaysRemaining"; + } + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = message.audienceLists[j]; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this RecurringAudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + * @returns {Object.} JSON object + */ + RecurringAudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecurringAudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringAudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RecurringAudienceList"; + }; + + return RecurringAudienceList; + })(); + + v1alpha.WebhookNotification = (function() { + + /** + * Properties of a WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @interface IWebhookNotification + * @property {string|null} [uri] WebhookNotification uri + * @property {string|null} [channelToken] WebhookNotification channelToken + */ + + /** + * Constructs a new WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a WebhookNotification. + * @implements IWebhookNotification + * @constructor + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + */ + function WebhookNotification(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]]; + } + + /** + * WebhookNotification uri. + * @member {string|null|undefined} uri + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.uri = null; + + /** + * WebhookNotification channelToken. + * @member {string|null|undefined} channelToken + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.channelToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_uri", { + get: $util.oneOfGetter($oneOfFields = ["uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_channelToken", { + get: $util.oneOfGetter($oneOfFields = ["channelToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification instance + */ + WebhookNotification.create = function create(properties) { + return new WebhookNotification(properties); + }; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.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.channelToken != null && Object.hasOwnProperty.call(message, "channelToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelToken); + return writer; + }; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.channelToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookNotification message. + * @function verify + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties._uri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + properties._channelToken = 1; + if (!$util.isString(message.channelToken)) + return "channelToken: string expected"; + } + return null; + }; + + /** + * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + */ + WebhookNotification.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.WebhookNotification) + return object; + var message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.channelToken != null) + message.channelToken = String(object.channelToken); + return message; + }; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.WebhookNotification} message WebhookNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object._uri = "uri"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + object.channelToken = message.channelToken; + if (options.oneofs) + object._channelToken = "channelToken"; + } + return object; + }; + + /** + * Converts this WebhookNotification to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + * @returns {Object.} JSON object + */ + WebhookNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookNotification + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.WebhookNotification"; + }; + + return WebhookNotification; + })(); + + v1alpha.GetRecurringAudienceListRequest = (function() { + + /** + * Properties of a GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetRecurringAudienceListRequest + * @property {string|null} [name] GetRecurringAudienceListRequest name + */ + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetRecurringAudienceListRequest. + * @implements IGetRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + */ + function GetRecurringAudienceListRequest(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]]; + } + + /** + * GetRecurringAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + */ + GetRecurringAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest instance + */ + GetRecurringAudienceListRequest.create = function create(properties) { + return new GetRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + */ + GetRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} message GetRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecurringAudienceListRequest.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 GetRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetRecurringAudienceListRequest"; + }; + + return GetRecurringAudienceListRequest; + })(); + + v1alpha.ListRecurringAudienceListsRequest = (function() { + + /** + * Properties of a ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsRequest + * @property {string|null} [parent] ListRecurringAudienceListsRequest parent + * @property {number|null} [pageSize] ListRecurringAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListRecurringAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsRequest. + * @implements IListRecurringAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + */ + function ListRecurringAudienceListsRequest(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]]; + } + + /** + * ListRecurringAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.parent = ""; + + /** + * ListRecurringAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListRecurringAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest instance + */ + ListRecurringAudienceListsRequest.create = function create(properties) { + return new ListRecurringAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsRequest.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"; + return null; + }; + + /** + * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + */ + ListRecurringAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + 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 ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsRequest.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; + return object; + }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsRequest"; + }; + + return ListRecurringAudienceListsRequest; + })(); + + v1alpha.ListRecurringAudienceListsResponse = (function() { + + /** + * Properties of a ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsResponse + * @property {Array.|null} [recurringAudienceLists] ListRecurringAudienceListsResponse recurringAudienceLists + * @property {string|null} [nextPageToken] ListRecurringAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsResponse. + * @implements IListRecurringAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + */ + function ListRecurringAudienceListsResponse(properties) { + this.recurringAudienceLists = []; + 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]]; + } + + /** + * ListRecurringAudienceListsResponse recurringAudienceLists. + * @member {Array.} recurringAudienceLists + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.recurringAudienceLists = $util.emptyArray; + + /** + * ListRecurringAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListRecurringAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse instance + */ + ListRecurringAudienceListsResponse.create = function create(properties) { + return new ListRecurringAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurringAudienceLists != null && message.recurringAudienceLists.length) + for (var i = 0; i < message.recurringAudienceLists.length; ++i) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceLists[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 ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.recurringAudienceLists && message.recurringAudienceLists.length)) + message.recurringAudienceLists = []; + message.recurringAudienceLists.push($root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.recurringAudienceLists != null && message.hasOwnProperty("recurringAudienceLists")) { + if (!Array.isArray(message.recurringAudienceLists)) + return "recurringAudienceLists: array expected"; + for (var i = 0; i < message.recurringAudienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceLists[i]); + if (error) + return "recurringAudienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + */ + ListRecurringAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + if (object.recurringAudienceLists) { + if (!Array.isArray(object.recurringAudienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: array expected"); + message.recurringAudienceLists = []; + for (var i = 0; i < object.recurringAudienceLists.length; ++i) { + if (typeof object.recurringAudienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: object expected"); + message.recurringAudienceLists[i] = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.recurringAudienceLists = []; + if (message.recurringAudienceLists && message.recurringAudienceLists.length) { + object.recurringAudienceLists = []; + for (var j = 0; j < message.recurringAudienceLists.length; ++j) + object.recurringAudienceLists[j] = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsResponse"; + }; + + return ListRecurringAudienceListsResponse; + })(); + + v1alpha.GetPropertyQuotasSnapshotRequest = (function() { + + /** + * Properties of a GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetPropertyQuotasSnapshotRequest + * @property {string|null} [name] GetPropertyQuotasSnapshotRequest name + */ + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetPropertyQuotasSnapshotRequest. + * @implements IGetPropertyQuotasSnapshotRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + */ + function GetPropertyQuotasSnapshotRequest(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]]; + } + + /** + * GetPropertyQuotasSnapshotRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + */ + GetPropertyQuotasSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest instance + */ + GetPropertyQuotasSnapshotRequest.create = function create(properties) { + return new GetPropertyQuotasSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + */ + GetPropertyQuotasSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPropertyQuotasSnapshotRequest.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 GetPropertyQuotasSnapshotRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetPropertyQuotasSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPropertyQuotasSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest"; + }; + + return GetPropertyQuotasSnapshotRequest; + })(); + + v1alpha.PropertyQuotasSnapshot = (function() { + + /** + * Properties of a PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuotasSnapshot + * @property {string|null} [name] PropertyQuotasSnapshot name + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [corePropertyQuota] PropertyQuotasSnapshot corePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [realtimePropertyQuota] PropertyQuotasSnapshot realtimePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [funnelPropertyQuota] PropertyQuotasSnapshot funnelPropertyQuota + */ + + /** + * Constructs a new PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuotasSnapshot. + * @implements IPropertyQuotasSnapshot + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + */ + function PropertyQuotasSnapshot(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]]; + } + + /** + * PropertyQuotasSnapshot name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.name = ""; + + /** + * PropertyQuotasSnapshot corePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} corePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.corePropertyQuota = null; + + /** + * PropertyQuotasSnapshot realtimePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} realtimePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.realtimePropertyQuota = null; + + /** + * PropertyQuotasSnapshot funnelPropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} funnelPropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.funnelPropertyQuota = null; + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot instance + */ + PropertyQuotasSnapshot.create = function create(properties) { + return new PropertyQuotasSnapshot(properties); + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.corePropertyQuota != null && Object.hasOwnProperty.call(message, "corePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.corePropertyQuota, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.realtimePropertyQuota != null && Object.hasOwnProperty.call(message, "realtimePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.realtimePropertyQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnelPropertyQuota != null && Object.hasOwnProperty.call(message, "funnelPropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.funnelPropertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 2: { + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 3: { + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuotasSnapshot message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuotasSnapshot.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.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.corePropertyQuota); + if (error) + return "corePropertyQuota." + error; + } + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.realtimePropertyQuota); + if (error) + return "realtimePropertyQuota." + error; + } + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.funnelPropertyQuota); + if (error) + return "funnelPropertyQuota." + error; + } + return null; + }; + + /** + * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + */ + PropertyQuotasSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.corePropertyQuota != null) { + if (typeof object.corePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.corePropertyQuota: object expected"); + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.corePropertyQuota); + } + if (object.realtimePropertyQuota != null) { + if (typeof object.realtimePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.realtimePropertyQuota: object expected"); + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.realtimePropertyQuota); + } + if (object.funnelPropertyQuota != null) { + if (typeof object.funnelPropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.funnelPropertyQuota: object expected"); + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.funnelPropertyQuota); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} message PropertyQuotasSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuotasSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.corePropertyQuota = null; + object.realtimePropertyQuota = null; + object.funnelPropertyQuota = null; + object.name = ""; + } + if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) + object.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.corePropertyQuota, options); + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) + object.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.realtimePropertyQuota, options); + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) + object.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.funnelPropertyQuota, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + * @returns {Object.} JSON object + */ + PropertyQuotasSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuotasSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuotasSnapshot"; + }; + + return PropertyQuotasSnapshot; + })(); + + v1alpha.GetAudienceListRequest = (function() { + + /** + * Properties of a GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetAudienceListRequest + * @property {string|null} [name] GetAudienceListRequest name + */ + + /** + * Constructs a new GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetAudienceListRequest. + * @implements IGetAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + */ + function GetAudienceListRequest(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]]; + } + + /** + * GetAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + */ + GetAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest instance + */ + GetAudienceListRequest.create = function create(properties) { + return new GetAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.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 GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceListRequest.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 GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + */ + GetAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetAudienceListRequest} message GetAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceListRequest.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 GetAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetAudienceListRequest"; + }; + + return GetAudienceListRequest; + })(); + + v1alpha.ListAudienceListsRequest = (function() { + + /** + * Properties of a ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsRequest + * @property {string|null} [parent] ListAudienceListsRequest parent + * @property {number|null} [pageSize] ListAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsRequest. + * @implements IListAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + */ + function ListAudienceListsRequest(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]]; + } + + /** + * ListAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.parent = ""; + + /** + * ListAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest instance + */ + ListAudienceListsRequest.create = function create(properties) { + return new ListAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsRequest.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"; + return null; + }; + + /** + * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + */ + ListAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + 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 ListAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsRequest} message ListAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsRequest.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; + return object; + }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsRequest"; + }; + + return ListAudienceListsRequest; + })(); + + v1alpha.ListAudienceListsResponse = (function() { + + /** + * Properties of a ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsResponse + * @property {Array.|null} [audienceLists] ListAudienceListsResponse audienceLists + * @property {string|null} [nextPageToken] ListAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsResponse. + * @implements IListAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + */ + function ListAudienceListsResponse(properties) { + this.audienceLists = []; + 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]]; + } + + /** + * ListAudienceListsResponse audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.audienceLists = $util.emptyArray; + + /** + * ListAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse instance + */ + ListAudienceListsResponse.create = function create(properties) { + return new ListAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceLists[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 ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push($root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceLists[i]); + if (error) + return "audienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + */ + ListAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) { + if (typeof object.audienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: object expected"); + message.audienceLists[i] = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} message ListAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceLists = []; + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsResponse"; + }; + + return ListAudienceListsResponse; + })(); + + v1alpha.CreateAudienceListRequest = (function() { + + /** + * Properties of a CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateAudienceListRequest + * @property {string|null} [parent] CreateAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] CreateAudienceListRequest audienceList + */ + + /** + * Constructs a new CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateAudienceListRequest. + * @implements ICreateAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + */ + function CreateAudienceListRequest(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]]; + } + + /** + * CreateAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.parent = ""; + + /** + * CreateAudienceListRequest audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.audienceList = null; + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest instance + */ + CreateAudienceListRequest.create = function create(properties) { + return new CreateAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.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.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceListRequest.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.audienceList != null && message.hasOwnProperty("audienceList")) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + */ + CreateAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateAudienceListRequest.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateAudienceListRequest} message CreateAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + return object; + }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateAudienceListRequest"; + }; + + return CreateAudienceListRequest; + })(); + + v1alpha.AudienceList = (function() { + + /** + * Properties of an AudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceList + * @property {string|null} [name] AudienceList name + * @property {string|null} [audience] AudienceList audience + * @property {string|null} [audienceDisplayName] AudienceList audienceDisplayName + * @property {Array.|null} [dimensions] AudienceList dimensions + * @property {google.analytics.data.v1alpha.AudienceList.State|null} [state] AudienceList state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceList beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] AudienceList creationQuotaTokensCharged + * @property {number|null} [rowCount] AudienceList rowCount + * @property {string|null} [errorMessage] AudienceList errorMessage + * @property {number|null} [percentageCompleted] AudienceList percentageCompleted + * @property {string|null} [recurringAudienceList] AudienceList recurringAudienceList + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] AudienceList webhookNotification + */ + + /** + * Constructs a new AudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceList. + * @implements IAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + */ + function AudienceList(properties) { + this.dimensions = []; + 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]]; + } + + /** + * AudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.name = ""; + + /** + * AudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audience = ""; + + /** + * AudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audienceDisplayName = ""; + + /** + * AudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.dimensions = $util.emptyArray; + + /** + * AudienceList state. + * @member {google.analytics.data.v1alpha.AudienceList.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.state = null; + + /** + * AudienceList beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.beginCreatingTime = null; + + /** + * AudienceList creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.creationQuotaTokensCharged = 0; + + /** + * AudienceList rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.rowCount = null; + + /** + * AudienceList errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.errorMessage = null; + + /** + * AudienceList percentageCompleted. + * @member {number|null|undefined} percentageCompleted + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.percentageCompleted = null; + + /** + * AudienceList recurringAudienceList. + * @member {string|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.recurringAudienceList = null; + + /** + * AudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_percentageCompleted", { + get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_recurringAudienceList", { + get: $util.oneOfGetter($oneOfFields = ["recurringAudienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList instance + */ + AudienceList.create = function create(properties) { + return new AudienceList(properties); + }; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], 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.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); + if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) + writer.uint32(/* id 11, wireType 1 =*/89).double(message.percentageCompleted); + if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.recurringAudienceList); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 8: { + message.rowCount = reader.int32(); + break; + } + case 9: { + message.errorMessage = reader.string(); + break; + } + case 11: { + message.percentageCompleted = reader.double(); + break; + } + case 12: { + message.recurringAudienceList = reader.string(); + break; + } + case 13: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceList.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.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + properties._percentageCompleted = 1; + if (typeof message.percentageCompleted !== "number") + return "percentageCompleted: number expected"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + properties._recurringAudienceList = 1; + if (!$util.isString(message.recurringAudienceList)) + return "recurringAudienceList: string expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + */ + AudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentageCompleted != null) + message.percentageCompleted = Number(object.percentageCompleted); + if (object.recurringAudienceList != null) + message.recurringAudienceList = String(object.recurringAudienceList); + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.AudienceList} message AudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + object.creationQuotaTokensCharged = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.AudienceList.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.AudienceList.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; + if (options.oneofs) + object._percentageCompleted = "percentageCompleted"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + object.recurringAudienceList = message.recurringAudienceList; + if (options.oneofs) + object._recurringAudienceList = "recurringAudienceList"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this AudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + * @returns {Object.} JSON object + */ + AudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceList"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.AudienceList.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + AudienceList.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return AudienceList; + })(); + + v1alpha.AudienceListMetadata = (function() { + + /** + * Properties of an AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceListMetadata + */ + + /** + * Constructs a new AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceListMetadata. + * @implements IAudienceListMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + */ + function AudienceListMetadata(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 AudienceListMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata instance + */ + AudienceListMetadata.create = function create(properties) { + return new AudienceListMetadata(properties); + }; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceListMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceListMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + */ + AudienceListMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceListMetadata) + return object; + return new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + }; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.AudienceListMetadata} message AudienceListMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceListMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AudienceListMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @instance + * @returns {Object.} JSON object + */ + AudienceListMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceListMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceListMetadata"; + }; + + return AudienceListMetadata; + })(); + + v1alpha.QueryAudienceListRequest = (function() { + + /** + * Properties of a QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListRequest + * @property {string|null} [name] QueryAudienceListRequest name + * @property {number|Long|null} [offset] QueryAudienceListRequest offset + * @property {number|Long|null} [limit] QueryAudienceListRequest limit + */ + + /** + * Constructs a new QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListRequest. + * @implements IQueryAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + */ + function QueryAudienceListRequest(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]]; + } + + /** + * QueryAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.name = ""; + + /** + * QueryAudienceListRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryAudienceListRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest instance + */ + QueryAudienceListRequest.create = function create(properties) { + return new QueryAudienceListRequest(properties); + }; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + */ + QueryAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListRequest} message QueryAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListRequest"; + }; + + return QueryAudienceListRequest; + })(); + + v1alpha.QueryAudienceListResponse = (function() { + + /** + * Properties of a QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListResponse + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] QueryAudienceListResponse audienceList + * @property {Array.|null} [audienceRows] QueryAudienceListResponse audienceRows + * @property {number|null} [rowCount] QueryAudienceListResponse rowCount + */ + + /** + * Constructs a new QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListResponse. + * @implements IQueryAudienceListResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + */ + function QueryAudienceListResponse(properties) { + this.audienceRows = []; + 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]]; + } + + /** + * QueryAudienceListResponse audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceList = null; + + /** + * QueryAudienceListResponse audienceRows. + * @member {Array.} audienceRows + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceRows = $util.emptyArray; + + /** + * QueryAudienceListResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.rowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_audienceList", { + get: $util.oneOfGetter($oneOfFields = ["audienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse instance + */ + QueryAudienceListResponse.create = function create(properties) { + return new QueryAudienceListResponse(properties); + }; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceRows != null && message.audienceRows.length) + for (var i = 0; i < message.audienceRows.length; ++i) + $root.google.analytics.data.v1alpha.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.audienceRows && message.audienceRows.length)) + message.audienceRows = []; + message.audienceRows.push($root.google.analytics.data.v1alpha.AudienceRow.decode(reader, reader.uint32())); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + properties._audienceList = 1; + { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + } + if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { + if (!Array.isArray(message.audienceRows)) + return "audienceRows: array expected"; + for (var i = 0; i < message.audienceRows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceRow.verify(message.audienceRows[i]); + if (error) + return "audienceRows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + return null; + }; + + /** + * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + */ + QueryAudienceListResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + if (object.audienceRows) { + if (!Array.isArray(object.audienceRows)) + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: array expected"); + message.audienceRows = []; + for (var i = 0; i < object.audienceRows.length; ++i) { + if (typeof object.audienceRows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: object expected"); + message.audienceRows[i] = $root.google.analytics.data.v1alpha.AudienceRow.fromObject(object.audienceRows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} message QueryAudienceListResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceRows = []; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + if (options.oneofs) + object._audienceList = "audienceList"; + } + if (message.audienceRows && message.audienceRows.length) { + object.audienceRows = []; + for (var j = 0; j < message.audienceRows.length; ++j) + object.audienceRows[j] = $root.google.analytics.data.v1alpha.AudienceRow.toObject(message.audienceRows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + return object; + }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListResponse"; + }; + + return QueryAudienceListResponse; + })(); + + v1alpha.SheetExportAudienceListRequest = (function() { + + /** + * Properties of a SheetExportAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ISheetExportAudienceListRequest + * @property {string|null} [name] SheetExportAudienceListRequest name + * @property {number|Long|null} [offset] SheetExportAudienceListRequest offset + * @property {number|Long|null} [limit] SheetExportAudienceListRequest limit + */ + + /** + * Constructs a new SheetExportAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SheetExportAudienceListRequest. + * @implements ISheetExportAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set + */ + function SheetExportAudienceListRequest(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]]; + } + + /** + * SheetExportAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.name = ""; + + /** + * SheetExportAudienceListRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SheetExportAudienceListRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + */ + SheetExportAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SheetExportAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest instance + */ + SheetExportAudienceListRequest.create = function create(properties) { + return new SheetExportAudienceListRequest(properties); + }; + + /** + * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SheetExportAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SheetExportAudienceListRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + */ + SheetExportAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.SheetExportAudienceListRequest} message SheetExportAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SheetExportAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this SheetExportAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + SheetExportAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SheetExportAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SheetExportAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListRequest"; + }; + + return SheetExportAudienceListRequest; + })(); + + v1alpha.SheetExportAudienceListResponse = (function() { + + /** + * Properties of a SheetExportAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @interface ISheetExportAudienceListResponse + * @property {string|null} [spreadsheetUri] SheetExportAudienceListResponse spreadsheetUri + * @property {string|null} [spreadsheetId] SheetExportAudienceListResponse spreadsheetId + * @property {number|null} [rowCount] SheetExportAudienceListResponse rowCount + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] SheetExportAudienceListResponse audienceList + */ + + /** + * Constructs a new SheetExportAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SheetExportAudienceListResponse. + * @implements ISheetExportAudienceListResponse + * @constructor + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set + */ + function SheetExportAudienceListResponse(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]]; + } + + /** + * SheetExportAudienceListResponse spreadsheetUri. + * @member {string|null|undefined} spreadsheetUri + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.spreadsheetUri = null; + + /** + * SheetExportAudienceListResponse spreadsheetId. + * @member {string|null|undefined} spreadsheetId + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.spreadsheetId = null; + + /** + * SheetExportAudienceListResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.rowCount = null; + + /** + * SheetExportAudienceListResponse audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + */ + SheetExportAudienceListResponse.prototype.audienceList = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetUri", { + get: $util.oneOfGetter($oneOfFields = ["spreadsheetUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetId", { + get: $util.oneOfGetter($oneOfFields = ["spreadsheetId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SheetExportAudienceListResponse.prototype, "_audienceList", { + get: $util.oneOfGetter($oneOfFields = ["audienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SheetExportAudienceListResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse instance + */ + SheetExportAudienceListResponse.create = function create(properties) { + return new SheetExportAudienceListResponse(properties); + }; + + /** + * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.spreadsheetUri != null && Object.hasOwnProperty.call(message, "spreadsheetUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.spreadsheetUri); + if (message.spreadsheetId != null && Object.hasOwnProperty.call(message, "spreadsheetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.spreadsheetId); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SheetExportAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.spreadsheetUri = reader.string(); + break; + } + case 2: { + message.spreadsheetId = reader.string(); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + case 4: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SheetExportAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SheetExportAudienceListResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SheetExportAudienceListResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { + properties._spreadsheetUri = 1; + if (!$util.isString(message.spreadsheetUri)) + return "spreadsheetUri: string expected"; + } + if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { + properties._spreadsheetId = 1; + if (!$util.isString(message.spreadsheetId)) + return "spreadsheetId: string expected"; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + properties._audienceList = 1; + { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + } + return null; + }; + + /** + * Creates a SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + */ + SheetExportAudienceListResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); + if (object.spreadsheetUri != null) + message.spreadsheetUri = String(object.spreadsheetUri); + if (object.spreadsheetId != null) + message.spreadsheetId = String(object.spreadsheetId); + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.SheetExportAudienceListResponse.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + return message; + }; + + /** + * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} message SheetExportAudienceListResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SheetExportAudienceListResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { + object.spreadsheetUri = message.spreadsheetUri; + if (options.oneofs) + object._spreadsheetUri = "spreadsheetUri"; + } + if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { + object.spreadsheetId = message.spreadsheetId; + if (options.oneofs) + object._spreadsheetId = "spreadsheetId"; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + if (options.oneofs) + object._audienceList = "audienceList"; + } + return object; + }; + + /** + * Converts this SheetExportAudienceListResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @instance + * @returns {Object.} JSON object + */ + SheetExportAudienceListResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SheetExportAudienceListResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SheetExportAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListResponse"; + }; + + return SheetExportAudienceListResponse; + })(); + + v1alpha.AudienceRow = (function() { + + /** + * Properties of an AudienceRow. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + */ + + /** + * Constructs a new AudienceRow. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + */ + function AudienceRow(properties) { + this.dimensionValues = []; + 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]]; + } + + /** + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + */ + AudienceRow.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance + */ + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); + }; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceRow message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + */ + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this AudienceRow to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + * @returns {Object.} JSON object + */ + AudienceRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceRow + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; + }; + + return AudienceRow; + })(); + + v1alpha.AudienceDimension = (function() { + + /** + * Properties of an AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName + */ + + /** + * Constructs a new AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + */ + function AudienceDimension(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]]; + } + + /** + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + */ + AudienceDimension.prototype.dimensionName = ""; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance + */ + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); + }; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + */ + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AudienceDimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + * @returns {Object.} JSON object + */ + AudienceDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; + }; + + return AudienceDimension; + })(); + + v1alpha.AudienceDimensionValue = (function() { + + /** + * Properties of an AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value + */ + + /** + * Constructs a new AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + */ + function AudienceDimensionValue(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]]; + } + + /** + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance + */ + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); + }; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + */ + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; + }; + + return AudienceDimensionValue; + })(); + + v1alpha.RunFunnelReportRequest = (function() { + + /** + * Properties of a RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportRequest + * @property {string|null} [property] RunFunnelReportRequest property + * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel + * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown + * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction + * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType + * @property {Array.|null} [segments] RunFunnelReportRequest segments + * @property {number|Long|null} [limit] RunFunnelReportRequest limit + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter + * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota + */ + + /** + * Constructs a new RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportRequest. + * @implements IRunFunnelReportRequest + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + */ + function RunFunnelReportRequest(properties) { + this.dateRanges = []; + this.segments = []; + 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]]; + } + + /** + * RunFunnelReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.property = ""; + + /** + * RunFunnelReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunFunnelReportRequest funnel. + * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnel = null; + + /** + * RunFunnelReportRequest funnelBreakdown. + * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelBreakdown = null; + + /** + * RunFunnelReportRequest funnelNextAction. + * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelNextAction = null; + + /** + * RunFunnelReportRequest funnelVisualizationType. + * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelVisualizationType = 0; + + /** + * RunFunnelReportRequest segments. + * @member {Array.} segments + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.segments = $util.emptyArray; + + /** + * RunFunnelReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunFunnelReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dimensionFilter = null; + + /** + * RunFunnelReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.returnPropertyQuota = false; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance + */ + RunFunnelReportRequest.create = function create(properties) { + return new RunFunnelReportRequest(properties); + }; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) + $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) + $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) + $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 3: { + message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); + break; + } + case 6: { + message.funnelVisualizationType = reader.int32(); + break; + } + case 7: { + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); + break; + } + case 9: { + message.limit = reader.int64(); + break; + } + case 10: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 12: { + message.returnPropertyQuota = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.funnel != null && message.hasOwnProperty("funnel")) { + var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); + if (error) + return "funnel." + error; + } + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { + var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); + if (error) + return "funnelBreakdown." + error; + } + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { + var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); + if (error) + return "funnelNextAction." + error; + } + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + switch (message.funnelVisualizationType) { + default: + return "funnelVisualizationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + return null; + }; + + /** + * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + */ + RunFunnelReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.funnel != null) { + if (typeof object.funnel !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); + message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); + } + if (object.funnelBreakdown != null) { + if (typeof object.funnelBreakdown !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); + } + if (object.funnelNextAction != null) { + if (typeof object.funnelNextAction !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); + } + switch (object.funnelVisualizationType) { + default: + if (typeof object.funnelVisualizationType === "number") { + message.funnelVisualizationType = object.funnelVisualizationType; + break; + } + break; + case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": + case 0: + message.funnelVisualizationType = 0; + break; + case "STANDARD_FUNNEL": + case 1: + message.funnelVisualizationType = 1; + break; + case "TRENDED_FUNNEL": + case 2: + message.funnelVisualizationType = 2; + break; + } + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); + message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); + } + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dateRanges = []; + object.segments = []; + } + if (options.defaults) { + object.property = ""; + object.funnel = null; + object.funnelBreakdown = null; + object.funnelNextAction = null; + object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.dimensionFilter = null; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.funnel != null && message.hasOwnProperty("funnel")) + object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) + object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) + object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + return object; + }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; + }; + + /** + * FunnelVisualizationType enum. + * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType + * @enum {number} + * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value + * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value + * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value + */ + RunFunnelReportRequest.FunnelVisualizationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_FUNNEL"] = 1; + values[valuesById[2] = "TRENDED_FUNNEL"] = 2; + return values; + })(); + + return RunFunnelReportRequest; + })(); + + v1alpha.RunFunnelReportResponse = (function() { + + /** + * Properties of a RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportResponse + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota + * @property {string|null} [kind] RunFunnelReportResponse kind + */ + + /** + * Constructs a new RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportResponse. + * @implements IRunFunnelReportResponse + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + */ + function RunFunnelReportResponse(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]]; + } + + /** + * RunFunnelReportResponse funnelTable. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelTable = null; + + /** + * RunFunnelReportResponse funnelVisualization. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelVisualization = null; + + /** + * RunFunnelReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.propertyQuota = null; + + /** + * RunFunnelReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.kind = ""; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance + */ + RunFunnelReportResponse.create = function create(properties) { + return new RunFunnelReportResponse(properties); + }; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 4: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); + if (error) + return "funnelTable." + error; + } + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); + if (error) + return "funnelVisualization." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + */ + RunFunnelReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + if (object.funnelTable != null) { + if (typeof object.funnelTable !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); + } + if (object.funnelVisualization != null) { + if (typeof object.funnelVisualization !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.funnelTable = null; + object.funnelVisualization = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) + object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) + object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; + }; + + return RunFunnelReportResponse; + })(); + + v1alpha.ReportTask = (function() { + + /** + * Properties of a ReportTask. + * @memberof google.analytics.data.v1alpha + * @interface IReportTask + * @property {string|null} [name] ReportTask name + * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition + * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata + */ + + /** + * Constructs a new ReportTask. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTask. + * @implements IReportTask + * @constructor + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + */ + function ReportTask(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]]; + } + + /** + * ReportTask name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.name = ""; + + /** + * ReportTask reportDefinition. + * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportDefinition = null; + + /** + * ReportTask reportMetadata. + * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportMetadata = null; + + /** + * Creates a new ReportTask instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance + */ + ReportTask.create = function create(properties) { + return new ReportTask(properties); + }; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.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.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) + $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) + $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); + break; + } + case 3: { + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTask message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTask.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.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); + if (error) + return "reportDefinition." + error; + } + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); + if (error) + return "reportMetadata." + error; + } + return null; + }; + + /** + * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + */ + ReportTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask(); + if (object.name != null) + message.name = String(object.name); + if (object.reportDefinition != null) { + if (typeof object.reportDefinition !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); + } + if (object.reportMetadata != null) { + if (typeof object.reportMetadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); + } + return message; + }; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.reportDefinition = null; + object.reportMetadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) + object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) + object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); + return object; + }; + + /** + * Converts this ReportTask to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + * @returns {Object.} JSON object + */ + ReportTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTask + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; + }; + + ReportTask.ReportDefinition = (function() { + + /** + * Properties of a ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportDefinition + * @property {Array.|null} [dimensions] ReportDefinition dimensions + * @property {Array.|null} [metrics] ReportDefinition metrics + * @property {Array.|null} [dateRanges] ReportDefinition dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter + * @property {number|Long|null} [offset] ReportDefinition offset + * @property {number|Long|null} [limit] ReportDefinition limit + * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations + * @property {Array.|null} [orderBys] ReportDefinition orderBys + * @property {string|null} [currencyCode] ReportDefinition currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec + * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows + * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel + */ + + /** + * Constructs a new ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportDefinition. + * @implements IReportDefinition + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + */ + function ReportDefinition(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + 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]]; + } + + /** + * ReportDefinition dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensions = $util.emptyArray; + + /** + * ReportDefinition metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metrics = $util.emptyArray; + + /** + * ReportDefinition dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dateRanges = $util.emptyArray; + + /** + * ReportDefinition dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensionFilter = null; + + /** + * ReportDefinition metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricFilter = null; + + /** + * ReportDefinition offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricAggregations = $util.emptyArray; + + /** + * ReportDefinition orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.orderBys = $util.emptyArray; + + /** + * ReportDefinition currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.currencyCode = ""; + + /** + * ReportDefinition cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.cohortSpec = null; + + /** + * ReportDefinition keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.keepEmptyRows = false; + + /** + * ReportDefinition samplingLevel. + * @member {google.analytics.data.v1alpha.SamplingLevel|null|undefined} samplingLevel + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.samplingLevel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportDefinition.prototype, "_samplingLevel", { + get: $util.oneOfGetter($oneOfFields = ["samplingLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition instance + */ + ReportDefinition.create = function create(properties) { + return new ReportDefinition(properties); + }; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.samplingLevel != null && Object.hasOwnProperty.call(message, "samplingLevel")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.samplingLevel); + return writer; + }; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.samplingLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDefinition message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDefinition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + properties._samplingLevel = 1; + switch (message.samplingLevel) { + default: + return "samplingLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + */ + ReportDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + switch (object.samplingLevel) { + default: + if (typeof object.samplingLevel === "number") { + message.samplingLevel = object.samplingLevel; + break; + } + break; + case "SAMPLING_LEVEL_UNSPECIFIED": + case 0: + message.samplingLevel = 0; + break; + case "LOW": + case 1: + message.samplingLevel = 1; + break; + case "MEDIUM": + case 2: + message.samplingLevel = 2; + break; + case "UNSAMPLED": + case 3: + message.samplingLevel = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportDefinition} message ReportDefinition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDefinition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + } + if (options.defaults) { + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + object.samplingLevel = options.enums === String ? $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] === undefined ? message.samplingLevel : $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] : message.samplingLevel; + if (options.oneofs) + object._samplingLevel = "samplingLevel"; + } + return object; + }; + + /** + * Converts this ReportDefinition to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + * @returns {Object.} JSON object + */ + ReportDefinition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDefinition + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportDefinition"; + }; + + return ReportDefinition; + })(); + + ReportTask.ReportMetadata = (function() { + + /** + * Properties of a ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportMetadata + * @property {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null} [state] ReportMetadata state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] ReportMetadata beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] ReportMetadata creationQuotaTokensCharged + * @property {number|null} [taskRowCount] ReportMetadata taskRowCount + * @property {string|null} [errorMessage] ReportMetadata errorMessage + * @property {number|null} [totalRowCount] ReportMetadata totalRowCount + */ + + /** + * Constructs a new ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportMetadata. + * @implements IReportMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + */ + function ReportMetadata(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]]; + } + + /** + * ReportMetadata state. + * @member {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.state = null; + + /** + * ReportMetadata beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.beginCreatingTime = null; + + /** + * ReportMetadata creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.creationQuotaTokensCharged = 0; + + /** + * ReportMetadata taskRowCount. + * @member {number|null|undefined} taskRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.taskRowCount = null; + + /** + * ReportMetadata errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.errorMessage = null; + + /** + * ReportMetadata totalRowCount. + * @member {number|null|undefined} totalRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.totalRowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_taskRowCount", { + get: $util.oneOfGetter($oneOfFields = ["taskRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_totalRowCount", { + get: $util.oneOfGetter($oneOfFields = ["totalRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata instance + */ + ReportMetadata.create = function create(properties) { + return new ReportMetadata(properties); + }; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.creationQuotaTokensCharged); + if (message.taskRowCount != null && Object.hasOwnProperty.call(message, "taskRowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.taskRowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorMessage); + if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalRowCount); + return writer; + }; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 4: { + message.taskRowCount = reader.int32(); + break; + } + case 5: { + message.errorMessage = reader.string(); + break; + } + case 6: { + message.totalRowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + properties._taskRowCount = 1; + if (!$util.isInteger(message.taskRowCount)) + return "taskRowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + properties._totalRowCount = 1; + if (!$util.isInteger(message.totalRowCount)) + return "totalRowCount: integer expected"; + } + return null; + }; + + /** + * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + */ + ReportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportMetadata.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.taskRowCount != null) + message.taskRowCount = object.taskRowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.totalRowCount != null) + message.totalRowCount = object.totalRowCount | 0; + return message; + }; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportMetadata} message ReportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.creationQuotaTokensCharged = 0; + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + object.taskRowCount = message.taskRowCount; + if (options.oneofs) + object._taskRowCount = "taskRowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + object.totalRowCount = message.totalRowCount; + if (options.oneofs) + object._totalRowCount = "totalRowCount"; + } + return object; + }; + + /** + * Converts this ReportMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportMetadata"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.ReportTask.ReportMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + ReportMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return ReportMetadata; + })(); + + return ReportTask; + })(); + + v1alpha.CreateReportTaskRequest = (function() { + + /** + * Properties of a CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateReportTaskRequest + * @property {string|null} [parent] CreateReportTaskRequest parent + * @property {google.analytics.data.v1alpha.IReportTask|null} [reportTask] CreateReportTaskRequest reportTask + */ + + /** + * Constructs a new CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateReportTaskRequest. + * @implements ICreateReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + */ + function CreateReportTaskRequest(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]]; + } + + /** + * CreateReportTaskRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.parent = ""; + + /** + * CreateReportTaskRequest reportTask. + * @member {google.analytics.data.v1alpha.IReportTask|null|undefined} reportTask + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.reportTask = null; + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest instance + */ + CreateReportTaskRequest.create = function create(properties) { + return new CreateReportTaskRequest(properties); + }; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.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.reportTask != null && Object.hasOwnProperty.call(message, "reportTask")) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReportTaskRequest.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.reportTask != null && message.hasOwnProperty("reportTask")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTask); + if (error) + return "reportTask." + error; + } + return null; + }; + + /** + * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + */ + CreateReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reportTask != null) { + if (typeof object.reportTask !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateReportTaskRequest.reportTask: object expected"); + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTask); + } + return message; + }; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.CreateReportTaskRequest} message CreateReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reportTask = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reportTask != null && message.hasOwnProperty("reportTask")) + object.reportTask = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTask, options); + return object; + }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateReportTaskRequest"; + }; + + return CreateReportTaskRequest; + })(); + + v1alpha.ReportTaskMetadata = (function() { + + /** + * Properties of a ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IReportTaskMetadata + */ + + /** + * Constructs a new ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTaskMetadata. + * @implements IReportTaskMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + */ + function ReportTaskMetadata(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 ReportTaskMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata instance + */ + ReportTaskMetadata.create = function create(properties) { + return new ReportTaskMetadata(properties); + }; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTaskMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTaskMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + */ + ReportTaskMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTaskMetadata) + return object; + return new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + }; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTaskMetadata} message ReportTaskMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTaskMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportTaskMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTaskMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTaskMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTaskMetadata"; + }; + + return ReportTaskMetadata; + })(); + + v1alpha.QueryReportTaskRequest = (function() { + + /** + * Properties of a QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskRequest + * @property {string|null} [name] QueryReportTaskRequest name + * @property {number|Long|null} [offset] QueryReportTaskRequest offset + * @property {number|Long|null} [limit] QueryReportTaskRequest limit + */ + + /** + * Constructs a new QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskRequest. + * @implements IQueryReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + */ + function QueryReportTaskRequest(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]]; + } + + /** + * QueryReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.name = ""; + + /** + * QueryReportTaskRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryReportTaskRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest instance + */ + QueryReportTaskRequest.create = function create(properties) { + return new QueryReportTaskRequest(properties); + }; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.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.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskRequest.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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + */ + QueryReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskRequest} message QueryReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskRequest"; + }; + + return QueryReportTaskRequest; + })(); + + v1alpha.QueryReportTaskResponse = (function() { + + /** + * Properties of a QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskResponse + * @property {Array.|null} [dimensionHeaders] QueryReportTaskResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] QueryReportTaskResponse metricHeaders + * @property {Array.|null} [rows] QueryReportTaskResponse rows + * @property {Array.|null} [totals] QueryReportTaskResponse totals + * @property {Array.|null} [maximums] QueryReportTaskResponse maximums + * @property {Array.|null} [minimums] QueryReportTaskResponse minimums + * @property {number|null} [rowCount] QueryReportTaskResponse rowCount + * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] QueryReportTaskResponse metadata + */ + + /** + * Constructs a new QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskResponse. + * @implements IQueryReportTaskResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + */ + function QueryReportTaskResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + 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]]; + } + + /** + * QueryReportTaskResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rows = $util.emptyArray; + + /** + * QueryReportTaskResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.totals = $util.emptyArray; + + /** + * QueryReportTaskResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.maximums = $util.emptyArray; + + /** + * QueryReportTaskResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.minimums = $util.emptyArray; + + /** + * QueryReportTaskResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rowCount = 0; + + /** + * QueryReportTaskResponse metadata. + * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metadata = null; + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse instance + */ + QueryReportTaskResponse.create = function create(properties) { + return new QueryReportTaskResponse(properties); + }; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + */ + QueryReportTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} message QueryReportTaskResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskResponse"; + }; + + return QueryReportTaskResponse; + })(); + + v1alpha.GetReportTaskRequest = (function() { + + /** + * Properties of a GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetReportTaskRequest + * @property {string|null} [name] GetReportTaskRequest name + */ + + /** + * Constructs a new GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetReportTaskRequest. + * @implements IGetReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + */ + function GetReportTaskRequest(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]]; + } + + /** + * GetReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + */ + GetReportTaskRequest.prototype.name = ""; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest instance + */ + GetReportTaskRequest.create = function create(properties) { + return new GetReportTaskRequest(properties); + }; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.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 GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportTaskRequest.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 GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + */ + GetReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.GetReportTaskRequest} message GetReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportTaskRequest.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 GetReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetReportTaskRequest"; + }; + + return GetReportTaskRequest; + })(); + + v1alpha.ListReportTasksRequest = (function() { + + /** + * Properties of a ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksRequest + * @property {string|null} [parent] ListReportTasksRequest parent + * @property {number|null} [pageSize] ListReportTasksRequest pageSize + * @property {string|null} [pageToken] ListReportTasksRequest pageToken + */ + + /** + * Constructs a new ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksRequest. + * @implements IListReportTasksRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + */ + function ListReportTasksRequest(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]]; + } + + /** + * ListReportTasksRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.parent = ""; + + /** + * ListReportTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageSize = 0; + + /** + * ListReportTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest instance + */ + ListReportTasksRequest.create = function create(properties) { + return new ListReportTasksRequest(properties); + }; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.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); + return writer; + }; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksRequest.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"; + return null; + }; + + /** + * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + */ + ListReportTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + 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 ListReportTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksRequest} message ListReportTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksRequest.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; + return object; + }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksRequest"; + }; + + return ListReportTasksRequest; + })(); + + v1alpha.ListReportTasksResponse = (function() { + + /** + * Properties of a ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksResponse + * @property {Array.|null} [reportTasks] ListReportTasksResponse reportTasks + * @property {string|null} [nextPageToken] ListReportTasksResponse nextPageToken + */ + + /** + * Constructs a new ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksResponse. + * @implements IListReportTasksResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + */ + function ListReportTasksResponse(properties) { + this.reportTasks = []; + 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]]; + } + + /** + * ListReportTasksResponse reportTasks. + * @member {Array.} reportTasks + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.reportTasks = $util.emptyArray; + + /** + * ListReportTasksResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListReportTasksResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse instance + */ + ListReportTasksResponse.create = function create(properties) { + return new ListReportTasksResponse(properties); + }; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportTasks != null && message.reportTasks.length) + for (var i = 0; i < message.reportTasks.length; ++i) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTasks[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 ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reportTasks && message.reportTasks.length)) + message.reportTasks = []; + message.reportTasks.push($root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reportTasks != null && message.hasOwnProperty("reportTasks")) { + if (!Array.isArray(message.reportTasks)) + return "reportTasks: array expected"; + for (var i = 0; i < message.reportTasks.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTasks[i]); + if (error) + return "reportTasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + */ + ListReportTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + if (object.reportTasks) { + if (!Array.isArray(object.reportTasks)) + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: array expected"); + message.reportTasks = []; + for (var i = 0; i < object.reportTasks.length; ++i) { + if (typeof object.reportTasks[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: object expected"); + message.reportTasks[i] = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} message ListReportTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reportTasks = []; + if (message.reportTasks && message.reportTasks.length) { + object.reportTasks = []; + for (var j = 0; j < message.reportTasks.length; ++j) + object.reportTasks[j] = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksResponse"; + }; + + return ListReportTasksResponse; + })(); + + v1alpha.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.analytics.data.v1alpha + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name + */ + + /** + * Constructs a new DateRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + */ + function DateRange(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]]; + } + + /** + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.startDate = ""; + + /** + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.endDate = ""; + + /** + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.name = ""; + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DateRange) + return object; + var message = new $root.google.analytics.data.v1alpha.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; + }; + + return DateRange; + })(); + + v1alpha.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.analytics.data.v1alpha + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + */ + + /** + * Constructs a new Dimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + */ + function Dimension(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]]; + } + + /** + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.name = ""; + + /** + * Dimension dimensionExpression. + * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.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.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.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.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Dimension) + return object; + var message = new $root.google.analytics.data.v1alpha.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; + }; + + return Dimension; + })(); + + v1alpha.DimensionExpression = (function() { + + /** + * Properties of a DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionExpression + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + */ + + /** + * Constructs a new DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + */ + function DimensionExpression(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]]; + } + + /** + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.lowerCase = null; + + /** + * DimensionExpression upperCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.upperCase = null; + + /** + * DimensionExpression concatenate. + * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.concatenate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance + */ + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); + }; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (error) + return "lowerCase." + error; + } + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); + if (error) + return "upperCase." + error; + } + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (error) + return "concatenate." + error; + } + } + return null; + }; + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + */ + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); + } + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); + } + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + } + return message; + }; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); + if (options.oneofs) + object.oneExpression = "lowerCase"; + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); + if (options.oneofs) + object.oneExpression = "upperCase"; + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (options.oneofs) + object.oneExpression = "concatenate"; + } + return object; + }; + + /** + * Converts this DimensionExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + * @returns {Object.} JSON object + */ + DimensionExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; + }; + + DimensionExpression.CaseExpression = (function() { + + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ + + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(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]]; + } + + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; + }; + + return CaseExpression; + })(); + + DimensionExpression.ConcatenateExpression = (function() { + + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ + + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + 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]]; + } + + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; + }; + + return ConcatenateExpression; + })(); + + return DimensionExpression; + })(); + + v1alpha.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.analytics.data.v1alpha + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible + */ + + /** + * Constructs a new Metric. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + */ + function Metric(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]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.expression = ""; + + /** + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.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.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.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.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metric) + return object; + var message = new $root.google.analytics.data.v1alpha.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expression = ""; + object.invisible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; + }; + + return Metric; + })(); + + v1alpha.FilterExpression = (function() { + + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpression + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter + */ + + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(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]]; + } + + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; + + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; + + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; + + /** + * FilterExpression filter. + * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; + }; + + return FilterExpression; + })(); + + v1alpha.FilterExpressionList = (function() { + + /** + * Properties of a FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions + */ + + /** + * Constructs a new FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + */ + function FilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + */ + FilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance + */ + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); + }; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + */ + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; + }; + + return FilterExpressionList; + })(); + + v1alpha.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.analytics.data.v1alpha + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + */ + + /** + * Constructs a new Filter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + */ + function Filter(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]]; + } + + /** + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Filter) + return object; + var message = new $root.google.analytics.data.v1alpha.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; + }; + + return Filter; + })(); + + v1alpha.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.data.v1alpha + * @interface IStringFilter + * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + */ + function StringFilter(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]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.data.v1alpha.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + v1alpha.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.data.v1alpha + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; + }; + + return InListFilter; + })(); + + v1alpha.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.data.v1alpha + * @interface INumericFilter + * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(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]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1alpha.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + v1alpha.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1alpha + * @interface IOrderBy + * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + */ + function OrderBy(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]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(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]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(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]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return OrderBy; + })(); + + v1alpha.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @interface IBetweenFilter + * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(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]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + v1alpha.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(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 EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) + return object; + return new $root.google.analytics.data.v1alpha.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + v1alpha.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1alpha + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + */ + function NumericValue(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]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; + }; + + return NumericValue; + })(); + + v1alpha.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1alpha + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + 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]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1alpha.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1alpha + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + */ + function Cohort(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]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.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.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.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.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Cohort) + return object; + var message = new $root.google.analytics.data.v1alpha.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; + }; + + return Cohort; + })(); + + v1alpha.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1alpha + * @interface ICohortsRange + * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(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]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1alpha.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1alpha.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(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]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + v1alpha.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + 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]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) + object.dataLossFromOtherRow = false; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + 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]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + 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]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; + + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; + })(); + + v1alpha.DimensionHeader = (function() { + + /** + * Properties of a DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name + */ + + /** + * Constructs a new DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + */ + function DimensionHeader(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]]; + } + + /** + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + */ + DimensionHeader.prototype.name = ""; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance + */ + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); + }; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.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 DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionHeader.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 DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + */ + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionHeader.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 DimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + * @returns {Object.} JSON object + */ + DimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; + }; + + return DimensionHeader; + })(); + + v1alpha.MetricHeader = (function() { + + /** + * Properties of a MetricHeader. + * @memberof google.analytics.data.v1alpha + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type + */ + + /** + * Constructs a new MetricHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader + * @constructor + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + */ + function MetricHeader(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]]; + } + + /** + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.name = ""; + + /** + * MetricHeader type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance + */ + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); + }; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricHeader.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + */ + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + return object; + }; + + /** + * Converts this MetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + * @returns {Object.} JSON object + */ + MetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; + }; + + return MetricHeader; + })(); + + v1alpha.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.analytics.data.v1alpha + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues + */ + + /** + * Constructs a new Row. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; + 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]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Row) + return object; + var message = new $root.google.analytics.data.v1alpha.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; + }; + + return Row; + })(); + + v1alpha.DimensionValue = (function() { + + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ + + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(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]]; + } + + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; + }; + + return DimensionValue; + })(); + + v1alpha.MetricValue = (function() { + + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1alpha + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ + + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + */ + function MetricValue(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]]; + } + + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + MetricValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; + }; + + return MetricValue; + })(); + + v1alpha.PropertyQuota = (function() { + + /** + * Properties of a PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuota + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + */ + function PropertyQuota(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]]; + } + + /** + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerDay = null; + + /** + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance + */ + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); + }; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuota message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + */ + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this PropertyQuota to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + * @returns {Object.} JSON object + */ + PropertyQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuota + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; + }; + + return PropertyQuota; + })(); + + v1alpha.QuotaStatus = (function() { + + /** + * Properties of a QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining + */ + + /** + * Constructs a new QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus + * @constructor + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + */ + function QuotaStatus(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]]; + } + + /** + * QuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.consumed = 0; + + /** + * QuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.remaining = 0; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance + */ + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); + }; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaStatus message. + * @function verify + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + return null; + }; + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + */ + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) + return object; + var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consumed = 0; + object.remaining = 0; + } + if (message.consumed != null && message.hasOwnProperty("consumed")) + object.consumed = message.consumed; + if (message.remaining != null && message.hasOwnProperty("remaining")) + object.remaining = message.remaining; + return object; + }; + + /** + * Converts this QuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + * @returns {Object.} JSON object + */ + QuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaStatus + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; + }; + + return QuotaStatus; + })(); + + v1alpha.FunnelBreakdown = (function() { + + /** + * Properties of a FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelBreakdown + * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension + * @property {number|Long|null} [limit] FunnelBreakdown limit + */ + + /** + * Constructs a new FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelBreakdown. + * @implements IFunnelBreakdown + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + */ + function FunnelBreakdown(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]]; + } + + /** + * FunnelBreakdown breakdownDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.breakdownDimension = null; + + /** + * FunnelBreakdown limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelBreakdown.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance + */ + FunnelBreakdown.create = function create(properties) { + return new FunnelBreakdown(properties); + }; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelBreakdown message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelBreakdown.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); + if (error) + return "breakdownDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + */ + FunnelBreakdown.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + if (object.breakdownDimension != null) { + if (typeof object.breakdownDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelBreakdown.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.breakdownDimension = null; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) + object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelBreakdown to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + * @returns {Object.} JSON object + */ + FunnelBreakdown.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelBreakdown + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; + }; + + return FunnelBreakdown; + })(); + + v1alpha.FunnelNextAction = (function() { + + /** + * Properties of a FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelNextAction + * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension + * @property {number|Long|null} [limit] FunnelNextAction limit + */ + + /** + * Constructs a new FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelNextAction. + * @implements IFunnelNextAction + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + */ + function FunnelNextAction(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]]; + } + + /** + * FunnelNextAction nextActionDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.nextActionDimension = null; + + /** + * FunnelNextAction limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelNextAction.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance + */ + FunnelNextAction.create = function create(properties) { + return new FunnelNextAction(properties); + }; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelNextAction message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelNextAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); + if (error) + return "nextActionDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + */ + FunnelNextAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + if (object.nextActionDimension != null) { + if (typeof object.nextActionDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelNextAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nextActionDimension = null; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) + object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelNextAction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + * @returns {Object.} JSON object + */ + FunnelNextAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelNextAction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; + }; + + return FunnelNextAction; + })(); + + v1alpha.Funnel = (function() { + + /** + * Properties of a Funnel. + * @memberof google.analytics.data.v1alpha + * @interface IFunnel + * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel + * @property {Array.|null} [steps] Funnel steps + */ + + /** + * Constructs a new Funnel. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Funnel. + * @implements IFunnel + * @constructor + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + */ + function Funnel(properties) { + this.steps = []; + 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]]; + } + + /** + * Funnel isOpenFunnel. + * @member {boolean} isOpenFunnel + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.isOpenFunnel = false; + + /** + * Funnel steps. + * @member {Array.} steps + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.steps = $util.emptyArray; + + /** + * Creates a new Funnel instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance + */ + Funnel.create = function create(properties) { + return new Funnel(properties); + }; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isOpenFunnel = reader.bool(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Funnel message. + * @function verify + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Funnel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + if (typeof message.isOpenFunnel !== "boolean") + return "isOpenFunnel: boolean expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; + + /** + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + */ + Funnel.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Funnel) + return object; + var message = new $root.google.analytics.data.v1alpha.Funnel(); + if (object.isOpenFunnel != null) + message.isOpenFunnel = Boolean(object.isOpenFunnel); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); + message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.Funnel} message Funnel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Funnel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.isOpenFunnel = false; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + object.isOpenFunnel = message.isOpenFunnel; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); + } + return object; + }; + + /** + * Converts this Funnel to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + * @returns {Object.} JSON object + */ + Funnel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Funnel + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; + }; + + return Funnel; + })(); + + v1alpha.FunnelStep = (function() { + + /** + * Properties of a FunnelStep. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelStep + * @property {string|null} [name] FunnelStep name + * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy + * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression + */ + + /** + * Constructs a new FunnelStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelStep. + * @implements IFunnelStep + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + */ + function FunnelStep(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]]; + } + + /** + * FunnelStep name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.name = ""; + + /** + * FunnelStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.isDirectlyFollowedBy = false; + + /** + * FunnelStep withinDurationFromPriorStep. + * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.withinDurationFromPriorStep = null; + + /** + * FunnelStep filterExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.filterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { + get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance + */ + FunnelStep.create = function create(properties) { + return new FunnelStep(properties); + }; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.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.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); + if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) + $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 3: { + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelStep.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.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + properties._withinDurationFromPriorStep = 1; + { + var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); + if (error) + return "withinDurationFromPriorStep." + error; + } + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + */ + FunnelStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelStep(); + if (object.name != null) + message.name = String(object.name); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + if (object.withinDurationFromPriorStep != null) { + if (typeof object.withinDurationFromPriorStep !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.isDirectlyFollowedBy = false; + object.filterExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); + if (options.oneofs) + object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this FunnelStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + * @returns {Object.} JSON object + */ + FunnelStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; + }; + + return FunnelStep; + })(); + + v1alpha.FunnelSubReport = (function() { + + /** + * Properties of a FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelSubReport + * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders + * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders + * @property {Array.|null} [rows] FunnelSubReport rows + * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata + */ + + /** + * Constructs a new FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelSubReport. + * @implements IFunnelSubReport + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + */ + function FunnelSubReport(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + 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]]; + } + + /** + * FunnelSubReport dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; + + /** + * FunnelSubReport metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metricHeaders = $util.emptyArray; + + /** + * FunnelSubReport rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.rows = $util.emptyArray; + + /** + * FunnelSubReport metadata. + * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metadata = null; + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance + */ + FunnelSubReport.create = function create(properties) { + return new FunnelSubReport(properties); + }; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelSubReport message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelSubReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + */ + FunnelSubReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelSubReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + } + if (options.defaults) + object.metadata = null; + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this FunnelSubReport to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + * @returns {Object.} JSON object + */ + FunnelSubReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelSubReport + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; + }; + + return FunnelSubReport; + })(); + + v1alpha.UserSegment = (function() { + + /** + * Properties of a UserSegment. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegment + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria + * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion + */ + + /** + * Constructs a new UserSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegment. + * @implements IUserSegment + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + */ + function UserSegment(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]]; + } + + /** + * UserSegment userInclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.userInclusionCriteria = null; + + /** + * UserSegment exclusion. + * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.exclusion = null; + + /** + * Creates a new UserSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance + */ + UserSegment.create = function create(properties) { + return new UserSegment(properties); + }; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); + if (error) + return "userInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + */ + UserSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegment(); + if (object.userInclusionCriteria != null) { + if (typeof object.userInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userInclusionCriteria = null; + object.exclusion = null; + } + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) + object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this UserSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + * @returns {Object.} JSON object + */ + UserSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; + }; + + return UserSegment; + })(); + + v1alpha.UserSegmentCriteria = (function() { + + /** + * Properties of a UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentCriteria + * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups + * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups + */ + + /** + * Constructs a new UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentCriteria. + * @implements IUserSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + */ + function UserSegmentCriteria(properties) { + this.andConditionGroups = []; + this.andSequenceGroups = []; + 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]]; + } + + /** + * UserSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * UserSegmentCriteria andSequenceGroups. + * @member {Array.} andSequenceGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance + */ + UserSegmentCriteria.create = function create(properties) { + return new UserSegmentCriteria(properties); + }; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.andSequenceGroups != null && message.andSequenceGroups.length) + for (var i = 0; i < message.andSequenceGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.andSequenceGroups && message.andSequenceGroups.length)) + message.andSequenceGroups = []; + message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { + if (!Array.isArray(message.andSequenceGroups)) + return "andSequenceGroups: array expected"; + for (var i = 0; i < message.andSequenceGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); + if (error) + return "andSequenceGroups." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + */ + UserSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + if (object.andSequenceGroups) { + if (!Array.isArray(object.andSequenceGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); + message.andSequenceGroups = []; + for (var i = 0; i < object.andSequenceGroups.length; ++i) { + if (typeof object.andSequenceGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); + message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.andConditionGroups = []; + object.andSequenceGroups = []; + } + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + if (message.andSequenceGroups && message.andSequenceGroups.length) { + object.andSequenceGroups = []; + for (var j = 0; j < message.andSequenceGroups.length; ++j) + object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + UserSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; + }; + + return UserSegmentCriteria; + })(); + + /** + * UserCriteriaScoping enum. + * @name google.analytics.data.v1alpha.UserCriteriaScoping + * @enum {number} + * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value + * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value + */ + v1alpha.UserCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.UserSegmentConditionGroup = (function() { + + /** + * Properties of a UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentConditionGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentConditionGroup. + * @implements IUserSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + */ + function UserSegmentConditionGroup(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]]; + } + + /** + * UserSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * UserSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance + */ + UserSegmentConditionGroup.create = function create(properties) { + return new UserSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + */ + UserSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.conditionScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; + }; + + return UserSegmentConditionGroup; + })(); + + v1alpha.UserSegmentSequenceGroup = (function() { + + /** + * Properties of a UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentSequenceGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration + * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps + */ + + /** + * Constructs a new UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentSequenceGroup. + * @implements IUserSegmentSequenceGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + */ + function UserSegmentSequenceGroup(properties) { + this.userSequenceSteps = []; + 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]]; + } + + /** + * UserSegmentSequenceGroup sequenceScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceScoping = 0; + + /** + * UserSegmentSequenceGroup sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; + + /** + * UserSegmentSequenceGroup userSequenceSteps. + * @member {Array.} userSequenceSteps + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance + */ + UserSegmentSequenceGroup.create = function create(properties) { + return new UserSegmentSequenceGroup(properties); + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userSequenceSteps != null && message.userSequenceSteps.length) + for (var i = 0; i < message.userSequenceSteps.length; ++i) + $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sequenceScoping = reader.int32(); + break; + } + case 2: { + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.userSequenceSteps && message.userSequenceSteps.length)) + message.userSequenceSteps = []; + message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentSequenceGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentSequenceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + switch (message.sequenceScoping) { + default: + return "sequenceScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (error) + return "sequenceMaximumDuration." + error; + } + if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { + if (!Array.isArray(message.userSequenceSteps)) + return "userSequenceSteps: array expected"; + for (var i = 0; i < message.userSequenceSteps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); + if (error) + return "userSequenceSteps." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + */ + UserSegmentSequenceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + switch (object.sequenceScoping) { + default: + if (typeof object.sequenceScoping === "number") { + message.sequenceScoping = object.sequenceScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.sequenceScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.sequenceScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.sequenceScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.sequenceScoping = 3; + break; + } + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.userSequenceSteps) { + if (!Array.isArray(object.userSequenceSteps)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); + message.userSequenceSteps = []; + for (var i = 0; i < object.userSequenceSteps.length; ++i) { + if (typeof object.userSequenceSteps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); + message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentSequenceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userSequenceSteps = []; + if (options.defaults) { + object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.userSequenceSteps && message.userSequenceSteps.length) { + object.userSequenceSteps = []; + for (var j = 0; j < message.userSequenceSteps.length; ++j) + object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; + }; + + return UserSegmentSequenceGroup; + })(); + + v1alpha.UserSequenceStep = (function() { + + /** + * Properties of a UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @interface IUserSequenceStep + * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression + */ + + /** + * Constructs a new UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSequenceStep. + * @implements IUserSequenceStep + * @constructor + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + */ + function UserSequenceStep(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]]; + } + + /** + * UserSequenceStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.isDirectlyFollowedBy = false; + + /** + * UserSequenceStep stepScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.stepScoping = 0; + + /** + * UserSequenceStep segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance + */ + UserSequenceStep.create = function create(properties) { + return new UserSequenceStep(properties); + }; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); + if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 2: { + message.stepScoping = reader.int32(); + break; + } + case 3: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSequenceStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSequenceStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + switch (message.stepScoping) { + default: + return "stepScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + */ + UserSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + switch (object.stepScoping) { + default: + if (typeof object.stepScoping === "number") { + message.stepScoping = object.stepScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.stepScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.stepScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.stepScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.stepScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSequenceStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isDirectlyFollowedBy = false; + object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSequenceStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + * @returns {Object.} JSON object + */ + UserSequenceStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSequenceStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; + }; + + return UserSequenceStep; + })(); + + v1alpha.UserSegmentExclusion = (function() { + + /** + * Properties of a UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentExclusion + * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria + */ + + /** + * Constructs a new UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentExclusion. + * @implements IUserSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + */ + function UserSegmentExclusion(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]]; + } + + /** + * UserSegmentExclusion userExclusionDuration. + * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionDuration = 0; + + /** + * UserSegmentExclusion userExclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionCriteria = null; + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance + */ + UserSegmentExclusion.create = function create(properties) { + return new UserSegmentExclusion(properties); + }; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); + if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userExclusionDuration = reader.int32(); + break; + } + case 2: { + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + switch (message.userExclusionDuration) { + default: + return "userExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); + if (error) + return "userExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + */ + UserSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + switch (object.userExclusionDuration) { + default: + if (typeof object.userExclusionDuration === "number") { + message.userExclusionDuration = object.userExclusionDuration; + break; + } + break; + case "USER_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.userExclusionDuration = 0; + break; + case "USER_EXCLUSION_TEMPORARY": + case 1: + message.userExclusionDuration = 1; + break; + case "USER_EXCLUSION_PERMANENT": + case 2: + message.userExclusionDuration = 2; + break; + } + if (object.userExclusionCriteria != null) { + if (typeof object.userExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.userExclusionCriteria = null; + } + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) + object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); + return object; + }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + UserSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; + }; + + return UserSegmentExclusion; + })(); + + /** + * UserExclusionDuration enum. + * @name google.analytics.data.v1alpha.UserExclusionDuration + * @enum {number} + * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value + * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value + */ + v1alpha.UserExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.SessionSegment = (function() { + + /** + * Properties of a SessionSegment. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegment + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria + * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion + */ + + /** + * Constructs a new SessionSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegment. + * @implements ISessionSegment + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + */ + function SessionSegment(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]]; + } + + /** + * SessionSegment sessionInclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.sessionInclusionCriteria = null; + + /** + * SessionSegment exclusion. + * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.exclusion = null; + + /** + * Creates a new SessionSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance + */ + SessionSegment.create = function create(properties) { + return new SessionSegment(properties); + }; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); + if (error) + return "sessionInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + */ + SessionSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegment(); + if (object.sessionInclusionCriteria != null) { + if (typeof object.sessionInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionInclusionCriteria = null; + object.exclusion = null; + } + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) + object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this SessionSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + * @returns {Object.} JSON object + */ + SessionSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; + }; + + return SessionSegment; + })(); + + v1alpha.SessionSegmentCriteria = (function() { + + /** + * Properties of a SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentCriteria + * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentCriteria. + * @implements ISessionSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + */ + function SessionSegmentCriteria(properties) { + this.andConditionGroups = []; + 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]]; + } + + /** + * SessionSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + */ + SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance + */ + SessionSegmentCriteria.create = function create(properties) { + return new SessionSegmentCriteria(properties); + }; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + */ + SessionSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; + }; + + return SessionSegmentCriteria; + })(); + + /** + * SessionCriteriaScoping enum. + * @name google.analytics.data.v1alpha.SessionCriteriaScoping + * @enum {number} + * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value + */ + v1alpha.SessionCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; + return values; + })(); + + v1alpha.SessionSegmentConditionGroup = (function() { + + /** + * Properties of a SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentConditionGroup + * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentConditionGroup. + * @implements ISessionSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + */ + function SessionSegmentConditionGroup(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]]; + } + + /** + * SessionSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * SessionSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance + */ + SessionSegmentConditionGroup.create = function create(properties) { + return new SessionSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + */ + SessionSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "SESSION_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "SESSION_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; + }; + + return SessionSegmentConditionGroup; + })(); + + v1alpha.SessionSegmentExclusion = (function() { + + /** + * Properties of a SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentExclusion + * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria + */ + + /** + * Constructs a new SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentExclusion. + * @implements ISessionSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + */ + function SessionSegmentExclusion(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]]; + } + + /** + * SessionSegmentExclusion sessionExclusionDuration. + * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; + + /** + * SessionSegmentExclusion sessionExclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance + */ + SessionSegmentExclusion.create = function create(properties) { + return new SessionSegmentExclusion(properties); + }; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); + if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionExclusionDuration = reader.int32(); + break; + } + case 2: { + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + switch (message.sessionExclusionDuration) { + default: + return "sessionExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); + if (error) + return "sessionExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + */ + SessionSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + switch (object.sessionExclusionDuration) { + default: + if (typeof object.sessionExclusionDuration === "number") { + message.sessionExclusionDuration = object.sessionExclusionDuration; + break; + } + break; + case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.sessionExclusionDuration = 0; + break; + case "SESSION_EXCLUSION_TEMPORARY": + case 1: + message.sessionExclusionDuration = 1; + break; + case "SESSION_EXCLUSION_PERMANENT": + case 2: + message.sessionExclusionDuration = 2; + break; + } + if (object.sessionExclusionCriteria != null) { + if (typeof object.sessionExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.sessionExclusionCriteria = null; + } + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) + object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); + return object; + }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; + }; + + return SessionSegmentExclusion; + })(); + + /** + * SessionExclusionDuration enum. + * @name google.analytics.data.v1alpha.SessionExclusionDuration + * @enum {number} + * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value + * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value + */ + v1alpha.SessionExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.EventSegment = (function() { + + /** + * Properties of an EventSegment. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegment + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria + * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion + */ + + /** + * Constructs a new EventSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegment. + * @implements IEventSegment + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + */ + function EventSegment(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]]; + } + + /** + * EventSegment eventInclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.eventInclusionCriteria = null; + + /** + * EventSegment exclusion. + * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.exclusion = null; + + /** + * Creates a new EventSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance + */ + EventSegment.create = function create(properties) { + return new EventSegment(properties); + }; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); + if (error) + return "eventInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + */ + EventSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegment(); + if (object.eventInclusionCriteria != null) { + if (typeof object.eventInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventInclusionCriteria = null; + object.exclusion = null; + } + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) + object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this EventSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + * @returns {Object.} JSON object + */ + EventSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; + }; + + return EventSegment; + })(); + + v1alpha.EventSegmentCriteria = (function() { + + /** + * Properties of an EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentCriteria + * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentCriteria. + * @implements IEventSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + */ + function EventSegmentCriteria(properties) { + this.andConditionGroups = []; + 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]]; + } + + /** + * EventSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + */ + EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance + */ + EventSegmentCriteria.create = function create(properties) { + return new EventSegmentCriteria(properties); + }; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + */ + EventSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + EventSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; + }; + + return EventSegmentCriteria; + })(); + + /** + * EventCriteriaScoping enum. + * @name google.analytics.data.v1alpha.EventCriteriaScoping + * @enum {number} + * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value + */ + v1alpha.EventCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; + return values; + })(); + + v1alpha.EventSegmentConditionGroup = (function() { + + /** + * Properties of an EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentConditionGroup + * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentConditionGroup. + * @implements IEventSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + */ + function EventSegmentConditionGroup(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]]; + } + + /** + * EventSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * EventSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance + */ + EventSegmentConditionGroup.create = function create(properties) { + return new EventSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + */ + EventSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "EVENT_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + EventSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; + }; + + return EventSegmentConditionGroup; + })(); + + v1alpha.EventSegmentExclusion = (function() { + + /** + * Properties of an EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentExclusion + * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria + */ + + /** + * Constructs a new EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentExclusion. + * @implements IEventSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + */ + function EventSegmentExclusion(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]]; + } + + /** + * EventSegmentExclusion eventExclusionDuration. + * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionDuration = 0; + + /** + * EventSegmentExclusion eventExclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionCriteria = null; + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance + */ + EventSegmentExclusion.create = function create(properties) { + return new EventSegmentExclusion(properties); + }; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); + if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventExclusionDuration = reader.int32(); + break; + } + case 2: { + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + switch (message.eventExclusionDuration) { + default: + return "eventExclusionDuration: enum value expected"; + case 0: + case 1: + break; + } + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); + if (error) + return "eventExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + */ + EventSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + switch (object.eventExclusionDuration) { + default: + if (typeof object.eventExclusionDuration === "number") { + message.eventExclusionDuration = object.eventExclusionDuration; + break; + } + break; + case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.eventExclusionDuration = 0; + break; + case "EVENT_EXCLUSION_PERMANENT": + case 1: + message.eventExclusionDuration = 1; + break; + } + if (object.eventExclusionCriteria != null) { + if (typeof object.eventExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.eventExclusionCriteria = null; + } + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) + object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); + return object; + }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + EventSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; + }; + + return EventSegmentExclusion; + })(); + + /** + * EventExclusionDuration enum. + * @name google.analytics.data.v1alpha.EventExclusionDuration + * @enum {number} + * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value + */ + v1alpha.EventExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; + return values; + })(); + + v1alpha.Segment = (function() { + + /** + * Properties of a Segment. + * @memberof google.analytics.data.v1alpha + * @interface ISegment + * @property {string|null} [name] Segment name + * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment + * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment + * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment + */ + + /** + * Constructs a new Segment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Segment. + * @implements ISegment + * @constructor + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + */ + function Segment(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]]; + } + + /** + * Segment name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.name = ""; + + /** + * Segment userSegment. + * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.userSegment = null; + + /** + * Segment sessionSegment. + * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.sessionSegment = null; + + /** + * Segment eventSegment. + * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.eventSegment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Segment oneSegmentScope. + * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "oneSegmentScope", { + get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Segment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Segment} Segment instance + */ + Segment.create = function create(properties) { + return new Segment(properties); + }; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.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.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) + $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) + $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) + $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Segment message. + * @function verify + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Segment.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.userSegment != null && message.hasOwnProperty("userSegment")) { + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); + if (error) + return "userSegment." + error; + } + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); + if (error) + return "sessionSegment." + error; + } + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); + if (error) + return "eventSegment." + error; + } + } + return null; + }; + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Segment} Segment + */ + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Segment) + return object; + var message = new $root.google.analytics.data.v1alpha.Segment(); + if (object.name != null) + message.name = String(object.name); + if (object.userSegment != null) { + if (typeof object.userSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); + } + if (object.sessionSegment != null) { + if (typeof object.sessionSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); + } + if (object.eventSegment != null) { + if (typeof object.eventSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); + } + return message; + }; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.Segment} message Segment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Segment.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 (message.userSegment != null && message.hasOwnProperty("userSegment")) { + object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); + if (options.oneofs) + object.oneSegmentScope = "userSegment"; + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); + if (options.oneofs) + object.oneSegmentScope = "sessionSegment"; + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); + if (options.oneofs) + object.oneSegmentScope = "eventSegment"; + } + return object; + }; + + /** + * Converts this Segment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Segment + * @instance + * @returns {Object.} JSON object + */ + Segment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Segment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; + }; + + return Segment; + })(); + + v1alpha.SegmentFilterExpression = (function() { + + /** + * Properties of a SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter + * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter + */ + + /** + * Constructs a new SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpression. + * @implements ISegmentFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + */ + function SegmentFilterExpression(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]]; + } + + /** + * SegmentFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.andGroup = null; + + /** + * SegmentFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.orGroup = null; + + /** + * SegmentFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.notExpression = null; + + /** + * SegmentFilterExpression segmentFilter. + * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentFilter = null; + + /** + * SegmentFilterExpression segmentEventFilter. + * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + Object.defineProperty(SegmentFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance + */ + SegmentFilterExpression.create = function create(properties) { + return new SegmentFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) + $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) + $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); + if (error) + return "segmentFilter." + error; + } + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); + if (error) + return "segmentEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + */ + SegmentFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); + } + if (object.segmentFilter != null) { + if (typeof object.segmentFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); + } + if (object.segmentEventFilter != null) { + if (typeof object.segmentEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); + if (options.oneofs) + object.expr = "segmentFilter"; + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); + if (options.oneofs) + object.expr = "segmentEventFilter"; + } + return object; + }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; + }; + + return SegmentFilterExpression; + })(); + + v1alpha.SegmentFilterExpressionList = (function() { + + /** + * Properties of a SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpressionList + * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpressionList. + * @implements ISegmentFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + */ + function SegmentFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * SegmentFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + */ + SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance + */ + SegmentFilterExpressionList.create = function create(properties) { + return new SegmentFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + */ + SegmentFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; + }; + + return SegmentFilterExpressionList; + })(); + + v1alpha.SegmentFilter = (function() { + + /** + * Properties of a SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilter + * @property {string|null} [fieldName] SegmentFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping + */ + + /** + * Constructs a new SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilter. + * @implements ISegmentFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + */ + function SegmentFilter(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]]; + } + + /** + * SegmentFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.fieldName = ""; + + /** + * SegmentFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.stringFilter = null; + + /** + * SegmentFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.inListFilter = null; + + /** + * SegmentFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.numericFilter = null; + + /** + * SegmentFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.betweenFilter = null; + + /** + * SegmentFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + Object.defineProperty(SegmentFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance + */ + SegmentFilter.create = function create(properties) { + return new SegmentFilter(properties); + }; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + */ + SegmentFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.filterScoping = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; + }; + + return SegmentFilter; + })(); + + v1alpha.SegmentFilterScoping = (function() { + + /** + * Properties of a SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterScoping + * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime + */ + + /** + * Constructs a new SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterScoping. + * @implements ISegmentFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + */ + function SegmentFilterScoping(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]]; + } + + /** + * SegmentFilterScoping atAnyPointInTime. + * @member {boolean|null|undefined} atAnyPointInTime + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + */ + SegmentFilterScoping.prototype.atAnyPointInTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { + get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance + */ + SegmentFilterScoping.create = function create(properties) { + return new SegmentFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); + return writer; + }; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.atAnyPointInTime = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + properties._atAnyPointInTime = 1; + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + } + return null; + }; + + /** + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + */ + SegmentFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + return message; + }; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + object.atAnyPointInTime = message.atAnyPointInTime; + if (options.oneofs) + object._atAnyPointInTime = "atAnyPointInTime"; + } + return object; + }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; + }; + + return SegmentFilterScoping; + })(); + + v1alpha.SegmentEventFilter = (function() { + + /** + * Properties of a SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentEventFilter + * @property {string|null} [eventName] SegmentEventFilter eventName + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression + */ + + /** + * Constructs a new SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentEventFilter. + * @implements ISegmentEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + */ + function SegmentEventFilter(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]]; + } + + /** + * SegmentEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.eventName = null; + + /** + * SegmentEventFilter segmentParameterFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.segmentParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance + */ + SegmentEventFilter.create = function create(properties) { + return new SegmentEventFilter(properties); + }; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + properties._segmentParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); + if (error) + return "segmentParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + */ + SegmentEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.segmentParameterFilterExpression != null) { + if (typeof object.segmentParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); + if (options.oneofs) + object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this SegmentEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; + }; + + return SegmentEventFilter; + })(); + + v1alpha.SegmentParameterFilterExpression = (function() { + + /** + * Properties of a SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter + */ + + /** + * Constructs a new SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpression. + * @implements ISegmentParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + */ + function SegmentParameterFilterExpression(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]]; + } + + /** + * SegmentParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.andGroup = null; + + /** + * SegmentParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.orGroup = null; + + /** + * SegmentParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.notExpression = null; + + /** + * SegmentParameterFilterExpression segmentParameterFilter. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance + */ + SegmentParameterFilterExpression.create = function create(properties) { + return new SegmentParameterFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) + $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); + if (error) + return "segmentParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + */ + SegmentParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); + } + if (object.segmentParameterFilter != null) { + if (typeof object.segmentParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); + if (options.oneofs) + object.expr = "segmentParameterFilter"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; + }; + + return SegmentParameterFilterExpression; + })(); + + v1alpha.SegmentParameterFilterExpressionList = (function() { + + /** + * Properties of a SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpressionList + * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpressionList. + * @implements ISegmentParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + */ + function SegmentParameterFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * SegmentParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + */ + SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance + */ + SegmentParameterFilterExpressionList.create = function create(properties) { + return new SegmentParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + */ + SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; + }; + + return SegmentParameterFilterExpressionList; + })(); + + v1alpha.SegmentParameterFilter = (function() { + + /** + * Properties of a SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilter + * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName + * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping + */ + + /** + * Constructs a new SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilter. + * @implements ISegmentParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + */ + function SegmentParameterFilter(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]]; + } + + /** + * SegmentParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.eventParameterName = null; + + /** + * SegmentParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.itemParameterName = null; + + /** + * SegmentParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.stringFilter = null; + + /** + * SegmentParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.inListFilter = null; + + /** + * SegmentParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.numericFilter = null; + + /** + * SegmentParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.betweenFilter = null; + + /** + * SegmentParameterFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SegmentParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance + */ + SegmentParameterFilter.create = function create(properties) { + return new SegmentParameterFilter(properties); + }; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + */ + SegmentParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filterScoping = null; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; + }; + + return SegmentParameterFilter; + })(); + + v1alpha.SegmentParameterFilterScoping = (function() { + + /** + * Properties of a SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterScoping + * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod + */ + + /** + * Constructs a new SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterScoping. + * @implements ISegmentParameterFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + */ + function SegmentParameterFilterScoping(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]]; + } + + /** + * SegmentParameterFilterScoping inAnyNDayPeriod. + * @member {number|Long|null|undefined} inAnyNDayPeriod + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + */ + SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { + get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance + */ + SegmentParameterFilterScoping.create = function create(properties) { + return new SegmentParameterFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inAnyNDayPeriod = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + properties._inAnyNDayPeriod = 1; + if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) + return "inAnyNDayPeriod: integer|Long expected"; + } + return null; + }; + + /** + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + */ + SegmentParameterFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + if (object.inAnyNDayPeriod != null) + if ($util.Long) + (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; + else if (typeof object.inAnyNDayPeriod === "string") + message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); + else if (typeof object.inAnyNDayPeriod === "number") + message.inAnyNDayPeriod = object.inAnyNDayPeriod; + else if (typeof object.inAnyNDayPeriod === "object") + message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + if (typeof message.inAnyNDayPeriod === "number") + object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; + else + object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; + if (options.oneofs) + object._inAnyNDayPeriod = "inAnyNDayPeriod"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; + }; + + return SegmentParameterFilterScoping; + })(); + + v1alpha.FunnelFilterExpression = (function() { + + /** + * Properties of a FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter + * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter + */ + + /** + * Constructs a new FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpression. + * @implements IFunnelFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + */ + function FunnelFilterExpression(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]]; + } + + /** + * FunnelFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.andGroup = null; + + /** + * FunnelFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.orGroup = null; + + /** + * FunnelFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.notExpression = null; + + /** + * FunnelFilterExpression funnelFieldFilter. + * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelFieldFilter = null; + + /** + * FunnelFilterExpression funnelEventFilter. + * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + Object.defineProperty(FunnelFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance + */ + FunnelFilterExpression.create = function create(properties) { + return new FunnelFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) + $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) + $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); + if (error) + return "funnelFieldFilter." + error; + } + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); + if (error) + return "funnelEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + */ + FunnelFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); + } + if (object.funnelFieldFilter != null) { + if (typeof object.funnelFieldFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); + } + if (object.funnelEventFilter != null) { + if (typeof object.funnelEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); + if (options.oneofs) + object.expr = "funnelFieldFilter"; + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); + if (options.oneofs) + object.expr = "funnelEventFilter"; + } + return object; + }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; + }; + + return FunnelFilterExpression; + })(); + + v1alpha.FunnelFilterExpressionList = (function() { + + /** + * Properties of a FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpressionList + * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpressionList. + * @implements IFunnelFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + */ + function FunnelFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FunnelFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + */ + FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance + */ + FunnelFilterExpressionList.create = function create(properties) { + return new FunnelFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + */ + FunnelFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; + }; + + return FunnelFilterExpressionList; + })(); + + v1alpha.FunnelFieldFilter = (function() { + + /** + * Properties of a FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFieldFilter + * @property {string|null} [fieldName] FunnelFieldFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter + */ + + /** + * Constructs a new FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFieldFilter. + * @implements IFunnelFieldFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + */ + function FunnelFieldFilter(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]]; + } + + /** + * FunnelFieldFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.fieldName = ""; + + /** + * FunnelFieldFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.stringFilter = null; + + /** + * FunnelFieldFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.inListFilter = null; + + /** + * FunnelFieldFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.numericFilter = null; + + /** + * FunnelFieldFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFieldFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance + */ + FunnelFieldFilter.create = function create(properties) { + return new FunnelFieldFilter(properties); + }; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFieldFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFieldFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + */ + FunnelFieldFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFieldFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelFieldFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFieldFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; + }; + + return FunnelFieldFilter; + })(); + + v1alpha.FunnelEventFilter = (function() { + + /** + * Properties of a FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelEventFilter + * @property {string|null} [eventName] FunnelEventFilter eventName + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression + */ + + /** + * Constructs a new FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelEventFilter. + * @implements IFunnelEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + */ + function FunnelEventFilter(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]]; + } + + /** + * FunnelEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.eventName = null; + + /** + * FunnelEventFilter funnelParameterFilterExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.funnelParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance + */ + FunnelEventFilter.create = function create(properties) { + return new FunnelEventFilter(properties); + }; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + properties._funnelParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); + if (error) + return "funnelParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + */ + FunnelEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.funnelParameterFilterExpression != null) { + if (typeof object.funnelParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); + if (options.oneofs) + object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this FunnelEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; + }; + + return FunnelEventFilter; + })(); + + v1alpha.FunnelParameterFilterExpression = (function() { + + /** + * Properties of a FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter + */ + + /** + * Constructs a new FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpression. + * @implements IFunnelParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + */ + function FunnelParameterFilterExpression(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]]; + } + + /** + * FunnelParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.andGroup = null; + + /** + * FunnelParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.orGroup = null; + + /** + * FunnelParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.notExpression = null; + + /** + * FunnelParameterFilterExpression funnelParameterFilter. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance + */ + FunnelParameterFilterExpression.create = function create(properties) { + return new FunnelParameterFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) + $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); + if (error) + return "funnelParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + */ + FunnelParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); + } + if (object.funnelParameterFilter != null) { + if (typeof object.funnelParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); + if (options.oneofs) + object.expr = "funnelParameterFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; + }; + + return FunnelParameterFilterExpression; + })(); + + v1alpha.FunnelParameterFilterExpressionList = (function() { + + /** + * Properties of a FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpressionList + * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpressionList. + * @implements IFunnelParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + */ + function FunnelParameterFilterExpressionList(properties) { + this.expressions = []; + 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]]; + } + + /** + * FunnelParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + */ + FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance + */ + FunnelParameterFilterExpressionList.create = function create(properties) { + return new FunnelParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + */ + FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; + }; + + return FunnelParameterFilterExpressionList; + })(); + + v1alpha.FunnelParameterFilter = (function() { + + /** + * Properties of a FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilter + * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName + * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter + */ + + /** + * Constructs a new FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilter. + * @implements IFunnelParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + */ + function FunnelParameterFilter(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]]; + } + + /** + * FunnelParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.eventParameterName = null; + + /** + * FunnelParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.itemParameterName = null; + + /** + * FunnelParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.stringFilter = null; + + /** + * FunnelParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.inListFilter = null; + + /** + * FunnelParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.numericFilter = null; + + /** + * FunnelParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FunnelParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance + */ + FunnelParameterFilter.create = function create(properties) { + return new FunnelParameterFilter(properties); + }; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + */ + FunnelParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; + }; + + return FunnelParameterFilter; + })(); + + v1alpha.FunnelResponseMetadata = (function() { + + /** + * Properties of a FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelResponseMetadata + * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas + */ + + /** + * Constructs a new FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelResponseMetadata. + * @implements IFunnelResponseMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + */ + function FunnelResponseMetadata(properties) { + this.samplingMetadatas = []; + 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]]; + } + + /** + * FunnelResponseMetadata samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + */ + FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance + */ + FunnelResponseMetadata.create = function create(properties) { + return new FunnelResponseMetadata(properties); + }; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelResponseMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelResponseMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + */ + FunnelResponseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelResponseMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + * @returns {Object.} JSON object + */ + FunnelResponseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; + }; + + return FunnelResponseMetadata; + })(); + + v1alpha.SamplingMetadata = (function() { + + /** + * Properties of a SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + */ + + /** + * Constructs a new SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + */ + function SamplingMetadata(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]]; + } + + /** + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance + */ + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); + }; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + return writer; + }; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.samplesReadCount = reader.int64(); + break; + } + case 2: { + message.samplingSpaceSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SamplingMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SamplingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; + return null; + }; + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + */ + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SamplingMetadata.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.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; + } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + return object; + }; + + /** + * Converts this SamplingMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + * @returns {Object.} JSON object + */ + SamplingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1alpha.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1alpha.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1alpha.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1alpha.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1alpha.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1alpha.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + /** + * SamplingLevel enum. + * @name google.analytics.data.v1alpha.SamplingLevel + * @enum {number} + * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} UNSAMPLED=3 UNSAMPLED value + */ + v1alpha.SamplingLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "UNSAMPLED"] = 3; + return values; + })(); + + return v1alpha; + })(); + + return data; + })(); + + return analytics; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + 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 + * @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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + return api; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * 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); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * 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); + }; + + /** + * 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 + */ + + /** + * 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" }); + + /** + * 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * 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) + }); + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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.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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(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]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @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 + */ + GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @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"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + 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]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @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.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @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 + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + 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 ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(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]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @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 + */ + CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + 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]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @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 + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * 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 WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(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]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * 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.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.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 WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @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.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @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 + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + 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 WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(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]]; + } + + /** + * 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.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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 OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @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.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @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 + */ + 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + 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 OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * 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 Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + 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]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * 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.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @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.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @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 + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + 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 Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + 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 Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.json new file mode 100644 index 000000000000..7b80b827f2ea --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/protos/protos.json @@ -0,0 +1,4982 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "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": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "analytics": { + "nested": { + "data": { + "nested": { + "v1alpha": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data", + "java_multiple_files": true, + "java_outer_classname": "ReportingApiProto", + "java_package": "com.google.analytics.data.v1alpha", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource_definition).pattern": "properties/{property}" + }, + "nested": { + "AlphaAnalyticsData": { + "options": { + "(google.api.default_host)": "analyticsdata.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/spreadsheets" + }, + "methods": { + "RunFunnelReport": { + "requestType": "RunFunnelReportRequest", + "responseType": "RunFunnelReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:runFunnelReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:runFunnelReport", + "body": "*" + } + } + ] + }, + "CreateAudienceList": { + "requestType": "CreateAudienceListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.http).body": "audience_list", + "(google.api.method_signature)": "parent,audience_list", + "(google.longrunning.operation_info).response_type": "AudienceList", + "(google.longrunning.operation_info).metadata_type": "AudienceListMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/audienceLists", + "body": "audience_list" + } + }, + { + "(google.api.method_signature)": "parent,audience_list" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AudienceList", + "metadata_type": "AudienceListMetadata" + } + } + ] + }, + "QueryAudienceList": { + "requestType": "QueryAudienceListRequest", + "responseType": "QueryAudienceListResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SheetExportAudienceList": { + "requestType": "SheetExportAudienceListRequest", + "responseType": "SheetExportAudienceListResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudienceList": { + "requestType": "GetAudienceListRequest", + "responseType": "AudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/audienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/audienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudienceLists": { + "requestType": "ListAudienceListsRequest", + "responseType": "ListAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/audienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateRecurringAudienceList": { + "requestType": "CreateRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.http).body": "recurring_audience_list", + "(google.api.method_signature)": "parent,recurring_audience_list" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "body": "recurring_audience_list" + } + }, + { + "(google.api.method_signature)": "parent,recurring_audience_list" + } + ] + }, + "GetRecurringAudienceList": { + "requestType": "GetRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListRecurringAudienceLists": { + "requestType": "ListRecurringAudienceListsRequest", + "responseType": "ListRecurringAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/recurringAudienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPropertyQuotasSnapshot": { + "requestType": "GetPropertyQuotasSnapshotRequest", + "responseType": "PropertyQuotasSnapshot", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReportTask": { + "requestType": "CreateReportTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.http).body": "report_task", + "(google.api.method_signature)": "parent,report_task", + "(google.longrunning.operation_info).response_type": "ReportTask", + "(google.longrunning.operation_info).metadata_type": "ReportTaskMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/reportTasks", + "body": "report_task" + } + }, + { + "(google.api.method_signature)": "parent,report_task" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ReportTask", + "metadata_type": "ReportTaskMetadata" + } + } + ] + }, + "QueryReportTask": { + "requestType": "QueryReportTaskRequest", + "responseType": "QueryReportTaskResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetReportTask": { + "requestType": "GetReportTaskRequest", + "responseType": "ReportTask", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/reportTasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/reportTasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReportTasks": { + "requestType": "ListReportTasksRequest", + "responseType": "ListReportTasksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/reportTasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateRecurringAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "recurringAudienceList": { + "type": "RecurringAudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RecurringAudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/RecurringAudienceList", + "(google.api.resource).pattern": "properties/{property}/recurringAudienceLists/{recurring_audience_list}", + "(google.api.resource).plural": "recurringAudienceLists", + "(google.api.resource).singular": "recurringAudienceList" + }, + "oneofs": { + "_activeDaysRemaining": { + "oneof": [ + "activeDaysRemaining" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDaysRemaining": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "audienceLists": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "WebhookNotification": { + "oneofs": { + "_uri": { + "oneof": [ + "uri" + ] + }, + "_channelToken": { + "oneof": [ + "channelToken" + ] + } + }, + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "channelToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "GetRecurringAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + } + } + }, + "ListRecurringAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRecurringAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "recurringAudienceLists": { + "rule": "repeated", + "type": "RecurringAudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "GetPropertyQuotasSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + } + } + }, + "PropertyQuotasSnapshot": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot", + "(google.api.resource).pattern": "properties/{property}/propertyQuotasSnapshot", + "(google.api.resource).plural": "propertyQuotasSnapshots", + "(google.api.resource).singular": "propertyQuotasSnapshot" + }, + "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "corePropertyQuota": { + "type": "PropertyQuota", + "id": 1 + }, + "realtimePropertyQuota": { + "type": "PropertyQuota", + "id": 2 + }, + "funnelPropertyQuota": { + "type": "PropertyQuota", + "id": 3 + } + } + }, + "GetAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" + } + } + } + }, + "ListAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "audienceLists": { + "rule": "repeated", + "type": "AudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "audienceList": { + "type": "AudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceList", + "(google.api.resource).pattern": "properties/{property}/audienceLists/{audience_list}", + "(google.api.resource).plural": "audienceLists", + "(google.api.resource).singular": "audienceList" + }, + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_percentageCompleted": { + "oneof": [ + "percentageCompleted" + ] + }, + "_recurringAudienceList": { + "oneof": [ + "recurringAudienceList" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowCount": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "percentageCompleted": { + "type": "double", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recurringAudienceList": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + }, + "AudienceListMetadata": { + "fields": {} + }, + "QueryAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryAudienceListResponse": { + "oneofs": { + "_audienceList": { + "oneof": [ + "audienceList" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + } + }, + "fields": { + "audienceList": { + "type": "AudienceList", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceRows": { + "rule": "repeated", + "type": "AudienceRow", + "id": 2 + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "SheetExportAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SheetExportAudienceListResponse": { + "oneofs": { + "_spreadsheetUri": { + "oneof": [ + "spreadsheetUri" + ] + }, + "_spreadsheetId": { + "oneof": [ + "spreadsheetId" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_audienceList": { + "oneof": [ + "audienceList" + ] + } + }, + "fields": { + "spreadsheetUri": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "spreadsheetId": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "audienceList": { + "type": "AudienceList", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "AudienceRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AudienceDimensionValue", + "id": 1 + } + } + }, + "AudienceDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceDimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "RunFunnelReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnel": { + "type": "Funnel", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelBreakdown": { + "type": "FunnelBreakdown", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelNextAction": { + "type": "FunnelNextAction", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelVisualizationType": { + "type": "FunnelVisualizationType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "segments": { + "rule": "repeated", + "type": "Segment", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnPropertyQuota": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "FunnelVisualizationType": { + "values": { + "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": 0, + "STANDARD_FUNNEL": 1, + "TRENDED_FUNNEL": 2 + } + } + } + }, + "RunFunnelReportResponse": { + "fields": { + "funnelTable": { + "type": "FunnelSubReport", + "id": 1 + }, + "funnelVisualization": { + "type": "FunnelSubReport", + "id": 2 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 3 + }, + "kind": { + "type": "string", + "id": 4 + } + } + }, + "ReportTask": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/ReportTask", + "(google.api.resource).pattern": "properties/{property}/reportTasks/{report_task}", + "(google.api.resource).plural": "reportTasks", + "(google.api.resource).singular": "reportTask" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportDefinition": { + "type": "ReportDefinition", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reportMetadata": { + "type": "ReportMetadata", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ReportDefinition": { + "oneofs": { + "_samplingLevel": { + "oneof": [ + "samplingLevel" + ] + } + }, + "fields": { + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "keepEmptyRows": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "samplingLevel": { + "type": "SamplingLevel", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ReportMetadata": { + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_taskRowCount": { + "oneof": [ + "taskRowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_totalRowCount": { + "oneof": [ + "totalRowCount" + ] + } + }, + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "taskRowCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "totalRowCount": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + } + } + }, + "CreateReportTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "reportTask": { + "type": "ReportTask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReportTaskMetadata": { + "fields": {} + }, + "QueryReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryReportTaskResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + } + } + }, + "GetReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/ReportTask" + } + } + } + }, + "ListReportTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReportTasksResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "reportTasks": { + "rule": "repeated", + "type": "ReportTask", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "Dimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimensionExpression": { + "type": "DimensionExpression", + "id": 2 + } + } + }, + "DimensionExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "lowerCase", + "upperCase", + "concatenate" + ] + } + }, + "fields": { + "lowerCase": { + "type": "CaseExpression", + "id": 4 + }, + "upperCase": { + "type": "CaseExpression", + "id": 5 + }, + "concatenate": { + "type": "ConcatenateExpression", + "id": 6 + } + }, + "nested": { + "CaseExpression": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "ConcatenateExpression": { + "fields": { + "dimensionNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Metric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expression": { + "type": "string", + "id": 2 + }, + "invisible": { + "type": "bool", + "id": 3 + } + } + }, + "FilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FilterExpression", + "id": 3 + }, + "filter": { + "type": "Filter", + "id": 4 + } + } + }, + "FilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FilterExpression", + "id": 1 + } + } + }, + "Filter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter", + "emptyFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 5 + }, + "emptyFilter": { + "type": "EmptyFilter", + "id": 6 + } + } + }, + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "OrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "desc": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "EmptyFilter": { + "fields": {} + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "CohortSpec": { + "fields": { + "cohorts": { + "rule": "repeated", + "type": "Cohort", + "id": 1 + }, + "cohortsRange": { + "type": "CohortsRange", + "id": 2 + }, + "cohortReportSettings": { + "type": "CohortReportSettings", + "id": 3 + } + } + }, + "Cohort": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimension": { + "type": "string", + "id": 2 + }, + "dateRange": { + "type": "DateRange", + "id": 3 + } + } + }, + "CohortsRange": { + "fields": { + "granularity": { + "type": "Granularity", + "id": 1 + }, + "startOffset": { + "type": "int32", + "id": 2 + }, + "endOffset": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Granularity": { + "values": { + "GRANULARITY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2, + "MONTHLY": 3 + } + } + } + }, + "CohortReportSettings": { + "fields": { + "accumulate": { + "type": "bool", + "id": 1 + } + } + }, + "ResponseMetaData": { + "oneofs": { + "_schemaRestrictionResponse": { + "oneof": [ + "schemaRestrictionResponse" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_timeZone": { + "oneof": [ + "timeZone" + ] + }, + "_emptyReason": { + "oneof": [ + "emptyReason" + ] + }, + "_subjectToThresholding": { + "oneof": [ + "subjectToThresholding" + ] + } + }, + "fields": { + "dataLossFromOtherRow": { + "type": "bool", + "id": 3 + }, + "schemaRestrictionResponse": { + "type": "SchemaRestrictionResponse", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "timeZone": { + "type": "string", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "emptyReason": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "subjectToThresholding": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 9 + } + }, + "nested": { + "SchemaRestrictionResponse": { + "fields": { + "activeMetricRestrictions": { + "rule": "repeated", + "type": "ActiveMetricRestriction", + "id": 1 + } + }, + "nested": { + "ActiveMetricRestriction": { + "oneofs": { + "_metricName": { + "oneof": [ + "metricName" + ] + } + }, + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "restrictedMetricTypes": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 2 + } + } + } + } + } + } + }, + "DimensionHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MetricType", + "id": 2 + } + } + }, + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "MetricValue", + "id": 2 + } + } + }, + "DimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "MetricValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 4 + } + } + }, + "PropertyQuota": { + "fields": { + "tokensPerDay": { + "type": "QuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "QuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "QuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "QuotaStatus", + "id": 4 + }, + "potentiallyThresholdedRequestsPerHour": { + "type": "QuotaStatus", + "id": 5 + }, + "tokensPerProjectPerHour": { + "type": "QuotaStatus", + "id": 6 + } + } + }, + "QuotaStatus": { + "fields": { + "consumed": { + "type": "int32", + "id": 1 + }, + "remaining": { + "type": "int32", + "id": 2 + } + } + }, + "FunnelBreakdown": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "breakdownDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelNextAction": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "nextActionDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "Funnel": { + "fields": { + "isOpenFunnel": { + "type": "bool", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "FunnelStep", + "id": 2 + } + } + }, + "FunnelStep": { + "oneofs": { + "_withinDurationFromPriorStep": { + "oneof": [ + "withinDurationFromPriorStep" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "isDirectlyFollowedBy": { + "type": "bool", + "id": 2 + }, + "withinDurationFromPriorStep": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "filterExpression": { + "type": "FunnelFilterExpression", + "id": 4 + } + } + }, + "FunnelSubReport": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "metadata": { + "type": "FunnelResponseMetadata", + "id": 4 + } + } + }, + "UserSegment": { + "fields": { + "userInclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "UserSegmentExclusion", + "id": 2 + } + } + }, + "UserSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "UserSegmentConditionGroup", + "id": 1 + }, + "andSequenceGroups": { + "rule": "repeated", + "type": "UserSegmentSequenceGroup", + "id": 2 + } + } + }, + "UserCriteriaScoping": { + "values": { + "USER_CRITERIA_SCOPING_UNSPECIFIED": 0, + "USER_CRITERIA_WITHIN_SAME_EVENT": 1, + "USER_CRITERIA_WITHIN_SAME_SESSION": 2, + "USER_CRITERIA_ACROSS_ALL_SESSIONS": 3 + } + }, + "UserSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "UserSegmentSequenceGroup": { + "fields": { + "sequenceScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "sequenceMaximumDuration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "userSequenceSteps": { + "rule": "repeated", + "type": "UserSequenceStep", + "id": 3 + } + } + }, + "UserSequenceStep": { + "fields": { + "isDirectlyFollowedBy": { + "type": "bool", + "id": 1 + }, + "stepScoping": { + "type": "UserCriteriaScoping", + "id": 2 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 3 + } + } + }, + "UserSegmentExclusion": { + "fields": { + "userExclusionDuration": { + "type": "UserExclusionDuration", + "id": 1 + }, + "userExclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 2 + } + } + }, + "UserExclusionDuration": { + "values": { + "USER_EXCLUSION_DURATION_UNSPECIFIED": 0, + "USER_EXCLUSION_TEMPORARY": 1, + "USER_EXCLUSION_PERMANENT": 2 + } + }, + "SessionSegment": { + "fields": { + "sessionInclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "SessionSegmentExclusion", + "id": 2 + } + } + }, + "SessionSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "SessionSegmentConditionGroup", + "id": 1 + } + } + }, + "SessionCriteriaScoping": { + "values": { + "SESSION_CRITERIA_SCOPING_UNSPECIFIED": 0, + "SESSION_CRITERIA_WITHIN_SAME_EVENT": 1, + "SESSION_CRITERIA_WITHIN_SAME_SESSION": 2 + } + }, + "SessionSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "SessionCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "SessionSegmentExclusion": { + "fields": { + "sessionExclusionDuration": { + "type": "SessionExclusionDuration", + "id": 1 + }, + "sessionExclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 2 + } + } + }, + "SessionExclusionDuration": { + "values": { + "SESSION_EXCLUSION_DURATION_UNSPECIFIED": 0, + "SESSION_EXCLUSION_TEMPORARY": 1, + "SESSION_EXCLUSION_PERMANENT": 2 + } + }, + "EventSegment": { + "fields": { + "eventInclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "EventSegmentExclusion", + "id": 2 + } + } + }, + "EventSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "EventSegmentConditionGroup", + "id": 1 + } + } + }, + "EventCriteriaScoping": { + "values": { + "EVENT_CRITERIA_SCOPING_UNSPECIFIED": 0, + "EVENT_CRITERIA_WITHIN_SAME_EVENT": 1 + } + }, + "EventSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "EventCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "EventSegmentExclusion": { + "fields": { + "eventExclusionDuration": { + "type": "EventExclusionDuration", + "id": 1 + }, + "eventExclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 2 + } + } + }, + "EventExclusionDuration": { + "values": { + "EVENT_EXCLUSION_DURATION_UNSPECIFIED": 0, + "EVENT_EXCLUSION_PERMANENT": 1 + } + }, + "Segment": { + "oneofs": { + "oneSegmentScope": { + "oneof": [ + "userSegment", + "sessionSegment", + "eventSegment" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "userSegment": { + "type": "UserSegment", + "id": 2 + }, + "sessionSegment": { + "type": "SessionSegment", + "id": 3 + }, + "eventSegment": { + "type": "EventSegment", + "id": 4 + } + } + }, + "SegmentFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentFilter", + "segmentEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentFilterExpression", + "id": 3 + }, + "segmentFilter": { + "type": "SegmentFilter", + "id": 4 + }, + "segmentEventFilter": { + "type": "SegmentEventFilter", + "id": 5 + } + } + }, + "SegmentFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentFilterExpression", + "id": 1 + } + } + }, + "SegmentFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentFilterScoping", + "id": 8 + } + } + }, + "SegmentFilterScoping": { + "oneofs": { + "_atAnyPointInTime": { + "oneof": [ + "atAnyPointInTime" + ] + } + }, + "fields": { + "atAnyPointInTime": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_segmentParameterFilterExpression": { + "oneof": [ + "segmentParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "segmentParameterFilterExpression": { + "type": "SegmentParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentParameterFilterExpression", + "id": 3 + }, + "segmentParameterFilter": { + "type": "SegmentParameterFilter", + "id": 4 + } + } + }, + "SegmentParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentParameterFilterExpression", + "id": 1 + } + } + }, + "SegmentParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentParameterFilterScoping", + "id": 8 + } + } + }, + "SegmentParameterFilterScoping": { + "oneofs": { + "_inAnyNDayPeriod": { + "oneof": [ + "inAnyNDayPeriod" + ] + } + }, + "fields": { + "inAnyNDayPeriod": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelFieldFilter", + "funnelEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelFilterExpression", + "id": 3 + }, + "funnelFieldFilter": { + "type": "FunnelFieldFilter", + "id": 4 + }, + "funnelEventFilter": { + "type": "FunnelEventFilter", + "id": 5 + } + } + }, + "FunnelFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelFilterExpression", + "id": 1 + } + } + }, + "FunnelFieldFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_funnelParameterFilterExpression": { + "oneof": [ + "funnelParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "funnelParameterFilterExpression": { + "type": "FunnelParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelParameterFilterExpression", + "id": 3 + }, + "funnelParameterFilter": { + "type": "FunnelParameterFilter", + "id": 4 + } + } + }, + "FunnelParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelParameterFilterExpression", + "id": 1 + } + } + }, + "FunnelParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelResponseMetadata": { + "fields": { + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 1 + } + } + }, + "SamplingMetadata": { + "fields": { + "samplesReadCount": { + "type": "int64", + "id": 1 + }, + "samplingSpaceSize": { + "type": "int64", + "id": 2 + } + } + }, + "MetricAggregation": { + "values": { + "METRIC_AGGREGATION_UNSPECIFIED": 0, + "TOTAL": 1, + "MINIMUM": 5, + "MAXIMUM": 6, + "COUNT": 4 + } + }, + "MetricType": { + "values": { + "METRIC_TYPE_UNSPECIFIED": 0, + "TYPE_INTEGER": 1, + "TYPE_FLOAT": 2, + "TYPE_SECONDS": 4, + "TYPE_MILLISECONDS": 5, + "TYPE_MINUTES": 6, + "TYPE_HOURS": 7, + "TYPE_STANDARD": 8, + "TYPE_CURRENCY": 9, + "TYPE_FEET": 10, + "TYPE_MILES": 11, + "TYPE_METERS": 12, + "TYPE_KILOMETERS": 13 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + }, + "SamplingLevel": { + "values": { + "SAMPLING_LEVEL_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "UNSAMPLED": 3 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js new file mode 100644 index 000000000000..31d9ca59a583 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, audienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience list to create. + */ + // const audienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateAudienceList() { + // Construct request + const request = { + parent, + audienceList, + }; + + // Run request + const [operation] = await dataClient.createAudienceList(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js new file mode 100644 index 000000000000..0614d1ff3721 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, recurringAudienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The recurring audience list to create. + */ + // const recurringAudienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateRecurringAudienceList() { + // Construct request + const request = { + parent, + recurringAudienceList, + }; + + // Run request + const response = await dataClient.createRecurringAudienceList(request); + console.log(response); + } + + callCreateRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js new file mode 100644 index 000000000000..9a708a76b384 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, reportTask) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + */ + // const parent = 'abc123' + /** + * Required. The report task configuration to create. + */ + // const reportTask = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateReportTask() { + // Construct request + const request = { + parent, + reportTask, + }; + + // Run request + const [operation] = await dataClient.createReportTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js new file mode 100644 index 000000000000..93071bc5252c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_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 audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceList(request); + console.log(response); + } + + callGetAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js new file mode 100644 index 000000000000..fb28a3e75de6 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_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. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetPropertyQuotasSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getPropertyQuotasSnapshot(request); + console.log(response); + } + + callGetPropertyQuotasSnapshot(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js new file mode 100644 index 000000000000..755d23763a3c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js @@ -0,0 +1,63 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_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 recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetRecurringAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getRecurringAudienceList(request); + console.log(response); + } + + callGetRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js new file mode 100644 index 000000000000..80ce2bdca388 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_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 report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getReportTask(request); + console.log(response); + } + + callGetReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js new file mode 100644 index 000000000000..70137ac512f4 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js @@ -0,0 +1,78 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_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. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js new file mode 100644 index 000000000000..325e8be6580c --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js @@ -0,0 +1,80 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_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. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListRecurringAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listRecurringAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRecurringAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js new file mode 100644 index 000000000000..3ad6cd8f9659 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js @@ -0,0 +1,73 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_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. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of report tasks to return. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListReportTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listReportTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportTasks(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js new file mode 100644 index 000000000000..e0938dd0d5ad --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_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 audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceList(request); + console.log(response); + } + + callQueryAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js new file mode 100644 index 000000000000..dd7d26e860ef --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js @@ -0,0 +1,88 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_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 report source name. + * Format: `properties/{property}/reportTasks/{report}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryReportTask(request); + console.log(response); + } + + callQueryReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js new file mode 100644 index 000000000000..c67db6639ddc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js @@ -0,0 +1,132 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_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. + */ + /** + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + */ + // const dateRanges = [1,2,3,4] + /** + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + */ + // const funnel = {} + /** + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + */ + // const funnelBreakdown = {} + /** + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + */ + // const funnelNextAction = {} + /** + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + */ + // const funnelVisualizationType = {} + /** + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * The segments parameter is optional. Requests are limited to 4 segments. + */ + // const segments = [1,2,3,4] + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + */ + // const limit = 1234 + /** + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see Creating a Report: Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callRunFunnelReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runFunnelReport(request); + console.log(response); + } + + callRunFunnelReport(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js new file mode 100644 index 000000000000..68fdc871ad1b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_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 audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-cloud/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callSheetExportAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.sheetExportAudienceList(request); + console.log(response); + } + + callSheetExportAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json new file mode 100644 index 000000000000..92dbb6896d17 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -0,0 +1,671 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async", + "title": "AlphaAnalyticsData runFunnelReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see [GA4 Funnel Explorations](https://support.google.com/analytics/answer/9327974). This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Data API Funnel Reporting Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).", + "canonical": true, + "file": "alpha_analytics_data.run_funnel_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 124, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "funnel", + "type": ".google.analytics.data.v1alpha.Funnel" + }, + { + "name": "funnel_breakdown", + "type": ".google.analytics.data.v1alpha.FunnelBreakdown" + }, + { + "name": "funnel_next_action", + "type": ".google.analytics.data.v1alpha.FunnelNextAction" + }, + { + "name": "funnel_visualization_type", + "type": ".google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType" + }, + { + "name": "segments", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.data.v1alpha.RunFunnelReportResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async", + "title": "AlphaAnalyticsData createAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience list for later retrieval. This method quickly returns the audience list's resource name and initiates a long running asynchronous request to form an audience list. To list the users in an audience list, first create the audience list through this method and then send the audience resource name to the `QueryAudienceList` method. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. An audience list is a snapshot of the users currently in the audience at the time of audience list creation. Creating audience lists for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience lists contain the users in each audience. This method is available at beta stability at [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_list", + "type": ".google.analytics.data.v1alpha.AudienceList" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async", + "title": "AlphaAnalyticsData queryAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience list of users. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to retrieve the users in the audience list. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is available at beta stability at [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.query_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryAudienceListResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async", + "title": "AlphaAnalyticsData sheetExportAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Exports an audience list of users to a Google Sheet. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to export those users in the audience list to a Google Sheet. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.sheet_export_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SheetExportAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.SheetExportAudienceListResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "SheetExportAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async", + "title": "AlphaAnalyticsData getAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience list. This method can be used to understand an audience list after it has been created. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.AudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async", + "title": "AlphaAnalyticsData listAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience lists for a property. This method can be used for you to find and reuse existing audience lists rather than creating unnecessary new audience lists. The same audience can have multiple audience lists that represent the list of users that were in an audience on different days. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async", + "title": "AlphaAnalyticsData createRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates a recurring audience list. Recurring audience lists produces new audience lists each day. Audience lists are users in an audience at the time of the list's creation. A recurring audience list ensures that you have audience list based on the most recent data available for use each day. If you manually create audience list, you don't know when an audience list based on an additional day's data is available. This recurring audience list automates the creation of an audience list when an additional day's data is available. You will consume fewer quota tokens by using recurring audience list versus manually creating audience list at various times of day trying to guess when an additional day's data is ready. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "recurring_audience_list", + "type": ".google.analytics.data.v1alpha.RecurringAudienceList" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async", + "title": "AlphaAnalyticsData getRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific recurring audience list. This method can be used to understand a recurring audience list's state after it has been created. For example, a recurring audience list resource will generate audience list instances for each day, and this method can be used to get the resource name of the most recent audience list instance. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async", + "title": "AlphaAnalyticsData listRecurringAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all recurring audience lists for a property. This method can be used for you to find and reuse existing recurring audience lists rather than creating unnecessary new recurring audience lists. The same audience can have multiple recurring audience lists that represent different dimension combinations; for example, just the dimension `deviceId` or both the dimensions `deviceId` and `userId`. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_recurring_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async", + "title": "AlphaAnalyticsData getPropertyQuotasSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Get all property quotas organized by quota category for a given property. This will charge 1 property quota from the category with the most quota.", + "canonical": true, + "file": "alpha_analytics_data.get_property_quotas_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.PropertyQuotasSnapshot", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async", + "title": "AlphaAnalyticsData createReportTask Sample", + "origin": "API_DEFINITION", + "description": " Initiates the creation of a report task. This method quickly returns a report task and initiates a long running asynchronous request to form a customized report of your Google Analytics event data. A report task will be retained and available for querying for 72 hours after it has been created. A report task created by one user can be listed and queried by all users who have access to the property.", + "canonical": true, + "file": "alpha_analytics_data.create_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "report_task", + "type": ".google.analytics.data.v1alpha.ReportTask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async", + "title": "AlphaAnalyticsData queryReportTask Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a report task's content. After requesting the `CreateReportTask`, you are able to retrieve the report content once the report is ACTIVE. This method will return an error if the report task's state is not `ACTIVE`. A query response will return the tabular row & column values of the report.", + "canonical": true, + "file": "alpha_analytics_data.query_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryReportTaskResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async", + "title": "AlphaAnalyticsData getReportTask Sample", + "origin": "API_DEFINITION", + "description": " Gets report metadata about a specific report task. After creating a report task, use this method to check its processing state or inspect its report definition.", + "canonical": true, + "file": "alpha_analytics_data.get_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ReportTask", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async", + "title": "AlphaAnalyticsData listReportTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists all report tasks for a property.", + "canonical": true, + "file": "alpha_analytics_data.list_report_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListReportTasksResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + } + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js new file mode 100644 index 000000000000..59e24ffc7bdc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js @@ -0,0 +1,72 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunPivotReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunPivotReports(request); + console.log(response); + } + + callBatchRunPivotReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js new file mode 100644 index 000000000000..0129024105dc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js @@ -0,0 +1,72 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunReports(request); + console.log(response); + } + + callBatchRunReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js new file mode 100644 index 000000000000..55addaeadc4e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js @@ -0,0 +1,90 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. To + * learn more, see where to find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + */ + // const metricFilter = {} + /** + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + */ + // const compatibilityFilter = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCheckCompatibility() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.checkCompatibility(request); + console.log(response); + } + + callCheckCompatibility(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js new file mode 100644 index 000000000000..ff8af7aa5a3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js @@ -0,0 +1,68 @@ +// Copyright 2025 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, audienceExport) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience export to create. + */ + // const audienceExport = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCreateAudienceExport() { + // Construct request + const request = { + parent, + audienceExport, + }; + + // Run request + const [operation] = await dataClient.createAudienceExport(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js new file mode 100644 index 000000000000..9e77a30f3e63 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_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 audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceExport(request); + console.log(response); + } + + callGetAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js new file mode 100644 index 000000000000..61d7b0bdca3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js @@ -0,0 +1,69 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_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 resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see where to find + * your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234/metadata + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetMetadata() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getMetadata(request); + console.log(response); + } + + callGetMetadata(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js new file mode 100644 index 000000000000..74c3ca4c1e8b --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js @@ -0,0 +1,78 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_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. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callListAudienceExports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceExportsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceExports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js new file mode 100644 index 000000000000..8025224680bc --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js @@ -0,0 +1,83 @@ +// Copyright 2025 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 analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_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 audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callQueryAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceExport(request); + console.log(response); + } + + callQueryAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js new file mode 100644 index 000000000000..83323ae80e93 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js @@ -0,0 +1,135 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + */ + // const metrics = [1,2,3,4] + /** + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + */ + // const pivots = [1,2,3,4] + /** + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunPivotReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runPivotReport(request); + console.log(response); + } + + callRunPivotReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js new file mode 100644 index 000000000000..0fc4305a2141 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js @@ -0,0 +1,115 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + */ + // const orderBys = [1,2,3,4] + /** + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + */ + // const minuteRanges = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunRealtimeReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runRealtimeReport(request); + console.log(response); + } + + callRunRealtimeReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js new file mode 100644 index 000000000000..991f0e32237a --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js @@ -0,0 +1,162 @@ +// Copyright 2025 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() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_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. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The row count of the start row. The first row is counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + */ + // const orderBys = [1,2,3,4] + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runReport(request); + console.log(response); + } + + callRunReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json new file mode 100644 index 000000000000..ba79913e3173 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json @@ -0,0 +1,639 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", + "title": "BetaAnalyticsData runReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).", + "canonical": true, + "file": "beta_analytics_data.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 154, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", + "title": "BetaAnalyticsData runPivotReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", + "canonical": true, + "file": "beta_analytics_data.run_pivot_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 127, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "pivots", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunPivotReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async", + "title": "BetaAnalyticsData batchRunReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async", + "title": "BetaAnalyticsData batchRunPivotReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_pivot_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunPivotReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", + "title": "BetaAnalyticsData getMetadata Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "canonical": true, + "file": "beta_analytics_data.get_metadata.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.Metadata", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", + "title": "BetaAnalyticsData runRealtimeReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).", + "canonical": true, + "file": "beta_analytics_data.run_realtime_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 107, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "minute_ranges", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunRealtimeReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", + "title": "BetaAnalyticsData checkCompatibility Sample", + "origin": "API_DEFINITION", + "description": " This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.", + "canonical": true, + "file": "beta_analytics_data.check_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "compatibility_filter", + "type": ".google.analytics.data.v1beta.Compatibility" + } + ], + "resultType": ".google.analytics.data.v1beta.CheckCompatibilityResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async", + "title": "BetaAnalyticsData createAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.create_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_export", + "type": ".google.analytics.data.v1beta.AudienceExport" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async", + "title": "BetaAnalyticsData queryAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.query_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1beta.QueryAudienceExportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async", + "title": "BetaAnalyticsData getAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.get_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.AudienceExport", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async", + "title": "BetaAnalyticsData listAudienceExports Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.list_audience_exports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.ListAudienceExportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + } + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/index.ts new file mode 100644 index 000000000000..c997dce80e3e --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2025 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. ** + +import * as v1alpha from './v1alpha'; +const AlphaAnalyticsDataClient = v1alpha.AlphaAnalyticsDataClient; +type AlphaAnalyticsDataClient = v1alpha.AlphaAnalyticsDataClient; +export {v1alpha, AlphaAnalyticsDataClient}; +export default {v1alpha, AlphaAnalyticsDataClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts new file mode 100644 index 000000000000..e2a88475a62d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts @@ -0,0 +1,2782 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/alpha_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './alpha_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1alpha + */ +export class AlphaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + alphaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AlphaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AlphaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AlphaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceLists/{audience_list}' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/propertyQuotasSnapshot' + ), + recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/recurringAudienceLists/{recurring_audience_list}' + ), + reportTaskPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/reportTasks/{report_task}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'), + listRecurringAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'), + listReportTasks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceListResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceList') as gax.protobuf.Type; + const createAudienceListMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceListMetadata') as gax.protobuf.Type; + const createReportTaskResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTask') as gax.protobuf.Type; + const createReportTaskMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTaskMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceListResponse.decode.bind(createAudienceListResponse), + createAudienceListMetadata.decode.bind(createAudienceListMetadata)), + createReportTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReportTaskResponse.decode.bind(createReportTaskResponse), + createReportTaskMetadata.decode.bind(createReportTaskMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.alphaAnalyticsDataStub) { + return this.alphaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1alpha.AlphaAnalyticsData. + this.alphaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1alpha.AlphaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1alpha.AlphaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const alphaAnalyticsDataStubMethods = + ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'sheetExportAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks']; + for (const methodName of alphaAnalyticsDataStubMethods) { + const callPromise = this.alphaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.alphaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly', + 'https://www.googleapis.com/auth/drive', + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/spreadsheets' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized funnel report of your Google Analytics event data. The + * data returned from the API is as a table with columns for the requested + * dimensions and metrics. + * + * Funnel exploration lets you visualize the steps your users take to complete + * a task and quickly see how well they are succeeding or failing at each + * step. For example, how do prospects become shoppers and then become buyers? + * How do one time buyers become repeat buyers? With this information, you can + * improve inefficient or abandoned customer journeys. To learn more, see [GA4 + * Funnel Explorations](https://support.google.com/analytics/answer/9327974). + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the [Google Analytics Data API Funnel + * Reporting + * Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.property] + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} [request.dateRanges] + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + * @param {google.analytics.data.v1alpha.Funnel} [request.funnel] + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + * @param {google.analytics.data.v1alpha.FunnelBreakdown} [request.funnelBreakdown] + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + * @param {google.analytics.data.v1alpha.FunnelNextAction} [request.funnelNextAction] + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} [request.funnelVisualizationType] + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + * @param {number[]} [request.segments] + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * + * The segments parameter is optional. Requests are limited to 4 segments. + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see [Creating a Report: Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {boolean} [request.returnPropertyQuota] + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @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 protos.google.analytics.data.v1alpha.RunFunnelReportResponse|RunFunnelReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async + */ + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined + ]>; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runFunnelReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runFunnelReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runFunnelReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runFunnelReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience list of users. After creating an audience, the users + * are not immediately available for listing. First, a request to + * `CreateAudienceList` is necessary to create an audience list of users, and + * then second, this method is used to retrieve the users in the audience + * list. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * This method is available at beta stability at + * [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.QueryAudienceListResponse|QueryAudienceListResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async + */ + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined + ]>; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|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().catch(err => {throw err}); + this._log.info('queryAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Exports an audience list of users to a Google Sheet. After creating an + * audience, the users are not immediately available for listing. First, a + * request to `CreateAudienceList` is necessary to create an audience list of + * users, and then second, this method is used to export those users in the + * audience list to a Google Sheet. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse|SheetExportAudienceListResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async + */ + sheetExportAudienceList( + request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, {}|undefined + ]>; + sheetExportAudienceList( + request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): void; + sheetExportAudienceList( + request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): void; + sheetExportAudienceList( + request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|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().catch(err => {throw err}); + this._log.info('sheetExportAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('sheetExportAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.sheetExportAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, + protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('sheetExportAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience list. This method + * can be used to understand an audience list after it has been created. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async + */ + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined + ]>; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|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().catch(err => {throw err}); + this._log.info('getAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a recurring audience list. Recurring audience lists produces new + * audience lists each day. Audience lists are users in an audience at the + * time of the list's creation. + * + * A recurring audience list ensures that you have audience list based on the + * most recent data available for use each day. If you manually create + * audience list, you don't know when an audience list based on an additional + * day's data is available. This recurring audience list automates the + * creation of an audience list when an additional day's data is available. + * You will consume fewer quota tokens by using recurring audience list versus + * manually creating audience list at various times of day trying to guess + * when an additional day's data is ready. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.RecurringAudienceList} request.recurringAudienceList + * Required. The recurring audience list to create. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async + */ + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined + ]>; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|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().catch(err => {throw err}); + this._log.info('createRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('createRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific recurring audience list. This + * method can be used to understand a recurring audience list's state after it + * has been created. For example, a recurring audience list resource will + * generate audience list instances for each day, and this method can be used + * to get the resource name of the most recent audience list instance. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async + */ + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined + ]>; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|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().catch(err => {throw err}); + this._log.info('getRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get all property quotas organized by quota category for a given property. + * This will charge 1 property quota from the category with the most quota. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + * @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 protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot|PropertyQuotasSnapshot}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async + */ + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined + ]>; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|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().catch(err => {throw err}); + this._log.info('getPropertyQuotasSnapshot request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPropertyQuotasSnapshot(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves a report task's content. After requesting the `CreateReportTask`, + * you are able to retrieve the report content once the report is + * ACTIVE. This method will return an error if the report task's state is not + * `ACTIVE`. A query response will return the tabular row & column values of + * the report. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report source name. + * Format: `properties/{property}/reportTasks/{report}` + * @param {number} [request.offset] + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1alpha.QueryReportTaskResponse|QueryReportTaskResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async + */ + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined + ]>; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|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().catch(err => {throw err}); + this._log.info('queryReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets report metadata about a specific report task. After creating a report + * task, use this method to check its processing state or inspect its + * report definition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async + */ + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined + ]>; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|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().catch(err => {throw err}); + this._log.info('getReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('getReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience list for later retrieval. This method quickly returns + * the audience list's resource name and initiates a long running asynchronous + * request to form an audience list. To list the users in an audience list, + * first create the audience list through this method and then send the + * audience resource name to the `QueryAudienceList` method. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * An audience list is a snapshot of the users currently in the audience at + * the time of audience list creation. Creating audience lists for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience lists contain + * the users in each audience. + * + * This method is available at beta stability at + * [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.AudienceList} request.audienceList + * Required. The audience list to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceList response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceList request %j', request); + return this.innerApiCalls.createAudienceList(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceList response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceList()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + async checkCreateAudienceListProgress(name: string): Promise>{ + this._log.info('createAudienceList long-running'); + 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.createAudienceList, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Initiates the creation of a report task. This method quickly + * returns a report task and initiates a long running + * asynchronous request to form a customized report of your Google Analytics + * event data. + * + * A report task will be retained and available for querying for 72 hours + * after it has been created. + * + * A report task created by one user can be listed and queried by all users + * who have access to the property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + * @param {google.analytics.data.v1alpha.ReportTask} request.reportTask + * Required. The report task configuration to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createReportTask response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createReportTask request %j', request); + return this.innerApiCalls.createReportTask(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createReportTask response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createReportTask()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + async checkCreateReportTaskProgress(name: string): Promise>{ + this._log.info('createReportTask long-running'); + 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.createReportTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience lists for a property. This method can be used for you to + * find and reuse existing audience lists rather than creating unnecessary new + * audience lists. The same audience can have multiple audience lists that + * represent the list of users that were in an audience on different days. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * 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 `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceLists request %j', request); + return this.innerApiCalls + .listAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]) => { + this._log.info('listAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 protos.google.analytics.data.v1alpha.AudienceList|AudienceList} 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 `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + 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['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists stream %j', request); + return this.descriptors.page.listAudienceLists.createStream( + this.innerApiCalls.listAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceLists`, 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. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async + */ + listAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + 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['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists iterate %j', request); + return this.descriptors.page.listAudienceLists.asyncIterate( + this.innerApiCalls['listAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all recurring audience lists for a property. This method can be used + * for you to find and reuse existing recurring audience lists rather than + * creating unnecessary new recurring audience lists. The same audience can + * have multiple recurring audience lists that represent different dimension + * combinations; for example, just the dimension `deviceId` or both the + * dimensions `deviceId` and `userId`. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * 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 `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRecurringAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRecurringAudienceLists request %j', request); + return this.innerApiCalls + .listRecurringAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]) => { + this._log.info('listRecurringAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRecurringAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList} 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 `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + 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['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists stream %j', request); + return this.descriptors.page.listRecurringAudienceLists.createStream( + this.innerApiCalls.listRecurringAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRecurringAudienceLists`, 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. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async + */ + listRecurringAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + 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['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists iterate %j', request); + return this.descriptors.page.listRecurringAudienceLists.asyncIterate( + this.innerApiCalls['listRecurringAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all report tasks for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * 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 `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listReportTasks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listReportTasks request %j', request); + return this.innerApiCalls + .listReportTasks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]) => { + this._log.info('listReportTasks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listReportTasks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 protos.google.analytics.data.v1alpha.ReportTask|ReportTask} 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 `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasksStream( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + 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['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks stream %j', request); + return this.descriptors.page.listReportTasks.createStream( + this.innerApiCalls.listReportTasks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listReportTasks`, 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. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async + */ + listReportTasksAsync( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + 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['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks iterate %j', request); + return this.descriptors.page.listReportTasks.asyncIterate( + this.innerApiCalls['listReportTasks'] 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, + optionsOrCallback?: + | 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]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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 { + 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 ?? '', + }); + 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, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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, + optionsOrCallback?: + | 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 { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceList resource name string. + * + * @param {string} property + * @param {string} audience_list + * @returns {string} Resource name string. + */ + audienceListPath(property:string,audienceList:string) { + return this.pathTemplates.audienceListPathTemplate.render({ + property: property, + audience_list: audienceList, + }); + } + + /** + * Parse the property from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).property; + } + + /** + * Parse the audience_list from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the audience_list. + */ + matchAudienceListFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Return a fully-qualified propertyQuotasSnapshot resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyQuotasSnapshotPath(property:string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from PropertyQuotasSnapshot resource. + * + * @param {string} propertyQuotasSnapshotName + * A fully-qualified path representing PropertyQuotasSnapshot resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName: string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.match(propertyQuotasSnapshotName).property; + } + + /** + * Return a fully-qualified recurringAudienceList resource name string. + * + * @param {string} property + * @param {string} recurring_audience_list + * @returns {string} Resource name string. + */ + recurringAudienceListPath(property:string,recurringAudienceList:string) { + return this.pathTemplates.recurringAudienceListPathTemplate.render({ + property: property, + recurring_audience_list: recurringAudienceList, + }); + } + + /** + * Parse the property from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).property; + } + + /** + * Parse the recurring_audience_list from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the recurring_audience_list. + */ + matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).recurring_audience_list; + } + + /** + * Return a fully-qualified reportTask resource name string. + * + * @param {string} property + * @param {string} report_task + * @returns {string} Resource name string. + */ + reportTaskPath(property:string,reportTask:string) { + return this.pathTemplates.reportTaskPathTemplate.render({ + property: property, + report_task: reportTask, + }); + } + + /** + * Parse the property from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).property; + } + + /** + * Parse the report_task from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the report_task. + */ + matchReportTaskFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).report_task; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.alphaAnalyticsDataStub && !this._terminated) { + return this.alphaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json new file mode 100644 index 000000000000..2fcd35e324d9 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json @@ -0,0 +1,108 @@ +{ + "interfaces": { + "google.analytics.data.v1alpha.AlphaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunFunnelReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SheetExportAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListRecurringAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetPropertyQuotasSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListReportTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json new file mode 100644 index 000000000000..5047e31ed5c6 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1alpha/analytics_data_api.proto", + "../../protos/google/analytics/data/v1alpha/data.proto" +] diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/gapic_metadata.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..3421a0a0ced8 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/gapic_metadata.json @@ -0,0 +1,175 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1alpha", + "libraryPackage": "@google-cloud/data", + "services": { + "AlphaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "SheetExportAudienceList": { + "methods": [ + "sheetExportAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "SheetExportAudienceList": { + "methods": [ + "sheetExportAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/index.ts new file mode 100644 index 000000000000..74c468809b3d --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 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. ** + +export {AlphaAnalyticsDataClient} from './alpha_analytics_data_client'; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client.ts new file mode 100644 index 000000000000..adc80ffc8b60 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client.ts @@ -0,0 +1,2233 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/beta_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './beta_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1beta + */ +export class BetaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + betaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BetaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BetaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BetaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceExportPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceExports/{audience_export}' + ), + metadataPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/metadata' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceExports: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceExportResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExport') as gax.protobuf.Type; + const createAudienceExportMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExportMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceExport: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceExportResponse.decode.bind(createAudienceExportResponse), + createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.betaAnalyticsDataStub) { + return this.betaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1beta.BetaAnalyticsData. + this.betaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1beta.BetaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1beta.BetaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const betaAnalyticsDataStubMethods = + ['runReport', 'runPivotReport', 'batchRunReports', 'batchRunPivotReports', 'getMetadata', 'runRealtimeReport', 'checkCompatibility', 'createAudienceExport', 'queryAudienceExport', 'getAudienceExport', 'listAudienceExports']; + for (const methodName of betaAnalyticsDataStubMethods) { + const callPromise = this.betaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.betaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized report of your Google Analytics event data. Reports + * contain statistics derived from data collected by the Google Analytics + * tracking code. The data returned from the API is as a table with columns + * for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or + * event count. Dimensions break down metrics across some common criteria, + * such as country or event name. + * + * For a guide to constructing requests & understanding responses, see + * [Creating a + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {number[]} request.dateRanges + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.offset + * The row count of the start row. The first row is counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + * @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 protos.google.analytics.data.v1beta.RunReportResponse|RunReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async + */ + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined + ]>; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized pivot report of your Google Analytics event data. + * Pivot reports are more advanced and expressive formats than regular + * reports. In a pivot report, dimensions are only visible if they are + * included in a pivot. Multiple pivots can be specified to further dissect + * your data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + * @param {number[]} request.metrics + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + * @param {number[]} request.dateRanges + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + * @param {number[]} request.pivots + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + * @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 protos.google.analytics.data.v1beta.RunPivotReportResponse|RunPivotReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async + */ + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined + ]>; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runPivotReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runPivotReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runPivotReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runPivotReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + * @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 protos.google.analytics.data.v1beta.BatchRunReportsResponse|BatchRunReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async + */ + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined + ]>; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple pivot reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + * @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 protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async + */ + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined + ]>; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunPivotReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunPivotReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunPivotReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunPivotReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns metadata for dimensions and metrics available in reporting methods. + * Used to explore the dimensions and metrics. In this method, a Google + * Analytics property identifier is specified in the request, and + * the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + * For example if a custom metric with parameter name `levels_unlocked` is + * registered to a property, the Metadata response will contain + * `customEvent:levels_unlocked`. Universal metadata are dimensions and + * metrics applicable to any property such as `country` and `totalUsers`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see [where to find + * your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234/metadata + * + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + * @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 protos.google.analytics.data.v1beta.Metadata|Metadata}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_metadata.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async + */ + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined + ]>; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|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().catch(err => {throw err}); + this._log.info('getMetadata request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMetadata response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMetadata(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMetadata response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized report of realtime event data for your property. + * Events appear in realtime reports seconds after they have been sent to + * the Google Analytics. Realtime reports show events and usage data for the + * periods of time ranging from the present moment to 30 minutes ago (up to + * 60 minutes for Google Analytics 360 properties). + * + * For a guide to constructing realtime requests & understanding responses, + * see [Creating a Realtime + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * [PropertyQuota](#PropertyQuota). + * @param {number[]} request.minuteRanges + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + * @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 protos.google.analytics.data.v1beta.RunRealtimeReportResponse|RunRealtimeReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async + */ + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined + ]>; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runRealtimeReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runRealtimeReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runRealtimeReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runRealtimeReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * This compatibility method lists dimensions and metrics that can be added to + * a report request and maintain compatibility. This method fails if the + * request's dimensions and metrics are incompatible. + * + * In Google Analytics, reports fail if they request incompatible dimensions + * and/or metrics; in that case, you will need to remove dimensions and/or + * metrics from the incompatible report until the report is compatible. + * + * The Realtime and Core reports have different compatibility rules. This + * method checks compatibility for Core reports. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. To + * learn more, see [where to find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + * @param {number[]} request.metrics + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + * @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + * @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 protos.google.analytics.data.v1beta.CheckCompatibilityResponse|CheckCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async + */ + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined + ]>; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|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({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('checkCompatibility request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkCompatibility response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.checkCompatibility(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, + {}|undefined + ]) => { + this._log.info('checkCompatibility response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience export of users. After creating an audience, the + * users are not immediately available for exporting. First, a request to + * `CreateAudienceExport` is necessary to create an audience export of users, + * and then second, this method is used to retrieve the users in the audience + * export. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @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 protos.google.analytics.data.v1beta.QueryAudienceExportResponse|QueryAudienceExportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async + */ + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined + ]>; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|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().catch(err => {throw err}); + this._log.info('queryAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience export. This method + * can be used to understand an audience export after it has been created. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async + */ + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined + ]>; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|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().catch(err => {throw err}); + this._log.info('getAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience export for later retrieval. This method quickly returns + * the audience export's resource name and initiates a long running + * asynchronous request to form an audience export. To export the users in an + * audience export, first create the audience export through this method and + * then send the audience resource name to the `QueryAudienceExport` method. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * An audience export is a snapshot of the users currently in the audience at + * the time of audience export creation. Creating audience exports for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience exports + * contain the users in each audience. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1beta.AudienceExport} request.audienceExport + * Required. The audience export to create. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceExport response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceExport request %j', request); + return this.innerApiCalls.createAudienceExport(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceExport response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceExport()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + async checkCreateAudienceExportProgress(name: string): Promise>{ + this._log.info('createAudienceExport long-running'); + 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.createAudienceExport, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience exports for a property. This method can be used for you + * to find and reuse existing audience exports rather than creating + * unnecessary new audience exports. The same audience can have multiple + * audience exports that represent the export of users that were in an + * audience on different days. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * 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 `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>, + callback?: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceExports values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceExports request %j', request); + return this.innerApiCalls + .listAudienceExports(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]) => { + this._log.info('listAudienceExports values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceExports`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 protos.google.analytics.data.v1beta.AudienceExport|AudienceExport} 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 `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExportsStream( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + 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['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports stream %j', request); + return this.descriptors.page.listAudienceExports.createStream( + this.innerApiCalls.listAudienceExports as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceExports`, 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. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async + */ + listAudienceExportsAsync( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + 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['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports iterate %j', request); + return this.descriptors.page.listAudienceExports.asyncIterate( + this.innerApiCalls['listAudienceExports'] 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, + optionsOrCallback?: + | 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]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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 { + 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 ?? '', + }); + 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, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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, + optionsOrCallback?: + | 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 { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceExport resource name string. + * + * @param {string} property + * @param {string} audience_export + * @returns {string} Resource name string. + */ + audienceExportPath(property:string,audienceExport:string) { + return this.pathTemplates.audienceExportPathTemplate.render({ + property: property, + audience_export: audienceExport, + }); + } + + /** + * Parse the property from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property; + } + + /** + * Parse the audience_export from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the audience_export. + */ + matchAudienceExportFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export; + } + + /** + * Return a fully-qualified metadata resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + metadataPath(property:string) { + return this.pathTemplates.metadataPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Metadata resource. + * + * @param {string} metadataName + * A fully-qualified path representing Metadata resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMetadataName(metadataName: string) { + return this.pathTemplates.metadataPathTemplate.match(metadataName).property; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.betaAnalyticsDataStub && !this._terminated) { + return this.betaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json new file mode 100644 index 000000000000..271a9f86be46 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json @@ -0,0 +1,93 @@ +{ + "interfaces": { + "google.analytics.data.v1beta.BetaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunPivotReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunPivotReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMetadata": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunRealtimeReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckCompatibility": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceExports": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json new file mode 100644 index 000000000000..89471a4231ae --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1beta/analytics_data_api.proto", + "../../protos/google/analytics/data/v1beta/data.proto" +] diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/gapic_metadata.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..e4f8c132470a --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/gapic_metadata.json @@ -0,0 +1,137 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1beta", + "libraryPackage": "@google-analytics/data", + "services": { + "BetaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/index.ts new file mode 100644 index 000000000000..1419ddab29cb --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/src/v1beta/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 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. ** + +export {BetaAnalyticsDataClient} from './beta_analytics_data_client'; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..6997f6a03d18 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const data = require('@google-analytics/data'); + +function main() { + const betaAnalyticsDataClient = new data.BetaAnalyticsDataClient(); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..a52eeae48da3 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 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. ** + +import {BetaAnalyticsDataClient} from '@google-analytics/data'; + +// check that the client class type name can be used +function doStuffWithBetaAnalyticsDataClient(client: BetaAnalyticsDataClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const betaAnalyticsDataClient = new BetaAnalyticsDataClient(); + doStuffWithBetaAnalyticsDataClient(betaAnalyticsDataClient); +} + +main(); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/install.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 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. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts new file mode 100644 index 000000000000..4e211f29c9cb --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts @@ -0,0 +1,2724 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as alphaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +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 +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : 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) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.AlphaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.alphaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.alphaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runFunnelReport', () => { + it('invokes runFunnelReport without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCall(expectedResponse); + const [response] = await client.runFunnelReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runFunnelReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunFunnelReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runFunnelReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runFunnelReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runFunnelReport(request), expectedError); + }); + }); + + describe('queryAudienceList', () => { + it('invokes queryAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryAudienceListResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceList(request), expectedError); + }); + }); + + describe('sheetExportAudienceList', () => { + it('invokes sheetExportAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() + ); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.sheetExportAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() + ); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.sheetExportAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.sheetExportAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes sheetExportAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.sheetExportAudienceList(request), expectedError); + }); + }); + + describe('getAudienceList', () => { + it('invokes getAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceList(request), expectedError); + }); + }); + + describe('createRecurringAudienceList', () => { + it('invokes createRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.createRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + }); + }); + + describe('getRecurringAudienceList', () => { + it('invokes getRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + }); + }); + + describe('getPropertyQuotasSnapshot', () => { + it('invokes getPropertyQuotasSnapshot without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getPropertyQuotasSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPropertyQuotasSnapshot( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + }); + }); + + describe('queryReportTask', () => { + it('invokes queryReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.queryReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryReportTaskResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryReportTask(request), expectedError); + }); + }); + + describe('getReportTask', () => { + it('invokes getReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.getReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getReportTask(request), expectedError); + }); + }); + + describe('createAudienceList', () => { + it('invokes createAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceList( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceList(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceListProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateAudienceListProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceListProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceListProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createReportTask', () => { + it('invokes createReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createReportTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReportTask( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createReportTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReportTaskProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateReportTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReportTaskProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateReportTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceLists', () => { + it('invokes listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + 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.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + const iterable = client.listAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRecurringAudienceLists', () => { + it('invokes listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listRecurringAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRecurringAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRecurringAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + 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.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRecurringAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + const iterable = client.listRecurringAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRecurringAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReportTasks', () => { + it('invokes listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listReportTasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReportTasks( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReportTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReportTasks(request), expectedError); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasksStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + 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.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReportTasksStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + const iterable = client.listReportTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReportTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + 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 alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceList', async () => { + const fakePath = "/rendered/path/audienceList"; + const expectedParameters = { + property: "propertyValue", + audience_list: "audienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceListPath', () => { + const result = client.audienceListPath("propertyValue", "audienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceListName', () => { + const result = client.matchPropertyFromAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceListFromAudienceListName', () => { + const result = client.matchAudienceListFromAudienceListName(fakePath); + assert.strictEqual(result, "audienceListValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('propertyQuotasSnapshot', async () => { + const fakePath = "/rendered/path/propertyQuotasSnapshot"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyQuotasSnapshotPath', () => { + const result = client.propertyQuotasSnapshotPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyQuotasSnapshotName', () => { + const result = client.matchPropertyFromPropertyQuotasSnapshotName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('recurringAudienceList', async () => { + const fakePath = "/rendered/path/recurringAudienceList"; + const expectedParameters = { + property: "propertyValue", + recurring_audience_list: "recurringAudienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.recurringAudienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.recurringAudienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('recurringAudienceListPath', () => { + const result = client.recurringAudienceListPath("propertyValue", "recurringAudienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.recurringAudienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromRecurringAudienceListName', () => { + const result = client.matchPropertyFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRecurringAudienceListFromRecurringAudienceListName', () => { + const result = client.matchRecurringAudienceListFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "recurringAudienceListValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('reportTask', async () => { + const fakePath = "/rendered/path/reportTask"; + const expectedParameters = { + property: "propertyValue", + report_task: "reportTaskValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportTaskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportTaskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportTaskPath', () => { + const result = client.reportTaskPath("propertyValue", "reportTaskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportTaskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromReportTaskName', () => { + const result = client.matchPropertyFromReportTaskName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportTaskFromReportTaskName', () => { + const result = client.matchReportTaskFromReportTaskName(fakePath); + assert.strictEqual(result, "reportTaskValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts new file mode 100644 index 000000000000..57822eee0577 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts @@ -0,0 +1,2004 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as betaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +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 +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : 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) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.BetaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.betaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.betaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runReport', () => { + it('invokes runReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); + const [response] = await client.runReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runReport(request), expectedError); + }); + }); + + describe('runPivotReport', () => { + it('invokes runPivotReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCall(expectedResponse); + const [response] = await client.runPivotReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runPivotReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunPivotReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runPivotReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runPivotReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runPivotReport(request), expectedError); + }); + }); + + describe('batchRunReports', () => { + it('invokes batchRunReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunReports(request), expectedError); + }); + }); + + describe('batchRunPivotReports', () => { + it('invokes batchRunPivotReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunPivotReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunPivotReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + }); + }); + + describe('getMetadata', () => { + it('invokes getMetadata without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadata(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadata( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IMetadata|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadata(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMetadata(request), expectedError); + }); + }); + + describe('runRealtimeReport', () => { + it('invokes runRealtimeReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(expectedResponse); + const [response] = await client.runRealtimeReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runRealtimeReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunRealtimeReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runRealtimeReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runRealtimeReport(request), expectedError); + }); + }); + + describe('checkCompatibility', () => { + it('invokes checkCompatibility without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkCompatibility( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.ICheckCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.checkCompatibility(request), expectedError); + }); + }); + + describe('queryAudienceExport', () => { + it('invokes queryAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IQueryAudienceExportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceExport(request), expectedError); + }); + }); + + describe('getAudienceExport', () => { + it('invokes getAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceExport(request), expectedError); + }); + }); + + describe('createAudienceExport', () => { + it('invokes createAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceExport(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceExport( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with call error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with LRO error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceExport(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceExportProgress without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateAudienceExportProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceExportProgress with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceExportProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceExports', () => { + it('invokes listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceExports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceExports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceExports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceExports(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExportsStream without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + 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.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceExportsStream with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + const iterable = client.listAudienceExportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceExportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + 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 betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceExport', async () => { + const fakePath = "/rendered/path/audienceExport"; + const expectedParameters = { + property: "propertyValue", + audience_export: "audienceExportValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceExportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceExportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceExportPath', () => { + const result = client.audienceExportPath("propertyValue", "audienceExportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceExportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceExportName', () => { + const result = client.matchPropertyFromAudienceExportName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceExportFromAudienceExportName', () => { + const result = client.matchAudienceExportFromAudienceExportName(fakePath); + assert.strictEqual(result, "audienceExportValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadata', async () => { + const fakePath = "/rendered/path/metadata"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.metadataPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataPath', () => { + const result = client.metadataPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromMetadataName', () => { + const result = client.matchPropertyFromMetadataName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/tsconfig.json b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/webpack.config.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/webpack.config.js new file mode 100644 index 000000000000..f5f52a892738 --- /dev/null +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-analytics-data/webpack.config.js @@ -0,0 +1,64 @@ +// 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 +// +// 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'AlphaAnalyticsData', + filename: './alpha-analytics-data.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/src/index.ts index ad2729ed9f8f..fe67084db439 100644 --- a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/src/index.ts +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/src/index.ts @@ -12,20 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; -import * as v1p1beta1 from './v1p1beta1'; -import * as v2 from './v2'; - const AdaptationClient = v1.AdaptationClient; type AdaptationClient = v1.AdaptationClient; const SpeechClient = v1.SpeechClient; type SpeechClient = v1.SpeechClient; - -export {v1, v1p1beta1, v2, AdaptationClient, SpeechClient}; -export default {v1, v1p1beta1, v2, AdaptationClient, SpeechClient}; +export {v1, AdaptationClient, SpeechClient}; +export default {v1, AdaptationClient, SpeechClient}; import * as protos from '../protos/protos'; -export {protos}; +export {protos} diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.js b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.js index 96a3a1b3b8e0..c09357f204a3 100644 --- a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.js +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.js @@ -21,7 +21,6 @@ const speech = require('@google-cloud/speech'); function main() { - const adaptationClient = new speech.AdaptationClient(); const speechClient = new speech.SpeechClient(); } diff --git a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.ts b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.ts index 3f61a9c89c4a..dd729963452b 100644 --- a/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.ts +++ b/packages/gapic-node-processing/test/fixtures/combined-library/google-cloud-speech/system-test/fixtures/sample/src/index.ts @@ -16,20 +16,14 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {AdaptationClient, SpeechClient} from '@google-cloud/speech'; +import {SpeechClient} from '@google-cloud/speech'; // check that the client class type name can be used -function doStuffWithAdaptationClient(client: AdaptationClient) { - client.close(); -} function doStuffWithSpeechClient(client: SpeechClient) { client.close(); } function main() { - // check that the client instance can be created - const adaptationClient = new AdaptationClient(); - doStuffWithAdaptationClient(adaptationClient); // check that the client instance can be created const speechClient = new SpeechClient(); doStuffWithSpeechClient(speechClient); diff --git a/packages/gapic-node-processing/test/generate-index.test.ts b/packages/gapic-node-processing/test/generate-index.test.ts index e6ad56de28bf..7339b46dbf8c 100644 --- a/packages/gapic-node-processing/test/generate-index.test.ts +++ b/packages/gapic-node-processing/test/generate-index.test.ts @@ -31,10 +31,10 @@ describe('generate index.ts', () => { beforeEach(async () => { await combineLibraries( new LibraryConfig({ - sourcePath: path.resolve(TEST_FIXTURES_PATH, LIB_PRE_COMBINATION_ESM), + sourcePath: path.resolve(TEST_FIXTURES_PATH, LIB_PRE_COMBINATION), destinationPath: path.resolve( TEST_FIXTURES_PATH, - LIB_POST_COMBINATION_ESM, + LIB_POST_COMBINATION, ), defaultVersion: 'v2', isEsm: false, diff --git a/packages/google-ads-admanager/CHANGELOG.md b/packages/google-ads-admanager/CHANGELOG.md index 8401b479216e..7e07b3f50d20 100644 --- a/packages/google-ads-admanager/CHANGELOG.md +++ b/packages/google-ads-admanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/admanager-v0.4.1...admanager-v0.5.0) (2025-10-23) + + +### Features + +* [admanager] Added Application resource ([#6834](https://github.com/googleapis/google-cloud-node/issues/6834)) ([79e9ddf](https://github.com/googleapis/google-cloud-node/commit/79e9ddf22a87f114cb7c692be5ee3b34424ad5d5)) + ## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/admanager-v0.4.0...admanager-v0.4.1) (2025-10-13) diff --git a/packages/google-ads-admanager/README.md b/packages/google-ads-admanager/README.md index 34ba6309cabf..ba154dec02bc 100644 --- a/packages/google-ads-admanager/README.md +++ b/packages/google-ads-admanager/README.md @@ -62,21 +62,60 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | get ad break | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_break_service.get_ad_break.js) | | list ad breaks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_break_service.list_ad_breaks.js) | | update ad break | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_break_service.update_ad_break.js) | +| batch allow ad review center ads | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js) | +| batch block ad review center ads | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js) | +| search ad review center ads | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.search_ad_review_center_ads.js) | | get ad unit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.get_ad_unit.js) | | list ad unit sizes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_unit_sizes.js) | | list ad units | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_units.js) | +| get application | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/application_service.get_application.js) | +| list applications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/application_service.list_applications.js) | +| get audience segment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.get_audience_segment.js) | +| list audience segments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.list_audience_segments.js) | | get bandwidth group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.get_bandwidth_group.js) | | list bandwidth groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.list_bandwidth_groups.js) | +| get browser language | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/browser_language_service.get_browser_language.js) | +| list browser languages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/browser_language_service.list_browser_languages.js) | +| get browser | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/browser_service.get_browser.js) | +| list browsers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/browser_service.list_browsers.js) | +| get cms metadata key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.get_cms_metadata_key.js) | +| list cms metadata keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.list_cms_metadata_keys.js) | +| get cms metadata value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.get_cms_metadata_value.js) | +| list cms metadata values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.list_cms_metadata_values.js) | | get company | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/company_service.get_company.js) | | list companies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/company_service.list_companies.js) | +| batch create contacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_create_contacts.js) | +| batch update contacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_update_contacts.js) | +| create contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.create_contact.js) | +| get contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.get_contact.js) | +| list contacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.list_contacts.js) | +| update contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/contact_service.update_contact.js) | +| get content bundle | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.get_content_bundle.js) | +| list content bundles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.list_content_bundles.js) | +| get content label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_label_service.get_content_label.js) | +| list content labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_label_service.list_content_labels.js) | +| get content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_service.get_content.js) | +| list content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/content_service.list_content.js) | +| get creative template | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/creative_template_service.get_creative_template.js) | +| list creative templates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/creative_template_service.list_creative_templates.js) | +| batch activate custom fields | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_activate_custom_fields.js) | +| batch create custom fields | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_create_custom_fields.js) | +| batch deactivate custom fields | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_deactivate_custom_fields.js) | +| batch update custom fields | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_update_custom_fields.js) | +| create custom field | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.create_custom_field.js) | | get custom field | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.get_custom_field.js) | | list custom fields | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.list_custom_fields.js) | +| update custom field | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_field_service.update_custom_field.js) | | get custom targeting key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_targeting_key_service.get_custom_targeting_key.js) | | list custom targeting keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_targeting_key_service.list_custom_targeting_keys.js) | | get custom targeting value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_targeting_value_service.get_custom_targeting_value.js) | | list custom targeting values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/custom_targeting_value_service.list_custom_targeting_values.js) | +| get device capability | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_capability_service.get_device_capability.js) | +| list device capabilities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_capability_service.list_device_capabilities.js) | | get device category | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_category_service.get_device_category.js) | | list device categories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_category_service.list_device_categories.js) | +| get device manufacturer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.get_device_manufacturer.js) | +| list device manufacturers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.list_device_manufacturers.js) | | batch create entity signals mappings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/entity_signals_mapping_service.batch_create_entity_signals_mappings.js) | | batch update entity signals mappings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/entity_signals_mapping_service.batch_update_entity_signals_mappings.js) | | create entity signals mapping | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/entity_signals_mapping_service.create_entity_signals_mapping.js) | @@ -85,6 +124,12 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | update entity signals mapping | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/entity_signals_mapping_service.update_entity_signals_mapping.js) | | get geo target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/geo_target_service.get_geo_target.js) | | list geo targets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/geo_target_service.list_geo_targets.js) | +| get mobile carrier | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.get_mobile_carrier.js) | +| list mobile carriers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.list_mobile_carriers.js) | +| get mobile device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.get_mobile_device.js) | +| list mobile devices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.list_mobile_devices.js) | +| get mobile device submodel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.get_mobile_device_submodel.js) | +| list mobile device submodels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.list_mobile_device_submodels.js) | | get network | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/network_service.get_network.js) | | list networks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/network_service.list_networks.js) | | get operating system | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/operating_system_service.get_operating_system.js) | @@ -93,8 +138,15 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list operating system versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/operating_system_version_service.list_operating_system_versions.js) | | get order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/order_service.get_order.js) | | list orders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/order_service.list_orders.js) | +| batch activate placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_activate_placements.js) | +| batch archive placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_archive_placements.js) | +| batch create placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_create_placements.js) | +| batch deactivate placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_deactivate_placements.js) | +| batch update placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_update_placements.js) | +| create placement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.create_placement.js) | | get placement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.get_placement.js) | | list placements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.list_placements.js) | +| update placement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/placement_service.update_placement.js) | | create private auction deal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.create_private_auction_deal.js) | | get private auction deal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.get_private_auction_deal.js) | | list private auction deals | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.list_private_auction_deals.js) | @@ -113,9 +165,25 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | update report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/report_service.update_report.js) | | get role | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/role_service.get_role.js) | | list roles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/role_service.list_roles.js) | +| batch create sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.batch_create_sites.js) | +| batch deactivate sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.batch_deactivate_sites.js) | +| batch submit sites for approval | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.batch_submit_sites_for_approval.js) | +| batch update sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.batch_update_sites.js) | +| create site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.create_site.js) | +| get site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.get_site.js) | +| list sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.list_sites.js) | +| update site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/site_service.update_site.js) | | ads | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json) | | get taxonomy category | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/taxonomy_category_service.get_taxonomy_category.js) | | list taxonomy categories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/taxonomy_category_service.list_taxonomy_categories.js) | +| batch activate teams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.batch_activate_teams.js) | +| batch create teams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.batch_create_teams.js) | +| batch deactivate teams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.batch_deactivate_teams.js) | +| batch update teams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.batch_update_teams.js) | +| create team | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.create_team.js) | +| get team | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.get_team.js) | +| list teams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.list_teams.js) | +| update team | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/team_service.update_team.js) | | get user | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-admanager/samples/generated/v1/user_service.get_user.js) | diff --git a/packages/google-ads-admanager/package.json b/packages/google-ads-admanager/package.json index ebc62bbcfed0..cb95f0063c22 100644 --- a/packages/google-ads-admanager/package.json +++ b/packages/google-ads-admanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-ads/admanager", - "version": "0.4.1", + "version": "0.5.0", "description": "Google Ad Manager API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_break_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_break_service.proto index 1070a036876a..d3aa8c0e0dfe 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_break_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_break_service.proto @@ -213,7 +213,7 @@ message ListAdBreaksResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto new file mode 100644 index 000000000000..cb4db5dfb743 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto @@ -0,0 +1,44 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdReviewCenterAdEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [AdReviewCenterAdStatus][google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus] +message AdReviewCenterAdStatusEnum { + // Specifies the status of an AdReviewCenterAd. + enum AdReviewCenterAdStatus { + // Not specified value + AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED = 0; + + // This ad has been explicitly allowed to serve. + ALLOWED = 1; + + // This ad has been explicitly blocked from serving. + BLOCKED = 2; + + // This ad is allowed to serve by default and has not been reviewed. + UNREVIEWED = 3; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto new file mode 100644 index 000000000000..cc3886900427 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto @@ -0,0 +1,62 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/ad_review_center_ad_enums.proto"; +import "google/ads/admanager/v1/exchange_syndication_product_enum.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdReviewCenterAdMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents an ad that can be acted on or viewed in the Ad Review Center. +// [AdReviewCenterAd][google.ads.admanager.v1.AdReviewCenterAd]. +message AdReviewCenterAd { + option (google.api.resource) = { + type: "admanager.googleapis.com/AdReviewCenterAd" + pattern: "networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}" + plural: "adReviewCenterAds" + singular: "adReviewCenterAd" + }; + + // Identifier. The resource name of the AdReviewCenterAd. + // Format: + // `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `AdReviewCenterAd` ID. + string ad_review_center_ad_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the ExchangeSyndicationProduct for this + // AdReviewCenterAd. + ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The status of the AdReviewCenterAd. + AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4; + + // Output only. The preview URL that can be embedded or accessed directly + // which will present the rendered contents of the ad. (This URL expires 72 + // hours after being retrieved.). + optional string preview_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_service.proto new file mode 100644 index 000000000000..c1b4255cbfc9 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_review_center_ad_service.proto @@ -0,0 +1,237 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/ad_review_center_ad_enums.proto"; +import "google/ads/admanager/v1/ad_review_center_ad_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/rpc/status.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdReviewCenterAdServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling AdReviewCenterAd objects. +service AdReviewCenterAdService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to search for AdReviewCenterAds. + rpc SearchAdReviewCenterAds(SearchAdReviewCenterAdsRequest) + returns (SearchAdReviewCenterAdsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search" + }; + option (google.api.method_signature) = "parent"; + } + + // API to batch allow AdReviewCenterAds. + // This method supports partial success. Some operations may succeed while + // others fail. Callers should check the failedRequests field in the response + // to determine which operations failed. + rpc BatchAllowAdReviewCenterAds(BatchAllowAdReviewCenterAdsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "BatchAllowAdReviewCenterAdsResponse" + metadata_type: "BatchAdReviewCenterAdsOperationMetadata" + }; + } + + // API to batch block AdReviewCenterAds. + // This method supports partial success. Some operations may succeed while + // others fail. Callers should check the failedRequests field in the response + // to determine which operations failed. + rpc BatchBlockAdReviewCenterAds(BatchBlockAdReviewCenterAdsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "BatchBlockAdReviewCenterAdsResponse" + metadata_type: "BatchAdReviewCenterAdsOperationMetadata" + }; + } +} + +// Request object for `SearchAdReviewCenterAds` method. +message SearchAdReviewCenterAdsRequest { + // Required. The parent, which owns this collection of AdReviewCenterAds. + // Format: networks/{network_code}/webProperties/{web_property_code} + // + // Since a network can only have a single web property of each + // `ExchangeSyndicationProduct`, you can use the + // `ExchangeSyndicationProduct` as an alias for the web property code: + // + // `networks/{network_code}/webProperties/display` + // + // `networks/{network_code}/webProperties/videoAndAudio` + // + // `networks/{network_code}/webProperties/mobileApp` + // + // `networks/{network_code}/webProperties/games` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/WebProperty" + } + ]; + + // Optional. The maximum number of AdReviewCenterAds to return. The service + // may return fewer than this value. If unspecified, at most 50 + // AdReviewCenterAds will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token to fetch the next page of AdReviewCenterAds. This + // is the value returned from a previous Search request, or empty. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Only return ads with the given status. + AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + repeated string ad_review_center_ad_id = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, only return ads that served within the given date + // range (inclusive). The date range must be within the last 30 days. If not + // provided, the date range will be the last 30 days. + google.type.Interval date_time_range = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, restrict the search to AdReviewCenterAds associated + // with the text (including any text on the ad or in the destination URL). If + // more than one value is provided, the search will combine them in a logical + // AND. For example, ['car', 'blue'] will match ads that contain both "car" + // and "blue", but not an ad that only contains "car". + repeated string search_text = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, restrict the search to creatives belonging to one of + // the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + // buyer account IDs can be found via the ProgrammaticBuyerService. + repeated int64 buyer_account_id = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `SearchAdReviewCenterAds` method. +message SearchAdReviewCenterAdsResponse { + // The AdReviewCenterAds that match the search request. + repeated AdReviewCenterAd ad_review_center_ads = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request object for `BatchAllowAdReviewCenterAds` method. +message BatchAllowAdReviewCenterAdsRequest { + // Required. The parent, which owns this collection of AdReviewCenterAds. + // Format: networks/{network_code}/webProperties/{web_property_code} + // + // Since a network can only have a single web property of each + // `ExchangeSyndicationProduct`, you can use the + // `ExchangeSyndicationProduct` as an alias for the web property code: + // + // `networks/{network_code}/webProperties/display` + // + // `networks/{network_code}/webProperties/videoAndAudio` + // + // `networks/{network_code}/webProperties/mobileApp` + // + // `networks/{network_code}/webProperties/games` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/WebProperty" + } + ]; + + // Required. The resource names of the `AdReviewCenterAd`s to allow. + // Format: + // `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdReviewCenterAd" + } + ]; +} + +// Response object for `BatchAllowAdReviewCenterAds` method. +message BatchAllowAdReviewCenterAdsResponse {} + +// Request object for `BatchBlockAdReviewCenterAds` method. +message BatchBlockAdReviewCenterAdsRequest { + // Required. The parent, which owns this collection of AdReviewCenterAds. + // Format: networks/{network_code}/webProperties/{web_property_code} + // + // Since a network can only have a single web property of each + // `ExchangeSyndicationProduct`, you can use the + // `ExchangeSyndicationProduct` as an alias for the web property code: + // + // `networks/{network_code}/webProperties/display` + // + // `networks/{network_code}/webProperties/videoAndAudio` + // + // `networks/{network_code}/webProperties/mobileApp` + // + // `networks/{network_code}/webProperties/games` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/WebProperty" + } + ]; + + // Required. The resource names of the `AdReviewCenterAd`s to block. + // Format: + // `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdReviewCenterAd" + } + ]; +} + +// Response object for `BatchBlockAdReviewCenterAds` method. +message BatchBlockAdReviewCenterAdsResponse {} + +// Metadata object for `BatchAllowAdReviewCenterAds` and +// `BatchBlockAdReviewCenterAds` methods. +message BatchAdReviewCenterAdsOperationMetadata { + // The status of each failed request, keyed by the index of the corresponding + // request in the batch request. + map failed_requests = 1; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_messages.proto index 6de8c3a2d81f..33abec9d745a 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_messages.proto @@ -191,10 +191,10 @@ message AdUnit { // Represents the size, environment, and companions of an ad in an ad unit. message AdUnitSize { // Required. The Size of the AdUnit. - Size size = 1 [(google.api.field_behavior) = REQUIRED]; + optional Size size = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The EnvironmentType of the AdUnit - EnvironmentTypeEnum.EnvironmentType environment_type = 2 + optional EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(google.api.field_behavior) = REQUIRED]; // The companions for this ad unit size. Companions are only valid if the @@ -207,7 +207,7 @@ message AdUnitSize { message AdUnitParent { // Output only. The parent of the current AdUnit // Format: `networks/{network_code}/adUnits/{ad_unit_id}` - string parent_ad_unit = 1 [ + optional string parent_ad_unit = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "admanager.googleapis.com/AdUnit" @@ -215,22 +215,22 @@ message AdUnitParent { ]; // Output only. The display name of the parent AdUnit. - string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A string used to uniquely identify the ad unit for the // purposes of serving the ad. - string ad_unit_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + optional string ad_unit_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Frequency cap using a label. message LabelFrequencyCap { // Required. The label to used for frequency capping. // Format: "networks/{network_code}/labels/{label_id}" - string label = 1 [ + optional string label = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "admanager.googleapis.com/Label" } ]; // The frequency cap. - FrequencyCap frequency_cap = 2; + optional FrequencyCap frequency_cap = 2; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_service.proto index 34151a3023d0..00843ea20407 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/ad_unit_service.proto @@ -87,8 +87,8 @@ message ListAdUnitsRequest { // Optional. The maximum number of AdUnits to return. The service may return // fewer than this value. If unspecified, at most 50 ad units will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListAdUnits` call. @@ -125,7 +125,7 @@ message ListAdUnitsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. @@ -148,8 +148,8 @@ message ListAdUnitSizesRequest { // Optional. The maximum number of AdUnitSizes to return. The service may // return fewer than this value. If unspecified, at most 50 ad unit sizes will - // be returned. The maximum value is 1000; values above 1000 will be coerced - // to 1000. + // be returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListAdUnitSizes` call. @@ -186,7 +186,7 @@ message ListAdUnitSizesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_messages.proto new file mode 100644 index 000000000000..03f762b8adc2 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_messages.proto @@ -0,0 +1,47 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ApplicationMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// An application that has been added to or "claimed" by the network to be used +// for targeting purposes. These mobile apps can come from various app stores. +message Application { + option (google.api.resource) = { + type: "admanager.googleapis.com/Application" + pattern: "networks/{network_code}/applications/{application}" + plural: "applications" + singular: "application" + }; + + // Identifier. The resource name of the `Application`. + // Format: `networks/{network_code}/applications/{application_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The display name of the application. This attribute is required + // and has a maximum length of 80 characters. + optional string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_service.proto new file mode 100644 index 000000000000..f0bfb1e7b25d --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/application_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/application_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ApplicationServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Application` objects. +service ApplicationService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Application` object. + rpc GetApplication(GetApplicationRequest) returns (Application) { + option (google.api.http) = { + get: "/v1/{name=networks/*/applications/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Application` objects. + rpc ListApplications(ListApplicationsRequest) + returns (ListApplicationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/applications" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetApplication` method. +message GetApplicationRequest { + // Required. The resource name of the Application. + // Format: `networks/{network_code}/applications/{application_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Application" + } + ]; +} + +// Request object for `ListApplications` method. +message ListApplicationsRequest { + // Required. The parent, which owns this collection of Applications. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Applications` to return. The service may + // return fewer than this value. If unspecified, at most 50 `Applications` + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListApplications` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApplications` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListApplicationsRequest` containing matching +// `Application` objects. +message ListApplicationsResponse { + // The `Application` objects from the specified network. + repeated Application applications = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Application` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_messages.proto new file mode 100644 index 000000000000..f6e63efa8f4a --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_messages.proto @@ -0,0 +1,49 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AudienceSegmentMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// The `AudienceSegment` resource. +message AudienceSegment { + option (google.api.resource) = { + type: "admanager.googleapis.com/AudienceSegment" + pattern: "networks/{network_code}/audienceSegments/{audience_segment}" + plural: "audienceSegments" + singular: "audienceSegment" + }; + + // Identifier. The resource name of the `AudienceSegment`. + // Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + // The `audience_segment_id` may have up to 1 of the following suffixes: + // - `~direct` for directly licensed third-party segments + // - `~global` for globally licensed third-party segments + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Display name of the `AudienceSegment`. The attribute has a + // maximum length of 255 characters. + optional string display_name = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_service.proto new file mode 100644 index 000000000000..ebcf751263f0 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/audience_segment_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/audience_segment_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AudienceSegmentServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `AudienceSegment` objects. +service AudienceSegmentService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve an `AudienceSegment` object. + rpc GetAudienceSegment(GetAudienceSegmentRequest) returns (AudienceSegment) { + option (google.api.http) = { + get: "/v1/{name=networks/*/audienceSegments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `AudienceSegment` objects. + rpc ListAudienceSegments(ListAudienceSegmentsRequest) + returns (ListAudienceSegmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/audienceSegments" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetAudienceSegment` method. +message GetAudienceSegmentRequest { + // Required. The resource name of the AudienceSegment. + // Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AudienceSegment" + } + ]; +} + +// Request object for `ListAudienceSegments` method. +message ListAudienceSegmentsRequest { + // Required. The parent publisher network associated with these audience + // segments. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `AudienceSegments` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `AudienceSegments` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceSegments` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceSegments` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListAudienceSegmentsRequest` containing matching +// `AudienceSegment` objects. +message ListAudienceSegmentsResponse { + // The `AudienceSegment` objects from the specified network. + repeated AudienceSegment audience_segments = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `AudienceSegment` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/bandwidth_group_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/bandwidth_group_service.proto index 10b305b6616c..34fac5579433 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/bandwidth_group_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/bandwidth_group_service.proto @@ -79,8 +79,8 @@ message ListBandwidthGroupsRequest { // Optional. The maximum number of `BandwidthGroups` to return. The service // may return fewer than this value. If unspecified, at most 50 - // `BandwidthGroups` will be returned. The maximum value is 1000; values above - // 1000 will be coerced to 1000. + // `BandwidthGroups` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListBandwidthGroups` @@ -118,7 +118,7 @@ message ListBandwidthGroupsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_messages.proto new file mode 100644 index 000000000000..014e2ee31360 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_messages.proto @@ -0,0 +1,45 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "BrowserLanguageMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents the language of a browser. +message BrowserLanguage { + option (google.api.resource) = { + type: "admanager.googleapis.com/BrowserLanguage" + pattern: "networks/{network_code}/browserLanguages/{browser_language}" + plural: "browserLanguages" + singular: "browserLanguage" + }; + + // Identifier. The resource name of the `BrowserLanguage`. + // Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The name of the browser language, localized. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_service.proto new file mode 100644 index 000000000000..f2fef5344abc --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_language_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/browser_language_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "BrowserLanguageServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `BrowserLanguage` objects. +service BrowserLanguageService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `BrowserLanguage` object. + rpc GetBrowserLanguage(GetBrowserLanguageRequest) returns (BrowserLanguage) { + option (google.api.http) = { + get: "/v1/{name=networks/*/browserLanguages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `BrowserLanguage` objects. + rpc ListBrowserLanguages(ListBrowserLanguagesRequest) + returns (ListBrowserLanguagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/browserLanguages" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetBrowserLanguage` method. +message GetBrowserLanguageRequest { + // Required. The resource name of the BrowserLanguage. + // Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/BrowserLanguage" + } + ]; +} + +// Request object for `ListBrowserLanguages` method. +message ListBrowserLanguagesRequest { + // Required. The parent, which owns this collection of BrowserLanguages. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `BrowserLanguages` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `BrowserLanguages` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListBrowserLanguages` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListBrowserLanguages` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListBrowserLanguagesRequest` containing matching +// `BrowserLanguage` objects. +message ListBrowserLanguagesResponse { + // The `BrowserLanguage` objects from the specified network. + repeated BrowserLanguage browser_languages = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `BrowserLanguage` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_messages.proto new file mode 100644 index 000000000000..9832c9a7fb29 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_messages.proto @@ -0,0 +1,51 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "BrowserMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a browser, including its version. +message Browser { + option (google.api.resource) = { + type: "admanager.googleapis.com/Browser" + pattern: "networks/{network_code}/browsers/{browser}" + plural: "browsers" + singular: "browser" + }; + + // Identifier. The resource name of the `Browser`. + // Format: `networks/{network_code}/browsers/{browser}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The display name of the browser, including version info. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The major version of the browser. + optional string major_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The minor version of the browser. + optional string minor_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_service.proto new file mode 100644 index 000000000000..dd7ec45a3c7e --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/browser_service.proto @@ -0,0 +1,128 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/browser_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "BrowserServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Browser` objects. +service BrowserService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Browser` object. + rpc GetBrowser(GetBrowserRequest) returns (Browser) { + option (google.api.http) = { + get: "/v1/{name=networks/*/browsers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Browser` objects. + rpc ListBrowsers(ListBrowsersRequest) returns (ListBrowsersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/browsers" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetBrowser` method. +message GetBrowserRequest { + // Required. The resource name of the Browser. + // Format: `networks/{network_code}/browsers/{browser_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Browser" + } + ]; +} + +// Request object for `ListBrowsers` method. +message ListBrowsersRequest { + // Required. The parent, which owns this collection of Browsers. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Browsers` to return. The service may + // return fewer than this value. If unspecified, at most 50 `Browsers` will be + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListBrowsers` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListBrowsers` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListBrowsersRequest` containing matching `Browser` +// objects. +message ListBrowsersResponse { + // The `Browser` objects from the specified network. + repeated Browser browsers = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Browser` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_enums.proto new file mode 100644 index 000000000000..808075813438 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_enums.proto @@ -0,0 +1,41 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataKeyEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [CmsMetadataKeyStatus][google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus] +message CmsMetadataKeyStatusEnum { + // Status for CmsMetadataKey objects. + enum CmsMetadataKeyStatus { + // Default value. This value is unused. + CMS_METADATA_KEY_STATUS_UNSPECIFIED = 0; + + // The key is active. + ACTIVE = 1; + + // The key is not active. + INACTIVE = 2; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_messages.proto new file mode 100644 index 000000000000..4d36eca5b372 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_messages.proto @@ -0,0 +1,50 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/cms_metadata_key_enums.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataKeyMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Key associated with a piece of content from a publisher's CMS. +message CmsMetadataKey { + option (google.api.resource) = { + type: "admanager.googleapis.com/CmsMetadataKey" + pattern: "networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}" + plural: "cmsMetadataKeys" + singular: "cmsMetadataKey" + }; + + // Identifier. The resource name of the `CmsMetadataKey`. + // Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The key of a key-value pair. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The status of this CMS metadata key. + CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_service.proto new file mode 100644 index 000000000000..9195a7c91017 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_key_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/cms_metadata_key_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataKeyServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `CmsMetadataKey` objects. +service CmsMetadataKeyService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `CmsMetadataKey` object. + rpc GetCmsMetadataKey(GetCmsMetadataKeyRequest) returns (CmsMetadataKey) { + option (google.api.http) = { + get: "/v1/{name=networks/*/cmsMetadataKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CmsMetadataKey` objects. + rpc ListCmsMetadataKeys(ListCmsMetadataKeysRequest) + returns (ListCmsMetadataKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/cmsMetadataKeys" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetCmsMetadataKey` method. +message GetCmsMetadataKeyRequest { + // Required. The resource name of the CmsMetadataKey. + // Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CmsMetadataKey" + } + ]; +} + +// Request object for `ListCmsMetadataKeys` method. +message ListCmsMetadataKeysRequest { + // Required. The parent, which owns this collection of CmsMetadataKeys. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `CmsMetadataKeys` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `CmsMetadataKeys` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListCmsMetadataKeys` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCmsMetadataKeys` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCmsMetadataKeysRequest` containing matching +// `CmsMetadataKey` objects. +message ListCmsMetadataKeysResponse { + // The `CmsMetadataKey` objects from the specified network. + repeated CmsMetadataKey cms_metadata_keys = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `CmsMetadataKey` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_enums.proto new file mode 100644 index 000000000000..703869979f97 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_enums.proto @@ -0,0 +1,44 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataValueEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [CmsMetadataValueStatus][google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus] +message CmsMetadataValueStatusEnum { + // Status for CmsMetadataValue objects. + enum CmsMetadataValueStatus { + // Default value. This value is unused. + CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0; + + // The value is active. + ACTIVE = 1; + + // The value is archived. + ARCHIVED = 2; + + // The value is not active. + INACTIVE = 3; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_messages.proto new file mode 100644 index 000000000000..bcf9e7d64a4e --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_messages.proto @@ -0,0 +1,61 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/cms_metadata_value_enums.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataValueMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Key value pair associated with a piece of content from a publisher's CMS. +message CmsMetadataValue { + option (google.api.resource) = { + type: "admanager.googleapis.com/CmsMetadataValue" + pattern: "networks/{network_code}/cmsMetadataValues/{cms_metadata_value}" + plural: "cmsMetadataValues" + singular: "cmsMetadataValue" + }; + + // Identifier. The resource name of the `CmsMetadataValue`. + // Format: + // `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The value of this key-value pair. + string display_name = 3; + + // Required. Immutable. The resource name of the CmsMetadataKey. + // Format: "networks/{network_code}/cmsMetadataKey/{cms_metadata_key_id}" + string key = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CmsMetadataKey" + } + ]; + + // Output only. The status of this CMS metadata value. + CmsMetadataValueStatusEnum.CmsMetadataValueStatus status = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_service.proto new file mode 100644 index 000000000000..8e85a34443e4 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/cms_metadata_value_service.proto @@ -0,0 +1,130 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/cms_metadata_value_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CmsMetadataValueServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `CmsMetadataValue` objects. +service CmsMetadataValueService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `CmsMetadataKey` object. + rpc GetCmsMetadataValue(GetCmsMetadataValueRequest) + returns (CmsMetadataValue) { + option (google.api.http) = { + get: "/v1/{name=networks/*/cmsMetadataValues/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CmsMetadataValue` objects. + rpc ListCmsMetadataValues(ListCmsMetadataValuesRequest) + returns (ListCmsMetadataValuesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/cmsMetadataValues" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetCmsMetadataValue` method. +message GetCmsMetadataValueRequest { + // Required. The resource name of the CmsMetadataKey. + // Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CmsMetadataValue" + } + ]; +} + +// Request object for `ListCmsMetadataValues` method. +message ListCmsMetadataValuesRequest { + // Required. The parent, which owns this collection of CmsMetadataValues. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `CmsMetadataValues` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `CmsMetadataValues` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListCmsMetadataValues` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCmsMetadataValues` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCmsMetadataValuesRequest` containing matching +// `CmsMetadataValue` objects. +message ListCmsMetadataValuesResponse { + // The `CmsMetadataValue` objects from the specified network. + repeated CmsMetadataValue cms_metadata_values = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `CmsMetadataValue` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_messages.proto index ae2b839338f4..e3ceebaea39b 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_messages.proto @@ -44,51 +44,52 @@ message Company { string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. `Company` ID. - int64 company_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + optional int64 company_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The display name of the `Company`. // // This value has a maximum length of 127 characters. - string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + optional string display_name = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The type of the `Company`. - CompanyTypeEnum.CompanyType type = 4 [(google.api.field_behavior) = REQUIRED]; + optional CompanyTypeEnum.CompanyType type = 4 + [(google.api.field_behavior) = REQUIRED]; // Optional. The address for the `Company`. // // This value has a maximum length of 1024 characters. - string address = 5 [(google.api.field_behavior) = OPTIONAL]; + optional string address = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The email for the `Company`. // // This value has a maximum length of 128 characters. - string email = 6 [(google.api.field_behavior) = OPTIONAL]; + optional string email = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. The fax number for the `Company`. // // This value has a maximum length of 63 characters. - string fax = 7 [(google.api.field_behavior) = OPTIONAL]; + optional string fax = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The phone number for the `Company`. // // This value has a maximum length of 63 characters. - string phone = 8 [(google.api.field_behavior) = OPTIONAL]; + optional string phone = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. The external ID for the `Company`. // // This value has a maximum length of 255 characters. - string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; + optional string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. Comments about the `Company`. // // This value has a maximum length of 1024 characters. - string comment = 10 [(google.api.field_behavior) = OPTIONAL]; + optional string comment = 10 [(google.api.field_behavior) = OPTIONAL]; // Optional. The credit status of the `Company`. // // This attribute defaults to `ACTIVE` if basic settings are enabled and // `ON_HOLD` if advance settings are enabled. - CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 + optional CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. The labels that are directly applied to the `Company`. @@ -113,9 +114,10 @@ message Company { // Optional. The ID of the Google-recognized canonicalized form of the // `Company`. - int64 third_party_company_id = 16 [(google.api.field_behavior) = OPTIONAL]; + optional int64 third_party_company_id = 16 + [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the `Company` was last modified. - google.protobuf.Timestamp update_time = 15 + optional google.protobuf.Timestamp update_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_service.proto index e58a965cf6c5..2ea49655f716 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/company_service.proto @@ -78,8 +78,8 @@ message ListCompaniesRequest { // Optional. The maximum number of `Companies` to return. The service may // return fewer than this value. If unspecified, at most 50 `Companies` will - // be returned. The maximum value is 1000; values above 1000 will be coerced - // to 1000. + // be returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListCompanies` call. @@ -117,7 +117,7 @@ message ListCompaniesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_enums.proto new file mode 100644 index 000000000000..d614d05eef9a --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_enums.proto @@ -0,0 +1,57 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContactEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [ContactStatus][google.ads.admanager.v1.ContactStatusEnum.ContactStatus] +message ContactStatusEnum { + // Describes the contact statuses. + enum ContactStatus { + // Default value. This value is unused. + CONTACT_STATUS_UNSPECIFIED = 0; + + // The contact was invited to see their orders, but the invitation was + // cancelled. + INVITE_CANCELED = 1; + + // The contact has been invited to see their orders, but the invitation has + // already expired. + INVITE_EXPIRED = 2; + + // The contact has been invited to see their orders, but has not yet + // accepted the invitation. + INVITE_PENDING = 3; + + // The contact has not been invited to see their orders. + UNINVITED = 4; + + // The contact has access to login and view their orders. + USER_ACTIVE = 5; + + // The contact accepted an invitation to see their orders, but their access + // was later revoked. + USER_DISABLED = 6; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_messages.proto index cb298ad092ca..7cd654dc50b1 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_messages.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.ads.admanager.v1; +import "google/ads/admanager/v1/contact_enums.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -43,7 +44,49 @@ message Contact { // Format: `networks/{network_code}/contacts/{contact_id}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Output only. The display name of the Company. - optional string company_display_name = 19 + // Required. The name of the contact. This attribute has a maximum length of + // 127 characters. + optional string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The resource name of the Company. + // Format: "networks/{network_code}/companies/{company_id}" + optional string company = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Company" + } + ]; + + // Output only. The status of the contact. This attribute is assigned by + // Google. + optional ContactStatusEnum.ContactStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The address of the contact. This attribute has a maximum length + // of 1024 characters. + optional string address = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The cell phone number where the contact can be reached. + optional string cell_phone = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A free-form text comment for the contact. This attribute has a + // maximum length of 1024 characters. + optional string comment = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The e-mail address where the contact can be reached. This + // attribute has a maximum length of 128 characters. + optional string email = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fax number where the contact can be reached. This attribute + // has a maximum length of 1024 characters. + optional string fax = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The job title of the contact. This attribute has a maximum length + // of 1024 characters. + optional string title = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The work phone number where the contact can be reached. This + // attribute has a maximum length of 1024 characters. + optional string work_phone = 13 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_service.proto new file mode 100644 index 000000000000..8c5e14d0f7ff --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/contact_service.proto @@ -0,0 +1,244 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/contact_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContactServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Contact` objects. +service ContactService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Contact` object. + rpc GetContact(GetContactRequest) returns (Contact) { + option (google.api.http) = { + get: "/v1/{name=networks/*/contacts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Contact` objects. + rpc ListContacts(ListContactsRequest) returns (ListContactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/contacts" + }; + option (google.api.method_signature) = "parent"; + } + + // API to create a `Contact` object. + rpc CreateContact(CreateContactRequest) returns (Contact) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/contacts" + body: "contact" + }; + option (google.api.method_signature) = "parent,contact"; + } + + // API to batch create `Contact` objects. + rpc BatchCreateContacts(BatchCreateContactsRequest) + returns (BatchCreateContactsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/contacts:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to update a `Contact` object. + rpc UpdateContact(UpdateContactRequest) returns (Contact) { + option (google.api.http) = { + patch: "/v1/{contact.name=networks/*/contacts/*}" + body: "contact" + }; + option (google.api.method_signature) = "contact,update_mask"; + } + + // API to batch update `Contact` objects. + rpc BatchUpdateContacts(BatchUpdateContactsRequest) + returns (BatchUpdateContactsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/contacts:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } +} + +// Request object for `GetContact` method. +message GetContactRequest { + // Required. The resource name of the Contact. + // Format: `networks/{network_code}/contacts/{contact_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Contact" + } + ]; +} + +// Request object for `ListContacts` method. +message ListContactsRequest { + // Required. The parent, which owns this collection of Contacts. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Contacts` to return. The service may + // return fewer than this value. If unspecified, at most 50 `Contacts` will be + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListContacts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListContacts` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListContactsRequest` containing matching `Contact` +// objects. +message ListContactsResponse { + // The `Contact` objects from the specified network. + repeated Contact contacts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Contact` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} + +// Request object for `CreateContact` method. +message CreateContactRequest { + // Required. The parent resource where this `Contact` will be created. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Contact` to create. + Contact contact = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchCreateContacts` method. +message BatchCreateContactsRequest { + // Required. The parent resource where `Contacts` will be created. + // Format: `networks/{network_code}` + // The parent field in the CreateContactRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Contact` objects to create. + // A maximum of 100 objects can be created in a batch. + repeated CreateContactRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchCreateContacts` method. +message BatchCreateContactsResponse { + // The `Contact` objects created. + repeated Contact contacts = 1; +} + +// Request object for `UpdateContact` method. +message UpdateContactRequest { + // Required. The `Contact` to update. + // + // The `Contact`'s `name` is used to identify the `Contact` to update. + Contact contact = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchUpdateContacts` method. +message BatchUpdateContactsRequest { + // Required. The parent resource where `Contacts` will be updated. + // Format: `networks/{network_code}` + // The parent field in the UpdateContactRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Contact` objects to update. + // A maximum of 100 objects can be updated in a batch. + repeated UpdateContactRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchUpdateContacts` method. +message BatchUpdateContactsResponse { + // The `Contact` objects updated. + repeated Contact contacts = 1; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_messages.proto new file mode 100644 index 000000000000..4d4e367caa5e --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_messages.proto @@ -0,0 +1,53 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentBundleMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// A [ContentBundle][google.ads.admanager.v1.ContentBundle] is a grouping of +// individual [Content][google.ads.admanager.v1.Content]. A +// [ContentBundle][google.ads.admanager.v1.ContentBundle] is defined as +// including the [Content][google.ads.admanager.v1.Content] that match certain +// filter rules along with the option to explicitly include or exclude certain +// Content IDs. +message ContentBundle { + option (google.api.resource) = { + type: "admanager.googleapis.com/ContentBundle" + pattern: "networks/{network_code}/contentBundles/{content_bundle}" + plural: "contentBundles" + singular: "contentBundle" + }; + + // Identifier. The resource name of the + // [ContentBundle][google.ads.admanager.v1.ContentBundle]. Format: + // `networks/{network_code}/contentBundles/{content_bundle_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The name of the + // [ContentBundle][google.ads.admanager.v1.ContentBundle]. This attribute is + // required and has a maximum length of 255 characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_service.proto new file mode 100644 index 000000000000..e98409d5ea31 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_bundle_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/content_bundle_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentBundleServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `ContentBundle` objects. +service ContentBundleService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `ContentBundle` object. + rpc GetContentBundle(GetContentBundleRequest) returns (ContentBundle) { + option (google.api.http) = { + get: "/v1/{name=networks/*/contentBundles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `ContentBundle` objects. + rpc ListContentBundles(ListContentBundlesRequest) + returns (ListContentBundlesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/contentBundles" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetContentBundle` method. +message GetContentBundleRequest { + // Required. The resource name of the ContentBundle. + // Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/ContentBundle" + } + ]; +} + +// Request object for `ListContentBundles` method. +message ListContentBundlesRequest { + // Required. The parent, which owns this collection of ContentBundles. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `ContentBundles` to return. The service may + // return fewer than this value. If unspecified, at most 50 `ContentBundles` + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListContentBundles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListContentBundles` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListContentBundlesRequest` containing matching +// `ContentBundle` objects. +message ListContentBundlesResponse { + // The `ContentBundle` objects from the specified network. + repeated ContentBundle content_bundles = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `ContentBundle` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_messages.proto new file mode 100644 index 000000000000..b70ff07eda7e --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_messages.proto @@ -0,0 +1,45 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentLabelMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// A content label. +message ContentLabel { + option (google.api.resource) = { + type: "admanager.googleapis.com/ContentLabel" + pattern: "networks/{network_code}/contentLabels/{content_label}" + plural: "contentLabels" + singular: "contentLabel" + }; + + // Identifier. The resource name of the `ContentLabel`. + // Format: `networks/{network_code}/contentLabels/{content_label_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The display name of the `ContentLabel`. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_service.proto new file mode 100644 index 000000000000..4e9e76a79f84 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_label_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/content_label_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentLabelServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `ContentLabel` objects. +service ContentLabelService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `ContentLabel` object. + rpc GetContentLabel(GetContentLabelRequest) returns (ContentLabel) { + option (google.api.http) = { + get: "/v1/{name=networks/*/contentLabels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `ContentLabel` objects. + rpc ListContentLabels(ListContentLabelsRequest) + returns (ListContentLabelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/contentLabels" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetContentLabel` method. +message GetContentLabelRequest { + // Required. The resource name of the ContentLabel. + // Format: `networks/{network_code}/contentLabels/{content_label_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/ContentLabel" + } + ]; +} + +// Request object for `ListContentLabels` method. +message ListContentLabelsRequest { + // Required. The parent, which owns this collection of ContentLabels. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `ContentLabels` to return. The service may + // return fewer than this value. If unspecified, at most 50 `ContentLabels` + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListContentLabels` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListContentLabels` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListContentLabelsRequest` containing matching +// `ContentLabel` objects. +message ListContentLabelsResponse { + // The `ContentLabel` objects from the specified network. + repeated ContentLabel content_labels = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `ContentLabel` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_messages.proto new file mode 100644 index 000000000000..0bdf49d68fb2 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_messages.proto @@ -0,0 +1,45 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// A piece of content from a Publisher's CMS. +message Content { + option (google.api.resource) = { + type: "admanager.googleapis.com/Content" + pattern: "networks/{network_code}/content/{content}" + plural: "content" + singular: "content" + }; + + // Identifier. The resource name of the `Content`. + // Format: `networks/{network_code}/content/{content_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The name of the `Content`. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_service.proto new file mode 100644 index 000000000000..a3b0cbb8fb47 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/content_service.proto @@ -0,0 +1,128 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/content_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContentServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Content` objects. +service ContentService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Content` object. + rpc GetContent(GetContentRequest) returns (Content) { + option (google.api.http) = { + get: "/v1/{name=networks/*/content/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Content` objects. + rpc ListContent(ListContentRequest) returns (ListContentResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/content" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetContent` method. +message GetContentRequest { + // Required. The resource name of the Content. + // Format: `networks/{network_code}/content/{content_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Content" + } + ]; +} + +// Request object for `ListContent` method. +message ListContentRequest { + // Required. The parent, which owns this collection of Content. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Content` to return. The service may return + // fewer than this value. If unspecified, at most 50 `Content` will be + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListContent` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListContent` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListContentRequest` containing matching `Content` +// objects. +message ListContentResponse { + // The `Content` objects from the specified network. + repeated Content content = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Content` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_enums.proto new file mode 100644 index 000000000000..b527bc0b1ce0 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_enums.proto @@ -0,0 +1,63 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativeTemplateEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [CreativeTemplateType][google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType] +message CreativeTemplateTypeEnum { + // Describes type of the creative template. + enum CreativeTemplateType { + // Default value. This value is unused. + CREATIVE_TEMPLATE_TYPE_UNSPECIFIED = 0; + + // Creative templates that are included in Ad Manager by default. + STANDARD = 1; + + // Creative templates created by an administrator or other user in the + // network. + CUSTOM = 2; + } +} + +// Wrapper message for +// [CreativeTemplateStatus][google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus] +message CreativeTemplateStatusEnum { + // Describes status of the creative template + enum CreativeTemplateStatus { + // Default value. This value is unused. + CREATIVE_TEMPLATE_STATUS_UNSPECIFIED = 0; + + // The CreativeTemplate is active + ACTIVE = 1; + + // The CreativeTemplate is deleted. Creatives created from this + // CreativeTemplate can no longer serve. + DELETED = 2; + + // The CreativeTemplate is inactive. Users cannot create new creatives + // from this template, but existing ones can be edited and continue to serve + INACTIVE = 3; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_messages.proto new file mode 100644 index 000000000000..35cd155fde6f --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_messages.proto @@ -0,0 +1,253 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/creative_template_enums.proto"; +import "google/ads/admanager/v1/creative_template_variable_url_type_enum.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativeTemplateMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// A template that can be used to create a [TemplateCreative][]. +message CreativeTemplate { + option (google.api.resource) = { + type: "admanager.googleapis.com/CreativeTemplate" + pattern: "networks/{network_code}/creativeTemplates/{creative_template}" + plural: "creativeTemplates" + singular: "creativeTemplate" + }; + + // Identifier. The resource name of the creative template. + // Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The display name of the creative template. This has a maximum + // length of 255 characters. + optional string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the creative template. + optional string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The code snippet of the creative template, with placeholders for + // the associated variables. + optional string snippet = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The status of the creative template. This attribute is + // assigned by Google. + optional CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of the creative template. Users can only create or + // update `CreativeTemplateType.CUSTOM` templates. + optional CreativeTemplateTypeEnum.CreativeTemplateType type = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. `True` if this creative template produces out-of-page creatives. + // Creative templates with this setting enabled must include the viewed + // impression macro. + optional bool interstitial = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. `True` if this creative template produces native-eligible + // creatives. + optional bool native_eligible = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. `True` if this creative template produces native video-eligible + // creatives. + optional bool native_video_eligible = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the Creative produced is compatible for SafeFrame + // rendering. This attribute defaults to `True`. + optional bool safe_frame_compatible = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The list of creative template variables. + repeated CreativeTemplateVariable variables = 14 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a variable defined in a creative template. +message CreativeTemplateVariable { + // Represents a file asset variable defined in a creative template. + // + // Use [AssetCreativeTemplateVariableValue][] to specify the value for this + // variable when creating a [TemplateCreative][] from a + // [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate]. + message AssetCreativeTemplateVariable { + // Different MIME types that the asset variable supports. + enum MimeType { + // Default value. This value is unused. + MIME_TYPE_UNSPECIFIED = 0; + + // The `image/jpeg` MIME type. + JPG = 1; + + // The `image/png` MIME type. + PNG = 2; + + // The `image/gif` MIME type. + GIF = 3; + } + + // Optional. The set of allowed MIME types. If unspecified, all MIME types + // are allowed. + repeated MimeType mime_types = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a list variable defined in a creative template. This is similar + // to + // [StringCreativeTemplateVariable][google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable], + // except that there are possible choices to choose from. + // + // Use [StringCreativeTemplateVariableValue][] to specify the value + // for this variable when creating a [TemplateCreative][] from a + // [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate]. + message ListStringCreativeTemplateVariable { + // Stores variable choices selectable by users. + message VariableChoice { + // Required. A label is displayed to users when creating a + // [TemplateCreative][]. This attribute is intended to be more descriptive + // than value. This attribute has a maximum length of 255 characters. + optional string label = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When creating a [TemplateCreative][], the value in + // [StringCreativeTemplateVariableValue][] should match this value, if you + // intend to select this value. This attribute has a maximum length of 255 + // characters. + optional string value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. Default value to be filled in when creating creatives from the + // creative template. + optional string default_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sample value that is used when previewing the template in the + // UI. + optional string sample_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The selectable values that the user can choose from. + repeated VariableChoice choices = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. `True` if a user can specify an 'other' value. For example, if + // a variable called backgroundColor is defined as a list with values: red, + // green, blue, this boolean can be set to allow a user to enter a value not + // on the list such as purple. + optional bool allow_other_choice = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a long variable defined in a creative template. + // + // Use [LongCreativeTemplateVariableValue][] to specify the value + // for this variable when creating [TemplateCreative][] from a + // [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate]. + message LongCreativeTemplateVariable { + // Optional. Default value to be filled in when creating creatives from the + // creative template. + optional int64 default_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sample value that is used when previewing the template in the + // UI. + optional int64 sample_value = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a string variable defined in a creative template. + // + // Use [StringCreativeTemplateVariableValue][] to specify the value + // for this variable when creating [TemplateCreative][] from a + // [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate]. + message StringCreativeTemplateVariable { + // Optional. Default value to be filled in when creating creatives from the + // creative template. + optional string default_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sample value that is used when previewing the template in the + // UI. + optional string sample_value = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a url variable defined in a creative template. + // + // Use [UrlCreativeTemplateVariableValue][] to specify the value for this + // variable when creating a [TemplateCreative][] from a + // [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate]. + message UrlCreativeTemplateVariable { + // Optional. Default value to be filled in when creating creatives from the + // creative template. + optional string default_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sample value that is used when previewing the template in the + // UI. + optional string sample_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of URL that this variable represents. Different types + // of URLs may be handled differently at rendering time. + optional CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType + url_type = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specific type of variable represented by this + // [CreativeTemplateVariable][google.ads.admanager.v1.CreativeTemplateVariable]. + // Exactly one must be set. + oneof SubType { + // Optional. Represents a file asset variable defined in a creative + // template. + AssetCreativeTemplateVariable asset_variable = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents a list variable defined in a creative template. + ListStringCreativeTemplateVariable list_string_variable = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents a long variable defined in a creative template. + LongCreativeTemplateVariable long_variable = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents a string variable defined in a creative template. + StringCreativeTemplateVariable string_variable = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents a url variable defined in a creative template. + UrlCreativeTemplateVariable url_variable = 10 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Label that is displayed to users when creating from the creative + // template. This has a maximum length of 127 characters. + optional string label = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Unique name used to identify the variable. This attribute is + // assigned by Google when a creative template variable is created. + optional string unique_display_name = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A descriptive help text that is displayed to users along with the + // label. This attribute has a maximum length of 255 characters. + optional string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. `True` if this variable is required to be filled in by users when + // creating a creative from the creative template. + optional bool required = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_service.proto new file mode 100644 index 000000000000..eb41eee91c0d --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_service.proto @@ -0,0 +1,130 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/creative_template_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativeTemplateServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `CreativeTemplate` objects. +service CreativeTemplateService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `CreativeTemplate` object. + rpc GetCreativeTemplate(GetCreativeTemplateRequest) + returns (CreativeTemplate) { + option (google.api.http) = { + get: "/v1/{name=networks/*/creativeTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CreativeTemplate` objects. + rpc ListCreativeTemplates(ListCreativeTemplatesRequest) + returns (ListCreativeTemplatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/creativeTemplates" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetCreativeTemplate` method. +message GetCreativeTemplateRequest { + // Required. The resource name of the CreativeTemplate. + // Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CreativeTemplate" + } + ]; +} + +// Request object for `ListCreativeTemplates` method. +message ListCreativeTemplatesRequest { + // Required. The parent, which owns this collection of CreativeTemplates. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `CreativeTemplates` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `CreativeTemplates` will be returned. The maximum value is 1000; values + // greater than 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListCreativeTemplates` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCreativeTemplates` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCreativeTemplatesRequest` containing matching +// `CreativeTemplate` objects. +message ListCreativeTemplatesResponse { + // The `CreativeTemplate` objects from the specified network. + repeated CreativeTemplate creative_templates = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `CreativeTemplate` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto new file mode 100644 index 000000000000..047dc52233bc --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto @@ -0,0 +1,47 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativeTemplateVariableUrlTypeEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [CreativeTemplateVariableUrlType][google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType] +message CreativeTemplateVariableUrlTypeEnum { + // Types of URLs that a UrlCreativeTemplateVariable can represent. + enum CreativeTemplateVariableUrlType { + // Default value. This value is unused. + CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED = 0; + + // Click tracking URL. + CLICK_TRACKER = 1; + + // Deep-link URL. + DEEPLINK = 2; + + // Impression tracking URL. + IMPRESSION_TRACKER = 3; + + // Standard HTTP URL. + STANDARD_HTTP = 4; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_messages.proto index 5eb700ba3fd7..28adb97f68ca 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_messages.proto @@ -78,8 +78,11 @@ message CustomField { // An option for a drop-down `CustomField`. message CustomFieldOption { - // Output only. `CustomFieldOption` ID. - int64 custom_field_option_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Non-empty default. `CustomFieldOption` ID. + int64 custom_field_option_id = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = NON_EMPTY_DEFAULT + ]; // Required. The display name of the `CustomFieldOption`. // diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_service.proto index 635299f00c38..75dd5190088b 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_field_service.proto @@ -21,6 +21,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.AdManager.V1"; option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; @@ -52,6 +53,64 @@ service CustomFieldService { }; option (google.api.method_signature) = "parent"; } + + // API to create a `CustomField` object. + rpc CreateCustomField(CreateCustomFieldRequest) returns (CustomField) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/customFields" + body: "custom_field" + }; + option (google.api.method_signature) = "parent,custom_field"; + } + + // API to batch create `CustomField` objects. + rpc BatchCreateCustomFields(BatchCreateCustomFieldsRequest) + returns (BatchCreateCustomFieldsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/customFields:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to update a `CustomField` object. + rpc UpdateCustomField(UpdateCustomFieldRequest) returns (CustomField) { + option (google.api.http) = { + patch: "/v1/{custom_field.name=networks/*/customFields/*}" + body: "custom_field" + }; + option (google.api.method_signature) = "custom_field,update_mask"; + } + + // API to batch update `CustomField` objects. + rpc BatchUpdateCustomFields(BatchUpdateCustomFieldsRequest) + returns (BatchUpdateCustomFieldsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/customFields:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Activates a list of `CustomField` objects. + rpc BatchActivateCustomFields(BatchActivateCustomFieldsRequest) + returns (BatchActivateCustomFieldsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/customFields:batchActivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // Deactivates a list of `CustomField` objects. + rpc BatchDeactivateCustomFields(BatchDeactivateCustomFieldsRequest) + returns (BatchDeactivateCustomFieldsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/customFields:batchDeactivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } } // Request object for `GetCustomField` method. @@ -79,8 +138,8 @@ message ListCustomFieldsRequest { // Optional. The maximum number of `CustomFields` to return. The service may // return fewer than this value. If unspecified, at most 50 `CustomFields` - // will be returned. The maximum value is 1000; values above 1000 will be - // coerced to 1000. + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListCustomFields` call. @@ -118,7 +177,7 @@ message ListCustomFieldsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. @@ -127,3 +186,126 @@ message ListCustomFieldsResponse { // https://developers.google.com/ad-manager/api/beta/field-masks int32 total_size = 3; } + +// Request object for `CreateCustomField` method. +message CreateCustomFieldRequest { + // Required. The parent resource where this `CustomField` will be created. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `CustomField` to create. + CustomField custom_field = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchCreateCustomFields` method. +message BatchCreateCustomFieldsRequest { + // Required. The parent resource where `CustomFields` will be created. + // Format: `networks/{network_code}` + // The parent field in the CreateCustomFieldRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `CustomField` objects to create. + // A maximum of 100 objects can be created in a batch. + repeated CreateCustomFieldRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchCreateCustomFields` method. +message BatchCreateCustomFieldsResponse { + // The `CustomField` objects created. + repeated CustomField custom_fields = 1; +} + +// Request object for `UpdateCustomField` method. +message UpdateCustomFieldRequest { + // Required. The `CustomField` to update. + // + // The `CustomField`'s `name` is used to identify the `CustomField` to update. + CustomField custom_field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchUpdateCustomFields` method. +message BatchUpdateCustomFieldsRequest { + // Required. The parent resource where `CustomFields` will be updated. + // Format: `networks/{network_code}` + // The parent field in the UpdateCustomFieldRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `CustomField` objects to update. + // A maximum of 100 objects can be updated in a batch. + repeated UpdateCustomFieldRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchUpdateCustomFields` method. +message BatchUpdateCustomFieldsResponse { + // The `CustomField` objects updated. + repeated CustomField custom_fields = 1; +} + +// Request message for `BatchActivateCustomFields` method. +message BatchActivateCustomFieldsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `CustomField` objects to activate. + // Format: `networks/{network_code}/customFields/{custom_field_id}` + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomField" + } + ]; +} + +// Response object for `BatchActivateCustomFields` method. +message BatchActivateCustomFieldsResponse {} + +// Request message for `BatchDeactivateCustomFields` method. +message BatchDeactivateCustomFieldsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `CustomField` objects to deactivate. + // Format: `networks/{network_code}/customFields/{custom_field_id}` + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomField" + } + ]; +} + +// Response object for `BatchDeactivateCustomFields` method. +message BatchDeactivateCustomFieldsResponse {} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto index 274f074b169d..1aefb852467c 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto @@ -43,27 +43,28 @@ message CustomTargetingKey { string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. `CustomTargetingKey` ID. - int64 custom_targeting_key_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + optional int64 custom_targeting_key_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Name of the key. Keys can contain up to 10 characters each. You // can use alphanumeric characters and symbols other than the following: // ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. - string ad_tag_name = 3 [(google.api.field_behavior) = IMMUTABLE]; + optional string ad_tag_name = 3 [(google.api.field_behavior) = IMMUTABLE]; // Optional. Descriptive name for the `CustomTargetingKey`. - string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + optional string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. Indicates whether users will select from predefined values or // create new targeting values, while specifying targeting criteria for a line // item. - CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 + optional CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(google.api.field_behavior) = REQUIRED]; // Output only. Status of the `CustomTargetingKey`. - CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 + optional CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Reportable state of the `CustomTargetingKey`. - CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType + optional CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_service.proto index b89df8e135d1..d211d674992b 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_key_service.proto @@ -120,7 +120,7 @@ message ListCustomTargetingKeysResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto index a99484d6e7a5..e5cfc36627c5 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto @@ -45,7 +45,7 @@ message CustomTargetingValue { // Required. Immutable. The resource name of the `CustomTargetingKey`. // Format: // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` - string custom_targeting_key = 8 [ + optional string custom_targeting_key = 8 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE, (google.api.resource_reference) = { @@ -58,20 +58,20 @@ message CustomTargetingValue { // the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are // not data-specific; all values are treated as strings. For example, instead // of using "age>=18 AND <=34", try "18-34" - string ad_tag_name = 4 [(google.api.field_behavior) = IMMUTABLE]; + optional string ad_tag_name = 4 [(google.api.field_behavior) = IMMUTABLE]; // Optional. Descriptive name for the `CustomTargetingValue`. - string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + optional string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; // Required. Immutable. The way in which the CustomTargetingValue.name strings // will be matched. - CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 - [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = REQUIRED - ]; + optional CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType + match_type = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; // Output only. Status of the `CustomTargetingValue`. - CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 + optional CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_service.proto index 177e0c8c60f5..6b6759f633b1 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/custom_targeting_value_service.proto @@ -129,7 +129,7 @@ message ListCustomTargetingValuesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_messages.proto new file mode 100644 index 000000000000..cc8540dc539c --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_messages.proto @@ -0,0 +1,45 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "DeviceCapabilityMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a device capability. +message DeviceCapability { + option (google.api.resource) = { + type: "admanager.googleapis.com/DeviceCapability" + pattern: "networks/{network_code}/deviceCapabilities/{device_capability}" + plural: "deviceCapabilities" + singular: "deviceCapability" + }; + + // Identifier. The resource name of the `DeviceCapability`. + // Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The localized name of the device capability. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_service.proto new file mode 100644 index 000000000000..0846ba2d61d7 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_capability_service.proto @@ -0,0 +1,130 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/device_capability_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "DeviceCapabilityServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `DeviceCapability` objects. +service DeviceCapabilityService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `DeviceCapability` object. + rpc GetDeviceCapability(GetDeviceCapabilityRequest) + returns (DeviceCapability) { + option (google.api.http) = { + get: "/v1/{name=networks/*/deviceCapabilities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `DeviceCapability` objects. + rpc ListDeviceCapabilities(ListDeviceCapabilitiesRequest) + returns (ListDeviceCapabilitiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/deviceCapabilities" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetDeviceCapability` method. +message GetDeviceCapabilityRequest { + // Required. The resource name of the DeviceCapability. + // Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceCapability" + } + ]; +} + +// Request object for `ListDeviceCapabilities` method. +message ListDeviceCapabilitiesRequest { + // Required. The parent, which owns this collection of DeviceCapabilities. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `DeviceCapabilities` to return. The service + // may return fewer than this value. If unspecified, at most 50 + // `DeviceCapabilities` will be returned. The maximum value is 1000; values + // above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDeviceCapabilities` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDeviceCapabilities` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListDeviceCapabilitiesRequest` containing matching +// `DeviceCapability` objects. +message ListDeviceCapabilitiesResponse { + // The `DeviceCapability` objects from the specified network. + repeated DeviceCapability device_capabilities = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `DeviceCapability` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_category_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_category_service.proto index 18cfd6c365eb..50f98f28408e 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_category_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_category_service.proto @@ -80,7 +80,7 @@ message ListDeviceCategoriesRequest { // Optional. The maximum number of `DeviceCategories` to return. The service // may return fewer than this value. If unspecified, at most 50 // `DeviceCategories` will be returned. The maximum value is 1000; values - // above 1000 will be coerced to 1000. + // greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListDeviceCategories` @@ -118,7 +118,7 @@ message ListDeviceCategoriesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_messages.proto new file mode 100644 index 000000000000..4721509a2711 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_messages.proto @@ -0,0 +1,46 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "DeviceManufacturerMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a device manufacturer. +message DeviceManufacturer { + option (google.api.resource) = { + type: "admanager.googleapis.com/DeviceManufacturer" + pattern: "networks/{network_code}/deviceManufacturers/{device_manufacturer}" + plural: "deviceManufacturers" + singular: "deviceManufacturer" + }; + + // Identifier. The resource name of the `DeviceManufacturer`. + // Format: + // `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The localized name of the device manufacturer. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_service.proto new file mode 100644 index 000000000000..68762f4f11a6 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/device_manufacturer_service.proto @@ -0,0 +1,131 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/device_manufacturer_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "DeviceManufacturerServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `DeviceManufacturer` objects. +service DeviceManufacturerService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `DeviceManufacturer` object. + rpc GetDeviceManufacturer(GetDeviceManufacturerRequest) + returns (DeviceManufacturer) { + option (google.api.http) = { + get: "/v1/{name=networks/*/deviceManufacturers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `DeviceManufacturer` objects. + rpc ListDeviceManufacturers(ListDeviceManufacturersRequest) + returns (ListDeviceManufacturersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/deviceManufacturers" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetDeviceManufacturer` method. +message GetDeviceManufacturerRequest { + // Required. The resource name of the DeviceManufacturer. + // Format: + // `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceManufacturer" + } + ]; +} + +// Request object for `ListDeviceManufacturers` method. +message ListDeviceManufacturersRequest { + // Required. The parent, which owns this collection of DeviceManufacturers. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `DeviceManufacturers` to return. The + // service may return fewer than this value. If unspecified, at most 50 + // `DeviceManufacturers` will be returned. The maximum value is 1000; values + // above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDeviceManufacturers` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDeviceManufacturers` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListDeviceManufacturersRequest` containing matching +// `DeviceManufacturer` objects. +message ListDeviceManufacturersResponse { + // The `DeviceManufacturer` objects from the specified network. + repeated DeviceManufacturer device_manufacturers = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `DeviceManufacturer` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto index 0eaa475b9e88..d5b8a3ca1dba 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto @@ -195,7 +195,7 @@ message ListEntitySignalsMappingsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto new file mode 100644 index 000000000000..9233674de448 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto @@ -0,0 +1,47 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ExchangeSyndicationProductEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [ExchangeSyndicationProduct][google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct] +message ExchangeSyndicationProductEnum { + // Ad Exchange syndication product. + enum ExchangeSyndicationProduct { + // No value specified + EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED = 0; + + // Property serves in-browser. + DISPLAY = 1; + + // Property serves on mobile applications (includes JS and SDK). + MOBILE_APP = 2; + + // Property serves video (includes audio). + VIDEO_AND_AUDIO = 3; + + // Property serves for games. + GAMES = 4; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/geo_target_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/geo_target_service.proto index 88f22a973369..bc062638365f 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/geo_target_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/geo_target_service.proto @@ -78,8 +78,8 @@ message ListGeoTargetsRequest { // Optional. The maximum number of `GeoTargets` to return. The service may // return fewer than this value. If unspecified, at most 50 `GeoTargets` will - // be returned. The maximum value is 1000; values above 1000 will be coerced - // to 1000. + // be returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListGeoTargets` call. @@ -117,7 +117,7 @@ message ListGeoTargetsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_messages.proto new file mode 100644 index 000000000000..d2e64e788017 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_messages.proto @@ -0,0 +1,48 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileCarrierMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a mobile carrier. +message MobileCarrier { + option (google.api.resource) = { + type: "admanager.googleapis.com/MobileCarrier" + pattern: "networks/{network_code}/mobileCarriers/{mobile_carrier}" + plural: "mobileCarriers" + singular: "mobileCarrier" + }; + + // Identifier. The resource name of the `MobileCarrier`. + // Format: `networks/{network_code}/mobileCarriers/{mobile_carrier}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The localized name of the mobile carrier. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The region code of the mobile carrier. + optional string region_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_service.proto new file mode 100644 index 000000000000..b4754130cd67 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_carrier_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/mobile_carrier_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileCarrierServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `MobileCarrier` objects. +service MobileCarrierService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `MobileCarrier` object. + rpc GetMobileCarrier(GetMobileCarrierRequest) returns (MobileCarrier) { + option (google.api.http) = { + get: "/v1/{name=networks/*/mobileCarriers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `MobileCarrier` objects. + rpc ListMobileCarriers(ListMobileCarriersRequest) + returns (ListMobileCarriersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/mobileCarriers" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetMobileCarrier` method. +message GetMobileCarrierRequest { + // Required. The resource name of the MobileCarrier. + // Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileCarrier" + } + ]; +} + +// Request object for `ListMobileCarriers` method. +message ListMobileCarriersRequest { + // Required. The parent, which owns this collection of MobileCarriers. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `MobileCarriers` to return. The service may + // return fewer than this value. If unspecified, at most 50 `MobileCarriers` + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListMobileCarriers` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMobileCarriers` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListMobileCarriersRequest` containing matching +// `MobileCarrier` objects. +message ListMobileCarriersResponse { + // The `MobileCarrier` objects from the specified network. + repeated MobileCarrier mobile_carriers = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `MobileCarrier` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_messages.proto new file mode 100644 index 000000000000..478534b116b3 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_messages.proto @@ -0,0 +1,54 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a mobile device. +message MobileDevice { + option (google.api.resource) = { + type: "admanager.googleapis.com/MobileDevice" + pattern: "networks/{network_code}/mobileDevices/{mobile_device}" + plural: "mobileDevices" + singular: "mobileDevice" + }; + + // Identifier. The resource name of the `MobileDevice`. + // Format: `networks/{network_code}/mobileDevices/{mobile_device}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The localized name of the mobile device. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The manufacturer associated with the mobile device. + // Format: `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + optional string manufacturer = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceManufacturer" + } + ]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_service.proto new file mode 100644 index 000000000000..d78870fe1d18 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_service.proto @@ -0,0 +1,129 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/mobile_device_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `MobileDevice` objects. +service MobileDeviceService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `MobileDevice` object. + rpc GetMobileDevice(GetMobileDeviceRequest) returns (MobileDevice) { + option (google.api.http) = { + get: "/v1/{name=networks/*/mobileDevices/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `MobileDevice` objects. + rpc ListMobileDevices(ListMobileDevicesRequest) + returns (ListMobileDevicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/mobileDevices" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetMobileDevice` method. +message GetMobileDeviceRequest { + // Required. The resource name of the MobileDevice. + // Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDevice" + } + ]; +} + +// Request object for `ListMobileDevices` method. +message ListMobileDevicesRequest { + // Required. The parent, which owns this collection of MobileDevices. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `MobileDevices` to return. The service may + // return fewer than this value. If unspecified, at most 50 `MobileDevices` + // will be returned. The maximum value is 1000; values greater than 1000 will + // be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListMobileDevices` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMobileDevices` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListMobileDevicesRequest` containing matching +// `MobileDevice` objects. +message ListMobileDevicesResponse { + // The `MobileDevice` objects from the specified network. + repeated MobileDevice mobile_devices = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `MobileDevice` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto new file mode 100644 index 000000000000..bbcaf480913f --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto @@ -0,0 +1,55 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceSubmodelMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a mobile device submodel. +message MobileDeviceSubmodel { + option (google.api.resource) = { + type: "admanager.googleapis.com/MobileDeviceSubmodel" + pattern: "networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}" + plural: "mobileDeviceSubmodels" + singular: "mobileDeviceSubmodel" + }; + + // Identifier. The resource name of the `MobileDeviceSubmodel`. + // Format: + // `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The display name of the mobile device submodel. + optional string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The mobile device associated with the submodel. + // Format: `networks/{network_code}/mobileDevices/{mobile_device}` + optional string mobile_device = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDevice" + } + ]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_service.proto new file mode 100644 index 000000000000..1a498c5701dd --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/mobile_device_submodel_service.proto @@ -0,0 +1,133 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/mobile_device_submodel_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "MobileDeviceSubmodelServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `MobileDeviceSubmodel` objects. +service MobileDeviceSubmodelService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `MobileDeviceSubmodel` object. + rpc GetMobileDeviceSubmodel(GetMobileDeviceSubmodelRequest) + returns (MobileDeviceSubmodel) { + option (google.api.http) = { + get: "/v1/{name=networks/*/mobileDeviceSubmodels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `MobileDeviceSubmodel` objects. + rpc ListMobileDeviceSubmodels(ListMobileDeviceSubmodelsRequest) + returns (ListMobileDeviceSubmodelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/mobileDeviceSubmodels" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request object for `GetMobileDeviceSubmodel` method. +message GetMobileDeviceSubmodelRequest { + // Required. The resource name of the MobileDeviceSubmodel. + // Format: + // `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDeviceSubmodel" + } + ]; +} + +// Request object for `ListMobileDeviceSubmodels` method. +message ListMobileDeviceSubmodelsRequest { + // Required. The parent, which owns this collection of MobileDeviceSubmodels. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `MobileDeviceSubmodels` to return. The + // service may return fewer than this value. If unspecified, at most 50 + // `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + // above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListMobileDeviceSubmodels` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListMobileDeviceSubmodelsRequest` containing matching +// `MobileDeviceSubmodel` objects. +message ListMobileDeviceSubmodelsResponse { + // The `MobileDeviceSubmodel` objects from the specified network. + repeated MobileDeviceSubmodel mobile_device_submodels = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `MobileDeviceSubmodel` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_service.proto index dddc6015063b..262e92faff6f 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_service.proto @@ -80,7 +80,7 @@ message ListOperatingSystemsRequest { // Optional. The maximum number of `OperatingSystems` to return. The service // may return fewer than this value. If unspecified, at most 50 // `OperatingSystems` will be returned. The maximum value is 1000; values - // above 1000 will be coerced to 1000. + // greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListOperatingSystems` @@ -118,7 +118,7 @@ message ListOperatingSystemsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_version_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_version_service.proto index 2b4576dec5c8..c1eab639a330 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_version_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/operating_system_version_service.proto @@ -82,7 +82,7 @@ message ListOperatingSystemVersionsRequest { // Optional. The maximum number of `OperatingSystemVersions` to return. The // service may return fewer than this value. If unspecified, at most 50 // `OperatingSystemVersions` will be returned. The maximum value is 1000; - // values above 1000 will be coerced to 1000. + // values greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous @@ -122,7 +122,7 @@ message ListOperatingSystemVersionsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_messages.proto index 0e19658863b7..88b9115f2020 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_messages.proto @@ -114,8 +114,7 @@ message Order { ]; // Output only. The resource name of the User who created the Order on behalf - // of the advertiser. This value is assigned by Google. Format: - // "networks/{network_code}/users/{user_id}" + // of the advertiser. Format: "networks/{network_code}/users/{user_id}" optional string creator = 10 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } @@ -126,15 +125,15 @@ message Order { optional string currency_code = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The instant at which the Order and its associated line items - // are eligible to begin serving. This attribute is derived from the line item - // of the order that has the earliest LineItem.start_time. + // Output only. The instant at which the Order and its associated Line items + // are eligible to begin serving. This attribute is derived from the Line item + // of the order that has the earliest `LineItem.start_time`. optional google.protobuf.Timestamp start_time = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The instant at which the Order and its associated line items - // stop being served. This attribute is derived from the line item of the - // order that has the latest LineItem.end_time. + // Output only. The instant at which the Order and its associated Line items + // stop being served. This attribute is derived from the Line item of the + // order that has the latest `LineItem.end_time`. optional google.protobuf.Timestamp end_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_service.proto index d86a8524f96b..ce4b6836b6a7 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/order_service.proto @@ -81,8 +81,8 @@ message ListOrdersRequest { // Optional. The maximum number of `Orders` to return. The service may return // fewer than this value. If unspecified, at most 50 `Orders` will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListOrders` call. @@ -120,7 +120,7 @@ message ListOrdersResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/placement_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/placement_service.proto index 9fc6b91420af..d60dcceab271 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/placement_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/placement_service.proto @@ -21,6 +21,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Ads.AdManager.V1"; option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; @@ -51,6 +52,74 @@ service PlacementService { }; option (google.api.method_signature) = "parent"; } + + // API to create an `Placement` object. + rpc CreatePlacement(CreatePlacementRequest) returns (Placement) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements" + body: "placement" + }; + option (google.api.method_signature) = "parent,placement"; + } + + // API to update an `Placement` object. + rpc UpdatePlacement(UpdatePlacementRequest) returns (Placement) { + option (google.api.http) = { + patch: "/v1/{placement.name=networks/*/placements/*}" + body: "placement" + }; + option (google.api.method_signature) = "placement,update_mask"; + } + + // API to batch create `Placement` objects. + rpc BatchCreatePlacements(BatchCreatePlacementsRequest) + returns (BatchCreatePlacementsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to batch update `Placement` objects. + rpc BatchUpdatePlacements(BatchUpdatePlacementsRequest) + returns (BatchUpdatePlacementsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Activates a list of `Placement` objects. + rpc BatchActivatePlacements(BatchActivatePlacementsRequest) + returns (BatchActivatePlacementsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements:batchActivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // Deactivates a list of `Placement` objects. + rpc BatchDeactivatePlacements(BatchDeactivatePlacementsRequest) + returns (BatchDeactivatePlacementsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements:batchDeactivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // Archives a list of `Placement` objects. + rpc BatchArchivePlacements(BatchArchivePlacementsRequest) + returns (BatchArchivePlacementsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/placements:batchArchive" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } } // Request object for `GetPlacement` method. @@ -78,8 +147,8 @@ message ListPlacementsRequest { // Optional. The maximum number of `Placements` to return. The service may // return fewer than this value. If unspecified, at most 50 `Placements` will - // be returned. The maximum value is 1000; values above 1000 will be coerced - // to 1000. + // be returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListPlacements` call. @@ -117,7 +186,7 @@ message ListPlacementsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. @@ -126,3 +195,151 @@ message ListPlacementsResponse { // https://developers.google.com/ad-manager/api/beta/field-masks int32 total_size = 3; } + +// Request object for `CreatePlacement` method. +message CreatePlacementRequest { + // Required. The parent resource where this `Placement` will be created. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Placement` to create. + Placement placement = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchCreatePlacements` method. +message BatchCreatePlacementsRequest { + // Required. The parent resource where the `Placement`s will be created. + // Format: `networks/{network_code}` + // The parent field in the CreatePlacementRequest messages match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Placement` objects to create. + // A maximum of 100 objects can be created in a batch. + repeated CreatePlacementRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchCreatePlacements` method. +message BatchCreatePlacementsResponse { + // The `Placement` objects created. + repeated Placement placements = 1; +} + +// Request object for `UpdatePlacement` method. +message UpdatePlacementRequest { + // Required. The `Placement` to update. + // + // The `Placement`'s name is used to identify the `Placement` to + // update. Format: + // `networks/{network_code}/placements/{placement_id}` + Placement placement = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchUpdatePlacements` method. +message BatchUpdatePlacementsRequest { + // Required. The parent resource where `Placements` will be updated. + // Format: `networks/{network_code}` + // The parent field in the UpdatePlacementsRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Placement` objects to update. + // A maximum of 100 objects can be updated in a batch. + repeated UpdatePlacementRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchUpdatePlacements` method. +message BatchUpdatePlacementsResponse { + // The `Placement` objects updated. + repeated Placement placements = 1; +} + +// Request message for `BatchActivatePlacements` method. +message BatchActivatePlacementsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The names of the `Placement` objects to activate. + // Format: `networks/{network_code}/placements/{placement_id}` + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Placement" + } + ]; +} + +// Response object for `BatchActivatePlacements` method. +message BatchActivatePlacementsResponse {} + +// Request message for `BatchDeactivatePlacements` method. +message BatchDeactivatePlacementsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The names of the `Placement` objects to deactivate. + // Format: `networks/{network_code}/placements/{placement_id}` + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Placement" + } + ]; +} + +// Response object for `BatchDeactivatePlacements` method. +message BatchDeactivatePlacementsResponse {} + +// Request message for `BatchArchivePlacements` method. +message BatchArchivePlacementsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The names of the `Placement` objects to archive. + // Format: `networks/{network_code}/placements/{placement_id}` + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Placement" + } + ]; +} + +// Response object for `BatchArchivePlacements` method. +message BatchArchivePlacementsResponse {} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_deal_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_deal_service.proto index 94a8c8ee7731..5287da2a3434 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_deal_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_deal_service.proto @@ -104,7 +104,7 @@ message ListPrivateAuctionDealsRequest { // Optional. The maximum number of `PrivateAuctionDeals` to return. The // service may return fewer than this value. If unspecified, at most 50 // `PrivateAuctionDeals` will be returned. The maximum value is 1000; - // values above 1000 will be coerced to 1000. + // values greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListPrivateAuctionDeals` @@ -143,7 +143,7 @@ message ListPrivateAuctionDealsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_service.proto index 4518537fef9a..4851b55fc4bd 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/private_auction_service.proto @@ -102,7 +102,7 @@ message ListPrivateAuctionsRequest { // Optional. The maximum number of `PrivateAuctions` to return. The service // may return fewer than this value. If unspecified, at most 50 // `PrivateAuctions` will be returned. The maximum value is 1000; - // values above 1000 will be coerced to 1000. + // values greater than 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListPrivateAuctions` @@ -141,7 +141,7 @@ message ListPrivateAuctionsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/programmatic_buyer_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/programmatic_buyer_service.proto index 8b33e36e6aea..27b9a7e83f40 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/programmatic_buyer_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/programmatic_buyer_service.proto @@ -120,7 +120,7 @@ message ListProgrammaticBuyersResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_definition.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_definition.proto new file mode 100644 index 000000000000..5e8640ff5f4c --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_definition.proto @@ -0,0 +1,12478 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/report_value.proto"; +import "google/api/field_behavior.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ReportDefinitionProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// The definition of how a report should be run. +message ReportDefinition { + // A dimension or a metric in a report. + message Field { + // Either a dimension or a metric. + oneof field { + // The dimension this field represents. + Dimension dimension = 1; + + // The metric this field represents. + Metric metric = 2; + } + } + + // A date range for a report. + message DateRange { + // A date range between two fixed dates (inclusive of end date). + message FixedDateRange { + // Required. The start date of this date range. + google.type.Date start_date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The end date (inclusive) of this date range. + google.type.Date end_date = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Options for relative date ranges. + enum RelativeDateRange { + // Default value. This value is unused. + RELATIVE_DATE_RANGE_UNSPECIFIED = 0; + + // The date the report is run. + TODAY = 1; + + // The date a day before the date that the report is run. + YESTERDAY = 2; + + // The full week in which this report is run. Could include dates in + // the future. + THIS_WEEK = 3; + + // From the beginning of the calendar week (Monday to Sunday) in which the + // up to and including the day the report is run. + THIS_WEEK_TO_DATE = 29; + + // The full month in which this report is run. Could include dates in + // the future. + THIS_MONTH = 4; + + // From the beginning of the calendar month in which the report is run, to + // up to and including the day the report is run. + THIS_MONTH_TO_DATE = 26; + + // The full quarter in which this report is run. Could include dates + // in the future. + THIS_QUARTER = 5; + + // From the beginning of the calendar quarter in which the report is run, + // up to and including the day the report is run. + THIS_QUARTER_TO_DATE = 27; + + // The full year in which this report is run. Could include dates in + // the future. + THIS_YEAR = 6; + + // From the beginning of the calendar year in which the report is run, to + // up to and including the day the report is run. + THIS_YEAR_TO_DATE = 28; + + // The entire previous calendar week, Monday to Sunday (inclusive), + // preceding the calendar week the report is run. + LAST_WEEK = 7; + + // The entire previous calendar month preceding the calendar month the + // report is run. + LAST_MONTH = 8; + + // The entire previous calendar quarter preceding the calendar quarter the + // report is run. + LAST_QUARTER = 9; + + // The entire previous calendar year preceding the calendar year the + // report is run. + LAST_YEAR = 10; + + // The 7 days preceding the day the report is run. + LAST_7_DAYS = 11; + + // The 30 days preceding the day the report is run. + LAST_30_DAYS = 12; + + // The 60 days preceding the day the report is run. + LAST_60_DAYS = 13; + + // The 90 days preceding the day the report is run. + LAST_90_DAYS = 14; + + // The 180 days preceding the day the report is run. + LAST_180_DAYS = 15; + + // The 360 days preceding the day the report is run. + LAST_360_DAYS = 16; + + // The 365 days preceding the day the report is run. + LAST_365_DAYS = 17; + + // The entire previous 3 calendar months preceding the calendar month the + // report is run. + LAST_3_MONTHS = 18; + + // The entire previous 6 calendar months preceding the calendar month the + // report is run. + LAST_6_MONTHS = 19; + + // The entire previous 6 calendar months preceding the calendar month the + // report is run. + LAST_12_MONTHS = 20; + + // From 3 years before the report is run, to the day before the report is + // run, inclusive. + ALL_AVAILABLE = 21; + + // The date a day after the date that the report is run. + TOMORROW = 30; + + // The 90 days following the day the report is run. + NEXT_90_DAYS = 31; + + // The entire calendar month following the calendar month the report is + // run. + NEXT_MONTH = 32; + + // The entire 3 calendar months following the calendar month the report + // is run. + NEXT_3_MONTHS = 33; + + // The entire 12 calendar months following the calendar month the report + // is run. + NEXT_12_MONTHS = 34; + + // The entire calendar week, Monday to Sunday (inclusive), following the + // calendar week the report is run. + NEXT_WEEK = 35; + + // The entire calendar quarter following the calendar quarter the report + // is run. + NEXT_QUARTER = 36; + + // From the date a day after the date that the report is run, to the end + // of the calendar month following the calendar month the report is run. + TO_END_OF_NEXT_MONTH = 37; + + // Only valid when used in the comparison_date_range field. The complete + // period preceding the date period provided in date_range. + // + // In the case where date_range is a FixedDateRange of N days, this will + // be a period of N days where the end date is the date preceding the + // start date of the date_range. + // + // In the case where date_range is a RelativeDateRange, this will be a + // period of the same timeframe preceding the date_range. In the case + // where the date_range does not capture the full period because a report + // is run in the middle of that period, this will still be the full + // preceding period. For example, if date_range is THIS_WEEK, but the + // report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but + // PREVIOUS_PERIOD will be Monday - Sunday. + PREVIOUS_PERIOD = 22; + + // Only valid when used in the comparison_date_range field. The period + // starting 1 year prior to the date period provided in date_range. + // + // In the case where date_range is a FixedDateRange, this will be a date + // range starting 1 year prior to the date_range start date and ending 1 + // year prior to the date_range end date. + // + // In the case where date_range is a RelativeDateRange, this will be a + // period of the same timeframe exactly 1 year prior to the date_range. + // In the case where the date_range does not capture the full period + // because a report is run in the middle of that period, this will still + // be the full period 1 year prior. For example, if date range is + // THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be + // Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - + // Sunday. + SAME_PERIOD_PREVIOUS_YEAR = 24; + } + + // Either a fixed or relative date range. + oneof date_range_type { + // A fixed date range. + FixedDateRange fixed = 1; + + // A relative date range. + RelativeDateRange relative = 2; + } + } + + // A filter over one or more fields. + message Filter { + // A filter on a specific field. + message FieldFilter { + // Required. The field to filter on. + Field field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The operation of this filter. + Operation operation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Values to filter to. + repeated ReportValue values = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Use to filter on a specific slice of data. + optional Slice slice = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When using time period columns, use this to filter on a + // specific column. + optional int32 time_period_index = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use to specify which metric value type to filter on. Defaults + // to PRIMARY. + optional MetricValueType metric_value_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // A list of filters. + message FilterList { + // Required. A list of filters. + repeated Filter filters = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Supported filter operations. + enum Operation { + // For scalar operands, checks if the operand is in the set of provided + // filter values. + // + // For list operands, checks if any element in the operand is in the set + // of provided filter values. + // + // Default value. + IN = 0; + + // For scalar operands, checks that the operand is not in the set of + // provided filter values. + // + // For list operands, checks that none of the elements in the operand + // is in the set of provided filter values. + NOT_IN = 1; + + // For scalar string operands, checks if the operand contains any of the + // provided filter substrings. + // + // For string list operands, checks if any string in the operand contains + // any of the provided filter substrings. + CONTAINS = 2; + + // For scalar string operands, checks that the operand contains none of + // the provided filter substrings. + // + // For string list operands, checks that none of the strings in the + // operand contain none of the provided filter substrings. + NOT_CONTAINS = 3; + + // Operand is less than the provided filter value. + LESS_THAN = 4; + + // Operand is less than or equal to provided filter value. + LESS_THAN_EQUALS = 5; + + // Operand is greater than provided filter value. + GREATER_THAN = 6; + + // Operand is greater than or equal to provided filter value. + GREATER_THAN_EQUALS = 7; + + // Operand is between provided filter values. + BETWEEN = 8; + + // Operand matches against a regular expression or set of regular + // expressions (one must match). + MATCHES = 9; + + // Operand negative matches against a regular expression or set of regular + // expressions (none must match). + NOT_MATCHES = 10; + } + + // The type determines how the underlying filters are combined. + oneof type { + // A filter on a single field. + FieldFilter field_filter = 1; + + // A filter whose result is negated. + Filter not_filter = 2; + + // A list of filters whose results are AND-ed. + FilterList and_filter = 3; + + // A list of filters whose results are OR-ed. + FilterList or_filter = 4; + } + } + + // Represents a sorting in a report. + message Sort { + // Required. A field (dimension or metric) to sort by. + Field field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The sort order. If true the sort will be descending. + bool descending = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use to sort on a specific slice of data. + optional Slice slice = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When using time period columns, use this to sort on a specific + // column. + optional int32 time_period_index = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use to specify which metric value type to sort on. Defaults to + // PRIMARY. + optional MetricValueType metric_value_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Use to specify a slice of data. + // + // For example, in a report, to focus on just data from the US, specify + // `COUNTRY_NAME` for dimension and value: `"United States"`. + message Slice { + // Required. The dimension to slice on. + Dimension dimension = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of the dimension. + ReportValue value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A flag for a report. Flags are used show if certain thresholds are met. + // Result rows that match the filter will have the corresponding + // [MetricValueGroup.flagValues][MetricValueGroup] index set to true. + // For more information about flags see: + // https://support.google.com/admanager/answer/15079975 + message Flag { + // Required. Filters to apply for the flag. + repeated Filter filters = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Name of the flag. + // The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + // the colored flags that appear in the UI. The UI won't display flags + // with other names, but they are available for use by API clients. + string name = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Supported report types. + enum ReportType { + // Default value. This value is unused. + REPORT_TYPE_UNSPECIFIED = 0; + + // Historical. + HISTORICAL = 1; + + // Reach. + REACH = 5; + + // Privacy and messaging. + PRIVACY_AND_MESSAGING = 6; + + // Ad speed. + AD_SPEED = 13; + } + + // Reporting dimensions. + enum Dimension { + option allow_alias = true; + + // Default value. This value is unused. + DIMENSION_UNSPECIFIED = 0; + + // The measurement source of a video ad. + // + // + // + // Corresponds to "Active View measurement source value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ACTIVE_VIEW_MEASUREMENT_SOURCE = 575; + + // Active View measurement source localized name. + // + // + // + // Corresponds to "Active View measurement source" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME = 576; + + // Advertiser credit status ENUM + // + // + // + // Corresponds to "Advertiser credit status value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + ADVERTISER_CREDIT_STATUS = 475; + + // Advertiser credit status locallized name + // + // + // + // Corresponds to "Advertiser credit status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + ADVERTISER_CREDIT_STATUS_NAME = 476; + + // The domain name of the advertiser. + // + // + // + // Corresponds to "Advertiser domain" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ADVERTISER_DOMAIN_NAME = 242; + + // The ID used in an external system for advertiser identification + // + // + // + // Corresponds to "Advertiser external ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + ADVERTISER_EXTERNAL_ID = 228; + + // The ID of an advertiser company assigned to an order + // + // + // + // Corresponds to "Advertiser ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `IDENTIFIER` + ADVERTISER_ID = 131; + + // Labels applied to the advertiser + // can be used for either competitive exclusion or ad exclusion + // + // + // + // Corresponds to "Advertiser labels" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + ADVERTISER_LABELS = 230; + + // Label ids applied to the advertiser + // can be used for either competitive exclusion or ad exclusion + // + // + // + // Corresponds to "Advertiser label IDs" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + ADVERTISER_LABEL_IDS = 229; + + // The name of an advertiser company assigned to an order + // + // + // + // Corresponds to "Advertiser" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + ADVERTISER_NAME = 132; + + // The name of the contact associated with an advertiser company + // + // + // + // Corresponds to "Advertiser primary contact" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + ADVERTISER_PRIMARY_CONTACT = 227; + + // Advertiser status ENUM + // + // + // + // Corresponds to "Advertiser status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ADVERTISER_STATUS = 471; + + // Advertiser status locallized name + // + // + // + // Corresponds to "Advertiser status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ADVERTISER_STATUS_NAME = 472; + + // Advertiser type ENUM + // + // + // + // Corresponds to "Advertiser type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + ADVERTISER_TYPE = 473; + + // Advertiser type locallized name + // + // + // + // Corresponds to "Advertiser type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + ADVERTISER_TYPE_NAME = 474; + + // The category of an advertiser, such as Arts & Entertainment or Travel & + // Tourism. + // + // + // + // Corresponds to "Advertiser vertical" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ADVERTISER_VERTICAL = 580; + + // Classification of different Ad Exchange products. + // + // + // + // Corresponds to "Ad Exchange product value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ADX_PRODUCT = 499; + + // Localized name of the classification of different Ad Exchange + // products. + // + // + // + // Corresponds to "Ad Exchange product" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ADX_PRODUCT_NAME = 500; + + // Ad experiences type. + // + // + // + // Corresponds to "Ad experiences value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + AD_EXPERIENCES_TYPE = 641; + + // Localized name of the Ad experiences type. + // + // + // + // Corresponds to "Ad experiences" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AD_EXPERIENCES_TYPE_NAME = 642; + + // Shows an ENUM value describing whether a given piece of publisher + // inventory was above (ATF) or below the fold (BTF) of a page. + // + // + // + // Corresponds to "Ad location value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + AD_LOCATION = 390; + + // Shows a localized string describing whether a given piece of publisher + // inventory was above (ATF) or below the fold (BTF) of a page. + // + // + // + // Corresponds to "Ad location" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AD_LOCATION_NAME = 391; + + // The domain of the ad technology provider associated with the bid. + // + // + // + // Corresponds to "Ad technology provider domain" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AD_TECHNOLOGY_PROVIDER_DOMAIN = 620; + + // The ID of the ad technology provider associated with the bid. + // + // + // + // Corresponds to "Ad technology provider ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AD_TECHNOLOGY_PROVIDER_ID = 621; + + // The name of the ad technology provider associated with the bid. + // + // + // + // Corresponds to "Ad technology provider" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AD_TECHNOLOGY_PROVIDER_NAME = 622; + + // Segmentation of ad types. + // + // + // + // Corresponds to "Ad type value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + AD_TYPE = 497; + + // Localized name of the ad type. + // + // + // + // Corresponds to "Ad type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AD_TYPE_NAME = 498; + + // The code of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `STRING` + AD_UNIT_CODE = 64; + + // The code of the first level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 1" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_1 = 65; + + // The code of the tenth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 10" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_10 = 74; + + // The code of the eleventh level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 11" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_11 = 75; + + // The code of the twelfth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 12" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_12 = 76; + + // The code of the thirteenth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 13" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_13 = 77; + + // The code of the fourteenth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 14" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_14 = 78; + + // The code of the fifteenth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 15" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_15 = 79; + + // The code of the sixteenth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 16" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_16 = 80; + + // The code of the second level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 2" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_2 = 66; + + // The code of the third level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 3" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_3 = 67; + + // The code of the fourth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 4" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_4 = 68; + + // The code of the fifth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 5" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_5 = 69; + + // The code of the sixth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 6" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_6 = 70; + + // The code of the seventh level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 7" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_7 = 71; + + // The code of the eighth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 8" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_8 = 72; + + // The code of the ninth level ad unit of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit code level 9" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_CODE_LEVEL_9 = 73; + + // The ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID = 25; + + // The full hierarchy of ad unit IDs where the ad was requested, from + // root to leaf, excluding the root ad unit ID. + // + // + // + // Corresponds to "Ad unit ID (all levels)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `IDENTIFIER_LIST` + AD_UNIT_ID_ALL_LEVEL = 27; + + // The first level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 1" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_1 = 30; + + // The tenth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 10" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_10 = 48; + + // The eleventh level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 11" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_11 = 50; + + // The twelfth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 12" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_12 = 52; + + // The thirteenth level ad unit ID of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit ID level 13" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_13 = 54; + + // The fourteenth level ad unit ID of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit ID level 14" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_14 = 56; + + // The fifteenth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 15" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_15 = 58; + + // The sixteenth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 16" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_16 = 60; + + // The second level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 2" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_2 = 32; + + // The third level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 3" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_3 = 34; + + // The fourth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 4" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_4 = 36; + + // The fifth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 5" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_5 = 38; + + // The sixth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 6" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_6 = 40; + + // The seventh level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 7" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_7 = 42; + + // The eighth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 8" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_8 = 44; + + // The ninth level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID level 9" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_LEVEL_9 = 46; + + // The top-level ad unit ID of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit ID (top level)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + AD_UNIT_ID_TOP_LEVEL = 142; + + // The name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `STRING` + AD_UNIT_NAME = 26; + + // The full hierarchy of ad unit names where the ad was requested, from + // root to leaf, excluding the root ad unit name. + // + // + // + // Corresponds to "Ad unit (all levels)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `STRING_LIST` + AD_UNIT_NAME_ALL_LEVEL = 29; + + // The first level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 1" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_1 = 31; + + // The tenth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 10" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_10 = 49; + + // The eleventh level ad unit name of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit level 11" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_11 = 51; + + // The twelfth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 12" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_12 = 53; + + // The thirteenth level ad unit name of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit level 13" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_13 = 55; + + // The fourteenth level ad unit name of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit level 14" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_14 = 57; + + // The fifteenth level ad unit name of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit level 15" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_15 = 59; + + // The sixteenth level ad unit name of the ad unit where the ad was + // requested. + // + // + // + // Corresponds to "Ad unit level 16" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_16 = 61; + + // The second level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 2" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_2 = 33; + + // The third level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 3" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_3 = 35; + + // The fourth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 4" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_4 = 37; + + // The fifth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 5" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_5 = 39; + + // The sixth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 6" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_6 = 41; + + // The seventh level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 7" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_7 = 43; + + // The eighth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 8" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_8 = 45; + + // The ninth level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit level 9" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_LEVEL_9 = 47; + + // The top-level ad unit name of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit (top level)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_NAME_TOP_LEVEL = 143; + + // The reward amount of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit reward amount" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `INTEGER` + AD_UNIT_REWARD_AMOUNT = 63; + + // The reward type of the ad unit where the ad was requested. + // + // + // + // Corresponds to "Ad unit reward type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + // `REACH` + // + // Data format: `STRING` + AD_UNIT_REWARD_TYPE = 62; + + // The status of the ad unit + // + // + // + // Corresponds to "Ad unit status value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `ENUM` + AD_UNIT_STATUS = 206; + + // The name of the status of the ad unit + // + // + // + // Corresponds to "Ad unit status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + AD_UNIT_STATUS_NAME = 207; + + // The ID of an agency at level 1 of agency hierarchy. + // + // + // + // Corresponds to "Agency ID (Level 1)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AGENCY_LEVEL_1_ID = 565; + + // The name of an agency at level 1 of agency hierarchy. + // + // + // + // Corresponds to "Agency (Level 1)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AGENCY_LEVEL_1_NAME = 566; + + // The ID of an agency at level 2 of agency hierarchy. + // + // + // + // Corresponds to "Agency ID (Level 2)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AGENCY_LEVEL_2_ID = 567; + + // The name of an agency at level 2 of agency hierarchy. + // + // + // + // Corresponds to "Agency (Level 2)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AGENCY_LEVEL_2_NAME = 568; + + // The ID of an agency at level 3 of agency hierarchy. + // + // + // + // Corresponds to "Agency ID (Level 3)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AGENCY_LEVEL_3_ID = 569; + + // The name of an agency at level 3 of agency hierarchy. + // + // + // + // Corresponds to "Agency (Level 3)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AGENCY_LEVEL_3_NAME = 570; + + // User age bracket enum. + // + // + // + // Corresponds to "Age bracket value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + AGE_BRACKET = 508; + + // Localized user age bracket returned from Google Analytics. For example, + // "18-24", "25-34", "35-44", "45-54", "55-64", "65+". + // + // + // + // Corresponds to "Age bracket" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AGE_BRACKET_NAME = 582; + + // Enum value for App Tracking Transparency consent status. + // + // + // + // Corresponds to "App Tracking Transparency consent status value" in the Ad + // Manager UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + APP_TRACKING_TRANSPARENCY_CONSENT_STATUS = 442; + + // Localized string value for App Tracking Transparency consent status. + // + // + // + // Corresponds to "App Tracking Transparency consent status" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME = 443; + + // The app version. + // + // + // + // Corresponds to "App version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + APP_VERSION = 392; + + // The name of Auction Package deal + // + // + // + // Corresponds to "Auction package deal" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AUCTION_PACKAGE_DEAL = 579; + + // The ID of Auction Package deal + // + // + // + // Corresponds to "Auction package deal ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AUCTION_PACKAGE_DEAL_ID = 571; + + // ID of targeted audience segment, including all first-party and + // third-party segments that matched the user on the winning line item. + // + // + // + // Corresponds to "Audience segment ID (targeted)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + AUDIENCE_SEGMENT_ID_TARGETED = 584; + + // Name of targeted audience segment, including all first-party and + // third-party segments that matched the user on the winning line item. + // + // + // + // Corresponds to "Audience segment (targeted)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AUDIENCE_SEGMENT_TARGETED = 585; + + // Enum value of Auto refreshed traffic. + // + // + // + // Corresponds to "Auto refreshed traffic value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + AUTO_REFRESHED_TRAFFIC = 421; + + // Indicates if the traffic is from auto-refreshed ad requests. + // + // + // + // Corresponds to "Auto refreshed traffic" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + AUTO_REFRESHED_TRAFFIC_NAME = 422; + + // The encrypted version of BIDDER_ID. + // + // + // + // Corresponds to "Bidder encrypted ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BIDDER_ENCRYPTED_ID = 493; + + // The name of the bidder. + // + // + // + // Corresponds to "Bidder" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BIDDER_NAME = 494; + + // The cpm range within which a bid falls. + // + // + // + // Corresponds to "Bid Range" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BID_RANGE` + BID_RANGE = 679; + + // The reason a bid was rejected. + // + // + // + // Corresponds to "Bid rejection reason value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + BID_REJECTION_REASON = 599; + + // The localized name of the reason a bid was rejected. + // + // + // + // Corresponds to "Bid rejection reason" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BID_REJECTION_REASON_NAME = 600; + + // The amount of information about the Publisher's page sent to the buyer + // who purchased the impressions. + // + // + // + // Corresponds to "Branding type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + BRANDING_TYPE = 383; + + // The localized version of branding type, the amount of information about + // the Publisher's page sent to the buyer who purchased the impressions. + // + // + // + // Corresponds to "Branding type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BRANDING_TYPE_NAME = 384; + + // Browser category. + // + // + // + // Corresponds to "Browser category value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + BROWSER_CATEGORY = 119; + + // Browser category name. + // + // + // + // Corresponds to "Browser category" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + BROWSER_CATEGORY_NAME = 120; + + // The ID of the browser. + // + // + // + // Corresponds to "Browser ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + BROWSER_ID = 235; + + // The name of the browser. + // + // + // + // Corresponds to "Browser" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BROWSER_NAME = 236; + + // The ID of the buyer network. + // + // + // + // Corresponds to "Buyer network ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BUYER_NETWORK_ID = 448; + + // The name of the buyer network. + // + // + // + // Corresponds to "Buyer network" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + BUYER_NETWORK_NAME = 449; + + // The callout status category in the Ads traffic navigator report. + // + // + // + // Corresponds to "Callout status category value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + CALLOUT_STATUS_CATEGORY = 588; + + // The callout status category name in the Ads traffic navigator report. + // + // + // + // Corresponds to "Callout status category" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + CALLOUT_STATUS_CATEGORY_NAME = 589; + + // Mobile carrier ID. + // + // + // + // Corresponds to "Carrier ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CARRIER_ID = 369; + + // Name of the mobile carrier. + // + // + // + // Corresponds to "Carrier" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CARRIER_NAME = 368; + + // Inventory segmentation by channel. + // + // + // + // Corresponds to "Channel" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CHANNEL = 501; + + // Child Publisher Network Code + // + // + // + // Corresponds to "Child network code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CHILD_NETWORK_CODE = 542; + + // Child Publisher Network ID + // + // + // + // Corresponds to "Child network ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CHILD_NETWORK_ID = 544; + + // Child Partner Network Name + // + // + // + // Corresponds to "Child network" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CHILD_PARTNER_NAME = 543; + + // The criteria ID of the city in which the ad served. + // + // + // + // Corresponds to "City ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + CITY_ID = 459; + + // The name of the city in which the ad served. + // + // + // + // Corresponds to "City" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + CITY_NAME = 452; + + // The ID of an advertiser, classified by Google, associated with a creative + // transacted + // + // + // + // Corresponds to "Advertiser ID (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + CLASSIFIED_ADVERTISER_ID = 133; + + // The name of an advertiser, classified by Google, associated with a + // creative transacted + // + // + // + // Corresponds to "Advertiser (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + CLASSIFIED_ADVERTISER_NAME = 134; + + // ID of the brand, as classified by Google, + // + // + // + // Corresponds to "Brand ID (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + CLASSIFIED_BRAND_ID = 243; + + // Name of the brand, as classified by Google, + // + // + // + // Corresponds to "Brand (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + CLASSIFIED_BRAND_NAME = 244; + + // The display name of the CMS content. + // + // + // + // Corresponds to "Content source name" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CONTENT_CMS_NAME = 643; + + // The CMS content ID of the video content. + // + // + // + // Corresponds to "ID of the video in the content source" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CONTENT_CMS_VIDEO_ID = 644; + + // ID of the video content served. + // + // + // + // Corresponds to "Content ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CONTENT_ID = 246; + + // Content mapping presence ENUM value + // + // + // + // Corresponds to "Content mapping presence value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CONTENT_MAPPING_PRESENCE = 731; + + // Content mapping presence name + // + // + // + // Corresponds to "Content mapping presence" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CONTENT_MAPPING_PRESENCE_NAME = 732; + + // Name of the video content served. + // + // + // + // Corresponds to "Content" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CONTENT_NAME = 247; + + // The continent in which the ad served (derived from country). + // + // + // + // Corresponds to "Continent value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CONTINENT = 469; + + // The name of the continent in which the ad served (derived from country). + // + // + // + // Corresponds to "Continent" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CONTINENT_NAME = 470; + + // The ISO code of the country in which the ad served. + // + // + // + // Corresponds to "Country code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `STRING` + COUNTRY_CODE = 466; + + // The criteria ID of the country in which the ad served. + // + // + // + // Corresponds to "Country ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + COUNTRY_ID = 11; + + // The name of the country in which the ad served. + // + // + // + // Corresponds to "Country" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `STRING` + COUNTRY_NAME = 12; + + // Enum value of creative billing type + // + // + // + // Corresponds to "Creative billing type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CREATIVE_BILLING_TYPE = 366; + + // Localized string value of creative billing type + // + // + // + // Corresponds to "Creative billing type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_BILLING_TYPE_NAME = 367; + + // Represents the click-through URL of a creative + // + // + // + // Corresponds to "Creative click through url" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_CLICK_THROUGH_URL = 174; + + // The ID of a creative + // + // + // + // Corresponds to "Creative ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + CREATIVE_ID = 138; + + // Creative name + // + // + // + // Corresponds to "Creative" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + CREATIVE_NAME = 139; + + // Creative Policies filtering. + // + // + // + // Corresponds to "Creative policies filtering value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CREATIVE_POLICIES_FILTERING = 711; + + // Localized name of the Creative Policies filtering. + // + // + // + // Corresponds to "Creative policies filtering" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_POLICIES_FILTERING_NAME = 712; + + // Creative Protections filtering (Publisher Blocks Enforcement). + // + // + // + // Corresponds to "Creative protections filtering value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CREATIVE_PROTECTIONS_FILTERING = 704; + + // Localized name of the Creative Protections filtering. + // + // + // + // Corresponds to "Creative protections filtering" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_PROTECTIONS_FILTERING_NAME = 705; + + // ENUM describing whether the creative is part of a creative set and if so, + // what its role in the creative set is. + // + // + // + // Corresponds to "Creative set role type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CREATIVE_SET_ROLE_TYPE = 686; + + // Localized name describing whether the creative is part of a creative set + // and if so, what its role in the creative set is. + // + // + // + // Corresponds to "Creative set role type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_SET_ROLE_TYPE_NAME = 687; + + // Creative technology ENUM + // + // + // + // Corresponds to "Creative technology value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CREATIVE_TECHNOLOGY = 148; + + // Creative technology locallized name + // + // + // + // Corresponds to "Creative technology" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_TECHNOLOGY_NAME = 149; + + // Third party vendor name of a creative + // + // + // + // Corresponds to "Creative third party vendor" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_THIRD_PARTY_VENDOR = 361; + + // Enum value of creative type + // + // + // + // Corresponds to "Creative type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `ENUM` + CREATIVE_TYPE = 344; + + // Localized string name of creative type + // + // + // + // Corresponds to "Creative type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + CREATIVE_TYPE_NAME = 345; + + // Creative vendor ID. + // + // + // + // Corresponds to "Creative vendor ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CREATIVE_VENDOR_ID = 706; + + // Name of the Creative vendor. + // + // + // + // Corresponds to "Creative vendor" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_VENDOR_NAME = 707; + + // The third party where Google Ad Manager was redirected for the creative, + // based on the domain. + // + // + // + // Corresponds to "Creative video redirect third party" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CREATIVE_VIDEO_REDIRECT_THIRD_PARTY = 562; + + // The ID of a Curation partner + // + // + // + // Corresponds to "Curation partner ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CURATOR_ID = 572; + + // The name of a Curation partner + // + // + // + // Corresponds to "Curation partner" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CURATOR_NAME = 573; + + // Custom event ID + // + // + // + // Corresponds to "Custom event id" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CUSTOM_EVENT_ID = 737; + + // Custom event name + // + // + // + // Corresponds to "Custom event" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CUSTOM_EVENT_NAME = 735; + + // Custom event type + // + // + // + // Corresponds to "Custom event type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + CUSTOM_EVENT_TYPE = 736; + + // Localized name of the custom event type + // + // + // + // Corresponds to "Custom event type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CUSTOM_EVENT_TYPE_NAME = 738; + + // The ID of an ad spot. An ad spot can be added to an ad break template, as + // well as directly targeted by a video line item. + // + // + // + // Corresponds to "Custom spot ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + CUSTOM_SPOT_ID = 423; + + // The name of an ad spot. An ad spot can be added to an ad break + // template, as well as directly targeted by a video line item. + // + // + // + // Corresponds to "Custom spot" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + CUSTOM_SPOT_NAME = 424; + + // Breaks down reporting data by date. + // + // + // + // Corresponds to "Date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `DATE` + DATE = 3; + + // Breaks down reporting data by day of the week. Monday is 1 and 7 is + // Sunday. + // + // + // + // Corresponds to "Day of week" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + DAY_OF_WEEK = 4; + + // The ID of the buyer of a deal. + // + // + // + // Corresponds to "Deal buyer ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + DEAL_BUYER_ID = 240; + + // The name of the buyer of a deal. + // + // + // + // Corresponds to "Deal buyer" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEAL_BUYER_NAME = 241; + + // Deal ID + // + // + // + // Corresponds to "Deal ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEAL_ID = 436; + + // Deal name + // + // + // + // Corresponds to "Deal" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEAL_NAME = 437; + + // The ID of the secure signals that were sent to the bidder who won the + // impression. + // + // + // + // Corresponds to "Secure signal ID (delivered)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + DELIVERED_SECURE_SIGNAL_ID = 309; + + // The name of the secure signals that were sent to the bidder who won the + // impression. + // + // + // + // Corresponds to "Secure signal name (delivered)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DELIVERED_SECURE_SIGNAL_NAME = 310; + + // Demand channel. + // + // + // + // Corresponds to "Demand channel value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + DEMAND_CHANNEL = 9; + + // Demand channel name. + // + // + // + // Corresponds to "Demand channel" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + DEMAND_CHANNEL_NAME = 10; + + // Demand source. + // + // + // + // Corresponds to "Demand source value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + DEMAND_SOURCE = 592; + + // Demand source name. + // + // + // + // Corresponds to "Demand source" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + DEMAND_SOURCE_NAME = 593; + + // Demand subchannel. + // + // + // + // Corresponds to "Demand subchannel value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + DEMAND_SUBCHANNEL = 22; + + // Demand subchannel name. + // + // + // + // Corresponds to "Demand subchannel" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEMAND_SUBCHANNEL_NAME = 23; + + // The device on which an ad was served. + // + // + // + // Corresponds to "Device value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + DEVICE = 226; + + // The device category to which an ad is being targeted. + // + // + // + // Corresponds to "Device category value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `ENUM` + DEVICE_CATEGORY = 15; + + // The name of the category of device (smartphone, feature phone, tablet, or + // desktop) to which an ad is being targeted. + // + // + // + // Corresponds to "Device category" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `STRING` + DEVICE_CATEGORY_NAME = 16; + + // Device manufacturer ID + // + // + // + // Corresponds to "Device manufacturer ID" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + DEVICE_MANUFACTURER_ID = 525; + + // Device manufacturer name + // + // + // + // Corresponds to "Device manufacturer" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEVICE_MANUFACTURER_NAME = 526; + + // Device model ID + // + // + // + // Corresponds to "Device model ID" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + DEVICE_MODEL_ID = 527; + + // Device model name + // + // + // + // Corresponds to "Device model" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEVICE_MODEL_NAME = 528; + + // The localized name of the device on which an ad was served. + // + // + // + // Corresponds to "Device" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DEVICE_NAME = 225; + + // The ID of DSP Seat + // + // + // + // Corresponds to "DSP seat ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DSP_SEAT_ID = 564; + + // Categorization of inventory sources based on AdX dynamic allocation + // backfill type. + // + // + // + // Corresponds to "Dynamic allocation value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + DYNAMIC_ALLOCATION_TYPE = 502; + + // Localized name of the dynamic allocation type. + // + // + // + // Corresponds to "Dynamic allocation" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + DYNAMIC_ALLOCATION_TYPE_NAME = 503; + + // Status of Encrypted Signals for Publishers delivery. + // + // + // + // Corresponds to "Secure signal delivery value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ESP_DELIVERY = 623; + + // Localized name of the ESP delivery status. + // + // + // + // Corresponds to "Secure signal delivery" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ESP_DELIVERY_NAME = 624; + + // Whether Encrypted Signals for Publishers are present on the ad request. + // + // + // + // Corresponds to "Secure signal presence value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ESP_PRESENCE = 625; + + // Localized name of the ESP presence status. + // + // + // + // Corresponds to "Secure signal presence" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ESP_PRESENCE_NAME = 626; + + // Exchange bidding deal ID. + // + // + // + // Corresponds to "Exchange bidding deal id" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + EXCHANGE_BIDDING_DEAL_ID = 715; + + // Exchange bidding deal type. + // + // + // + // Corresponds to "Exchange bidding deal type value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + EXCHANGE_BIDDING_DEAL_TYPE = 714; + + // Localized name of the exchange bidding deal type. + // + // + // + // Corresponds to "Exchange bidding deal type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + EXCHANGE_BIDDING_DEAL_TYPE_NAME = 723; + + // ID of the yield partner as classified by Google + // + // + // + // Corresponds to "Yield partner ID (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; + + // Name of the yield partner as classified by Google + // + // + // + // Corresponds to "Yield partner (classified)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; + + // The ID of the first look pricing rule. + // + // + // + // Corresponds to "First look pricing rule ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + FIRST_LOOK_PRICING_RULE_ID = 248; + + // The name of the first look pricing rule. + // + // + // + // Corresponds to "First look pricing rule" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + FIRST_LOOK_PRICING_RULE_NAME = 249; + + // Whether a first-party user identifier was present on a given + // ad-request. + // + // + // + // Corresponds to "First-party ID status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + FIRST_PARTY_ID_STATUS = 404; + + // The localized name of whether a first-party user identifier was present + // on a given ad-request. + // + // + // + // Corresponds to "First-party ID status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + FIRST_PARTY_ID_STATUS_NAME = 405; + + // User gender enum value returned from Google Analytics. + // + // + // + // Corresponds to "Gender value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + GENDER = 509; + + // Localized user gender returned from Google Analytics. For example, + // "male", "female". + // + // + // + // Corresponds to "Gender" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + GENDER_NAME = 583; + + // The ID of a Google Analytics stream. For example, web site or mobile app + // + // + // + // Corresponds to "Google Analytics stream ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + GOOGLE_ANALYTICS_STREAM_ID = 519; + + // The name of a Google Analytics stream. For example, + // web site or mobile app. + // + // + // + // Corresponds to "Google Analytics stream" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + GOOGLE_ANALYTICS_STREAM_NAME = 520; + + // The ID of the header bidding trafficking yield partner. + // + // + // + // Corresponds to "Yield partner ID (header bidding trafficking)" in the Ad + // Manager UI (when showing API fields). + // + // Compatible with the following report types: + // + // Data format: `IDENTIFIER` + HBT_YIELD_PARTNER_ID = 659; + + // The name of the header bidding trafficking yield partner. + // + // + // + // Corresponds to "Yield partner (header bidding trafficking)" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + HBT_YIELD_PARTNER_NAME = 660; + + // Header Bidder integration type. + // + // + // + // Corresponds to "Header bidder integration type value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + HEADER_BIDDER_INTEGRATION_TYPE = 718; + + // Localized name of the Header Bidder integration type. + // + // + // + // Corresponds to "Header bidder integration type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + HEADER_BIDDER_INTEGRATION_TYPE_NAME = 719; + + // Breaks down reporting data by hour in one day. + // + // + // + // Corresponds to "Hour" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + HOUR = 100; + + // Impression Counting Method ENUM. + // + // + // + // Corresponds to "Impression counting method value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + IMPRESSION_COUNTING_METHOD = 577; + + // Localized impression counting method name. + // + // + // + // Corresponds to "Impression counting method" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + IMPRESSION_COUNTING_METHOD_NAME = 578; + + // The interaction type of an ad. + // + // + // + // Corresponds to "Interaction type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INTERACTION_TYPE = 223; + + // The localized name of the interaction type of an ad. + // + // + // + // Corresponds to "Interaction type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INTERACTION_TYPE_NAME = 224; + + // User interest returned from Google Analytics. + // + // + // + // Corresponds to "Interests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INTEREST = 510; + + // Inventory format. + // The format of the ad unit (e.g, banner) where the ad was requested. + // + // + // + // Corresponds to "Inventory format value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INVENTORY_FORMAT = 17; + + // Inventory format name. + // The format of the ad unit (e.g, banner) where the ad was requested. + // + // + // + // Corresponds to "Inventory format" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_FORMAT_NAME = 18; + + // The ID of the inventory share assignment. + // + // + // + // Corresponds to "Inventory share assignment ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + INVENTORY_SHARE_ASSIGNMENT_ID = 648; + + // The name of the inventory share assignment. + // + // + // + // Corresponds to "Inventory share assignment" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_SHARE_ASSIGNMENT_NAME = 649; + + // The result of an inventory share. + // + // + // + // Corresponds to "Inventory share outcome value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INVENTORY_SHARE_OUTCOME = 603; + + // The localized name of the result of an inventory share. + // + // + // + // Corresponds to "Inventory share outcome" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_SHARE_OUTCOME_NAME = 604; + + // The partner ad server of the inventory share. + // + // + // + // Corresponds to "Inventory share partner ad server value" in the Ad + // Manager UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INVENTORY_SHARE_PARTNER_AD_SERVER = 652; + + // The localized name of the partner ad server. + // + // + // + // Corresponds to "Inventory share partner ad server" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_SHARE_PARTNER_AD_SERVER_NAME = 653; + + // The target share percent of the inventory share assignment + // + // + // + // Corresponds to "Partner target share percent" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + INVENTORY_SHARE_TARGET_SHARE_PERCENT = 654; + + // The type of the inventory share. + // + // + // + // Corresponds to "Inventory share type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INVENTORY_SHARE_TYPE = 650; + + // The localized name of the inventory share type. + // + // + // + // Corresponds to "Inventory share type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_SHARE_TYPE_NAME = 651; + + // Inventory type. + // The kind of web page or device where the ad was requested. + // + // + // + // Corresponds to "Inventory type (expanded) value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + INVENTORY_TYPE = 19; + + // Inventory type name. + // The kind of web page or device where the ad was requested. + // + // + // + // Corresponds to "Inventory type (expanded)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + INVENTORY_TYPE_NAME = 20; + + // Whether traffic is Adx Direct. + // + // + // + // Corresponds to "Is AdX Direct" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + IS_ADX_DIRECT = 382; + + // If curation was targeted by the buyer when buying the impression + // + // + // + // Corresponds to "Is curation targeted" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + IS_CURATION_TARGETED = 574; + + // Whether the query was dropped. + // + // + // + // Corresponds to "Is Dropped" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + IS_DROPPED = 464; + + // Whether traffic is First Look. + // + // + // + // Corresponds to "Is First Look" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + IS_FIRST_LOOK_DEAL = 401; + + // The Custom Targeting Value ID + // + // + // + // Corresponds to "Key-values ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + KEY_VALUES_ID = 214; + + // The Custom Targeting Value formatted like `{keyName}={valueName}` + // + // + // + // Corresponds to "Key-values" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + KEY_VALUES_NAME = 215; + + // The agency of the order associated with the line item. + // + // + // + // Corresponds to "Line item agency" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_AGENCY = 663; + + // Whether a Line item is archived. + // + // + // + // Corresponds to "Line item is archived" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `BOOLEAN` + LINE_ITEM_ARCHIVED = 188; + + // Line item comanion delivery option ENUM value. + // + // + // + // Corresponds to "Line item companion delivery option value" in the Ad + // Manager UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; + + // Localized line item comanion delivery option name. + // + // + // + // Corresponds to "Line item companion delivery option" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; + + // The computed status of the LineItem. + // + // + // + // Corresponds to "Line item computed status value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + LINE_ITEM_COMPUTED_STATUS = 250; + + // The localized name of the computed status of the LineItem. + // + // + // + // Corresponds to "Line item computed status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_COMPUTED_STATUS_NAME = 251; + + // The contracted units bought for the Line item. + // + // + // + // Corresponds to "Line item contracted quantity" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `INTEGER` + LINE_ITEM_CONTRACTED_QUANTITY = 92; + + // The cost per unit of the Line item. + // + // + // + // Corresponds to "Line item rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `MONEY` + LINE_ITEM_COST_PER_UNIT = 85; + + // Line item cost type ENUM value. + // + // + // + // Corresponds to "Line item cost type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + LINE_ITEM_COST_TYPE = 212; + + // Localized line item cost type name. + // + // + // + // Corresponds to "Line item cost type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_COST_TYPE_NAME = 213; + + // Represent the end date of a creative associated with line item + // + // + // + // Corresponds to "Line item creative end date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DATE` + LINE_ITEM_CREATIVE_END_DATE = 176; + + // The creative rotation type of the LineItem. + // + // + // + // Corresponds to "Line item creative rotation type value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; + + // The localized name of the creative rotation type of the LineItem. + // + // + // + // Corresponds to "Line item creative rotation type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; + + // Represent the start date of a creative associated with line item + // + // + // + // Corresponds to "Line item creative start date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DATE` + LINE_ITEM_CREATIVE_START_DATE = 175; + + // The 3 letter currency code of the Line Item + // + // + // + // Corresponds to "Line item currency code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_CURRENCY_CODE = 180; + + // The progress made for the delivery of the Line item. + // + // + // + // Corresponds to "Line item delivery indicator" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `PERCENT` + LINE_ITEM_DELIVERY_INDICATOR = 87; + + // The delivery rate type of the LineItem. + // + // + // + // Corresponds to "Line item delivery rate type value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + LINE_ITEM_DELIVERY_RATE_TYPE = 191; + + // The localized name of the delivery rate type of the LineItem. + // + // + // + // Corresponds to "Line item delivery rate type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; + + // The discount of the LineItem in whole units in the LineItem's currency + // code, or if unspecified the Network's currency code. + // + // + // + // Corresponds to "Line item discount (absolute)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `MONEY` + LINE_ITEM_DISCOUNT_ABSOLUTE = 195; + + // The discount of the LineItem in percentage. + // + // + // + // Corresponds to "Line item discount (percentage)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `WHOLE_PERCENT` + LINE_ITEM_DISCOUNT_PERCENTAGE = 196; + + // The end date of the Line item. + // + // + // + // Corresponds to "Line item end date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `DATE` + LINE_ITEM_END_DATE = 81; + + // The end date and time of the Line item. + // + // + // + // Corresponds to "Line item end time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `TIMESTAMP` + LINE_ITEM_END_DATE_TIME = 83; + + // The ENUM value of the environment a LineItem is targeting. + // + // + // + // Corresponds to "Line item environment type value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_ENVIRONMENT_TYPE = 201; + + // The localized name of the environment a LineItem is targeting. + // + // + // + // Corresponds to "Line item environment type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; + + // The deal ID of the Line item. Set for Programmatic Direct campaigns. + // + // + // + // Corresponds to "Line item deal ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + LINE_ITEM_EXTERNAL_DEAL_ID = 97; + + // The external ID of the Line item. + // + // + // + // Corresponds to "Line item external ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_EXTERNAL_ID = 86; + + // The frequency cap of the Line item (descriptive string). + // + // + // + // Corresponds to "Line item frequency cap" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_FREQUENCY_CAP = 256; + + // Line item ID. + // + // + // + // Corresponds to "Line item ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `IDENTIFIER` + LINE_ITEM_ID = 1; + + // Line item labels. + // + // + // + // Corresponds to "Line item labels" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + LINE_ITEM_LABELS = 667; + + // Line item label IDs. + // + // + // + // Corresponds to "Line item label IDs" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + LINE_ITEM_LABEL_IDS = 665; + + // The application that last modified the Line Item. + // + // + // + // Corresponds to "Line item last modified by app" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_LAST_MODIFIED_BY_APP = 181; + + // The total number of clicks delivered of the lifetime of the Line item. + // + // + // + // Corresponds to "Line item lifetime clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + LINE_ITEM_LIFETIME_CLICKS = 95; + + // The total number of impressions delivered over the lifetime of the + // Line item. + // + // + // + // Corresponds to "Line item lifetime impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + LINE_ITEM_LIFETIME_IMPRESSIONS = 94; + + // The total number of viewable impressions delivered over the lifetime of + // the Line item. + // + // + // + // Corresponds to "Line item lifetime viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; + + // Whether or not the Line item is Makegood. Makegood refers to free + // inventory offered to buyers to compensate for mistakes or under-delivery + // in the original campaigns. + // + // + // + // Corresponds to "Line item is makegood" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `BOOLEAN` + LINE_ITEM_MAKEGOOD = 89; + + // Line item Name. + // + // + // + // Corresponds to "Line item" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_NAME = 2; + + // The cost of booking for the Line item (non-CPD). + // + // + // + // Corresponds to "Line item booked revenue (exclude CPD)" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `MONEY` + LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; + + // Whether a Line item is eligible for opitimization. + // + // + // + // Corresponds to "Line item is optimizable" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `BOOLEAN` + LINE_ITEM_OPTIMIZABLE = 90; + + // The PO number of the order associated with the line item. + // + // + // + // Corresponds to "Line item PO number" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_PO_NUMBER = 669; + + // Goal type ENUM value of the primary goal of the line item. + // + // + // + // Corresponds to "Line item primary goal type value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_PRIMARY_GOAL_TYPE = 210; + + // Localized goal type name of the primary goal of the line item. + // + // + // + // Corresponds to "Line item primary goal type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; + + // The total number of impressions or clicks that are reserved for a + // line item. For line items of type BULK or PRICE_PRIORITY, this + // represents the number of remaining impressions reserved. If the line + // item has an impression cap goal, this represents the number of + // impressions or conversions that the line item will stop serving at if + // reached. + // + // + // + // Corresponds to "Line item primary goal units (absolute)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; + + // The percentage of impressions or clicks that are reserved for a + // line item. For line items of type SPONSORSHIP, this represents the + // percentage of available impressions reserved. For line items of type + // NETWORK or HOUSE, this represents the percentage of remaining + // impressions reserved. + // + // + // + // Corresponds to "Line item primary goal units (percentage)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `WHOLE_PERCENT` + LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; + + // Unit type ENUM value of the primary goal of the line item. + // + // + // + // Corresponds to "Line item primary goal unit type value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; + + // Localized unit type name of the primary goal of the line item. + // + // + // + // Corresponds to "Line item primary goal unit type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; + + // The priority of this Line item as a value between 1 and 16. + // In general, a lower priority means more serving priority for the + // Line item. + // + // + // + // Corresponds to "Line item priority" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + LINE_ITEM_PRIORITY = 24; + + // ENUM value describing the state of inventory reservation for the + // LineItem. + // + // + // + // Corresponds to "Line item reservation status value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + LINE_ITEM_RESERVATION_STATUS = 304; + + // Localized string describing the state of inventory reservation for the + // LineItem. + // + // + // + // Corresponds to "Line item reservation status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_RESERVATION_STATUS_NAME = 305; + + // The sales person of the order associated with the line item. + // + // + // + // Corresponds to "Line item salesperson" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_SALESPERSON = 671; + + // The secondary sales people of the order associated with the line item. + // + // + // + // Corresponds to "Line item secondary salespeople" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + LINE_ITEM_SECONDARY_SALESPEOPLE = 673; + + // The secondary traffickers of the order associated with the line item. + // + // + // + // Corresponds to "Line item secondary traffickers" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + LINE_ITEM_SECONDARY_TRAFFICKERS = 675; + + // The start date of the Line item. + // + // + // + // Corresponds to "Line item start date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `DATE` + LINE_ITEM_START_DATE = 82; + + // The start date and time of the Line item. + // + // + // + // Corresponds to "Line item start time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `TIMESTAMP` + LINE_ITEM_START_DATE_TIME = 84; + + // The trafficker of the order associated with the line item. + // + // + // + // Corresponds to "Line item trafficker" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_TRAFFICKER = 677; + + // Line item type ENUM value. + // + // + // + // Corresponds to "Line item type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `ENUM` + LINE_ITEM_TYPE = 193; + + // Localized line item type name. + // + // + // + // Corresponds to "Line item type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + LINE_ITEM_TYPE_NAME = 194; + + // Whether the Line item end time and end date is set to effectively never + // end. + // + // + // + // Corresponds to "Line item is unlimited end time" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + LINE_ITEM_UNLIMITED_END = 187; + + // The artificial cost per unit used by the Ad server to help rank + // inventory. + // + // + // + // Corresponds to "Line item value cost per unit" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `MONEY` + LINE_ITEM_VALUE_COST_PER_UNIT = 88; + + // The web property code used for dynamic allocation Line Items. + // + // + // + // Corresponds to "Line item web property code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + LINE_ITEM_WEB_PROPERTY_CODE = 179; + + // The ID of creative, includes regular creatives, and master and companions + // in case of creative sets + // + // + // + // Corresponds to "Master and Companion creative ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + MASTER_COMPANION_CREATIVE_ID = 140; + + // Name of creative, includes regular creatives, and master and companions + // in case of creative sets + // + // + // + // Corresponds to "Master and Companion creative" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MASTER_COMPANION_CREATIVE_NAME = 141; + + // Mediation type. + // + // + // + // Corresponds to "Mediation type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + MEDIATION_TYPE = 701; + + // Localized mediation type name. + // + // + // + // Corresponds to "Mediation type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MEDIATION_TYPE_NAME = 754; + + // The ID of the yield partner for Mediation. + // + // + // + // Corresponds to "Yield partner ID (mediation)" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: + // + // Data format: `IDENTIFIER` + MEDIATION_YIELD_PARTNER_ID = 661; + + // The name of the yield partner for Mediation. + // + // + // + // Corresponds to "Yield partner (mediation)" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + MEDIATION_YIELD_PARTNER_NAME = 662; + + // The criteria ID of the metro area in which the ad served. + // + // + // + // Corresponds to "Metro ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + METRO_ID = 453; + + // The name of the metro area in which the ad served. + // + // + // + // Corresponds to "Metro" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + METRO_NAME = 454; + + // Whether the mobile app is free. + // + // + // + // Corresponds to "App is free" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + MOBILE_APP_FREE = 128; + + // URL of app icon for the mobile app. + // + // + // + // Corresponds to "App icon URL" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MOBILE_APP_ICON_URL = 129; + + // The ID of the Mobile App. + // + // + // + // Corresponds to "App ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + MOBILE_APP_ID = 123; + + // The name of the mobile app. + // + // + // + // Corresponds to "App" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + MOBILE_APP_NAME = 127; + + // Ownership status of the mobile app. + // + // + // + // Corresponds to "App ownership status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + MOBILE_APP_OWNERSHIP_STATUS = 311; + + // Ownership status of the mobile app. + // + // + // + // Corresponds to "App ownership status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; + + // The App Store of the mobile app. + // + // + // + // Corresponds to "App store value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + MOBILE_APP_STORE = 125; + + // The localized name of the mobile app store. + // + // + // + // Corresponds to "App store" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MOBILE_APP_STORE_NAME = 245; + + // Mobile inventory type. + // Identifies whether a mobile ad came from a regular web page, an AMP web + // page, or a mobile app. + // Values match the Inventory type dimension available in the Overview Home + // dashboard. Note: Video takes precedence over any other value, for + // example, if there is an in-stream video impression on a desktop device, + // it will be attributed to in-stream video and not desktop web. + // + // + // + // Corresponds to "Inventory type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `ENUM` + MOBILE_INVENTORY_TYPE = 99; + + // Mobile inventory type name. + // Identifies whether a mobile ad came from a regular web page, an AMP web + // page, or a mobile app. + // + // + // + // Corresponds to "Inventory type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `STRING` + MOBILE_INVENTORY_TYPE_NAME = 21; + + // Mobile rendering SDK. + // + // + // + // Corresponds to "Rendering SDK value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + MOBILE_RENDERING_SDK = 646; + + // Localized name of the Mobile rendering SDK. + // + // + // + // Corresponds to "Rendering SDK" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MOBILE_RENDERING_SDK_NAME = 647; + + // The major version of the mobile SDK. + // + // + // + // Corresponds to "App SDK major version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + MOBILE_SDK_MAJOR_VERSION = 692; + + // The minor version of the mobile SDK. + // + // + // + // Corresponds to "App SDK minor version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + MOBILE_SDK_MINOR_VERSION = 693; + + // SDK version of the mobile device. + // + // + // + // Corresponds to "App SDK version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + MOBILE_SDK_VERSION_NAME = 130; + + // Breaks down reporting data by month and year. + // + // + // + // Corresponds to "Month and year" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + MONTH_YEAR = 6; + + // Native ad format ID. + // + // + // + // Corresponds to "Native ad format ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + NATIVE_AD_FORMAT_ID = 255; + + // Native ad format name. + // + // + // + // Corresponds to "Native ad format" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + NATIVE_AD_FORMAT_NAME = 254; + + // Native style ID. + // + // + // + // Corresponds to "Native style ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + NATIVE_STYLE_ID = 253; + + // Native style name. + // + // + // + // Corresponds to "Native style" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + NATIVE_STYLE_NAME = 252; + + // No fill reason category in the Ads traffic navigator report. + // + // + // + // Corresponds to "No fill reason category value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + NO_FILL_REASON_CATEGORY = 586; + + // No fill reason category name in the Ads traffic navigator report. + // + // + // + // Corresponds to "No fill reason category" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + NO_FILL_REASON_CATEGORY_NAME = 587; + + // Operating system category. + // + // + // + // Corresponds to "Operating system category value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `ENUM` + OPERATING_SYSTEM_CATEGORY = 117; + + // Operating system category name. + // + // + // + // Corresponds to "Operating system category" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + OPERATING_SYSTEM_CATEGORY_NAME = 118; + + // ID of the operating system version. + // + // + // + // Corresponds to "Operating system ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + OPERATING_SYSTEM_VERSION_ID = 238; + + // Details of the operating system, including version. + // + // + // + // Corresponds to "Operating system" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + OPERATING_SYSTEM_VERSION_NAME = 237; + + // Enum value of the optimization type. + // + // + // + // Corresponds to "Optimization type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + OPTIMIZATION_TYPE = 639; + + // Localized name of the optimization type. + // + // + // + // Corresponds to "Optimization type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + OPTIMIZATION_TYPE_NAME = 640; + + // Order agency. + // + // + // + // Corresponds to "Order agency" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + ORDER_AGENCY = 150; + + // Order agency ID. + // + // + // + // Corresponds to "Order agency ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + ORDER_AGENCY_ID = 151; + + // Order booked CPC. + // + // + // + // Corresponds to "Order booked CPC" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `INTEGER` + ORDER_BOOKED_CPC = 152; + + // Order booked CPM. + // + // + // + // Corresponds to "Order booked CPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `INTEGER` + ORDER_BOOKED_CPM = 153; + + // Order delivery status ENUM value. + // + // + // + // Corresponds to "Order delivery status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + ORDER_DELIVERY_STATUS = 231; + + // Order delivery status localized name. + // + // + // + // Corresponds to "Order delivery status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + ORDER_DELIVERY_STATUS_NAME = 239; + + // Order end date. + // + // + // + // Corresponds to "Order end date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `DATE` + ORDER_END_DATE = 154; + + // Order end date and time. + // + // + // + // Corresponds to "Order end time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `TIMESTAMP` + ORDER_END_DATE_TIME = 155; + + // Order external ID. + // + // + // + // Corresponds to "Order external ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + ORDER_EXTERNAL_ID = 156; + + // Order ID. + // + // + // + // Corresponds to "Order ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `IDENTIFIER` + ORDER_ID = 7; + + // Order labels. + // + // + // + // Corresponds to "Order labels" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + ORDER_LABELS = 170; + + // Order labels IDs. + // + // + // + // Corresponds to "Order label IDs" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + ORDER_LABEL_IDS = 171; + + // Order lifetime clicks. + // + // + // + // Corresponds to "Order lifetime clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + ORDER_LIFETIME_CLICKS = 158; + + // Order lifetime impressions. + // + // + // + // Corresponds to "Order lifetime impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `INTEGER` + ORDER_LIFETIME_IMPRESSIONS = 159; + + // Order name. + // + // + // + // Corresponds to "Order" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + ORDER_NAME = 8; + + // Order PO number. + // + // + // + // Corresponds to "Order PO number" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `STRING` + ORDER_PO_NUMBER = 160; + + // Whether the Order is programmatic. + // + // + // + // Corresponds to "Order is programmatic" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `BOOLEAN` + ORDER_PROGRAMMATIC = 157; + + // Order sales person. + // + // + // + // Corresponds to "Order salesperson" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + ORDER_SALESPERSON = 161; + + // Order sales person ID. + // + // + // + // Corresponds to "Order salesperson ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + ORDER_SALESPERSON_ID = 629; + + // Order secondary sales people. + // + // + // + // Corresponds to "Order secondary salespeople" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + ORDER_SECONDARY_SALESPEOPLE = 164; + + // Order secondary sales people ID. + // + // + // + // Corresponds to "Order secondary salespeople ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + ORDER_SECONDARY_SALESPEOPLE_ID = 165; + + // Order secondary traffickers. + // + // + // + // Corresponds to "Order secondary traffickers" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + ORDER_SECONDARY_TRAFFICKERS = 166; + + // Order secondary traffickers ID. + // + // + // + // Corresponds to "Order secondary trafficker IDs" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + ORDER_SECONDARY_TRAFFICKERS_ID = 167; + + // Order start date. + // + // + // + // Corresponds to "Order start date" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `DATE` + ORDER_START_DATE = 168; + + // Order start date and time. + // + // + // + // Corresponds to "Order start time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `AD_SPEED` + // + // Data format: `TIMESTAMP` + ORDER_START_DATE_TIME = 169; + + // Order trafficker. + // + // + // + // Corresponds to "Order trafficker" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + ORDER_TRAFFICKER = 162; + + // Order trafficker ID. + // + // + // + // Corresponds to "Order trafficker ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + ORDER_TRAFFICKER_ID = 163; + + // Whether the Order end time and end date is set to effectively never + // end. + // + // + // + // Corresponds to "Order is unlimited end time" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + ORDER_UNLIMITED_END = 203; + + // Page path is the part of a page URL that comes after the domain but + // before the query strings from Google Analytics. + // + // + // + // Corresponds to "Page path" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PAGE_PATH = 511; + + // Page title (web) and screen class (mobile) returned from Google + // Analytics. + // + // + // + // Corresponds to "Page title and screen class" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PAGE_TITLE_AND_SCREEN_CLASS = 512; + + // Page title (web) and screen name (mobile) returned from Google Analytics. + // + // + // + // Corresponds to "Page title and screen name" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PAGE_TITLE_AND_SCREEN_NAME = 513; + + // Placement ID + // + // + // + // Corresponds to "Placement ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER` + PLACEMENT_ID = 113; + + // The full list of placement IDs associated with the ad unit. + // + // + // + // Corresponds to "Placement ID (all)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `IDENTIFIER_LIST` + PLACEMENT_ID_ALL = 144; + + // Placement name + // + // + // + // Corresponds to "Placement" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + PLACEMENT_NAME = 114; + + // The full list of placement names associated with the ad unit. + // + // + // + // Corresponds to "Placement (all)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING_LIST` + PLACEMENT_NAME_ALL = 145; + + // Placement status ENUM value + // + // + // + // Corresponds to "Placement status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + PLACEMENT_STATUS = 362; + + // Localized placement status name. + // + // + // + // Corresponds to "Placement status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PLACEMENT_STATUS_NAME = 364; + + // The full list of localized placement status names associated with the ad + // unit. + // + // + // + // Corresponds to "Placement status (all)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING_LIST` + PLACEMENT_STATUS_NAME_ALL = 365; + + // The criteria ID of the postal code in which the ad served. + // + // + // + // Corresponds to "Postal code ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + POSTAL_CODE_ID = 455; + + // The name of the postal code in which the ad served. + // + // + // + // Corresponds to "Postal code" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + POSTAL_CODE_NAME = 456; + + // Indicates the valid PPID (Publisher provided identifier) status on a + // given ad request. + // + // + // + // Corresponds to "PPID status value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + PPID_STATUS = 406; + + // The localized name of that indicates the valid PPID (Publisher provided + // identifier) status on a given ad request. + // + // + // + // Corresponds to "PPID status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PPID_STATUS_NAME = 407; + + // Predicted viewability score bucket. + // + // + // + // Corresponds to "Predicted viewability bucket value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + PREDICTED_VIEWABILITY_BUCKET = 633; + + // The localized name of the predicted viewability score bucket. + // + // + // + // Corresponds to "Predicted viewability bucket" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PREDICTED_VIEWABILITY_BUCKET_NAME = 634; + + // The ID of the secure signals sent in the ad request. + // + // + // + // Corresponds to "Secure signal ID (presented)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + PRESENTED_SECURE_SIGNAL_ID = 495; + + // The name of the secure signals sent in the ad request. + // + // + // + // Corresponds to "Secure signal name (presented)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PRESENTED_SECURE_SIGNAL_NAME = 496; + + // The ID type selected for personalization. + // + // + // + // Corresponds to "Primary personalization ID type value" in the Ad Manager + // UI (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + PRIMARY_PERSONALIZATION_ID_TYPE = 408; + + // The localized name of the ID type selected for personalization. + // + // + // + // Corresponds to "Primary personalization ID type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PRIMARY_PERSONALIZATION_ID_TYPE_NAME = 409; + + // Deprecated. Dimension has been renamed to `DEAL_BUYER_ID`. + // The server will normalize any requests using this value to + // `DEAL_BUYER_ID`. + // This value will be removed on or after October 10, 2025. + PROGRAMMATIC_BUYER_ID = 240 [deprecated = true]; + + // Deprecated. Dimension has been renamed to `DEAL_BUYER_NAME`. + // The server will normalize any requests using this value to + // `DEAL_BUYER_NAME`. + // This value will be removed on or after October 10, 2025. + PROGRAMMATIC_BUYER_NAME = 241 [deprecated = true]; + + // Programmatic channel. + // The type of transaction that occurred in Ad Exchange. + // + // + // + // Corresponds to "Programmatic channel value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + PROGRAMMATIC_CHANNEL = 13; + + // Programmatic channel name. + // The type of transaction that occurred in Ad Exchange. + // + // + // + // Corresponds to "Programmatic channel" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH` + // + // Data format: `STRING` + PROGRAMMATIC_CHANNEL_NAME = 14; + + // External code ID of a publisher provided signal (all levels). + // + // + // + // Corresponds to "Publisher provided signals external code (all levels)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE = 410; + + // The ancestor chain of IDs of a publisher provided signal (all levels). + // + // + // + // Corresponds to "Publisher provided signals ID (all levels)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER_LIST` + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS = 546; + + // The ancestor chain of names of a publisher provided signal (all levels). + // + // + // + // Corresponds to "Publisher provided signals (all levels)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING_LIST` + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME = 412; + + // Tier of a publisher provided signal (all levels). + // + // + // + // Corresponds to "Publisher provided signals tier (all levels)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER = 413; + + // Type of a publisher provided signal (all levels). + // + // + // + // Corresponds to "Publisher provided signals type (all levels)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE = 414; + + // External code ID of a publisher provided signal (delivered). + // + // + // + // Corresponds to "Publisher provided signals external code (delivered)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE = 425; + + // The ancestor chain of IDs of a publisher provided signal (delivered). + // + // + // + // Corresponds to "Publisher provided signals ID (delivered)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER_LIST` + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS = 545; + + // The ancestor chain of names of a publisher provided signal (delivered). + // + // + // + // Corresponds to "Publisher provided signals (delivered)" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING_LIST` + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME = 427; + + // Tier of a publisher provided signal (delivered). + // + // + // + // Corresponds to "Publisher provided signals tier (delivered)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER = 428; + + // Type of a publisher provided signal (delivered). + // + // + // + // Corresponds to "Publisher provided signals type (delivered)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE = 429; + + // External code ID of a publisher provided signal (top level). + // + // + // + // Corresponds to "Publisher provided signals external code (top level)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE = 415; + + // ID of a publisher provided signal (top level). + // + // + // + // Corresponds to "Publisher provided signals ID (top level)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID = 416; + + // Name of a publisher provided signal (top level). + // + // + // + // Corresponds to "Publisher provided signals (top level)" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING_LIST` + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME = 417; + + // Tier of a publisher provided signal (top level). + // + // + // + // Corresponds to "Publisher provided signals tier (top level)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER = 418; + + // Type of a publisher provided signal (top level). + // + // + // + // Corresponds to "Publisher provided signals type (top level)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE = 419; + + // Data provider ID associated with a publisher provided signal. + // + // + // + // Corresponds to "Publisher provided signals (data provider ID)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID = 136; + + // Data provider name associated with a publisher provided signal. + // + // + // + // Corresponds to "Publisher provided signals (data provider)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME = 137; + + // The criteria ID of the region (for example, US state) in which the ad + // served. + // + // + // + // Corresponds to "Region ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `IDENTIFIER` + REGION_ID = 457; + + // The name of the region (for example, US state) in which the ad + // served. + // + // + // + // Corresponds to "Region" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING`, `AD_SPEED` + // + // Data format: `STRING` + REGION_NAME = 458; + + // The rejection class category in the Ads traffic navigator report. + // + // + // + // Corresponds to "Rejection class category value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + REJECTION_CLASS_CATEGORY = 590; + + // The rejection class category name in the Ads traffic navigator report. + // + // + // + // Corresponds to "Rejection class category" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + REJECTION_CLASS_CATEGORY_NAME = 591; + + // The size of a rendered creative, It can differ with the creative's size + // if a creative is shown in an ad slot of a different size. + // + // + // + // Corresponds to "Rendered creative size" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + RENDERED_CREATIVE_SIZE = 343; + + // Inventory Requested Ad Sizes dimension + // + // + // + // Corresponds to "Requested ad sizes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + REQUESTED_AD_SIZES = 352; + + // Request type ENUM + // + // + // + // Corresponds to "Request type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `ENUM` + REQUEST_TYPE = 146; + + // Request type locallized name + // + // + // + // Corresponds to "Request type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + // + // Data format: `STRING` + REQUEST_TYPE_NAME = 147; + + // Indicates if a request was eligible for server-side unwrapping. + // + // + // + // Corresponds to "Server-side unwrapping eligible" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `BOOLEAN` + SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597; + + // The serving restriction mode for privacy. + // + // + // + // Corresponds to "Serving restriction value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + SERVING_RESTRICTION = 631; + + // The localized name of the serving restriction mode for privacy. + // + // + // + // Corresponds to "Serving restriction" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + SERVING_RESTRICTION_NAME = 632; + + // Information about domain or subdomains. + // + // + // + // Corresponds to "Site" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + SITE = 387; + + // The ID of the browser, device or other environment into which a line item + // or creative was served. + // + // + // + // Corresponds to "Targeting ID" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + TARGETING_ID = 232; + + // Information about the browser, device and other environments into which + // a line item or creative was served. + // + // + // + // Corresponds to "Targeting" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + TARGETING_NAME = 233; + + // The way in which advertisers targeted their ads. + // + // + // + // Corresponds to "Targeting type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + TARGETING_TYPE = 385; + + // The localized name of the way in which advertisers targeted their ads. + // + // + // + // Corresponds to "Targeting type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + TARGETING_TYPE_NAME = 386; + + // Whether a third-party cookie or device ID was present on a given ad + // request. + // + // + // + // Corresponds to "Third-party ID status value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + THIRD_PARTY_ID_STATUS = 402; + + // The localized name of whether a third-party cookie or device ID was + // present on a given ad request. + // + // + // + // Corresponds to "Third-party ID status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + THIRD_PARTY_ID_STATUS_NAME = 403; + + // Reports the status of Topics in the ad request. + // + // + // + // Corresponds to "Topics status value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + TOPICS_STATUS = 504; + + // The localized name of the status of Topics in the ad request. + // + // + // + // Corresponds to "Topics status" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + TOPICS_STATUS_NAME = 505; + + // Inventory top private domain dimension + // + // + // + // Corresponds to "Domain" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + TOP_PRIVATE_DOMAIN = 444; + + // Inventory Traffic source dimension + // + // + // + // Corresponds to "Traffic source value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + TRAFFIC_SOURCE = 388; + + // Inventory Traffic source dimension name + // + // + // + // Corresponds to "Traffic source" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + TRAFFIC_SOURCE_NAME = 389; + + // Unified pricing rule ID dimension + // + // + // + // Corresponds to "Unified pricing rule ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + UNIFIED_PRICING_RULE_ID = 393; + + // Unified pricing rule name dimension + // + // + // + // Corresponds to "Unified pricing rule" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + UNIFIED_PRICING_RULE_NAME = 394; + + // A URL defined under a publisher's inventory. + // + // + // + // Corresponds to "URL" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + URL = 506; + + // A URL defined under a publisher's inventory. + // + // + // + // Corresponds to "URL ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + URL_ID = 507; + + // Enum value for the entitlement source. + // + // + // + // Corresponds to "Entitlement source value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `ENUM` + USER_MESSAGES_ENTITLEMENT_SOURCE = 635; + + // The localized name of the entitlement source. + // + // + // + // Corresponds to "Entitlement source" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + USER_MESSAGES_ENTITLEMENT_SOURCE_NAME = 636; + + // Targeting criteria ID for the operating system group. Used for User + // Messages reports. + // + // + // + // Corresponds to "Operating system group ID" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID = 637; + + // The name of the operating system group. Used for User Messages reports. + // + // + // + // Corresponds to "Operating system group" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `STRING` + USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME = 638; + + // The VAST version of the creative that is returned for an ad request. + // + // + // + // Corresponds to "Vast version value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VAST_VERSION = 554; + + // The localized name of the VAST version of the creative that is returned + // for an ad request. + // + // + // + // Corresponds to "Vast version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VAST_VERSION_NAME = 555; + + // The break type of a video ad request. + // + // + // + // Corresponds to "Video ad break type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_AD_BREAK_TYPE = 556; + + // The localized name of the break type of a video ad request. + // + // + // + // Corresponds to "Video ad break type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_BREAK_TYPE_NAME = 557; + + // Video ad duration + // + // + // + // Corresponds to "Video ad duration" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_DURATION = 450; + + // The name of the video ad formats rule used to control the ad formats + // eligible for your inventory. + // + // + // + // Corresponds to "Video ad formats rule" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_FORMATS_RULE = 561; + + // The ID of the video ad formats rule used to control the ad formats + // eligible for your inventory. + // + // + // + // Corresponds to "Video ad formats rule ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + VIDEO_AD_FORMATS_RULE_ID = 560; + + // The duration of a video ad request. + // + // + // + // Corresponds to "Video ad request duration value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_AD_REQUEST_DURATION = 558; + + // The localized name of the midpoint of the duration of a video ad request. + // + // + // + // Corresponds to "Video ad request duration midpoint" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME = 751; + + // The localized name of the duration of a video ad request. + // + // + // + // Corresponds to "Video ad request duration" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_REQUEST_DURATION_NAME = 559; + + // The video ad request source enum. + // + // + // + // Corresponds to "Ad request source value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_AD_REQUEST_SOURCE = 438; + + // The localized name of the video ad request source. + // + // + // + // Corresponds to "Ad request source" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_REQUEST_SOURCE_NAME = 439; + + // Video ad type + // + // + // + // Corresponds to "Video ad type value" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_AD_TYPE = 432; + + // Video ad type localized name + // + // + // + // Corresponds to "Video ad type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_AD_TYPE_NAME = 433; + + // The continuous play type of the video ad impression. + // + // + // + // Corresponds to "Video continuous play type value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_CONTINUOUS_PLAY_TYPE = 721; + + // Video continuous play type localized name. + // + // + // + // Corresponds to "Video continuous play type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_CONTINUOUS_PLAY_TYPE_NAME = 722; + + // Fallback position of the video ad. + // + // + // + // Corresponds to "Fallback position" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_FALLBACK_POSITION = 530; + + // The performance of the video ad inventory broken out by source. + // + // + // + // Corresponds to "Video measurement source value" in the Ad Manager UI + // (when showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_MEASUREMENT_SOURCE = 601; + + // Video measurement source localized name. + // + // + // + // Corresponds to "Video measurement source" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_MEASUREMENT_SOURCE_NAME = 602; + + // The video placement enum as defined by ADCOM 1.0-202303. + // + // + // + // Corresponds to "Video placement value (new)" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_PLCMT = 172; + + // The localized name of the video placement as defined by ADCOM 1.0-202303. + // + // + // + // Corresponds to "Video placement (new)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_PLCMT_NAME = 173; + + // The position in the video pod. For example 0, 1, 2, etc. + // + // + // + // Corresponds to "Position in pod" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_POSITION_IN_POD = 538; + + // The position of the pod in the video stream. For example pre-roll, + // mid-roll, post-roll. + // + // + // + // Corresponds to "Position of pod" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_POSITION_OF_POD = 539; + + // The video SDK version enum. + // + // + // + // Corresponds to "Video SDK version value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_SDK_VERSION = 440; + + // The localized name of the video SDK version. + // + // + // + // Corresponds to "Video SDK version" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_SDK_VERSION_NAME = 441; + + // Video stitcher type. + // + // + // + // Corresponds to "Video stitcher type value" in the Ad Manager UI (when + // showing API fields). + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `ENUM` + VIDEO_STITCHER_TYPE = 752; + + // Localized name of the video stitcher type. + // + // + // + // Corresponds to "Video stitcher type" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + VIDEO_STITCHER_TYPE_NAME = 753; + + // Breaks down reporting data by week of the year. + // + // + // + // Corresponds to "Week" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL`, `REACH`, + // `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + WEEK = 5; + + // Name of the company within a yield group + // + // + // + // Corresponds to "Yield partner" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + YIELD_GROUP_BUYER_NAME = 184; + + // Tag of the company within a yield group. + // + // + // + // Corresponds to "Yield group buyer tag" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + YIELD_GROUP_BUYER_TAG_NAME = 627; + + // ID of the group of ad networks or exchanges used for Mediation and Open + // Bidding + // + // + // + // Corresponds to "Yield group ID" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `IDENTIFIER` + YIELD_GROUP_ID = 182; + + // Name of the group of ad networks or exchanges used for Mediation and Open + // Bidding + // + // + // + // Corresponds to "Yield group" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `STRING` + YIELD_GROUP_NAME = 183; + + // YouTube instream ad duration bucket. + // + // + // + // Corresponds to "Ad duration value" in the Ad Manager UI (when showing API + // fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + YOUTUBE_AD_DURATION_BUCKET = 430; + + // YouTube instream ad duration bucket name. + // + // + // + // Corresponds to "Ad duration" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + YOUTUBE_AD_DURATION_BUCKET_NAME = 431; + + // YouTube instream Ad Type. + // + // + // + // Corresponds to "YouTube ad type ID" in the Ad Manager UI (when showing + // API fields). + // + // Compatible with the following report types: + // + // Data format: `ENUM` + YOUTUBE_AD_TYPE = 399; + + // YouTube instream Ad Type locallized name. + // + // + // + // Corresponds to "YouTube ad type" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `STRING` + YOUTUBE_AD_TYPE_NAME = 400; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 0 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 1 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 2 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 3 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 4 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 5 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 6 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 7 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 8 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 9 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 10 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 11 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 12 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 13 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; + + // Custom field option ID for Line Item with custom field ID equal to the ID + // in index 14 of `ReportDefinition.line_item_custom_field_ids`. + LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 0 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 0 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 1 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 1 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 2 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 2 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 3 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 3 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 4 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 4 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 5 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 5 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 6 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 6 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 7 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 7 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 8 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 8 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 9 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 9 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 10 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 10 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 11 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 11 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 12 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 12 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 13 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 13 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; + + // Custom field value for Line Item with custom field ID equal to the ID + // in index 14 of `ReportDefinition.line_item_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 14 is of + // type `STRING` or `DROPDOWN`. + LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 0 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 1 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 2 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 3 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 4 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 5 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 6 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 7 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 8 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 9 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 10 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 11 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 12 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 13 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; + + // Custom field option ID for Order with custom field ID equal to the ID + // in index 14 of `ReportDefinition.order_custom_field_ids`. + ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; + + // Custom field value for Order with custom field ID equal to the ID + // in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 0 is of type + // STRING. + ORDER_CUSTOM_FIELD_0_VALUE = 13000; + + // Custom field value for Order with custom field ID equal to the ID + // in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 1 is of type + // STRING. + ORDER_CUSTOM_FIELD_1_VALUE = 13001; + + // Custom field value for Order with custom field ID equal to the ID + // in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 2 is of type + // STRING. + ORDER_CUSTOM_FIELD_2_VALUE = 13002; + + // Custom field value for Order with custom field ID equal to the ID + // in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 3 is of type + // STRING. + ORDER_CUSTOM_FIELD_3_VALUE = 13003; + + // Custom field value for Order with custom field ID equal to the ID + // in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 4 is of type + // STRING. + ORDER_CUSTOM_FIELD_4_VALUE = 13004; + + // Custom field value for Order with custom field ID equal to the ID + // in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 5 is of type + // STRING. + ORDER_CUSTOM_FIELD_5_VALUE = 13005; + + // Custom field value for Order with custom field ID equal to the ID + // in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 6 is of type + // STRING. + ORDER_CUSTOM_FIELD_6_VALUE = 13006; + + // Custom field value for Order with custom field ID equal to the ID + // in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 7 is of type + // STRING. + ORDER_CUSTOM_FIELD_7_VALUE = 13007; + + // Custom field value for Order with custom field ID equal to the ID + // in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 8 is of type + // STRING. + ORDER_CUSTOM_FIELD_8_VALUE = 13008; + + // Custom field value for Order with custom field ID equal to the ID + // in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the value + // as a string. Can only be used if the custom field at index 9 is of type + // STRING. + ORDER_CUSTOM_FIELD_9_VALUE = 13009; + + // Custom field value for Order with custom field ID equal to the ID + // in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 10 is of + // type STRING. + ORDER_CUSTOM_FIELD_10_VALUE = 13010; + + // Custom field value for Order with custom field ID equal to the ID + // in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 11 is of + // type STRING. + ORDER_CUSTOM_FIELD_11_VALUE = 13011; + + // Custom field value for Order with custom field ID equal to the ID + // in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 12 is of + // type STRING. + ORDER_CUSTOM_FIELD_12_VALUE = 13012; + + // Custom field value for Order with custom field ID equal to the ID + // in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 13 is of + // type STRING. + ORDER_CUSTOM_FIELD_13_VALUE = 13013; + + // Custom field value for Order with custom field ID equal to the ID + // in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 14 is of + // type STRING. + ORDER_CUSTOM_FIELD_14_VALUE = 13014; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 0 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 1 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 2 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 3 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 4 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 5 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 6 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 7 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 8 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 9 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 10 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 11 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 12 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 13 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; + + // Custom field option ID for Creative with custom field ID equal to the ID + // in index 14 of `ReportDefinition.creative_custom_field_ids`. + CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 0 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 1 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 2 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 3 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 4 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 5 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 6 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 7 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 8 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 9 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 10 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 10 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 11 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 11 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 12 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 12 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 13 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 13 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; + + // Custom field value for Creative with custom field ID equal to the ID + // in index 14 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 14 is of + // type STRING. + CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; + + // Custom field option ID for Backfill line item with custom field ID equal + // to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 0 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 1 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 2 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 3 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 4 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 5 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 6 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 7 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 8 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 9 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 10 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 11 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 12 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 13 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; + + // Custom field value for Backfill line item with custom field ID equal to + // the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 14 is of type `STRING` or `DROPDOWN`. + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 0 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 1 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 2 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 3 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 4 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 5 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 6 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 7 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 8 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 9 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 10 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 11 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 12 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 13 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; + + // Custom field option ID for Backfill order with custom field ID equal to + // the ID in index 14 of `ReportDefinition.order_custom_field_ids`. + BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; + + // Custom field value for Backfill order with custom field ID equal to the + // ID + // in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 0 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 1 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 2 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 3 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 4 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 5 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 6 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 7 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 8 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 9 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 10 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 11 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 12 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 13 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; + + // Custom field value for Backfill order with custom field ID equal to the + // ID in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 14 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; + + // Custom field option ID for Backfill creative with custom field ID equal + // to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID + // in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + // value as a string. Can only be used if the custom field at index 0 is of + // type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 1 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 2 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 3 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 4 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 5 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 6 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 7 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 8 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats + // the value as a string. Can only be used if the custom field at index 9 is + // of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 10 is of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 11 is of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 12 is of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 13 is of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; + + // Custom field value for Backfill creative with custom field ID equal to + // the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + // Treats the value as a string. Can only be used if the custom field at + // index 14 is of type `STRING` or `DROPDOWN`. + BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 0 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_0_VALUE_ID = 100000; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 1 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_1_VALUE_ID = 100001; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 2 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_2_VALUE_ID = 100002; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 3 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_3_VALUE_ID = 100003; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 4 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_4_VALUE_ID = 100004; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 5 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_5_VALUE_ID = 100005; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 6 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_6_VALUE_ID = 100006; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_7_VALUE_ID = 100007; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 8 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_8_VALUE_ID = 100008; + + // Custom Dimension Value ID for Custom Dimension with key equal to the key + // in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_9_VALUE_ID = 100009; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 0 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_0_VALUE = 101000; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 1 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_1_VALUE = 101001; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 2 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_2_VALUE = 101002; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 3 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_3_VALUE = 101003; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 4 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_4_VALUE = 101004; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 5 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_5_VALUE = 101005; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 6 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_6_VALUE = 101006; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 7 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_7_VALUE = 101007; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 8 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_8_VALUE = 101008; + + // Custom Dimension Value name for Custom Dimension with key equal to the + // ID in index 9 of `ReportDefinition.custom_dimension_key_ids`. + CUSTOM_DIMENSION_9_VALUE = 101009; + } + + // Reporting metrics. + enum Metric { + option allow_alias = true; + + // Default value. This value is unused. + METRIC_UNSPECIFIED = 0; + + // The number of people who engaged with your site or app in the specified + // date range from Google Analytics. + // + // + // + // Corresponds to "Active users" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_USERS = 223; + + // Number of impressions with unmuted playback at start. + // + // + // + // Corresponds to "Active View % audible at start" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT = 445; + + // Total Active View audible impressions + // + // + // + // Corresponds to "Total Active View audible impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_AUDIBLE_IMPRESSIONS = 659; + + // Number of impressions with unmuted playback through the entire stream. + // + // + // + // Corresponds to "Active View % audible through completion" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT = 446; + + // Number of impressions with unmuted playback through at least 25%. + // + // + // + // Corresponds to "Active View % audible through first quartile" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT = 447; + + // Number of impressions with unmuted playback through at least 50%. + // + // + // + // Corresponds to "Active View % audible through midpoint" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT = 448; + + // Number of impressions with unmuted playback through at least 75%. + // + // + // + // Corresponds to "Active View % audible through third quartile" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT = 449; + + // Total Active View audio enabled impressions + // + // + // + // Corresponds to "Total Active View audio eligible impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS = 660; + + // Total Active View audio measurable impressions + // + // + // + // Corresponds to "Total Active View audio measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS = 661; + + // Active View total average time in seconds that specific impressions are + // reported as being viewable. + // + // + // + // Corresponds to "Total Active View average viewable time (seconds)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; + + // Total number of impressions that were eligible to measure viewability. + // + // + // + // Corresponds to "Total Active View eligible impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; + + // Number of impressions where the ad player is in the background at any + // point during playback with volume > 0. + // + // + // + // Corresponds to "Active View % ever audible while backgrounded" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT = 450; + + // Number of impressions where volume > 0 at any point. + // + // + // + // Corresponds to "Active View % ever audible" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_EVER_AUDIBLE_PERCENT = 451; + + // Number of impressions where the ad player is in the background at any + // point during playback. + // + // + // + // Corresponds to "Active View % ever backgrounded" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT = 452; + + // Number of impressions where volume = 0 at any point. + // + // + // + // Corresponds to "Active View % ever muted" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_EVER_MUTED_PERCENT = 453; + + // The number of measurable impressions that were played to video + // completion, and also audible and visible at the time of completion. + // + // + // + // Corresponds to "Total Active View impressions audible and visible at + // completion" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION = 411; + + // The total number of impressions that were sampled and measured by active + // view. + // + // + // + // Corresponds to "Total Active View measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; + + // The percentage of total impressions that were measurable by active view + // (out of all the total impressions sampled for active view). + // + // + // + // Corresponds to "Total Active View % measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; + + // Total Active View non-measurable impressions + // + // + // + // Corresponds to "Total Active View non-measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 662; + + // Total Active View non-viewable impressions + // + // + // + // Corresponds to "Total Active View non-viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 663; + + // Total Active View non-viewable impressions distribution + // + // + // + // Corresponds to "Total Active View non-viewable impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 664; + + // Total Active View percent audible impressions + // + // + // + // Corresponds to "Total Active View % audible impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS = 665; + + // Number of impressions where we were able to collect Active View+ signals. + // + // + // + // Corresponds to "Active View+ measurable impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_PLUS_MEASURABLE_COUNT = 454; + + // Revenue generated from Active View impressions. + // + // + // + // Corresponds to "Total Active View revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + ACTIVE_VIEW_REVENUE = 414; + + // Total Active View undetermined impressions distribution + // + // + // + // Corresponds to "Total Active View undetermined impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 666; + + // The total number of impressions viewed on the user's screen. + // + // + // + // Corresponds to "Total Active View viewable impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; + + // Total Active View viewable impressions distribution + // + // + // + // Corresponds to "Total Active View viewable impression distribution" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 667; + + // The percentage of total impressions viewed on the user's screen (out of + // the total impressions measurable by active view). + // + // + // + // Corresponds to "Total Active View % viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; + + // Active View AdSense average time in seconds that specific impressions are + // reported as being viewable. + // + // + // + // Corresponds to "AdSense Active View average viewable time (seconds)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; + + // Total number of impressions delivered by AdSense that were eligible to + // measure viewability. + // + // + // + // Corresponds to "AdSense Active View eligible impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; + + // The number of impressions delivered by AdSense that were sampled, and + // measurable by active view. + // + // + // + // Corresponds to "AdSense Active View measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; + + // The percentage of impressions delivered by AdSense that were measurable + // by active view (out of all AdSense impressions sampled for active view). + // + // + // + // Corresponds to "AdSense Active View % measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; + + // AdSense Active View non-measurable impressions + // + // + // + // Corresponds to "AdSense Active View non-measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 642; + + // AdSense Active View non-viewable impressions + // + // + // + // Corresponds to "AdSense Active View non-viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 643; + + // AdSense Active View non-viewable impressions distribution + // + // + // + // Corresponds to "AdSense Active View non-viewable impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 644; + + // AdSense Active View undetermined impressions distribution + // + // + // + // Corresponds to "AdSense Active View undetermined impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 645; + + // The number of impressions delivered by AdSense viewed on the user's + // screen. + // + // + // + // Corresponds to "AdSense Active View viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; + + // AdSense Active View viewable impressions distribution + // + // + // + // Corresponds to "AdSense Active View viewable impression distribution" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 646; + + // The percentage of impressions delivered by AdSense viewed on the user's + // screen (out of AdSense impressions measurable by active view). + // + // + // + // Corresponds to "AdSense Active View % viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; + + // The average effective cost-per-thousand-impressions earned from the ads + // delivered by AdSense through line item dynamic allocation. + // + // + // + // Corresponds to "AdSense average eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + ADSENSE_AVERAGE_ECPM = 26; + + // Number of clicks delivered by AdSense demand channel. + // + // + // + // Corresponds to "AdSense clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_CLICKS = 23; + + // The ratio of impressions served by AdSense that resulted in users + // clicking on an ad. The clickthrough rate (CTR) is updated nightly. The + // AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). + // + // + // + // Corresponds to "AdSense CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_CTR = 24; + + // Total impressions delivered by AdSense. + // + // + // + // Corresponds to "AdSense impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_IMPRESSIONS = 22; + + // Ratio of clicks delivered by AdSense through line item dynamic allocation + // in relation to the total clicks delivered. + // + // + // + // Corresponds to "AdSense clicks (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_PERCENT_CLICKS = 28; + + // Ratio of impressions delivered by AdSense through line item dynamic + // allocation in relation to the total impressions delivered. + // + // + // + // Corresponds to "AdSense impressions (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_PERCENT_IMPRESSIONS = 27; + + // Ratio of revenue generated by AdSense through line item dynamic + // allocation in relation to the total revenue. + // + // + // + // Corresponds to "AdSense revenue (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_PERCENT_REVENUE = 29; + + // Ratio of revenue generated by AdSense through line item dynamic + // allocation in relation to the total revenue (excluding CPD). + // + // + // + // Corresponds to "AdSense revenue w/o CPD (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; + + // The total number of times that an AdSense ad is delivered. + // + // + // + // Corresponds to "AdSense responses served" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ADSENSE_RESPONSES_SERVED = 41; + + // Revenue generated from AdSense through line item dynamic allocation, + // calculated in the network's currency and time zone. + // + // + // + // Corresponds to "AdSense revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + ADSENSE_REVENUE = 25; + + // Active View AdExchange average time in seconds that specific impressions + // are reported as being viewable. + // + // + // + // Corresponds to "Ad Exchange Active View average viewable time (seconds)" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; + + // Total number of impressions delivered by Ad Exchange that were eligible + // to measure viewability. + // + // + // + // Corresponds to "Ad Exchange Active View eligible impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; + + // The number of impressions delivered by Ad Exchange that were sampled, and + // measurable by active view. + // + // + // + // Corresponds to "Ad Exchange Active View measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; + + // The percentage of impressions delivered by Ad Exchange that were + // measurable by active view (out of all Ad Exchange impressions sampled + // for active view). + // + // + // + // Corresponds to "Ad Exchange Active View % measurable impressions" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; + + // Ad Exchange Active View non-measurable impressions + // + // + // + // Corresponds to "Ad Exchange Active View non-measurable impressions" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 654; + + // Ad Exchange Active View non-viewable impressions + // + // + // + // Corresponds to "Ad Exchange Active View non-viewable impressions" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 655; + + // Ad Exchange Active View non-viewable impressions distribution + // + // + // + // Corresponds to "Ad Exchange Active View non-viewable impression + // distribution" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 656; + + // Ad Exchange Active View undetermined impressions distribution + // + // + // + // Corresponds to "Ad Exchange Active View undetermined impression + // distribution" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 657; + + // The number of impressions delivered by Ad Exchange viewed on the user's + // screen. + // + // + // + // Corresponds to "Ad Exchange Active View viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; + + // Ad Exchange Active View viewable impressions distribution + // + // + // + // Corresponds to "Ad Exchange Active View viewable impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 658; + + // The percentage of impressions delivered by Ad Exchange viewed on the + // user's screen (out of Ad Exchange impressions measurable by active + // view). + // + // + // + // Corresponds to "Ad Exchange Active View % viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; + + // The average effective cost-per-thousand-impressions earned from the ads + // delivered by Ad Exchange through line item dynamic allocation. + // + // + // + // Corresponds to "Ad Exchange average eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_AVERAGE_ECPM = 18; + + // Number of clicks delivered by the Ad Exchange. + // + // + // + // Corresponds to "Ad Exchange clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_CLICKS = 15; + + // The average effective cost-per-click earned from the ads delivered by Ad + // Exchange through line item dynamic allocation. + // + // + // + // Corresponds to "Ad Exchange CPC" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_CPC = 244; + + // The ratio of impressions served by the Ad Exchange that resulted in users + // clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad + // Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange + // impressions). + // + // + // + // Corresponds to "Ad Exchange CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_CTR = 16; + + // Ratio of impressions delivered by Ad Exchange through line item dynamic + // allocation to ad requests. + // + // + // + // Corresponds to "Ad Exchange delivery rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_DELIVERY_RATE = 245; + + // Total impressions delivered by the Ad Exchange. + // + // + // + // Corresponds to "Ad Exchange impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_IMPRESSIONS = 14; + + // The total number of impressions based on the number of ad viewers. + // + // + // + // Corresponds to "Ad Exchange impressions per ad viewer" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER = 427; + + // The total number of impressions based on the number of sessions. + // + // + // + // Corresponds to "Ad Exchange impressions per session" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_EXCHANGE_IMPRESSIONS_PER_SESSION = 428; + + // The increase in revenue gained for won impressions over the applicable + // third party price (the minimum CPM or the best price specified during + // dynamic allocation), + // + // + // + // Corresponds to "Ad Exchange lift earnings" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_LIFT = 246; + + // The ratio of matched ad requests served by the Ad Exchange that + // resulted in users clicking on an ad. The clickthrough rate (CTR) is + // updated nightly. Ad Exchange Matched Request CTR is calculated as: + // (Ad Exchange clicks / Ad Exchange Macthed Ad Requests). + // + // + // + // Corresponds to "Ad Exchange matched request CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_MATCHED_REQUEST_CTR = 247; + + // The average effective cost per thousand matched ad requests earned from + // the ads delivered by Ad Exchange through line item dynamic allocation. + // + // + // + // Corresponds to "Ad Exchange matched request eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_MATCHED_REQUEST_ECPM = 248; + + // The number of responses served divided by the number of queries eligible + // in ad exchange. + // + // + // + // Corresponds to "Ad Exchange match rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_MATCH_RATE = 249; + + // Total opportunities from video VAST error within the waterfall for + // backfill ads. + // + // + // + // Corresponds to "Ad Exchange opportunities from errors" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS = 250; + + // Number of opportunities from impressions within the waterfall for + // backfill ads. + // + // + // + // Corresponds to "Ad Exchange opportunities from impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS = 251; + + // Ratio of clicks delivered by Ad Exchange through line item dynamic + // allocation in relation to the total clicks delivered. + // + // + // + // Corresponds to "Ad Exchange clicks (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_PERCENT_CLICKS = 20; + + // Ratio of impressions delivered by Ad Exchange through line item dynamic + // allocation in relation to the total impressions delivered. + // + // + // + // Corresponds to "Ad Exchange impressions (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; + + // Ratio of revenue generated by Ad Exchange through line item dynamic + // allocation in relation to the total revenue. + // + // + // + // Corresponds to "Ad Exchange revenue (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_PERCENT_REVENUE = 21; + + // Ratio of revenue generated by Ad Exchange through line item dynamic + // allocation in relation to the total revenue (excluding CPD). + // + // + // + // Corresponds to "Ad Exchange revenue w/o CPD (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; + + // The average effective cost-per-thousand-impressions earned from the ads + // delivered by Ad Exchange through line item dynamic allocation and yield + // group partners. + // + // + // + // Corresponds to "Ad Exchange plus yield group eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM = 252; + + // Total impressions delivered by the Ad Exchange and third-party networks. + // + // + // + // Corresponds to "Ad Exchange plus yield group impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS = 253; + + // Revenue generated from the Ad Exchange and Yield Group, calculated in + // your network's currency and time zone. + // + // + // + // Corresponds to "Ad Exchange plus yield group revenue" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE = 254; + + // The total number of times that an Ad Exchange ad is delivered. + // + // + // + // Corresponds to "Ad Exchange responses served" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_RESPONSES_SERVED = 42; + + // Revenue generated from the Ad Exchange through line item dynamic + // allocation, calculated in your network's currency and time zone. + // + // + // + // Corresponds to "Ad Exchange revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_REVENUE = 17; + + // The Ad Exchange revenue accrued in the child network's own account but + // paid to their parent network through auto-payment. This metric is only + // relevant for a "Manage Account" child network. + // + // + // + // Corresponds to "Ad Exchange revenue paid through MCM auto-payment" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 212; + + // The total amount of Ad Exchange revenue based on the + // number of ad viewers. + // + // + // + // Corresponds to "Ad Exchange revenue per ad viewer" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_REVENUE_PER_AD_VIEWER = 429; + + // The number of programmatic eligible queries in Ad Exchange. + // + // + // + // Corresponds to "Ad Exchange total requests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_EXCHANGE_TOTAL_REQUESTS = 255; + + // The ratio of total ad requests served by the Ad Exchange that + // resulted in users clicking on an ad. The clickthrough rate (CTR) is + // updated nightly. Ad Exchange Total Request CTR is calculated as: + // (Ad Exchange clicks / Ad Exchange Total Ad Requests). + // + // + // + // Corresponds to "Ad Exchange total request CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_EXCHANGE_TOTAL_REQUEST_CTR = 256; + + // The average effective cost per thousand ad requests earned from the ads + // delivered by Ad Exchange through line item dynamic allocation and yield + // group partners. + // + // + // + // Corresponds to "Ad Exchange total request eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_EXCHANGE_TOTAL_REQUEST_ECPM = 257; + + // Length of time in seconds that an ad is visible on the user's screen from + // Google Analytics. + // + // + // + // Corresponds to "Ad exposure (seconds)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_EXPOSURE_SECONDS = 241; + + // The total number of times that an ad request is sent to the ad server + // including dynamic allocation. + // + // + // + // Corresponds to "Total ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_REQUESTS = 38; + + // Active View ad server average time in seconds that specific impressions + // are reported as being viewable. + // + // + // + // Corresponds to "Ad server Active View average viewable time (seconds)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; + + // Total number of impressions delivered by the ad server that were eligible + // to measure viewability. + // + // + // + // Corresponds to "Ad server Active View eligible impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; + + // The number of impressions delivered by the ad server that were sampled, + // and measurable by active view. + // + // + // + // Corresponds to "Ad server Active View measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; + + // The percentage of impressions delivered by the ad server that were + // measurable by active view (out of all the ad server impressions sampled + // for active view). + // + // + // + // Corresponds to "Ad server Active View % measurable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; + + // The number of impressions delivered by Ad Server that were not measured. + // For example, impressions where measurement was attempted but failed. + // + // + // + // Corresponds to "Ad server Active View non-measurable impressions" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 332; + + // The number of impressions delivered by Ad Server that were measured by + // active view, but deemed not viewable. + // + // + // + // Corresponds to "Ad server Active View non-viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 331; + + // The fraction of non-viewable impressions among eligible impressions from + // Ad Server in Active View reporting." + // + // + // + // Corresponds to "Ad server Active View non-viewable impression + // distribution" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 334; + + // The fraction of non-eligible impressions among eligible impressions from + // Ad Server in Active View reporting." + // + // + // + // Corresponds to "Ad server Active View undetermined impression + // distribution" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 335; + + // The number of impressions delivered by the ad server viewed on the user's + // screen. + // + // + // + // Corresponds to "Ad server Active View viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; + + // The fraction of viewable impressions among eligible impressions from Ad + // Server in Active View reporting. + // + // + // + // Corresponds to "Ad server Active View viewable impression distribution" + // in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 333; + + // The percentage of impressions delivered by the ad server viewed on the + // user's screen (out of the ad server impressions measurable by active + // view). + // + // + // + // Corresponds to "Ad server Active View % viewable impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; + + // Average effective cost-per-thousand-impressions earned from the ads + // delivered by the Google Ad Manager server. + // + // + // + // Corresponds to "Ad server average eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_AVERAGE_ECPM = 34; + + // Average effective cost-per-thousand-impressions earned from the ads + // delivered by the Google Ad Manager server, excluding CPD value. + // + // + // + // Corresponds to "Ad server average eCPM w/o CPD" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; + + // Total raw impressions counted when creative begins to render or the + // first frame of a video is shown. + // + // + // + // Corresponds to "Ad server begin to render impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262; + + // Total clicks served by the Google Ad Manager server. It usually takes + // about 30 minutes for new clicks to be recorded and added to the total + // displayed in reporting. + // + // + // + // Corresponds to "Ad server clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_CLICKS = 7; + + // The number of completed views for ad server. + // + // + // + // Corresponds to "Ad server completed views" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_COMPLETED_VIEWS = 431; + + // Total coviewed impressions delivered by the Ad Server. + // + // + // + // Corresponds to "Ad server impressions (co-viewed)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_COVIEWED_IMPRESSIONS = 554; + + // CPD revenue earned, calculated in your network's currency, for + // the ads delivered by the Google Ad Manager server. Sum of all booked + // revenue. + // + // + // + // Corresponds to "Ad server CPD revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_CPD_REVENUE = 32; + + // Ratio of impressions served by the Google Ad Manager server that resulted + // in users clicking on an ad. The clickthrough rate (CTR) is updated + // nightly. The ad server CTR is calculated as: (Ad server clicks / Ad + // server impressions). + // + // + // + // Corresponds to "Ad server CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_CTR = 8; + + // Gross revenue earned, calculated in your network's currency, for the ads + // delivered by the Google Ad Manager server. This includes pre-rev-share + // revenue for Programmatic traffic. This metric is to help with the + // transition from gross to net revenue reporting. + // + // + // + // Corresponds to "Ad server total revenue (gross)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_GROSS_REVENUE = 483; + + // Gross revenue earned, calculated in your network's currency, for the ads + // delivered by the Google Ad Manager server, excluding CPD revenue. This + // includes pre-rev-share revenue for Programmatic traffic. This metric is + // to help with the transition from gross to net revenue reporting. + // + // + // + // Corresponds to "Ad server CPM and CPC revenue (gross)" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_GROSS_REVENUE_WITHOUT_CPD = 484; + + // Total impressions delivered by the Ad Server. + // + // + // + // Corresponds to "Ad server impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_IMPRESSIONS = 6; + + // Total impressions delivered by the Ad Server with companion impressions. + // + // + // + // Corresponds to "Ad server impressions with companion" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_IMPRESSIONS_WITH_COMPANION = 222; + + // Impressions (via begin to render methodology) delivered by the Google Ad + // Manager server considered inactive, as defined by served to a device + // receiving ad or bid requests continuously for a session of greater than + // 16 hours without a "reset" event. + // + // + // + // Corresponds to "Ad server inactive begin to render impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 338; + + // Ratio of clicks delivered by the Google Ad Manager server in relation to + // the total clicks delivered. + // + // + // + // Corresponds to "Ad server clicks (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_PERCENT_CLICKS = 12; + + // Ratio of impressions delivered by the Google Ad Manager server in + // relation to the total impressions delivered. + // + // + // + // Corresponds to "Ad server impressions (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_PERCENT_IMPRESSIONS = 11; + + // Ratio of revenue generated by the Google Ad Manager server in relation + // to the total revenue. + // + // + // + // Corresponds to "Ad server revenue (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_PERCENT_REVENUE = 35; + + // Ratio of revenue generated by the Google Ad Manager server (excluding + // CPD) in relation to the total revenue. + // + // + // + // Corresponds to "Ad server revenue w/o CPD (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; + + // The total number of times that an ad is served by the ad server. + // + // + // + // Corresponds to "Ad server responses served" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_RESPONSES_SERVED = 40; + + // All CPM, CPC, and CPD revenue earned, calculated in your network's + // currency, for the ads delivered by the Google Ad Manager server. + // Sum of all booked revenue. + // + // + // + // Corresponds to "Ad server total revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_REVENUE = 33; + + // The Google Ad Manager server revenue accrued in the child network's own + // account but paid to their parent network through auto-payment. This + // metric is only relevant for a "Manage Account" child network. + // + // + // + // Corresponds to "Ad server revenue paid through MCM auto-payment" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 213; + + // Revenue (excluding CPD) earned, calculated in your network's currency, + // for the ads delivered by the Google Ad Manager server. Sum of all booked + // revenue. + // + // + // + // Corresponds to "Ad server CPM and CPC revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AD_SERVER_REVENUE_WITHOUT_CPD = 9; + + // The number of clicks delivered by the ad server by explicit custom + // criteria targeting. + // + // + // + // Corresponds to "Ad server targeted clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_TARGETED_CLICKS = 274; + + // The number of impressions delivered by the ad server by explicit custom + // criteria targeting. + // + // + // + // Corresponds to "Ad server targeted impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_TARGETED_IMPRESSIONS = 275; + + // The number of tracked ads delivered by the ad server. + // + // + // + // Corresponds to "Ad server tracked ads" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_TRACKED_ADS = 264; + + // Total raw impressions counted when creative begins to render or the + // first frame of a video is shown, before invalid traffic filtrations by + // Ad Server. + // + // + // + // Corresponds to "Ad server unfiltered begin to render impressions" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261; + + // Total clicks delivered by the Ad Server before spam filtering. + // + // + // + // Corresponds to "Ad server unfiltered clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_UNFILTERED_CLICKS = 259; + + // Total downloaded impressions delivered by the Ad Server before spam + // filtering. + // + // + // + // Corresponds to "Ad server unfiltered downloaded impressions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS = 260; + + // Deprecated. This metric has been renamed to + // `AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS`. + // The server will normalize any requests using this value to + // `AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS`. + // This value will be removed on or after October 1, 2025. + AD_SERVER_UNFILTERED_IMPRESSIONS = 260 [deprecated = true]; + + // The number of tracked ads delivered by the ad server before invalid + // traffic filtrations. + // + // + // + // Corresponds to "Ad server unfiltered tracked ads" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_SERVER_UNFILTERED_TRACKED_ADS = 263; + + // Length of time in seconds that an ad unit is visible on the user's screen + // from Google Analytics. + // + // + // + // Corresponds to "Ad unit exposure (seconds)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AD_UNIT_EXPOSURE_SECONDS = 242; + + // The number of users who viewed an ads on your site or app in the + // specified date range from Google Analytics. + // + // + // + // Corresponds to "Ad viewers" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + AD_VIEWERS = 425; + + // Number of ads that Ad Manager failed to render in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Ads failed to render" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_ADS_FAILED_TO_RENDER = 430; + + // Number of line items that matched an ad request in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Eligible line items" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_ELIGIBLE_LINE_ITEMS = 342; + + // Number of ad requests that contain eligible line items for the auction in + // the Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests with eligible line items" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS = 343; + + // Number of ad requests that have header bidding trafficking demand in the + // Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests allowing header bidding trafficking" in the + // Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_ALLOWED_AD_REQUESTS = 344; + + // Number of header bidding trafficking bids that are able to match an ad + // request and enter the auction in the Ads traffic navigator report. + // + // + // + // Corresponds to "Competing header bidding trafficking bids" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_BIDS_IN_AUCTION = 345; + + // Number of header bidding trafficking ad requests with bids in auction in + // the Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests with competing header bidding trafficking + // bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS = 346; + + // Number of header bidding trafficking candidate bids that match an ad + // request in the Ads traffic navigator report. + // + // + // + // Corresponds to "Header bidding trafficking bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_CANDIDATE_BIDS = 347; + + // Number of invalid header bidding trafficking ad requests in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Invalid ad requests allowing header bidding trafficking" + // in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_INVALID_AD_REQUESTS = 348; + + // Number of header bidding trafficking ad requests with no bids in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Header bidding trafficking ad requests with no bids" in + // the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_NO_BIDS_AD_REQUESTS = 472; + + // Number of header bidding trafficking bids that didn't match the ad + // request in the Ads traffic navigator report. + // + // + // + // Corresponds to "Rejected header bidding trafficking bids" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_REJECTED_BIDS = 349; + + // Number of ad requests with the header bidding trafficking demand that are + // valid in the Ads traffic navigator report. + // + // + // + // Corresponds to "Valid header bidding trafficking ad requests" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_VALID_AD_REQUESTS = 350; + + // Number of header bidding trafficking ad requests with bids in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Header bidding trafficking ad requests with bids" in the + // Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_HBT_WITH_BIDS_AD_REQUESTS = 473; + + // Ad requests that are not valid in the Ads traffic navigator report. + // + // + // + // Corresponds to "Invalid ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_INVALID_AD_REQUESTS = 351; + + // Number of line items with no creative retrieved in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Creative not retrieved" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED = 476; + + // Number of line items that matched an ad request and entered in auction in + // the Ads traffic navigator report. + // + // + // + // Corresponds to "Competing line items" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEMS_IN_AUCTION = 352; + + // Number of line items that were ranked but did not compete in auction in + // the Ads traffic navigator report. + // + // + // + // Corresponds to "Non-competing line items" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEMS_NOT_COMPETING = 515; + + // Number of line items that matched an ad request but were not selected to + // compete in the auction in the Ads traffic navigator report. + // + // + // + // Corresponds to "Not selected to compete" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEMS_NOT_SELECTED = 353; + + // Number of line item ad requests in auction in the Ads traffic navigator + // report. + // + // + // + // Corresponds to "Ad requests with competing line items" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS = 354; + + // Number of line item targeted ad requests in the Ads traffic navigator + // report. + // + // + // + // Corresponds to "Ad requests with targeted line items" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_LINE_ITEM_TARGETED_AD_REQUESTS = 355; + + // Number of ad requests with the mediation demand in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Ad requests allowing mediation" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_ALLOWED_AD_REQUESTS = 356; + + // Number of invalid mediation ad requests in the Ads traffic navigator + // report. + // + // + // + // Corresponds to "Invalid ad requests allowing mediation" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_INVALID_AD_REQUESTS = 357; + + // Number of times the Yield Partner's ad was loaded in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Loaded ads from chains" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_LOADED_ADS_FROM_CHAINS = 358; + + // Number of ad requests with mediation demand having no partners in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Mediation requests with no partners" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_NO_PARTNER_AD_REQUESTS = 474; + + // Number of mediation yield partners in auction in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Competing mediation partners" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_PARTNERS_IN_AUCTION = 359; + + // Number of ad requests in auction that serve mediation chains in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Ad requests with competing mediation partners" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS = 360; + + // Number of mediation partners that didn't match an ad request in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Rejected partners" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_REJECTED_PARTNERS = 361; + + // Number of mediation partners that have targeted an ad request and are + // able to match it in the Ads traffic navigator report. + // + // + // + // Corresponds to "Targeted mediation partners" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_TARGETED_PARTNERS = 362; + + // Number of partners on served mediation chains in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Total yield partners" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_TOTAL_YIELD_PARTNERS = 442; + + // Number of ads from mediation chains that Ad Manager won't serve in the + // Ads traffic navigator report. + // + // + // + // Corresponds to "Unloaded ads from chains" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS = 363; + + // Number of times the Yield Partner's mediation chain ad was not reached + // in the Ads traffic navigator report. + // + // + // + // Corresponds to "Unused bids or partners" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS = 364; + + // Number of ad requests that have mediation demand in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Valid mediation ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_VALID_AD_REQUESTS = 365; + + // Number of ad requests with mediation demand having partners in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Ad requests with targeted mediation partners" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS = 475; + + // Number of ad requests with programmatic demand that have received a bid + // in the Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests with bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS = 366; + + // Number of ad requests with programmatic demand that have sent a bid to at + // least one buyer in the Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests with bid requests sent" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT = 367; + + // Number of ad requests with programmatic demand in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Ad requests allowing programmatic" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS = 368; + + // Number of ads with programmatic bids that entered the auction + // in the Ads traffic navigator report. + // + // + // + // Corresponds to "Competing programmatic bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BIDS_IN_AUCTION = 369; + + // Number of ad requests that have received eligible programmatic bids to + // compete in the auction in the Ads traffic navigator report. + // + // + // + // Corresponds to "Ad requests with competing programmatic bids" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS = 370; + + // Number of programmatic callout bid requests sent to buyers in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Bid requests sent" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BID_REQUESTS_SENT = 371; + + // Number of programmatic callout bid requests that resulted with a response + // in the Ads traffic navigator report. + // + // + // + // Corresponds to "Bid requests with response" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE = 372; + + // All buyers that Ad Manager could potentially send a programmatic bid + // request to in the Ads traffic navigator report. + // + // + // + // Corresponds to "Bid request candidates" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES = 373; + + // Number of programmatic callout bid requests with errors in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Bid request errors" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_BID_REQUEST_ERRORS = 374; + + // Number of ad requests that are ineligible for programmatic in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Invalid ad requests allowing programmatic" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS = 375; + + // Number of programmatic callout bids rejected in the Ads traffic navigator + // report. + // + // + // + // Corresponds to "Rejected bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_REJECTED_BIDS = 376; + + // Number of programmatic callout bid requests Ad Manager won't send to + // buyers in the Ads traffic navigator report. + // + // + // + // Corresponds to "Skipped bid requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS = 377; + + // Number of programmatic bids that Ad Manager received from buyers in the + // Ads traffic navigator report. + // + // + // + // Corresponds to "Total programmatic bids" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_TOTAL_BIDS = 378; + + // Number of ad requests that allow programmatic in the Ads traffic + // navigator report. + // + // + // + // Corresponds to "Valid ad requests allowing programmatic" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_PROGRAMMATIC_VALID_AD_REQUESTS = 379; + + // Number of line items targeted that didn't match an ad request in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Rejected line items" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_REJECTED_LINE_ITEMS = 380; + + // Number of mediation chains Ad Manager serves in the Ads traffic navigator + // report. + // + // + // + // Corresponds to "Served mediation chains" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_SERVED_MEDIATION_CHAINS = 381; + + // Number of single ads served in the Ads traffic navigator report. + // + // + // + // Corresponds to "Served single ads" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_SERVED_SINGLE_ADS = 382; + + // Number of line items with targeting that matches an ad request in the Ads + // traffic navigator report. + // + // + // + // Corresponds to "Targeted line items" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_TARGETED_LINE_ITEMS = 383; + + // Total number of ad requests which counts optimized pod request as a + // single request in the Ads traffic navigator report. + // + // + // + // Corresponds to "Total ad requests (ATN)" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_TOTAL_AD_REQUESTS = 384; + + // Number of competing ads in auction in the Ads traffic navigator report. + // + // + // + // Corresponds to "Total competing ads" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_TOTAL_COMPETING_ADS_IN_AUCTION = 385; + + // Total number of ads loaded in the Ads traffic navigator report. + // + // + // + // Corresponds to "Total loaded ads" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_TOTAL_LOADED_ADS = 387; + + // Ad requests that are valid in the Ads traffic navigator report. + // + // + // + // Corresponds to "Valid ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_VALID_AD_REQUESTS = 389; + + // Number of times the Yield Partner passed-back on a Mediation chain ad in + // the Ads traffic navigator report. + // + // + // + // Corresponds to "Yield group mediation passbacks" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + ATN_YIELD_GROUP_MEDIATION_PASSBACKS = 390; + + // eCPM averaged across the Google Ad Manager server, AdSense, + // and Ad Exchange. + // + // + // + // Corresponds to "Total average eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AVERAGE_ECPM = 37; + + // eCPM averaged across the Google Ad Manager server (excluding CPD), + // AdSense, and Ad Exchange. + // + // + // + // Corresponds to "Total average eCPM w/o CPD" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AVERAGE_ECPM_WITHOUT_CPD = 5; + + // Average user engagement seconds per session in Google Analytics. + // + // + // + // Corresponds to "Average engagement time per session (seconds)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION = 224; + + // Average user engagement seconds per user in Google Analytics. + // + // + // + // Corresponds to "Average engagement time per user (seconds)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AVERAGE_ENGAGEMENT_SECONDS_PER_USER = 225; + + // The average number of unique users reached per ad impression. + // + // + // + // Corresponds to "Average impressions/unique visitor" in the Ad Manager UI. + // + // Compatible with the following report types: `REACH` + // + // Data format: `DOUBLE` + AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR = 418; + + // Average total purchase revenue per user in Google Analytics. + // + // + // + // Corresponds to "ARPPU" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER = 226; + + // Average revenue earned from each active user in Google Analytics. + // + // + // + // Corresponds to "ARPU" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + AVERAGE_REVENUE_PER_USER = 227; + + // Average length of a session in Google Analytics. + // + // + // + // Corresponds to "Average session duration (seconds)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + AVERAGE_SESSION_SECONDS = 228; + + // The number of bids. + // + // + // + // Corresponds to "Bids" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + BIDS = 443; + + // The average CPM of the bids submitted by bidders. + // + // + // + // Corresponds to "Average bid CPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + BID_AVERAGE_CPM = 444; + + // The ratio of (sessions - engaged sessions) / sessions. + // + // + // + // Corresponds to "Bounce rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + BOUNCE_RATE = 433; + + // The number of times a user clicked on an ad. + // + // + // + // Corresponds to "Total clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + CLICKS = 2; + + // The total number of times that the code for an ad is served by the ad + // server including dynamic allocation. + // + // + // + // Corresponds to "Total code served count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + CODE_SERVED_COUNT = 44; + + // Total amount of CPC revenue. + // + // + // + // Corresponds to "CPC revenue" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `MONEY` + CPC_REVENUE = 440; + + // Total amount of CPM revenue. + // + // + // + // Corresponds to "CPM revenue" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `MONEY` + CPM_REVENUE = 441; + + // Percent of creatives whose load time is between [0, 500ms). + // + // + // + // Corresponds to "Creative load time 0 - 500ms (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_0_500_PERCENT = 324; + + // Percent of creatives whose load time is between [1000, 2000ms). + // + // + // + // Corresponds to "Creative load time 1s - 2s (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_1000_2000_PERCENT = 326; + + // Percent of creatives whose load time is between [2000, 4000ms). + // + // + // + // Corresponds to "Creative load time 2s - 4s (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_2000_4000_PERCENT = 327; + + // Percent of creatives whose load time is between [4000, 8000ms). + // + // + // + // Corresponds to "Creative load time 4s - 8s (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_4000_8000_PERCENT = 328; + + // Percent of creatives whose load time is between [500, 1000ms). + // + // + // + // Corresponds to "Creative load time 500ms - 1s (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_500_1000_PERCENT = 325; + + // Percent of creatives load time is greater than 8000ms. + // + // + // + // Corresponds to "Creative load time >8s (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + CREATIVE_LOAD_TIME_GT_8000_PERCENT = 329; + + // For standard ads, your ad clickthrough rate (CTR) is the number of ad + // clicks divided by the number of individual ad impressions expressed as a + // fraction. Ad CTR = Clicks / Ad impressions. + // + // + // + // Corresponds to "Total CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + CTR = 3; + + // Number of bids received for a deal. + // + // + // + // Corresponds to "Deals bids" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + DEALS_BIDS = 542; + + // Bid rate for a deal. + // + // + // + // Corresponds to "Deals bid rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + DEALS_BID_RATE = 543; + + // Number of bid requests sent for a deal. + // + // + // + // Corresponds to "Deals bid requests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + DEALS_BID_REQUESTS = 544; + + // Number of winning bids for a deal. + // + // + // + // Corresponds to "Deals winning bids" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + DEALS_WINNING_BIDS = 545; + + // Bid win rate for a deal. + // + // + // + // Corresponds to "Deals win rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + DEALS_WIN_RATE = 546; + + // Percent of dom load time to 1st ad request in [0, 500ms) range. + // + // + // + // Corresponds to "Page navigation to first ad request time 0 - 500ms (%)" + // in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 521; + + // Percent of dom load time to 1st ad request in [1000ms, 2000ms) range. + // + // + // + // Corresponds to "Page navigation to first ad request time 1s - 2s (%)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 522; + + // Percent of dom load time to 1st ad request in [2000ms, 4000ms) range. + // + // + // + // Corresponds to "Page navigation to first ad request time 2s - 4s (%)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 523; + + // Percent of dom load time to 1st ad request in [4000ms, 8000ms) range. + // + // + // + // Corresponds to "Page navigation to first ad request time 4s - 8s (%)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 524; + + // Percent of dom load time to 1st ad request in [500ms, 1000ms) range. + // + // + // + // Corresponds to "Page navigation to first ad request time 500ms - 1s (%)" + // in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 525; + + // Percent of dom load time to 1st ad request in [8000ms, +inf) range. + // + // + // + // Corresponds to "Page navigation to first ad request time >8s (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 520; + + // Percent of dom load time to tag load time in [0, 500ms) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time 0 - 500ms (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT = 526; + + // Percent of dom load time to tag load time in [1000ms, 2000ms) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time 1s - 2s (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT = 527; + + // Percent of dom load time to tag load time in [2000ms, 4000ms) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time 2s - 4s (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT = 528; + + // Percent of dom load time to tag load time in [4000ms, 8000ms) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time 4s - 8s (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT = 529; + + // Percent of dom load time to tag load time in [500ms, 1000ms) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time 500ms - 1s (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT = 531; + + // Percent of dom load time to tag load time in [8000ms, +inf) range. + // + // + // + // Corresponds to "Page navigation to tag loaded time >8s (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT = 530; + + // Percentage of ad responses that didn't result in an impression. + // + // + // + // Corresponds to "Drop-off rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + DROPOFF_RATE = 415; + + // Engaged session count from Google Analytics. + // + // + // + // Corresponds to "Engaged sessions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + ENGAGED_SESSIONS = 229; + + // Engaged sessions per user from Google Analytics. + // + // + // + // Corresponds to "Engaged sessions per user" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + ENGAGED_SESSIONS_PER_USER = 230; + + // The ratio of engaged sessions to sessions. + // + // + // + // Corresponds to "Engagement rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + ENGAGEMENT_RATE = 426; + + // Percentage of European regulations messages where the user consented to + // all of the purposes and vendors. + // + // + // + // Corresponds to "European regulations consent rate" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + EUROPEAN_REGULATIONS_CONSENT_RATE = 270; + + // Percentage of European regulations messages where users made a consent + // choice after selecting "Manage options". + // + // + // + // Corresponds to "European regulations custom consent rate" in the Ad + // Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE = 271; + + // Number of times a European regulations message was shown to users. + // + // + // + // Corresponds to "European regulations messages shown" in the Ad Manager + // UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + EUROPEAN_REGULATIONS_MESSAGES_SHOWN = 272; + + // Percentage of European regulations messages where the user rejected all + // purposes and vendors. + // + // + // + // Corresponds to "European regulations no consent rate" in the Ad Manager + // UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + EUROPEAN_REGULATIONS_NO_CONSENT_RATE = 273; + + // The rate at which an ad request is filled by the ad server including + // dynamic allocation. + // + // + // + // Corresponds to "Total fill rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + FILL_RATE = 258; + + // The number of clicks joined with Google Analytics data. + // + // + // + // Corresponds to "Google Analytics clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + GOOGLE_ANALYTICS_CLICKS = 231; + + // The click-through rate from Google Analytics data. + // + // + // + // Corresponds to "Google Analytics CTR" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + GOOGLE_ANALYTICS_CTR = 232; + + // The eCPM revenue data from Google Analytics. + // + // + // + // Corresponds to "Google Analytics eCPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + GOOGLE_ANALYTICS_ECPM = 233; + + // The number of impressions joined with Google Analytics data. + // + // + // + // Corresponds to "Google Analytics impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + GOOGLE_ANALYTICS_IMPRESSIONS = 234; + + // The amount of revenue joined with Google Analytics data. + // + // + // + // Corresponds to "Google Analytics revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + GOOGLE_ANALYTICS_REVENUE = 235; + + // Number of views of a web site or mobile screen from Google Analytics. + // + // + // + // Corresponds to "Views" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + GOOGLE_ANALYTICS_VIEWS = 236; + + // Number of views per user from Google Analytics. + // + // + // + // Corresponds to "Views per user" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + GOOGLE_ANALYTICS_VIEWS_PER_USER = 237; + + // The number of coviewed impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold auction impressions (co-viewed)" in the Ad + // Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; + + // The number of auction impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold auction impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; + + // The number of coviewed impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold impressions (co-viewed)" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; + + // The number of impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_IMPRESSIONS = 130; + + // The number of coviewed impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold reservation impressions (co-viewed)" in the + // Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; + + // The number of reservation impressions sold by Google in partner sales. + // + // + // + // Corresponds to "Google-sold reservation impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; + + // Total impressions from the Google Ad Manager server, AdSense, + // Ad Exchange, and yield group partners. + // + // + // + // Corresponds to "Total impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + IMPRESSIONS = 1; + + // The number of impressions (via begin to render methodology) considered + // inactive, as defined by served to a device receiving ad or bid requests + // continuously for a session of greater than 16 hours without a "reset" + // event. Only applied to CTV ads. + // + // + // + // Corresponds to "Inactive begin to render impressions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 407; + + // The total number of inventory shares + // + // + // + // Corresponds to "Inventory shares" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + INVENTORY_SHARES = 547; + + // The total number of partner unfilled opportunities from an inventory + // share + // + // + // + // Corresponds to "Inventory share partner unfilled opportunities" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES = 548; + + // The number of invoiced impressions. + // + // + // + // Corresponds to "Invoiced impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + INVOICED_IMPRESSIONS = 404; + + // The number of invoiced unfilled impressions. + // + // + // + // Corresponds to "Invoiced unfilled impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + INVOICED_UNFILLED_IMPRESSIONS = 405; + + // The number of mediation chains that were filled. + // + // + // + // Corresponds to "Mediation chains filled" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + MEDIATION_CHAINS_FILLED = 584; + + // The number of impressions where the user chose to mute the ad. + // + // + // + // Corresponds to "Total muted impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + MUTED_IMPRESSIONS = 412; + + // The number of impressions that had the "Mute This Ad" overlay applied. + // + // + // + // Corresponds to "Total mute eligible impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + MUTE_ELIGIBLE_IMPRESSIONS = 409; + + // The total number of opportunities from impressions and errors. + // + // + // + // Corresponds to "Total opportunities" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + OPPORTUNITIES = 463; + + // The number of impressions that were overdelivered. + // + // + // + // Corresponds to "Total overdelivered impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + OVERDELIVERED_IMPRESSIONS = 432; + + // The number of filled pod requests (filled by partner or Google) in + // partner sales. + // + // + // + // Corresponds to "Filled pod requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SALES_FILLED_POD_REQUESTS = 135; + + // The percent of filled requests to total ad requests in + // partner sales. + // + // + // + // Corresponds to "Fill rate" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `PERCENT` + PARTNER_SALES_FILL_RATE = 136; + + // The percent of partner filled requests to total ad requests + // in partner sales. + // + // + // + // Corresponds to "Partner match rate" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `PERCENT` + PARTNER_SALES_PARTNER_MATCH_RATE = 137; + + // The number of queries eligible for partner sales. + // + // + // + // Corresponds to "Total partner sales ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SALES_QUERIES = 132; + + // The number of partner unfilled impressions in partner sales. + // If a pod request is not filled by partner but filled by Google, this + // metric will still count 1. + // + // + // + // Corresponds to "Partner unfilled impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; + + // The number of partner unmatched queries in partner sales. + // If an ad request is not filled by partner but filled by Google, this + // metric will still count 1. + // + // + // + // Corresponds to "Partner unmatched ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SALES_UNMATCHED_QUERIES = 134; + + // The number of code served sold by partner in partner sales. + // + // + // + // Corresponds to "Partner-sold code served count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SOLD_CODE_SERVED = 125; + + // The number of coviewed impressions sold by partner in partner sales. + // + // + // + // Corresponds to "Partner-sold impressions (co-viewed)" in the Ad Manager + // UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; + + // The number of impressions sold by partner in partner sales. + // + // + // + // Corresponds to "Partner-sold impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + PARTNER_SOLD_IMPRESSIONS = 123; + + // The total number of ad requests eligible for programmatic inventory, + // including Programmatic Guaranteed, Preferred Deals, backfill, and open + // auction. + // + // + // + // Corresponds to "Programmatic eligible ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; + + // The number of programmatic responses served divided by the number of + // programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, + // and Preferred Deals. + // + // + // + // Corresponds to "Programmatic match rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + PROGRAMMATIC_MATCH_RATE = 178; + + // Total number of ad responses served from programmatic demand sources. + // Includes Ad Exchange, Open Bidding, and Preferred Deals. + // + // Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open + // Bidding ad requests. + // + // + // + // Corresponds to "Programmatic responses served" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + PROGRAMMATIC_RESPONSES_SERVED = 176; + + // Number of impressions for reach reports. + // + // + // + // Corresponds to "Total reach impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `REACH` + // + // Data format: `INTEGER` + REACH_IMPRESSIONS = 416; + + // The total number of times that an ad is served by the ad server including + // dynamic allocation. + // + // + // + // Corresponds to "Total responses served" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RESPONSES_SERVED = 39; + + // Retention of users in Google Analytics + // + // + // + // Corresponds to "Retention" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + RETENTION = 238; + + // Total amount of CPM, CPC, and CPD revenue based on the number of units + // served by the Google Ad Manager server, AdSense, Ad Exchange, and + // third-party Mediation networks. + // + // + // + // Corresponds to "Total revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + REVENUE = 36; + + // The total revenue accrued in the child network's own account but paid to + // their parent network through auto-payment. This metric is only relevant + // for a "Manage Account" child network. + // + // + // + // Corresponds to "Total revenue paid through MCM auto-payment" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 214; + + // Total amount of revenue (excluding CPD) based on the number of units + // served by the Google Ad Manager server, AdSense, Ad Exchange, and + // third-party Mediation networks. + // + // + // + // Corresponds to "Total CPM and CPC revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + REVENUE_WITHOUT_CPD = 4; + + // The number of rewards granted to users from watching ads. + // + // + // + // Corresponds to "Total rewards granted" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + REWARDS_GRANTED = 413; + + // The average amount of time (in seconds) that each rich media ad is + // displayed to users. + // + // + // + // Corresponds to "Average display time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_AVERAGE_DISPLAY_TIME = 587; + + // The average amount of time (in seconds) that a user interacts with a rich + // media ad. + // + // + // + // Corresponds to "Average interaction time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_AVERAGE_INTERACTION_TIME = 588; + + // The total number of times a backup image is served in place of a rich + // media ad. + // + // + // + // Corresponds to "Backup image impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_BACKUP_IMAGES = 589; + + // The number of times a user interacts with a specific part of a rich media + // ad. + // + // + // + // Corresponds to "Custom event - count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_CUSTOM_EVENT_COUNT = 599; + + // The amount of time (in seconds) that a user interacts with a specific + // part of a rich media ad. + // + // + // + // Corresponds to "Custom event - time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_CUSTOM_EVENT_TIME = 600; + + // The amount of time (in seconds) that each rich media ad is displayed to + // users. + // + // + // + // Corresponds to "Total display time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_DISPLAY_TIME = 590; + + // The average amount of time (in seconds) that an expanding ad is viewed in + // an expanded state. + // + // + // + // Corresponds to "Average expanding time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_EXPANDING_TIME = 591; + + // The number of times an expanding ad was expanded. + // + // + // + // Corresponds to "Total expansions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_EXPANSIONS = 592; + + // The number of times a user opens a rich media ad in full screen mode. + // + // + // + // Corresponds to "Full-screen impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_FULL_SCREEN_IMPRESSIONS = 593; + + // The number of times that a user interacts with a rich media ad. + // + // + // + // Corresponds to "Total interactions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_INTERACTION_COUNT = 594; + + // The ratio of rich media ad interactions to the number of times the ad + // was displayed. + // + // + // + // Corresponds to "Interaction rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + RICH_MEDIA_INTERACTION_RATE = 595; + + // The total amount of time (in seconds) that a user interacts with a rich + // media ad. + // + // + // + // Corresponds to "Interaction time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_INTERACTION_TIME = 596; + + // The number of impressions where a user interacted with a rich media ad. + // + // + // + // Corresponds to "Interactive impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_INTERACTIVE_IMPRESSIONS = 597; + + // The number of times that a user manually closes a rich media ad. + // + // + // + // Corresponds to "Manual closes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_MANUAL_CLOSES = 598; + + // The number of times a rich media video was fully played. + // + // + // + // Corresponds to "Rich media video completes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_COMPLETES = 503; + + // The number of times a user clicked on the graphical controls of a video + // player. + // + // + // + // Corresponds to "Rich media total video interactions" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_INTERACTIONS = 505; + + // The ratio of video interactions to video plays. Represented as a + // percentage. + // + // + // + // Corresponds to "Rich media video interaction rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + RICH_MEDIA_VIDEO_INTERACTION_RATE = 504; + + // The number of times a rich media video was played up to midpoint. + // + // + // + // Corresponds to "Rich media video midpoints" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_MIDPOINTS = 506; + + // The number of times a rich media video was muted. + // + // + // + // Corresponds to "Rich media video mutes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_MUTES = 507; + + // The number of times a rich media video was paused. + // + // + // + // Corresponds to "Rich media video pauses" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_PAUSES = 508; + + // The number of times a rich media video was played. + // + // + // + // Corresponds to "Rich media video plays" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_PLAYS = 509; + + // The number of times a rich media video was restarted. + // + // + // + // Corresponds to "Rich media video replays" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_REPLAYS = 510; + + // The number of times a rich media video was stopped. + // + // + // + // Corresponds to "Rich media video stops" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_STOPS = 511; + + // The number of times a rich media video was unmuted. + // + // + // + // Corresponds to "Rich media video unmutes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + RICH_MEDIA_VIDEO_UNMUTES = 512; + + // The percentage of a video watched by a user. + // + // + // + // Corresponds to "Rich media video view rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + RICH_MEDIA_VIDEO_VIEW_RATE = 513; + + // The average amount of time(seconds) that a rich media video was viewed + // per view. + // + // + // + // Corresponds to "Rich media video average view time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + RICH_MEDIA_VIDEO_VIEW_TIME = 514; + + // The number of forecasted impressions not reserved by any line item. + // + // + // + // Corresponds to "Available impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + SELL_THROUGH_AVAILABLE_IMPRESSIONS = 477; + + // The total number of forecasted impressions. + // + // + // + // Corresponds to "Forecasted impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + SELL_THROUGH_FORECASTED_IMPRESSIONS = 478; + + // The number of forecasted impressions reserved by line items. + // + // + // + // Corresponds to "Reserved impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + SELL_THROUGH_RESERVED_IMPRESSIONS = 479; + + // The fraction of forecasted impressions reserved by line items. + // + // + // + // Corresponds to "Sell-through rate" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `PERCENT` + SELL_THROUGH_SELL_THROUGH_RATE = 480; + + // The average latency in milliseconds across all server-side unwrapping + // callout requests. There is no special handling for error or timeout + // responses. This reflects the entire chain of a parent callout request, + // which may result in multiple child callouts. This metric is not sliced + // by child callout dimensions. + // + // + // + // Corresponds to "Server-side unwrapping average latency (milliseconds)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434; + + // The total number of server-side unwrapping callout requests. + // + // + // + // Corresponds to "Server-side unwrapping callouts" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SERVER_SIDE_UNWRAPPING_CALLOUTS = 435; + + // The total number of server-side unwrapping callouts that returned an + // empty response. Timeouts are not considered empty responses. + // + // + // + // Corresponds to "Server-side unwrapping empty responses" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436; + + // The total number of server-side unwrapping callouts that returned an + // error response. Timeouts and empty responses are not considered errors. + // + // + // + // Corresponds to "Server-side unwrapping error responses" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437; + + // The total number of successfully unwrapped, non-empty server-side + // wrapping callouts. Successful unwrapping does not indicate that the + // resulting creative was served. + // + // + // + // Corresponds to "Server-side unwrapping successful responses" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438; + + // The total number of server-side unwrapping callouts that timed out before + // returning a response. + // + // + // + // Corresponds to "Server-side unwrapping timeouts" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439; + + // Count of sessions from Google Analytics. + // + // + // + // Corresponds to "Sessions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + SESSIONS = 239; + + // Percent of tag load time to 1st ad request in [0, 500ms) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time 0 - 500ms (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 455; + + // Percent of tag load time to 1st ad request in [1000ms, 2000ms) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time 1s - 2s (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 457; + + // Percent of tag load time to 1st ad request in [2000ms, 4000ms) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time 2s - 4s (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 458; + + // Percent of tag load time to 1st ad request in [4000ms, 8000ms) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time 4s - 8s (%)" in the + // Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 459; + + // Percent of tag load time to 1st ad request in [500ms, 1000ms) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time 500ms - 1s (%)" in + // the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 456; + + // Percent of tag load time to 1st ad request in [8000ms, +inf) range. + // + // + // + // Corresponds to "Tag loaded to first ad request time >8s (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 460; + + // The total number of clicks delivered including line item-level dynamic + // allocation by explicit custom criteria targeting. + // + // + // + // Corresponds to "Total targeted clicks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + TARGETED_CLICKS = 276; + + // The total number of impressions delivered including line item-level + // dynamic allocation by explicit custom criteria targeting. + // + // + // + // Corresponds to "Total targeted impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + TARGETED_IMPRESSIONS = 277; + + // The total number of missed impressions due to the ad servers' inability + // to find ads to serve including dynamic allocation. + // + // + // + // Corresponds to "Unfilled impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + UNFILLED_IMPRESSIONS = 45; + + // The total number of unique users who viewed the ad. + // + // + // + // Corresponds to "Total unique visitors" in the Ad Manager UI. + // + // Compatible with the following report types: `REACH` + // + // Data format: `INTEGER` + UNIQUE_VISITORS = 417; + + // The number of impressions impacted by Chrome Ads Intervention due to CPU + // usage. + // + // + // + // Corresponds to "Total unloaded impressions due to CPU" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + UNLOADED_IMPRESSIONS_DUE_TO_CPU = 408; + + // The number of impressions impacted by Chrome Ads Intervention due to + // network usage. + // + // + // + // Corresponds to "Total unloaded impressions due to Network" in the Ad + // Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + UNLOADED_IMPRESSIONS_DUE_TO_NETWORK = 406; + + // The total number of times that an ad is not returned by the ad server. + // + // + // + // Corresponds to "Total unmatched ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + UNMATCHED_AD_REQUESTS = 43; + + // The percentage of unviewed impressions due to other reasons. + // + // + // + // Corresponds to "Other non-viewable impression reasons (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + UNVIEWED_REASON_OTHER_PERCENT = 550; + + // The percentage of unviewed impressions due to slot never entered + // viewport. + // + // + // + // Corresponds to "Slot never entered viewport (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT = 553; + + // The percentage of unviewed impressions due to scrolled past before ad + // filled. + // + // + // + // Corresponds to "User scrolled before ad filled (%)" in the Ad Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT = 551; + + // The percentage of unviewed impressions due to scrolled past before ad + // loaded. + // + // + // + // Corresponds to "User scrolled/navigated before ad loaded (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT = 552; + + // The percentage of unviewed impressions due to insufficient time on + // screen. + // + // + // + // Corresponds to "User scrolled/navigated before 1 second (%)" in the Ad + // Manager UI. + // + // Compatible with the following report types: `AD_SPEED` + // + // Data format: `PERCENT` + UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT = 549; + + // Time of users interacting with web site or mobile app from Google + // Analytics in seconds. + // + // + // + // Corresponds to "User engagement duration (seconds)" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + USER_ENGAGEMENT_DURATION_IN_SECONDS = 240; + + // Fraction of page views where users had ad blocker extensions installed. + // Includes only Desktop page views. + // + // + // + // Corresponds to "Ad blocking extension rate" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE = 486; + + // Number of ad-blocking messages shown in the selected date range that + // resulted in users adding the site to their allowlist to view ads + // + // + // + // Corresponds to "Ad blocking recovery message conversions" in the Ad + // Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT = 487; + + // Number of times an ad blocking recovery message was shown to users. + // + // + // + // Corresponds to "Ad blocking recovery messages shown" in the Ad Manager + // UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN = 488; + + // The number of page views generated by users with an ad blocking extension + // installed who were shown the ad blocking recovery message and later + // allowed ads. + // + // + // + // Corresponds to "Allow-ads page views" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_ALLOW_ADS_PAGEVIEWS = 489; + + // Number of times a US state regulations message was shown to users. + // + // + // + // Corresponds to "US states messages shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_CCPA_MESSAGES_SHOWN = 490; + + // Number of iOS ATT alerts that were triggered by an IDFA message (IDFA + // messages can be IDFA explainers or GDPR messages). + // + // + // + // Corresponds to "IDFA ATT alerts shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN = 491; + + // Number of iOS ATT alerts triggered by the IDFA message where the user + // chose to allow tracking. + // + // + // + // Corresponds to "IDFA ATT consent" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_ATT_CONSENT = 492; + + // Percentage of iOS ATT alerts triggered by the IDFA message where the + // outcome was to allow tracking. + // + // + // + // Corresponds to "IDFA ATT consent rate" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + USER_MESSAGES_IDFA_ATT_CONSENT_RATE = 493; + + // Number of iOS ATT alerts triggered by the IDFA message where the user + // chose to deny tracking. + // + // + // + // Corresponds to "IDFA ATT decline consent" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT = 494; + + // Percentage of iOS ATT alerts triggered by the IDFA message where the user + // chose to deny tracking. + // + // + // + // Corresponds to "IDFA ATT decline rate" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + USER_MESSAGES_IDFA_ATT_DECLINE_RATE = 495; + + // Number of times an IDFA explainer message was shown to users. + // + // + // + // Corresponds to "IDFA explainers shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_EXPLAINERS_SHOWN = 496; + + // Number of times a European regulations message was shown immediately + // before the iOS ATT alert. + // + // + // + // Corresponds to "IDFA IAB messages shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN = 497; + + // Number of IDFA explainer messages where the user didn't choose anything. + // + // + // + // Corresponds to "IDFA no decision" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_IDFA_NO_DECISION = 498; + + // Number of times an Offerwall message was shown to users. + // + // + // + // Corresponds to "Offerwall messages shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; + + // The number of messages where the user gained an entitlement. + // + // + // + // Corresponds to "Monetized Offerwall engagements" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; + + // The number of pages viewed by users after gaining an entitlement. Only + // counts pages included for Offerwall. + // + // + // + // Corresponds to "Post-offerwall page views" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS = 499; + + // Revenue earned through Offerwall, including Rewarded ad revenue and + // third-party integrations. + // + // + // + // Corresponds to "Estimated Offerwall revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `MONEY` + USER_MESSAGES_TOTAL_ESTIMATED_REVENUE = 500; + + // Number of times an ads personalization controls message was shown to + // users. + // + // + // + // Corresponds to "Ads personalization messages shown" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `INTEGER` + USER_MESSAGES_UPTC_MESSAGES_SHOWN = 501; + + // Percentage of ads personalization controls messages where users chose the + // opt-out option. + // + // + // + // Corresponds to "Personalization opt-out ratio" in the Ad Manager UI. + // + // Compatible with the following report types: `PRIVACY_AND_MESSAGING` + // + // Data format: `PERCENT` + USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO = 502; + + // The number of errors of type 100 in reporting. + // + // + // + // Corresponds to "VAST error 100 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_100_COUNT = 180; + + // The number of errors of type 101 in reporting. + // + // + // + // Corresponds to "VAST error 101 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_101_COUNT = 181; + + // The number of errors of type 102 in reporting. + // + // + // + // Corresponds to "VAST error 102 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_102_COUNT = 182; + + // The number of errors of type 200 in reporting. + // + // + // + // Corresponds to "VAST error 200 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_200_COUNT = 183; + + // The number of errors of type 201 in reporting. + // + // + // + // Corresponds to "VAST error 201 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_201_COUNT = 184; + + // The number of errors of type 202 in reporting. + // + // + // + // Corresponds to "VAST error 202 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_202_COUNT = 185; + + // The number of errors of type 203 in reporting. + // + // + // + // Corresponds to "VAST error 203 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_203_COUNT = 186; + + // The number of errors of type 300 in reporting. + // + // + // + // Corresponds to "VAST error 300 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_300_COUNT = 187; + + // The number of errors of type 301 in reporting. + // + // + // + // Corresponds to "VAST error 301 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_301_COUNT = 188; + + // The number of errors of type 302 in reporting. + // + // + // + // Corresponds to "VAST error 302 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_302_COUNT = 189; + + // The number of errors of type 303 in reporting. + // + // + // + // Corresponds to "VAST error 303 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_303_COUNT = 190; + + // The number of errors of type 400 in reporting. + // + // + // + // Corresponds to "VAST error 400 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_400_COUNT = 191; + + // The number of errors of type 401 in reporting. + // + // + // + // Corresponds to "VAST error 401 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_401_COUNT = 192; + + // The number of errors of type 402 in reporting. + // + // + // + // Corresponds to "VAST error 402 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_402_COUNT = 193; + + // The number of errors of type 403 in reporting. + // + // + // + // Corresponds to "VAST error 403 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_403_COUNT = 194; + + // The number of errors of type 405 in reporting. + // + // + // + // Corresponds to "VAST error 405 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_405_COUNT = 195; + + // The number of errors of type 406 in reporting. + // + // + // + // Corresponds to "VAST error 406 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_406_COUNT = 196; + + // The number of errors of type 407 in reporting. + // + // + // + // Corresponds to "VAST error 407 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_407_COUNT = 197; + + // The number of errors of type 408 in reporting. + // + // + // + // Corresponds to "VAST error 408 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_408_COUNT = 198; + + // The number of errors of type 409 in reporting. + // + // + // + // Corresponds to "VAST error 409 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_409_COUNT = 199; + + // The number of errors of type 410 in reporting. + // + // + // + // Corresponds to "VAST error 410 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_410_COUNT = 200; + + // The number of errors of type 500 in reporting. + // + // + // + // Corresponds to "VAST error 500 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_500_COUNT = 201; + + // The number of errors of type 501 in reporting. + // + // + // + // Corresponds to "VAST error 501 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_501_COUNT = 202; + + // The number of errors of type 502 in reporting. + // + // + // + // Corresponds to "VAST error 502 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_502_COUNT = 203; + + // The number of errors of type 503 in reporting. + // + // + // + // Corresponds to "VAST error 503 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_503_COUNT = 204; + + // The number of errors of type 600 in reporting. + // + // + // + // Corresponds to "VAST error 600 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_600_COUNT = 205; + + // The number of errors of type 601 in reporting. + // + // + // + // Corresponds to "VAST error 601 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_601_COUNT = 206; + + // The number of errors of type 602 in reporting. + // + // + // + // Corresponds to "VAST error 602 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_602_COUNT = 207; + + // The number of errors of type 603 in reporting. + // + // + // + // Corresponds to "VAST error 603 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_603_COUNT = 208; + + // The number of errors of type 604 in reporting. + // + // + // + // Corresponds to "VAST error 604 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_604_COUNT = 209; + + // The number of errors of type 900 in reporting. + // + // + // + // Corresponds to "VAST error 900 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_900_COUNT = 210; + + // The number of errors of type 901 in reporting. + // + // + // + // Corresponds to "VAST error 901 count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_ERROR_901_COUNT = 211; + + // The number of user interactions with a video, on average, such as pause, + // full screen, mute, etc. + // + // + // + // Corresponds to "Average interaction rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; + + // The number of times a user collapses a video, either to its original size + // or to a different size. + // + // + // + // Corresponds to "Collapses" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_COLLAPSES = 93; + + // The number of times a user expands a video. + // + // + // + // Corresponds to "Expands" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_EXPANDS = 95; + + // The number of times ad clip played in full screen mode. + // + // + // + // Corresponds to "Full screens" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_FULL_SCREENS = 96; + + // The number of times video player was in mute state during play of ad + // clip. + // + // + // + // Corresponds to "Mutes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_MUTES = 97; + + // The number of times user paused ad clip. + // + // + // + // Corresponds to "Pauses" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_PAUSES = 98; + + // The number of times the user unpaused the video. + // + // + // + // Corresponds to "Resumes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_RESUMES = 99; + + // The number of times a user rewinds the video. + // + // + // + // Corresponds to "Rewinds" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_REWINDS = 100; + + // The number of times a user unmutes the video. + // + // + // + // Corresponds to "Unmutes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_UNMUTES = 101; + + // The number of times a skippable video is skipped. + // + // + // + // Corresponds to "Skips" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_INTERACTION_VIDEO_SKIPS = 102; + + // The number of views for monetizable video content. + // + // + // + // Corresponds to "Monetizable content views" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_MONETIZABLE_CONTENT_VIEWS = 601; + + // The number of total creative serves in video realtime reporting. + // + // + // + // Corresponds to "Total creative serves" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_CREATIVE_SERVES = 139; + + // The number of errors of type 100 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 100 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_100_COUNT = 143; + + // The number of errors of type 101 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 101 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_101_COUNT = 144; + + // The number of errors of type 102 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 102 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_102_COUNT = 145; + + // The number of errors of type 200 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 200 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_200_COUNT = 146; + + // The number of errors of type 201 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 201 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_201_COUNT = 147; + + // The number of errors of type 202 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 202 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_202_COUNT = 148; + + // The number of errors of type 203 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 203 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_203_COUNT = 149; + + // The number of errors of type 300 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 300 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_300_COUNT = 150; + + // The number of errors of type 301 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 301 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_301_COUNT = 151; + + // The number of errors of type 302 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 302 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_302_COUNT = 152; + + // The number of errors of type 303 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 303 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_303_COUNT = 153; + + // The number of errors of type 400 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 400 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_400_COUNT = 154; + + // The number of errors of type 401 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 401 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_401_COUNT = 155; + + // The number of errors of type 402 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 402 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_402_COUNT = 156; + + // The number of errors of type 403 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 403 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_403_COUNT = 157; + + // The number of errors of type 405 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 405 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_405_COUNT = 158; + + // The number of errors of type 406 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 406 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_406_COUNT = 159; + + // The number of errors of type 407 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 407 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_407_COUNT = 160; + + // The number of errors of type 408 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 408 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_408_COUNT = 161; + + // The number of errors of type 409 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 409 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_409_COUNT = 162; + + // The number of errors of type 410 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 410 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_410_COUNT = 163; + + // The number of errors of type 500 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 500 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_500_COUNT = 164; + + // The number of errors of type 501 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 501 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_501_COUNT = 165; + + // The number of errors of type 502 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 502 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_502_COUNT = 166; + + // The number of errors of type 503 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 503 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_503_COUNT = 167; + + // The number of errors of type 600 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 600 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_600_COUNT = 168; + + // The number of errors of type 601 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 601 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_601_COUNT = 169; + + // The number of errors of type 602 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 602 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_602_COUNT = 170; + + // The number of errors of type 603 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 603 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_603_COUNT = 171; + + // The number of errors of type 604 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 604 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_604_COUNT = 172; + + // The number of errors of type 900 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 900 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_900_COUNT = 173; + + // The number of errors of type 901 in video realtime reporting. + // + // + // + // Corresponds to "VAST error 901 count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_ERROR_901_COUNT = 174; + + // The number of total impressions in video realtime reporting. + // + // + // + // Corresponds to "Total impressions" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_IMPRESSIONS = 138; + + // The number of matched queries in video realtime reporting. + // + // + // + // Corresponds to "Total responses served" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_MATCHED_QUERIES = 140; + + // The number of all errors in video realtime reporting. + // + // + // + // Corresponds to "Total error count" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; + + // The number of total queries in video realtime reporting. + // + // + // + // Corresponds to "Total ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_TOTAL_QUERIES = 142; + + // The number of unmatched queries in video realtime reporting. + // + // + // + // Corresponds to "Total unmatched ad requests" in the Ad Manager UI. + // + // Compatible with the following report types: + // + // Data format: `INTEGER` + VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; + + // Number of times that the publisher specified a video ad played + // automatically. + // + // + // + // Corresponds to "Auto-plays" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; + + // Average percentage of the video watched by users. + // + // + // + // Corresponds to "Average view rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; + + // Average time(seconds) users watched the video. + // + // + // + // Corresponds to "Average view time" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; + + // Number of times that the publisher specified a video ad was clicked to + // play. + // + // + // + // Corresponds to "Click-to-plays" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; + + // The number of times the video played to completion. + // + // + // + // Corresponds to "Completes" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_COMPLETES = 107; + + // Percentage of times the video played to the end. + // + // + // + // Corresponds to "Completion rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; + + // The number of engaged views: ad is viewed to completion or for 30s, + // whichever comes first. + // + // + // + // Corresponds to "Engaged views" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; + + // The number of times the video played to 25% of its length. + // + // + // + // Corresponds to "First quartiles" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; + + // The number of times the video reached its midpoint during play. + // + // + // + // Corresponds to "Midpoints" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_MIDPOINTS = 111; + + // The number of times a skip button is shown in video. + // + // + // + // Corresponds to "Skip buttons shown" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; + + // The number of impressions where the video was played. + // + // + // + // Corresponds to "Starts" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_STARTS = 113; + + // The number of times the video played to 75% of its length. + // + // + // + // Corresponds to "Third quartiles" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; + + // The number of times an error occurred, such as a VAST redirect error, a + // video playback error, or an invalid response error. + // + // + // + // Corresponds to "Total error count" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; + + // The percentage of video error count. + // + // + // + // Corresponds to "Total error rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; + + // Duration of the video creative. + // + // + // + // Corresponds to "Video length" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; + + // View-through rate represented as a percentage. + // + // + // + // Corresponds to "Video view through rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `PERCENT` + VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; + + // Number of winning bids received from Open Bidding buyers, even when the + // winning bid is placed at the end of a mediation for mobile apps chain. + // + // + // + // Corresponds to "Yield group auctions won" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_AUCTIONS_WON = 80; + + // Number of bids received from Open Bidding buyers, regardless of whether + // the returned bid competes in an auction. + // + // + // + // Corresponds to "Yield group bids" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_BIDS = 81; + + // Number of bids received from Open Bidding buyers that competed in + // the auction. + // + // + // + // Corresponds to "Yield group bids in auction" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_BIDS_IN_AUCTION = 82; + + // Number of times a yield partner is asked to return bid to fill + // a yield group request. + // + // + // + // Corresponds to "Yield group callouts" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_CALLOUTS = 83; + + // The estimated net rate for yield groups or individual + // yield group partners. + // + // + // + // Corresponds to "Yield group estimated CPM" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + YIELD_GROUP_ESTIMATED_CPM = 88; + + // Total net revenue earned by a yield group, based upon the yield group + // estimated CPM and yield group impressions recorded. + // + // + // + // Corresponds to "Yield group estimated revenue" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + YIELD_GROUP_ESTIMATED_REVENUE = 87; + + // Number of matched yield group requests where a yield partner delivered + // their ad to publisher inventory. + // + // + // + // Corresponds to "Yield group impressions" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_IMPRESSIONS = 85; + + // Yield group Mediation fill rate indicating how often a network + // fills an ad request. + // + // + // + // Corresponds to "Yield group mediation fill rate" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + YIELD_GROUP_MEDIATION_FILL_RATE = 89; + + // Total requests where a Mediation chain was served. + // + // + // + // Corresponds to "Yield group mediation matched queries" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; + + // The number of mediation chain passback across all channels. + // + // + // + // Corresponds to "Yield group mediation passbacks" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_MEDIATION_PASSBACKS = 118; + + // Revenue per thousand impressions based on data collected by Ad Manager + // from third-party ad network reports. + // + // + // + // Corresponds to "Yield group mediation third party ECPM" in the Ad Manager + // UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `DOUBLE` + YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; + + // The yield group revenue accrued in the child network's own account but + // paid to their parent network through auto-payment. This metric is only + // relevant for a "Manage Account" child network. + // + // + // + // Corresponds to "Yield group revenue paid through MCM auto-payment" in the + // Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `MONEY` + YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 215; + + // Number of times a yield group buyer successfully returned a bid in + // response to a yield group callout. + // + // + // + // Corresponds to "Yield group successful responses" in the Ad Manager UI. + // + // Compatible with the following report types: `HISTORICAL` + // + // Data format: `INTEGER` + YIELD_GROUP_SUCCESSFUL_RESPONSES = 84; + } + + // Valid time period columns. + enum TimePeriodColumn { + // Default value. Report will have no time period column. + TIME_PERIOD_COLUMN_UNSPECIFIED = 0; + + // A column for each date in the report. + TIME_PERIOD_COLUMN_DATE = 1; + + // A column for each week in the report. + TIME_PERIOD_COLUMN_WEEK = 2; + + // A column for each month in the report. + TIME_PERIOD_COLUMN_MONTH = 3; + + // A column for each quarter in the report. + TIME_PERIOD_COLUMN_QUARTER = 4; + } + + // Possible metric value types to add. + enum MetricValueType { + // The values for the primary date_range. + PRIMARY = 0; + + // Each metrics' percent of the total for the primary date_range. + PRIMARY_PERCENT_OF_TOTAL = 1; + + // The values for the comparison_date_range. + COMPARISON = 2; + + // Each metrics' percent of the total for the comparison_date_range. + COMPARISON_PERCENT_OF_TOTAL = 3; + + // The absolute change between the primary and comparison date ranges. + ABSOLUTE_CHANGE = 4; + + // The relative change between the primary and comparison date ranges. + RELATIVE_CHANGE = 5; + } + + // The source to determine the time zone for the report. + enum TimeZoneSource { + // Unspecified default value. + TIME_ZONE_SOURCE_UNSPECIFIED = 0; + + // Use the publisher's time zone in network settings. + PUBLISHER = 1; + + // Use the time zone of the ad exchange. + // Only compatible with Ad Exchange dimensions and metrics. + AD_EXCHANGE = 2; + + // Use UTC time zone. + // Only compatible with Revenue Verification reports. + UTC = 3; + + // Use the time zone provided in the ReportDefinition.time_zone field. + // Has limited dimension and metric compatibility compared with PUBLISHER, + // and reports may take longer to run since the dates are dynamically + // calculated at request time. + PROVIDED = 4; + } + + // Required. The list of dimensions to report on. If empty, the report will + // have no dimensions, and any metrics will be totals. + repeated Dimension dimensions = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of metrics to report on. If empty, the report will have + // no metrics. + repeated Metric metrics = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The filters for this report. + repeated Filter filters = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Where to get the time zone for this report. Defaults to using the + // network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone + // field in the report definition must also set a time zone. + TimeZoneSource time_zone_source = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If time_zone_source is PROVIDED, this is the time zone to use for + // this report. Leave empty for any other time zone source. Time zone in IANA + // format. For example, "America/New_York". + string time_zone = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ISO 4217 currency code for this report. Defaults to publisher + // currency code if not specified. + string currency_code = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The primary date range of this report. + DateRange date_range = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The comparison date range of this report. If unspecified, the + // report won't have any comparison metrics. + optional DateRange comparison_date_range = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + // dimensions. The index of this repeated field corresponds to the index on + // each dimension. For example, custom_dimension_key_ids[0] describes + // CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + repeated int64 custom_dimension_key_ids = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + // dimensions. The index of this repeated field corresponds to the index on + // each dimension. For example, line_item_custom_field_ids[0] describes + // LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + repeated int64 line_item_custom_field_ids = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + // dimensions. The index of this repeated field corresponds to the index on + // each dimension. For example, order_custom_field_ids[0] describes + // ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + repeated int64 order_custom_field_ids = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + // dimensions. The index of this repeated field corresponds to the index on + // each dimension. For example, creative_custom_field_ids[0] describes + // CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + repeated int64 creative_custom_field_ids = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of this report. + ReportType report_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Include a time period column to introduce comparison columns in + // the report for each generated period. For example, set to "QUARTERS" here + // to have a column for each quarter present in the primary date range. If + // "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + // column will also include comparison values for its relative previous + // quarter. + TimePeriodColumn time_period_column = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of flags for this report. Used to flag rows in a result set + // based on a set of defined filters. + repeated Flag flags = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Default sorts to apply to this report. + repeated Sort sorts = 15 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_messages.proto index d75f1e517d89..76f1cd167e65 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_messages.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.ads.admanager.v1; +import "google/ads/admanager/v1/report_definition.proto"; +import "google/ads/admanager/v1/report_value.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -40,3246 +42,9 @@ message Report { singular: "report" }; - // Represents a single value in a report. - message Value { - // A list of integer values. - message IntList { - // The values - repeated int64 values = 1; - } - - // A list of string values. - message StringList { - // The values - repeated string values = 1; - } - - // The value of the field, depends on the field's data format. - oneof value { - // For integer values. - int64 int_value = 1; - - // For double values. - double double_value = 2; - - // For string values. - string string_value = 3; - - // For boolean values. - bool bool_value = 4; - - // For lists of integer values. - IntList int_list_value = 6; - - // For lists of string values. - StringList string_list_value = 7; - - // For bytes values. - bytes bytes_value = 8; - } - } - - // Represents a sorting in a report. - message Sort { - // Required. A field (dimension or metric) to sort by. - Field field = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The sort order. If true the sort will be descending. - bool descending = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Use to sort on a specific slice of data. - optional Slice slice = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When using time period columns, use this to sort on a specific - // column. - optional int32 time_period_index = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Use to specify which metric value type to sort on. Defaults to - // PRIMARY. - optional MetricValueType metric_value_type = 5 - [(google.api.field_behavior) = OPTIONAL]; - } - - // A table containing report data including dimension and metric values. - message DataTable { - // A row of report data. - message Row { - // The order of the dimension values is the same as the order of the - // dimensions specified in the request. - repeated Value dimension_values = 1; - - // - // The length of the metric_value_groups - // field will be equal to the length of the date_ranges field in the - // fetch response. The metric_value_groups field is - // ordered such that each index corresponds to the date_range at the same - // index. For example, given date_ranges [x, y], metric_value_groups will - // have a length of two. The first entry in metric_value_groups represents - // the metrics for date x and the second entry in metric_value_groups - // represents the metrics for date y. - repeated MetricValueGroup metric_value_groups = 2; - } - - // Contains all metric values requested for a single date range and set of - // column dimension values (returned in the columns field of the response). - // The order of the metrics in each field corresponds to the order of the - // metrics specified in the request. - message MetricValueGroup { - // Data for the PRIMARY MetricValueType. - repeated Value primary_values = 1; - - // Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. - repeated Value primary_percent_of_total_values = 2; - - // Data for the COMPARISON MetricValueType. - repeated Value comparison_values = 3; - - // Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. - repeated Value comparison_percent_of_total_values = 4; - - // Data for the ABSOLUTE_CHANGE MetricValueType. - repeated Value absolute_change_values = 5; - - // Data for the RELATIVE_CHANGE MetricValueType. - repeated Value relative_change_values = 6; - - // If true, the flag's conditions are met. If false, the flag's - // conditions are not met. flag_values has the same length as - // flags and index i of flag_values represents the flag at index i - // of flags. - repeated bool flag_values = 7; - } - } - - // A dimension or a metric in a report. - message Field { - // Either a dimension or a metric. - oneof field { - // The dimension this field represents. - Dimension dimension = 1; - - // The metric this field represents. - Metric metric = 2; - } - } - - // Use to specify a slice of data. - // - // For example, in a report, to focus on just data from the US, specify - // `COUNTRY_NAME` for dimension and value: `"United States"`. - message Slice { - // Required. The dimension to slice on. - Dimension dimension = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The value of the dimension. - Value value = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // A filter over one or more fields. - message Filter { - // A filter on a specific field. - message FieldFilter { - // Required. The field to filter on. - Field field = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The operation of this filter. - Operation operation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Values to filter to. - repeated Value values = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Use to filter on a specific slice of data. - optional Slice slice = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When using time period columns, use this to filter on a - // specific column. - optional int32 time_period_index = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Use to specify which metric value type to filter on. Defaults - // to PRIMARY. - optional MetricValueType metric_value_type = 6 - [(google.api.field_behavior) = OPTIONAL]; - } - - // A list of filters. - message FilterList { - // Required. A list of filters. - repeated Filter filters = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Supported filter operations. - enum Operation { - // For scalar operands, checks if the operand is in the set of provided - // filter values. - // - // For list operands, checks if any element in the operand is in the set - // of provided filter values. - // - // Default value. - IN = 0; - - // For scalar operands, checks that the operand is not in the set of - // provided filter values. - // - // For list operands, checks that none of the elements in the operand - // is in the set of provided filter values. - NOT_IN = 1; - - // For scalar string operands, checks if the operand contains any of the - // provided filter substrings. - // - // For string list operands, checks if any string in the operand contains - // any of the provided filter substrings. - CONTAINS = 2; - - // For scalar string operands, checks that the operand contains none of - // the provided filter substrings. - // - // For string list operands, checks that none of the strings in the - // operand contain none of the provided filter substrings. - NOT_CONTAINS = 3; - - // Operand is less than the provided filter value. - LESS_THAN = 4; - - // Operand is less than or equal to provided filter value. - LESS_THAN_EQUALS = 5; - - // Operand is greater than provided filter value. - GREATER_THAN = 6; - - // Operand is greater than or equal to provided filter value. - GREATER_THAN_EQUALS = 7; - - // Operand is between provided filter values. - BETWEEN = 8; - - // Operand matches against a regex or set of regexes (one must match) - MATCHES = 9; - - // Operand negative matches against a regex or set of regexes (none must - // match) - NOT_MATCHES = 10; - } - - // The type determines how the underlying filters are combined. - oneof type { - // A filter on a single field. - FieldFilter field_filter = 1; - - // A filter whose result is negated. - Filter not_filter = 2; - - // A list of filters whose results are AND-ed. - FilterList and_filter = 3; - - // A list of filters whose results are OR-ed. - FilterList or_filter = 4; - } - } - - // A flag for a report. Flags are used show if certain thresholds are met. - // Result rows that match the filter will have the corresponding - // [MetricValueGroup.flagValues][MetricValueGroup] index set to true. - // For more information about flags see: - // https://support.google.com/admanager/answer/15079975 - message Flag { - // Required. Filters to apply for the flag. - repeated Filter filters = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Name of the flag. - // The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to - // the colored flags that appear in the UI. The UI will not display flags - // with other names, but they are available for use by API clients. - string name = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // A date range for a report. - message DateRange { - // A date range between two fixed dates (inclusive of end date). - message FixedDateRange { - // Required. The start date of this date range. - google.type.Date start_date = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The end date (inclusive) of this date range. - google.type.Date end_date = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Options for relative date ranges. - enum RelativeDateRange { - // Default value. This value is unused. - RELATIVE_DATE_RANGE_UNSPECIFIED = 0; - - // The date the report is run. - TODAY = 1; - - // The date a day before the date that the report is run. - YESTERDAY = 2; - - // The full week in which this report is run. Could include dates in - // the future. - THIS_WEEK = 3; - - // From the beginning of the calendar week (Monday to Sunday) in which the - // up to and including the day the report is run. - THIS_WEEK_TO_DATE = 29; - - // The full month in which this report is run. Could include dates in - // the future. - THIS_MONTH = 4; - - // From the beginning of the calendar month in which the report is run, to - // up to and including the day the report is run. - THIS_MONTH_TO_DATE = 26; - - // The full quarter in which this report is run. Could include dates - // in the future. - THIS_QUARTER = 5; - - // From the beginning of the calendar quarter in which the report is run, - // up to and including the day the report is run. - THIS_QUARTER_TO_DATE = 27; - - // The full year in which this report is run. Could include dates in - // the future. - THIS_YEAR = 6; - - // From the beginning of the calendar year in which the report is run, to - // up to and including the day the report is run. - THIS_YEAR_TO_DATE = 28; - - // The entire previous calendar week, Monday to Sunday (inclusive), - // preceding the calendar week the report is run. - LAST_WEEK = 7; - - // The entire previous calendar month preceding the calendar month the - // report is run. - LAST_MONTH = 8; - - // The entire previous calendar quarter preceding the calendar quarter the - // report is run. - LAST_QUARTER = 9; - - // The entire previous calendar year preceding the calendar year the - // report is run. - LAST_YEAR = 10; - - // The 7 days preceding the day the report is run. - LAST_7_DAYS = 11; - - // The 30 days preceding the day the report is run. - LAST_30_DAYS = 12; - - // The 60 days preceding the day the report is run. - LAST_60_DAYS = 13; - - // The 90 days preceding the day the report is run. - LAST_90_DAYS = 14; - - // The 180 days preceding the day the report is run. - LAST_180_DAYS = 15; - - // The 360 days preceding the day the report is run. - LAST_360_DAYS = 16; - - // The 365 days preceding the day the report is run. - LAST_365_DAYS = 17; - - // The entire previous 3 calendar months preceding the calendar month the - // report is run. - LAST_3_MONTHS = 18; - - // The entire previous 6 calendar months preceding the calendar month the - // report is run. - LAST_6_MONTHS = 19; - - // The entire previous 6 calendar months preceding the calendar month the - // report is run. - LAST_12_MONTHS = 20; - - // From 3 years before the report is run, to the day before the report is - // run, inclusive. - ALL_AVAILABLE = 21; - - // Only valid when used in the comparison_date_range field. The complete - // period preceding the date period provided in date_range. - // - // In the case where date_range is a FixedDateRange of N days, this will - // be a period of N days where the end date is the date preceding the - // start date of the date_range. - // - // In the case where date_range is a RelativeDateRange, this will be a - // period of the same time frame preceding the date_range. In the case - // where the date_range does not capture the full period because a report - // is run in the middle of that period, this will still be the full - // preceding period. For example, if date_range is THIS_WEEK, but the - // report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but - // PREVIOUS_PERIOD will be Monday - Sunday. - PREVIOUS_PERIOD = 22; - - // Only valid when used in the comparison_date_range field. The period - // starting 1 year prior to the date period provided in date_range. - // - // In the case where date_range is a FixedDateRange, this will be a date - // range starting 1 year prior to the date_range start date and ending 1 - // year prior to the date_range end date. - // - // In the case where date_range is a RelativeDateRange, this will be a - // period of the same time frame exactly 1 year prior to the date_range. - // In the case where the date_range does not capture the full period - // because a report is run in the middle of that period, this will still - // be the full period 1 year prior. For example, if date range is - // THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be - // Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - - // Sunday. - SAME_PERIOD_PREVIOUS_YEAR = 24; - } - - // Either a fixed or relative date range. - oneof date_range_type { - // A fixed date range. - FixedDateRange fixed = 1; - - // A relative date range. - RelativeDateRange relative = 2; - } - } - - // Valid time period columns. - enum TimePeriodColumn { - // Default value. Report will have no time period column. - TIME_PERIOD_COLUMN_UNSPECIFIED = 0; - - // A column for each date in the report. - TIME_PERIOD_COLUMN_DATE = 1; - - // A column for each week in the report. - TIME_PERIOD_COLUMN_WEEK = 2; - - // A column for each month in the report. - TIME_PERIOD_COLUMN_MONTH = 3; - - // A column for each quarter in the report. - TIME_PERIOD_COLUMN_QUARTER = 4; - } - - // Reporting dimensions. - enum Dimension { - // Default value. This value is unused. - DIMENSION_UNSPECIFIED = 0; - - // The domain name of the advertiser. - ADVERTISER_DOMAIN_NAME = 242; - - // The ID used in an external system for advertiser identification - ADVERTISER_EXTERNAL_ID = 228; - - // The ID of an advertiser company assigned to an order - ADVERTISER_ID = 131; - - // Labels applied to the advertiser - // can be used for either competitive exclusion or ad exclusion - ADVERTISER_LABELS = 230; - - // Label ids applied to the advertiser - // can be used for either competitive exclusion or ad exclusion - ADVERTISER_LABEL_IDS = 229; - - // The name of an advertiser company assigned to an order - ADVERTISER_NAME = 132; - - // The name of the contact associated with an advertiser company - ADVERTISER_PRIMARY_CONTACT = 227; - - // Shows an ENUM value describing whether a given piece of publisher - // inventory was above (ATF) or below the fold (BTF) of a page. - AD_LOCATION = 390; - - // Shows a localized string describing whether a given piece of publisher - // inventory was above (ATF) or below the fold (BTF) of a page. - AD_LOCATION_NAME = 391; - - // The code of the ad unit where the ad was requested. - AD_UNIT_CODE = 64; - - // The code of the first level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_1 = 65; - - // The code of the tenth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_10 = 74; - - // The code of the eleventh level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_11 = 75; - - // The code of the twelfth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_12 = 76; - - // The code of the thirteenth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_13 = 77; - - // The code of the fourteenth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_14 = 78; - - // The code of the fifteenth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_15 = 79; - - // The code of the sixteenth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_16 = 80; - - // The code of the second level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_2 = 66; - - // The code of the third level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_3 = 67; - - // The code of the fourth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_4 = 68; - - // The code of the fifth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_5 = 69; - - // The code of the sixth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_6 = 70; - - // The code of the seventh level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_7 = 71; - - // The code of the eighth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_8 = 72; - - // The code of the ninth level ad unit of the ad unit where the ad was - // requested. - AD_UNIT_CODE_LEVEL_9 = 73; - - // The depth of the ad unit's hierarchy - AD_UNIT_DEPTH = 101; - - // The ID of the ad unit where the ad was requested. - AD_UNIT_ID = 25; - - // The full hierarchy of ad unit IDs where the ad was requested, from - // root to leaf, excluding the root ad unit ID. - AD_UNIT_ID_ALL_LEVEL = 27; - - // The first level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_1 = 30; - - // The tenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_10 = 48; - - // The eleventh level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_11 = 50; - - // The twelfth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_12 = 52; - - // The thirteenth level ad unit ID of the ad unit where the ad was - // requested. - AD_UNIT_ID_LEVEL_13 = 54; - - // The fourteenth level ad unit ID of the ad unit where the ad was - // requested. - AD_UNIT_ID_LEVEL_14 = 56; - - // The fifteenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_15 = 58; - - // The sixteenth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_16 = 60; - - // The second level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_2 = 32; - - // The third level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_3 = 34; - - // The fourth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_4 = 36; - - // The fifth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_5 = 38; - - // The sixth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_6 = 40; - - // The seventh level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_7 = 42; - - // The eighth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_8 = 44; - - // The ninth level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_LEVEL_9 = 46; - - // The top-level ad unit ID of the ad unit where the ad was requested. - AD_UNIT_ID_TOP_LEVEL = 142; - - // The name of the ad unit where the ad was requested. - AD_UNIT_NAME = 26; - - // The full hierarchy of ad unit names where the ad was requested, from - // root to leaf, excluding the root ad unit name. - AD_UNIT_NAME_ALL_LEVEL = 29; - - // The first level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_1 = 31; - - // The tenth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_10 = 49; - - // The eleventh level ad unit name of the ad unit where the ad was - // requested. - AD_UNIT_NAME_LEVEL_11 = 51; - - // The twelfth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_12 = 53; - - // The thirteenth level ad unit name of the ad unit where the ad was - // requested. - AD_UNIT_NAME_LEVEL_13 = 55; - - // The fourteenth level ad unit name of the ad unit where the ad was - // requested. - AD_UNIT_NAME_LEVEL_14 = 57; - - // The fifteenth level ad unit name of the ad unit where the ad was - // requested. - AD_UNIT_NAME_LEVEL_15 = 59; - - // The sixteenth level ad unit name of the ad unit where the ad was - // requested. - AD_UNIT_NAME_LEVEL_16 = 61; - - // The second level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_2 = 33; - - // The third level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_3 = 35; - - // The fourth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_4 = 37; - - // The fifth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_5 = 39; - - // The sixth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_6 = 41; - - // The seventh level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_7 = 43; - - // The eighth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_8 = 45; - - // The ninth level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_LEVEL_9 = 47; - - // The top-level ad unit name of the ad unit where the ad was requested. - AD_UNIT_NAME_TOP_LEVEL = 143; - - // The reward amount of the ad unit where the ad was requested. - AD_UNIT_REWARD_AMOUNT = 63; - - // The reward type of the ad unit where the ad was requested. - AD_UNIT_REWARD_TYPE = 62; - - // The status of the ad unit - AD_UNIT_STATUS = 206; - - // The name of the status of the ad unit - AD_UNIT_STATUS_NAME = 207; - - // The app version. - APP_VERSION = 392; - - // The ID used in an external system for advertiser identification - BACKFILL_ADVERTISER_EXTERNAL_ID = 349; - - // The ID of an advertiser company assigned to a backfill order - BACKFILL_ADVERTISER_ID = 346; - - // Labels applied to the advertiser - // can be used for either competitive exclusion or ad exclusion - BACKFILL_ADVERTISER_LABELS = 351; - - // Label ids applied to the advertiser - // can be used for either competitive exclusion or ad exclusion - BACKFILL_ADVERTISER_LABEL_IDS = 350; - - // The name of an advertiser company assigned to a backfill order - BACKFILL_ADVERTISER_NAME = 347; - - // The name of the contact associated with an advertiser company - BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348; - - // Enum value of Backfill creative billing type - BACKFILL_CREATIVE_BILLING_TYPE = 378; - - // Localized string value of Backfill creative billing type - BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379; - - // Represents the click-through URL of a Backfill creative - BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376; - - // The ID of a Backfill creative - BACKFILL_CREATIVE_ID = 370; - - // Backfill creative name - BACKFILL_CREATIVE_NAME = 371; - - // Third party vendor name of a Backfill creative - BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377; - - // Enum value of Backfill creative type - BACKFILL_CREATIVE_TYPE = 374; - - // Localized string name of Backfill creative type - BACKFILL_CREATIVE_TYPE_NAME = 375; - - // Whether a Backfill line item is archived. - BACKFILL_LINE_ITEM_ARCHIVED = 278; - - // Backfill line item comanion delivery option ENUM value. - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258; - - // Localized Backfill line item comanion delivery option name. - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259; - - // The computed status of the BackfillLineItem. - BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296; - - // The localized name of the computed status of the BackfillLineItem. - BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297; - - // The contracted units bought for the Backfill line item. - BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280; - - // The cost per unit of the Backfill line item. - BACKFILL_LINE_ITEM_COST_PER_UNIT = 272; - - // Backfill line item cost type ENUM value. - BACKFILL_LINE_ITEM_COST_TYPE = 264; - - // Localized Backfill line item cost type name. - BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265; - - // Represent the end date of a Backfill creative associated with a Backfill - // line item - BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381; - - // The creative rotation type of the BackfillLineItem. - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290; - - // The localized name of the creative rotation type of the BackfillLineItem. - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291; - - // Represent the start date of a Backfill creative associated with a - // Backfill line item - BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380; - - // The 3 letter currency code of the Backfill line item - BACKFILL_LINE_ITEM_CURRENCY_CODE = 288; - - // The progress made for the delivery of the Backfill line item. - BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274; - - // The delivery rate type of the BackfillLineItem. - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292; - - // The localized name of the delivery rate type of the BackfillLineItem. - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293; - - // The discount of the BackfillLineItem in whole units in the - // BackfillLineItem's currency code, or if unspecified the Network's - // currency code. - BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294; - - // The discount of the BackfillLineItem in percentage. - BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295; - - // The end date of the Backfill line item. - BACKFILL_LINE_ITEM_END_DATE = 267; - - // The end date and time of the Backfill line item. - BACKFILL_LINE_ITEM_END_DATE_TIME = 269; - - // The ENUM value of the environment a Backfill line item is targeting. - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302; - - // The localized name of the environment a Backfill line item is targeting. - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257; - - // The deal ID of the Backfill line item. Set for Programmatic Direct - // campaigns. - BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285; - - // The external ID of the Backfill line item. - BACKFILL_LINE_ITEM_EXTERNAL_ID = 273; - - // The frequency cap of the Backfill line item (descriptive string). - BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303; - - // Backfill line item ID. - BACKFILL_LINE_ITEM_ID = 298; - - // The application that last modified the Backfill line item. - BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289; - - // The total number of clicks delivered of the lifetime of the Backfill line - // item. - BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283; - - // The total number of impressions delivered over the lifetime of the - // Backfill line item. - BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282; - - // The total number of viewable impressions delivered over the lifetime of - // the Backfill line item. - BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284; - - // Whether or not the Backfill line item is Makegood. Makegood refers to - // free inventory offered to buyers to compensate for mistakes or - // under-delivery in the original campaigns. - BACKFILL_LINE_ITEM_MAKEGOOD = 276; - - // Backfill line item name. - BACKFILL_LINE_ITEM_NAME = 299; - - // The cost of booking for the Backfill line item (non-CPD). - BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286; - - // Whether a Backfill line item is eligible for opitimization. - BACKFILL_LINE_ITEM_OPTIMIZABLE = 277; - - // Goal type ENUM value of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262; - - // Localized goal type name of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263; - - // Unit type ENUM value of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260; - - // Localized unit type name of the primary goal of the Backfill line item. - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261; - - // The priority of this Backfill line item as a value between 1 and 16. - // In general, a lower priority means more serving priority for the - // Backfill line item. - BACKFILL_LINE_ITEM_PRIORITY = 266; - - // ENUM value describing the state of inventory reservation for the - // BackfillLineItem. - BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306; - - // Localized string describing the state of inventory reservation for the - // BackfillLineItem. - BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307; - - // The start date of the Backfill line item. - BACKFILL_LINE_ITEM_START_DATE = 268; - - // The start date and time of the Backfill line item. - BACKFILL_LINE_ITEM_START_DATE_TIME = 270; - - // Backfill line item type ENUM value. - BACKFILL_LINE_ITEM_TYPE = 300; - - // Localized Backfill line item type name. - BACKFILL_LINE_ITEM_TYPE_NAME = 301; - - // Whether the Backfill line item end time and end date is set to - // effectively never end. - BACKFILL_LINE_ITEM_UNLIMITED_END = 271; - - // The artificial cost per unit used by the Ad server to help rank - // inventory. - BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275; - - // The web property code used for dynamic allocation Backfill line items. - BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287; - - // The ID of Backfill creative, includes regular creatives, and master and - // companions in case of creative sets - BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372; - - // Name of Backfill creative, includes regular creatives, and master and - // companions in case of creative sets - BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373; - - // Backfill order agency. - BACKFILL_ORDER_AGENCY = 313; - - // Backfill order agency ID. - BACKFILL_ORDER_AGENCY_ID = 314; - - // Backfill order booked CPC. - BACKFILL_ORDER_BOOKED_CPC = 315; - - // Backfill order booked CPM. - BACKFILL_ORDER_BOOKED_CPM = 316; - - // Backfill order delivery status ENUM value. - BACKFILL_ORDER_DELIVERY_STATUS = 340; - - // Backfill order delivery status localized name. - BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341; - - // Backfill order end date. - BACKFILL_ORDER_END_DATE = 317; - - // Backfill order end date and time. - BACKFILL_ORDER_END_DATE_TIME = 319; - - // Backfill order external ID. - BACKFILL_ORDER_EXTERNAL_ID = 320; - - // Backfill order id. - BACKFILL_ORDER_ID = 338; - - // Backfill order labels. - BACKFILL_ORDER_LABELS = 334; - - // Backfill order labels IDs. - BACKFILL_ORDER_LABEL_IDS = 335; - - // Backfill order lifetime clicks. - BACKFILL_ORDER_LIFETIME_CLICKS = 322; - - // Backfill order lifetime impressions. - BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323; - - // Backfill order name. - BACKFILL_ORDER_NAME = 339; - - // Backfill order PO number. - BACKFILL_ORDER_PO_NUMBER = 324; - - // Whether the Backfill order is programmatic. - BACKFILL_ORDER_PROGRAMMATIC = 321; - - // Backfill order sales person. - BACKFILL_ORDER_SALESPERSON = 325; - - // Backfill order secondary sales people. - BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329; - - // Backfill order secondary sales people ID. - BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328; - - // Backfill order secondary traffickers. - BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331; - - // Backfill order secondary traffickers ID. - BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330; - - // Backfill order start date. - BACKFILL_ORDER_START_DATE = 332; - - // Backfill order start date and time. - BACKFILL_ORDER_START_DATE_TIME = 333; - - // Backfill order trafficker. - BACKFILL_ORDER_TRAFFICKER = 326; - - // Backfill order trafficker ID. - BACKFILL_ORDER_TRAFFICKER_ID = 327; - - // Whether the Backfill order end time and end date is set to effectively - // never end. - BACKFILL_ORDER_UNLIMITED_END = 318; - - // The ID of the buyer on a backfill programmatic proposal. - BACKFILL_PROGRAMMATIC_BUYER_ID = 336; - - // The name of the buyer on a backfill programmatic proposal. - BACKFILL_PROGRAMMATIC_BUYER_NAME = 337; - - // The amount of information about the Publisher's page sent to the buyer - // who purchased the impressions. - BRANDING_TYPE = 383; - - // The localized version of branding type, the amount of information about - // the Publisher's page sent to the buyer who purchased the impressions. - BRANDING_TYPE_NAME = 384; - - // Browser category. - BROWSER_CATEGORY = 119; - - // Browser category name. - BROWSER_CATEGORY_NAME = 120; - - // The ID of the browser. - BROWSER_ID = 235; - - // The name of the browser. - BROWSER_NAME = 236; - - // Mobile carrier ID. - CARRIER_ID = 369; - - // Name of the mobile carrier. - CARRIER_NAME = 368; - - // The ID of an advertiser, classified by Google, associated with a creative - // transacted - CLASSIFIED_ADVERTISER_ID = 133; - - // The name of an advertiser, classified by Google, associated with a - // creative transacted - CLASSIFIED_ADVERTISER_NAME = 134; - - // ID of the brand, as classified by Google, - CLASSIFIED_BRAND_ID = 243; - - // Name of the brand, as classified by Google, - CLASSIFIED_BRAND_NAME = 244; - - // ID of the video content served. - CONTENT_ID = 246; - - // Name of the video content served. - CONTENT_NAME = 247; - - // The criteria ID of the country in which the ad served. - COUNTRY_ID = 11; - - // The name of the country in which the ad served. - COUNTRY_NAME = 12; - - // Enum value of creative billing type - CREATIVE_BILLING_TYPE = 366; - - // Localized string value of creative billing type - CREATIVE_BILLING_TYPE_NAME = 367; - - // Represents the click-through URL of a creative - CREATIVE_CLICK_THROUGH_URL = 174; - - // The ID of a creative - CREATIVE_ID = 138; - - // Creative name - CREATIVE_NAME = 139; - - // Creative technology ENUM - CREATIVE_TECHNOLOGY = 148; - - // Creative technology locallized name - CREATIVE_TECHNOLOGY_NAME = 149; - - // Third party vendor name of a creative - CREATIVE_THIRD_PARTY_VENDOR = 361; - - // Enum value of creative type - CREATIVE_TYPE = 344; - - // Localized string name of creative type - CREATIVE_TYPE_NAME = 345; - - // Breaks down reporting data by date. - DATE = 3; - - // Breaks down reporting data by day of the week. Monday is 1 and 7 is - // Sunday. - DAY_OF_WEEK = 4; - - // Demand channel. - DEMAND_CHANNEL = 9; - - // Demand channel name. - DEMAND_CHANNEL_NAME = 10; - - // Demand subchannel. - DEMAND_SUBCHANNEL = 22; - - // Demand subchannel name. - DEMAND_SUBCHANNEL_NAME = 23; - - // The device on which an ad was served. - DEVICE = 226; - - // The device category to which an ad is being targeted. - DEVICE_CATEGORY = 15; - - // The name of the category of device (smartphone, feature phone, tablet, or - // desktop) to which an ad is being targeted. - DEVICE_CATEGORY_NAME = 16; - - // The localized name of the device on which an ad was served. - DEVICE_NAME = 225; - - // ID of the yield partner as classified by Google - EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; - - // Name of the yield partner as classified by Google - EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; - - // The ID of the first look pricing rule. - FIRST_LOOK_PRICING_RULE_ID = 248; - - // The name of the first look pricing rule. - FIRST_LOOK_PRICING_RULE_NAME = 249; - - // Breaks down reporting data by hour in one day. - HOUR = 100; - - // The interaction type of an ad. - INTERACTION_TYPE = 223; - - // The localized name of the interaction type of an ad. - INTERACTION_TYPE_NAME = 224; - - // Inventory format. - // The format of the ad unit (e.g, banner) where the ad was requested. - INVENTORY_FORMAT = 17; - - // Inventory format name. - // The format of the ad unit (e.g, banner) where the ad was requested. - INVENTORY_FORMAT_NAME = 18; - - // Inventory type. - // The kind of web page or device where the ad was requested. - INVENTORY_TYPE = 19; - - // Inventory type name. - // The kind of web page or device where the ad was requested. - INVENTORY_TYPE_NAME = 20; - - // Whether traffic is Adx Direct. - IS_ADX_DIRECT = 382; - - // Whether traffic is First Look. - IS_FIRST_LOOK_DEAL = 401; - - // The Custom Targeting Value ID - KEY_VALUES_ID = 214; - - // The Custom Targeting Value formatted like = - KEY_VALUES_NAME = 215; - - // Whether a Line item is archived. - LINE_ITEM_ARCHIVED = 188; - - // Line item comanion delivery option ENUM value. - LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; - - // Localized line item comanion delivery option name. - LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; - - // The computed status of the LineItem. - LINE_ITEM_COMPUTED_STATUS = 250; - - // The localized name of the computed status of the LineItem. - LINE_ITEM_COMPUTED_STATUS_NAME = 251; - - // The contracted units bought for the Line item. - LINE_ITEM_CONTRACTED_QUANTITY = 92; - - // The cost per unit of the Line item. - LINE_ITEM_COST_PER_UNIT = 85; - - // Line item cost type ENUM value. - LINE_ITEM_COST_TYPE = 212; - - // Localized line item cost type name. - LINE_ITEM_COST_TYPE_NAME = 213; - - // Represent the end date of a creative associated with line item - LINE_ITEM_CREATIVE_END_DATE = 176; - - // The creative rotation type of the LineItem. - LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; - - // The localized name of the creative rotation type of the LineItem. - LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; - - // Represent the start date of a creative associated with line item - LINE_ITEM_CREATIVE_START_DATE = 175; - - // The 3 letter currency code of the Line Item - LINE_ITEM_CURRENCY_CODE = 180; - - // The progress made for the delivery of the Line item. - LINE_ITEM_DELIVERY_INDICATOR = 87; - - // The delivery rate type of the LineItem. - LINE_ITEM_DELIVERY_RATE_TYPE = 191; - - // The localized name of the delivery rate type of the LineItem. - LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; - - // The discount of the LineItem in whole units in the LineItem's currency - // code, or if unspecified the Network's currency code. - LINE_ITEM_DISCOUNT_ABSOLUTE = 195; - - // The discount of the LineItem in percentage. - LINE_ITEM_DISCOUNT_PERCENTAGE = 196; - - // The end date of the Line item. - LINE_ITEM_END_DATE = 81; - - // The end date and time of the Line item. - LINE_ITEM_END_DATE_TIME = 83; - - // The ENUM value of the environment a LineItem is targeting. - LINE_ITEM_ENVIRONMENT_TYPE = 201; - - // The localized name of the environment a LineItem is targeting. - LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; - - // The deal ID of the Line item. Set for Programmatic Direct campaigns. - LINE_ITEM_EXTERNAL_DEAL_ID = 97; - - // The external ID of the Line item. - LINE_ITEM_EXTERNAL_ID = 86; - - // The frequency cap of the Line item (descriptive string). - LINE_ITEM_FREQUENCY_CAP = 256; - - // Line item ID. - LINE_ITEM_ID = 1; - - // The application that last modified the Line Item. - LINE_ITEM_LAST_MODIFIED_BY_APP = 181; - - // The total number of clicks delivered of the lifetime of the Line item. - LINE_ITEM_LIFETIME_CLICKS = 95; - - // The total number of impressions delivered over the lifetime of the - // Line item. - LINE_ITEM_LIFETIME_IMPRESSIONS = 94; - - // The total number of viewable impressions delivered over the lifetime of - // the Line item. - LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; - - // Whether or not the Line item is Makegood. Makegood refers to free - // inventory offered to buyers to compensate for mistakes or under-delivery - // in the original campaigns. - LINE_ITEM_MAKEGOOD = 89; - - // Line item Name. - LINE_ITEM_NAME = 2; - - // The cost of booking for the Line item (non-CPD). - LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; - - // Whether a Line item is eligible for opitimization. - LINE_ITEM_OPTIMIZABLE = 90; - - // Goal type ENUM value of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_TYPE = 210; - - // Localized goal type name of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; - - // The total number of impressions or clicks that are reserved for a - // line item. For line items of type BULK or PRICE_PRIORITY, this represents - // the number of remaining impressions reserved. If the line item has an - // impression cap goal, this represents the number of impressions or - // conversions that the line item will stop serving at if reached. - LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; - - // The percentage of impressions or clicks that are reserved for a - // line item. For line items of type SPONSORSHIP, this represents the - // percentage of available impressions reserved. For line items of type - // NETWORK or HOUSE, this represents the percentage of remaining impressions - // reserved. - LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; - - // Unit type ENUM value of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; - - // Localized unit type name of the primary goal of the line item. - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; - - // The priority of this Line item as a value between 1 and 16. - // In general, a lower priority means more serving priority for the - // Line item. - LINE_ITEM_PRIORITY = 24; - - // ENUM value describing the state of inventory reservation for the - // LineItem. - LINE_ITEM_RESERVATION_STATUS = 304; - - // Localized string describing the state of inventory reservation for the - // LineItem. - LINE_ITEM_RESERVATION_STATUS_NAME = 305; - - // The start date of the Line item. - LINE_ITEM_START_DATE = 82; - - // The start date and time of the Line item. - LINE_ITEM_START_DATE_TIME = 84; - - // Line item type ENUM value. - LINE_ITEM_TYPE = 193; - - // Localized line item type name. - LINE_ITEM_TYPE_NAME = 194; - - // Whether the Line item end time and end date is set to effectively never - // end. - LINE_ITEM_UNLIMITED_END = 187; - - // The artificial cost per unit used by the Ad server to help rank - // inventory. - LINE_ITEM_VALUE_COST_PER_UNIT = 88; - - // The web property code used for dynamic allocation Line Items. - LINE_ITEM_WEB_PROPERTY_CODE = 179; - - // The ID of creative, includes regular creatives, and master and companions - // in case of creative sets - MASTER_COMPANION_CREATIVE_ID = 140; - - // Name of creative, includes regular creatives, and master and companions - // in case of creative sets - MASTER_COMPANION_CREATIVE_NAME = 141; - - // Whether the mobile app is free. - MOBILE_APP_FREE = 128; - - // URL of app icon for the mobile app. - MOBILE_APP_ICON_URL = 129; - - // The ID of the Mobile App. - MOBILE_APP_ID = 123; - - // The name of the mobile app. - MOBILE_APP_NAME = 127; - - // Ownership status of the mobile app. - MOBILE_APP_OWNERSHIP_STATUS = 311; - - // Ownership status of the mobile app. - MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; - - // The App Store of the mobile app. - MOBILE_APP_STORE = 125; - - // The localized name of the mobile app store. - MOBILE_APP_STORE_NAME = 245; - - // Mobile inventory type. - // Identifies whether a mobile ad came from a regular web page, an AMP web - // page, or a mobile app. - // Values match the Inventory type dimension available in the Overview Home - // dashboard. Note: Video takes precedence over any other value, for - // example, if there is an in-stream video impression on a desktop device, - // it will be attributed to in-stream video and not desktop web. - MOBILE_INVENTORY_TYPE = 99; - - // Mobile inventory type name. - // Identifies whether a mobile ad came from a regular web page, an AMP web - // page, or a mobile app. - MOBILE_INVENTORY_TYPE_NAME = 21; - - // SDK version of the mobile device. - MOBILE_SDK_VERSION_NAME = 130; - - // Breaks down reporting data by month and year. - MONTH_YEAR = 6; - - // Native ad format ID. - NATIVE_AD_FORMAT_ID = 255; - - // Native ad format name. - NATIVE_AD_FORMAT_NAME = 254; - - // Native style ID. - NATIVE_STYLE_ID = 253; - - // Native style name. - NATIVE_STYLE_NAME = 252; - - // Operating system category. - OPERATING_SYSTEM_CATEGORY = 117; - - // Operating system category name. - OPERATING_SYSTEM_CATEGORY_NAME = 118; - - // ID of the operating system version. - OPERATING_SYSTEM_VERSION_ID = 238; - - // Details of the operating system, including version. - OPERATING_SYSTEM_VERSION_NAME = 237; - - // Order agency. - ORDER_AGENCY = 150; - - // Order agency ID. - ORDER_AGENCY_ID = 151; - - // Order booked CPC. - ORDER_BOOKED_CPC = 152; - - // Order booked CPM. - ORDER_BOOKED_CPM = 153; - - // Order delivery status ENUM value. - ORDER_DELIVERY_STATUS = 231; - - // Order delivery status localized name. - ORDER_DELIVERY_STATUS_NAME = 239; - - // Order end date. - ORDER_END_DATE = 154; - - // Order end date and time. - ORDER_END_DATE_TIME = 155; - - // Order external ID. - ORDER_EXTERNAL_ID = 156; - - // Order id. - ORDER_ID = 7; - - // Order labels. - ORDER_LABELS = 170; - - // Order labels IDs. - ORDER_LABEL_IDS = 171; - - // Order lifetime clicks. - ORDER_LIFETIME_CLICKS = 158; - - // Order lifetime impressions. - ORDER_LIFETIME_IMPRESSIONS = 159; - - // Order name. - ORDER_NAME = 8; - - // Order PO number. - ORDER_PO_NUMBER = 160; - - // Whether the Order is programmatic. - ORDER_PROGRAMMATIC = 157; - - // Order sales person. - ORDER_SALESPERSON = 161; - - // Order secondary sales people. - ORDER_SECONDARY_SALESPEOPLE = 164; - - // Order secondary sales people ID. - ORDER_SECONDARY_SALESPEOPLE_ID = 165; - - // Order secondary traffickers. - ORDER_SECONDARY_TRAFFICKERS = 166; - - // Order secondary traffickers ID. - ORDER_SECONDARY_TRAFFICKERS_ID = 167; - - // Order start date. - ORDER_START_DATE = 168; - - // Order start date and time. - ORDER_START_DATE_TIME = 169; - - // Order trafficker. - ORDER_TRAFFICKER = 162; - - // Order trafficker ID. - ORDER_TRAFFICKER_ID = 163; - - // Whether the Order end time and end date is set to effectively never - // end. - ORDER_UNLIMITED_END = 203; - - // Placement ID - PLACEMENT_ID = 113; - - // The full list of placement IDs associated with the ad unit. - PLACEMENT_ID_ALL = 144; - - // Placement name - PLACEMENT_NAME = 114; - - // The full list of placement names associated with the ad unit. - PLACEMENT_NAME_ALL = 145; - - // Placement status ENUM value - PLACEMENT_STATUS = 362; - - // The full list of placement status ENUM values associated with the ad - // unit. - PLACEMENT_STATUS_ALL = 363; - - // Localized placement status name. - PLACEMENT_STATUS_NAME = 364; - - // The full list of localized placement status names associated with the ad - // unit. - PLACEMENT_STATUS_NAME_ALL = 365; - - // The ID of the buyer on a programmatic proposal. - PROGRAMMATIC_BUYER_ID = 240; - - // The name of the buyer on a programmatic proposal. - PROGRAMMATIC_BUYER_NAME = 241; - - // Programmatic channel. - // The type of transaction that occurred in Ad Exchange. - PROGRAMMATIC_CHANNEL = 13; - - // Programmatic channel name. - // The type of transaction that occurred in Ad Exchange. - PROGRAMMATIC_CHANNEL_NAME = 14; - - // The size of a rendered creative, It can differ with the creative's size - // if a creative is shown in an ad slot of a different size. - RENDERED_CREATIVE_SIZE = 343; - - // Inventory Requested Ad Sizes dimension - REQUESTED_AD_SIZES = 352; - - // Request type ENUM - REQUEST_TYPE = 146; - - // Request type locallized name - REQUEST_TYPE_NAME = 147; - - // Indicates if a request was eligible for server-side unwrapping. - SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597; - - // Information about domain or subdomains. - SITE = 387; - - // The ID of the browser, device or other environment into which a line item - // or creative was served. - TARGETING_ID = 232; - - // Information about the browser, device and other environments into which - // a line item or creative was served. - TARGETING_NAME = 233; - - // The way in which advertisers targeted their ads. - TARGETING_TYPE = 385; - - // The localized name of the way in which advertisers targeted their ads. - TARGETING_TYPE_NAME = 386; - - // Inventory Traffic source dimension - TRAFFIC_SOURCE = 388; - - // Inventory Traffic source dimension name - TRAFFIC_SOURCE_NAME = 389; - - // Unified pricing rule ID dimension - UNIFIED_PRICING_RULE_ID = 393; - - // Unified pricing rule name dimension - UNIFIED_PRICING_RULE_NAME = 394; - - // The video placement enum as defined by ADCOM 1.0-202303. - VIDEO_PLCMT = 172; - - // The localized name of the video placement as defined by ADCOM 1.0-202303. - VIDEO_PLCMT_NAME = 173; - - // Breaks down reporting data by week of the year. - WEEK = 5; - - // Name of the company within a yield group - YIELD_GROUP_BUYER_NAME = 184; - - // ID of the group of ad networks or exchanges used for Mediation and Open - // Bidding - YIELD_GROUP_ID = 182; - - // Name of the group of ad networks or exchanges used for Mediation and Open - // Bidding - YIELD_GROUP_NAME = 183; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 0 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 1 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 2 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 3 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 4 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 5 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 6 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 7 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 8 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 9 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 10 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 11 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 12 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 13 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; - - // Custom field option ID for Line Item with custom field ID equal to the ID - // in index 14 of `ReportDefinition.line_item_custom_field_ids`. - LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 0 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 0 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 1 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 1 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 2 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 2 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 3 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 3 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 4 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 4 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 5 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 5 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 6 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 6 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 7 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 7 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 8 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 8 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 9 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 9 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 10 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 10 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 11 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 11 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 12 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 12 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 13 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 13 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; - - // Custom field value for Line Item with custom field ID equal to the ID - // in index 14 of `ReportDefinition.line_item_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 14 is of - // type STRING or DROPDOWN. - LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 0 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 1 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 2 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 3 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 4 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 5 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 6 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 7 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 8 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 9 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 10 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 11 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 12 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 13 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; - - // Custom field option ID for Order with custom field ID equal to the ID - // in index 14 of `ReportDefinition.order_custom_field_ids`. - ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; - - // Custom field value for Order with custom field ID equal to the ID - // in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 0 is of type - // STRING. - ORDER_CUSTOM_FIELD_0_VALUE = 13000; - - // Custom field value for Order with custom field ID equal to the ID - // in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 1 is of type - // STRING. - ORDER_CUSTOM_FIELD_1_VALUE = 13001; - - // Custom field value for Order with custom field ID equal to the ID - // in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 2 is of type - // STRING. - ORDER_CUSTOM_FIELD_2_VALUE = 13002; - - // Custom field value for Order with custom field ID equal to the ID - // in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 3 is of type - // STRING. - ORDER_CUSTOM_FIELD_3_VALUE = 13003; - - // Custom field value for Order with custom field ID equal to the ID - // in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 4 is of type - // STRING. - ORDER_CUSTOM_FIELD_4_VALUE = 13004; - - // Custom field value for Order with custom field ID equal to the ID - // in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 5 is of type - // STRING. - ORDER_CUSTOM_FIELD_5_VALUE = 13005; - - // Custom field value for Order with custom field ID equal to the ID - // in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 6 is of type - // STRING. - ORDER_CUSTOM_FIELD_6_VALUE = 13006; - - // Custom field value for Order with custom field ID equal to the ID - // in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 7 is of type - // STRING. - ORDER_CUSTOM_FIELD_7_VALUE = 13007; - - // Custom field value for Order with custom field ID equal to the ID - // in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 8 is of type - // STRING. - ORDER_CUSTOM_FIELD_8_VALUE = 13008; - - // Custom field value for Order with custom field ID equal to the ID - // in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the value - // as a string. Can only be used if the custom field at index 9 is of type - // STRING. - ORDER_CUSTOM_FIELD_9_VALUE = 13009; - - // Custom field value for Order with custom field ID equal to the ID - // in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 10 is of - // type STRING. - ORDER_CUSTOM_FIELD_10_VALUE = 13010; - - // Custom field value for Order with custom field ID equal to the ID - // in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 11 is of - // type STRING. - ORDER_CUSTOM_FIELD_11_VALUE = 13011; - - // Custom field value for Order with custom field ID equal to the ID - // in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 12 is of - // type STRING. - ORDER_CUSTOM_FIELD_12_VALUE = 13012; - - // Custom field value for Order with custom field ID equal to the ID - // in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 13 is of - // type STRING. - ORDER_CUSTOM_FIELD_13_VALUE = 13013; - - // Custom field value for Order with custom field ID equal to the ID - // in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 14 is of - // type STRING. - ORDER_CUSTOM_FIELD_14_VALUE = 13014; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 0 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 1 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 2 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 3 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 4 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 5 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 6 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 7 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 8 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 9 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 10 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 11 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 12 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 13 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; - - // Custom field option ID for Creative with custom field ID equal to the ID - // in index 14 of `ReportDefinition.creative_custom_field_ids`. - CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 0 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 1 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 2 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 3 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 4 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 5 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 6 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 7 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 8 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 9 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 10 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 10 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 11 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 11 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 12 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 12 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 13 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 13 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; - - // Custom field value for Creative with custom field ID equal to the ID - // in index 14 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 14 is of - // type STRING. - CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; - - // Custom field option ID for Backfill line item with custom field ID equal - // to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 0 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 1 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 2 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 3 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 4 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 5 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 6 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 7 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 8 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 9 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 10 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 11 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 12 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 13 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; - - // Custom field value for Backfill line item with custom field ID equal to - // the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 14 is of type STRING or DROPDOWN. - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 0 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 1 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 2 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 3 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 4 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 5 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 6 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 7 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 8 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 9 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 10 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 11 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 12 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 13 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; - - // Custom field option ID for Backfill order with custom field ID equal to - // the ID in index 14 of `ReportDefinition.order_custom_field_ids`. - BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; - - // Custom field value for Backfill order with custom field ID equal to the - // ID - // in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 0 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 1 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 2 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 3 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 4 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 5 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 6 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 7 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 8 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 9 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 10 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 11 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 12 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 13 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; - - // Custom field value for Backfill order with custom field ID equal to the - // ID in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 14 is of - // type STRING or DROPDOWN. - BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; - - // Custom field option ID for Backfill creative with custom field ID equal - // to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. - BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID - // in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the - // value as a string. Can only be used if the custom field at index 0 is of - // type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 1 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 2 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 3 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 4 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 5 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 6 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 7 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 8 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats - // the value as a string. Can only be used if the custom field at index 9 is - // of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 10 is of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 11 is of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 12 is of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 13 is of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; - - // Custom field value for Backfill creative with custom field ID equal to - // the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. - // Treats the value as a string. Can only be used if the custom field at - // index 14 is of type STRING or DROPDOWN. - BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 0 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_0_VALUE_ID = 100000; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 1 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_1_VALUE_ID = 100001; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 2 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_2_VALUE_ID = 100002; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 3 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_3_VALUE_ID = 100003; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 4 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_4_VALUE_ID = 100004; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 5 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_5_VALUE_ID = 100005; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 6 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_6_VALUE_ID = 100006; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_7_VALUE_ID = 100007; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 8 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_8_VALUE_ID = 100008; - - // Custom Dimension Value ID for Custom Dimension with key equal to the key - // in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_9_VALUE_ID = 100009; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 0 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_0_VALUE = 101000; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 1 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_1_VALUE = 101001; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 2 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_2_VALUE = 101002; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 3 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_3_VALUE = 101003; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 4 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_4_VALUE = 101004; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 5 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_5_VALUE = 101005; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 6 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_6_VALUE = 101006; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 7 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_7_VALUE = 101007; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 8 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_8_VALUE = 101008; - - // Custom Dimension Value name for Custom Dimension with key equal to the - // id in index 9 of `ReportDefinition.custom_dimension_key_ids`. - CUSTOM_DIMENSION_9_VALUE = 101009; - } - - // Reporting metrics. - enum Metric { - // Default value. This value is unused. - METRIC_UNSPECIFIED = 0; - - // Active View total average time in seconds that specific impressions are - // reported as being viewable. - ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; - - // Total number of impressions that were eligible to measure viewability. - ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; - - // The total number of impressions that were sampled and measured by active - // view. - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; - - // The percentage of total impressions that were measurable by active view - // (out of all the total impressions sampled for active view). - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; - - // The total number of impressions viewed on the user's screen. - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; - - // The percentage of total impressions viewed on the user's screen (out of - // the total impressions measurable by active view). - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; - - // Active View AdSense average time in seconds that specific impressions are - // reported as being viewable. - ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; - - // Total number of impressions delivered by AdSense that were eligible to - // measure viewability. - ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; - - // The number of impressions delivered by AdSense that were sampled, and - // measurable by active view. - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; - - // The percentage of impressions delivered by AdSense that were measurable - // by active view (out of all AdSense impressions sampled for active view). - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; - - // The number of impressions delivered by AdSense viewed on the user's - // screen. - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; - - // The percentage of impressions delivered by AdSense viewed on the user's - // screen (out of AdSense impressions measurable by active view). - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; - - // The average effective cost-per-thousand-impressions earned from the ads - // delivered by AdSense through line item dynamic allocation. - ADSENSE_AVERAGE_ECPM = 26; - - // Number of clicks delivered by AdSense demand channel. - ADSENSE_CLICKS = 23; - - // The ratio of impressions served by AdSense that resulted in users - // clicking on an ad. The clickthrough rate (CTR) is updated nightly. The - // AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). - ADSENSE_CTR = 24; - - // Total impressions delivered by AdSense. - ADSENSE_IMPRESSIONS = 22; - - // Ratio of clicks delivered by AdSense through line item dynamic allocation - // in relation to the total clicks delivered. - ADSENSE_PERCENT_CLICKS = 28; - - // Ratio of impressions delivered by AdSense through line item dynamic - // allocation in relation to the total impressions delivered. - ADSENSE_PERCENT_IMPRESSIONS = 27; - - // Ratio of revenue generated by AdSense through line item dynamic - // allocation in relation to the total revenue. - ADSENSE_PERCENT_REVENUE = 29; - - // Ratio of revenue generated by AdSense through line item dynamic - // allocation in relation to the total revenue (excluding CPD). - ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; - - // The total number of times that an AdSense ad is delivered. - ADSENSE_RESPONSES_SERVED = 41; - - // Revenue generated from AdSense through line item dynamic allocation, - // calculated in the network's currency and time zone. - ADSENSE_REVENUE = 25; - - // Active View AdExchange average time in seconds that specific impressions - // are reported as being viewable. - AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; - - // Total number of impressions delivered by Ad Exchange that were eligible - // to measure viewability. - AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; - - // The number of impressions delivered by Ad Exchange that were sampled, and - // measurable by active view. - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; - - // The percentage of impressions delivered by Ad Exchange that were - // measurable by active view (out of all Ad Exchange impressions sampled for - // active view). - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; - - // The number of impressions delivered by Ad Exchange viewed on the user's - // screen. - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; - - // The percentage of impressions delivered by Ad Exchange viewed on the - // user's screen (out of Ad Exchange impressions measurable by active view). - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; - - // The average effective cost-per-thousand-impressions earned from the ads - // delivered by Ad Exchange through line item dynamic allocation. - AD_EXCHANGE_AVERAGE_ECPM = 18; - - // Number of clicks delivered by the Ad Exchange. - AD_EXCHANGE_CLICKS = 15; - - // The ratio of impressions served by the Ad Exchange that resulted in users - // clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad - // Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange - // impressions). - AD_EXCHANGE_CTR = 16; - - // Total impressions delivered by the Ad Exchange. - AD_EXCHANGE_IMPRESSIONS = 14; - - // Ratio of clicks delivered by Ad Exchange through line item dynamic - // allocation in relation to the total clicks delivered. - AD_EXCHANGE_PERCENT_CLICKS = 20; - - // Ratio of impressions delivered by Ad Exchange through line item dynamic - // allocation in relation to the total impressions delivered. - AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; - - // Ratio of revenue generated by Ad Exchange through line item dynamic - // allocation in relation to the total revenue. - AD_EXCHANGE_PERCENT_REVENUE = 21; - - // Ratio of revenue generated by Ad Exchange through line item dynamic - // allocation in relation to the total revenue (excluding CPD). - AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; - - // The total number of times that an Ad Exchange ad is delivered. - AD_EXCHANGE_RESPONSES_SERVED = 42; - - // Revenue generated from the Ad Exchange through line item dynamic - // allocation, calculated in your network's currency and time zone. - AD_EXCHANGE_REVENUE = 17; - - // The total number of times that an ad request is sent to the ad server - // including dynamic allocation. - AD_REQUESTS = 38; - - // Active View ad server average time in seconds that specific impressions - // are reported as being viewable. - AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; - - // Total number of impressions delivered by the ad server that were eligible - // to measure viewability. - AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; - - // The number of impressions delivered by the ad server that were sampled, - // and measurable by active view. - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; - - // The percentage of impressions delivered by the ad server that were - // measurable by active view (out of all the ad server impressions sampled - // for active view). - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; - - // The number of impressions delivered by the ad server viewed on the user's - // screen. - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; - - // The percentage of impressions delivered by the ad server viewed on the - // user's screen (out of the ad server impressions measurable by active - // view). - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; - - // Average effective cost-per-thousand-impressions earned from the ads - // delivered by the Google Ad Manager server. - AD_SERVER_AVERAGE_ECPM = 34; - - // Average effective cost-per-thousand-impressions earned from the ads - // delivered by the Google Ad Manager server, excluding CPD value. - AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; - - // Total raw impressions counted when creative begins to render or the - // first frame of a video is shown. - AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262; - - // Total clicks served by the Google Ad Manager server. It usually takes - // about 30 minutes for new clicks to be recorded and added to the total - // displayed in reporting. - AD_SERVER_CLICKS = 7; - - // CPD revenue earned, calculated in your network's currency, for - // the ads delivered by the Google Ad Manager server. Sum of all booked - // revenue. - AD_SERVER_CPD_REVENUE = 32; - - // Ratio of impressions served by the Google Ad Manager server that resulted - // in users clicking on an ad. The clickthrough rate (CTR) is updated - // nightly. The ad server CTR is calculated as: (Ad server clicks / Ad - // server impressions). - AD_SERVER_CTR = 8; - - // Total impressions delivered by the Ad Server. - AD_SERVER_IMPRESSIONS = 6; - - // Ratio of clicks delivered by the Google Ad Manager server in relation to - // the total clicks delivered. - AD_SERVER_PERCENT_CLICKS = 12; - - // Ratio of impressions delivered by the Google Ad Manager server in - // relation to the total impressions delivered. - AD_SERVER_PERCENT_IMPRESSIONS = 11; - - // Ratio of revenue generated by the Google Ad Manager server in relation - // to the total revenue. - AD_SERVER_PERCENT_REVENUE = 35; - - // Ratio of revenue generated by the Google Ad Manager server (excluding - // CPD) in relation to the total revenue. - AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; - - // The total number of times that an ad is served by the ad server. - AD_SERVER_RESPONSES_SERVED = 40; - - // All CPM, CPC, and CPD revenue earned, calculated in your network's - // currency, for the ads delivered by the Google Ad Manager server. - // Sum of all booked revenue. - AD_SERVER_REVENUE = 33; - - // Revenue (excluding CPD) earned, calculated in your network's currency, - // for the ads delivered by the Google Ad Manager server. Sum of all booked - // revenue. - AD_SERVER_REVENUE_WITHOUT_CPD = 9; - - // The number of tracked ads delivered by the ad server. - AD_SERVER_TRACKED_ADS = 264; - - // Total raw impressions counted when creative begins to render or the - // first frame of a video is shown, before invalid traffic filtrations by - // Ad Server. - AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261; - - // Total clicks delivered by the Ad Server before spam filtering. - AD_SERVER_UNFILTERED_CLICKS = 259; - - // Total impressions delivered by the Ad Server before spam filtering. - AD_SERVER_UNFILTERED_IMPRESSIONS = 260; - - // The number of tracked ads delivered by the ad server before invalid - // traffic filtrations. - AD_SERVER_UNFILTERED_TRACKED_ADS = 263; - - // eCPM averaged across the Google Ad Manager server, AdSense, - // and Ad Exchange. - AVERAGE_ECPM = 37; - - // eCPM averaged across the Google Ad Manager server (excluding CPD), - // AdSense, and Ad Exchange. - AVERAGE_ECPM_WITHOUT_CPD = 5; - - // The number of times a user clicked on an ad. - CLICKS = 2; - - // The total number of times that the code for an ad is served by the ad - // server including dynamic allocation. - CODE_SERVED_COUNT = 44; - - // For standard ads, your ad clickthrough rate (CTR) is the number of ad - // clicks divided by the number of individual ad impressions expressed as a - // fraction. Ad CTR = Clicks / Ad impressions. - CTR = 3; - - // The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; - - // The number of auction impressions sold by Google in partner sales. - GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; - - // The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; - - // The number of impressions sold by Google in partner sales. - GOOGLE_SOLD_IMPRESSIONS = 130; - - // The number of coviewed impressions sold by Google in partner sales. - GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; - - // The number of reservation impressions sold by Google in partner sales. - GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; - - // Total impressions from the Google Ad Manager server, AdSense, - // Ad Exchange, and yield group partners. - IMPRESSIONS = 1; - - // The number of filled pod requests (filled by partner or Google) in - // partner sales. - PARTNER_SALES_FILLED_POD_REQUESTS = 135; - - // The percent of filled requests to total ad requests in - // partner sales. - PARTNER_SALES_FILL_RATE = 136; - - // The percent of partner filled requests to total ad requests - // in partner sales. - PARTNER_SALES_PARTNER_MATCH_RATE = 137; - - // The number of queries eligible for partner sales. - PARTNER_SALES_QUERIES = 132; - - // The number of partner unfilled impressions in partner sales. - // If a pod request is not filled by partner but filled by Google, this - // metric will still count 1. - PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; - - // The number of partner unmatched queries in partner sales. - // If an ad request is not filled by partner but filled by Google, this - // metric will still count 1. - PARTNER_SALES_UNMATCHED_QUERIES = 134; - - // The number of code served sold by partner in partner sales. - PARTNER_SOLD_CODE_SERVED = 125; - - // The number of coviewed impressions sold by partner in partner sales. - PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; - - // The number of impressions sold by partner in partner sales. - PARTNER_SOLD_IMPRESSIONS = 123; - - // The total number of ad requests eligible for programmatic inventory, - // including Programmatic Guaranteed, Preferred Deals, backfill, and open - // auction. - PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; - - // The number of programmatic responses served divided by the number of - // programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, - // and Preferred Deals. - PROGRAMMATIC_MATCH_RATE = 178; - - // Total number of ad responses served from programmatic demand sources. - // Includes Ad Exchange, Open Bidding, and Preferred Deals. - // - // Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open - // Bidding ad requests. - PROGRAMMATIC_RESPONSES_SERVED = 176; - - // The total number of times that an ad is served by the ad server including - // dynamic allocation. - RESPONSES_SERVED = 39; - - // Total amount of CPM, CPC, and CPD revenue based on the number of units - // served by the Google Ad Manager server, AdSense, Ad Exchange, and - // third-party Mediation networks. - REVENUE = 36; - - // Total amount of revenue (excluding CPD) based on the number of units - // served by the Google Ad Manager server, AdSense, Ad Exchange, and - // third-party Mediation networks. - REVENUE_WITHOUT_CPD = 4; - - // The average latency in milliseconds across all server-side unwrapping - // callout requests. There is no special handling for error or timeout - // responses. This reflects the entire chain of a parent callout request, - // which may result in multiple child callouts. This metric is not sliced by - // child callout dimensions. - SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434; - - // The total number of server-side unwrapping callout requests. - SERVER_SIDE_UNWRAPPING_CALLOUTS = 435; - - // The total number of server-side unwrapping callouts that returned an - // empty response. Timeouts are not considered empty responses. - SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436; - - // The total number of server-side unwrapping callouts that returned an - // error response. Timeouts and empty responses are not considered errors. - SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437; - - // The total number of successfully unwrapped, non-empty server-side - // wrapping callouts. Successful unwrapping does not indicate that the - // resulting creative was served. - SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438; - - // The total number of server-side unwrapping callouts that timed out before - // returning a response. - SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439; - - // The total number of missed impressions due to the ad servers' inability - // to find ads to serve including dynamic allocation. - UNFILLED_IMPRESSIONS = 45; - - // The total number of times that an ad is not returned by the ad server. - UNMATCHED_AD_REQUESTS = 43; - - // Number of times an Offerwall message was shown to users. - USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; - - // The number of messages where the user gained an entitlement. - USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; - - // The number of user interactions with a video, on average, such as pause, - // full screen, mute, etc. - VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; - - // The number of times a user collapses a video, either to its original size - // or to a different size. - VIDEO_INTERACTION_COLLAPSES = 93; - - // The number of times a user expands a video. - VIDEO_INTERACTION_EXPANDS = 95; - - // The number of times ad clip played in full screen mode. - VIDEO_INTERACTION_FULL_SCREENS = 96; - - // The number of times video player was in mute state during play of ad - // clip. - VIDEO_INTERACTION_MUTES = 97; - - // The number of times user paused ad clip. - VIDEO_INTERACTION_PAUSES = 98; - - // The number of times the user unpaused the video. - VIDEO_INTERACTION_RESUMES = 99; - - // The number of times a user rewinds the video. - VIDEO_INTERACTION_REWINDS = 100; - - // The number of times a user unmutes the video. - VIDEO_INTERACTION_UNMUTES = 101; - - // The number of times a skippable video is skipped. - VIDEO_INTERACTION_VIDEO_SKIPS = 102; - - // The number of total creative serves in video realtime reporting. - VIDEO_REAL_TIME_CREATIVE_SERVES = 139; - - // The number of errors of type 100 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_100_COUNT = 143; - - // The number of errors of type 101 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_101_COUNT = 144; - - // The number of errors of type 102 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_102_COUNT = 145; - - // The number of errors of type 200 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_200_COUNT = 146; - - // The number of errors of type 201 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_201_COUNT = 147; - - // The number of errors of type 202 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_202_COUNT = 148; - - // The number of errors of type 203 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_203_COUNT = 149; - - // The number of errors of type 300 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_300_COUNT = 150; - - // The number of errors of type 301 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_301_COUNT = 151; - - // The number of errors of type 302 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_302_COUNT = 152; - - // The number of errors of type 303 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_303_COUNT = 153; - - // The number of errors of type 400 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_400_COUNT = 154; - - // The number of errors of type 401 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_401_COUNT = 155; - - // The number of errors of type 402 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_402_COUNT = 156; - - // The number of errors of type 403 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_403_COUNT = 157; - - // The number of errors of type 405 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_405_COUNT = 158; - - // The number of errors of type 406 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_406_COUNT = 159; - - // The number of errors of type 407 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_407_COUNT = 160; - - // The number of errors of type 408 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_408_COUNT = 161; - - // The number of errors of type 409 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_409_COUNT = 162; - - // The number of errors of type 410 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_410_COUNT = 163; - - // The number of errors of type 500 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_500_COUNT = 164; - - // The number of errors of type 501 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_501_COUNT = 165; - - // The number of errors of type 502 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_502_COUNT = 166; - - // The number of errors of type 503 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_503_COUNT = 167; - - // The number of errors of type 600 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_600_COUNT = 168; - - // The number of errors of type 601 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_601_COUNT = 169; - - // The number of errors of type 602 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_602_COUNT = 170; - - // The number of errors of type 603 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_603_COUNT = 171; - - // The number of errors of type 604 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_604_COUNT = 172; - - // The number of errors of type 900 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_900_COUNT = 173; - - // The number of errors of type 901 in video realtime reporting. - VIDEO_REAL_TIME_ERROR_901_COUNT = 174; - - // The number of total impressions in video realtime reporting. - VIDEO_REAL_TIME_IMPRESSIONS = 138; - - // The number of matched queries in video realtime reporting. - VIDEO_REAL_TIME_MATCHED_QUERIES = 140; - - // The number of all errors in video realtime reporting. - VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; - - // The number of total queries in video realtime reporting. - VIDEO_REAL_TIME_TOTAL_QUERIES = 142; - - // The number of unmatched queries in video realtime reporting. - VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; - - // Number of times that the publisher specified a video ad played - // automatically. - VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; - - // Average percentage of the video watched by users. - VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; - - // Average time(seconds) users watched the video. - VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; - - // Number of times that the publisher specified a video ad was clicked to - // play. - VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; - - // The number of times the video played to completion. - VIDEO_VIEWERSHIP_COMPLETES = 107; - - // Percentage of times the video played to the end. - VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; - - // The number of engaged views: ad is viewed to completion or for 30s, - // whichever comes first. - VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; - - // The number of times the video played to 25% of its length. - VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; - - // The number of times the video reached its midpoint during play. - VIDEO_VIEWERSHIP_MIDPOINTS = 111; - - // The number of times a skip button is shown in video. - VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; - - // The number of impressions where the video was played. - VIDEO_VIEWERSHIP_STARTS = 113; - - // The number of times the video played to 75% of its length. - VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; - - // The number of times an error occurred, such as a VAST redirect error, a - // video playback error, or an invalid response error. - VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; - - // The percentage of video error count. - VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; - - // Duration of the video creative. - VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; - - // View-through rate represented as a percentage. - VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; - - // Number of winning bids received from Open Bidding buyers, even when the - // winning bid is placed at the end of a mediation for mobile apps chain. - YIELD_GROUP_AUCTIONS_WON = 80; - - // Number of bids received from Open Bidding buyers, regardless of whether - // the returned bid competes in an auction. - YIELD_GROUP_BIDS = 81; - - // Number of bids received from Open Bidding buyers that competed in - // the auction. - YIELD_GROUP_BIDS_IN_AUCTION = 82; - - // Number of times a yield partner is asked to return bid to fill - // a yield group request. - YIELD_GROUP_CALLOUTS = 83; - - // The estimated net rate for yield groups or individual - // yield group partners. - YIELD_GROUP_ESTIMATED_CPM = 88; - - // Total net revenue earned by a yield group, based upon the yield group - // estimated CPM and yield group impressions recorded. - YIELD_GROUP_ESTIMATED_REVENUE = 87; - - // Number of matched yield group requests where a yield partner delivered - // their ad to publisher inventory. - YIELD_GROUP_IMPRESSIONS = 85; - - // Yield group Mediation fill rate indicating how often a network - // fills an ad request. - YIELD_GROUP_MEDIATION_FILL_RATE = 89; - - // Total requests where a Mediation chain was served. - YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; - - // The number of mediation chain passback across all channels. - YIELD_GROUP_MEDIATION_PASSBACKS = 118; - - // Revenue per thousand impressions based on data collected by Ad Manager - // from third-party ad network reports. - YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; - - // Number of times a yield group buyer successfully returned a bid in - // response to a yield group callout. - YIELD_GROUP_SUCCESSFUL_RESPONSES = 84; - } - - // Possible metric value types to add. - enum MetricValueType { - // The values for the primary date_range. - PRIMARY = 0; - - // Each metrics' percent of the total for the primary date_range. - PRIMARY_PERCENT_OF_TOTAL = 1; - - // The values for the comparison_date_range. - COMPARISON = 2; - - // Each metrics' percent of the total for the comparison_date_range. - COMPARISON_PERCENT_OF_TOTAL = 3; - - // The absolute change between the primary and comparison date ranges. - ABSOLUTE_CHANGE = 4; - - // The relative change between the primary and comparison date ranges. - RELATIVE_CHANGE = 5; - } - - // Supported report types. - enum ReportType { - // Default value. This value is unused. - REPORT_TYPE_UNSPECIFIED = 0; - - // Historical. - HISTORICAL = 1; - } - // The visibility of a report. enum Visibility { - // Default value. Reports with hidden visibility will not appear in the Ad + // Default value. Reports with hidden visibility won't appear in the Ad // Manager UI. HIDDEN = 0; @@ -3292,29 +57,6 @@ message Report { SAVED = 2; } - // The source to determine the time zone for the report. - enum TimeZoneSource { - // Unspecified default value. - TIME_ZONE_SOURCE_UNSPECIFIED = 0; - - // Use the publisher's time zone in network settings. - PUBLISHER = 1; - - // Use the time zone of the ad exchange. - // Only compatible with Ad Exchange dimensions and metrics. - AD_EXCHANGE = 2; - - // Use UTC time zone. - // Only compatible with Revenue Verification reports. - UTC = 3; - - // Use the time zone provided in the ReportDefinition.time_zone field. - // Has limited dimension and metric compatibility compared with PUBLISHER, - // and reports may take longer to run since the dates are dynamically - // calculated at request time. - PROVIDED = 4; - } - // Identifier. The resource name of the report. // Report resource name have the form: // `networks/{network_code}/reports/{report_id}` @@ -3342,101 +84,141 @@ message Report { [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The locale of this report. Locale is set from the user's - // locale at the time of the request. Locale can not be modified. + // locale at the time of the request. Locale can't be modified. string locale = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The schedule options of this report. ScheduleOptions schedule_options = 9 [(google.api.field_behavior) = OPTIONAL]; } -// The definition of how a report should be run. -message ReportDefinition { - // Required. The list of dimensions to report on. If empty, the report will - // have no dimensions, and any metrics will be totals. - repeated Report.Dimension dimensions = 1 - [(google.api.field_behavior) = REQUIRED]; +// A table containing report data including dimension and metric values. +message ReportDataTable { + // A row of report data. + message Row { + // The order of the dimension values is the same as the order of the + // dimensions specified in the request. + repeated ReportValue dimension_values = 1; - // Required. The list of metrics to report on. If empty, the report will have - // no metrics. - repeated Report.Metric metrics = 2 [(google.api.field_behavior) = REQUIRED]; + // + // The length of the metric_value_groups + // field will be equal to the length of the date_ranges field in the + // fetch response. The metric_value_groups field is + // ordered such that each index corresponds to the date_range at the same + // index. For example, given date_ranges [x, y], metric_value_groups will + // have a length of two. The first entry in metric_value_groups represents + // the metrics for date x and the second entry in metric_value_groups + // represents the metrics for date y. + repeated MetricValueGroup metric_value_groups = 2; + } + + // Contains all metric values requested for a single date range and set of + // column dimension values (returned in the columns field of the response). + // The order of the metrics in each field corresponds to the order of the + // metrics specified in the request. + message MetricValueGroup { + // Data for the PRIMARY MetricValueType. + repeated ReportValue primary_values = 1; + + // Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + repeated ReportValue primary_percent_of_total_values = 2; + + // Data for the COMPARISON MetricValueType. + repeated ReportValue comparison_values = 3; + + // Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + repeated ReportValue comparison_percent_of_total_values = 4; + + // Data for the ABSOLUTE_CHANGE MetricValueType. + repeated ReportValue absolute_change_values = 5; + + // Data for the RELATIVE_CHANGE MetricValueType. + repeated ReportValue relative_change_values = 6; + + // If true, the flag's conditions are met. If false, the flag's + // conditions are not met. flag_values has the same length as + // flags and index i of flag_values represents the flag at index i + // of flags. + repeated bool flag_values = 7; + } +} - // Optional. The filters for this report. - repeated Report.Filter filters = 3 [(google.api.field_behavior) = OPTIONAL]; +// The options for a scheduled report. +message ScheduleOptions { + // The schedule for the report + message Schedule { + // Days of week to schedule report run. + message WeeklySchedule { + // Specifies days of the week on which to run report. + repeated google.type.DayOfWeek weekly_scheduled_days = 1; + } - // Optional. Where to get the time zone for this report. Defaults to using the - // network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone - // field in the report definition must also be provided with the desired time - // zone. - Report.TimeZoneSource time_zone_source = 20 - [(google.api.field_behavior) = OPTIONAL]; + // Days of Month to schedule report run. + message MonthlySchedule { + // Specifies days of the month to run report. Range is from 1-31. + // Will ignore days that are not valid for the given month. + repeated int32 monthly_scheduled_days = 1; + } - // Optional. If time_zone_source is PROVIDED, this is the time zone to use for - // this report. Leave empty for any other time zone source. Time zone in IANA - // format (e.g. "America/New_York"). - string time_zone = 4 [(google.api.field_behavior) = OPTIONAL]; + // Frequency to run report. + enum Frequency { + // No Frequency specified. + FREQUENCY_UNSPECIFIED = 0; - // Optional. The ISO 4217 currency code for this report. Defaults to publisher - // currency code if not specified. - string currency_code = 5 [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run every hour. + HOURLY = 1; - // Required. The primary date range of this report. - Report.DateRange date_range = 6 [(google.api.field_behavior) = REQUIRED]; + // Schedule report to run twice a day (every 12 hours). + TWO_TIMES_DAILY = 2; - // Optional. The comparison date range of this report. If unspecified, the - // report will not have any comparison metrics. - optional Report.DateRange comparison_date_range = 9 - [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run three times a day (every 8 hours). + THREE_TIMES_DAILY = 3; - // Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* - // dimensions. The index of this repeated field corresponds to the index on - // each dimension. For example, custom_dimension_key_ids[0] describes - // CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. - repeated int64 custom_dimension_key_ids = 7 - [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run four times a day (every 6 hours). + FOUR_TIMES_DAILY = 4; - // Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* - // dimensions. The index of this repeated field corresponds to the index on - // each dimension. For example, line_item_custom_field_ids[0] describes - // LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. - repeated int64 line_item_custom_field_ids = 11 - [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run on a daily basis. + DAILY = 5; - // Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* - // dimensions. The index of this repeated field corresponds to the index on - // each dimension. For example, order_custom_field_ids[0] describes - // ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. - repeated int64 order_custom_field_ids = 12 - [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run on a weekly basis. + WEEKLY = 6; - // Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* - // dimensions. The index of this repeated field corresponds to the index on - // each dimension. For example, creative_custom_field_ids[0] describes - // CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. - repeated int64 creative_custom_field_ids = 13 - [(google.api.field_behavior) = OPTIONAL]; + // Schedule report to run on a monthly basis. + MONTHLY = 7; + } - // Required. The type of this report. - Report.ReportType report_type = 8 [(google.api.field_behavior) = REQUIRED]; + // The scheduled values based on the frequency selected. + // WEEKLY - uses WeeklySchedule + // MONTHLY - uses MonthlySchedule + oneof frequency_schedule { + // Days of week to schedule report run. + WeeklySchedule weekly_schedule = 6; - // Optional. Include a time period column to introduce comparison columns in - // the report for each generated period. For example, set to "QUARTERS" here - // to have a column for each quarter present in the primary date range. If - // "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter - // column will also include comparison values for its relative previous - // quarter. - Report.TimePeriodColumn time_period_column = 10 - [(google.api.field_behavior) = OPTIONAL]; + // Days of month to schedule report run. + MonthlySchedule monthly_schedule = 7; + } - // Optional. List of flags for this report. Used to flag rows in a result set - // based on a set of defined filters. - repeated Report.Flag flags = 14 [(google.api.field_behavior) = OPTIONAL]; + // Date for the first run of the report. + google.type.Date start_date = 1; - // Optional. Default sorts to apply to this report. - repeated Report.Sort sorts = 15 [(google.api.field_behavior) = OPTIONAL]; -} + // Date for the final run of the report. + google.type.Date end_date = 2; + + // Frequency to run report. + Frequency frequency = 3; + + // Indicates start time for schedule to run + // Will use the time_zone from `ReportDefinition`. Defaults + // to the publisher's time zone if not specified. + // + // For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + // will be the time of day that the first report will run on the first day. + // For example, if the start time is 2:00 PM, and the frequency is + // THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + // 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + // 2:00 PM, 10:00 PM. + google.type.TimeOfDay start_time = 4; + } -// The options for a scheduled report. -message ScheduleOptions { // Condition for when to email the scheduled report. enum DeliveryCondition { // Never deliver report. @@ -3457,80 +239,6 @@ message ScheduleOptions { // Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT // is specified. - repeated Report.Flag flags = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The schedule for the report -message Schedule { - // Days of week to schedule report run. - message WeeklySchedule { - // Specifies days of the week on which to run report. - repeated google.type.DayOfWeek weekly_scheduled_days = 1; - } - - // Days of Month to schedule report run. - message MonthlySchedule { - // Specifies days of the month to run report. Range is from 1-31. - // Will ignore days that are not valid for the given month. - repeated int32 monthly_scheduled_days = 1; - } - - // Frequency to run report. - enum Frequency { - // No Frequency specified. - FREQUENCY_UNSPECIFIED = 0; - - // Schedule report to run every hour. - HOURLY = 1; - - // Schedule report to run twice a day (every 12 hours). - TWO_TIMES_DAILY = 2; - - // Schedule report to run three times a day (every 8 hours). - THREE_TIMES_DAILY = 3; - - // Schedule report to run four times a day (every 6 hours). - FOUR_TIMES_DAILY = 4; - - // Schedule report to run on a daily basis. - DAILY = 5; - - // Schedule report to run on a weekly basis. - WEEKLY = 6; - - // Schedule report to run on a monthly basis. - MONTHLY = 7; - } - - // The scheduled values based on the frequency selected. - // WEEKLY - uses WeeklySchedule - // MONTHLY - uses MonthlySchedule - oneof frequency_schedule { - // Days of week to schedule report run. - WeeklySchedule weekly_schedule = 6; - - // Days of month to schedule report run. - MonthlySchedule monthly_schedule = 7; - } - - // Date for the first run of the report. - google.type.Date start_date = 1; - - // Date for the final run of the report. - google.type.Date end_date = 2; - - // Frequency to run report. - Frequency frequency = 3; - - // Indicates start time for schedule to run - // Will use the time_zone from `ReportDefinition`. Defaults - // to the publisher's time zone if not specified. - // - // For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this - // will be the time of day that the first report will run on the first day. - // For example, if the start time is 2:00 PM, and the frequency is - // THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, - // 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, - // 2:00 PM, 10:00 PM. - google.type.TimeOfDay start_time = 4; + repeated ReportDefinition.Flag flags = 3 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_service.proto index 1c072e680887..ee3a831d2a94 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_service.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.ads.admanager.v1; +import "google/ads/admanager/v1/report_definition.proto"; import "google/ads/admanager/v1/report_messages.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; @@ -74,7 +75,7 @@ service ReportService { } // Initiates the execution of an existing report asynchronously. Users can - // get the report by polling this operation via + // get the report by polling this operation using // `OperationsService.GetOperation`. // Poll every 5 seconds initially, with an exponential // backoff. Once a report is complete, the operation will contain a @@ -162,8 +163,8 @@ message ListReportsRequest { // Optional. The maximum number of `Reports` to return. The service may return // fewer than this value. If unspecified, at most 50 `Reports` will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. + // returned. The maximum value is 1000; values greater than 1000 will be + // coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListReports` call. @@ -201,7 +202,7 @@ message ListReportsResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. @@ -245,7 +246,8 @@ message FetchReportResultRowsRequest { // Optional. The maximum number of rows to return. The service may return // fewer than this value. If unspecified, at most 1,000 rows will be returned. - // The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + // The maximum value is 10,000; values greater than 10,000 will be reduced to + // 10,000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `FetchReportResultRows` @@ -256,7 +258,7 @@ message FetchReportResultRowsRequest { // The response message for the fetch report result rows endpoint. message FetchReportResultRowsResponse { // Up to `page_size` rows of report data. - repeated Report.DataTable.Row rows = 1; + repeated ReportDataTable.Row rows = 1; // The time at which the report was scheduled to run. For non-scheduled // reports, this is the time at which the report was requested to be run. @@ -265,12 +267,12 @@ message FetchReportResultRowsResponse { // The computed fixed date ranges this report includes. // Only returned with the first page of results (when page_token is not // included in the request). - repeated Report.DateRange.FixedDateRange date_ranges = 3; + repeated ReportDefinition.DateRange.FixedDateRange date_ranges = 3; // The computed comparison fixed date ranges this report includes. // Only returned with the first page of results (when page_token is not // included in the request). - repeated Report.DateRange.FixedDateRange comparison_date_ranges = 4; + repeated ReportDefinition.DateRange.FixedDateRange comparison_date_ranges = 4; // The total number of rows available from this report. Useful for // pagination. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_value.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_value.proto new file mode 100644 index 000000000000..63a19e3155ca --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/report_value.proto @@ -0,0 +1,73 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ReportValueProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a single value in a report. +message ReportValue { + // A list of integer values. + message IntList { + // The values + repeated int64 values = 1; + } + + // A list of string values. + message StringList { + // The values + repeated string values = 1; + } + + // A list of double values. + message DoubleList { + // The values + repeated double values = 1; + } + + // The value of the field, depends on the field's data format. + oneof value { + // For integer values. + int64 int_value = 1; + + // For double values. + double double_value = 2; + + // For string values. + string string_value = 3; + + // For boolean values. + bool bool_value = 4; + + // For lists of integer values. + IntList int_list_value = 6; + + // For lists of string values. + StringList string_list_value = 7; + + // For lists of double values. + DoubleList double_list_value = 9; + + // For bytes values. + bytes bytes_value = 8; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/role_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/role_service.proto index 5d454c96a2b9..c3ecafa15e35 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/role_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/role_service.proto @@ -76,7 +76,8 @@ message ListRolesRequest { // Optional. The maximum number of `Roles` to return. The service may return // fewer than this value. If unspecified, at most 50 `Roles` will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. + // The maximum value is 1000; values greater than 1000 will be coerced to + // 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous `ListRoles` call. @@ -113,7 +114,7 @@ message ListRolesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_enums.proto new file mode 100644 index 000000000000..290ebf837085 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_enums.proto @@ -0,0 +1,72 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "SiteEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [SiteDisapprovalReason][google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason] +message SiteDisapprovalReasonEnum { + // The list of possible policy violation types for a Site. + enum SiteDisapprovalReason { + // Default value. This value is unused. + SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0; + + // The site has content that violates policy. + CONTENT = 1; + + // Generic error type. + OTHER = 2; + + // The parent must be an authorized seller of the child network's inventory. + OWNERSHIP = 3; + } +} + +// Wrapper message for +// [SiteApprovalStatus][google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus] +message SiteApprovalStatusEnum { + // Represents the approval status of a site. + enum SiteApprovalStatus { + // Default value. This value is unused. + SITE_APPROVAL_STATUS_UNSPECIFIED = 0; + + // The site has been approved to serve ads. + APPROVED = 1; + + // The site has been disapproved from serving ads. + DISAPPROVED = 2; + + // The default status with which a site is created. + DRAFT = 3; + + // The site has been deactivated and is not serving ads due to dormancy. It + // must be resubmitted for approval. + REQUIRES_REVIEW = 4; + + // Once the site is submitted for approval, its status changes from draft to + // unchecked. It will be reviwed with an estimated turn-around time of 24h. + // Such a site cannot serve ads. + UNCHECKED = 5; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_messages.proto new file mode 100644 index 000000000000..7e5f127792ad --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_messages.proto @@ -0,0 +1,77 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/site_enums.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "SiteMessagesProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// A Site represents a domain owned or represented by a network. For a parent +// network managing other networks as part of Multiple Customer Management +// "Manage Inventory" model, it could be the child's domain. +message Site { + option (google.api.resource) = { + type: "admanager.googleapis.com/Site" + pattern: "networks/{network_code}/sites/{site}" + plural: "sites" + singular: "site" + }; + + // Identifier. The resource name of the `Site`. + // Format: `networks/{network_code}/sites/{site_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The URL of the Site. + optional string url = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The network code of the child if the Site is being managed for an + // MCM child network, or null if owned by this network. + optional string child_network_code = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the review performed on the Site by Google. + optional SiteApprovalStatusEnum.SiteApprovalStatus approval_status = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest Site approval status change time. + optional google.protobuf.Timestamp approval_status_update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides reasons for disapproving the Site. It is null when + // the Site is not disapproved. + repeated DisapprovalReason disapproval_reasons = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the reason for which Google disapproved the Site. +message DisapprovalReason { + // Output only. The type of policy violation found for the Site. + optional SiteDisapprovalReasonEnum.SiteDisapprovalReason type = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional details for the disapproval of the Site. + optional string details = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_service.proto new file mode 100644 index 000000000000..a5a49cd9cd12 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/site_service.proto @@ -0,0 +1,295 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/site_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "SiteServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Site` objects. +service SiteService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Site` object. + rpc GetSite(GetSiteRequest) returns (Site) { + option (google.api.http) = { + get: "/v1/{name=networks/*/sites/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Site` objects. + rpc ListSites(ListSitesRequest) returns (ListSitesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/sites" + }; + option (google.api.method_signature) = "parent"; + } + + // API to create a `Site` object. + rpc CreateSite(CreateSiteRequest) returns (Site) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/sites" + body: "site" + }; + option (google.api.method_signature) = "parent,site"; + } + + // API to batch create `Site` objects. + rpc BatchCreateSites(BatchCreateSitesRequest) + returns (BatchCreateSitesResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/sites:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to update a `Site` object. + rpc UpdateSite(UpdateSiteRequest) returns (Site) { + option (google.api.http) = { + patch: "/v1/{site.name=networks/*/sites/*}" + body: "site" + }; + option (google.api.method_signature) = "site,update_mask"; + } + + // API to batch update `Site` objects. + rpc BatchUpdateSites(BatchUpdateSitesRequest) + returns (BatchUpdateSitesResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/sites:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Deactivates a list of `Site` objects. + rpc BatchDeactivateSites(BatchDeactivateSitesRequest) + returns (BatchDeactivateSitesResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/sites:batchDeactivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // Submits a list of `Site` objects for approval. + rpc BatchSubmitSitesForApproval(BatchSubmitSitesForApprovalRequest) + returns (BatchSubmitSitesForApprovalResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/sites:batchSubmitForApproval" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } +} + +// Request object for `GetSite` method. +message GetSiteRequest { + // Required. The resource name of the Site. + // Format: `networks/{network_code}/sites/{site_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Site" } + ]; +} + +// Request object for `ListSites` method. +message ListSitesRequest { + // Required. The parent, which owns this collection of Sites. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Sites` to return. The service may return + // fewer than this value. If unspecified, at most 50 `Sites` will be returned. + // The maximum value is 1000; values greater than 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListSites` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListSites` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListSitesRequest` containing matching `Site` objects. +message ListSitesResponse { + // The `Site` objects from the specified network. + repeated Site sites = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Site` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} + +// Request object for `CreateSite` method. +message CreateSiteRequest { + // Required. The parent resource where this `Site` will be created. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Site` to create. + Site site = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchCreateSites` method. +message BatchCreateSitesRequest { + // Required. The parent resource where `Sites` will be created. + // Format: `networks/{network_code}` + // The parent field in the CreateSiteRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Site` objects to create. + // A maximum of 100 objects can be created in a batch. + repeated CreateSiteRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchCreateSites` method. +message BatchCreateSitesResponse { + // The `Site` objects created. + repeated Site sites = 1; +} + +// Request object for `UpdateSite` method. +message UpdateSiteRequest { + // Required. The `Site` to update. + // + // The `Site`'s `name` is used to identify the `Site` to update. + Site site = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchUpdateSites` method. +message BatchUpdateSitesRequest { + // Required. The parent resource where `Sites` will be updated. + // Format: `networks/{network_code}` + // The parent field in the UpdateSiteRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Site` objects to update. + // A maximum of 100 objects can be updated in a batch. + repeated UpdateSiteRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchUpdateSites` method. +message BatchUpdateSitesResponse { + // The `Site` objects updated. + repeated Site sites = 1; +} + +// Request message for `BatchDeactivateSites` method. +message BatchDeactivateSitesRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `Site` objects to deactivate. + repeated string names = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchDeactivateSites` method. +message BatchDeactivateSitesResponse {} + +// Request message for `BatchSubmitSitesForApproval` method. +message BatchSubmitSitesForApprovalRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `Site` objects to submit for approval. + repeated string names = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchSubmitSitesForApproval` method. +message BatchSubmitSitesForApprovalResponse {} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/targeting.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/targeting.proto index 4fe9c9a67a52..308b0c98514a 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/targeting.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/targeting.proto @@ -63,6 +63,14 @@ message Targeting { // Optional. Used to target data segments. DataSegmentTargeting data_segment_targeting = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Used to target content. + ContentTargeting content_targeting = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Used to target mobile applications. + MobileApplicationTargeting mobile_application_targeting = 18 + [(google.api.field_behavior) = OPTIONAL]; } // Represents a list of targeted and excluded geos. @@ -91,10 +99,30 @@ message TechnologyTargeting { BandwidthTargeting bandwidth_targeting = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Browser targeting dimension. + BrowserTargeting browser_targeting = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Browser language targeting dimension. + BrowserLanguageTargeting browser_language_targeting = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Device capability targeting dimension. + DeviceCapabilityTargeting device_capability_targeting = 6 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Device category targeting dimension. DeviceCategoryTargeting device_category_targeting = 1 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Device manufacturer targeting dimension. + DeviceManufacturerTargeting device_manufacturer_targeting = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mobile carrier targeting dimension. + MobileCarrierTargeting mobile_carrier_targeting = 8 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Operating system targeting dimension. OperatingSystemTargeting operating_system_targeting = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -125,6 +153,57 @@ message BandwidthTargeting { ]; } +// Browser Targeting. +// +// Allows publishers to target/exclude a browser type (e.g. Chrome, Firefox, +// Safari). For more information, see +// https://support.google.com/admanager/answer/2884033 (Targeting types > +// Browser). +message BrowserTargeting { + // Optional. A list of browser resource names that should be + // targeted/included. + repeated string targeted_browsers = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Browser" + } + ]; + + // Optional. A list of browser resource names that should be excluded. + repeated string excluded_browsers = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Browser" + } + ]; +} + +// Browser Language Targeting. +// +// For ads targeting mobile apps and their associated WebViews, the language +// used is based on the language specified by the user in their mobile device +// settings. If a browser has more than one language assigned to it, each +// language generates an impression. +message BrowserLanguageTargeting { + // Optional. A list of browser language resource names that should be + // targeted/included. + repeated string targeted_browser_languages = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/BrowserLanguage" + } + ]; + + // Optional. A list of browser language resource names that should be + // excluded. + repeated string excluded_browser_languages = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/BrowserLanguage" + } + ]; +} + // Represents a list of targeted and excluded device categories. message DeviceCategoryTargeting { // Optional. A list of device category resource names that should be @@ -145,6 +224,116 @@ message DeviceCategoryTargeting { ]; } +// Device Capability Targeting. +// +// Can be used to target/exclude users using mobile apps, ad requests resulting +// from apps built on the MRAID standard, or users on devices that are able to +// make phone calls versus devices that aren't able to make phone calls, such as +// tablets. +message DeviceCapabilityTargeting { + // Optional. A list of device capability resource names that should be + // targeted/included. + repeated string targeted_capabilities = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceCapability" + } + ]; + + // Optional. A list of device capability resource names that should be + // excluded. + repeated string excluded_capabilities = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceCapability" + } + ]; +} + +// Device Manufacturer Targeting. +// +// Can be used to target/exclude users on devices made by specific brands or +// companies, such as Apple, Google, Samsung and others. For more information, +// see https://support.google.com/admanager/answer/2884033 ("Targeting types > +// Device manufacturer"). +message DeviceManufacturerTargeting { + // Optional. A list of device manufacturer resource names that should be + // targeted/included. + repeated string targeted_device_manufacturers = 7 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceManufacturer" + } + ]; + + // Optional. A list of device manufacturer resource names that should be + // excluded. + repeated string excluded_device_manufacturers = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/DeviceManufacturer" + } + ]; + + // Optional. A list of mobile device resource names that should be + // targeted/included. + repeated string targeted_mobile_devices = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDevice" + } + ]; + + // Optional. A list of mobile device resource names that should be excluded. + repeated string excluded_mobile_devices = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDevice" + } + ]; + + // Optional. A list of mobile device submodel resource names that should be + // targeted/included. + repeated string targeted_mobile_device_submodels = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDeviceSubmodel" + } + ]; + + // Optional. A list of mobile device submodel resource names that should be + // excluded. + repeated string excluded_mobile_device_submodels = 12 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileDeviceSubmodel" + } + ]; +} + +// Mobile Carrier Targeting. +// +// Can be used to target/exclude a variety of mobile carriers, such as AT&T, +// Verizon, or T-Mobile. +message MobileCarrierTargeting { + // Optional. A list of mobile carrier resource names that should be + // targeted/included. + repeated string targeted_mobile_carriers = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileCarrier" + } + ]; + + // Optional. A list of mobile carrier resource names that should be excluded. + repeated string excluded_mobile_carriers = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/MobileCarrier" + } + ]; +} + // Operating System Targeting message OperatingSystemTargeting { // Optional. A list of operating system resource names that should be @@ -245,6 +434,14 @@ message CustomTargetingClause { // Optional. Leaf targeting expressions for custom key/values. repeated CustomTargetingLiteral custom_targeting_literals = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Leaf targeting expressions for audience segments. + repeated AudienceSegmentTargeting audience_segment_targetings = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Leaf targeting expressions for cms metadata. + repeated CmsMetadataTargeting cms_metadata_targetings = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Represents targeting for custom key/values. The values are ORed together. @@ -270,6 +467,43 @@ message CustomTargetingLiteral { ]; } +// Represents targeting for audience segments. The values are combined in a +// logical `OR`. +message AudienceSegmentTargeting { + // Whether this expression is negatively targeted, meaning it matches + // ad requests that exclude the below values. + optional bool negative = 1; + + // Optional. The targeted audience segments. + // + // This is either the resource name of a first-party audience segment or an + // alias to the effective third-party audience segment. Third-party audience + // segment resource names containing `~direct` or `~global` will be normalized + // by the server. For example, `networks/1234/audienceSegments/4567~direct` + // will be normalized to `networks/1234/audienceSegments/4567`. + repeated string audience_segments = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AudienceSegment" + } + ]; +} + +// Represents targeting for CMS metadata. The values are ORed together. +message CmsMetadataTargeting { + // Whether this expression is negatively targeted, meaning it matches + // ad requests that exclude the below values. + optional bool negative = 1; + + // Optional. The resource names of the targeted CMS metadata values. + repeated string cms_metadata_values = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CmsMetadataValue" + } + ]; +} + // User Domain Targeting message UserDomainTargeting { // Optional. A list of user domains that should be targeted/included. @@ -326,3 +560,80 @@ message DataSegmentTargeting { bool has_data_segment_targeting = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Content Targeting +// +// Targeted/excluded content entities and bundles. +// +message ContentTargeting { + // Optional. The resource names of the + // [Content][google.ads.admanager.v1.Content] that should be + // targeted/included. + repeated string targeted_content = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Content" + } + ]; + + // Optional. The resource names of the + // [Content][google.ads.admanager.v1.Content] that should be + // excluded. + repeated string excluded_content = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Content" + } + ]; + + // Optional. The resource names of the + // [ContentBundles][google.ads.admanager.v1.ContentBundle] that + // should be targeted/included. + repeated string targeted_content_bundles = 7 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/ContentBundle" + } + ]; + + // Optional. The resource names of the + // [ContentBundles][google.ads.admanager.v1.ContentBundle] that + // should be excluded. + repeated string excluded_content_bundles = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/ContentBundle" + } + ]; +} + +// Mobile Application Targeting +message MobileApplicationTargeting { + // The mobile application targeting. + oneof targeting { + // Optional. The targeted/excluded first-party mobile applications. + FirstPartyMobileApplicationTargeting first_party_targeting = 1 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// First-party mobile application targeting. +message FirstPartyMobileApplicationTargeting { + // Optional. The resource names of the first-party applications that should be + // targeted. + repeated string targeted_applications = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Application" + } + ]; + + // Optional. The resource names of the first-party applications that should be + // excluded. + repeated string excluded_applications = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Application" + } + ]; +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_category_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_category_service.proto index df2e77d06888..0fdb3710e2fd 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_category_service.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_category_service.proto @@ -119,7 +119,7 @@ message ListTaxonomyCategoriesResponse { // If a filter was included in the request, this reflects the total number // after the filtering is applied. // - // `total_size` will not be calculated in the response unless it has been + // `total_size` won't be calculated in the response unless it has been // included in a response field mask. The response field mask can be provided // to the method by using the URL parameter `$fields` or `fields`, or by using // the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_type_enum.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_type_enum.proto index f27d2c42b7c8..5e5bb4f3420e 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_type_enum.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/taxonomy_type_enum.proto @@ -36,6 +36,9 @@ message TaxonomyTypeEnum { // The IAB Audience Taxonomy v1.1. TAXONOMY_IAB_AUDIENCE_1_1 = 3; + // The IAB Content Taxonomy v1.0. + TAXONOMY_IAB_CONTENT_1_0 = 8; + // The IAB Content Taxonomy v2.1. TAXONOMY_IAB_CONTENT_2_1 = 4; diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_enums.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_enums.proto new file mode 100644 index 000000000000..c2cc4f578afe --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_enums.proto @@ -0,0 +1,62 @@ +// Copyright 2025 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.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "TeamEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Wrapper message for +// [TeamStatus][google.ads.admanager.v1.TeamStatusEnum.TeamStatus] +message TeamStatusEnum { + // Represents the status of a team, whether it is active or inactive. + enum TeamStatus { + // Default value. This value is unused. + TEAM_STATUS_UNSPECIFIED = 0; + + // The status of an active team. + ACTIVE = 1; + + // The status of an inactive team. + INACTIVE = 2; + } +} + +// Wrapper message for +// [TeamAccessType][google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType] +message TeamAccessTypeEnum { + // Represents the types of team access supported for orders. + enum TeamAccessType { + // Default value. This value is unused. + TEAM_ACCESS_TYPE_UNSPECIFIED = 0; + + // The level of access in which team members can't view or edit a team's + // orders. + NONE = 1; + + // The level of access in which team members can only view a team's orders. + READ_ONLY = 2; + + // The level of access in which team members can view and edit a team's + // orders. + READ_WRITE = 3; + } +} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_messages.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_messages.proto index 7eb220921bb5..a2fe7e2a474e 100644 --- a/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_messages.proto +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_messages.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.ads.admanager.v1; +import "google/ads/admanager/v1/team_enums.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -39,4 +40,33 @@ message Team { // Identifier. The resource name of the `Team`. // Format: `networks/{network_code}/teams/{team_id}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The name of the Team. This value has a maximum length of 127 + // characters. + optional string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the Team. This value has a maximum length of + // 255 characters. + optional string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The status of the Team. This value determines the visibility + // of the team in the UI. + optional TeamStatusEnum.TeamStatus status = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Whether or not users on this team have access to all companies. + // If this value is true, then an error will be thrown if an attempt is made + // to associate this team with a Company. + optional bool all_companies_access = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not users on this team have access to all inventory. + // If this value is true, then an error will be thrown if an attempt is made + // to associate this team with an AdUnit. + optional bool all_inventory_access = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default access to orders for users on this team. + optional TeamAccessTypeEnum.TeamAccessType access_type = 8 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_service.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_service.proto new file mode 100644 index 000000000000..54347c7eb933 --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/team_service.proto @@ -0,0 +1,303 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/team_messages.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "TeamServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Provides methods for handling `Team` objects. +service TeamService { + option (google.api.default_host) = "admanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/admanager"; + + // API to retrieve a `Team` object. + rpc GetTeam(GetTeamRequest) returns (Team) { + option (google.api.http) = { + get: "/v1/{name=networks/*/teams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Team` objects. + rpc ListTeams(ListTeamsRequest) returns (ListTeamsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/teams" + }; + option (google.api.method_signature) = "parent"; + } + + // API to create a `Team` object. + rpc CreateTeam(CreateTeamRequest) returns (Team) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/teams" + body: "team" + }; + option (google.api.method_signature) = "parent,team"; + } + + // API to batch create `Team` objects. + rpc BatchCreateTeams(BatchCreateTeamsRequest) + returns (BatchCreateTeamsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/teams:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to update a `Team` object. + rpc UpdateTeam(UpdateTeamRequest) returns (Team) { + option (google.api.http) = { + patch: "/v1/{team.name=networks/*/teams/*}" + body: "team" + }; + option (google.api.method_signature) = "team,update_mask"; + } + + // API to batch update `Team` objects. + rpc BatchUpdateTeams(BatchUpdateTeamsRequest) + returns (BatchUpdateTeamsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/teams:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // API to batch activate `Team` objects. + rpc BatchActivateTeams(BatchActivateTeamsRequest) + returns (BatchActivateTeamsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/teams:batchActivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // API to batch deactivate `Team` objects. + rpc BatchDeactivateTeams(BatchDeactivateTeamsRequest) + returns (BatchDeactivateTeamsResponse) { + option (google.api.http) = { + post: "/v1/{parent=networks/*}/teams:batchDeactivate" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } +} + +// Request object for `GetTeam` method. +message GetTeamRequest { + // Required. The resource name of the Team. + // Format: `networks/{network_code}/teams/{team_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; +} + +// Request object for `ListTeams` method. +message ListTeamsRequest { + // Required. The parent, which owns this collection of Teams. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of `Teams` to return. The service may return + // fewer than this value. If unspecified, at most 50 `Teams` will be returned. + // The maximum value is 1000; values greater than 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListTeams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListTeams` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListTeamsRequest` containing matching `Team` objects. +message ListTeamsResponse { + // The `Team` objects from the specified network. + repeated Team teams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Team` objects. + // If a filter was included in the request, this reflects the total number + // after the filtering is applied. + // + // `total_size` won't be calculated in the response unless it has been + // included in a response field mask. The response field mask can be provided + // to the method by using the URL parameter `$fields` or `fields`, or by using + // the HTTP/gRPC header `X-Goog-FieldMask`. + // + // For more information, see + // https://developers.google.com/ad-manager/api/beta/field-masks + int32 total_size = 3; +} + +// Request object for `CreateTeam` method. +message CreateTeamRequest { + // Required. The parent resource where this `Team` will be created. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Team` to create. + Team team = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchCreateTeams` method. +message BatchCreateTeamsRequest { + // Required. The parent resource where `Teams` will be created. + // Format: `networks/{network_code}` + // The parent field in the CreateTeamRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Team` objects to create. + // A maximum of 100 objects can be created in a batch. + repeated CreateTeamRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchCreateTeams` method. +message BatchCreateTeamsResponse { + // The `Team` objects created. + repeated Team teams = 1; +} + +// Request object for `UpdateTeam` method. +message UpdateTeamRequest { + // Required. The `Team` to update. + // + // The `Team`'s `name` is used to identify the `Team` to update. + Team team = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `BatchUpdateTeams` method. +message BatchUpdateTeamsRequest { + // Required. The parent resource where `Teams` will be updated. + // Format: `networks/{network_code}` + // The parent field in the UpdateTeamRequest must match this + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The `Team` objects to update. + // A maximum of 100 objects can be updated in a batch. + repeated UpdateTeamRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response object for `BatchUpdateTeams` method. +message BatchUpdateTeamsResponse { + // The `Team` objects updated. + repeated Team teams = 1; +} + +// Request message for `BatchActivateTeams` method. +message BatchActivateTeamsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `Team`s to activate. + // Format: `networks/{network_code}/teams/{team_id}` + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; +} + +// Response object for `BatchActivateTeams` method. +message BatchActivateTeamsResponse {} + +// Request message for `BatchDeactivateTeams` method. +message BatchDeactivateTeamsRequest { + // Required. Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Required. The resource names of the `Team`s to deactivate. + // Format: `networks/{network_code}/teams/{team_id}` + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; +} + +// Response object for `BatchDeactivateTeams` method. +message BatchDeactivateTeamsResponse {} diff --git a/packages/google-ads-admanager/protos/google/ads/admanager/v1/web_property.proto b/packages/google-ads-admanager/protos/google/ads/admanager/v1/web_property.proto new file mode 100644 index 000000000000..3935c949281d --- /dev/null +++ b/packages/google-ads-admanager/protos/google/ads/admanager/v1/web_property.proto @@ -0,0 +1,54 @@ +// Copyright 2025 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.ads.admanager.v1; + +import "google/ads/admanager/v1/exchange_syndication_product_enum.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "WebPropertyProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; +option ruby_package = "Google::Ads::AdManager::V1"; + +// Represents a web property. +message WebProperty { + option (google.api.resource) = { + type: "admanager.googleapis.com/WebProperty" + pattern: "networks/{network_code}/webProperties/{web_property}" + plural: "webProperties" + singular: "webProperty" + }; + + // Identifier. The resource name of the WebProperty. + // Format: + // `networks/{network_code}/webProperties/{web_property_code}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The `WebProperty` code. + string web_property_code = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ExchangeSyndicationProduct associated with this WebProperty. + ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The `WebProperty` ID. + int64 web_property_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-admanager/protos/protos.d.ts b/packages/google-ads-admanager/protos/protos.d.ts index 264dc90fbb57..8f5f2b21ab02 100644 --- a/packages/google-ads-admanager/protos/protos.d.ts +++ b/packages/google-ads-admanager/protos/protos.d.ts @@ -1050,4353 +1050,4041 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdUnitStatusEnum. */ - interface IAdUnitStatusEnum { + /** Properties of an AdReviewCenterAdStatusEnum. */ + interface IAdReviewCenterAdStatusEnum { } - /** Represents an AdUnitStatusEnum. */ - class AdUnitStatusEnum implements IAdUnitStatusEnum { + /** Represents an AdReviewCenterAdStatusEnum. */ + class AdReviewCenterAdStatusEnum implements IAdReviewCenterAdStatusEnum { /** - * Constructs a new AdUnitStatusEnum. + * Constructs a new AdReviewCenterAdStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdUnitStatusEnum); + constructor(properties?: google.ads.admanager.v1.IAdReviewCenterAdStatusEnum); /** - * Creates a new AdUnitStatusEnum instance using the specified properties. + * Creates a new AdReviewCenterAdStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns AdUnitStatusEnum instance + * @returns AdReviewCenterAdStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IAdUnitStatusEnum): google.ads.admanager.v1.AdUnitStatusEnum; + public static create(properties?: google.ads.admanager.v1.IAdReviewCenterAdStatusEnum): google.ads.admanager.v1.AdReviewCenterAdStatusEnum; /** - * Encodes the specified AdUnitStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. - * @param message AdUnitStatusEnum message or plain object to encode + * Encodes the specified AdReviewCenterAdStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAdStatusEnum.verify|verify} messages. + * @param message AdReviewCenterAdStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdUnitStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdReviewCenterAdStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdUnitStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. - * @param message AdUnitStatusEnum message or plain object to encode + * Encodes the specified AdReviewCenterAdStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAdStatusEnum.verify|verify} messages. + * @param message AdReviewCenterAdStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdReviewCenterAdStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdUnitStatusEnum message from the specified reader or buffer. + * Decodes an AdReviewCenterAdStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdUnitStatusEnum + * @returns AdReviewCenterAdStatusEnum * @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.ads.admanager.v1.AdUnitStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdReviewCenterAdStatusEnum; /** - * Decodes an AdUnitStatusEnum message from the specified reader or buffer, length delimited. + * Decodes an AdReviewCenterAdStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdUnitStatusEnum + * @returns AdReviewCenterAdStatusEnum * @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.ads.admanager.v1.AdUnitStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdReviewCenterAdStatusEnum; /** - * Verifies an AdUnitStatusEnum message. + * Verifies an AdReviewCenterAdStatusEnum 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 AdUnitStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdReviewCenterAdStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdUnitStatusEnum + * @returns AdReviewCenterAdStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdReviewCenterAdStatusEnum; /** - * Creates a plain object from an AdUnitStatusEnum message. Also converts values to other types if specified. - * @param message AdUnitStatusEnum + * Creates a plain object from an AdReviewCenterAdStatusEnum message. Also converts values to other types if specified. + * @param message AdReviewCenterAdStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdUnitStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdReviewCenterAdStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdUnitStatusEnum to JSON. + * Converts this AdReviewCenterAdStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdUnitStatusEnum + * Gets the default type url for AdReviewCenterAdStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AdUnitStatusEnum { + namespace AdReviewCenterAdStatusEnum { - /** AdUnitStatus enum. */ - enum AdUnitStatus { - AD_UNIT_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2, - ARCHIVED = 3 + /** AdReviewCenterAdStatus enum. */ + enum AdReviewCenterAdStatus { + AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED = 0, + ALLOWED = 1, + BLOCKED = 2, + UNREVIEWED = 3 } } - /** Properties of a SmartSizeModeEnum. */ - interface ISmartSizeModeEnum { + /** Properties of an AdReviewCenterAd. */ + interface IAdReviewCenterAd { + + /** AdReviewCenterAd name */ + name?: (string|null); + + /** AdReviewCenterAd adReviewCenterAdId */ + adReviewCenterAdId?: (string|null); + + /** AdReviewCenterAd productType */ + productType?: (google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|keyof typeof google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|null); + + /** AdReviewCenterAd status */ + status?: (google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|keyof typeof google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|null); + + /** AdReviewCenterAd previewUrl */ + previewUrl?: (string|null); } - /** Represents a SmartSizeModeEnum. */ - class SmartSizeModeEnum implements ISmartSizeModeEnum { + /** Represents an AdReviewCenterAd. */ + class AdReviewCenterAd implements IAdReviewCenterAd { /** - * Constructs a new SmartSizeModeEnum. + * Constructs a new AdReviewCenterAd. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ISmartSizeModeEnum); + constructor(properties?: google.ads.admanager.v1.IAdReviewCenterAd); + + /** AdReviewCenterAd name. */ + public name: string; + + /** AdReviewCenterAd adReviewCenterAdId. */ + public adReviewCenterAdId: string; + + /** AdReviewCenterAd productType. */ + public productType: (google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|keyof typeof google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct); + + /** AdReviewCenterAd status. */ + public status: (google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|keyof typeof google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus); + + /** AdReviewCenterAd previewUrl. */ + public previewUrl?: (string|null); /** - * Creates a new SmartSizeModeEnum instance using the specified properties. + * Creates a new AdReviewCenterAd instance using the specified properties. * @param [properties] Properties to set - * @returns SmartSizeModeEnum instance + * @returns AdReviewCenterAd instance */ - public static create(properties?: google.ads.admanager.v1.ISmartSizeModeEnum): google.ads.admanager.v1.SmartSizeModeEnum; + public static create(properties?: google.ads.admanager.v1.IAdReviewCenterAd): google.ads.admanager.v1.AdReviewCenterAd; /** - * Encodes the specified SmartSizeModeEnum message. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. - * @param message SmartSizeModeEnum message or plain object to encode + * Encodes the specified AdReviewCenterAd message. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAd.verify|verify} messages. + * @param message AdReviewCenterAd message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ISmartSizeModeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdReviewCenterAd, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SmartSizeModeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. - * @param message SmartSizeModeEnum message or plain object to encode + * Encodes the specified AdReviewCenterAd message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAd.verify|verify} messages. + * @param message AdReviewCenterAd message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ISmartSizeModeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdReviewCenterAd, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SmartSizeModeEnum message from the specified reader or buffer. + * Decodes an AdReviewCenterAd message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SmartSizeModeEnum + * @returns AdReviewCenterAd * @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.ads.admanager.v1.SmartSizeModeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdReviewCenterAd; /** - * Decodes a SmartSizeModeEnum message from the specified reader or buffer, length delimited. + * Decodes an AdReviewCenterAd message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SmartSizeModeEnum + * @returns AdReviewCenterAd * @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.ads.admanager.v1.SmartSizeModeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdReviewCenterAd; /** - * Verifies a SmartSizeModeEnum message. + * Verifies an AdReviewCenterAd 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 SmartSizeModeEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdReviewCenterAd message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SmartSizeModeEnum + * @returns AdReviewCenterAd */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SmartSizeModeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdReviewCenterAd; /** - * Creates a plain object from a SmartSizeModeEnum message. Also converts values to other types if specified. - * @param message SmartSizeModeEnum + * Creates a plain object from an AdReviewCenterAd message. Also converts values to other types if specified. + * @param message AdReviewCenterAd * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.SmartSizeModeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdReviewCenterAd, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SmartSizeModeEnum to JSON. + * Converts this AdReviewCenterAd to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SmartSizeModeEnum + * Gets the default type url for AdReviewCenterAd * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SmartSizeModeEnum { - - /** SmartSizeMode enum. */ - enum SmartSizeMode { - SMART_SIZE_MODE_UNSPECIFIED = 0, - NONE = 1, - SMART_BANNER = 2, - DYNAMIC_SIZE = 3 - } - } - - /** Properties of a TargetWindowEnum. */ - interface ITargetWindowEnum { + /** Properties of an ExchangeSyndicationProductEnum. */ + interface IExchangeSyndicationProductEnum { } - /** Represents a TargetWindowEnum. */ - class TargetWindowEnum implements ITargetWindowEnum { + /** Represents an ExchangeSyndicationProductEnum. */ + class ExchangeSyndicationProductEnum implements IExchangeSyndicationProductEnum { /** - * Constructs a new TargetWindowEnum. + * Constructs a new ExchangeSyndicationProductEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITargetWindowEnum); + constructor(properties?: google.ads.admanager.v1.IExchangeSyndicationProductEnum); /** - * Creates a new TargetWindowEnum instance using the specified properties. + * Creates a new ExchangeSyndicationProductEnum instance using the specified properties. * @param [properties] Properties to set - * @returns TargetWindowEnum instance + * @returns ExchangeSyndicationProductEnum instance */ - public static create(properties?: google.ads.admanager.v1.ITargetWindowEnum): google.ads.admanager.v1.TargetWindowEnum; + public static create(properties?: google.ads.admanager.v1.IExchangeSyndicationProductEnum): google.ads.admanager.v1.ExchangeSyndicationProductEnum; /** - * Encodes the specified TargetWindowEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. - * @param message TargetWindowEnum message or plain object to encode + * Encodes the specified ExchangeSyndicationProductEnum message. Does not implicitly {@link google.ads.admanager.v1.ExchangeSyndicationProductEnum.verify|verify} messages. + * @param message ExchangeSyndicationProductEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITargetWindowEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IExchangeSyndicationProductEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TargetWindowEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. - * @param message TargetWindowEnum message or plain object to encode + * Encodes the specified ExchangeSyndicationProductEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ExchangeSyndicationProductEnum.verify|verify} messages. + * @param message ExchangeSyndicationProductEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITargetWindowEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IExchangeSyndicationProductEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TargetWindowEnum message from the specified reader or buffer. + * Decodes an ExchangeSyndicationProductEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TargetWindowEnum + * @returns ExchangeSyndicationProductEnum * @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.ads.admanager.v1.TargetWindowEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ExchangeSyndicationProductEnum; /** - * Decodes a TargetWindowEnum message from the specified reader or buffer, length delimited. + * Decodes an ExchangeSyndicationProductEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TargetWindowEnum + * @returns ExchangeSyndicationProductEnum * @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.ads.admanager.v1.TargetWindowEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ExchangeSyndicationProductEnum; /** - * Verifies a TargetWindowEnum message. + * Verifies an ExchangeSyndicationProductEnum 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 TargetWindowEnum message from a plain object. Also converts values to their respective internal types. + * Creates an ExchangeSyndicationProductEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TargetWindowEnum + * @returns ExchangeSyndicationProductEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TargetWindowEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ExchangeSyndicationProductEnum; /** - * Creates a plain object from a TargetWindowEnum message. Also converts values to other types if specified. - * @param message TargetWindowEnum + * Creates a plain object from an ExchangeSyndicationProductEnum message. Also converts values to other types if specified. + * @param message ExchangeSyndicationProductEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TargetWindowEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ExchangeSyndicationProductEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TargetWindowEnum to JSON. + * Converts this ExchangeSyndicationProductEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TargetWindowEnum + * Gets the default type url for ExchangeSyndicationProductEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TargetWindowEnum { + namespace ExchangeSyndicationProductEnum { - /** TargetWindow enum. */ - enum TargetWindow { - TARGET_WINDOW_UNSPECIFIED = 0, - TOP = 1, - BLANK = 2 + /** ExchangeSyndicationProduct enum. */ + enum ExchangeSyndicationProduct { + EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED = 0, + DISPLAY = 1, + MOBILE_APP = 2, + VIDEO_AND_AUDIO = 3, + GAMES = 4 } } - /** Properties of an AdUnit. */ - interface IAdUnit { - - /** AdUnit name */ - name?: (string|null); - - /** AdUnit adUnitId */ - adUnitId?: (number|Long|string|null); - - /** AdUnit parentAdUnit */ - parentAdUnit?: (string|null); - - /** AdUnit parentPath */ - parentPath?: (google.ads.admanager.v1.IAdUnitParent[]|null); + /** Represents an AdReviewCenterAdService */ + class AdReviewCenterAdService extends $protobuf.rpc.Service { - /** AdUnit displayName */ - displayName?: (string|null); + /** + * Constructs a new AdReviewCenterAdService 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); - /** AdUnit adUnitCode */ - adUnitCode?: (string|null); + /** + * Creates new AdReviewCenterAdService 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): AdReviewCenterAdService; - /** AdUnit status */ - status?: (google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|keyof typeof google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null); + /** + * Calls SearchAdReviewCenterAds. + * @param request SearchAdReviewCenterAdsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchAdReviewCenterAdsResponse + */ + public searchAdReviewCenterAds(request: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, callback: google.ads.admanager.v1.AdReviewCenterAdService.SearchAdReviewCenterAdsCallback): void; - /** AdUnit appliedTargetWindow */ - appliedTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); + /** + * Calls SearchAdReviewCenterAds. + * @param request SearchAdReviewCenterAdsRequest message or plain object + * @returns Promise + */ + public searchAdReviewCenterAds(request: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest): Promise; - /** AdUnit effectiveTargetWindow */ - effectiveTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); + /** + * Calls BatchAllowAdReviewCenterAds. + * @param request BatchAllowAdReviewCenterAdsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchAllowAdReviewCenterAds(request: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, callback: google.ads.admanager.v1.AdReviewCenterAdService.BatchAllowAdReviewCenterAdsCallback): void; - /** AdUnit appliedTeams */ - appliedTeams?: (string[]|null); + /** + * Calls BatchAllowAdReviewCenterAds. + * @param request BatchAllowAdReviewCenterAdsRequest message or plain object + * @returns Promise + */ + public batchAllowAdReviewCenterAds(request: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest): Promise; - /** AdUnit teams */ - teams?: (string[]|null); + /** + * Calls BatchBlockAdReviewCenterAds. + * @param request BatchBlockAdReviewCenterAdsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchBlockAdReviewCenterAds(request: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, callback: google.ads.admanager.v1.AdReviewCenterAdService.BatchBlockAdReviewCenterAdsCallback): void; - /** AdUnit description */ - description?: (string|null); + /** + * Calls BatchBlockAdReviewCenterAds. + * @param request BatchBlockAdReviewCenterAdsRequest message or plain object + * @returns Promise + */ + public batchBlockAdReviewCenterAds(request: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest): Promise; + } - /** AdUnit explicitlyTargeted */ - explicitlyTargeted?: (boolean|null); + namespace AdReviewCenterAdService { - /** AdUnit hasChildren */ - hasChildren?: (boolean|null); + /** + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|searchAdReviewCenterAds}. + * @param error Error, if any + * @param [response] SearchAdReviewCenterAdsResponse + */ + type SearchAdReviewCenterAdsCallback = (error: (Error|null), response?: google.ads.admanager.v1.SearchAdReviewCenterAdsResponse) => void; - /** AdUnit updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|batchAllowAdReviewCenterAds}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchAllowAdReviewCenterAdsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** AdUnit adUnitSizes */ - adUnitSizes?: (google.ads.admanager.v1.IAdUnitSize[]|null); + /** + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|batchBlockAdReviewCenterAds}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchBlockAdReviewCenterAdsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** AdUnit externalSetTopBoxChannelId */ - externalSetTopBoxChannelId?: (string|null); + /** Properties of a SearchAdReviewCenterAdsRequest. */ + interface ISearchAdReviewCenterAdsRequest { - /** AdUnit refreshDelay */ - refreshDelay?: (google.protobuf.IDuration|null); + /** SearchAdReviewCenterAdsRequest parent */ + parent?: (string|null); - /** AdUnit appliedLabels */ - appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + /** SearchAdReviewCenterAdsRequest pageSize */ + pageSize?: (number|null); - /** AdUnit effectiveAppliedLabels */ - effectiveAppliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + /** SearchAdReviewCenterAdsRequest pageToken */ + pageToken?: (string|null); - /** AdUnit appliedLabelFrequencyCaps */ - appliedLabelFrequencyCaps?: (google.ads.admanager.v1.ILabelFrequencyCap[]|null); + /** SearchAdReviewCenterAdsRequest status */ + status?: (google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|keyof typeof google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|null); - /** AdUnit effectiveLabelFrequencyCaps */ - effectiveLabelFrequencyCaps?: (google.ads.admanager.v1.ILabelFrequencyCap[]|null); + /** SearchAdReviewCenterAdsRequest adReviewCenterAdId */ + adReviewCenterAdId?: (string[]|null); - /** AdUnit smartSizeMode */ - smartSizeMode?: (google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|keyof typeof google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null); + /** SearchAdReviewCenterAdsRequest dateTimeRange */ + dateTimeRange?: (google.type.IInterval|null); - /** AdUnit appliedAdsenseEnabled */ - appliedAdsenseEnabled?: (boolean|null); + /** SearchAdReviewCenterAdsRequest searchText */ + searchText?: (string[]|null); - /** AdUnit effectiveAdsenseEnabled */ - effectiveAdsenseEnabled?: (boolean|null); + /** SearchAdReviewCenterAdsRequest buyerAccountId */ + buyerAccountId?: ((number|Long|string)[]|null); } - /** Represents an AdUnit. */ - class AdUnit implements IAdUnit { + /** Represents a SearchAdReviewCenterAdsRequest. */ + class SearchAdReviewCenterAdsRequest implements ISearchAdReviewCenterAdsRequest { /** - * Constructs a new AdUnit. + * Constructs a new SearchAdReviewCenterAdsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdUnit); - - /** AdUnit name. */ - public name: string; - - /** AdUnit adUnitId. */ - public adUnitId: (number|Long|string); - - /** AdUnit parentAdUnit. */ - public parentAdUnit?: (string|null); - - /** AdUnit parentPath. */ - public parentPath: google.ads.admanager.v1.IAdUnitParent[]; - - /** AdUnit displayName. */ - public displayName?: (string|null); - - /** AdUnit adUnitCode. */ - public adUnitCode?: (string|null); - - /** AdUnit status. */ - public status?: (google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|keyof typeof google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null); - - /** AdUnit appliedTargetWindow. */ - public appliedTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); + constructor(properties?: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest); - /** AdUnit effectiveTargetWindow. */ - public effectiveTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); - - /** AdUnit appliedTeams. */ - public appliedTeams: string[]; - - /** AdUnit teams. */ - public teams: string[]; - - /** AdUnit description. */ - public description?: (string|null); - - /** AdUnit explicitlyTargeted. */ - public explicitlyTargeted?: (boolean|null); - - /** AdUnit hasChildren. */ - public hasChildren?: (boolean|null); - - /** AdUnit updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** AdUnit adUnitSizes. */ - public adUnitSizes: google.ads.admanager.v1.IAdUnitSize[]; - - /** AdUnit externalSetTopBoxChannelId. */ - public externalSetTopBoxChannelId?: (string|null); - - /** AdUnit refreshDelay. */ - public refreshDelay?: (google.protobuf.IDuration|null); + /** SearchAdReviewCenterAdsRequest parent. */ + public parent: string; - /** AdUnit appliedLabels. */ - public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + /** SearchAdReviewCenterAdsRequest pageSize. */ + public pageSize: number; - /** AdUnit effectiveAppliedLabels. */ - public effectiveAppliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + /** SearchAdReviewCenterAdsRequest pageToken. */ + public pageToken: string; - /** AdUnit appliedLabelFrequencyCaps. */ - public appliedLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[]; + /** SearchAdReviewCenterAdsRequest status. */ + public status: (google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|keyof typeof google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus); - /** AdUnit effectiveLabelFrequencyCaps. */ - public effectiveLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[]; + /** SearchAdReviewCenterAdsRequest adReviewCenterAdId. */ + public adReviewCenterAdId: string[]; - /** AdUnit smartSizeMode. */ - public smartSizeMode?: (google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|keyof typeof google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null); + /** SearchAdReviewCenterAdsRequest dateTimeRange. */ + public dateTimeRange?: (google.type.IInterval|null); - /** AdUnit appliedAdsenseEnabled. */ - public appliedAdsenseEnabled?: (boolean|null); + /** SearchAdReviewCenterAdsRequest searchText. */ + public searchText: string[]; - /** AdUnit effectiveAdsenseEnabled. */ - public effectiveAdsenseEnabled?: (boolean|null); + /** SearchAdReviewCenterAdsRequest buyerAccountId. */ + public buyerAccountId: (number|Long|string)[]; /** - * Creates a new AdUnit instance using the specified properties. + * Creates a new SearchAdReviewCenterAdsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AdUnit instance + * @returns SearchAdReviewCenterAdsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IAdUnit): google.ads.admanager.v1.AdUnit; + public static create(properties?: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest): google.ads.admanager.v1.SearchAdReviewCenterAdsRequest; /** - * Encodes the specified AdUnit message. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. - * @param message AdUnit message or plain object to encode + * Encodes the specified SearchAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.verify|verify} messages. + * @param message SearchAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdUnit message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. - * @param message AdUnit message or plain object to encode + * Encodes the specified SearchAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.verify|verify} messages. + * @param message SearchAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdUnit message from the specified reader or buffer. + * Decodes a SearchAdReviewCenterAdsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdUnit + * @returns SearchAdReviewCenterAdsRequest * @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.ads.admanager.v1.AdUnit; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.SearchAdReviewCenterAdsRequest; /** - * Decodes an AdUnit message from the specified reader or buffer, length delimited. + * Decodes a SearchAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdUnit + * @returns SearchAdReviewCenterAdsRequest * @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.ads.admanager.v1.AdUnit; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.SearchAdReviewCenterAdsRequest; /** - * Verifies an AdUnit message. + * Verifies a SearchAdReviewCenterAdsRequest 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 AdUnit message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdUnit + * @returns SearchAdReviewCenterAdsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnit; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SearchAdReviewCenterAdsRequest; /** - * Creates a plain object from an AdUnit message. Also converts values to other types if specified. - * @param message AdUnit + * Creates a plain object from a SearchAdReviewCenterAdsRequest message. Also converts values to other types if specified. + * @param message SearchAdReviewCenterAdsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdUnit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.SearchAdReviewCenterAdsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdUnit to JSON. + * Converts this SearchAdReviewCenterAdsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdUnit + * Gets the default type url for SearchAdReviewCenterAdsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdUnitSize. */ - interface IAdUnitSize { - - /** AdUnitSize size */ - size?: (google.ads.admanager.v1.ISize|null); + /** Properties of a SearchAdReviewCenterAdsResponse. */ + interface ISearchAdReviewCenterAdsResponse { - /** AdUnitSize environmentType */ - environmentType?: (google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|keyof typeof google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null); + /** SearchAdReviewCenterAdsResponse adReviewCenterAds */ + adReviewCenterAds?: (google.ads.admanager.v1.IAdReviewCenterAd[]|null); - /** AdUnitSize companions */ - companions?: (google.ads.admanager.v1.ISize[]|null); + /** SearchAdReviewCenterAdsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an AdUnitSize. */ - class AdUnitSize implements IAdUnitSize { + /** Represents a SearchAdReviewCenterAdsResponse. */ + class SearchAdReviewCenterAdsResponse implements ISearchAdReviewCenterAdsResponse { /** - * Constructs a new AdUnitSize. + * Constructs a new SearchAdReviewCenterAdsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdUnitSize); + constructor(properties?: google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse); - /** AdUnitSize size. */ - public size?: (google.ads.admanager.v1.ISize|null); - - /** AdUnitSize environmentType. */ - public environmentType: (google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|keyof typeof google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType); + /** SearchAdReviewCenterAdsResponse adReviewCenterAds. */ + public adReviewCenterAds: google.ads.admanager.v1.IAdReviewCenterAd[]; - /** AdUnitSize companions. */ - public companions: google.ads.admanager.v1.ISize[]; + /** SearchAdReviewCenterAdsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new AdUnitSize instance using the specified properties. + * Creates a new SearchAdReviewCenterAdsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AdUnitSize instance + * @returns SearchAdReviewCenterAdsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IAdUnitSize): google.ads.admanager.v1.AdUnitSize; + public static create(properties?: google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse): google.ads.admanager.v1.SearchAdReviewCenterAdsResponse; /** - * Encodes the specified AdUnitSize message. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. - * @param message AdUnitSize message or plain object to encode + * Encodes the specified SearchAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.verify|verify} messages. + * @param message SearchAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdUnitSize, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdUnitSize message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. - * @param message AdUnitSize message or plain object to encode + * Encodes the specified SearchAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.verify|verify} messages. + * @param message SearchAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitSize, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdUnitSize message from the specified reader or buffer. + * Decodes a SearchAdReviewCenterAdsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdUnitSize + * @returns SearchAdReviewCenterAdsResponse * @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.ads.admanager.v1.AdUnitSize; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.SearchAdReviewCenterAdsResponse; /** - * Decodes an AdUnitSize message from the specified reader or buffer, length delimited. + * Decodes a SearchAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdUnitSize + * @returns SearchAdReviewCenterAdsResponse * @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.ads.admanager.v1.AdUnitSize; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.SearchAdReviewCenterAdsResponse; /** - * Verifies an AdUnitSize message. + * Verifies a SearchAdReviewCenterAdsResponse 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 AdUnitSize message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdUnitSize + * @returns SearchAdReviewCenterAdsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitSize; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SearchAdReviewCenterAdsResponse; /** - * Creates a plain object from an AdUnitSize message. Also converts values to other types if specified. - * @param message AdUnitSize + * Creates a plain object from a SearchAdReviewCenterAdsResponse message. Also converts values to other types if specified. + * @param message SearchAdReviewCenterAdsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdUnitSize, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.SearchAdReviewCenterAdsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdUnitSize to JSON. + * Converts this SearchAdReviewCenterAdsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdUnitSize + * Gets the default type url for SearchAdReviewCenterAdsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdUnitParent. */ - interface IAdUnitParent { - - /** AdUnitParent parentAdUnit */ - parentAdUnit?: (string|null); + /** Properties of a BatchAllowAdReviewCenterAdsRequest. */ + interface IBatchAllowAdReviewCenterAdsRequest { - /** AdUnitParent displayName */ - displayName?: (string|null); + /** BatchAllowAdReviewCenterAdsRequest parent */ + parent?: (string|null); - /** AdUnitParent adUnitCode */ - adUnitCode?: (string|null); + /** BatchAllowAdReviewCenterAdsRequest names */ + names?: (string[]|null); } - /** Represents an AdUnitParent. */ - class AdUnitParent implements IAdUnitParent { + /** Represents a BatchAllowAdReviewCenterAdsRequest. */ + class BatchAllowAdReviewCenterAdsRequest implements IBatchAllowAdReviewCenterAdsRequest { /** - * Constructs a new AdUnitParent. + * Constructs a new BatchAllowAdReviewCenterAdsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdUnitParent); - - /** AdUnitParent parentAdUnit. */ - public parentAdUnit: string; + constructor(properties?: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest); - /** AdUnitParent displayName. */ - public displayName: string; + /** BatchAllowAdReviewCenterAdsRequest parent. */ + public parent: string; - /** AdUnitParent adUnitCode. */ - public adUnitCode: string; + /** BatchAllowAdReviewCenterAdsRequest names. */ + public names: string[]; /** - * Creates a new AdUnitParent instance using the specified properties. + * Creates a new BatchAllowAdReviewCenterAdsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AdUnitParent instance + * @returns BatchAllowAdReviewCenterAdsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IAdUnitParent): google.ads.admanager.v1.AdUnitParent; + public static create(properties?: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest; /** - * Encodes the specified AdUnitParent message. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. - * @param message AdUnitParent message or plain object to encode + * Encodes the specified BatchAllowAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.verify|verify} messages. + * @param message BatchAllowAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdUnitParent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdUnitParent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. - * @param message AdUnitParent message or plain object to encode + * Encodes the specified BatchAllowAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.verify|verify} messages. + * @param message BatchAllowAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitParent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdUnitParent message from the specified reader or buffer. + * Decodes a BatchAllowAdReviewCenterAdsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdUnitParent + * @returns BatchAllowAdReviewCenterAdsRequest * @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.ads.admanager.v1.AdUnitParent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest; /** - * Decodes an AdUnitParent message from the specified reader or buffer, length delimited. + * Decodes a BatchAllowAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdUnitParent + * @returns BatchAllowAdReviewCenterAdsRequest * @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.ads.admanager.v1.AdUnitParent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest; /** - * Verifies an AdUnitParent message. + * Verifies a BatchAllowAdReviewCenterAdsRequest 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 AdUnitParent message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAllowAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdUnitParent + * @returns BatchAllowAdReviewCenterAdsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitParent; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest; /** - * Creates a plain object from an AdUnitParent message. Also converts values to other types if specified. - * @param message AdUnitParent + * Creates a plain object from a BatchAllowAdReviewCenterAdsRequest message. Also converts values to other types if specified. + * @param message BatchAllowAdReviewCenterAdsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdUnitParent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdUnitParent to JSON. + * Converts this BatchAllowAdReviewCenterAdsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdUnitParent + * Gets the default type url for BatchAllowAdReviewCenterAdsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LabelFrequencyCap. */ - interface ILabelFrequencyCap { - - /** LabelFrequencyCap label */ - label?: (string|null); - - /** LabelFrequencyCap frequencyCap */ - frequencyCap?: (google.ads.admanager.v1.IFrequencyCap|null); + /** Properties of a BatchAllowAdReviewCenterAdsResponse. */ + interface IBatchAllowAdReviewCenterAdsResponse { } - /** Represents a LabelFrequencyCap. */ - class LabelFrequencyCap implements ILabelFrequencyCap { + /** Represents a BatchAllowAdReviewCenterAdsResponse. */ + class BatchAllowAdReviewCenterAdsResponse implements IBatchAllowAdReviewCenterAdsResponse { /** - * Constructs a new LabelFrequencyCap. + * Constructs a new BatchAllowAdReviewCenterAdsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ILabelFrequencyCap); - - /** LabelFrequencyCap label. */ - public label: string; - - /** LabelFrequencyCap frequencyCap. */ - public frequencyCap?: (google.ads.admanager.v1.IFrequencyCap|null); + constructor(properties?: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse); /** - * Creates a new LabelFrequencyCap instance using the specified properties. + * Creates a new BatchAllowAdReviewCenterAdsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LabelFrequencyCap instance + * @returns BatchAllowAdReviewCenterAdsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ILabelFrequencyCap): google.ads.admanager.v1.LabelFrequencyCap; + public static create(properties?: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse; /** - * Encodes the specified LabelFrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. - * @param message LabelFrequencyCap message or plain object to encode + * Encodes the specified BatchAllowAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse.verify|verify} messages. + * @param message BatchAllowAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ILabelFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelFrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. - * @param message LabelFrequencyCap message or plain object to encode + * Encodes the specified BatchAllowAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse.verify|verify} messages. + * @param message BatchAllowAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ILabelFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelFrequencyCap message from the specified reader or buffer. + * Decodes a BatchAllowAdReviewCenterAdsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelFrequencyCap + * @returns BatchAllowAdReviewCenterAdsResponse * @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.ads.admanager.v1.LabelFrequencyCap; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse; /** - * Decodes a LabelFrequencyCap message from the specified reader or buffer, length delimited. + * Decodes a BatchAllowAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelFrequencyCap + * @returns BatchAllowAdReviewCenterAdsResponse * @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.ads.admanager.v1.LabelFrequencyCap; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse; /** - * Verifies a LabelFrequencyCap message. + * Verifies a BatchAllowAdReviewCenterAdsResponse 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 LabelFrequencyCap message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAllowAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelFrequencyCap + * @returns BatchAllowAdReviewCenterAdsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.LabelFrequencyCap; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse; /** - * Creates a plain object from a LabelFrequencyCap message. Also converts values to other types if specified. - * @param message LabelFrequencyCap + * Creates a plain object from a BatchAllowAdReviewCenterAdsResponse message. Also converts values to other types if specified. + * @param message BatchAllowAdReviewCenterAdsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.LabelFrequencyCap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelFrequencyCap to JSON. + * Converts this BatchAllowAdReviewCenterAdsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LabelFrequencyCap + * Gets the default type url for BatchAllowAdReviewCenterAdsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AppliedLabel. */ - interface IAppliedLabel { + /** Properties of a BatchBlockAdReviewCenterAdsRequest. */ + interface IBatchBlockAdReviewCenterAdsRequest { - /** AppliedLabel label */ - label?: (string|null); + /** BatchBlockAdReviewCenterAdsRequest parent */ + parent?: (string|null); - /** AppliedLabel negated */ - negated?: (boolean|null); + /** BatchBlockAdReviewCenterAdsRequest names */ + names?: (string[]|null); } - /** Represents an AppliedLabel. */ - class AppliedLabel implements IAppliedLabel { + /** Represents a BatchBlockAdReviewCenterAdsRequest. */ + class BatchBlockAdReviewCenterAdsRequest implements IBatchBlockAdReviewCenterAdsRequest { /** - * Constructs a new AppliedLabel. + * Constructs a new BatchBlockAdReviewCenterAdsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAppliedLabel); + constructor(properties?: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest); - /** AppliedLabel label. */ - public label: string; + /** BatchBlockAdReviewCenterAdsRequest parent. */ + public parent: string; - /** AppliedLabel negated. */ - public negated: boolean; + /** BatchBlockAdReviewCenterAdsRequest names. */ + public names: string[]; /** - * Creates a new AppliedLabel instance using the specified properties. + * Creates a new BatchBlockAdReviewCenterAdsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AppliedLabel instance + * @returns BatchBlockAdReviewCenterAdsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IAppliedLabel): google.ads.admanager.v1.AppliedLabel; + public static create(properties?: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest; /** - * Encodes the specified AppliedLabel message. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. - * @param message AppliedLabel message or plain object to encode + * Encodes the specified BatchBlockAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.verify|verify} messages. + * @param message BatchBlockAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAppliedLabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AppliedLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. - * @param message AppliedLabel message or plain object to encode + * Encodes the specified BatchBlockAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.verify|verify} messages. + * @param message BatchBlockAdReviewCenterAdsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAppliedLabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AppliedLabel message from the specified reader or buffer. + * Decodes a BatchBlockAdReviewCenterAdsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AppliedLabel + * @returns BatchBlockAdReviewCenterAdsRequest * @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.ads.admanager.v1.AppliedLabel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest; /** - * Decodes an AppliedLabel message from the specified reader or buffer, length delimited. + * Decodes a BatchBlockAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AppliedLabel + * @returns BatchBlockAdReviewCenterAdsRequest * @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.ads.admanager.v1.AppliedLabel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest; /** - * Verifies an AppliedLabel message. + * Verifies a BatchBlockAdReviewCenterAdsRequest 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 AppliedLabel message from a plain object. Also converts values to their respective internal types. + * Creates a BatchBlockAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AppliedLabel + * @returns BatchBlockAdReviewCenterAdsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AppliedLabel; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest; /** - * Creates a plain object from an AppliedLabel message. Also converts values to other types if specified. - * @param message AppliedLabel + * Creates a plain object from a BatchBlockAdReviewCenterAdsRequest message. Also converts values to other types if specified. + * @param message BatchBlockAdReviewCenterAdsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AppliedLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AppliedLabel to JSON. + * Converts this BatchBlockAdReviewCenterAdsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AppliedLabel + * Gets the default type url for BatchBlockAdReviewCenterAdsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnvironmentTypeEnum. */ - interface IEnvironmentTypeEnum { + /** Properties of a BatchBlockAdReviewCenterAdsResponse. */ + interface IBatchBlockAdReviewCenterAdsResponse { } - /** Represents an EnvironmentTypeEnum. */ - class EnvironmentTypeEnum implements IEnvironmentTypeEnum { + /** Represents a BatchBlockAdReviewCenterAdsResponse. */ + class BatchBlockAdReviewCenterAdsResponse implements IBatchBlockAdReviewCenterAdsResponse { /** - * Constructs a new EnvironmentTypeEnum. + * Constructs a new BatchBlockAdReviewCenterAdsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IEnvironmentTypeEnum); + constructor(properties?: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse); /** - * Creates a new EnvironmentTypeEnum instance using the specified properties. + * Creates a new BatchBlockAdReviewCenterAdsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EnvironmentTypeEnum instance + * @returns BatchBlockAdReviewCenterAdsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IEnvironmentTypeEnum): google.ads.admanager.v1.EnvironmentTypeEnum; + public static create(properties?: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse; /** - * Encodes the specified EnvironmentTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. - * @param message EnvironmentTypeEnum message or plain object to encode + * Encodes the specified BatchBlockAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse.verify|verify} messages. + * @param message BatchBlockAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IEnvironmentTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnvironmentTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. - * @param message EnvironmentTypeEnum message or plain object to encode + * Encodes the specified BatchBlockAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse.verify|verify} messages. + * @param message BatchBlockAdReviewCenterAdsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IEnvironmentTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnvironmentTypeEnum message from the specified reader or buffer. + * Decodes a BatchBlockAdReviewCenterAdsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnvironmentTypeEnum + * @returns BatchBlockAdReviewCenterAdsResponse * @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.ads.admanager.v1.EnvironmentTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse; /** - * Decodes an EnvironmentTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchBlockAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnvironmentTypeEnum + * @returns BatchBlockAdReviewCenterAdsResponse * @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.ads.admanager.v1.EnvironmentTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse; /** - * Verifies an EnvironmentTypeEnum message. + * Verifies a BatchBlockAdReviewCenterAdsResponse 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 EnvironmentTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchBlockAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnvironmentTypeEnum + * @returns BatchBlockAdReviewCenterAdsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.EnvironmentTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse; /** - * Creates a plain object from an EnvironmentTypeEnum message. Also converts values to other types if specified. - * @param message EnvironmentTypeEnum + * Creates a plain object from a BatchBlockAdReviewCenterAdsResponse message. Also converts values to other types if specified. + * @param message BatchBlockAdReviewCenterAdsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.EnvironmentTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnvironmentTypeEnum to JSON. + * Converts this BatchBlockAdReviewCenterAdsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnvironmentTypeEnum + * Gets the default type url for BatchBlockAdReviewCenterAdsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EnvironmentTypeEnum { - - /** EnvironmentType enum. */ - enum EnvironmentType { - ENVIRONMENT_TYPE_UNSPECIFIED = 0, - BROWSER = 1, - VIDEO_PLAYER = 2 - } - } - - /** Properties of a FrequencyCap. */ - interface IFrequencyCap { - - /** FrequencyCap maxImpressions */ - maxImpressions?: (number|Long|string|null); - - /** FrequencyCap timeAmount */ - timeAmount?: (number|Long|string|null); + /** Properties of a BatchAdReviewCenterAdsOperationMetadata. */ + interface IBatchAdReviewCenterAdsOperationMetadata { - /** FrequencyCap timeUnit */ - timeUnit?: (google.ads.admanager.v1.TimeUnitEnum.TimeUnit|keyof typeof google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null); + /** BatchAdReviewCenterAdsOperationMetadata failedRequests */ + failedRequests?: ({ [k: string]: google.rpc.IStatus }|null); } - /** Represents a FrequencyCap. */ - class FrequencyCap implements IFrequencyCap { + /** Represents a BatchAdReviewCenterAdsOperationMetadata. */ + class BatchAdReviewCenterAdsOperationMetadata implements IBatchAdReviewCenterAdsOperationMetadata { /** - * Constructs a new FrequencyCap. + * Constructs a new BatchAdReviewCenterAdsOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IFrequencyCap); - - /** FrequencyCap maxImpressions. */ - public maxImpressions?: (number|Long|string|null); - - /** FrequencyCap timeAmount. */ - public timeAmount?: (number|Long|string|null); + constructor(properties?: google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata); - /** FrequencyCap timeUnit. */ - public timeUnit?: (google.ads.admanager.v1.TimeUnitEnum.TimeUnit|keyof typeof google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null); + /** BatchAdReviewCenterAdsOperationMetadata failedRequests. */ + public failedRequests: { [k: string]: google.rpc.IStatus }; /** - * Creates a new FrequencyCap instance using the specified properties. + * Creates a new BatchAdReviewCenterAdsOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FrequencyCap instance + * @returns BatchAdReviewCenterAdsOperationMetadata instance */ - public static create(properties?: google.ads.admanager.v1.IFrequencyCap): google.ads.admanager.v1.FrequencyCap; + public static create(properties?: google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata): google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata; /** - * Encodes the specified FrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. - * @param message FrequencyCap message or plain object to encode + * Encodes the specified BatchAdReviewCenterAdsOperationMetadata message. Does not implicitly {@link google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.verify|verify} messages. + * @param message BatchAdReviewCenterAdsOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. - * @param message FrequencyCap message or plain object to encode + * Encodes the specified BatchAdReviewCenterAdsOperationMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.verify|verify} messages. + * @param message BatchAdReviewCenterAdsOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FrequencyCap message from the specified reader or buffer. + * Decodes a BatchAdReviewCenterAdsOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FrequencyCap + * @returns BatchAdReviewCenterAdsOperationMetadata * @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.ads.admanager.v1.FrequencyCap; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata; /** - * Decodes a FrequencyCap message from the specified reader or buffer, length delimited. + * Decodes a BatchAdReviewCenterAdsOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FrequencyCap + * @returns BatchAdReviewCenterAdsOperationMetadata * @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.ads.admanager.v1.FrequencyCap; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata; /** - * Verifies a FrequencyCap message. + * Verifies a BatchAdReviewCenterAdsOperationMetadata 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 FrequencyCap message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAdReviewCenterAdsOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FrequencyCap + * @returns BatchAdReviewCenterAdsOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FrequencyCap; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata; /** - * Creates a plain object from a FrequencyCap message. Also converts values to other types if specified. - * @param message FrequencyCap + * Creates a plain object from a BatchAdReviewCenterAdsOperationMetadata message. Also converts values to other types if specified. + * @param message BatchAdReviewCenterAdsOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.FrequencyCap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FrequencyCap to JSON. + * Converts this BatchAdReviewCenterAdsOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FrequencyCap + * Gets the default type url for BatchAdReviewCenterAdsOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TimeUnitEnum. */ - interface ITimeUnitEnum { + /** Properties of an AdUnitStatusEnum. */ + interface IAdUnitStatusEnum { } - /** Represents a TimeUnitEnum. */ - class TimeUnitEnum implements ITimeUnitEnum { + /** Represents an AdUnitStatusEnum. */ + class AdUnitStatusEnum implements IAdUnitStatusEnum { /** - * Constructs a new TimeUnitEnum. + * Constructs a new AdUnitStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITimeUnitEnum); + constructor(properties?: google.ads.admanager.v1.IAdUnitStatusEnum); /** - * Creates a new TimeUnitEnum instance using the specified properties. + * Creates a new AdUnitStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns TimeUnitEnum instance + * @returns AdUnitStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.ITimeUnitEnum): google.ads.admanager.v1.TimeUnitEnum; + public static create(properties?: google.ads.admanager.v1.IAdUnitStatusEnum): google.ads.admanager.v1.AdUnitStatusEnum; /** - * Encodes the specified TimeUnitEnum message. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. - * @param message TimeUnitEnum message or plain object to encode + * Encodes the specified AdUnitStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. + * @param message AdUnitStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITimeUnitEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdUnitStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeUnitEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. - * @param message TimeUnitEnum message or plain object to encode + * Encodes the specified AdUnitStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. + * @param message AdUnitStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITimeUnitEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeUnitEnum message from the specified reader or buffer. + * Decodes an AdUnitStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeUnitEnum + * @returns AdUnitStatusEnum * @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.ads.admanager.v1.TimeUnitEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdUnitStatusEnum; /** - * Decodes a TimeUnitEnum message from the specified reader or buffer, length delimited. + * Decodes an AdUnitStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeUnitEnum + * @returns AdUnitStatusEnum * @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.ads.admanager.v1.TimeUnitEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdUnitStatusEnum; /** - * Verifies a TimeUnitEnum message. + * Verifies an AdUnitStatusEnum 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 TimeUnitEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeUnitEnum + * @returns AdUnitStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TimeUnitEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitStatusEnum; /** - * Creates a plain object from a TimeUnitEnum message. Also converts values to other types if specified. - * @param message TimeUnitEnum + * Creates a plain object from an AdUnitStatusEnum message. Also converts values to other types if specified. + * @param message AdUnitStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TimeUnitEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdUnitStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeUnitEnum to JSON. + * Converts this AdUnitStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TimeUnitEnum + * Gets the default type url for AdUnitStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TimeUnitEnum { + namespace AdUnitStatusEnum { - /** TimeUnit enum. */ - enum TimeUnit { - TIME_UNIT_UNSPECIFIED = 0, - MINUTE = 1, - HOUR = 2, - DAY = 3, - WEEK = 4, - MONTH = 5, - LIFETIME = 6, - POD = 7, - STREAM = 8 + /** AdUnitStatus enum. */ + enum AdUnitStatus { + AD_UNIT_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2, + ARCHIVED = 3 } } - /** Properties of a Size. */ - interface ISize { - - /** Size width */ - width?: (number|null); - - /** Size height */ - height?: (number|null); - - /** Size sizeType */ - sizeType?: (google.ads.admanager.v1.SizeTypeEnum.SizeType|keyof typeof google.ads.admanager.v1.SizeTypeEnum.SizeType|null); + /** Properties of a SmartSizeModeEnum. */ + interface ISmartSizeModeEnum { } - /** Represents a Size. */ - class Size implements ISize { + /** Represents a SmartSizeModeEnum. */ + class SmartSizeModeEnum implements ISmartSizeModeEnum { /** - * Constructs a new Size. + * Constructs a new SmartSizeModeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ISize); - - /** Size width. */ - public width: number; - - /** Size height. */ - public height: number; - - /** Size sizeType. */ - public sizeType: (google.ads.admanager.v1.SizeTypeEnum.SizeType|keyof typeof google.ads.admanager.v1.SizeTypeEnum.SizeType); + constructor(properties?: google.ads.admanager.v1.ISmartSizeModeEnum); /** - * Creates a new Size instance using the specified properties. + * Creates a new SmartSizeModeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns Size instance + * @returns SmartSizeModeEnum instance */ - public static create(properties?: google.ads.admanager.v1.ISize): google.ads.admanager.v1.Size; + public static create(properties?: google.ads.admanager.v1.ISmartSizeModeEnum): google.ads.admanager.v1.SmartSizeModeEnum; /** - * Encodes the specified Size message. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. - * @param message Size message or plain object to encode + * Encodes the specified SmartSizeModeEnum message. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. + * @param message SmartSizeModeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ISize, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ISmartSizeModeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Size message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. - * @param message Size message or plain object to encode + * Encodes the specified SmartSizeModeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. + * @param message SmartSizeModeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ISize, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ISmartSizeModeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Size message from the specified reader or buffer. + * Decodes a SmartSizeModeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Size + * @returns SmartSizeModeEnum * @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.ads.admanager.v1.Size; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.SmartSizeModeEnum; /** - * Decodes a Size message from the specified reader or buffer, length delimited. + * Decodes a SmartSizeModeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Size + * @returns SmartSizeModeEnum * @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.ads.admanager.v1.Size; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.SmartSizeModeEnum; /** - * Verifies a Size message. + * Verifies a SmartSizeModeEnum 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 Size message from a plain object. Also converts values to their respective internal types. + * Creates a SmartSizeModeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Size + * @returns SmartSizeModeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Size; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SmartSizeModeEnum; /** - * Creates a plain object from a Size message. Also converts values to other types if specified. - * @param message Size + * Creates a plain object from a SmartSizeModeEnum message. Also converts values to other types if specified. + * @param message SmartSizeModeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Size, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.SmartSizeModeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Size to JSON. + * Converts this SmartSizeModeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Size + * Gets the default type url for SmartSizeModeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SizeTypeEnum. */ - interface ISizeTypeEnum { + namespace SmartSizeModeEnum { + + /** SmartSizeMode enum. */ + enum SmartSizeMode { + SMART_SIZE_MODE_UNSPECIFIED = 0, + NONE = 1, + SMART_BANNER = 2, + DYNAMIC_SIZE = 3 + } } - /** Represents a SizeTypeEnum. */ - class SizeTypeEnum implements ISizeTypeEnum { + /** Properties of a TargetWindowEnum. */ + interface ITargetWindowEnum { + } + + /** Represents a TargetWindowEnum. */ + class TargetWindowEnum implements ITargetWindowEnum { /** - * Constructs a new SizeTypeEnum. + * Constructs a new TargetWindowEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ISizeTypeEnum); + constructor(properties?: google.ads.admanager.v1.ITargetWindowEnum); /** - * Creates a new SizeTypeEnum instance using the specified properties. + * Creates a new TargetWindowEnum instance using the specified properties. * @param [properties] Properties to set - * @returns SizeTypeEnum instance + * @returns TargetWindowEnum instance */ - public static create(properties?: google.ads.admanager.v1.ISizeTypeEnum): google.ads.admanager.v1.SizeTypeEnum; + public static create(properties?: google.ads.admanager.v1.ITargetWindowEnum): google.ads.admanager.v1.TargetWindowEnum; /** - * Encodes the specified SizeTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. - * @param message SizeTypeEnum message or plain object to encode + * Encodes the specified TargetWindowEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. + * @param message TargetWindowEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ISizeTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITargetWindowEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SizeTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. - * @param message SizeTypeEnum message or plain object to encode + * Encodes the specified TargetWindowEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. + * @param message TargetWindowEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ISizeTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITargetWindowEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SizeTypeEnum message from the specified reader or buffer. + * Decodes a TargetWindowEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SizeTypeEnum + * @returns TargetWindowEnum * @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.ads.admanager.v1.SizeTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TargetWindowEnum; /** - * Decodes a SizeTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a TargetWindowEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SizeTypeEnum + * @returns TargetWindowEnum * @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.ads.admanager.v1.SizeTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TargetWindowEnum; /** - * Verifies a SizeTypeEnum message. + * Verifies a TargetWindowEnum 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 SizeTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a TargetWindowEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SizeTypeEnum + * @returns TargetWindowEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SizeTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TargetWindowEnum; /** - * Creates a plain object from a SizeTypeEnum message. Also converts values to other types if specified. - * @param message SizeTypeEnum + * Creates a plain object from a TargetWindowEnum message. Also converts values to other types if specified. + * @param message TargetWindowEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.SizeTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TargetWindowEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SizeTypeEnum to JSON. + * Converts this TargetWindowEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SizeTypeEnum + * Gets the default type url for TargetWindowEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SizeTypeEnum { + namespace TargetWindowEnum { - /** SizeType enum. */ - enum SizeType { - SIZE_TYPE_UNSPECIFIED = 0, - PIXEL = 1, - ASPECT_RATIO = 2, - INTERSTITIAL = 3, - IGNORED = 4, - NATIVE = 5, - FLUID = 6, - AUDIO = 7 + /** TargetWindow enum. */ + enum TargetWindow { + TARGET_WINDOW_UNSPECIFIED = 0, + TOP = 1, + BLANK = 2 } } - /** Represents an AdUnitService */ - class AdUnitService extends $protobuf.rpc.Service { + /** Properties of an AdUnit. */ + interface IAdUnit { - /** - * Constructs a new AdUnitService 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); + /** AdUnit name */ + name?: (string|null); - /** - * Creates new AdUnitService 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): AdUnitService; + /** AdUnit adUnitId */ + adUnitId?: (number|Long|string|null); - /** - * Calls GetAdUnit. - * @param request GetAdUnitRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AdUnit - */ - public getAdUnit(request: google.ads.admanager.v1.IGetAdUnitRequest, callback: google.ads.admanager.v1.AdUnitService.GetAdUnitCallback): void; + /** AdUnit parentAdUnit */ + parentAdUnit?: (string|null); - /** - * Calls GetAdUnit. - * @param request GetAdUnitRequest message or plain object - * @returns Promise - */ - public getAdUnit(request: google.ads.admanager.v1.IGetAdUnitRequest): Promise; + /** AdUnit parentPath */ + parentPath?: (google.ads.admanager.v1.IAdUnitParent[]|null); - /** - * Calls ListAdUnits. - * @param request ListAdUnitsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAdUnitsResponse - */ - public listAdUnits(request: google.ads.admanager.v1.IListAdUnitsRequest, callback: google.ads.admanager.v1.AdUnitService.ListAdUnitsCallback): void; + /** AdUnit displayName */ + displayName?: (string|null); - /** - * Calls ListAdUnits. - * @param request ListAdUnitsRequest message or plain object - * @returns Promise - */ - public listAdUnits(request: google.ads.admanager.v1.IListAdUnitsRequest): Promise; + /** AdUnit adUnitCode */ + adUnitCode?: (string|null); - /** - * Calls ListAdUnitSizes. - * @param request ListAdUnitSizesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAdUnitSizesResponse - */ - public listAdUnitSizes(request: google.ads.admanager.v1.IListAdUnitSizesRequest, callback: google.ads.admanager.v1.AdUnitService.ListAdUnitSizesCallback): void; + /** AdUnit status */ + status?: (google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|keyof typeof google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null); - /** - * Calls ListAdUnitSizes. - * @param request ListAdUnitSizesRequest message or plain object - * @returns Promise - */ - public listAdUnitSizes(request: google.ads.admanager.v1.IListAdUnitSizesRequest): Promise; - } + /** AdUnit appliedTargetWindow */ + appliedTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); - namespace AdUnitService { + /** AdUnit effectiveTargetWindow */ + effectiveTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); - /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|getAdUnit}. - * @param error Error, if any - * @param [response] AdUnit - */ - type GetAdUnitCallback = (error: (Error|null), response?: google.ads.admanager.v1.AdUnit) => void; + /** AdUnit appliedTeams */ + appliedTeams?: (string[]|null); - /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnits}. - * @param error Error, if any - * @param [response] ListAdUnitsResponse - */ - type ListAdUnitsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListAdUnitsResponse) => void; + /** AdUnit teams */ + teams?: (string[]|null); - /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnitSizes}. - * @param error Error, if any - * @param [response] ListAdUnitSizesResponse - */ - type ListAdUnitSizesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListAdUnitSizesResponse) => void; - } + /** AdUnit description */ + description?: (string|null); - /** Properties of a GetAdUnitRequest. */ - interface IGetAdUnitRequest { + /** AdUnit explicitlyTargeted */ + explicitlyTargeted?: (boolean|null); - /** GetAdUnitRequest name */ - name?: (string|null); - } + /** AdUnit hasChildren */ + hasChildren?: (boolean|null); - /** Represents a GetAdUnitRequest. */ - class GetAdUnitRequest implements IGetAdUnitRequest { + /** AdUnit updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new GetAdUnitRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IGetAdUnitRequest); + /** AdUnit adUnitSizes */ + adUnitSizes?: (google.ads.admanager.v1.IAdUnitSize[]|null); - /** GetAdUnitRequest name. */ - public name: string; + /** AdUnit externalSetTopBoxChannelId */ + externalSetTopBoxChannelId?: (string|null); - /** - * Creates a new GetAdUnitRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAdUnitRequest instance - */ - public static create(properties?: google.ads.admanager.v1.IGetAdUnitRequest): google.ads.admanager.v1.GetAdUnitRequest; + /** AdUnit refreshDelay */ + refreshDelay?: (google.protobuf.IDuration|null); - /** - * Encodes the specified GetAdUnitRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. - * @param message GetAdUnitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.IGetAdUnitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** AdUnit appliedLabels */ + appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); - /** - * Encodes the specified GetAdUnitRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. - * @param message GetAdUnitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetAdUnitRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** AdUnit effectiveAppliedLabels */ + effectiveAppliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); - /** - * Decodes a GetAdUnitRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAdUnitRequest - * @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.ads.admanager.v1.GetAdUnitRequest; + /** AdUnit appliedLabelFrequencyCaps */ + appliedLabelFrequencyCaps?: (google.ads.admanager.v1.ILabelFrequencyCap[]|null); - /** - * Decodes a GetAdUnitRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAdUnitRequest - * @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.ads.admanager.v1.GetAdUnitRequest; + /** AdUnit effectiveLabelFrequencyCaps */ + effectiveLabelFrequencyCaps?: (google.ads.admanager.v1.ILabelFrequencyCap[]|null); - /** - * Verifies a GetAdUnitRequest 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); + /** AdUnit smartSizeMode */ + smartSizeMode?: (google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|keyof typeof google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null); + + /** AdUnit appliedAdsenseEnabled */ + appliedAdsenseEnabled?: (boolean|null); + + /** AdUnit effectiveAdsenseEnabled */ + effectiveAdsenseEnabled?: (boolean|null); + } + + /** Represents an AdUnit. */ + class AdUnit implements IAdUnit { /** - * Creates a GetAdUnitRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAdUnitRequest + * Constructs a new AdUnit. + * @param [properties] Properties to set */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetAdUnitRequest; + constructor(properties?: google.ads.admanager.v1.IAdUnit); - /** - * Creates a plain object from a GetAdUnitRequest message. Also converts values to other types if specified. - * @param message GetAdUnitRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.GetAdUnitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AdUnit name. */ + public name: string; - /** - * Converts this GetAdUnitRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AdUnit adUnitId. */ + public adUnitId: (number|Long|string); - /** - * Gets the default type url for GetAdUnitRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** AdUnit parentAdUnit. */ + public parentAdUnit?: (string|null); - /** Properties of a ListAdUnitsRequest. */ - interface IListAdUnitsRequest { + /** AdUnit parentPath. */ + public parentPath: google.ads.admanager.v1.IAdUnitParent[]; - /** ListAdUnitsRequest parent */ - parent?: (string|null); + /** AdUnit displayName. */ + public displayName?: (string|null); - /** ListAdUnitsRequest pageSize */ - pageSize?: (number|null); + /** AdUnit adUnitCode. */ + public adUnitCode?: (string|null); - /** ListAdUnitsRequest pageToken */ - pageToken?: (string|null); + /** AdUnit status. */ + public status?: (google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|keyof typeof google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null); - /** ListAdUnitsRequest filter */ - filter?: (string|null); + /** AdUnit appliedTargetWindow. */ + public appliedTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); - /** ListAdUnitsRequest orderBy */ - orderBy?: (string|null); + /** AdUnit effectiveTargetWindow. */ + public effectiveTargetWindow?: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null); - /** ListAdUnitsRequest skip */ - skip?: (number|null); - } + /** AdUnit appliedTeams. */ + public appliedTeams: string[]; - /** Represents a ListAdUnitsRequest. */ - class ListAdUnitsRequest implements IListAdUnitsRequest { + /** AdUnit teams. */ + public teams: string[]; - /** - * Constructs a new ListAdUnitsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IListAdUnitsRequest); + /** AdUnit description. */ + public description?: (string|null); - /** ListAdUnitsRequest parent. */ - public parent: string; + /** AdUnit explicitlyTargeted. */ + public explicitlyTargeted?: (boolean|null); - /** ListAdUnitsRequest pageSize. */ - public pageSize: number; + /** AdUnit hasChildren. */ + public hasChildren?: (boolean|null); - /** ListAdUnitsRequest pageToken. */ - public pageToken: string; + /** AdUnit updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** ListAdUnitsRequest filter. */ - public filter: string; + /** AdUnit adUnitSizes. */ + public adUnitSizes: google.ads.admanager.v1.IAdUnitSize[]; - /** ListAdUnitsRequest orderBy. */ - public orderBy: string; + /** AdUnit externalSetTopBoxChannelId. */ + public externalSetTopBoxChannelId?: (string|null); - /** ListAdUnitsRequest skip. */ - public skip: number; + /** AdUnit refreshDelay. */ + public refreshDelay?: (google.protobuf.IDuration|null); + + /** AdUnit appliedLabels. */ + public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + + /** AdUnit effectiveAppliedLabels. */ + public effectiveAppliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + + /** AdUnit appliedLabelFrequencyCaps. */ + public appliedLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[]; + + /** AdUnit effectiveLabelFrequencyCaps. */ + public effectiveLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[]; + + /** AdUnit smartSizeMode. */ + public smartSizeMode?: (google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|keyof typeof google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null); + + /** AdUnit appliedAdsenseEnabled. */ + public appliedAdsenseEnabled?: (boolean|null); + + /** AdUnit effectiveAdsenseEnabled. */ + public effectiveAdsenseEnabled?: (boolean|null); /** - * Creates a new ListAdUnitsRequest instance using the specified properties. + * Creates a new AdUnit instance using the specified properties. * @param [properties] Properties to set - * @returns ListAdUnitsRequest instance + * @returns AdUnit instance */ - public static create(properties?: google.ads.admanager.v1.IListAdUnitsRequest): google.ads.admanager.v1.ListAdUnitsRequest; + public static create(properties?: google.ads.admanager.v1.IAdUnit): google.ads.admanager.v1.AdUnit; /** - * Encodes the specified ListAdUnitsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. - * @param message ListAdUnitsRequest message or plain object to encode + * Encodes the specified AdUnit message. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. + * @param message AdUnit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListAdUnitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAdUnitsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. - * @param message ListAdUnitsRequest message or plain object to encode + * Encodes the specified AdUnit message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. + * @param message AdUnit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAdUnitsRequest message from the specified reader or buffer. + * Decodes an AdUnit message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAdUnitsRequest + * @returns AdUnit * @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.ads.admanager.v1.ListAdUnitsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdUnit; /** - * Decodes a ListAdUnitsRequest message from the specified reader or buffer, length delimited. + * Decodes an AdUnit message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAdUnitsRequest + * @returns AdUnit * @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.ads.admanager.v1.ListAdUnitsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdUnit; /** - * Verifies a ListAdUnitsRequest message. + * Verifies an AdUnit 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 ListAdUnitsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnit message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAdUnitsRequest + * @returns AdUnit */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnit; /** - * Creates a plain object from a ListAdUnitsRequest message. Also converts values to other types if specified. - * @param message ListAdUnitsRequest + * Creates a plain object from an AdUnit message. Also converts values to other types if specified. + * @param message AdUnit * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListAdUnitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdUnit, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAdUnitsRequest to JSON. + * Converts this AdUnit to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAdUnitsRequest + * Gets the default type url for AdUnit * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAdUnitsResponse. */ - interface IListAdUnitsResponse { + /** Properties of an AdUnitSize. */ + interface IAdUnitSize { - /** ListAdUnitsResponse adUnits */ - adUnits?: (google.ads.admanager.v1.IAdUnit[]|null); + /** AdUnitSize size */ + size?: (google.ads.admanager.v1.ISize|null); - /** ListAdUnitsResponse nextPageToken */ - nextPageToken?: (string|null); + /** AdUnitSize environmentType */ + environmentType?: (google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|keyof typeof google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null); - /** ListAdUnitsResponse totalSize */ - totalSize?: (number|null); + /** AdUnitSize companions */ + companions?: (google.ads.admanager.v1.ISize[]|null); } - /** Represents a ListAdUnitsResponse. */ - class ListAdUnitsResponse implements IListAdUnitsResponse { + /** Represents an AdUnitSize. */ + class AdUnitSize implements IAdUnitSize { /** - * Constructs a new ListAdUnitsResponse. + * Constructs a new AdUnitSize. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListAdUnitsResponse); + constructor(properties?: google.ads.admanager.v1.IAdUnitSize); - /** ListAdUnitsResponse adUnits. */ - public adUnits: google.ads.admanager.v1.IAdUnit[]; + /** AdUnitSize size. */ + public size?: (google.ads.admanager.v1.ISize|null); - /** ListAdUnitsResponse nextPageToken. */ - public nextPageToken: string; + /** AdUnitSize environmentType. */ + public environmentType?: (google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|keyof typeof google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null); - /** ListAdUnitsResponse totalSize. */ - public totalSize: number; + /** AdUnitSize companions. */ + public companions: google.ads.admanager.v1.ISize[]; /** - * Creates a new ListAdUnitsResponse instance using the specified properties. + * Creates a new AdUnitSize instance using the specified properties. * @param [properties] Properties to set - * @returns ListAdUnitsResponse instance + * @returns AdUnitSize instance */ - public static create(properties?: google.ads.admanager.v1.IListAdUnitsResponse): google.ads.admanager.v1.ListAdUnitsResponse; + public static create(properties?: google.ads.admanager.v1.IAdUnitSize): google.ads.admanager.v1.AdUnitSize; /** - * Encodes the specified ListAdUnitsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. - * @param message ListAdUnitsResponse message or plain object to encode + * Encodes the specified AdUnitSize message. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. + * @param message AdUnitSize message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListAdUnitsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdUnitSize, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAdUnitsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. - * @param message ListAdUnitsResponse message or plain object to encode + * Encodes the specified AdUnitSize message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. + * @param message AdUnitSize message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitSize, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAdUnitsResponse message from the specified reader or buffer. + * Decodes an AdUnitSize message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAdUnitsResponse + * @returns AdUnitSize * @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.ads.admanager.v1.ListAdUnitsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdUnitSize; /** - * Decodes a ListAdUnitsResponse message from the specified reader or buffer, length delimited. + * Decodes an AdUnitSize message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAdUnitsResponse + * @returns AdUnitSize * @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.ads.admanager.v1.ListAdUnitsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdUnitSize; /** - * Verifies a ListAdUnitsResponse message. + * Verifies an AdUnitSize 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 ListAdUnitsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitSize message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAdUnitsResponse + * @returns AdUnitSize */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitSize; /** - * Creates a plain object from a ListAdUnitsResponse message. Also converts values to other types if specified. - * @param message ListAdUnitsResponse + * Creates a plain object from an AdUnitSize message. Also converts values to other types if specified. + * @param message AdUnitSize * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListAdUnitsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdUnitSize, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAdUnitsResponse to JSON. + * Converts this AdUnitSize to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAdUnitsResponse + * Gets the default type url for AdUnitSize * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAdUnitSizesRequest. */ - interface IListAdUnitSizesRequest { - - /** ListAdUnitSizesRequest parent */ - parent?: (string|null); - - /** ListAdUnitSizesRequest pageSize */ - pageSize?: (number|null); - - /** ListAdUnitSizesRequest pageToken */ - pageToken?: (string|null); + /** Properties of an AdUnitParent. */ + interface IAdUnitParent { - /** ListAdUnitSizesRequest filter */ - filter?: (string|null); + /** AdUnitParent parentAdUnit */ + parentAdUnit?: (string|null); - /** ListAdUnitSizesRequest orderBy */ - orderBy?: (string|null); + /** AdUnitParent displayName */ + displayName?: (string|null); - /** ListAdUnitSizesRequest skip */ - skip?: (number|null); + /** AdUnitParent adUnitCode */ + adUnitCode?: (string|null); } - /** Represents a ListAdUnitSizesRequest. */ - class ListAdUnitSizesRequest implements IListAdUnitSizesRequest { + /** Represents an AdUnitParent. */ + class AdUnitParent implements IAdUnitParent { /** - * Constructs a new ListAdUnitSizesRequest. + * Constructs a new AdUnitParent. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListAdUnitSizesRequest); - - /** ListAdUnitSizesRequest parent. */ - public parent: string; - - /** ListAdUnitSizesRequest pageSize. */ - public pageSize: number; - - /** ListAdUnitSizesRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.ads.admanager.v1.IAdUnitParent); - /** ListAdUnitSizesRequest filter. */ - public filter: string; + /** AdUnitParent parentAdUnit. */ + public parentAdUnit?: (string|null); - /** ListAdUnitSizesRequest orderBy. */ - public orderBy: string; + /** AdUnitParent displayName. */ + public displayName?: (string|null); - /** ListAdUnitSizesRequest skip. */ - public skip: number; + /** AdUnitParent adUnitCode. */ + public adUnitCode?: (string|null); /** - * Creates a new ListAdUnitSizesRequest instance using the specified properties. + * Creates a new AdUnitParent instance using the specified properties. * @param [properties] Properties to set - * @returns ListAdUnitSizesRequest instance + * @returns AdUnitParent instance */ - public static create(properties?: google.ads.admanager.v1.IListAdUnitSizesRequest): google.ads.admanager.v1.ListAdUnitSizesRequest; + public static create(properties?: google.ads.admanager.v1.IAdUnitParent): google.ads.admanager.v1.AdUnitParent; /** - * Encodes the specified ListAdUnitSizesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. - * @param message ListAdUnitSizesRequest message or plain object to encode + * Encodes the specified AdUnitParent message. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. + * @param message AdUnitParent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListAdUnitSizesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdUnitParent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAdUnitSizesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. - * @param message ListAdUnitSizesRequest message or plain object to encode + * Encodes the specified AdUnitParent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. + * @param message AdUnitParent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitSizesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitParent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer. + * Decodes an AdUnitParent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAdUnitSizesRequest + * @returns AdUnitParent * @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.ads.admanager.v1.ListAdUnitSizesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdUnitParent; /** - * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer, length delimited. + * Decodes an AdUnitParent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAdUnitSizesRequest + * @returns AdUnitParent * @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.ads.admanager.v1.ListAdUnitSizesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdUnitParent; /** - * Verifies a ListAdUnitSizesRequest message. + * Verifies an AdUnitParent 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 ListAdUnitSizesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitParent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAdUnitSizesRequest + * @returns AdUnitParent */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitSizesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitParent; /** - * Creates a plain object from a ListAdUnitSizesRequest message. Also converts values to other types if specified. - * @param message ListAdUnitSizesRequest + * Creates a plain object from an AdUnitParent message. Also converts values to other types if specified. + * @param message AdUnitParent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListAdUnitSizesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdUnitParent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAdUnitSizesRequest to JSON. + * Converts this AdUnitParent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAdUnitSizesRequest + * Gets the default type url for AdUnitParent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAdUnitSizesResponse. */ - interface IListAdUnitSizesResponse { - - /** ListAdUnitSizesResponse adUnitSizes */ - adUnitSizes?: (google.ads.admanager.v1.IAdUnitSize[]|null); + /** Properties of a LabelFrequencyCap. */ + interface ILabelFrequencyCap { - /** ListAdUnitSizesResponse nextPageToken */ - nextPageToken?: (string|null); + /** LabelFrequencyCap label */ + label?: (string|null); - /** ListAdUnitSizesResponse totalSize */ - totalSize?: (number|null); + /** LabelFrequencyCap frequencyCap */ + frequencyCap?: (google.ads.admanager.v1.IFrequencyCap|null); } - /** Represents a ListAdUnitSizesResponse. */ - class ListAdUnitSizesResponse implements IListAdUnitSizesResponse { + /** Represents a LabelFrequencyCap. */ + class LabelFrequencyCap implements ILabelFrequencyCap { /** - * Constructs a new ListAdUnitSizesResponse. + * Constructs a new LabelFrequencyCap. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListAdUnitSizesResponse); - - /** ListAdUnitSizesResponse adUnitSizes. */ - public adUnitSizes: google.ads.admanager.v1.IAdUnitSize[]; + constructor(properties?: google.ads.admanager.v1.ILabelFrequencyCap); - /** ListAdUnitSizesResponse nextPageToken. */ - public nextPageToken: string; + /** LabelFrequencyCap label. */ + public label?: (string|null); - /** ListAdUnitSizesResponse totalSize. */ - public totalSize: number; + /** LabelFrequencyCap frequencyCap. */ + public frequencyCap?: (google.ads.admanager.v1.IFrequencyCap|null); /** - * Creates a new ListAdUnitSizesResponse instance using the specified properties. + * Creates a new LabelFrequencyCap instance using the specified properties. * @param [properties] Properties to set - * @returns ListAdUnitSizesResponse instance + * @returns LabelFrequencyCap instance */ - public static create(properties?: google.ads.admanager.v1.IListAdUnitSizesResponse): google.ads.admanager.v1.ListAdUnitSizesResponse; + public static create(properties?: google.ads.admanager.v1.ILabelFrequencyCap): google.ads.admanager.v1.LabelFrequencyCap; /** - * Encodes the specified ListAdUnitSizesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. - * @param message ListAdUnitSizesResponse message or plain object to encode + * Encodes the specified LabelFrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. + * @param message LabelFrequencyCap message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListAdUnitSizesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ILabelFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAdUnitSizesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. - * @param message ListAdUnitSizesResponse message or plain object to encode + * Encodes the specified LabelFrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. + * @param message LabelFrequencyCap message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitSizesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ILabelFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer. + * Decodes a LabelFrequencyCap message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAdUnitSizesResponse + * @returns LabelFrequencyCap * @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.ads.admanager.v1.ListAdUnitSizesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.LabelFrequencyCap; /** - * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer, length delimited. + * Decodes a LabelFrequencyCap message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAdUnitSizesResponse + * @returns LabelFrequencyCap * @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.ads.admanager.v1.ListAdUnitSizesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.LabelFrequencyCap; /** - * Verifies a ListAdUnitSizesResponse message. + * Verifies a LabelFrequencyCap 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 ListAdUnitSizesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LabelFrequencyCap message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAdUnitSizesResponse + * @returns LabelFrequencyCap */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitSizesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.LabelFrequencyCap; /** - * Creates a plain object from a ListAdUnitSizesResponse message. Also converts values to other types if specified. - * @param message ListAdUnitSizesResponse + * Creates a plain object from a LabelFrequencyCap message. Also converts values to other types if specified. + * @param message LabelFrequencyCap * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListAdUnitSizesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.LabelFrequencyCap, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAdUnitSizesResponse to JSON. + * Converts this LabelFrequencyCap to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAdUnitSizesResponse + * Gets the default type url for LabelFrequencyCap * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdManagerError. */ - interface IAdManagerError { - - /** AdManagerError errorCode */ - errorCode?: (string|null); - - /** AdManagerError message */ - message?: (string|null); - - /** AdManagerError fieldPath */ - fieldPath?: (string|null); - - /** AdManagerError trigger */ - trigger?: (string|null); + /** Properties of an AppliedLabel. */ + interface IAppliedLabel { - /** AdManagerError stackTrace */ - stackTrace?: (string|null); + /** AppliedLabel label */ + label?: (string|null); - /** AdManagerError details */ - details?: (google.protobuf.IAny[]|null); + /** AppliedLabel negated */ + negated?: (boolean|null); } - /** Represents an AdManagerError. */ - class AdManagerError implements IAdManagerError { + /** Represents an AppliedLabel. */ + class AppliedLabel implements IAppliedLabel { /** - * Constructs a new AdManagerError. + * Constructs a new AppliedLabel. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdManagerError); - - /** AdManagerError errorCode. */ - public errorCode: string; - - /** AdManagerError message. */ - public message: string; - - /** AdManagerError fieldPath. */ - public fieldPath: string; - - /** AdManagerError trigger. */ - public trigger: string; + constructor(properties?: google.ads.admanager.v1.IAppliedLabel); - /** AdManagerError stackTrace. */ - public stackTrace: string; + /** AppliedLabel label. */ + public label: string; - /** AdManagerError details. */ - public details: google.protobuf.IAny[]; + /** AppliedLabel negated. */ + public negated: boolean; /** - * Creates a new AdManagerError instance using the specified properties. + * Creates a new AppliedLabel instance using the specified properties. * @param [properties] Properties to set - * @returns AdManagerError instance + * @returns AppliedLabel instance */ - public static create(properties?: google.ads.admanager.v1.IAdManagerError): google.ads.admanager.v1.AdManagerError; + public static create(properties?: google.ads.admanager.v1.IAppliedLabel): google.ads.admanager.v1.AppliedLabel; /** - * Encodes the specified AdManagerError message. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. - * @param message AdManagerError message or plain object to encode + * Encodes the specified AppliedLabel message. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. + * @param message AppliedLabel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdManagerError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAppliedLabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdManagerError message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. - * @param message AdManagerError message or plain object to encode + * Encodes the specified AppliedLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. + * @param message AppliedLabel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdManagerError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAppliedLabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdManagerError message from the specified reader or buffer. + * Decodes an AppliedLabel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdManagerError + * @returns AppliedLabel * @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.ads.admanager.v1.AdManagerError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AppliedLabel; /** - * Decodes an AdManagerError message from the specified reader or buffer, length delimited. + * Decodes an AppliedLabel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdManagerError + * @returns AppliedLabel * @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.ads.admanager.v1.AdManagerError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AppliedLabel; /** - * Verifies an AdManagerError message. + * Verifies an AppliedLabel 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 AdManagerError message from a plain object. Also converts values to their respective internal types. + * Creates an AppliedLabel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdManagerError + * @returns AppliedLabel */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdManagerError; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AppliedLabel; /** - * Creates a plain object from an AdManagerError message. Also converts values to other types if specified. - * @param message AdManagerError + * Creates a plain object from an AppliedLabel message. Also converts values to other types if specified. + * @param message AppliedLabel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdManagerError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AppliedLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdManagerError to JSON. + * Converts this AppliedLabel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdManagerError + * Gets the default type url for AppliedLabel * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BandwidthGroup. */ - interface IBandwidthGroup { - - /** BandwidthGroup name */ - name?: (string|null); - - /** BandwidthGroup displayName */ - displayName?: (string|null); + /** Properties of an EnvironmentTypeEnum. */ + interface IEnvironmentTypeEnum { } - /** Represents a BandwidthGroup. */ - class BandwidthGroup implements IBandwidthGroup { + /** Represents an EnvironmentTypeEnum. */ + class EnvironmentTypeEnum implements IEnvironmentTypeEnum { /** - * Constructs a new BandwidthGroup. + * Constructs a new EnvironmentTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBandwidthGroup); - - /** BandwidthGroup name. */ - public name?: (string|null); - - /** BandwidthGroup displayName. */ - public displayName?: (string|null); + constructor(properties?: google.ads.admanager.v1.IEnvironmentTypeEnum); /** - * Creates a new BandwidthGroup instance using the specified properties. + * Creates a new EnvironmentTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns BandwidthGroup instance + * @returns EnvironmentTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IBandwidthGroup): google.ads.admanager.v1.BandwidthGroup; + public static create(properties?: google.ads.admanager.v1.IEnvironmentTypeEnum): google.ads.admanager.v1.EnvironmentTypeEnum; /** - * Encodes the specified BandwidthGroup message. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. - * @param message BandwidthGroup message or plain object to encode + * Encodes the specified EnvironmentTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. + * @param message EnvironmentTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBandwidthGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IEnvironmentTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BandwidthGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. - * @param message BandwidthGroup message or plain object to encode + * Encodes the specified EnvironmentTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. + * @param message EnvironmentTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBandwidthGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IEnvironmentTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BandwidthGroup message from the specified reader or buffer. + * Decodes an EnvironmentTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BandwidthGroup + * @returns EnvironmentTypeEnum * @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.ads.admanager.v1.BandwidthGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.EnvironmentTypeEnum; /** - * Decodes a BandwidthGroup message from the specified reader or buffer, length delimited. + * Decodes an EnvironmentTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BandwidthGroup + * @returns EnvironmentTypeEnum * @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.ads.admanager.v1.BandwidthGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.EnvironmentTypeEnum; /** - * Verifies a BandwidthGroup message. + * Verifies an EnvironmentTypeEnum 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 BandwidthGroup message from a plain object. Also converts values to their respective internal types. + * Creates an EnvironmentTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BandwidthGroup + * @returns EnvironmentTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BandwidthGroup; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.EnvironmentTypeEnum; /** - * Creates a plain object from a BandwidthGroup message. Also converts values to other types if specified. - * @param message BandwidthGroup + * Creates a plain object from an EnvironmentTypeEnum message. Also converts values to other types if specified. + * @param message EnvironmentTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BandwidthGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.EnvironmentTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BandwidthGroup to JSON. + * Converts this EnvironmentTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BandwidthGroup + * Gets the default type url for EnvironmentTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a BandwidthGroupService */ - class BandwidthGroupService extends $protobuf.rpc.Service { - - /** - * Constructs a new BandwidthGroupService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new BandwidthGroupService 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): BandwidthGroupService; - - /** - * Calls GetBandwidthGroup. - * @param request GetBandwidthGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BandwidthGroup - */ - public getBandwidthGroup(request: google.ads.admanager.v1.IGetBandwidthGroupRequest, callback: google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroupCallback): void; - - /** - * Calls GetBandwidthGroup. - * @param request GetBandwidthGroupRequest message or plain object - * @returns Promise - */ - public getBandwidthGroup(request: google.ads.admanager.v1.IGetBandwidthGroupRequest): Promise; - - /** - * Calls ListBandwidthGroups. - * @param request ListBandwidthGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBandwidthGroupsResponse - */ - public listBandwidthGroups(request: google.ads.admanager.v1.IListBandwidthGroupsRequest, callback: google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroupsCallback): void; + namespace EnvironmentTypeEnum { - /** - * Calls ListBandwidthGroups. - * @param request ListBandwidthGroupsRequest message or plain object - * @returns Promise - */ - public listBandwidthGroups(request: google.ads.admanager.v1.IListBandwidthGroupsRequest): Promise; + /** EnvironmentType enum. */ + enum EnvironmentType { + ENVIRONMENT_TYPE_UNSPECIFIED = 0, + BROWSER = 1, + VIDEO_PLAYER = 2 + } } - namespace BandwidthGroupService { - - /** - * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|getBandwidthGroup}. - * @param error Error, if any - * @param [response] BandwidthGroup - */ - type GetBandwidthGroupCallback = (error: (Error|null), response?: google.ads.admanager.v1.BandwidthGroup) => void; + /** Properties of a FrequencyCap. */ + interface IFrequencyCap { - /** - * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|listBandwidthGroups}. - * @param error Error, if any - * @param [response] ListBandwidthGroupsResponse - */ - type ListBandwidthGroupsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListBandwidthGroupsResponse) => void; - } + /** FrequencyCap maxImpressions */ + maxImpressions?: (number|Long|string|null); - /** Properties of a GetBandwidthGroupRequest. */ - interface IGetBandwidthGroupRequest { + /** FrequencyCap timeAmount */ + timeAmount?: (number|Long|string|null); - /** GetBandwidthGroupRequest name */ - name?: (string|null); + /** FrequencyCap timeUnit */ + timeUnit?: (google.ads.admanager.v1.TimeUnitEnum.TimeUnit|keyof typeof google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null); } - /** Represents a GetBandwidthGroupRequest. */ - class GetBandwidthGroupRequest implements IGetBandwidthGroupRequest { + /** Represents a FrequencyCap. */ + class FrequencyCap implements IFrequencyCap { /** - * Constructs a new GetBandwidthGroupRequest. + * Constructs a new FrequencyCap. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetBandwidthGroupRequest); + constructor(properties?: google.ads.admanager.v1.IFrequencyCap); - /** GetBandwidthGroupRequest name. */ - public name: string; + /** FrequencyCap maxImpressions. */ + public maxImpressions?: (number|Long|string|null); + + /** FrequencyCap timeAmount. */ + public timeAmount?: (number|Long|string|null); + + /** FrequencyCap timeUnit. */ + public timeUnit?: (google.ads.admanager.v1.TimeUnitEnum.TimeUnit|keyof typeof google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null); /** - * Creates a new GetBandwidthGroupRequest instance using the specified properties. + * Creates a new FrequencyCap instance using the specified properties. * @param [properties] Properties to set - * @returns GetBandwidthGroupRequest instance + * @returns FrequencyCap instance */ - public static create(properties?: google.ads.admanager.v1.IGetBandwidthGroupRequest): google.ads.admanager.v1.GetBandwidthGroupRequest; + public static create(properties?: google.ads.admanager.v1.IFrequencyCap): google.ads.admanager.v1.FrequencyCap; /** - * Encodes the specified GetBandwidthGroupRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. - * @param message GetBandwidthGroupRequest message or plain object to encode + * Encodes the specified FrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. + * @param message FrequencyCap message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetBandwidthGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBandwidthGroupRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. - * @param message GetBandwidthGroupRequest message or plain object to encode + * Encodes the specified FrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. + * @param message FrequencyCap message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetBandwidthGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IFrequencyCap, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer. + * Decodes a FrequencyCap message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBandwidthGroupRequest + * @returns FrequencyCap * @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.ads.admanager.v1.GetBandwidthGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.FrequencyCap; /** - * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FrequencyCap message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBandwidthGroupRequest + * @returns FrequencyCap * @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.ads.admanager.v1.GetBandwidthGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.FrequencyCap; /** - * Verifies a GetBandwidthGroupRequest message. + * Verifies a FrequencyCap 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 GetBandwidthGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FrequencyCap message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBandwidthGroupRequest + * @returns FrequencyCap */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetBandwidthGroupRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FrequencyCap; /** - * Creates a plain object from a GetBandwidthGroupRequest message. Also converts values to other types if specified. - * @param message GetBandwidthGroupRequest + * Creates a plain object from a FrequencyCap message. Also converts values to other types if specified. + * @param message FrequencyCap * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetBandwidthGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.FrequencyCap, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBandwidthGroupRequest to JSON. + * Converts this FrequencyCap to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBandwidthGroupRequest + * Gets the default type url for FrequencyCap * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBandwidthGroupsRequest. */ - interface IListBandwidthGroupsRequest { - - /** ListBandwidthGroupsRequest parent */ - parent?: (string|null); - - /** ListBandwidthGroupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBandwidthGroupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBandwidthGroupsRequest filter */ - filter?: (string|null); - - /** ListBandwidthGroupsRequest orderBy */ - orderBy?: (string|null); - - /** ListBandwidthGroupsRequest skip */ - skip?: (number|null); + /** Properties of a TimeUnitEnum. */ + interface ITimeUnitEnum { } - /** Represents a ListBandwidthGroupsRequest. */ - class ListBandwidthGroupsRequest implements IListBandwidthGroupsRequest { + /** Represents a TimeUnitEnum. */ + class TimeUnitEnum implements ITimeUnitEnum { /** - * Constructs a new ListBandwidthGroupsRequest. + * Constructs a new TimeUnitEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListBandwidthGroupsRequest); - - /** ListBandwidthGroupsRequest parent. */ - public parent: string; - - /** ListBandwidthGroupsRequest pageSize. */ - public pageSize: number; - - /** ListBandwidthGroupsRequest pageToken. */ - public pageToken: string; - - /** ListBandwidthGroupsRequest filter. */ - public filter: string; - - /** ListBandwidthGroupsRequest orderBy. */ - public orderBy: string; - - /** ListBandwidthGroupsRequest skip. */ - public skip: number; + constructor(properties?: google.ads.admanager.v1.ITimeUnitEnum); /** - * Creates a new ListBandwidthGroupsRequest instance using the specified properties. + * Creates a new TimeUnitEnum instance using the specified properties. * @param [properties] Properties to set - * @returns ListBandwidthGroupsRequest instance + * @returns TimeUnitEnum instance */ - public static create(properties?: google.ads.admanager.v1.IListBandwidthGroupsRequest): google.ads.admanager.v1.ListBandwidthGroupsRequest; + public static create(properties?: google.ads.admanager.v1.ITimeUnitEnum): google.ads.admanager.v1.TimeUnitEnum; /** - * Encodes the specified ListBandwidthGroupsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. - * @param message ListBandwidthGroupsRequest message or plain object to encode + * Encodes the specified TimeUnitEnum message. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. + * @param message TimeUnitEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListBandwidthGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITimeUnitEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBandwidthGroupsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. - * @param message ListBandwidthGroupsRequest message or plain object to encode + * Encodes the specified TimeUnitEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. + * @param message TimeUnitEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListBandwidthGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITimeUnitEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer. + * Decodes a TimeUnitEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBandwidthGroupsRequest + * @returns TimeUnitEnum * @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.ads.admanager.v1.ListBandwidthGroupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TimeUnitEnum; /** - * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeUnitEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBandwidthGroupsRequest + * @returns TimeUnitEnum * @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.ads.admanager.v1.ListBandwidthGroupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TimeUnitEnum; /** - * Verifies a ListBandwidthGroupsRequest message. + * Verifies a TimeUnitEnum 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 ListBandwidthGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeUnitEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBandwidthGroupsRequest + * @returns TimeUnitEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBandwidthGroupsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TimeUnitEnum; /** - * Creates a plain object from a ListBandwidthGroupsRequest message. Also converts values to other types if specified. - * @param message ListBandwidthGroupsRequest + * Creates a plain object from a TimeUnitEnum message. Also converts values to other types if specified. + * @param message TimeUnitEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListBandwidthGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TimeUnitEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBandwidthGroupsRequest to JSON. + * Converts this TimeUnitEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBandwidthGroupsRequest + * Gets the default type url for TimeUnitEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBandwidthGroupsResponse. */ - interface IListBandwidthGroupsResponse { + namespace TimeUnitEnum { - /** ListBandwidthGroupsResponse bandwidthGroups */ - bandwidthGroups?: (google.ads.admanager.v1.IBandwidthGroup[]|null); + /** TimeUnit enum. */ + enum TimeUnit { + TIME_UNIT_UNSPECIFIED = 0, + MINUTE = 1, + HOUR = 2, + DAY = 3, + WEEK = 4, + MONTH = 5, + LIFETIME = 6, + POD = 7, + STREAM = 8 + } + } - /** ListBandwidthGroupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a Size. */ + interface ISize { - /** ListBandwidthGroupsResponse totalSize */ - totalSize?: (number|null); + /** Size width */ + width?: (number|null); + + /** Size height */ + height?: (number|null); + + /** Size sizeType */ + sizeType?: (google.ads.admanager.v1.SizeTypeEnum.SizeType|keyof typeof google.ads.admanager.v1.SizeTypeEnum.SizeType|null); } - /** Represents a ListBandwidthGroupsResponse. */ - class ListBandwidthGroupsResponse implements IListBandwidthGroupsResponse { + /** Represents a Size. */ + class Size implements ISize { /** - * Constructs a new ListBandwidthGroupsResponse. + * Constructs a new Size. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListBandwidthGroupsResponse); + constructor(properties?: google.ads.admanager.v1.ISize); - /** ListBandwidthGroupsResponse bandwidthGroups. */ - public bandwidthGroups: google.ads.admanager.v1.IBandwidthGroup[]; + /** Size width. */ + public width: number; - /** ListBandwidthGroupsResponse nextPageToken. */ - public nextPageToken: string; + /** Size height. */ + public height: number; - /** ListBandwidthGroupsResponse totalSize. */ - public totalSize: number; + /** Size sizeType. */ + public sizeType: (google.ads.admanager.v1.SizeTypeEnum.SizeType|keyof typeof google.ads.admanager.v1.SizeTypeEnum.SizeType); /** - * Creates a new ListBandwidthGroupsResponse instance using the specified properties. + * Creates a new Size instance using the specified properties. * @param [properties] Properties to set - * @returns ListBandwidthGroupsResponse instance + * @returns Size instance */ - public static create(properties?: google.ads.admanager.v1.IListBandwidthGroupsResponse): google.ads.admanager.v1.ListBandwidthGroupsResponse; + public static create(properties?: google.ads.admanager.v1.ISize): google.ads.admanager.v1.Size; /** - * Encodes the specified ListBandwidthGroupsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. - * @param message ListBandwidthGroupsResponse message or plain object to encode + * Encodes the specified Size message. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. + * @param message Size message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListBandwidthGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ISize, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBandwidthGroupsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. - * @param message ListBandwidthGroupsResponse message or plain object to encode + * Encodes the specified Size message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. + * @param message Size message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListBandwidthGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ISize, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer. + * Decodes a Size message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBandwidthGroupsResponse + * @returns Size * @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.ads.admanager.v1.ListBandwidthGroupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Size; /** - * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a Size message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBandwidthGroupsResponse + * @returns Size * @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.ads.admanager.v1.ListBandwidthGroupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Size; /** - * Verifies a ListBandwidthGroupsResponse message. + * Verifies a Size 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 ListBandwidthGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Size message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBandwidthGroupsResponse + * @returns Size */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBandwidthGroupsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Size; /** - * Creates a plain object from a ListBandwidthGroupsResponse message. Also converts values to other types if specified. - * @param message ListBandwidthGroupsResponse + * Creates a plain object from a Size message. Also converts values to other types if specified. + * @param message Size * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListBandwidthGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Size, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBandwidthGroupsResponse to JSON. + * Converts this Size to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBandwidthGroupsResponse + * Gets the default type url for Size * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CompanyTypeEnum. */ - interface ICompanyTypeEnum { + /** Properties of a SizeTypeEnum. */ + interface ISizeTypeEnum { } - /** Represents a CompanyTypeEnum. */ - class CompanyTypeEnum implements ICompanyTypeEnum { + /** Represents a SizeTypeEnum. */ + class SizeTypeEnum implements ISizeTypeEnum { /** - * Constructs a new CompanyTypeEnum. + * Constructs a new SizeTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICompanyTypeEnum); + constructor(properties?: google.ads.admanager.v1.ISizeTypeEnum); /** - * Creates a new CompanyTypeEnum instance using the specified properties. + * Creates a new SizeTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns CompanyTypeEnum instance + * @returns SizeTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.ICompanyTypeEnum): google.ads.admanager.v1.CompanyTypeEnum; + public static create(properties?: google.ads.admanager.v1.ISizeTypeEnum): google.ads.admanager.v1.SizeTypeEnum; /** - * Encodes the specified CompanyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. - * @param message CompanyTypeEnum message or plain object to encode + * Encodes the specified SizeTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. + * @param message SizeTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICompanyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ISizeTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompanyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. - * @param message CompanyTypeEnum message or plain object to encode + * Encodes the specified SizeTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. + * @param message SizeTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICompanyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ISizeTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompanyTypeEnum message from the specified reader or buffer. + * Decodes a SizeTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompanyTypeEnum + * @returns SizeTypeEnum * @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.ads.admanager.v1.CompanyTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.SizeTypeEnum; /** - * Decodes a CompanyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a SizeTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompanyTypeEnum + * @returns SizeTypeEnum * @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.ads.admanager.v1.CompanyTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.SizeTypeEnum; /** - * Verifies a CompanyTypeEnum message. + * Verifies a SizeTypeEnum 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 CompanyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a SizeTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompanyTypeEnum + * @returns SizeTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CompanyTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SizeTypeEnum; /** - * Creates a plain object from a CompanyTypeEnum message. Also converts values to other types if specified. - * @param message CompanyTypeEnum + * Creates a plain object from a SizeTypeEnum message. Also converts values to other types if specified. + * @param message SizeTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CompanyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.SizeTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompanyTypeEnum to JSON. + * Converts this SizeTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompanyTypeEnum + * Gets the default type url for SizeTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CompanyTypeEnum { + namespace SizeTypeEnum { - /** CompanyType enum. */ - enum CompanyType { - COMPANY_TYPE_UNSPECIFIED = 0, - ADVERTISER = 1, - HOUSE_ADVERTISER = 2, - AGENCY = 3, - HOUSE_AGENCY = 4, - AD_NETWORK = 5 + /** SizeType enum. */ + enum SizeType { + SIZE_TYPE_UNSPECIFIED = 0, + PIXEL = 1, + ASPECT_RATIO = 2, + INTERSTITIAL = 3, + IGNORED = 4, + NATIVE = 5, + FLUID = 6, + AUDIO = 7 } } - /** Properties of a CompanyCreditStatusEnum. */ - interface ICompanyCreditStatusEnum { - } + /** Represents an AdUnitService */ + class AdUnitService extends $protobuf.rpc.Service { - /** Represents a CompanyCreditStatusEnum. */ - class CompanyCreditStatusEnum implements ICompanyCreditStatusEnum { + /** + * Constructs a new AdUnitService 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); /** - * Constructs a new CompanyCreditStatusEnum. + * Creates new AdUnitService 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): AdUnitService; + + /** + * Calls GetAdUnit. + * @param request GetAdUnitRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AdUnit + */ + public getAdUnit(request: google.ads.admanager.v1.IGetAdUnitRequest, callback: google.ads.admanager.v1.AdUnitService.GetAdUnitCallback): void; + + /** + * Calls GetAdUnit. + * @param request GetAdUnitRequest message or plain object + * @returns Promise + */ + public getAdUnit(request: google.ads.admanager.v1.IGetAdUnitRequest): Promise; + + /** + * Calls ListAdUnits. + * @param request ListAdUnitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAdUnitsResponse + */ + public listAdUnits(request: google.ads.admanager.v1.IListAdUnitsRequest, callback: google.ads.admanager.v1.AdUnitService.ListAdUnitsCallback): void; + + /** + * Calls ListAdUnits. + * @param request ListAdUnitsRequest message or plain object + * @returns Promise + */ + public listAdUnits(request: google.ads.admanager.v1.IListAdUnitsRequest): Promise; + + /** + * Calls ListAdUnitSizes. + * @param request ListAdUnitSizesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAdUnitSizesResponse + */ + public listAdUnitSizes(request: google.ads.admanager.v1.IListAdUnitSizesRequest, callback: google.ads.admanager.v1.AdUnitService.ListAdUnitSizesCallback): void; + + /** + * Calls ListAdUnitSizes. + * @param request ListAdUnitSizesRequest message or plain object + * @returns Promise + */ + public listAdUnitSizes(request: google.ads.admanager.v1.IListAdUnitSizesRequest): Promise; + } + + namespace AdUnitService { + + /** + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|getAdUnit}. + * @param error Error, if any + * @param [response] AdUnit + */ + type GetAdUnitCallback = (error: (Error|null), response?: google.ads.admanager.v1.AdUnit) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnits}. + * @param error Error, if any + * @param [response] ListAdUnitsResponse + */ + type ListAdUnitsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListAdUnitsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnitSizes}. + * @param error Error, if any + * @param [response] ListAdUnitSizesResponse + */ + type ListAdUnitSizesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListAdUnitSizesResponse) => void; + } + + /** Properties of a GetAdUnitRequest. */ + interface IGetAdUnitRequest { + + /** GetAdUnitRequest name */ + name?: (string|null); + } + + /** Represents a GetAdUnitRequest. */ + class GetAdUnitRequest implements IGetAdUnitRequest { + + /** + * Constructs a new GetAdUnitRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICompanyCreditStatusEnum); + constructor(properties?: google.ads.admanager.v1.IGetAdUnitRequest); + + /** GetAdUnitRequest name. */ + public name: string; /** - * Creates a new CompanyCreditStatusEnum instance using the specified properties. + * Creates a new GetAdUnitRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CompanyCreditStatusEnum instance + * @returns GetAdUnitRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICompanyCreditStatusEnum): google.ads.admanager.v1.CompanyCreditStatusEnum; + public static create(properties?: google.ads.admanager.v1.IGetAdUnitRequest): google.ads.admanager.v1.GetAdUnitRequest; /** - * Encodes the specified CompanyCreditStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. - * @param message CompanyCreditStatusEnum message or plain object to encode + * Encodes the specified GetAdUnitRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. + * @param message GetAdUnitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICompanyCreditStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetAdUnitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompanyCreditStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. - * @param message CompanyCreditStatusEnum message or plain object to encode + * Encodes the specified GetAdUnitRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. + * @param message GetAdUnitRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICompanyCreditStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetAdUnitRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer. + * Decodes a GetAdUnitRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompanyCreditStatusEnum + * @returns GetAdUnitRequest * @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.ads.admanager.v1.CompanyCreditStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetAdUnitRequest; /** - * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a GetAdUnitRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompanyCreditStatusEnum + * @returns GetAdUnitRequest * @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.ads.admanager.v1.CompanyCreditStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetAdUnitRequest; /** - * Verifies a CompanyCreditStatusEnum message. + * Verifies a GetAdUnitRequest 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 CompanyCreditStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetAdUnitRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompanyCreditStatusEnum + * @returns GetAdUnitRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CompanyCreditStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetAdUnitRequest; /** - * Creates a plain object from a CompanyCreditStatusEnum message. Also converts values to other types if specified. - * @param message CompanyCreditStatusEnum + * Creates a plain object from a GetAdUnitRequest message. Also converts values to other types if specified. + * @param message GetAdUnitRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CompanyCreditStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetAdUnitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompanyCreditStatusEnum to JSON. + * Converts this GetAdUnitRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompanyCreditStatusEnum + * Gets the default type url for GetAdUnitRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CompanyCreditStatusEnum { - - /** CompanyCreditStatus enum. */ - enum CompanyCreditStatus { - COMPANY_CREDIT_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2, - ON_HOLD = 3, - STOP = 4, - BLOCKED = 5 - } - } - - /** Properties of a Company. */ - interface ICompany { - - /** Company name */ - name?: (string|null); - - /** Company companyId */ - companyId?: (number|Long|string|null); - - /** Company displayName */ - displayName?: (string|null); - - /** Company type */ - type?: (google.ads.admanager.v1.CompanyTypeEnum.CompanyType|keyof typeof google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null); - - /** Company address */ - address?: (string|null); - - /** Company email */ - email?: (string|null); - - /** Company fax */ - fax?: (string|null); - - /** Company phone */ - phone?: (string|null); - - /** Company externalId */ - externalId?: (string|null); - - /** Company comment */ - comment?: (string|null); + /** Properties of a ListAdUnitsRequest. */ + interface IListAdUnitsRequest { - /** Company creditStatus */ - creditStatus?: (google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|keyof typeof google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null); + /** ListAdUnitsRequest parent */ + parent?: (string|null); - /** Company appliedLabels */ - appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + /** ListAdUnitsRequest pageSize */ + pageSize?: (number|null); - /** Company primaryContact */ - primaryContact?: (string|null); + /** ListAdUnitsRequest pageToken */ + pageToken?: (string|null); - /** Company appliedTeams */ - appliedTeams?: (string[]|null); + /** ListAdUnitsRequest filter */ + filter?: (string|null); - /** Company thirdPartyCompanyId */ - thirdPartyCompanyId?: (number|Long|string|null); + /** ListAdUnitsRequest orderBy */ + orderBy?: (string|null); - /** Company updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListAdUnitsRequest skip */ + skip?: (number|null); } - /** Represents a Company. */ - class Company implements ICompany { + /** Represents a ListAdUnitsRequest. */ + class ListAdUnitsRequest implements IListAdUnitsRequest { /** - * Constructs a new Company. + * Constructs a new ListAdUnitsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICompany); - - /** Company name. */ - public name: string; - - /** Company companyId. */ - public companyId: (number|Long|string); - - /** Company displayName. */ - public displayName: string; - - /** Company type. */ - public type: (google.ads.admanager.v1.CompanyTypeEnum.CompanyType|keyof typeof google.ads.admanager.v1.CompanyTypeEnum.CompanyType); - - /** Company address. */ - public address: string; - - /** Company email. */ - public email: string; - - /** Company fax. */ - public fax: string; - - /** Company phone. */ - public phone: string; - - /** Company externalId. */ - public externalId: string; - - /** Company comment. */ - public comment: string; + constructor(properties?: google.ads.admanager.v1.IListAdUnitsRequest); - /** Company creditStatus. */ - public creditStatus: (google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|keyof typeof google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus); + /** ListAdUnitsRequest parent. */ + public parent: string; - /** Company appliedLabels. */ - public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + /** ListAdUnitsRequest pageSize. */ + public pageSize: number; - /** Company primaryContact. */ - public primaryContact?: (string|null); + /** ListAdUnitsRequest pageToken. */ + public pageToken: string; - /** Company appliedTeams. */ - public appliedTeams: string[]; + /** ListAdUnitsRequest filter. */ + public filter: string; - /** Company thirdPartyCompanyId. */ - public thirdPartyCompanyId: (number|Long|string); + /** ListAdUnitsRequest orderBy. */ + public orderBy: string; - /** Company updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListAdUnitsRequest skip. */ + public skip: number; /** - * Creates a new Company instance using the specified properties. + * Creates a new ListAdUnitsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Company instance + * @returns ListAdUnitsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICompany): google.ads.admanager.v1.Company; + public static create(properties?: google.ads.admanager.v1.IListAdUnitsRequest): google.ads.admanager.v1.ListAdUnitsRequest; /** - * Encodes the specified Company message. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. - * @param message Company message or plain object to encode + * Encodes the specified ListAdUnitsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. + * @param message ListAdUnitsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICompany, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAdUnitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Company message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. - * @param message Company message or plain object to encode + * Encodes the specified ListAdUnitsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. + * @param message ListAdUnitsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICompany, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Company message from the specified reader or buffer. + * Decodes a ListAdUnitsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Company + * @returns ListAdUnitsRequest * @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.ads.admanager.v1.Company; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAdUnitsRequest; /** - * Decodes a Company message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Company + * @returns ListAdUnitsRequest * @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.ads.admanager.v1.Company; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAdUnitsRequest; /** - * Verifies a Company message. + * Verifies a ListAdUnitsRequest 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 Company message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Company + * @returns ListAdUnitsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Company; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitsRequest; /** - * Creates a plain object from a Company message. Also converts values to other types if specified. - * @param message Company + * Creates a plain object from a ListAdUnitsRequest message. Also converts values to other types if specified. + * @param message ListAdUnitsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Company, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAdUnitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Company to JSON. + * Converts this ListAdUnitsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Company + * Gets the default type url for ListAdUnitsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a CompanyService */ - class CompanyService extends $protobuf.rpc.Service { - - /** - * Constructs a new CompanyService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new CompanyService 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): CompanyService; - - /** - * Calls GetCompany. - * @param request GetCompanyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Company - */ - public getCompany(request: google.ads.admanager.v1.IGetCompanyRequest, callback: google.ads.admanager.v1.CompanyService.GetCompanyCallback): void; + /** Properties of a ListAdUnitsResponse. */ + interface IListAdUnitsResponse { - /** - * Calls GetCompany. - * @param request GetCompanyRequest message or plain object - * @returns Promise - */ - public getCompany(request: google.ads.admanager.v1.IGetCompanyRequest): Promise; + /** ListAdUnitsResponse adUnits */ + adUnits?: (google.ads.admanager.v1.IAdUnit[]|null); - /** - * Calls ListCompanies. - * @param request ListCompaniesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCompaniesResponse - */ - public listCompanies(request: google.ads.admanager.v1.IListCompaniesRequest, callback: google.ads.admanager.v1.CompanyService.ListCompaniesCallback): void; + /** ListAdUnitsResponse nextPageToken */ + nextPageToken?: (string|null); - /** - * Calls ListCompanies. - * @param request ListCompaniesRequest message or plain object - * @returns Promise - */ - public listCompanies(request: google.ads.admanager.v1.IListCompaniesRequest): Promise; + /** ListAdUnitsResponse totalSize */ + totalSize?: (number|null); } - namespace CompanyService { - - /** - * Callback as used by {@link google.ads.admanager.v1.CompanyService|getCompany}. - * @param error Error, if any - * @param [response] Company - */ - type GetCompanyCallback = (error: (Error|null), response?: google.ads.admanager.v1.Company) => void; + /** Represents a ListAdUnitsResponse. */ + class ListAdUnitsResponse implements IListAdUnitsResponse { /** - * Callback as used by {@link google.ads.admanager.v1.CompanyService|listCompanies}. - * @param error Error, if any - * @param [response] ListCompaniesResponse + * Constructs a new ListAdUnitsResponse. + * @param [properties] Properties to set */ - type ListCompaniesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCompaniesResponse) => void; - } - - /** Properties of a GetCompanyRequest. */ - interface IGetCompanyRequest { - - /** GetCompanyRequest name */ - name?: (string|null); - } + constructor(properties?: google.ads.admanager.v1.IListAdUnitsResponse); - /** Represents a GetCompanyRequest. */ - class GetCompanyRequest implements IGetCompanyRequest { + /** ListAdUnitsResponse adUnits. */ + public adUnits: google.ads.admanager.v1.IAdUnit[]; - /** - * Constructs a new GetCompanyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IGetCompanyRequest); + /** ListAdUnitsResponse nextPageToken. */ + public nextPageToken: string; - /** GetCompanyRequest name. */ - public name: string; + /** ListAdUnitsResponse totalSize. */ + public totalSize: number; /** - * Creates a new GetCompanyRequest instance using the specified properties. + * Creates a new ListAdUnitsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetCompanyRequest instance + * @returns ListAdUnitsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IGetCompanyRequest): google.ads.admanager.v1.GetCompanyRequest; + public static create(properties?: google.ads.admanager.v1.IListAdUnitsResponse): google.ads.admanager.v1.ListAdUnitsResponse; /** - * Encodes the specified GetCompanyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. - * @param message GetCompanyRequest message or plain object to encode + * Encodes the specified ListAdUnitsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. + * @param message ListAdUnitsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetCompanyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAdUnitsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCompanyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. - * @param message GetCompanyRequest message or plain object to encode + * Encodes the specified ListAdUnitsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. + * @param message ListAdUnitsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetCompanyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCompanyRequest message from the specified reader or buffer. + * Decodes a ListAdUnitsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCompanyRequest + * @returns ListAdUnitsResponse * @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.ads.admanager.v1.GetCompanyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAdUnitsResponse; /** - * Decodes a GetCompanyRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCompanyRequest + * @returns ListAdUnitsResponse * @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.ads.admanager.v1.GetCompanyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAdUnitsResponse; /** - * Verifies a GetCompanyRequest message. + * Verifies a ListAdUnitsResponse 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 GetCompanyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCompanyRequest + * @returns ListAdUnitsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCompanyRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitsResponse; /** - * Creates a plain object from a GetCompanyRequest message. Also converts values to other types if specified. - * @param message GetCompanyRequest + * Creates a plain object from a ListAdUnitsResponse message. Also converts values to other types if specified. + * @param message ListAdUnitsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetCompanyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAdUnitsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCompanyRequest to JSON. + * Converts this ListAdUnitsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCompanyRequest + * Gets the default type url for ListAdUnitsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCompaniesRequest. */ - interface IListCompaniesRequest { + /** Properties of a ListAdUnitSizesRequest. */ + interface IListAdUnitSizesRequest { - /** ListCompaniesRequest parent */ + /** ListAdUnitSizesRequest parent */ parent?: (string|null); - /** ListCompaniesRequest pageSize */ + /** ListAdUnitSizesRequest pageSize */ pageSize?: (number|null); - /** ListCompaniesRequest pageToken */ + /** ListAdUnitSizesRequest pageToken */ pageToken?: (string|null); - /** ListCompaniesRequest filter */ + /** ListAdUnitSizesRequest filter */ filter?: (string|null); - /** ListCompaniesRequest orderBy */ + /** ListAdUnitSizesRequest orderBy */ orderBy?: (string|null); - /** ListCompaniesRequest skip */ + /** ListAdUnitSizesRequest skip */ skip?: (number|null); } - /** Represents a ListCompaniesRequest. */ - class ListCompaniesRequest implements IListCompaniesRequest { + /** Represents a ListAdUnitSizesRequest. */ + class ListAdUnitSizesRequest implements IListAdUnitSizesRequest { /** - * Constructs a new ListCompaniesRequest. + * Constructs a new ListAdUnitSizesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCompaniesRequest); + constructor(properties?: google.ads.admanager.v1.IListAdUnitSizesRequest); - /** ListCompaniesRequest parent. */ + /** ListAdUnitSizesRequest parent. */ public parent: string; - /** ListCompaniesRequest pageSize. */ + /** ListAdUnitSizesRequest pageSize. */ public pageSize: number; - /** ListCompaniesRequest pageToken. */ + /** ListAdUnitSizesRequest pageToken. */ public pageToken: string; - /** ListCompaniesRequest filter. */ + /** ListAdUnitSizesRequest filter. */ public filter: string; - /** ListCompaniesRequest orderBy. */ + /** ListAdUnitSizesRequest orderBy. */ public orderBy: string; - /** ListCompaniesRequest skip. */ + /** ListAdUnitSizesRequest skip. */ public skip: number; /** - * Creates a new ListCompaniesRequest instance using the specified properties. + * Creates a new ListAdUnitSizesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListCompaniesRequest instance + * @returns ListAdUnitSizesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListCompaniesRequest): google.ads.admanager.v1.ListCompaniesRequest; + public static create(properties?: google.ads.admanager.v1.IListAdUnitSizesRequest): google.ads.admanager.v1.ListAdUnitSizesRequest; /** - * Encodes the specified ListCompaniesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. - * @param message ListCompaniesRequest message or plain object to encode + * Encodes the specified ListAdUnitSizesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. + * @param message ListAdUnitSizesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCompaniesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAdUnitSizesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCompaniesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. - * @param message ListCompaniesRequest message or plain object to encode + * Encodes the specified ListAdUnitSizesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. + * @param message ListAdUnitSizesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCompaniesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitSizesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCompaniesRequest message from the specified reader or buffer. + * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCompaniesRequest + * @returns ListAdUnitSizesRequest * @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.ads.admanager.v1.ListCompaniesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAdUnitSizesRequest; /** - * Decodes a ListCompaniesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCompaniesRequest + * @returns ListAdUnitSizesRequest * @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.ads.admanager.v1.ListCompaniesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAdUnitSizesRequest; /** - * Verifies a ListCompaniesRequest message. + * Verifies a ListAdUnitSizesRequest 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 ListCompaniesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitSizesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCompaniesRequest + * @returns ListAdUnitSizesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCompaniesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitSizesRequest; /** - * Creates a plain object from a ListCompaniesRequest message. Also converts values to other types if specified. - * @param message ListCompaniesRequest + * Creates a plain object from a ListAdUnitSizesRequest message. Also converts values to other types if specified. + * @param message ListAdUnitSizesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCompaniesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAdUnitSizesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCompaniesRequest to JSON. + * Converts this ListAdUnitSizesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCompaniesRequest + * Gets the default type url for ListAdUnitSizesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCompaniesResponse. */ - interface IListCompaniesResponse { + /** Properties of a ListAdUnitSizesResponse. */ + interface IListAdUnitSizesResponse { - /** ListCompaniesResponse companies */ - companies?: (google.ads.admanager.v1.ICompany[]|null); + /** ListAdUnitSizesResponse adUnitSizes */ + adUnitSizes?: (google.ads.admanager.v1.IAdUnitSize[]|null); - /** ListCompaniesResponse nextPageToken */ + /** ListAdUnitSizesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListCompaniesResponse totalSize */ + /** ListAdUnitSizesResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListCompaniesResponse. */ - class ListCompaniesResponse implements IListCompaniesResponse { + /** Represents a ListAdUnitSizesResponse. */ + class ListAdUnitSizesResponse implements IListAdUnitSizesResponse { /** - * Constructs a new ListCompaniesResponse. + * Constructs a new ListAdUnitSizesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCompaniesResponse); + constructor(properties?: google.ads.admanager.v1.IListAdUnitSizesResponse); - /** ListCompaniesResponse companies. */ - public companies: google.ads.admanager.v1.ICompany[]; + /** ListAdUnitSizesResponse adUnitSizes. */ + public adUnitSizes: google.ads.admanager.v1.IAdUnitSize[]; - /** ListCompaniesResponse nextPageToken. */ + /** ListAdUnitSizesResponse nextPageToken. */ public nextPageToken: string; - /** ListCompaniesResponse totalSize. */ + /** ListAdUnitSizesResponse totalSize. */ public totalSize: number; /** - * Creates a new ListCompaniesResponse instance using the specified properties. + * Creates a new ListAdUnitSizesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListCompaniesResponse instance + * @returns ListAdUnitSizesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListCompaniesResponse): google.ads.admanager.v1.ListCompaniesResponse; + public static create(properties?: google.ads.admanager.v1.IListAdUnitSizesResponse): google.ads.admanager.v1.ListAdUnitSizesResponse; /** - * Encodes the specified ListCompaniesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. - * @param message ListCompaniesResponse message or plain object to encode + * Encodes the specified ListAdUnitSizesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. + * @param message ListAdUnitSizesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCompaniesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAdUnitSizesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCompaniesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. - * @param message ListCompaniesResponse message or plain object to encode + * Encodes the specified ListAdUnitSizesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. + * @param message ListAdUnitSizesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCompaniesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAdUnitSizesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCompaniesResponse message from the specified reader or buffer. + * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCompaniesResponse + * @returns ListAdUnitSizesResponse * @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.ads.admanager.v1.ListCompaniesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAdUnitSizesResponse; /** - * Decodes a ListCompaniesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCompaniesResponse + * @returns ListAdUnitSizesResponse * @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.ads.admanager.v1.ListCompaniesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAdUnitSizesResponse; /** - * Verifies a ListCompaniesResponse message. + * Verifies a ListAdUnitSizesResponse 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 ListCompaniesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitSizesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCompaniesResponse + * @returns ListAdUnitSizesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCompaniesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAdUnitSizesResponse; /** - * Creates a plain object from a ListCompaniesResponse message. Also converts values to other types if specified. - * @param message ListCompaniesResponse + * Creates a plain object from a ListAdUnitSizesResponse message. Also converts values to other types if specified. + * @param message ListAdUnitSizesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCompaniesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAdUnitSizesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCompaniesResponse to JSON. + * Converts this ListAdUnitSizesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCompaniesResponse + * Gets the default type url for ListAdUnitSizesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Contact. */ - interface IContact { + /** Properties of an AdManagerError. */ + interface IAdManagerError { - /** Contact name */ - name?: (string|null); + /** AdManagerError errorCode */ + errorCode?: (string|null); + + /** AdManagerError message */ + message?: (string|null); + + /** AdManagerError fieldPath */ + fieldPath?: (string|null); + + /** AdManagerError trigger */ + trigger?: (string|null); + + /** AdManagerError stackTrace */ + stackTrace?: (string|null); - /** Contact companyDisplayName */ - companyDisplayName?: (string|null); + /** AdManagerError details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a Contact. */ - class Contact implements IContact { + /** Represents an AdManagerError. */ + class AdManagerError implements IAdManagerError { /** - * Constructs a new Contact. + * Constructs a new AdManagerError. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IContact); + constructor(properties?: google.ads.admanager.v1.IAdManagerError); - /** Contact name. */ - public name: string; + /** AdManagerError errorCode. */ + public errorCode: string; + + /** AdManagerError message. */ + public message: string; + + /** AdManagerError fieldPath. */ + public fieldPath: string; + + /** AdManagerError trigger. */ + public trigger: string; + + /** AdManagerError stackTrace. */ + public stackTrace: string; - /** Contact companyDisplayName. */ - public companyDisplayName?: (string|null); + /** AdManagerError details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new Contact instance using the specified properties. + * Creates a new AdManagerError instance using the specified properties. * @param [properties] Properties to set - * @returns Contact instance + * @returns AdManagerError instance */ - public static create(properties?: google.ads.admanager.v1.IContact): google.ads.admanager.v1.Contact; + public static create(properties?: google.ads.admanager.v1.IAdManagerError): google.ads.admanager.v1.AdManagerError; /** - * Encodes the specified Contact message. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified AdManagerError message. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. + * @param message AdManagerError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAdManagerError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified AdManagerError message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. + * @param message AdManagerError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAdManagerError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes an AdManagerError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Contact + * @returns AdManagerError * @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.ads.admanager.v1.Contact; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdManagerError; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes an AdManagerError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Contact + * @returns AdManagerError * @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.ads.admanager.v1.Contact; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdManagerError; /** - * Verifies a Contact message. + * Verifies an AdManagerError 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 Contact message from a plain object. Also converts values to their respective internal types. + * Creates an AdManagerError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Contact + * @returns AdManagerError */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Contact; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdManagerError; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. - * @param message Contact + * Creates a plain object from an AdManagerError message. Also converts values to other types if specified. + * @param message AdManagerError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AdManagerError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Contact to JSON. + * Converts this AdManagerError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Contact + * Gets the default type url for AdManagerError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomFieldDataTypeEnum. */ - interface ICustomFieldDataTypeEnum { + /** Properties of an Application. */ + interface IApplication { + + /** Application name */ + name?: (string|null); + + /** Application displayName */ + displayName?: (string|null); } - /** Represents a CustomFieldDataTypeEnum. */ - class CustomFieldDataTypeEnum implements ICustomFieldDataTypeEnum { + /** Represents an Application. */ + class Application implements IApplication { /** - * Constructs a new CustomFieldDataTypeEnum. + * Constructs a new Application. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldDataTypeEnum); + constructor(properties?: google.ads.admanager.v1.IApplication); + + /** Application name. */ + public name: string; + + /** Application displayName. */ + public displayName?: (string|null); /** - * Creates a new CustomFieldDataTypeEnum instance using the specified properties. + * Creates a new Application instance using the specified properties. * @param [properties] Properties to set - * @returns CustomFieldDataTypeEnum instance + * @returns Application instance */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldDataTypeEnum): google.ads.admanager.v1.CustomFieldDataTypeEnum; + public static create(properties?: google.ads.admanager.v1.IApplication): google.ads.admanager.v1.Application; /** - * Encodes the specified CustomFieldDataTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. - * @param message CustomFieldDataTypeEnum message or plain object to encode + * Encodes the specified Application message. Does not implicitly {@link google.ads.admanager.v1.Application.verify|verify} messages. + * @param message Application message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomFieldDataTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IApplication, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomFieldDataTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. - * @param message CustomFieldDataTypeEnum message or plain object to encode + * Encodes the specified Application message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Application.verify|verify} messages. + * @param message Application message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldDataTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IApplication, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer. + * Decodes an Application message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomFieldDataTypeEnum + * @returns Application * @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.ads.admanager.v1.CustomFieldDataTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Application; /** - * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer, length delimited. + * Decodes an Application message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomFieldDataTypeEnum + * @returns Application * @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.ads.admanager.v1.CustomFieldDataTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Application; /** - * Verifies a CustomFieldDataTypeEnum message. + * Verifies an Application 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 CustomFieldDataTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates an Application message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomFieldDataTypeEnum + * @returns Application */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldDataTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Application; /** - * Creates a plain object from a CustomFieldDataTypeEnum message. Also converts values to other types if specified. - * @param message CustomFieldDataTypeEnum + * Creates a plain object from an Application message. Also converts values to other types if specified. + * @param message Application * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldDataTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Application, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldDataTypeEnum to JSON. + * Converts this Application to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldDataTypeEnum + * Gets the default type url for Application * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomFieldDataTypeEnum { + /** Represents an ApplicationService */ + class ApplicationService extends $protobuf.rpc.Service { - /** CustomFieldDataType enum. */ - enum CustomFieldDataType { - CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED = 0, - STRING = 1, - NUMBER = 2, - TOGGLE = 3, - DROP_DOWN = 4 - } + /** + * Constructs a new ApplicationService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ApplicationService 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): ApplicationService; + + /** + * Calls GetApplication. + * @param request GetApplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Application + */ + public getApplication(request: google.ads.admanager.v1.IGetApplicationRequest, callback: google.ads.admanager.v1.ApplicationService.GetApplicationCallback): void; + + /** + * Calls GetApplication. + * @param request GetApplicationRequest message or plain object + * @returns Promise + */ + public getApplication(request: google.ads.admanager.v1.IGetApplicationRequest): Promise; + + /** + * Calls ListApplications. + * @param request ListApplicationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApplicationsResponse + */ + public listApplications(request: google.ads.admanager.v1.IListApplicationsRequest, callback: google.ads.admanager.v1.ApplicationService.ListApplicationsCallback): void; + + /** + * Calls ListApplications. + * @param request ListApplicationsRequest message or plain object + * @returns Promise + */ + public listApplications(request: google.ads.admanager.v1.IListApplicationsRequest): Promise; } - /** Properties of a CustomFieldEntityTypeEnum. */ - interface ICustomFieldEntityTypeEnum { + namespace ApplicationService { + + /** + * Callback as used by {@link google.ads.admanager.v1.ApplicationService|getApplication}. + * @param error Error, if any + * @param [response] Application + */ + type GetApplicationCallback = (error: (Error|null), response?: google.ads.admanager.v1.Application) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ApplicationService|listApplications}. + * @param error Error, if any + * @param [response] ListApplicationsResponse + */ + type ListApplicationsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListApplicationsResponse) => void; } - /** Represents a CustomFieldEntityTypeEnum. */ - class CustomFieldEntityTypeEnum implements ICustomFieldEntityTypeEnum { + /** Properties of a GetApplicationRequest. */ + interface IGetApplicationRequest { + + /** GetApplicationRequest name */ + name?: (string|null); + } + + /** Represents a GetApplicationRequest. */ + class GetApplicationRequest implements IGetApplicationRequest { /** - * Constructs a new CustomFieldEntityTypeEnum. + * Constructs a new GetApplicationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldEntityTypeEnum); + constructor(properties?: google.ads.admanager.v1.IGetApplicationRequest); + + /** GetApplicationRequest name. */ + public name: string; /** - * Creates a new CustomFieldEntityTypeEnum instance using the specified properties. + * Creates a new GetApplicationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomFieldEntityTypeEnum instance + * @returns GetApplicationRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldEntityTypeEnum): google.ads.admanager.v1.CustomFieldEntityTypeEnum; + public static create(properties?: google.ads.admanager.v1.IGetApplicationRequest): google.ads.admanager.v1.GetApplicationRequest; /** - * Encodes the specified CustomFieldEntityTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. - * @param message CustomFieldEntityTypeEnum message or plain object to encode + * Encodes the specified GetApplicationRequest message. Does not implicitly {@link google.ads.admanager.v1.GetApplicationRequest.verify|verify} messages. + * @param message GetApplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomFieldEntityTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetApplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomFieldEntityTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. - * @param message CustomFieldEntityTypeEnum message or plain object to encode + * Encodes the specified GetApplicationRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetApplicationRequest.verify|verify} messages. + * @param message GetApplicationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldEntityTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetApplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer. + * Decodes a GetApplicationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomFieldEntityTypeEnum + * @returns GetApplicationRequest * @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.ads.admanager.v1.CustomFieldEntityTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetApplicationRequest; /** - * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a GetApplicationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomFieldEntityTypeEnum + * @returns GetApplicationRequest * @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.ads.admanager.v1.CustomFieldEntityTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetApplicationRequest; /** - * Verifies a CustomFieldEntityTypeEnum message. + * Verifies a GetApplicationRequest 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 CustomFieldEntityTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetApplicationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomFieldEntityTypeEnum + * @returns GetApplicationRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldEntityTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetApplicationRequest; /** - * Creates a plain object from a CustomFieldEntityTypeEnum message. Also converts values to other types if specified. - * @param message CustomFieldEntityTypeEnum + * Creates a plain object from a GetApplicationRequest message. Also converts values to other types if specified. + * @param message GetApplicationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldEntityTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetApplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldEntityTypeEnum to JSON. + * Converts this GetApplicationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldEntityTypeEnum + * Gets the default type url for GetApplicationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomFieldEntityTypeEnum { + /** Properties of a ListApplicationsRequest. */ + interface IListApplicationsRequest { - /** CustomFieldEntityType enum. */ - enum CustomFieldEntityType { - CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED = 0, - LINE_ITEM = 1, - ORDER = 2, - CREATIVE = 3, - PROPOSAL = 4, - PROPOSAL_LINE_ITEM = 5 - } - } + /** ListApplicationsRequest parent */ + parent?: (string|null); - /** Properties of a CustomFieldStatusEnum. */ - interface ICustomFieldStatusEnum { + /** ListApplicationsRequest pageSize */ + pageSize?: (number|null); + + /** ListApplicationsRequest pageToken */ + pageToken?: (string|null); + + /** ListApplicationsRequest filter */ + filter?: (string|null); + + /** ListApplicationsRequest orderBy */ + orderBy?: (string|null); + + /** ListApplicationsRequest skip */ + skip?: (number|null); } - /** Represents a CustomFieldStatusEnum. */ - class CustomFieldStatusEnum implements ICustomFieldStatusEnum { + /** Represents a ListApplicationsRequest. */ + class ListApplicationsRequest implements IListApplicationsRequest { /** - * Constructs a new CustomFieldStatusEnum. + * Constructs a new ListApplicationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldStatusEnum); + constructor(properties?: google.ads.admanager.v1.IListApplicationsRequest); + + /** ListApplicationsRequest parent. */ + public parent: string; + + /** ListApplicationsRequest pageSize. */ + public pageSize: number; + + /** ListApplicationsRequest pageToken. */ + public pageToken: string; + + /** ListApplicationsRequest filter. */ + public filter: string; + + /** ListApplicationsRequest orderBy. */ + public orderBy: string; + + /** ListApplicationsRequest skip. */ + public skip: number; /** - * Creates a new CustomFieldStatusEnum instance using the specified properties. + * Creates a new ListApplicationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomFieldStatusEnum instance + * @returns ListApplicationsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldStatusEnum): google.ads.admanager.v1.CustomFieldStatusEnum; + public static create(properties?: google.ads.admanager.v1.IListApplicationsRequest): google.ads.admanager.v1.ListApplicationsRequest; /** - * Encodes the specified CustomFieldStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. - * @param message CustomFieldStatusEnum message or plain object to encode + * Encodes the specified ListApplicationsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsRequest.verify|verify} messages. + * @param message ListApplicationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomFieldStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListApplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomFieldStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. - * @param message CustomFieldStatusEnum message or plain object to encode + * Encodes the specified ListApplicationsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsRequest.verify|verify} messages. + * @param message ListApplicationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListApplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomFieldStatusEnum message from the specified reader or buffer. + * Decodes a ListApplicationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomFieldStatusEnum + * @returns ListApplicationsRequest * @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.ads.admanager.v1.CustomFieldStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListApplicationsRequest; /** - * Decodes a CustomFieldStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a ListApplicationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomFieldStatusEnum + * @returns ListApplicationsRequest * @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.ads.admanager.v1.CustomFieldStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListApplicationsRequest; /** - * Verifies a CustomFieldStatusEnum message. + * Verifies a ListApplicationsRequest 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 CustomFieldStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListApplicationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomFieldStatusEnum + * @returns ListApplicationsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListApplicationsRequest; /** - * Creates a plain object from a CustomFieldStatusEnum message. Also converts values to other types if specified. - * @param message CustomFieldStatusEnum + * Creates a plain object from a ListApplicationsRequest message. Also converts values to other types if specified. + * @param message ListApplicationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListApplicationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldStatusEnum to JSON. + * Converts this ListApplicationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldStatusEnum + * Gets the default type url for ListApplicationsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomFieldStatusEnum { + /** Properties of a ListApplicationsResponse. */ + interface IListApplicationsResponse { - /** CustomFieldStatus enum. */ - enum CustomFieldStatus { - CUSTOM_FIELD_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } + /** ListApplicationsResponse applications */ + applications?: (google.ads.admanager.v1.IApplication[]|null); - /** Properties of a CustomFieldVisibilityEnum. */ - interface ICustomFieldVisibilityEnum { + /** ListApplicationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListApplicationsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a CustomFieldVisibilityEnum. */ - class CustomFieldVisibilityEnum implements ICustomFieldVisibilityEnum { + /** Represents a ListApplicationsResponse. */ + class ListApplicationsResponse implements IListApplicationsResponse { /** - * Constructs a new CustomFieldVisibilityEnum. + * Constructs a new ListApplicationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldVisibilityEnum); + constructor(properties?: google.ads.admanager.v1.IListApplicationsResponse); + + /** ListApplicationsResponse applications. */ + public applications: google.ads.admanager.v1.IApplication[]; + + /** ListApplicationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListApplicationsResponse totalSize. */ + public totalSize: number; /** - * Creates a new CustomFieldVisibilityEnum instance using the specified properties. + * Creates a new ListApplicationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CustomFieldVisibilityEnum instance + * @returns ListApplicationsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldVisibilityEnum): google.ads.admanager.v1.CustomFieldVisibilityEnum; + public static create(properties?: google.ads.admanager.v1.IListApplicationsResponse): google.ads.admanager.v1.ListApplicationsResponse; /** - * Encodes the specified CustomFieldVisibilityEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. - * @param message CustomFieldVisibilityEnum message or plain object to encode + * Encodes the specified ListApplicationsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsResponse.verify|verify} messages. + * @param message ListApplicationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomFieldVisibilityEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListApplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomFieldVisibilityEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. - * @param message CustomFieldVisibilityEnum message or plain object to encode + * Encodes the specified ListApplicationsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsResponse.verify|verify} messages. + * @param message ListApplicationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldVisibilityEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListApplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer. + * Decodes a ListApplicationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomFieldVisibilityEnum + * @returns ListApplicationsResponse * @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.ads.admanager.v1.CustomFieldVisibilityEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListApplicationsResponse; /** - * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer, length delimited. + * Decodes a ListApplicationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomFieldVisibilityEnum + * @returns ListApplicationsResponse * @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.ads.admanager.v1.CustomFieldVisibilityEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListApplicationsResponse; /** - * Verifies a CustomFieldVisibilityEnum message. + * Verifies a ListApplicationsResponse 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 CustomFieldVisibilityEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListApplicationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomFieldVisibilityEnum + * @returns ListApplicationsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldVisibilityEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListApplicationsResponse; /** - * Creates a plain object from a CustomFieldVisibilityEnum message. Also converts values to other types if specified. - * @param message CustomFieldVisibilityEnum + * Creates a plain object from a ListApplicationsResponse message. Also converts values to other types if specified. + * @param message ListApplicationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldVisibilityEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListApplicationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldVisibilityEnum to JSON. + * Converts this ListApplicationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldVisibilityEnum + * Gets the default type url for ListApplicationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomFieldVisibilityEnum { - - /** CustomFieldVisibility enum. */ - enum CustomFieldVisibility { - CUSTOM_FIELD_VISIBILITY_UNSPECIFIED = 0, - HIDDEN = 1, - READ_ONLY = 2, - EDITABLE = 3 - } - } - - /** Properties of a CustomField. */ - interface ICustomField { + /** Properties of an AudienceSegment. */ + interface IAudienceSegment { - /** CustomField name */ + /** AudienceSegment name */ name?: (string|null); - /** CustomField customFieldId */ - customFieldId?: (number|Long|string|null); - - /** CustomField displayName */ + /** AudienceSegment displayName */ displayName?: (string|null); - - /** CustomField description */ - description?: (string|null); - - /** CustomField status */ - status?: (google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|keyof typeof google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null); - - /** CustomField entityType */ - entityType?: (google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|keyof typeof google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null); - - /** CustomField dataType */ - dataType?: (google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|keyof typeof google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null); - - /** CustomField visibility */ - visibility?: (google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|keyof typeof google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null); - - /** CustomField options */ - options?: (google.ads.admanager.v1.ICustomFieldOption[]|null); } - /** Represents a CustomField. */ - class CustomField implements ICustomField { + /** Represents an AudienceSegment. */ + class AudienceSegment implements IAudienceSegment { /** - * Constructs a new CustomField. + * Constructs a new AudienceSegment. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomField); + constructor(properties?: google.ads.admanager.v1.IAudienceSegment); - /** CustomField name. */ + /** AudienceSegment name. */ public name: string; - /** CustomField customFieldId. */ - public customFieldId?: (number|Long|string|null); - - /** CustomField displayName. */ + /** AudienceSegment displayName. */ public displayName?: (string|null); - /** CustomField description. */ - public description?: (string|null); - - /** CustomField status. */ - public status?: (google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|keyof typeof google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null); - - /** CustomField entityType. */ - public entityType?: (google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|keyof typeof google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null); - - /** CustomField dataType. */ - public dataType?: (google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|keyof typeof google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null); - - /** CustomField visibility. */ - public visibility?: (google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|keyof typeof google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null); - - /** CustomField options. */ - public options: google.ads.admanager.v1.ICustomFieldOption[]; - /** - * Creates a new CustomField instance using the specified properties. + * Creates a new AudienceSegment instance using the specified properties. * @param [properties] Properties to set - * @returns CustomField instance + * @returns AudienceSegment instance */ - public static create(properties?: google.ads.admanager.v1.ICustomField): google.ads.admanager.v1.CustomField; + public static create(properties?: google.ads.admanager.v1.IAudienceSegment): google.ads.admanager.v1.AudienceSegment; /** - * Encodes the specified CustomField message. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. - * @param message CustomField message or plain object to encode + * Encodes the specified AudienceSegment message. Does not implicitly {@link google.ads.admanager.v1.AudienceSegment.verify|verify} messages. + * @param message AudienceSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IAudienceSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomField message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. - * @param message CustomField message or plain object to encode + * Encodes the specified AudienceSegment message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AudienceSegment.verify|verify} messages. + * @param message AudienceSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IAudienceSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomField message from the specified reader or buffer. + * Decodes an AudienceSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomField + * @returns AudienceSegment * @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.ads.admanager.v1.CustomField; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AudienceSegment; /** - * Decodes a CustomField message from the specified reader or buffer, length delimited. + * Decodes an AudienceSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomField + * @returns AudienceSegment * @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.ads.admanager.v1.CustomField; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AudienceSegment; /** - * Verifies a CustomField message. + * Verifies an AudienceSegment 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 CustomField message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomField + * @returns AudienceSegment */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomField; - - /** - * Creates a plain object from a CustomField message. Also converts values to other types if specified. - * @param message CustomField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.CustomField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomFieldOption. */ - interface ICustomFieldOption { - - /** CustomFieldOption customFieldOptionId */ - customFieldOptionId?: (number|Long|string|null); - - /** CustomFieldOption displayName */ - displayName?: (string|null); - } - - /** Represents a CustomFieldOption. */ - class CustomFieldOption implements ICustomFieldOption { - - /** - * Constructs a new CustomFieldOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldOption); - - /** CustomFieldOption customFieldOptionId. */ - public customFieldOptionId: (number|Long|string); - - /** CustomFieldOption displayName. */ - public displayName: string; - - /** - * Creates a new CustomFieldOption instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomFieldOption instance - */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldOption): google.ads.admanager.v1.CustomFieldOption; - - /** - * Encodes the specified CustomFieldOption message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. - * @param message CustomFieldOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.ICustomFieldOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomFieldOption message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. - * @param message CustomFieldOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomFieldOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomFieldOption - * @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.ads.admanager.v1.CustomFieldOption; - - /** - * Decodes a CustomFieldOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomFieldOption - * @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.ads.admanager.v1.CustomFieldOption; - - /** - * Verifies a CustomFieldOption 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 CustomFieldOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomFieldOption - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldOption; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AudienceSegment; /** - * Creates a plain object from a CustomFieldOption message. Also converts values to other types if specified. - * @param message CustomFieldOption + * Creates a plain object from an AudienceSegment message. Also converts values to other types if specified. + * @param message AudienceSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.AudienceSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldOption to JSON. + * Converts this AudienceSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldOption + * Gets the default type url for AudienceSegment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a CustomFieldService */ - class CustomFieldService extends $protobuf.rpc.Service { + /** Represents an AudienceSegmentService */ + class AudienceSegmentService extends $protobuf.rpc.Service { /** - * Constructs a new CustomFieldService service. + * Constructs a new AudienceSegmentService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -5404,1059 +5092,1003 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new CustomFieldService service using the specified rpc implementation. + * Creates new AudienceSegmentService 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): CustomFieldService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AudienceSegmentService; /** - * Calls GetCustomField. - * @param request GetCustomFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CustomField + * Calls GetAudienceSegment. + * @param request GetAudienceSegmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceSegment */ - public getCustomField(request: google.ads.admanager.v1.IGetCustomFieldRequest, callback: google.ads.admanager.v1.CustomFieldService.GetCustomFieldCallback): void; + public getAudienceSegment(request: google.ads.admanager.v1.IGetAudienceSegmentRequest, callback: google.ads.admanager.v1.AudienceSegmentService.GetAudienceSegmentCallback): void; /** - * Calls GetCustomField. - * @param request GetCustomFieldRequest message or plain object + * Calls GetAudienceSegment. + * @param request GetAudienceSegmentRequest message or plain object * @returns Promise */ - public getCustomField(request: google.ads.admanager.v1.IGetCustomFieldRequest): Promise; + public getAudienceSegment(request: google.ads.admanager.v1.IGetAudienceSegmentRequest): Promise; /** - * Calls ListCustomFields. - * @param request ListCustomFieldsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCustomFieldsResponse + * Calls ListAudienceSegments. + * @param request ListAudienceSegmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceSegmentsResponse */ - public listCustomFields(request: google.ads.admanager.v1.IListCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.ListCustomFieldsCallback): void; + public listAudienceSegments(request: google.ads.admanager.v1.IListAudienceSegmentsRequest, callback: google.ads.admanager.v1.AudienceSegmentService.ListAudienceSegmentsCallback): void; /** - * Calls ListCustomFields. - * @param request ListCustomFieldsRequest message or plain object + * Calls ListAudienceSegments. + * @param request ListAudienceSegmentsRequest message or plain object * @returns Promise */ - public listCustomFields(request: google.ads.admanager.v1.IListCustomFieldsRequest): Promise; + public listAudienceSegments(request: google.ads.admanager.v1.IListAudienceSegmentsRequest): Promise; } - namespace CustomFieldService { + namespace AudienceSegmentService { /** - * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|getCustomField}. + * Callback as used by {@link google.ads.admanager.v1.AudienceSegmentService|getAudienceSegment}. * @param error Error, if any - * @param [response] CustomField + * @param [response] AudienceSegment */ - type GetCustomFieldCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomField) => void; + type GetAudienceSegmentCallback = (error: (Error|null), response?: google.ads.admanager.v1.AudienceSegment) => void; /** - * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|listCustomFields}. + * Callback as used by {@link google.ads.admanager.v1.AudienceSegmentService|listAudienceSegments}. * @param error Error, if any - * @param [response] ListCustomFieldsResponse + * @param [response] ListAudienceSegmentsResponse */ - type ListCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomFieldsResponse) => void; + type ListAudienceSegmentsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListAudienceSegmentsResponse) => void; } - /** Properties of a GetCustomFieldRequest. */ - interface IGetCustomFieldRequest { + /** Properties of a GetAudienceSegmentRequest. */ + interface IGetAudienceSegmentRequest { - /** GetCustomFieldRequest name */ + /** GetAudienceSegmentRequest name */ name?: (string|null); } - /** Represents a GetCustomFieldRequest. */ - class GetCustomFieldRequest implements IGetCustomFieldRequest { + /** Represents a GetAudienceSegmentRequest. */ + class GetAudienceSegmentRequest implements IGetAudienceSegmentRequest { /** - * Constructs a new GetCustomFieldRequest. + * Constructs a new GetAudienceSegmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetCustomFieldRequest); + constructor(properties?: google.ads.admanager.v1.IGetAudienceSegmentRequest); - /** GetCustomFieldRequest name. */ + /** GetAudienceSegmentRequest name. */ public name: string; /** - * Creates a new GetCustomFieldRequest instance using the specified properties. + * Creates a new GetAudienceSegmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCustomFieldRequest instance + * @returns GetAudienceSegmentRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetCustomFieldRequest): google.ads.admanager.v1.GetCustomFieldRequest; + public static create(properties?: google.ads.admanager.v1.IGetAudienceSegmentRequest): google.ads.admanager.v1.GetAudienceSegmentRequest; /** - * Encodes the specified GetCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. - * @param message GetCustomFieldRequest message or plain object to encode + * Encodes the specified GetAudienceSegmentRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAudienceSegmentRequest.verify|verify} messages. + * @param message GetAudienceSegmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetAudienceSegmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. - * @param message GetCustomFieldRequest message or plain object to encode + * Encodes the specified GetAudienceSegmentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAudienceSegmentRequest.verify|verify} messages. + * @param message GetAudienceSegmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetAudienceSegmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCustomFieldRequest message from the specified reader or buffer. + * Decodes a GetAudienceSegmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCustomFieldRequest + * @returns GetAudienceSegmentRequest * @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.ads.admanager.v1.GetCustomFieldRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetAudienceSegmentRequest; /** - * Decodes a GetCustomFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAudienceSegmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCustomFieldRequest + * @returns GetAudienceSegmentRequest * @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.ads.admanager.v1.GetCustomFieldRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetAudienceSegmentRequest; /** - * Verifies a GetCustomFieldRequest message. + * Verifies a GetAudienceSegmentRequest 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 GetCustomFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAudienceSegmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCustomFieldRequest + * @returns GetAudienceSegmentRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomFieldRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetAudienceSegmentRequest; /** - * Creates a plain object from a GetCustomFieldRequest message. Also converts values to other types if specified. - * @param message GetCustomFieldRequest + * Creates a plain object from a GetAudienceSegmentRequest message. Also converts values to other types if specified. + * @param message GetAudienceSegmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetCustomFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetAudienceSegmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCustomFieldRequest to JSON. + * Converts this GetAudienceSegmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCustomFieldRequest + * Gets the default type url for GetAudienceSegmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomFieldsRequest. */ - interface IListCustomFieldsRequest { + /** Properties of a ListAudienceSegmentsRequest. */ + interface IListAudienceSegmentsRequest { - /** ListCustomFieldsRequest parent */ + /** ListAudienceSegmentsRequest parent */ parent?: (string|null); - /** ListCustomFieldsRequest pageSize */ + /** ListAudienceSegmentsRequest pageSize */ pageSize?: (number|null); - /** ListCustomFieldsRequest pageToken */ + /** ListAudienceSegmentsRequest pageToken */ pageToken?: (string|null); - /** ListCustomFieldsRequest filter */ + /** ListAudienceSegmentsRequest filter */ filter?: (string|null); - /** ListCustomFieldsRequest orderBy */ + /** ListAudienceSegmentsRequest orderBy */ orderBy?: (string|null); - /** ListCustomFieldsRequest skip */ + /** ListAudienceSegmentsRequest skip */ skip?: (number|null); } - /** Represents a ListCustomFieldsRequest. */ - class ListCustomFieldsRequest implements IListCustomFieldsRequest { + /** Represents a ListAudienceSegmentsRequest. */ + class ListAudienceSegmentsRequest implements IListAudienceSegmentsRequest { /** - * Constructs a new ListCustomFieldsRequest. + * Constructs a new ListAudienceSegmentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomFieldsRequest); + constructor(properties?: google.ads.admanager.v1.IListAudienceSegmentsRequest); - /** ListCustomFieldsRequest parent. */ + /** ListAudienceSegmentsRequest parent. */ public parent: string; - /** ListCustomFieldsRequest pageSize. */ + /** ListAudienceSegmentsRequest pageSize. */ public pageSize: number; - /** ListCustomFieldsRequest pageToken. */ + /** ListAudienceSegmentsRequest pageToken. */ public pageToken: string; - /** ListCustomFieldsRequest filter. */ + /** ListAudienceSegmentsRequest filter. */ public filter: string; - /** ListCustomFieldsRequest orderBy. */ + /** ListAudienceSegmentsRequest orderBy. */ public orderBy: string; - /** ListCustomFieldsRequest skip. */ + /** ListAudienceSegmentsRequest skip. */ public skip: number; /** - * Creates a new ListCustomFieldsRequest instance using the specified properties. + * Creates a new ListAudienceSegmentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomFieldsRequest instance + * @returns ListAudienceSegmentsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomFieldsRequest): google.ads.admanager.v1.ListCustomFieldsRequest; + public static create(properties?: google.ads.admanager.v1.IListAudienceSegmentsRequest): google.ads.admanager.v1.ListAudienceSegmentsRequest; /** - * Encodes the specified ListCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. - * @param message ListCustomFieldsRequest message or plain object to encode + * Encodes the specified ListAudienceSegmentsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsRequest.verify|verify} messages. + * @param message ListAudienceSegmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAudienceSegmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. - * @param message ListCustomFieldsRequest message or plain object to encode + * Encodes the specified ListAudienceSegmentsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsRequest.verify|verify} messages. + * @param message ListAudienceSegmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAudienceSegmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomFieldsRequest message from the specified reader or buffer. + * Decodes a ListAudienceSegmentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomFieldsRequest + * @returns ListAudienceSegmentsRequest * @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.ads.admanager.v1.ListCustomFieldsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAudienceSegmentsRequest; /** - * Decodes a ListCustomFieldsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAudienceSegmentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomFieldsRequest + * @returns ListAudienceSegmentsRequest * @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.ads.admanager.v1.ListCustomFieldsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAudienceSegmentsRequest; /** - * Verifies a ListCustomFieldsRequest message. + * Verifies a ListAudienceSegmentsRequest 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 ListCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAudienceSegmentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomFieldsRequest + * @returns ListAudienceSegmentsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomFieldsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAudienceSegmentsRequest; /** - * Creates a plain object from a ListCustomFieldsRequest message. Also converts values to other types if specified. - * @param message ListCustomFieldsRequest + * Creates a plain object from a ListAudienceSegmentsRequest message. Also converts values to other types if specified. + * @param message ListAudienceSegmentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAudienceSegmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomFieldsRequest to JSON. + * Converts this ListAudienceSegmentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomFieldsRequest + * Gets the default type url for ListAudienceSegmentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomFieldsResponse. */ - interface IListCustomFieldsResponse { + /** Properties of a ListAudienceSegmentsResponse. */ + interface IListAudienceSegmentsResponse { - /** ListCustomFieldsResponse customFields */ - customFields?: (google.ads.admanager.v1.ICustomField[]|null); + /** ListAudienceSegmentsResponse audienceSegments */ + audienceSegments?: (google.ads.admanager.v1.IAudienceSegment[]|null); - /** ListCustomFieldsResponse nextPageToken */ + /** ListAudienceSegmentsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListCustomFieldsResponse totalSize */ + /** ListAudienceSegmentsResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListCustomFieldsResponse. */ - class ListCustomFieldsResponse implements IListCustomFieldsResponse { + /** Represents a ListAudienceSegmentsResponse. */ + class ListAudienceSegmentsResponse implements IListAudienceSegmentsResponse { /** - * Constructs a new ListCustomFieldsResponse. + * Constructs a new ListAudienceSegmentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomFieldsResponse); + constructor(properties?: google.ads.admanager.v1.IListAudienceSegmentsResponse); - /** ListCustomFieldsResponse customFields. */ - public customFields: google.ads.admanager.v1.ICustomField[]; + /** ListAudienceSegmentsResponse audienceSegments. */ + public audienceSegments: google.ads.admanager.v1.IAudienceSegment[]; - /** ListCustomFieldsResponse nextPageToken. */ + /** ListAudienceSegmentsResponse nextPageToken. */ public nextPageToken: string; - /** ListCustomFieldsResponse totalSize. */ + /** ListAudienceSegmentsResponse totalSize. */ public totalSize: number; /** - * Creates a new ListCustomFieldsResponse instance using the specified properties. + * Creates a new ListAudienceSegmentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomFieldsResponse instance + * @returns ListAudienceSegmentsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomFieldsResponse): google.ads.admanager.v1.ListCustomFieldsResponse; + public static create(properties?: google.ads.admanager.v1.IListAudienceSegmentsResponse): google.ads.admanager.v1.ListAudienceSegmentsResponse; /** - * Encodes the specified ListCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. - * @param message ListCustomFieldsResponse message or plain object to encode + * Encodes the specified ListAudienceSegmentsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsResponse.verify|verify} messages. + * @param message ListAudienceSegmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListAudienceSegmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. - * @param message ListCustomFieldsResponse message or plain object to encode + * Encodes the specified ListAudienceSegmentsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsResponse.verify|verify} messages. + * @param message ListAudienceSegmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListAudienceSegmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomFieldsResponse message from the specified reader or buffer. + * Decodes a ListAudienceSegmentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomFieldsResponse + * @returns ListAudienceSegmentsResponse * @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.ads.admanager.v1.ListCustomFieldsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListAudienceSegmentsResponse; /** - * Decodes a ListCustomFieldsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAudienceSegmentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomFieldsResponse + * @returns ListAudienceSegmentsResponse * @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.ads.admanager.v1.ListCustomFieldsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListAudienceSegmentsResponse; /** - * Verifies a ListCustomFieldsResponse message. + * Verifies a ListAudienceSegmentsResponse 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 ListCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAudienceSegmentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomFieldsResponse + * @returns ListAudienceSegmentsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomFieldsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListAudienceSegmentsResponse; /** - * Creates a plain object from a ListCustomFieldsResponse message. Also converts values to other types if specified. - * @param message ListCustomFieldsResponse + * Creates a plain object from a ListAudienceSegmentsResponse message. Also converts values to other types if specified. + * @param message ListAudienceSegmentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListAudienceSegmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomFieldsResponse to JSON. + * Converts this ListAudienceSegmentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomFieldsResponse + * Gets the default type url for ListAudienceSegmentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomFieldValue. */ - interface ICustomFieldValue { + /** Properties of a BandwidthGroup. */ + interface IBandwidthGroup { - /** CustomFieldValue customField */ - customField?: (string|null); + /** BandwidthGroup name */ + name?: (string|null); - /** CustomFieldValue value */ - value?: (google.ads.admanager.v1.CustomFieldValue.IValue|null); + /** BandwidthGroup displayName */ + displayName?: (string|null); } - /** Represents a CustomFieldValue. */ - class CustomFieldValue implements ICustomFieldValue { + /** Represents a BandwidthGroup. */ + class BandwidthGroup implements IBandwidthGroup { /** - * Constructs a new CustomFieldValue. + * Constructs a new BandwidthGroup. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomFieldValue); + constructor(properties?: google.ads.admanager.v1.IBandwidthGroup); - /** CustomFieldValue customField. */ - public customField: string; + /** BandwidthGroup name. */ + public name?: (string|null); - /** CustomFieldValue value. */ - public value?: (google.ads.admanager.v1.CustomFieldValue.IValue|null); + /** BandwidthGroup displayName. */ + public displayName?: (string|null); /** - * Creates a new CustomFieldValue instance using the specified properties. + * Creates a new BandwidthGroup instance using the specified properties. * @param [properties] Properties to set - * @returns CustomFieldValue instance + * @returns BandwidthGroup instance */ - public static create(properties?: google.ads.admanager.v1.ICustomFieldValue): google.ads.admanager.v1.CustomFieldValue; + public static create(properties?: google.ads.admanager.v1.IBandwidthGroup): google.ads.admanager.v1.BandwidthGroup; /** - * Encodes the specified CustomFieldValue message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. - * @param message CustomFieldValue message or plain object to encode + * Encodes the specified BandwidthGroup message. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. + * @param message BandwidthGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomFieldValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBandwidthGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomFieldValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. - * @param message CustomFieldValue message or plain object to encode + * Encodes the specified BandwidthGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. + * @param message BandwidthGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBandwidthGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomFieldValue message from the specified reader or buffer. + * Decodes a BandwidthGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomFieldValue + * @returns BandwidthGroup * @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.ads.admanager.v1.CustomFieldValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BandwidthGroup; /** - * Decodes a CustomFieldValue message from the specified reader or buffer, length delimited. + * Decodes a BandwidthGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomFieldValue + * @returns BandwidthGroup * @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.ads.admanager.v1.CustomFieldValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BandwidthGroup; /** - * Verifies a CustomFieldValue message. + * Verifies a BandwidthGroup 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 CustomFieldValue message from a plain object. Also converts values to their respective internal types. + * Creates a BandwidthGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomFieldValue + * @returns BandwidthGroup */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldValue; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BandwidthGroup; /** - * Creates a plain object from a CustomFieldValue message. Also converts values to other types if specified. - * @param message CustomFieldValue + * Creates a plain object from a BandwidthGroup message. Also converts values to other types if specified. + * @param message BandwidthGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomFieldValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BandwidthGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomFieldValue to JSON. + * Converts this BandwidthGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomFieldValue + * Gets the default type url for BandwidthGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomFieldValue { - - /** Properties of a Value. */ - interface IValue { - - /** Value dropdownValue */ - dropdownValue?: (number|Long|string|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value toggleValue */ - toggleValue?: (boolean|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.CustomFieldValue.IValue); - - /** Value dropdownValue. */ - public dropdownValue?: (number|Long|string|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value toggleValue. */ - public toggleValue?: (boolean|null); - - /** Value value. */ - public value?: ("dropdownValue"|"stringValue"|"numberValue"|"toggleValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.ads.admanager.v1.CustomFieldValue.IValue): google.ads.admanager.v1.CustomFieldValue.Value; + /** Represents a BandwidthGroupService */ + class BandwidthGroupService extends $protobuf.rpc.Service { - /** - * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.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.ads.admanager.v1.CustomFieldValue.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new BandwidthGroupService 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); - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.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.ads.admanager.v1.CustomFieldValue.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates new BandwidthGroupService 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): BandwidthGroupService; - /** - * 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 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.ads.admanager.v1.CustomFieldValue.Value; + /** + * Calls GetBandwidthGroup. + * @param request GetBandwidthGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BandwidthGroup + */ + public getBandwidthGroup(request: google.ads.admanager.v1.IGetBandwidthGroupRequest, callback: google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroupCallback): void; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ads.admanager.v1.CustomFieldValue.Value; + /** + * Calls GetBandwidthGroup. + * @param request GetBandwidthGroupRequest message or plain object + * @returns Promise + */ + public getBandwidthGroup(request: google.ads.admanager.v1.IGetBandwidthGroupRequest): Promise; - /** - * 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); + /** + * Calls ListBandwidthGroups. + * @param request ListBandwidthGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBandwidthGroupsResponse + */ + public listBandwidthGroups(request: google.ads.admanager.v1.IListBandwidthGroupsRequest, callback: google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroupsCallback): void; - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldValue.Value; + /** + * Calls ListBandwidthGroups. + * @param request ListBandwidthGroupsRequest message or plain object + * @returns Promise + */ + public listBandwidthGroups(request: google.ads.admanager.v1.IListBandwidthGroupsRequest): Promise; + } - /** - * 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.ads.admanager.v1.CustomFieldValue.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace BandwidthGroupService { - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|getBandwidthGroup}. + * @param error Error, if any + * @param [response] BandwidthGroup + */ + type GetBandwidthGroupCallback = (error: (Error|null), response?: google.ads.admanager.v1.BandwidthGroup) => void; - /** - * 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; - } + /** + * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|listBandwidthGroups}. + * @param error Error, if any + * @param [response] ListBandwidthGroupsResponse + */ + type ListBandwidthGroupsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListBandwidthGroupsResponse) => void; } - /** Properties of a CustomTargetingKeyStatusEnum. */ - interface ICustomTargetingKeyStatusEnum { + /** Properties of a GetBandwidthGroupRequest. */ + interface IGetBandwidthGroupRequest { + + /** GetBandwidthGroupRequest name */ + name?: (string|null); } - /** Represents a CustomTargetingKeyStatusEnum. */ - class CustomTargetingKeyStatusEnum implements ICustomTargetingKeyStatusEnum { + /** Represents a GetBandwidthGroupRequest. */ + class GetBandwidthGroupRequest implements IGetBandwidthGroupRequest { /** - * Constructs a new CustomTargetingKeyStatusEnum. + * Constructs a new GetBandwidthGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum); + constructor(properties?: google.ads.admanager.v1.IGetBandwidthGroupRequest); + + /** GetBandwidthGroupRequest name. */ + public name: string; /** - * Creates a new CustomTargetingKeyStatusEnum instance using the specified properties. + * Creates a new GetBandwidthGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingKeyStatusEnum instance + * @returns GetBandwidthGroupRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; + public static create(properties?: google.ads.admanager.v1.IGetBandwidthGroupRequest): google.ads.admanager.v1.GetBandwidthGroupRequest; /** - * Encodes the specified CustomTargetingKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. - * @param message CustomTargetingKeyStatusEnum message or plain object to encode + * Encodes the specified GetBandwidthGroupRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. + * @param message GetBandwidthGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetBandwidthGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. - * @param message CustomTargetingKeyStatusEnum message or plain object to encode + * Encodes the specified GetBandwidthGroupRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. + * @param message GetBandwidthGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetBandwidthGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer. + * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingKeyStatusEnum + * @returns GetBandwidthGroupRequest * @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.ads.admanager.v1.CustomTargetingKeyStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetBandwidthGroupRequest; /** - * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingKeyStatusEnum + * @returns GetBandwidthGroupRequest * @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.ads.admanager.v1.CustomTargetingKeyStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetBandwidthGroupRequest; /** - * Verifies a CustomTargetingKeyStatusEnum message. + * Verifies a GetBandwidthGroupRequest 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 CustomTargetingKeyStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetBandwidthGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingKeyStatusEnum + * @returns GetBandwidthGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetBandwidthGroupRequest; /** - * Creates a plain object from a CustomTargetingKeyStatusEnum message. Also converts values to other types if specified. - * @param message CustomTargetingKeyStatusEnum + * Creates a plain object from a GetBandwidthGroupRequest message. Also converts values to other types if specified. + * @param message GetBandwidthGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetBandwidthGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingKeyStatusEnum to JSON. + * Converts this GetBandwidthGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingKeyStatusEnum + * Gets the default type url for GetBandwidthGroupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomTargetingKeyStatusEnum { + /** Properties of a ListBandwidthGroupsRequest. */ + interface IListBandwidthGroupsRequest { - /** CustomTargetingKeyStatus enum. */ - enum CustomTargetingKeyStatus { - CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } + /** ListBandwidthGroupsRequest parent */ + parent?: (string|null); - /** Properties of a CustomTargetingKeyTypeEnum. */ - interface ICustomTargetingKeyTypeEnum { + /** ListBandwidthGroupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBandwidthGroupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBandwidthGroupsRequest filter */ + filter?: (string|null); + + /** ListBandwidthGroupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBandwidthGroupsRequest skip */ + skip?: (number|null); } - /** Represents a CustomTargetingKeyTypeEnum. */ - class CustomTargetingKeyTypeEnum implements ICustomTargetingKeyTypeEnum { + /** Represents a ListBandwidthGroupsRequest. */ + class ListBandwidthGroupsRequest implements IListBandwidthGroupsRequest { /** - * Constructs a new CustomTargetingKeyTypeEnum. + * Constructs a new ListBandwidthGroupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum); + constructor(properties?: google.ads.admanager.v1.IListBandwidthGroupsRequest); + + /** ListBandwidthGroupsRequest parent. */ + public parent: string; + + /** ListBandwidthGroupsRequest pageSize. */ + public pageSize: number; + + /** ListBandwidthGroupsRequest pageToken. */ + public pageToken: string; + + /** ListBandwidthGroupsRequest filter. */ + public filter: string; + + /** ListBandwidthGroupsRequest orderBy. */ + public orderBy: string; + + /** ListBandwidthGroupsRequest skip. */ + public skip: number; /** - * Creates a new CustomTargetingKeyTypeEnum instance using the specified properties. + * Creates a new ListBandwidthGroupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingKeyTypeEnum instance + * @returns ListBandwidthGroupsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum): google.ads.admanager.v1.CustomTargetingKeyTypeEnum; + public static create(properties?: google.ads.admanager.v1.IListBandwidthGroupsRequest): google.ads.admanager.v1.ListBandwidthGroupsRequest; /** - * Encodes the specified CustomTargetingKeyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. - * @param message CustomTargetingKeyTypeEnum message or plain object to encode + * Encodes the specified ListBandwidthGroupsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. + * @param message ListBandwidthGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBandwidthGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingKeyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. - * @param message CustomTargetingKeyTypeEnum message or plain object to encode + * Encodes the specified ListBandwidthGroupsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. + * @param message ListBandwidthGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBandwidthGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer. + * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingKeyTypeEnum + * @returns ListBandwidthGroupsRequest * @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.ads.admanager.v1.CustomTargetingKeyTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBandwidthGroupsRequest; /** - * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingKeyTypeEnum + * @returns ListBandwidthGroupsRequest * @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.ads.admanager.v1.CustomTargetingKeyTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBandwidthGroupsRequest; /** - * Verifies a CustomTargetingKeyTypeEnum message. + * Verifies a ListBandwidthGroupsRequest 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 CustomTargetingKeyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListBandwidthGroupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingKeyTypeEnum + * @returns ListBandwidthGroupsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBandwidthGroupsRequest; /** - * Creates a plain object from a CustomTargetingKeyTypeEnum message. Also converts values to other types if specified. - * @param message CustomTargetingKeyTypeEnum + * Creates a plain object from a ListBandwidthGroupsRequest message. Also converts values to other types if specified. + * @param message ListBandwidthGroupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBandwidthGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingKeyTypeEnum to JSON. + * Converts this ListBandwidthGroupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingKeyTypeEnum + * Gets the default type url for ListBandwidthGroupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomTargetingKeyTypeEnum { + /** Properties of a ListBandwidthGroupsResponse. */ + interface IListBandwidthGroupsResponse { - /** CustomTargetingKeyType enum. */ - enum CustomTargetingKeyType { - CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED = 0, - PREDEFINED = 1, - FREEFORM = 2 - } - } + /** ListBandwidthGroupsResponse bandwidthGroups */ + bandwidthGroups?: (google.ads.admanager.v1.IBandwidthGroup[]|null); - /** Properties of a CustomTargetingKeyReportableTypeEnum. */ - interface ICustomTargetingKeyReportableTypeEnum { + /** ListBandwidthGroupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBandwidthGroupsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a CustomTargetingKeyReportableTypeEnum. */ - class CustomTargetingKeyReportableTypeEnum implements ICustomTargetingKeyReportableTypeEnum { + /** Represents a ListBandwidthGroupsResponse. */ + class ListBandwidthGroupsResponse implements IListBandwidthGroupsResponse { /** - * Constructs a new CustomTargetingKeyReportableTypeEnum. + * Constructs a new ListBandwidthGroupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum); + constructor(properties?: google.ads.admanager.v1.IListBandwidthGroupsResponse); + + /** ListBandwidthGroupsResponse bandwidthGroups. */ + public bandwidthGroups: google.ads.admanager.v1.IBandwidthGroup[]; + + /** ListBandwidthGroupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBandwidthGroupsResponse totalSize. */ + public totalSize: number; /** - * Creates a new CustomTargetingKeyReportableTypeEnum instance using the specified properties. + * Creates a new ListBandwidthGroupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingKeyReportableTypeEnum instance + * @returns ListBandwidthGroupsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; + public static create(properties?: google.ads.admanager.v1.IListBandwidthGroupsResponse): google.ads.admanager.v1.ListBandwidthGroupsResponse; /** - * Encodes the specified CustomTargetingKeyReportableTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. - * @param message CustomTargetingKeyReportableTypeEnum message or plain object to encode + * Encodes the specified ListBandwidthGroupsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. + * @param message ListBandwidthGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBandwidthGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingKeyReportableTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. - * @param message CustomTargetingKeyReportableTypeEnum message or plain object to encode + * Encodes the specified ListBandwidthGroupsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. + * @param message ListBandwidthGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBandwidthGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer. + * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingKeyReportableTypeEnum + * @returns ListBandwidthGroupsResponse * @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.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBandwidthGroupsResponse; /** - * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingKeyReportableTypeEnum + * @returns ListBandwidthGroupsResponse * @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.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBandwidthGroupsResponse; /** - * Verifies a CustomTargetingKeyReportableTypeEnum message. + * Verifies a ListBandwidthGroupsResponse 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 CustomTargetingKeyReportableTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListBandwidthGroupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingKeyReportableTypeEnum + * @returns ListBandwidthGroupsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBandwidthGroupsResponse; /** - * Creates a plain object from a CustomTargetingKeyReportableTypeEnum message. Also converts values to other types if specified. - * @param message CustomTargetingKeyReportableTypeEnum + * Creates a plain object from a ListBandwidthGroupsResponse message. Also converts values to other types if specified. + * @param message ListBandwidthGroupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBandwidthGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingKeyReportableTypeEnum to JSON. + * Converts this ListBandwidthGroupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingKeyReportableTypeEnum + * Gets the default type url for ListBandwidthGroupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomTargetingKeyReportableTypeEnum { - - /** CustomTargetingKeyReportableType enum. */ - enum CustomTargetingKeyReportableType { - CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED = 0, - OFF = 1, - ON = 2, - CUSTOM_DIMENSION = 3 - } - } - - /** Properties of a CustomTargetingKey. */ - interface ICustomTargetingKey { + /** Properties of a BrowserLanguage. */ + interface IBrowserLanguage { - /** CustomTargetingKey name */ + /** BrowserLanguage name */ name?: (string|null); - /** CustomTargetingKey customTargetingKeyId */ - customTargetingKeyId?: (number|Long|string|null); - - /** CustomTargetingKey adTagName */ - adTagName?: (string|null); - - /** CustomTargetingKey displayName */ + /** BrowserLanguage displayName */ displayName?: (string|null); - - /** CustomTargetingKey type */ - type?: (google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null); - - /** CustomTargetingKey status */ - status?: (google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|keyof typeof google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null); - - /** CustomTargetingKey reportableType */ - reportableType?: (google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null); } - /** Represents a CustomTargetingKey. */ - class CustomTargetingKey implements ICustomTargetingKey { + /** Represents a BrowserLanguage. */ + class BrowserLanguage implements IBrowserLanguage { /** - * Constructs a new CustomTargetingKey. + * Constructs a new BrowserLanguage. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingKey); + constructor(properties?: google.ads.admanager.v1.IBrowserLanguage); - /** CustomTargetingKey name. */ + /** BrowserLanguage name. */ public name: string; - /** CustomTargetingKey customTargetingKeyId. */ - public customTargetingKeyId: (number|Long|string); - - /** CustomTargetingKey adTagName. */ - public adTagName: string; - - /** CustomTargetingKey displayName. */ - public displayName: string; - - /** CustomTargetingKey type. */ - public type: (google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType); - - /** CustomTargetingKey status. */ - public status: (google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|keyof typeof google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus); - - /** CustomTargetingKey reportableType. */ - public reportableType: (google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType); + /** BrowserLanguage displayName. */ + public displayName?: (string|null); /** - * Creates a new CustomTargetingKey instance using the specified properties. + * Creates a new BrowserLanguage instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingKey instance + * @returns BrowserLanguage instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingKey): google.ads.admanager.v1.CustomTargetingKey; + public static create(properties?: google.ads.admanager.v1.IBrowserLanguage): google.ads.admanager.v1.BrowserLanguage; /** - * Encodes the specified CustomTargetingKey message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. - * @param message CustomTargetingKey message or plain object to encode + * Encodes the specified BrowserLanguage message. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguage.verify|verify} messages. + * @param message BrowserLanguage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBrowserLanguage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. - * @param message CustomTargetingKey message or plain object to encode + * Encodes the specified BrowserLanguage message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguage.verify|verify} messages. + * @param message BrowserLanguage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBrowserLanguage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingKey message from the specified reader or buffer. + * Decodes a BrowserLanguage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingKey + * @returns BrowserLanguage * @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.ads.admanager.v1.CustomTargetingKey; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BrowserLanguage; /** - * Decodes a CustomTargetingKey message from the specified reader or buffer, length delimited. + * Decodes a BrowserLanguage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingKey + * @returns BrowserLanguage * @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.ads.admanager.v1.CustomTargetingKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BrowserLanguage; /** - * Verifies a CustomTargetingKey message. + * Verifies a BrowserLanguage 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 CustomTargetingKey message from a plain object. Also converts values to their respective internal types. + * Creates a BrowserLanguage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingKey + * @returns BrowserLanguage */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKey; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BrowserLanguage; /** - * Creates a plain object from a CustomTargetingKey message. Also converts values to other types if specified. - * @param message CustomTargetingKey + * Creates a plain object from a BrowserLanguage message. Also converts values to other types if specified. + * @param message BrowserLanguage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BrowserLanguage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingKey to JSON. + * Converts this BrowserLanguage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingKey + * Gets the default type url for BrowserLanguage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a CustomTargetingKeyService */ - class CustomTargetingKeyService extends $protobuf.rpc.Service { + /** Represents a BrowserLanguageService */ + class BrowserLanguageService extends $protobuf.rpc.Service { /** - * Constructs a new CustomTargetingKeyService service. + * Constructs a new BrowserLanguageService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -6464,1334 +6096,1122 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new CustomTargetingKeyService service using the specified rpc implementation. + * Creates new BrowserLanguageService 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): CustomTargetingKeyService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BrowserLanguageService; /** - * Calls GetCustomTargetingKey. - * @param request GetCustomTargetingKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CustomTargetingKey + * Calls GetBrowserLanguage. + * @param request GetBrowserLanguageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BrowserLanguage */ - public getCustomTargetingKey(request: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, callback: google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKeyCallback): void; + public getBrowserLanguage(request: google.ads.admanager.v1.IGetBrowserLanguageRequest, callback: google.ads.admanager.v1.BrowserLanguageService.GetBrowserLanguageCallback): void; /** - * Calls GetCustomTargetingKey. - * @param request GetCustomTargetingKeyRequest message or plain object + * Calls GetBrowserLanguage. + * @param request GetBrowserLanguageRequest message or plain object * @returns Promise */ - public getCustomTargetingKey(request: google.ads.admanager.v1.IGetCustomTargetingKeyRequest): Promise; + public getBrowserLanguage(request: google.ads.admanager.v1.IGetBrowserLanguageRequest): Promise; /** - * Calls ListCustomTargetingKeys. - * @param request ListCustomTargetingKeysRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCustomTargetingKeysResponse + * Calls ListBrowserLanguages. + * @param request ListBrowserLanguagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBrowserLanguagesResponse */ - public listCustomTargetingKeys(request: google.ads.admanager.v1.IListCustomTargetingKeysRequest, callback: google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeysCallback): void; + public listBrowserLanguages(request: google.ads.admanager.v1.IListBrowserLanguagesRequest, callback: google.ads.admanager.v1.BrowserLanguageService.ListBrowserLanguagesCallback): void; /** - * Calls ListCustomTargetingKeys. - * @param request ListCustomTargetingKeysRequest message or plain object + * Calls ListBrowserLanguages. + * @param request ListBrowserLanguagesRequest message or plain object * @returns Promise */ - public listCustomTargetingKeys(request: google.ads.admanager.v1.IListCustomTargetingKeysRequest): Promise; + public listBrowserLanguages(request: google.ads.admanager.v1.IListBrowserLanguagesRequest): Promise; } - namespace CustomTargetingKeyService { + namespace BrowserLanguageService { /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|getCustomTargetingKey}. + * Callback as used by {@link google.ads.admanager.v1.BrowserLanguageService|getBrowserLanguage}. * @param error Error, if any - * @param [response] CustomTargetingKey + * @param [response] BrowserLanguage */ - type GetCustomTargetingKeyCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomTargetingKey) => void; + type GetBrowserLanguageCallback = (error: (Error|null), response?: google.ads.admanager.v1.BrowserLanguage) => void; /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|listCustomTargetingKeys}. + * Callback as used by {@link google.ads.admanager.v1.BrowserLanguageService|listBrowserLanguages}. * @param error Error, if any - * @param [response] ListCustomTargetingKeysResponse + * @param [response] ListBrowserLanguagesResponse */ - type ListCustomTargetingKeysCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomTargetingKeysResponse) => void; + type ListBrowserLanguagesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListBrowserLanguagesResponse) => void; } - /** Properties of a GetCustomTargetingKeyRequest. */ - interface IGetCustomTargetingKeyRequest { + /** Properties of a GetBrowserLanguageRequest. */ + interface IGetBrowserLanguageRequest { - /** GetCustomTargetingKeyRequest name */ + /** GetBrowserLanguageRequest name */ name?: (string|null); } - /** Represents a GetCustomTargetingKeyRequest. */ - class GetCustomTargetingKeyRequest implements IGetCustomTargetingKeyRequest { + /** Represents a GetBrowserLanguageRequest. */ + class GetBrowserLanguageRequest implements IGetBrowserLanguageRequest { /** - * Constructs a new GetCustomTargetingKeyRequest. + * Constructs a new GetBrowserLanguageRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetCustomTargetingKeyRequest); + constructor(properties?: google.ads.admanager.v1.IGetBrowserLanguageRequest); - /** GetCustomTargetingKeyRequest name. */ + /** GetBrowserLanguageRequest name. */ public name: string; /** - * Creates a new GetCustomTargetingKeyRequest instance using the specified properties. + * Creates a new GetBrowserLanguageRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCustomTargetingKeyRequest instance + * @returns GetBrowserLanguageRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetCustomTargetingKeyRequest): google.ads.admanager.v1.GetCustomTargetingKeyRequest; + public static create(properties?: google.ads.admanager.v1.IGetBrowserLanguageRequest): google.ads.admanager.v1.GetBrowserLanguageRequest; /** - * Encodes the specified GetCustomTargetingKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. - * @param message GetCustomTargetingKeyRequest message or plain object to encode + * Encodes the specified GetBrowserLanguageRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBrowserLanguageRequest.verify|verify} messages. + * @param message GetBrowserLanguageRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetBrowserLanguageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCustomTargetingKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. - * @param message GetCustomTargetingKeyRequest message or plain object to encode + * Encodes the specified GetBrowserLanguageRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBrowserLanguageRequest.verify|verify} messages. + * @param message GetBrowserLanguageRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetBrowserLanguageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer. + * Decodes a GetBrowserLanguageRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCustomTargetingKeyRequest + * @returns GetBrowserLanguageRequest * @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.ads.admanager.v1.GetCustomTargetingKeyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetBrowserLanguageRequest; /** - * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBrowserLanguageRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCustomTargetingKeyRequest + * @returns GetBrowserLanguageRequest * @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.ads.admanager.v1.GetCustomTargetingKeyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetBrowserLanguageRequest; /** - * Verifies a GetCustomTargetingKeyRequest message. + * Verifies a GetBrowserLanguageRequest 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 GetCustomTargetingKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBrowserLanguageRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCustomTargetingKeyRequest + * @returns GetBrowserLanguageRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomTargetingKeyRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetBrowserLanguageRequest; /** - * Creates a plain object from a GetCustomTargetingKeyRequest message. Also converts values to other types if specified. - * @param message GetCustomTargetingKeyRequest + * Creates a plain object from a GetBrowserLanguageRequest message. Also converts values to other types if specified. + * @param message GetBrowserLanguageRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetCustomTargetingKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetBrowserLanguageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCustomTargetingKeyRequest to JSON. + * Converts this GetBrowserLanguageRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCustomTargetingKeyRequest + * Gets the default type url for GetBrowserLanguageRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomTargetingKeysRequest. */ - interface IListCustomTargetingKeysRequest { + /** Properties of a ListBrowserLanguagesRequest. */ + interface IListBrowserLanguagesRequest { - /** ListCustomTargetingKeysRequest parent */ + /** ListBrowserLanguagesRequest parent */ parent?: (string|null); - /** ListCustomTargetingKeysRequest pageSize */ + /** ListBrowserLanguagesRequest pageSize */ pageSize?: (number|null); - /** ListCustomTargetingKeysRequest pageToken */ + /** ListBrowserLanguagesRequest pageToken */ pageToken?: (string|null); - /** ListCustomTargetingKeysRequest filter */ + /** ListBrowserLanguagesRequest filter */ filter?: (string|null); - /** ListCustomTargetingKeysRequest orderBy */ + /** ListBrowserLanguagesRequest orderBy */ orderBy?: (string|null); - /** ListCustomTargetingKeysRequest skip */ + /** ListBrowserLanguagesRequest skip */ skip?: (number|null); } - /** Represents a ListCustomTargetingKeysRequest. */ - class ListCustomTargetingKeysRequest implements IListCustomTargetingKeysRequest { + /** Represents a ListBrowserLanguagesRequest. */ + class ListBrowserLanguagesRequest implements IListBrowserLanguagesRequest { /** - * Constructs a new ListCustomTargetingKeysRequest. + * Constructs a new ListBrowserLanguagesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomTargetingKeysRequest); + constructor(properties?: google.ads.admanager.v1.IListBrowserLanguagesRequest); - /** ListCustomTargetingKeysRequest parent. */ + /** ListBrowserLanguagesRequest parent. */ public parent: string; - /** ListCustomTargetingKeysRequest pageSize. */ + /** ListBrowserLanguagesRequest pageSize. */ public pageSize: number; - /** ListCustomTargetingKeysRequest pageToken. */ + /** ListBrowserLanguagesRequest pageToken. */ public pageToken: string; - /** ListCustomTargetingKeysRequest filter. */ + /** ListBrowserLanguagesRequest filter. */ public filter: string; - /** ListCustomTargetingKeysRequest orderBy. */ + /** ListBrowserLanguagesRequest orderBy. */ public orderBy: string; - /** ListCustomTargetingKeysRequest skip. */ + /** ListBrowserLanguagesRequest skip. */ public skip: number; /** - * Creates a new ListCustomTargetingKeysRequest instance using the specified properties. + * Creates a new ListBrowserLanguagesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomTargetingKeysRequest instance + * @returns ListBrowserLanguagesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomTargetingKeysRequest): google.ads.admanager.v1.ListCustomTargetingKeysRequest; + public static create(properties?: google.ads.admanager.v1.IListBrowserLanguagesRequest): google.ads.admanager.v1.ListBrowserLanguagesRequest; /** - * Encodes the specified ListCustomTargetingKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. - * @param message ListCustomTargetingKeysRequest message or plain object to encode + * Encodes the specified ListBrowserLanguagesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesRequest.verify|verify} messages. + * @param message ListBrowserLanguagesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomTargetingKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBrowserLanguagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomTargetingKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. - * @param message ListCustomTargetingKeysRequest message or plain object to encode + * Encodes the specified ListBrowserLanguagesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesRequest.verify|verify} messages. + * @param message ListBrowserLanguagesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBrowserLanguagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer. + * Decodes a ListBrowserLanguagesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomTargetingKeysRequest + * @returns ListBrowserLanguagesRequest * @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.ads.admanager.v1.ListCustomTargetingKeysRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBrowserLanguagesRequest; /** - * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBrowserLanguagesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomTargetingKeysRequest + * @returns ListBrowserLanguagesRequest * @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.ads.admanager.v1.ListCustomTargetingKeysRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBrowserLanguagesRequest; /** - * Verifies a ListCustomTargetingKeysRequest message. + * Verifies a ListBrowserLanguagesRequest 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 ListCustomTargetingKeysRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowserLanguagesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomTargetingKeysRequest + * @returns ListBrowserLanguagesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingKeysRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBrowserLanguagesRequest; /** - * Creates a plain object from a ListCustomTargetingKeysRequest message. Also converts values to other types if specified. - * @param message ListCustomTargetingKeysRequest + * Creates a plain object from a ListBrowserLanguagesRequest message. Also converts values to other types if specified. + * @param message ListBrowserLanguagesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomTargetingKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBrowserLanguagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomTargetingKeysRequest to JSON. + * Converts this ListBrowserLanguagesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomTargetingKeysRequest + * Gets the default type url for ListBrowserLanguagesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomTargetingKeysResponse. */ - interface IListCustomTargetingKeysResponse { + /** Properties of a ListBrowserLanguagesResponse. */ + interface IListBrowserLanguagesResponse { - /** ListCustomTargetingKeysResponse customTargetingKeys */ - customTargetingKeys?: (google.ads.admanager.v1.ICustomTargetingKey[]|null); + /** ListBrowserLanguagesResponse browserLanguages */ + browserLanguages?: (google.ads.admanager.v1.IBrowserLanguage[]|null); - /** ListCustomTargetingKeysResponse nextPageToken */ + /** ListBrowserLanguagesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListCustomTargetingKeysResponse totalSize */ + /** ListBrowserLanguagesResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListCustomTargetingKeysResponse. */ - class ListCustomTargetingKeysResponse implements IListCustomTargetingKeysResponse { + /** Represents a ListBrowserLanguagesResponse. */ + class ListBrowserLanguagesResponse implements IListBrowserLanguagesResponse { /** - * Constructs a new ListCustomTargetingKeysResponse. + * Constructs a new ListBrowserLanguagesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomTargetingKeysResponse); + constructor(properties?: google.ads.admanager.v1.IListBrowserLanguagesResponse); - /** ListCustomTargetingKeysResponse customTargetingKeys. */ - public customTargetingKeys: google.ads.admanager.v1.ICustomTargetingKey[]; + /** ListBrowserLanguagesResponse browserLanguages. */ + public browserLanguages: google.ads.admanager.v1.IBrowserLanguage[]; - /** ListCustomTargetingKeysResponse nextPageToken. */ + /** ListBrowserLanguagesResponse nextPageToken. */ public nextPageToken: string; - /** ListCustomTargetingKeysResponse totalSize. */ + /** ListBrowserLanguagesResponse totalSize. */ public totalSize: number; /** - * Creates a new ListCustomTargetingKeysResponse instance using the specified properties. + * Creates a new ListBrowserLanguagesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomTargetingKeysResponse instance + * @returns ListBrowserLanguagesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomTargetingKeysResponse): google.ads.admanager.v1.ListCustomTargetingKeysResponse; + public static create(properties?: google.ads.admanager.v1.IListBrowserLanguagesResponse): google.ads.admanager.v1.ListBrowserLanguagesResponse; /** - * Encodes the specified ListCustomTargetingKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. - * @param message ListCustomTargetingKeysResponse message or plain object to encode + * Encodes the specified ListBrowserLanguagesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesResponse.verify|verify} messages. + * @param message ListBrowserLanguagesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomTargetingKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBrowserLanguagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomTargetingKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. - * @param message ListCustomTargetingKeysResponse message or plain object to encode + * Encodes the specified ListBrowserLanguagesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesResponse.verify|verify} messages. + * @param message ListBrowserLanguagesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBrowserLanguagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer. + * Decodes a ListBrowserLanguagesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomTargetingKeysResponse + * @returns ListBrowserLanguagesResponse * @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.ads.admanager.v1.ListCustomTargetingKeysResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBrowserLanguagesResponse; /** - * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer, length delimited. + * Decodes a ListBrowserLanguagesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomTargetingKeysResponse + * @returns ListBrowserLanguagesResponse * @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.ads.admanager.v1.ListCustomTargetingKeysResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBrowserLanguagesResponse; /** - * Verifies a ListCustomTargetingKeysResponse message. + * Verifies a ListBrowserLanguagesResponse 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 ListCustomTargetingKeysResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowserLanguagesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomTargetingKeysResponse + * @returns ListBrowserLanguagesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingKeysResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBrowserLanguagesResponse; /** - * Creates a plain object from a ListCustomTargetingKeysResponse message. Also converts values to other types if specified. - * @param message ListCustomTargetingKeysResponse + * Creates a plain object from a ListBrowserLanguagesResponse message. Also converts values to other types if specified. + * @param message ListBrowserLanguagesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomTargetingKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBrowserLanguagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomTargetingKeysResponse to JSON. + * Converts this ListBrowserLanguagesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomTargetingKeysResponse + * Gets the default type url for ListBrowserLanguagesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomTargetingValueStatusEnum. */ - interface ICustomTargetingValueStatusEnum { + /** Properties of a Browser. */ + interface IBrowser { + + /** Browser name */ + name?: (string|null); + + /** Browser displayName */ + displayName?: (string|null); + + /** Browser majorVersion */ + majorVersion?: (string|null); + + /** Browser minorVersion */ + minorVersion?: (string|null); } - /** Represents a CustomTargetingValueStatusEnum. */ - class CustomTargetingValueStatusEnum implements ICustomTargetingValueStatusEnum { + /** Represents a Browser. */ + class Browser implements IBrowser { /** - * Constructs a new CustomTargetingValueStatusEnum. + * Constructs a new Browser. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingValueStatusEnum); + constructor(properties?: google.ads.admanager.v1.IBrowser); + + /** Browser name. */ + public name: string; + + /** Browser displayName. */ + public displayName?: (string|null); + + /** Browser majorVersion. */ + public majorVersion?: (string|null); + + /** Browser minorVersion. */ + public minorVersion?: (string|null); /** - * Creates a new CustomTargetingValueStatusEnum instance using the specified properties. + * Creates a new Browser instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingValueStatusEnum instance + * @returns Browser instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingValueStatusEnum): google.ads.admanager.v1.CustomTargetingValueStatusEnum; + public static create(properties?: google.ads.admanager.v1.IBrowser): google.ads.admanager.v1.Browser; /** - * Encodes the specified CustomTargetingValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. - * @param message CustomTargetingValueStatusEnum message or plain object to encode + * Encodes the specified Browser message. Does not implicitly {@link google.ads.admanager.v1.Browser.verify|verify} messages. + * @param message Browser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBrowser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. - * @param message CustomTargetingValueStatusEnum message or plain object to encode + * Encodes the specified Browser message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Browser.verify|verify} messages. + * @param message Browser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBrowser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer. + * Decodes a Browser message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingValueStatusEnum + * @returns Browser * @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.ads.admanager.v1.CustomTargetingValueStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Browser; /** - * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a Browser message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingValueStatusEnum + * @returns Browser * @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.ads.admanager.v1.CustomTargetingValueStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Browser; /** - * Verifies a CustomTargetingValueStatusEnum message. + * Verifies a Browser 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 CustomTargetingValueStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a Browser message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingValueStatusEnum + * @returns Browser */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValueStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Browser; /** - * Creates a plain object from a CustomTargetingValueStatusEnum message. Also converts values to other types if specified. - * @param message CustomTargetingValueStatusEnum + * Creates a plain object from a Browser message. Also converts values to other types if specified. + * @param message Browser * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingValueStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Browser, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingValueStatusEnum to JSON. + * Converts this Browser to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingValueStatusEnum + * Gets the default type url for Browser * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomTargetingValueStatusEnum { - - /** CustomTargetingValueStatus enum. */ - enum CustomTargetingValueStatus { - CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } - - /** Properties of a CustomTargetingValueMatchTypeEnum. */ - interface ICustomTargetingValueMatchTypeEnum { - } + /** Represents a BrowserService */ + class BrowserService extends $protobuf.rpc.Service { - /** Represents a CustomTargetingValueMatchTypeEnum. */ - class CustomTargetingValueMatchTypeEnum implements ICustomTargetingValueMatchTypeEnum { + /** + * Constructs a new BrowserService 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); /** - * Constructs a new CustomTargetingValueMatchTypeEnum. - * @param [properties] Properties to set + * Creates new BrowserService 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. */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum); + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BrowserService; /** - * Creates a new CustomTargetingValueMatchTypeEnum instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomTargetingValueMatchTypeEnum instance + * Calls GetBrowser. + * @param request GetBrowserRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Browser */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; + public getBrowser(request: google.ads.admanager.v1.IGetBrowserRequest, callback: google.ads.admanager.v1.BrowserService.GetBrowserCallback): void; /** - * Encodes the specified CustomTargetingValueMatchTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. - * @param message CustomTargetingValueMatchTypeEnum message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomTargetingValueMatchTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. - * @param message CustomTargetingValueMatchTypeEnum message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomTargetingValueMatchTypeEnum - * @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.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; - - /** - * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomTargetingValueMatchTypeEnum - * @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.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; - - /** - * Verifies a CustomTargetingValueMatchTypeEnum 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 CustomTargetingValueMatchTypeEnum message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomTargetingValueMatchTypeEnum - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; - - /** - * Creates a plain object from a CustomTargetingValueMatchTypeEnum message. Also converts values to other types if specified. - * @param message CustomTargetingValueMatchTypeEnum - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomTargetingValueMatchTypeEnum to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomTargetingValueMatchTypeEnum - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CustomTargetingValueMatchTypeEnum { - - /** CustomTargetingValueMatchType enum. */ - enum CustomTargetingValueMatchType { - CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - BROAD = 2, - PREFIX = 3, - BROAD_PREFIX = 4, - SUFFIX = 5, - CONTAINS = 6 - } - } - - /** Properties of a CustomTargetingValue. */ - interface ICustomTargetingValue { - - /** CustomTargetingValue name */ - name?: (string|null); - - /** CustomTargetingValue customTargetingKey */ - customTargetingKey?: (string|null); - - /** CustomTargetingValue adTagName */ - adTagName?: (string|null); - - /** CustomTargetingValue displayName */ - displayName?: (string|null); - - /** CustomTargetingValue matchType */ - matchType?: (google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|keyof typeof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null); - - /** CustomTargetingValue status */ - status?: (google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|keyof typeof google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null); - } - - /** Represents a CustomTargetingValue. */ - class CustomTargetingValue implements ICustomTargetingValue { - - /** - * Constructs a new CustomTargetingValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingValue); - - /** CustomTargetingValue name. */ - public name: string; - - /** CustomTargetingValue customTargetingKey. */ - public customTargetingKey: string; - - /** CustomTargetingValue adTagName. */ - public adTagName: string; - - /** CustomTargetingValue displayName. */ - public displayName: string; - - /** CustomTargetingValue matchType. */ - public matchType: (google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|keyof typeof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType); - - /** CustomTargetingValue status. */ - public status: (google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|keyof typeof google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus); - - /** - * Creates a new CustomTargetingValue instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomTargetingValue instance - */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingValue): google.ads.admanager.v1.CustomTargetingValue; - - /** - * Encodes the specified CustomTargetingValue message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. - * @param message CustomTargetingValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomTargetingValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. - * @param message CustomTargetingValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomTargetingValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomTargetingValue - * @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.ads.admanager.v1.CustomTargetingValue; - - /** - * Decodes a CustomTargetingValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomTargetingValue - * @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.ads.admanager.v1.CustomTargetingValue; - - /** - * Verifies a CustomTargetingValue 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 CustomTargetingValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomTargetingValue - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValue; - - /** - * Creates a plain object from a CustomTargetingValue message. Also converts values to other types if specified. - * @param message CustomTargetingValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomTargetingValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomTargetingValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a CustomTargetingValueService */ - class CustomTargetingValueService extends $protobuf.rpc.Service { - - /** - * Constructs a new CustomTargetingValueService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new CustomTargetingValueService 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): CustomTargetingValueService; - - /** - * Calls GetCustomTargetingValue. - * @param request GetCustomTargetingValueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CustomTargetingValue - */ - public getCustomTargetingValue(request: google.ads.admanager.v1.IGetCustomTargetingValueRequest, callback: google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValueCallback): void; - - /** - * Calls GetCustomTargetingValue. - * @param request GetCustomTargetingValueRequest message or plain object + * Calls GetBrowser. + * @param request GetBrowserRequest message or plain object * @returns Promise */ - public getCustomTargetingValue(request: google.ads.admanager.v1.IGetCustomTargetingValueRequest): Promise; + public getBrowser(request: google.ads.admanager.v1.IGetBrowserRequest): Promise; /** - * Calls ListCustomTargetingValues. - * @param request ListCustomTargetingValuesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCustomTargetingValuesResponse + * Calls ListBrowsers. + * @param request ListBrowsersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBrowsersResponse */ - public listCustomTargetingValues(request: google.ads.admanager.v1.IListCustomTargetingValuesRequest, callback: google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValuesCallback): void; + public listBrowsers(request: google.ads.admanager.v1.IListBrowsersRequest, callback: google.ads.admanager.v1.BrowserService.ListBrowsersCallback): void; /** - * Calls ListCustomTargetingValues. - * @param request ListCustomTargetingValuesRequest message or plain object + * Calls ListBrowsers. + * @param request ListBrowsersRequest message or plain object * @returns Promise */ - public listCustomTargetingValues(request: google.ads.admanager.v1.IListCustomTargetingValuesRequest): Promise; + public listBrowsers(request: google.ads.admanager.v1.IListBrowsersRequest): Promise; } - namespace CustomTargetingValueService { + namespace BrowserService { /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|getCustomTargetingValue}. + * Callback as used by {@link google.ads.admanager.v1.BrowserService|getBrowser}. * @param error Error, if any - * @param [response] CustomTargetingValue + * @param [response] Browser */ - type GetCustomTargetingValueCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomTargetingValue) => void; + type GetBrowserCallback = (error: (Error|null), response?: google.ads.admanager.v1.Browser) => void; /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|listCustomTargetingValues}. + * Callback as used by {@link google.ads.admanager.v1.BrowserService|listBrowsers}. * @param error Error, if any - * @param [response] ListCustomTargetingValuesResponse + * @param [response] ListBrowsersResponse */ - type ListCustomTargetingValuesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomTargetingValuesResponse) => void; + type ListBrowsersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListBrowsersResponse) => void; } - /** Properties of a GetCustomTargetingValueRequest. */ - interface IGetCustomTargetingValueRequest { + /** Properties of a GetBrowserRequest. */ + interface IGetBrowserRequest { - /** GetCustomTargetingValueRequest name */ + /** GetBrowserRequest name */ name?: (string|null); } - /** Represents a GetCustomTargetingValueRequest. */ - class GetCustomTargetingValueRequest implements IGetCustomTargetingValueRequest { + /** Represents a GetBrowserRequest. */ + class GetBrowserRequest implements IGetBrowserRequest { /** - * Constructs a new GetCustomTargetingValueRequest. + * Constructs a new GetBrowserRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetCustomTargetingValueRequest); + constructor(properties?: google.ads.admanager.v1.IGetBrowserRequest); - /** GetCustomTargetingValueRequest name. */ + /** GetBrowserRequest name. */ public name: string; /** - * Creates a new GetCustomTargetingValueRequest instance using the specified properties. + * Creates a new GetBrowserRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetCustomTargetingValueRequest instance + * @returns GetBrowserRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetCustomTargetingValueRequest): google.ads.admanager.v1.GetCustomTargetingValueRequest; + public static create(properties?: google.ads.admanager.v1.IGetBrowserRequest): google.ads.admanager.v1.GetBrowserRequest; /** - * Encodes the specified GetCustomTargetingValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. - * @param message GetCustomTargetingValueRequest message or plain object to encode + * Encodes the specified GetBrowserRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBrowserRequest.verify|verify} messages. + * @param message GetBrowserRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetCustomTargetingValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetBrowserRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCustomTargetingValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. - * @param message GetCustomTargetingValueRequest message or plain object to encode + * Encodes the specified GetBrowserRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBrowserRequest.verify|verify} messages. + * @param message GetBrowserRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomTargetingValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetBrowserRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer. + * Decodes a GetBrowserRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCustomTargetingValueRequest + * @returns GetBrowserRequest * @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.ads.admanager.v1.GetCustomTargetingValueRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetBrowserRequest; /** - * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBrowserRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCustomTargetingValueRequest + * @returns GetBrowserRequest * @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.ads.admanager.v1.GetCustomTargetingValueRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetBrowserRequest; /** - * Verifies a GetCustomTargetingValueRequest message. + * Verifies a GetBrowserRequest 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 GetCustomTargetingValueRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBrowserRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCustomTargetingValueRequest + * @returns GetBrowserRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomTargetingValueRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetBrowserRequest; /** - * Creates a plain object from a GetCustomTargetingValueRequest message. Also converts values to other types if specified. - * @param message GetCustomTargetingValueRequest + * Creates a plain object from a GetBrowserRequest message. Also converts values to other types if specified. + * @param message GetBrowserRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetCustomTargetingValueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetBrowserRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCustomTargetingValueRequest to JSON. + * Converts this GetBrowserRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCustomTargetingValueRequest + * Gets the default type url for GetBrowserRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomTargetingValuesRequest. */ - interface IListCustomTargetingValuesRequest { + /** Properties of a ListBrowsersRequest. */ + interface IListBrowsersRequest { - /** ListCustomTargetingValuesRequest parent */ + /** ListBrowsersRequest parent */ parent?: (string|null); - /** ListCustomTargetingValuesRequest pageSize */ + /** ListBrowsersRequest pageSize */ pageSize?: (number|null); - /** ListCustomTargetingValuesRequest pageToken */ + /** ListBrowsersRequest pageToken */ pageToken?: (string|null); - /** ListCustomTargetingValuesRequest filter */ + /** ListBrowsersRequest filter */ filter?: (string|null); - /** ListCustomTargetingValuesRequest orderBy */ + /** ListBrowsersRequest orderBy */ orderBy?: (string|null); - /** ListCustomTargetingValuesRequest skip */ + /** ListBrowsersRequest skip */ skip?: (number|null); } - /** Represents a ListCustomTargetingValuesRequest. */ - class ListCustomTargetingValuesRequest implements IListCustomTargetingValuesRequest { + /** Represents a ListBrowsersRequest. */ + class ListBrowsersRequest implements IListBrowsersRequest { /** - * Constructs a new ListCustomTargetingValuesRequest. + * Constructs a new ListBrowsersRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomTargetingValuesRequest); + constructor(properties?: google.ads.admanager.v1.IListBrowsersRequest); - /** ListCustomTargetingValuesRequest parent. */ + /** ListBrowsersRequest parent. */ public parent: string; - /** ListCustomTargetingValuesRequest pageSize. */ + /** ListBrowsersRequest pageSize. */ public pageSize: number; - /** ListCustomTargetingValuesRequest pageToken. */ + /** ListBrowsersRequest pageToken. */ public pageToken: string; - /** ListCustomTargetingValuesRequest filter. */ + /** ListBrowsersRequest filter. */ public filter: string; - /** ListCustomTargetingValuesRequest orderBy. */ + /** ListBrowsersRequest orderBy. */ public orderBy: string; - /** ListCustomTargetingValuesRequest skip. */ + /** ListBrowsersRequest skip. */ public skip: number; /** - * Creates a new ListCustomTargetingValuesRequest instance using the specified properties. + * Creates a new ListBrowsersRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomTargetingValuesRequest instance + * @returns ListBrowsersRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomTargetingValuesRequest): google.ads.admanager.v1.ListCustomTargetingValuesRequest; + public static create(properties?: google.ads.admanager.v1.IListBrowsersRequest): google.ads.admanager.v1.ListBrowsersRequest; /** - * Encodes the specified ListCustomTargetingValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. - * @param message ListCustomTargetingValuesRequest message or plain object to encode + * Encodes the specified ListBrowsersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersRequest.verify|verify} messages. + * @param message ListBrowsersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomTargetingValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBrowsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomTargetingValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. - * @param message ListCustomTargetingValuesRequest message or plain object to encode + * Encodes the specified ListBrowsersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersRequest.verify|verify} messages. + * @param message ListBrowsersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBrowsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer. + * Decodes a ListBrowsersRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomTargetingValuesRequest + * @returns ListBrowsersRequest * @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.ads.admanager.v1.ListCustomTargetingValuesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBrowsersRequest; /** - * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBrowsersRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomTargetingValuesRequest + * @returns ListBrowsersRequest * @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.ads.admanager.v1.ListCustomTargetingValuesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBrowsersRequest; /** - * Verifies a ListCustomTargetingValuesRequest message. + * Verifies a ListBrowsersRequest 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 ListCustomTargetingValuesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowsersRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomTargetingValuesRequest + * @returns ListBrowsersRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingValuesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBrowsersRequest; /** - * Creates a plain object from a ListCustomTargetingValuesRequest message. Also converts values to other types if specified. - * @param message ListCustomTargetingValuesRequest + * Creates a plain object from a ListBrowsersRequest message. Also converts values to other types if specified. + * @param message ListBrowsersRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomTargetingValuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBrowsersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomTargetingValuesRequest to JSON. + * Converts this ListBrowsersRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomTargetingValuesRequest + * Gets the default type url for ListBrowsersRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCustomTargetingValuesResponse. */ - interface IListCustomTargetingValuesResponse { + /** Properties of a ListBrowsersResponse. */ + interface IListBrowsersResponse { - /** ListCustomTargetingValuesResponse customTargetingValues */ - customTargetingValues?: (google.ads.admanager.v1.ICustomTargetingValue[]|null); + /** ListBrowsersResponse browsers */ + browsers?: (google.ads.admanager.v1.IBrowser[]|null); - /** ListCustomTargetingValuesResponse nextPageToken */ + /** ListBrowsersResponse nextPageToken */ nextPageToken?: (string|null); - /** ListCustomTargetingValuesResponse totalSize */ + /** ListBrowsersResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListCustomTargetingValuesResponse. */ - class ListCustomTargetingValuesResponse implements IListCustomTargetingValuesResponse { + /** Represents a ListBrowsersResponse. */ + class ListBrowsersResponse implements IListBrowsersResponse { /** - * Constructs a new ListCustomTargetingValuesResponse. + * Constructs a new ListBrowsersResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListCustomTargetingValuesResponse); + constructor(properties?: google.ads.admanager.v1.IListBrowsersResponse); - /** ListCustomTargetingValuesResponse customTargetingValues. */ - public customTargetingValues: google.ads.admanager.v1.ICustomTargetingValue[]; + /** ListBrowsersResponse browsers. */ + public browsers: google.ads.admanager.v1.IBrowser[]; - /** ListCustomTargetingValuesResponse nextPageToken. */ + /** ListBrowsersResponse nextPageToken. */ public nextPageToken: string; - /** ListCustomTargetingValuesResponse totalSize. */ + /** ListBrowsersResponse totalSize. */ public totalSize: number; /** - * Creates a new ListCustomTargetingValuesResponse instance using the specified properties. + * Creates a new ListBrowsersResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListCustomTargetingValuesResponse instance + * @returns ListBrowsersResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListCustomTargetingValuesResponse): google.ads.admanager.v1.ListCustomTargetingValuesResponse; + public static create(properties?: google.ads.admanager.v1.IListBrowsersResponse): google.ads.admanager.v1.ListBrowsersResponse; /** - * Encodes the specified ListCustomTargetingValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. - * @param message ListCustomTargetingValuesResponse message or plain object to encode + * Encodes the specified ListBrowsersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersResponse.verify|verify} messages. + * @param message ListBrowsersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListCustomTargetingValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListBrowsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCustomTargetingValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. - * @param message ListCustomTargetingValuesResponse message or plain object to encode + * Encodes the specified ListBrowsersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersResponse.verify|verify} messages. + * @param message ListBrowsersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListBrowsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer. + * Decodes a ListBrowsersResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCustomTargetingValuesResponse + * @returns ListBrowsersResponse * @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.ads.admanager.v1.ListCustomTargetingValuesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListBrowsersResponse; /** - * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListBrowsersResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCustomTargetingValuesResponse + * @returns ListBrowsersResponse * @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.ads.admanager.v1.ListCustomTargetingValuesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListBrowsersResponse; /** - * Verifies a ListCustomTargetingValuesResponse message. + * Verifies a ListBrowsersResponse 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 ListCustomTargetingValuesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowsersResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCustomTargetingValuesResponse + * @returns ListBrowsersResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingValuesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListBrowsersResponse; /** - * Creates a plain object from a ListCustomTargetingValuesResponse message. Also converts values to other types if specified. - * @param message ListCustomTargetingValuesResponse + * Creates a plain object from a ListBrowsersResponse message. Also converts values to other types if specified. + * @param message ListBrowsersResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListCustomTargetingValuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListBrowsersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCustomTargetingValuesResponse to JSON. + * Converts this ListBrowsersResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCustomTargetingValuesResponse + * Gets the default type url for ListBrowsersResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DealBuyerPermissionTypeEnum. */ - interface IDealBuyerPermissionTypeEnum { + /** Properties of a CmsMetadataKeyStatusEnum. */ + interface ICmsMetadataKeyStatusEnum { } - /** Represents a DealBuyerPermissionTypeEnum. */ - class DealBuyerPermissionTypeEnum implements IDealBuyerPermissionTypeEnum { + /** Represents a CmsMetadataKeyStatusEnum. */ + class CmsMetadataKeyStatusEnum implements ICmsMetadataKeyStatusEnum { /** - * Constructs a new DealBuyerPermissionTypeEnum. + * Constructs a new CmsMetadataKeyStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum); + constructor(properties?: google.ads.admanager.v1.ICmsMetadataKeyStatusEnum); /** - * Creates a new DealBuyerPermissionTypeEnum instance using the specified properties. + * Creates a new CmsMetadataKeyStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns DealBuyerPermissionTypeEnum instance + * @returns CmsMetadataKeyStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum): google.ads.admanager.v1.DealBuyerPermissionTypeEnum; + public static create(properties?: google.ads.admanager.v1.ICmsMetadataKeyStatusEnum): google.ads.admanager.v1.CmsMetadataKeyStatusEnum; /** - * Encodes the specified DealBuyerPermissionTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. - * @param message DealBuyerPermissionTypeEnum message or plain object to encode + * Encodes the specified CmsMetadataKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKeyStatusEnum.verify|verify} messages. + * @param message CmsMetadataKeyStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICmsMetadataKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DealBuyerPermissionTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. - * @param message DealBuyerPermissionTypeEnum message or plain object to encode + * Encodes the specified CmsMetadataKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKeyStatusEnum.verify|verify} messages. + * @param message CmsMetadataKeyStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICmsMetadataKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer. + * Decodes a CmsMetadataKeyStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DealBuyerPermissionTypeEnum + * @returns CmsMetadataKeyStatusEnum * @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.ads.admanager.v1.DealBuyerPermissionTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CmsMetadataKeyStatusEnum; /** - * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataKeyStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DealBuyerPermissionTypeEnum + * @returns CmsMetadataKeyStatusEnum * @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.ads.admanager.v1.DealBuyerPermissionTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CmsMetadataKeyStatusEnum; /** - * Verifies a DealBuyerPermissionTypeEnum message. + * Verifies a CmsMetadataKeyStatusEnum 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 DealBuyerPermissionTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataKeyStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DealBuyerPermissionTypeEnum + * @returns CmsMetadataKeyStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DealBuyerPermissionTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CmsMetadataKeyStatusEnum; /** - * Creates a plain object from a DealBuyerPermissionTypeEnum message. Also converts values to other types if specified. - * @param message DealBuyerPermissionTypeEnum + * Creates a plain object from a CmsMetadataKeyStatusEnum message. Also converts values to other types if specified. + * @param message CmsMetadataKeyStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.DealBuyerPermissionTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CmsMetadataKeyStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DealBuyerPermissionTypeEnum to JSON. + * Converts this CmsMetadataKeyStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DealBuyerPermissionTypeEnum + * Gets the default type url for CmsMetadataKeyStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DealBuyerPermissionTypeEnum { + namespace CmsMetadataKeyStatusEnum { - /** DealBuyerPermissionType enum. */ - enum DealBuyerPermissionType { - DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED = 0, - NEGOTIATOR_ONLY = 1, - BIDDER = 2 + /** CmsMetadataKeyStatus enum. */ + enum CmsMetadataKeyStatus { + CMS_METADATA_KEY_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 } } - /** Properties of a DeviceCategory. */ - interface IDeviceCategory { + /** Properties of a CmsMetadataKey. */ + interface ICmsMetadataKey { - /** DeviceCategory name */ + /** CmsMetadataKey name */ name?: (string|null); - /** DeviceCategory displayName */ + /** CmsMetadataKey displayName */ displayName?: (string|null); + + /** CmsMetadataKey status */ + status?: (google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus|keyof typeof google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus|null); } - /** Represents a DeviceCategory. */ - class DeviceCategory implements IDeviceCategory { + /** Represents a CmsMetadataKey. */ + class CmsMetadataKey implements ICmsMetadataKey { /** - * Constructs a new DeviceCategory. + * Constructs a new CmsMetadataKey. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IDeviceCategory); + constructor(properties?: google.ads.admanager.v1.ICmsMetadataKey); - /** DeviceCategory name. */ + /** CmsMetadataKey name. */ public name: string; - /** DeviceCategory displayName. */ - public displayName?: (string|null); + /** CmsMetadataKey displayName. */ + public displayName: string; + + /** CmsMetadataKey status. */ + public status: (google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus|keyof typeof google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus); /** - * Creates a new DeviceCategory instance using the specified properties. + * Creates a new CmsMetadataKey instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceCategory instance + * @returns CmsMetadataKey instance */ - public static create(properties?: google.ads.admanager.v1.IDeviceCategory): google.ads.admanager.v1.DeviceCategory; + public static create(properties?: google.ads.admanager.v1.ICmsMetadataKey): google.ads.admanager.v1.CmsMetadataKey; /** - * Encodes the specified DeviceCategory message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. - * @param message DeviceCategory message or plain object to encode + * Encodes the specified CmsMetadataKey message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKey.verify|verify} messages. + * @param message CmsMetadataKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IDeviceCategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICmsMetadataKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. - * @param message DeviceCategory message or plain object to encode + * Encodes the specified CmsMetadataKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKey.verify|verify} messages. + * @param message CmsMetadataKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICmsMetadataKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceCategory message from the specified reader or buffer. + * Decodes a CmsMetadataKey message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceCategory + * @returns CmsMetadataKey * @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.ads.admanager.v1.DeviceCategory; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CmsMetadataKey; /** - * Decodes a DeviceCategory message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataKey message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceCategory + * @returns CmsMetadataKey * @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.ads.admanager.v1.DeviceCategory; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CmsMetadataKey; /** - * Verifies a DeviceCategory message. + * Verifies a CmsMetadataKey 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 DeviceCategory message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataKey message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceCategory + * @returns CmsMetadataKey */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCategory; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CmsMetadataKey; /** - * Creates a plain object from a DeviceCategory message. Also converts values to other types if specified. - * @param message DeviceCategory + * Creates a plain object from a CmsMetadataKey message. Also converts values to other types if specified. + * @param message CmsMetadataKey * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.DeviceCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CmsMetadataKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceCategory to JSON. + * Converts this CmsMetadataKey to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeviceCategory + * Gets the default type url for CmsMetadataKey * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a DeviceCategoryService */ - class DeviceCategoryService extends $protobuf.rpc.Service { + /** Represents a CmsMetadataKeyService */ + class CmsMetadataKeyService extends $protobuf.rpc.Service { /** - * Constructs a new DeviceCategoryService service. + * Constructs a new CmsMetadataKeyService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -7799,1750 +7219,2070 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new DeviceCategoryService service using the specified rpc implementation. + * Creates new CmsMetadataKeyService 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): DeviceCategoryService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CmsMetadataKeyService; /** - * Calls GetDeviceCategory. - * @param request GetDeviceCategoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DeviceCategory + * Calls GetCmsMetadataKey. + * @param request GetCmsMetadataKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmsMetadataKey */ - public getDeviceCategory(request: google.ads.admanager.v1.IGetDeviceCategoryRequest, callback: google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategoryCallback): void; + public getCmsMetadataKey(request: google.ads.admanager.v1.IGetCmsMetadataKeyRequest, callback: google.ads.admanager.v1.CmsMetadataKeyService.GetCmsMetadataKeyCallback): void; /** - * Calls GetDeviceCategory. - * @param request GetDeviceCategoryRequest message or plain object + * Calls GetCmsMetadataKey. + * @param request GetCmsMetadataKeyRequest message or plain object * @returns Promise */ - public getDeviceCategory(request: google.ads.admanager.v1.IGetDeviceCategoryRequest): Promise; + public getCmsMetadataKey(request: google.ads.admanager.v1.IGetCmsMetadataKeyRequest): Promise; /** - * Calls ListDeviceCategories. - * @param request ListDeviceCategoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeviceCategoriesResponse + * Calls ListCmsMetadataKeys. + * @param request ListCmsMetadataKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCmsMetadataKeysResponse */ - public listDeviceCategories(request: google.ads.admanager.v1.IListDeviceCategoriesRequest, callback: google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategoriesCallback): void; + public listCmsMetadataKeys(request: google.ads.admanager.v1.IListCmsMetadataKeysRequest, callback: google.ads.admanager.v1.CmsMetadataKeyService.ListCmsMetadataKeysCallback): void; /** - * Calls ListDeviceCategories. - * @param request ListDeviceCategoriesRequest message or plain object + * Calls ListCmsMetadataKeys. + * @param request ListCmsMetadataKeysRequest message or plain object * @returns Promise */ - public listDeviceCategories(request: google.ads.admanager.v1.IListDeviceCategoriesRequest): Promise; + public listCmsMetadataKeys(request: google.ads.admanager.v1.IListCmsMetadataKeysRequest): Promise; } - namespace DeviceCategoryService { + namespace CmsMetadataKeyService { /** - * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|getDeviceCategory}. + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataKeyService|getCmsMetadataKey}. * @param error Error, if any - * @param [response] DeviceCategory + * @param [response] CmsMetadataKey */ - type GetDeviceCategoryCallback = (error: (Error|null), response?: google.ads.admanager.v1.DeviceCategory) => void; + type GetCmsMetadataKeyCallback = (error: (Error|null), response?: google.ads.admanager.v1.CmsMetadataKey) => void; /** - * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|listDeviceCategories}. + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataKeyService|listCmsMetadataKeys}. * @param error Error, if any - * @param [response] ListDeviceCategoriesResponse + * @param [response] ListCmsMetadataKeysResponse */ - type ListDeviceCategoriesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListDeviceCategoriesResponse) => void; + type ListCmsMetadataKeysCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCmsMetadataKeysResponse) => void; } - /** Properties of a GetDeviceCategoryRequest. */ - interface IGetDeviceCategoryRequest { + /** Properties of a GetCmsMetadataKeyRequest. */ + interface IGetCmsMetadataKeyRequest { - /** GetDeviceCategoryRequest name */ + /** GetCmsMetadataKeyRequest name */ name?: (string|null); } - /** Represents a GetDeviceCategoryRequest. */ - class GetDeviceCategoryRequest implements IGetDeviceCategoryRequest { + /** Represents a GetCmsMetadataKeyRequest. */ + class GetCmsMetadataKeyRequest implements IGetCmsMetadataKeyRequest { /** - * Constructs a new GetDeviceCategoryRequest. + * Constructs a new GetCmsMetadataKeyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetDeviceCategoryRequest); + constructor(properties?: google.ads.admanager.v1.IGetCmsMetadataKeyRequest); - /** GetDeviceCategoryRequest name. */ + /** GetCmsMetadataKeyRequest name. */ public name: string; /** - * Creates a new GetDeviceCategoryRequest instance using the specified properties. + * Creates a new GetCmsMetadataKeyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeviceCategoryRequest instance + * @returns GetCmsMetadataKeyRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetDeviceCategoryRequest): google.ads.admanager.v1.GetDeviceCategoryRequest; + public static create(properties?: google.ads.admanager.v1.IGetCmsMetadataKeyRequest): google.ads.admanager.v1.GetCmsMetadataKeyRequest; /** - * Encodes the specified GetDeviceCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. - * @param message GetDeviceCategoryRequest message or plain object to encode + * Encodes the specified GetCmsMetadataKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataKeyRequest.verify|verify} messages. + * @param message GetCmsMetadataKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetDeviceCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCmsMetadataKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeviceCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. - * @param message GetDeviceCategoryRequest message or plain object to encode + * Encodes the specified GetCmsMetadataKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataKeyRequest.verify|verify} messages. + * @param message GetCmsMetadataKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetDeviceCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCmsMetadataKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer. + * Decodes a GetCmsMetadataKeyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeviceCategoryRequest + * @returns GetCmsMetadataKeyRequest * @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.ads.admanager.v1.GetDeviceCategoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCmsMetadataKeyRequest; /** - * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCmsMetadataKeyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeviceCategoryRequest + * @returns GetCmsMetadataKeyRequest * @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.ads.admanager.v1.GetDeviceCategoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCmsMetadataKeyRequest; /** - * Verifies a GetDeviceCategoryRequest message. + * Verifies a GetCmsMetadataKeyRequest 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 GetDeviceCategoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCmsMetadataKeyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeviceCategoryRequest + * @returns GetCmsMetadataKeyRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetDeviceCategoryRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCmsMetadataKeyRequest; /** - * Creates a plain object from a GetDeviceCategoryRequest message. Also converts values to other types if specified. - * @param message GetDeviceCategoryRequest + * Creates a plain object from a GetCmsMetadataKeyRequest message. Also converts values to other types if specified. + * @param message GetCmsMetadataKeyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetDeviceCategoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCmsMetadataKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeviceCategoryRequest to JSON. + * Converts this GetCmsMetadataKeyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetDeviceCategoryRequest + * Gets the default type url for GetCmsMetadataKeyRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListDeviceCategoriesRequest. */ - interface IListDeviceCategoriesRequest { + /** Properties of a ListCmsMetadataKeysRequest. */ + interface IListCmsMetadataKeysRequest { - /** ListDeviceCategoriesRequest parent */ + /** ListCmsMetadataKeysRequest parent */ parent?: (string|null); - /** ListDeviceCategoriesRequest pageSize */ + /** ListCmsMetadataKeysRequest pageSize */ pageSize?: (number|null); - /** ListDeviceCategoriesRequest pageToken */ + /** ListCmsMetadataKeysRequest pageToken */ pageToken?: (string|null); - /** ListDeviceCategoriesRequest filter */ + /** ListCmsMetadataKeysRequest filter */ filter?: (string|null); - /** ListDeviceCategoriesRequest orderBy */ + /** ListCmsMetadataKeysRequest orderBy */ orderBy?: (string|null); - /** ListDeviceCategoriesRequest skip */ + /** ListCmsMetadataKeysRequest skip */ skip?: (number|null); } - /** Represents a ListDeviceCategoriesRequest. */ - class ListDeviceCategoriesRequest implements IListDeviceCategoriesRequest { + /** Represents a ListCmsMetadataKeysRequest. */ + class ListCmsMetadataKeysRequest implements IListCmsMetadataKeysRequest { /** - * Constructs a new ListDeviceCategoriesRequest. + * Constructs a new ListCmsMetadataKeysRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListDeviceCategoriesRequest); + constructor(properties?: google.ads.admanager.v1.IListCmsMetadataKeysRequest); - /** ListDeviceCategoriesRequest parent. */ + /** ListCmsMetadataKeysRequest parent. */ public parent: string; - /** ListDeviceCategoriesRequest pageSize. */ + /** ListCmsMetadataKeysRequest pageSize. */ public pageSize: number; - /** ListDeviceCategoriesRequest pageToken. */ + /** ListCmsMetadataKeysRequest pageToken. */ public pageToken: string; - /** ListDeviceCategoriesRequest filter. */ + /** ListCmsMetadataKeysRequest filter. */ public filter: string; - /** ListDeviceCategoriesRequest orderBy. */ + /** ListCmsMetadataKeysRequest orderBy. */ public orderBy: string; - /** ListDeviceCategoriesRequest skip. */ + /** ListCmsMetadataKeysRequest skip. */ public skip: number; /** - * Creates a new ListDeviceCategoriesRequest instance using the specified properties. + * Creates a new ListCmsMetadataKeysRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceCategoriesRequest instance + * @returns ListCmsMetadataKeysRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListDeviceCategoriesRequest): google.ads.admanager.v1.ListDeviceCategoriesRequest; + public static create(properties?: google.ads.admanager.v1.IListCmsMetadataKeysRequest): google.ads.admanager.v1.ListCmsMetadataKeysRequest; /** - * Encodes the specified ListDeviceCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. - * @param message ListDeviceCategoriesRequest message or plain object to encode + * Encodes the specified ListCmsMetadataKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysRequest.verify|verify} messages. + * @param message ListCmsMetadataKeysRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListDeviceCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCmsMetadataKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. - * @param message ListDeviceCategoriesRequest message or plain object to encode + * Encodes the specified ListCmsMetadataKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysRequest.verify|verify} messages. + * @param message ListCmsMetadataKeysRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCmsMetadataKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataKeysRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceCategoriesRequest + * @returns ListCmsMetadataKeysRequest * @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.ads.admanager.v1.ListDeviceCategoriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCmsMetadataKeysRequest; /** - * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataKeysRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceCategoriesRequest + * @returns ListCmsMetadataKeysRequest * @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.ads.admanager.v1.ListDeviceCategoriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCmsMetadataKeysRequest; /** - * Verifies a ListDeviceCategoriesRequest message. + * Verifies a ListCmsMetadataKeysRequest 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 ListDeviceCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataKeysRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceCategoriesRequest + * @returns ListCmsMetadataKeysRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCategoriesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCmsMetadataKeysRequest; /** - * Creates a plain object from a ListDeviceCategoriesRequest message. Also converts values to other types if specified. - * @param message ListDeviceCategoriesRequest + * Creates a plain object from a ListCmsMetadataKeysRequest message. Also converts values to other types if specified. + * @param message ListCmsMetadataKeysRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListDeviceCategoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCmsMetadataKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceCategoriesRequest to JSON. + * Converts this ListCmsMetadataKeysRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeviceCategoriesRequest + * Gets the default type url for ListCmsMetadataKeysRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListDeviceCategoriesResponse. */ - interface IListDeviceCategoriesResponse { + /** Properties of a ListCmsMetadataKeysResponse. */ + interface IListCmsMetadataKeysResponse { - /** ListDeviceCategoriesResponse deviceCategories */ - deviceCategories?: (google.ads.admanager.v1.IDeviceCategory[]|null); + /** ListCmsMetadataKeysResponse cmsMetadataKeys */ + cmsMetadataKeys?: (google.ads.admanager.v1.ICmsMetadataKey[]|null); - /** ListDeviceCategoriesResponse nextPageToken */ + /** ListCmsMetadataKeysResponse nextPageToken */ nextPageToken?: (string|null); - /** ListDeviceCategoriesResponse totalSize */ + /** ListCmsMetadataKeysResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListDeviceCategoriesResponse. */ - class ListDeviceCategoriesResponse implements IListDeviceCategoriesResponse { + /** Represents a ListCmsMetadataKeysResponse. */ + class ListCmsMetadataKeysResponse implements IListCmsMetadataKeysResponse { /** - * Constructs a new ListDeviceCategoriesResponse. + * Constructs a new ListCmsMetadataKeysResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListDeviceCategoriesResponse); + constructor(properties?: google.ads.admanager.v1.IListCmsMetadataKeysResponse); - /** ListDeviceCategoriesResponse deviceCategories. */ - public deviceCategories: google.ads.admanager.v1.IDeviceCategory[]; + /** ListCmsMetadataKeysResponse cmsMetadataKeys. */ + public cmsMetadataKeys: google.ads.admanager.v1.ICmsMetadataKey[]; - /** ListDeviceCategoriesResponse nextPageToken. */ + /** ListCmsMetadataKeysResponse nextPageToken. */ public nextPageToken: string; - /** ListDeviceCategoriesResponse totalSize. */ + /** ListCmsMetadataKeysResponse totalSize. */ public totalSize: number; /** - * Creates a new ListDeviceCategoriesResponse instance using the specified properties. + * Creates a new ListCmsMetadataKeysResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeviceCategoriesResponse instance + * @returns ListCmsMetadataKeysResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListDeviceCategoriesResponse): google.ads.admanager.v1.ListDeviceCategoriesResponse; + public static create(properties?: google.ads.admanager.v1.IListCmsMetadataKeysResponse): google.ads.admanager.v1.ListCmsMetadataKeysResponse; /** - * Encodes the specified ListDeviceCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. - * @param message ListDeviceCategoriesResponse message or plain object to encode + * Encodes the specified ListCmsMetadataKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysResponse.verify|verify} messages. + * @param message ListCmsMetadataKeysResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListDeviceCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCmsMetadataKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeviceCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. - * @param message ListDeviceCategoriesResponse message or plain object to encode + * Encodes the specified ListCmsMetadataKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysResponse.verify|verify} messages. + * @param message ListCmsMetadataKeysResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCmsMetadataKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer. + * Decodes a ListCmsMetadataKeysResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeviceCategoriesResponse + * @returns ListCmsMetadataKeysResponse * @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.ads.admanager.v1.ListDeviceCategoriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCmsMetadataKeysResponse; /** - * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataKeysResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeviceCategoriesResponse + * @returns ListCmsMetadataKeysResponse * @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.ads.admanager.v1.ListDeviceCategoriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCmsMetadataKeysResponse; /** - * Verifies a ListDeviceCategoriesResponse message. + * Verifies a ListCmsMetadataKeysResponse 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 ListDeviceCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataKeysResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeviceCategoriesResponse + * @returns ListCmsMetadataKeysResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCategoriesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCmsMetadataKeysResponse; /** - * Creates a plain object from a ListDeviceCategoriesResponse message. Also converts values to other types if specified. - * @param message ListDeviceCategoriesResponse + * Creates a plain object from a ListCmsMetadataKeysResponse message. Also converts values to other types if specified. + * @param message ListCmsMetadataKeysResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListDeviceCategoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCmsMetadataKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeviceCategoriesResponse to JSON. + * Converts this ListCmsMetadataKeysResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeviceCategoriesResponse + * Gets the default type url for ListCmsMetadataKeysResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EntitySignalsMapping. */ - interface IEntitySignalsMapping { - - /** EntitySignalsMapping audienceSegmentId */ - audienceSegmentId?: (number|Long|string|null); - - /** EntitySignalsMapping contentBundleId */ - contentBundleId?: (number|Long|string|null); - - /** EntitySignalsMapping customTargetingValueId */ - customTargetingValueId?: (number|Long|string|null); - - /** EntitySignalsMapping name */ - name?: (string|null); - - /** EntitySignalsMapping entitySignalsMappingId */ - entitySignalsMappingId?: (number|Long|string|null); - - /** EntitySignalsMapping taxonomyCategoryIds */ - taxonomyCategoryIds?: ((number|Long|string)[]|null); + /** Properties of a CmsMetadataValueStatusEnum. */ + interface ICmsMetadataValueStatusEnum { } - /** Represents an EntitySignalsMapping. */ - class EntitySignalsMapping implements IEntitySignalsMapping { + /** Represents a CmsMetadataValueStatusEnum. */ + class CmsMetadataValueStatusEnum implements ICmsMetadataValueStatusEnum { /** - * Constructs a new EntitySignalsMapping. + * Constructs a new CmsMetadataValueStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IEntitySignalsMapping); - - /** EntitySignalsMapping audienceSegmentId. */ - public audienceSegmentId?: (number|Long|string|null); - - /** EntitySignalsMapping contentBundleId. */ - public contentBundleId?: (number|Long|string|null); - - /** EntitySignalsMapping customTargetingValueId. */ - public customTargetingValueId?: (number|Long|string|null); - - /** EntitySignalsMapping name. */ - public name: string; - - /** EntitySignalsMapping entitySignalsMappingId. */ - public entitySignalsMappingId?: (number|Long|string|null); - - /** EntitySignalsMapping taxonomyCategoryIds. */ - public taxonomyCategoryIds: (number|Long|string)[]; - - /** EntitySignalsMapping entity. */ - public entity?: ("audienceSegmentId"|"contentBundleId"|"customTargetingValueId"); + constructor(properties?: google.ads.admanager.v1.ICmsMetadataValueStatusEnum); /** - * Creates a new EntitySignalsMapping instance using the specified properties. + * Creates a new CmsMetadataValueStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns EntitySignalsMapping instance + * @returns CmsMetadataValueStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IEntitySignalsMapping): google.ads.admanager.v1.EntitySignalsMapping; + public static create(properties?: google.ads.admanager.v1.ICmsMetadataValueStatusEnum): google.ads.admanager.v1.CmsMetadataValueStatusEnum; /** - * Encodes the specified EntitySignalsMapping message. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. - * @param message EntitySignalsMapping message or plain object to encode + * Encodes the specified CmsMetadataValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValueStatusEnum.verify|verify} messages. + * @param message CmsMetadataValueStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IEntitySignalsMapping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICmsMetadataValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntitySignalsMapping message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. - * @param message EntitySignalsMapping message or plain object to encode + * Encodes the specified CmsMetadataValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValueStatusEnum.verify|verify} messages. + * @param message CmsMetadataValueStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IEntitySignalsMapping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICmsMetadataValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntitySignalsMapping message from the specified reader or buffer. + * Decodes a CmsMetadataValueStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntitySignalsMapping + * @returns CmsMetadataValueStatusEnum * @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.ads.admanager.v1.EntitySignalsMapping; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CmsMetadataValueStatusEnum; /** - * Decodes an EntitySignalsMapping message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataValueStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntitySignalsMapping + * @returns CmsMetadataValueStatusEnum * @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.ads.admanager.v1.EntitySignalsMapping; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CmsMetadataValueStatusEnum; /** - * Verifies an EntitySignalsMapping message. + * Verifies a CmsMetadataValueStatusEnum 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 EntitySignalsMapping message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataValueStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntitySignalsMapping + * @returns CmsMetadataValueStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.EntitySignalsMapping; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CmsMetadataValueStatusEnum; /** - * Creates a plain object from an EntitySignalsMapping message. Also converts values to other types if specified. - * @param message EntitySignalsMapping + * Creates a plain object from a CmsMetadataValueStatusEnum message. Also converts values to other types if specified. + * @param message CmsMetadataValueStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.EntitySignalsMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CmsMetadataValueStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntitySignalsMapping to JSON. + * Converts this CmsMetadataValueStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EntitySignalsMapping + * Gets the default type url for CmsMetadataValueStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an EntitySignalsMappingService */ - class EntitySignalsMappingService extends $protobuf.rpc.Service { + namespace CmsMetadataValueStatusEnum { - /** - * Constructs a new EntitySignalsMappingService 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); + /** CmsMetadataValueStatus enum. */ + enum CmsMetadataValueStatus { + CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + ARCHIVED = 2, + INACTIVE = 3 + } + } + + /** Properties of a CmsMetadataValue. */ + interface ICmsMetadataValue { + + /** CmsMetadataValue name */ + name?: (string|null); + + /** CmsMetadataValue displayName */ + displayName?: (string|null); + + /** CmsMetadataValue key */ + key?: (string|null); + + /** CmsMetadataValue status */ + status?: (google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus|keyof typeof google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus|null); + } + + /** Represents a CmsMetadataValue. */ + class CmsMetadataValue implements ICmsMetadataValue { /** - * Creates new EntitySignalsMappingService 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. + * Constructs a new CmsMetadataValue. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntitySignalsMappingService; + constructor(properties?: google.ads.admanager.v1.ICmsMetadataValue); + + /** CmsMetadataValue name. */ + public name: string; + + /** CmsMetadataValue displayName. */ + public displayName: string; + + /** CmsMetadataValue key. */ + public key: string; + + /** CmsMetadataValue status. */ + public status: (google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus|keyof typeof google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus); /** - * Calls GetEntitySignalsMapping. - * @param request GetEntitySignalsMappingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + * Creates a new CmsMetadataValue instance using the specified properties. + * @param [properties] Properties to set + * @returns CmsMetadataValue instance */ - public getEntitySignalsMapping(request: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMappingCallback): void; + public static create(properties?: google.ads.admanager.v1.ICmsMetadataValue): google.ads.admanager.v1.CmsMetadataValue; /** - * Calls GetEntitySignalsMapping. - * @param request GetEntitySignalsMappingRequest message or plain object - * @returns Promise + * Encodes the specified CmsMetadataValue message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValue.verify|verify} messages. + * @param message CmsMetadataValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEntitySignalsMapping(request: google.ads.admanager.v1.IGetEntitySignalsMappingRequest): Promise; + public static encode(message: google.ads.admanager.v1.ICmsMetadataValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListEntitySignalsMappings. - * @param request ListEntitySignalsMappingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntitySignalsMappingsResponse + * Encodes the specified CmsMetadataValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValue.verify|verify} messages. + * @param message CmsMetadataValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listEntitySignalsMappings(request: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappingsCallback): void; + public static encodeDelimited(message: google.ads.admanager.v1.ICmsMetadataValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListEntitySignalsMappings. - * @param request ListEntitySignalsMappingsRequest message or plain object - * @returns Promise + * Decodes a CmsMetadataValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmsMetadataValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listEntitySignalsMappings(request: google.ads.admanager.v1.IListEntitySignalsMappingsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CmsMetadataValue; /** - * Calls CreateEntitySignalsMapping. - * @param request CreateEntitySignalsMappingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + * Decodes a CmsMetadataValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmsMetadataValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createEntitySignalsMapping(request: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMappingCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CmsMetadataValue; /** - * Calls CreateEntitySignalsMapping. - * @param request CreateEntitySignalsMappingRequest message or plain object - * @returns Promise + * Verifies a CmsMetadataValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createEntitySignalsMapping(request: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateEntitySignalsMapping. - * @param request UpdateEntitySignalsMappingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + * Creates a CmsMetadataValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmsMetadataValue */ - public updateEntitySignalsMapping(request: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMappingCallback): void; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CmsMetadataValue; /** - * Calls UpdateEntitySignalsMapping. - * @param request UpdateEntitySignalsMappingRequest message or plain object - * @returns Promise + * Creates a plain object from a CmsMetadataValue message. Also converts values to other types if specified. + * @param message CmsMetadataValue + * @param [options] Conversion options + * @returns Plain object */ - public updateEntitySignalsMapping(request: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest): Promise; + public static toObject(message: google.ads.admanager.v1.CmsMetadataValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls BatchCreateEntitySignalsMappings. - * @param request BatchCreateEntitySignalsMappingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateEntitySignalsMappingsResponse + * Converts this CmsMetadataValue to JSON. + * @returns JSON object */ - public batchCreateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappingsCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls BatchCreateEntitySignalsMappings. - * @param request BatchCreateEntitySignalsMappingsRequest message or plain object - * @returns Promise + * Gets the default type url for CmsMetadataValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public batchCreateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a CmsMetadataValueService */ + class CmsMetadataValueService extends $protobuf.rpc.Service { /** - * Calls BatchUpdateEntitySignalsMappings. - * @param request BatchUpdateEntitySignalsMappingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchUpdateEntitySignalsMappingsResponse + * Constructs a new CmsMetadataValueService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public batchUpdateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappingsCallback): void; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Calls BatchUpdateEntitySignalsMappings. - * @param request BatchUpdateEntitySignalsMappingsRequest message or plain object - * @returns Promise + * Creates new CmsMetadataValueService 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 batchUpdateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest): Promise; - } - - namespace EntitySignalsMappingService { + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CmsMetadataValueService; /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|getEntitySignalsMapping}. - * @param error Error, if any - * @param [response] EntitySignalsMapping + * Calls GetCmsMetadataValue. + * @param request GetCmsMetadataValueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmsMetadataValue */ - type GetEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; + public getCmsMetadataValue(request: google.ads.admanager.v1.IGetCmsMetadataValueRequest, callback: google.ads.admanager.v1.CmsMetadataValueService.GetCmsMetadataValueCallback): void; /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|listEntitySignalsMappings}. - * @param error Error, if any - * @param [response] ListEntitySignalsMappingsResponse + * Calls GetCmsMetadataValue. + * @param request GetCmsMetadataValueRequest message or plain object + * @returns Promise */ - type ListEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListEntitySignalsMappingsResponse) => void; + public getCmsMetadataValue(request: google.ads.admanager.v1.IGetCmsMetadataValueRequest): Promise; /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|createEntitySignalsMapping}. - * @param error Error, if any - * @param [response] EntitySignalsMapping + * Calls ListCmsMetadataValues. + * @param request ListCmsMetadataValuesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCmsMetadataValuesResponse */ - type CreateEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; + public listCmsMetadataValues(request: google.ads.admanager.v1.IListCmsMetadataValuesRequest, callback: google.ads.admanager.v1.CmsMetadataValueService.ListCmsMetadataValuesCallback): void; /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|updateEntitySignalsMapping}. - * @param error Error, if any - * @param [response] EntitySignalsMapping + * Calls ListCmsMetadataValues. + * @param request ListCmsMetadataValuesRequest message or plain object + * @returns Promise */ - type UpdateEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; + public listCmsMetadataValues(request: google.ads.admanager.v1.IListCmsMetadataValuesRequest): Promise; + } + + namespace CmsMetadataValueService { /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchCreateEntitySignalsMappings}. + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataValueService|getCmsMetadataValue}. * @param error Error, if any - * @param [response] BatchCreateEntitySignalsMappingsResponse + * @param [response] CmsMetadataValue */ - type BatchCreateEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse) => void; + type GetCmsMetadataValueCallback = (error: (Error|null), response?: google.ads.admanager.v1.CmsMetadataValue) => void; /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchUpdateEntitySignalsMappings}. + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataValueService|listCmsMetadataValues}. * @param error Error, if any - * @param [response] BatchUpdateEntitySignalsMappingsResponse + * @param [response] ListCmsMetadataValuesResponse */ - type BatchUpdateEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse) => void; + type ListCmsMetadataValuesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCmsMetadataValuesResponse) => void; } - /** Properties of a GetEntitySignalsMappingRequest. */ - interface IGetEntitySignalsMappingRequest { + /** Properties of a GetCmsMetadataValueRequest. */ + interface IGetCmsMetadataValueRequest { - /** GetEntitySignalsMappingRequest name */ + /** GetCmsMetadataValueRequest name */ name?: (string|null); } - /** Represents a GetEntitySignalsMappingRequest. */ - class GetEntitySignalsMappingRequest implements IGetEntitySignalsMappingRequest { + /** Represents a GetCmsMetadataValueRequest. */ + class GetCmsMetadataValueRequest implements IGetCmsMetadataValueRequest { /** - * Constructs a new GetEntitySignalsMappingRequest. + * Constructs a new GetCmsMetadataValueRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetEntitySignalsMappingRequest); + constructor(properties?: google.ads.admanager.v1.IGetCmsMetadataValueRequest); - /** GetEntitySignalsMappingRequest name. */ + /** GetCmsMetadataValueRequest name. */ public name: string; /** - * Creates a new GetEntitySignalsMappingRequest instance using the specified properties. + * Creates a new GetCmsMetadataValueRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntitySignalsMappingRequest instance + * @returns GetCmsMetadataValueRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetEntitySignalsMappingRequest): google.ads.admanager.v1.GetEntitySignalsMappingRequest; + public static create(properties?: google.ads.admanager.v1.IGetCmsMetadataValueRequest): google.ads.admanager.v1.GetCmsMetadataValueRequest; /** - * Encodes the specified GetEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. - * @param message GetEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified GetCmsMetadataValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataValueRequest.verify|verify} messages. + * @param message GetCmsMetadataValueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCmsMetadataValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. - * @param message GetEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified GetCmsMetadataValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataValueRequest.verify|verify} messages. + * @param message GetCmsMetadataValueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCmsMetadataValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a GetCmsMetadataValueRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntitySignalsMappingRequest + * @returns GetCmsMetadataValueRequest * @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.ads.admanager.v1.GetEntitySignalsMappingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCmsMetadataValueRequest; /** - * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCmsMetadataValueRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntitySignalsMappingRequest + * @returns GetCmsMetadataValueRequest * @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.ads.admanager.v1.GetEntitySignalsMappingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCmsMetadataValueRequest; /** - * Verifies a GetEntitySignalsMappingRequest message. + * Verifies a GetCmsMetadataValueRequest 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 GetEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCmsMetadataValueRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntitySignalsMappingRequest + * @returns GetCmsMetadataValueRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetEntitySignalsMappingRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCmsMetadataValueRequest; /** - * Creates a plain object from a GetEntitySignalsMappingRequest message. Also converts values to other types if specified. - * @param message GetEntitySignalsMappingRequest + * Creates a plain object from a GetCmsMetadataValueRequest message. Also converts values to other types if specified. + * @param message GetCmsMetadataValueRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCmsMetadataValueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntitySignalsMappingRequest to JSON. + * Converts this GetCmsMetadataValueRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEntitySignalsMappingRequest + * Gets the default type url for GetCmsMetadataValueRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntitySignalsMappingsRequest. */ - interface IListEntitySignalsMappingsRequest { + /** Properties of a ListCmsMetadataValuesRequest. */ + interface IListCmsMetadataValuesRequest { - /** ListEntitySignalsMappingsRequest parent */ + /** ListCmsMetadataValuesRequest parent */ parent?: (string|null); - /** ListEntitySignalsMappingsRequest pageSize */ + /** ListCmsMetadataValuesRequest pageSize */ pageSize?: (number|null); - /** ListEntitySignalsMappingsRequest pageToken */ + /** ListCmsMetadataValuesRequest pageToken */ pageToken?: (string|null); - /** ListEntitySignalsMappingsRequest filter */ + /** ListCmsMetadataValuesRequest filter */ filter?: (string|null); - /** ListEntitySignalsMappingsRequest orderBy */ + /** ListCmsMetadataValuesRequest orderBy */ orderBy?: (string|null); - /** ListEntitySignalsMappingsRequest skip */ + /** ListCmsMetadataValuesRequest skip */ skip?: (number|null); } - /** Represents a ListEntitySignalsMappingsRequest. */ - class ListEntitySignalsMappingsRequest implements IListEntitySignalsMappingsRequest { + /** Represents a ListCmsMetadataValuesRequest. */ + class ListCmsMetadataValuesRequest implements IListCmsMetadataValuesRequest { /** - * Constructs a new ListEntitySignalsMappingsRequest. + * Constructs a new ListCmsMetadataValuesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsRequest); + constructor(properties?: google.ads.admanager.v1.IListCmsMetadataValuesRequest); - /** ListEntitySignalsMappingsRequest parent. */ + /** ListCmsMetadataValuesRequest parent. */ public parent: string; - /** ListEntitySignalsMappingsRequest pageSize. */ + /** ListCmsMetadataValuesRequest pageSize. */ public pageSize: number; - /** ListEntitySignalsMappingsRequest pageToken. */ + /** ListCmsMetadataValuesRequest pageToken. */ public pageToken: string; - /** ListEntitySignalsMappingsRequest filter. */ + /** ListCmsMetadataValuesRequest filter. */ public filter: string; - /** ListEntitySignalsMappingsRequest orderBy. */ + /** ListCmsMetadataValuesRequest orderBy. */ public orderBy: string; - /** ListEntitySignalsMappingsRequest skip. */ + /** ListCmsMetadataValuesRequest skip. */ public skip: number; /** - * Creates a new ListEntitySignalsMappingsRequest instance using the specified properties. + * Creates a new ListCmsMetadataValuesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntitySignalsMappingsRequest instance + * @returns ListCmsMetadataValuesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsRequest): google.ads.admanager.v1.ListEntitySignalsMappingsRequest; + public static create(properties?: google.ads.admanager.v1.IListCmsMetadataValuesRequest): google.ads.admanager.v1.ListCmsMetadataValuesRequest; /** - * Encodes the specified ListEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. - * @param message ListEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified ListCmsMetadataValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesRequest.verify|verify} messages. + * @param message ListCmsMetadataValuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCmsMetadataValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. - * @param message ListEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified ListCmsMetadataValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesRequest.verify|verify} messages. + * @param message ListCmsMetadataValuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCmsMetadataValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataValuesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntitySignalsMappingsRequest + * @returns ListCmsMetadataValuesRequest * @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.ads.admanager.v1.ListEntitySignalsMappingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCmsMetadataValuesRequest; /** - * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataValuesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntitySignalsMappingsRequest + * @returns ListCmsMetadataValuesRequest * @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.ads.admanager.v1.ListEntitySignalsMappingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCmsMetadataValuesRequest; /** - * Verifies a ListEntitySignalsMappingsRequest message. + * Verifies a ListCmsMetadataValuesRequest 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 ListEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataValuesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntitySignalsMappingsRequest + * @returns ListCmsMetadataValuesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListEntitySignalsMappingsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCmsMetadataValuesRequest; /** - * Creates a plain object from a ListEntitySignalsMappingsRequest message. Also converts values to other types if specified. - * @param message ListEntitySignalsMappingsRequest + * Creates a plain object from a ListCmsMetadataValuesRequest message. Also converts values to other types if specified. + * @param message ListCmsMetadataValuesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCmsMetadataValuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntitySignalsMappingsRequest to JSON. + * Converts this ListCmsMetadataValuesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntitySignalsMappingsRequest + * Gets the default type url for ListCmsMetadataValuesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateEntitySignalsMappingRequest. */ - interface ICreateEntitySignalsMappingRequest { + /** Properties of a ListCmsMetadataValuesResponse. */ + interface IListCmsMetadataValuesResponse { - /** CreateEntitySignalsMappingRequest parent */ - parent?: (string|null); + /** ListCmsMetadataValuesResponse cmsMetadataValues */ + cmsMetadataValues?: (google.ads.admanager.v1.ICmsMetadataValue[]|null); - /** CreateEntitySignalsMappingRequest entitySignalsMapping */ - entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + /** ListCmsMetadataValuesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCmsMetadataValuesResponse totalSize */ + totalSize?: (number|null); } - /** Represents a CreateEntitySignalsMappingRequest. */ - class CreateEntitySignalsMappingRequest implements ICreateEntitySignalsMappingRequest { + /** Represents a ListCmsMetadataValuesResponse. */ + class ListCmsMetadataValuesResponse implements IListCmsMetadataValuesResponse { /** - * Constructs a new CreateEntitySignalsMappingRequest. + * Constructs a new ListCmsMetadataValuesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest); + constructor(properties?: google.ads.admanager.v1.IListCmsMetadataValuesResponse); - /** CreateEntitySignalsMappingRequest parent. */ - public parent: string; + /** ListCmsMetadataValuesResponse cmsMetadataValues. */ + public cmsMetadataValues: google.ads.admanager.v1.ICmsMetadataValue[]; - /** CreateEntitySignalsMappingRequest entitySignalsMapping. */ - public entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + /** ListCmsMetadataValuesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCmsMetadataValuesResponse totalSize. */ + public totalSize: number; /** - * Creates a new CreateEntitySignalsMappingRequest instance using the specified properties. + * Creates a new ListCmsMetadataValuesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntitySignalsMappingRequest instance + * @returns ListCmsMetadataValuesResponse instance */ - public static create(properties?: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest): google.ads.admanager.v1.CreateEntitySignalsMappingRequest; + public static create(properties?: google.ads.admanager.v1.IListCmsMetadataValuesResponse): google.ads.admanager.v1.ListCmsMetadataValuesResponse; /** - * Encodes the specified CreateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. - * @param message CreateEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified ListCmsMetadataValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesResponse.verify|verify} messages. + * @param message ListCmsMetadataValuesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCmsMetadataValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. - * @param message CreateEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified ListCmsMetadataValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesResponse.verify|verify} messages. + * @param message ListCmsMetadataValuesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCmsMetadataValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataValuesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntitySignalsMappingRequest + * @returns ListCmsMetadataValuesResponse * @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.ads.admanager.v1.CreateEntitySignalsMappingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCmsMetadataValuesResponse; /** - * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataValuesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntitySignalsMappingRequest + * @returns ListCmsMetadataValuesResponse * @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.ads.admanager.v1.CreateEntitySignalsMappingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCmsMetadataValuesResponse; /** - * Verifies a CreateEntitySignalsMappingRequest message. + * Verifies a ListCmsMetadataValuesResponse 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 CreateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataValuesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntitySignalsMappingRequest + * @returns ListCmsMetadataValuesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateEntitySignalsMappingRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCmsMetadataValuesResponse; /** - * Creates a plain object from a CreateEntitySignalsMappingRequest message. Also converts values to other types if specified. - * @param message CreateEntitySignalsMappingRequest + * Creates a plain object from a ListCmsMetadataValuesResponse message. Also converts values to other types if specified. + * @param message ListCmsMetadataValuesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CreateEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCmsMetadataValuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntitySignalsMappingRequest to JSON. + * Converts this ListCmsMetadataValuesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateEntitySignalsMappingRequest + * Gets the default type url for ListCmsMetadataValuesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateEntitySignalsMappingRequest. */ - interface IUpdateEntitySignalsMappingRequest { - - /** UpdateEntitySignalsMappingRequest entitySignalsMapping */ - entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); - - /** UpdateEntitySignalsMappingRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a CompanyTypeEnum. */ + interface ICompanyTypeEnum { } - /** Represents an UpdateEntitySignalsMappingRequest. */ - class UpdateEntitySignalsMappingRequest implements IUpdateEntitySignalsMappingRequest { + /** Represents a CompanyTypeEnum. */ + class CompanyTypeEnum implements ICompanyTypeEnum { /** - * Constructs a new UpdateEntitySignalsMappingRequest. + * Constructs a new CompanyTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest); - - /** UpdateEntitySignalsMappingRequest entitySignalsMapping. */ - public entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); - - /** UpdateEntitySignalsMappingRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.ads.admanager.v1.ICompanyTypeEnum); /** - * Creates a new UpdateEntitySignalsMappingRequest instance using the specified properties. + * Creates a new CompanyTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEntitySignalsMappingRequest instance + * @returns CompanyTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest): google.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + public static create(properties?: google.ads.admanager.v1.ICompanyTypeEnum): google.ads.admanager.v1.CompanyTypeEnum; /** - * Encodes the specified UpdateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. - * @param message UpdateEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified CompanyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. + * @param message CompanyTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICompanyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. - * @param message UpdateEntitySignalsMappingRequest message or plain object to encode + * Encodes the specified CompanyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. + * @param message CompanyTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICompanyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a CompanyTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEntitySignalsMappingRequest + * @returns CompanyTypeEnum * @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.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CompanyTypeEnum; /** - * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a CompanyTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEntitySignalsMappingRequest + * @returns CompanyTypeEnum * @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.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CompanyTypeEnum; /** - * Verifies an UpdateEntitySignalsMappingRequest message. + * Verifies a CompanyTypeEnum 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 UpdateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompanyTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntitySignalsMappingRequest + * @returns CompanyTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CompanyTypeEnum; /** - * Creates a plain object from an UpdateEntitySignalsMappingRequest message. Also converts values to other types if specified. - * @param message UpdateEntitySignalsMappingRequest + * Creates a plain object from a CompanyTypeEnum message. Also converts values to other types if specified. + * @param message CompanyTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.UpdateEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CompanyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntitySignalsMappingRequest to JSON. + * Converts this CompanyTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateEntitySignalsMappingRequest + * Gets the default type url for CompanyTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntitySignalsMappingsResponse. */ - interface IListEntitySignalsMappingsResponse { - - /** ListEntitySignalsMappingsResponse entitySignalsMappings */ - entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + namespace CompanyTypeEnum { - /** ListEntitySignalsMappingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CompanyType enum. */ + enum CompanyType { + COMPANY_TYPE_UNSPECIFIED = 0, + ADVERTISER = 1, + HOUSE_ADVERTISER = 2, + AGENCY = 3, + HOUSE_AGENCY = 4, + AD_NETWORK = 5 + } + } - /** ListEntitySignalsMappingsResponse totalSize */ - totalSize?: (number|null); + /** Properties of a CompanyCreditStatusEnum. */ + interface ICompanyCreditStatusEnum { } - /** Represents a ListEntitySignalsMappingsResponse. */ - class ListEntitySignalsMappingsResponse implements IListEntitySignalsMappingsResponse { + /** Represents a CompanyCreditStatusEnum. */ + class CompanyCreditStatusEnum implements ICompanyCreditStatusEnum { /** - * Constructs a new ListEntitySignalsMappingsResponse. + * Constructs a new CompanyCreditStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsResponse); - - /** ListEntitySignalsMappingsResponse entitySignalsMappings. */ - public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; - - /** ListEntitySignalsMappingsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListEntitySignalsMappingsResponse totalSize. */ - public totalSize: number; + constructor(properties?: google.ads.admanager.v1.ICompanyCreditStatusEnum); /** - * Creates a new ListEntitySignalsMappingsResponse instance using the specified properties. + * Creates a new CompanyCreditStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntitySignalsMappingsResponse instance + * @returns CompanyCreditStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsResponse): google.ads.admanager.v1.ListEntitySignalsMappingsResponse; + public static create(properties?: google.ads.admanager.v1.ICompanyCreditStatusEnum): google.ads.admanager.v1.CompanyCreditStatusEnum; /** - * Encodes the specified ListEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. - * @param message ListEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified CompanyCreditStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. + * @param message CompanyCreditStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICompanyCreditStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. - * @param message ListEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified CompanyCreditStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. + * @param message CompanyCreditStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICompanyCreditStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntitySignalsMappingsResponse + * @returns CompanyCreditStatusEnum * @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.ads.admanager.v1.ListEntitySignalsMappingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CompanyCreditStatusEnum; /** - * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntitySignalsMappingsResponse + * @returns CompanyCreditStatusEnum * @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.ads.admanager.v1.ListEntitySignalsMappingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CompanyCreditStatusEnum; /** - * Verifies a ListEntitySignalsMappingsResponse message. + * Verifies a CompanyCreditStatusEnum 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 ListEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CompanyCreditStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntitySignalsMappingsResponse + * @returns CompanyCreditStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListEntitySignalsMappingsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CompanyCreditStatusEnum; /** - * Creates a plain object from a ListEntitySignalsMappingsResponse message. Also converts values to other types if specified. - * @param message ListEntitySignalsMappingsResponse + * Creates a plain object from a CompanyCreditStatusEnum message. Also converts values to other types if specified. + * @param message CompanyCreditStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CompanyCreditStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntitySignalsMappingsResponse to JSON. + * Converts this CompanyCreditStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntitySignalsMappingsResponse + * Gets the default type url for CompanyCreditStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BatchCreateEntitySignalsMappingsRequest. */ - interface IBatchCreateEntitySignalsMappingsRequest { + namespace CompanyCreditStatusEnum { - /** BatchCreateEntitySignalsMappingsRequest parent */ - parent?: (string|null); + /** CompanyCreditStatus enum. */ + enum CompanyCreditStatus { + COMPANY_CREDIT_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2, + ON_HOLD = 3, + STOP = 4, + BLOCKED = 5 + } + } - /** BatchCreateEntitySignalsMappingsRequest requests */ - requests?: (google.ads.admanager.v1.ICreateEntitySignalsMappingRequest[]|null); + /** Properties of a Company. */ + interface ICompany { + + /** Company name */ + name?: (string|null); + + /** Company companyId */ + companyId?: (number|Long|string|null); + + /** Company displayName */ + displayName?: (string|null); + + /** Company type */ + type?: (google.ads.admanager.v1.CompanyTypeEnum.CompanyType|keyof typeof google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null); + + /** Company address */ + address?: (string|null); + + /** Company email */ + email?: (string|null); + + /** Company fax */ + fax?: (string|null); + + /** Company phone */ + phone?: (string|null); + + /** Company externalId */ + externalId?: (string|null); + + /** Company comment */ + comment?: (string|null); + + /** Company creditStatus */ + creditStatus?: (google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|keyof typeof google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null); + + /** Company appliedLabels */ + appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + + /** Company primaryContact */ + primaryContact?: (string|null); + + /** Company appliedTeams */ + appliedTeams?: (string[]|null); + + /** Company thirdPartyCompanyId */ + thirdPartyCompanyId?: (number|Long|string|null); + + /** Company updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a BatchCreateEntitySignalsMappingsRequest. */ - class BatchCreateEntitySignalsMappingsRequest implements IBatchCreateEntitySignalsMappingsRequest { + /** Represents a Company. */ + class Company implements ICompany { /** - * Constructs a new BatchCreateEntitySignalsMappingsRequest. + * Constructs a new Company. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest); + constructor(properties?: google.ads.admanager.v1.ICompany); - /** BatchCreateEntitySignalsMappingsRequest parent. */ - public parent: string; + /** Company name. */ + public name: string; - /** BatchCreateEntitySignalsMappingsRequest requests. */ - public requests: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest[]; + /** Company companyId. */ + public companyId?: (number|Long|string|null); + + /** Company displayName. */ + public displayName?: (string|null); + + /** Company type. */ + public type?: (google.ads.admanager.v1.CompanyTypeEnum.CompanyType|keyof typeof google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null); + + /** Company address. */ + public address?: (string|null); + + /** Company email. */ + public email?: (string|null); + + /** Company fax. */ + public fax?: (string|null); + + /** Company phone. */ + public phone?: (string|null); + + /** Company externalId. */ + public externalId?: (string|null); + + /** Company comment. */ + public comment?: (string|null); + + /** Company creditStatus. */ + public creditStatus?: (google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|keyof typeof google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null); + + /** Company appliedLabels. */ + public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + + /** Company primaryContact. */ + public primaryContact?: (string|null); + + /** Company appliedTeams. */ + public appliedTeams: string[]; + + /** Company thirdPartyCompanyId. */ + public thirdPartyCompanyId?: (number|Long|string|null); + + /** Company updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new BatchCreateEntitySignalsMappingsRequest instance using the specified properties. + * Creates a new Company instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateEntitySignalsMappingsRequest instance + * @returns Company instance */ - public static create(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + public static create(properties?: google.ads.admanager.v1.ICompany): google.ads.admanager.v1.Company; /** - * Encodes the specified BatchCreateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. - * @param message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified Company message. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. + * @param message Company message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICompany, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. - * @param message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified Company message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. + * @param message Company message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICompany, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a Company message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateEntitySignalsMappingsRequest + * @returns Company * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Company; /** - * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a Company message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateEntitySignalsMappingsRequest + * @returns Company * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Company; /** - * Verifies a BatchCreateEntitySignalsMappingsRequest message. + * Verifies a Company 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 BatchCreateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Company message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateEntitySignalsMappingsRequest + * @returns Company */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Company; /** - * Creates a plain object from a BatchCreateEntitySignalsMappingsRequest message. Also converts values to other types if specified. - * @param message BatchCreateEntitySignalsMappingsRequest + * Creates a plain object from a Company message. Also converts values to other types if specified. + * @param message Company * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Company, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateEntitySignalsMappingsRequest to JSON. + * Converts this Company to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BatchCreateEntitySignalsMappingsRequest + * Gets the default type url for Company * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BatchCreateEntitySignalsMappingsResponse. */ - interface IBatchCreateEntitySignalsMappingsResponse { + /** Represents a CompanyService */ + class CompanyService extends $protobuf.rpc.Service { - /** BatchCreateEntitySignalsMappingsResponse entitySignalsMappings */ - entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + /** + * Constructs a new CompanyService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CompanyService 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): CompanyService; + + /** + * Calls GetCompany. + * @param request GetCompanyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Company + */ + public getCompany(request: google.ads.admanager.v1.IGetCompanyRequest, callback: google.ads.admanager.v1.CompanyService.GetCompanyCallback): void; + + /** + * Calls GetCompany. + * @param request GetCompanyRequest message or plain object + * @returns Promise + */ + public getCompany(request: google.ads.admanager.v1.IGetCompanyRequest): Promise; + + /** + * Calls ListCompanies. + * @param request ListCompaniesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompaniesResponse + */ + public listCompanies(request: google.ads.admanager.v1.IListCompaniesRequest, callback: google.ads.admanager.v1.CompanyService.ListCompaniesCallback): void; + + /** + * Calls ListCompanies. + * @param request ListCompaniesRequest message or plain object + * @returns Promise + */ + public listCompanies(request: google.ads.admanager.v1.IListCompaniesRequest): Promise; } - /** Represents a BatchCreateEntitySignalsMappingsResponse. */ - class BatchCreateEntitySignalsMappingsResponse implements IBatchCreateEntitySignalsMappingsResponse { + namespace CompanyService { /** - * Constructs a new BatchCreateEntitySignalsMappingsResponse. + * Callback as used by {@link google.ads.admanager.v1.CompanyService|getCompany}. + * @param error Error, if any + * @param [response] Company + */ + type GetCompanyCallback = (error: (Error|null), response?: google.ads.admanager.v1.Company) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CompanyService|listCompanies}. + * @param error Error, if any + * @param [response] ListCompaniesResponse + */ + type ListCompaniesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCompaniesResponse) => void; + } + + /** Properties of a GetCompanyRequest. */ + interface IGetCompanyRequest { + + /** GetCompanyRequest name */ + name?: (string|null); + } + + /** Represents a GetCompanyRequest. */ + class GetCompanyRequest implements IGetCompanyRequest { + + /** + * Constructs a new GetCompanyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse); + constructor(properties?: google.ads.admanager.v1.IGetCompanyRequest); - /** BatchCreateEntitySignalsMappingsResponse entitySignalsMappings. */ - public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; + /** GetCompanyRequest name. */ + public name: string; /** - * Creates a new BatchCreateEntitySignalsMappingsResponse instance using the specified properties. + * Creates a new GetCompanyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateEntitySignalsMappingsResponse instance + * @returns GetCompanyRequest instance */ - public static create(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + public static create(properties?: google.ads.admanager.v1.IGetCompanyRequest): google.ads.admanager.v1.GetCompanyRequest; /** - * Encodes the specified BatchCreateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. - * @param message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified GetCompanyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. + * @param message GetCompanyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCompanyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. - * @param message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified GetCompanyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. + * @param message GetCompanyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCompanyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a GetCompanyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateEntitySignalsMappingsResponse + * @returns GetCompanyRequest * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCompanyRequest; /** - * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCompanyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateEntitySignalsMappingsResponse + * @returns GetCompanyRequest * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCompanyRequest; /** - * Verifies a BatchCreateEntitySignalsMappingsResponse message. + * Verifies a GetCompanyRequest 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 BatchCreateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCompanyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateEntitySignalsMappingsResponse + * @returns GetCompanyRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCompanyRequest; /** - * Creates a plain object from a BatchCreateEntitySignalsMappingsResponse message. Also converts values to other types if specified. - * @param message BatchCreateEntitySignalsMappingsResponse + * Creates a plain object from a GetCompanyRequest message. Also converts values to other types if specified. + * @param message GetCompanyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCompanyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateEntitySignalsMappingsResponse to JSON. + * Converts this GetCompanyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BatchCreateEntitySignalsMappingsResponse + * Gets the default type url for GetCompanyRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BatchUpdateEntitySignalsMappingsRequest. */ - interface IBatchUpdateEntitySignalsMappingsRequest { + /** Properties of a ListCompaniesRequest. */ + interface IListCompaniesRequest { - /** BatchUpdateEntitySignalsMappingsRequest parent */ + /** ListCompaniesRequest parent */ parent?: (string|null); - /** BatchUpdateEntitySignalsMappingsRequest requests */ - requests?: (google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest[]|null); + /** ListCompaniesRequest pageSize */ + pageSize?: (number|null); + + /** ListCompaniesRequest pageToken */ + pageToken?: (string|null); + + /** ListCompaniesRequest filter */ + filter?: (string|null); + + /** ListCompaniesRequest orderBy */ + orderBy?: (string|null); + + /** ListCompaniesRequest skip */ + skip?: (number|null); } - /** Represents a BatchUpdateEntitySignalsMappingsRequest. */ - class BatchUpdateEntitySignalsMappingsRequest implements IBatchUpdateEntitySignalsMappingsRequest { + /** Represents a ListCompaniesRequest. */ + class ListCompaniesRequest implements IListCompaniesRequest { /** - * Constructs a new BatchUpdateEntitySignalsMappingsRequest. + * Constructs a new ListCompaniesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest); + constructor(properties?: google.ads.admanager.v1.IListCompaniesRequest); - /** BatchUpdateEntitySignalsMappingsRequest parent. */ + /** ListCompaniesRequest parent. */ public parent: string; - /** BatchUpdateEntitySignalsMappingsRequest requests. */ - public requests: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest[]; + /** ListCompaniesRequest pageSize. */ + public pageSize: number; + + /** ListCompaniesRequest pageToken. */ + public pageToken: string; + + /** ListCompaniesRequest filter. */ + public filter: string; + + /** ListCompaniesRequest orderBy. */ + public orderBy: string; + + /** ListCompaniesRequest skip. */ + public skip: number; /** - * Creates a new BatchUpdateEntitySignalsMappingsRequest instance using the specified properties. + * Creates a new ListCompaniesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateEntitySignalsMappingsRequest instance + * @returns ListCompaniesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + public static create(properties?: google.ads.admanager.v1.IListCompaniesRequest): google.ads.admanager.v1.ListCompaniesRequest; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. - * @param message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified ListCompaniesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. + * @param message ListCompaniesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCompaniesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. - * @param message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * Encodes the specified ListCompaniesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. + * @param message ListCompaniesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCompaniesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a ListCompaniesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchUpdateEntitySignalsMappingsRequest + * @returns ListCompaniesRequest * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCompaniesRequest; /** - * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCompaniesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchUpdateEntitySignalsMappingsRequest + * @returns ListCompaniesRequest * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCompaniesRequest; /** - * Verifies a BatchUpdateEntitySignalsMappingsRequest message. + * Verifies a ListCompaniesRequest 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 BatchUpdateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCompaniesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchUpdateEntitySignalsMappingsRequest + * @returns ListCompaniesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCompaniesRequest; /** - * Creates a plain object from a BatchUpdateEntitySignalsMappingsRequest message. Also converts values to other types if specified. - * @param message BatchUpdateEntitySignalsMappingsRequest + * Creates a plain object from a ListCompaniesRequest message. Also converts values to other types if specified. + * @param message ListCompaniesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCompaniesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateEntitySignalsMappingsRequest to JSON. + * Converts this ListCompaniesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BatchUpdateEntitySignalsMappingsRequest + * Gets the default type url for ListCompaniesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BatchUpdateEntitySignalsMappingsResponse. */ - interface IBatchUpdateEntitySignalsMappingsResponse { + /** Properties of a ListCompaniesResponse. */ + interface IListCompaniesResponse { - /** BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings */ - entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + /** ListCompaniesResponse companies */ + companies?: (google.ads.admanager.v1.ICompany[]|null); + + /** ListCompaniesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCompaniesResponse totalSize */ + totalSize?: (number|null); } - /** Represents a BatchUpdateEntitySignalsMappingsResponse. */ - class BatchUpdateEntitySignalsMappingsResponse implements IBatchUpdateEntitySignalsMappingsResponse { + /** Represents a ListCompaniesResponse. */ + class ListCompaniesResponse implements IListCompaniesResponse { /** - * Constructs a new BatchUpdateEntitySignalsMappingsResponse. + * Constructs a new ListCompaniesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse); + constructor(properties?: google.ads.admanager.v1.IListCompaniesResponse); - /** BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings. */ - public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; + /** ListCompaniesResponse companies. */ + public companies: google.ads.admanager.v1.ICompany[]; + + /** ListCompaniesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCompaniesResponse totalSize. */ + public totalSize: number; /** - * Creates a new BatchUpdateEntitySignalsMappingsResponse instance using the specified properties. + * Creates a new ListCompaniesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateEntitySignalsMappingsResponse instance + * @returns ListCompaniesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + public static create(properties?: google.ads.admanager.v1.IListCompaniesResponse): google.ads.admanager.v1.ListCompaniesResponse; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. - * @param message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified ListCompaniesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. + * @param message ListCompaniesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCompaniesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. - * @param message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * Encodes the specified ListCompaniesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. + * @param message ListCompaniesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCompaniesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a ListCompaniesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchUpdateEntitySignalsMappingsResponse + * @returns ListCompaniesResponse * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCompaniesResponse; /** - * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCompaniesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchUpdateEntitySignalsMappingsResponse + * @returns ListCompaniesResponse * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCompaniesResponse; /** - * Verifies a BatchUpdateEntitySignalsMappingsResponse message. + * Verifies a ListCompaniesResponse 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 BatchUpdateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCompaniesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchUpdateEntitySignalsMappingsResponse + * @returns ListCompaniesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCompaniesResponse; /** - * Creates a plain object from a BatchUpdateEntitySignalsMappingsResponse message. Also converts values to other types if specified. - * @param message BatchUpdateEntitySignalsMappingsResponse - * @param [options] Conversion options + * Creates a plain object from a ListCompaniesResponse message. Also converts values to other types if specified. + * @param message ListCompaniesResponse + * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCompaniesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateEntitySignalsMappingsResponse to JSON. + * Converts this ListCompaniesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BatchUpdateEntitySignalsMappingsResponse + * Gets the default type url for ListCompaniesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GeoTarget. */ - interface IGeoTarget { + /** Properties of a ContactStatusEnum. */ + interface IContactStatusEnum { + } - /** GeoTarget name */ + /** Represents a ContactStatusEnum. */ + class ContactStatusEnum implements IContactStatusEnum { + + /** + * Constructs a new ContactStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IContactStatusEnum); + + /** + * Creates a new ContactStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IContactStatusEnum): google.ads.admanager.v1.ContactStatusEnum; + + /** + * Encodes the specified ContactStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.ContactStatusEnum.verify|verify} messages. + * @param message ContactStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IContactStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContactStatusEnum.verify|verify} messages. + * @param message ContactStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IContactStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactStatusEnum + * @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.ads.admanager.v1.ContactStatusEnum; + + /** + * Decodes a ContactStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactStatusEnum + * @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.ads.admanager.v1.ContactStatusEnum; + + /** + * Verifies a ContactStatusEnum 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 ContactStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ContactStatusEnum; + + /** + * Creates a plain object from a ContactStatusEnum message. Also converts values to other types if specified. + * @param message ContactStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ContactStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContactStatusEnum { + + /** ContactStatus enum. */ + enum ContactStatus { + CONTACT_STATUS_UNSPECIFIED = 0, + INVITE_CANCELED = 1, + INVITE_EXPIRED = 2, + INVITE_PENDING = 3, + UNINVITED = 4, + USER_ACTIVE = 5, + USER_DISABLED = 6 + } + } + + /** Properties of a Contact. */ + interface IContact { + + /** Contact name */ name?: (string|null); - /** GeoTarget displayName */ + /** Contact displayName */ displayName?: (string|null); - /** GeoTarget canonicalParent */ - canonicalParent?: (string|null); + /** Contact company */ + company?: (string|null); - /** GeoTarget parentNames */ - parentNames?: (string[]|null); + /** Contact status */ + status?: (google.ads.admanager.v1.ContactStatusEnum.ContactStatus|keyof typeof google.ads.admanager.v1.ContactStatusEnum.ContactStatus|null); - /** GeoTarget regionCode */ - regionCode?: (string|null); + /** Contact address */ + address?: (string|null); - /** GeoTarget type */ - type?: (string|null); + /** Contact cellPhone */ + cellPhone?: (string|null); - /** GeoTarget targetable */ - targetable?: (boolean|null); + /** Contact comment */ + comment?: (string|null); + + /** Contact email */ + email?: (string|null); + + /** Contact fax */ + fax?: (string|null); + + /** Contact title */ + title?: (string|null); + + /** Contact workPhone */ + workPhone?: (string|null); } - /** Represents a GeoTarget. */ - class GeoTarget implements IGeoTarget { + /** Represents a Contact. */ + class Contact implements IContact { /** - * Constructs a new GeoTarget. + * Constructs a new Contact. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGeoTarget); + constructor(properties?: google.ads.admanager.v1.IContact); - /** GeoTarget name. */ + /** Contact name. */ public name: string; - /** GeoTarget displayName. */ + /** Contact displayName. */ public displayName?: (string|null); - /** GeoTarget canonicalParent. */ - public canonicalParent?: (string|null); + /** Contact company. */ + public company?: (string|null); - /** GeoTarget parentNames. */ - public parentNames: string[]; + /** Contact status. */ + public status?: (google.ads.admanager.v1.ContactStatusEnum.ContactStatus|keyof typeof google.ads.admanager.v1.ContactStatusEnum.ContactStatus|null); - /** GeoTarget regionCode. */ - public regionCode?: (string|null); + /** Contact address. */ + public address?: (string|null); - /** GeoTarget type. */ - public type?: (string|null); + /** Contact cellPhone. */ + public cellPhone?: (string|null); - /** GeoTarget targetable. */ - public targetable?: (boolean|null); + /** Contact comment. */ + public comment?: (string|null); + + /** Contact email. */ + public email?: (string|null); + + /** Contact fax. */ + public fax?: (string|null); + + /** Contact title. */ + public title?: (string|null); + + /** Contact workPhone. */ + public workPhone?: (string|null); /** - * Creates a new GeoTarget instance using the specified properties. + * Creates a new Contact instance using the specified properties. * @param [properties] Properties to set - * @returns GeoTarget instance + * @returns Contact instance */ - public static create(properties?: google.ads.admanager.v1.IGeoTarget): google.ads.admanager.v1.GeoTarget; + public static create(properties?: google.ads.admanager.v1.IContact): google.ads.admanager.v1.Contact; /** - * Encodes the specified GeoTarget message. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. - * @param message GeoTarget message or plain object to encode + * Encodes the specified Contact message. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGeoTarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeoTarget message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. - * @param message GeoTarget message or plain object to encode + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGeoTarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeoTarget message from the specified reader or buffer. + * Decodes a Contact message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeoTarget + * @returns Contact * @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.ads.admanager.v1.GeoTarget; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Contact; /** - * Decodes a GeoTarget message from the specified reader or buffer, length delimited. + * Decodes a Contact message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeoTarget + * @returns Contact * @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.ads.admanager.v1.GeoTarget; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Contact; /** - * Verifies a GeoTarget message. + * Verifies a Contact 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 GeoTarget message from a plain object. Also converts values to their respective internal types. + * Creates a Contact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeoTarget + * @returns Contact */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GeoTarget; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Contact; /** - * Creates a plain object from a GeoTarget message. Also converts values to other types if specified. - * @param message GeoTarget + * Creates a plain object from a Contact message. Also converts values to other types if specified. + * @param message Contact * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GeoTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeoTarget to JSON. + * Converts this Contact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeoTarget + * Gets the default type url for Contact * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a GeoTargetService */ - class GeoTargetService extends $protobuf.rpc.Service { + /** Represents a ContactService */ + class ContactService extends $protobuf.rpc.Service { /** - * Constructs a new GeoTargetService service. + * Constructs a new ContactService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -9550,1197 +9290,1191 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new GeoTargetService service using the specified rpc implementation. + * Creates new ContactService 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): GeoTargetService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContactService; /** - * Calls GetGeoTarget. - * @param request GetGeoTargetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GeoTarget + * Calls GetContact. + * @param request GetContactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Contact */ - public getGeoTarget(request: google.ads.admanager.v1.IGetGeoTargetRequest, callback: google.ads.admanager.v1.GeoTargetService.GetGeoTargetCallback): void; + public getContact(request: google.ads.admanager.v1.IGetContactRequest, callback: google.ads.admanager.v1.ContactService.GetContactCallback): void; /** - * Calls GetGeoTarget. - * @param request GetGeoTargetRequest message or plain object + * Calls GetContact. + * @param request GetContactRequest message or plain object * @returns Promise */ - public getGeoTarget(request: google.ads.admanager.v1.IGetGeoTargetRequest): Promise; + public getContact(request: google.ads.admanager.v1.IGetContactRequest): Promise; /** - * Calls ListGeoTargets. - * @param request ListGeoTargetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListGeoTargetsResponse + * Calls ListContacts. + * @param request ListContactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContactsResponse */ - public listGeoTargets(request: google.ads.admanager.v1.IListGeoTargetsRequest, callback: google.ads.admanager.v1.GeoTargetService.ListGeoTargetsCallback): void; + public listContacts(request: google.ads.admanager.v1.IListContactsRequest, callback: google.ads.admanager.v1.ContactService.ListContactsCallback): void; /** - * Calls ListGeoTargets. - * @param request ListGeoTargetsRequest message or plain object + * Calls ListContacts. + * @param request ListContactsRequest message or plain object * @returns Promise */ - public listGeoTargets(request: google.ads.admanager.v1.IListGeoTargetsRequest): Promise; + public listContacts(request: google.ads.admanager.v1.IListContactsRequest): Promise; + + /** + * Calls CreateContact. + * @param request CreateContactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Contact + */ + public createContact(request: google.ads.admanager.v1.ICreateContactRequest, callback: google.ads.admanager.v1.ContactService.CreateContactCallback): void; + + /** + * Calls CreateContact. + * @param request CreateContactRequest message or plain object + * @returns Promise + */ + public createContact(request: google.ads.admanager.v1.ICreateContactRequest): Promise; + + /** + * Calls BatchCreateContacts. + * @param request BatchCreateContactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateContactsResponse + */ + public batchCreateContacts(request: google.ads.admanager.v1.IBatchCreateContactsRequest, callback: google.ads.admanager.v1.ContactService.BatchCreateContactsCallback): void; + + /** + * Calls BatchCreateContacts. + * @param request BatchCreateContactsRequest message or plain object + * @returns Promise + */ + public batchCreateContacts(request: google.ads.admanager.v1.IBatchCreateContactsRequest): Promise; + + /** + * Calls UpdateContact. + * @param request UpdateContactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Contact + */ + public updateContact(request: google.ads.admanager.v1.IUpdateContactRequest, callback: google.ads.admanager.v1.ContactService.UpdateContactCallback): void; + + /** + * Calls UpdateContact. + * @param request UpdateContactRequest message or plain object + * @returns Promise + */ + public updateContact(request: google.ads.admanager.v1.IUpdateContactRequest): Promise; + + /** + * Calls BatchUpdateContacts. + * @param request BatchUpdateContactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateContactsResponse + */ + public batchUpdateContacts(request: google.ads.admanager.v1.IBatchUpdateContactsRequest, callback: google.ads.admanager.v1.ContactService.BatchUpdateContactsCallback): void; + + /** + * Calls BatchUpdateContacts. + * @param request BatchUpdateContactsRequest message or plain object + * @returns Promise + */ + public batchUpdateContacts(request: google.ads.admanager.v1.IBatchUpdateContactsRequest): Promise; } - namespace GeoTargetService { + namespace ContactService { /** - * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|getGeoTarget}. + * Callback as used by {@link google.ads.admanager.v1.ContactService|getContact}. * @param error Error, if any - * @param [response] GeoTarget + * @param [response] Contact */ - type GetGeoTargetCallback = (error: (Error|null), response?: google.ads.admanager.v1.GeoTarget) => void; + type GetContactCallback = (error: (Error|null), response?: google.ads.admanager.v1.Contact) => void; /** - * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|listGeoTargets}. + * Callback as used by {@link google.ads.admanager.v1.ContactService|listContacts}. * @param error Error, if any - * @param [response] ListGeoTargetsResponse + * @param [response] ListContactsResponse */ - type ListGeoTargetsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListGeoTargetsResponse) => void; + type ListContactsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListContactsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|createContact}. + * @param error Error, if any + * @param [response] Contact + */ + type CreateContactCallback = (error: (Error|null), response?: google.ads.admanager.v1.Contact) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|batchCreateContacts}. + * @param error Error, if any + * @param [response] BatchCreateContactsResponse + */ + type BatchCreateContactsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateContactsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|updateContact}. + * @param error Error, if any + * @param [response] Contact + */ + type UpdateContactCallback = (error: (Error|null), response?: google.ads.admanager.v1.Contact) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|batchUpdateContacts}. + * @param error Error, if any + * @param [response] BatchUpdateContactsResponse + */ + type BatchUpdateContactsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateContactsResponse) => void; } - /** Properties of a GetGeoTargetRequest. */ - interface IGetGeoTargetRequest { + /** Properties of a GetContactRequest. */ + interface IGetContactRequest { - /** GetGeoTargetRequest name */ + /** GetContactRequest name */ name?: (string|null); } - /** Represents a GetGeoTargetRequest. */ - class GetGeoTargetRequest implements IGetGeoTargetRequest { + /** Represents a GetContactRequest. */ + class GetContactRequest implements IGetContactRequest { /** - * Constructs a new GetGeoTargetRequest. + * Constructs a new GetContactRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetGeoTargetRequest); + constructor(properties?: google.ads.admanager.v1.IGetContactRequest); - /** GetGeoTargetRequest name. */ + /** GetContactRequest name. */ public name: string; /** - * Creates a new GetGeoTargetRequest instance using the specified properties. + * Creates a new GetContactRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetGeoTargetRequest instance + * @returns GetContactRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetGeoTargetRequest): google.ads.admanager.v1.GetGeoTargetRequest; + public static create(properties?: google.ads.admanager.v1.IGetContactRequest): google.ads.admanager.v1.GetContactRequest; /** - * Encodes the specified GetGeoTargetRequest message. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. - * @param message GetGeoTargetRequest message or plain object to encode + * Encodes the specified GetContactRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContactRequest.verify|verify} messages. + * @param message GetContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetGeoTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetGeoTargetRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. - * @param message GetGeoTargetRequest message or plain object to encode + * Encodes the specified GetContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContactRequest.verify|verify} messages. + * @param message GetContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetGeoTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetGeoTargetRequest message from the specified reader or buffer. + * Decodes a GetContactRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetGeoTargetRequest + * @returns GetContactRequest * @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.ads.admanager.v1.GetGeoTargetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetContactRequest; /** - * Decodes a GetGeoTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContactRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetGeoTargetRequest + * @returns GetContactRequest * @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.ads.admanager.v1.GetGeoTargetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetContactRequest; /** - * Verifies a GetGeoTargetRequest message. + * Verifies a GetContactRequest 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 GetGeoTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContactRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetGeoTargetRequest + * @returns GetContactRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetGeoTargetRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetContactRequest; /** - * Creates a plain object from a GetGeoTargetRequest message. Also converts values to other types if specified. - * @param message GetGeoTargetRequest + * Creates a plain object from a GetContactRequest message. Also converts values to other types if specified. + * @param message GetContactRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetGeoTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetContactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetGeoTargetRequest to JSON. + * Converts this GetContactRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetGeoTargetRequest + * Gets the default type url for GetContactRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListGeoTargetsRequest. */ - interface IListGeoTargetsRequest { + /** Properties of a ListContactsRequest. */ + interface IListContactsRequest { - /** ListGeoTargetsRequest parent */ + /** ListContactsRequest parent */ parent?: (string|null); - /** ListGeoTargetsRequest pageSize */ + /** ListContactsRequest pageSize */ pageSize?: (number|null); - /** ListGeoTargetsRequest pageToken */ + /** ListContactsRequest pageToken */ pageToken?: (string|null); - /** ListGeoTargetsRequest filter */ + /** ListContactsRequest filter */ filter?: (string|null); - /** ListGeoTargetsRequest orderBy */ + /** ListContactsRequest orderBy */ orderBy?: (string|null); - /** ListGeoTargetsRequest skip */ + /** ListContactsRequest skip */ skip?: (number|null); } - /** Represents a ListGeoTargetsRequest. */ - class ListGeoTargetsRequest implements IListGeoTargetsRequest { + /** Represents a ListContactsRequest. */ + class ListContactsRequest implements IListContactsRequest { /** - * Constructs a new ListGeoTargetsRequest. + * Constructs a new ListContactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListGeoTargetsRequest); + constructor(properties?: google.ads.admanager.v1.IListContactsRequest); - /** ListGeoTargetsRequest parent. */ + /** ListContactsRequest parent. */ public parent: string; - /** ListGeoTargetsRequest pageSize. */ + /** ListContactsRequest pageSize. */ public pageSize: number; - /** ListGeoTargetsRequest pageToken. */ + /** ListContactsRequest pageToken. */ public pageToken: string; - /** ListGeoTargetsRequest filter. */ + /** ListContactsRequest filter. */ public filter: string; - /** ListGeoTargetsRequest orderBy. */ + /** ListContactsRequest orderBy. */ public orderBy: string; - /** ListGeoTargetsRequest skip. */ + /** ListContactsRequest skip. */ public skip: number; /** - * Creates a new ListGeoTargetsRequest instance using the specified properties. + * Creates a new ListContactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListGeoTargetsRequest instance + * @returns ListContactsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListGeoTargetsRequest): google.ads.admanager.v1.ListGeoTargetsRequest; + public static create(properties?: google.ads.admanager.v1.IListContactsRequest): google.ads.admanager.v1.ListContactsRequest; /** - * Encodes the specified ListGeoTargetsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. - * @param message ListGeoTargetsRequest message or plain object to encode + * Encodes the specified ListContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContactsRequest.verify|verify} messages. + * @param message ListContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListGeoTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGeoTargetsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. - * @param message ListGeoTargetsRequest message or plain object to encode + * Encodes the specified ListContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContactsRequest.verify|verify} messages. + * @param message ListContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListGeoTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGeoTargetsRequest message from the specified reader or buffer. + * Decodes a ListContactsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGeoTargetsRequest + * @returns ListContactsRequest * @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.ads.admanager.v1.ListGeoTargetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContactsRequest; /** - * Decodes a ListGeoTargetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContactsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGeoTargetsRequest + * @returns ListContactsRequest * @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.ads.admanager.v1.ListGeoTargetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContactsRequest; /** - * Verifies a ListGeoTargetsRequest message. + * Verifies a ListContactsRequest 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 ListGeoTargetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContactsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGeoTargetsRequest + * @returns ListContactsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListGeoTargetsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContactsRequest; /** - * Creates a plain object from a ListGeoTargetsRequest message. Also converts values to other types if specified. - * @param message ListGeoTargetsRequest + * Creates a plain object from a ListContactsRequest message. Also converts values to other types if specified. + * @param message ListContactsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListGeoTargetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGeoTargetsRequest to JSON. + * Converts this ListContactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListGeoTargetsRequest + * Gets the default type url for ListContactsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListGeoTargetsResponse. */ - interface IListGeoTargetsResponse { + /** Properties of a ListContactsResponse. */ + interface IListContactsResponse { - /** ListGeoTargetsResponse geoTargets */ - geoTargets?: (google.ads.admanager.v1.IGeoTarget[]|null); + /** ListContactsResponse contacts */ + contacts?: (google.ads.admanager.v1.IContact[]|null); - /** ListGeoTargetsResponse nextPageToken */ + /** ListContactsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListGeoTargetsResponse totalSize */ + /** ListContactsResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListGeoTargetsResponse. */ - class ListGeoTargetsResponse implements IListGeoTargetsResponse { + /** Represents a ListContactsResponse. */ + class ListContactsResponse implements IListContactsResponse { /** - * Constructs a new ListGeoTargetsResponse. + * Constructs a new ListContactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListGeoTargetsResponse); + constructor(properties?: google.ads.admanager.v1.IListContactsResponse); - /** ListGeoTargetsResponse geoTargets. */ - public geoTargets: google.ads.admanager.v1.IGeoTarget[]; + /** ListContactsResponse contacts. */ + public contacts: google.ads.admanager.v1.IContact[]; - /** ListGeoTargetsResponse nextPageToken. */ + /** ListContactsResponse nextPageToken. */ public nextPageToken: string; - /** ListGeoTargetsResponse totalSize. */ + /** ListContactsResponse totalSize. */ public totalSize: number; /** - * Creates a new ListGeoTargetsResponse instance using the specified properties. + * Creates a new ListContactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListGeoTargetsResponse instance + * @returns ListContactsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListGeoTargetsResponse): google.ads.admanager.v1.ListGeoTargetsResponse; + public static create(properties?: google.ads.admanager.v1.IListContactsResponse): google.ads.admanager.v1.ListContactsResponse; /** - * Encodes the specified ListGeoTargetsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. - * @param message ListGeoTargetsResponse message or plain object to encode + * Encodes the specified ListContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContactsResponse.verify|verify} messages. + * @param message ListContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListGeoTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGeoTargetsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. - * @param message ListGeoTargetsResponse message or plain object to encode + * Encodes the specified ListContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContactsResponse.verify|verify} messages. + * @param message ListContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListGeoTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGeoTargetsResponse message from the specified reader or buffer. + * Decodes a ListContactsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGeoTargetsResponse + * @returns ListContactsResponse * @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.ads.admanager.v1.ListGeoTargetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContactsResponse; /** - * Decodes a ListGeoTargetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContactsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGeoTargetsResponse + * @returns ListContactsResponse * @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.ads.admanager.v1.ListGeoTargetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContactsResponse; /** - * Verifies a ListGeoTargetsResponse message. + * Verifies a ListContactsResponse 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 ListGeoTargetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContactsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGeoTargetsResponse + * @returns ListContactsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListGeoTargetsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContactsResponse; /** - * Creates a plain object from a ListGeoTargetsResponse message. Also converts values to other types if specified. - * @param message ListGeoTargetsResponse + * Creates a plain object from a ListContactsResponse message. Also converts values to other types if specified. + * @param message ListContactsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListGeoTargetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGeoTargetsResponse to JSON. + * Converts this ListContactsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListGeoTargetsResponse + * Gets the default type url for ListContactsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Label. */ - interface ILabel { + /** Properties of a CreateContactRequest. */ + interface ICreateContactRequest { - /** Label name */ - name?: (string|null); + /** CreateContactRequest parent */ + parent?: (string|null); + + /** CreateContactRequest contact */ + contact?: (google.ads.admanager.v1.IContact|null); } - /** Represents a Label. */ - class Label implements ILabel { + /** Represents a CreateContactRequest. */ + class CreateContactRequest implements ICreateContactRequest { /** - * Constructs a new Label. + * Constructs a new CreateContactRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ILabel); + constructor(properties?: google.ads.admanager.v1.ICreateContactRequest); - /** Label name. */ - public name: string; + /** CreateContactRequest parent. */ + public parent: string; + + /** CreateContactRequest contact. */ + public contact?: (google.ads.admanager.v1.IContact|null); /** - * Creates a new Label instance using the specified properties. + * Creates a new CreateContactRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Label instance + * @returns CreateContactRequest instance */ - public static create(properties?: google.ads.admanager.v1.ILabel): google.ads.admanager.v1.Label; + public static create(properties?: google.ads.admanager.v1.ICreateContactRequest): google.ads.admanager.v1.CreateContactRequest; /** - * Encodes the specified Label message. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified CreateContactRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateContactRequest.verify|verify} messages. + * @param message CreateContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreateContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified CreateContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateContactRequest.verify|verify} messages. + * @param message CreateContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreateContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a CreateContactRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Label + * @returns CreateContactRequest * @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.ads.admanager.v1.Label; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreateContactRequest; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a CreateContactRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Label + * @returns CreateContactRequest * @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.ads.admanager.v1.Label; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreateContactRequest; /** - * Verifies a Label message. + * Verifies a CreateContactRequest 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 Label message from a plain object. Also converts values to their respective internal types. + * Creates a CreateContactRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Label + * @returns CreateContactRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Label; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateContactRequest; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. - * @param message Label + * Creates a plain object from a CreateContactRequest message. Also converts values to other types if specified. + * @param message CreateContactRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreateContactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Label to JSON. + * Converts this CreateContactRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Label + * Gets the default type url for CreateContactRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LiveStreamEvent. */ - interface ILiveStreamEvent { + /** Properties of a BatchCreateContactsRequest. */ + interface IBatchCreateContactsRequest { - /** LiveStreamEvent name */ - name?: (string|null); + /** BatchCreateContactsRequest parent */ + parent?: (string|null); + + /** BatchCreateContactsRequest requests */ + requests?: (google.ads.admanager.v1.ICreateContactRequest[]|null); } - /** Represents a LiveStreamEvent. */ - class LiveStreamEvent implements ILiveStreamEvent { + /** Represents a BatchCreateContactsRequest. */ + class BatchCreateContactsRequest implements IBatchCreateContactsRequest { /** - * Constructs a new LiveStreamEvent. + * Constructs a new BatchCreateContactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ILiveStreamEvent); + constructor(properties?: google.ads.admanager.v1.IBatchCreateContactsRequest); - /** LiveStreamEvent name. */ - public name: string; + /** BatchCreateContactsRequest parent. */ + public parent: string; + + /** BatchCreateContactsRequest requests. */ + public requests: google.ads.admanager.v1.ICreateContactRequest[]; /** - * Creates a new LiveStreamEvent instance using the specified properties. + * Creates a new BatchCreateContactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LiveStreamEvent instance + * @returns BatchCreateContactsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ILiveStreamEvent): google.ads.admanager.v1.LiveStreamEvent; + public static create(properties?: google.ads.admanager.v1.IBatchCreateContactsRequest): google.ads.admanager.v1.BatchCreateContactsRequest; /** - * Encodes the specified LiveStreamEvent message. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. - * @param message LiveStreamEvent message or plain object to encode + * Encodes the specified BatchCreateContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsRequest.verify|verify} messages. + * @param message BatchCreateContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ILiveStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LiveStreamEvent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. - * @param message LiveStreamEvent message or plain object to encode + * Encodes the specified BatchCreateContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsRequest.verify|verify} messages. + * @param message BatchCreateContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ILiveStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LiveStreamEvent message from the specified reader or buffer. + * Decodes a BatchCreateContactsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LiveStreamEvent + * @returns BatchCreateContactsRequest * @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.ads.admanager.v1.LiveStreamEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateContactsRequest; /** - * Decodes a LiveStreamEvent message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateContactsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LiveStreamEvent + * @returns BatchCreateContactsRequest * @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.ads.admanager.v1.LiveStreamEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateContactsRequest; /** - * Verifies a LiveStreamEvent message. + * Verifies a BatchCreateContactsRequest 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 LiveStreamEvent message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateContactsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LiveStreamEvent + * @returns BatchCreateContactsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.LiveStreamEvent; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateContactsRequest; /** - * Creates a plain object from a LiveStreamEvent message. Also converts values to other types if specified. - * @param message LiveStreamEvent + * Creates a plain object from a BatchCreateContactsRequest message. Also converts values to other types if specified. + * @param message BatchCreateContactsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.LiveStreamEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateContactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LiveStreamEvent to JSON. + * Converts this BatchCreateContactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LiveStreamEvent + * Gets the default type url for BatchCreateContactsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Network. */ - interface INetwork { - - /** Network name */ - name?: (string|null); - - /** Network displayName */ - displayName?: (string|null); - - /** Network networkCode */ - networkCode?: (string|null); - - /** Network propertyCode */ - propertyCode?: (string|null); - - /** Network timeZone */ - timeZone?: (string|null); - - /** Network currencyCode */ - currencyCode?: (string|null); - - /** Network secondaryCurrencyCodes */ - secondaryCurrencyCodes?: (string[]|null); - - /** Network effectiveRootAdUnit */ - effectiveRootAdUnit?: (string|null); - - /** Network testNetwork */ - testNetwork?: (boolean|null); + /** Properties of a BatchCreateContactsResponse. */ + interface IBatchCreateContactsResponse { - /** Network networkId */ - networkId?: (number|Long|string|null); + /** BatchCreateContactsResponse contacts */ + contacts?: (google.ads.admanager.v1.IContact[]|null); } - /** Represents a Network. */ - class Network implements INetwork { + /** Represents a BatchCreateContactsResponse. */ + class BatchCreateContactsResponse implements IBatchCreateContactsResponse { /** - * Constructs a new Network. + * Constructs a new BatchCreateContactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.INetwork); - - /** Network name. */ - public name: string; - - /** Network displayName. */ - public displayName: string; - - /** Network networkCode. */ - public networkCode: string; - - /** Network propertyCode. */ - public propertyCode: string; - - /** Network timeZone. */ - public timeZone: string; - - /** Network currencyCode. */ - public currencyCode: string; - - /** Network secondaryCurrencyCodes. */ - public secondaryCurrencyCodes: string[]; - - /** Network effectiveRootAdUnit. */ - public effectiveRootAdUnit: string; - - /** Network testNetwork. */ - public testNetwork: boolean; + constructor(properties?: google.ads.admanager.v1.IBatchCreateContactsResponse); - /** Network networkId. */ - public networkId: (number|Long|string); + /** BatchCreateContactsResponse contacts. */ + public contacts: google.ads.admanager.v1.IContact[]; /** - * Creates a new Network instance using the specified properties. + * Creates a new BatchCreateContactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Network instance + * @returns BatchCreateContactsResponse instance */ - public static create(properties?: google.ads.admanager.v1.INetwork): google.ads.admanager.v1.Network; + public static create(properties?: google.ads.admanager.v1.IBatchCreateContactsResponse): google.ads.admanager.v1.BatchCreateContactsResponse; /** - * Encodes the specified Network message. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. - * @param message Network message or plain object to encode + * Encodes the specified BatchCreateContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsResponse.verify|verify} messages. + * @param message BatchCreateContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Network message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. - * @param message Network message or plain object to encode + * Encodes the specified BatchCreateContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsResponse.verify|verify} messages. + * @param message BatchCreateContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Network message from the specified reader or buffer. + * Decodes a BatchCreateContactsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Network + * @returns BatchCreateContactsResponse * @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.ads.admanager.v1.Network; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateContactsResponse; /** - * Decodes a Network message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateContactsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Network + * @returns BatchCreateContactsResponse * @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.ads.admanager.v1.Network; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateContactsResponse; /** - * Verifies a Network message. + * Verifies a BatchCreateContactsResponse 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 Network message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateContactsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Network + * @returns BatchCreateContactsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Network; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateContactsResponse; /** - * Creates a plain object from a Network message. Also converts values to other types if specified. - * @param message Network + * Creates a plain object from a BatchCreateContactsResponse message. Also converts values to other types if specified. + * @param message BatchCreateContactsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Network, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateContactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Network to JSON. + * Converts this BatchCreateContactsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Network + * Gets the default type url for BatchCreateContactsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a NetworkService */ - class NetworkService extends $protobuf.rpc.Service { - - /** - * Constructs a new NetworkService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new NetworkService 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): NetworkService; - - /** - * Calls GetNetwork. - * @param request GetNetworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Network - */ - public getNetwork(request: google.ads.admanager.v1.IGetNetworkRequest, callback: google.ads.admanager.v1.NetworkService.GetNetworkCallback): void; - - /** - * Calls GetNetwork. - * @param request GetNetworkRequest message or plain object - * @returns Promise - */ - public getNetwork(request: google.ads.admanager.v1.IGetNetworkRequest): Promise; - - /** - * Calls ListNetworks. - * @param request ListNetworksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNetworksResponse - */ - public listNetworks(request: google.ads.admanager.v1.IListNetworksRequest, callback: google.ads.admanager.v1.NetworkService.ListNetworksCallback): void; - - /** - * Calls ListNetworks. - * @param request ListNetworksRequest message or plain object - * @returns Promise - */ - public listNetworks(request: google.ads.admanager.v1.IListNetworksRequest): Promise; - } - - namespace NetworkService { - - /** - * Callback as used by {@link google.ads.admanager.v1.NetworkService|getNetwork}. - * @param error Error, if any - * @param [response] Network - */ - type GetNetworkCallback = (error: (Error|null), response?: google.ads.admanager.v1.Network) => void; - - /** - * Callback as used by {@link google.ads.admanager.v1.NetworkService|listNetworks}. - * @param error Error, if any - * @param [response] ListNetworksResponse - */ - type ListNetworksCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListNetworksResponse) => void; - } + /** Properties of an UpdateContactRequest. */ + interface IUpdateContactRequest { - /** Properties of a GetNetworkRequest. */ - interface IGetNetworkRequest { + /** UpdateContactRequest contact */ + contact?: (google.ads.admanager.v1.IContact|null); - /** GetNetworkRequest name */ - name?: (string|null); + /** UpdateContactRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetNetworkRequest. */ - class GetNetworkRequest implements IGetNetworkRequest { + /** Represents an UpdateContactRequest. */ + class UpdateContactRequest implements IUpdateContactRequest { /** - * Constructs a new GetNetworkRequest. + * Constructs a new UpdateContactRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetNetworkRequest); + constructor(properties?: google.ads.admanager.v1.IUpdateContactRequest); - /** GetNetworkRequest name. */ - public name: string; + /** UpdateContactRequest contact. */ + public contact?: (google.ads.admanager.v1.IContact|null); + + /** UpdateContactRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetNetworkRequest instance using the specified properties. + * Creates a new UpdateContactRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetNetworkRequest instance + * @returns UpdateContactRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetNetworkRequest): google.ads.admanager.v1.GetNetworkRequest; + public static create(properties?: google.ads.admanager.v1.IUpdateContactRequest): google.ads.admanager.v1.UpdateContactRequest; /** - * Encodes the specified GetNetworkRequest message. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. - * @param message GetNetworkRequest message or plain object to encode + * Encodes the specified UpdateContactRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateContactRequest.verify|verify} messages. + * @param message UpdateContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetNetworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IUpdateContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNetworkRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. - * @param message GetNetworkRequest message or plain object to encode + * Encodes the specified UpdateContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateContactRequest.verify|verify} messages. + * @param message UpdateContactRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetNetworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateContactRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNetworkRequest message from the specified reader or buffer. + * Decodes an UpdateContactRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNetworkRequest + * @returns UpdateContactRequest * @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.ads.admanager.v1.GetNetworkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.UpdateContactRequest; /** - * Decodes a GetNetworkRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateContactRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNetworkRequest + * @returns UpdateContactRequest * @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.ads.admanager.v1.GetNetworkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.UpdateContactRequest; /** - * Verifies a GetNetworkRequest message. + * Verifies an UpdateContactRequest 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 GetNetworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateContactRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNetworkRequest + * @returns UpdateContactRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetNetworkRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateContactRequest; /** - * Creates a plain object from a GetNetworkRequest message. Also converts values to other types if specified. - * @param message GetNetworkRequest + * Creates a plain object from an UpdateContactRequest message. Also converts values to other types if specified. + * @param message UpdateContactRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetNetworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.UpdateContactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNetworkRequest to JSON. + * Converts this UpdateContactRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetNetworkRequest + * Gets the default type url for UpdateContactRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListNetworksRequest. */ - interface IListNetworksRequest { + /** Properties of a BatchUpdateContactsRequest. */ + interface IBatchUpdateContactsRequest { + + /** BatchUpdateContactsRequest parent */ + parent?: (string|null); + + /** BatchUpdateContactsRequest requests */ + requests?: (google.ads.admanager.v1.IUpdateContactRequest[]|null); } - /** Represents a ListNetworksRequest. */ - class ListNetworksRequest implements IListNetworksRequest { + /** Represents a BatchUpdateContactsRequest. */ + class BatchUpdateContactsRequest implements IBatchUpdateContactsRequest { /** - * Constructs a new ListNetworksRequest. + * Constructs a new BatchUpdateContactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListNetworksRequest); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateContactsRequest); + + /** BatchUpdateContactsRequest parent. */ + public parent: string; + + /** BatchUpdateContactsRequest requests. */ + public requests: google.ads.admanager.v1.IUpdateContactRequest[]; /** - * Creates a new ListNetworksRequest instance using the specified properties. + * Creates a new BatchUpdateContactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListNetworksRequest instance + * @returns BatchUpdateContactsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListNetworksRequest): google.ads.admanager.v1.ListNetworksRequest; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateContactsRequest): google.ads.admanager.v1.BatchUpdateContactsRequest; /** - * Encodes the specified ListNetworksRequest message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. - * @param message ListNetworksRequest message or plain object to encode + * Encodes the specified BatchUpdateContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsRequest.verify|verify} messages. + * @param message BatchUpdateContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListNetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNetworksRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. - * @param message ListNetworksRequest message or plain object to encode + * Encodes the specified BatchUpdateContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsRequest.verify|verify} messages. + * @param message BatchUpdateContactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListNetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNetworksRequest message from the specified reader or buffer. + * Decodes a BatchUpdateContactsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNetworksRequest + * @returns BatchUpdateContactsRequest * @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.ads.admanager.v1.ListNetworksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateContactsRequest; /** - * Decodes a ListNetworksRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateContactsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNetworksRequest + * @returns BatchUpdateContactsRequest * @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.ads.admanager.v1.ListNetworksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateContactsRequest; /** - * Verifies a ListNetworksRequest message. + * Verifies a BatchUpdateContactsRequest 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 ListNetworksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateContactsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNetworksRequest + * @returns BatchUpdateContactsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListNetworksRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateContactsRequest; /** - * Creates a plain object from a ListNetworksRequest message. Also converts values to other types if specified. - * @param message ListNetworksRequest + * Creates a plain object from a BatchUpdateContactsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateContactsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListNetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateContactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNetworksRequest to JSON. + * Converts this BatchUpdateContactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListNetworksRequest + * Gets the default type url for BatchUpdateContactsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListNetworksResponse. */ - interface IListNetworksResponse { + /** Properties of a BatchUpdateContactsResponse. */ + interface IBatchUpdateContactsResponse { - /** ListNetworksResponse networks */ - networks?: (google.ads.admanager.v1.INetwork[]|null); + /** BatchUpdateContactsResponse contacts */ + contacts?: (google.ads.admanager.v1.IContact[]|null); } - /** Represents a ListNetworksResponse. */ - class ListNetworksResponse implements IListNetworksResponse { + /** Represents a BatchUpdateContactsResponse. */ + class BatchUpdateContactsResponse implements IBatchUpdateContactsResponse { /** - * Constructs a new ListNetworksResponse. + * Constructs a new BatchUpdateContactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListNetworksResponse); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateContactsResponse); - /** ListNetworksResponse networks. */ - public networks: google.ads.admanager.v1.INetwork[]; + /** BatchUpdateContactsResponse contacts. */ + public contacts: google.ads.admanager.v1.IContact[]; /** - * Creates a new ListNetworksResponse instance using the specified properties. + * Creates a new BatchUpdateContactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListNetworksResponse instance + * @returns BatchUpdateContactsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListNetworksResponse): google.ads.admanager.v1.ListNetworksResponse; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateContactsResponse): google.ads.admanager.v1.BatchUpdateContactsResponse; /** - * Encodes the specified ListNetworksResponse message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. - * @param message ListNetworksResponse message or plain object to encode + * Encodes the specified BatchUpdateContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsResponse.verify|verify} messages. + * @param message BatchUpdateContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListNetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNetworksResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. - * @param message ListNetworksResponse message or plain object to encode + * Encodes the specified BatchUpdateContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsResponse.verify|verify} messages. + * @param message BatchUpdateContactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListNetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateContactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNetworksResponse message from the specified reader or buffer. + * Decodes a BatchUpdateContactsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNetworksResponse + * @returns BatchUpdateContactsResponse * @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.ads.admanager.v1.ListNetworksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateContactsResponse; /** - * Decodes a ListNetworksResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateContactsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNetworksResponse + * @returns BatchUpdateContactsResponse * @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.ads.admanager.v1.ListNetworksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateContactsResponse; /** - * Verifies a ListNetworksResponse message. + * Verifies a BatchUpdateContactsResponse 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 ListNetworksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateContactsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNetworksResponse + * @returns BatchUpdateContactsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListNetworksResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateContactsResponse; /** - * Creates a plain object from a ListNetworksResponse message. Also converts values to other types if specified. - * @param message ListNetworksResponse + * Creates a plain object from a BatchUpdateContactsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateContactsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListNetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateContactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNetworksResponse to JSON. + * Converts this BatchUpdateContactsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListNetworksResponse + * Gets the default type url for BatchUpdateContactsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperatingSystem. */ - interface IOperatingSystem { + /** Properties of a ContentBundle. */ + interface IContentBundle { - /** OperatingSystem name */ + /** ContentBundle name */ name?: (string|null); - /** OperatingSystem displayName */ + /** ContentBundle displayName */ displayName?: (string|null); } - /** Represents an OperatingSystem. */ - class OperatingSystem implements IOperatingSystem { + /** Represents a ContentBundle. */ + class ContentBundle implements IContentBundle { /** - * Constructs a new OperatingSystem. + * Constructs a new ContentBundle. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IOperatingSystem); + constructor(properties?: google.ads.admanager.v1.IContentBundle); - /** OperatingSystem name. */ + /** ContentBundle name. */ public name: string; - /** OperatingSystem displayName. */ - public displayName?: (string|null); + /** ContentBundle displayName. */ + public displayName: string; /** - * Creates a new OperatingSystem instance using the specified properties. + * Creates a new ContentBundle instance using the specified properties. * @param [properties] Properties to set - * @returns OperatingSystem instance + * @returns ContentBundle instance */ - public static create(properties?: google.ads.admanager.v1.IOperatingSystem): google.ads.admanager.v1.OperatingSystem; + public static create(properties?: google.ads.admanager.v1.IContentBundle): google.ads.admanager.v1.ContentBundle; /** - * Encodes the specified OperatingSystem message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. - * @param message OperatingSystem message or plain object to encode + * Encodes the specified ContentBundle message. Does not implicitly {@link google.ads.admanager.v1.ContentBundle.verify|verify} messages. + * @param message ContentBundle message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IOperatingSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IContentBundle, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperatingSystem message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. - * @param message OperatingSystem message or plain object to encode + * Encodes the specified ContentBundle message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentBundle.verify|verify} messages. + * @param message ContentBundle message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IContentBundle, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperatingSystem message from the specified reader or buffer. + * Decodes a ContentBundle message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperatingSystem + * @returns ContentBundle * @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.ads.admanager.v1.OperatingSystem; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ContentBundle; /** - * Decodes an OperatingSystem message from the specified reader or buffer, length delimited. + * Decodes a ContentBundle message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperatingSystem + * @returns ContentBundle * @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.ads.admanager.v1.OperatingSystem; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ContentBundle; /** - * Verifies an OperatingSystem message. + * Verifies a ContentBundle 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 OperatingSystem message from a plain object. Also converts values to their respective internal types. + * Creates a ContentBundle message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperatingSystem + * @returns ContentBundle */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystem; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ContentBundle; /** - * Creates a plain object from an OperatingSystem message. Also converts values to other types if specified. - * @param message OperatingSystem + * Creates a plain object from a ContentBundle message. Also converts values to other types if specified. + * @param message ContentBundle * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.OperatingSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ContentBundle, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperatingSystem to JSON. + * Converts this ContentBundle to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperatingSystem + * Gets the default type url for ContentBundle * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an OperatingSystemService */ - class OperatingSystemService extends $protobuf.rpc.Service { + /** Represents a ContentBundleService */ + class ContentBundleService extends $protobuf.rpc.Service { /** - * Constructs a new OperatingSystemService service. + * Constructs a new ContentBundleService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -10748,513 +10482,501 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new OperatingSystemService service using the specified rpc implementation. + * Creates new ContentBundleService 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): OperatingSystemService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContentBundleService; /** - * Calls GetOperatingSystem. - * @param request GetOperatingSystemRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OperatingSystem + * Calls GetContentBundle. + * @param request GetContentBundleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ContentBundle */ - public getOperatingSystem(request: google.ads.admanager.v1.IGetOperatingSystemRequest, callback: google.ads.admanager.v1.OperatingSystemService.GetOperatingSystemCallback): void; + public getContentBundle(request: google.ads.admanager.v1.IGetContentBundleRequest, callback: google.ads.admanager.v1.ContentBundleService.GetContentBundleCallback): void; /** - * Calls GetOperatingSystem. - * @param request GetOperatingSystemRequest message or plain object + * Calls GetContentBundle. + * @param request GetContentBundleRequest message or plain object * @returns Promise */ - public getOperatingSystem(request: google.ads.admanager.v1.IGetOperatingSystemRequest): Promise; + public getContentBundle(request: google.ads.admanager.v1.IGetContentBundleRequest): Promise; /** - * Calls ListOperatingSystems. - * @param request ListOperatingSystemsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperatingSystemsResponse + * Calls ListContentBundles. + * @param request ListContentBundlesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContentBundlesResponse */ - public listOperatingSystems(request: google.ads.admanager.v1.IListOperatingSystemsRequest, callback: google.ads.admanager.v1.OperatingSystemService.ListOperatingSystemsCallback): void; + public listContentBundles(request: google.ads.admanager.v1.IListContentBundlesRequest, callback: google.ads.admanager.v1.ContentBundleService.ListContentBundlesCallback): void; /** - * Calls ListOperatingSystems. - * @param request ListOperatingSystemsRequest message or plain object + * Calls ListContentBundles. + * @param request ListContentBundlesRequest message or plain object * @returns Promise */ - public listOperatingSystems(request: google.ads.admanager.v1.IListOperatingSystemsRequest): Promise; + public listContentBundles(request: google.ads.admanager.v1.IListContentBundlesRequest): Promise; } - namespace OperatingSystemService { + namespace ContentBundleService { /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|getOperatingSystem}. + * Callback as used by {@link google.ads.admanager.v1.ContentBundleService|getContentBundle}. * @param error Error, if any - * @param [response] OperatingSystem + * @param [response] ContentBundle */ - type GetOperatingSystemCallback = (error: (Error|null), response?: google.ads.admanager.v1.OperatingSystem) => void; + type GetContentBundleCallback = (error: (Error|null), response?: google.ads.admanager.v1.ContentBundle) => void; /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|listOperatingSystems}. + * Callback as used by {@link google.ads.admanager.v1.ContentBundleService|listContentBundles}. * @param error Error, if any - * @param [response] ListOperatingSystemsResponse + * @param [response] ListContentBundlesResponse */ - type ListOperatingSystemsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOperatingSystemsResponse) => void; + type ListContentBundlesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListContentBundlesResponse) => void; } - /** Properties of a GetOperatingSystemRequest. */ - interface IGetOperatingSystemRequest { + /** Properties of a GetContentBundleRequest. */ + interface IGetContentBundleRequest { - /** GetOperatingSystemRequest name */ + /** GetContentBundleRequest name */ name?: (string|null); } - /** Represents a GetOperatingSystemRequest. */ - class GetOperatingSystemRequest implements IGetOperatingSystemRequest { + /** Represents a GetContentBundleRequest. */ + class GetContentBundleRequest implements IGetContentBundleRequest { /** - * Constructs a new GetOperatingSystemRequest. + * Constructs a new GetContentBundleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetOperatingSystemRequest); + constructor(properties?: google.ads.admanager.v1.IGetContentBundleRequest); - /** GetOperatingSystemRequest name. */ + /** GetContentBundleRequest name. */ public name: string; /** - * Creates a new GetOperatingSystemRequest instance using the specified properties. + * Creates a new GetContentBundleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetOperatingSystemRequest instance + * @returns GetContentBundleRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetOperatingSystemRequest): google.ads.admanager.v1.GetOperatingSystemRequest; + public static create(properties?: google.ads.admanager.v1.IGetContentBundleRequest): google.ads.admanager.v1.GetContentBundleRequest; /** - * Encodes the specified GetOperatingSystemRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. - * @param message GetOperatingSystemRequest message or plain object to encode + * Encodes the specified GetContentBundleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentBundleRequest.verify|verify} messages. + * @param message GetContentBundleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetOperatingSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetContentBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOperatingSystemRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. - * @param message GetOperatingSystemRequest message or plain object to encode + * Encodes the specified GetContentBundleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentBundleRequest.verify|verify} messages. + * @param message GetContentBundleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetOperatingSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetContentBundleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOperatingSystemRequest message from the specified reader or buffer. + * Decodes a GetContentBundleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOperatingSystemRequest + * @returns GetContentBundleRequest * @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.ads.admanager.v1.GetOperatingSystemRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetContentBundleRequest; /** - * Decodes a GetOperatingSystemRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentBundleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOperatingSystemRequest + * @returns GetContentBundleRequest * @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.ads.admanager.v1.GetOperatingSystemRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetContentBundleRequest; /** - * Verifies a GetOperatingSystemRequest message. + * Verifies a GetContentBundleRequest 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 GetOperatingSystemRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentBundleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOperatingSystemRequest + * @returns GetContentBundleRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOperatingSystemRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetContentBundleRequest; /** - * Creates a plain object from a GetOperatingSystemRequest message. Also converts values to other types if specified. - * @param message GetOperatingSystemRequest + * Creates a plain object from a GetContentBundleRequest message. Also converts values to other types if specified. + * @param message GetContentBundleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetOperatingSystemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetContentBundleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOperatingSystemRequest to JSON. + * Converts this GetContentBundleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetOperatingSystemRequest + * Gets the default type url for GetContentBundleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOperatingSystemsRequest. */ - interface IListOperatingSystemsRequest { + /** Properties of a ListContentBundlesRequest. */ + interface IListContentBundlesRequest { - /** ListOperatingSystemsRequest parent */ + /** ListContentBundlesRequest parent */ parent?: (string|null); - /** ListOperatingSystemsRequest pageSize */ + /** ListContentBundlesRequest pageSize */ pageSize?: (number|null); - /** ListOperatingSystemsRequest pageToken */ + /** ListContentBundlesRequest pageToken */ pageToken?: (string|null); - /** ListOperatingSystemsRequest filter */ + /** ListContentBundlesRequest filter */ filter?: (string|null); - /** ListOperatingSystemsRequest orderBy */ + /** ListContentBundlesRequest orderBy */ orderBy?: (string|null); - /** ListOperatingSystemsRequest skip */ + /** ListContentBundlesRequest skip */ skip?: (number|null); } - /** Represents a ListOperatingSystemsRequest. */ - class ListOperatingSystemsRequest implements IListOperatingSystemsRequest { + /** Represents a ListContentBundlesRequest. */ + class ListContentBundlesRequest implements IListContentBundlesRequest { /** - * Constructs a new ListOperatingSystemsRequest. + * Constructs a new ListContentBundlesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOperatingSystemsRequest); + constructor(properties?: google.ads.admanager.v1.IListContentBundlesRequest); - /** ListOperatingSystemsRequest parent. */ + /** ListContentBundlesRequest parent. */ public parent: string; - /** ListOperatingSystemsRequest pageSize. */ + /** ListContentBundlesRequest pageSize. */ public pageSize: number; - /** ListOperatingSystemsRequest pageToken. */ + /** ListContentBundlesRequest pageToken. */ public pageToken: string; - /** ListOperatingSystemsRequest filter. */ + /** ListContentBundlesRequest filter. */ public filter: string; - /** ListOperatingSystemsRequest orderBy. */ + /** ListContentBundlesRequest orderBy. */ public orderBy: string; - /** ListOperatingSystemsRequest skip. */ + /** ListContentBundlesRequest skip. */ public skip: number; /** - * Creates a new ListOperatingSystemsRequest instance using the specified properties. + * Creates a new ListContentBundlesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListOperatingSystemsRequest instance + * @returns ListContentBundlesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListOperatingSystemsRequest): google.ads.admanager.v1.ListOperatingSystemsRequest; + public static create(properties?: google.ads.admanager.v1.IListContentBundlesRequest): google.ads.admanager.v1.ListContentBundlesRequest; /** - * Encodes the specified ListOperatingSystemsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. - * @param message ListOperatingSystemsRequest message or plain object to encode + * Encodes the specified ListContentBundlesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesRequest.verify|verify} messages. + * @param message ListContentBundlesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListOperatingSystemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentBundlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOperatingSystemsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. - * @param message ListOperatingSystemsRequest message or plain object to encode + * Encodes the specified ListContentBundlesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesRequest.verify|verify} messages. + * @param message ListContentBundlesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentBundlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer. + * Decodes a ListContentBundlesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOperatingSystemsRequest + * @returns ListContentBundlesRequest * @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.ads.admanager.v1.ListOperatingSystemsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentBundlesRequest; /** - * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentBundlesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOperatingSystemsRequest + * @returns ListContentBundlesRequest * @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.ads.admanager.v1.ListOperatingSystemsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentBundlesRequest; /** - * Verifies a ListOperatingSystemsRequest message. + * Verifies a ListContentBundlesRequest 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 ListOperatingSystemsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentBundlesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOperatingSystemsRequest + * @returns ListContentBundlesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentBundlesRequest; /** - * Creates a plain object from a ListOperatingSystemsRequest message. Also converts values to other types if specified. - * @param message ListOperatingSystemsRequest + * Creates a plain object from a ListContentBundlesRequest message. Also converts values to other types if specified. + * @param message ListContentBundlesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListOperatingSystemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentBundlesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOperatingSystemsRequest to JSON. + * Converts this ListContentBundlesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOperatingSystemsRequest + * Gets the default type url for ListContentBundlesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOperatingSystemsResponse. */ - interface IListOperatingSystemsResponse { + /** Properties of a ListContentBundlesResponse. */ + interface IListContentBundlesResponse { - /** ListOperatingSystemsResponse operatingSystems */ - operatingSystems?: (google.ads.admanager.v1.IOperatingSystem[]|null); + /** ListContentBundlesResponse contentBundles */ + contentBundles?: (google.ads.admanager.v1.IContentBundle[]|null); - /** ListOperatingSystemsResponse nextPageToken */ + /** ListContentBundlesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListOperatingSystemsResponse totalSize */ + /** ListContentBundlesResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListOperatingSystemsResponse. */ - class ListOperatingSystemsResponse implements IListOperatingSystemsResponse { + /** Represents a ListContentBundlesResponse. */ + class ListContentBundlesResponse implements IListContentBundlesResponse { /** - * Constructs a new ListOperatingSystemsResponse. + * Constructs a new ListContentBundlesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOperatingSystemsResponse); + constructor(properties?: google.ads.admanager.v1.IListContentBundlesResponse); - /** ListOperatingSystemsResponse operatingSystems. */ - public operatingSystems: google.ads.admanager.v1.IOperatingSystem[]; + /** ListContentBundlesResponse contentBundles. */ + public contentBundles: google.ads.admanager.v1.IContentBundle[]; - /** ListOperatingSystemsResponse nextPageToken. */ + /** ListContentBundlesResponse nextPageToken. */ public nextPageToken: string; - /** ListOperatingSystemsResponse totalSize. */ + /** ListContentBundlesResponse totalSize. */ public totalSize: number; /** - * Creates a new ListOperatingSystemsResponse instance using the specified properties. + * Creates a new ListContentBundlesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListOperatingSystemsResponse instance + * @returns ListContentBundlesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListOperatingSystemsResponse): google.ads.admanager.v1.ListOperatingSystemsResponse; + public static create(properties?: google.ads.admanager.v1.IListContentBundlesResponse): google.ads.admanager.v1.ListContentBundlesResponse; /** - * Encodes the specified ListOperatingSystemsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. - * @param message ListOperatingSystemsResponse message or plain object to encode + * Encodes the specified ListContentBundlesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesResponse.verify|verify} messages. + * @param message ListContentBundlesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListOperatingSystemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentBundlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOperatingSystemsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. - * @param message ListOperatingSystemsResponse message or plain object to encode + * Encodes the specified ListContentBundlesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesResponse.verify|verify} messages. + * @param message ListContentBundlesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentBundlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer. + * Decodes a ListContentBundlesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOperatingSystemsResponse + * @returns ListContentBundlesResponse * @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.ads.admanager.v1.ListOperatingSystemsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentBundlesResponse; /** - * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContentBundlesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOperatingSystemsResponse + * @returns ListContentBundlesResponse * @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.ads.admanager.v1.ListOperatingSystemsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentBundlesResponse; /** - * Verifies a ListOperatingSystemsResponse message. + * Verifies a ListContentBundlesResponse 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 ListOperatingSystemsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentBundlesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOperatingSystemsResponse + * @returns ListContentBundlesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentBundlesResponse; /** - * Creates a plain object from a ListOperatingSystemsResponse message. Also converts values to other types if specified. - * @param message ListOperatingSystemsResponse + * Creates a plain object from a ListContentBundlesResponse message. Also converts values to other types if specified. + * @param message ListContentBundlesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListOperatingSystemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentBundlesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOperatingSystemsResponse to JSON. + * Converts this ListContentBundlesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOperatingSystemsResponse + * Gets the default type url for ListContentBundlesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperatingSystemVersion. */ - interface IOperatingSystemVersion { + /** Properties of a ContentLabel. */ + interface IContentLabel { - /** OperatingSystemVersion name */ + /** ContentLabel name */ name?: (string|null); - /** OperatingSystemVersion majorVersion */ - majorVersion?: (number|null); - - /** OperatingSystemVersion minorVersion */ - minorVersion?: (number|null); - - /** OperatingSystemVersion microVersion */ - microVersion?: (number|null); + /** ContentLabel displayName */ + displayName?: (string|null); } - /** Represents an OperatingSystemVersion. */ - class OperatingSystemVersion implements IOperatingSystemVersion { + /** Represents a ContentLabel. */ + class ContentLabel implements IContentLabel { /** - * Constructs a new OperatingSystemVersion. + * Constructs a new ContentLabel. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IOperatingSystemVersion); + constructor(properties?: google.ads.admanager.v1.IContentLabel); - /** OperatingSystemVersion name. */ + /** ContentLabel name. */ public name: string; - /** OperatingSystemVersion majorVersion. */ - public majorVersion?: (number|null); - - /** OperatingSystemVersion minorVersion. */ - public minorVersion?: (number|null); - - /** OperatingSystemVersion microVersion. */ - public microVersion?: (number|null); + /** ContentLabel displayName. */ + public displayName: string; /** - * Creates a new OperatingSystemVersion instance using the specified properties. + * Creates a new ContentLabel instance using the specified properties. * @param [properties] Properties to set - * @returns OperatingSystemVersion instance + * @returns ContentLabel instance */ - public static create(properties?: google.ads.admanager.v1.IOperatingSystemVersion): google.ads.admanager.v1.OperatingSystemVersion; + public static create(properties?: google.ads.admanager.v1.IContentLabel): google.ads.admanager.v1.ContentLabel; /** - * Encodes the specified OperatingSystemVersion message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. - * @param message OperatingSystemVersion message or plain object to encode + * Encodes the specified ContentLabel message. Does not implicitly {@link google.ads.admanager.v1.ContentLabel.verify|verify} messages. + * @param message ContentLabel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IOperatingSystemVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IContentLabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperatingSystemVersion message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. - * @param message OperatingSystemVersion message or plain object to encode + * Encodes the specified ContentLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentLabel.verify|verify} messages. + * @param message ContentLabel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystemVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IContentLabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperatingSystemVersion message from the specified reader or buffer. + * Decodes a ContentLabel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperatingSystemVersion + * @returns ContentLabel * @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.ads.admanager.v1.OperatingSystemVersion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ContentLabel; /** - * Decodes an OperatingSystemVersion message from the specified reader or buffer, length delimited. + * Decodes a ContentLabel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperatingSystemVersion + * @returns ContentLabel * @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.ads.admanager.v1.OperatingSystemVersion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ContentLabel; /** - * Verifies an OperatingSystemVersion message. + * Verifies a ContentLabel 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 OperatingSystemVersion message from a plain object. Also converts values to their respective internal types. + * Creates a ContentLabel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperatingSystemVersion + * @returns ContentLabel */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystemVersion; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ContentLabel; /** - * Creates a plain object from an OperatingSystemVersion message. Also converts values to other types if specified. - * @param message OperatingSystemVersion + * Creates a plain object from a ContentLabel message. Also converts values to other types if specified. + * @param message ContentLabel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.OperatingSystemVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ContentLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperatingSystemVersion to JSON. + * Converts this ContentLabel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperatingSystemVersion + * Gets the default type url for ContentLabel * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an OperatingSystemVersionService */ - class OperatingSystemVersionService extends $protobuf.rpc.Service { + /** Represents a ContentLabelService */ + class ContentLabelService extends $protobuf.rpc.Service { /** - * Constructs a new OperatingSystemVersionService service. + * Constructs a new ContentLabelService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -11262,769 +10984,501 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new OperatingSystemVersionService service using the specified rpc implementation. + * Creates new ContentLabelService 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): OperatingSystemVersionService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContentLabelService; /** - * Calls GetOperatingSystemVersion. - * @param request GetOperatingSystemVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OperatingSystemVersion + * Calls GetContentLabel. + * @param request GetContentLabelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ContentLabel */ - public getOperatingSystemVersion(request: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, callback: google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersionCallback): void; + public getContentLabel(request: google.ads.admanager.v1.IGetContentLabelRequest, callback: google.ads.admanager.v1.ContentLabelService.GetContentLabelCallback): void; /** - * Calls GetOperatingSystemVersion. - * @param request GetOperatingSystemVersionRequest message or plain object + * Calls GetContentLabel. + * @param request GetContentLabelRequest message or plain object * @returns Promise */ - public getOperatingSystemVersion(request: google.ads.admanager.v1.IGetOperatingSystemVersionRequest): Promise; + public getContentLabel(request: google.ads.admanager.v1.IGetContentLabelRequest): Promise; /** - * Calls ListOperatingSystemVersions. - * @param request ListOperatingSystemVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperatingSystemVersionsResponse + * Calls ListContentLabels. + * @param request ListContentLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContentLabelsResponse */ - public listOperatingSystemVersions(request: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, callback: google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersionsCallback): void; + public listContentLabels(request: google.ads.admanager.v1.IListContentLabelsRequest, callback: google.ads.admanager.v1.ContentLabelService.ListContentLabelsCallback): void; /** - * Calls ListOperatingSystemVersions. - * @param request ListOperatingSystemVersionsRequest message or plain object + * Calls ListContentLabels. + * @param request ListContentLabelsRequest message or plain object * @returns Promise */ - public listOperatingSystemVersions(request: google.ads.admanager.v1.IListOperatingSystemVersionsRequest): Promise; + public listContentLabels(request: google.ads.admanager.v1.IListContentLabelsRequest): Promise; } - namespace OperatingSystemVersionService { + namespace ContentLabelService { /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|getOperatingSystemVersion}. + * Callback as used by {@link google.ads.admanager.v1.ContentLabelService|getContentLabel}. * @param error Error, if any - * @param [response] OperatingSystemVersion + * @param [response] ContentLabel */ - type GetOperatingSystemVersionCallback = (error: (Error|null), response?: google.ads.admanager.v1.OperatingSystemVersion) => void; + type GetContentLabelCallback = (error: (Error|null), response?: google.ads.admanager.v1.ContentLabel) => void; /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|listOperatingSystemVersions}. + * Callback as used by {@link google.ads.admanager.v1.ContentLabelService|listContentLabels}. * @param error Error, if any - * @param [response] ListOperatingSystemVersionsResponse + * @param [response] ListContentLabelsResponse */ - type ListOperatingSystemVersionsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOperatingSystemVersionsResponse) => void; + type ListContentLabelsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListContentLabelsResponse) => void; } - /** Properties of a GetOperatingSystemVersionRequest. */ - interface IGetOperatingSystemVersionRequest { + /** Properties of a GetContentLabelRequest. */ + interface IGetContentLabelRequest { - /** GetOperatingSystemVersionRequest name */ + /** GetContentLabelRequest name */ name?: (string|null); } - /** Represents a GetOperatingSystemVersionRequest. */ - class GetOperatingSystemVersionRequest implements IGetOperatingSystemVersionRequest { + /** Represents a GetContentLabelRequest. */ + class GetContentLabelRequest implements IGetContentLabelRequest { /** - * Constructs a new GetOperatingSystemVersionRequest. + * Constructs a new GetContentLabelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetOperatingSystemVersionRequest); + constructor(properties?: google.ads.admanager.v1.IGetContentLabelRequest); - /** GetOperatingSystemVersionRequest name. */ + /** GetContentLabelRequest name. */ public name: string; /** - * Creates a new GetOperatingSystemVersionRequest instance using the specified properties. + * Creates a new GetContentLabelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetOperatingSystemVersionRequest instance + * @returns GetContentLabelRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetOperatingSystemVersionRequest): google.ads.admanager.v1.GetOperatingSystemVersionRequest; + public static create(properties?: google.ads.admanager.v1.IGetContentLabelRequest): google.ads.admanager.v1.GetContentLabelRequest; /** - * Encodes the specified GetOperatingSystemVersionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. - * @param message GetOperatingSystemVersionRequest message or plain object to encode + * Encodes the specified GetContentLabelRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentLabelRequest.verify|verify} messages. + * @param message GetContentLabelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetContentLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOperatingSystemVersionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. - * @param message GetOperatingSystemVersionRequest message or plain object to encode + * Encodes the specified GetContentLabelRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentLabelRequest.verify|verify} messages. + * @param message GetContentLabelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetContentLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer. + * Decodes a GetContentLabelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOperatingSystemVersionRequest + * @returns GetContentLabelRequest * @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.ads.admanager.v1.GetOperatingSystemVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetContentLabelRequest; /** - * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentLabelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOperatingSystemVersionRequest + * @returns GetContentLabelRequest * @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.ads.admanager.v1.GetOperatingSystemVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetContentLabelRequest; /** - * Verifies a GetOperatingSystemVersionRequest message. + * Verifies a GetContentLabelRequest 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 GetOperatingSystemVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentLabelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOperatingSystemVersionRequest + * @returns GetContentLabelRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOperatingSystemVersionRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetContentLabelRequest; /** - * Creates a plain object from a GetOperatingSystemVersionRequest message. Also converts values to other types if specified. - * @param message GetOperatingSystemVersionRequest + * Creates a plain object from a GetContentLabelRequest message. Also converts values to other types if specified. + * @param message GetContentLabelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetOperatingSystemVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetContentLabelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOperatingSystemVersionRequest to JSON. + * Converts this GetContentLabelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetOperatingSystemVersionRequest + * Gets the default type url for GetContentLabelRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOperatingSystemVersionsRequest. */ - interface IListOperatingSystemVersionsRequest { + /** Properties of a ListContentLabelsRequest. */ + interface IListContentLabelsRequest { - /** ListOperatingSystemVersionsRequest parent */ + /** ListContentLabelsRequest parent */ parent?: (string|null); - /** ListOperatingSystemVersionsRequest pageSize */ + /** ListContentLabelsRequest pageSize */ pageSize?: (number|null); - /** ListOperatingSystemVersionsRequest pageToken */ + /** ListContentLabelsRequest pageToken */ pageToken?: (string|null); - /** ListOperatingSystemVersionsRequest filter */ + /** ListContentLabelsRequest filter */ filter?: (string|null); - /** ListOperatingSystemVersionsRequest orderBy */ + /** ListContentLabelsRequest orderBy */ orderBy?: (string|null); - /** ListOperatingSystemVersionsRequest skip */ + /** ListContentLabelsRequest skip */ skip?: (number|null); } - /** Represents a ListOperatingSystemVersionsRequest. */ - class ListOperatingSystemVersionsRequest implements IListOperatingSystemVersionsRequest { + /** Represents a ListContentLabelsRequest. */ + class ListContentLabelsRequest implements IListContentLabelsRequest { /** - * Constructs a new ListOperatingSystemVersionsRequest. + * Constructs a new ListContentLabelsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsRequest); + constructor(properties?: google.ads.admanager.v1.IListContentLabelsRequest); - /** ListOperatingSystemVersionsRequest parent. */ + /** ListContentLabelsRequest parent. */ public parent: string; - /** ListOperatingSystemVersionsRequest pageSize. */ + /** ListContentLabelsRequest pageSize. */ public pageSize: number; - /** ListOperatingSystemVersionsRequest pageToken. */ + /** ListContentLabelsRequest pageToken. */ public pageToken: string; - /** ListOperatingSystemVersionsRequest filter. */ + /** ListContentLabelsRequest filter. */ public filter: string; - /** ListOperatingSystemVersionsRequest orderBy. */ + /** ListContentLabelsRequest orderBy. */ public orderBy: string; - /** ListOperatingSystemVersionsRequest skip. */ + /** ListContentLabelsRequest skip. */ public skip: number; /** - * Creates a new ListOperatingSystemVersionsRequest instance using the specified properties. + * Creates a new ListContentLabelsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListOperatingSystemVersionsRequest instance + * @returns ListContentLabelsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsRequest): google.ads.admanager.v1.ListOperatingSystemVersionsRequest; + public static create(properties?: google.ads.admanager.v1.IListContentLabelsRequest): google.ads.admanager.v1.ListContentLabelsRequest; /** - * Encodes the specified ListOperatingSystemVersionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. - * @param message ListOperatingSystemVersionsRequest message or plain object to encode + * Encodes the specified ListContentLabelsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsRequest.verify|verify} messages. + * @param message ListContentLabelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOperatingSystemVersionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. - * @param message ListOperatingSystemVersionsRequest message or plain object to encode + * Encodes the specified ListContentLabelsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsRequest.verify|verify} messages. + * @param message ListContentLabelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer. + * Decodes a ListContentLabelsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOperatingSystemVersionsRequest + * @returns ListContentLabelsRequest * @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.ads.admanager.v1.ListOperatingSystemVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentLabelsRequest; /** - * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentLabelsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOperatingSystemVersionsRequest + * @returns ListContentLabelsRequest * @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.ads.admanager.v1.ListOperatingSystemVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentLabelsRequest; /** - * Verifies a ListOperatingSystemVersionsRequest message. + * Verifies a ListContentLabelsRequest 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 ListOperatingSystemVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentLabelsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOperatingSystemVersionsRequest + * @returns ListContentLabelsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentLabelsRequest; /** - * Creates a plain object from a ListOperatingSystemVersionsRequest message. Also converts values to other types if specified. - * @param message ListOperatingSystemVersionsRequest + * Creates a plain object from a ListContentLabelsRequest message. Also converts values to other types if specified. + * @param message ListContentLabelsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListOperatingSystemVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOperatingSystemVersionsRequest to JSON. + * Converts this ListContentLabelsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOperatingSystemVersionsRequest + * Gets the default type url for ListContentLabelsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOperatingSystemVersionsResponse. */ - interface IListOperatingSystemVersionsResponse { + /** Properties of a ListContentLabelsResponse. */ + interface IListContentLabelsResponse { - /** ListOperatingSystemVersionsResponse operatingSystemVersions */ - operatingSystemVersions?: (google.ads.admanager.v1.IOperatingSystemVersion[]|null); + /** ListContentLabelsResponse contentLabels */ + contentLabels?: (google.ads.admanager.v1.IContentLabel[]|null); - /** ListOperatingSystemVersionsResponse nextPageToken */ + /** ListContentLabelsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListOperatingSystemVersionsResponse totalSize */ + /** ListContentLabelsResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListOperatingSystemVersionsResponse. */ - class ListOperatingSystemVersionsResponse implements IListOperatingSystemVersionsResponse { + /** Represents a ListContentLabelsResponse. */ + class ListContentLabelsResponse implements IListContentLabelsResponse { /** - * Constructs a new ListOperatingSystemVersionsResponse. + * Constructs a new ListContentLabelsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsResponse); + constructor(properties?: google.ads.admanager.v1.IListContentLabelsResponse); - /** ListOperatingSystemVersionsResponse operatingSystemVersions. */ - public operatingSystemVersions: google.ads.admanager.v1.IOperatingSystemVersion[]; + /** ListContentLabelsResponse contentLabels. */ + public contentLabels: google.ads.admanager.v1.IContentLabel[]; - /** ListOperatingSystemVersionsResponse nextPageToken. */ + /** ListContentLabelsResponse nextPageToken. */ public nextPageToken: string; - /** ListOperatingSystemVersionsResponse totalSize. */ + /** ListContentLabelsResponse totalSize. */ public totalSize: number; /** - * Creates a new ListOperatingSystemVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperatingSystemVersionsResponse instance - */ - public static create(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsResponse): google.ads.admanager.v1.ListOperatingSystemVersionsResponse; - - /** - * Encodes the specified ListOperatingSystemVersionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. - * @param message ListOperatingSystemVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.IListOperatingSystemVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperatingSystemVersionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. - * @param message ListOperatingSystemVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperatingSystemVersionsResponse - * @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.ads.admanager.v1.ListOperatingSystemVersionsResponse; - - /** - * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperatingSystemVersionsResponse - * @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.ads.admanager.v1.ListOperatingSystemVersionsResponse; - - /** - * Verifies a ListOperatingSystemVersionsResponse 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 ListOperatingSystemVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperatingSystemVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemVersionsResponse; - - /** - * Creates a plain object from a ListOperatingSystemVersionsResponse message. Also converts values to other types if specified. - * @param message ListOperatingSystemVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.ListOperatingSystemVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperatingSystemVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperatingSystemVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OrderStatusEnum. */ - interface IOrderStatusEnum { - } - - /** Represents an OrderStatusEnum. */ - class OrderStatusEnum implements IOrderStatusEnum { - - /** - * Constructs a new OrderStatusEnum. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IOrderStatusEnum); - - /** - * Creates a new OrderStatusEnum instance using the specified properties. + * Creates a new ListContentLabelsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns OrderStatusEnum instance + * @returns ListContentLabelsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IOrderStatusEnum): google.ads.admanager.v1.OrderStatusEnum; + public static create(properties?: google.ads.admanager.v1.IListContentLabelsResponse): google.ads.admanager.v1.ListContentLabelsResponse; /** - * Encodes the specified OrderStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. - * @param message OrderStatusEnum message or plain object to encode + * Encodes the specified ListContentLabelsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsResponse.verify|verify} messages. + * @param message ListContentLabelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IOrderStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OrderStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. - * @param message OrderStatusEnum message or plain object to encode + * Encodes the specified ListContentLabelsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsResponse.verify|verify} messages. + * @param message ListContentLabelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IOrderStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OrderStatusEnum message from the specified reader or buffer. + * Decodes a ListContentLabelsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OrderStatusEnum + * @returns ListContentLabelsResponse * @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.ads.admanager.v1.OrderStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentLabelsResponse; /** - * Decodes an OrderStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a ListContentLabelsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OrderStatusEnum + * @returns ListContentLabelsResponse * @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.ads.admanager.v1.OrderStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentLabelsResponse; /** - * Verifies an OrderStatusEnum message. + * Verifies a ListContentLabelsResponse 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 OrderStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentLabelsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OrderStatusEnum + * @returns ListContentLabelsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OrderStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentLabelsResponse; /** - * Creates a plain object from an OrderStatusEnum message. Also converts values to other types if specified. - * @param message OrderStatusEnum + * Creates a plain object from a ListContentLabelsResponse message. Also converts values to other types if specified. + * @param message ListContentLabelsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.OrderStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentLabelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OrderStatusEnum to JSON. + * Converts this ListContentLabelsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OrderStatusEnum + * Gets the default type url for ListContentLabelsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace OrderStatusEnum { - - /** OrderStatus enum. */ - enum OrderStatus { - ORDER_STATUS_UNSPECIFIED = 0, - DRAFT = 2, - PENDING_APPROVAL = 3, - APPROVED = 4, - DISAPPROVED = 5, - PAUSED = 6, - CANCELED = 7, - DELETED = 8 - } - } - - /** Properties of an Order. */ - interface IOrder { + /** Properties of a Content. */ + interface IContent { - /** Order name */ + /** Content name */ name?: (string|null); - /** Order orderId */ - orderId?: (number|Long|string|null); - - /** Order displayName */ + /** Content displayName */ displayName?: (string|null); - - /** Order programmatic */ - programmatic?: (boolean|null); - - /** Order trafficker */ - trafficker?: (string|null); - - /** Order advertiserContacts */ - advertiserContacts?: (string[]|null); - - /** Order advertiser */ - advertiser?: (string|null); - - /** Order agencyContacts */ - agencyContacts?: (string[]|null); - - /** Order agency */ - agency?: (string|null); - - /** Order appliedTeams */ - appliedTeams?: (string[]|null); - - /** Order effectiveTeams */ - effectiveTeams?: (string[]|null); - - /** Order creator */ - creator?: (string|null); - - /** Order currencyCode */ - currencyCode?: (string|null); - - /** Order startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Order endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Order unlimitedEndTime */ - unlimitedEndTime?: (boolean|null); - - /** Order externalOrderId */ - externalOrderId?: (number|null); - - /** Order archived */ - archived?: (boolean|null); - - /** Order lastModifiedByApp */ - lastModifiedByApp?: (string|null); - - /** Order updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Order notes */ - notes?: (string|null); - - /** Order poNumber */ - poNumber?: (string|null); - - /** Order status */ - status?: (google.ads.admanager.v1.OrderStatusEnum.OrderStatus|keyof typeof google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null); - - /** Order salesperson */ - salesperson?: (string|null); - - /** Order secondarySalespeople */ - secondarySalespeople?: (string[]|null); - - /** Order secondaryTraffickers */ - secondaryTraffickers?: (string[]|null); - - /** Order appliedLabels */ - appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); - - /** Order effectiveAppliedLabels */ - effectiveAppliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); - - /** Order customFieldValues */ - customFieldValues?: (google.ads.admanager.v1.ICustomFieldValue[]|null); } - /** Represents an Order. */ - class Order implements IOrder { + /** Represents a Content. */ + class Content implements IContent { /** - * Constructs a new Order. + * Constructs a new Content. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IOrder); + constructor(properties?: google.ads.admanager.v1.IContent); - /** Order name. */ + /** Content name. */ public name: string; - /** Order orderId. */ - public orderId?: (number|Long|string|null); - - /** Order displayName. */ + /** Content displayName. */ public displayName?: (string|null); - /** Order programmatic. */ - public programmatic?: (boolean|null); - - /** Order trafficker. */ - public trafficker?: (string|null); - - /** Order advertiserContacts. */ - public advertiserContacts: string[]; - - /** Order advertiser. */ - public advertiser?: (string|null); - - /** Order agencyContacts. */ - public agencyContacts: string[]; - - /** Order agency. */ - public agency?: (string|null); - - /** Order appliedTeams. */ - public appliedTeams: string[]; - - /** Order effectiveTeams. */ - public effectiveTeams: string[]; - - /** Order creator. */ - public creator?: (string|null); - - /** Order currencyCode. */ - public currencyCode?: (string|null); - - /** Order startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Order endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Order unlimitedEndTime. */ - public unlimitedEndTime?: (boolean|null); - - /** Order externalOrderId. */ - public externalOrderId?: (number|null); - - /** Order archived. */ - public archived?: (boolean|null); - - /** Order lastModifiedByApp. */ - public lastModifiedByApp?: (string|null); - - /** Order updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Order notes. */ - public notes?: (string|null); - - /** Order poNumber. */ - public poNumber?: (string|null); - - /** Order status. */ - public status?: (google.ads.admanager.v1.OrderStatusEnum.OrderStatus|keyof typeof google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null); - - /** Order salesperson. */ - public salesperson?: (string|null); - - /** Order secondarySalespeople. */ - public secondarySalespeople: string[]; - - /** Order secondaryTraffickers. */ - public secondaryTraffickers: string[]; - - /** Order appliedLabels. */ - public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; - - /** Order effectiveAppliedLabels. */ - public effectiveAppliedLabels: google.ads.admanager.v1.IAppliedLabel[]; - - /** Order customFieldValues. */ - public customFieldValues: google.ads.admanager.v1.ICustomFieldValue[]; - /** - * Creates a new Order instance using the specified properties. + * Creates a new Content instance using the specified properties. * @param [properties] Properties to set - * @returns Order instance + * @returns Content instance */ - public static create(properties?: google.ads.admanager.v1.IOrder): google.ads.admanager.v1.Order; + public static create(properties?: google.ads.admanager.v1.IContent): google.ads.admanager.v1.Content; /** - * Encodes the specified Order message. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. - * @param message Order message or plain object to encode + * Encodes the specified Content message. Does not implicitly {@link google.ads.admanager.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. - * @param message Order message or plain object to encode + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Order message from the specified reader or buffer. + * Decodes a Content message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Order + * @returns Content * @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.ads.admanager.v1.Order; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Content; /** - * Decodes an Order message from the specified reader or buffer, length delimited. + * Decodes a Content message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Order + * @returns Content * @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.ads.admanager.v1.Order; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Content; /** - * Verifies an Order message. + * Verifies a Content 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 Order message from a plain object. Also converts values to their respective internal types. + * Creates a Content message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Order + * @returns Content */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Order; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Content; /** - * Creates a plain object from an Order message. Also converts values to other types if specified. - * @param message Order + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Order to JSON. + * Converts this Content to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Order + * Gets the default type url for Content * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an OrderService */ - class OrderService extends $protobuf.rpc.Service { + /** Represents a ContentService */ + class ContentService extends $protobuf.rpc.Service { /** - * Constructs a new OrderService service. + * Constructs a new ContentService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -12032,1319 +11486,1541 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new OrderService service using the specified rpc implementation. + * Creates new ContentService 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): OrderService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContentService; /** - * Calls GetOrder. - * @param request GetOrderRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Order + * Calls GetContent. + * @param request GetContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content */ - public getOrder(request: google.ads.admanager.v1.IGetOrderRequest, callback: google.ads.admanager.v1.OrderService.GetOrderCallback): void; + public getContent(request: google.ads.admanager.v1.IGetContentRequest, callback: google.ads.admanager.v1.ContentService.GetContentCallback): void; /** - * Calls GetOrder. - * @param request GetOrderRequest message or plain object + * Calls GetContent. + * @param request GetContentRequest message or plain object * @returns Promise */ - public getOrder(request: google.ads.admanager.v1.IGetOrderRequest): Promise; + public getContent(request: google.ads.admanager.v1.IGetContentRequest): Promise; /** - * Calls ListOrders. - * @param request ListOrdersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOrdersResponse + * Calls ListContent. + * @param request ListContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContentResponse */ - public listOrders(request: google.ads.admanager.v1.IListOrdersRequest, callback: google.ads.admanager.v1.OrderService.ListOrdersCallback): void; + public listContent(request: google.ads.admanager.v1.IListContentRequest, callback: google.ads.admanager.v1.ContentService.ListContentCallback): void; /** - * Calls ListOrders. - * @param request ListOrdersRequest message or plain object + * Calls ListContent. + * @param request ListContentRequest message or plain object * @returns Promise */ - public listOrders(request: google.ads.admanager.v1.IListOrdersRequest): Promise; + public listContent(request: google.ads.admanager.v1.IListContentRequest): Promise; } - namespace OrderService { + namespace ContentService { /** - * Callback as used by {@link google.ads.admanager.v1.OrderService|getOrder}. + * Callback as used by {@link google.ads.admanager.v1.ContentService|getContent}. * @param error Error, if any - * @param [response] Order + * @param [response] Content */ - type GetOrderCallback = (error: (Error|null), response?: google.ads.admanager.v1.Order) => void; + type GetContentCallback = (error: (Error|null), response?: google.ads.admanager.v1.Content) => void; /** - * Callback as used by {@link google.ads.admanager.v1.OrderService|listOrders}. + * Callback as used by {@link google.ads.admanager.v1.ContentService|listContent}. * @param error Error, if any - * @param [response] ListOrdersResponse + * @param [response] ListContentResponse */ - type ListOrdersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOrdersResponse) => void; + type ListContentCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListContentResponse) => void; } - /** Properties of a GetOrderRequest. */ - interface IGetOrderRequest { + /** Properties of a GetContentRequest. */ + interface IGetContentRequest { - /** GetOrderRequest name */ + /** GetContentRequest name */ name?: (string|null); } - /** Represents a GetOrderRequest. */ - class GetOrderRequest implements IGetOrderRequest { + /** Represents a GetContentRequest. */ + class GetContentRequest implements IGetContentRequest { /** - * Constructs a new GetOrderRequest. + * Constructs a new GetContentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetOrderRequest); + constructor(properties?: google.ads.admanager.v1.IGetContentRequest); - /** GetOrderRequest name. */ + /** GetContentRequest name. */ public name: string; /** - * Creates a new GetOrderRequest instance using the specified properties. + * Creates a new GetContentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetOrderRequest instance + * @returns GetContentRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetOrderRequest): google.ads.admanager.v1.GetOrderRequest; + public static create(properties?: google.ads.admanager.v1.IGetContentRequest): google.ads.admanager.v1.GetContentRequest; /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. - * @param message GetOrderRequest message or plain object to encode + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. - * @param message GetOrderRequest message or plain object to encode + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOrderRequest message from the specified reader or buffer. + * Decodes a GetContentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOrderRequest + * @returns GetContentRequest * @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.ads.admanager.v1.GetOrderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetContentRequest; /** - * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOrderRequest + * @returns GetContentRequest * @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.ads.admanager.v1.GetOrderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetContentRequest; /** - * Verifies a GetOrderRequest message. + * Verifies a GetContentRequest 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 GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOrderRequest + * @returns GetContentRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOrderRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetContentRequest; /** - * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. - * @param message GetOrderRequest + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @param message GetContentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOrderRequest to JSON. + * Converts this GetContentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetOrderRequest + * Gets the default type url for GetContentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOrdersRequest. */ - interface IListOrdersRequest { + /** Properties of a ListContentRequest. */ + interface IListContentRequest { - /** ListOrdersRequest parent */ + /** ListContentRequest parent */ parent?: (string|null); - /** ListOrdersRequest pageSize */ + /** ListContentRequest pageSize */ pageSize?: (number|null); - /** ListOrdersRequest pageToken */ + /** ListContentRequest pageToken */ pageToken?: (string|null); - /** ListOrdersRequest filter */ + /** ListContentRequest filter */ filter?: (string|null); - /** ListOrdersRequest orderBy */ + /** ListContentRequest orderBy */ orderBy?: (string|null); - /** ListOrdersRequest skip */ + /** ListContentRequest skip */ skip?: (number|null); } - /** Represents a ListOrdersRequest. */ - class ListOrdersRequest implements IListOrdersRequest { + /** Represents a ListContentRequest. */ + class ListContentRequest implements IListContentRequest { /** - * Constructs a new ListOrdersRequest. + * Constructs a new ListContentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOrdersRequest); + constructor(properties?: google.ads.admanager.v1.IListContentRequest); - /** ListOrdersRequest parent. */ + /** ListContentRequest parent. */ public parent: string; - /** ListOrdersRequest pageSize. */ + /** ListContentRequest pageSize. */ public pageSize: number; - /** ListOrdersRequest pageToken. */ + /** ListContentRequest pageToken. */ public pageToken: string; - /** ListOrdersRequest filter. */ + /** ListContentRequest filter. */ public filter: string; - /** ListOrdersRequest orderBy. */ + /** ListContentRequest orderBy. */ public orderBy: string; - /** ListOrdersRequest skip. */ + /** ListContentRequest skip. */ public skip: number; /** - * Creates a new ListOrdersRequest instance using the specified properties. + * Creates a new ListContentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListOrdersRequest instance + * @returns ListContentRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListOrdersRequest): google.ads.admanager.v1.ListOrdersRequest; + public static create(properties?: google.ads.admanager.v1.IListContentRequest): google.ads.admanager.v1.ListContentRequest; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. - * @param message ListOrdersRequest message or plain object to encode + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. - * @param message ListOrdersRequest message or plain object to encode + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer. + * Decodes a ListContentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOrdersRequest + * @returns ListContentRequest * @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.ads.admanager.v1.ListOrdersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentRequest; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOrdersRequest + * @returns ListContentRequest * @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.ads.admanager.v1.ListOrdersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentRequest; /** - * Verifies a ListOrdersRequest message. + * Verifies a ListContentRequest 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 ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOrdersRequest + * @returns ListContentRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOrdersRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentRequest; /** - * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. - * @param message ListOrdersRequest + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @param message ListContentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOrdersRequest to JSON. + * Converts this ListContentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOrdersRequest + * Gets the default type url for ListContentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOrdersResponse. */ - interface IListOrdersResponse { + /** Properties of a ListContentResponse. */ + interface IListContentResponse { - /** ListOrdersResponse orders */ - orders?: (google.ads.admanager.v1.IOrder[]|null); + /** ListContentResponse content */ + content?: (google.ads.admanager.v1.IContent[]|null); - /** ListOrdersResponse nextPageToken */ + /** ListContentResponse nextPageToken */ nextPageToken?: (string|null); - /** ListOrdersResponse totalSize */ + /** ListContentResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListOrdersResponse. */ - class ListOrdersResponse implements IListOrdersResponse { + /** Represents a ListContentResponse. */ + class ListContentResponse implements IListContentResponse { /** - * Constructs a new ListOrdersResponse. + * Constructs a new ListContentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListOrdersResponse); + constructor(properties?: google.ads.admanager.v1.IListContentResponse); - /** ListOrdersResponse orders. */ - public orders: google.ads.admanager.v1.IOrder[]; + /** ListContentResponse content. */ + public content: google.ads.admanager.v1.IContent[]; - /** ListOrdersResponse nextPageToken. */ + /** ListContentResponse nextPageToken. */ public nextPageToken: string; - /** ListOrdersResponse totalSize. */ + /** ListContentResponse totalSize. */ public totalSize: number; /** - * Creates a new ListOrdersResponse instance using the specified properties. + * Creates a new ListContentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListOrdersResponse instance + * @returns ListContentResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListOrdersResponse): google.ads.admanager.v1.ListOrdersResponse; + public static create(properties?: google.ads.admanager.v1.IListContentResponse): google.ads.admanager.v1.ListContentResponse; /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. - * @param message ListOrdersResponse message or plain object to encode + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. - * @param message ListOrdersResponse message or plain object to encode + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer. + * Decodes a ListContentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOrdersResponse + * @returns ListContentResponse * @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.ads.admanager.v1.ListOrdersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListContentResponse; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOrdersResponse + * @returns ListContentResponse * @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.ads.admanager.v1.ListOrdersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListContentResponse; /** - * Verifies a ListOrdersResponse message. + * Verifies a ListContentResponse 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 ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOrdersResponse + * @returns ListContentResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOrdersResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListContentResponse; /** - * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. - * @param message ListOrdersResponse + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @param message ListContentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOrdersResponse to JSON. + * Converts this ListContentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOrdersResponse + * Gets the default type url for ListContentResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PlacementStatusEnum. */ - interface IPlacementStatusEnum { + /** Properties of a CreativeTemplateTypeEnum. */ + interface ICreativeTemplateTypeEnum { } - /** Represents a PlacementStatusEnum. */ - class PlacementStatusEnum implements IPlacementStatusEnum { + /** Represents a CreativeTemplateTypeEnum. */ + class CreativeTemplateTypeEnum implements ICreativeTemplateTypeEnum { /** - * Constructs a new PlacementStatusEnum. + * Constructs a new CreativeTemplateTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IPlacementStatusEnum); + constructor(properties?: google.ads.admanager.v1.ICreativeTemplateTypeEnum); /** - * Creates a new PlacementStatusEnum instance using the specified properties. + * Creates a new CreativeTemplateTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns PlacementStatusEnum instance + * @returns CreativeTemplateTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IPlacementStatusEnum): google.ads.admanager.v1.PlacementStatusEnum; + public static create(properties?: google.ads.admanager.v1.ICreativeTemplateTypeEnum): google.ads.admanager.v1.CreativeTemplateTypeEnum; /** - * Encodes the specified PlacementStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. - * @param message PlacementStatusEnum message or plain object to encode + * Encodes the specified CreativeTemplateTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateTypeEnum.verify|verify} messages. + * @param message CreativeTemplateTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IPlacementStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreativeTemplateTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlacementStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. - * @param message PlacementStatusEnum message or plain object to encode + * Encodes the specified CreativeTemplateTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateTypeEnum.verify|verify} messages. + * @param message CreativeTemplateTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IPlacementStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreativeTemplateTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlacementStatusEnum message from the specified reader or buffer. + * Decodes a CreativeTemplateTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlacementStatusEnum + * @returns CreativeTemplateTypeEnum * @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.ads.admanager.v1.PlacementStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplateTypeEnum; /** - * Decodes a PlacementStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplateTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlacementStatusEnum + * @returns CreativeTemplateTypeEnum * @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.ads.admanager.v1.PlacementStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplateTypeEnum; /** - * Verifies a PlacementStatusEnum message. + * Verifies a CreativeTemplateTypeEnum 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 PlacementStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlacementStatusEnum + * @returns CreativeTemplateTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PlacementStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateTypeEnum; /** - * Creates a plain object from a PlacementStatusEnum message. Also converts values to other types if specified. - * @param message PlacementStatusEnum + * Creates a plain object from a CreativeTemplateTypeEnum message. Also converts values to other types if specified. + * @param message CreativeTemplateTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.PlacementStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplateTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlacementStatusEnum to JSON. + * Converts this CreativeTemplateTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PlacementStatusEnum + * Gets the default type url for CreativeTemplateTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace PlacementStatusEnum { + namespace CreativeTemplateTypeEnum { - /** PlacementStatus enum. */ - enum PlacementStatus { - PLACEMENT_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2, - ARCHIVED = 3 + /** CreativeTemplateType enum. */ + enum CreativeTemplateType { + CREATIVE_TEMPLATE_TYPE_UNSPECIFIED = 0, + STANDARD = 1, + CUSTOM = 2 } } - /** Properties of a Placement. */ - interface IPlacement { + /** Properties of a CreativeTemplateStatusEnum. */ + interface ICreativeTemplateStatusEnum { + } - /** Placement name */ - name?: (string|null); - - /** Placement placementId */ - placementId?: (number|Long|string|null); - - /** Placement displayName */ - displayName?: (string|null); - - /** Placement description */ - description?: (string|null); - - /** Placement placementCode */ - placementCode?: (string|null); - - /** Placement status */ - status?: (google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|keyof typeof google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null); - - /** Placement targetedAdUnits */ - targetedAdUnits?: (string[]|null); - - /** Placement updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Placement. */ - class Placement implements IPlacement { + /** Represents a CreativeTemplateStatusEnum. */ + class CreativeTemplateStatusEnum implements ICreativeTemplateStatusEnum { /** - * Constructs a new Placement. + * Constructs a new CreativeTemplateStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IPlacement); - - /** Placement name. */ - public name: string; - - /** Placement placementId. */ - public placementId: (number|Long|string); - - /** Placement displayName. */ - public displayName?: (string|null); - - /** Placement description. */ - public description?: (string|null); - - /** Placement placementCode. */ - public placementCode?: (string|null); - - /** Placement status. */ - public status?: (google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|keyof typeof google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null); - - /** Placement targetedAdUnits. */ - public targetedAdUnits: string[]; - - /** Placement updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.ads.admanager.v1.ICreativeTemplateStatusEnum); /** - * Creates a new Placement instance using the specified properties. + * Creates a new CreativeTemplateStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns Placement instance + * @returns CreativeTemplateStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IPlacement): google.ads.admanager.v1.Placement; + public static create(properties?: google.ads.admanager.v1.ICreativeTemplateStatusEnum): google.ads.admanager.v1.CreativeTemplateStatusEnum; /** - * Encodes the specified Placement message. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. - * @param message Placement message or plain object to encode + * Encodes the specified CreativeTemplateStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateStatusEnum.verify|verify} messages. + * @param message CreativeTemplateStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IPlacement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreativeTemplateStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Placement message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. - * @param message Placement message or plain object to encode + * Encodes the specified CreativeTemplateStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateStatusEnum.verify|verify} messages. + * @param message CreativeTemplateStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IPlacement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreativeTemplateStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Placement message from the specified reader or buffer. + * Decodes a CreativeTemplateStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Placement + * @returns CreativeTemplateStatusEnum * @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.ads.admanager.v1.Placement; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplateStatusEnum; /** - * Decodes a Placement message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplateStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Placement + * @returns CreativeTemplateStatusEnum * @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.ads.admanager.v1.Placement; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplateStatusEnum; /** - * Verifies a Placement message. + * Verifies a CreativeTemplateStatusEnum 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 Placement message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Placement + * @returns CreativeTemplateStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Placement; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateStatusEnum; /** - * Creates a plain object from a Placement message. Also converts values to other types if specified. - * @param message Placement + * Creates a plain object from a CreativeTemplateStatusEnum message. Also converts values to other types if specified. + * @param message CreativeTemplateStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Placement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplateStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Placement to JSON. + * Converts this CreativeTemplateStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Placement + * Gets the default type url for CreativeTemplateStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a PlacementService */ - class PlacementService extends $protobuf.rpc.Service { + namespace CreativeTemplateStatusEnum { - /** - * Constructs a new PlacementService 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); + /** CreativeTemplateStatus enum. */ + enum CreativeTemplateStatus { + CREATIVE_TEMPLATE_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + DELETED = 2, + INACTIVE = 3 + } + } - /** - * Creates new PlacementService 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): PlacementService; + /** Properties of a CreativeTemplate. */ + interface ICreativeTemplate { - /** - * Calls GetPlacement. - * @param request GetPlacementRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Placement - */ - public getPlacement(request: google.ads.admanager.v1.IGetPlacementRequest, callback: google.ads.admanager.v1.PlacementService.GetPlacementCallback): void; + /** CreativeTemplate name */ + name?: (string|null); - /** - * Calls GetPlacement. - * @param request GetPlacementRequest message or plain object - * @returns Promise - */ - public getPlacement(request: google.ads.admanager.v1.IGetPlacementRequest): Promise; + /** CreativeTemplate displayName */ + displayName?: (string|null); - /** - * Calls ListPlacements. - * @param request ListPlacementsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPlacementsResponse - */ - public listPlacements(request: google.ads.admanager.v1.IListPlacementsRequest, callback: google.ads.admanager.v1.PlacementService.ListPlacementsCallback): void; + /** CreativeTemplate description */ + description?: (string|null); - /** - * Calls ListPlacements. - * @param request ListPlacementsRequest message or plain object - * @returns Promise - */ - public listPlacements(request: google.ads.admanager.v1.IListPlacementsRequest): Promise; - } + /** CreativeTemplate snippet */ + snippet?: (string|null); - namespace PlacementService { + /** CreativeTemplate status */ + status?: (google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|keyof typeof google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|null); - /** - * Callback as used by {@link google.ads.admanager.v1.PlacementService|getPlacement}. - * @param error Error, if any - * @param [response] Placement - */ - type GetPlacementCallback = (error: (Error|null), response?: google.ads.admanager.v1.Placement) => void; + /** CreativeTemplate type */ + type?: (google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|keyof typeof google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|null); - /** - * Callback as used by {@link google.ads.admanager.v1.PlacementService|listPlacements}. - * @param error Error, if any - * @param [response] ListPlacementsResponse - */ - type ListPlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPlacementsResponse) => void; - } + /** CreativeTemplate interstitial */ + interstitial?: (boolean|null); - /** Properties of a GetPlacementRequest. */ - interface IGetPlacementRequest { + /** CreativeTemplate nativeEligible */ + nativeEligible?: (boolean|null); - /** GetPlacementRequest name */ - name?: (string|null); + /** CreativeTemplate nativeVideoEligible */ + nativeVideoEligible?: (boolean|null); + + /** CreativeTemplate safeFrameCompatible */ + safeFrameCompatible?: (boolean|null); + + /** CreativeTemplate variables */ + variables?: (google.ads.admanager.v1.ICreativeTemplateVariable[]|null); } - /** Represents a GetPlacementRequest. */ - class GetPlacementRequest implements IGetPlacementRequest { + /** Represents a CreativeTemplate. */ + class CreativeTemplate implements ICreativeTemplate { /** - * Constructs a new GetPlacementRequest. + * Constructs a new CreativeTemplate. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetPlacementRequest); + constructor(properties?: google.ads.admanager.v1.ICreativeTemplate); - /** GetPlacementRequest name. */ + /** CreativeTemplate name. */ public name: string; + /** CreativeTemplate displayName. */ + public displayName?: (string|null); + + /** CreativeTemplate description. */ + public description?: (string|null); + + /** CreativeTemplate snippet. */ + public snippet?: (string|null); + + /** CreativeTemplate status. */ + public status?: (google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|keyof typeof google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|null); + + /** CreativeTemplate type. */ + public type?: (google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|keyof typeof google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|null); + + /** CreativeTemplate interstitial. */ + public interstitial?: (boolean|null); + + /** CreativeTemplate nativeEligible. */ + public nativeEligible?: (boolean|null); + + /** CreativeTemplate nativeVideoEligible. */ + public nativeVideoEligible?: (boolean|null); + + /** CreativeTemplate safeFrameCompatible. */ + public safeFrameCompatible?: (boolean|null); + + /** CreativeTemplate variables. */ + public variables: google.ads.admanager.v1.ICreativeTemplateVariable[]; + /** - * Creates a new GetPlacementRequest instance using the specified properties. + * Creates a new CreativeTemplate instance using the specified properties. * @param [properties] Properties to set - * @returns GetPlacementRequest instance + * @returns CreativeTemplate instance */ - public static create(properties?: google.ads.admanager.v1.IGetPlacementRequest): google.ads.admanager.v1.GetPlacementRequest; + public static create(properties?: google.ads.admanager.v1.ICreativeTemplate): google.ads.admanager.v1.CreativeTemplate; /** - * Encodes the specified GetPlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. - * @param message GetPlacementRequest message or plain object to encode + * Encodes the specified CreativeTemplate message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplate.verify|verify} messages. + * @param message CreativeTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetPlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreativeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. - * @param message GetPlacementRequest message or plain object to encode + * Encodes the specified CreativeTemplate message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplate.verify|verify} messages. + * @param message CreativeTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetPlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreativeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPlacementRequest message from the specified reader or buffer. + * Decodes a CreativeTemplate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPlacementRequest + * @returns CreativeTemplate * @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.ads.admanager.v1.GetPlacementRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplate; /** - * Decodes a GetPlacementRequest message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPlacementRequest + * @returns CreativeTemplate * @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.ads.admanager.v1.GetPlacementRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplate; /** - * Verifies a GetPlacementRequest message. + * Verifies a CreativeTemplate 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 GetPlacementRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPlacementRequest + * @returns CreativeTemplate */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPlacementRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplate; /** - * Creates a plain object from a GetPlacementRequest message. Also converts values to other types if specified. - * @param message GetPlacementRequest + * Creates a plain object from a CreativeTemplate message. Also converts values to other types if specified. + * @param message CreativeTemplate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetPlacementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPlacementRequest to JSON. + * Converts this CreativeTemplate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPlacementRequest + * Gets the default type url for CreativeTemplate * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPlacementsRequest. */ - interface IListPlacementsRequest { + /** Properties of a CreativeTemplateVariable. */ + interface ICreativeTemplateVariable { - /** ListPlacementsRequest parent */ - parent?: (string|null); + /** CreativeTemplateVariable assetVariable */ + assetVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable|null); - /** ListPlacementsRequest pageSize */ - pageSize?: (number|null); + /** CreativeTemplateVariable listStringVariable */ + listStringVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable|null); - /** ListPlacementsRequest pageToken */ - pageToken?: (string|null); + /** CreativeTemplateVariable longVariable */ + longVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable|null); - /** ListPlacementsRequest filter */ - filter?: (string|null); + /** CreativeTemplateVariable stringVariable */ + stringVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable|null); - /** ListPlacementsRequest orderBy */ - orderBy?: (string|null); + /** CreativeTemplateVariable urlVariable */ + urlVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable|null); - /** ListPlacementsRequest skip */ - skip?: (number|null); + /** CreativeTemplateVariable label */ + label?: (string|null); + + /** CreativeTemplateVariable uniqueDisplayName */ + uniqueDisplayName?: (string|null); + + /** CreativeTemplateVariable description */ + description?: (string|null); + + /** CreativeTemplateVariable required */ + required?: (boolean|null); } - /** Represents a ListPlacementsRequest. */ - class ListPlacementsRequest implements IListPlacementsRequest { + /** Represents a CreativeTemplateVariable. */ + class CreativeTemplateVariable implements ICreativeTemplateVariable { /** - * Constructs a new ListPlacementsRequest. + * Constructs a new CreativeTemplateVariable. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListPlacementsRequest); + constructor(properties?: google.ads.admanager.v1.ICreativeTemplateVariable); - /** ListPlacementsRequest parent. */ - public parent: string; + /** CreativeTemplateVariable assetVariable. */ + public assetVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable|null); - /** ListPlacementsRequest pageSize. */ - public pageSize: number; + /** CreativeTemplateVariable listStringVariable. */ + public listStringVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable|null); - /** ListPlacementsRequest pageToken. */ - public pageToken: string; + /** CreativeTemplateVariable longVariable. */ + public longVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable|null); - /** ListPlacementsRequest filter. */ - public filter: string; + /** CreativeTemplateVariable stringVariable. */ + public stringVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable|null); - /** ListPlacementsRequest orderBy. */ - public orderBy: string; + /** CreativeTemplateVariable urlVariable. */ + public urlVariable?: (google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable|null); - /** ListPlacementsRequest skip. */ - public skip: number; + /** CreativeTemplateVariable label. */ + public label?: (string|null); + + /** CreativeTemplateVariable uniqueDisplayName. */ + public uniqueDisplayName?: (string|null); + + /** CreativeTemplateVariable description. */ + public description?: (string|null); + + /** CreativeTemplateVariable required. */ + public required?: (boolean|null); + + /** CreativeTemplateVariable SubType. */ + public SubType?: ("assetVariable"|"listStringVariable"|"longVariable"|"stringVariable"|"urlVariable"); /** - * Creates a new ListPlacementsRequest instance using the specified properties. + * Creates a new CreativeTemplateVariable instance using the specified properties. * @param [properties] Properties to set - * @returns ListPlacementsRequest instance + * @returns CreativeTemplateVariable instance */ - public static create(properties?: google.ads.admanager.v1.IListPlacementsRequest): google.ads.admanager.v1.ListPlacementsRequest; + public static create(properties?: google.ads.admanager.v1.ICreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable; /** - * Encodes the specified ListPlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. - * @param message ListPlacementsRequest message or plain object to encode + * Encodes the specified CreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.verify|verify} messages. + * @param message CreativeTemplateVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListPlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. - * @param message ListPlacementsRequest message or plain object to encode + * Encodes the specified CreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.verify|verify} messages. + * @param message CreativeTemplateVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPlacementsRequest message from the specified reader or buffer. + * Decodes a CreativeTemplateVariable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPlacementsRequest + * @returns CreativeTemplateVariable * @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.ads.admanager.v1.ListPlacementsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplateVariable; /** - * Decodes a ListPlacementsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplateVariable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPlacementsRequest + * @returns CreativeTemplateVariable * @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.ads.admanager.v1.ListPlacementsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplateVariable; /** - * Verifies a ListPlacementsRequest message. + * Verifies a CreativeTemplateVariable 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 ListPlacementsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPlacementsRequest + * @returns CreativeTemplateVariable */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPlacementsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable; /** - * Creates a plain object from a ListPlacementsRequest message. Also converts values to other types if specified. - * @param message ListPlacementsRequest + * Creates a plain object from a CreativeTemplateVariable message. Also converts values to other types if specified. + * @param message CreativeTemplateVariable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListPlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPlacementsRequest to JSON. + * Converts this CreativeTemplateVariable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPlacementsRequest + * Gets the default type url for CreativeTemplateVariable * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPlacementsResponse. */ - interface IListPlacementsResponse { + namespace CreativeTemplateVariable { - /** ListPlacementsResponse placements */ - placements?: (google.ads.admanager.v1.IPlacement[]|null); + /** Properties of an AssetCreativeTemplateVariable. */ + interface IAssetCreativeTemplateVariable { - /** ListPlacementsResponse nextPageToken */ - nextPageToken?: (string|null); + /** AssetCreativeTemplateVariable mimeTypes */ + mimeTypes?: (google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType[]|null); + } - /** ListPlacementsResponse totalSize */ - totalSize?: (number|null); - } + /** Represents an AssetCreativeTemplateVariable. */ + class AssetCreativeTemplateVariable implements IAssetCreativeTemplateVariable { - /** Represents a ListPlacementsResponse. */ - class ListPlacementsResponse implements IListPlacementsResponse { + /** + * Constructs a new AssetCreativeTemplateVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable); - /** - * Constructs a new ListPlacementsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IListPlacementsResponse); + /** AssetCreativeTemplateVariable mimeTypes. */ + public mimeTypes: google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType[]; - /** ListPlacementsResponse placements. */ - public placements: google.ads.admanager.v1.IPlacement[]; + /** + * Creates a new AssetCreativeTemplateVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetCreativeTemplateVariable instance + */ + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable; - /** ListPlacementsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Encodes the specified AssetCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.verify|verify} messages. + * @param message AssetCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListPlacementsResponse totalSize. */ - public totalSize: number; + /** + * Encodes the specified AssetCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.verify|verify} messages. + * @param message AssetCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ListPlacementsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPlacementsResponse instance - */ - public static create(properties?: google.ads.admanager.v1.IListPlacementsResponse): google.ads.admanager.v1.ListPlacementsResponse; + /** + * Decodes an AssetCreativeTemplateVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable; - /** - * Encodes the specified ListPlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. - * @param message ListPlacementsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.IListPlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AssetCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable; - /** - * Encodes the specified ListPlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. - * @param message ListPlacementsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an AssetCreativeTemplateVariable 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 ListPlacementsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPlacementsResponse - * @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.ads.admanager.v1.ListPlacementsResponse; + /** + * Creates an AssetCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetCreativeTemplateVariable + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable; - /** - * Decodes a ListPlacementsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPlacementsResponse - * @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.ads.admanager.v1.ListPlacementsResponse; + /** + * Creates a plain object from an AssetCreativeTemplateVariable message. Also converts values to other types if specified. + * @param message AssetCreativeTemplateVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a ListPlacementsResponse 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 AssetCreativeTemplateVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a ListPlacementsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPlacementsResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPlacementsResponse; + /** + * Gets the default type url for AssetCreativeTemplateVariable + * @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 ListPlacementsResponse message. Also converts values to other types if specified. - * @param message ListPlacementsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.ListPlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace AssetCreativeTemplateVariable { - /** - * Converts this ListPlacementsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** MimeType enum. */ + enum MimeType { + MIME_TYPE_UNSPECIFIED = 0, + JPG = 1, + PNG = 2, + GIF = 3 + } + } - /** - * Gets the default type url for ListPlacementsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a ListStringCreativeTemplateVariable. */ + interface IListStringCreativeTemplateVariable { - /** Properties of a PrivateAuctionDeal. */ - interface IPrivateAuctionDeal { + /** ListStringCreativeTemplateVariable defaultValue */ + defaultValue?: (string|null); - /** PrivateAuctionDeal name */ - name?: (string|null); + /** ListStringCreativeTemplateVariable sampleValue */ + sampleValue?: (string|null); - /** PrivateAuctionDeal privateAuctionDealId */ - privateAuctionDealId?: (number|Long|string|null); + /** ListStringCreativeTemplateVariable choices */ + choices?: (google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice[]|null); - /** PrivateAuctionDeal privateAuctionId */ - privateAuctionId?: (number|Long|string|null); + /** ListStringCreativeTemplateVariable allowOtherChoice */ + allowOtherChoice?: (boolean|null); + } - /** PrivateAuctionDeal privateAuctionDisplayName */ - privateAuctionDisplayName?: (string|null); + /** Represents a ListStringCreativeTemplateVariable. */ + class ListStringCreativeTemplateVariable implements IListStringCreativeTemplateVariable { - /** PrivateAuctionDeal buyerAccountId */ - buyerAccountId?: (number|Long|string|null); + /** + * Constructs a new ListStringCreativeTemplateVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable); - /** PrivateAuctionDeal externalDealId */ - externalDealId?: (number|Long|string|null); + /** ListStringCreativeTemplateVariable defaultValue. */ + public defaultValue?: (string|null); - /** PrivateAuctionDeal targeting */ - targeting?: (google.ads.admanager.v1.ITargeting|null); + /** ListStringCreativeTemplateVariable sampleValue. */ + public sampleValue?: (string|null); - /** PrivateAuctionDeal endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** ListStringCreativeTemplateVariable choices. */ + public choices: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice[]; - /** PrivateAuctionDeal floorPrice */ - floorPrice?: (google.type.IMoney|null); + /** ListStringCreativeTemplateVariable allowOtherChoice. */ + public allowOtherChoice?: (boolean|null); - /** PrivateAuctionDeal creativeSizes */ - creativeSizes?: (google.ads.admanager.v1.ISize[]|null); + /** + * Creates a new ListStringCreativeTemplateVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStringCreativeTemplateVariable instance + */ + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable; - /** PrivateAuctionDeal status */ - status?: (google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|keyof typeof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null); + /** + * Encodes the specified ListStringCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.verify|verify} messages. + * @param message ListStringCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** PrivateAuctionDeal auctionPriorityEnabled */ - auctionPriorityEnabled?: (boolean|null); + /** + * Encodes the specified ListStringCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.verify|verify} messages. + * @param message ListStringCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** PrivateAuctionDeal blockOverrideEnabled */ - blockOverrideEnabled?: (boolean|null); + /** + * Decodes a ListStringCreativeTemplateVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStringCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable; - /** PrivateAuctionDeal buyerPermissionType */ - buyerPermissionType?: (google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|keyof typeof google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null); + /** + * Decodes a ListStringCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStringCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable; - /** PrivateAuctionDeal buyerData */ - buyerData?: (google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null); + /** + * Verifies a ListStringCreativeTemplateVariable 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); - /** PrivateAuctionDeal createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a ListStringCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStringCreativeTemplateVariable + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable; - /** PrivateAuctionDeal updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Creates a plain object from a ListStringCreativeTemplateVariable message. Also converts values to other types if specified. + * @param message ListStringCreativeTemplateVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a PrivateAuctionDeal. */ - class PrivateAuctionDeal implements IPrivateAuctionDeal { + /** + * Converts this ListStringCreativeTemplateVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new PrivateAuctionDeal. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IPrivateAuctionDeal); + /** + * Gets the default type url for ListStringCreativeTemplateVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** PrivateAuctionDeal name. */ - public name: string; + namespace ListStringCreativeTemplateVariable { - /** PrivateAuctionDeal privateAuctionDealId. */ - public privateAuctionDealId?: (number|Long|string|null); + /** Properties of a VariableChoice. */ + interface IVariableChoice { - /** PrivateAuctionDeal privateAuctionId. */ - public privateAuctionId?: (number|Long|string|null); + /** VariableChoice label */ + label?: (string|null); - /** PrivateAuctionDeal privateAuctionDisplayName. */ - public privateAuctionDisplayName?: (string|null); + /** VariableChoice value */ + value?: (string|null); + } - /** PrivateAuctionDeal buyerAccountId. */ - public buyerAccountId?: (number|Long|string|null); + /** Represents a VariableChoice. */ + class VariableChoice implements IVariableChoice { - /** PrivateAuctionDeal externalDealId. */ - public externalDealId?: (number|Long|string|null); + /** + * Constructs a new VariableChoice. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice); - /** PrivateAuctionDeal targeting. */ - public targeting?: (google.ads.admanager.v1.ITargeting|null); + /** VariableChoice label. */ + public label?: (string|null); - /** PrivateAuctionDeal endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** VariableChoice value. */ + public value?: (string|null); - /** PrivateAuctionDeal floorPrice. */ - public floorPrice?: (google.type.IMoney|null); + /** + * Creates a new VariableChoice instance using the specified properties. + * @param [properties] Properties to set + * @returns VariableChoice instance + */ + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice): google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice; - /** PrivateAuctionDeal creativeSizes. */ - public creativeSizes: google.ads.admanager.v1.ISize[]; + /** + * Encodes the specified VariableChoice message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.verify|verify} messages. + * @param message VariableChoice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice, writer?: $protobuf.Writer): $protobuf.Writer; - /** PrivateAuctionDeal status. */ - public status?: (google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|keyof typeof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null); + /** + * Encodes the specified VariableChoice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.verify|verify} messages. + * @param message VariableChoice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice, writer?: $protobuf.Writer): $protobuf.Writer; - /** PrivateAuctionDeal auctionPriorityEnabled. */ - public auctionPriorityEnabled?: (boolean|null); + /** + * Decodes a VariableChoice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VariableChoice + * @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.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice; - /** PrivateAuctionDeal blockOverrideEnabled. */ - public blockOverrideEnabled?: (boolean|null); + /** + * Decodes a VariableChoice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VariableChoice + * @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.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice; - /** PrivateAuctionDeal buyerPermissionType. */ - public buyerPermissionType?: (google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|keyof typeof google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null); + /** + * Verifies a VariableChoice 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); - /** PrivateAuctionDeal buyerData. */ - public buyerData?: (google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null); + /** + * Creates a VariableChoice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VariableChoice + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice; - /** PrivateAuctionDeal createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a plain object from a VariableChoice message. Also converts values to other types if specified. + * @param message VariableChoice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PrivateAuctionDeal updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Converts this VariableChoice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new PrivateAuctionDeal instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateAuctionDeal instance - */ - public static create(properties?: google.ads.admanager.v1.IPrivateAuctionDeal): google.ads.admanager.v1.PrivateAuctionDeal; + /** + * Gets the default type url for VariableChoice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Encodes the specified PrivateAuctionDeal message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. - * @param message PrivateAuctionDeal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.IPrivateAuctionDeal, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a LongCreativeTemplateVariable. */ + interface ILongCreativeTemplateVariable { - /** - * Encodes the specified PrivateAuctionDeal message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. - * @param message PrivateAuctionDeal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.IPrivateAuctionDeal, writer?: $protobuf.Writer): $protobuf.Writer; + /** LongCreativeTemplateVariable defaultValue */ + defaultValue?: (number|Long|string|null); - /** - * Decodes a PrivateAuctionDeal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateAuctionDeal - * @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.ads.admanager.v1.PrivateAuctionDeal; + /** LongCreativeTemplateVariable sampleValue */ + sampleValue?: (number|Long|string|null); + } - /** - * Decodes a PrivateAuctionDeal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateAuctionDeal - * @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.ads.admanager.v1.PrivateAuctionDeal; + /** Represents a LongCreativeTemplateVariable. */ + class LongCreativeTemplateVariable implements ILongCreativeTemplateVariable { - /** - * Verifies a PrivateAuctionDeal 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); + /** + * Constructs a new LongCreativeTemplateVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable); - /** - * Creates a PrivateAuctionDeal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateAuctionDeal - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuctionDeal; + /** LongCreativeTemplateVariable defaultValue. */ + public defaultValue?: (number|Long|string|null); - /** - * Creates a plain object from a PrivateAuctionDeal message. Also converts values to other types if specified. - * @param message PrivateAuctionDeal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.PrivateAuctionDeal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** LongCreativeTemplateVariable sampleValue. */ + public sampleValue?: (number|Long|string|null); - /** - * Converts this PrivateAuctionDeal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new LongCreativeTemplateVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns LongCreativeTemplateVariable instance + */ + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable; - /** - * Gets the default type url for PrivateAuctionDeal - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified LongCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.verify|verify} messages. + * @param message LongCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - namespace PrivateAuctionDeal { + /** + * Encodes the specified LongCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.verify|verify} messages. + * @param message LongCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a BuyerData. */ - interface IBuyerData { + /** + * Decodes a LongCreativeTemplateVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable; - /** BuyerData buyerEmails */ - buyerEmails?: (string[]|null); + /** + * Decodes a LongCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable; + + /** + * Verifies a LongCreativeTemplateVariable 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 LongCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongCreativeTemplateVariable + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable; + + /** + * Creates a plain object from a LongCreativeTemplateVariable message. Also converts values to other types if specified. + * @param message LongCreativeTemplateVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongCreativeTemplateVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongCreativeTemplateVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a BuyerData. */ - class BuyerData implements IBuyerData { + /** Properties of a StringCreativeTemplateVariable. */ + interface IStringCreativeTemplateVariable { + + /** StringCreativeTemplateVariable defaultValue */ + defaultValue?: (string|null); + + /** StringCreativeTemplateVariable sampleValue */ + sampleValue?: (string|null); + } + + /** Represents a StringCreativeTemplateVariable. */ + class StringCreativeTemplateVariable implements IStringCreativeTemplateVariable { /** - * Constructs a new BuyerData. + * Constructs a new StringCreativeTemplateVariable. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData); + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable); - /** BuyerData buyerEmails. */ - public buyerEmails: string[]; + /** StringCreativeTemplateVariable defaultValue. */ + public defaultValue?: (string|null); + + /** StringCreativeTemplateVariable sampleValue. */ + public sampleValue?: (string|null); /** - * Creates a new BuyerData instance using the specified properties. + * Creates a new StringCreativeTemplateVariable instance using the specified properties. * @param [properties] Properties to set - * @returns BuyerData instance + * @returns StringCreativeTemplateVariable instance */ - public static create(properties?: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData): google.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable; /** - * Encodes the specified BuyerData message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. - * @param message BuyerData message or plain object to encode + * Encodes the specified StringCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.verify|verify} messages. + * @param message StringCreativeTemplateVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BuyerData message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. - * @param message BuyerData message or plain object to encode + * Encodes the specified StringCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.verify|verify} messages. + * @param message StringCreativeTemplateVariable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BuyerData message from the specified reader or buffer. + * Decodes a StringCreativeTemplateVariable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BuyerData + * @returns StringCreativeTemplateVariable * @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.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable; /** - * Decodes a BuyerData message from the specified reader or buffer, length delimited. + * Decodes a StringCreativeTemplateVariable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BuyerData + * @returns StringCreativeTemplateVariable * @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.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable; /** - * Verifies a BuyerData message. + * Verifies a StringCreativeTemplateVariable 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 BuyerData message from a plain object. Also converts values to their respective internal types. + * Creates a StringCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BuyerData + * @returns StringCreativeTemplateVariable */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable; /** - * Creates a plain object from a BuyerData message. Also converts values to other types if specified. - * @param message BuyerData + * Creates a plain object from a StringCreativeTemplateVariable message. Also converts values to other types if specified. + * @param message StringCreativeTemplateVariable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.PrivateAuctionDeal.BuyerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BuyerData to JSON. + * Converts this StringCreativeTemplateVariable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BuyerData + * Gets the default type url for StringCreativeTemplateVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UrlCreativeTemplateVariable. */ + interface IUrlCreativeTemplateVariable { + + /** UrlCreativeTemplateVariable defaultValue */ + defaultValue?: (string|null); + + /** UrlCreativeTemplateVariable sampleValue */ + sampleValue?: (string|null); + + /** UrlCreativeTemplateVariable urlType */ + urlType?: (google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|keyof typeof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|null); + } + + /** Represents an UrlCreativeTemplateVariable. */ + class UrlCreativeTemplateVariable implements IUrlCreativeTemplateVariable { + + /** + * Constructs a new UrlCreativeTemplateVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable); + + /** UrlCreativeTemplateVariable defaultValue. */ + public defaultValue?: (string|null); + + /** UrlCreativeTemplateVariable sampleValue. */ + public sampleValue?: (string|null); + + /** UrlCreativeTemplateVariable urlType. */ + public urlType?: (google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|keyof typeof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|null); + + /** + * Creates a new UrlCreativeTemplateVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns UrlCreativeTemplateVariable instance + */ + public static create(properties?: google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable): google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable; + + /** + * Encodes the specified UrlCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.verify|verify} messages. + * @param message UrlCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UrlCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.verify|verify} messages. + * @param message UrlCreativeTemplateVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UrlCreativeTemplateVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UrlCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable; + + /** + * Decodes an UrlCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UrlCreativeTemplateVariable + * @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.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable; + + /** + * Verifies an UrlCreativeTemplateVariable 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 UrlCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UrlCreativeTemplateVariable + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable; + + /** + * Creates a plain object from an UrlCreativeTemplateVariable message. Also converts values to other types if specified. + * @param message UrlCreativeTemplateVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UrlCreativeTemplateVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UrlCreativeTemplateVariable * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -13352,2909 +13028,3351 @@ export namespace google { } } - /** Properties of a PrivateMarketplaceDealStatusEnum. */ - interface IPrivateMarketplaceDealStatusEnum { + /** Properties of a CreativeTemplateVariableUrlTypeEnum. */ + interface ICreativeTemplateVariableUrlTypeEnum { } - /** Represents a PrivateMarketplaceDealStatusEnum. */ - class PrivateMarketplaceDealStatusEnum implements IPrivateMarketplaceDealStatusEnum { + /** Represents a CreativeTemplateVariableUrlTypeEnum. */ + class CreativeTemplateVariableUrlTypeEnum implements ICreativeTemplateVariableUrlTypeEnum { /** - * Constructs a new PrivateMarketplaceDealStatusEnum. + * Constructs a new CreativeTemplateVariableUrlTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum); + constructor(properties?: google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum); /** - * Creates a new PrivateMarketplaceDealStatusEnum instance using the specified properties. + * Creates a new CreativeTemplateVariableUrlTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns PrivateMarketplaceDealStatusEnum instance + * @returns CreativeTemplateVariableUrlTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum): google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + public static create(properties?: google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum): google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum; /** - * Encodes the specified PrivateMarketplaceDealStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. - * @param message PrivateMarketplaceDealStatusEnum message or plain object to encode + * Encodes the specified CreativeTemplateVariableUrlTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.verify|verify} messages. + * @param message CreativeTemplateVariableUrlTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PrivateMarketplaceDealStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. - * @param message PrivateMarketplaceDealStatusEnum message or plain object to encode + * Encodes the specified CreativeTemplateVariableUrlTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.verify|verify} messages. + * @param message CreativeTemplateVariableUrlTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer. + * Decodes a CreativeTemplateVariableUrlTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PrivateMarketplaceDealStatusEnum + * @returns CreativeTemplateVariableUrlTypeEnum * @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.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum; /** - * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplateVariableUrlTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PrivateMarketplaceDealStatusEnum + * @returns CreativeTemplateVariableUrlTypeEnum * @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.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum; /** - * Verifies a PrivateMarketplaceDealStatusEnum message. + * Verifies a CreativeTemplateVariableUrlTypeEnum 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 PrivateMarketplaceDealStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateVariableUrlTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PrivateMarketplaceDealStatusEnum + * @returns CreativeTemplateVariableUrlTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum; /** - * Creates a plain object from a PrivateMarketplaceDealStatusEnum message. Also converts values to other types if specified. - * @param message PrivateMarketplaceDealStatusEnum + * Creates a plain object from a CreativeTemplateVariableUrlTypeEnum message. Also converts values to other types if specified. + * @param message CreativeTemplateVariableUrlTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PrivateMarketplaceDealStatusEnum to JSON. + * Converts this CreativeTemplateVariableUrlTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PrivateMarketplaceDealStatusEnum + * Gets the default type url for CreativeTemplateVariableUrlTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace PrivateMarketplaceDealStatusEnum { + namespace CreativeTemplateVariableUrlTypeEnum { - /** PrivateMarketplaceDealStatus enum. */ - enum PrivateMarketplaceDealStatus { - PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED = 0, - PENDING = 1, - ACTIVE = 2, - CANCELED = 3, - SELLER_PAUSED = 4, - BUYER_PAUSED = 5 + /** CreativeTemplateVariableUrlType enum. */ + enum CreativeTemplateVariableUrlType { + CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED = 0, + CLICK_TRACKER = 1, + DEEPLINK = 2, + IMPRESSION_TRACKER = 3, + STANDARD_HTTP = 4 } } - /** Properties of a Targeting. */ - interface ITargeting { - - /** Targeting geoTargeting */ - geoTargeting?: (google.ads.admanager.v1.IGeoTargeting|null); - - /** Targeting technologyTargeting */ - technologyTargeting?: (google.ads.admanager.v1.ITechnologyTargeting|null); + /** Represents a CreativeTemplateService */ + class CreativeTemplateService extends $protobuf.rpc.Service { - /** Targeting inventoryTargeting */ - inventoryTargeting?: (google.ads.admanager.v1.IInventoryTargeting|null); + /** + * Constructs a new CreativeTemplateService 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); - /** Targeting requestPlatformTargeting */ - requestPlatformTargeting?: (google.ads.admanager.v1.IRequestPlatformTargeting|null); + /** + * Creates new CreativeTemplateService 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): CreativeTemplateService; - /** Targeting customTargeting */ - customTargeting?: (google.ads.admanager.v1.ICustomTargeting|null); + /** + * Calls GetCreativeTemplate. + * @param request GetCreativeTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CreativeTemplate + */ + public getCreativeTemplate(request: google.ads.admanager.v1.IGetCreativeTemplateRequest, callback: google.ads.admanager.v1.CreativeTemplateService.GetCreativeTemplateCallback): void; - /** Targeting userDomainTargeting */ - userDomainTargeting?: (google.ads.admanager.v1.IUserDomainTargeting|null); + /** + * Calls GetCreativeTemplate. + * @param request GetCreativeTemplateRequest message or plain object + * @returns Promise + */ + public getCreativeTemplate(request: google.ads.admanager.v1.IGetCreativeTemplateRequest): Promise; - /** Targeting videoPositionTargeting */ - videoPositionTargeting?: (google.ads.admanager.v1.IVideoPositionTargeting|null); + /** + * Calls ListCreativeTemplates. + * @param request ListCreativeTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCreativeTemplatesResponse + */ + public listCreativeTemplates(request: google.ads.admanager.v1.IListCreativeTemplatesRequest, callback: google.ads.admanager.v1.CreativeTemplateService.ListCreativeTemplatesCallback): void; - /** Targeting dataSegmentTargeting */ - dataSegmentTargeting?: (google.ads.admanager.v1.IDataSegmentTargeting|null); + /** + * Calls ListCreativeTemplates. + * @param request ListCreativeTemplatesRequest message or plain object + * @returns Promise + */ + public listCreativeTemplates(request: google.ads.admanager.v1.IListCreativeTemplatesRequest): Promise; } - /** Represents a Targeting. */ - class Targeting implements ITargeting { + namespace CreativeTemplateService { /** - * Constructs a new Targeting. - * @param [properties] Properties to set + * Callback as used by {@link google.ads.admanager.v1.CreativeTemplateService|getCreativeTemplate}. + * @param error Error, if any + * @param [response] CreativeTemplate */ - constructor(properties?: google.ads.admanager.v1.ITargeting); - - /** Targeting geoTargeting. */ - public geoTargeting?: (google.ads.admanager.v1.IGeoTargeting|null); - - /** Targeting technologyTargeting. */ - public technologyTargeting?: (google.ads.admanager.v1.ITechnologyTargeting|null); + type GetCreativeTemplateCallback = (error: (Error|null), response?: google.ads.admanager.v1.CreativeTemplate) => void; - /** Targeting inventoryTargeting. */ - public inventoryTargeting?: (google.ads.admanager.v1.IInventoryTargeting|null); + /** + * Callback as used by {@link google.ads.admanager.v1.CreativeTemplateService|listCreativeTemplates}. + * @param error Error, if any + * @param [response] ListCreativeTemplatesResponse + */ + type ListCreativeTemplatesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCreativeTemplatesResponse) => void; + } - /** Targeting requestPlatformTargeting. */ - public requestPlatformTargeting?: (google.ads.admanager.v1.IRequestPlatformTargeting|null); + /** Properties of a GetCreativeTemplateRequest. */ + interface IGetCreativeTemplateRequest { - /** Targeting customTargeting. */ - public customTargeting?: (google.ads.admanager.v1.ICustomTargeting|null); + /** GetCreativeTemplateRequest name */ + name?: (string|null); + } - /** Targeting userDomainTargeting. */ - public userDomainTargeting?: (google.ads.admanager.v1.IUserDomainTargeting|null); + /** Represents a GetCreativeTemplateRequest. */ + class GetCreativeTemplateRequest implements IGetCreativeTemplateRequest { - /** Targeting videoPositionTargeting. */ - public videoPositionTargeting?: (google.ads.admanager.v1.IVideoPositionTargeting|null); + /** + * Constructs a new GetCreativeTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetCreativeTemplateRequest); - /** Targeting dataSegmentTargeting. */ - public dataSegmentTargeting?: (google.ads.admanager.v1.IDataSegmentTargeting|null); + /** GetCreativeTemplateRequest name. */ + public name: string; /** - * Creates a new Targeting instance using the specified properties. + * Creates a new GetCreativeTemplateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Targeting instance + * @returns GetCreativeTemplateRequest instance */ - public static create(properties?: google.ads.admanager.v1.ITargeting): google.ads.admanager.v1.Targeting; + public static create(properties?: google.ads.admanager.v1.IGetCreativeTemplateRequest): google.ads.admanager.v1.GetCreativeTemplateRequest; /** - * Encodes the specified Targeting message. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. - * @param message Targeting message or plain object to encode + * Encodes the specified GetCreativeTemplateRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCreativeTemplateRequest.verify|verify} messages. + * @param message GetCreativeTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCreativeTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Targeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. - * @param message Targeting message or plain object to encode + * Encodes the specified GetCreativeTemplateRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCreativeTemplateRequest.verify|verify} messages. + * @param message GetCreativeTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCreativeTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Targeting message from the specified reader or buffer. + * Decodes a GetCreativeTemplateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Targeting + * @returns GetCreativeTemplateRequest * @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.ads.admanager.v1.Targeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCreativeTemplateRequest; /** - * Decodes a Targeting message from the specified reader or buffer, length delimited. + * Decodes a GetCreativeTemplateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Targeting + * @returns GetCreativeTemplateRequest * @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.ads.admanager.v1.Targeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCreativeTemplateRequest; /** - * Verifies a Targeting message. + * Verifies a GetCreativeTemplateRequest 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 Targeting message from a plain object. Also converts values to their respective internal types. + * Creates a GetCreativeTemplateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Targeting + * @returns GetCreativeTemplateRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Targeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCreativeTemplateRequest; /** - * Creates a plain object from a Targeting message. Also converts values to other types if specified. - * @param message Targeting + * Creates a plain object from a GetCreativeTemplateRequest message. Also converts values to other types if specified. + * @param message GetCreativeTemplateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Targeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCreativeTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Targeting to JSON. + * Converts this GetCreativeTemplateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Targeting + * Gets the default type url for GetCreativeTemplateRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GeoTargeting. */ - interface IGeoTargeting { + /** Properties of a ListCreativeTemplatesRequest. */ + interface IListCreativeTemplatesRequest { - /** GeoTargeting targetedGeos */ - targetedGeos?: (string[]|null); + /** ListCreativeTemplatesRequest parent */ + parent?: (string|null); - /** GeoTargeting excludedGeos */ - excludedGeos?: (string[]|null); + /** ListCreativeTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListCreativeTemplatesRequest pageToken */ + pageToken?: (string|null); + + /** ListCreativeTemplatesRequest filter */ + filter?: (string|null); + + /** ListCreativeTemplatesRequest orderBy */ + orderBy?: (string|null); + + /** ListCreativeTemplatesRequest skip */ + skip?: (number|null); } - /** Represents a GeoTargeting. */ - class GeoTargeting implements IGeoTargeting { + /** Represents a ListCreativeTemplatesRequest. */ + class ListCreativeTemplatesRequest implements IListCreativeTemplatesRequest { /** - * Constructs a new GeoTargeting. + * Constructs a new ListCreativeTemplatesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGeoTargeting); + constructor(properties?: google.ads.admanager.v1.IListCreativeTemplatesRequest); - /** GeoTargeting targetedGeos. */ - public targetedGeos: string[]; + /** ListCreativeTemplatesRequest parent. */ + public parent: string; - /** GeoTargeting excludedGeos. */ - public excludedGeos: string[]; + /** ListCreativeTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListCreativeTemplatesRequest pageToken. */ + public pageToken: string; + + /** ListCreativeTemplatesRequest filter. */ + public filter: string; + + /** ListCreativeTemplatesRequest orderBy. */ + public orderBy: string; + + /** ListCreativeTemplatesRequest skip. */ + public skip: number; /** - * Creates a new GeoTargeting instance using the specified properties. + * Creates a new ListCreativeTemplatesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GeoTargeting instance + * @returns ListCreativeTemplatesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGeoTargeting): google.ads.admanager.v1.GeoTargeting; + public static create(properties?: google.ads.admanager.v1.IListCreativeTemplatesRequest): google.ads.admanager.v1.ListCreativeTemplatesRequest; /** - * Encodes the specified GeoTargeting message. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. - * @param message GeoTargeting message or plain object to encode + * Encodes the specified ListCreativeTemplatesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesRequest.verify|verify} messages. + * @param message ListCreativeTemplatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGeoTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCreativeTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeoTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. - * @param message GeoTargeting message or plain object to encode + * Encodes the specified ListCreativeTemplatesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesRequest.verify|verify} messages. + * @param message ListCreativeTemplatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGeoTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCreativeTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeoTargeting message from the specified reader or buffer. + * Decodes a ListCreativeTemplatesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeoTargeting + * @returns ListCreativeTemplatesRequest * @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.ads.admanager.v1.GeoTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCreativeTemplatesRequest; /** - * Decodes a GeoTargeting message from the specified reader or buffer, length delimited. + * Decodes a ListCreativeTemplatesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeoTargeting + * @returns ListCreativeTemplatesRequest * @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.ads.admanager.v1.GeoTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCreativeTemplatesRequest; /** - * Verifies a GeoTargeting message. + * Verifies a ListCreativeTemplatesRequest 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 GeoTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a ListCreativeTemplatesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeoTargeting + * @returns ListCreativeTemplatesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GeoTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCreativeTemplatesRequest; /** - * Creates a plain object from a GeoTargeting message. Also converts values to other types if specified. - * @param message GeoTargeting + * Creates a plain object from a ListCreativeTemplatesRequest message. Also converts values to other types if specified. + * @param message ListCreativeTemplatesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GeoTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCreativeTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeoTargeting to JSON. + * Converts this ListCreativeTemplatesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeoTargeting + * Gets the default type url for ListCreativeTemplatesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TechnologyTargeting. */ - interface ITechnologyTargeting { + /** Properties of a ListCreativeTemplatesResponse. */ + interface IListCreativeTemplatesResponse { - /** TechnologyTargeting bandwidthTargeting */ - bandwidthTargeting?: (google.ads.admanager.v1.IBandwidthTargeting|null); + /** ListCreativeTemplatesResponse creativeTemplates */ + creativeTemplates?: (google.ads.admanager.v1.ICreativeTemplate[]|null); - /** TechnologyTargeting deviceCategoryTargeting */ - deviceCategoryTargeting?: (google.ads.admanager.v1.IDeviceCategoryTargeting|null); + /** ListCreativeTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); - /** TechnologyTargeting operatingSystemTargeting */ - operatingSystemTargeting?: (google.ads.admanager.v1.IOperatingSystemTargeting|null); + /** ListCreativeTemplatesResponse totalSize */ + totalSize?: (number|null); } - /** Represents a TechnologyTargeting. */ - class TechnologyTargeting implements ITechnologyTargeting { + /** Represents a ListCreativeTemplatesResponse. */ + class ListCreativeTemplatesResponse implements IListCreativeTemplatesResponse { /** - * Constructs a new TechnologyTargeting. + * Constructs a new ListCreativeTemplatesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITechnologyTargeting); + constructor(properties?: google.ads.admanager.v1.IListCreativeTemplatesResponse); - /** TechnologyTargeting bandwidthTargeting. */ - public bandwidthTargeting?: (google.ads.admanager.v1.IBandwidthTargeting|null); + /** ListCreativeTemplatesResponse creativeTemplates. */ + public creativeTemplates: google.ads.admanager.v1.ICreativeTemplate[]; - /** TechnologyTargeting deviceCategoryTargeting. */ - public deviceCategoryTargeting?: (google.ads.admanager.v1.IDeviceCategoryTargeting|null); + /** ListCreativeTemplatesResponse nextPageToken. */ + public nextPageToken: string; - /** TechnologyTargeting operatingSystemTargeting. */ - public operatingSystemTargeting?: (google.ads.admanager.v1.IOperatingSystemTargeting|null); + /** ListCreativeTemplatesResponse totalSize. */ + public totalSize: number; /** - * Creates a new TechnologyTargeting instance using the specified properties. + * Creates a new ListCreativeTemplatesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TechnologyTargeting instance + * @returns ListCreativeTemplatesResponse instance */ - public static create(properties?: google.ads.admanager.v1.ITechnologyTargeting): google.ads.admanager.v1.TechnologyTargeting; + public static create(properties?: google.ads.admanager.v1.IListCreativeTemplatesResponse): google.ads.admanager.v1.ListCreativeTemplatesResponse; /** - * Encodes the specified TechnologyTargeting message. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. - * @param message TechnologyTargeting message or plain object to encode + * Encodes the specified ListCreativeTemplatesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesResponse.verify|verify} messages. + * @param message ListCreativeTemplatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITechnologyTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCreativeTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TechnologyTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. - * @param message TechnologyTargeting message or plain object to encode + * Encodes the specified ListCreativeTemplatesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesResponse.verify|verify} messages. + * @param message ListCreativeTemplatesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITechnologyTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCreativeTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TechnologyTargeting message from the specified reader or buffer. + * Decodes a ListCreativeTemplatesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TechnologyTargeting + * @returns ListCreativeTemplatesResponse * @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.ads.admanager.v1.TechnologyTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCreativeTemplatesResponse; /** - * Decodes a TechnologyTargeting message from the specified reader or buffer, length delimited. + * Decodes a ListCreativeTemplatesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TechnologyTargeting + * @returns ListCreativeTemplatesResponse * @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.ads.admanager.v1.TechnologyTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCreativeTemplatesResponse; /** - * Verifies a TechnologyTargeting message. + * Verifies a ListCreativeTemplatesResponse 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 TechnologyTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a ListCreativeTemplatesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TechnologyTargeting + * @returns ListCreativeTemplatesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TechnologyTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCreativeTemplatesResponse; /** - * Creates a plain object from a TechnologyTargeting message. Also converts values to other types if specified. - * @param message TechnologyTargeting + * Creates a plain object from a ListCreativeTemplatesResponse message. Also converts values to other types if specified. + * @param message ListCreativeTemplatesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TechnologyTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCreativeTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TechnologyTargeting to JSON. + * Converts this ListCreativeTemplatesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TechnologyTargeting + * Gets the default type url for ListCreativeTemplatesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BandwidthTargeting. */ - interface IBandwidthTargeting { - - /** BandwidthTargeting targetedBandwidthGroups */ - targetedBandwidthGroups?: (string[]|null); - - /** BandwidthTargeting excludedBandwidthGroups */ - excludedBandwidthGroups?: (string[]|null); + /** Properties of a CustomFieldDataTypeEnum. */ + interface ICustomFieldDataTypeEnum { } - /** Represents a BandwidthTargeting. */ - class BandwidthTargeting implements IBandwidthTargeting { + /** Represents a CustomFieldDataTypeEnum. */ + class CustomFieldDataTypeEnum implements ICustomFieldDataTypeEnum { /** - * Constructs a new BandwidthTargeting. + * Constructs a new CustomFieldDataTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IBandwidthTargeting); - - /** BandwidthTargeting targetedBandwidthGroups. */ - public targetedBandwidthGroups: string[]; - - /** BandwidthTargeting excludedBandwidthGroups. */ - public excludedBandwidthGroups: string[]; + constructor(properties?: google.ads.admanager.v1.ICustomFieldDataTypeEnum); /** - * Creates a new BandwidthTargeting instance using the specified properties. + * Creates a new CustomFieldDataTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns BandwidthTargeting instance + * @returns CustomFieldDataTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IBandwidthTargeting): google.ads.admanager.v1.BandwidthTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomFieldDataTypeEnum): google.ads.admanager.v1.CustomFieldDataTypeEnum; /** - * Encodes the specified BandwidthTargeting message. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. - * @param message BandwidthTargeting message or plain object to encode + * Encodes the specified CustomFieldDataTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * @param message CustomFieldDataTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IBandwidthTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldDataTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BandwidthTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. - * @param message BandwidthTargeting message or plain object to encode + * Encodes the specified CustomFieldDataTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * @param message CustomFieldDataTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IBandwidthTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldDataTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BandwidthTargeting message from the specified reader or buffer. + * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BandwidthTargeting + * @returns CustomFieldDataTypeEnum * @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.ads.admanager.v1.BandwidthTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldDataTypeEnum; /** - * Decodes a BandwidthTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BandwidthTargeting + * @returns CustomFieldDataTypeEnum * @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.ads.admanager.v1.BandwidthTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldDataTypeEnum; /** - * Verifies a BandwidthTargeting message. + * Verifies a CustomFieldDataTypeEnum 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 BandwidthTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldDataTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BandwidthTargeting + * @returns CustomFieldDataTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BandwidthTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldDataTypeEnum; /** - * Creates a plain object from a BandwidthTargeting message. Also converts values to other types if specified. - * @param message BandwidthTargeting + * Creates a plain object from a CustomFieldDataTypeEnum message. Also converts values to other types if specified. + * @param message CustomFieldDataTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.BandwidthTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldDataTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BandwidthTargeting to JSON. + * Converts this CustomFieldDataTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BandwidthTargeting + * Gets the default type url for CustomFieldDataTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeviceCategoryTargeting. */ - interface IDeviceCategoryTargeting { + namespace CustomFieldDataTypeEnum { - /** DeviceCategoryTargeting targetedCategories */ - targetedCategories?: (string[]|null); + /** CustomFieldDataType enum. */ + enum CustomFieldDataType { + CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED = 0, + STRING = 1, + NUMBER = 2, + TOGGLE = 3, + DROP_DOWN = 4 + } + } - /** DeviceCategoryTargeting excludedCategories */ - excludedCategories?: (string[]|null); + /** Properties of a CustomFieldEntityTypeEnum. */ + interface ICustomFieldEntityTypeEnum { } - /** Represents a DeviceCategoryTargeting. */ - class DeviceCategoryTargeting implements IDeviceCategoryTargeting { + /** Represents a CustomFieldEntityTypeEnum. */ + class CustomFieldEntityTypeEnum implements ICustomFieldEntityTypeEnum { /** - * Constructs a new DeviceCategoryTargeting. + * Constructs a new CustomFieldEntityTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IDeviceCategoryTargeting); - - /** DeviceCategoryTargeting targetedCategories. */ - public targetedCategories: string[]; - - /** DeviceCategoryTargeting excludedCategories. */ - public excludedCategories: string[]; + constructor(properties?: google.ads.admanager.v1.ICustomFieldEntityTypeEnum); /** - * Creates a new DeviceCategoryTargeting instance using the specified properties. + * Creates a new CustomFieldEntityTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns DeviceCategoryTargeting instance + * @returns CustomFieldEntityTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IDeviceCategoryTargeting): google.ads.admanager.v1.DeviceCategoryTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomFieldEntityTypeEnum): google.ads.admanager.v1.CustomFieldEntityTypeEnum; /** - * Encodes the specified DeviceCategoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. - * @param message DeviceCategoryTargeting message or plain object to encode + * Encodes the specified CustomFieldEntityTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. + * @param message CustomFieldEntityTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IDeviceCategoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldEntityTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeviceCategoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. - * @param message DeviceCategoryTargeting message or plain object to encode + * Encodes the specified CustomFieldEntityTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. + * @param message CustomFieldEntityTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCategoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldEntityTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeviceCategoryTargeting message from the specified reader or buffer. + * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeviceCategoryTargeting + * @returns CustomFieldEntityTypeEnum * @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.ads.admanager.v1.DeviceCategoryTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldEntityTypeEnum; /** - * Decodes a DeviceCategoryTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeviceCategoryTargeting + * @returns CustomFieldEntityTypeEnum * @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.ads.admanager.v1.DeviceCategoryTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldEntityTypeEnum; /** - * Verifies a DeviceCategoryTargeting message. + * Verifies a CustomFieldEntityTypeEnum 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 DeviceCategoryTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldEntityTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeviceCategoryTargeting + * @returns CustomFieldEntityTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCategoryTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldEntityTypeEnum; /** - * Creates a plain object from a DeviceCategoryTargeting message. Also converts values to other types if specified. - * @param message DeviceCategoryTargeting + * Creates a plain object from a CustomFieldEntityTypeEnum message. Also converts values to other types if specified. + * @param message CustomFieldEntityTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.DeviceCategoryTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldEntityTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeviceCategoryTargeting to JSON. + * Converts this CustomFieldEntityTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeviceCategoryTargeting + * Gets the default type url for CustomFieldEntityTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperatingSystemTargeting. */ - interface IOperatingSystemTargeting { - - /** OperatingSystemTargeting targetedOperatingSystems */ - targetedOperatingSystems?: (string[]|null); - - /** OperatingSystemTargeting excludedOperatingSystems */ - excludedOperatingSystems?: (string[]|null); + namespace CustomFieldEntityTypeEnum { - /** OperatingSystemTargeting targetedOperatingSystemVersions */ - targetedOperatingSystemVersions?: (string[]|null); + /** CustomFieldEntityType enum. */ + enum CustomFieldEntityType { + CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED = 0, + LINE_ITEM = 1, + ORDER = 2, + CREATIVE = 3, + PROPOSAL = 4, + PROPOSAL_LINE_ITEM = 5 + } + } - /** OperatingSystemTargeting excludedOperatingSystemVersions */ - excludedOperatingSystemVersions?: (string[]|null); + /** Properties of a CustomFieldStatusEnum. */ + interface ICustomFieldStatusEnum { } - /** Represents an OperatingSystemTargeting. */ - class OperatingSystemTargeting implements IOperatingSystemTargeting { + /** Represents a CustomFieldStatusEnum. */ + class CustomFieldStatusEnum implements ICustomFieldStatusEnum { /** - * Constructs a new OperatingSystemTargeting. + * Constructs a new CustomFieldStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IOperatingSystemTargeting); - - /** OperatingSystemTargeting targetedOperatingSystems. */ - public targetedOperatingSystems: string[]; - - /** OperatingSystemTargeting excludedOperatingSystems. */ - public excludedOperatingSystems: string[]; - - /** OperatingSystemTargeting targetedOperatingSystemVersions. */ - public targetedOperatingSystemVersions: string[]; - - /** OperatingSystemTargeting excludedOperatingSystemVersions. */ - public excludedOperatingSystemVersions: string[]; + constructor(properties?: google.ads.admanager.v1.ICustomFieldStatusEnum); /** - * Creates a new OperatingSystemTargeting instance using the specified properties. + * Creates a new CustomFieldStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns OperatingSystemTargeting instance + * @returns CustomFieldStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.IOperatingSystemTargeting): google.ads.admanager.v1.OperatingSystemTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomFieldStatusEnum): google.ads.admanager.v1.CustomFieldStatusEnum; /** - * Encodes the specified OperatingSystemTargeting message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. - * @param message OperatingSystemTargeting message or plain object to encode + * Encodes the specified CustomFieldStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. + * @param message CustomFieldStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IOperatingSystemTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperatingSystemTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. - * @param message OperatingSystemTargeting message or plain object to encode + * Encodes the specified CustomFieldStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. + * @param message CustomFieldStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystemTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperatingSystemTargeting message from the specified reader or buffer. + * Decodes a CustomFieldStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperatingSystemTargeting + * @returns CustomFieldStatusEnum * @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.ads.admanager.v1.OperatingSystemTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldStatusEnum; /** - * Decodes an OperatingSystemTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperatingSystemTargeting + * @returns CustomFieldStatusEnum * @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.ads.admanager.v1.OperatingSystemTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldStatusEnum; /** - * Verifies an OperatingSystemTargeting message. + * Verifies a CustomFieldStatusEnum 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 OperatingSystemTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperatingSystemTargeting + * @returns CustomFieldStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystemTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldStatusEnum; /** - * Creates a plain object from an OperatingSystemTargeting message. Also converts values to other types if specified. - * @param message OperatingSystemTargeting + * Creates a plain object from a CustomFieldStatusEnum message. Also converts values to other types if specified. + * @param message CustomFieldStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.OperatingSystemTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperatingSystemTargeting to JSON. + * Converts this CustomFieldStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperatingSystemTargeting + * Gets the default type url for CustomFieldStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InventoryTargeting. */ - interface IInventoryTargeting { - - /** InventoryTargeting targetedAdUnits */ - targetedAdUnits?: (google.ads.admanager.v1.IAdUnitTargeting[]|null); + namespace CustomFieldStatusEnum { - /** InventoryTargeting excludedAdUnits */ - excludedAdUnits?: (google.ads.admanager.v1.IAdUnitTargeting[]|null); + /** CustomFieldStatus enum. */ + enum CustomFieldStatus { + CUSTOM_FIELD_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } - /** InventoryTargeting targetedPlacements */ - targetedPlacements?: (string[]|null); + /** Properties of a CustomFieldVisibilityEnum. */ + interface ICustomFieldVisibilityEnum { } - /** Represents an InventoryTargeting. */ - class InventoryTargeting implements IInventoryTargeting { + /** Represents a CustomFieldVisibilityEnum. */ + class CustomFieldVisibilityEnum implements ICustomFieldVisibilityEnum { /** - * Constructs a new InventoryTargeting. + * Constructs a new CustomFieldVisibilityEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IInventoryTargeting); - - /** InventoryTargeting targetedAdUnits. */ - public targetedAdUnits: google.ads.admanager.v1.IAdUnitTargeting[]; - - /** InventoryTargeting excludedAdUnits. */ - public excludedAdUnits: google.ads.admanager.v1.IAdUnitTargeting[]; - - /** InventoryTargeting targetedPlacements. */ - public targetedPlacements: string[]; + constructor(properties?: google.ads.admanager.v1.ICustomFieldVisibilityEnum); /** - * Creates a new InventoryTargeting instance using the specified properties. + * Creates a new CustomFieldVisibilityEnum instance using the specified properties. * @param [properties] Properties to set - * @returns InventoryTargeting instance + * @returns CustomFieldVisibilityEnum instance */ - public static create(properties?: google.ads.admanager.v1.IInventoryTargeting): google.ads.admanager.v1.InventoryTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomFieldVisibilityEnum): google.ads.admanager.v1.CustomFieldVisibilityEnum; /** - * Encodes the specified InventoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. - * @param message InventoryTargeting message or plain object to encode + * Encodes the specified CustomFieldVisibilityEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. + * @param message CustomFieldVisibilityEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IInventoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldVisibilityEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InventoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. - * @param message InventoryTargeting message or plain object to encode + * Encodes the specified CustomFieldVisibilityEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. + * @param message CustomFieldVisibilityEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IInventoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldVisibilityEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InventoryTargeting message from the specified reader or buffer. + * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InventoryTargeting + * @returns CustomFieldVisibilityEnum * @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.ads.admanager.v1.InventoryTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldVisibilityEnum; /** - * Decodes an InventoryTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InventoryTargeting + * @returns CustomFieldVisibilityEnum * @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.ads.admanager.v1.InventoryTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldVisibilityEnum; /** - * Verifies an InventoryTargeting message. + * Verifies a CustomFieldVisibilityEnum 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 InventoryTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldVisibilityEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InventoryTargeting + * @returns CustomFieldVisibilityEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.InventoryTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldVisibilityEnum; /** - * Creates a plain object from an InventoryTargeting message. Also converts values to other types if specified. - * @param message InventoryTargeting + * Creates a plain object from a CustomFieldVisibilityEnum message. Also converts values to other types if specified. + * @param message CustomFieldVisibilityEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.InventoryTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldVisibilityEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InventoryTargeting to JSON. + * Converts this CustomFieldVisibilityEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InventoryTargeting + * Gets the default type url for CustomFieldVisibilityEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdUnitTargeting. */ - interface IAdUnitTargeting { + namespace CustomFieldVisibilityEnum { - /** AdUnitTargeting includeDescendants */ - includeDescendants?: (boolean|null); + /** CustomFieldVisibility enum. */ + enum CustomFieldVisibility { + CUSTOM_FIELD_VISIBILITY_UNSPECIFIED = 0, + HIDDEN = 1, + READ_ONLY = 2, + EDITABLE = 3 + } + } - /** AdUnitTargeting adUnit */ - adUnit?: (string|null); + /** Properties of a CustomField. */ + interface ICustomField { + + /** CustomField name */ + name?: (string|null); + + /** CustomField customFieldId */ + customFieldId?: (number|Long|string|null); + + /** CustomField displayName */ + displayName?: (string|null); + + /** CustomField description */ + description?: (string|null); + + /** CustomField status */ + status?: (google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|keyof typeof google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null); + + /** CustomField entityType */ + entityType?: (google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|keyof typeof google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null); + + /** CustomField dataType */ + dataType?: (google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|keyof typeof google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null); + + /** CustomField visibility */ + visibility?: (google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|keyof typeof google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null); + + /** CustomField options */ + options?: (google.ads.admanager.v1.ICustomFieldOption[]|null); } - /** Represents an AdUnitTargeting. */ - class AdUnitTargeting implements IAdUnitTargeting { + /** Represents a CustomField. */ + class CustomField implements ICustomField { /** - * Constructs a new AdUnitTargeting. + * Constructs a new CustomField. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IAdUnitTargeting); + constructor(properties?: google.ads.admanager.v1.ICustomField); - /** AdUnitTargeting includeDescendants. */ - public includeDescendants?: (boolean|null); + /** CustomField name. */ + public name: string; - /** AdUnitTargeting adUnit. */ - public adUnit?: (string|null); + /** CustomField customFieldId. */ + public customFieldId?: (number|Long|string|null); + + /** CustomField displayName. */ + public displayName?: (string|null); + + /** CustomField description. */ + public description?: (string|null); + + /** CustomField status. */ + public status?: (google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|keyof typeof google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null); + + /** CustomField entityType. */ + public entityType?: (google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|keyof typeof google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null); + + /** CustomField dataType. */ + public dataType?: (google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|keyof typeof google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null); + + /** CustomField visibility. */ + public visibility?: (google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|keyof typeof google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null); + + /** CustomField options. */ + public options: google.ads.admanager.v1.ICustomFieldOption[]; /** - * Creates a new AdUnitTargeting instance using the specified properties. + * Creates a new CustomField instance using the specified properties. * @param [properties] Properties to set - * @returns AdUnitTargeting instance + * @returns CustomField instance */ - public static create(properties?: google.ads.admanager.v1.IAdUnitTargeting): google.ads.admanager.v1.AdUnitTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomField): google.ads.admanager.v1.CustomField; /** - * Encodes the specified AdUnitTargeting message. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. - * @param message AdUnitTargeting message or plain object to encode + * Encodes the specified CustomField message. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. + * @param message CustomField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IAdUnitTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdUnitTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. - * @param message AdUnitTargeting message or plain object to encode + * Encodes the specified CustomField message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. + * @param message CustomField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdUnitTargeting message from the specified reader or buffer. + * Decodes a CustomField message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdUnitTargeting + * @returns CustomField * @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.ads.admanager.v1.AdUnitTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomField; /** - * Decodes an AdUnitTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomField message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdUnitTargeting + * @returns CustomField * @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.ads.admanager.v1.AdUnitTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomField; /** - * Verifies an AdUnitTargeting message. + * Verifies a CustomField 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 AdUnitTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomField message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdUnitTargeting + * @returns CustomField */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomField; /** - * Creates a plain object from an AdUnitTargeting message. Also converts values to other types if specified. - * @param message AdUnitTargeting + * Creates a plain object from a CustomField message. Also converts values to other types if specified. + * @param message CustomField * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.AdUnitTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomField, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdUnitTargeting to JSON. + * Converts this CustomField to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdUnitTargeting + * Gets the default type url for CustomField * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RequestPlatformTargeting. */ - interface IRequestPlatformTargeting { + /** Properties of a CustomFieldOption. */ + interface ICustomFieldOption { - /** RequestPlatformTargeting requestPlatforms */ - requestPlatforms?: (google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[]|null); + /** CustomFieldOption customFieldOptionId */ + customFieldOptionId?: (number|Long|string|null); + + /** CustomFieldOption displayName */ + displayName?: (string|null); } - /** Represents a RequestPlatformTargeting. */ - class RequestPlatformTargeting implements IRequestPlatformTargeting { + /** Represents a CustomFieldOption. */ + class CustomFieldOption implements ICustomFieldOption { /** - * Constructs a new RequestPlatformTargeting. + * Constructs a new CustomFieldOption. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRequestPlatformTargeting); + constructor(properties?: google.ads.admanager.v1.ICustomFieldOption); - /** RequestPlatformTargeting requestPlatforms. */ - public requestPlatforms: google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[]; + /** CustomFieldOption customFieldOptionId. */ + public customFieldOptionId: (number|Long|string); + + /** CustomFieldOption displayName. */ + public displayName: string; /** - * Creates a new RequestPlatformTargeting instance using the specified properties. + * Creates a new CustomFieldOption instance using the specified properties. * @param [properties] Properties to set - * @returns RequestPlatformTargeting instance + * @returns CustomFieldOption instance */ - public static create(properties?: google.ads.admanager.v1.IRequestPlatformTargeting): google.ads.admanager.v1.RequestPlatformTargeting; + public static create(properties?: google.ads.admanager.v1.ICustomFieldOption): google.ads.admanager.v1.CustomFieldOption; /** - * Encodes the specified RequestPlatformTargeting message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. - * @param message RequestPlatformTargeting message or plain object to encode + * Encodes the specified CustomFieldOption message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. + * @param message CustomFieldOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRequestPlatformTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestPlatformTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. - * @param message RequestPlatformTargeting message or plain object to encode + * Encodes the specified CustomFieldOption message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. + * @param message CustomFieldOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRequestPlatformTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestPlatformTargeting message from the specified reader or buffer. + * Decodes a CustomFieldOption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RequestPlatformTargeting + * @returns CustomFieldOption * @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.ads.admanager.v1.RequestPlatformTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldOption; /** - * Decodes a RequestPlatformTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestPlatformTargeting + * @returns CustomFieldOption * @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.ads.admanager.v1.RequestPlatformTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldOption; /** - * Verifies a RequestPlatformTargeting message. + * Verifies a CustomFieldOption 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 RequestPlatformTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RequestPlatformTargeting + * @returns CustomFieldOption */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RequestPlatformTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldOption; /** - * Creates a plain object from a RequestPlatformTargeting message. Also converts values to other types if specified. - * @param message RequestPlatformTargeting + * Creates a plain object from a CustomFieldOption message. Also converts values to other types if specified. + * @param message CustomFieldOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.RequestPlatformTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RequestPlatformTargeting to JSON. + * Converts this CustomFieldOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RequestPlatformTargeting + * Gets the default type url for CustomFieldOption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomTargeting. */ - interface ICustomTargeting { + /** Represents a CustomFieldService */ + class CustomFieldService extends $protobuf.rpc.Service { - /** CustomTargeting customTargetingClauses */ - customTargetingClauses?: (google.ads.admanager.v1.ICustomTargetingClause[]|null); + /** + * Constructs a new CustomFieldService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CustomFieldService 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): CustomFieldService; + + /** + * Calls GetCustomField. + * @param request GetCustomFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomField + */ + public getCustomField(request: google.ads.admanager.v1.IGetCustomFieldRequest, callback: google.ads.admanager.v1.CustomFieldService.GetCustomFieldCallback): void; + + /** + * Calls GetCustomField. + * @param request GetCustomFieldRequest message or plain object + * @returns Promise + */ + public getCustomField(request: google.ads.admanager.v1.IGetCustomFieldRequest): Promise; + + /** + * Calls ListCustomFields. + * @param request ListCustomFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomFieldsResponse + */ + public listCustomFields(request: google.ads.admanager.v1.IListCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.ListCustomFieldsCallback): void; + + /** + * Calls ListCustomFields. + * @param request ListCustomFieldsRequest message or plain object + * @returns Promise + */ + public listCustomFields(request: google.ads.admanager.v1.IListCustomFieldsRequest): Promise; + + /** + * Calls CreateCustomField. + * @param request CreateCustomFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomField + */ + public createCustomField(request: google.ads.admanager.v1.ICreateCustomFieldRequest, callback: google.ads.admanager.v1.CustomFieldService.CreateCustomFieldCallback): void; + + /** + * Calls CreateCustomField. + * @param request CreateCustomFieldRequest message or plain object + * @returns Promise + */ + public createCustomField(request: google.ads.admanager.v1.ICreateCustomFieldRequest): Promise; + + /** + * Calls BatchCreateCustomFields. + * @param request BatchCreateCustomFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateCustomFieldsResponse + */ + public batchCreateCustomFields(request: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.BatchCreateCustomFieldsCallback): void; + + /** + * Calls BatchCreateCustomFields. + * @param request BatchCreateCustomFieldsRequest message or plain object + * @returns Promise + */ + public batchCreateCustomFields(request: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest): Promise; + + /** + * Calls UpdateCustomField. + * @param request UpdateCustomFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomField + */ + public updateCustomField(request: google.ads.admanager.v1.IUpdateCustomFieldRequest, callback: google.ads.admanager.v1.CustomFieldService.UpdateCustomFieldCallback): void; + + /** + * Calls UpdateCustomField. + * @param request UpdateCustomFieldRequest message or plain object + * @returns Promise + */ + public updateCustomField(request: google.ads.admanager.v1.IUpdateCustomFieldRequest): Promise; + + /** + * Calls BatchUpdateCustomFields. + * @param request BatchUpdateCustomFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateCustomFieldsResponse + */ + public batchUpdateCustomFields(request: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.BatchUpdateCustomFieldsCallback): void; + + /** + * Calls BatchUpdateCustomFields. + * @param request BatchUpdateCustomFieldsRequest message or plain object + * @returns Promise + */ + public batchUpdateCustomFields(request: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest): Promise; + + /** + * Calls BatchActivateCustomFields. + * @param request BatchActivateCustomFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchActivateCustomFieldsResponse + */ + public batchActivateCustomFields(request: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.BatchActivateCustomFieldsCallback): void; + + /** + * Calls BatchActivateCustomFields. + * @param request BatchActivateCustomFieldsRequest message or plain object + * @returns Promise + */ + public batchActivateCustomFields(request: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest): Promise; + + /** + * Calls BatchDeactivateCustomFields. + * @param request BatchDeactivateCustomFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchDeactivateCustomFieldsResponse + */ + public batchDeactivateCustomFields(request: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, callback: google.ads.admanager.v1.CustomFieldService.BatchDeactivateCustomFieldsCallback): void; + + /** + * Calls BatchDeactivateCustomFields. + * @param request BatchDeactivateCustomFieldsRequest message or plain object + * @returns Promise + */ + public batchDeactivateCustomFields(request: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest): Promise; } - /** Represents a CustomTargeting. */ - class CustomTargeting implements ICustomTargeting { + namespace CustomFieldService { /** - * Constructs a new CustomTargeting. + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|getCustomField}. + * @param error Error, if any + * @param [response] CustomField + */ + type GetCustomFieldCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomField) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|listCustomFields}. + * @param error Error, if any + * @param [response] ListCustomFieldsResponse + */ + type ListCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomFieldsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|createCustomField}. + * @param error Error, if any + * @param [response] CustomField + */ + type CreateCustomFieldCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomField) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchCreateCustomFields}. + * @param error Error, if any + * @param [response] BatchCreateCustomFieldsResponse + */ + type BatchCreateCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateCustomFieldsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|updateCustomField}. + * @param error Error, if any + * @param [response] CustomField + */ + type UpdateCustomFieldCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomField) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchUpdateCustomFields}. + * @param error Error, if any + * @param [response] BatchUpdateCustomFieldsResponse + */ + type BatchUpdateCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateCustomFieldsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchActivateCustomFields}. + * @param error Error, if any + * @param [response] BatchActivateCustomFieldsResponse + */ + type BatchActivateCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchActivateCustomFieldsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchDeactivateCustomFields}. + * @param error Error, if any + * @param [response] BatchDeactivateCustomFieldsResponse + */ + type BatchDeactivateCustomFieldsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse) => void; + } + + /** Properties of a GetCustomFieldRequest. */ + interface IGetCustomFieldRequest { + + /** GetCustomFieldRequest name */ + name?: (string|null); + } + + /** Represents a GetCustomFieldRequest. */ + class GetCustomFieldRequest implements IGetCustomFieldRequest { + + /** + * Constructs a new GetCustomFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargeting); + constructor(properties?: google.ads.admanager.v1.IGetCustomFieldRequest); - /** CustomTargeting customTargetingClauses. */ - public customTargetingClauses: google.ads.admanager.v1.ICustomTargetingClause[]; + /** GetCustomFieldRequest name. */ + public name: string; /** - * Creates a new CustomTargeting instance using the specified properties. + * Creates a new GetCustomFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargeting instance + * @returns GetCustomFieldRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargeting): google.ads.admanager.v1.CustomTargeting; + public static create(properties?: google.ads.admanager.v1.IGetCustomFieldRequest): google.ads.admanager.v1.GetCustomFieldRequest; /** - * Encodes the specified CustomTargeting message. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. - * @param message CustomTargeting message or plain object to encode + * Encodes the specified GetCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. + * @param message GetCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. - * @param message CustomTargeting message or plain object to encode + * Encodes the specified GetCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. + * @param message GetCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargeting message from the specified reader or buffer. + * Decodes a GetCustomFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargeting + * @returns GetCustomFieldRequest * @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.ads.admanager.v1.CustomTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCustomFieldRequest; /** - * Decodes a CustomTargeting message from the specified reader or buffer, length delimited. + * Decodes a GetCustomFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargeting + * @returns GetCustomFieldRequest * @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.ads.admanager.v1.CustomTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCustomFieldRequest; /** - * Verifies a CustomTargeting message. + * Verifies a GetCustomFieldRequest 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 CustomTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargeting + * @returns GetCustomFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomFieldRequest; /** - * Creates a plain object from a CustomTargeting message. Also converts values to other types if specified. - * @param message CustomTargeting + * Creates a plain object from a GetCustomFieldRequest message. Also converts values to other types if specified. + * @param message GetCustomFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCustomFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargeting to JSON. + * Converts this GetCustomFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargeting + * Gets the default type url for GetCustomFieldRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomTargetingClause. */ - interface ICustomTargetingClause { + /** Properties of a ListCustomFieldsRequest. */ + interface IListCustomFieldsRequest { - /** CustomTargetingClause customTargetingLiterals */ - customTargetingLiterals?: (google.ads.admanager.v1.ICustomTargetingLiteral[]|null); + /** ListCustomFieldsRequest parent */ + parent?: (string|null); + + /** ListCustomFieldsRequest pageSize */ + pageSize?: (number|null); + + /** ListCustomFieldsRequest pageToken */ + pageToken?: (string|null); + + /** ListCustomFieldsRequest filter */ + filter?: (string|null); + + /** ListCustomFieldsRequest orderBy */ + orderBy?: (string|null); + + /** ListCustomFieldsRequest skip */ + skip?: (number|null); } - /** Represents a CustomTargetingClause. */ - class CustomTargetingClause implements ICustomTargetingClause { + /** Represents a ListCustomFieldsRequest. */ + class ListCustomFieldsRequest implements IListCustomFieldsRequest { /** - * Constructs a new CustomTargetingClause. + * Constructs a new ListCustomFieldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingClause); + constructor(properties?: google.ads.admanager.v1.IListCustomFieldsRequest); - /** CustomTargetingClause customTargetingLiterals. */ - public customTargetingLiterals: google.ads.admanager.v1.ICustomTargetingLiteral[]; + /** ListCustomFieldsRequest parent. */ + public parent: string; + + /** ListCustomFieldsRequest pageSize. */ + public pageSize: number; + + /** ListCustomFieldsRequest pageToken. */ + public pageToken: string; + + /** ListCustomFieldsRequest filter. */ + public filter: string; + + /** ListCustomFieldsRequest orderBy. */ + public orderBy: string; + + /** ListCustomFieldsRequest skip. */ + public skip: number; /** - * Creates a new CustomTargetingClause instance using the specified properties. + * Creates a new ListCustomFieldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingClause instance + * @returns ListCustomFieldsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingClause): google.ads.admanager.v1.CustomTargetingClause; + public static create(properties?: google.ads.admanager.v1.IListCustomFieldsRequest): google.ads.admanager.v1.ListCustomFieldsRequest; /** - * Encodes the specified CustomTargetingClause message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. - * @param message CustomTargetingClause message or plain object to encode + * Encodes the specified ListCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. + * @param message ListCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingClause message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. - * @param message CustomTargetingClause message or plain object to encode + * Encodes the specified ListCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. + * @param message ListCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingClause message from the specified reader or buffer. + * Decodes a ListCustomFieldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingClause + * @returns ListCustomFieldsRequest * @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.ads.admanager.v1.CustomTargetingClause; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomFieldsRequest; /** - * Decodes a CustomTargetingClause message from the specified reader or buffer, length delimited. + * Decodes a ListCustomFieldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingClause + * @returns ListCustomFieldsRequest * @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.ads.admanager.v1.CustomTargetingClause; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomFieldsRequest; /** - * Verifies a CustomTargetingClause message. + * Verifies a ListCustomFieldsRequest 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 CustomTargetingClause message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingClause + * @returns ListCustomFieldsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingClause; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomFieldsRequest; /** - * Creates a plain object from a CustomTargetingClause message. Also converts values to other types if specified. - * @param message CustomTargetingClause + * Creates a plain object from a ListCustomFieldsRequest message. Also converts values to other types if specified. + * @param message ListCustomFieldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingClause to JSON. + * Converts this ListCustomFieldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingClause + * Gets the default type url for ListCustomFieldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomTargetingLiteral. */ - interface ICustomTargetingLiteral { + /** Properties of a ListCustomFieldsResponse. */ + interface IListCustomFieldsResponse { - /** CustomTargetingLiteral negative */ - negative?: (boolean|null); + /** ListCustomFieldsResponse customFields */ + customFields?: (google.ads.admanager.v1.ICustomField[]|null); - /** CustomTargetingLiteral customTargetingKey */ - customTargetingKey?: (string|null); + /** ListCustomFieldsResponse nextPageToken */ + nextPageToken?: (string|null); - /** CustomTargetingLiteral customTargetingValues */ - customTargetingValues?: (string[]|null); + /** ListCustomFieldsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a CustomTargetingLiteral. */ - class CustomTargetingLiteral implements ICustomTargetingLiteral { + /** Represents a ListCustomFieldsResponse. */ + class ListCustomFieldsResponse implements IListCustomFieldsResponse { /** - * Constructs a new CustomTargetingLiteral. + * Constructs a new ListCustomFieldsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICustomTargetingLiteral); + constructor(properties?: google.ads.admanager.v1.IListCustomFieldsResponse); - /** CustomTargetingLiteral negative. */ - public negative?: (boolean|null); + /** ListCustomFieldsResponse customFields. */ + public customFields: google.ads.admanager.v1.ICustomField[]; - /** CustomTargetingLiteral customTargetingKey. */ - public customTargetingKey?: (string|null); + /** ListCustomFieldsResponse nextPageToken. */ + public nextPageToken: string; - /** CustomTargetingLiteral customTargetingValues. */ - public customTargetingValues: string[]; + /** ListCustomFieldsResponse totalSize. */ + public totalSize: number; /** - * Creates a new CustomTargetingLiteral instance using the specified properties. + * Creates a new ListCustomFieldsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CustomTargetingLiteral instance + * @returns ListCustomFieldsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ICustomTargetingLiteral): google.ads.admanager.v1.CustomTargetingLiteral; + public static create(properties?: google.ads.admanager.v1.IListCustomFieldsResponse): google.ads.admanager.v1.ListCustomFieldsResponse; /** - * Encodes the specified CustomTargetingLiteral message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. - * @param message CustomTargetingLiteral message or plain object to encode + * Encodes the specified ListCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. + * @param message ListCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICustomTargetingLiteral, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomTargetingLiteral message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. - * @param message CustomTargetingLiteral message or plain object to encode + * Encodes the specified ListCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. + * @param message ListCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingLiteral, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomTargetingLiteral message from the specified reader or buffer. + * Decodes a ListCustomFieldsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomTargetingLiteral + * @returns ListCustomFieldsResponse * @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.ads.admanager.v1.CustomTargetingLiteral; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomFieldsResponse; /** - * Decodes a CustomTargetingLiteral message from the specified reader or buffer, length delimited. + * Decodes a ListCustomFieldsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomTargetingLiteral + * @returns ListCustomFieldsResponse * @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.ads.admanager.v1.CustomTargetingLiteral; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomFieldsResponse; /** - * Verifies a CustomTargetingLiteral message. + * Verifies a ListCustomFieldsResponse 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 CustomTargetingLiteral message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomTargetingLiteral + * @returns ListCustomFieldsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingLiteral; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomFieldsResponse; /** - * Creates a plain object from a CustomTargetingLiteral message. Also converts values to other types if specified. - * @param message CustomTargetingLiteral + * Creates a plain object from a ListCustomFieldsResponse message. Also converts values to other types if specified. + * @param message ListCustomFieldsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CustomTargetingLiteral, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomTargetingLiteral to JSON. + * Converts this ListCustomFieldsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomTargetingLiteral + * Gets the default type url for ListCustomFieldsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserDomainTargeting. */ - interface IUserDomainTargeting { + /** Properties of a CreateCustomFieldRequest. */ + interface ICreateCustomFieldRequest { - /** UserDomainTargeting targetedUserDomains */ - targetedUserDomains?: (string[]|null); + /** CreateCustomFieldRequest parent */ + parent?: (string|null); - /** UserDomainTargeting excludedUserDomains */ - excludedUserDomains?: (string[]|null); + /** CreateCustomFieldRequest customField */ + customField?: (google.ads.admanager.v1.ICustomField|null); } - /** Represents a UserDomainTargeting. */ - class UserDomainTargeting implements IUserDomainTargeting { + /** Represents a CreateCustomFieldRequest. */ + class CreateCustomFieldRequest implements ICreateCustomFieldRequest { /** - * Constructs a new UserDomainTargeting. + * Constructs a new CreateCustomFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IUserDomainTargeting); + constructor(properties?: google.ads.admanager.v1.ICreateCustomFieldRequest); - /** UserDomainTargeting targetedUserDomains. */ - public targetedUserDomains: string[]; + /** CreateCustomFieldRequest parent. */ + public parent: string; - /** UserDomainTargeting excludedUserDomains. */ - public excludedUserDomains: string[]; + /** CreateCustomFieldRequest customField. */ + public customField?: (google.ads.admanager.v1.ICustomField|null); /** - * Creates a new UserDomainTargeting instance using the specified properties. + * Creates a new CreateCustomFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UserDomainTargeting instance + * @returns CreateCustomFieldRequest instance */ - public static create(properties?: google.ads.admanager.v1.IUserDomainTargeting): google.ads.admanager.v1.UserDomainTargeting; + public static create(properties?: google.ads.admanager.v1.ICreateCustomFieldRequest): google.ads.admanager.v1.CreateCustomFieldRequest; /** - * Encodes the specified UserDomainTargeting message. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. - * @param message UserDomainTargeting message or plain object to encode + * Encodes the specified CreateCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateCustomFieldRequest.verify|verify} messages. + * @param message CreateCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IUserDomainTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreateCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserDomainTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. - * @param message UserDomainTargeting message or plain object to encode + * Encodes the specified CreateCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateCustomFieldRequest.verify|verify} messages. + * @param message CreateCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IUserDomainTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreateCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserDomainTargeting message from the specified reader or buffer. + * Decodes a CreateCustomFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserDomainTargeting + * @returns CreateCustomFieldRequest * @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.ads.admanager.v1.UserDomainTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreateCustomFieldRequest; /** - * Decodes a UserDomainTargeting message from the specified reader or buffer, length delimited. + * Decodes a CreateCustomFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserDomainTargeting + * @returns CreateCustomFieldRequest * @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.ads.admanager.v1.UserDomainTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreateCustomFieldRequest; /** - * Verifies a UserDomainTargeting message. + * Verifies a CreateCustomFieldRequest 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 UserDomainTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CreateCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserDomainTargeting + * @returns CreateCustomFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UserDomainTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateCustomFieldRequest; /** - * Creates a plain object from a UserDomainTargeting message. Also converts values to other types if specified. - * @param message UserDomainTargeting + * Creates a plain object from a CreateCustomFieldRequest message. Also converts values to other types if specified. + * @param message CreateCustomFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.UserDomainTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreateCustomFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserDomainTargeting to JSON. + * Converts this CreateCustomFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserDomainTargeting + * Gets the default type url for CreateCustomFieldRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a VideoPositionTargeting. */ - interface IVideoPositionTargeting { + /** Properties of a BatchCreateCustomFieldsRequest. */ + interface IBatchCreateCustomFieldsRequest { - /** VideoPositionTargeting videoPositions */ - videoPositions?: (google.ads.admanager.v1.IVideoPosition[]|null); + /** BatchCreateCustomFieldsRequest parent */ + parent?: (string|null); + + /** BatchCreateCustomFieldsRequest requests */ + requests?: (google.ads.admanager.v1.ICreateCustomFieldRequest[]|null); } - /** Represents a VideoPositionTargeting. */ - class VideoPositionTargeting implements IVideoPositionTargeting { + /** Represents a BatchCreateCustomFieldsRequest. */ + class BatchCreateCustomFieldsRequest implements IBatchCreateCustomFieldsRequest { /** - * Constructs a new VideoPositionTargeting. + * Constructs a new BatchCreateCustomFieldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IVideoPositionTargeting); + constructor(properties?: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest); - /** VideoPositionTargeting videoPositions. */ - public videoPositions: google.ads.admanager.v1.IVideoPosition[]; + /** BatchCreateCustomFieldsRequest parent. */ + public parent: string; + + /** BatchCreateCustomFieldsRequest requests. */ + public requests: google.ads.admanager.v1.ICreateCustomFieldRequest[]; /** - * Creates a new VideoPositionTargeting instance using the specified properties. + * Creates a new BatchCreateCustomFieldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoPositionTargeting instance + * @returns BatchCreateCustomFieldsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IVideoPositionTargeting): google.ads.admanager.v1.VideoPositionTargeting; + public static create(properties?: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest): google.ads.admanager.v1.BatchCreateCustomFieldsRequest; /** - * Encodes the specified VideoPositionTargeting message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. - * @param message VideoPositionTargeting message or plain object to encode + * Encodes the specified BatchCreateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsRequest.verify|verify} messages. + * @param message BatchCreateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IVideoPositionTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoPositionTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. - * @param message VideoPositionTargeting message or plain object to encode + * Encodes the specified BatchCreateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsRequest.verify|verify} messages. + * @param message BatchCreateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IVideoPositionTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoPositionTargeting message from the specified reader or buffer. + * Decodes a BatchCreateCustomFieldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoPositionTargeting + * @returns BatchCreateCustomFieldsRequest * @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.ads.admanager.v1.VideoPositionTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateCustomFieldsRequest; /** - * Decodes a VideoPositionTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoPositionTargeting + * @returns BatchCreateCustomFieldsRequest * @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.ads.admanager.v1.VideoPositionTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateCustomFieldsRequest; /** - * Verifies a VideoPositionTargeting message. + * Verifies a BatchCreateCustomFieldsRequest 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 VideoPositionTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoPositionTargeting + * @returns BatchCreateCustomFieldsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPositionTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateCustomFieldsRequest; /** - * Creates a plain object from a VideoPositionTargeting message. Also converts values to other types if specified. - * @param message VideoPositionTargeting + * Creates a plain object from a BatchCreateCustomFieldsRequest message. Also converts values to other types if specified. + * @param message BatchCreateCustomFieldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.VideoPositionTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoPositionTargeting to JSON. + * Converts this BatchCreateCustomFieldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VideoPositionTargeting + * Gets the default type url for BatchCreateCustomFieldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a VideoPosition. */ - interface IVideoPosition { - - /** VideoPosition midrollIndex */ - midrollIndex?: (number|Long|string|null); - - /** VideoPosition reverseMidrollIndex */ - reverseMidrollIndex?: (number|Long|string|null); - - /** VideoPosition podPosition */ - podPosition?: (number|Long|string|null); - - /** VideoPosition positionType */ - positionType?: (google.ads.admanager.v1.VideoPositionEnum.VideoPosition|keyof typeof google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null); + /** Properties of a BatchCreateCustomFieldsResponse. */ + interface IBatchCreateCustomFieldsResponse { - /** VideoPosition bumperType */ - bumperType?: (google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|keyof typeof google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null); + /** BatchCreateCustomFieldsResponse customFields */ + customFields?: (google.ads.admanager.v1.ICustomField[]|null); } - /** Represents a VideoPosition. */ - class VideoPosition implements IVideoPosition { + /** Represents a BatchCreateCustomFieldsResponse. */ + class BatchCreateCustomFieldsResponse implements IBatchCreateCustomFieldsResponse { /** - * Constructs a new VideoPosition. + * Constructs a new BatchCreateCustomFieldsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IVideoPosition); - - /** VideoPosition midrollIndex. */ - public midrollIndex?: (number|Long|string|null); - - /** VideoPosition reverseMidrollIndex. */ - public reverseMidrollIndex?: (number|Long|string|null); - - /** VideoPosition podPosition. */ - public podPosition?: (number|Long|string|null); - - /** VideoPosition positionType. */ - public positionType?: (google.ads.admanager.v1.VideoPositionEnum.VideoPosition|keyof typeof google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null); + constructor(properties?: google.ads.admanager.v1.IBatchCreateCustomFieldsResponse); - /** VideoPosition bumperType. */ - public bumperType?: (google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|keyof typeof google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null); + /** BatchCreateCustomFieldsResponse customFields. */ + public customFields: google.ads.admanager.v1.ICustomField[]; /** - * Creates a new VideoPosition instance using the specified properties. + * Creates a new BatchCreateCustomFieldsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns VideoPosition instance + * @returns BatchCreateCustomFieldsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IVideoPosition): google.ads.admanager.v1.VideoPosition; + public static create(properties?: google.ads.admanager.v1.IBatchCreateCustomFieldsResponse): google.ads.admanager.v1.BatchCreateCustomFieldsResponse; /** - * Encodes the specified VideoPosition message. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. - * @param message VideoPosition message or plain object to encode + * Encodes the specified BatchCreateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsResponse.verify|verify} messages. + * @param message BatchCreateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IVideoPosition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoPosition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. - * @param message VideoPosition message or plain object to encode + * Encodes the specified BatchCreateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsResponse.verify|verify} messages. + * @param message BatchCreateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IVideoPosition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoPosition message from the specified reader or buffer. + * Decodes a BatchCreateCustomFieldsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoPosition + * @returns BatchCreateCustomFieldsResponse * @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.ads.admanager.v1.VideoPosition; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateCustomFieldsResponse; /** - * Decodes a VideoPosition message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoPosition + * @returns BatchCreateCustomFieldsResponse * @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.ads.admanager.v1.VideoPosition; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateCustomFieldsResponse; /** - * Verifies a VideoPosition message. + * Verifies a BatchCreateCustomFieldsResponse 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 VideoPosition message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoPosition + * @returns BatchCreateCustomFieldsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPosition; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateCustomFieldsResponse; /** - * Creates a plain object from a VideoPosition message. Also converts values to other types if specified. - * @param message VideoPosition + * Creates a plain object from a BatchCreateCustomFieldsResponse message. Also converts values to other types if specified. + * @param message BatchCreateCustomFieldsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.VideoPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoPosition to JSON. + * Converts this BatchCreateCustomFieldsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VideoPosition + * Gets the default type url for BatchCreateCustomFieldsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DataSegmentTargeting. */ - interface IDataSegmentTargeting { + /** Properties of an UpdateCustomFieldRequest. */ + interface IUpdateCustomFieldRequest { - /** DataSegmentTargeting hasDataSegmentTargeting */ - hasDataSegmentTargeting?: (boolean|null); + /** UpdateCustomFieldRequest customField */ + customField?: (google.ads.admanager.v1.ICustomField|null); + + /** UpdateCustomFieldRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a DataSegmentTargeting. */ - class DataSegmentTargeting implements IDataSegmentTargeting { + /** Represents an UpdateCustomFieldRequest. */ + class UpdateCustomFieldRequest implements IUpdateCustomFieldRequest { /** - * Constructs a new DataSegmentTargeting. + * Constructs a new UpdateCustomFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IDataSegmentTargeting); + constructor(properties?: google.ads.admanager.v1.IUpdateCustomFieldRequest); - /** DataSegmentTargeting hasDataSegmentTargeting. */ - public hasDataSegmentTargeting: boolean; + /** UpdateCustomFieldRequest customField. */ + public customField?: (google.ads.admanager.v1.ICustomField|null); + + /** UpdateCustomFieldRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new DataSegmentTargeting instance using the specified properties. + * Creates a new UpdateCustomFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DataSegmentTargeting instance + * @returns UpdateCustomFieldRequest instance */ - public static create(properties?: google.ads.admanager.v1.IDataSegmentTargeting): google.ads.admanager.v1.DataSegmentTargeting; + public static create(properties?: google.ads.admanager.v1.IUpdateCustomFieldRequest): google.ads.admanager.v1.UpdateCustomFieldRequest; /** - * Encodes the specified DataSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. - * @param message DataSegmentTargeting message or plain object to encode + * Encodes the specified UpdateCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateCustomFieldRequest.verify|verify} messages. + * @param message UpdateCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IDataSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IUpdateCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. - * @param message DataSegmentTargeting message or plain object to encode + * Encodes the specified UpdateCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateCustomFieldRequest.verify|verify} messages. + * @param message UpdateCustomFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IDataSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateCustomFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataSegmentTargeting message from the specified reader or buffer. + * Decodes an UpdateCustomFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataSegmentTargeting + * @returns UpdateCustomFieldRequest * @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.ads.admanager.v1.DataSegmentTargeting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.UpdateCustomFieldRequest; /** - * Decodes a DataSegmentTargeting message from the specified reader or buffer, length delimited. + * Decodes an UpdateCustomFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataSegmentTargeting + * @returns UpdateCustomFieldRequest * @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.ads.admanager.v1.DataSegmentTargeting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.UpdateCustomFieldRequest; /** - * Verifies a DataSegmentTargeting message. + * Verifies an UpdateCustomFieldRequest 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 DataSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataSegmentTargeting + * @returns UpdateCustomFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DataSegmentTargeting; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateCustomFieldRequest; /** - * Creates a plain object from a DataSegmentTargeting message. Also converts values to other types if specified. - * @param message DataSegmentTargeting + * Creates a plain object from an UpdateCustomFieldRequest message. Also converts values to other types if specified. + * @param message UpdateCustomFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.DataSegmentTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.UpdateCustomFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataSegmentTargeting to JSON. + * Converts this UpdateCustomFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataSegmentTargeting + * Gets the default type url for UpdateCustomFieldRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RequestPlatformEnum. */ - interface IRequestPlatformEnum { + /** Properties of a BatchUpdateCustomFieldsRequest. */ + interface IBatchUpdateCustomFieldsRequest { + + /** BatchUpdateCustomFieldsRequest parent */ + parent?: (string|null); + + /** BatchUpdateCustomFieldsRequest requests */ + requests?: (google.ads.admanager.v1.IUpdateCustomFieldRequest[]|null); } - /** Represents a RequestPlatformEnum. */ - class RequestPlatformEnum implements IRequestPlatformEnum { + /** Represents a BatchUpdateCustomFieldsRequest. */ + class BatchUpdateCustomFieldsRequest implements IBatchUpdateCustomFieldsRequest { /** - * Constructs a new RequestPlatformEnum. + * Constructs a new BatchUpdateCustomFieldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRequestPlatformEnum); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest); + + /** BatchUpdateCustomFieldsRequest parent. */ + public parent: string; + + /** BatchUpdateCustomFieldsRequest requests. */ + public requests: google.ads.admanager.v1.IUpdateCustomFieldRequest[]; /** - * Creates a new RequestPlatformEnum instance using the specified properties. + * Creates a new BatchUpdateCustomFieldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RequestPlatformEnum instance + * @returns BatchUpdateCustomFieldsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IRequestPlatformEnum): google.ads.admanager.v1.RequestPlatformEnum; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest): google.ads.admanager.v1.BatchUpdateCustomFieldsRequest; /** - * Encodes the specified RequestPlatformEnum message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. - * @param message RequestPlatformEnum message or plain object to encode + * Encodes the specified BatchUpdateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.verify|verify} messages. + * @param message BatchUpdateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRequestPlatformEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestPlatformEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. - * @param message RequestPlatformEnum message or plain object to encode + * Encodes the specified BatchUpdateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.verify|verify} messages. + * @param message BatchUpdateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRequestPlatformEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestPlatformEnum message from the specified reader or buffer. + * Decodes a BatchUpdateCustomFieldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RequestPlatformEnum + * @returns BatchUpdateCustomFieldsRequest * @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.ads.admanager.v1.RequestPlatformEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateCustomFieldsRequest; /** - * Decodes a RequestPlatformEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestPlatformEnum + * @returns BatchUpdateCustomFieldsRequest * @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.ads.admanager.v1.RequestPlatformEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateCustomFieldsRequest; /** - * Verifies a RequestPlatformEnum message. + * Verifies a BatchUpdateCustomFieldsRequest 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 RequestPlatformEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RequestPlatformEnum + * @returns BatchUpdateCustomFieldsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RequestPlatformEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateCustomFieldsRequest; /** - * Creates a plain object from a RequestPlatformEnum message. Also converts values to other types if specified. - * @param message RequestPlatformEnum + * Creates a plain object from a BatchUpdateCustomFieldsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateCustomFieldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.RequestPlatformEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RequestPlatformEnum to JSON. + * Converts this BatchUpdateCustomFieldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RequestPlatformEnum + * Gets the default type url for BatchUpdateCustomFieldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace RequestPlatformEnum { - - /** RequestPlatform enum. */ - enum RequestPlatform { - REQUEST_PLATFORM_UNSPECIFIED = 0, - BROWSER = 1, - MOBILE_APP = 2, - VIDEO_PLAYER = 3 - } - } + /** Properties of a BatchUpdateCustomFieldsResponse. */ + interface IBatchUpdateCustomFieldsResponse { - /** Properties of a TargetedVideoBumperTypeEnum. */ - interface ITargetedVideoBumperTypeEnum { + /** BatchUpdateCustomFieldsResponse customFields */ + customFields?: (google.ads.admanager.v1.ICustomField[]|null); } - /** Represents a TargetedVideoBumperTypeEnum. */ - class TargetedVideoBumperTypeEnum implements ITargetedVideoBumperTypeEnum { + /** Represents a BatchUpdateCustomFieldsResponse. */ + class BatchUpdateCustomFieldsResponse implements IBatchUpdateCustomFieldsResponse { /** - * Constructs a new TargetedVideoBumperTypeEnum. + * Constructs a new BatchUpdateCustomFieldsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse); + + /** BatchUpdateCustomFieldsResponse customFields. */ + public customFields: google.ads.admanager.v1.ICustomField[]; /** - * Creates a new TargetedVideoBumperTypeEnum instance using the specified properties. + * Creates a new BatchUpdateCustomFieldsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TargetedVideoBumperTypeEnum instance + * @returns BatchUpdateCustomFieldsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum): google.ads.admanager.v1.TargetedVideoBumperTypeEnum; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse): google.ads.admanager.v1.BatchUpdateCustomFieldsResponse; /** - * Encodes the specified TargetedVideoBumperTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. - * @param message TargetedVideoBumperTypeEnum message or plain object to encode + * Encodes the specified BatchUpdateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.verify|verify} messages. + * @param message BatchUpdateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TargetedVideoBumperTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. - * @param message TargetedVideoBumperTypeEnum message or plain object to encode + * Encodes the specified BatchUpdateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.verify|verify} messages. + * @param message BatchUpdateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer. + * Decodes a BatchUpdateCustomFieldsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TargetedVideoBumperTypeEnum + * @returns BatchUpdateCustomFieldsResponse * @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.ads.admanager.v1.TargetedVideoBumperTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateCustomFieldsResponse; /** - * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TargetedVideoBumperTypeEnum + * @returns BatchUpdateCustomFieldsResponse * @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.ads.admanager.v1.TargetedVideoBumperTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateCustomFieldsResponse; /** - * Verifies a TargetedVideoBumperTypeEnum message. + * Verifies a BatchUpdateCustomFieldsResponse 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 TargetedVideoBumperTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TargetedVideoBumperTypeEnum + * @returns BatchUpdateCustomFieldsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TargetedVideoBumperTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateCustomFieldsResponse; /** - * Creates a plain object from a TargetedVideoBumperTypeEnum message. Also converts values to other types if specified. - * @param message TargetedVideoBumperTypeEnum + * Creates a plain object from a BatchUpdateCustomFieldsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateCustomFieldsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TargetedVideoBumperTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TargetedVideoBumperTypeEnum to JSON. + * Converts this BatchUpdateCustomFieldsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TargetedVideoBumperTypeEnum + * Gets the default type url for BatchUpdateCustomFieldsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TargetedVideoBumperTypeEnum { + /** Properties of a BatchActivateCustomFieldsRequest. */ + interface IBatchActivateCustomFieldsRequest { - /** TargetedVideoBumperType enum. */ - enum TargetedVideoBumperType { - TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED = 0, - AFTER = 1, - BEFORE = 2 - } - } + /** BatchActivateCustomFieldsRequest parent */ + parent?: (string|null); - /** Properties of a VideoPositionEnum. */ - interface IVideoPositionEnum { + /** BatchActivateCustomFieldsRequest names */ + names?: (string[]|null); } - /** Represents a VideoPositionEnum. */ - class VideoPositionEnum implements IVideoPositionEnum { + /** Represents a BatchActivateCustomFieldsRequest. */ + class BatchActivateCustomFieldsRequest implements IBatchActivateCustomFieldsRequest { /** - * Constructs a new VideoPositionEnum. + * Constructs a new BatchActivateCustomFieldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IVideoPositionEnum); + constructor(properties?: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest); + + /** BatchActivateCustomFieldsRequest parent. */ + public parent: string; + + /** BatchActivateCustomFieldsRequest names. */ + public names: string[]; /** - * Creates a new VideoPositionEnum instance using the specified properties. + * Creates a new BatchActivateCustomFieldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VideoPositionEnum instance + * @returns BatchActivateCustomFieldsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IVideoPositionEnum): google.ads.admanager.v1.VideoPositionEnum; + public static create(properties?: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest): google.ads.admanager.v1.BatchActivateCustomFieldsRequest; /** - * Encodes the specified VideoPositionEnum message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. - * @param message VideoPositionEnum message or plain object to encode + * Encodes the specified BatchActivateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsRequest.verify|verify} messages. + * @param message BatchActivateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IVideoPositionEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoPositionEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. - * @param message VideoPositionEnum message or plain object to encode + * Encodes the specified BatchActivateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsRequest.verify|verify} messages. + * @param message BatchActivateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IVideoPositionEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoPositionEnum message from the specified reader or buffer. + * Decodes a BatchActivateCustomFieldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoPositionEnum + * @returns BatchActivateCustomFieldsRequest * @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.ads.admanager.v1.VideoPositionEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchActivateCustomFieldsRequest; /** - * Decodes a VideoPositionEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoPositionEnum + * @returns BatchActivateCustomFieldsRequest * @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.ads.admanager.v1.VideoPositionEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchActivateCustomFieldsRequest; /** - * Verifies a VideoPositionEnum message. + * Verifies a BatchActivateCustomFieldsRequest 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 VideoPositionEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoPositionEnum + * @returns BatchActivateCustomFieldsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPositionEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivateCustomFieldsRequest; /** - * Creates a plain object from a VideoPositionEnum message. Also converts values to other types if specified. - * @param message VideoPositionEnum + * Creates a plain object from a BatchActivateCustomFieldsRequest message. Also converts values to other types if specified. + * @param message BatchActivateCustomFieldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.VideoPositionEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchActivateCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoPositionEnum to JSON. + * Converts this BatchActivateCustomFieldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VideoPositionEnum + * Gets the default type url for BatchActivateCustomFieldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace VideoPositionEnum { - - /** VideoPosition enum. */ - enum VideoPosition { - VIDEO_POSITION_UNSPECIFIED = 0, - ALL = 1, - MIDROLL = 2, - POSTROLL = 3, - PREROLL = 4 - } + /** Properties of a BatchActivateCustomFieldsResponse. */ + interface IBatchActivateCustomFieldsResponse { } - /** Represents a PrivateAuctionDealService */ - class PrivateAuctionDealService extends $protobuf.rpc.Service { - - /** - * Constructs a new PrivateAuctionDealService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new PrivateAuctionDealService 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): PrivateAuctionDealService; - - /** - * Calls GetPrivateAuctionDeal. - * @param request GetPrivateAuctionDealRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal - */ - public getPrivateAuctionDeal(request: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDealCallback): void; + /** Represents a BatchActivateCustomFieldsResponse. */ + class BatchActivateCustomFieldsResponse implements IBatchActivateCustomFieldsResponse { /** - * Calls GetPrivateAuctionDeal. - * @param request GetPrivateAuctionDealRequest message or plain object - * @returns Promise + * Constructs a new BatchActivateCustomFieldsResponse. + * @param [properties] Properties to set */ - public getPrivateAuctionDeal(request: google.ads.admanager.v1.IGetPrivateAuctionDealRequest): Promise; + constructor(properties?: google.ads.admanager.v1.IBatchActivateCustomFieldsResponse); /** - * Calls ListPrivateAuctionDeals. - * @param request ListPrivateAuctionDealsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPrivateAuctionDealsResponse + * Creates a new BatchActivateCustomFieldsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchActivateCustomFieldsResponse instance */ - public listPrivateAuctionDeals(request: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDealsCallback): void; + public static create(properties?: google.ads.admanager.v1.IBatchActivateCustomFieldsResponse): google.ads.admanager.v1.BatchActivateCustomFieldsResponse; /** - * Calls ListPrivateAuctionDeals. - * @param request ListPrivateAuctionDealsRequest message or plain object - * @returns Promise + * Encodes the specified BatchActivateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsResponse.verify|verify} messages. + * @param message BatchActivateCustomFieldsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPrivateAuctionDeals(request: google.ads.admanager.v1.IListPrivateAuctionDealsRequest): Promise; + public static encode(message: google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreatePrivateAuctionDeal. - * @param request CreatePrivateAuctionDealRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal + * Encodes the specified BatchActivateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsResponse.verify|verify} messages. + * @param message BatchActivateCustomFieldsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createPrivateAuctionDeal(request: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDealCallback): void; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreatePrivateAuctionDeal. - * @param request CreatePrivateAuctionDealRequest message or plain object - * @returns Promise + * Decodes a BatchActivateCustomFieldsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchActivateCustomFieldsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPrivateAuctionDeal(request: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchActivateCustomFieldsResponse; /** - * Calls UpdatePrivateAuctionDeal. - * @param request UpdatePrivateAuctionDealRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal + * Decodes a BatchActivateCustomFieldsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchActivateCustomFieldsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updatePrivateAuctionDeal(request: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDealCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchActivateCustomFieldsResponse; /** - * Calls UpdatePrivateAuctionDeal. - * @param request UpdatePrivateAuctionDealRequest message or plain object - * @returns Promise + * Verifies a BatchActivateCustomFieldsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updatePrivateAuctionDeal(request: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest): Promise; - } - - namespace PrivateAuctionDealService { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|getPrivateAuctionDeal}. - * @param error Error, if any - * @param [response] PrivateAuctionDeal + * Creates a BatchActivateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchActivateCustomFieldsResponse */ - type GetPrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivateCustomFieldsResponse; /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|listPrivateAuctionDeals}. - * @param error Error, if any - * @param [response] ListPrivateAuctionDealsResponse + * Creates a plain object from a BatchActivateCustomFieldsResponse message. Also converts values to other types if specified. + * @param message BatchActivateCustomFieldsResponse + * @param [options] Conversion options + * @returns Plain object */ - type ListPrivateAuctionDealsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPrivateAuctionDealsResponse) => void; + public static toObject(message: google.ads.admanager.v1.BatchActivateCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|createPrivateAuctionDeal}. - * @param error Error, if any - * @param [response] PrivateAuctionDeal + * Converts this BatchActivateCustomFieldsResponse to JSON. + * @returns JSON object */ - type CreatePrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|updatePrivateAuctionDeal}. - * @param error Error, if any - * @param [response] PrivateAuctionDeal + * Gets the default type url for BatchActivateCustomFieldsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type UpdatePrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPrivateAuctionDealRequest. */ - interface IGetPrivateAuctionDealRequest { + /** Properties of a BatchDeactivateCustomFieldsRequest. */ + interface IBatchDeactivateCustomFieldsRequest { - /** GetPrivateAuctionDealRequest name */ - name?: (string|null); + /** BatchDeactivateCustomFieldsRequest parent */ + parent?: (string|null); + + /** BatchDeactivateCustomFieldsRequest names */ + names?: (string[]|null); } - /** Represents a GetPrivateAuctionDealRequest. */ - class GetPrivateAuctionDealRequest implements IGetPrivateAuctionDealRequest { + /** Represents a BatchDeactivateCustomFieldsRequest. */ + class BatchDeactivateCustomFieldsRequest implements IBatchDeactivateCustomFieldsRequest { /** - * Constructs a new GetPrivateAuctionDealRequest. + * Constructs a new BatchDeactivateCustomFieldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetPrivateAuctionDealRequest); + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest); - /** GetPrivateAuctionDealRequest name. */ - public name: string; + /** BatchDeactivateCustomFieldsRequest parent. */ + public parent: string; + + /** BatchDeactivateCustomFieldsRequest names. */ + public names: string[]; /** - * Creates a new GetPrivateAuctionDealRequest instance using the specified properties. + * Creates a new BatchDeactivateCustomFieldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPrivateAuctionDealRequest instance + * @returns BatchDeactivateCustomFieldsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetPrivateAuctionDealRequest): google.ads.admanager.v1.GetPrivateAuctionDealRequest; + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest): google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest; /** - * Encodes the specified GetPrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. - * @param message GetPrivateAuctionDealRequest message or plain object to encode + * Encodes the specified BatchDeactivateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest.verify|verify} messages. + * @param message BatchDeactivateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. - * @param message GetPrivateAuctionDealRequest message or plain object to encode + * Encodes the specified BatchDeactivateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest.verify|verify} messages. + * @param message BatchDeactivateCustomFieldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a BatchDeactivateCustomFieldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPrivateAuctionDealRequest + * @returns BatchDeactivateCustomFieldsRequest * @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.ads.admanager.v1.GetPrivateAuctionDealRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest; /** - * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPrivateAuctionDealRequest + * @returns BatchDeactivateCustomFieldsRequest * @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.ads.admanager.v1.GetPrivateAuctionDealRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest; /** - * Verifies a GetPrivateAuctionDealRequest message. + * Verifies a BatchDeactivateCustomFieldsRequest 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 GetPrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPrivateAuctionDealRequest + * @returns BatchDeactivateCustomFieldsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPrivateAuctionDealRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest; /** - * Creates a plain object from a GetPrivateAuctionDealRequest message. Also converts values to other types if specified. - * @param message GetPrivateAuctionDealRequest + * Creates a plain object from a BatchDeactivateCustomFieldsRequest message. Also converts values to other types if specified. + * @param message BatchDeactivateCustomFieldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetPrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPrivateAuctionDealRequest to JSON. + * Converts this BatchDeactivateCustomFieldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPrivateAuctionDealRequest + * Gets the default type url for BatchDeactivateCustomFieldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPrivateAuctionDealsRequest. */ - interface IListPrivateAuctionDealsRequest { - - /** ListPrivateAuctionDealsRequest parent */ - parent?: (string|null); - - /** ListPrivateAuctionDealsRequest pageSize */ - pageSize?: (number|null); - - /** ListPrivateAuctionDealsRequest pageToken */ - pageToken?: (string|null); - - /** ListPrivateAuctionDealsRequest filter */ - filter?: (string|null); - - /** ListPrivateAuctionDealsRequest orderBy */ - orderBy?: (string|null); - - /** ListPrivateAuctionDealsRequest skip */ - skip?: (number|null); + /** Properties of a BatchDeactivateCustomFieldsResponse. */ + interface IBatchDeactivateCustomFieldsResponse { } - /** Represents a ListPrivateAuctionDealsRequest. */ - class ListPrivateAuctionDealsRequest implements IListPrivateAuctionDealsRequest { + /** Represents a BatchDeactivateCustomFieldsResponse. */ + class BatchDeactivateCustomFieldsResponse implements IBatchDeactivateCustomFieldsResponse { /** - * Constructs a new ListPrivateAuctionDealsRequest. + * Constructs a new BatchDeactivateCustomFieldsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsRequest); - - /** ListPrivateAuctionDealsRequest parent. */ - public parent: string; - - /** ListPrivateAuctionDealsRequest pageSize. */ - public pageSize: number; - - /** ListPrivateAuctionDealsRequest pageToken. */ - public pageToken: string; - - /** ListPrivateAuctionDealsRequest filter. */ - public filter: string; - - /** ListPrivateAuctionDealsRequest orderBy. */ - public orderBy: string; - - /** ListPrivateAuctionDealsRequest skip. */ - public skip: number; + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse); /** - * Creates a new ListPrivateAuctionDealsRequest instance using the specified properties. + * Creates a new BatchDeactivateCustomFieldsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListPrivateAuctionDealsRequest instance + * @returns BatchDeactivateCustomFieldsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsRequest): google.ads.admanager.v1.ListPrivateAuctionDealsRequest; + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse): google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse; /** - * Encodes the specified ListPrivateAuctionDealsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. - * @param message ListPrivateAuctionDealsRequest message or plain object to encode + * Encodes the specified BatchDeactivateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse.verify|verify} messages. + * @param message BatchDeactivateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPrivateAuctionDealsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. - * @param message ListPrivateAuctionDealsRequest message or plain object to encode + * Encodes the specified BatchDeactivateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse.verify|verify} messages. + * @param message BatchDeactivateCustomFieldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer. + * Decodes a BatchDeactivateCustomFieldsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPrivateAuctionDealsRequest + * @returns BatchDeactivateCustomFieldsResponse * @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.ads.admanager.v1.ListPrivateAuctionDealsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse; /** - * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPrivateAuctionDealsRequest + * @returns BatchDeactivateCustomFieldsResponse * @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.ads.admanager.v1.ListPrivateAuctionDealsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse; /** - * Verifies a ListPrivateAuctionDealsRequest message. + * Verifies a BatchDeactivateCustomFieldsResponse 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 ListPrivateAuctionDealsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPrivateAuctionDealsRequest + * @returns BatchDeactivateCustomFieldsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionDealsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse; /** - * Creates a plain object from a ListPrivateAuctionDealsRequest message. Also converts values to other types if specified. - * @param message ListPrivateAuctionDealsRequest + * Creates a plain object from a BatchDeactivateCustomFieldsResponse message. Also converts values to other types if specified. + * @param message BatchDeactivateCustomFieldsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionDealsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPrivateAuctionDealsRequest to JSON. + * Converts this BatchDeactivateCustomFieldsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPrivateAuctionDealsRequest + * Gets the default type url for BatchDeactivateCustomFieldsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPrivateAuctionDealsResponse. */ - interface IListPrivateAuctionDealsResponse { - - /** ListPrivateAuctionDealsResponse privateAuctionDeals */ - privateAuctionDeals?: (google.ads.admanager.v1.IPrivateAuctionDeal[]|null); + /** Properties of a CustomFieldValue. */ + interface ICustomFieldValue { - /** ListPrivateAuctionDealsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CustomFieldValue customField */ + customField?: (string|null); - /** ListPrivateAuctionDealsResponse totalSize */ - totalSize?: (number|null); + /** CustomFieldValue value */ + value?: (google.ads.admanager.v1.CustomFieldValue.IValue|null); } - /** Represents a ListPrivateAuctionDealsResponse. */ - class ListPrivateAuctionDealsResponse implements IListPrivateAuctionDealsResponse { + /** Represents a CustomFieldValue. */ + class CustomFieldValue implements ICustomFieldValue { /** - * Constructs a new ListPrivateAuctionDealsResponse. + * Constructs a new CustomFieldValue. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsResponse); - - /** ListPrivateAuctionDealsResponse privateAuctionDeals. */ - public privateAuctionDeals: google.ads.admanager.v1.IPrivateAuctionDeal[]; + constructor(properties?: google.ads.admanager.v1.ICustomFieldValue); - /** ListPrivateAuctionDealsResponse nextPageToken. */ - public nextPageToken: string; + /** CustomFieldValue customField. */ + public customField: string; - /** ListPrivateAuctionDealsResponse totalSize. */ - public totalSize: number; + /** CustomFieldValue value. */ + public value?: (google.ads.admanager.v1.CustomFieldValue.IValue|null); /** - * Creates a new ListPrivateAuctionDealsResponse instance using the specified properties. + * Creates a new CustomFieldValue instance using the specified properties. * @param [properties] Properties to set - * @returns ListPrivateAuctionDealsResponse instance + * @returns CustomFieldValue instance */ - public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsResponse): google.ads.admanager.v1.ListPrivateAuctionDealsResponse; + public static create(properties?: google.ads.admanager.v1.ICustomFieldValue): google.ads.admanager.v1.CustomFieldValue; /** - * Encodes the specified ListPrivateAuctionDealsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. - * @param message ListPrivateAuctionDealsResponse message or plain object to encode + * Encodes the specified CustomFieldValue message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. + * @param message CustomFieldValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListPrivateAuctionDealsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomFieldValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPrivateAuctionDealsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. - * @param message ListPrivateAuctionDealsResponse message or plain object to encode + * Encodes the specified CustomFieldValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. + * @param message CustomFieldValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionDealsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomFieldValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer. + * Decodes a CustomFieldValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPrivateAuctionDealsResponse + * @returns CustomFieldValue * @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.ads.admanager.v1.ListPrivateAuctionDealsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomFieldValue; /** - * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPrivateAuctionDealsResponse + * @returns CustomFieldValue * @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.ads.admanager.v1.ListPrivateAuctionDealsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomFieldValue; /** - * Verifies a ListPrivateAuctionDealsResponse message. + * Verifies a CustomFieldValue 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 ListPrivateAuctionDealsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPrivateAuctionDealsResponse + * @returns CustomFieldValue */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionDealsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldValue; /** - * Creates a plain object from a ListPrivateAuctionDealsResponse message. Also converts values to other types if specified. - * @param message ListPrivateAuctionDealsResponse + * Creates a plain object from a CustomFieldValue message. Also converts values to other types if specified. + * @param message CustomFieldValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionDealsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomFieldValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPrivateAuctionDealsResponse to JSON. + * Converts this CustomFieldValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPrivateAuctionDealsResponse + * Gets the default type url for CustomFieldValue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePrivateAuctionDealRequest. */ - interface ICreatePrivateAuctionDealRequest { + namespace CustomFieldValue { - /** CreatePrivateAuctionDealRequest parent */ - parent?: (string|null); + /** Properties of a Value. */ + interface IValue { - /** CreatePrivateAuctionDealRequest privateAuctionDeal */ - privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); - } + /** Value dropdownValue */ + dropdownValue?: (number|Long|string|null); - /** Represents a CreatePrivateAuctionDealRequest. */ - class CreatePrivateAuctionDealRequest implements ICreatePrivateAuctionDealRequest { + /** Value stringValue */ + stringValue?: (string|null); - /** - * Constructs a new CreatePrivateAuctionDealRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest); + /** Value numberValue */ + numberValue?: (number|null); - /** CreatePrivateAuctionDealRequest parent. */ - public parent: string; + /** Value toggleValue */ + toggleValue?: (boolean|null); + } - /** CreatePrivateAuctionDealRequest privateAuctionDeal. */ - public privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.CustomFieldValue.IValue); + + /** Value dropdownValue. */ + public dropdownValue?: (number|Long|string|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value toggleValue. */ + public toggleValue?: (boolean|null); + + /** Value value. */ + public value?: ("dropdownValue"|"stringValue"|"numberValue"|"toggleValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.ads.admanager.v1.CustomFieldValue.IValue): google.ads.admanager.v1.CustomFieldValue.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.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.ads.admanager.v1.CustomFieldValue.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.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.ads.admanager.v1.CustomFieldValue.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ads.admanager.v1.CustomFieldValue.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ads.admanager.v1.CustomFieldValue.Value; + + /** + * 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 a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomFieldValue.Value; + + /** + * 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.ads.admanager.v1.CustomFieldValue.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 CustomTargetingKeyStatusEnum. */ + interface ICustomTargetingKeyStatusEnum { + } + + /** Represents a CustomTargetingKeyStatusEnum. */ + class CustomTargetingKeyStatusEnum implements ICustomTargetingKeyStatusEnum { /** - * Creates a new CreatePrivateAuctionDealRequest instance using the specified properties. + * Constructs a new CustomTargetingKeyStatusEnum. * @param [properties] Properties to set - * @returns CreatePrivateAuctionDealRequest instance */ - public static create(properties?: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest): google.ads.admanager.v1.CreatePrivateAuctionDealRequest; + constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum); /** - * Encodes the specified CreatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. - * @param message CreatePrivateAuctionDealRequest message or plain object to encode + * Creates a new CustomTargetingKeyStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetingKeyStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; + + /** + * Encodes the specified CustomTargetingKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. + * @param message CustomTargetingKeyStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. - * @param message CreatePrivateAuctionDealRequest message or plain object to encode + * Encodes the specified CustomTargetingKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. + * @param message CustomTargetingKeyStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePrivateAuctionDealRequest + * @returns CustomTargetingKeyStatusEnum * @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.ads.admanager.v1.CreatePrivateAuctionDealRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; /** - * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePrivateAuctionDealRequest + * @returns CustomTargetingKeyStatusEnum * @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.ads.admanager.v1.CreatePrivateAuctionDealRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; /** - * Verifies a CreatePrivateAuctionDealRequest message. + * Verifies a CustomTargetingKeyStatusEnum 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 CreatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKeyStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePrivateAuctionDealRequest + * @returns CustomTargetingKeyStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreatePrivateAuctionDealRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyStatusEnum; /** - * Creates a plain object from a CreatePrivateAuctionDealRequest message. Also converts values to other types if specified. - * @param message CreatePrivateAuctionDealRequest + * Creates a plain object from a CustomTargetingKeyStatusEnum message. Also converts values to other types if specified. + * @param message CustomTargetingKeyStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CreatePrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePrivateAuctionDealRequest to JSON. + * Converts this CustomTargetingKeyStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreatePrivateAuctionDealRequest + * Gets the default type url for CustomTargetingKeyStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdatePrivateAuctionDealRequest. */ - interface IUpdatePrivateAuctionDealRequest { + namespace CustomTargetingKeyStatusEnum { - /** UpdatePrivateAuctionDealRequest privateAuctionDeal */ - privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + /** CustomTargetingKeyStatus enum. */ + enum CustomTargetingKeyStatus { + CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } - /** UpdatePrivateAuctionDealRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a CustomTargetingKeyTypeEnum. */ + interface ICustomTargetingKeyTypeEnum { } - /** Represents an UpdatePrivateAuctionDealRequest. */ - class UpdatePrivateAuctionDealRequest implements IUpdatePrivateAuctionDealRequest { + /** Represents a CustomTargetingKeyTypeEnum. */ + class CustomTargetingKeyTypeEnum implements ICustomTargetingKeyTypeEnum { /** - * Constructs a new UpdatePrivateAuctionDealRequest. + * Constructs a new CustomTargetingKeyTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest); + constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum); - /** UpdatePrivateAuctionDealRequest privateAuctionDeal. */ - public privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + /** + * Creates a new CustomTargetingKeyTypeEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetingKeyTypeEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum): google.ads.admanager.v1.CustomTargetingKeyTypeEnum; - /** UpdatePrivateAuctionDealRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Encodes the specified CustomTargetingKeyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. + * @param message CustomTargetingKeyTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates a new UpdatePrivateAuctionDealRequest instance using the specified properties. + * Encodes the specified CustomTargetingKeyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. + * @param message CustomTargetingKeyTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomTargetingKeyTypeEnum + * @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.ads.admanager.v1.CustomTargetingKeyTypeEnum; + + /** + * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomTargetingKeyTypeEnum + * @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.ads.admanager.v1.CustomTargetingKeyTypeEnum; + + /** + * Verifies a CustomTargetingKeyTypeEnum 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 CustomTargetingKeyTypeEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomTargetingKeyTypeEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyTypeEnum; + + /** + * Creates a plain object from a CustomTargetingKeyTypeEnum message. Also converts values to other types if specified. + * @param message CustomTargetingKeyTypeEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomTargetingKeyTypeEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomTargetingKeyTypeEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomTargetingKeyTypeEnum { + + /** CustomTargetingKeyType enum. */ + enum CustomTargetingKeyType { + CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED = 0, + PREDEFINED = 1, + FREEFORM = 2 + } + } + + /** Properties of a CustomTargetingKeyReportableTypeEnum. */ + interface ICustomTargetingKeyReportableTypeEnum { + } + + /** Represents a CustomTargetingKeyReportableTypeEnum. */ + class CustomTargetingKeyReportableTypeEnum implements ICustomTargetingKeyReportableTypeEnum { + + /** + * Constructs a new CustomTargetingKeyReportableTypeEnum. * @param [properties] Properties to set - * @returns UpdatePrivateAuctionDealRequest instance */ - public static create(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest): google.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + constructor(properties?: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum); /** - * Encodes the specified UpdatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. - * @param message UpdatePrivateAuctionDealRequest message or plain object to encode + * Creates a new CustomTargetingKeyReportableTypeEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetingKeyReportableTypeEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; + + /** + * Encodes the specified CustomTargetingKeyReportableTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. + * @param message CustomTargetingKeyReportableTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. - * @param message UpdatePrivateAuctionDealRequest message or plain object to encode + * Encodes the specified CustomTargetingKeyReportableTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. + * @param message CustomTargetingKeyReportableTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdatePrivateAuctionDealRequest + * @returns CustomTargetingKeyReportableTypeEnum * @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.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; /** - * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePrivateAuctionDealRequest + * @returns CustomTargetingKeyReportableTypeEnum * @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.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; /** - * Verifies an UpdatePrivateAuctionDealRequest message. + * Verifies a CustomTargetingKeyReportableTypeEnum 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 UpdatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKeyReportableTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdatePrivateAuctionDealRequest + * @returns CustomTargetingKeyReportableTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum; /** - * Creates a plain object from an UpdatePrivateAuctionDealRequest message. Also converts values to other types if specified. - * @param message UpdatePrivateAuctionDealRequest + * Creates a plain object from a CustomTargetingKeyReportableTypeEnum message. Also converts values to other types if specified. + * @param message CustomTargetingKeyReportableTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.UpdatePrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdatePrivateAuctionDealRequest to JSON. + * Converts this CustomTargetingKeyReportableTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdatePrivateAuctionDealRequest + * Gets the default type url for CustomTargetingKeyReportableTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PrivateAuction. */ - interface IPrivateAuction { + namespace CustomTargetingKeyReportableTypeEnum { - /** PrivateAuction name */ - name?: (string|null); + /** CustomTargetingKeyReportableType enum. */ + enum CustomTargetingKeyReportableType { + CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED = 0, + OFF = 1, + ON = 2, + CUSTOM_DIMENSION = 3 + } + } - /** PrivateAuction privateAuctionId */ - privateAuctionId?: (number|Long|string|null); + /** Properties of a CustomTargetingKey. */ + interface ICustomTargetingKey { - /** PrivateAuction displayName */ - displayName?: (string|null); + /** CustomTargetingKey name */ + name?: (string|null); - /** PrivateAuction description */ - description?: (string|null); + /** CustomTargetingKey customTargetingKeyId */ + customTargetingKeyId?: (number|Long|string|null); - /** PrivateAuction sellerContactUsers */ - sellerContactUsers?: (string[]|null); + /** CustomTargetingKey adTagName */ + adTagName?: (string|null); - /** PrivateAuction archived */ - archived?: (boolean|null); + /** CustomTargetingKey displayName */ + displayName?: (string|null); - /** PrivateAuction createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CustomTargetingKey type */ + type?: (google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null); - /** PrivateAuction updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** CustomTargetingKey status */ + status?: (google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|keyof typeof google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null); + + /** CustomTargetingKey reportableType */ + reportableType?: (google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null); } - /** Represents a PrivateAuction. */ - class PrivateAuction implements IPrivateAuction { + /** Represents a CustomTargetingKey. */ + class CustomTargetingKey implements ICustomTargetingKey { /** - * Constructs a new PrivateAuction. + * Constructs a new CustomTargetingKey. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IPrivateAuction); + constructor(properties?: google.ads.admanager.v1.ICustomTargetingKey); - /** PrivateAuction name. */ + /** CustomTargetingKey name. */ public name: string; - /** PrivateAuction privateAuctionId. */ - public privateAuctionId?: (number|Long|string|null); - - /** PrivateAuction displayName. */ - public displayName?: (string|null); + /** CustomTargetingKey customTargetingKeyId. */ + public customTargetingKeyId?: (number|Long|string|null); - /** PrivateAuction description. */ - public description?: (string|null); + /** CustomTargetingKey adTagName. */ + public adTagName?: (string|null); - /** PrivateAuction sellerContactUsers. */ - public sellerContactUsers: string[]; + /** CustomTargetingKey displayName. */ + public displayName?: (string|null); - /** PrivateAuction archived. */ - public archived?: (boolean|null); + /** CustomTargetingKey type. */ + public type?: (google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null); - /** PrivateAuction createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** CustomTargetingKey status. */ + public status?: (google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|keyof typeof google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null); - /** PrivateAuction updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** CustomTargetingKey reportableType. */ + public reportableType?: (google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|keyof typeof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null); /** - * Creates a new PrivateAuction instance using the specified properties. + * Creates a new CustomTargetingKey instance using the specified properties. * @param [properties] Properties to set - * @returns PrivateAuction instance + * @returns CustomTargetingKey instance */ - public static create(properties?: google.ads.admanager.v1.IPrivateAuction): google.ads.admanager.v1.PrivateAuction; + public static create(properties?: google.ads.admanager.v1.ICustomTargetingKey): google.ads.admanager.v1.CustomTargetingKey; /** - * Encodes the specified PrivateAuction message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. - * @param message PrivateAuction message or plain object to encode + * Encodes the specified CustomTargetingKey message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. + * @param message CustomTargetingKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IPrivateAuction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PrivateAuction message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. - * @param message PrivateAuction message or plain object to encode + * Encodes the specified CustomTargetingKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. + * @param message CustomTargetingKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IPrivateAuction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PrivateAuction message from the specified reader or buffer. + * Decodes a CustomTargetingKey message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PrivateAuction + * @returns CustomTargetingKey * @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.ads.admanager.v1.PrivateAuction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingKey; /** - * Decodes a PrivateAuction message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKey message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PrivateAuction + * @returns CustomTargetingKey * @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.ads.admanager.v1.PrivateAuction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingKey; /** - * Verifies a PrivateAuction message. + * Verifies a CustomTargetingKey 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 PrivateAuction message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKey message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PrivateAuction + * @returns CustomTargetingKey */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuction; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingKey; /** - * Creates a plain object from a PrivateAuction message. Also converts values to other types if specified. - * @param message PrivateAuction + * Creates a plain object from a CustomTargetingKey message. Also converts values to other types if specified. + * @param message CustomTargetingKey * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.PrivateAuction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PrivateAuction to JSON. + * Converts this CustomTargetingKey to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PrivateAuction + * Gets the default type url for CustomTargetingKey * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a PrivateAuctionService */ - class PrivateAuctionService extends $protobuf.rpc.Service { + /** Represents a CustomTargetingKeyService */ + class CustomTargetingKeyService extends $protobuf.rpc.Service { /** - * Constructs a new PrivateAuctionService service. + * Constructs a new CustomTargetingKeyService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -16262,785 +16380,731 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new PrivateAuctionService service using the specified rpc implementation. + * Creates new CustomTargetingKeyService 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): PrivateAuctionService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CustomTargetingKeyService; /** - * Calls GetPrivateAuction. - * @param request GetPrivateAuctionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuction + * Calls GetCustomTargetingKey. + * @param request GetCustomTargetingKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomTargetingKey */ - public getPrivateAuction(request: google.ads.admanager.v1.IGetPrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuctionCallback): void; + public getCustomTargetingKey(request: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, callback: google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKeyCallback): void; /** - * Calls GetPrivateAuction. - * @param request GetPrivateAuctionRequest message or plain object + * Calls GetCustomTargetingKey. + * @param request GetCustomTargetingKeyRequest message or plain object * @returns Promise */ - public getPrivateAuction(request: google.ads.admanager.v1.IGetPrivateAuctionRequest): Promise; + public getCustomTargetingKey(request: google.ads.admanager.v1.IGetCustomTargetingKeyRequest): Promise; /** - * Calls ListPrivateAuctions. - * @param request ListPrivateAuctionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPrivateAuctionsResponse + * Calls ListCustomTargetingKeys. + * @param request ListCustomTargetingKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomTargetingKeysResponse */ - public listPrivateAuctions(request: google.ads.admanager.v1.IListPrivateAuctionsRequest, callback: google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctionsCallback): void; + public listCustomTargetingKeys(request: google.ads.admanager.v1.IListCustomTargetingKeysRequest, callback: google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeysCallback): void; /** - * Calls ListPrivateAuctions. - * @param request ListPrivateAuctionsRequest message or plain object + * Calls ListCustomTargetingKeys. + * @param request ListCustomTargetingKeysRequest message or plain object * @returns Promise */ - public listPrivateAuctions(request: google.ads.admanager.v1.IListPrivateAuctionsRequest): Promise; + public listCustomTargetingKeys(request: google.ads.admanager.v1.IListCustomTargetingKeysRequest): Promise; + } - /** - * Calls CreatePrivateAuction. - * @param request CreatePrivateAuctionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuction - */ - public createPrivateAuction(request: google.ads.admanager.v1.ICreatePrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuctionCallback): void; - - /** - * Calls CreatePrivateAuction. - * @param request CreatePrivateAuctionRequest message or plain object - * @returns Promise - */ - public createPrivateAuction(request: google.ads.admanager.v1.ICreatePrivateAuctionRequest): Promise; - - /** - * Calls UpdatePrivateAuction. - * @param request UpdatePrivateAuctionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PrivateAuction - */ - public updatePrivateAuction(request: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuctionCallback): void; - - /** - * Calls UpdatePrivateAuction. - * @param request UpdatePrivateAuctionRequest message or plain object - * @returns Promise - */ - public updatePrivateAuction(request: google.ads.admanager.v1.IUpdatePrivateAuctionRequest): Promise; - } - - namespace PrivateAuctionService { - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|getPrivateAuction}. - * @param error Error, if any - * @param [response] PrivateAuction - */ - type GetPrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|listPrivateAuctions}. - * @param error Error, if any - * @param [response] ListPrivateAuctionsResponse - */ - type ListPrivateAuctionsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPrivateAuctionsResponse) => void; + namespace CustomTargetingKeyService { /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|createPrivateAuction}. + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|getCustomTargetingKey}. * @param error Error, if any - * @param [response] PrivateAuction + * @param [response] CustomTargetingKey */ - type CreatePrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; + type GetCustomTargetingKeyCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomTargetingKey) => void; /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|updatePrivateAuction}. + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|listCustomTargetingKeys}. * @param error Error, if any - * @param [response] PrivateAuction + * @param [response] ListCustomTargetingKeysResponse */ - type UpdatePrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; + type ListCustomTargetingKeysCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomTargetingKeysResponse) => void; } - /** Properties of a GetPrivateAuctionRequest. */ - interface IGetPrivateAuctionRequest { + /** Properties of a GetCustomTargetingKeyRequest. */ + interface IGetCustomTargetingKeyRequest { - /** GetPrivateAuctionRequest name */ + /** GetCustomTargetingKeyRequest name */ name?: (string|null); } - /** Represents a GetPrivateAuctionRequest. */ - class GetPrivateAuctionRequest implements IGetPrivateAuctionRequest { + /** Represents a GetCustomTargetingKeyRequest. */ + class GetCustomTargetingKeyRequest implements IGetCustomTargetingKeyRequest { /** - * Constructs a new GetPrivateAuctionRequest. + * Constructs a new GetCustomTargetingKeyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetPrivateAuctionRequest); + constructor(properties?: google.ads.admanager.v1.IGetCustomTargetingKeyRequest); - /** GetPrivateAuctionRequest name. */ + /** GetCustomTargetingKeyRequest name. */ public name: string; /** - * Creates a new GetPrivateAuctionRequest instance using the specified properties. + * Creates a new GetCustomTargetingKeyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPrivateAuctionRequest instance + * @returns GetCustomTargetingKeyRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetPrivateAuctionRequest): google.ads.admanager.v1.GetPrivateAuctionRequest; + public static create(properties?: google.ads.admanager.v1.IGetCustomTargetingKeyRequest): google.ads.admanager.v1.GetCustomTargetingKeyRequest; /** - * Encodes the specified GetPrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. - * @param message GetPrivateAuctionRequest message or plain object to encode + * Encodes the specified GetCustomTargetingKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. + * @param message GetCustomTargetingKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetPrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. - * @param message GetPrivateAuctionRequest message or plain object to encode + * Encodes the specified GetCustomTargetingKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. + * @param message GetCustomTargetingKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetPrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomTargetingKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer. + * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPrivateAuctionRequest + * @returns GetCustomTargetingKeyRequest * @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.ads.admanager.v1.GetPrivateAuctionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCustomTargetingKeyRequest; /** - * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPrivateAuctionRequest + * @returns GetCustomTargetingKeyRequest * @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.ads.admanager.v1.GetPrivateAuctionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCustomTargetingKeyRequest; /** - * Verifies a GetPrivateAuctionRequest message. + * Verifies a GetCustomTargetingKeyRequest 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 GetPrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomTargetingKeyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPrivateAuctionRequest + * @returns GetCustomTargetingKeyRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPrivateAuctionRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomTargetingKeyRequest; /** - * Creates a plain object from a GetPrivateAuctionRequest message. Also converts values to other types if specified. - * @param message GetPrivateAuctionRequest + * Creates a plain object from a GetCustomTargetingKeyRequest message. Also converts values to other types if specified. + * @param message GetCustomTargetingKeyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetPrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCustomTargetingKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPrivateAuctionRequest to JSON. + * Converts this GetCustomTargetingKeyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPrivateAuctionRequest + * Gets the default type url for GetCustomTargetingKeyRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPrivateAuctionsRequest. */ - interface IListPrivateAuctionsRequest { + /** Properties of a ListCustomTargetingKeysRequest. */ + interface IListCustomTargetingKeysRequest { - /** ListPrivateAuctionsRequest parent */ + /** ListCustomTargetingKeysRequest parent */ parent?: (string|null); - /** ListPrivateAuctionsRequest pageSize */ + /** ListCustomTargetingKeysRequest pageSize */ pageSize?: (number|null); - /** ListPrivateAuctionsRequest pageToken */ + /** ListCustomTargetingKeysRequest pageToken */ pageToken?: (string|null); - /** ListPrivateAuctionsRequest filter */ + /** ListCustomTargetingKeysRequest filter */ filter?: (string|null); - /** ListPrivateAuctionsRequest orderBy */ + /** ListCustomTargetingKeysRequest orderBy */ orderBy?: (string|null); - /** ListPrivateAuctionsRequest skip */ + /** ListCustomTargetingKeysRequest skip */ skip?: (number|null); } - /** Represents a ListPrivateAuctionsRequest. */ - class ListPrivateAuctionsRequest implements IListPrivateAuctionsRequest { + /** Represents a ListCustomTargetingKeysRequest. */ + class ListCustomTargetingKeysRequest implements IListCustomTargetingKeysRequest { /** - * Constructs a new ListPrivateAuctionsRequest. + * Constructs a new ListCustomTargetingKeysRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionsRequest); + constructor(properties?: google.ads.admanager.v1.IListCustomTargetingKeysRequest); - /** ListPrivateAuctionsRequest parent. */ + /** ListCustomTargetingKeysRequest parent. */ public parent: string; - /** ListPrivateAuctionsRequest pageSize. */ + /** ListCustomTargetingKeysRequest pageSize. */ public pageSize: number; - /** ListPrivateAuctionsRequest pageToken. */ + /** ListCustomTargetingKeysRequest pageToken. */ public pageToken: string; - /** ListPrivateAuctionsRequest filter. */ + /** ListCustomTargetingKeysRequest filter. */ public filter: string; - /** ListPrivateAuctionsRequest orderBy. */ + /** ListCustomTargetingKeysRequest orderBy. */ public orderBy: string; - /** ListPrivateAuctionsRequest skip. */ + /** ListCustomTargetingKeysRequest skip. */ public skip: number; /** - * Creates a new ListPrivateAuctionsRequest instance using the specified properties. + * Creates a new ListCustomTargetingKeysRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPrivateAuctionsRequest instance + * @returns ListCustomTargetingKeysRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionsRequest): google.ads.admanager.v1.ListPrivateAuctionsRequest; + public static create(properties?: google.ads.admanager.v1.IListCustomTargetingKeysRequest): google.ads.admanager.v1.ListCustomTargetingKeysRequest; /** - * Encodes the specified ListPrivateAuctionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. - * @param message ListPrivateAuctionsRequest message or plain object to encode + * Encodes the specified ListCustomTargetingKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. + * @param message ListCustomTargetingKeysRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListPrivateAuctionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomTargetingKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPrivateAuctionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. - * @param message ListPrivateAuctionsRequest message or plain object to encode + * Encodes the specified ListCustomTargetingKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. + * @param message ListCustomTargetingKeysRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPrivateAuctionsRequest + * @returns ListCustomTargetingKeysRequest * @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.ads.admanager.v1.ListPrivateAuctionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomTargetingKeysRequest; /** - * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPrivateAuctionsRequest + * @returns ListCustomTargetingKeysRequest * @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.ads.admanager.v1.ListPrivateAuctionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomTargetingKeysRequest; /** - * Verifies a ListPrivateAuctionsRequest message. + * Verifies a ListCustomTargetingKeysRequest 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 ListPrivateAuctionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingKeysRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPrivateAuctionsRequest + * @returns ListCustomTargetingKeysRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingKeysRequest; /** - * Creates a plain object from a ListPrivateAuctionsRequest message. Also converts values to other types if specified. - * @param message ListPrivateAuctionsRequest + * Creates a plain object from a ListCustomTargetingKeysRequest message. Also converts values to other types if specified. + * @param message ListCustomTargetingKeysRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomTargetingKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPrivateAuctionsRequest to JSON. + * Converts this ListCustomTargetingKeysRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPrivateAuctionsRequest + * Gets the default type url for ListCustomTargetingKeysRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPrivateAuctionsResponse. */ - interface IListPrivateAuctionsResponse { + /** Properties of a ListCustomTargetingKeysResponse. */ + interface IListCustomTargetingKeysResponse { - /** ListPrivateAuctionsResponse privateAuctions */ - privateAuctions?: (google.ads.admanager.v1.IPrivateAuction[]|null); + /** ListCustomTargetingKeysResponse customTargetingKeys */ + customTargetingKeys?: (google.ads.admanager.v1.ICustomTargetingKey[]|null); - /** ListPrivateAuctionsResponse nextPageToken */ + /** ListCustomTargetingKeysResponse nextPageToken */ nextPageToken?: (string|null); - /** ListPrivateAuctionsResponse totalSize */ + /** ListCustomTargetingKeysResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListPrivateAuctionsResponse. */ - class ListPrivateAuctionsResponse implements IListPrivateAuctionsResponse { + /** Represents a ListCustomTargetingKeysResponse. */ + class ListCustomTargetingKeysResponse implements IListCustomTargetingKeysResponse { /** - * Constructs a new ListPrivateAuctionsResponse. + * Constructs a new ListCustomTargetingKeysResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionsResponse); + constructor(properties?: google.ads.admanager.v1.IListCustomTargetingKeysResponse); - /** ListPrivateAuctionsResponse privateAuctions. */ - public privateAuctions: google.ads.admanager.v1.IPrivateAuction[]; + /** ListCustomTargetingKeysResponse customTargetingKeys. */ + public customTargetingKeys: google.ads.admanager.v1.ICustomTargetingKey[]; - /** ListPrivateAuctionsResponse nextPageToken. */ + /** ListCustomTargetingKeysResponse nextPageToken. */ public nextPageToken: string; - /** ListPrivateAuctionsResponse totalSize. */ + /** ListCustomTargetingKeysResponse totalSize. */ public totalSize: number; /** - * Creates a new ListPrivateAuctionsResponse instance using the specified properties. + * Creates a new ListCustomTargetingKeysResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListPrivateAuctionsResponse instance + * @returns ListCustomTargetingKeysResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionsResponse): google.ads.admanager.v1.ListPrivateAuctionsResponse; + public static create(properties?: google.ads.admanager.v1.IListCustomTargetingKeysResponse): google.ads.admanager.v1.ListCustomTargetingKeysResponse; /** - * Encodes the specified ListPrivateAuctionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. - * @param message ListPrivateAuctionsResponse message or plain object to encode + * Encodes the specified ListCustomTargetingKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. + * @param message ListCustomTargetingKeysResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListPrivateAuctionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomTargetingKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPrivateAuctionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. - * @param message ListPrivateAuctionsResponse message or plain object to encode + * Encodes the specified ListCustomTargetingKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. + * @param message ListCustomTargetingKeysResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer. + * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPrivateAuctionsResponse + * @returns ListCustomTargetingKeysResponse * @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.ads.admanager.v1.ListPrivateAuctionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomTargetingKeysResponse; /** - * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPrivateAuctionsResponse + * @returns ListCustomTargetingKeysResponse * @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.ads.admanager.v1.ListPrivateAuctionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomTargetingKeysResponse; /** - * Verifies a ListPrivateAuctionsResponse message. + * Verifies a ListCustomTargetingKeysResponse 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 ListPrivateAuctionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingKeysResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPrivateAuctionsResponse + * @returns ListCustomTargetingKeysResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingKeysResponse; /** - * Creates a plain object from a ListPrivateAuctionsResponse message. Also converts values to other types if specified. - * @param message ListPrivateAuctionsResponse + * Creates a plain object from a ListCustomTargetingKeysResponse message. Also converts values to other types if specified. + * @param message ListCustomTargetingKeysResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomTargetingKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPrivateAuctionsResponse to JSON. + * Converts this ListCustomTargetingKeysResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPrivateAuctionsResponse + * Gets the default type url for ListCustomTargetingKeysResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePrivateAuctionRequest. */ - interface ICreatePrivateAuctionRequest { - - /** CreatePrivateAuctionRequest parent */ - parent?: (string|null); - - /** CreatePrivateAuctionRequest privateAuction */ - privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + /** Properties of a CustomTargetingValueStatusEnum. */ + interface ICustomTargetingValueStatusEnum { } - /** Represents a CreatePrivateAuctionRequest. */ - class CreatePrivateAuctionRequest implements ICreatePrivateAuctionRequest { + /** Represents a CustomTargetingValueStatusEnum. */ + class CustomTargetingValueStatusEnum implements ICustomTargetingValueStatusEnum { /** - * Constructs a new CreatePrivateAuctionRequest. + * Constructs a new CustomTargetingValueStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICreatePrivateAuctionRequest); - - /** CreatePrivateAuctionRequest parent. */ - public parent: string; - - /** CreatePrivateAuctionRequest privateAuction. */ - public privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + constructor(properties?: google.ads.admanager.v1.ICustomTargetingValueStatusEnum); /** - * Creates a new CreatePrivateAuctionRequest instance using the specified properties. + * Creates a new CustomTargetingValueStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePrivateAuctionRequest instance + * @returns CustomTargetingValueStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.ICreatePrivateAuctionRequest): google.ads.admanager.v1.CreatePrivateAuctionRequest; + public static create(properties?: google.ads.admanager.v1.ICustomTargetingValueStatusEnum): google.ads.admanager.v1.CustomTargetingValueStatusEnum; /** - * Encodes the specified CreatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. - * @param message CreatePrivateAuctionRequest message or plain object to encode + * Encodes the specified CustomTargetingValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. + * @param message CustomTargetingValueStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICreatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. - * @param message CreatePrivateAuctionRequest message or plain object to encode + * Encodes the specified CustomTargetingValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. + * @param message CustomTargetingValueStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICreatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValueStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer. + * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePrivateAuctionRequest + * @returns CustomTargetingValueStatusEnum * @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.ads.admanager.v1.CreatePrivateAuctionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingValueStatusEnum; /** - * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePrivateAuctionRequest + * @returns CustomTargetingValueStatusEnum * @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.ads.admanager.v1.CreatePrivateAuctionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingValueStatusEnum; /** - * Verifies a CreatePrivateAuctionRequest message. + * Verifies a CustomTargetingValueStatusEnum 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 CreatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValueStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePrivateAuctionRequest + * @returns CustomTargetingValueStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreatePrivateAuctionRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValueStatusEnum; /** - * Creates a plain object from a CreatePrivateAuctionRequest message. Also converts values to other types if specified. - * @param message CreatePrivateAuctionRequest + * Creates a plain object from a CustomTargetingValueStatusEnum message. Also converts values to other types if specified. + * @param message CustomTargetingValueStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CreatePrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingValueStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePrivateAuctionRequest to JSON. + * Converts this CustomTargetingValueStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreatePrivateAuctionRequest + * Gets the default type url for CustomTargetingValueStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdatePrivateAuctionRequest. */ - interface IUpdatePrivateAuctionRequest { + namespace CustomTargetingValueStatusEnum { - /** UpdatePrivateAuctionRequest privateAuction */ - privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + /** CustomTargetingValueStatus enum. */ + enum CustomTargetingValueStatus { + CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } - /** UpdatePrivateAuctionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a CustomTargetingValueMatchTypeEnum. */ + interface ICustomTargetingValueMatchTypeEnum { } - /** Represents an UpdatePrivateAuctionRequest. */ - class UpdatePrivateAuctionRequest implements IUpdatePrivateAuctionRequest { + /** Represents a CustomTargetingValueMatchTypeEnum. */ + class CustomTargetingValueMatchTypeEnum implements ICustomTargetingValueMatchTypeEnum { /** - * Constructs a new UpdatePrivateAuctionRequest. + * Constructs a new CustomTargetingValueMatchTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionRequest); - - /** UpdatePrivateAuctionRequest privateAuction. */ - public privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); - - /** UpdatePrivateAuctionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum); /** - * Creates a new UpdatePrivateAuctionRequest instance using the specified properties. + * Creates a new CustomTargetingValueMatchTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePrivateAuctionRequest instance + * @returns CustomTargetingValueMatchTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionRequest): google.ads.admanager.v1.UpdatePrivateAuctionRequest; + public static create(properties?: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; /** - * Encodes the specified UpdatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. - * @param message UpdatePrivateAuctionRequest message or plain object to encode + * Encodes the specified CustomTargetingValueMatchTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. + * @param message CustomTargetingValueMatchTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. - * @param message UpdatePrivateAuctionRequest message or plain object to encode + * Encodes the specified CustomTargetingValueMatchTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. + * @param message CustomTargetingValueMatchTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer. + * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdatePrivateAuctionRequest + * @returns CustomTargetingValueMatchTypeEnum * @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.ads.admanager.v1.UpdatePrivateAuctionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; /** - * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePrivateAuctionRequest + * @returns CustomTargetingValueMatchTypeEnum * @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.ads.admanager.v1.UpdatePrivateAuctionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; /** - * Verifies an UpdatePrivateAuctionRequest message. + * Verifies a CustomTargetingValueMatchTypeEnum 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 UpdatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValueMatchTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdatePrivateAuctionRequest + * @returns CustomTargetingValueMatchTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdatePrivateAuctionRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum; /** - * Creates a plain object from an UpdatePrivateAuctionRequest message. Also converts values to other types if specified. - * @param message UpdatePrivateAuctionRequest + * Creates a plain object from a CustomTargetingValueMatchTypeEnum message. Also converts values to other types if specified. + * @param message CustomTargetingValueMatchTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.UpdatePrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdatePrivateAuctionRequest to JSON. + * Converts this CustomTargetingValueMatchTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdatePrivateAuctionRequest + * Gets the default type url for CustomTargetingValueMatchTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ProgrammaticBuyer. */ - interface IProgrammaticBuyer { + namespace CustomTargetingValueMatchTypeEnum { - /** ProgrammaticBuyer name */ - name?: (string|null); + /** CustomTargetingValueMatchType enum. */ + enum CustomTargetingValueMatchType { + CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BROAD = 2, + PREFIX = 3, + BROAD_PREFIX = 4, + SUFFIX = 5, + CONTAINS = 6 + } + } - /** ProgrammaticBuyer buyerAccountId */ - buyerAccountId?: (number|Long|string|null); + /** Properties of a CustomTargetingValue. */ + interface ICustomTargetingValue { - /** ProgrammaticBuyer displayName */ - displayName?: (string|null); + /** CustomTargetingValue name */ + name?: (string|null); - /** ProgrammaticBuyer parentAccountId */ - parentAccountId?: (number|Long|string|null); + /** CustomTargetingValue customTargetingKey */ + customTargetingKey?: (string|null); - /** ProgrammaticBuyer partnerClientId */ - partnerClientId?: (string|null); + /** CustomTargetingValue adTagName */ + adTagName?: (string|null); - /** ProgrammaticBuyer agency */ - agency?: (boolean|null); + /** CustomTargetingValue displayName */ + displayName?: (string|null); - /** ProgrammaticBuyer preferredDealsEnabled */ - preferredDealsEnabled?: (boolean|null); + /** CustomTargetingValue matchType */ + matchType?: (google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|keyof typeof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null); - /** ProgrammaticBuyer programmaticGuaranteedEnabled */ - programmaticGuaranteedEnabled?: (boolean|null); + /** CustomTargetingValue status */ + status?: (google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|keyof typeof google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null); } - /** Represents a ProgrammaticBuyer. */ - class ProgrammaticBuyer implements IProgrammaticBuyer { + /** Represents a CustomTargetingValue. */ + class CustomTargetingValue implements ICustomTargetingValue { /** - * Constructs a new ProgrammaticBuyer. + * Constructs a new CustomTargetingValue. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IProgrammaticBuyer); + constructor(properties?: google.ads.admanager.v1.ICustomTargetingValue); - /** ProgrammaticBuyer name. */ + /** CustomTargetingValue name. */ public name: string; - /** ProgrammaticBuyer buyerAccountId. */ - public buyerAccountId?: (number|Long|string|null); - - /** ProgrammaticBuyer displayName. */ - public displayName?: (string|null); - - /** ProgrammaticBuyer parentAccountId. */ - public parentAccountId?: (number|Long|string|null); + /** CustomTargetingValue customTargetingKey. */ + public customTargetingKey?: (string|null); - /** ProgrammaticBuyer partnerClientId. */ - public partnerClientId?: (string|null); + /** CustomTargetingValue adTagName. */ + public adTagName?: (string|null); - /** ProgrammaticBuyer agency. */ - public agency?: (boolean|null); + /** CustomTargetingValue displayName. */ + public displayName?: (string|null); - /** ProgrammaticBuyer preferredDealsEnabled. */ - public preferredDealsEnabled?: (boolean|null); + /** CustomTargetingValue matchType. */ + public matchType?: (google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|keyof typeof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null); - /** ProgrammaticBuyer programmaticGuaranteedEnabled. */ - public programmaticGuaranteedEnabled?: (boolean|null); + /** CustomTargetingValue status. */ + public status?: (google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|keyof typeof google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null); /** - * Creates a new ProgrammaticBuyer instance using the specified properties. + * Creates a new CustomTargetingValue instance using the specified properties. * @param [properties] Properties to set - * @returns ProgrammaticBuyer instance + * @returns CustomTargetingValue instance */ - public static create(properties?: google.ads.admanager.v1.IProgrammaticBuyer): google.ads.admanager.v1.ProgrammaticBuyer; + public static create(properties?: google.ads.admanager.v1.ICustomTargetingValue): google.ads.admanager.v1.CustomTargetingValue; /** - * Encodes the specified ProgrammaticBuyer message. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. - * @param message ProgrammaticBuyer message or plain object to encode + * Encodes the specified CustomTargetingValue message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. + * @param message CustomTargetingValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IProgrammaticBuyer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICustomTargetingValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ProgrammaticBuyer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. - * @param message ProgrammaticBuyer message or plain object to encode + * Encodes the specified CustomTargetingValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. + * @param message CustomTargetingValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IProgrammaticBuyer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ProgrammaticBuyer message from the specified reader or buffer. + * Decodes a CustomTargetingValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ProgrammaticBuyer + * @returns CustomTargetingValue * @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.ads.admanager.v1.ProgrammaticBuyer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CustomTargetingValue; /** - * Decodes a ProgrammaticBuyer message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ProgrammaticBuyer + * @returns CustomTargetingValue * @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.ads.admanager.v1.ProgrammaticBuyer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CustomTargetingValue; /** - * Verifies a ProgrammaticBuyer message. + * Verifies a CustomTargetingValue 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 ProgrammaticBuyer message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ProgrammaticBuyer + * @returns CustomTargetingValue */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ProgrammaticBuyer; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingValue; /** - * Creates a plain object from a ProgrammaticBuyer message. Also converts values to other types if specified. - * @param message ProgrammaticBuyer + * Creates a plain object from a CustomTargetingValue message. Also converts values to other types if specified. + * @param message CustomTargetingValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ProgrammaticBuyer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CustomTargetingValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ProgrammaticBuyer to JSON. + * Converts this CustomTargetingValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ProgrammaticBuyer + * Gets the default type url for CustomTargetingValue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a ProgrammaticBuyerService */ - class ProgrammaticBuyerService extends $protobuf.rpc.Service { + /** Represents a CustomTargetingValueService */ + class CustomTargetingValueService extends $protobuf.rpc.Service { /** - * Constructs a new ProgrammaticBuyerService service. + * Constructs a new CustomTargetingValueService service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -17048,2784 +17112,17126 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new ProgrammaticBuyerService service using the specified rpc implementation. + * Creates new CustomTargetingValueService 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): ProgrammaticBuyerService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CustomTargetingValueService; /** - * Calls GetProgrammaticBuyer. - * @param request GetProgrammaticBuyerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ProgrammaticBuyer + * Calls GetCustomTargetingValue. + * @param request GetCustomTargetingValueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomTargetingValue */ - public getProgrammaticBuyer(request: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, callback: google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyerCallback): void; + public getCustomTargetingValue(request: google.ads.admanager.v1.IGetCustomTargetingValueRequest, callback: google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValueCallback): void; /** - * Calls GetProgrammaticBuyer. - * @param request GetProgrammaticBuyerRequest message or plain object + * Calls GetCustomTargetingValue. + * @param request GetCustomTargetingValueRequest message or plain object * @returns Promise */ - public getProgrammaticBuyer(request: google.ads.admanager.v1.IGetProgrammaticBuyerRequest): Promise; + public getCustomTargetingValue(request: google.ads.admanager.v1.IGetCustomTargetingValueRequest): Promise; /** - * Calls ListProgrammaticBuyers. - * @param request ListProgrammaticBuyersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListProgrammaticBuyersResponse + * Calls ListCustomTargetingValues. + * @param request ListCustomTargetingValuesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomTargetingValuesResponse */ - public listProgrammaticBuyers(request: google.ads.admanager.v1.IListProgrammaticBuyersRequest, callback: google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyersCallback): void; + public listCustomTargetingValues(request: google.ads.admanager.v1.IListCustomTargetingValuesRequest, callback: google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValuesCallback): void; /** - * Calls ListProgrammaticBuyers. - * @param request ListProgrammaticBuyersRequest message or plain object + * Calls ListCustomTargetingValues. + * @param request ListCustomTargetingValuesRequest message or plain object * @returns Promise */ - public listProgrammaticBuyers(request: google.ads.admanager.v1.IListProgrammaticBuyersRequest): Promise; + public listCustomTargetingValues(request: google.ads.admanager.v1.IListCustomTargetingValuesRequest): Promise; } - namespace ProgrammaticBuyerService { + namespace CustomTargetingValueService { /** - * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|getProgrammaticBuyer}. + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|getCustomTargetingValue}. * @param error Error, if any - * @param [response] ProgrammaticBuyer + * @param [response] CustomTargetingValue */ - type GetProgrammaticBuyerCallback = (error: (Error|null), response?: google.ads.admanager.v1.ProgrammaticBuyer) => void; + type GetCustomTargetingValueCallback = (error: (Error|null), response?: google.ads.admanager.v1.CustomTargetingValue) => void; /** - * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|listProgrammaticBuyers}. + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|listCustomTargetingValues}. * @param error Error, if any - * @param [response] ListProgrammaticBuyersResponse + * @param [response] ListCustomTargetingValuesResponse */ - type ListProgrammaticBuyersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListProgrammaticBuyersResponse) => void; + type ListCustomTargetingValuesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListCustomTargetingValuesResponse) => void; } - /** Properties of a GetProgrammaticBuyerRequest. */ - interface IGetProgrammaticBuyerRequest { + /** Properties of a GetCustomTargetingValueRequest. */ + interface IGetCustomTargetingValueRequest { - /** GetProgrammaticBuyerRequest name */ + /** GetCustomTargetingValueRequest name */ name?: (string|null); } - /** Represents a GetProgrammaticBuyerRequest. */ - class GetProgrammaticBuyerRequest implements IGetProgrammaticBuyerRequest { + /** Represents a GetCustomTargetingValueRequest. */ + class GetCustomTargetingValueRequest implements IGetCustomTargetingValueRequest { /** - * Constructs a new GetProgrammaticBuyerRequest. + * Constructs a new GetCustomTargetingValueRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetProgrammaticBuyerRequest); + constructor(properties?: google.ads.admanager.v1.IGetCustomTargetingValueRequest); - /** GetProgrammaticBuyerRequest name. */ + /** GetCustomTargetingValueRequest name. */ public name: string; /** - * Creates a new GetProgrammaticBuyerRequest instance using the specified properties. + * Creates a new GetCustomTargetingValueRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetProgrammaticBuyerRequest instance + * @returns GetCustomTargetingValueRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetProgrammaticBuyerRequest): google.ads.admanager.v1.GetProgrammaticBuyerRequest; + public static create(properties?: google.ads.admanager.v1.IGetCustomTargetingValueRequest): google.ads.admanager.v1.GetCustomTargetingValueRequest; /** - * Encodes the specified GetProgrammaticBuyerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. - * @param message GetProgrammaticBuyerRequest message or plain object to encode + * Encodes the specified GetCustomTargetingValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. + * @param message GetCustomTargetingValueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetCustomTargetingValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetProgrammaticBuyerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. - * @param message GetProgrammaticBuyerRequest message or plain object to encode + * Encodes the specified GetCustomTargetingValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. + * @param message GetCustomTargetingValueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetCustomTargetingValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer. + * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetProgrammaticBuyerRequest + * @returns GetCustomTargetingValueRequest * @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.ads.admanager.v1.GetProgrammaticBuyerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetCustomTargetingValueRequest; /** - * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetProgrammaticBuyerRequest + * @returns GetCustomTargetingValueRequest * @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.ads.admanager.v1.GetProgrammaticBuyerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetCustomTargetingValueRequest; /** - * Verifies a GetProgrammaticBuyerRequest message. + * Verifies a GetCustomTargetingValueRequest 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 GetProgrammaticBuyerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomTargetingValueRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetProgrammaticBuyerRequest + * @returns GetCustomTargetingValueRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetProgrammaticBuyerRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetCustomTargetingValueRequest; /** - * Creates a plain object from a GetProgrammaticBuyerRequest message. Also converts values to other types if specified. - * @param message GetProgrammaticBuyerRequest + * Creates a plain object from a GetCustomTargetingValueRequest message. Also converts values to other types if specified. + * @param message GetCustomTargetingValueRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetProgrammaticBuyerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetCustomTargetingValueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetProgrammaticBuyerRequest to JSON. + * Converts this GetCustomTargetingValueRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetProgrammaticBuyerRequest + * Gets the default type url for GetCustomTargetingValueRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListProgrammaticBuyersRequest. */ - interface IListProgrammaticBuyersRequest { + /** Properties of a ListCustomTargetingValuesRequest. */ + interface IListCustomTargetingValuesRequest { - /** ListProgrammaticBuyersRequest parent */ + /** ListCustomTargetingValuesRequest parent */ parent?: (string|null); - /** ListProgrammaticBuyersRequest pageSize */ + /** ListCustomTargetingValuesRequest pageSize */ pageSize?: (number|null); - /** ListProgrammaticBuyersRequest pageToken */ + /** ListCustomTargetingValuesRequest pageToken */ pageToken?: (string|null); - /** ListProgrammaticBuyersRequest filter */ + /** ListCustomTargetingValuesRequest filter */ filter?: (string|null); - /** ListProgrammaticBuyersRequest orderBy */ + /** ListCustomTargetingValuesRequest orderBy */ orderBy?: (string|null); - /** ListProgrammaticBuyersRequest skip */ + /** ListCustomTargetingValuesRequest skip */ skip?: (number|null); } - /** Represents a ListProgrammaticBuyersRequest. */ - class ListProgrammaticBuyersRequest implements IListProgrammaticBuyersRequest { + /** Represents a ListCustomTargetingValuesRequest. */ + class ListCustomTargetingValuesRequest implements IListCustomTargetingValuesRequest { /** - * Constructs a new ListProgrammaticBuyersRequest. + * Constructs a new ListCustomTargetingValuesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListProgrammaticBuyersRequest); + constructor(properties?: google.ads.admanager.v1.IListCustomTargetingValuesRequest); - /** ListProgrammaticBuyersRequest parent. */ + /** ListCustomTargetingValuesRequest parent. */ public parent: string; - /** ListProgrammaticBuyersRequest pageSize. */ + /** ListCustomTargetingValuesRequest pageSize. */ public pageSize: number; - /** ListProgrammaticBuyersRequest pageToken. */ + /** ListCustomTargetingValuesRequest pageToken. */ public pageToken: string; - /** ListProgrammaticBuyersRequest filter. */ + /** ListCustomTargetingValuesRequest filter. */ public filter: string; - /** ListProgrammaticBuyersRequest orderBy. */ + /** ListCustomTargetingValuesRequest orderBy. */ public orderBy: string; - /** ListProgrammaticBuyersRequest skip. */ + /** ListCustomTargetingValuesRequest skip. */ public skip: number; /** - * Creates a new ListProgrammaticBuyersRequest instance using the specified properties. + * Creates a new ListCustomTargetingValuesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListProgrammaticBuyersRequest instance + * @returns ListCustomTargetingValuesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListProgrammaticBuyersRequest): google.ads.admanager.v1.ListProgrammaticBuyersRequest; + public static create(properties?: google.ads.admanager.v1.IListCustomTargetingValuesRequest): google.ads.admanager.v1.ListCustomTargetingValuesRequest; /** - * Encodes the specified ListProgrammaticBuyersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. - * @param message ListProgrammaticBuyersRequest message or plain object to encode + * Encodes the specified ListCustomTargetingValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. + * @param message ListCustomTargetingValuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListProgrammaticBuyersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomTargetingValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListProgrammaticBuyersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. - * @param message ListProgrammaticBuyersRequest message or plain object to encode + * Encodes the specified ListCustomTargetingValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. + * @param message ListCustomTargetingValuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListProgrammaticBuyersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListProgrammaticBuyersRequest + * @returns ListCustomTargetingValuesRequest * @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.ads.admanager.v1.ListProgrammaticBuyersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomTargetingValuesRequest; /** - * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListProgrammaticBuyersRequest + * @returns ListCustomTargetingValuesRequest * @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.ads.admanager.v1.ListProgrammaticBuyersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomTargetingValuesRequest; /** - * Verifies a ListProgrammaticBuyersRequest message. + * Verifies a ListCustomTargetingValuesRequest 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 ListProgrammaticBuyersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingValuesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListProgrammaticBuyersRequest + * @returns ListCustomTargetingValuesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListProgrammaticBuyersRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingValuesRequest; /** - * Creates a plain object from a ListProgrammaticBuyersRequest message. Also converts values to other types if specified. - * @param message ListProgrammaticBuyersRequest + * Creates a plain object from a ListCustomTargetingValuesRequest message. Also converts values to other types if specified. + * @param message ListCustomTargetingValuesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListProgrammaticBuyersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomTargetingValuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListProgrammaticBuyersRequest to JSON. + * Converts this ListCustomTargetingValuesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListProgrammaticBuyersRequest + * Gets the default type url for ListCustomTargetingValuesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListProgrammaticBuyersResponse. */ - interface IListProgrammaticBuyersResponse { + /** Properties of a ListCustomTargetingValuesResponse. */ + interface IListCustomTargetingValuesResponse { - /** ListProgrammaticBuyersResponse programmaticBuyers */ - programmaticBuyers?: (google.ads.admanager.v1.IProgrammaticBuyer[]|null); + /** ListCustomTargetingValuesResponse customTargetingValues */ + customTargetingValues?: (google.ads.admanager.v1.ICustomTargetingValue[]|null); - /** ListProgrammaticBuyersResponse nextPageToken */ + /** ListCustomTargetingValuesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListProgrammaticBuyersResponse totalSize */ + /** ListCustomTargetingValuesResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListProgrammaticBuyersResponse. */ - class ListProgrammaticBuyersResponse implements IListProgrammaticBuyersResponse { + /** Represents a ListCustomTargetingValuesResponse. */ + class ListCustomTargetingValuesResponse implements IListCustomTargetingValuesResponse { /** - * Constructs a new ListProgrammaticBuyersResponse. + * Constructs a new ListCustomTargetingValuesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListProgrammaticBuyersResponse); + constructor(properties?: google.ads.admanager.v1.IListCustomTargetingValuesResponse); - /** ListProgrammaticBuyersResponse programmaticBuyers. */ - public programmaticBuyers: google.ads.admanager.v1.IProgrammaticBuyer[]; + /** ListCustomTargetingValuesResponse customTargetingValues. */ + public customTargetingValues: google.ads.admanager.v1.ICustomTargetingValue[]; - /** ListProgrammaticBuyersResponse nextPageToken. */ + /** ListCustomTargetingValuesResponse nextPageToken. */ public nextPageToken: string; - /** ListProgrammaticBuyersResponse totalSize. */ + /** ListCustomTargetingValuesResponse totalSize. */ public totalSize: number; /** - * Creates a new ListProgrammaticBuyersResponse instance using the specified properties. + * Creates a new ListCustomTargetingValuesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListProgrammaticBuyersResponse instance + * @returns ListCustomTargetingValuesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListProgrammaticBuyersResponse): google.ads.admanager.v1.ListProgrammaticBuyersResponse; + public static create(properties?: google.ads.admanager.v1.IListCustomTargetingValuesResponse): google.ads.admanager.v1.ListCustomTargetingValuesResponse; /** - * Encodes the specified ListProgrammaticBuyersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. - * @param message ListProgrammaticBuyersResponse message or plain object to encode + * Encodes the specified ListCustomTargetingValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. + * @param message ListCustomTargetingValuesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListProgrammaticBuyersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListCustomTargetingValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListProgrammaticBuyersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. - * @param message ListProgrammaticBuyersResponse message or plain object to encode + * Encodes the specified ListCustomTargetingValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. + * @param message ListCustomTargetingValuesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListProgrammaticBuyersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListCustomTargetingValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer. + * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListProgrammaticBuyersResponse + * @returns ListCustomTargetingValuesResponse * @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.ads.admanager.v1.ListProgrammaticBuyersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListCustomTargetingValuesResponse; /** - * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListProgrammaticBuyersResponse + * @returns ListCustomTargetingValuesResponse * @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.ads.admanager.v1.ListProgrammaticBuyersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListCustomTargetingValuesResponse; /** - * Verifies a ListProgrammaticBuyersResponse message. + * Verifies a ListCustomTargetingValuesResponse 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 ListProgrammaticBuyersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingValuesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListProgrammaticBuyersResponse + * @returns ListCustomTargetingValuesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListProgrammaticBuyersResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListCustomTargetingValuesResponse; /** - * Creates a plain object from a ListProgrammaticBuyersResponse message. Also converts values to other types if specified. - * @param message ListProgrammaticBuyersResponse + * Creates a plain object from a ListCustomTargetingValuesResponse message. Also converts values to other types if specified. + * @param message ListCustomTargetingValuesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListProgrammaticBuyersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListCustomTargetingValuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListProgrammaticBuyersResponse to JSON. + * Converts this ListCustomTargetingValuesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListProgrammaticBuyersResponse + * Gets the default type url for ListCustomTargetingValuesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Report. */ - interface IReport { + /** Properties of a DealBuyerPermissionTypeEnum. */ + interface IDealBuyerPermissionTypeEnum { + } - /** Report name */ - name?: (string|null); + /** Represents a DealBuyerPermissionTypeEnum. */ + class DealBuyerPermissionTypeEnum implements IDealBuyerPermissionTypeEnum { - /** Report reportId */ - reportId?: (number|Long|string|null); + /** + * Constructs a new DealBuyerPermissionTypeEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum); - /** Report visibility */ - visibility?: (google.ads.admanager.v1.Report.Visibility|keyof typeof google.ads.admanager.v1.Report.Visibility|null); + /** + * Creates a new DealBuyerPermissionTypeEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns DealBuyerPermissionTypeEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum): google.ads.admanager.v1.DealBuyerPermissionTypeEnum; - /** Report reportDefinition */ - reportDefinition?: (google.ads.admanager.v1.IReportDefinition|null); + /** + * Encodes the specified DealBuyerPermissionTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * @param message DealBuyerPermissionTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; - /** Report displayName */ - displayName?: (string|null); + /** + * Encodes the specified DealBuyerPermissionTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * @param message DealBuyerPermissionTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDealBuyerPermissionTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; - /** Report updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DealBuyerPermissionTypeEnum + * @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.ads.admanager.v1.DealBuyerPermissionTypeEnum; - /** Report createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DealBuyerPermissionTypeEnum + * @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.ads.admanager.v1.DealBuyerPermissionTypeEnum; - /** Report locale */ - locale?: (string|null); + /** + * Verifies a DealBuyerPermissionTypeEnum 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); - /** Report scheduleOptions */ - scheduleOptions?: (google.ads.admanager.v1.IScheduleOptions|null); - } + /** + * Creates a DealBuyerPermissionTypeEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DealBuyerPermissionTypeEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DealBuyerPermissionTypeEnum; - /** Represents a Report. */ - class Report implements IReport { + /** + * Creates a plain object from a DealBuyerPermissionTypeEnum message. Also converts values to other types if specified. + * @param message DealBuyerPermissionTypeEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DealBuyerPermissionTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new Report. - * @param [properties] Properties to set + * Converts this DealBuyerPermissionTypeEnum to JSON. + * @returns JSON object */ - constructor(properties?: google.ads.admanager.v1.IReport); + public toJSON(): { [k: string]: any }; - /** Report name. */ - public name: string; + /** + * Gets the default type url for DealBuyerPermissionTypeEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Report reportId. */ - public reportId: (number|Long|string); + namespace DealBuyerPermissionTypeEnum { - /** Report visibility. */ - public visibility: (google.ads.admanager.v1.Report.Visibility|keyof typeof google.ads.admanager.v1.Report.Visibility); + /** DealBuyerPermissionType enum. */ + enum DealBuyerPermissionType { + DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED = 0, + NEGOTIATOR_ONLY = 1, + BIDDER = 2 + } + } - /** Report reportDefinition. */ - public reportDefinition?: (google.ads.admanager.v1.IReportDefinition|null); + /** Properties of a DeviceCapability. */ + interface IDeviceCapability { - /** Report displayName. */ - public displayName: string; + /** DeviceCapability name */ + name?: (string|null); - /** Report updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** DeviceCapability displayName */ + displayName?: (string|null); + } - /** Report createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Represents a DeviceCapability. */ + class DeviceCapability implements IDeviceCapability { - /** Report locale. */ - public locale: string; + /** + * Constructs a new DeviceCapability. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceCapability); - /** Report scheduleOptions. */ - public scheduleOptions?: (google.ads.admanager.v1.IScheduleOptions|null); + /** DeviceCapability name. */ + public name: string; + + /** DeviceCapability displayName. */ + public displayName?: (string|null); /** - * Creates a new Report instance using the specified properties. + * Creates a new DeviceCapability instance using the specified properties. * @param [properties] Properties to set - * @returns Report instance + * @returns DeviceCapability instance */ - public static create(properties?: google.ads.admanager.v1.IReport): google.ads.admanager.v1.Report; + public static create(properties?: google.ads.admanager.v1.IDeviceCapability): google.ads.admanager.v1.DeviceCapability; /** - * Encodes the specified Report message. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. - * @param message Report message or plain object to encode + * Encodes the specified DeviceCapability message. Does not implicitly {@link google.ads.admanager.v1.DeviceCapability.verify|verify} messages. + * @param message DeviceCapability message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IReport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IDeviceCapability, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Report message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. - * @param message Report message or plain object to encode + * Encodes the specified DeviceCapability message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCapability.verify|verify} messages. + * @param message DeviceCapability message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IReport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCapability, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Report message from the specified reader or buffer. + * Decodes a DeviceCapability message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Report + * @returns DeviceCapability * @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.ads.admanager.v1.Report; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.DeviceCapability; /** - * Decodes a Report message from the specified reader or buffer, length delimited. + * Decodes a DeviceCapability message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Report + * @returns DeviceCapability * @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.ads.admanager.v1.Report; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.DeviceCapability; /** - * Verifies a Report message. + * Verifies a DeviceCapability 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 Report message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCapability message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Report + * @returns DeviceCapability */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCapability; /** - * Creates a plain object from a Report message. Also converts values to other types if specified. - * @param message Report + * Creates a plain object from a DeviceCapability message. Also converts values to other types if specified. + * @param message DeviceCapability * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Report, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.DeviceCapability, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Report to JSON. + * Converts this DeviceCapability to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Report + * Gets the default type url for DeviceCapability * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Report { + /** Represents a DeviceCapabilityService */ + class DeviceCapabilityService extends $protobuf.rpc.Service { - /** Properties of a Value. */ - interface IValue { + /** + * Constructs a new DeviceCapabilityService 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); - /** Value intValue */ - intValue?: (number|Long|string|null); + /** + * Creates new DeviceCapabilityService 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): DeviceCapabilityService; - /** Value doubleValue */ - doubleValue?: (number|null); + /** + * Calls GetDeviceCapability. + * @param request GetDeviceCapabilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceCapability + */ + public getDeviceCapability(request: google.ads.admanager.v1.IGetDeviceCapabilityRequest, callback: google.ads.admanager.v1.DeviceCapabilityService.GetDeviceCapabilityCallback): void; - /** Value stringValue */ - stringValue?: (string|null); + /** + * Calls GetDeviceCapability. + * @param request GetDeviceCapabilityRequest message or plain object + * @returns Promise + */ + public getDeviceCapability(request: google.ads.admanager.v1.IGetDeviceCapabilityRequest): Promise; - /** Value boolValue */ - boolValue?: (boolean|null); + /** + * Calls ListDeviceCapabilities. + * @param request ListDeviceCapabilitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceCapabilitiesResponse + */ + public listDeviceCapabilities(request: google.ads.admanager.v1.IListDeviceCapabilitiesRequest, callback: google.ads.admanager.v1.DeviceCapabilityService.ListDeviceCapabilitiesCallback): void; - /** Value intListValue */ - intListValue?: (google.ads.admanager.v1.Report.Value.IIntList|null); + /** + * Calls ListDeviceCapabilities. + * @param request ListDeviceCapabilitiesRequest message or plain object + * @returns Promise + */ + public listDeviceCapabilities(request: google.ads.admanager.v1.IListDeviceCapabilitiesRequest): Promise; + } - /** Value stringListValue */ - stringListValue?: (google.ads.admanager.v1.Report.Value.IStringList|null); + namespace DeviceCapabilityService { - /** Value bytesValue */ - bytesValue?: (Uint8Array|Buffer|string|null); - } + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCapabilityService|getDeviceCapability}. + * @param error Error, if any + * @param [response] DeviceCapability + */ + type GetDeviceCapabilityCallback = (error: (Error|null), response?: google.ads.admanager.v1.DeviceCapability) => void; - /** Represents a Value. */ - class Value implements IValue { + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCapabilityService|listDeviceCapabilities}. + * @param error Error, if any + * @param [response] ListDeviceCapabilitiesResponse + */ + type ListDeviceCapabilitiesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListDeviceCapabilitiesResponse) => void; + } - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IValue); + /** Properties of a GetDeviceCapabilityRequest. */ + interface IGetDeviceCapabilityRequest { - /** Value intValue. */ - public intValue?: (number|Long|string|null); + /** GetDeviceCapabilityRequest name */ + name?: (string|null); + } - /** Value doubleValue. */ - public doubleValue?: (number|null); + /** Represents a GetDeviceCapabilityRequest. */ + class GetDeviceCapabilityRequest implements IGetDeviceCapabilityRequest { - /** Value stringValue. */ - public stringValue?: (string|null); + /** + * Constructs a new GetDeviceCapabilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetDeviceCapabilityRequest); - /** Value boolValue. */ - public boolValue?: (boolean|null); + /** GetDeviceCapabilityRequest name. */ + public name: string; - /** Value intListValue. */ - public intListValue?: (google.ads.admanager.v1.Report.Value.IIntList|null); + /** + * Creates a new GetDeviceCapabilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeviceCapabilityRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetDeviceCapabilityRequest): google.ads.admanager.v1.GetDeviceCapabilityRequest; - /** Value stringListValue. */ - public stringListValue?: (google.ads.admanager.v1.Report.Value.IStringList|null); + /** + * Encodes the specified GetDeviceCapabilityRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCapabilityRequest.verify|verify} messages. + * @param message GetDeviceCapabilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetDeviceCapabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value bytesValue. */ - public bytesValue?: (Uint8Array|Buffer|string|null); + /** + * Encodes the specified GetDeviceCapabilityRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCapabilityRequest.verify|verify} messages. + * @param message GetDeviceCapabilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetDeviceCapabilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Value value. */ - public value?: ("intValue"|"doubleValue"|"stringValue"|"boolValue"|"intListValue"|"stringListValue"|"bytesValue"); + /** + * Decodes a GetDeviceCapabilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeviceCapabilityRequest + * @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.ads.admanager.v1.GetDeviceCapabilityRequest; - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IValue): google.ads.admanager.v1.Report.Value; + /** + * Decodes a GetDeviceCapabilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeviceCapabilityRequest + * @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.ads.admanager.v1.GetDeviceCapabilityRequest; - /** - * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.Report.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.ads.admanager.v1.Report.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a GetDeviceCapabilityRequest 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); - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.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.ads.admanager.v1.Report.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a GetDeviceCapabilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeviceCapabilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetDeviceCapabilityRequest; - /** - * 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 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.ads.admanager.v1.Report.Value; + /** + * Creates a plain object from a GetDeviceCapabilityRequest message. Also converts values to other types if specified. + * @param message GetDeviceCapabilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetDeviceCapabilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.ads.admanager.v1.Report.Value; + /** + * Converts this GetDeviceCapabilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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); + /** + * Gets the default type url for GetDeviceCapabilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Value; + /** Properties of a ListDeviceCapabilitiesRequest. */ + interface IListDeviceCapabilitiesRequest { - /** - * 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.ads.admanager.v1.Report.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListDeviceCapabilitiesRequest parent */ + parent?: (string|null); - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListDeviceCapabilitiesRequest pageSize */ + pageSize?: (number|null); - /** - * 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; - } + /** ListDeviceCapabilitiesRequest pageToken */ + pageToken?: (string|null); - namespace Value { + /** ListDeviceCapabilitiesRequest filter */ + filter?: (string|null); - /** Properties of an IntList. */ - interface IIntList { + /** ListDeviceCapabilitiesRequest orderBy */ + orderBy?: (string|null); - /** IntList values */ - values?: ((number|Long|string)[]|null); - } + /** ListDeviceCapabilitiesRequest skip */ + skip?: (number|null); + } - /** Represents an IntList. */ - class IntList implements IIntList { + /** Represents a ListDeviceCapabilitiesRequest. */ + class ListDeviceCapabilitiesRequest implements IListDeviceCapabilitiesRequest { - /** - * Constructs a new IntList. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.Value.IIntList); + /** + * Constructs a new ListDeviceCapabilitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceCapabilitiesRequest); - /** IntList values. */ - public values: (number|Long|string)[]; + /** ListDeviceCapabilitiesRequest parent. */ + public parent: string; - /** - * Creates a new IntList instance using the specified properties. - * @param [properties] Properties to set - * @returns IntList instance - */ - public static create(properties?: google.ads.admanager.v1.Report.Value.IIntList): google.ads.admanager.v1.Report.Value.IntList; + /** ListDeviceCapabilitiesRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified IntList message. Does not implicitly {@link google.ads.admanager.v1.Report.Value.IntList.verify|verify} messages. - * @param message IntList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.Value.IIntList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceCapabilitiesRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified IntList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Value.IntList.verify|verify} messages. - * @param message IntList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.Value.IIntList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceCapabilitiesRequest filter. */ + public filter: string; - /** - * Decodes an IntList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntList - * @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.ads.admanager.v1.Report.Value.IntList; + /** ListDeviceCapabilitiesRequest orderBy. */ + public orderBy: string; - /** - * Decodes an IntList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntList - * @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.ads.admanager.v1.Report.Value.IntList; + /** ListDeviceCapabilitiesRequest skip. */ + public skip: number; - /** - * Verifies an IntList 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 new ListDeviceCapabilitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceCapabilitiesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceCapabilitiesRequest): google.ads.admanager.v1.ListDeviceCapabilitiesRequest; - /** - * Creates an IntList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntList - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Value.IntList; + /** + * Encodes the specified ListDeviceCapabilitiesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesRequest.verify|verify} messages. + * @param message ListDeviceCapabilitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceCapabilitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an IntList message. Also converts values to other types if specified. - * @param message IntList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Value.IntList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListDeviceCapabilitiesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesRequest.verify|verify} messages. + * @param message ListDeviceCapabilitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCapabilitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this IntList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ListDeviceCapabilitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceCapabilitiesRequest + * @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.ads.admanager.v1.ListDeviceCapabilitiesRequest; - /** - * Gets the default type url for IntList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a ListDeviceCapabilitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceCapabilitiesRequest + * @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.ads.admanager.v1.ListDeviceCapabilitiesRequest; - /** Properties of a StringList. */ - interface IStringList { + /** + * Verifies a ListDeviceCapabilitiesRequest 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); - /** StringList values */ - values?: (string[]|null); - } + /** + * Creates a ListDeviceCapabilitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceCapabilitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCapabilitiesRequest; - /** Represents a StringList. */ - class StringList implements IStringList { + /** + * Creates a plain object from a ListDeviceCapabilitiesRequest message. Also converts values to other types if specified. + * @param message ListDeviceCapabilitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceCapabilitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new StringList. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.Value.IStringList); + /** + * Converts this ListDeviceCapabilitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** StringList values. */ - public values: string[]; + /** + * Gets the default type url for ListDeviceCapabilitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new StringList instance using the specified properties. - * @param [properties] Properties to set - * @returns StringList instance - */ - public static create(properties?: google.ads.admanager.v1.Report.Value.IStringList): google.ads.admanager.v1.Report.Value.StringList; + /** Properties of a ListDeviceCapabilitiesResponse. */ + interface IListDeviceCapabilitiesResponse { - /** - * Encodes the specified StringList message. Does not implicitly {@link google.ads.admanager.v1.Report.Value.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.Value.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceCapabilitiesResponse deviceCapabilities */ + deviceCapabilities?: (google.ads.admanager.v1.IDeviceCapability[]|null); - /** - * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Value.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.Value.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceCapabilitiesResponse nextPageToken */ + nextPageToken?: (string|null); - /** - * Decodes a StringList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringList - * @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.ads.admanager.v1.Report.Value.StringList; + /** ListDeviceCapabilitiesResponse totalSize */ + totalSize?: (number|null); + } - /** - * Decodes a StringList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringList - * @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.ads.admanager.v1.Report.Value.StringList; + /** Represents a ListDeviceCapabilitiesResponse. */ + class ListDeviceCapabilitiesResponse implements IListDeviceCapabilitiesResponse { - /** - * Verifies a StringList 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); + /** + * Constructs a new ListDeviceCapabilitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceCapabilitiesResponse); - /** - * Creates a StringList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringList - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Value.StringList; + /** ListDeviceCapabilitiesResponse deviceCapabilities. */ + public deviceCapabilities: google.ads.admanager.v1.IDeviceCapability[]; - /** - * Creates a plain object from a StringList message. Also converts values to other types if specified. - * @param message StringList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Value.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListDeviceCapabilitiesResponse nextPageToken. */ + public nextPageToken: string; - /** - * Converts this StringList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListDeviceCapabilitiesResponse totalSize. */ + public totalSize: number; - /** - * Gets the default type url for StringList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Creates a new ListDeviceCapabilitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceCapabilitiesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceCapabilitiesResponse): google.ads.admanager.v1.ListDeviceCapabilitiesResponse; - /** Properties of a Sort. */ - interface ISort { + /** + * Encodes the specified ListDeviceCapabilitiesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesResponse.verify|verify} messages. + * @param message ListDeviceCapabilitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceCapabilitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Sort field */ - field?: (google.ads.admanager.v1.Report.IField|null); + /** + * Encodes the specified ListDeviceCapabilitiesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesResponse.verify|verify} messages. + * @param message ListDeviceCapabilitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCapabilitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Sort descending */ - descending?: (boolean|null); + /** + * Decodes a ListDeviceCapabilitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceCapabilitiesResponse + * @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.ads.admanager.v1.ListDeviceCapabilitiesResponse; - /** Sort slice */ - slice?: (google.ads.admanager.v1.Report.ISlice|null); + /** + * Decodes a ListDeviceCapabilitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceCapabilitiesResponse + * @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.ads.admanager.v1.ListDeviceCapabilitiesResponse; - /** Sort timePeriodIndex */ - timePeriodIndex?: (number|null); + /** + * Verifies a ListDeviceCapabilitiesResponse 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); - /** Sort metricValueType */ - metricValueType?: (google.ads.admanager.v1.Report.MetricValueType|keyof typeof google.ads.admanager.v1.Report.MetricValueType|null); - } + /** + * Creates a ListDeviceCapabilitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceCapabilitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCapabilitiesResponse; - /** Represents a Sort. */ - class Sort implements ISort { + /** + * Creates a plain object from a ListDeviceCapabilitiesResponse message. Also converts values to other types if specified. + * @param message ListDeviceCapabilitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceCapabilitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new Sort. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.ISort); + /** + * Converts this ListDeviceCapabilitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Sort field. */ - public field?: (google.ads.admanager.v1.Report.IField|null); + /** + * Gets the default type url for ListDeviceCapabilitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Sort descending. */ - public descending: boolean; + /** Properties of a DeviceCategory. */ + interface IDeviceCategory { - /** Sort slice. */ - public slice?: (google.ads.admanager.v1.Report.ISlice|null); + /** DeviceCategory name */ + name?: (string|null); - /** Sort timePeriodIndex. */ - public timePeriodIndex?: (number|null); + /** DeviceCategory displayName */ + displayName?: (string|null); + } - /** Sort metricValueType. */ - public metricValueType?: (google.ads.admanager.v1.Report.MetricValueType|keyof typeof google.ads.admanager.v1.Report.MetricValueType|null); + /** Represents a DeviceCategory. */ + class DeviceCategory implements IDeviceCategory { - /** - * Creates a new Sort instance using the specified properties. - * @param [properties] Properties to set - * @returns Sort instance - */ - public static create(properties?: google.ads.admanager.v1.Report.ISort): google.ads.admanager.v1.Report.Sort; + /** + * Constructs a new DeviceCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceCategory); - /** - * Encodes the specified Sort message. Does not implicitly {@link google.ads.admanager.v1.Report.Sort.verify|verify} messages. - * @param message Sort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.ISort, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeviceCategory name. */ + public name: string; - /** - * Encodes the specified Sort message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Sort.verify|verify} messages. - * @param message Sort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.ISort, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeviceCategory displayName. */ + public displayName?: (string|null); - /** - * Decodes a Sort message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Sort - * @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.ads.admanager.v1.Report.Sort; + /** + * Creates a new DeviceCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceCategory instance + */ + public static create(properties?: google.ads.admanager.v1.IDeviceCategory): google.ads.admanager.v1.DeviceCategory; - /** - * Decodes a Sort message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Sort - * @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.ads.admanager.v1.Report.Sort; + /** + * Encodes the specified DeviceCategory message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. + * @param message DeviceCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDeviceCategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Sort 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); + /** + * Encodes the specified DeviceCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. + * @param message DeviceCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Sort message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Sort - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Sort; + /** + * Decodes a DeviceCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceCategory + * @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.ads.admanager.v1.DeviceCategory; - /** - * Creates a plain object from a Sort message. Also converts values to other types if specified. - * @param message Sort - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Sort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a DeviceCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceCategory + * @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.ads.admanager.v1.DeviceCategory; - /** - * Converts this Sort to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a DeviceCategory 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); - /** - * Gets the default type url for Sort - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a DeviceCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceCategory + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCategory; - /** Properties of a DataTable. */ - interface IDataTable { - } + /** + * Creates a plain object from a DeviceCategory message. Also converts values to other types if specified. + * @param message DeviceCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DeviceCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a DataTable. */ - class DataTable implements IDataTable { + /** + * Converts this DeviceCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new DataTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IDataTable); + /** + * Gets the default type url for DeviceCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new DataTable instance using the specified properties. - * @param [properties] Properties to set - * @returns DataTable instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IDataTable): google.ads.admanager.v1.Report.DataTable; + /** Represents a DeviceCategoryService */ + class DeviceCategoryService extends $protobuf.rpc.Service { - /** - * Encodes the specified DataTable message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.verify|verify} messages. - * @param message DataTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.IDataTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataTable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.verify|verify} messages. - * @param message DataTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.IDataTable, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new DeviceCategoryService 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); - /** - * Decodes a DataTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataTable - * @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.ads.admanager.v1.Report.DataTable; + /** + * Creates new DeviceCategoryService 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): DeviceCategoryService; - /** - * Decodes a DataTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataTable - * @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.ads.admanager.v1.Report.DataTable; + /** + * Calls GetDeviceCategory. + * @param request GetDeviceCategoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceCategory + */ + public getDeviceCategory(request: google.ads.admanager.v1.IGetDeviceCategoryRequest, callback: google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategoryCallback): void; - /** - * Verifies a DataTable 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); + /** + * Calls GetDeviceCategory. + * @param request GetDeviceCategoryRequest message or plain object + * @returns Promise + */ + public getDeviceCategory(request: google.ads.admanager.v1.IGetDeviceCategoryRequest): Promise; - /** - * Creates a DataTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataTable - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.DataTable; + /** + * Calls ListDeviceCategories. + * @param request ListDeviceCategoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceCategoriesResponse + */ + public listDeviceCategories(request: google.ads.admanager.v1.IListDeviceCategoriesRequest, callback: google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategoriesCallback): void; - /** - * Creates a plain object from a DataTable message. Also converts values to other types if specified. - * @param message DataTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.DataTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls ListDeviceCategories. + * @param request ListDeviceCategoriesRequest message or plain object + * @returns Promise + */ + public listDeviceCategories(request: google.ads.admanager.v1.IListDeviceCategoriesRequest): Promise; + } - /** - * Converts this DataTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace DeviceCategoryService { - /** - * Gets the default type url for DataTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|getDeviceCategory}. + * @param error Error, if any + * @param [response] DeviceCategory + */ + type GetDeviceCategoryCallback = (error: (Error|null), response?: google.ads.admanager.v1.DeviceCategory) => void; - namespace DataTable { + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|listDeviceCategories}. + * @param error Error, if any + * @param [response] ListDeviceCategoriesResponse + */ + type ListDeviceCategoriesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListDeviceCategoriesResponse) => void; + } - /** Properties of a Row. */ - interface IRow { + /** Properties of a GetDeviceCategoryRequest. */ + interface IGetDeviceCategoryRequest { - /** Row dimensionValues */ - dimensionValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** GetDeviceCategoryRequest name */ + name?: (string|null); + } - /** Row metricValueGroups */ - metricValueGroups?: (google.ads.admanager.v1.Report.DataTable.IMetricValueGroup[]|null); - } + /** Represents a GetDeviceCategoryRequest. */ + class GetDeviceCategoryRequest implements IGetDeviceCategoryRequest { - /** Represents a Row. */ - class Row implements IRow { + /** + * Constructs a new GetDeviceCategoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetDeviceCategoryRequest); - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.DataTable.IRow); + /** GetDeviceCategoryRequest name. */ + public name: string; - /** Row dimensionValues. */ - public dimensionValues: google.ads.admanager.v1.Report.IValue[]; + /** + * Creates a new GetDeviceCategoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeviceCategoryRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetDeviceCategoryRequest): google.ads.admanager.v1.GetDeviceCategoryRequest; - /** Row metricValueGroups. */ - public metricValueGroups: google.ads.admanager.v1.Report.DataTable.IMetricValueGroup[]; + /** + * Encodes the specified GetDeviceCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * @param message GetDeviceCategoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetDeviceCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.ads.admanager.v1.Report.DataTable.IRow): google.ads.admanager.v1.Report.DataTable.Row; + /** + * Encodes the specified GetDeviceCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * @param message GetDeviceCategoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetDeviceCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Row message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.DataTable.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeviceCategoryRequest + * @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.ads.admanager.v1.GetDeviceCategoryRequest; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.DataTable.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeviceCategoryRequest + * @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.ads.admanager.v1.GetDeviceCategoryRequest; - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @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.ads.admanager.v1.Report.DataTable.Row; + /** + * Verifies a GetDeviceCategoryRequest 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 Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @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.ads.admanager.v1.Report.DataTable.Row; + /** + * Creates a GetDeviceCategoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeviceCategoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetDeviceCategoryRequest; - /** - * Verifies a Row 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 GetDeviceCategoryRequest message. Also converts values to other types if specified. + * @param message GetDeviceCategoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetDeviceCategoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.DataTable.Row; + /** + * Converts this GetDeviceCategoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.DataTable.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for GetDeviceCategoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ListDeviceCategoriesRequest. */ + interface IListDeviceCategoriesRequest { - /** - * Gets the default type url for Row - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ListDeviceCategoriesRequest parent */ + parent?: (string|null); - /** Properties of a MetricValueGroup. */ - interface IMetricValueGroup { + /** ListDeviceCategoriesRequest pageSize */ + pageSize?: (number|null); - /** MetricValueGroup primaryValues */ - primaryValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** ListDeviceCategoriesRequest pageToken */ + pageToken?: (string|null); - /** MetricValueGroup primaryPercentOfTotalValues */ - primaryPercentOfTotalValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** ListDeviceCategoriesRequest filter */ + filter?: (string|null); - /** MetricValueGroup comparisonValues */ - comparisonValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** ListDeviceCategoriesRequest orderBy */ + orderBy?: (string|null); - /** MetricValueGroup comparisonPercentOfTotalValues */ - comparisonPercentOfTotalValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** ListDeviceCategoriesRequest skip */ + skip?: (number|null); + } - /** MetricValueGroup absoluteChangeValues */ - absoluteChangeValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** Represents a ListDeviceCategoriesRequest. */ + class ListDeviceCategoriesRequest implements IListDeviceCategoriesRequest { - /** MetricValueGroup relativeChangeValues */ - relativeChangeValues?: (google.ads.admanager.v1.Report.IValue[]|null); + /** + * Constructs a new ListDeviceCategoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceCategoriesRequest); - /** MetricValueGroup flagValues */ - flagValues?: (boolean[]|null); - } + /** ListDeviceCategoriesRequest parent. */ + public parent: string; - /** Represents a MetricValueGroup. */ - class MetricValueGroup implements IMetricValueGroup { + /** ListDeviceCategoriesRequest pageSize. */ + public pageSize: number; - /** - * Constructs a new MetricValueGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.DataTable.IMetricValueGroup); + /** ListDeviceCategoriesRequest pageToken. */ + public pageToken: string; - /** MetricValueGroup primaryValues. */ - public primaryValues: google.ads.admanager.v1.Report.IValue[]; + /** ListDeviceCategoriesRequest filter. */ + public filter: string; - /** MetricValueGroup primaryPercentOfTotalValues. */ - public primaryPercentOfTotalValues: google.ads.admanager.v1.Report.IValue[]; + /** ListDeviceCategoriesRequest orderBy. */ + public orderBy: string; - /** MetricValueGroup comparisonValues. */ - public comparisonValues: google.ads.admanager.v1.Report.IValue[]; + /** ListDeviceCategoriesRequest skip. */ + public skip: number; - /** MetricValueGroup comparisonPercentOfTotalValues. */ - public comparisonPercentOfTotalValues: google.ads.admanager.v1.Report.IValue[]; + /** + * Creates a new ListDeviceCategoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceCategoriesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceCategoriesRequest): google.ads.admanager.v1.ListDeviceCategoriesRequest; - /** MetricValueGroup absoluteChangeValues. */ - public absoluteChangeValues: google.ads.admanager.v1.Report.IValue[]; + /** + * Encodes the specified ListDeviceCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * @param message ListDeviceCategoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricValueGroup relativeChangeValues. */ - public relativeChangeValues: google.ads.admanager.v1.Report.IValue[]; + /** + * Encodes the specified ListDeviceCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * @param message ListDeviceCategoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricValueGroup flagValues. */ - public flagValues: boolean[]; + /** + * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceCategoriesRequest + * @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.ads.admanager.v1.ListDeviceCategoriesRequest; - /** - * Creates a new MetricValueGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricValueGroup instance - */ - public static create(properties?: google.ads.admanager.v1.Report.DataTable.IMetricValueGroup): google.ads.admanager.v1.Report.DataTable.MetricValueGroup; + /** + * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceCategoriesRequest + * @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.ads.admanager.v1.ListDeviceCategoriesRequest; - /** - * Encodes the specified MetricValueGroup message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.MetricValueGroup.verify|verify} messages. - * @param message MetricValueGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.DataTable.IMetricValueGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ListDeviceCategoriesRequest 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); - /** - * Encodes the specified MetricValueGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.MetricValueGroup.verify|verify} messages. - * @param message MetricValueGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.DataTable.IMetricValueGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ListDeviceCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceCategoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCategoriesRequest; - /** - * Decodes a MetricValueGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricValueGroup - * @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.ads.admanager.v1.Report.DataTable.MetricValueGroup; + /** + * Creates a plain object from a ListDeviceCategoriesRequest message. Also converts values to other types if specified. + * @param message ListDeviceCategoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceCategoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a MetricValueGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricValueGroup - * @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.ads.admanager.v1.Report.DataTable.MetricValueGroup; + /** + * Converts this ListDeviceCategoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a MetricValueGroup 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); + /** + * Gets the default type url for ListDeviceCategoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a MetricValueGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricValueGroup - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.DataTable.MetricValueGroup; + /** Properties of a ListDeviceCategoriesResponse. */ + interface IListDeviceCategoriesResponse { - /** - * Creates a plain object from a MetricValueGroup message. Also converts values to other types if specified. - * @param message MetricValueGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.DataTable.MetricValueGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListDeviceCategoriesResponse deviceCategories */ + deviceCategories?: (google.ads.admanager.v1.IDeviceCategory[]|null); - /** - * Converts this MetricValueGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListDeviceCategoriesResponse nextPageToken */ + nextPageToken?: (string|null); - /** - * Gets the default type url for MetricValueGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** ListDeviceCategoriesResponse totalSize */ + totalSize?: (number|null); + } - /** Properties of a Field. */ - interface IField { + /** Represents a ListDeviceCategoriesResponse. */ + class ListDeviceCategoriesResponse implements IListDeviceCategoriesResponse { - /** Field dimension */ - dimension?: (google.ads.admanager.v1.Report.Dimension|keyof typeof google.ads.admanager.v1.Report.Dimension|null); + /** + * Constructs a new ListDeviceCategoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceCategoriesResponse); - /** Field metric */ - metric?: (google.ads.admanager.v1.Report.Metric|keyof typeof google.ads.admanager.v1.Report.Metric|null); - } + /** ListDeviceCategoriesResponse deviceCategories. */ + public deviceCategories: google.ads.admanager.v1.IDeviceCategory[]; - /** Represents a Field. */ - class Field implements IField { + /** ListDeviceCategoriesResponse nextPageToken. */ + public nextPageToken: string; - /** - * Constructs a new Field. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IField); + /** ListDeviceCategoriesResponse totalSize. */ + public totalSize: number; - /** Field dimension. */ - public dimension?: (google.ads.admanager.v1.Report.Dimension|keyof typeof google.ads.admanager.v1.Report.Dimension|null); + /** + * Creates a new ListDeviceCategoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceCategoriesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceCategoriesResponse): google.ads.admanager.v1.ListDeviceCategoriesResponse; - /** Field metric. */ - public metric?: (google.ads.admanager.v1.Report.Metric|keyof typeof google.ads.admanager.v1.Report.Metric|null); + /** + * Encodes the specified ListDeviceCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * @param message ListDeviceCategoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Field field. */ - public field?: ("dimension"|"metric"); + /** + * Encodes the specified ListDeviceCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * @param message ListDeviceCategoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Field instance using the specified properties. - * @param [properties] Properties to set - * @returns Field instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IField): google.ads.admanager.v1.Report.Field; + /** + * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceCategoriesResponse + * @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.ads.admanager.v1.ListDeviceCategoriesResponse; - /** - * Encodes the specified Field message. Does not implicitly {@link google.ads.admanager.v1.Report.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.IField, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceCategoriesResponse + * @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.ads.admanager.v1.ListDeviceCategoriesResponse; - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.IField, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ListDeviceCategoriesResponse 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 Field message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Field - * @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.ads.admanager.v1.Report.Field; + /** + * Creates a ListDeviceCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceCategoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceCategoriesResponse; - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Field - * @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.ads.admanager.v1.Report.Field; + /** + * Creates a plain object from a ListDeviceCategoriesResponse message. Also converts values to other types if specified. + * @param message ListDeviceCategoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceCategoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a Field 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 ListDeviceCategoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Field - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Field; + /** + * Gets the default type url for ListDeviceCategoriesResponse + * @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 Field message. Also converts values to other types if specified. - * @param message Field - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a DeviceManufacturer. */ + interface IDeviceManufacturer { - /** - * Converts this Field to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DeviceManufacturer name */ + name?: (string|null); - /** - * Gets the default type url for Field - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** DeviceManufacturer displayName */ + displayName?: (string|null); + } - /** Properties of a Slice. */ - interface ISlice { + /** Represents a DeviceManufacturer. */ + class DeviceManufacturer implements IDeviceManufacturer { - /** Slice dimension */ - dimension?: (google.ads.admanager.v1.Report.Dimension|keyof typeof google.ads.admanager.v1.Report.Dimension|null); + /** + * Constructs a new DeviceManufacturer. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceManufacturer); - /** Slice value */ - value?: (google.ads.admanager.v1.Report.IValue|null); - } + /** DeviceManufacturer name. */ + public name: string; - /** Represents a Slice. */ - class Slice implements ISlice { + /** DeviceManufacturer displayName. */ + public displayName?: (string|null); - /** - * Constructs a new Slice. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.ISlice); + /** + * Creates a new DeviceManufacturer instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceManufacturer instance + */ + public static create(properties?: google.ads.admanager.v1.IDeviceManufacturer): google.ads.admanager.v1.DeviceManufacturer; - /** Slice dimension. */ - public dimension: (google.ads.admanager.v1.Report.Dimension|keyof typeof google.ads.admanager.v1.Report.Dimension); + /** + * Encodes the specified DeviceManufacturer message. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturer.verify|verify} messages. + * @param message DeviceManufacturer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDeviceManufacturer, writer?: $protobuf.Writer): $protobuf.Writer; - /** Slice value. */ - public value?: (google.ads.admanager.v1.Report.IValue|null); + /** + * Encodes the specified DeviceManufacturer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturer.verify|verify} messages. + * @param message DeviceManufacturer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceManufacturer, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Slice instance using the specified properties. - * @param [properties] Properties to set - * @returns Slice instance - */ - public static create(properties?: google.ads.admanager.v1.Report.ISlice): google.ads.admanager.v1.Report.Slice; + /** + * Decodes a DeviceManufacturer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceManufacturer + * @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.ads.admanager.v1.DeviceManufacturer; - /** - * Encodes the specified Slice message. Does not implicitly {@link google.ads.admanager.v1.Report.Slice.verify|verify} messages. - * @param message Slice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a DeviceManufacturer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceManufacturer + * @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.ads.admanager.v1.DeviceManufacturer; - /** - * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Slice.verify|verify} messages. - * @param message Slice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a DeviceManufacturer 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 Slice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Slice - * @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.ads.admanager.v1.Report.Slice; + /** + * Creates a DeviceManufacturer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceManufacturer + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceManufacturer; - /** - * Decodes a Slice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Slice - * @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.ads.admanager.v1.Report.Slice; + /** + * Creates a plain object from a DeviceManufacturer message. Also converts values to other types if specified. + * @param message DeviceManufacturer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DeviceManufacturer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a Slice 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 DeviceManufacturer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a Slice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Slice - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Slice; + /** + * Gets the default type url for DeviceManufacturer + * @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 Slice message. Also converts values to other types if specified. - * @param message Slice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Slice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a DeviceManufacturerService */ + class DeviceManufacturerService extends $protobuf.rpc.Service { - /** - * Converts this Slice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new DeviceManufacturerService 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); - /** - * Gets the default type url for Slice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates new DeviceManufacturerService 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): DeviceManufacturerService; - /** Properties of a Filter. */ - interface IFilter { + /** + * Calls GetDeviceManufacturer. + * @param request GetDeviceManufacturerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeviceManufacturer + */ + public getDeviceManufacturer(request: google.ads.admanager.v1.IGetDeviceManufacturerRequest, callback: google.ads.admanager.v1.DeviceManufacturerService.GetDeviceManufacturerCallback): void; - /** Filter fieldFilter */ - fieldFilter?: (google.ads.admanager.v1.Report.Filter.IFieldFilter|null); + /** + * Calls GetDeviceManufacturer. + * @param request GetDeviceManufacturerRequest message or plain object + * @returns Promise + */ + public getDeviceManufacturer(request: google.ads.admanager.v1.IGetDeviceManufacturerRequest): Promise; - /** Filter notFilter */ - notFilter?: (google.ads.admanager.v1.Report.IFilter|null); + /** + * Calls ListDeviceManufacturers. + * @param request ListDeviceManufacturersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeviceManufacturersResponse + */ + public listDeviceManufacturers(request: google.ads.admanager.v1.IListDeviceManufacturersRequest, callback: google.ads.admanager.v1.DeviceManufacturerService.ListDeviceManufacturersCallback): void; - /** Filter andFilter */ - andFilter?: (google.ads.admanager.v1.Report.Filter.IFilterList|null); + /** + * Calls ListDeviceManufacturers. + * @param request ListDeviceManufacturersRequest message or plain object + * @returns Promise + */ + public listDeviceManufacturers(request: google.ads.admanager.v1.IListDeviceManufacturersRequest): Promise; + } - /** Filter orFilter */ - orFilter?: (google.ads.admanager.v1.Report.Filter.IFilterList|null); - } + namespace DeviceManufacturerService { - /** Represents a Filter. */ - class Filter implements IFilter { + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceManufacturerService|getDeviceManufacturer}. + * @param error Error, if any + * @param [response] DeviceManufacturer + */ + type GetDeviceManufacturerCallback = (error: (Error|null), response?: google.ads.admanager.v1.DeviceManufacturer) => void; - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IFilter); + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceManufacturerService|listDeviceManufacturers}. + * @param error Error, if any + * @param [response] ListDeviceManufacturersResponse + */ + type ListDeviceManufacturersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListDeviceManufacturersResponse) => void; + } - /** Filter fieldFilter. */ - public fieldFilter?: (google.ads.admanager.v1.Report.Filter.IFieldFilter|null); + /** Properties of a GetDeviceManufacturerRequest. */ + interface IGetDeviceManufacturerRequest { - /** Filter notFilter. */ - public notFilter?: (google.ads.admanager.v1.Report.IFilter|null); + /** GetDeviceManufacturerRequest name */ + name?: (string|null); + } - /** Filter andFilter. */ - public andFilter?: (google.ads.admanager.v1.Report.Filter.IFilterList|null); + /** Represents a GetDeviceManufacturerRequest. */ + class GetDeviceManufacturerRequest implements IGetDeviceManufacturerRequest { - /** Filter orFilter. */ - public orFilter?: (google.ads.admanager.v1.Report.Filter.IFilterList|null); + /** + * Constructs a new GetDeviceManufacturerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetDeviceManufacturerRequest); - /** Filter type. */ - public type?: ("fieldFilter"|"notFilter"|"andFilter"|"orFilter"); + /** GetDeviceManufacturerRequest name. */ + public name: string; - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IFilter): google.ads.admanager.v1.Report.Filter; + /** + * Creates a new GetDeviceManufacturerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeviceManufacturerRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetDeviceManufacturerRequest): google.ads.admanager.v1.GetDeviceManufacturerRequest; - /** - * Encodes the specified Filter message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetDeviceManufacturerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceManufacturerRequest.verify|verify} messages. + * @param message GetDeviceManufacturerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetDeviceManufacturerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetDeviceManufacturerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceManufacturerRequest.verify|verify} messages. + * @param message GetDeviceManufacturerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetDeviceManufacturerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @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.ads.admanager.v1.Report.Filter; + /** + * Decodes a GetDeviceManufacturerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeviceManufacturerRequest + * @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.ads.admanager.v1.GetDeviceManufacturerRequest; - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @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.ads.admanager.v1.Report.Filter; + /** + * Decodes a GetDeviceManufacturerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeviceManufacturerRequest + * @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.ads.admanager.v1.GetDeviceManufacturerRequest; - /** - * Verifies a Filter 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 GetDeviceManufacturerRequest 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 Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Filter; + /** + * Creates a GetDeviceManufacturerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeviceManufacturerRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetDeviceManufacturerRequest; - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a GetDeviceManufacturerRequest message. Also converts values to other types if specified. + * @param message GetDeviceManufacturerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetDeviceManufacturerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this GetDeviceManufacturerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Filter - * @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 GetDeviceManufacturerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - namespace Filter { + /** Properties of a ListDeviceManufacturersRequest. */ + interface IListDeviceManufacturersRequest { - /** Properties of a FieldFilter. */ - interface IFieldFilter { + /** ListDeviceManufacturersRequest parent */ + parent?: (string|null); - /** FieldFilter field */ - field?: (google.ads.admanager.v1.Report.IField|null); + /** ListDeviceManufacturersRequest pageSize */ + pageSize?: (number|null); - /** FieldFilter operation */ - operation?: (google.ads.admanager.v1.Report.Filter.Operation|keyof typeof google.ads.admanager.v1.Report.Filter.Operation|null); + /** ListDeviceManufacturersRequest pageToken */ + pageToken?: (string|null); - /** FieldFilter values */ - values?: (google.ads.admanager.v1.Report.IValue[]|null); + /** ListDeviceManufacturersRequest filter */ + filter?: (string|null); - /** FieldFilter slice */ - slice?: (google.ads.admanager.v1.Report.ISlice|null); + /** ListDeviceManufacturersRequest orderBy */ + orderBy?: (string|null); - /** FieldFilter timePeriodIndex */ - timePeriodIndex?: (number|null); + /** ListDeviceManufacturersRequest skip */ + skip?: (number|null); + } - /** FieldFilter metricValueType */ - metricValueType?: (google.ads.admanager.v1.Report.MetricValueType|keyof typeof google.ads.admanager.v1.Report.MetricValueType|null); - } + /** Represents a ListDeviceManufacturersRequest. */ + class ListDeviceManufacturersRequest implements IListDeviceManufacturersRequest { - /** Represents a FieldFilter. */ - class FieldFilter implements IFieldFilter { + /** + * Constructs a new ListDeviceManufacturersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceManufacturersRequest); - /** - * Constructs a new FieldFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.Filter.IFieldFilter); + /** ListDeviceManufacturersRequest parent. */ + public parent: string; - /** FieldFilter field. */ - public field?: (google.ads.admanager.v1.Report.IField|null); + /** ListDeviceManufacturersRequest pageSize. */ + public pageSize: number; - /** FieldFilter operation. */ - public operation: (google.ads.admanager.v1.Report.Filter.Operation|keyof typeof google.ads.admanager.v1.Report.Filter.Operation); + /** ListDeviceManufacturersRequest pageToken. */ + public pageToken: string; - /** FieldFilter values. */ - public values: google.ads.admanager.v1.Report.IValue[]; + /** ListDeviceManufacturersRequest filter. */ + public filter: string; - /** FieldFilter slice. */ - public slice?: (google.ads.admanager.v1.Report.ISlice|null); + /** ListDeviceManufacturersRequest orderBy. */ + public orderBy: string; - /** FieldFilter timePeriodIndex. */ - public timePeriodIndex?: (number|null); + /** ListDeviceManufacturersRequest skip. */ + public skip: number; - /** FieldFilter metricValueType. */ - public metricValueType?: (google.ads.admanager.v1.Report.MetricValueType|keyof typeof google.ads.admanager.v1.Report.MetricValueType|null); + /** + * Creates a new ListDeviceManufacturersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceManufacturersRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceManufacturersRequest): google.ads.admanager.v1.ListDeviceManufacturersRequest; - /** - * Creates a new FieldFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldFilter instance - */ - public static create(properties?: google.ads.admanager.v1.Report.Filter.IFieldFilter): google.ads.admanager.v1.Report.Filter.FieldFilter; + /** + * Encodes the specified ListDeviceManufacturersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersRequest.verify|verify} messages. + * @param message ListDeviceManufacturersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceManufacturersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified FieldFilter message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FieldFilter.verify|verify} messages. - * @param message FieldFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.Filter.IFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListDeviceManufacturersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersRequest.verify|verify} messages. + * @param message ListDeviceManufacturersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceManufacturersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified FieldFilter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FieldFilter.verify|verify} messages. - * @param message FieldFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.Filter.IFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListDeviceManufacturersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceManufacturersRequest + * @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.ads.admanager.v1.ListDeviceManufacturersRequest; - /** - * Decodes a FieldFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldFilter - * @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.ads.admanager.v1.Report.Filter.FieldFilter; + /** + * Decodes a ListDeviceManufacturersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceManufacturersRequest + * @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.ads.admanager.v1.ListDeviceManufacturersRequest; - /** - * Decodes a FieldFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldFilter - * @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.ads.admanager.v1.Report.Filter.FieldFilter; + /** + * Verifies a ListDeviceManufacturersRequest 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 FieldFilter 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 ListDeviceManufacturersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceManufacturersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceManufacturersRequest; - /** - * Creates a FieldFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldFilter - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Filter.FieldFilter; + /** + * Creates a plain object from a ListDeviceManufacturersRequest message. Also converts values to other types if specified. + * @param message ListDeviceManufacturersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceManufacturersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a FieldFilter message. Also converts values to other types if specified. - * @param message FieldFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Filter.FieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ListDeviceManufacturersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this FieldFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for ListDeviceManufacturersRequest + * @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 FieldFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a ListDeviceManufacturersResponse. */ + interface IListDeviceManufacturersResponse { - /** Properties of a FilterList. */ - interface IFilterList { + /** ListDeviceManufacturersResponse deviceManufacturers */ + deviceManufacturers?: (google.ads.admanager.v1.IDeviceManufacturer[]|null); - /** FilterList filters */ - filters?: (google.ads.admanager.v1.Report.IFilter[]|null); - } + /** ListDeviceManufacturersResponse nextPageToken */ + nextPageToken?: (string|null); - /** Represents a FilterList. */ - class FilterList implements IFilterList { + /** ListDeviceManufacturersResponse totalSize */ + totalSize?: (number|null); + } - /** - * Constructs a new FilterList. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.Filter.IFilterList); + /** Represents a ListDeviceManufacturersResponse. */ + class ListDeviceManufacturersResponse implements IListDeviceManufacturersResponse { - /** FilterList filters. */ - public filters: google.ads.admanager.v1.Report.IFilter[]; + /** + * Constructs a new ListDeviceManufacturersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListDeviceManufacturersResponse); - /** - * Creates a new FilterList instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterList instance - */ - public static create(properties?: google.ads.admanager.v1.Report.Filter.IFilterList): google.ads.admanager.v1.Report.Filter.FilterList; + /** ListDeviceManufacturersResponse deviceManufacturers. */ + public deviceManufacturers: google.ads.admanager.v1.IDeviceManufacturer[]; - /** - * Encodes the specified FilterList message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FilterList.verify|verify} messages. - * @param message FilterList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.Filter.IFilterList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceManufacturersResponse nextPageToken. */ + public nextPageToken: string; - /** - * Encodes the specified FilterList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FilterList.verify|verify} messages. - * @param message FilterList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.Filter.IFilterList, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDeviceManufacturersResponse totalSize. */ + public totalSize: number; - /** - * Decodes a FilterList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterList - * @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.ads.admanager.v1.Report.Filter.FilterList; + /** + * Creates a new ListDeviceManufacturersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeviceManufacturersResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListDeviceManufacturersResponse): google.ads.admanager.v1.ListDeviceManufacturersResponse; - /** - * Decodes a FilterList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterList - * @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.ads.admanager.v1.Report.Filter.FilterList; + /** + * Encodes the specified ListDeviceManufacturersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersResponse.verify|verify} messages. + * @param message ListDeviceManufacturersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListDeviceManufacturersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a FilterList 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 FilterList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterList - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Filter.FilterList; + /** + * Encodes the specified ListDeviceManufacturersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersResponse.verify|verify} messages. + * @param message ListDeviceManufacturersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListDeviceManufacturersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a FilterList message. Also converts values to other types if specified. - * @param message FilterList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Filter.FilterList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ListDeviceManufacturersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeviceManufacturersResponse + * @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.ads.admanager.v1.ListDeviceManufacturersResponse; - /** - * Converts this FilterList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ListDeviceManufacturersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeviceManufacturersResponse + * @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.ads.admanager.v1.ListDeviceManufacturersResponse; - /** - * Gets the default type url for FilterList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a ListDeviceManufacturersResponse 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); - /** Operation enum. */ - enum Operation { - IN = 0, - NOT_IN = 1, - CONTAINS = 2, - NOT_CONTAINS = 3, - LESS_THAN = 4, - LESS_THAN_EQUALS = 5, - GREATER_THAN = 6, - GREATER_THAN_EQUALS = 7, - BETWEEN = 8, - MATCHES = 9, - NOT_MATCHES = 10 - } - } + /** + * Creates a ListDeviceManufacturersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeviceManufacturersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListDeviceManufacturersResponse; - /** Properties of a Flag. */ - interface IFlag { + /** + * Creates a plain object from a ListDeviceManufacturersResponse message. Also converts values to other types if specified. + * @param message ListDeviceManufacturersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListDeviceManufacturersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Flag filters */ - filters?: (google.ads.admanager.v1.Report.IFilter[]|null); + /** + * Converts this ListDeviceManufacturersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Flag name */ - name?: (string|null); - } + /** + * Gets the default type url for ListDeviceManufacturersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a Flag. */ - class Flag implements IFlag { + /** Properties of an EntitySignalsMapping. */ + interface IEntitySignalsMapping { - /** - * Constructs a new Flag. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IFlag); + /** EntitySignalsMapping audienceSegmentId */ + audienceSegmentId?: (number|Long|string|null); - /** Flag filters. */ - public filters: google.ads.admanager.v1.Report.IFilter[]; + /** EntitySignalsMapping contentBundleId */ + contentBundleId?: (number|Long|string|null); - /** Flag name. */ - public name: string; + /** EntitySignalsMapping customTargetingValueId */ + customTargetingValueId?: (number|Long|string|null); - /** - * Creates a new Flag instance using the specified properties. - * @param [properties] Properties to set - * @returns Flag instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IFlag): google.ads.admanager.v1.Report.Flag; + /** EntitySignalsMapping name */ + name?: (string|null); - /** - * Encodes the specified Flag message. Does not implicitly {@link google.ads.admanager.v1.Report.Flag.verify|verify} messages. - * @param message Flag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.IFlag, writer?: $protobuf.Writer): $protobuf.Writer; + /** EntitySignalsMapping entitySignalsMappingId */ + entitySignalsMappingId?: (number|Long|string|null); - /** - * Encodes the specified Flag message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Flag.verify|verify} messages. - * @param message Flag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.IFlag, writer?: $protobuf.Writer): $protobuf.Writer; + /** EntitySignalsMapping taxonomyCategoryIds */ + taxonomyCategoryIds?: ((number|Long|string)[]|null); + } - /** - * Decodes a Flag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Flag - * @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.ads.admanager.v1.Report.Flag; + /** Represents an EntitySignalsMapping. */ + class EntitySignalsMapping implements IEntitySignalsMapping { - /** - * Decodes a Flag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Flag - * @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.ads.admanager.v1.Report.Flag; + /** + * Constructs a new EntitySignalsMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IEntitySignalsMapping); - /** - * Verifies a Flag 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); + /** EntitySignalsMapping audienceSegmentId. */ + public audienceSegmentId?: (number|Long|string|null); - /** - * Creates a Flag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Flag - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.Flag; + /** EntitySignalsMapping contentBundleId. */ + public contentBundleId?: (number|Long|string|null); - /** - * Creates a plain object from a Flag message. Also converts values to other types if specified. - * @param message Flag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.Flag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EntitySignalsMapping customTargetingValueId. */ + public customTargetingValueId?: (number|Long|string|null); - /** - * Converts this Flag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** EntitySignalsMapping name. */ + public name: string; - /** - * Gets the default type url for Flag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** EntitySignalsMapping entitySignalsMappingId. */ + public entitySignalsMappingId?: (number|Long|string|null); - /** Properties of a DateRange. */ - interface IDateRange { + /** EntitySignalsMapping taxonomyCategoryIds. */ + public taxonomyCategoryIds: (number|Long|string)[]; - /** DateRange fixed */ - fixed?: (google.ads.admanager.v1.Report.DateRange.IFixedDateRange|null); + /** EntitySignalsMapping entity. */ + public entity?: ("audienceSegmentId"|"contentBundleId"|"customTargetingValueId"); - /** DateRange relative */ - relative?: (google.ads.admanager.v1.Report.DateRange.RelativeDateRange|keyof typeof google.ads.admanager.v1.Report.DateRange.RelativeDateRange|null); - } + /** + * Creates a new EntitySignalsMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns EntitySignalsMapping instance + */ + public static create(properties?: google.ads.admanager.v1.IEntitySignalsMapping): google.ads.admanager.v1.EntitySignalsMapping; - /** Represents a DateRange. */ - class DateRange implements IDateRange { + /** + * Encodes the specified EntitySignalsMapping message. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * @param message EntitySignalsMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IEntitySignalsMapping, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DateRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.IDateRange); + /** + * Encodes the specified EntitySignalsMapping message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * @param message EntitySignalsMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IEntitySignalsMapping, writer?: $protobuf.Writer): $protobuf.Writer; - /** DateRange fixed. */ - public fixed?: (google.ads.admanager.v1.Report.DateRange.IFixedDateRange|null); + /** + * Decodes an EntitySignalsMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntitySignalsMapping + * @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.ads.admanager.v1.EntitySignalsMapping; - /** DateRange relative. */ - public relative?: (google.ads.admanager.v1.Report.DateRange.RelativeDateRange|keyof typeof google.ads.admanager.v1.Report.DateRange.RelativeDateRange|null); + /** + * Decodes an EntitySignalsMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntitySignalsMapping + * @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.ads.admanager.v1.EntitySignalsMapping; - /** DateRange dateRangeType. */ - public dateRangeType?: ("fixed"|"relative"); + /** + * Verifies an EntitySignalsMapping 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 new DateRange instance using the specified properties. - * @param [properties] Properties to set - * @returns DateRange instance - */ - public static create(properties?: google.ads.admanager.v1.Report.IDateRange): google.ads.admanager.v1.Report.DateRange; + /** + * Creates an EntitySignalsMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntitySignalsMapping + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.EntitySignalsMapping; - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an EntitySignalsMapping message. Also converts values to other types if specified. + * @param message EntitySignalsMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.EntitySignalsMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this EntitySignalsMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a DateRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DateRange - * @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.ads.admanager.v1.Report.DateRange; + /** + * Gets the default type url for EntitySignalsMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DateRange - * @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.ads.admanager.v1.Report.DateRange; + /** Represents an EntitySignalsMappingService */ + class EntitySignalsMappingService extends $protobuf.rpc.Service { - /** - * Verifies a DateRange 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); + /** + * Constructs a new EntitySignalsMappingService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DateRange - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.DateRange; + /** + * Creates new EntitySignalsMappingService 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): EntitySignalsMappingService; - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @param message DateRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls GetEntitySignalsMapping. + * @param request GetEntitySignalsMappingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + */ + public getEntitySignalsMapping(request: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMappingCallback): void; - /** - * Converts this DateRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls GetEntitySignalsMapping. + * @param request GetEntitySignalsMappingRequest message or plain object + * @returns Promise + */ + public getEntitySignalsMapping(request: google.ads.admanager.v1.IGetEntitySignalsMappingRequest): Promise; - /** - * Gets the default type url for DateRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls ListEntitySignalsMappings. + * @param request ListEntitySignalsMappingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitySignalsMappingsResponse + */ + public listEntitySignalsMappings(request: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappingsCallback): void; - namespace DateRange { + /** + * Calls ListEntitySignalsMappings. + * @param request ListEntitySignalsMappingsRequest message or plain object + * @returns Promise + */ + public listEntitySignalsMappings(request: google.ads.admanager.v1.IListEntitySignalsMappingsRequest): Promise; - /** Properties of a FixedDateRange. */ - interface IFixedDateRange { + /** + * Calls CreateEntitySignalsMapping. + * @param request CreateEntitySignalsMappingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + */ + public createEntitySignalsMapping(request: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMappingCallback): void; - /** FixedDateRange startDate */ - startDate?: (google.type.IDate|null); + /** + * Calls CreateEntitySignalsMapping. + * @param request CreateEntitySignalsMappingRequest message or plain object + * @returns Promise + */ + public createEntitySignalsMapping(request: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest): Promise; - /** FixedDateRange endDate */ - endDate?: (google.type.IDate|null); - } + /** + * Calls UpdateEntitySignalsMapping. + * @param request UpdateEntitySignalsMappingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntitySignalsMapping + */ + public updateEntitySignalsMapping(request: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMappingCallback): void; - /** Represents a FixedDateRange. */ - class FixedDateRange implements IFixedDateRange { + /** + * Calls UpdateEntitySignalsMapping. + * @param request UpdateEntitySignalsMappingRequest message or plain object + * @returns Promise + */ + public updateEntitySignalsMapping(request: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest): Promise; - /** - * Constructs a new FixedDateRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Report.DateRange.IFixedDateRange); + /** + * Calls BatchCreateEntitySignalsMappings. + * @param request BatchCreateEntitySignalsMappingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateEntitySignalsMappingsResponse + */ + public batchCreateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappingsCallback): void; - /** FixedDateRange startDate. */ - public startDate?: (google.type.IDate|null); + /** + * Calls BatchCreateEntitySignalsMappings. + * @param request BatchCreateEntitySignalsMappingsRequest message or plain object + * @returns Promise + */ + public batchCreateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest): Promise; - /** FixedDateRange endDate. */ - public endDate?: (google.type.IDate|null); + /** + * Calls BatchUpdateEntitySignalsMappings. + * @param request BatchUpdateEntitySignalsMappingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateEntitySignalsMappingsResponse + */ + public batchUpdateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, callback: google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappingsCallback): void; - /** - * Creates a new FixedDateRange instance using the specified properties. - * @param [properties] Properties to set - * @returns FixedDateRange instance - */ - public static create(properties?: google.ads.admanager.v1.Report.DateRange.IFixedDateRange): google.ads.admanager.v1.Report.DateRange.FixedDateRange; + /** + * Calls BatchUpdateEntitySignalsMappings. + * @param request BatchUpdateEntitySignalsMappingsRequest message or plain object + * @returns Promise + */ + public batchUpdateEntitySignalsMappings(request: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest): Promise; + } - /** - * Encodes the specified FixedDateRange message. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify|verify} messages. - * @param message FixedDateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Report.DateRange.IFixedDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + namespace EntitySignalsMappingService { - /** - * Encodes the specified FixedDateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify|verify} messages. - * @param message FixedDateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Report.DateRange.IFixedDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|getEntitySignalsMapping}. + * @param error Error, if any + * @param [response] EntitySignalsMapping + */ + type GetEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; - /** - * Decodes a FixedDateRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FixedDateRange - * @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.ads.admanager.v1.Report.DateRange.FixedDateRange; + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|listEntitySignalsMappings}. + * @param error Error, if any + * @param [response] ListEntitySignalsMappingsResponse + */ + type ListEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListEntitySignalsMappingsResponse) => void; - /** - * Decodes a FixedDateRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FixedDateRange - * @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.ads.admanager.v1.Report.DateRange.FixedDateRange; + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|createEntitySignalsMapping}. + * @param error Error, if any + * @param [response] EntitySignalsMapping + */ + type CreateEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; - /** - * Verifies a FixedDateRange 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); + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|updateEntitySignalsMapping}. + * @param error Error, if any + * @param [response] EntitySignalsMapping + */ + type UpdateEntitySignalsMappingCallback = (error: (Error|null), response?: google.ads.admanager.v1.EntitySignalsMapping) => void; - /** - * Creates a FixedDateRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FixedDateRange - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report.DateRange.FixedDateRange; + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchCreateEntitySignalsMappings}. + * @param error Error, if any + * @param [response] BatchCreateEntitySignalsMappingsResponse + */ + type BatchCreateEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse) => void; - /** - * Creates a plain object from a FixedDateRange message. Also converts values to other types if specified. - * @param message FixedDateRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Report.DateRange.FixedDateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchUpdateEntitySignalsMappings}. + * @param error Error, if any + * @param [response] BatchUpdateEntitySignalsMappingsResponse + */ + type BatchUpdateEntitySignalsMappingsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse) => void; + } - /** - * Converts this FixedDateRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a GetEntitySignalsMappingRequest. */ + interface IGetEntitySignalsMappingRequest { - /** - * Gets the default type url for FixedDateRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** GetEntitySignalsMappingRequest name */ + name?: (string|null); + } - /** RelativeDateRange enum. */ - enum RelativeDateRange { - RELATIVE_DATE_RANGE_UNSPECIFIED = 0, - TODAY = 1, - YESTERDAY = 2, - THIS_WEEK = 3, - THIS_WEEK_TO_DATE = 29, - THIS_MONTH = 4, - THIS_MONTH_TO_DATE = 26, - THIS_QUARTER = 5, - THIS_QUARTER_TO_DATE = 27, - THIS_YEAR = 6, - THIS_YEAR_TO_DATE = 28, - LAST_WEEK = 7, - LAST_MONTH = 8, - LAST_QUARTER = 9, - LAST_YEAR = 10, - LAST_7_DAYS = 11, - LAST_30_DAYS = 12, - LAST_60_DAYS = 13, - LAST_90_DAYS = 14, - LAST_180_DAYS = 15, - LAST_360_DAYS = 16, - LAST_365_DAYS = 17, - LAST_3_MONTHS = 18, - LAST_6_MONTHS = 19, - LAST_12_MONTHS = 20, - ALL_AVAILABLE = 21, - PREVIOUS_PERIOD = 22, - SAME_PERIOD_PREVIOUS_YEAR = 24 - } - } + /** Represents a GetEntitySignalsMappingRequest. */ + class GetEntitySignalsMappingRequest implements IGetEntitySignalsMappingRequest { - /** TimePeriodColumn enum. */ - enum TimePeriodColumn { - TIME_PERIOD_COLUMN_UNSPECIFIED = 0, - TIME_PERIOD_COLUMN_DATE = 1, - TIME_PERIOD_COLUMN_WEEK = 2, - TIME_PERIOD_COLUMN_MONTH = 3, - TIME_PERIOD_COLUMN_QUARTER = 4 - } + /** + * Constructs a new GetEntitySignalsMappingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetEntitySignalsMappingRequest); - /** Dimension enum. */ - enum Dimension { - DIMENSION_UNSPECIFIED = 0, - ADVERTISER_DOMAIN_NAME = 242, - ADVERTISER_EXTERNAL_ID = 228, - ADVERTISER_ID = 131, - ADVERTISER_LABELS = 230, - ADVERTISER_LABEL_IDS = 229, - ADVERTISER_NAME = 132, - ADVERTISER_PRIMARY_CONTACT = 227, - AD_LOCATION = 390, - AD_LOCATION_NAME = 391, - AD_UNIT_CODE = 64, - AD_UNIT_CODE_LEVEL_1 = 65, - AD_UNIT_CODE_LEVEL_10 = 74, - AD_UNIT_CODE_LEVEL_11 = 75, - AD_UNIT_CODE_LEVEL_12 = 76, - AD_UNIT_CODE_LEVEL_13 = 77, - AD_UNIT_CODE_LEVEL_14 = 78, - AD_UNIT_CODE_LEVEL_15 = 79, - AD_UNIT_CODE_LEVEL_16 = 80, - AD_UNIT_CODE_LEVEL_2 = 66, - AD_UNIT_CODE_LEVEL_3 = 67, - AD_UNIT_CODE_LEVEL_4 = 68, - AD_UNIT_CODE_LEVEL_5 = 69, - AD_UNIT_CODE_LEVEL_6 = 70, - AD_UNIT_CODE_LEVEL_7 = 71, - AD_UNIT_CODE_LEVEL_8 = 72, - AD_UNIT_CODE_LEVEL_9 = 73, - AD_UNIT_DEPTH = 101, - AD_UNIT_ID = 25, - AD_UNIT_ID_ALL_LEVEL = 27, - AD_UNIT_ID_LEVEL_1 = 30, - AD_UNIT_ID_LEVEL_10 = 48, - AD_UNIT_ID_LEVEL_11 = 50, - AD_UNIT_ID_LEVEL_12 = 52, - AD_UNIT_ID_LEVEL_13 = 54, - AD_UNIT_ID_LEVEL_14 = 56, - AD_UNIT_ID_LEVEL_15 = 58, - AD_UNIT_ID_LEVEL_16 = 60, - AD_UNIT_ID_LEVEL_2 = 32, - AD_UNIT_ID_LEVEL_3 = 34, - AD_UNIT_ID_LEVEL_4 = 36, - AD_UNIT_ID_LEVEL_5 = 38, - AD_UNIT_ID_LEVEL_6 = 40, - AD_UNIT_ID_LEVEL_7 = 42, - AD_UNIT_ID_LEVEL_8 = 44, - AD_UNIT_ID_LEVEL_9 = 46, - AD_UNIT_ID_TOP_LEVEL = 142, - AD_UNIT_NAME = 26, - AD_UNIT_NAME_ALL_LEVEL = 29, - AD_UNIT_NAME_LEVEL_1 = 31, - AD_UNIT_NAME_LEVEL_10 = 49, - AD_UNIT_NAME_LEVEL_11 = 51, - AD_UNIT_NAME_LEVEL_12 = 53, - AD_UNIT_NAME_LEVEL_13 = 55, - AD_UNIT_NAME_LEVEL_14 = 57, - AD_UNIT_NAME_LEVEL_15 = 59, - AD_UNIT_NAME_LEVEL_16 = 61, - AD_UNIT_NAME_LEVEL_2 = 33, - AD_UNIT_NAME_LEVEL_3 = 35, - AD_UNIT_NAME_LEVEL_4 = 37, - AD_UNIT_NAME_LEVEL_5 = 39, - AD_UNIT_NAME_LEVEL_6 = 41, - AD_UNIT_NAME_LEVEL_7 = 43, - AD_UNIT_NAME_LEVEL_8 = 45, - AD_UNIT_NAME_LEVEL_9 = 47, - AD_UNIT_NAME_TOP_LEVEL = 143, - AD_UNIT_REWARD_AMOUNT = 63, - AD_UNIT_REWARD_TYPE = 62, - AD_UNIT_STATUS = 206, - AD_UNIT_STATUS_NAME = 207, - APP_VERSION = 392, - BACKFILL_ADVERTISER_EXTERNAL_ID = 349, - BACKFILL_ADVERTISER_ID = 346, - BACKFILL_ADVERTISER_LABELS = 351, - BACKFILL_ADVERTISER_LABEL_IDS = 350, - BACKFILL_ADVERTISER_NAME = 347, - BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348, - BACKFILL_CREATIVE_BILLING_TYPE = 378, - BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379, - BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376, - BACKFILL_CREATIVE_ID = 370, - BACKFILL_CREATIVE_NAME = 371, - BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377, - BACKFILL_CREATIVE_TYPE = 374, - BACKFILL_CREATIVE_TYPE_NAME = 375, - BACKFILL_LINE_ITEM_ARCHIVED = 278, - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258, - BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259, - BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296, - BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297, - BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280, - BACKFILL_LINE_ITEM_COST_PER_UNIT = 272, - BACKFILL_LINE_ITEM_COST_TYPE = 264, - BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265, - BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381, - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290, - BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291, - BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380, - BACKFILL_LINE_ITEM_CURRENCY_CODE = 288, - BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274, - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292, - BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293, - BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294, - BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295, - BACKFILL_LINE_ITEM_END_DATE = 267, - BACKFILL_LINE_ITEM_END_DATE_TIME = 269, - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302, - BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257, - BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285, - BACKFILL_LINE_ITEM_EXTERNAL_ID = 273, - BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303, - BACKFILL_LINE_ITEM_ID = 298, - BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289, - BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283, - BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282, - BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284, - BACKFILL_LINE_ITEM_MAKEGOOD = 276, - BACKFILL_LINE_ITEM_NAME = 299, - BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286, - BACKFILL_LINE_ITEM_OPTIMIZABLE = 277, - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262, - BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263, - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260, - BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261, - BACKFILL_LINE_ITEM_PRIORITY = 266, - BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306, - BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307, - BACKFILL_LINE_ITEM_START_DATE = 268, - BACKFILL_LINE_ITEM_START_DATE_TIME = 270, - BACKFILL_LINE_ITEM_TYPE = 300, - BACKFILL_LINE_ITEM_TYPE_NAME = 301, - BACKFILL_LINE_ITEM_UNLIMITED_END = 271, - BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275, - BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287, - BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372, - BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373, - BACKFILL_ORDER_AGENCY = 313, - BACKFILL_ORDER_AGENCY_ID = 314, - BACKFILL_ORDER_BOOKED_CPC = 315, - BACKFILL_ORDER_BOOKED_CPM = 316, - BACKFILL_ORDER_DELIVERY_STATUS = 340, - BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341, - BACKFILL_ORDER_END_DATE = 317, - BACKFILL_ORDER_END_DATE_TIME = 319, - BACKFILL_ORDER_EXTERNAL_ID = 320, - BACKFILL_ORDER_ID = 338, - BACKFILL_ORDER_LABELS = 334, - BACKFILL_ORDER_LABEL_IDS = 335, - BACKFILL_ORDER_LIFETIME_CLICKS = 322, - BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323, - BACKFILL_ORDER_NAME = 339, - BACKFILL_ORDER_PO_NUMBER = 324, - BACKFILL_ORDER_PROGRAMMATIC = 321, - BACKFILL_ORDER_SALESPERSON = 325, - BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329, - BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328, - BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331, - BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330, - BACKFILL_ORDER_START_DATE = 332, - BACKFILL_ORDER_START_DATE_TIME = 333, - BACKFILL_ORDER_TRAFFICKER = 326, - BACKFILL_ORDER_TRAFFICKER_ID = 327, - BACKFILL_ORDER_UNLIMITED_END = 318, - BACKFILL_PROGRAMMATIC_BUYER_ID = 336, - BACKFILL_PROGRAMMATIC_BUYER_NAME = 337, - BRANDING_TYPE = 383, - BRANDING_TYPE_NAME = 384, - BROWSER_CATEGORY = 119, - BROWSER_CATEGORY_NAME = 120, - BROWSER_ID = 235, - BROWSER_NAME = 236, - CARRIER_ID = 369, - CARRIER_NAME = 368, - CLASSIFIED_ADVERTISER_ID = 133, - CLASSIFIED_ADVERTISER_NAME = 134, - CLASSIFIED_BRAND_ID = 243, - CLASSIFIED_BRAND_NAME = 244, - CONTENT_ID = 246, - CONTENT_NAME = 247, - COUNTRY_ID = 11, - COUNTRY_NAME = 12, - CREATIVE_BILLING_TYPE = 366, - CREATIVE_BILLING_TYPE_NAME = 367, - CREATIVE_CLICK_THROUGH_URL = 174, - CREATIVE_ID = 138, - CREATIVE_NAME = 139, - CREATIVE_TECHNOLOGY = 148, - CREATIVE_TECHNOLOGY_NAME = 149, - CREATIVE_THIRD_PARTY_VENDOR = 361, - CREATIVE_TYPE = 344, - CREATIVE_TYPE_NAME = 345, - DATE = 3, - DAY_OF_WEEK = 4, - DEMAND_CHANNEL = 9, - DEMAND_CHANNEL_NAME = 10, - DEMAND_SUBCHANNEL = 22, - DEMAND_SUBCHANNEL_NAME = 23, - DEVICE = 226, - DEVICE_CATEGORY = 15, - DEVICE_CATEGORY_NAME = 16, - DEVICE_NAME = 225, - EXCHANGE_THIRD_PARTY_COMPANY_ID = 185, - EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186, - FIRST_LOOK_PRICING_RULE_ID = 248, - FIRST_LOOK_PRICING_RULE_NAME = 249, - HOUR = 100, - INTERACTION_TYPE = 223, - INTERACTION_TYPE_NAME = 224, - INVENTORY_FORMAT = 17, - INVENTORY_FORMAT_NAME = 18, - INVENTORY_TYPE = 19, - INVENTORY_TYPE_NAME = 20, - IS_ADX_DIRECT = 382, - IS_FIRST_LOOK_DEAL = 401, - KEY_VALUES_ID = 214, - KEY_VALUES_NAME = 215, - LINE_ITEM_ARCHIVED = 188, - LINE_ITEM_COMPANION_DELIVERY_OPTION = 204, - LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205, - LINE_ITEM_COMPUTED_STATUS = 250, - LINE_ITEM_COMPUTED_STATUS_NAME = 251, - LINE_ITEM_CONTRACTED_QUANTITY = 92, - LINE_ITEM_COST_PER_UNIT = 85, - LINE_ITEM_COST_TYPE = 212, - LINE_ITEM_COST_TYPE_NAME = 213, - LINE_ITEM_CREATIVE_END_DATE = 176, - LINE_ITEM_CREATIVE_ROTATION_TYPE = 189, - LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190, - LINE_ITEM_CREATIVE_START_DATE = 175, - LINE_ITEM_CURRENCY_CODE = 180, - LINE_ITEM_DELIVERY_INDICATOR = 87, - LINE_ITEM_DELIVERY_RATE_TYPE = 191, - LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192, - LINE_ITEM_DISCOUNT_ABSOLUTE = 195, - LINE_ITEM_DISCOUNT_PERCENTAGE = 196, - LINE_ITEM_END_DATE = 81, - LINE_ITEM_END_DATE_TIME = 83, - LINE_ITEM_ENVIRONMENT_TYPE = 201, - LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202, - LINE_ITEM_EXTERNAL_DEAL_ID = 97, - LINE_ITEM_EXTERNAL_ID = 86, - LINE_ITEM_FREQUENCY_CAP = 256, - LINE_ITEM_ID = 1, - LINE_ITEM_LAST_MODIFIED_BY_APP = 181, - LINE_ITEM_LIFETIME_CLICKS = 95, - LINE_ITEM_LIFETIME_IMPRESSIONS = 94, - LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96, - LINE_ITEM_MAKEGOOD = 89, - LINE_ITEM_NAME = 2, - LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98, - LINE_ITEM_OPTIMIZABLE = 90, - LINE_ITEM_PRIMARY_GOAL_TYPE = 210, - LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211, - LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93, - LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396, - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208, - LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209, - LINE_ITEM_PRIORITY = 24, - LINE_ITEM_RESERVATION_STATUS = 304, - LINE_ITEM_RESERVATION_STATUS_NAME = 305, - LINE_ITEM_START_DATE = 82, - LINE_ITEM_START_DATE_TIME = 84, - LINE_ITEM_TYPE = 193, - LINE_ITEM_TYPE_NAME = 194, - LINE_ITEM_UNLIMITED_END = 187, - LINE_ITEM_VALUE_COST_PER_UNIT = 88, - LINE_ITEM_WEB_PROPERTY_CODE = 179, - MASTER_COMPANION_CREATIVE_ID = 140, - MASTER_COMPANION_CREATIVE_NAME = 141, - MOBILE_APP_FREE = 128, - MOBILE_APP_ICON_URL = 129, - MOBILE_APP_ID = 123, - MOBILE_APP_NAME = 127, - MOBILE_APP_OWNERSHIP_STATUS = 311, - MOBILE_APP_OWNERSHIP_STATUS_NAME = 312, - MOBILE_APP_STORE = 125, - MOBILE_APP_STORE_NAME = 245, - MOBILE_INVENTORY_TYPE = 99, - MOBILE_INVENTORY_TYPE_NAME = 21, - MOBILE_SDK_VERSION_NAME = 130, - MONTH_YEAR = 6, - NATIVE_AD_FORMAT_ID = 255, - NATIVE_AD_FORMAT_NAME = 254, - NATIVE_STYLE_ID = 253, - NATIVE_STYLE_NAME = 252, - OPERATING_SYSTEM_CATEGORY = 117, - OPERATING_SYSTEM_CATEGORY_NAME = 118, - OPERATING_SYSTEM_VERSION_ID = 238, - OPERATING_SYSTEM_VERSION_NAME = 237, - ORDER_AGENCY = 150, - ORDER_AGENCY_ID = 151, - ORDER_BOOKED_CPC = 152, - ORDER_BOOKED_CPM = 153, - ORDER_DELIVERY_STATUS = 231, - ORDER_DELIVERY_STATUS_NAME = 239, - ORDER_END_DATE = 154, - ORDER_END_DATE_TIME = 155, - ORDER_EXTERNAL_ID = 156, - ORDER_ID = 7, - ORDER_LABELS = 170, - ORDER_LABEL_IDS = 171, - ORDER_LIFETIME_CLICKS = 158, - ORDER_LIFETIME_IMPRESSIONS = 159, - ORDER_NAME = 8, - ORDER_PO_NUMBER = 160, - ORDER_PROGRAMMATIC = 157, - ORDER_SALESPERSON = 161, - ORDER_SECONDARY_SALESPEOPLE = 164, - ORDER_SECONDARY_SALESPEOPLE_ID = 165, - ORDER_SECONDARY_TRAFFICKERS = 166, - ORDER_SECONDARY_TRAFFICKERS_ID = 167, - ORDER_START_DATE = 168, - ORDER_START_DATE_TIME = 169, - ORDER_TRAFFICKER = 162, - ORDER_TRAFFICKER_ID = 163, - ORDER_UNLIMITED_END = 203, - PLACEMENT_ID = 113, - PLACEMENT_ID_ALL = 144, - PLACEMENT_NAME = 114, - PLACEMENT_NAME_ALL = 145, - PLACEMENT_STATUS = 362, - PLACEMENT_STATUS_ALL = 363, - PLACEMENT_STATUS_NAME = 364, - PLACEMENT_STATUS_NAME_ALL = 365, - PROGRAMMATIC_BUYER_ID = 240, - PROGRAMMATIC_BUYER_NAME = 241, - PROGRAMMATIC_CHANNEL = 13, - PROGRAMMATIC_CHANNEL_NAME = 14, - RENDERED_CREATIVE_SIZE = 343, - REQUESTED_AD_SIZES = 352, - REQUEST_TYPE = 146, - REQUEST_TYPE_NAME = 147, - SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597, - SITE = 387, - TARGETING_ID = 232, - TARGETING_NAME = 233, - TARGETING_TYPE = 385, - TARGETING_TYPE_NAME = 386, - TRAFFIC_SOURCE = 388, - TRAFFIC_SOURCE_NAME = 389, - UNIFIED_PRICING_RULE_ID = 393, - UNIFIED_PRICING_RULE_NAME = 394, - VIDEO_PLCMT = 172, - VIDEO_PLCMT_NAME = 173, - WEEK = 5, - YIELD_GROUP_BUYER_NAME = 184, - YIELD_GROUP_ID = 182, - YIELD_GROUP_NAME = 183, - LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000, - LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001, - LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002, - LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003, - LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004, - LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005, - LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006, - LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007, - LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008, - LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009, - LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010, - LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011, - LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012, - LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013, - LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014, - LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000, - LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001, - LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002, - LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003, - LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004, - LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005, - LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006, - LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007, - LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008, - LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009, - LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010, - LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011, - LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012, - LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013, - LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014, - ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000, - ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001, - ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002, - ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003, - ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004, - ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005, - ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006, - ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007, - ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008, - ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009, - ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010, - ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011, - ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012, - ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013, - ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014, - ORDER_CUSTOM_FIELD_0_VALUE = 13000, - ORDER_CUSTOM_FIELD_1_VALUE = 13001, - ORDER_CUSTOM_FIELD_2_VALUE = 13002, - ORDER_CUSTOM_FIELD_3_VALUE = 13003, - ORDER_CUSTOM_FIELD_4_VALUE = 13004, - ORDER_CUSTOM_FIELD_5_VALUE = 13005, - ORDER_CUSTOM_FIELD_6_VALUE = 13006, - ORDER_CUSTOM_FIELD_7_VALUE = 13007, - ORDER_CUSTOM_FIELD_8_VALUE = 13008, - ORDER_CUSTOM_FIELD_9_VALUE = 13009, - ORDER_CUSTOM_FIELD_10_VALUE = 13010, - ORDER_CUSTOM_FIELD_11_VALUE = 13011, - ORDER_CUSTOM_FIELD_12_VALUE = 13012, - ORDER_CUSTOM_FIELD_13_VALUE = 13013, - ORDER_CUSTOM_FIELD_14_VALUE = 13014, - CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000, - CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001, - CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002, - CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003, - CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004, - CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005, - CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006, - CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007, - CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008, - CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009, - CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010, - CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011, - CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012, - CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013, - CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014, - CREATIVE_CUSTOM_FIELD_0_VALUE = 15000, - CREATIVE_CUSTOM_FIELD_1_VALUE = 15001, - CREATIVE_CUSTOM_FIELD_2_VALUE = 15002, - CREATIVE_CUSTOM_FIELD_3_VALUE = 15003, - CREATIVE_CUSTOM_FIELD_4_VALUE = 15004, - CREATIVE_CUSTOM_FIELD_5_VALUE = 15005, - CREATIVE_CUSTOM_FIELD_6_VALUE = 15006, - CREATIVE_CUSTOM_FIELD_7_VALUE = 15007, - CREATIVE_CUSTOM_FIELD_8_VALUE = 15008, - CREATIVE_CUSTOM_FIELD_9_VALUE = 15009, - CREATIVE_CUSTOM_FIELD_10_VALUE = 15010, - CREATIVE_CUSTOM_FIELD_11_VALUE = 15011, - CREATIVE_CUSTOM_FIELD_12_VALUE = 15012, - CREATIVE_CUSTOM_FIELD_13_VALUE = 15013, - CREATIVE_CUSTOM_FIELD_14_VALUE = 15014, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013, - BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014, - BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000, - BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001, - BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002, - BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003, - BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004, - BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005, - BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006, - BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007, - BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008, - BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009, - BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010, - BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011, - BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012, - BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013, - BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014, - BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000, - BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001, - BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002, - BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003, - BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004, - BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005, - BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006, - BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007, - BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008, - BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009, - BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010, - BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011, - BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012, - BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013, - BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014, - BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000, - BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001, - BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002, - BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003, - BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004, - BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005, - BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006, - BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007, - BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008, - BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009, - BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010, - BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011, - BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012, - BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013, - BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014, - BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000, - BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001, - BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002, - BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003, - BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004, - BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005, - BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006, - BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007, - BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008, - BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009, - BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010, - BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011, - BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012, - BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013, - BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014, - CUSTOM_DIMENSION_0_VALUE_ID = 100000, - CUSTOM_DIMENSION_1_VALUE_ID = 100001, - CUSTOM_DIMENSION_2_VALUE_ID = 100002, - CUSTOM_DIMENSION_3_VALUE_ID = 100003, - CUSTOM_DIMENSION_4_VALUE_ID = 100004, + /** GetEntitySignalsMappingRequest name. */ + public name: string; + + /** + * Creates a new GetEntitySignalsMappingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntitySignalsMappingRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetEntitySignalsMappingRequest): google.ads.admanager.v1.GetEntitySignalsMappingRequest; + + /** + * Encodes the specified GetEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * @param message GetEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * @param message GetEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntitySignalsMappingRequest + * @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.ads.admanager.v1.GetEntitySignalsMappingRequest; + + /** + * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntitySignalsMappingRequest + * @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.ads.admanager.v1.GetEntitySignalsMappingRequest; + + /** + * Verifies a GetEntitySignalsMappingRequest 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 GetEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntitySignalsMappingRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetEntitySignalsMappingRequest; + + /** + * Creates a plain object from a GetEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @param message GetEntitySignalsMappingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntitySignalsMappingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEntitySignalsMappingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEntitySignalsMappingsRequest. */ + interface IListEntitySignalsMappingsRequest { + + /** ListEntitySignalsMappingsRequest parent */ + parent?: (string|null); + + /** ListEntitySignalsMappingsRequest pageSize */ + pageSize?: (number|null); + + /** ListEntitySignalsMappingsRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitySignalsMappingsRequest filter */ + filter?: (string|null); + + /** ListEntitySignalsMappingsRequest orderBy */ + orderBy?: (string|null); + + /** ListEntitySignalsMappingsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListEntitySignalsMappingsRequest. */ + class ListEntitySignalsMappingsRequest implements IListEntitySignalsMappingsRequest { + + /** + * Constructs a new ListEntitySignalsMappingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsRequest); + + /** ListEntitySignalsMappingsRequest parent. */ + public parent: string; + + /** ListEntitySignalsMappingsRequest pageSize. */ + public pageSize: number; + + /** ListEntitySignalsMappingsRequest pageToken. */ + public pageToken: string; + + /** ListEntitySignalsMappingsRequest filter. */ + public filter: string; + + /** ListEntitySignalsMappingsRequest orderBy. */ + public orderBy: string; + + /** ListEntitySignalsMappingsRequest skip. */ + public skip: number; + + /** + * Creates a new ListEntitySignalsMappingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitySignalsMappingsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsRequest): google.ads.admanager.v1.ListEntitySignalsMappingsRequest; + + /** + * Encodes the specified ListEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * @param message ListEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * @param message ListEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitySignalsMappingsRequest + * @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.ads.admanager.v1.ListEntitySignalsMappingsRequest; + + /** + * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitySignalsMappingsRequest + * @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.ads.admanager.v1.ListEntitySignalsMappingsRequest; + + /** + * Verifies a ListEntitySignalsMappingsRequest 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 ListEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitySignalsMappingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListEntitySignalsMappingsRequest; + + /** + * Creates a plain object from a ListEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @param message ListEntitySignalsMappingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitySignalsMappingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitySignalsMappingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateEntitySignalsMappingRequest. */ + interface ICreateEntitySignalsMappingRequest { + + /** CreateEntitySignalsMappingRequest parent */ + parent?: (string|null); + + /** CreateEntitySignalsMappingRequest entitySignalsMapping */ + entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + } + + /** Represents a CreateEntitySignalsMappingRequest. */ + class CreateEntitySignalsMappingRequest implements ICreateEntitySignalsMappingRequest { + + /** + * Constructs a new CreateEntitySignalsMappingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest); + + /** CreateEntitySignalsMappingRequest parent. */ + public parent: string; + + /** CreateEntitySignalsMappingRequest entitySignalsMapping. */ + public entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + + /** + * Creates a new CreateEntitySignalsMappingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntitySignalsMappingRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest): google.ads.admanager.v1.CreateEntitySignalsMappingRequest; + + /** + * Encodes the specified CreateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * @param message CreateEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * @param message CreateEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntitySignalsMappingRequest + * @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.ads.admanager.v1.CreateEntitySignalsMappingRequest; + + /** + * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntitySignalsMappingRequest + * @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.ads.admanager.v1.CreateEntitySignalsMappingRequest; + + /** + * Verifies a CreateEntitySignalsMappingRequest 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 CreateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntitySignalsMappingRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateEntitySignalsMappingRequest; + + /** + * Creates a plain object from a CreateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @param message CreateEntitySignalsMappingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreateEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEntitySignalsMappingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEntitySignalsMappingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEntitySignalsMappingRequest. */ + interface IUpdateEntitySignalsMappingRequest { + + /** UpdateEntitySignalsMappingRequest entitySignalsMapping */ + entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + + /** UpdateEntitySignalsMappingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEntitySignalsMappingRequest. */ + class UpdateEntitySignalsMappingRequest implements IUpdateEntitySignalsMappingRequest { + + /** + * Constructs a new UpdateEntitySignalsMappingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest); + + /** UpdateEntitySignalsMappingRequest entitySignalsMapping. */ + public entitySignalsMapping?: (google.ads.admanager.v1.IEntitySignalsMapping|null); + + /** UpdateEntitySignalsMappingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEntitySignalsMappingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntitySignalsMappingRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest): google.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + + /** + * Encodes the specified UpdateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * @param message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * @param message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEntitySignalsMappingRequest + * @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.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + + /** + * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntitySignalsMappingRequest + * @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.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + + /** + * Verifies an UpdateEntitySignalsMappingRequest 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 UpdateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntitySignalsMappingRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateEntitySignalsMappingRequest; + + /** + * Creates a plain object from an UpdateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @param message UpdateEntitySignalsMappingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UpdateEntitySignalsMappingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEntitySignalsMappingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEntitySignalsMappingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEntitySignalsMappingsResponse. */ + interface IListEntitySignalsMappingsResponse { + + /** ListEntitySignalsMappingsResponse entitySignalsMappings */ + entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + + /** ListEntitySignalsMappingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListEntitySignalsMappingsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListEntitySignalsMappingsResponse. */ + class ListEntitySignalsMappingsResponse implements IListEntitySignalsMappingsResponse { + + /** + * Constructs a new ListEntitySignalsMappingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsResponse); + + /** ListEntitySignalsMappingsResponse entitySignalsMappings. */ + public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; + + /** ListEntitySignalsMappingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListEntitySignalsMappingsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListEntitySignalsMappingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitySignalsMappingsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListEntitySignalsMappingsResponse): google.ads.admanager.v1.ListEntitySignalsMappingsResponse; + + /** + * Encodes the specified ListEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * @param message ListEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * @param message ListEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitySignalsMappingsResponse + * @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.ads.admanager.v1.ListEntitySignalsMappingsResponse; + + /** + * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitySignalsMappingsResponse + * @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.ads.admanager.v1.ListEntitySignalsMappingsResponse; + + /** + * Verifies a ListEntitySignalsMappingsResponse 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 ListEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitySignalsMappingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListEntitySignalsMappingsResponse; + + /** + * Creates a plain object from a ListEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @param message ListEntitySignalsMappingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitySignalsMappingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitySignalsMappingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateEntitySignalsMappingsRequest. */ + interface IBatchCreateEntitySignalsMappingsRequest { + + /** BatchCreateEntitySignalsMappingsRequest parent */ + parent?: (string|null); + + /** BatchCreateEntitySignalsMappingsRequest requests */ + requests?: (google.ads.admanager.v1.ICreateEntitySignalsMappingRequest[]|null); + } + + /** Represents a BatchCreateEntitySignalsMappingsRequest. */ + class BatchCreateEntitySignalsMappingsRequest implements IBatchCreateEntitySignalsMappingsRequest { + + /** + * Constructs a new BatchCreateEntitySignalsMappingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest); + + /** BatchCreateEntitySignalsMappingsRequest parent. */ + public parent: string; + + /** BatchCreateEntitySignalsMappingsRequest requests. */ + public requests: google.ads.admanager.v1.ICreateEntitySignalsMappingRequest[]; + + /** + * Creates a new BatchCreateEntitySignalsMappingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateEntitySignalsMappingsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * @param message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * @param message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateEntitySignalsMappingsRequest + * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + + /** + * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateEntitySignalsMappingsRequest + * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + + /** + * Verifies a BatchCreateEntitySignalsMappingsRequest 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 BatchCreateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateEntitySignalsMappingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest; + + /** + * Creates a plain object from a BatchCreateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @param message BatchCreateEntitySignalsMappingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateEntitySignalsMappingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateEntitySignalsMappingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateEntitySignalsMappingsResponse. */ + interface IBatchCreateEntitySignalsMappingsResponse { + + /** BatchCreateEntitySignalsMappingsResponse entitySignalsMappings */ + entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + } + + /** Represents a BatchCreateEntitySignalsMappingsResponse. */ + class BatchCreateEntitySignalsMappingsResponse implements IBatchCreateEntitySignalsMappingsResponse { + + /** + * Constructs a new BatchCreateEntitySignalsMappingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse); + + /** BatchCreateEntitySignalsMappingsResponse entitySignalsMappings. */ + public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; + + /** + * Creates a new BatchCreateEntitySignalsMappingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateEntitySignalsMappingsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * @param message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * @param message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateEntitySignalsMappingsResponse + * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + + /** + * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateEntitySignalsMappingsResponse + * @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.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + + /** + * Verifies a BatchCreateEntitySignalsMappingsResponse 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 BatchCreateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateEntitySignalsMappingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse; + + /** + * Creates a plain object from a BatchCreateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @param message BatchCreateEntitySignalsMappingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateEntitySignalsMappingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateEntitySignalsMappingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdateEntitySignalsMappingsRequest. */ + interface IBatchUpdateEntitySignalsMappingsRequest { + + /** BatchUpdateEntitySignalsMappingsRequest parent */ + parent?: (string|null); + + /** BatchUpdateEntitySignalsMappingsRequest requests */ + requests?: (google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest[]|null); + } + + /** Represents a BatchUpdateEntitySignalsMappingsRequest. */ + class BatchUpdateEntitySignalsMappingsRequest implements IBatchUpdateEntitySignalsMappingsRequest { + + /** + * Constructs a new BatchUpdateEntitySignalsMappingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest); + + /** BatchUpdateEntitySignalsMappingsRequest parent. */ + public parent: string; + + /** BatchUpdateEntitySignalsMappingsRequest requests. */ + public requests: google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest[]; + + /** + * Creates a new BatchUpdateEntitySignalsMappingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateEntitySignalsMappingsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * @param message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * @param message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateEntitySignalsMappingsRequest + * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateEntitySignalsMappingsRequest + * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + + /** + * Verifies a BatchUpdateEntitySignalsMappingsRequest 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 BatchUpdateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateEntitySignalsMappingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest; + + /** + * Creates a plain object from a BatchUpdateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateEntitySignalsMappingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdateEntitySignalsMappingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdateEntitySignalsMappingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdateEntitySignalsMappingsResponse. */ + interface IBatchUpdateEntitySignalsMappingsResponse { + + /** BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings */ + entitySignalsMappings?: (google.ads.admanager.v1.IEntitySignalsMapping[]|null); + } + + /** Represents a BatchUpdateEntitySignalsMappingsResponse. */ + class BatchUpdateEntitySignalsMappingsResponse implements IBatchUpdateEntitySignalsMappingsResponse { + + /** + * Constructs a new BatchUpdateEntitySignalsMappingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse); + + /** BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings. */ + public entitySignalsMappings: google.ads.admanager.v1.IEntitySignalsMapping[]; + + /** + * Creates a new BatchUpdateEntitySignalsMappingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateEntitySignalsMappingsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * @param message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * @param message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateEntitySignalsMappingsResponse + * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateEntitySignalsMappingsResponse + * @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.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + + /** + * Verifies a BatchUpdateEntitySignalsMappingsResponse 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 BatchUpdateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateEntitySignalsMappingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse; + + /** + * Creates a plain object from a BatchUpdateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateEntitySignalsMappingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdateEntitySignalsMappingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdateEntitySignalsMappingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GeoTarget. */ + interface IGeoTarget { + + /** GeoTarget name */ + name?: (string|null); + + /** GeoTarget displayName */ + displayName?: (string|null); + + /** GeoTarget canonicalParent */ + canonicalParent?: (string|null); + + /** GeoTarget parentNames */ + parentNames?: (string[]|null); + + /** GeoTarget regionCode */ + regionCode?: (string|null); + + /** GeoTarget type */ + type?: (string|null); + + /** GeoTarget targetable */ + targetable?: (boolean|null); + } + + /** Represents a GeoTarget. */ + class GeoTarget implements IGeoTarget { + + /** + * Constructs a new GeoTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGeoTarget); + + /** GeoTarget name. */ + public name: string; + + /** GeoTarget displayName. */ + public displayName?: (string|null); + + /** GeoTarget canonicalParent. */ + public canonicalParent?: (string|null); + + /** GeoTarget parentNames. */ + public parentNames: string[]; + + /** GeoTarget regionCode. */ + public regionCode?: (string|null); + + /** GeoTarget type. */ + public type?: (string|null); + + /** GeoTarget targetable. */ + public targetable?: (boolean|null); + + /** + * Creates a new GeoTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns GeoTarget instance + */ + public static create(properties?: google.ads.admanager.v1.IGeoTarget): google.ads.admanager.v1.GeoTarget; + + /** + * Encodes the specified GeoTarget message. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * @param message GeoTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGeoTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeoTarget message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * @param message GeoTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGeoTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeoTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeoTarget + * @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.ads.admanager.v1.GeoTarget; + + /** + * Decodes a GeoTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeoTarget + * @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.ads.admanager.v1.GeoTarget; + + /** + * Verifies a GeoTarget 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 GeoTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeoTarget + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GeoTarget; + + /** + * Creates a plain object from a GeoTarget message. Also converts values to other types if specified. + * @param message GeoTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GeoTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeoTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeoTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a GeoTargetService */ + class GeoTargetService extends $protobuf.rpc.Service { + + /** + * Constructs a new GeoTargetService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new GeoTargetService 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): GeoTargetService; + + /** + * Calls GetGeoTarget. + * @param request GetGeoTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GeoTarget + */ + public getGeoTarget(request: google.ads.admanager.v1.IGetGeoTargetRequest, callback: google.ads.admanager.v1.GeoTargetService.GetGeoTargetCallback): void; + + /** + * Calls GetGeoTarget. + * @param request GetGeoTargetRequest message or plain object + * @returns Promise + */ + public getGeoTarget(request: google.ads.admanager.v1.IGetGeoTargetRequest): Promise; + + /** + * Calls ListGeoTargets. + * @param request ListGeoTargetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGeoTargetsResponse + */ + public listGeoTargets(request: google.ads.admanager.v1.IListGeoTargetsRequest, callback: google.ads.admanager.v1.GeoTargetService.ListGeoTargetsCallback): void; + + /** + * Calls ListGeoTargets. + * @param request ListGeoTargetsRequest message or plain object + * @returns Promise + */ + public listGeoTargets(request: google.ads.admanager.v1.IListGeoTargetsRequest): Promise; + } + + namespace GeoTargetService { + + /** + * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|getGeoTarget}. + * @param error Error, if any + * @param [response] GeoTarget + */ + type GetGeoTargetCallback = (error: (Error|null), response?: google.ads.admanager.v1.GeoTarget) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|listGeoTargets}. + * @param error Error, if any + * @param [response] ListGeoTargetsResponse + */ + type ListGeoTargetsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListGeoTargetsResponse) => void; + } + + /** Properties of a GetGeoTargetRequest. */ + interface IGetGeoTargetRequest { + + /** GetGeoTargetRequest name */ + name?: (string|null); + } + + /** Represents a GetGeoTargetRequest. */ + class GetGeoTargetRequest implements IGetGeoTargetRequest { + + /** + * Constructs a new GetGeoTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetGeoTargetRequest); + + /** GetGeoTargetRequest name. */ + public name: string; + + /** + * Creates a new GetGeoTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGeoTargetRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetGeoTargetRequest): google.ads.admanager.v1.GetGeoTargetRequest; + + /** + * Encodes the specified GetGeoTargetRequest message. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * @param message GetGeoTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetGeoTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGeoTargetRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * @param message GetGeoTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetGeoTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGeoTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGeoTargetRequest + * @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.ads.admanager.v1.GetGeoTargetRequest; + + /** + * Decodes a GetGeoTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGeoTargetRequest + * @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.ads.admanager.v1.GetGeoTargetRequest; + + /** + * Verifies a GetGeoTargetRequest 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 GetGeoTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGeoTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetGeoTargetRequest; + + /** + * Creates a plain object from a GetGeoTargetRequest message. Also converts values to other types if specified. + * @param message GetGeoTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetGeoTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGeoTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGeoTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGeoTargetsRequest. */ + interface IListGeoTargetsRequest { + + /** ListGeoTargetsRequest parent */ + parent?: (string|null); + + /** ListGeoTargetsRequest pageSize */ + pageSize?: (number|null); + + /** ListGeoTargetsRequest pageToken */ + pageToken?: (string|null); + + /** ListGeoTargetsRequest filter */ + filter?: (string|null); + + /** ListGeoTargetsRequest orderBy */ + orderBy?: (string|null); + + /** ListGeoTargetsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListGeoTargetsRequest. */ + class ListGeoTargetsRequest implements IListGeoTargetsRequest { + + /** + * Constructs a new ListGeoTargetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListGeoTargetsRequest); + + /** ListGeoTargetsRequest parent. */ + public parent: string; + + /** ListGeoTargetsRequest pageSize. */ + public pageSize: number; + + /** ListGeoTargetsRequest pageToken. */ + public pageToken: string; + + /** ListGeoTargetsRequest filter. */ + public filter: string; + + /** ListGeoTargetsRequest orderBy. */ + public orderBy: string; + + /** ListGeoTargetsRequest skip. */ + public skip: number; + + /** + * Creates a new ListGeoTargetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGeoTargetsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListGeoTargetsRequest): google.ads.admanager.v1.ListGeoTargetsRequest; + + /** + * Encodes the specified ListGeoTargetsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * @param message ListGeoTargetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListGeoTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGeoTargetsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * @param message ListGeoTargetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListGeoTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGeoTargetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGeoTargetsRequest + * @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.ads.admanager.v1.ListGeoTargetsRequest; + + /** + * Decodes a ListGeoTargetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGeoTargetsRequest + * @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.ads.admanager.v1.ListGeoTargetsRequest; + + /** + * Verifies a ListGeoTargetsRequest 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 ListGeoTargetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGeoTargetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListGeoTargetsRequest; + + /** + * Creates a plain object from a ListGeoTargetsRequest message. Also converts values to other types if specified. + * @param message ListGeoTargetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListGeoTargetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGeoTargetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGeoTargetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGeoTargetsResponse. */ + interface IListGeoTargetsResponse { + + /** ListGeoTargetsResponse geoTargets */ + geoTargets?: (google.ads.admanager.v1.IGeoTarget[]|null); + + /** ListGeoTargetsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListGeoTargetsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListGeoTargetsResponse. */ + class ListGeoTargetsResponse implements IListGeoTargetsResponse { + + /** + * Constructs a new ListGeoTargetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListGeoTargetsResponse); + + /** ListGeoTargetsResponse geoTargets. */ + public geoTargets: google.ads.admanager.v1.IGeoTarget[]; + + /** ListGeoTargetsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListGeoTargetsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListGeoTargetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGeoTargetsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListGeoTargetsResponse): google.ads.admanager.v1.ListGeoTargetsResponse; + + /** + * Encodes the specified ListGeoTargetsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * @param message ListGeoTargetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListGeoTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGeoTargetsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * @param message ListGeoTargetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListGeoTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGeoTargetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGeoTargetsResponse + * @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.ads.admanager.v1.ListGeoTargetsResponse; + + /** + * Decodes a ListGeoTargetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGeoTargetsResponse + * @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.ads.admanager.v1.ListGeoTargetsResponse; + + /** + * Verifies a ListGeoTargetsResponse 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 ListGeoTargetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGeoTargetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListGeoTargetsResponse; + + /** + * Creates a plain object from a ListGeoTargetsResponse message. Also converts values to other types if specified. + * @param message ListGeoTargetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListGeoTargetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGeoTargetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGeoTargetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Label. */ + interface ILabel { + + /** Label name */ + name?: (string|null); + } + + /** Represents a Label. */ + class Label implements ILabel { + + /** + * Constructs a new Label. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ILabel); + + /** Label name. */ + public name: string; + + /** + * Creates a new Label instance using the specified properties. + * @param [properties] Properties to set + * @returns Label instance + */ + public static create(properties?: google.ads.admanager.v1.ILabel): google.ads.admanager.v1.Label; + + /** + * Encodes the specified Label message. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * @param message Label message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Label message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * @param message Label message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Label message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Label + * @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.ads.admanager.v1.Label; + + /** + * Decodes a Label message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Label + * @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.ads.admanager.v1.Label; + + /** + * Verifies a Label 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 Label message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Label + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Label; + + /** + * Creates a plain object from a Label message. Also converts values to other types if specified. + * @param message Label + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Label to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Label + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LiveStreamEvent. */ + interface ILiveStreamEvent { + + /** LiveStreamEvent name */ + name?: (string|null); + } + + /** Represents a LiveStreamEvent. */ + class LiveStreamEvent implements ILiveStreamEvent { + + /** + * Constructs a new LiveStreamEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ILiveStreamEvent); + + /** LiveStreamEvent name. */ + public name: string; + + /** + * Creates a new LiveStreamEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveStreamEvent instance + */ + public static create(properties?: google.ads.admanager.v1.ILiveStreamEvent): google.ads.admanager.v1.LiveStreamEvent; + + /** + * Encodes the specified LiveStreamEvent message. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * @param message LiveStreamEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ILiveStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveStreamEvent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * @param message LiveStreamEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ILiveStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveStreamEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveStreamEvent + * @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.ads.admanager.v1.LiveStreamEvent; + + /** + * Decodes a LiveStreamEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveStreamEvent + * @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.ads.admanager.v1.LiveStreamEvent; + + /** + * Verifies a LiveStreamEvent 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 LiveStreamEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveStreamEvent + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.LiveStreamEvent; + + /** + * Creates a plain object from a LiveStreamEvent message. Also converts values to other types if specified. + * @param message LiveStreamEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.LiveStreamEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveStreamEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveStreamEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileCarrier. */ + interface IMobileCarrier { + + /** MobileCarrier name */ + name?: (string|null); + + /** MobileCarrier displayName */ + displayName?: (string|null); + + /** MobileCarrier regionCode */ + regionCode?: (string|null); + } + + /** Represents a MobileCarrier. */ + class MobileCarrier implements IMobileCarrier { + + /** + * Constructs a new MobileCarrier. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IMobileCarrier); + + /** MobileCarrier name. */ + public name: string; + + /** MobileCarrier displayName. */ + public displayName?: (string|null); + + /** MobileCarrier regionCode. */ + public regionCode?: (string|null); + + /** + * Creates a new MobileCarrier instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileCarrier instance + */ + public static create(properties?: google.ads.admanager.v1.IMobileCarrier): google.ads.admanager.v1.MobileCarrier; + + /** + * Encodes the specified MobileCarrier message. Does not implicitly {@link google.ads.admanager.v1.MobileCarrier.verify|verify} messages. + * @param message MobileCarrier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IMobileCarrier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileCarrier message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileCarrier.verify|verify} messages. + * @param message MobileCarrier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IMobileCarrier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileCarrier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileCarrier + * @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.ads.admanager.v1.MobileCarrier; + + /** + * Decodes a MobileCarrier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileCarrier + * @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.ads.admanager.v1.MobileCarrier; + + /** + * Verifies a MobileCarrier 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 MobileCarrier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileCarrier + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.MobileCarrier; + + /** + * Creates a plain object from a MobileCarrier message. Also converts values to other types if specified. + * @param message MobileCarrier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.MobileCarrier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileCarrier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileCarrier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a MobileCarrierService */ + class MobileCarrierService extends $protobuf.rpc.Service { + + /** + * Constructs a new MobileCarrierService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MobileCarrierService 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): MobileCarrierService; + + /** + * Calls GetMobileCarrier. + * @param request GetMobileCarrierRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MobileCarrier + */ + public getMobileCarrier(request: google.ads.admanager.v1.IGetMobileCarrierRequest, callback: google.ads.admanager.v1.MobileCarrierService.GetMobileCarrierCallback): void; + + /** + * Calls GetMobileCarrier. + * @param request GetMobileCarrierRequest message or plain object + * @returns Promise + */ + public getMobileCarrier(request: google.ads.admanager.v1.IGetMobileCarrierRequest): Promise; + + /** + * Calls ListMobileCarriers. + * @param request ListMobileCarriersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMobileCarriersResponse + */ + public listMobileCarriers(request: google.ads.admanager.v1.IListMobileCarriersRequest, callback: google.ads.admanager.v1.MobileCarrierService.ListMobileCarriersCallback): void; + + /** + * Calls ListMobileCarriers. + * @param request ListMobileCarriersRequest message or plain object + * @returns Promise + */ + public listMobileCarriers(request: google.ads.admanager.v1.IListMobileCarriersRequest): Promise; + } + + namespace MobileCarrierService { + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileCarrierService|getMobileCarrier}. + * @param error Error, if any + * @param [response] MobileCarrier + */ + type GetMobileCarrierCallback = (error: (Error|null), response?: google.ads.admanager.v1.MobileCarrier) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileCarrierService|listMobileCarriers}. + * @param error Error, if any + * @param [response] ListMobileCarriersResponse + */ + type ListMobileCarriersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListMobileCarriersResponse) => void; + } + + /** Properties of a GetMobileCarrierRequest. */ + interface IGetMobileCarrierRequest { + + /** GetMobileCarrierRequest name */ + name?: (string|null); + } + + /** Represents a GetMobileCarrierRequest. */ + class GetMobileCarrierRequest implements IGetMobileCarrierRequest { + + /** + * Constructs a new GetMobileCarrierRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetMobileCarrierRequest); + + /** GetMobileCarrierRequest name. */ + public name: string; + + /** + * Creates a new GetMobileCarrierRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMobileCarrierRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetMobileCarrierRequest): google.ads.admanager.v1.GetMobileCarrierRequest; + + /** + * Encodes the specified GetMobileCarrierRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileCarrierRequest.verify|verify} messages. + * @param message GetMobileCarrierRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetMobileCarrierRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMobileCarrierRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileCarrierRequest.verify|verify} messages. + * @param message GetMobileCarrierRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetMobileCarrierRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMobileCarrierRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMobileCarrierRequest + * @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.ads.admanager.v1.GetMobileCarrierRequest; + + /** + * Decodes a GetMobileCarrierRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMobileCarrierRequest + * @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.ads.admanager.v1.GetMobileCarrierRequest; + + /** + * Verifies a GetMobileCarrierRequest 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 GetMobileCarrierRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMobileCarrierRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetMobileCarrierRequest; + + /** + * Creates a plain object from a GetMobileCarrierRequest message. Also converts values to other types if specified. + * @param message GetMobileCarrierRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetMobileCarrierRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMobileCarrierRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMobileCarrierRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileCarriersRequest. */ + interface IListMobileCarriersRequest { + + /** ListMobileCarriersRequest parent */ + parent?: (string|null); + + /** ListMobileCarriersRequest pageSize */ + pageSize?: (number|null); + + /** ListMobileCarriersRequest pageToken */ + pageToken?: (string|null); + + /** ListMobileCarriersRequest filter */ + filter?: (string|null); + + /** ListMobileCarriersRequest orderBy */ + orderBy?: (string|null); + + /** ListMobileCarriersRequest skip */ + skip?: (number|null); + } + + /** Represents a ListMobileCarriersRequest. */ + class ListMobileCarriersRequest implements IListMobileCarriersRequest { + + /** + * Constructs a new ListMobileCarriersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileCarriersRequest); + + /** ListMobileCarriersRequest parent. */ + public parent: string; + + /** ListMobileCarriersRequest pageSize. */ + public pageSize: number; + + /** ListMobileCarriersRequest pageToken. */ + public pageToken: string; + + /** ListMobileCarriersRequest filter. */ + public filter: string; + + /** ListMobileCarriersRequest orderBy. */ + public orderBy: string; + + /** ListMobileCarriersRequest skip. */ + public skip: number; + + /** + * Creates a new ListMobileCarriersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileCarriersRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileCarriersRequest): google.ads.admanager.v1.ListMobileCarriersRequest; + + /** + * Encodes the specified ListMobileCarriersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersRequest.verify|verify} messages. + * @param message ListMobileCarriersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileCarriersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileCarriersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersRequest.verify|verify} messages. + * @param message ListMobileCarriersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileCarriersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileCarriersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileCarriersRequest + * @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.ads.admanager.v1.ListMobileCarriersRequest; + + /** + * Decodes a ListMobileCarriersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileCarriersRequest + * @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.ads.admanager.v1.ListMobileCarriersRequest; + + /** + * Verifies a ListMobileCarriersRequest 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 ListMobileCarriersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileCarriersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileCarriersRequest; + + /** + * Creates a plain object from a ListMobileCarriersRequest message. Also converts values to other types if specified. + * @param message ListMobileCarriersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileCarriersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileCarriersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileCarriersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileCarriersResponse. */ + interface IListMobileCarriersResponse { + + /** ListMobileCarriersResponse mobileCarriers */ + mobileCarriers?: (google.ads.admanager.v1.IMobileCarrier[]|null); + + /** ListMobileCarriersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMobileCarriersResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListMobileCarriersResponse. */ + class ListMobileCarriersResponse implements IListMobileCarriersResponse { + + /** + * Constructs a new ListMobileCarriersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileCarriersResponse); + + /** ListMobileCarriersResponse mobileCarriers. */ + public mobileCarriers: google.ads.admanager.v1.IMobileCarrier[]; + + /** ListMobileCarriersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMobileCarriersResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListMobileCarriersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileCarriersResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileCarriersResponse): google.ads.admanager.v1.ListMobileCarriersResponse; + + /** + * Encodes the specified ListMobileCarriersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersResponse.verify|verify} messages. + * @param message ListMobileCarriersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileCarriersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileCarriersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersResponse.verify|verify} messages. + * @param message ListMobileCarriersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileCarriersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileCarriersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileCarriersResponse + * @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.ads.admanager.v1.ListMobileCarriersResponse; + + /** + * Decodes a ListMobileCarriersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileCarriersResponse + * @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.ads.admanager.v1.ListMobileCarriersResponse; + + /** + * Verifies a ListMobileCarriersResponse 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 ListMobileCarriersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileCarriersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileCarriersResponse; + + /** + * Creates a plain object from a ListMobileCarriersResponse message. Also converts values to other types if specified. + * @param message ListMobileCarriersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileCarriersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileCarriersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileCarriersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileDevice. */ + interface IMobileDevice { + + /** MobileDevice name */ + name?: (string|null); + + /** MobileDevice displayName */ + displayName?: (string|null); + + /** MobileDevice manufacturer */ + manufacturer?: (string|null); + } + + /** Represents a MobileDevice. */ + class MobileDevice implements IMobileDevice { + + /** + * Constructs a new MobileDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IMobileDevice); + + /** MobileDevice name. */ + public name: string; + + /** MobileDevice displayName. */ + public displayName?: (string|null); + + /** MobileDevice manufacturer. */ + public manufacturer?: (string|null); + + /** + * Creates a new MobileDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileDevice instance + */ + public static create(properties?: google.ads.admanager.v1.IMobileDevice): google.ads.admanager.v1.MobileDevice; + + /** + * Encodes the specified MobileDevice message. Does not implicitly {@link google.ads.admanager.v1.MobileDevice.verify|verify} messages. + * @param message MobileDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IMobileDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileDevice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileDevice.verify|verify} messages. + * @param message MobileDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IMobileDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileDevice + * @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.ads.admanager.v1.MobileDevice; + + /** + * Decodes a MobileDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileDevice + * @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.ads.admanager.v1.MobileDevice; + + /** + * Verifies a MobileDevice 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 MobileDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileDevice + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.MobileDevice; + + /** + * Creates a plain object from a MobileDevice message. Also converts values to other types if specified. + * @param message MobileDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.MobileDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a MobileDeviceService */ + class MobileDeviceService extends $protobuf.rpc.Service { + + /** + * Constructs a new MobileDeviceService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MobileDeviceService 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): MobileDeviceService; + + /** + * Calls GetMobileDevice. + * @param request GetMobileDeviceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MobileDevice + */ + public getMobileDevice(request: google.ads.admanager.v1.IGetMobileDeviceRequest, callback: google.ads.admanager.v1.MobileDeviceService.GetMobileDeviceCallback): void; + + /** + * Calls GetMobileDevice. + * @param request GetMobileDeviceRequest message or plain object + * @returns Promise + */ + public getMobileDevice(request: google.ads.admanager.v1.IGetMobileDeviceRequest): Promise; + + /** + * Calls ListMobileDevices. + * @param request ListMobileDevicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMobileDevicesResponse + */ + public listMobileDevices(request: google.ads.admanager.v1.IListMobileDevicesRequest, callback: google.ads.admanager.v1.MobileDeviceService.ListMobileDevicesCallback): void; + + /** + * Calls ListMobileDevices. + * @param request ListMobileDevicesRequest message or plain object + * @returns Promise + */ + public listMobileDevices(request: google.ads.admanager.v1.IListMobileDevicesRequest): Promise; + } + + namespace MobileDeviceService { + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceService|getMobileDevice}. + * @param error Error, if any + * @param [response] MobileDevice + */ + type GetMobileDeviceCallback = (error: (Error|null), response?: google.ads.admanager.v1.MobileDevice) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceService|listMobileDevices}. + * @param error Error, if any + * @param [response] ListMobileDevicesResponse + */ + type ListMobileDevicesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListMobileDevicesResponse) => void; + } + + /** Properties of a GetMobileDeviceRequest. */ + interface IGetMobileDeviceRequest { + + /** GetMobileDeviceRequest name */ + name?: (string|null); + } + + /** Represents a GetMobileDeviceRequest. */ + class GetMobileDeviceRequest implements IGetMobileDeviceRequest { + + /** + * Constructs a new GetMobileDeviceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetMobileDeviceRequest); + + /** GetMobileDeviceRequest name. */ + public name: string; + + /** + * Creates a new GetMobileDeviceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMobileDeviceRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetMobileDeviceRequest): google.ads.admanager.v1.GetMobileDeviceRequest; + + /** + * Encodes the specified GetMobileDeviceRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceRequest.verify|verify} messages. + * @param message GetMobileDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetMobileDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMobileDeviceRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceRequest.verify|verify} messages. + * @param message GetMobileDeviceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetMobileDeviceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMobileDeviceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMobileDeviceRequest + * @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.ads.admanager.v1.GetMobileDeviceRequest; + + /** + * Decodes a GetMobileDeviceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMobileDeviceRequest + * @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.ads.admanager.v1.GetMobileDeviceRequest; + + /** + * Verifies a GetMobileDeviceRequest 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 GetMobileDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMobileDeviceRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetMobileDeviceRequest; + + /** + * Creates a plain object from a GetMobileDeviceRequest message. Also converts values to other types if specified. + * @param message GetMobileDeviceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetMobileDeviceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMobileDeviceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMobileDeviceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileDevicesRequest. */ + interface IListMobileDevicesRequest { + + /** ListMobileDevicesRequest parent */ + parent?: (string|null); + + /** ListMobileDevicesRequest pageSize */ + pageSize?: (number|null); + + /** ListMobileDevicesRequest pageToken */ + pageToken?: (string|null); + + /** ListMobileDevicesRequest filter */ + filter?: (string|null); + + /** ListMobileDevicesRequest orderBy */ + orderBy?: (string|null); + + /** ListMobileDevicesRequest skip */ + skip?: (number|null); + } + + /** Represents a ListMobileDevicesRequest. */ + class ListMobileDevicesRequest implements IListMobileDevicesRequest { + + /** + * Constructs a new ListMobileDevicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileDevicesRequest); + + /** ListMobileDevicesRequest parent. */ + public parent: string; + + /** ListMobileDevicesRequest pageSize. */ + public pageSize: number; + + /** ListMobileDevicesRequest pageToken. */ + public pageToken: string; + + /** ListMobileDevicesRequest filter. */ + public filter: string; + + /** ListMobileDevicesRequest orderBy. */ + public orderBy: string; + + /** ListMobileDevicesRequest skip. */ + public skip: number; + + /** + * Creates a new ListMobileDevicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileDevicesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileDevicesRequest): google.ads.admanager.v1.ListMobileDevicesRequest; + + /** + * Encodes the specified ListMobileDevicesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesRequest.verify|verify} messages. + * @param message ListMobileDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileDevicesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesRequest.verify|verify} messages. + * @param message ListMobileDevicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileDevicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileDevicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileDevicesRequest + * @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.ads.admanager.v1.ListMobileDevicesRequest; + + /** + * Decodes a ListMobileDevicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileDevicesRequest + * @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.ads.admanager.v1.ListMobileDevicesRequest; + + /** + * Verifies a ListMobileDevicesRequest 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 ListMobileDevicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileDevicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileDevicesRequest; + + /** + * Creates a plain object from a ListMobileDevicesRequest message. Also converts values to other types if specified. + * @param message ListMobileDevicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileDevicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileDevicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileDevicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileDevicesResponse. */ + interface IListMobileDevicesResponse { + + /** ListMobileDevicesResponse mobileDevices */ + mobileDevices?: (google.ads.admanager.v1.IMobileDevice[]|null); + + /** ListMobileDevicesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMobileDevicesResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListMobileDevicesResponse. */ + class ListMobileDevicesResponse implements IListMobileDevicesResponse { + + /** + * Constructs a new ListMobileDevicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileDevicesResponse); + + /** ListMobileDevicesResponse mobileDevices. */ + public mobileDevices: google.ads.admanager.v1.IMobileDevice[]; + + /** ListMobileDevicesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMobileDevicesResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListMobileDevicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileDevicesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileDevicesResponse): google.ads.admanager.v1.ListMobileDevicesResponse; + + /** + * Encodes the specified ListMobileDevicesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesResponse.verify|verify} messages. + * @param message ListMobileDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileDevicesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesResponse.verify|verify} messages. + * @param message ListMobileDevicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileDevicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileDevicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileDevicesResponse + * @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.ads.admanager.v1.ListMobileDevicesResponse; + + /** + * Decodes a ListMobileDevicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileDevicesResponse + * @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.ads.admanager.v1.ListMobileDevicesResponse; + + /** + * Verifies a ListMobileDevicesResponse 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 ListMobileDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileDevicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileDevicesResponse; + + /** + * Creates a plain object from a ListMobileDevicesResponse message. Also converts values to other types if specified. + * @param message ListMobileDevicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileDevicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileDevicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileDevicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileDeviceSubmodel. */ + interface IMobileDeviceSubmodel { + + /** MobileDeviceSubmodel name */ + name?: (string|null); + + /** MobileDeviceSubmodel displayName */ + displayName?: (string|null); + + /** MobileDeviceSubmodel mobileDevice */ + mobileDevice?: (string|null); + } + + /** Represents a MobileDeviceSubmodel. */ + class MobileDeviceSubmodel implements IMobileDeviceSubmodel { + + /** + * Constructs a new MobileDeviceSubmodel. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IMobileDeviceSubmodel); + + /** MobileDeviceSubmodel name. */ + public name: string; + + /** MobileDeviceSubmodel displayName. */ + public displayName?: (string|null); + + /** MobileDeviceSubmodel mobileDevice. */ + public mobileDevice?: (string|null); + + /** + * Creates a new MobileDeviceSubmodel instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileDeviceSubmodel instance + */ + public static create(properties?: google.ads.admanager.v1.IMobileDeviceSubmodel): google.ads.admanager.v1.MobileDeviceSubmodel; + + /** + * Encodes the specified MobileDeviceSubmodel message. Does not implicitly {@link google.ads.admanager.v1.MobileDeviceSubmodel.verify|verify} messages. + * @param message MobileDeviceSubmodel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IMobileDeviceSubmodel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileDeviceSubmodel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileDeviceSubmodel.verify|verify} messages. + * @param message MobileDeviceSubmodel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IMobileDeviceSubmodel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileDeviceSubmodel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileDeviceSubmodel + * @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.ads.admanager.v1.MobileDeviceSubmodel; + + /** + * Decodes a MobileDeviceSubmodel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileDeviceSubmodel + * @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.ads.admanager.v1.MobileDeviceSubmodel; + + /** + * Verifies a MobileDeviceSubmodel 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 MobileDeviceSubmodel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileDeviceSubmodel + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.MobileDeviceSubmodel; + + /** + * Creates a plain object from a MobileDeviceSubmodel message. Also converts values to other types if specified. + * @param message MobileDeviceSubmodel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.MobileDeviceSubmodel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileDeviceSubmodel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileDeviceSubmodel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a MobileDeviceSubmodelService */ + class MobileDeviceSubmodelService extends $protobuf.rpc.Service { + + /** + * Constructs a new MobileDeviceSubmodelService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MobileDeviceSubmodelService 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): MobileDeviceSubmodelService; + + /** + * Calls GetMobileDeviceSubmodel. + * @param request GetMobileDeviceSubmodelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MobileDeviceSubmodel + */ + public getMobileDeviceSubmodel(request: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, callback: google.ads.admanager.v1.MobileDeviceSubmodelService.GetMobileDeviceSubmodelCallback): void; + + /** + * Calls GetMobileDeviceSubmodel. + * @param request GetMobileDeviceSubmodelRequest message or plain object + * @returns Promise + */ + public getMobileDeviceSubmodel(request: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest): Promise; + + /** + * Calls ListMobileDeviceSubmodels. + * @param request ListMobileDeviceSubmodelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMobileDeviceSubmodelsResponse + */ + public listMobileDeviceSubmodels(request: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, callback: google.ads.admanager.v1.MobileDeviceSubmodelService.ListMobileDeviceSubmodelsCallback): void; + + /** + * Calls ListMobileDeviceSubmodels. + * @param request ListMobileDeviceSubmodelsRequest message or plain object + * @returns Promise + */ + public listMobileDeviceSubmodels(request: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest): Promise; + } + + namespace MobileDeviceSubmodelService { + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceSubmodelService|getMobileDeviceSubmodel}. + * @param error Error, if any + * @param [response] MobileDeviceSubmodel + */ + type GetMobileDeviceSubmodelCallback = (error: (Error|null), response?: google.ads.admanager.v1.MobileDeviceSubmodel) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceSubmodelService|listMobileDeviceSubmodels}. + * @param error Error, if any + * @param [response] ListMobileDeviceSubmodelsResponse + */ + type ListMobileDeviceSubmodelsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse) => void; + } + + /** Properties of a GetMobileDeviceSubmodelRequest. */ + interface IGetMobileDeviceSubmodelRequest { + + /** GetMobileDeviceSubmodelRequest name */ + name?: (string|null); + } + + /** Represents a GetMobileDeviceSubmodelRequest. */ + class GetMobileDeviceSubmodelRequest implements IGetMobileDeviceSubmodelRequest { + + /** + * Constructs a new GetMobileDeviceSubmodelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest); + + /** GetMobileDeviceSubmodelRequest name. */ + public name: string; + + /** + * Creates a new GetMobileDeviceSubmodelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMobileDeviceSubmodelRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest): google.ads.admanager.v1.GetMobileDeviceSubmodelRequest; + + /** + * Encodes the specified GetMobileDeviceSubmodelRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceSubmodelRequest.verify|verify} messages. + * @param message GetMobileDeviceSubmodelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMobileDeviceSubmodelRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceSubmodelRequest.verify|verify} messages. + * @param message GetMobileDeviceSubmodelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMobileDeviceSubmodelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMobileDeviceSubmodelRequest + * @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.ads.admanager.v1.GetMobileDeviceSubmodelRequest; + + /** + * Decodes a GetMobileDeviceSubmodelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMobileDeviceSubmodelRequest + * @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.ads.admanager.v1.GetMobileDeviceSubmodelRequest; + + /** + * Verifies a GetMobileDeviceSubmodelRequest 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 GetMobileDeviceSubmodelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMobileDeviceSubmodelRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetMobileDeviceSubmodelRequest; + + /** + * Creates a plain object from a GetMobileDeviceSubmodelRequest message. Also converts values to other types if specified. + * @param message GetMobileDeviceSubmodelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetMobileDeviceSubmodelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMobileDeviceSubmodelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMobileDeviceSubmodelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileDeviceSubmodelsRequest. */ + interface IListMobileDeviceSubmodelsRequest { + + /** ListMobileDeviceSubmodelsRequest parent */ + parent?: (string|null); + + /** ListMobileDeviceSubmodelsRequest pageSize */ + pageSize?: (number|null); + + /** ListMobileDeviceSubmodelsRequest pageToken */ + pageToken?: (string|null); + + /** ListMobileDeviceSubmodelsRequest filter */ + filter?: (string|null); + + /** ListMobileDeviceSubmodelsRequest orderBy */ + orderBy?: (string|null); + + /** ListMobileDeviceSubmodelsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListMobileDeviceSubmodelsRequest. */ + class ListMobileDeviceSubmodelsRequest implements IListMobileDeviceSubmodelsRequest { + + /** + * Constructs a new ListMobileDeviceSubmodelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest); + + /** ListMobileDeviceSubmodelsRequest parent. */ + public parent: string; + + /** ListMobileDeviceSubmodelsRequest pageSize. */ + public pageSize: number; + + /** ListMobileDeviceSubmodelsRequest pageToken. */ + public pageToken: string; + + /** ListMobileDeviceSubmodelsRequest filter. */ + public filter: string; + + /** ListMobileDeviceSubmodelsRequest orderBy. */ + public orderBy: string; + + /** ListMobileDeviceSubmodelsRequest skip. */ + public skip: number; + + /** + * Creates a new ListMobileDeviceSubmodelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileDeviceSubmodelsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest): google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest; + + /** + * Encodes the specified ListMobileDeviceSubmodelsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest.verify|verify} messages. + * @param message ListMobileDeviceSubmodelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileDeviceSubmodelsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest.verify|verify} messages. + * @param message ListMobileDeviceSubmodelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileDeviceSubmodelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileDeviceSubmodelsRequest + * @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.ads.admanager.v1.ListMobileDeviceSubmodelsRequest; + + /** + * Decodes a ListMobileDeviceSubmodelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileDeviceSubmodelsRequest + * @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.ads.admanager.v1.ListMobileDeviceSubmodelsRequest; + + /** + * Verifies a ListMobileDeviceSubmodelsRequest 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 ListMobileDeviceSubmodelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileDeviceSubmodelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest; + + /** + * Creates a plain object from a ListMobileDeviceSubmodelsRequest message. Also converts values to other types if specified. + * @param message ListMobileDeviceSubmodelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileDeviceSubmodelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileDeviceSubmodelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMobileDeviceSubmodelsResponse. */ + interface IListMobileDeviceSubmodelsResponse { + + /** ListMobileDeviceSubmodelsResponse mobileDeviceSubmodels */ + mobileDeviceSubmodels?: (google.ads.admanager.v1.IMobileDeviceSubmodel[]|null); + + /** ListMobileDeviceSubmodelsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMobileDeviceSubmodelsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListMobileDeviceSubmodelsResponse. */ + class ListMobileDeviceSubmodelsResponse implements IListMobileDeviceSubmodelsResponse { + + /** + * Constructs a new ListMobileDeviceSubmodelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse); + + /** ListMobileDeviceSubmodelsResponse mobileDeviceSubmodels. */ + public mobileDeviceSubmodels: google.ads.admanager.v1.IMobileDeviceSubmodel[]; + + /** ListMobileDeviceSubmodelsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMobileDeviceSubmodelsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListMobileDeviceSubmodelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMobileDeviceSubmodelsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse): google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse; + + /** + * Encodes the specified ListMobileDeviceSubmodelsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.verify|verify} messages. + * @param message ListMobileDeviceSubmodelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMobileDeviceSubmodelsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.verify|verify} messages. + * @param message ListMobileDeviceSubmodelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMobileDeviceSubmodelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMobileDeviceSubmodelsResponse + * @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.ads.admanager.v1.ListMobileDeviceSubmodelsResponse; + + /** + * Decodes a ListMobileDeviceSubmodelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMobileDeviceSubmodelsResponse + * @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.ads.admanager.v1.ListMobileDeviceSubmodelsResponse; + + /** + * Verifies a ListMobileDeviceSubmodelsResponse 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 ListMobileDeviceSubmodelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMobileDeviceSubmodelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse; + + /** + * Creates a plain object from a ListMobileDeviceSubmodelsResponse message. Also converts values to other types if specified. + * @param message ListMobileDeviceSubmodelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMobileDeviceSubmodelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMobileDeviceSubmodelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Network. */ + interface INetwork { + + /** Network name */ + name?: (string|null); + + /** Network displayName */ + displayName?: (string|null); + + /** Network networkCode */ + networkCode?: (string|null); + + /** Network propertyCode */ + propertyCode?: (string|null); + + /** Network timeZone */ + timeZone?: (string|null); + + /** Network currencyCode */ + currencyCode?: (string|null); + + /** Network secondaryCurrencyCodes */ + secondaryCurrencyCodes?: (string[]|null); + + /** Network effectiveRootAdUnit */ + effectiveRootAdUnit?: (string|null); + + /** Network testNetwork */ + testNetwork?: (boolean|null); + + /** Network networkId */ + networkId?: (number|Long|string|null); + } + + /** Represents a Network. */ + class Network implements INetwork { + + /** + * Constructs a new Network. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.INetwork); + + /** Network name. */ + public name: string; + + /** Network displayName. */ + public displayName: string; + + /** Network networkCode. */ + public networkCode: string; + + /** Network propertyCode. */ + public propertyCode: string; + + /** Network timeZone. */ + public timeZone: string; + + /** Network currencyCode. */ + public currencyCode: string; + + /** Network secondaryCurrencyCodes. */ + public secondaryCurrencyCodes: string[]; + + /** Network effectiveRootAdUnit. */ + public effectiveRootAdUnit: string; + + /** Network testNetwork. */ + public testNetwork: boolean; + + /** Network networkId. */ + public networkId: (number|Long|string); + + /** + * Creates a new Network instance using the specified properties. + * @param [properties] Properties to set + * @returns Network instance + */ + public static create(properties?: google.ads.admanager.v1.INetwork): google.ads.admanager.v1.Network; + + /** + * Encodes the specified Network message. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * @param message Network message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Network message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * @param message Network message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Network message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Network + * @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.ads.admanager.v1.Network; + + /** + * Decodes a Network message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Network + * @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.ads.admanager.v1.Network; + + /** + * Verifies a Network 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 Network message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Network + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Network; + + /** + * Creates a plain object from a Network message. Also converts values to other types if specified. + * @param message Network + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Network, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Network to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Network + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a NetworkService */ + class NetworkService extends $protobuf.rpc.Service { + + /** + * Constructs a new NetworkService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new NetworkService 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): NetworkService; + + /** + * Calls GetNetwork. + * @param request GetNetworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Network + */ + public getNetwork(request: google.ads.admanager.v1.IGetNetworkRequest, callback: google.ads.admanager.v1.NetworkService.GetNetworkCallback): void; + + /** + * Calls GetNetwork. + * @param request GetNetworkRequest message or plain object + * @returns Promise + */ + public getNetwork(request: google.ads.admanager.v1.IGetNetworkRequest): Promise; + + /** + * Calls ListNetworks. + * @param request ListNetworksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNetworksResponse + */ + public listNetworks(request: google.ads.admanager.v1.IListNetworksRequest, callback: google.ads.admanager.v1.NetworkService.ListNetworksCallback): void; + + /** + * Calls ListNetworks. + * @param request ListNetworksRequest message or plain object + * @returns Promise + */ + public listNetworks(request: google.ads.admanager.v1.IListNetworksRequest): Promise; + } + + namespace NetworkService { + + /** + * Callback as used by {@link google.ads.admanager.v1.NetworkService|getNetwork}. + * @param error Error, if any + * @param [response] Network + */ + type GetNetworkCallback = (error: (Error|null), response?: google.ads.admanager.v1.Network) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.NetworkService|listNetworks}. + * @param error Error, if any + * @param [response] ListNetworksResponse + */ + type ListNetworksCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListNetworksResponse) => void; + } + + /** Properties of a GetNetworkRequest. */ + interface IGetNetworkRequest { + + /** GetNetworkRequest name */ + name?: (string|null); + } + + /** Represents a GetNetworkRequest. */ + class GetNetworkRequest implements IGetNetworkRequest { + + /** + * Constructs a new GetNetworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetNetworkRequest); + + /** GetNetworkRequest name. */ + public name: string; + + /** + * Creates a new GetNetworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNetworkRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetNetworkRequest): google.ads.admanager.v1.GetNetworkRequest; + + /** + * Encodes the specified GetNetworkRequest message. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * @param message GetNetworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetNetworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNetworkRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * @param message GetNetworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetNetworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNetworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNetworkRequest + * @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.ads.admanager.v1.GetNetworkRequest; + + /** + * Decodes a GetNetworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNetworkRequest + * @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.ads.admanager.v1.GetNetworkRequest; + + /** + * Verifies a GetNetworkRequest 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 GetNetworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNetworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetNetworkRequest; + + /** + * Creates a plain object from a GetNetworkRequest message. Also converts values to other types if specified. + * @param message GetNetworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetNetworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNetworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNetworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNetworksRequest. */ + interface IListNetworksRequest { + } + + /** Represents a ListNetworksRequest. */ + class ListNetworksRequest implements IListNetworksRequest { + + /** + * Constructs a new ListNetworksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListNetworksRequest); + + /** + * Creates a new ListNetworksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNetworksRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListNetworksRequest): google.ads.admanager.v1.ListNetworksRequest; + + /** + * Encodes the specified ListNetworksRequest message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * @param message ListNetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListNetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNetworksRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * @param message ListNetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListNetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNetworksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNetworksRequest + * @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.ads.admanager.v1.ListNetworksRequest; + + /** + * Decodes a ListNetworksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNetworksRequest + * @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.ads.admanager.v1.ListNetworksRequest; + + /** + * Verifies a ListNetworksRequest 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 ListNetworksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNetworksRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListNetworksRequest; + + /** + * Creates a plain object from a ListNetworksRequest message. Also converts values to other types if specified. + * @param message ListNetworksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListNetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNetworksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNetworksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNetworksResponse. */ + interface IListNetworksResponse { + + /** ListNetworksResponse networks */ + networks?: (google.ads.admanager.v1.INetwork[]|null); + } + + /** Represents a ListNetworksResponse. */ + class ListNetworksResponse implements IListNetworksResponse { + + /** + * Constructs a new ListNetworksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListNetworksResponse); + + /** ListNetworksResponse networks. */ + public networks: google.ads.admanager.v1.INetwork[]; + + /** + * Creates a new ListNetworksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNetworksResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListNetworksResponse): google.ads.admanager.v1.ListNetworksResponse; + + /** + * Encodes the specified ListNetworksResponse message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * @param message ListNetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListNetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNetworksResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * @param message ListNetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListNetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNetworksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNetworksResponse + * @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.ads.admanager.v1.ListNetworksResponse; + + /** + * Decodes a ListNetworksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNetworksResponse + * @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.ads.admanager.v1.ListNetworksResponse; + + /** + * Verifies a ListNetworksResponse 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 ListNetworksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNetworksResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListNetworksResponse; + + /** + * Creates a plain object from a ListNetworksResponse message. Also converts values to other types if specified. + * @param message ListNetworksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListNetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNetworksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNetworksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperatingSystem. */ + interface IOperatingSystem { + + /** OperatingSystem name */ + name?: (string|null); + + /** OperatingSystem displayName */ + displayName?: (string|null); + } + + /** Represents an OperatingSystem. */ + class OperatingSystem implements IOperatingSystem { + + /** + * Constructs a new OperatingSystem. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IOperatingSystem); + + /** OperatingSystem name. */ + public name: string; + + /** OperatingSystem displayName. */ + public displayName?: (string|null); + + /** + * Creates a new OperatingSystem instance using the specified properties. + * @param [properties] Properties to set + * @returns OperatingSystem instance + */ + public static create(properties?: google.ads.admanager.v1.IOperatingSystem): google.ads.admanager.v1.OperatingSystem; + + /** + * Encodes the specified OperatingSystem message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * @param message OperatingSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IOperatingSystem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperatingSystem message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * @param message OperatingSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperatingSystem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperatingSystem + * @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.ads.admanager.v1.OperatingSystem; + + /** + * Decodes an OperatingSystem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperatingSystem + * @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.ads.admanager.v1.OperatingSystem; + + /** + * Verifies an OperatingSystem 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 OperatingSystem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperatingSystem + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystem; + + /** + * Creates a plain object from an OperatingSystem message. Also converts values to other types if specified. + * @param message OperatingSystem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.OperatingSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperatingSystem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperatingSystem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an OperatingSystemService */ + class OperatingSystemService extends $protobuf.rpc.Service { + + /** + * Constructs a new OperatingSystemService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new OperatingSystemService 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): OperatingSystemService; + + /** + * Calls GetOperatingSystem. + * @param request GetOperatingSystemRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OperatingSystem + */ + public getOperatingSystem(request: google.ads.admanager.v1.IGetOperatingSystemRequest, callback: google.ads.admanager.v1.OperatingSystemService.GetOperatingSystemCallback): void; + + /** + * Calls GetOperatingSystem. + * @param request GetOperatingSystemRequest message or plain object + * @returns Promise + */ + public getOperatingSystem(request: google.ads.admanager.v1.IGetOperatingSystemRequest): Promise; + + /** + * Calls ListOperatingSystems. + * @param request ListOperatingSystemsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperatingSystemsResponse + */ + public listOperatingSystems(request: google.ads.admanager.v1.IListOperatingSystemsRequest, callback: google.ads.admanager.v1.OperatingSystemService.ListOperatingSystemsCallback): void; + + /** + * Calls ListOperatingSystems. + * @param request ListOperatingSystemsRequest message or plain object + * @returns Promise + */ + public listOperatingSystems(request: google.ads.admanager.v1.IListOperatingSystemsRequest): Promise; + } + + namespace OperatingSystemService { + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|getOperatingSystem}. + * @param error Error, if any + * @param [response] OperatingSystem + */ + type GetOperatingSystemCallback = (error: (Error|null), response?: google.ads.admanager.v1.OperatingSystem) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|listOperatingSystems}. + * @param error Error, if any + * @param [response] ListOperatingSystemsResponse + */ + type ListOperatingSystemsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOperatingSystemsResponse) => void; + } + + /** Properties of a GetOperatingSystemRequest. */ + interface IGetOperatingSystemRequest { + + /** GetOperatingSystemRequest name */ + name?: (string|null); + } + + /** Represents a GetOperatingSystemRequest. */ + class GetOperatingSystemRequest implements IGetOperatingSystemRequest { + + /** + * Constructs a new GetOperatingSystemRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetOperatingSystemRequest); + + /** GetOperatingSystemRequest name. */ + public name: string; + + /** + * Creates a new GetOperatingSystemRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperatingSystemRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetOperatingSystemRequest): google.ads.admanager.v1.GetOperatingSystemRequest; + + /** + * Encodes the specified GetOperatingSystemRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. + * @param message GetOperatingSystemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetOperatingSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperatingSystemRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. + * @param message GetOperatingSystemRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetOperatingSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperatingSystemRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperatingSystemRequest + * @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.ads.admanager.v1.GetOperatingSystemRequest; + + /** + * Decodes a GetOperatingSystemRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperatingSystemRequest + * @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.ads.admanager.v1.GetOperatingSystemRequest; + + /** + * Verifies a GetOperatingSystemRequest 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 GetOperatingSystemRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperatingSystemRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOperatingSystemRequest; + + /** + * Creates a plain object from a GetOperatingSystemRequest message. Also converts values to other types if specified. + * @param message GetOperatingSystemRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetOperatingSystemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperatingSystemRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperatingSystemRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperatingSystemsRequest. */ + interface IListOperatingSystemsRequest { + + /** ListOperatingSystemsRequest parent */ + parent?: (string|null); + + /** ListOperatingSystemsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperatingSystemsRequest pageToken */ + pageToken?: (string|null); + + /** ListOperatingSystemsRequest filter */ + filter?: (string|null); + + /** ListOperatingSystemsRequest orderBy */ + orderBy?: (string|null); + + /** ListOperatingSystemsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListOperatingSystemsRequest. */ + class ListOperatingSystemsRequest implements IListOperatingSystemsRequest { + + /** + * Constructs a new ListOperatingSystemsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOperatingSystemsRequest); + + /** ListOperatingSystemsRequest parent. */ + public parent: string; + + /** ListOperatingSystemsRequest pageSize. */ + public pageSize: number; + + /** ListOperatingSystemsRequest pageToken. */ + public pageToken: string; + + /** ListOperatingSystemsRequest filter. */ + public filter: string; + + /** ListOperatingSystemsRequest orderBy. */ + public orderBy: string; + + /** ListOperatingSystemsRequest skip. */ + public skip: number; + + /** + * Creates a new ListOperatingSystemsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperatingSystemsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListOperatingSystemsRequest): google.ads.admanager.v1.ListOperatingSystemsRequest; + + /** + * Encodes the specified ListOperatingSystemsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * @param message ListOperatingSystemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOperatingSystemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperatingSystemsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * @param message ListOperatingSystemsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperatingSystemsRequest + * @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.ads.admanager.v1.ListOperatingSystemsRequest; + + /** + * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperatingSystemsRequest + * @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.ads.admanager.v1.ListOperatingSystemsRequest; + + /** + * Verifies a ListOperatingSystemsRequest 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 ListOperatingSystemsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperatingSystemsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemsRequest; + + /** + * Creates a plain object from a ListOperatingSystemsRequest message. Also converts values to other types if specified. + * @param message ListOperatingSystemsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOperatingSystemsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperatingSystemsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperatingSystemsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperatingSystemsResponse. */ + interface IListOperatingSystemsResponse { + + /** ListOperatingSystemsResponse operatingSystems */ + operatingSystems?: (google.ads.admanager.v1.IOperatingSystem[]|null); + + /** ListOperatingSystemsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListOperatingSystemsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListOperatingSystemsResponse. */ + class ListOperatingSystemsResponse implements IListOperatingSystemsResponse { + + /** + * Constructs a new ListOperatingSystemsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOperatingSystemsResponse); + + /** ListOperatingSystemsResponse operatingSystems. */ + public operatingSystems: google.ads.admanager.v1.IOperatingSystem[]; + + /** ListOperatingSystemsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListOperatingSystemsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListOperatingSystemsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperatingSystemsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListOperatingSystemsResponse): google.ads.admanager.v1.ListOperatingSystemsResponse; + + /** + * Encodes the specified ListOperatingSystemsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * @param message ListOperatingSystemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOperatingSystemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperatingSystemsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * @param message ListOperatingSystemsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperatingSystemsResponse + * @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.ads.admanager.v1.ListOperatingSystemsResponse; + + /** + * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperatingSystemsResponse + * @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.ads.admanager.v1.ListOperatingSystemsResponse; + + /** + * Verifies a ListOperatingSystemsResponse 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 ListOperatingSystemsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperatingSystemsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemsResponse; + + /** + * Creates a plain object from a ListOperatingSystemsResponse message. Also converts values to other types if specified. + * @param message ListOperatingSystemsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOperatingSystemsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperatingSystemsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperatingSystemsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperatingSystemVersion. */ + interface IOperatingSystemVersion { + + /** OperatingSystemVersion name */ + name?: (string|null); + + /** OperatingSystemVersion majorVersion */ + majorVersion?: (number|null); + + /** OperatingSystemVersion minorVersion */ + minorVersion?: (number|null); + + /** OperatingSystemVersion microVersion */ + microVersion?: (number|null); + } + + /** Represents an OperatingSystemVersion. */ + class OperatingSystemVersion implements IOperatingSystemVersion { + + /** + * Constructs a new OperatingSystemVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IOperatingSystemVersion); + + /** OperatingSystemVersion name. */ + public name: string; + + /** OperatingSystemVersion majorVersion. */ + public majorVersion?: (number|null); + + /** OperatingSystemVersion minorVersion. */ + public minorVersion?: (number|null); + + /** OperatingSystemVersion microVersion. */ + public microVersion?: (number|null); + + /** + * Creates a new OperatingSystemVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns OperatingSystemVersion instance + */ + public static create(properties?: google.ads.admanager.v1.IOperatingSystemVersion): google.ads.admanager.v1.OperatingSystemVersion; + + /** + * Encodes the specified OperatingSystemVersion message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * @param message OperatingSystemVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IOperatingSystemVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperatingSystemVersion message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * @param message OperatingSystemVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystemVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperatingSystemVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperatingSystemVersion + * @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.ads.admanager.v1.OperatingSystemVersion; + + /** + * Decodes an OperatingSystemVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperatingSystemVersion + * @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.ads.admanager.v1.OperatingSystemVersion; + + /** + * Verifies an OperatingSystemVersion 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 OperatingSystemVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperatingSystemVersion + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystemVersion; + + /** + * Creates a plain object from an OperatingSystemVersion message. Also converts values to other types if specified. + * @param message OperatingSystemVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.OperatingSystemVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperatingSystemVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperatingSystemVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an OperatingSystemVersionService */ + class OperatingSystemVersionService extends $protobuf.rpc.Service { + + /** + * Constructs a new OperatingSystemVersionService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new OperatingSystemVersionService 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): OperatingSystemVersionService; + + /** + * Calls GetOperatingSystemVersion. + * @param request GetOperatingSystemVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OperatingSystemVersion + */ + public getOperatingSystemVersion(request: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, callback: google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersionCallback): void; + + /** + * Calls GetOperatingSystemVersion. + * @param request GetOperatingSystemVersionRequest message or plain object + * @returns Promise + */ + public getOperatingSystemVersion(request: google.ads.admanager.v1.IGetOperatingSystemVersionRequest): Promise; + + /** + * Calls ListOperatingSystemVersions. + * @param request ListOperatingSystemVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperatingSystemVersionsResponse + */ + public listOperatingSystemVersions(request: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, callback: google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersionsCallback): void; + + /** + * Calls ListOperatingSystemVersions. + * @param request ListOperatingSystemVersionsRequest message or plain object + * @returns Promise + */ + public listOperatingSystemVersions(request: google.ads.admanager.v1.IListOperatingSystemVersionsRequest): Promise; + } + + namespace OperatingSystemVersionService { + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|getOperatingSystemVersion}. + * @param error Error, if any + * @param [response] OperatingSystemVersion + */ + type GetOperatingSystemVersionCallback = (error: (Error|null), response?: google.ads.admanager.v1.OperatingSystemVersion) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|listOperatingSystemVersions}. + * @param error Error, if any + * @param [response] ListOperatingSystemVersionsResponse + */ + type ListOperatingSystemVersionsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOperatingSystemVersionsResponse) => void; + } + + /** Properties of a GetOperatingSystemVersionRequest. */ + interface IGetOperatingSystemVersionRequest { + + /** GetOperatingSystemVersionRequest name */ + name?: (string|null); + } + + /** Represents a GetOperatingSystemVersionRequest. */ + class GetOperatingSystemVersionRequest implements IGetOperatingSystemVersionRequest { + + /** + * Constructs a new GetOperatingSystemVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetOperatingSystemVersionRequest); + + /** GetOperatingSystemVersionRequest name. */ + public name: string; + + /** + * Creates a new GetOperatingSystemVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperatingSystemVersionRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetOperatingSystemVersionRequest): google.ads.admanager.v1.GetOperatingSystemVersionRequest; + + /** + * Encodes the specified GetOperatingSystemVersionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * @param message GetOperatingSystemVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperatingSystemVersionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * @param message GetOperatingSystemVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetOperatingSystemVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperatingSystemVersionRequest + * @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.ads.admanager.v1.GetOperatingSystemVersionRequest; + + /** + * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperatingSystemVersionRequest + * @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.ads.admanager.v1.GetOperatingSystemVersionRequest; + + /** + * Verifies a GetOperatingSystemVersionRequest 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 GetOperatingSystemVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperatingSystemVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOperatingSystemVersionRequest; + + /** + * Creates a plain object from a GetOperatingSystemVersionRequest message. Also converts values to other types if specified. + * @param message GetOperatingSystemVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetOperatingSystemVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperatingSystemVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperatingSystemVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperatingSystemVersionsRequest. */ + interface IListOperatingSystemVersionsRequest { + + /** ListOperatingSystemVersionsRequest parent */ + parent?: (string|null); + + /** ListOperatingSystemVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperatingSystemVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListOperatingSystemVersionsRequest filter */ + filter?: (string|null); + + /** ListOperatingSystemVersionsRequest orderBy */ + orderBy?: (string|null); + + /** ListOperatingSystemVersionsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListOperatingSystemVersionsRequest. */ + class ListOperatingSystemVersionsRequest implements IListOperatingSystemVersionsRequest { + + /** + * Constructs a new ListOperatingSystemVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsRequest); + + /** ListOperatingSystemVersionsRequest parent. */ + public parent: string; + + /** ListOperatingSystemVersionsRequest pageSize. */ + public pageSize: number; + + /** ListOperatingSystemVersionsRequest pageToken. */ + public pageToken: string; + + /** ListOperatingSystemVersionsRequest filter. */ + public filter: string; + + /** ListOperatingSystemVersionsRequest orderBy. */ + public orderBy: string; + + /** ListOperatingSystemVersionsRequest skip. */ + public skip: number; + + /** + * Creates a new ListOperatingSystemVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperatingSystemVersionsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsRequest): google.ads.admanager.v1.ListOperatingSystemVersionsRequest; + + /** + * Encodes the specified ListOperatingSystemVersionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * @param message ListOperatingSystemVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperatingSystemVersionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * @param message ListOperatingSystemVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperatingSystemVersionsRequest + * @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.ads.admanager.v1.ListOperatingSystemVersionsRequest; + + /** + * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperatingSystemVersionsRequest + * @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.ads.admanager.v1.ListOperatingSystemVersionsRequest; + + /** + * Verifies a ListOperatingSystemVersionsRequest 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 ListOperatingSystemVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperatingSystemVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemVersionsRequest; + + /** + * Creates a plain object from a ListOperatingSystemVersionsRequest message. Also converts values to other types if specified. + * @param message ListOperatingSystemVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOperatingSystemVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperatingSystemVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperatingSystemVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperatingSystemVersionsResponse. */ + interface IListOperatingSystemVersionsResponse { + + /** ListOperatingSystemVersionsResponse operatingSystemVersions */ + operatingSystemVersions?: (google.ads.admanager.v1.IOperatingSystemVersion[]|null); + + /** ListOperatingSystemVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListOperatingSystemVersionsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListOperatingSystemVersionsResponse. */ + class ListOperatingSystemVersionsResponse implements IListOperatingSystemVersionsResponse { + + /** + * Constructs a new ListOperatingSystemVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsResponse); + + /** ListOperatingSystemVersionsResponse operatingSystemVersions. */ + public operatingSystemVersions: google.ads.admanager.v1.IOperatingSystemVersion[]; + + /** ListOperatingSystemVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListOperatingSystemVersionsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListOperatingSystemVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperatingSystemVersionsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListOperatingSystemVersionsResponse): google.ads.admanager.v1.ListOperatingSystemVersionsResponse; + + /** + * Encodes the specified ListOperatingSystemVersionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * @param message ListOperatingSystemVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOperatingSystemVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperatingSystemVersionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * @param message ListOperatingSystemVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOperatingSystemVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperatingSystemVersionsResponse + * @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.ads.admanager.v1.ListOperatingSystemVersionsResponse; + + /** + * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperatingSystemVersionsResponse + * @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.ads.admanager.v1.ListOperatingSystemVersionsResponse; + + /** + * Verifies a ListOperatingSystemVersionsResponse 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 ListOperatingSystemVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperatingSystemVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOperatingSystemVersionsResponse; + + /** + * Creates a plain object from a ListOperatingSystemVersionsResponse message. Also converts values to other types if specified. + * @param message ListOperatingSystemVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOperatingSystemVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperatingSystemVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperatingSystemVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrderStatusEnum. */ + interface IOrderStatusEnum { + } + + /** Represents an OrderStatusEnum. */ + class OrderStatusEnum implements IOrderStatusEnum { + + /** + * Constructs a new OrderStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IOrderStatusEnum); + + /** + * Creates a new OrderStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IOrderStatusEnum): google.ads.admanager.v1.OrderStatusEnum; + + /** + * Encodes the specified OrderStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * @param message OrderStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IOrderStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * @param message OrderStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IOrderStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderStatusEnum + * @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.ads.admanager.v1.OrderStatusEnum; + + /** + * Decodes an OrderStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderStatusEnum + * @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.ads.admanager.v1.OrderStatusEnum; + + /** + * Verifies an OrderStatusEnum 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 OrderStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OrderStatusEnum; + + /** + * Creates a plain object from an OrderStatusEnum message. Also converts values to other types if specified. + * @param message OrderStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.OrderStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderStatusEnum { + + /** OrderStatus enum. */ + enum OrderStatus { + ORDER_STATUS_UNSPECIFIED = 0, + DRAFT = 2, + PENDING_APPROVAL = 3, + APPROVED = 4, + DISAPPROVED = 5, + PAUSED = 6, + CANCELED = 7, + DELETED = 8 + } + } + + /** Properties of an Order. */ + interface IOrder { + + /** Order name */ + name?: (string|null); + + /** Order orderId */ + orderId?: (number|Long|string|null); + + /** Order displayName */ + displayName?: (string|null); + + /** Order programmatic */ + programmatic?: (boolean|null); + + /** Order trafficker */ + trafficker?: (string|null); + + /** Order advertiserContacts */ + advertiserContacts?: (string[]|null); + + /** Order advertiser */ + advertiser?: (string|null); + + /** Order agencyContacts */ + agencyContacts?: (string[]|null); + + /** Order agency */ + agency?: (string|null); + + /** Order appliedTeams */ + appliedTeams?: (string[]|null); + + /** Order effectiveTeams */ + effectiveTeams?: (string[]|null); + + /** Order creator */ + creator?: (string|null); + + /** Order currencyCode */ + currencyCode?: (string|null); + + /** Order startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Order endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Order unlimitedEndTime */ + unlimitedEndTime?: (boolean|null); + + /** Order externalOrderId */ + externalOrderId?: (number|null); + + /** Order archived */ + archived?: (boolean|null); + + /** Order lastModifiedByApp */ + lastModifiedByApp?: (string|null); + + /** Order updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Order notes */ + notes?: (string|null); + + /** Order poNumber */ + poNumber?: (string|null); + + /** Order status */ + status?: (google.ads.admanager.v1.OrderStatusEnum.OrderStatus|keyof typeof google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null); + + /** Order salesperson */ + salesperson?: (string|null); + + /** Order secondarySalespeople */ + secondarySalespeople?: (string[]|null); + + /** Order secondaryTraffickers */ + secondaryTraffickers?: (string[]|null); + + /** Order appliedLabels */ + appliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + + /** Order effectiveAppliedLabels */ + effectiveAppliedLabels?: (google.ads.admanager.v1.IAppliedLabel[]|null); + + /** Order customFieldValues */ + customFieldValues?: (google.ads.admanager.v1.ICustomFieldValue[]|null); + } + + /** Represents an Order. */ + class Order implements IOrder { + + /** + * Constructs a new Order. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IOrder); + + /** Order name. */ + public name: string; + + /** Order orderId. */ + public orderId?: (number|Long|string|null); + + /** Order displayName. */ + public displayName?: (string|null); + + /** Order programmatic. */ + public programmatic?: (boolean|null); + + /** Order trafficker. */ + public trafficker?: (string|null); + + /** Order advertiserContacts. */ + public advertiserContacts: string[]; + + /** Order advertiser. */ + public advertiser?: (string|null); + + /** Order agencyContacts. */ + public agencyContacts: string[]; + + /** Order agency. */ + public agency?: (string|null); + + /** Order appliedTeams. */ + public appliedTeams: string[]; + + /** Order effectiveTeams. */ + public effectiveTeams: string[]; + + /** Order creator. */ + public creator?: (string|null); + + /** Order currencyCode. */ + public currencyCode?: (string|null); + + /** Order startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Order endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Order unlimitedEndTime. */ + public unlimitedEndTime?: (boolean|null); + + /** Order externalOrderId. */ + public externalOrderId?: (number|null); + + /** Order archived. */ + public archived?: (boolean|null); + + /** Order lastModifiedByApp. */ + public lastModifiedByApp?: (string|null); + + /** Order updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Order notes. */ + public notes?: (string|null); + + /** Order poNumber. */ + public poNumber?: (string|null); + + /** Order status. */ + public status?: (google.ads.admanager.v1.OrderStatusEnum.OrderStatus|keyof typeof google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null); + + /** Order salesperson. */ + public salesperson?: (string|null); + + /** Order secondarySalespeople. */ + public secondarySalespeople: string[]; + + /** Order secondaryTraffickers. */ + public secondaryTraffickers: string[]; + + /** Order appliedLabels. */ + public appliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + + /** Order effectiveAppliedLabels. */ + public effectiveAppliedLabels: google.ads.admanager.v1.IAppliedLabel[]; + + /** Order customFieldValues. */ + public customFieldValues: google.ads.admanager.v1.ICustomFieldValue[]; + + /** + * Creates a new Order instance using the specified properties. + * @param [properties] Properties to set + * @returns Order instance + */ + public static create(properties?: google.ads.admanager.v1.IOrder): google.ads.admanager.v1.Order; + + /** + * Encodes the specified Order message. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * @param message Order message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * @param message Order message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Order message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Order + * @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.ads.admanager.v1.Order; + + /** + * Decodes an Order message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Order + * @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.ads.admanager.v1.Order; + + /** + * Verifies an Order 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 Order message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Order + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Order; + + /** + * Creates a plain object from an Order message. Also converts values to other types if specified. + * @param message Order + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Order to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Order + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an OrderService */ + class OrderService extends $protobuf.rpc.Service { + + /** + * Constructs a new OrderService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new OrderService 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): OrderService; + + /** + * Calls GetOrder. + * @param request GetOrderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Order + */ + public getOrder(request: google.ads.admanager.v1.IGetOrderRequest, callback: google.ads.admanager.v1.OrderService.GetOrderCallback): void; + + /** + * Calls GetOrder. + * @param request GetOrderRequest message or plain object + * @returns Promise + */ + public getOrder(request: google.ads.admanager.v1.IGetOrderRequest): Promise; + + /** + * Calls ListOrders. + * @param request ListOrdersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOrdersResponse + */ + public listOrders(request: google.ads.admanager.v1.IListOrdersRequest, callback: google.ads.admanager.v1.OrderService.ListOrdersCallback): void; + + /** + * Calls ListOrders. + * @param request ListOrdersRequest message or plain object + * @returns Promise + */ + public listOrders(request: google.ads.admanager.v1.IListOrdersRequest): Promise; + } + + namespace OrderService { + + /** + * Callback as used by {@link google.ads.admanager.v1.OrderService|getOrder}. + * @param error Error, if any + * @param [response] Order + */ + type GetOrderCallback = (error: (Error|null), response?: google.ads.admanager.v1.Order) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.OrderService|listOrders}. + * @param error Error, if any + * @param [response] ListOrdersResponse + */ + type ListOrdersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListOrdersResponse) => void; + } + + /** Properties of a GetOrderRequest. */ + interface IGetOrderRequest { + + /** GetOrderRequest name */ + name?: (string|null); + } + + /** Represents a GetOrderRequest. */ + class GetOrderRequest implements IGetOrderRequest { + + /** + * Constructs a new GetOrderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetOrderRequest); + + /** GetOrderRequest name. */ + public name: string; + + /** + * Creates a new GetOrderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOrderRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetOrderRequest): google.ads.admanager.v1.GetOrderRequest; + + /** + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * @param message GetOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * @param message GetOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOrderRequest + * @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.ads.admanager.v1.GetOrderRequest; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOrderRequest + * @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.ads.admanager.v1.GetOrderRequest; + + /** + * Verifies a GetOrderRequest 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 GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOrderRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetOrderRequest; + + /** + * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * @param message GetOrderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOrderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOrderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOrdersRequest. */ + interface IListOrdersRequest { + + /** ListOrdersRequest parent */ + parent?: (string|null); + + /** ListOrdersRequest pageSize */ + pageSize?: (number|null); + + /** ListOrdersRequest pageToken */ + pageToken?: (string|null); + + /** ListOrdersRequest filter */ + filter?: (string|null); + + /** ListOrdersRequest orderBy */ + orderBy?: (string|null); + + /** ListOrdersRequest skip */ + skip?: (number|null); + } + + /** Represents a ListOrdersRequest. */ + class ListOrdersRequest implements IListOrdersRequest { + + /** + * Constructs a new ListOrdersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOrdersRequest); + + /** ListOrdersRequest parent. */ + public parent: string; + + /** ListOrdersRequest pageSize. */ + public pageSize: number; + + /** ListOrdersRequest pageToken. */ + public pageToken: string; + + /** ListOrdersRequest filter. */ + public filter: string; + + /** ListOrdersRequest orderBy. */ + public orderBy: string; + + /** ListOrdersRequest skip. */ + public skip: number; + + /** + * Creates a new ListOrdersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOrdersRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListOrdersRequest): google.ads.admanager.v1.ListOrdersRequest; + + /** + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * @param message ListOrdersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * @param message ListOrdersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOrdersRequest + * @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.ads.admanager.v1.ListOrdersRequest; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOrdersRequest + * @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.ads.admanager.v1.ListOrdersRequest; + + /** + * Verifies a ListOrdersRequest 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 ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOrdersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOrdersRequest; + + /** + * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * @param message ListOrdersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOrdersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOrdersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOrdersResponse. */ + interface IListOrdersResponse { + + /** ListOrdersResponse orders */ + orders?: (google.ads.admanager.v1.IOrder[]|null); + + /** ListOrdersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListOrdersResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListOrdersResponse. */ + class ListOrdersResponse implements IListOrdersResponse { + + /** + * Constructs a new ListOrdersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListOrdersResponse); + + /** ListOrdersResponse orders. */ + public orders: google.ads.admanager.v1.IOrder[]; + + /** ListOrdersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListOrdersResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListOrdersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOrdersResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListOrdersResponse): google.ads.admanager.v1.ListOrdersResponse; + + /** + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. + * @param message ListOrdersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. + * @param message ListOrdersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOrdersResponse + * @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.ads.admanager.v1.ListOrdersResponse; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOrdersResponse + * @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.ads.admanager.v1.ListOrdersResponse; + + /** + * Verifies a ListOrdersResponse 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 ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOrdersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListOrdersResponse; + + /** + * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. + * @param message ListOrdersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOrdersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOrdersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlacementStatusEnum. */ + interface IPlacementStatusEnum { + } + + /** Represents a PlacementStatusEnum. */ + class PlacementStatusEnum implements IPlacementStatusEnum { + + /** + * Constructs a new PlacementStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IPlacementStatusEnum); + + /** + * Creates a new PlacementStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacementStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IPlacementStatusEnum): google.ads.admanager.v1.PlacementStatusEnum; + + /** + * Encodes the specified PlacementStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. + * @param message PlacementStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IPlacementStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacementStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. + * @param message PlacementStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IPlacementStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacementStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacementStatusEnum + * @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.ads.admanager.v1.PlacementStatusEnum; + + /** + * Decodes a PlacementStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacementStatusEnum + * @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.ads.admanager.v1.PlacementStatusEnum; + + /** + * Verifies a PlacementStatusEnum 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 PlacementStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacementStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PlacementStatusEnum; + + /** + * Creates a plain object from a PlacementStatusEnum message. Also converts values to other types if specified. + * @param message PlacementStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.PlacementStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacementStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacementStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PlacementStatusEnum { + + /** PlacementStatus enum. */ + enum PlacementStatus { + PLACEMENT_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2, + ARCHIVED = 3 + } + } + + /** Properties of a Placement. */ + interface IPlacement { + + /** Placement name */ + name?: (string|null); + + /** Placement placementId */ + placementId?: (number|Long|string|null); + + /** Placement displayName */ + displayName?: (string|null); + + /** Placement description */ + description?: (string|null); + + /** Placement placementCode */ + placementCode?: (string|null); + + /** Placement status */ + status?: (google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|keyof typeof google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null); + + /** Placement targetedAdUnits */ + targetedAdUnits?: (string[]|null); + + /** Placement updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Placement. */ + class Placement implements IPlacement { + + /** + * Constructs a new Placement. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IPlacement); + + /** Placement name. */ + public name: string; + + /** Placement placementId. */ + public placementId: (number|Long|string); + + /** Placement displayName. */ + public displayName?: (string|null); + + /** Placement description. */ + public description?: (string|null); + + /** Placement placementCode. */ + public placementCode?: (string|null); + + /** Placement status. */ + public status?: (google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|keyof typeof google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null); + + /** Placement targetedAdUnits. */ + public targetedAdUnits: string[]; + + /** Placement updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Placement instance using the specified properties. + * @param [properties] Properties to set + * @returns Placement instance + */ + public static create(properties?: google.ads.admanager.v1.IPlacement): google.ads.admanager.v1.Placement; + + /** + * Encodes the specified Placement message. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. + * @param message Placement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IPlacement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Placement message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. + * @param message Placement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IPlacement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Placement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Placement + * @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.ads.admanager.v1.Placement; + + /** + * Decodes a Placement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Placement + * @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.ads.admanager.v1.Placement; + + /** + * Verifies a Placement 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 Placement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Placement + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Placement; + + /** + * Creates a plain object from a Placement message. Also converts values to other types if specified. + * @param message Placement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Placement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Placement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Placement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a PlacementService */ + class PlacementService extends $protobuf.rpc.Service { + + /** + * Constructs a new PlacementService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PlacementService 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): PlacementService; + + /** + * Calls GetPlacement. + * @param request GetPlacementRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Placement + */ + public getPlacement(request: google.ads.admanager.v1.IGetPlacementRequest, callback: google.ads.admanager.v1.PlacementService.GetPlacementCallback): void; + + /** + * Calls GetPlacement. + * @param request GetPlacementRequest message or plain object + * @returns Promise + */ + public getPlacement(request: google.ads.admanager.v1.IGetPlacementRequest): Promise; + + /** + * Calls ListPlacements. + * @param request ListPlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPlacementsResponse + */ + public listPlacements(request: google.ads.admanager.v1.IListPlacementsRequest, callback: google.ads.admanager.v1.PlacementService.ListPlacementsCallback): void; + + /** + * Calls ListPlacements. + * @param request ListPlacementsRequest message or plain object + * @returns Promise + */ + public listPlacements(request: google.ads.admanager.v1.IListPlacementsRequest): Promise; + + /** + * Calls CreatePlacement. + * @param request CreatePlacementRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Placement + */ + public createPlacement(request: google.ads.admanager.v1.ICreatePlacementRequest, callback: google.ads.admanager.v1.PlacementService.CreatePlacementCallback): void; + + /** + * Calls CreatePlacement. + * @param request CreatePlacementRequest message or plain object + * @returns Promise + */ + public createPlacement(request: google.ads.admanager.v1.ICreatePlacementRequest): Promise; + + /** + * Calls UpdatePlacement. + * @param request UpdatePlacementRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Placement + */ + public updatePlacement(request: google.ads.admanager.v1.IUpdatePlacementRequest, callback: google.ads.admanager.v1.PlacementService.UpdatePlacementCallback): void; + + /** + * Calls UpdatePlacement. + * @param request UpdatePlacementRequest message or plain object + * @returns Promise + */ + public updatePlacement(request: google.ads.admanager.v1.IUpdatePlacementRequest): Promise; + + /** + * Calls BatchCreatePlacements. + * @param request BatchCreatePlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreatePlacementsResponse + */ + public batchCreatePlacements(request: google.ads.admanager.v1.IBatchCreatePlacementsRequest, callback: google.ads.admanager.v1.PlacementService.BatchCreatePlacementsCallback): void; + + /** + * Calls BatchCreatePlacements. + * @param request BatchCreatePlacementsRequest message or plain object + * @returns Promise + */ + public batchCreatePlacements(request: google.ads.admanager.v1.IBatchCreatePlacementsRequest): Promise; + + /** + * Calls BatchUpdatePlacements. + * @param request BatchUpdatePlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdatePlacementsResponse + */ + public batchUpdatePlacements(request: google.ads.admanager.v1.IBatchUpdatePlacementsRequest, callback: google.ads.admanager.v1.PlacementService.BatchUpdatePlacementsCallback): void; + + /** + * Calls BatchUpdatePlacements. + * @param request BatchUpdatePlacementsRequest message or plain object + * @returns Promise + */ + public batchUpdatePlacements(request: google.ads.admanager.v1.IBatchUpdatePlacementsRequest): Promise; + + /** + * Calls BatchActivatePlacements. + * @param request BatchActivatePlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchActivatePlacementsResponse + */ + public batchActivatePlacements(request: google.ads.admanager.v1.IBatchActivatePlacementsRequest, callback: google.ads.admanager.v1.PlacementService.BatchActivatePlacementsCallback): void; + + /** + * Calls BatchActivatePlacements. + * @param request BatchActivatePlacementsRequest message or plain object + * @returns Promise + */ + public batchActivatePlacements(request: google.ads.admanager.v1.IBatchActivatePlacementsRequest): Promise; + + /** + * Calls BatchDeactivatePlacements. + * @param request BatchDeactivatePlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchDeactivatePlacementsResponse + */ + public batchDeactivatePlacements(request: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, callback: google.ads.admanager.v1.PlacementService.BatchDeactivatePlacementsCallback): void; + + /** + * Calls BatchDeactivatePlacements. + * @param request BatchDeactivatePlacementsRequest message or plain object + * @returns Promise + */ + public batchDeactivatePlacements(request: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest): Promise; + + /** + * Calls BatchArchivePlacements. + * @param request BatchArchivePlacementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchArchivePlacementsResponse + */ + public batchArchivePlacements(request: google.ads.admanager.v1.IBatchArchivePlacementsRequest, callback: google.ads.admanager.v1.PlacementService.BatchArchivePlacementsCallback): void; + + /** + * Calls BatchArchivePlacements. + * @param request BatchArchivePlacementsRequest message or plain object + * @returns Promise + */ + public batchArchivePlacements(request: google.ads.admanager.v1.IBatchArchivePlacementsRequest): Promise; + } + + namespace PlacementService { + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|getPlacement}. + * @param error Error, if any + * @param [response] Placement + */ + type GetPlacementCallback = (error: (Error|null), response?: google.ads.admanager.v1.Placement) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|listPlacements}. + * @param error Error, if any + * @param [response] ListPlacementsResponse + */ + type ListPlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPlacementsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|createPlacement}. + * @param error Error, if any + * @param [response] Placement + */ + type CreatePlacementCallback = (error: (Error|null), response?: google.ads.admanager.v1.Placement) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|updatePlacement}. + * @param error Error, if any + * @param [response] Placement + */ + type UpdatePlacementCallback = (error: (Error|null), response?: google.ads.admanager.v1.Placement) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchCreatePlacements}. + * @param error Error, if any + * @param [response] BatchCreatePlacementsResponse + */ + type BatchCreatePlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreatePlacementsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchUpdatePlacements}. + * @param error Error, if any + * @param [response] BatchUpdatePlacementsResponse + */ + type BatchUpdatePlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdatePlacementsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchActivatePlacements}. + * @param error Error, if any + * @param [response] BatchActivatePlacementsResponse + */ + type BatchActivatePlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchActivatePlacementsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchDeactivatePlacements}. + * @param error Error, if any + * @param [response] BatchDeactivatePlacementsResponse + */ + type BatchDeactivatePlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchDeactivatePlacementsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchArchivePlacements}. + * @param error Error, if any + * @param [response] BatchArchivePlacementsResponse + */ + type BatchArchivePlacementsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchArchivePlacementsResponse) => void; + } + + /** Properties of a GetPlacementRequest. */ + interface IGetPlacementRequest { + + /** GetPlacementRequest name */ + name?: (string|null); + } + + /** Represents a GetPlacementRequest. */ + class GetPlacementRequest implements IGetPlacementRequest { + + /** + * Constructs a new GetPlacementRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetPlacementRequest); + + /** GetPlacementRequest name. */ + public name: string; + + /** + * Creates a new GetPlacementRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPlacementRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetPlacementRequest): google.ads.admanager.v1.GetPlacementRequest; + + /** + * Encodes the specified GetPlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * @param message GetPlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetPlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * @param message GetPlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetPlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPlacementRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPlacementRequest + * @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.ads.admanager.v1.GetPlacementRequest; + + /** + * Decodes a GetPlacementRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPlacementRequest + * @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.ads.admanager.v1.GetPlacementRequest; + + /** + * Verifies a GetPlacementRequest 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 GetPlacementRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPlacementRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPlacementRequest; + + /** + * Creates a plain object from a GetPlacementRequest message. Also converts values to other types if specified. + * @param message GetPlacementRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetPlacementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPlacementRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPlacementRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlacementsRequest. */ + interface IListPlacementsRequest { + + /** ListPlacementsRequest parent */ + parent?: (string|null); + + /** ListPlacementsRequest pageSize */ + pageSize?: (number|null); + + /** ListPlacementsRequest pageToken */ + pageToken?: (string|null); + + /** ListPlacementsRequest filter */ + filter?: (string|null); + + /** ListPlacementsRequest orderBy */ + orderBy?: (string|null); + + /** ListPlacementsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListPlacementsRequest. */ + class ListPlacementsRequest implements IListPlacementsRequest { + + /** + * Constructs a new ListPlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPlacementsRequest); + + /** ListPlacementsRequest parent. */ + public parent: string; + + /** ListPlacementsRequest pageSize. */ + public pageSize: number; + + /** ListPlacementsRequest pageToken. */ + public pageToken: string; + + /** ListPlacementsRequest filter. */ + public filter: string; + + /** ListPlacementsRequest orderBy. */ + public orderBy: string; + + /** ListPlacementsRequest skip. */ + public skip: number; + + /** + * Creates a new ListPlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListPlacementsRequest): google.ads.admanager.v1.ListPlacementsRequest; + + /** + * Encodes the specified ListPlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * @param message ListPlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * @param message ListPlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlacementsRequest + * @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.ads.admanager.v1.ListPlacementsRequest; + + /** + * Decodes a ListPlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlacementsRequest + * @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.ads.admanager.v1.ListPlacementsRequest; + + /** + * Verifies a ListPlacementsRequest 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 ListPlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPlacementsRequest; + + /** + * Creates a plain object from a ListPlacementsRequest message. Also converts values to other types if specified. + * @param message ListPlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlacementsResponse. */ + interface IListPlacementsResponse { + + /** ListPlacementsResponse placements */ + placements?: (google.ads.admanager.v1.IPlacement[]|null); + + /** ListPlacementsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListPlacementsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListPlacementsResponse. */ + class ListPlacementsResponse implements IListPlacementsResponse { + + /** + * Constructs a new ListPlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPlacementsResponse); + + /** ListPlacementsResponse placements. */ + public placements: google.ads.admanager.v1.IPlacement[]; + + /** ListPlacementsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListPlacementsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListPlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListPlacementsResponse): google.ads.admanager.v1.ListPlacementsResponse; + + /** + * Encodes the specified ListPlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * @param message ListPlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * @param message ListPlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlacementsResponse + * @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.ads.admanager.v1.ListPlacementsResponse; + + /** + * Decodes a ListPlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlacementsResponse + * @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.ads.admanager.v1.ListPlacementsResponse; + + /** + * Verifies a ListPlacementsResponse 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 ListPlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPlacementsResponse; + + /** + * Creates a plain object from a ListPlacementsResponse message. Also converts values to other types if specified. + * @param message ListPlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePlacementRequest. */ + interface ICreatePlacementRequest { + + /** CreatePlacementRequest parent */ + parent?: (string|null); + + /** CreatePlacementRequest placement */ + placement?: (google.ads.admanager.v1.IPlacement|null); + } + + /** Represents a CreatePlacementRequest. */ + class CreatePlacementRequest implements ICreatePlacementRequest { + + /** + * Constructs a new CreatePlacementRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICreatePlacementRequest); + + /** CreatePlacementRequest parent. */ + public parent: string; + + /** CreatePlacementRequest placement. */ + public placement?: (google.ads.admanager.v1.IPlacement|null); + + /** + * Creates a new CreatePlacementRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePlacementRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreatePlacementRequest): google.ads.admanager.v1.CreatePlacementRequest; + + /** + * Encodes the specified CreatePlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePlacementRequest.verify|verify} messages. + * @param message CreatePlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreatePlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePlacementRequest.verify|verify} messages. + * @param message CreatePlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreatePlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePlacementRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePlacementRequest + * @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.ads.admanager.v1.CreatePlacementRequest; + + /** + * Decodes a CreatePlacementRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePlacementRequest + * @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.ads.admanager.v1.CreatePlacementRequest; + + /** + * Verifies a CreatePlacementRequest 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 CreatePlacementRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePlacementRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreatePlacementRequest; + + /** + * Creates a plain object from a CreatePlacementRequest message. Also converts values to other types if specified. + * @param message CreatePlacementRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreatePlacementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePlacementRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePlacementRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreatePlacementsRequest. */ + interface IBatchCreatePlacementsRequest { + + /** BatchCreatePlacementsRequest parent */ + parent?: (string|null); + + /** BatchCreatePlacementsRequest requests */ + requests?: (google.ads.admanager.v1.ICreatePlacementRequest[]|null); + } + + /** Represents a BatchCreatePlacementsRequest. */ + class BatchCreatePlacementsRequest implements IBatchCreatePlacementsRequest { + + /** + * Constructs a new BatchCreatePlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreatePlacementsRequest); + + /** BatchCreatePlacementsRequest parent. */ + public parent: string; + + /** BatchCreatePlacementsRequest requests. */ + public requests: google.ads.admanager.v1.ICreatePlacementRequest[]; + + /** + * Creates a new BatchCreatePlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreatePlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreatePlacementsRequest): google.ads.admanager.v1.BatchCreatePlacementsRequest; + + /** + * Encodes the specified BatchCreatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsRequest.verify|verify} messages. + * @param message BatchCreatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsRequest.verify|verify} messages. + * @param message BatchCreatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreatePlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreatePlacementsRequest + * @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.ads.admanager.v1.BatchCreatePlacementsRequest; + + /** + * Decodes a BatchCreatePlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreatePlacementsRequest + * @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.ads.admanager.v1.BatchCreatePlacementsRequest; + + /** + * Verifies a BatchCreatePlacementsRequest 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 BatchCreatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreatePlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreatePlacementsRequest; + + /** + * Creates a plain object from a BatchCreatePlacementsRequest message. Also converts values to other types if specified. + * @param message BatchCreatePlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreatePlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreatePlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreatePlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreatePlacementsResponse. */ + interface IBatchCreatePlacementsResponse { + + /** BatchCreatePlacementsResponse placements */ + placements?: (google.ads.admanager.v1.IPlacement[]|null); + } + + /** Represents a BatchCreatePlacementsResponse. */ + class BatchCreatePlacementsResponse implements IBatchCreatePlacementsResponse { + + /** + * Constructs a new BatchCreatePlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreatePlacementsResponse); + + /** BatchCreatePlacementsResponse placements. */ + public placements: google.ads.admanager.v1.IPlacement[]; + + /** + * Creates a new BatchCreatePlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreatePlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreatePlacementsResponse): google.ads.admanager.v1.BatchCreatePlacementsResponse; + + /** + * Encodes the specified BatchCreatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsResponse.verify|verify} messages. + * @param message BatchCreatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsResponse.verify|verify} messages. + * @param message BatchCreatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreatePlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreatePlacementsResponse + * @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.ads.admanager.v1.BatchCreatePlacementsResponse; + + /** + * Decodes a BatchCreatePlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreatePlacementsResponse + * @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.ads.admanager.v1.BatchCreatePlacementsResponse; + + /** + * Verifies a BatchCreatePlacementsResponse 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 BatchCreatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreatePlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreatePlacementsResponse; + + /** + * Creates a plain object from a BatchCreatePlacementsResponse message. Also converts values to other types if specified. + * @param message BatchCreatePlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreatePlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreatePlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreatePlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePlacementRequest. */ + interface IUpdatePlacementRequest { + + /** UpdatePlacementRequest placement */ + placement?: (google.ads.admanager.v1.IPlacement|null); + + /** UpdatePlacementRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePlacementRequest. */ + class UpdatePlacementRequest implements IUpdatePlacementRequest { + + /** + * Constructs a new UpdatePlacementRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdatePlacementRequest); + + /** UpdatePlacementRequest placement. */ + public placement?: (google.ads.admanager.v1.IPlacement|null); + + /** UpdatePlacementRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePlacementRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePlacementRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IUpdatePlacementRequest): google.ads.admanager.v1.UpdatePlacementRequest; + + /** + * Encodes the specified UpdatePlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePlacementRequest.verify|verify} messages. + * @param message UpdatePlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUpdatePlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePlacementRequest.verify|verify} messages. + * @param message UpdatePlacementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUpdatePlacementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePlacementRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePlacementRequest + * @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.ads.admanager.v1.UpdatePlacementRequest; + + /** + * Decodes an UpdatePlacementRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePlacementRequest + * @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.ads.admanager.v1.UpdatePlacementRequest; + + /** + * Verifies an UpdatePlacementRequest 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 UpdatePlacementRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePlacementRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdatePlacementRequest; + + /** + * Creates a plain object from an UpdatePlacementRequest message. Also converts values to other types if specified. + * @param message UpdatePlacementRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UpdatePlacementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePlacementRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePlacementRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdatePlacementsRequest. */ + interface IBatchUpdatePlacementsRequest { + + /** BatchUpdatePlacementsRequest parent */ + parent?: (string|null); + + /** BatchUpdatePlacementsRequest requests */ + requests?: (google.ads.admanager.v1.IUpdatePlacementRequest[]|null); + } + + /** Represents a BatchUpdatePlacementsRequest. */ + class BatchUpdatePlacementsRequest implements IBatchUpdatePlacementsRequest { + + /** + * Constructs a new BatchUpdatePlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchUpdatePlacementsRequest); + + /** BatchUpdatePlacementsRequest parent. */ + public parent: string; + + /** BatchUpdatePlacementsRequest requests. */ + public requests: google.ads.admanager.v1.IUpdatePlacementRequest[]; + + /** + * Creates a new BatchUpdatePlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdatePlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchUpdatePlacementsRequest): google.ads.admanager.v1.BatchUpdatePlacementsRequest; + + /** + * Encodes the specified BatchUpdatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsRequest.verify|verify} messages. + * @param message BatchUpdatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchUpdatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsRequest.verify|verify} messages. + * @param message BatchUpdatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdatePlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdatePlacementsRequest + * @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.ads.admanager.v1.BatchUpdatePlacementsRequest; + + /** + * Decodes a BatchUpdatePlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdatePlacementsRequest + * @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.ads.admanager.v1.BatchUpdatePlacementsRequest; + + /** + * Verifies a BatchUpdatePlacementsRequest 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 BatchUpdatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdatePlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdatePlacementsRequest; + + /** + * Creates a plain object from a BatchUpdatePlacementsRequest message. Also converts values to other types if specified. + * @param message BatchUpdatePlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchUpdatePlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdatePlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdatePlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdatePlacementsResponse. */ + interface IBatchUpdatePlacementsResponse { + + /** BatchUpdatePlacementsResponse placements */ + placements?: (google.ads.admanager.v1.IPlacement[]|null); + } + + /** Represents a BatchUpdatePlacementsResponse. */ + class BatchUpdatePlacementsResponse implements IBatchUpdatePlacementsResponse { + + /** + * Constructs a new BatchUpdatePlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchUpdatePlacementsResponse); + + /** BatchUpdatePlacementsResponse placements. */ + public placements: google.ads.admanager.v1.IPlacement[]; + + /** + * Creates a new BatchUpdatePlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdatePlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchUpdatePlacementsResponse): google.ads.admanager.v1.BatchUpdatePlacementsResponse; + + /** + * Encodes the specified BatchUpdatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsResponse.verify|verify} messages. + * @param message BatchUpdatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchUpdatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsResponse.verify|verify} messages. + * @param message BatchUpdatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdatePlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdatePlacementsResponse + * @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.ads.admanager.v1.BatchUpdatePlacementsResponse; + + /** + * Decodes a BatchUpdatePlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdatePlacementsResponse + * @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.ads.admanager.v1.BatchUpdatePlacementsResponse; + + /** + * Verifies a BatchUpdatePlacementsResponse 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 BatchUpdatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdatePlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdatePlacementsResponse; + + /** + * Creates a plain object from a BatchUpdatePlacementsResponse message. Also converts values to other types if specified. + * @param message BatchUpdatePlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchUpdatePlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdatePlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdatePlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchActivatePlacementsRequest. */ + interface IBatchActivatePlacementsRequest { + + /** BatchActivatePlacementsRequest parent */ + parent?: (string|null); + + /** BatchActivatePlacementsRequest names */ + names?: (string[]|null); + } + + /** Represents a BatchActivatePlacementsRequest. */ + class BatchActivatePlacementsRequest implements IBatchActivatePlacementsRequest { + + /** + * Constructs a new BatchActivatePlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchActivatePlacementsRequest); + + /** BatchActivatePlacementsRequest parent. */ + public parent: string; + + /** BatchActivatePlacementsRequest names. */ + public names: string[]; + + /** + * Creates a new BatchActivatePlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchActivatePlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchActivatePlacementsRequest): google.ads.admanager.v1.BatchActivatePlacementsRequest; + + /** + * Encodes the specified BatchActivatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsRequest.verify|verify} messages. + * @param message BatchActivatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchActivatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchActivatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsRequest.verify|verify} messages. + * @param message BatchActivatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchActivatePlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchActivatePlacementsRequest + * @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.ads.admanager.v1.BatchActivatePlacementsRequest; + + /** + * Decodes a BatchActivatePlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchActivatePlacementsRequest + * @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.ads.admanager.v1.BatchActivatePlacementsRequest; + + /** + * Verifies a BatchActivatePlacementsRequest 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 BatchActivatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchActivatePlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivatePlacementsRequest; + + /** + * Creates a plain object from a BatchActivatePlacementsRequest message. Also converts values to other types if specified. + * @param message BatchActivatePlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchActivatePlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchActivatePlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchActivatePlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchActivatePlacementsResponse. */ + interface IBatchActivatePlacementsResponse { + } + + /** Represents a BatchActivatePlacementsResponse. */ + class BatchActivatePlacementsResponse implements IBatchActivatePlacementsResponse { + + /** + * Constructs a new BatchActivatePlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchActivatePlacementsResponse); + + /** + * Creates a new BatchActivatePlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchActivatePlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchActivatePlacementsResponse): google.ads.admanager.v1.BatchActivatePlacementsResponse; + + /** + * Encodes the specified BatchActivatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsResponse.verify|verify} messages. + * @param message BatchActivatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchActivatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchActivatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsResponse.verify|verify} messages. + * @param message BatchActivatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchActivatePlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchActivatePlacementsResponse + * @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.ads.admanager.v1.BatchActivatePlacementsResponse; + + /** + * Decodes a BatchActivatePlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchActivatePlacementsResponse + * @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.ads.admanager.v1.BatchActivatePlacementsResponse; + + /** + * Verifies a BatchActivatePlacementsResponse 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 BatchActivatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchActivatePlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivatePlacementsResponse; + + /** + * Creates a plain object from a BatchActivatePlacementsResponse message. Also converts values to other types if specified. + * @param message BatchActivatePlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchActivatePlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchActivatePlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchActivatePlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchDeactivatePlacementsRequest. */ + interface IBatchDeactivatePlacementsRequest { + + /** BatchDeactivatePlacementsRequest parent */ + parent?: (string|null); + + /** BatchDeactivatePlacementsRequest names */ + names?: (string[]|null); + } + + /** Represents a BatchDeactivatePlacementsRequest. */ + class BatchDeactivatePlacementsRequest implements IBatchDeactivatePlacementsRequest { + + /** + * Constructs a new BatchDeactivatePlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest); + + /** BatchDeactivatePlacementsRequest parent. */ + public parent: string; + + /** BatchDeactivatePlacementsRequest names. */ + public names: string[]; + + /** + * Creates a new BatchDeactivatePlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeactivatePlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest): google.ads.admanager.v1.BatchDeactivatePlacementsRequest; + + /** + * Encodes the specified BatchDeactivatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsRequest.verify|verify} messages. + * @param message BatchDeactivatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchDeactivatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsRequest.verify|verify} messages. + * @param message BatchDeactivatePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchDeactivatePlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeactivatePlacementsRequest + * @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.ads.admanager.v1.BatchDeactivatePlacementsRequest; + + /** + * Decodes a BatchDeactivatePlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeactivatePlacementsRequest + * @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.ads.admanager.v1.BatchDeactivatePlacementsRequest; + + /** + * Verifies a BatchDeactivatePlacementsRequest 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 BatchDeactivatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeactivatePlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivatePlacementsRequest; + + /** + * Creates a plain object from a BatchDeactivatePlacementsRequest message. Also converts values to other types if specified. + * @param message BatchDeactivatePlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchDeactivatePlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchDeactivatePlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchDeactivatePlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchDeactivatePlacementsResponse. */ + interface IBatchDeactivatePlacementsResponse { + } + + /** Represents a BatchDeactivatePlacementsResponse. */ + class BatchDeactivatePlacementsResponse implements IBatchDeactivatePlacementsResponse { + + /** + * Constructs a new BatchDeactivatePlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchDeactivatePlacementsResponse); + + /** + * Creates a new BatchDeactivatePlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeactivatePlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchDeactivatePlacementsResponse): google.ads.admanager.v1.BatchDeactivatePlacementsResponse; + + /** + * Encodes the specified BatchDeactivatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsResponse.verify|verify} messages. + * @param message BatchDeactivatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchDeactivatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsResponse.verify|verify} messages. + * @param message BatchDeactivatePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchDeactivatePlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeactivatePlacementsResponse + * @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.ads.admanager.v1.BatchDeactivatePlacementsResponse; + + /** + * Decodes a BatchDeactivatePlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeactivatePlacementsResponse + * @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.ads.admanager.v1.BatchDeactivatePlacementsResponse; + + /** + * Verifies a BatchDeactivatePlacementsResponse 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 BatchDeactivatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeactivatePlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivatePlacementsResponse; + + /** + * Creates a plain object from a BatchDeactivatePlacementsResponse message. Also converts values to other types if specified. + * @param message BatchDeactivatePlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchDeactivatePlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchDeactivatePlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchDeactivatePlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchArchivePlacementsRequest. */ + interface IBatchArchivePlacementsRequest { + + /** BatchArchivePlacementsRequest parent */ + parent?: (string|null); + + /** BatchArchivePlacementsRequest names */ + names?: (string[]|null); + } + + /** Represents a BatchArchivePlacementsRequest. */ + class BatchArchivePlacementsRequest implements IBatchArchivePlacementsRequest { + + /** + * Constructs a new BatchArchivePlacementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchArchivePlacementsRequest); + + /** BatchArchivePlacementsRequest parent. */ + public parent: string; + + /** BatchArchivePlacementsRequest names. */ + public names: string[]; + + /** + * Creates a new BatchArchivePlacementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchArchivePlacementsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchArchivePlacementsRequest): google.ads.admanager.v1.BatchArchivePlacementsRequest; + + /** + * Encodes the specified BatchArchivePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsRequest.verify|verify} messages. + * @param message BatchArchivePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchArchivePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchArchivePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsRequest.verify|verify} messages. + * @param message BatchArchivePlacementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchArchivePlacementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchArchivePlacementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchArchivePlacementsRequest + * @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.ads.admanager.v1.BatchArchivePlacementsRequest; + + /** + * Decodes a BatchArchivePlacementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchArchivePlacementsRequest + * @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.ads.admanager.v1.BatchArchivePlacementsRequest; + + /** + * Verifies a BatchArchivePlacementsRequest 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 BatchArchivePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchArchivePlacementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchArchivePlacementsRequest; + + /** + * Creates a plain object from a BatchArchivePlacementsRequest message. Also converts values to other types if specified. + * @param message BatchArchivePlacementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchArchivePlacementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchArchivePlacementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchArchivePlacementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchArchivePlacementsResponse. */ + interface IBatchArchivePlacementsResponse { + } + + /** Represents a BatchArchivePlacementsResponse. */ + class BatchArchivePlacementsResponse implements IBatchArchivePlacementsResponse { + + /** + * Constructs a new BatchArchivePlacementsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchArchivePlacementsResponse); + + /** + * Creates a new BatchArchivePlacementsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchArchivePlacementsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchArchivePlacementsResponse): google.ads.admanager.v1.BatchArchivePlacementsResponse; + + /** + * Encodes the specified BatchArchivePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsResponse.verify|verify} messages. + * @param message BatchArchivePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchArchivePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchArchivePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsResponse.verify|verify} messages. + * @param message BatchArchivePlacementsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchArchivePlacementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchArchivePlacementsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchArchivePlacementsResponse + * @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.ads.admanager.v1.BatchArchivePlacementsResponse; + + /** + * Decodes a BatchArchivePlacementsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchArchivePlacementsResponse + * @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.ads.admanager.v1.BatchArchivePlacementsResponse; + + /** + * Verifies a BatchArchivePlacementsResponse 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 BatchArchivePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchArchivePlacementsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchArchivePlacementsResponse; + + /** + * Creates a plain object from a BatchArchivePlacementsResponse message. Also converts values to other types if specified. + * @param message BatchArchivePlacementsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchArchivePlacementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchArchivePlacementsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchArchivePlacementsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateAuctionDeal. */ + interface IPrivateAuctionDeal { + + /** PrivateAuctionDeal name */ + name?: (string|null); + + /** PrivateAuctionDeal privateAuctionDealId */ + privateAuctionDealId?: (number|Long|string|null); + + /** PrivateAuctionDeal privateAuctionId */ + privateAuctionId?: (number|Long|string|null); + + /** PrivateAuctionDeal privateAuctionDisplayName */ + privateAuctionDisplayName?: (string|null); + + /** PrivateAuctionDeal buyerAccountId */ + buyerAccountId?: (number|Long|string|null); + + /** PrivateAuctionDeal externalDealId */ + externalDealId?: (number|Long|string|null); + + /** PrivateAuctionDeal targeting */ + targeting?: (google.ads.admanager.v1.ITargeting|null); + + /** PrivateAuctionDeal endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuctionDeal floorPrice */ + floorPrice?: (google.type.IMoney|null); + + /** PrivateAuctionDeal creativeSizes */ + creativeSizes?: (google.ads.admanager.v1.ISize[]|null); + + /** PrivateAuctionDeal status */ + status?: (google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|keyof typeof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null); + + /** PrivateAuctionDeal auctionPriorityEnabled */ + auctionPriorityEnabled?: (boolean|null); + + /** PrivateAuctionDeal blockOverrideEnabled */ + blockOverrideEnabled?: (boolean|null); + + /** PrivateAuctionDeal buyerPermissionType */ + buyerPermissionType?: (google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|keyof typeof google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null); + + /** PrivateAuctionDeal buyerData */ + buyerData?: (google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null); + + /** PrivateAuctionDeal createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuctionDeal updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PrivateAuctionDeal. */ + class PrivateAuctionDeal implements IPrivateAuctionDeal { + + /** + * Constructs a new PrivateAuctionDeal. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IPrivateAuctionDeal); + + /** PrivateAuctionDeal name. */ + public name: string; + + /** PrivateAuctionDeal privateAuctionDealId. */ + public privateAuctionDealId?: (number|Long|string|null); + + /** PrivateAuctionDeal privateAuctionId. */ + public privateAuctionId?: (number|Long|string|null); + + /** PrivateAuctionDeal privateAuctionDisplayName. */ + public privateAuctionDisplayName?: (string|null); + + /** PrivateAuctionDeal buyerAccountId. */ + public buyerAccountId?: (number|Long|string|null); + + /** PrivateAuctionDeal externalDealId. */ + public externalDealId?: (number|Long|string|null); + + /** PrivateAuctionDeal targeting. */ + public targeting?: (google.ads.admanager.v1.ITargeting|null); + + /** PrivateAuctionDeal endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuctionDeal floorPrice. */ + public floorPrice?: (google.type.IMoney|null); + + /** PrivateAuctionDeal creativeSizes. */ + public creativeSizes: google.ads.admanager.v1.ISize[]; + + /** PrivateAuctionDeal status. */ + public status?: (google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|keyof typeof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null); + + /** PrivateAuctionDeal auctionPriorityEnabled. */ + public auctionPriorityEnabled?: (boolean|null); + + /** PrivateAuctionDeal blockOverrideEnabled. */ + public blockOverrideEnabled?: (boolean|null); + + /** PrivateAuctionDeal buyerPermissionType. */ + public buyerPermissionType?: (google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|keyof typeof google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null); + + /** PrivateAuctionDeal buyerData. */ + public buyerData?: (google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null); + + /** PrivateAuctionDeal createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuctionDeal updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PrivateAuctionDeal instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateAuctionDeal instance + */ + public static create(properties?: google.ads.admanager.v1.IPrivateAuctionDeal): google.ads.admanager.v1.PrivateAuctionDeal; + + /** + * Encodes the specified PrivateAuctionDeal message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * @param message PrivateAuctionDeal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IPrivateAuctionDeal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateAuctionDeal message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * @param message PrivateAuctionDeal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IPrivateAuctionDeal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateAuctionDeal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateAuctionDeal + * @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.ads.admanager.v1.PrivateAuctionDeal; + + /** + * Decodes a PrivateAuctionDeal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateAuctionDeal + * @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.ads.admanager.v1.PrivateAuctionDeal; + + /** + * Verifies a PrivateAuctionDeal 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 PrivateAuctionDeal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateAuctionDeal + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuctionDeal; + + /** + * Creates a plain object from a PrivateAuctionDeal message. Also converts values to other types if specified. + * @param message PrivateAuctionDeal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.PrivateAuctionDeal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateAuctionDeal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateAuctionDeal + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivateAuctionDeal { + + /** Properties of a BuyerData. */ + interface IBuyerData { + + /** BuyerData buyerEmails */ + buyerEmails?: (string[]|null); + } + + /** Represents a BuyerData. */ + class BuyerData implements IBuyerData { + + /** + * Constructs a new BuyerData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData); + + /** BuyerData buyerEmails. */ + public buyerEmails: string[]; + + /** + * Creates a new BuyerData instance using the specified properties. + * @param [properties] Properties to set + * @returns BuyerData instance + */ + public static create(properties?: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData): google.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + + /** + * Encodes the specified BuyerData message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. + * @param message BuyerData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuyerData message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. + * @param message BuyerData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuyerData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuyerData + * @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.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + + /** + * Decodes a BuyerData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuyerData + * @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.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + + /** + * Verifies a BuyerData 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 BuyerData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuyerData + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuctionDeal.BuyerData; + + /** + * Creates a plain object from a BuyerData message. Also converts values to other types if specified. + * @param message BuyerData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.PrivateAuctionDeal.BuyerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuyerData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuyerData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PrivateMarketplaceDealStatusEnum. */ + interface IPrivateMarketplaceDealStatusEnum { + } + + /** Represents a PrivateMarketplaceDealStatusEnum. */ + class PrivateMarketplaceDealStatusEnum implements IPrivateMarketplaceDealStatusEnum { + + /** + * Constructs a new PrivateMarketplaceDealStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum); + + /** + * Creates a new PrivateMarketplaceDealStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateMarketplaceDealStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum): google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + + /** + * Encodes the specified PrivateMarketplaceDealStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * @param message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateMarketplaceDealStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * @param message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateMarketplaceDealStatusEnum + * @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.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + + /** + * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateMarketplaceDealStatusEnum + * @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.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + + /** + * Verifies a PrivateMarketplaceDealStatusEnum 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 PrivateMarketplaceDealStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateMarketplaceDealStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum; + + /** + * Creates a plain object from a PrivateMarketplaceDealStatusEnum message. Also converts values to other types if specified. + * @param message PrivateMarketplaceDealStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateMarketplaceDealStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateMarketplaceDealStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivateMarketplaceDealStatusEnum { + + /** PrivateMarketplaceDealStatus enum. */ + enum PrivateMarketplaceDealStatus { + PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED = 0, + PENDING = 1, + ACTIVE = 2, + CANCELED = 3, + SELLER_PAUSED = 4, + BUYER_PAUSED = 5 + } + } + + /** Properties of a Targeting. */ + interface ITargeting { + + /** Targeting geoTargeting */ + geoTargeting?: (google.ads.admanager.v1.IGeoTargeting|null); + + /** Targeting technologyTargeting */ + technologyTargeting?: (google.ads.admanager.v1.ITechnologyTargeting|null); + + /** Targeting inventoryTargeting */ + inventoryTargeting?: (google.ads.admanager.v1.IInventoryTargeting|null); + + /** Targeting requestPlatformTargeting */ + requestPlatformTargeting?: (google.ads.admanager.v1.IRequestPlatformTargeting|null); + + /** Targeting customTargeting */ + customTargeting?: (google.ads.admanager.v1.ICustomTargeting|null); + + /** Targeting userDomainTargeting */ + userDomainTargeting?: (google.ads.admanager.v1.IUserDomainTargeting|null); + + /** Targeting videoPositionTargeting */ + videoPositionTargeting?: (google.ads.admanager.v1.IVideoPositionTargeting|null); + + /** Targeting dataSegmentTargeting */ + dataSegmentTargeting?: (google.ads.admanager.v1.IDataSegmentTargeting|null); + + /** Targeting contentTargeting */ + contentTargeting?: (google.ads.admanager.v1.IContentTargeting|null); + + /** Targeting mobileApplicationTargeting */ + mobileApplicationTargeting?: (google.ads.admanager.v1.IMobileApplicationTargeting|null); + } + + /** Represents a Targeting. */ + class Targeting implements ITargeting { + + /** + * Constructs a new Targeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ITargeting); + + /** Targeting geoTargeting. */ + public geoTargeting?: (google.ads.admanager.v1.IGeoTargeting|null); + + /** Targeting technologyTargeting. */ + public technologyTargeting?: (google.ads.admanager.v1.ITechnologyTargeting|null); + + /** Targeting inventoryTargeting. */ + public inventoryTargeting?: (google.ads.admanager.v1.IInventoryTargeting|null); + + /** Targeting requestPlatformTargeting. */ + public requestPlatformTargeting?: (google.ads.admanager.v1.IRequestPlatformTargeting|null); + + /** Targeting customTargeting. */ + public customTargeting?: (google.ads.admanager.v1.ICustomTargeting|null); + + /** Targeting userDomainTargeting. */ + public userDomainTargeting?: (google.ads.admanager.v1.IUserDomainTargeting|null); + + /** Targeting videoPositionTargeting. */ + public videoPositionTargeting?: (google.ads.admanager.v1.IVideoPositionTargeting|null); + + /** Targeting dataSegmentTargeting. */ + public dataSegmentTargeting?: (google.ads.admanager.v1.IDataSegmentTargeting|null); + + /** Targeting contentTargeting. */ + public contentTargeting?: (google.ads.admanager.v1.IContentTargeting|null); + + /** Targeting mobileApplicationTargeting. */ + public mobileApplicationTargeting?: (google.ads.admanager.v1.IMobileApplicationTargeting|null); + + /** + * Creates a new Targeting instance using the specified properties. + * @param [properties] Properties to set + * @returns Targeting instance + */ + public static create(properties?: google.ads.admanager.v1.ITargeting): google.ads.admanager.v1.Targeting; + + /** + * Encodes the specified Targeting message. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * @param message Targeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ITargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Targeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * @param message Targeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ITargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Targeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Targeting + * @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.ads.admanager.v1.Targeting; + + /** + * Decodes a Targeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Targeting + * @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.ads.admanager.v1.Targeting; + + /** + * Verifies a Targeting 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 Targeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Targeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Targeting; + + /** + * Creates a plain object from a Targeting message. Also converts values to other types if specified. + * @param message Targeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Targeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Targeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Targeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GeoTargeting. */ + interface IGeoTargeting { + + /** GeoTargeting targetedGeos */ + targetedGeos?: (string[]|null); + + /** GeoTargeting excludedGeos */ + excludedGeos?: (string[]|null); + } + + /** Represents a GeoTargeting. */ + class GeoTargeting implements IGeoTargeting { + + /** + * Constructs a new GeoTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGeoTargeting); + + /** GeoTargeting targetedGeos. */ + public targetedGeos: string[]; + + /** GeoTargeting excludedGeos. */ + public excludedGeos: string[]; + + /** + * Creates a new GeoTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns GeoTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IGeoTargeting): google.ads.admanager.v1.GeoTargeting; + + /** + * Encodes the specified GeoTargeting message. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * @param message GeoTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGeoTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeoTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * @param message GeoTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGeoTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeoTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeoTargeting + * @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.ads.admanager.v1.GeoTargeting; + + /** + * Decodes a GeoTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeoTargeting + * @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.ads.admanager.v1.GeoTargeting; + + /** + * Verifies a GeoTargeting 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 GeoTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeoTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GeoTargeting; + + /** + * Creates a plain object from a GeoTargeting message. Also converts values to other types if specified. + * @param message GeoTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GeoTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeoTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeoTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TechnologyTargeting. */ + interface ITechnologyTargeting { + + /** TechnologyTargeting bandwidthTargeting */ + bandwidthTargeting?: (google.ads.admanager.v1.IBandwidthTargeting|null); + + /** TechnologyTargeting browserTargeting */ + browserTargeting?: (google.ads.admanager.v1.IBrowserTargeting|null); + + /** TechnologyTargeting browserLanguageTargeting */ + browserLanguageTargeting?: (google.ads.admanager.v1.IBrowserLanguageTargeting|null); + + /** TechnologyTargeting deviceCapabilityTargeting */ + deviceCapabilityTargeting?: (google.ads.admanager.v1.IDeviceCapabilityTargeting|null); + + /** TechnologyTargeting deviceCategoryTargeting */ + deviceCategoryTargeting?: (google.ads.admanager.v1.IDeviceCategoryTargeting|null); + + /** TechnologyTargeting deviceManufacturerTargeting */ + deviceManufacturerTargeting?: (google.ads.admanager.v1.IDeviceManufacturerTargeting|null); + + /** TechnologyTargeting mobileCarrierTargeting */ + mobileCarrierTargeting?: (google.ads.admanager.v1.IMobileCarrierTargeting|null); + + /** TechnologyTargeting operatingSystemTargeting */ + operatingSystemTargeting?: (google.ads.admanager.v1.IOperatingSystemTargeting|null); + } + + /** Represents a TechnologyTargeting. */ + class TechnologyTargeting implements ITechnologyTargeting { + + /** + * Constructs a new TechnologyTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ITechnologyTargeting); + + /** TechnologyTargeting bandwidthTargeting. */ + public bandwidthTargeting?: (google.ads.admanager.v1.IBandwidthTargeting|null); + + /** TechnologyTargeting browserTargeting. */ + public browserTargeting?: (google.ads.admanager.v1.IBrowserTargeting|null); + + /** TechnologyTargeting browserLanguageTargeting. */ + public browserLanguageTargeting?: (google.ads.admanager.v1.IBrowserLanguageTargeting|null); + + /** TechnologyTargeting deviceCapabilityTargeting. */ + public deviceCapabilityTargeting?: (google.ads.admanager.v1.IDeviceCapabilityTargeting|null); + + /** TechnologyTargeting deviceCategoryTargeting. */ + public deviceCategoryTargeting?: (google.ads.admanager.v1.IDeviceCategoryTargeting|null); + + /** TechnologyTargeting deviceManufacturerTargeting. */ + public deviceManufacturerTargeting?: (google.ads.admanager.v1.IDeviceManufacturerTargeting|null); + + /** TechnologyTargeting mobileCarrierTargeting. */ + public mobileCarrierTargeting?: (google.ads.admanager.v1.IMobileCarrierTargeting|null); + + /** TechnologyTargeting operatingSystemTargeting. */ + public operatingSystemTargeting?: (google.ads.admanager.v1.IOperatingSystemTargeting|null); + + /** + * Creates a new TechnologyTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns TechnologyTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.ITechnologyTargeting): google.ads.admanager.v1.TechnologyTargeting; + + /** + * Encodes the specified TechnologyTargeting message. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * @param message TechnologyTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ITechnologyTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TechnologyTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * @param message TechnologyTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ITechnologyTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TechnologyTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TechnologyTargeting + * @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.ads.admanager.v1.TechnologyTargeting; + + /** + * Decodes a TechnologyTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TechnologyTargeting + * @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.ads.admanager.v1.TechnologyTargeting; + + /** + * Verifies a TechnologyTargeting 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 TechnologyTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TechnologyTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TechnologyTargeting; + + /** + * Creates a plain object from a TechnologyTargeting message. Also converts values to other types if specified. + * @param message TechnologyTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.TechnologyTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TechnologyTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TechnologyTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BandwidthTargeting. */ + interface IBandwidthTargeting { + + /** BandwidthTargeting targetedBandwidthGroups */ + targetedBandwidthGroups?: (string[]|null); + + /** BandwidthTargeting excludedBandwidthGroups */ + excludedBandwidthGroups?: (string[]|null); + } + + /** Represents a BandwidthTargeting. */ + class BandwidthTargeting implements IBandwidthTargeting { + + /** + * Constructs a new BandwidthTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBandwidthTargeting); + + /** BandwidthTargeting targetedBandwidthGroups. */ + public targetedBandwidthGroups: string[]; + + /** BandwidthTargeting excludedBandwidthGroups. */ + public excludedBandwidthGroups: string[]; + + /** + * Creates a new BandwidthTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns BandwidthTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IBandwidthTargeting): google.ads.admanager.v1.BandwidthTargeting; + + /** + * Encodes the specified BandwidthTargeting message. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * @param message BandwidthTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBandwidthTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BandwidthTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * @param message BandwidthTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBandwidthTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BandwidthTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BandwidthTargeting + * @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.ads.admanager.v1.BandwidthTargeting; + + /** + * Decodes a BandwidthTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BandwidthTargeting + * @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.ads.admanager.v1.BandwidthTargeting; + + /** + * Verifies a BandwidthTargeting 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 BandwidthTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BandwidthTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BandwidthTargeting; + + /** + * Creates a plain object from a BandwidthTargeting message. Also converts values to other types if specified. + * @param message BandwidthTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BandwidthTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BandwidthTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BandwidthTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BrowserTargeting. */ + interface IBrowserTargeting { + + /** BrowserTargeting targetedBrowsers */ + targetedBrowsers?: (string[]|null); + + /** BrowserTargeting excludedBrowsers */ + excludedBrowsers?: (string[]|null); + } + + /** Represents a BrowserTargeting. */ + class BrowserTargeting implements IBrowserTargeting { + + /** + * Constructs a new BrowserTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBrowserTargeting); + + /** BrowserTargeting targetedBrowsers. */ + public targetedBrowsers: string[]; + + /** BrowserTargeting excludedBrowsers. */ + public excludedBrowsers: string[]; + + /** + * Creates a new BrowserTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns BrowserTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IBrowserTargeting): google.ads.admanager.v1.BrowserTargeting; + + /** + * Encodes the specified BrowserTargeting message. Does not implicitly {@link google.ads.admanager.v1.BrowserTargeting.verify|verify} messages. + * @param message BrowserTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBrowserTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BrowserTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserTargeting.verify|verify} messages. + * @param message BrowserTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBrowserTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BrowserTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BrowserTargeting + * @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.ads.admanager.v1.BrowserTargeting; + + /** + * Decodes a BrowserTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BrowserTargeting + * @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.ads.admanager.v1.BrowserTargeting; + + /** + * Verifies a BrowserTargeting 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 BrowserTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BrowserTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BrowserTargeting; + + /** + * Creates a plain object from a BrowserTargeting message. Also converts values to other types if specified. + * @param message BrowserTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BrowserTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BrowserTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BrowserTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BrowserLanguageTargeting. */ + interface IBrowserLanguageTargeting { + + /** BrowserLanguageTargeting targetedBrowserLanguages */ + targetedBrowserLanguages?: (string[]|null); + + /** BrowserLanguageTargeting excludedBrowserLanguages */ + excludedBrowserLanguages?: (string[]|null); + } + + /** Represents a BrowserLanguageTargeting. */ + class BrowserLanguageTargeting implements IBrowserLanguageTargeting { + + /** + * Constructs a new BrowserLanguageTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBrowserLanguageTargeting); + + /** BrowserLanguageTargeting targetedBrowserLanguages. */ + public targetedBrowserLanguages: string[]; + + /** BrowserLanguageTargeting excludedBrowserLanguages. */ + public excludedBrowserLanguages: string[]; + + /** + * Creates a new BrowserLanguageTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns BrowserLanguageTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IBrowserLanguageTargeting): google.ads.admanager.v1.BrowserLanguageTargeting; + + /** + * Encodes the specified BrowserLanguageTargeting message. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguageTargeting.verify|verify} messages. + * @param message BrowserLanguageTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBrowserLanguageTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BrowserLanguageTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguageTargeting.verify|verify} messages. + * @param message BrowserLanguageTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBrowserLanguageTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BrowserLanguageTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BrowserLanguageTargeting + * @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.ads.admanager.v1.BrowserLanguageTargeting; + + /** + * Decodes a BrowserLanguageTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BrowserLanguageTargeting + * @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.ads.admanager.v1.BrowserLanguageTargeting; + + /** + * Verifies a BrowserLanguageTargeting 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 BrowserLanguageTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BrowserLanguageTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BrowserLanguageTargeting; + + /** + * Creates a plain object from a BrowserLanguageTargeting message. Also converts values to other types if specified. + * @param message BrowserLanguageTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BrowserLanguageTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BrowserLanguageTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BrowserLanguageTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeviceCategoryTargeting. */ + interface IDeviceCategoryTargeting { + + /** DeviceCategoryTargeting targetedCategories */ + targetedCategories?: (string[]|null); + + /** DeviceCategoryTargeting excludedCategories */ + excludedCategories?: (string[]|null); + } + + /** Represents a DeviceCategoryTargeting. */ + class DeviceCategoryTargeting implements IDeviceCategoryTargeting { + + /** + * Constructs a new DeviceCategoryTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceCategoryTargeting); + + /** DeviceCategoryTargeting targetedCategories. */ + public targetedCategories: string[]; + + /** DeviceCategoryTargeting excludedCategories. */ + public excludedCategories: string[]; + + /** + * Creates a new DeviceCategoryTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceCategoryTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IDeviceCategoryTargeting): google.ads.admanager.v1.DeviceCategoryTargeting; + + /** + * Encodes the specified DeviceCategoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * @param message DeviceCategoryTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDeviceCategoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceCategoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * @param message DeviceCategoryTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCategoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceCategoryTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceCategoryTargeting + * @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.ads.admanager.v1.DeviceCategoryTargeting; + + /** + * Decodes a DeviceCategoryTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceCategoryTargeting + * @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.ads.admanager.v1.DeviceCategoryTargeting; + + /** + * Verifies a DeviceCategoryTargeting 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 DeviceCategoryTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceCategoryTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCategoryTargeting; + + /** + * Creates a plain object from a DeviceCategoryTargeting message. Also converts values to other types if specified. + * @param message DeviceCategoryTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DeviceCategoryTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceCategoryTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceCategoryTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeviceCapabilityTargeting. */ + interface IDeviceCapabilityTargeting { + + /** DeviceCapabilityTargeting targetedCapabilities */ + targetedCapabilities?: (string[]|null); + + /** DeviceCapabilityTargeting excludedCapabilities */ + excludedCapabilities?: (string[]|null); + } + + /** Represents a DeviceCapabilityTargeting. */ + class DeviceCapabilityTargeting implements IDeviceCapabilityTargeting { + + /** + * Constructs a new DeviceCapabilityTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceCapabilityTargeting); + + /** DeviceCapabilityTargeting targetedCapabilities. */ + public targetedCapabilities: string[]; + + /** DeviceCapabilityTargeting excludedCapabilities. */ + public excludedCapabilities: string[]; + + /** + * Creates a new DeviceCapabilityTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceCapabilityTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IDeviceCapabilityTargeting): google.ads.admanager.v1.DeviceCapabilityTargeting; + + /** + * Encodes the specified DeviceCapabilityTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCapabilityTargeting.verify|verify} messages. + * @param message DeviceCapabilityTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDeviceCapabilityTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceCapabilityTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCapabilityTargeting.verify|verify} messages. + * @param message DeviceCapabilityTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceCapabilityTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceCapabilityTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceCapabilityTargeting + * @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.ads.admanager.v1.DeviceCapabilityTargeting; + + /** + * Decodes a DeviceCapabilityTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceCapabilityTargeting + * @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.ads.admanager.v1.DeviceCapabilityTargeting; + + /** + * Verifies a DeviceCapabilityTargeting 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 DeviceCapabilityTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceCapabilityTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceCapabilityTargeting; + + /** + * Creates a plain object from a DeviceCapabilityTargeting message. Also converts values to other types if specified. + * @param message DeviceCapabilityTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DeviceCapabilityTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceCapabilityTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceCapabilityTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeviceManufacturerTargeting. */ + interface IDeviceManufacturerTargeting { + + /** DeviceManufacturerTargeting targetedDeviceManufacturers */ + targetedDeviceManufacturers?: (string[]|null); + + /** DeviceManufacturerTargeting excludedDeviceManufacturers */ + excludedDeviceManufacturers?: (string[]|null); + + /** DeviceManufacturerTargeting targetedMobileDevices */ + targetedMobileDevices?: (string[]|null); + + /** DeviceManufacturerTargeting excludedMobileDevices */ + excludedMobileDevices?: (string[]|null); + + /** DeviceManufacturerTargeting targetedMobileDeviceSubmodels */ + targetedMobileDeviceSubmodels?: (string[]|null); + + /** DeviceManufacturerTargeting excludedMobileDeviceSubmodels */ + excludedMobileDeviceSubmodels?: (string[]|null); + } + + /** Represents a DeviceManufacturerTargeting. */ + class DeviceManufacturerTargeting implements IDeviceManufacturerTargeting { + + /** + * Constructs a new DeviceManufacturerTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDeviceManufacturerTargeting); + + /** DeviceManufacturerTargeting targetedDeviceManufacturers. */ + public targetedDeviceManufacturers: string[]; + + /** DeviceManufacturerTargeting excludedDeviceManufacturers. */ + public excludedDeviceManufacturers: string[]; + + /** DeviceManufacturerTargeting targetedMobileDevices. */ + public targetedMobileDevices: string[]; + + /** DeviceManufacturerTargeting excludedMobileDevices. */ + public excludedMobileDevices: string[]; + + /** DeviceManufacturerTargeting targetedMobileDeviceSubmodels. */ + public targetedMobileDeviceSubmodels: string[]; + + /** DeviceManufacturerTargeting excludedMobileDeviceSubmodels. */ + public excludedMobileDeviceSubmodels: string[]; + + /** + * Creates a new DeviceManufacturerTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceManufacturerTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IDeviceManufacturerTargeting): google.ads.admanager.v1.DeviceManufacturerTargeting; + + /** + * Encodes the specified DeviceManufacturerTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturerTargeting.verify|verify} messages. + * @param message DeviceManufacturerTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDeviceManufacturerTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceManufacturerTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturerTargeting.verify|verify} messages. + * @param message DeviceManufacturerTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDeviceManufacturerTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceManufacturerTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceManufacturerTargeting + * @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.ads.admanager.v1.DeviceManufacturerTargeting; + + /** + * Decodes a DeviceManufacturerTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceManufacturerTargeting + * @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.ads.admanager.v1.DeviceManufacturerTargeting; + + /** + * Verifies a DeviceManufacturerTargeting 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 DeviceManufacturerTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceManufacturerTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DeviceManufacturerTargeting; + + /** + * Creates a plain object from a DeviceManufacturerTargeting message. Also converts values to other types if specified. + * @param message DeviceManufacturerTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DeviceManufacturerTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceManufacturerTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceManufacturerTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileCarrierTargeting. */ + interface IMobileCarrierTargeting { + + /** MobileCarrierTargeting targetedMobileCarriers */ + targetedMobileCarriers?: (string[]|null); + + /** MobileCarrierTargeting excludedMobileCarriers */ + excludedMobileCarriers?: (string[]|null); + } + + /** Represents a MobileCarrierTargeting. */ + class MobileCarrierTargeting implements IMobileCarrierTargeting { + + /** + * Constructs a new MobileCarrierTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IMobileCarrierTargeting); + + /** MobileCarrierTargeting targetedMobileCarriers. */ + public targetedMobileCarriers: string[]; + + /** MobileCarrierTargeting excludedMobileCarriers. */ + public excludedMobileCarriers: string[]; + + /** + * Creates a new MobileCarrierTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileCarrierTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IMobileCarrierTargeting): google.ads.admanager.v1.MobileCarrierTargeting; + + /** + * Encodes the specified MobileCarrierTargeting message. Does not implicitly {@link google.ads.admanager.v1.MobileCarrierTargeting.verify|verify} messages. + * @param message MobileCarrierTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IMobileCarrierTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileCarrierTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileCarrierTargeting.verify|verify} messages. + * @param message MobileCarrierTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IMobileCarrierTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileCarrierTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileCarrierTargeting + * @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.ads.admanager.v1.MobileCarrierTargeting; + + /** + * Decodes a MobileCarrierTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileCarrierTargeting + * @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.ads.admanager.v1.MobileCarrierTargeting; + + /** + * Verifies a MobileCarrierTargeting 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 MobileCarrierTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileCarrierTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.MobileCarrierTargeting; + + /** + * Creates a plain object from a MobileCarrierTargeting message. Also converts values to other types if specified. + * @param message MobileCarrierTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.MobileCarrierTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileCarrierTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileCarrierTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperatingSystemTargeting. */ + interface IOperatingSystemTargeting { + + /** OperatingSystemTargeting targetedOperatingSystems */ + targetedOperatingSystems?: (string[]|null); + + /** OperatingSystemTargeting excludedOperatingSystems */ + excludedOperatingSystems?: (string[]|null); + + /** OperatingSystemTargeting targetedOperatingSystemVersions */ + targetedOperatingSystemVersions?: (string[]|null); + + /** OperatingSystemTargeting excludedOperatingSystemVersions */ + excludedOperatingSystemVersions?: (string[]|null); + } + + /** Represents an OperatingSystemTargeting. */ + class OperatingSystemTargeting implements IOperatingSystemTargeting { + + /** + * Constructs a new OperatingSystemTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IOperatingSystemTargeting); + + /** OperatingSystemTargeting targetedOperatingSystems. */ + public targetedOperatingSystems: string[]; + + /** OperatingSystemTargeting excludedOperatingSystems. */ + public excludedOperatingSystems: string[]; + + /** OperatingSystemTargeting targetedOperatingSystemVersions. */ + public targetedOperatingSystemVersions: string[]; + + /** OperatingSystemTargeting excludedOperatingSystemVersions. */ + public excludedOperatingSystemVersions: string[]; + + /** + * Creates a new OperatingSystemTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns OperatingSystemTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IOperatingSystemTargeting): google.ads.admanager.v1.OperatingSystemTargeting; + + /** + * Encodes the specified OperatingSystemTargeting message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * @param message OperatingSystemTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IOperatingSystemTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperatingSystemTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * @param message OperatingSystemTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IOperatingSystemTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperatingSystemTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperatingSystemTargeting + * @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.ads.admanager.v1.OperatingSystemTargeting; + + /** + * Decodes an OperatingSystemTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperatingSystemTargeting + * @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.ads.admanager.v1.OperatingSystemTargeting; + + /** + * Verifies an OperatingSystemTargeting 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 OperatingSystemTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperatingSystemTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.OperatingSystemTargeting; + + /** + * Creates a plain object from an OperatingSystemTargeting message. Also converts values to other types if specified. + * @param message OperatingSystemTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.OperatingSystemTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperatingSystemTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperatingSystemTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InventoryTargeting. */ + interface IInventoryTargeting { + + /** InventoryTargeting targetedAdUnits */ + targetedAdUnits?: (google.ads.admanager.v1.IAdUnitTargeting[]|null); + + /** InventoryTargeting excludedAdUnits */ + excludedAdUnits?: (google.ads.admanager.v1.IAdUnitTargeting[]|null); + + /** InventoryTargeting targetedPlacements */ + targetedPlacements?: (string[]|null); + } + + /** Represents an InventoryTargeting. */ + class InventoryTargeting implements IInventoryTargeting { + + /** + * Constructs a new InventoryTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IInventoryTargeting); + + /** InventoryTargeting targetedAdUnits. */ + public targetedAdUnits: google.ads.admanager.v1.IAdUnitTargeting[]; + + /** InventoryTargeting excludedAdUnits. */ + public excludedAdUnits: google.ads.admanager.v1.IAdUnitTargeting[]; + + /** InventoryTargeting targetedPlacements. */ + public targetedPlacements: string[]; + + /** + * Creates a new InventoryTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns InventoryTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IInventoryTargeting): google.ads.admanager.v1.InventoryTargeting; + + /** + * Encodes the specified InventoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * @param message InventoryTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IInventoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InventoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * @param message InventoryTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IInventoryTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InventoryTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InventoryTargeting + * @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.ads.admanager.v1.InventoryTargeting; + + /** + * Decodes an InventoryTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InventoryTargeting + * @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.ads.admanager.v1.InventoryTargeting; + + /** + * Verifies an InventoryTargeting 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 InventoryTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InventoryTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.InventoryTargeting; + + /** + * Creates a plain object from an InventoryTargeting message. Also converts values to other types if specified. + * @param message InventoryTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.InventoryTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InventoryTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InventoryTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdUnitTargeting. */ + interface IAdUnitTargeting { + + /** AdUnitTargeting includeDescendants */ + includeDescendants?: (boolean|null); + + /** AdUnitTargeting adUnit */ + adUnit?: (string|null); + } + + /** Represents an AdUnitTargeting. */ + class AdUnitTargeting implements IAdUnitTargeting { + + /** + * Constructs a new AdUnitTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IAdUnitTargeting); + + /** AdUnitTargeting includeDescendants. */ + public includeDescendants?: (boolean|null); + + /** AdUnitTargeting adUnit. */ + public adUnit?: (string|null); + + /** + * Creates a new AdUnitTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns AdUnitTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IAdUnitTargeting): google.ads.admanager.v1.AdUnitTargeting; + + /** + * Encodes the specified AdUnitTargeting message. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * @param message AdUnitTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IAdUnitTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdUnitTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * @param message AdUnitTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IAdUnitTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdUnitTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdUnitTargeting + * @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.ads.admanager.v1.AdUnitTargeting; + + /** + * Decodes an AdUnitTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdUnitTargeting + * @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.ads.admanager.v1.AdUnitTargeting; + + /** + * Verifies an AdUnitTargeting 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 AdUnitTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdUnitTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnitTargeting; + + /** + * Creates a plain object from an AdUnitTargeting message. Also converts values to other types if specified. + * @param message AdUnitTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.AdUnitTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdUnitTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdUnitTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RequestPlatformTargeting. */ + interface IRequestPlatformTargeting { + + /** RequestPlatformTargeting requestPlatforms */ + requestPlatforms?: (google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[]|null); + } + + /** Represents a RequestPlatformTargeting. */ + class RequestPlatformTargeting implements IRequestPlatformTargeting { + + /** + * Constructs a new RequestPlatformTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRequestPlatformTargeting); + + /** RequestPlatformTargeting requestPlatforms. */ + public requestPlatforms: google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[]; + + /** + * Creates a new RequestPlatformTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestPlatformTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IRequestPlatformTargeting): google.ads.admanager.v1.RequestPlatformTargeting; + + /** + * Encodes the specified RequestPlatformTargeting message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * @param message RequestPlatformTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRequestPlatformTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestPlatformTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * @param message RequestPlatformTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRequestPlatformTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestPlatformTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestPlatformTargeting + * @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.ads.admanager.v1.RequestPlatformTargeting; + + /** + * Decodes a RequestPlatformTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestPlatformTargeting + * @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.ads.admanager.v1.RequestPlatformTargeting; + + /** + * Verifies a RequestPlatformTargeting 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 RequestPlatformTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestPlatformTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RequestPlatformTargeting; + + /** + * Creates a plain object from a RequestPlatformTargeting message. Also converts values to other types if specified. + * @param message RequestPlatformTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RequestPlatformTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestPlatformTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestPlatformTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomTargeting. */ + interface ICustomTargeting { + + /** CustomTargeting customTargetingClauses */ + customTargetingClauses?: (google.ads.admanager.v1.ICustomTargetingClause[]|null); + } + + /** Represents a CustomTargeting. */ + class CustomTargeting implements ICustomTargeting { + + /** + * Constructs a new CustomTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICustomTargeting); + + /** CustomTargeting customTargetingClauses. */ + public customTargetingClauses: google.ads.admanager.v1.ICustomTargetingClause[]; + + /** + * Creates a new CustomTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargeting): google.ads.admanager.v1.CustomTargeting; + + /** + * Encodes the specified CustomTargeting message. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * @param message CustomTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICustomTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * @param message CustomTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomTargeting + * @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.ads.admanager.v1.CustomTargeting; + + /** + * Decodes a CustomTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomTargeting + * @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.ads.admanager.v1.CustomTargeting; + + /** + * Verifies a CustomTargeting 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 CustomTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargeting; + + /** + * Creates a plain object from a CustomTargeting message. Also converts values to other types if specified. + * @param message CustomTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CustomTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomTargetingClause. */ + interface ICustomTargetingClause { + + /** CustomTargetingClause customTargetingLiterals */ + customTargetingLiterals?: (google.ads.admanager.v1.ICustomTargetingLiteral[]|null); + + /** CustomTargetingClause audienceSegmentTargetings */ + audienceSegmentTargetings?: (google.ads.admanager.v1.IAudienceSegmentTargeting[]|null); + + /** CustomTargetingClause cmsMetadataTargetings */ + cmsMetadataTargetings?: (google.ads.admanager.v1.ICmsMetadataTargeting[]|null); + } + + /** Represents a CustomTargetingClause. */ + class CustomTargetingClause implements ICustomTargetingClause { + + /** + * Constructs a new CustomTargetingClause. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICustomTargetingClause); + + /** CustomTargetingClause customTargetingLiterals. */ + public customTargetingLiterals: google.ads.admanager.v1.ICustomTargetingLiteral[]; + + /** CustomTargetingClause audienceSegmentTargetings. */ + public audienceSegmentTargetings: google.ads.admanager.v1.IAudienceSegmentTargeting[]; + + /** CustomTargetingClause cmsMetadataTargetings. */ + public cmsMetadataTargetings: google.ads.admanager.v1.ICmsMetadataTargeting[]; + + /** + * Creates a new CustomTargetingClause instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetingClause instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargetingClause): google.ads.admanager.v1.CustomTargetingClause; + + /** + * Encodes the specified CustomTargetingClause message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * @param message CustomTargetingClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICustomTargetingClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomTargetingClause message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * @param message CustomTargetingClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomTargetingClause message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomTargetingClause + * @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.ads.admanager.v1.CustomTargetingClause; + + /** + * Decodes a CustomTargetingClause message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomTargetingClause + * @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.ads.admanager.v1.CustomTargetingClause; + + /** + * Verifies a CustomTargetingClause 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 CustomTargetingClause message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomTargetingClause + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingClause; + + /** + * Creates a plain object from a CustomTargetingClause message. Also converts values to other types if specified. + * @param message CustomTargetingClause + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CustomTargetingClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomTargetingClause to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomTargetingClause + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomTargetingLiteral. */ + interface ICustomTargetingLiteral { + + /** CustomTargetingLiteral negative */ + negative?: (boolean|null); + + /** CustomTargetingLiteral customTargetingKey */ + customTargetingKey?: (string|null); + + /** CustomTargetingLiteral customTargetingValues */ + customTargetingValues?: (string[]|null); + } + + /** Represents a CustomTargetingLiteral. */ + class CustomTargetingLiteral implements ICustomTargetingLiteral { + + /** + * Constructs a new CustomTargetingLiteral. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICustomTargetingLiteral); + + /** CustomTargetingLiteral negative. */ + public negative?: (boolean|null); + + /** CustomTargetingLiteral customTargetingKey. */ + public customTargetingKey?: (string|null); + + /** CustomTargetingLiteral customTargetingValues. */ + public customTargetingValues: string[]; + + /** + * Creates a new CustomTargetingLiteral instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomTargetingLiteral instance + */ + public static create(properties?: google.ads.admanager.v1.ICustomTargetingLiteral): google.ads.admanager.v1.CustomTargetingLiteral; + + /** + * Encodes the specified CustomTargetingLiteral message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * @param message CustomTargetingLiteral message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICustomTargetingLiteral, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomTargetingLiteral message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * @param message CustomTargetingLiteral message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICustomTargetingLiteral, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomTargetingLiteral message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomTargetingLiteral + * @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.ads.admanager.v1.CustomTargetingLiteral; + + /** + * Decodes a CustomTargetingLiteral message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomTargetingLiteral + * @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.ads.admanager.v1.CustomTargetingLiteral; + + /** + * Verifies a CustomTargetingLiteral 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 CustomTargetingLiteral message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomTargetingLiteral + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CustomTargetingLiteral; + + /** + * Creates a plain object from a CustomTargetingLiteral message. Also converts values to other types if specified. + * @param message CustomTargetingLiteral + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CustomTargetingLiteral, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomTargetingLiteral to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomTargetingLiteral + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSegmentTargeting. */ + interface IAudienceSegmentTargeting { + + /** AudienceSegmentTargeting negative */ + negative?: (boolean|null); + + /** AudienceSegmentTargeting audienceSegments */ + audienceSegments?: (string[]|null); + } + + /** Represents an AudienceSegmentTargeting. */ + class AudienceSegmentTargeting implements IAudienceSegmentTargeting { + + /** + * Constructs a new AudienceSegmentTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IAudienceSegmentTargeting); + + /** AudienceSegmentTargeting negative. */ + public negative?: (boolean|null); + + /** AudienceSegmentTargeting audienceSegments. */ + public audienceSegments: string[]; + + /** + * Creates a new AudienceSegmentTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSegmentTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IAudienceSegmentTargeting): google.ads.admanager.v1.AudienceSegmentTargeting; + + /** + * Encodes the specified AudienceSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.AudienceSegmentTargeting.verify|verify} messages. + * @param message AudienceSegmentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IAudienceSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AudienceSegmentTargeting.verify|verify} messages. + * @param message AudienceSegmentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IAudienceSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSegmentTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSegmentTargeting + * @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.ads.admanager.v1.AudienceSegmentTargeting; + + /** + * Decodes an AudienceSegmentTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSegmentTargeting + * @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.ads.admanager.v1.AudienceSegmentTargeting; + + /** + * Verifies an AudienceSegmentTargeting 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 AudienceSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSegmentTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AudienceSegmentTargeting; + + /** + * Creates a plain object from an AudienceSegmentTargeting message. Also converts values to other types if specified. + * @param message AudienceSegmentTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.AudienceSegmentTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSegmentTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSegmentTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CmsMetadataTargeting. */ + interface ICmsMetadataTargeting { + + /** CmsMetadataTargeting negative */ + negative?: (boolean|null); + + /** CmsMetadataTargeting cmsMetadataValues */ + cmsMetadataValues?: (string[]|null); + } + + /** Represents a CmsMetadataTargeting. */ + class CmsMetadataTargeting implements ICmsMetadataTargeting { + + /** + * Constructs a new CmsMetadataTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICmsMetadataTargeting); + + /** CmsMetadataTargeting negative. */ + public negative?: (boolean|null); + + /** CmsMetadataTargeting cmsMetadataValues. */ + public cmsMetadataValues: string[]; + + /** + * Creates a new CmsMetadataTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns CmsMetadataTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.ICmsMetadataTargeting): google.ads.admanager.v1.CmsMetadataTargeting; + + /** + * Encodes the specified CmsMetadataTargeting message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataTargeting.verify|verify} messages. + * @param message CmsMetadataTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICmsMetadataTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CmsMetadataTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataTargeting.verify|verify} messages. + * @param message CmsMetadataTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICmsMetadataTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CmsMetadataTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmsMetadataTargeting + * @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.ads.admanager.v1.CmsMetadataTargeting; + + /** + * Decodes a CmsMetadataTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmsMetadataTargeting + * @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.ads.admanager.v1.CmsMetadataTargeting; + + /** + * Verifies a CmsMetadataTargeting 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 CmsMetadataTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmsMetadataTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CmsMetadataTargeting; + + /** + * Creates a plain object from a CmsMetadataTargeting message. Also converts values to other types if specified. + * @param message CmsMetadataTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CmsMetadataTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmsMetadataTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmsMetadataTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserDomainTargeting. */ + interface IUserDomainTargeting { + + /** UserDomainTargeting targetedUserDomains */ + targetedUserDomains?: (string[]|null); + + /** UserDomainTargeting excludedUserDomains */ + excludedUserDomains?: (string[]|null); + } + + /** Represents a UserDomainTargeting. */ + class UserDomainTargeting implements IUserDomainTargeting { + + /** + * Constructs a new UserDomainTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUserDomainTargeting); + + /** UserDomainTargeting targetedUserDomains. */ + public targetedUserDomains: string[]; + + /** UserDomainTargeting excludedUserDomains. */ + public excludedUserDomains: string[]; + + /** + * Creates a new UserDomainTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns UserDomainTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IUserDomainTargeting): google.ads.admanager.v1.UserDomainTargeting; + + /** + * Encodes the specified UserDomainTargeting message. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * @param message UserDomainTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUserDomainTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserDomainTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * @param message UserDomainTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUserDomainTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserDomainTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserDomainTargeting + * @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.ads.admanager.v1.UserDomainTargeting; + + /** + * Decodes a UserDomainTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserDomainTargeting + * @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.ads.admanager.v1.UserDomainTargeting; + + /** + * Verifies a UserDomainTargeting 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 UserDomainTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserDomainTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UserDomainTargeting; + + /** + * Creates a plain object from a UserDomainTargeting message. Also converts values to other types if specified. + * @param message UserDomainTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UserDomainTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserDomainTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserDomainTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VideoPositionTargeting. */ + interface IVideoPositionTargeting { + + /** VideoPositionTargeting videoPositions */ + videoPositions?: (google.ads.admanager.v1.IVideoPosition[]|null); + } + + /** Represents a VideoPositionTargeting. */ + class VideoPositionTargeting implements IVideoPositionTargeting { + + /** + * Constructs a new VideoPositionTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IVideoPositionTargeting); + + /** VideoPositionTargeting videoPositions. */ + public videoPositions: google.ads.admanager.v1.IVideoPosition[]; + + /** + * Creates a new VideoPositionTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns VideoPositionTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IVideoPositionTargeting): google.ads.admanager.v1.VideoPositionTargeting; + + /** + * Encodes the specified VideoPositionTargeting message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * @param message VideoPositionTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IVideoPositionTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoPositionTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * @param message VideoPositionTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IVideoPositionTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VideoPositionTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VideoPositionTargeting + * @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.ads.admanager.v1.VideoPositionTargeting; + + /** + * Decodes a VideoPositionTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VideoPositionTargeting + * @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.ads.admanager.v1.VideoPositionTargeting; + + /** + * Verifies a VideoPositionTargeting 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 VideoPositionTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VideoPositionTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPositionTargeting; + + /** + * Creates a plain object from a VideoPositionTargeting message. Also converts values to other types if specified. + * @param message VideoPositionTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.VideoPositionTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoPositionTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VideoPositionTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VideoPosition. */ + interface IVideoPosition { + + /** VideoPosition midrollIndex */ + midrollIndex?: (number|Long|string|null); + + /** VideoPosition reverseMidrollIndex */ + reverseMidrollIndex?: (number|Long|string|null); + + /** VideoPosition podPosition */ + podPosition?: (number|Long|string|null); + + /** VideoPosition positionType */ + positionType?: (google.ads.admanager.v1.VideoPositionEnum.VideoPosition|keyof typeof google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null); + + /** VideoPosition bumperType */ + bumperType?: (google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|keyof typeof google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null); + } + + /** Represents a VideoPosition. */ + class VideoPosition implements IVideoPosition { + + /** + * Constructs a new VideoPosition. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IVideoPosition); + + /** VideoPosition midrollIndex. */ + public midrollIndex?: (number|Long|string|null); + + /** VideoPosition reverseMidrollIndex. */ + public reverseMidrollIndex?: (number|Long|string|null); + + /** VideoPosition podPosition. */ + public podPosition?: (number|Long|string|null); + + /** VideoPosition positionType. */ + public positionType?: (google.ads.admanager.v1.VideoPositionEnum.VideoPosition|keyof typeof google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null); + + /** VideoPosition bumperType. */ + public bumperType?: (google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|keyof typeof google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null); + + /** + * Creates a new VideoPosition instance using the specified properties. + * @param [properties] Properties to set + * @returns VideoPosition instance + */ + public static create(properties?: google.ads.admanager.v1.IVideoPosition): google.ads.admanager.v1.VideoPosition; + + /** + * Encodes the specified VideoPosition message. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * @param message VideoPosition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IVideoPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoPosition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * @param message VideoPosition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IVideoPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VideoPosition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VideoPosition + * @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.ads.admanager.v1.VideoPosition; + + /** + * Decodes a VideoPosition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VideoPosition + * @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.ads.admanager.v1.VideoPosition; + + /** + * Verifies a VideoPosition 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 VideoPosition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VideoPosition + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPosition; + + /** + * Creates a plain object from a VideoPosition message. Also converts values to other types if specified. + * @param message VideoPosition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.VideoPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoPosition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VideoPosition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSegmentTargeting. */ + interface IDataSegmentTargeting { + + /** DataSegmentTargeting hasDataSegmentTargeting */ + hasDataSegmentTargeting?: (boolean|null); + } + + /** Represents a DataSegmentTargeting. */ + class DataSegmentTargeting implements IDataSegmentTargeting { + + /** + * Constructs a new DataSegmentTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDataSegmentTargeting); + + /** DataSegmentTargeting hasDataSegmentTargeting. */ + public hasDataSegmentTargeting: boolean; + + /** + * Creates a new DataSegmentTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSegmentTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IDataSegmentTargeting): google.ads.admanager.v1.DataSegmentTargeting; + + /** + * Encodes the specified DataSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * @param message DataSegmentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDataSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * @param message DataSegmentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDataSegmentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSegmentTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSegmentTargeting + * @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.ads.admanager.v1.DataSegmentTargeting; + + /** + * Decodes a DataSegmentTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSegmentTargeting + * @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.ads.admanager.v1.DataSegmentTargeting; + + /** + * Verifies a DataSegmentTargeting 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 DataSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSegmentTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DataSegmentTargeting; + + /** + * Creates a plain object from a DataSegmentTargeting message. Also converts values to other types if specified. + * @param message DataSegmentTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DataSegmentTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSegmentTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSegmentTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContentTargeting. */ + interface IContentTargeting { + + /** ContentTargeting targetedContent */ + targetedContent?: (string[]|null); + + /** ContentTargeting excludedContent */ + excludedContent?: (string[]|null); + + /** ContentTargeting targetedContentBundles */ + targetedContentBundles?: (string[]|null); + + /** ContentTargeting excludedContentBundles */ + excludedContentBundles?: (string[]|null); + } + + /** Represents a ContentTargeting. */ + class ContentTargeting implements IContentTargeting { + + /** + * Constructs a new ContentTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IContentTargeting); + + /** ContentTargeting targetedContent. */ + public targetedContent: string[]; + + /** ContentTargeting excludedContent. */ + public excludedContent: string[]; + + /** ContentTargeting targetedContentBundles. */ + public targetedContentBundles: string[]; + + /** ContentTargeting excludedContentBundles. */ + public excludedContentBundles: string[]; + + /** + * Creates a new ContentTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IContentTargeting): google.ads.admanager.v1.ContentTargeting; + + /** + * Encodes the specified ContentTargeting message. Does not implicitly {@link google.ads.admanager.v1.ContentTargeting.verify|verify} messages. + * @param message ContentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IContentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentTargeting.verify|verify} messages. + * @param message ContentTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IContentTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentTargeting + * @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.ads.admanager.v1.ContentTargeting; + + /** + * Decodes a ContentTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentTargeting + * @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.ads.admanager.v1.ContentTargeting; + + /** + * Verifies a ContentTargeting 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 ContentTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ContentTargeting; + + /** + * Creates a plain object from a ContentTargeting message. Also converts values to other types if specified. + * @param message ContentTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ContentTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileApplicationTargeting. */ + interface IMobileApplicationTargeting { + + /** MobileApplicationTargeting firstPartyTargeting */ + firstPartyTargeting?: (google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting|null); + } + + /** Represents a MobileApplicationTargeting. */ + class MobileApplicationTargeting implements IMobileApplicationTargeting { + + /** + * Constructs a new MobileApplicationTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IMobileApplicationTargeting); + + /** MobileApplicationTargeting firstPartyTargeting. */ + public firstPartyTargeting?: (google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting|null); + + /** MobileApplicationTargeting targeting. */ + public targeting?: "firstPartyTargeting"; + + /** + * Creates a new MobileApplicationTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileApplicationTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IMobileApplicationTargeting): google.ads.admanager.v1.MobileApplicationTargeting; + + /** + * Encodes the specified MobileApplicationTargeting message. Does not implicitly {@link google.ads.admanager.v1.MobileApplicationTargeting.verify|verify} messages. + * @param message MobileApplicationTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IMobileApplicationTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileApplicationTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileApplicationTargeting.verify|verify} messages. + * @param message MobileApplicationTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IMobileApplicationTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileApplicationTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileApplicationTargeting + * @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.ads.admanager.v1.MobileApplicationTargeting; + + /** + * Decodes a MobileApplicationTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileApplicationTargeting + * @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.ads.admanager.v1.MobileApplicationTargeting; + + /** + * Verifies a MobileApplicationTargeting 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 MobileApplicationTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileApplicationTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.MobileApplicationTargeting; + + /** + * Creates a plain object from a MobileApplicationTargeting message. Also converts values to other types if specified. + * @param message MobileApplicationTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.MobileApplicationTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileApplicationTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileApplicationTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirstPartyMobileApplicationTargeting. */ + interface IFirstPartyMobileApplicationTargeting { + + /** FirstPartyMobileApplicationTargeting targetedApplications */ + targetedApplications?: (string[]|null); + + /** FirstPartyMobileApplicationTargeting excludedApplications */ + excludedApplications?: (string[]|null); + } + + /** Represents a FirstPartyMobileApplicationTargeting. */ + class FirstPartyMobileApplicationTargeting implements IFirstPartyMobileApplicationTargeting { + + /** + * Constructs a new FirstPartyMobileApplicationTargeting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting); + + /** FirstPartyMobileApplicationTargeting targetedApplications. */ + public targetedApplications: string[]; + + /** FirstPartyMobileApplicationTargeting excludedApplications. */ + public excludedApplications: string[]; + + /** + * Creates a new FirstPartyMobileApplicationTargeting instance using the specified properties. + * @param [properties] Properties to set + * @returns FirstPartyMobileApplicationTargeting instance + */ + public static create(properties?: google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting): google.ads.admanager.v1.FirstPartyMobileApplicationTargeting; + + /** + * Encodes the specified FirstPartyMobileApplicationTargeting message. Does not implicitly {@link google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.verify|verify} messages. + * @param message FirstPartyMobileApplicationTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirstPartyMobileApplicationTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.verify|verify} messages. + * @param message FirstPartyMobileApplicationTargeting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirstPartyMobileApplicationTargeting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirstPartyMobileApplicationTargeting + * @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.ads.admanager.v1.FirstPartyMobileApplicationTargeting; + + /** + * Decodes a FirstPartyMobileApplicationTargeting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirstPartyMobileApplicationTargeting + * @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.ads.admanager.v1.FirstPartyMobileApplicationTargeting; + + /** + * Verifies a FirstPartyMobileApplicationTargeting 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 FirstPartyMobileApplicationTargeting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirstPartyMobileApplicationTargeting + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FirstPartyMobileApplicationTargeting; + + /** + * Creates a plain object from a FirstPartyMobileApplicationTargeting message. Also converts values to other types if specified. + * @param message FirstPartyMobileApplicationTargeting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.FirstPartyMobileApplicationTargeting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirstPartyMobileApplicationTargeting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirstPartyMobileApplicationTargeting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RequestPlatformEnum. */ + interface IRequestPlatformEnum { + } + + /** Represents a RequestPlatformEnum. */ + class RequestPlatformEnum implements IRequestPlatformEnum { + + /** + * Constructs a new RequestPlatformEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRequestPlatformEnum); + + /** + * Creates a new RequestPlatformEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestPlatformEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IRequestPlatformEnum): google.ads.admanager.v1.RequestPlatformEnum; + + /** + * Encodes the specified RequestPlatformEnum message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * @param message RequestPlatformEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRequestPlatformEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestPlatformEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * @param message RequestPlatformEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRequestPlatformEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestPlatformEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestPlatformEnum + * @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.ads.admanager.v1.RequestPlatformEnum; + + /** + * Decodes a RequestPlatformEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestPlatformEnum + * @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.ads.admanager.v1.RequestPlatformEnum; + + /** + * Verifies a RequestPlatformEnum 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 RequestPlatformEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestPlatformEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RequestPlatformEnum; + + /** + * Creates a plain object from a RequestPlatformEnum message. Also converts values to other types if specified. + * @param message RequestPlatformEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RequestPlatformEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestPlatformEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestPlatformEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RequestPlatformEnum { + + /** RequestPlatform enum. */ + enum RequestPlatform { + REQUEST_PLATFORM_UNSPECIFIED = 0, + BROWSER = 1, + MOBILE_APP = 2, + VIDEO_PLAYER = 3 + } + } + + /** Properties of a TargetedVideoBumperTypeEnum. */ + interface ITargetedVideoBumperTypeEnum { + } + + /** Represents a TargetedVideoBumperTypeEnum. */ + class TargetedVideoBumperTypeEnum implements ITargetedVideoBumperTypeEnum { + + /** + * Constructs a new TargetedVideoBumperTypeEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum); + + /** + * Creates a new TargetedVideoBumperTypeEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetedVideoBumperTypeEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum): google.ads.admanager.v1.TargetedVideoBumperTypeEnum; + + /** + * Encodes the specified TargetedVideoBumperTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * @param message TargetedVideoBumperTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetedVideoBumperTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * @param message TargetedVideoBumperTypeEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ITargetedVideoBumperTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetedVideoBumperTypeEnum + * @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.ads.admanager.v1.TargetedVideoBumperTypeEnum; + + /** + * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetedVideoBumperTypeEnum + * @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.ads.admanager.v1.TargetedVideoBumperTypeEnum; + + /** + * Verifies a TargetedVideoBumperTypeEnum 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 TargetedVideoBumperTypeEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetedVideoBumperTypeEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TargetedVideoBumperTypeEnum; + + /** + * Creates a plain object from a TargetedVideoBumperTypeEnum message. Also converts values to other types if specified. + * @param message TargetedVideoBumperTypeEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.TargetedVideoBumperTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetedVideoBumperTypeEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetedVideoBumperTypeEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TargetedVideoBumperTypeEnum { + + /** TargetedVideoBumperType enum. */ + enum TargetedVideoBumperType { + TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED = 0, + AFTER = 1, + BEFORE = 2 + } + } + + /** Properties of a VideoPositionEnum. */ + interface IVideoPositionEnum { + } + + /** Represents a VideoPositionEnum. */ + class VideoPositionEnum implements IVideoPositionEnum { + + /** + * Constructs a new VideoPositionEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IVideoPositionEnum); + + /** + * Creates a new VideoPositionEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns VideoPositionEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IVideoPositionEnum): google.ads.admanager.v1.VideoPositionEnum; + + /** + * Encodes the specified VideoPositionEnum message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * @param message VideoPositionEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IVideoPositionEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoPositionEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * @param message VideoPositionEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IVideoPositionEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VideoPositionEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VideoPositionEnum + * @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.ads.admanager.v1.VideoPositionEnum; + + /** + * Decodes a VideoPositionEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VideoPositionEnum + * @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.ads.admanager.v1.VideoPositionEnum; + + /** + * Verifies a VideoPositionEnum 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 VideoPositionEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VideoPositionEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.VideoPositionEnum; + + /** + * Creates a plain object from a VideoPositionEnum message. Also converts values to other types if specified. + * @param message VideoPositionEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.VideoPositionEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoPositionEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VideoPositionEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VideoPositionEnum { + + /** VideoPosition enum. */ + enum VideoPosition { + VIDEO_POSITION_UNSPECIFIED = 0, + ALL = 1, + MIDROLL = 2, + POSTROLL = 3, + PREROLL = 4 + } + } + + /** Represents a PrivateAuctionDealService */ + class PrivateAuctionDealService extends $protobuf.rpc.Service { + + /** + * Constructs a new PrivateAuctionDealService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PrivateAuctionDealService 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): PrivateAuctionDealService; + + /** + * Calls GetPrivateAuctionDeal. + * @param request GetPrivateAuctionDealRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal + */ + public getPrivateAuctionDeal(request: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDealCallback): void; + + /** + * Calls GetPrivateAuctionDeal. + * @param request GetPrivateAuctionDealRequest message or plain object + * @returns Promise + */ + public getPrivateAuctionDeal(request: google.ads.admanager.v1.IGetPrivateAuctionDealRequest): Promise; + + /** + * Calls ListPrivateAuctionDeals. + * @param request ListPrivateAuctionDealsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPrivateAuctionDealsResponse + */ + public listPrivateAuctionDeals(request: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDealsCallback): void; + + /** + * Calls ListPrivateAuctionDeals. + * @param request ListPrivateAuctionDealsRequest message or plain object + * @returns Promise + */ + public listPrivateAuctionDeals(request: google.ads.admanager.v1.IListPrivateAuctionDealsRequest): Promise; + + /** + * Calls CreatePrivateAuctionDeal. + * @param request CreatePrivateAuctionDealRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal + */ + public createPrivateAuctionDeal(request: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDealCallback): void; + + /** + * Calls CreatePrivateAuctionDeal. + * @param request CreatePrivateAuctionDealRequest message or plain object + * @returns Promise + */ + public createPrivateAuctionDeal(request: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest): Promise; + + /** + * Calls UpdatePrivateAuctionDeal. + * @param request UpdatePrivateAuctionDealRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuctionDeal + */ + public updatePrivateAuctionDeal(request: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, callback: google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDealCallback): void; + + /** + * Calls UpdatePrivateAuctionDeal. + * @param request UpdatePrivateAuctionDealRequest message or plain object + * @returns Promise + */ + public updatePrivateAuctionDeal(request: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest): Promise; + } + + namespace PrivateAuctionDealService { + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|getPrivateAuctionDeal}. + * @param error Error, if any + * @param [response] PrivateAuctionDeal + */ + type GetPrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|listPrivateAuctionDeals}. + * @param error Error, if any + * @param [response] ListPrivateAuctionDealsResponse + */ + type ListPrivateAuctionDealsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPrivateAuctionDealsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|createPrivateAuctionDeal}. + * @param error Error, if any + * @param [response] PrivateAuctionDeal + */ + type CreatePrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|updatePrivateAuctionDeal}. + * @param error Error, if any + * @param [response] PrivateAuctionDeal + */ + type UpdatePrivateAuctionDealCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuctionDeal) => void; + } + + /** Properties of a GetPrivateAuctionDealRequest. */ + interface IGetPrivateAuctionDealRequest { + + /** GetPrivateAuctionDealRequest name */ + name?: (string|null); + } + + /** Represents a GetPrivateAuctionDealRequest. */ + class GetPrivateAuctionDealRequest implements IGetPrivateAuctionDealRequest { + + /** + * Constructs a new GetPrivateAuctionDealRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetPrivateAuctionDealRequest); + + /** GetPrivateAuctionDealRequest name. */ + public name: string; + + /** + * Creates a new GetPrivateAuctionDealRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPrivateAuctionDealRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetPrivateAuctionDealRequest): google.ads.admanager.v1.GetPrivateAuctionDealRequest; + + /** + * Encodes the specified GetPrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * @param message GetPrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * @param message GetPrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetPrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPrivateAuctionDealRequest + * @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.ads.admanager.v1.GetPrivateAuctionDealRequest; + + /** + * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPrivateAuctionDealRequest + * @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.ads.admanager.v1.GetPrivateAuctionDealRequest; + + /** + * Verifies a GetPrivateAuctionDealRequest 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 GetPrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPrivateAuctionDealRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPrivateAuctionDealRequest; + + /** + * Creates a plain object from a GetPrivateAuctionDealRequest message. Also converts values to other types if specified. + * @param message GetPrivateAuctionDealRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetPrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPrivateAuctionDealRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPrivateAuctionDealRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPrivateAuctionDealsRequest. */ + interface IListPrivateAuctionDealsRequest { + + /** ListPrivateAuctionDealsRequest parent */ + parent?: (string|null); + + /** ListPrivateAuctionDealsRequest pageSize */ + pageSize?: (number|null); + + /** ListPrivateAuctionDealsRequest pageToken */ + pageToken?: (string|null); + + /** ListPrivateAuctionDealsRequest filter */ + filter?: (string|null); + + /** ListPrivateAuctionDealsRequest orderBy */ + orderBy?: (string|null); + + /** ListPrivateAuctionDealsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListPrivateAuctionDealsRequest. */ + class ListPrivateAuctionDealsRequest implements IListPrivateAuctionDealsRequest { + + /** + * Constructs a new ListPrivateAuctionDealsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsRequest); + + /** ListPrivateAuctionDealsRequest parent. */ + public parent: string; + + /** ListPrivateAuctionDealsRequest pageSize. */ + public pageSize: number; + + /** ListPrivateAuctionDealsRequest pageToken. */ + public pageToken: string; + + /** ListPrivateAuctionDealsRequest filter. */ + public filter: string; + + /** ListPrivateAuctionDealsRequest orderBy. */ + public orderBy: string; + + /** ListPrivateAuctionDealsRequest skip. */ + public skip: number; + + /** + * Creates a new ListPrivateAuctionDealsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPrivateAuctionDealsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsRequest): google.ads.admanager.v1.ListPrivateAuctionDealsRequest; + + /** + * Encodes the specified ListPrivateAuctionDealsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * @param message ListPrivateAuctionDealsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPrivateAuctionDealsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * @param message ListPrivateAuctionDealsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionDealsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPrivateAuctionDealsRequest + * @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.ads.admanager.v1.ListPrivateAuctionDealsRequest; + + /** + * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPrivateAuctionDealsRequest + * @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.ads.admanager.v1.ListPrivateAuctionDealsRequest; + + /** + * Verifies a ListPrivateAuctionDealsRequest 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 ListPrivateAuctionDealsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPrivateAuctionDealsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionDealsRequest; + + /** + * Creates a plain object from a ListPrivateAuctionDealsRequest message. Also converts values to other types if specified. + * @param message ListPrivateAuctionDealsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionDealsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPrivateAuctionDealsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPrivateAuctionDealsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPrivateAuctionDealsResponse. */ + interface IListPrivateAuctionDealsResponse { + + /** ListPrivateAuctionDealsResponse privateAuctionDeals */ + privateAuctionDeals?: (google.ads.admanager.v1.IPrivateAuctionDeal[]|null); + + /** ListPrivateAuctionDealsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListPrivateAuctionDealsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListPrivateAuctionDealsResponse. */ + class ListPrivateAuctionDealsResponse implements IListPrivateAuctionDealsResponse { + + /** + * Constructs a new ListPrivateAuctionDealsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsResponse); + + /** ListPrivateAuctionDealsResponse privateAuctionDeals. */ + public privateAuctionDeals: google.ads.admanager.v1.IPrivateAuctionDeal[]; + + /** ListPrivateAuctionDealsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListPrivateAuctionDealsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListPrivateAuctionDealsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPrivateAuctionDealsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionDealsResponse): google.ads.admanager.v1.ListPrivateAuctionDealsResponse; + + /** + * Encodes the specified ListPrivateAuctionDealsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * @param message ListPrivateAuctionDealsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPrivateAuctionDealsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPrivateAuctionDealsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * @param message ListPrivateAuctionDealsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionDealsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPrivateAuctionDealsResponse + * @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.ads.admanager.v1.ListPrivateAuctionDealsResponse; + + /** + * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPrivateAuctionDealsResponse + * @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.ads.admanager.v1.ListPrivateAuctionDealsResponse; + + /** + * Verifies a ListPrivateAuctionDealsResponse 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 ListPrivateAuctionDealsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPrivateAuctionDealsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionDealsResponse; + + /** + * Creates a plain object from a ListPrivateAuctionDealsResponse message. Also converts values to other types if specified. + * @param message ListPrivateAuctionDealsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionDealsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPrivateAuctionDealsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPrivateAuctionDealsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePrivateAuctionDealRequest. */ + interface ICreatePrivateAuctionDealRequest { + + /** CreatePrivateAuctionDealRequest parent */ + parent?: (string|null); + + /** CreatePrivateAuctionDealRequest privateAuctionDeal */ + privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + } + + /** Represents a CreatePrivateAuctionDealRequest. */ + class CreatePrivateAuctionDealRequest implements ICreatePrivateAuctionDealRequest { + + /** + * Constructs a new CreatePrivateAuctionDealRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest); + + /** CreatePrivateAuctionDealRequest parent. */ + public parent: string; + + /** CreatePrivateAuctionDealRequest privateAuctionDeal. */ + public privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + + /** + * Creates a new CreatePrivateAuctionDealRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePrivateAuctionDealRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest): google.ads.admanager.v1.CreatePrivateAuctionDealRequest; + + /** + * Encodes the specified CreatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * @param message CreatePrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * @param message CreatePrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePrivateAuctionDealRequest + * @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.ads.admanager.v1.CreatePrivateAuctionDealRequest; + + /** + * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePrivateAuctionDealRequest + * @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.ads.admanager.v1.CreatePrivateAuctionDealRequest; + + /** + * Verifies a CreatePrivateAuctionDealRequest 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 CreatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePrivateAuctionDealRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreatePrivateAuctionDealRequest; + + /** + * Creates a plain object from a CreatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * @param message CreatePrivateAuctionDealRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreatePrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePrivateAuctionDealRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePrivateAuctionDealRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePrivateAuctionDealRequest. */ + interface IUpdatePrivateAuctionDealRequest { + + /** UpdatePrivateAuctionDealRequest privateAuctionDeal */ + privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + + /** UpdatePrivateAuctionDealRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePrivateAuctionDealRequest. */ + class UpdatePrivateAuctionDealRequest implements IUpdatePrivateAuctionDealRequest { + + /** + * Constructs a new UpdatePrivateAuctionDealRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest); + + /** UpdatePrivateAuctionDealRequest privateAuctionDeal. */ + public privateAuctionDeal?: (google.ads.admanager.v1.IPrivateAuctionDeal|null); + + /** UpdatePrivateAuctionDealRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePrivateAuctionDealRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePrivateAuctionDealRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest): google.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + + /** + * Encodes the specified UpdatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * @param message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * @param message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePrivateAuctionDealRequest + * @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.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + + /** + * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePrivateAuctionDealRequest + * @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.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + + /** + * Verifies an UpdatePrivateAuctionDealRequest 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 UpdatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePrivateAuctionDealRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdatePrivateAuctionDealRequest; + + /** + * Creates a plain object from an UpdatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * @param message UpdatePrivateAuctionDealRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UpdatePrivateAuctionDealRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePrivateAuctionDealRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePrivateAuctionDealRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateAuction. */ + interface IPrivateAuction { + + /** PrivateAuction name */ + name?: (string|null); + + /** PrivateAuction privateAuctionId */ + privateAuctionId?: (number|Long|string|null); + + /** PrivateAuction displayName */ + displayName?: (string|null); + + /** PrivateAuction description */ + description?: (string|null); + + /** PrivateAuction sellerContactUsers */ + sellerContactUsers?: (string[]|null); + + /** PrivateAuction archived */ + archived?: (boolean|null); + + /** PrivateAuction createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuction updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PrivateAuction. */ + class PrivateAuction implements IPrivateAuction { + + /** + * Constructs a new PrivateAuction. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IPrivateAuction); + + /** PrivateAuction name. */ + public name: string; + + /** PrivateAuction privateAuctionId. */ + public privateAuctionId?: (number|Long|string|null); + + /** PrivateAuction displayName. */ + public displayName?: (string|null); + + /** PrivateAuction description. */ + public description?: (string|null); + + /** PrivateAuction sellerContactUsers. */ + public sellerContactUsers: string[]; + + /** PrivateAuction archived. */ + public archived?: (boolean|null); + + /** PrivateAuction createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateAuction updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PrivateAuction instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateAuction instance + */ + public static create(properties?: google.ads.admanager.v1.IPrivateAuction): google.ads.admanager.v1.PrivateAuction; + + /** + * Encodes the specified PrivateAuction message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * @param message PrivateAuction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IPrivateAuction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateAuction message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * @param message PrivateAuction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IPrivateAuction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateAuction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateAuction + * @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.ads.admanager.v1.PrivateAuction; + + /** + * Decodes a PrivateAuction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateAuction + * @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.ads.admanager.v1.PrivateAuction; + + /** + * Verifies a PrivateAuction 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 PrivateAuction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateAuction + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.PrivateAuction; + + /** + * Creates a plain object from a PrivateAuction message. Also converts values to other types if specified. + * @param message PrivateAuction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.PrivateAuction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateAuction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateAuction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a PrivateAuctionService */ + class PrivateAuctionService extends $protobuf.rpc.Service { + + /** + * Constructs a new PrivateAuctionService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PrivateAuctionService 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): PrivateAuctionService; + + /** + * Calls GetPrivateAuction. + * @param request GetPrivateAuctionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuction + */ + public getPrivateAuction(request: google.ads.admanager.v1.IGetPrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuctionCallback): void; + + /** + * Calls GetPrivateAuction. + * @param request GetPrivateAuctionRequest message or plain object + * @returns Promise + */ + public getPrivateAuction(request: google.ads.admanager.v1.IGetPrivateAuctionRequest): Promise; + + /** + * Calls ListPrivateAuctions. + * @param request ListPrivateAuctionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPrivateAuctionsResponse + */ + public listPrivateAuctions(request: google.ads.admanager.v1.IListPrivateAuctionsRequest, callback: google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctionsCallback): void; + + /** + * Calls ListPrivateAuctions. + * @param request ListPrivateAuctionsRequest message or plain object + * @returns Promise + */ + public listPrivateAuctions(request: google.ads.admanager.v1.IListPrivateAuctionsRequest): Promise; + + /** + * Calls CreatePrivateAuction. + * @param request CreatePrivateAuctionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuction + */ + public createPrivateAuction(request: google.ads.admanager.v1.ICreatePrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuctionCallback): void; + + /** + * Calls CreatePrivateAuction. + * @param request CreatePrivateAuctionRequest message or plain object + * @returns Promise + */ + public createPrivateAuction(request: google.ads.admanager.v1.ICreatePrivateAuctionRequest): Promise; + + /** + * Calls UpdatePrivateAuction. + * @param request UpdatePrivateAuctionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateAuction + */ + public updatePrivateAuction(request: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, callback: google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuctionCallback): void; + + /** + * Calls UpdatePrivateAuction. + * @param request UpdatePrivateAuctionRequest message or plain object + * @returns Promise + */ + public updatePrivateAuction(request: google.ads.admanager.v1.IUpdatePrivateAuctionRequest): Promise; + } + + namespace PrivateAuctionService { + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|getPrivateAuction}. + * @param error Error, if any + * @param [response] PrivateAuction + */ + type GetPrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|listPrivateAuctions}. + * @param error Error, if any + * @param [response] ListPrivateAuctionsResponse + */ + type ListPrivateAuctionsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListPrivateAuctionsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|createPrivateAuction}. + * @param error Error, if any + * @param [response] PrivateAuction + */ + type CreatePrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|updatePrivateAuction}. + * @param error Error, if any + * @param [response] PrivateAuction + */ + type UpdatePrivateAuctionCallback = (error: (Error|null), response?: google.ads.admanager.v1.PrivateAuction) => void; + } + + /** Properties of a GetPrivateAuctionRequest. */ + interface IGetPrivateAuctionRequest { + + /** GetPrivateAuctionRequest name */ + name?: (string|null); + } + + /** Represents a GetPrivateAuctionRequest. */ + class GetPrivateAuctionRequest implements IGetPrivateAuctionRequest { + + /** + * Constructs a new GetPrivateAuctionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetPrivateAuctionRequest); + + /** GetPrivateAuctionRequest name. */ + public name: string; + + /** + * Creates a new GetPrivateAuctionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPrivateAuctionRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetPrivateAuctionRequest): google.ads.admanager.v1.GetPrivateAuctionRequest; + + /** + * Encodes the specified GetPrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * @param message GetPrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetPrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * @param message GetPrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetPrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPrivateAuctionRequest + * @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.ads.admanager.v1.GetPrivateAuctionRequest; + + /** + * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPrivateAuctionRequest + * @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.ads.admanager.v1.GetPrivateAuctionRequest; + + /** + * Verifies a GetPrivateAuctionRequest 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 GetPrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPrivateAuctionRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetPrivateAuctionRequest; + + /** + * Creates a plain object from a GetPrivateAuctionRequest message. Also converts values to other types if specified. + * @param message GetPrivateAuctionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetPrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPrivateAuctionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPrivateAuctionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPrivateAuctionsRequest. */ + interface IListPrivateAuctionsRequest { + + /** ListPrivateAuctionsRequest parent */ + parent?: (string|null); + + /** ListPrivateAuctionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPrivateAuctionsRequest pageToken */ + pageToken?: (string|null); + + /** ListPrivateAuctionsRequest filter */ + filter?: (string|null); + + /** ListPrivateAuctionsRequest orderBy */ + orderBy?: (string|null); + + /** ListPrivateAuctionsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListPrivateAuctionsRequest. */ + class ListPrivateAuctionsRequest implements IListPrivateAuctionsRequest { + + /** + * Constructs a new ListPrivateAuctionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionsRequest); + + /** ListPrivateAuctionsRequest parent. */ + public parent: string; + + /** ListPrivateAuctionsRequest pageSize. */ + public pageSize: number; + + /** ListPrivateAuctionsRequest pageToken. */ + public pageToken: string; + + /** ListPrivateAuctionsRequest filter. */ + public filter: string; + + /** ListPrivateAuctionsRequest orderBy. */ + public orderBy: string; + + /** ListPrivateAuctionsRequest skip. */ + public skip: number; + + /** + * Creates a new ListPrivateAuctionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPrivateAuctionsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionsRequest): google.ads.admanager.v1.ListPrivateAuctionsRequest; + + /** + * Encodes the specified ListPrivateAuctionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * @param message ListPrivateAuctionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPrivateAuctionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPrivateAuctionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * @param message ListPrivateAuctionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPrivateAuctionsRequest + * @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.ads.admanager.v1.ListPrivateAuctionsRequest; + + /** + * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPrivateAuctionsRequest + * @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.ads.admanager.v1.ListPrivateAuctionsRequest; + + /** + * Verifies a ListPrivateAuctionsRequest 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 ListPrivateAuctionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPrivateAuctionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionsRequest; + + /** + * Creates a plain object from a ListPrivateAuctionsRequest message. Also converts values to other types if specified. + * @param message ListPrivateAuctionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPrivateAuctionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPrivateAuctionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPrivateAuctionsResponse. */ + interface IListPrivateAuctionsResponse { + + /** ListPrivateAuctionsResponse privateAuctions */ + privateAuctions?: (google.ads.admanager.v1.IPrivateAuction[]|null); + + /** ListPrivateAuctionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListPrivateAuctionsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListPrivateAuctionsResponse. */ + class ListPrivateAuctionsResponse implements IListPrivateAuctionsResponse { + + /** + * Constructs a new ListPrivateAuctionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListPrivateAuctionsResponse); + + /** ListPrivateAuctionsResponse privateAuctions. */ + public privateAuctions: google.ads.admanager.v1.IPrivateAuction[]; + + /** ListPrivateAuctionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListPrivateAuctionsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListPrivateAuctionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPrivateAuctionsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListPrivateAuctionsResponse): google.ads.admanager.v1.ListPrivateAuctionsResponse; + + /** + * Encodes the specified ListPrivateAuctionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * @param message ListPrivateAuctionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListPrivateAuctionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPrivateAuctionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * @param message ListPrivateAuctionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListPrivateAuctionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPrivateAuctionsResponse + * @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.ads.admanager.v1.ListPrivateAuctionsResponse; + + /** + * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPrivateAuctionsResponse + * @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.ads.admanager.v1.ListPrivateAuctionsResponse; + + /** + * Verifies a ListPrivateAuctionsResponse 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 ListPrivateAuctionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPrivateAuctionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListPrivateAuctionsResponse; + + /** + * Creates a plain object from a ListPrivateAuctionsResponse message. Also converts values to other types if specified. + * @param message ListPrivateAuctionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListPrivateAuctionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPrivateAuctionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPrivateAuctionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePrivateAuctionRequest. */ + interface ICreatePrivateAuctionRequest { + + /** CreatePrivateAuctionRequest parent */ + parent?: (string|null); + + /** CreatePrivateAuctionRequest privateAuction */ + privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + } + + /** Represents a CreatePrivateAuctionRequest. */ + class CreatePrivateAuctionRequest implements ICreatePrivateAuctionRequest { + + /** + * Constructs a new CreatePrivateAuctionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICreatePrivateAuctionRequest); + + /** CreatePrivateAuctionRequest parent. */ + public parent: string; + + /** CreatePrivateAuctionRequest privateAuction. */ + public privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + + /** + * Creates a new CreatePrivateAuctionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePrivateAuctionRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreatePrivateAuctionRequest): google.ads.admanager.v1.CreatePrivateAuctionRequest; + + /** + * Encodes the specified CreatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * @param message CreatePrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * @param message CreatePrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePrivateAuctionRequest + * @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.ads.admanager.v1.CreatePrivateAuctionRequest; + + /** + * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePrivateAuctionRequest + * @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.ads.admanager.v1.CreatePrivateAuctionRequest; + + /** + * Verifies a CreatePrivateAuctionRequest 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 CreatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePrivateAuctionRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreatePrivateAuctionRequest; + + /** + * Creates a plain object from a CreatePrivateAuctionRequest message. Also converts values to other types if specified. + * @param message CreatePrivateAuctionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreatePrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePrivateAuctionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePrivateAuctionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePrivateAuctionRequest. */ + interface IUpdatePrivateAuctionRequest { + + /** UpdatePrivateAuctionRequest privateAuction */ + privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + + /** UpdatePrivateAuctionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePrivateAuctionRequest. */ + class UpdatePrivateAuctionRequest implements IUpdatePrivateAuctionRequest { + + /** + * Constructs a new UpdatePrivateAuctionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionRequest); + + /** UpdatePrivateAuctionRequest privateAuction. */ + public privateAuction?: (google.ads.admanager.v1.IPrivateAuction|null); + + /** UpdatePrivateAuctionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePrivateAuctionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePrivateAuctionRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IUpdatePrivateAuctionRequest): google.ads.admanager.v1.UpdatePrivateAuctionRequest; + + /** + * Encodes the specified UpdatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * @param message UpdatePrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * @param message UpdatePrivateAuctionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUpdatePrivateAuctionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePrivateAuctionRequest + * @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.ads.admanager.v1.UpdatePrivateAuctionRequest; + + /** + * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePrivateAuctionRequest + * @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.ads.admanager.v1.UpdatePrivateAuctionRequest; + + /** + * Verifies an UpdatePrivateAuctionRequest 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 UpdatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePrivateAuctionRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdatePrivateAuctionRequest; + + /** + * Creates a plain object from an UpdatePrivateAuctionRequest message. Also converts values to other types if specified. + * @param message UpdatePrivateAuctionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UpdatePrivateAuctionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePrivateAuctionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePrivateAuctionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProgrammaticBuyer. */ + interface IProgrammaticBuyer { + + /** ProgrammaticBuyer name */ + name?: (string|null); + + /** ProgrammaticBuyer buyerAccountId */ + buyerAccountId?: (number|Long|string|null); + + /** ProgrammaticBuyer displayName */ + displayName?: (string|null); + + /** ProgrammaticBuyer parentAccountId */ + parentAccountId?: (number|Long|string|null); + + /** ProgrammaticBuyer partnerClientId */ + partnerClientId?: (string|null); + + /** ProgrammaticBuyer agency */ + agency?: (boolean|null); + + /** ProgrammaticBuyer preferredDealsEnabled */ + preferredDealsEnabled?: (boolean|null); + + /** ProgrammaticBuyer programmaticGuaranteedEnabled */ + programmaticGuaranteedEnabled?: (boolean|null); + } + + /** Represents a ProgrammaticBuyer. */ + class ProgrammaticBuyer implements IProgrammaticBuyer { + + /** + * Constructs a new ProgrammaticBuyer. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IProgrammaticBuyer); + + /** ProgrammaticBuyer name. */ + public name: string; + + /** ProgrammaticBuyer buyerAccountId. */ + public buyerAccountId?: (number|Long|string|null); + + /** ProgrammaticBuyer displayName. */ + public displayName?: (string|null); + + /** ProgrammaticBuyer parentAccountId. */ + public parentAccountId?: (number|Long|string|null); + + /** ProgrammaticBuyer partnerClientId. */ + public partnerClientId?: (string|null); + + /** ProgrammaticBuyer agency. */ + public agency?: (boolean|null); + + /** ProgrammaticBuyer preferredDealsEnabled. */ + public preferredDealsEnabled?: (boolean|null); + + /** ProgrammaticBuyer programmaticGuaranteedEnabled. */ + public programmaticGuaranteedEnabled?: (boolean|null); + + /** + * Creates a new ProgrammaticBuyer instance using the specified properties. + * @param [properties] Properties to set + * @returns ProgrammaticBuyer instance + */ + public static create(properties?: google.ads.admanager.v1.IProgrammaticBuyer): google.ads.admanager.v1.ProgrammaticBuyer; + + /** + * Encodes the specified ProgrammaticBuyer message. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * @param message ProgrammaticBuyer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IProgrammaticBuyer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProgrammaticBuyer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * @param message ProgrammaticBuyer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IProgrammaticBuyer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProgrammaticBuyer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProgrammaticBuyer + * @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.ads.admanager.v1.ProgrammaticBuyer; + + /** + * Decodes a ProgrammaticBuyer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProgrammaticBuyer + * @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.ads.admanager.v1.ProgrammaticBuyer; + + /** + * Verifies a ProgrammaticBuyer 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 ProgrammaticBuyer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProgrammaticBuyer + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ProgrammaticBuyer; + + /** + * Creates a plain object from a ProgrammaticBuyer message. Also converts values to other types if specified. + * @param message ProgrammaticBuyer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ProgrammaticBuyer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProgrammaticBuyer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProgrammaticBuyer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ProgrammaticBuyerService */ + class ProgrammaticBuyerService extends $protobuf.rpc.Service { + + /** + * Constructs a new ProgrammaticBuyerService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ProgrammaticBuyerService 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): ProgrammaticBuyerService; + + /** + * Calls GetProgrammaticBuyer. + * @param request GetProgrammaticBuyerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProgrammaticBuyer + */ + public getProgrammaticBuyer(request: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, callback: google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyerCallback): void; + + /** + * Calls GetProgrammaticBuyer. + * @param request GetProgrammaticBuyerRequest message or plain object + * @returns Promise + */ + public getProgrammaticBuyer(request: google.ads.admanager.v1.IGetProgrammaticBuyerRequest): Promise; + + /** + * Calls ListProgrammaticBuyers. + * @param request ListProgrammaticBuyersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListProgrammaticBuyersResponse + */ + public listProgrammaticBuyers(request: google.ads.admanager.v1.IListProgrammaticBuyersRequest, callback: google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyersCallback): void; + + /** + * Calls ListProgrammaticBuyers. + * @param request ListProgrammaticBuyersRequest message or plain object + * @returns Promise + */ + public listProgrammaticBuyers(request: google.ads.admanager.v1.IListProgrammaticBuyersRequest): Promise; + } + + namespace ProgrammaticBuyerService { + + /** + * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|getProgrammaticBuyer}. + * @param error Error, if any + * @param [response] ProgrammaticBuyer + */ + type GetProgrammaticBuyerCallback = (error: (Error|null), response?: google.ads.admanager.v1.ProgrammaticBuyer) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|listProgrammaticBuyers}. + * @param error Error, if any + * @param [response] ListProgrammaticBuyersResponse + */ + type ListProgrammaticBuyersCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListProgrammaticBuyersResponse) => void; + } + + /** Properties of a GetProgrammaticBuyerRequest. */ + interface IGetProgrammaticBuyerRequest { + + /** GetProgrammaticBuyerRequest name */ + name?: (string|null); + } + + /** Represents a GetProgrammaticBuyerRequest. */ + class GetProgrammaticBuyerRequest implements IGetProgrammaticBuyerRequest { + + /** + * Constructs a new GetProgrammaticBuyerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetProgrammaticBuyerRequest); + + /** GetProgrammaticBuyerRequest name. */ + public name: string; + + /** + * Creates a new GetProgrammaticBuyerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProgrammaticBuyerRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetProgrammaticBuyerRequest): google.ads.admanager.v1.GetProgrammaticBuyerRequest; + + /** + * Encodes the specified GetProgrammaticBuyerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * @param message GetProgrammaticBuyerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProgrammaticBuyerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * @param message GetProgrammaticBuyerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetProgrammaticBuyerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProgrammaticBuyerRequest + * @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.ads.admanager.v1.GetProgrammaticBuyerRequest; + + /** + * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProgrammaticBuyerRequest + * @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.ads.admanager.v1.GetProgrammaticBuyerRequest; + + /** + * Verifies a GetProgrammaticBuyerRequest 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 GetProgrammaticBuyerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProgrammaticBuyerRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetProgrammaticBuyerRequest; + + /** + * Creates a plain object from a GetProgrammaticBuyerRequest message. Also converts values to other types if specified. + * @param message GetProgrammaticBuyerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetProgrammaticBuyerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProgrammaticBuyerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProgrammaticBuyerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProgrammaticBuyersRequest. */ + interface IListProgrammaticBuyersRequest { + + /** ListProgrammaticBuyersRequest parent */ + parent?: (string|null); + + /** ListProgrammaticBuyersRequest pageSize */ + pageSize?: (number|null); + + /** ListProgrammaticBuyersRequest pageToken */ + pageToken?: (string|null); + + /** ListProgrammaticBuyersRequest filter */ + filter?: (string|null); + + /** ListProgrammaticBuyersRequest orderBy */ + orderBy?: (string|null); + + /** ListProgrammaticBuyersRequest skip */ + skip?: (number|null); + } + + /** Represents a ListProgrammaticBuyersRequest. */ + class ListProgrammaticBuyersRequest implements IListProgrammaticBuyersRequest { + + /** + * Constructs a new ListProgrammaticBuyersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListProgrammaticBuyersRequest); + + /** ListProgrammaticBuyersRequest parent. */ + public parent: string; + + /** ListProgrammaticBuyersRequest pageSize. */ + public pageSize: number; + + /** ListProgrammaticBuyersRequest pageToken. */ + public pageToken: string; + + /** ListProgrammaticBuyersRequest filter. */ + public filter: string; + + /** ListProgrammaticBuyersRequest orderBy. */ + public orderBy: string; + + /** ListProgrammaticBuyersRequest skip. */ + public skip: number; + + /** + * Creates a new ListProgrammaticBuyersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProgrammaticBuyersRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListProgrammaticBuyersRequest): google.ads.admanager.v1.ListProgrammaticBuyersRequest; + + /** + * Encodes the specified ListProgrammaticBuyersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * @param message ListProgrammaticBuyersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListProgrammaticBuyersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProgrammaticBuyersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * @param message ListProgrammaticBuyersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListProgrammaticBuyersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProgrammaticBuyersRequest + * @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.ads.admanager.v1.ListProgrammaticBuyersRequest; + + /** + * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProgrammaticBuyersRequest + * @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.ads.admanager.v1.ListProgrammaticBuyersRequest; + + /** + * Verifies a ListProgrammaticBuyersRequest 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 ListProgrammaticBuyersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProgrammaticBuyersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListProgrammaticBuyersRequest; + + /** + * Creates a plain object from a ListProgrammaticBuyersRequest message. Also converts values to other types if specified. + * @param message ListProgrammaticBuyersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListProgrammaticBuyersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProgrammaticBuyersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProgrammaticBuyersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProgrammaticBuyersResponse. */ + interface IListProgrammaticBuyersResponse { + + /** ListProgrammaticBuyersResponse programmaticBuyers */ + programmaticBuyers?: (google.ads.admanager.v1.IProgrammaticBuyer[]|null); + + /** ListProgrammaticBuyersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListProgrammaticBuyersResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListProgrammaticBuyersResponse. */ + class ListProgrammaticBuyersResponse implements IListProgrammaticBuyersResponse { + + /** + * Constructs a new ListProgrammaticBuyersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListProgrammaticBuyersResponse); + + /** ListProgrammaticBuyersResponse programmaticBuyers. */ + public programmaticBuyers: google.ads.admanager.v1.IProgrammaticBuyer[]; + + /** ListProgrammaticBuyersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListProgrammaticBuyersResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListProgrammaticBuyersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProgrammaticBuyersResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListProgrammaticBuyersResponse): google.ads.admanager.v1.ListProgrammaticBuyersResponse; + + /** + * Encodes the specified ListProgrammaticBuyersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * @param message ListProgrammaticBuyersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListProgrammaticBuyersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProgrammaticBuyersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * @param message ListProgrammaticBuyersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListProgrammaticBuyersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProgrammaticBuyersResponse + * @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.ads.admanager.v1.ListProgrammaticBuyersResponse; + + /** + * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProgrammaticBuyersResponse + * @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.ads.admanager.v1.ListProgrammaticBuyersResponse; + + /** + * Verifies a ListProgrammaticBuyersResponse 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 ListProgrammaticBuyersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProgrammaticBuyersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListProgrammaticBuyersResponse; + + /** + * Creates a plain object from a ListProgrammaticBuyersResponse message. Also converts values to other types if specified. + * @param message ListProgrammaticBuyersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListProgrammaticBuyersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProgrammaticBuyersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProgrammaticBuyersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportDefinition. */ + interface IReportDefinition { + + /** ReportDefinition dimensions */ + dimensions?: (google.ads.admanager.v1.ReportDefinition.Dimension[]|null); + + /** ReportDefinition metrics */ + metrics?: (google.ads.admanager.v1.ReportDefinition.Metric[]|null); + + /** ReportDefinition filters */ + filters?: (google.ads.admanager.v1.ReportDefinition.IFilter[]|null); + + /** ReportDefinition timeZoneSource */ + timeZoneSource?: (google.ads.admanager.v1.ReportDefinition.TimeZoneSource|keyof typeof google.ads.admanager.v1.ReportDefinition.TimeZoneSource|null); + + /** ReportDefinition timeZone */ + timeZone?: (string|null); + + /** ReportDefinition currencyCode */ + currencyCode?: (string|null); + + /** ReportDefinition dateRange */ + dateRange?: (google.ads.admanager.v1.ReportDefinition.IDateRange|null); + + /** ReportDefinition comparisonDateRange */ + comparisonDateRange?: (google.ads.admanager.v1.ReportDefinition.IDateRange|null); + + /** ReportDefinition customDimensionKeyIds */ + customDimensionKeyIds?: ((number|Long|string)[]|null); + + /** ReportDefinition lineItemCustomFieldIds */ + lineItemCustomFieldIds?: ((number|Long|string)[]|null); + + /** ReportDefinition orderCustomFieldIds */ + orderCustomFieldIds?: ((number|Long|string)[]|null); + + /** ReportDefinition creativeCustomFieldIds */ + creativeCustomFieldIds?: ((number|Long|string)[]|null); + + /** ReportDefinition reportType */ + reportType?: (google.ads.admanager.v1.ReportDefinition.ReportType|keyof typeof google.ads.admanager.v1.ReportDefinition.ReportType|null); + + /** ReportDefinition timePeriodColumn */ + timePeriodColumn?: (google.ads.admanager.v1.ReportDefinition.TimePeriodColumn|keyof typeof google.ads.admanager.v1.ReportDefinition.TimePeriodColumn|null); + + /** ReportDefinition flags */ + flags?: (google.ads.admanager.v1.ReportDefinition.IFlag[]|null); + + /** ReportDefinition sorts */ + sorts?: (google.ads.admanager.v1.ReportDefinition.ISort[]|null); + } + + /** Represents a ReportDefinition. */ + class ReportDefinition implements IReportDefinition { + + /** + * Constructs a new ReportDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IReportDefinition); + + /** ReportDefinition dimensions. */ + public dimensions: google.ads.admanager.v1.ReportDefinition.Dimension[]; + + /** ReportDefinition metrics. */ + public metrics: google.ads.admanager.v1.ReportDefinition.Metric[]; + + /** ReportDefinition filters. */ + public filters: google.ads.admanager.v1.ReportDefinition.IFilter[]; + + /** ReportDefinition timeZoneSource. */ + public timeZoneSource: (google.ads.admanager.v1.ReportDefinition.TimeZoneSource|keyof typeof google.ads.admanager.v1.ReportDefinition.TimeZoneSource); + + /** ReportDefinition timeZone. */ + public timeZone: string; + + /** ReportDefinition currencyCode. */ + public currencyCode: string; + + /** ReportDefinition dateRange. */ + public dateRange?: (google.ads.admanager.v1.ReportDefinition.IDateRange|null); + + /** ReportDefinition comparisonDateRange. */ + public comparisonDateRange?: (google.ads.admanager.v1.ReportDefinition.IDateRange|null); + + /** ReportDefinition customDimensionKeyIds. */ + public customDimensionKeyIds: (number|Long|string)[]; + + /** ReportDefinition lineItemCustomFieldIds. */ + public lineItemCustomFieldIds: (number|Long|string)[]; + + /** ReportDefinition orderCustomFieldIds. */ + public orderCustomFieldIds: (number|Long|string)[]; + + /** ReportDefinition creativeCustomFieldIds. */ + public creativeCustomFieldIds: (number|Long|string)[]; + + /** ReportDefinition reportType. */ + public reportType: (google.ads.admanager.v1.ReportDefinition.ReportType|keyof typeof google.ads.admanager.v1.ReportDefinition.ReportType); + + /** ReportDefinition timePeriodColumn. */ + public timePeriodColumn: (google.ads.admanager.v1.ReportDefinition.TimePeriodColumn|keyof typeof google.ads.admanager.v1.ReportDefinition.TimePeriodColumn); + + /** ReportDefinition flags. */ + public flags: google.ads.admanager.v1.ReportDefinition.IFlag[]; + + /** ReportDefinition sorts. */ + public sorts: google.ads.admanager.v1.ReportDefinition.ISort[]; + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDefinition instance + */ + public static create(properties?: google.ads.admanager.v1.IReportDefinition): google.ads.admanager.v1.ReportDefinition; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDefinition + * @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.ads.admanager.v1.ReportDefinition; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDefinition + * @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.ads.admanager.v1.ReportDefinition; + + /** + * Verifies a ReportDefinition 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 ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDefinition + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @param message ReportDefinition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDefinition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDefinition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportDefinition { + + /** Properties of a Field. */ + interface IField { + + /** Field dimension */ + dimension?: (google.ads.admanager.v1.ReportDefinition.Dimension|keyof typeof google.ads.admanager.v1.ReportDefinition.Dimension|null); + + /** Field metric */ + metric?: (google.ads.admanager.v1.ReportDefinition.Metric|keyof typeof google.ads.admanager.v1.ReportDefinition.Metric|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.IField); + + /** Field dimension. */ + public dimension?: (google.ads.admanager.v1.ReportDefinition.Dimension|keyof typeof google.ads.admanager.v1.ReportDefinition.Dimension|null); + + /** Field metric. */ + public metric?: (google.ads.admanager.v1.ReportDefinition.Metric|keyof typeof google.ads.admanager.v1.ReportDefinition.Metric|null); + + /** Field field. */ + public field?: ("dimension"|"metric"); + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.IField): google.ads.admanager.v1.ReportDefinition.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @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.ads.admanager.v1.ReportDefinition.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @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.ads.admanager.v1.ReportDefinition.Field; + + /** + * Verifies a Field 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 Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange fixed */ + fixed?: (google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange|null); + + /** DateRange relative */ + relative?: (google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|keyof typeof google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.IDateRange); + + /** DateRange fixed. */ + public fixed?: (google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange|null); + + /** DateRange relative. */ + public relative?: (google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|keyof typeof google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|null); + + /** DateRange dateRangeType. */ + public dateRangeType?: ("fixed"|"relative"); + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.IDateRange): google.ads.admanager.v1.ReportDefinition.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @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.ads.admanager.v1.ReportDefinition.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @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.ads.admanager.v1.ReportDefinition.DateRange; + + /** + * Verifies a DateRange 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 DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DateRange { + + /** Properties of a FixedDateRange. */ + interface IFixedDateRange { + + /** FixedDateRange startDate */ + startDate?: (google.type.IDate|null); + + /** FixedDateRange endDate */ + endDate?: (google.type.IDate|null); + } + + /** Represents a FixedDateRange. */ + class FixedDateRange implements IFixedDateRange { + + /** + * Constructs a new FixedDateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange); + + /** FixedDateRange startDate. */ + public startDate?: (google.type.IDate|null); + + /** FixedDateRange endDate. */ + public endDate?: (google.type.IDate|null); + + /** + * Creates a new FixedDateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedDateRange instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange): google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange; + + /** + * Encodes the specified FixedDateRange message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify|verify} messages. + * @param message FixedDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FixedDateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify|verify} messages. + * @param message FixedDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FixedDateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedDateRange + * @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.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange; + + /** + * Decodes a FixedDateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedDateRange + * @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.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange; + + /** + * Verifies a FixedDateRange 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 FixedDateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedDateRange + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange; + + /** + * Creates a plain object from a FixedDateRange message. Also converts values to other types if specified. + * @param message FixedDateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FixedDateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FixedDateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RelativeDateRange enum. */ + enum RelativeDateRange { + RELATIVE_DATE_RANGE_UNSPECIFIED = 0, + TODAY = 1, + YESTERDAY = 2, + THIS_WEEK = 3, + THIS_WEEK_TO_DATE = 29, + THIS_MONTH = 4, + THIS_MONTH_TO_DATE = 26, + THIS_QUARTER = 5, + THIS_QUARTER_TO_DATE = 27, + THIS_YEAR = 6, + THIS_YEAR_TO_DATE = 28, + LAST_WEEK = 7, + LAST_MONTH = 8, + LAST_QUARTER = 9, + LAST_YEAR = 10, + LAST_7_DAYS = 11, + LAST_30_DAYS = 12, + LAST_60_DAYS = 13, + LAST_90_DAYS = 14, + LAST_180_DAYS = 15, + LAST_360_DAYS = 16, + LAST_365_DAYS = 17, + LAST_3_MONTHS = 18, + LAST_6_MONTHS = 19, + LAST_12_MONTHS = 20, + ALL_AVAILABLE = 21, + TOMORROW = 30, + NEXT_90_DAYS = 31, + NEXT_MONTH = 32, + NEXT_3_MONTHS = 33, + NEXT_12_MONTHS = 34, + NEXT_WEEK = 35, + NEXT_QUARTER = 36, + TO_END_OF_NEXT_MONTH = 37, + PREVIOUS_PERIOD = 22, + SAME_PERIOD_PREVIOUS_YEAR = 24 + } + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldFilter */ + fieldFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter|null); + + /** Filter notFilter */ + notFilter?: (google.ads.admanager.v1.ReportDefinition.IFilter|null); + + /** Filter andFilter */ + andFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null); + + /** Filter orFilter */ + orFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.IFilter); + + /** Filter fieldFilter. */ + public fieldFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter|null); + + /** Filter notFilter. */ + public notFilter?: (google.ads.admanager.v1.ReportDefinition.IFilter|null); + + /** Filter andFilter. */ + public andFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null); + + /** Filter orFilter. */ + public orFilter?: (google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null); + + /** Filter type. */ + public type?: ("fieldFilter"|"notFilter"|"andFilter"|"orFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.IFilter): google.ads.admanager.v1.ReportDefinition.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @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.ads.admanager.v1.ReportDefinition.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @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.ads.admanager.v1.ReportDefinition.Filter; + + /** + * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Filter { + + /** Properties of a FieldFilter. */ + interface IFieldFilter { + + /** FieldFilter field */ + field?: (google.ads.admanager.v1.ReportDefinition.IField|null); + + /** FieldFilter operation */ + operation?: (google.ads.admanager.v1.ReportDefinition.Filter.Operation|keyof typeof google.ads.admanager.v1.ReportDefinition.Filter.Operation|null); + + /** FieldFilter values */ + values?: (google.ads.admanager.v1.IReportValue[]|null); + + /** FieldFilter slice */ + slice?: (google.ads.admanager.v1.ReportDefinition.ISlice|null); + + /** FieldFilter timePeriodIndex */ + timePeriodIndex?: (number|null); + + /** FieldFilter metricValueType */ + metricValueType?: (google.ads.admanager.v1.ReportDefinition.MetricValueType|keyof typeof google.ads.admanager.v1.ReportDefinition.MetricValueType|null); + } + + /** Represents a FieldFilter. */ + class FieldFilter implements IFieldFilter { + + /** + * Constructs a new FieldFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter); + + /** FieldFilter field. */ + public field?: (google.ads.admanager.v1.ReportDefinition.IField|null); + + /** FieldFilter operation. */ + public operation: (google.ads.admanager.v1.ReportDefinition.Filter.Operation|keyof typeof google.ads.admanager.v1.ReportDefinition.Filter.Operation); + + /** FieldFilter values. */ + public values: google.ads.admanager.v1.IReportValue[]; + + /** FieldFilter slice. */ + public slice?: (google.ads.admanager.v1.ReportDefinition.ISlice|null); + + /** FieldFilter timePeriodIndex. */ + public timePeriodIndex?: (number|null); + + /** FieldFilter metricValueType. */ + public metricValueType?: (google.ads.admanager.v1.ReportDefinition.MetricValueType|keyof typeof google.ads.admanager.v1.ReportDefinition.MetricValueType|null); + + /** + * Creates a new FieldFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldFilter instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter): google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter; + + /** + * Encodes the specified FieldFilter message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.verify|verify} messages. + * @param message FieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldFilter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.verify|verify} messages. + * @param message FieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldFilter + * @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.ads.admanager.v1.ReportDefinition.Filter.FieldFilter; + + /** + * Decodes a FieldFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldFilter + * @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.ads.admanager.v1.ReportDefinition.Filter.FieldFilter; + + /** + * Verifies a FieldFilter 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 FieldFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldFilter + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter; + + /** + * Creates a plain object from a FieldFilter message. Also converts values to other types if specified. + * @param message FieldFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterList. */ + interface IFilterList { + + /** FilterList filters */ + filters?: (google.ads.admanager.v1.ReportDefinition.IFilter[]|null); + } + + /** Represents a FilterList. */ + class FilterList implements IFilterList { + + /** + * Constructs a new FilterList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.Filter.IFilterList); + + /** FilterList filters. */ + public filters: google.ads.admanager.v1.ReportDefinition.IFilter[]; + + /** + * Creates a new FilterList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterList instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.Filter.IFilterList): google.ads.admanager.v1.ReportDefinition.Filter.FilterList; + + /** + * Encodes the specified FilterList message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify|verify} messages. + * @param message FilterList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.Filter.IFilterList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify|verify} messages. + * @param message FilterList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.Filter.IFilterList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterList + * @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.ads.admanager.v1.ReportDefinition.Filter.FilterList; + + /** + * Decodes a FilterList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterList + * @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.ads.admanager.v1.ReportDefinition.Filter.FilterList; + + /** + * Verifies a FilterList 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 FilterList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterList + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Filter.FilterList; + + /** + * Creates a plain object from a FilterList message. Also converts values to other types if specified. + * @param message FilterList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Filter.FilterList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Operation enum. */ + enum Operation { + IN = 0, + NOT_IN = 1, + CONTAINS = 2, + NOT_CONTAINS = 3, + LESS_THAN = 4, + LESS_THAN_EQUALS = 5, + GREATER_THAN = 6, + GREATER_THAN_EQUALS = 7, + BETWEEN = 8, + MATCHES = 9, + NOT_MATCHES = 10 + } + } + + /** Properties of a Sort. */ + interface ISort { + + /** Sort field */ + field?: (google.ads.admanager.v1.ReportDefinition.IField|null); + + /** Sort descending */ + descending?: (boolean|null); + + /** Sort slice */ + slice?: (google.ads.admanager.v1.ReportDefinition.ISlice|null); + + /** Sort timePeriodIndex */ + timePeriodIndex?: (number|null); + + /** Sort metricValueType */ + metricValueType?: (google.ads.admanager.v1.ReportDefinition.MetricValueType|keyof typeof google.ads.admanager.v1.ReportDefinition.MetricValueType|null); + } + + /** Represents a Sort. */ + class Sort implements ISort { + + /** + * Constructs a new Sort. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.ISort); + + /** Sort field. */ + public field?: (google.ads.admanager.v1.ReportDefinition.IField|null); + + /** Sort descending. */ + public descending: boolean; + + /** Sort slice. */ + public slice?: (google.ads.admanager.v1.ReportDefinition.ISlice|null); + + /** Sort timePeriodIndex. */ + public timePeriodIndex?: (number|null); + + /** Sort metricValueType. */ + public metricValueType?: (google.ads.admanager.v1.ReportDefinition.MetricValueType|keyof typeof google.ads.admanager.v1.ReportDefinition.MetricValueType|null); + + /** + * Creates a new Sort instance using the specified properties. + * @param [properties] Properties to set + * @returns Sort instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.ISort): google.ads.admanager.v1.ReportDefinition.Sort; + + /** + * Encodes the specified Sort message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Sort.verify|verify} messages. + * @param message Sort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.ISort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sort message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Sort.verify|verify} messages. + * @param message Sort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.ISort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sort + * @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.ads.admanager.v1.ReportDefinition.Sort; + + /** + * Decodes a Sort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sort + * @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.ads.admanager.v1.ReportDefinition.Sort; + + /** + * Verifies a Sort 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 Sort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sort + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Sort; + + /** + * Creates a plain object from a Sort message. Also converts values to other types if specified. + * @param message Sort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Sort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Slice. */ + interface ISlice { + + /** Slice dimension */ + dimension?: (google.ads.admanager.v1.ReportDefinition.Dimension|keyof typeof google.ads.admanager.v1.ReportDefinition.Dimension|null); + + /** Slice value */ + value?: (google.ads.admanager.v1.IReportValue|null); + } + + /** Represents a Slice. */ + class Slice implements ISlice { + + /** + * Constructs a new Slice. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.ISlice); + + /** Slice dimension. */ + public dimension: (google.ads.admanager.v1.ReportDefinition.Dimension|keyof typeof google.ads.admanager.v1.ReportDefinition.Dimension); + + /** Slice value. */ + public value?: (google.ads.admanager.v1.IReportValue|null); + + /** + * Creates a new Slice instance using the specified properties. + * @param [properties] Properties to set + * @returns Slice instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.ISlice): google.ads.admanager.v1.ReportDefinition.Slice; + + /** + * Encodes the specified Slice message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Slice.verify|verify} messages. + * @param message Slice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Slice.verify|verify} messages. + * @param message Slice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Slice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Slice + * @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.ads.admanager.v1.ReportDefinition.Slice; + + /** + * Decodes a Slice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Slice + * @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.ads.admanager.v1.ReportDefinition.Slice; + + /** + * Verifies a Slice 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 Slice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Slice + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Slice; + + /** + * Creates a plain object from a Slice message. Also converts values to other types if specified. + * @param message Slice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Slice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Slice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Slice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Flag. */ + interface IFlag { + + /** Flag filters */ + filters?: (google.ads.admanager.v1.ReportDefinition.IFilter[]|null); + + /** Flag name */ + name?: (string|null); + } + + /** Represents a Flag. */ + class Flag implements IFlag { + + /** + * Constructs a new Flag. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDefinition.IFlag); + + /** Flag filters. */ + public filters: google.ads.admanager.v1.ReportDefinition.IFilter[]; + + /** Flag name. */ + public name: string; + + /** + * Creates a new Flag instance using the specified properties. + * @param [properties] Properties to set + * @returns Flag instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDefinition.IFlag): google.ads.admanager.v1.ReportDefinition.Flag; + + /** + * Encodes the specified Flag message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Flag.verify|verify} messages. + * @param message Flag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDefinition.IFlag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Flag message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Flag.verify|verify} messages. + * @param message Flag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDefinition.IFlag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Flag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Flag + * @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.ads.admanager.v1.ReportDefinition.Flag; + + /** + * Decodes a Flag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Flag + * @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.ads.admanager.v1.ReportDefinition.Flag; + + /** + * Verifies a Flag 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 Flag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Flag + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition.Flag; + + /** + * Creates a plain object from a Flag message. Also converts values to other types if specified. + * @param message Flag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDefinition.Flag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Flag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Flag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ReportType enum. */ + enum ReportType { + REPORT_TYPE_UNSPECIFIED = 0, + HISTORICAL = 1, + REACH = 5, + PRIVACY_AND_MESSAGING = 6, + AD_SPEED = 13 + } + + /** Dimension enum. */ + enum Dimension { + DIMENSION_UNSPECIFIED = 0, + ACTIVE_VIEW_MEASUREMENT_SOURCE = 575, + ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME = 576, + ADVERTISER_CREDIT_STATUS = 475, + ADVERTISER_CREDIT_STATUS_NAME = 476, + ADVERTISER_DOMAIN_NAME = 242, + ADVERTISER_EXTERNAL_ID = 228, + ADVERTISER_ID = 131, + ADVERTISER_LABELS = 230, + ADVERTISER_LABEL_IDS = 229, + ADVERTISER_NAME = 132, + ADVERTISER_PRIMARY_CONTACT = 227, + ADVERTISER_STATUS = 471, + ADVERTISER_STATUS_NAME = 472, + ADVERTISER_TYPE = 473, + ADVERTISER_TYPE_NAME = 474, + ADVERTISER_VERTICAL = 580, + ADX_PRODUCT = 499, + ADX_PRODUCT_NAME = 500, + AD_EXPERIENCES_TYPE = 641, + AD_EXPERIENCES_TYPE_NAME = 642, + AD_LOCATION = 390, + AD_LOCATION_NAME = 391, + AD_TECHNOLOGY_PROVIDER_DOMAIN = 620, + AD_TECHNOLOGY_PROVIDER_ID = 621, + AD_TECHNOLOGY_PROVIDER_NAME = 622, + AD_TYPE = 497, + AD_TYPE_NAME = 498, + AD_UNIT_CODE = 64, + AD_UNIT_CODE_LEVEL_1 = 65, + AD_UNIT_CODE_LEVEL_10 = 74, + AD_UNIT_CODE_LEVEL_11 = 75, + AD_UNIT_CODE_LEVEL_12 = 76, + AD_UNIT_CODE_LEVEL_13 = 77, + AD_UNIT_CODE_LEVEL_14 = 78, + AD_UNIT_CODE_LEVEL_15 = 79, + AD_UNIT_CODE_LEVEL_16 = 80, + AD_UNIT_CODE_LEVEL_2 = 66, + AD_UNIT_CODE_LEVEL_3 = 67, + AD_UNIT_CODE_LEVEL_4 = 68, + AD_UNIT_CODE_LEVEL_5 = 69, + AD_UNIT_CODE_LEVEL_6 = 70, + AD_UNIT_CODE_LEVEL_7 = 71, + AD_UNIT_CODE_LEVEL_8 = 72, + AD_UNIT_CODE_LEVEL_9 = 73, + AD_UNIT_ID = 25, + AD_UNIT_ID_ALL_LEVEL = 27, + AD_UNIT_ID_LEVEL_1 = 30, + AD_UNIT_ID_LEVEL_10 = 48, + AD_UNIT_ID_LEVEL_11 = 50, + AD_UNIT_ID_LEVEL_12 = 52, + AD_UNIT_ID_LEVEL_13 = 54, + AD_UNIT_ID_LEVEL_14 = 56, + AD_UNIT_ID_LEVEL_15 = 58, + AD_UNIT_ID_LEVEL_16 = 60, + AD_UNIT_ID_LEVEL_2 = 32, + AD_UNIT_ID_LEVEL_3 = 34, + AD_UNIT_ID_LEVEL_4 = 36, + AD_UNIT_ID_LEVEL_5 = 38, + AD_UNIT_ID_LEVEL_6 = 40, + AD_UNIT_ID_LEVEL_7 = 42, + AD_UNIT_ID_LEVEL_8 = 44, + AD_UNIT_ID_LEVEL_9 = 46, + AD_UNIT_ID_TOP_LEVEL = 142, + AD_UNIT_NAME = 26, + AD_UNIT_NAME_ALL_LEVEL = 29, + AD_UNIT_NAME_LEVEL_1 = 31, + AD_UNIT_NAME_LEVEL_10 = 49, + AD_UNIT_NAME_LEVEL_11 = 51, + AD_UNIT_NAME_LEVEL_12 = 53, + AD_UNIT_NAME_LEVEL_13 = 55, + AD_UNIT_NAME_LEVEL_14 = 57, + AD_UNIT_NAME_LEVEL_15 = 59, + AD_UNIT_NAME_LEVEL_16 = 61, + AD_UNIT_NAME_LEVEL_2 = 33, + AD_UNIT_NAME_LEVEL_3 = 35, + AD_UNIT_NAME_LEVEL_4 = 37, + AD_UNIT_NAME_LEVEL_5 = 39, + AD_UNIT_NAME_LEVEL_6 = 41, + AD_UNIT_NAME_LEVEL_7 = 43, + AD_UNIT_NAME_LEVEL_8 = 45, + AD_UNIT_NAME_LEVEL_9 = 47, + AD_UNIT_NAME_TOP_LEVEL = 143, + AD_UNIT_REWARD_AMOUNT = 63, + AD_UNIT_REWARD_TYPE = 62, + AD_UNIT_STATUS = 206, + AD_UNIT_STATUS_NAME = 207, + AGENCY_LEVEL_1_ID = 565, + AGENCY_LEVEL_1_NAME = 566, + AGENCY_LEVEL_2_ID = 567, + AGENCY_LEVEL_2_NAME = 568, + AGENCY_LEVEL_3_ID = 569, + AGENCY_LEVEL_3_NAME = 570, + AGE_BRACKET = 508, + AGE_BRACKET_NAME = 582, + APP_TRACKING_TRANSPARENCY_CONSENT_STATUS = 442, + APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME = 443, + APP_VERSION = 392, + AUCTION_PACKAGE_DEAL = 579, + AUCTION_PACKAGE_DEAL_ID = 571, + AUDIENCE_SEGMENT_ID_TARGETED = 584, + AUDIENCE_SEGMENT_TARGETED = 585, + AUTO_REFRESHED_TRAFFIC = 421, + AUTO_REFRESHED_TRAFFIC_NAME = 422, + BIDDER_ENCRYPTED_ID = 493, + BIDDER_NAME = 494, + BID_RANGE = 679, + BID_REJECTION_REASON = 599, + BID_REJECTION_REASON_NAME = 600, + BRANDING_TYPE = 383, + BRANDING_TYPE_NAME = 384, + BROWSER_CATEGORY = 119, + BROWSER_CATEGORY_NAME = 120, + BROWSER_ID = 235, + BROWSER_NAME = 236, + BUYER_NETWORK_ID = 448, + BUYER_NETWORK_NAME = 449, + CALLOUT_STATUS_CATEGORY = 588, + CALLOUT_STATUS_CATEGORY_NAME = 589, + CARRIER_ID = 369, + CARRIER_NAME = 368, + CHANNEL = 501, + CHILD_NETWORK_CODE = 542, + CHILD_NETWORK_ID = 544, + CHILD_PARTNER_NAME = 543, + CITY_ID = 459, + CITY_NAME = 452, + CLASSIFIED_ADVERTISER_ID = 133, + CLASSIFIED_ADVERTISER_NAME = 134, + CLASSIFIED_BRAND_ID = 243, + CLASSIFIED_BRAND_NAME = 244, + CONTENT_CMS_NAME = 643, + CONTENT_CMS_VIDEO_ID = 644, + CONTENT_ID = 246, + CONTENT_MAPPING_PRESENCE = 731, + CONTENT_MAPPING_PRESENCE_NAME = 732, + CONTENT_NAME = 247, + CONTINENT = 469, + CONTINENT_NAME = 470, + COUNTRY_CODE = 466, + COUNTRY_ID = 11, + COUNTRY_NAME = 12, + CREATIVE_BILLING_TYPE = 366, + CREATIVE_BILLING_TYPE_NAME = 367, + CREATIVE_CLICK_THROUGH_URL = 174, + CREATIVE_ID = 138, + CREATIVE_NAME = 139, + CREATIVE_POLICIES_FILTERING = 711, + CREATIVE_POLICIES_FILTERING_NAME = 712, + CREATIVE_PROTECTIONS_FILTERING = 704, + CREATIVE_PROTECTIONS_FILTERING_NAME = 705, + CREATIVE_SET_ROLE_TYPE = 686, + CREATIVE_SET_ROLE_TYPE_NAME = 687, + CREATIVE_TECHNOLOGY = 148, + CREATIVE_TECHNOLOGY_NAME = 149, + CREATIVE_THIRD_PARTY_VENDOR = 361, + CREATIVE_TYPE = 344, + CREATIVE_TYPE_NAME = 345, + CREATIVE_VENDOR_ID = 706, + CREATIVE_VENDOR_NAME = 707, + CREATIVE_VIDEO_REDIRECT_THIRD_PARTY = 562, + CURATOR_ID = 572, + CURATOR_NAME = 573, + CUSTOM_EVENT_ID = 737, + CUSTOM_EVENT_NAME = 735, + CUSTOM_EVENT_TYPE = 736, + CUSTOM_EVENT_TYPE_NAME = 738, + CUSTOM_SPOT_ID = 423, + CUSTOM_SPOT_NAME = 424, + DATE = 3, + DAY_OF_WEEK = 4, + DEAL_BUYER_ID = 240, + DEAL_BUYER_NAME = 241, + DEAL_ID = 436, + DEAL_NAME = 437, + DELIVERED_SECURE_SIGNAL_ID = 309, + DELIVERED_SECURE_SIGNAL_NAME = 310, + DEMAND_CHANNEL = 9, + DEMAND_CHANNEL_NAME = 10, + DEMAND_SOURCE = 592, + DEMAND_SOURCE_NAME = 593, + DEMAND_SUBCHANNEL = 22, + DEMAND_SUBCHANNEL_NAME = 23, + DEVICE = 226, + DEVICE_CATEGORY = 15, + DEVICE_CATEGORY_NAME = 16, + DEVICE_MANUFACTURER_ID = 525, + DEVICE_MANUFACTURER_NAME = 526, + DEVICE_MODEL_ID = 527, + DEVICE_MODEL_NAME = 528, + DEVICE_NAME = 225, + DSP_SEAT_ID = 564, + DYNAMIC_ALLOCATION_TYPE = 502, + DYNAMIC_ALLOCATION_TYPE_NAME = 503, + ESP_DELIVERY = 623, + ESP_DELIVERY_NAME = 624, + ESP_PRESENCE = 625, + ESP_PRESENCE_NAME = 626, + EXCHANGE_BIDDING_DEAL_ID = 715, + EXCHANGE_BIDDING_DEAL_TYPE = 714, + EXCHANGE_BIDDING_DEAL_TYPE_NAME = 723, + EXCHANGE_THIRD_PARTY_COMPANY_ID = 185, + EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186, + FIRST_LOOK_PRICING_RULE_ID = 248, + FIRST_LOOK_PRICING_RULE_NAME = 249, + FIRST_PARTY_ID_STATUS = 404, + FIRST_PARTY_ID_STATUS_NAME = 405, + GENDER = 509, + GENDER_NAME = 583, + GOOGLE_ANALYTICS_STREAM_ID = 519, + GOOGLE_ANALYTICS_STREAM_NAME = 520, + HBT_YIELD_PARTNER_ID = 659, + HBT_YIELD_PARTNER_NAME = 660, + HEADER_BIDDER_INTEGRATION_TYPE = 718, + HEADER_BIDDER_INTEGRATION_TYPE_NAME = 719, + HOUR = 100, + IMPRESSION_COUNTING_METHOD = 577, + IMPRESSION_COUNTING_METHOD_NAME = 578, + INTERACTION_TYPE = 223, + INTERACTION_TYPE_NAME = 224, + INTEREST = 510, + INVENTORY_FORMAT = 17, + INVENTORY_FORMAT_NAME = 18, + INVENTORY_SHARE_ASSIGNMENT_ID = 648, + INVENTORY_SHARE_ASSIGNMENT_NAME = 649, + INVENTORY_SHARE_OUTCOME = 603, + INVENTORY_SHARE_OUTCOME_NAME = 604, + INVENTORY_SHARE_PARTNER_AD_SERVER = 652, + INVENTORY_SHARE_PARTNER_AD_SERVER_NAME = 653, + INVENTORY_SHARE_TARGET_SHARE_PERCENT = 654, + INVENTORY_SHARE_TYPE = 650, + INVENTORY_SHARE_TYPE_NAME = 651, + INVENTORY_TYPE = 19, + INVENTORY_TYPE_NAME = 20, + IS_ADX_DIRECT = 382, + IS_CURATION_TARGETED = 574, + IS_DROPPED = 464, + IS_FIRST_LOOK_DEAL = 401, + KEY_VALUES_ID = 214, + KEY_VALUES_NAME = 215, + LINE_ITEM_AGENCY = 663, + LINE_ITEM_ARCHIVED = 188, + LINE_ITEM_COMPANION_DELIVERY_OPTION = 204, + LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205, + LINE_ITEM_COMPUTED_STATUS = 250, + LINE_ITEM_COMPUTED_STATUS_NAME = 251, + LINE_ITEM_CONTRACTED_QUANTITY = 92, + LINE_ITEM_COST_PER_UNIT = 85, + LINE_ITEM_COST_TYPE = 212, + LINE_ITEM_COST_TYPE_NAME = 213, + LINE_ITEM_CREATIVE_END_DATE = 176, + LINE_ITEM_CREATIVE_ROTATION_TYPE = 189, + LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190, + LINE_ITEM_CREATIVE_START_DATE = 175, + LINE_ITEM_CURRENCY_CODE = 180, + LINE_ITEM_DELIVERY_INDICATOR = 87, + LINE_ITEM_DELIVERY_RATE_TYPE = 191, + LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192, + LINE_ITEM_DISCOUNT_ABSOLUTE = 195, + LINE_ITEM_DISCOUNT_PERCENTAGE = 196, + LINE_ITEM_END_DATE = 81, + LINE_ITEM_END_DATE_TIME = 83, + LINE_ITEM_ENVIRONMENT_TYPE = 201, + LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202, + LINE_ITEM_EXTERNAL_DEAL_ID = 97, + LINE_ITEM_EXTERNAL_ID = 86, + LINE_ITEM_FREQUENCY_CAP = 256, + LINE_ITEM_ID = 1, + LINE_ITEM_LABELS = 667, + LINE_ITEM_LABEL_IDS = 665, + LINE_ITEM_LAST_MODIFIED_BY_APP = 181, + LINE_ITEM_LIFETIME_CLICKS = 95, + LINE_ITEM_LIFETIME_IMPRESSIONS = 94, + LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96, + LINE_ITEM_MAKEGOOD = 89, + LINE_ITEM_NAME = 2, + LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98, + LINE_ITEM_OPTIMIZABLE = 90, + LINE_ITEM_PO_NUMBER = 669, + LINE_ITEM_PRIMARY_GOAL_TYPE = 210, + LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211, + LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93, + LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396, + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208, + LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209, + LINE_ITEM_PRIORITY = 24, + LINE_ITEM_RESERVATION_STATUS = 304, + LINE_ITEM_RESERVATION_STATUS_NAME = 305, + LINE_ITEM_SALESPERSON = 671, + LINE_ITEM_SECONDARY_SALESPEOPLE = 673, + LINE_ITEM_SECONDARY_TRAFFICKERS = 675, + LINE_ITEM_START_DATE = 82, + LINE_ITEM_START_DATE_TIME = 84, + LINE_ITEM_TRAFFICKER = 677, + LINE_ITEM_TYPE = 193, + LINE_ITEM_TYPE_NAME = 194, + LINE_ITEM_UNLIMITED_END = 187, + LINE_ITEM_VALUE_COST_PER_UNIT = 88, + LINE_ITEM_WEB_PROPERTY_CODE = 179, + MASTER_COMPANION_CREATIVE_ID = 140, + MASTER_COMPANION_CREATIVE_NAME = 141, + MEDIATION_TYPE = 701, + MEDIATION_TYPE_NAME = 754, + MEDIATION_YIELD_PARTNER_ID = 661, + MEDIATION_YIELD_PARTNER_NAME = 662, + METRO_ID = 453, + METRO_NAME = 454, + MOBILE_APP_FREE = 128, + MOBILE_APP_ICON_URL = 129, + MOBILE_APP_ID = 123, + MOBILE_APP_NAME = 127, + MOBILE_APP_OWNERSHIP_STATUS = 311, + MOBILE_APP_OWNERSHIP_STATUS_NAME = 312, + MOBILE_APP_STORE = 125, + MOBILE_APP_STORE_NAME = 245, + MOBILE_INVENTORY_TYPE = 99, + MOBILE_INVENTORY_TYPE_NAME = 21, + MOBILE_RENDERING_SDK = 646, + MOBILE_RENDERING_SDK_NAME = 647, + MOBILE_SDK_MAJOR_VERSION = 692, + MOBILE_SDK_MINOR_VERSION = 693, + MOBILE_SDK_VERSION_NAME = 130, + MONTH_YEAR = 6, + NATIVE_AD_FORMAT_ID = 255, + NATIVE_AD_FORMAT_NAME = 254, + NATIVE_STYLE_ID = 253, + NATIVE_STYLE_NAME = 252, + NO_FILL_REASON_CATEGORY = 586, + NO_FILL_REASON_CATEGORY_NAME = 587, + OPERATING_SYSTEM_CATEGORY = 117, + OPERATING_SYSTEM_CATEGORY_NAME = 118, + OPERATING_SYSTEM_VERSION_ID = 238, + OPERATING_SYSTEM_VERSION_NAME = 237, + OPTIMIZATION_TYPE = 639, + OPTIMIZATION_TYPE_NAME = 640, + ORDER_AGENCY = 150, + ORDER_AGENCY_ID = 151, + ORDER_BOOKED_CPC = 152, + ORDER_BOOKED_CPM = 153, + ORDER_DELIVERY_STATUS = 231, + ORDER_DELIVERY_STATUS_NAME = 239, + ORDER_END_DATE = 154, + ORDER_END_DATE_TIME = 155, + ORDER_EXTERNAL_ID = 156, + ORDER_ID = 7, + ORDER_LABELS = 170, + ORDER_LABEL_IDS = 171, + ORDER_LIFETIME_CLICKS = 158, + ORDER_LIFETIME_IMPRESSIONS = 159, + ORDER_NAME = 8, + ORDER_PO_NUMBER = 160, + ORDER_PROGRAMMATIC = 157, + ORDER_SALESPERSON = 161, + ORDER_SALESPERSON_ID = 629, + ORDER_SECONDARY_SALESPEOPLE = 164, + ORDER_SECONDARY_SALESPEOPLE_ID = 165, + ORDER_SECONDARY_TRAFFICKERS = 166, + ORDER_SECONDARY_TRAFFICKERS_ID = 167, + ORDER_START_DATE = 168, + ORDER_START_DATE_TIME = 169, + ORDER_TRAFFICKER = 162, + ORDER_TRAFFICKER_ID = 163, + ORDER_UNLIMITED_END = 203, + PAGE_PATH = 511, + PAGE_TITLE_AND_SCREEN_CLASS = 512, + PAGE_TITLE_AND_SCREEN_NAME = 513, + PLACEMENT_ID = 113, + PLACEMENT_ID_ALL = 144, + PLACEMENT_NAME = 114, + PLACEMENT_NAME_ALL = 145, + PLACEMENT_STATUS = 362, + PLACEMENT_STATUS_NAME = 364, + PLACEMENT_STATUS_NAME_ALL = 365, + POSTAL_CODE_ID = 455, + POSTAL_CODE_NAME = 456, + PPID_STATUS = 406, + PPID_STATUS_NAME = 407, + PREDICTED_VIEWABILITY_BUCKET = 633, + PREDICTED_VIEWABILITY_BUCKET_NAME = 634, + PRESENTED_SECURE_SIGNAL_ID = 495, + PRESENTED_SECURE_SIGNAL_NAME = 496, + PRIMARY_PERSONALIZATION_ID_TYPE = 408, + PRIMARY_PERSONALIZATION_ID_TYPE_NAME = 409, + PROGRAMMATIC_BUYER_ID = 240, + PROGRAMMATIC_BUYER_NAME = 241, + PROGRAMMATIC_CHANNEL = 13, + PROGRAMMATIC_CHANNEL_NAME = 14, + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE = 410, + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS = 546, + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME = 412, + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER = 413, + PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE = 414, + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE = 425, + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS = 545, + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME = 427, + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER = 428, + PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE = 429, + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE = 415, + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID = 416, + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME = 417, + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER = 418, + PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE = 419, + PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID = 136, + PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME = 137, + REGION_ID = 457, + REGION_NAME = 458, + REJECTION_CLASS_CATEGORY = 590, + REJECTION_CLASS_CATEGORY_NAME = 591, + RENDERED_CREATIVE_SIZE = 343, + REQUESTED_AD_SIZES = 352, + REQUEST_TYPE = 146, + REQUEST_TYPE_NAME = 147, + SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597, + SERVING_RESTRICTION = 631, + SERVING_RESTRICTION_NAME = 632, + SITE = 387, + TARGETING_ID = 232, + TARGETING_NAME = 233, + TARGETING_TYPE = 385, + TARGETING_TYPE_NAME = 386, + THIRD_PARTY_ID_STATUS = 402, + THIRD_PARTY_ID_STATUS_NAME = 403, + TOPICS_STATUS = 504, + TOPICS_STATUS_NAME = 505, + TOP_PRIVATE_DOMAIN = 444, + TRAFFIC_SOURCE = 388, + TRAFFIC_SOURCE_NAME = 389, + UNIFIED_PRICING_RULE_ID = 393, + UNIFIED_PRICING_RULE_NAME = 394, + URL = 506, + URL_ID = 507, + USER_MESSAGES_ENTITLEMENT_SOURCE = 635, + USER_MESSAGES_ENTITLEMENT_SOURCE_NAME = 636, + USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID = 637, + USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME = 638, + VAST_VERSION = 554, + VAST_VERSION_NAME = 555, + VIDEO_AD_BREAK_TYPE = 556, + VIDEO_AD_BREAK_TYPE_NAME = 557, + VIDEO_AD_DURATION = 450, + VIDEO_AD_FORMATS_RULE = 561, + VIDEO_AD_FORMATS_RULE_ID = 560, + VIDEO_AD_REQUEST_DURATION = 558, + VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME = 751, + VIDEO_AD_REQUEST_DURATION_NAME = 559, + VIDEO_AD_REQUEST_SOURCE = 438, + VIDEO_AD_REQUEST_SOURCE_NAME = 439, + VIDEO_AD_TYPE = 432, + VIDEO_AD_TYPE_NAME = 433, + VIDEO_CONTINUOUS_PLAY_TYPE = 721, + VIDEO_CONTINUOUS_PLAY_TYPE_NAME = 722, + VIDEO_FALLBACK_POSITION = 530, + VIDEO_MEASUREMENT_SOURCE = 601, + VIDEO_MEASUREMENT_SOURCE_NAME = 602, + VIDEO_PLCMT = 172, + VIDEO_PLCMT_NAME = 173, + VIDEO_POSITION_IN_POD = 538, + VIDEO_POSITION_OF_POD = 539, + VIDEO_SDK_VERSION = 440, + VIDEO_SDK_VERSION_NAME = 441, + VIDEO_STITCHER_TYPE = 752, + VIDEO_STITCHER_TYPE_NAME = 753, + WEEK = 5, + YIELD_GROUP_BUYER_NAME = 184, + YIELD_GROUP_BUYER_TAG_NAME = 627, + YIELD_GROUP_ID = 182, + YIELD_GROUP_NAME = 183, + YOUTUBE_AD_DURATION_BUCKET = 430, + YOUTUBE_AD_DURATION_BUCKET_NAME = 431, + YOUTUBE_AD_TYPE = 399, + YOUTUBE_AD_TYPE_NAME = 400, + LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000, + LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001, + LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002, + LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003, + LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004, + LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005, + LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006, + LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007, + LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008, + LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009, + LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010, + LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011, + LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012, + LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013, + LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014, + LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000, + LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001, + LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002, + LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003, + LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004, + LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005, + LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006, + LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007, + LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008, + LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009, + LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010, + LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011, + LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012, + LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013, + LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014, + ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000, + ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001, + ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002, + ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003, + ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004, + ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005, + ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006, + ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007, + ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008, + ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009, + ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010, + ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011, + ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012, + ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013, + ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014, + ORDER_CUSTOM_FIELD_0_VALUE = 13000, + ORDER_CUSTOM_FIELD_1_VALUE = 13001, + ORDER_CUSTOM_FIELD_2_VALUE = 13002, + ORDER_CUSTOM_FIELD_3_VALUE = 13003, + ORDER_CUSTOM_FIELD_4_VALUE = 13004, + ORDER_CUSTOM_FIELD_5_VALUE = 13005, + ORDER_CUSTOM_FIELD_6_VALUE = 13006, + ORDER_CUSTOM_FIELD_7_VALUE = 13007, + ORDER_CUSTOM_FIELD_8_VALUE = 13008, + ORDER_CUSTOM_FIELD_9_VALUE = 13009, + ORDER_CUSTOM_FIELD_10_VALUE = 13010, + ORDER_CUSTOM_FIELD_11_VALUE = 13011, + ORDER_CUSTOM_FIELD_12_VALUE = 13012, + ORDER_CUSTOM_FIELD_13_VALUE = 13013, + ORDER_CUSTOM_FIELD_14_VALUE = 13014, + CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000, + CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001, + CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002, + CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003, + CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004, + CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005, + CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006, + CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007, + CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008, + CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009, + CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010, + CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011, + CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012, + CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013, + CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014, + CREATIVE_CUSTOM_FIELD_0_VALUE = 15000, + CREATIVE_CUSTOM_FIELD_1_VALUE = 15001, + CREATIVE_CUSTOM_FIELD_2_VALUE = 15002, + CREATIVE_CUSTOM_FIELD_3_VALUE = 15003, + CREATIVE_CUSTOM_FIELD_4_VALUE = 15004, + CREATIVE_CUSTOM_FIELD_5_VALUE = 15005, + CREATIVE_CUSTOM_FIELD_6_VALUE = 15006, + CREATIVE_CUSTOM_FIELD_7_VALUE = 15007, + CREATIVE_CUSTOM_FIELD_8_VALUE = 15008, + CREATIVE_CUSTOM_FIELD_9_VALUE = 15009, + CREATIVE_CUSTOM_FIELD_10_VALUE = 15010, + CREATIVE_CUSTOM_FIELD_11_VALUE = 15011, + CREATIVE_CUSTOM_FIELD_12_VALUE = 15012, + CREATIVE_CUSTOM_FIELD_13_VALUE = 15013, + CREATIVE_CUSTOM_FIELD_14_VALUE = 15014, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013, + BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014, + BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000, + BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001, + BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002, + BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003, + BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004, + BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005, + BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006, + BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007, + BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008, + BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009, + BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010, + BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011, + BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012, + BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013, + BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014, + BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000, + BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001, + BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002, + BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003, + BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004, + BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005, + BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006, + BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007, + BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008, + BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009, + BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010, + BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011, + BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012, + BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013, + BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014, + BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000, + BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001, + BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002, + BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003, + BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004, + BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005, + BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006, + BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007, + BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008, + BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009, + BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010, + BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011, + BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012, + BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013, + BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014, + BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000, + BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001, + BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002, + BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003, + BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004, + BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005, + BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006, + BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007, + BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008, + BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009, + BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010, + BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011, + BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012, + BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013, + BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014, + CUSTOM_DIMENSION_0_VALUE_ID = 100000, + CUSTOM_DIMENSION_1_VALUE_ID = 100001, + CUSTOM_DIMENSION_2_VALUE_ID = 100002, + CUSTOM_DIMENSION_3_VALUE_ID = 100003, + CUSTOM_DIMENSION_4_VALUE_ID = 100004, CUSTOM_DIMENSION_5_VALUE_ID = 100005, CUSTOM_DIMENSION_6_VALUE_ID = 100006, CUSTOM_DIMENSION_7_VALUE_ID = 100007, @@ -19843,3448 +34249,8178 @@ export namespace google { CUSTOM_DIMENSION_9_VALUE = 101009 } - /** Metric enum. */ - enum Metric { - METRIC_UNSPECIFIED = 0, - ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61, - ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58, - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57, - ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60, - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56, - ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59, - ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73, - ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70, - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69, - ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72, - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68, - ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71, - ADSENSE_AVERAGE_ECPM = 26, - ADSENSE_CLICKS = 23, - ADSENSE_CTR = 24, - ADSENSE_IMPRESSIONS = 22, - ADSENSE_PERCENT_CLICKS = 28, - ADSENSE_PERCENT_IMPRESSIONS = 27, - ADSENSE_PERCENT_REVENUE = 29, - ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30, - ADSENSE_RESPONSES_SERVED = 41, - ADSENSE_REVENUE = 25, - AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79, - AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76, - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75, - AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78, - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74, - AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77, - AD_EXCHANGE_AVERAGE_ECPM = 18, - AD_EXCHANGE_CLICKS = 15, - AD_EXCHANGE_CTR = 16, - AD_EXCHANGE_IMPRESSIONS = 14, - AD_EXCHANGE_PERCENT_CLICKS = 20, - AD_EXCHANGE_PERCENT_IMPRESSIONS = 19, - AD_EXCHANGE_PERCENT_REVENUE = 21, - AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31, - AD_EXCHANGE_RESPONSES_SERVED = 42, - AD_EXCHANGE_REVENUE = 17, - AD_REQUESTS = 38, - AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67, - AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64, - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63, - AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66, - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62, - AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65, - AD_SERVER_AVERAGE_ECPM = 34, - AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10, - AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262, - AD_SERVER_CLICKS = 7, - AD_SERVER_CPD_REVENUE = 32, - AD_SERVER_CTR = 8, - AD_SERVER_IMPRESSIONS = 6, - AD_SERVER_PERCENT_CLICKS = 12, - AD_SERVER_PERCENT_IMPRESSIONS = 11, - AD_SERVER_PERCENT_REVENUE = 35, - AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13, - AD_SERVER_RESPONSES_SERVED = 40, - AD_SERVER_REVENUE = 33, - AD_SERVER_REVENUE_WITHOUT_CPD = 9, - AD_SERVER_TRACKED_ADS = 264, - AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261, - AD_SERVER_UNFILTERED_CLICKS = 259, - AD_SERVER_UNFILTERED_IMPRESSIONS = 260, - AD_SERVER_UNFILTERED_TRACKED_ADS = 263, - AVERAGE_ECPM = 37, - AVERAGE_ECPM_WITHOUT_CPD = 5, - CLICKS = 2, - CODE_SERVED_COUNT = 44, - CTR = 3, - GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129, - GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128, - GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131, - GOOGLE_SOLD_IMPRESSIONS = 130, - GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127, - GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126, - IMPRESSIONS = 1, - PARTNER_SALES_FILLED_POD_REQUESTS = 135, - PARTNER_SALES_FILL_RATE = 136, - PARTNER_SALES_PARTNER_MATCH_RATE = 137, - PARTNER_SALES_QUERIES = 132, - PARTNER_SALES_UNFILLED_IMPRESSIONS = 133, - PARTNER_SALES_UNMATCHED_QUERIES = 134, - PARTNER_SOLD_CODE_SERVED = 125, - PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124, - PARTNER_SOLD_IMPRESSIONS = 123, - PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177, - PROGRAMMATIC_MATCH_RATE = 178, - PROGRAMMATIC_RESPONSES_SERVED = 176, - RESPONSES_SERVED = 39, - REVENUE = 36, - REVENUE_WITHOUT_CPD = 4, - SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434, - SERVER_SIDE_UNWRAPPING_CALLOUTS = 435, - SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436, - SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437, - SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438, - SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439, - UNFILLED_IMPRESSIONS = 45, - UNMATCHED_AD_REQUESTS = 43, - USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121, - USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122, - VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92, - VIDEO_INTERACTION_COLLAPSES = 93, - VIDEO_INTERACTION_EXPANDS = 95, - VIDEO_INTERACTION_FULL_SCREENS = 96, - VIDEO_INTERACTION_MUTES = 97, - VIDEO_INTERACTION_PAUSES = 98, - VIDEO_INTERACTION_RESUMES = 99, - VIDEO_INTERACTION_REWINDS = 100, - VIDEO_INTERACTION_UNMUTES = 101, - VIDEO_INTERACTION_VIDEO_SKIPS = 102, - VIDEO_REAL_TIME_CREATIVE_SERVES = 139, - VIDEO_REAL_TIME_ERROR_100_COUNT = 143, - VIDEO_REAL_TIME_ERROR_101_COUNT = 144, - VIDEO_REAL_TIME_ERROR_102_COUNT = 145, - VIDEO_REAL_TIME_ERROR_200_COUNT = 146, - VIDEO_REAL_TIME_ERROR_201_COUNT = 147, - VIDEO_REAL_TIME_ERROR_202_COUNT = 148, - VIDEO_REAL_TIME_ERROR_203_COUNT = 149, - VIDEO_REAL_TIME_ERROR_300_COUNT = 150, - VIDEO_REAL_TIME_ERROR_301_COUNT = 151, - VIDEO_REAL_TIME_ERROR_302_COUNT = 152, - VIDEO_REAL_TIME_ERROR_303_COUNT = 153, - VIDEO_REAL_TIME_ERROR_400_COUNT = 154, - VIDEO_REAL_TIME_ERROR_401_COUNT = 155, - VIDEO_REAL_TIME_ERROR_402_COUNT = 156, - VIDEO_REAL_TIME_ERROR_403_COUNT = 157, - VIDEO_REAL_TIME_ERROR_405_COUNT = 158, - VIDEO_REAL_TIME_ERROR_406_COUNT = 159, - VIDEO_REAL_TIME_ERROR_407_COUNT = 160, - VIDEO_REAL_TIME_ERROR_408_COUNT = 161, - VIDEO_REAL_TIME_ERROR_409_COUNT = 162, - VIDEO_REAL_TIME_ERROR_410_COUNT = 163, - VIDEO_REAL_TIME_ERROR_500_COUNT = 164, - VIDEO_REAL_TIME_ERROR_501_COUNT = 165, - VIDEO_REAL_TIME_ERROR_502_COUNT = 166, - VIDEO_REAL_TIME_ERROR_503_COUNT = 167, - VIDEO_REAL_TIME_ERROR_600_COUNT = 168, - VIDEO_REAL_TIME_ERROR_601_COUNT = 169, - VIDEO_REAL_TIME_ERROR_602_COUNT = 170, - VIDEO_REAL_TIME_ERROR_603_COUNT = 171, - VIDEO_REAL_TIME_ERROR_604_COUNT = 172, - VIDEO_REAL_TIME_ERROR_900_COUNT = 173, - VIDEO_REAL_TIME_ERROR_901_COUNT = 174, - VIDEO_REAL_TIME_IMPRESSIONS = 138, - VIDEO_REAL_TIME_MATCHED_QUERIES = 140, - VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175, - VIDEO_REAL_TIME_TOTAL_QUERIES = 142, - VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141, - VIDEO_VIEWERSHIP_AUTO_PLAYS = 103, - VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104, - VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105, - VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106, - VIDEO_VIEWERSHIP_COMPLETES = 107, - VIDEO_VIEWERSHIP_COMPLETION_RATE = 108, - VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109, - VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110, - VIDEO_VIEWERSHIP_MIDPOINTS = 111, - VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112, - VIDEO_VIEWERSHIP_STARTS = 113, - VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114, - VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115, - VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94, - VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116, - VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117, - YIELD_GROUP_AUCTIONS_WON = 80, - YIELD_GROUP_BIDS = 81, - YIELD_GROUP_BIDS_IN_AUCTION = 82, - YIELD_GROUP_CALLOUTS = 83, - YIELD_GROUP_ESTIMATED_CPM = 88, - YIELD_GROUP_ESTIMATED_REVENUE = 87, - YIELD_GROUP_IMPRESSIONS = 85, - YIELD_GROUP_MEDIATION_FILL_RATE = 89, - YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86, - YIELD_GROUP_MEDIATION_PASSBACKS = 118, - YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90, - YIELD_GROUP_SUCCESSFUL_RESPONSES = 84 - } + /** Metric enum. */ + enum Metric { + METRIC_UNSPECIFIED = 0, + ACTIVE_USERS = 223, + ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT = 445, + ACTIVE_VIEW_AUDIBLE_IMPRESSIONS = 659, + ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT = 446, + ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT = 447, + ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT = 448, + ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT = 449, + ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS = 660, + ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS = 661, + ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61, + ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58, + ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT = 450, + ACTIVE_VIEW_EVER_AUDIBLE_PERCENT = 451, + ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT = 452, + ACTIVE_VIEW_EVER_MUTED_PERCENT = 453, + ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION = 411, + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57, + ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60, + ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 662, + ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 663, + ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 664, + ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS = 665, + ACTIVE_VIEW_PLUS_MEASURABLE_COUNT = 454, + ACTIVE_VIEW_REVENUE = 414, + ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 666, + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56, + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 667, + ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59, + ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73, + ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70, + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69, + ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72, + ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 642, + ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 643, + ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 644, + ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 645, + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68, + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 646, + ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71, + ADSENSE_AVERAGE_ECPM = 26, + ADSENSE_CLICKS = 23, + ADSENSE_CTR = 24, + ADSENSE_IMPRESSIONS = 22, + ADSENSE_PERCENT_CLICKS = 28, + ADSENSE_PERCENT_IMPRESSIONS = 27, + ADSENSE_PERCENT_REVENUE = 29, + ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30, + ADSENSE_RESPONSES_SERVED = 41, + ADSENSE_REVENUE = 25, + AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79, + AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76, + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75, + AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78, + AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 654, + AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 655, + AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 656, + AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 657, + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74, + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 658, + AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77, + AD_EXCHANGE_AVERAGE_ECPM = 18, + AD_EXCHANGE_CLICKS = 15, + AD_EXCHANGE_CPC = 244, + AD_EXCHANGE_CTR = 16, + AD_EXCHANGE_DELIVERY_RATE = 245, + AD_EXCHANGE_IMPRESSIONS = 14, + AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER = 427, + AD_EXCHANGE_IMPRESSIONS_PER_SESSION = 428, + AD_EXCHANGE_LIFT = 246, + AD_EXCHANGE_MATCHED_REQUEST_CTR = 247, + AD_EXCHANGE_MATCHED_REQUEST_ECPM = 248, + AD_EXCHANGE_MATCH_RATE = 249, + AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS = 250, + AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS = 251, + AD_EXCHANGE_PERCENT_CLICKS = 20, + AD_EXCHANGE_PERCENT_IMPRESSIONS = 19, + AD_EXCHANGE_PERCENT_REVENUE = 21, + AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31, + AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM = 252, + AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS = 253, + AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE = 254, + AD_EXCHANGE_RESPONSES_SERVED = 42, + AD_EXCHANGE_REVENUE = 17, + AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 212, + AD_EXCHANGE_REVENUE_PER_AD_VIEWER = 429, + AD_EXCHANGE_TOTAL_REQUESTS = 255, + AD_EXCHANGE_TOTAL_REQUEST_CTR = 256, + AD_EXCHANGE_TOTAL_REQUEST_ECPM = 257, + AD_EXPOSURE_SECONDS = 241, + AD_REQUESTS = 38, + AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67, + AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64, + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63, + AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66, + AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 332, + AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 331, + AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 334, + AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 335, + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62, + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 333, + AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65, + AD_SERVER_AVERAGE_ECPM = 34, + AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10, + AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262, + AD_SERVER_CLICKS = 7, + AD_SERVER_COMPLETED_VIEWS = 431, + AD_SERVER_COVIEWED_IMPRESSIONS = 554, + AD_SERVER_CPD_REVENUE = 32, + AD_SERVER_CTR = 8, + AD_SERVER_GROSS_REVENUE = 483, + AD_SERVER_GROSS_REVENUE_WITHOUT_CPD = 484, + AD_SERVER_IMPRESSIONS = 6, + AD_SERVER_IMPRESSIONS_WITH_COMPANION = 222, + AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 338, + AD_SERVER_PERCENT_CLICKS = 12, + AD_SERVER_PERCENT_IMPRESSIONS = 11, + AD_SERVER_PERCENT_REVENUE = 35, + AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13, + AD_SERVER_RESPONSES_SERVED = 40, + AD_SERVER_REVENUE = 33, + AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 213, + AD_SERVER_REVENUE_WITHOUT_CPD = 9, + AD_SERVER_TARGETED_CLICKS = 274, + AD_SERVER_TARGETED_IMPRESSIONS = 275, + AD_SERVER_TRACKED_ADS = 264, + AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261, + AD_SERVER_UNFILTERED_CLICKS = 259, + AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS = 260, + AD_SERVER_UNFILTERED_IMPRESSIONS = 260, + AD_SERVER_UNFILTERED_TRACKED_ADS = 263, + AD_UNIT_EXPOSURE_SECONDS = 242, + AD_VIEWERS = 425, + ATN_ADS_FAILED_TO_RENDER = 430, + ATN_ELIGIBLE_LINE_ITEMS = 342, + ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS = 343, + ATN_HBT_ALLOWED_AD_REQUESTS = 344, + ATN_HBT_BIDS_IN_AUCTION = 345, + ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS = 346, + ATN_HBT_CANDIDATE_BIDS = 347, + ATN_HBT_INVALID_AD_REQUESTS = 348, + ATN_HBT_NO_BIDS_AD_REQUESTS = 472, + ATN_HBT_REJECTED_BIDS = 349, + ATN_HBT_VALID_AD_REQUESTS = 350, + ATN_HBT_WITH_BIDS_AD_REQUESTS = 473, + ATN_INVALID_AD_REQUESTS = 351, + ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED = 476, + ATN_LINE_ITEMS_IN_AUCTION = 352, + ATN_LINE_ITEMS_NOT_COMPETING = 515, + ATN_LINE_ITEMS_NOT_SELECTED = 353, + ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS = 354, + ATN_LINE_ITEM_TARGETED_AD_REQUESTS = 355, + ATN_MEDIATION_ALLOWED_AD_REQUESTS = 356, + ATN_MEDIATION_INVALID_AD_REQUESTS = 357, + ATN_MEDIATION_LOADED_ADS_FROM_CHAINS = 358, + ATN_MEDIATION_NO_PARTNER_AD_REQUESTS = 474, + ATN_MEDIATION_PARTNERS_IN_AUCTION = 359, + ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS = 360, + ATN_MEDIATION_REJECTED_PARTNERS = 361, + ATN_MEDIATION_TARGETED_PARTNERS = 362, + ATN_MEDIATION_TOTAL_YIELD_PARTNERS = 442, + ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS = 363, + ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS = 364, + ATN_MEDIATION_VALID_AD_REQUESTS = 365, + ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS = 475, + ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS = 366, + ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT = 367, + ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS = 368, + ATN_PROGRAMMATIC_BIDS_IN_AUCTION = 369, + ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS = 370, + ATN_PROGRAMMATIC_BID_REQUESTS_SENT = 371, + ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE = 372, + ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES = 373, + ATN_PROGRAMMATIC_BID_REQUEST_ERRORS = 374, + ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS = 375, + ATN_PROGRAMMATIC_REJECTED_BIDS = 376, + ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS = 377, + ATN_PROGRAMMATIC_TOTAL_BIDS = 378, + ATN_PROGRAMMATIC_VALID_AD_REQUESTS = 379, + ATN_REJECTED_LINE_ITEMS = 380, + ATN_SERVED_MEDIATION_CHAINS = 381, + ATN_SERVED_SINGLE_ADS = 382, + ATN_TARGETED_LINE_ITEMS = 383, + ATN_TOTAL_AD_REQUESTS = 384, + ATN_TOTAL_COMPETING_ADS_IN_AUCTION = 385, + ATN_TOTAL_LOADED_ADS = 387, + ATN_VALID_AD_REQUESTS = 389, + ATN_YIELD_GROUP_MEDIATION_PASSBACKS = 390, + AVERAGE_ECPM = 37, + AVERAGE_ECPM_WITHOUT_CPD = 5, + AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION = 224, + AVERAGE_ENGAGEMENT_SECONDS_PER_USER = 225, + AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR = 418, + AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER = 226, + AVERAGE_REVENUE_PER_USER = 227, + AVERAGE_SESSION_SECONDS = 228, + BIDS = 443, + BID_AVERAGE_CPM = 444, + BOUNCE_RATE = 433, + CLICKS = 2, + CODE_SERVED_COUNT = 44, + CPC_REVENUE = 440, + CPM_REVENUE = 441, + CREATIVE_LOAD_TIME_0_500_PERCENT = 324, + CREATIVE_LOAD_TIME_1000_2000_PERCENT = 326, + CREATIVE_LOAD_TIME_2000_4000_PERCENT = 327, + CREATIVE_LOAD_TIME_4000_8000_PERCENT = 328, + CREATIVE_LOAD_TIME_500_1000_PERCENT = 325, + CREATIVE_LOAD_TIME_GT_8000_PERCENT = 329, + CTR = 3, + DEALS_BIDS = 542, + DEALS_BID_RATE = 543, + DEALS_BID_REQUESTS = 544, + DEALS_WINNING_BIDS = 545, + DEALS_WIN_RATE = 546, + DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 521, + DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 522, + DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 523, + DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 524, + DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 525, + DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 520, + DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT = 526, + DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT = 527, + DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT = 528, + DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT = 529, + DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT = 531, + DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT = 530, + DROPOFF_RATE = 415, + ENGAGED_SESSIONS = 229, + ENGAGED_SESSIONS_PER_USER = 230, + ENGAGEMENT_RATE = 426, + EUROPEAN_REGULATIONS_CONSENT_RATE = 270, + EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE = 271, + EUROPEAN_REGULATIONS_MESSAGES_SHOWN = 272, + EUROPEAN_REGULATIONS_NO_CONSENT_RATE = 273, + FILL_RATE = 258, + GOOGLE_ANALYTICS_CLICKS = 231, + GOOGLE_ANALYTICS_CTR = 232, + GOOGLE_ANALYTICS_ECPM = 233, + GOOGLE_ANALYTICS_IMPRESSIONS = 234, + GOOGLE_ANALYTICS_REVENUE = 235, + GOOGLE_ANALYTICS_VIEWS = 236, + GOOGLE_ANALYTICS_VIEWS_PER_USER = 237, + GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129, + GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128, + GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131, + GOOGLE_SOLD_IMPRESSIONS = 130, + GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127, + GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126, + IMPRESSIONS = 1, + INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 407, + INVENTORY_SHARES = 547, + INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES = 548, + INVOICED_IMPRESSIONS = 404, + INVOICED_UNFILLED_IMPRESSIONS = 405, + MEDIATION_CHAINS_FILLED = 584, + MUTED_IMPRESSIONS = 412, + MUTE_ELIGIBLE_IMPRESSIONS = 409, + OPPORTUNITIES = 463, + OVERDELIVERED_IMPRESSIONS = 432, + PARTNER_SALES_FILLED_POD_REQUESTS = 135, + PARTNER_SALES_FILL_RATE = 136, + PARTNER_SALES_PARTNER_MATCH_RATE = 137, + PARTNER_SALES_QUERIES = 132, + PARTNER_SALES_UNFILLED_IMPRESSIONS = 133, + PARTNER_SALES_UNMATCHED_QUERIES = 134, + PARTNER_SOLD_CODE_SERVED = 125, + PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124, + PARTNER_SOLD_IMPRESSIONS = 123, + PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177, + PROGRAMMATIC_MATCH_RATE = 178, + PROGRAMMATIC_RESPONSES_SERVED = 176, + REACH_IMPRESSIONS = 416, + RESPONSES_SERVED = 39, + RETENTION = 238, + REVENUE = 36, + REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 214, + REVENUE_WITHOUT_CPD = 4, + REWARDS_GRANTED = 413, + RICH_MEDIA_AVERAGE_DISPLAY_TIME = 587, + RICH_MEDIA_AVERAGE_INTERACTION_TIME = 588, + RICH_MEDIA_BACKUP_IMAGES = 589, + RICH_MEDIA_CUSTOM_EVENT_COUNT = 599, + RICH_MEDIA_CUSTOM_EVENT_TIME = 600, + RICH_MEDIA_DISPLAY_TIME = 590, + RICH_MEDIA_EXPANDING_TIME = 591, + RICH_MEDIA_EXPANSIONS = 592, + RICH_MEDIA_FULL_SCREEN_IMPRESSIONS = 593, + RICH_MEDIA_INTERACTION_COUNT = 594, + RICH_MEDIA_INTERACTION_RATE = 595, + RICH_MEDIA_INTERACTION_TIME = 596, + RICH_MEDIA_INTERACTIVE_IMPRESSIONS = 597, + RICH_MEDIA_MANUAL_CLOSES = 598, + RICH_MEDIA_VIDEO_COMPLETES = 503, + RICH_MEDIA_VIDEO_INTERACTIONS = 505, + RICH_MEDIA_VIDEO_INTERACTION_RATE = 504, + RICH_MEDIA_VIDEO_MIDPOINTS = 506, + RICH_MEDIA_VIDEO_MUTES = 507, + RICH_MEDIA_VIDEO_PAUSES = 508, + RICH_MEDIA_VIDEO_PLAYS = 509, + RICH_MEDIA_VIDEO_REPLAYS = 510, + RICH_MEDIA_VIDEO_STOPS = 511, + RICH_MEDIA_VIDEO_UNMUTES = 512, + RICH_MEDIA_VIDEO_VIEW_RATE = 513, + RICH_MEDIA_VIDEO_VIEW_TIME = 514, + SELL_THROUGH_AVAILABLE_IMPRESSIONS = 477, + SELL_THROUGH_FORECASTED_IMPRESSIONS = 478, + SELL_THROUGH_RESERVED_IMPRESSIONS = 479, + SELL_THROUGH_SELL_THROUGH_RATE = 480, + SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434, + SERVER_SIDE_UNWRAPPING_CALLOUTS = 435, + SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436, + SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437, + SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438, + SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439, + SESSIONS = 239, + TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 455, + TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 457, + TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 458, + TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 459, + TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 456, + TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 460, + TARGETED_CLICKS = 276, + TARGETED_IMPRESSIONS = 277, + UNFILLED_IMPRESSIONS = 45, + UNIQUE_VISITORS = 417, + UNLOADED_IMPRESSIONS_DUE_TO_CPU = 408, + UNLOADED_IMPRESSIONS_DUE_TO_NETWORK = 406, + UNMATCHED_AD_REQUESTS = 43, + UNVIEWED_REASON_OTHER_PERCENT = 550, + UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT = 553, + UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT = 551, + UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT = 552, + UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT = 549, + USER_ENGAGEMENT_DURATION_IN_SECONDS = 240, + USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE = 486, + USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT = 487, + USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN = 488, + USER_MESSAGES_ALLOW_ADS_PAGEVIEWS = 489, + USER_MESSAGES_CCPA_MESSAGES_SHOWN = 490, + USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN = 491, + USER_MESSAGES_IDFA_ATT_CONSENT = 492, + USER_MESSAGES_IDFA_ATT_CONSENT_RATE = 493, + USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT = 494, + USER_MESSAGES_IDFA_ATT_DECLINE_RATE = 495, + USER_MESSAGES_IDFA_EXPLAINERS_SHOWN = 496, + USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN = 497, + USER_MESSAGES_IDFA_NO_DECISION = 498, + USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121, + USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122, + USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS = 499, + USER_MESSAGES_TOTAL_ESTIMATED_REVENUE = 500, + USER_MESSAGES_UPTC_MESSAGES_SHOWN = 501, + USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO = 502, + VIDEO_ERROR_100_COUNT = 180, + VIDEO_ERROR_101_COUNT = 181, + VIDEO_ERROR_102_COUNT = 182, + VIDEO_ERROR_200_COUNT = 183, + VIDEO_ERROR_201_COUNT = 184, + VIDEO_ERROR_202_COUNT = 185, + VIDEO_ERROR_203_COUNT = 186, + VIDEO_ERROR_300_COUNT = 187, + VIDEO_ERROR_301_COUNT = 188, + VIDEO_ERROR_302_COUNT = 189, + VIDEO_ERROR_303_COUNT = 190, + VIDEO_ERROR_400_COUNT = 191, + VIDEO_ERROR_401_COUNT = 192, + VIDEO_ERROR_402_COUNT = 193, + VIDEO_ERROR_403_COUNT = 194, + VIDEO_ERROR_405_COUNT = 195, + VIDEO_ERROR_406_COUNT = 196, + VIDEO_ERROR_407_COUNT = 197, + VIDEO_ERROR_408_COUNT = 198, + VIDEO_ERROR_409_COUNT = 199, + VIDEO_ERROR_410_COUNT = 200, + VIDEO_ERROR_500_COUNT = 201, + VIDEO_ERROR_501_COUNT = 202, + VIDEO_ERROR_502_COUNT = 203, + VIDEO_ERROR_503_COUNT = 204, + VIDEO_ERROR_600_COUNT = 205, + VIDEO_ERROR_601_COUNT = 206, + VIDEO_ERROR_602_COUNT = 207, + VIDEO_ERROR_603_COUNT = 208, + VIDEO_ERROR_604_COUNT = 209, + VIDEO_ERROR_900_COUNT = 210, + VIDEO_ERROR_901_COUNT = 211, + VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92, + VIDEO_INTERACTION_COLLAPSES = 93, + VIDEO_INTERACTION_EXPANDS = 95, + VIDEO_INTERACTION_FULL_SCREENS = 96, + VIDEO_INTERACTION_MUTES = 97, + VIDEO_INTERACTION_PAUSES = 98, + VIDEO_INTERACTION_RESUMES = 99, + VIDEO_INTERACTION_REWINDS = 100, + VIDEO_INTERACTION_UNMUTES = 101, + VIDEO_INTERACTION_VIDEO_SKIPS = 102, + VIDEO_MONETIZABLE_CONTENT_VIEWS = 601, + VIDEO_REAL_TIME_CREATIVE_SERVES = 139, + VIDEO_REAL_TIME_ERROR_100_COUNT = 143, + VIDEO_REAL_TIME_ERROR_101_COUNT = 144, + VIDEO_REAL_TIME_ERROR_102_COUNT = 145, + VIDEO_REAL_TIME_ERROR_200_COUNT = 146, + VIDEO_REAL_TIME_ERROR_201_COUNT = 147, + VIDEO_REAL_TIME_ERROR_202_COUNT = 148, + VIDEO_REAL_TIME_ERROR_203_COUNT = 149, + VIDEO_REAL_TIME_ERROR_300_COUNT = 150, + VIDEO_REAL_TIME_ERROR_301_COUNT = 151, + VIDEO_REAL_TIME_ERROR_302_COUNT = 152, + VIDEO_REAL_TIME_ERROR_303_COUNT = 153, + VIDEO_REAL_TIME_ERROR_400_COUNT = 154, + VIDEO_REAL_TIME_ERROR_401_COUNT = 155, + VIDEO_REAL_TIME_ERROR_402_COUNT = 156, + VIDEO_REAL_TIME_ERROR_403_COUNT = 157, + VIDEO_REAL_TIME_ERROR_405_COUNT = 158, + VIDEO_REAL_TIME_ERROR_406_COUNT = 159, + VIDEO_REAL_TIME_ERROR_407_COUNT = 160, + VIDEO_REAL_TIME_ERROR_408_COUNT = 161, + VIDEO_REAL_TIME_ERROR_409_COUNT = 162, + VIDEO_REAL_TIME_ERROR_410_COUNT = 163, + VIDEO_REAL_TIME_ERROR_500_COUNT = 164, + VIDEO_REAL_TIME_ERROR_501_COUNT = 165, + VIDEO_REAL_TIME_ERROR_502_COUNT = 166, + VIDEO_REAL_TIME_ERROR_503_COUNT = 167, + VIDEO_REAL_TIME_ERROR_600_COUNT = 168, + VIDEO_REAL_TIME_ERROR_601_COUNT = 169, + VIDEO_REAL_TIME_ERROR_602_COUNT = 170, + VIDEO_REAL_TIME_ERROR_603_COUNT = 171, + VIDEO_REAL_TIME_ERROR_604_COUNT = 172, + VIDEO_REAL_TIME_ERROR_900_COUNT = 173, + VIDEO_REAL_TIME_ERROR_901_COUNT = 174, + VIDEO_REAL_TIME_IMPRESSIONS = 138, + VIDEO_REAL_TIME_MATCHED_QUERIES = 140, + VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175, + VIDEO_REAL_TIME_TOTAL_QUERIES = 142, + VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141, + VIDEO_VIEWERSHIP_AUTO_PLAYS = 103, + VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104, + VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105, + VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106, + VIDEO_VIEWERSHIP_COMPLETES = 107, + VIDEO_VIEWERSHIP_COMPLETION_RATE = 108, + VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109, + VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110, + VIDEO_VIEWERSHIP_MIDPOINTS = 111, + VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112, + VIDEO_VIEWERSHIP_STARTS = 113, + VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114, + VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115, + VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94, + VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116, + VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117, + YIELD_GROUP_AUCTIONS_WON = 80, + YIELD_GROUP_BIDS = 81, + YIELD_GROUP_BIDS_IN_AUCTION = 82, + YIELD_GROUP_CALLOUTS = 83, + YIELD_GROUP_ESTIMATED_CPM = 88, + YIELD_GROUP_ESTIMATED_REVENUE = 87, + YIELD_GROUP_IMPRESSIONS = 85, + YIELD_GROUP_MEDIATION_FILL_RATE = 89, + YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86, + YIELD_GROUP_MEDIATION_PASSBACKS = 118, + YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90, + YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 215, + YIELD_GROUP_SUCCESSFUL_RESPONSES = 84 + } + + /** TimePeriodColumn enum. */ + enum TimePeriodColumn { + TIME_PERIOD_COLUMN_UNSPECIFIED = 0, + TIME_PERIOD_COLUMN_DATE = 1, + TIME_PERIOD_COLUMN_WEEK = 2, + TIME_PERIOD_COLUMN_MONTH = 3, + TIME_PERIOD_COLUMN_QUARTER = 4 + } + + /** MetricValueType enum. */ + enum MetricValueType { + PRIMARY = 0, + PRIMARY_PERCENT_OF_TOTAL = 1, + COMPARISON = 2, + COMPARISON_PERCENT_OF_TOTAL = 3, + ABSOLUTE_CHANGE = 4, + RELATIVE_CHANGE = 5 + } + + /** TimeZoneSource enum. */ + enum TimeZoneSource { + TIME_ZONE_SOURCE_UNSPECIFIED = 0, + PUBLISHER = 1, + AD_EXCHANGE = 2, + UTC = 3, + PROVIDED = 4 + } + } + + /** Properties of a ReportValue. */ + interface IReportValue { + + /** ReportValue intValue */ + intValue?: (number|Long|string|null); + + /** ReportValue doubleValue */ + doubleValue?: (number|null); + + /** ReportValue stringValue */ + stringValue?: (string|null); + + /** ReportValue boolValue */ + boolValue?: (boolean|null); + + /** ReportValue intListValue */ + intListValue?: (google.ads.admanager.v1.ReportValue.IIntList|null); + + /** ReportValue stringListValue */ + stringListValue?: (google.ads.admanager.v1.ReportValue.IStringList|null); + + /** ReportValue doubleListValue */ + doubleListValue?: (google.ads.admanager.v1.ReportValue.IDoubleList|null); + + /** ReportValue bytesValue */ + bytesValue?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ReportValue. */ + class ReportValue implements IReportValue { + + /** + * Constructs a new ReportValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IReportValue); + + /** ReportValue intValue. */ + public intValue?: (number|Long|string|null); + + /** ReportValue doubleValue. */ + public doubleValue?: (number|null); + + /** ReportValue stringValue. */ + public stringValue?: (string|null); + + /** ReportValue boolValue. */ + public boolValue?: (boolean|null); + + /** ReportValue intListValue. */ + public intListValue?: (google.ads.admanager.v1.ReportValue.IIntList|null); + + /** ReportValue stringListValue. */ + public stringListValue?: (google.ads.admanager.v1.ReportValue.IStringList|null); + + /** ReportValue doubleListValue. */ + public doubleListValue?: (google.ads.admanager.v1.ReportValue.IDoubleList|null); + + /** ReportValue bytesValue. */ + public bytesValue?: (Uint8Array|Buffer|string|null); + + /** ReportValue value. */ + public value?: ("intValue"|"doubleValue"|"stringValue"|"boolValue"|"intListValue"|"stringListValue"|"doubleListValue"|"bytesValue"); + + /** + * Creates a new ReportValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportValue instance + */ + public static create(properties?: google.ads.admanager.v1.IReportValue): google.ads.admanager.v1.ReportValue; + + /** + * Encodes the specified ReportValue message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.verify|verify} messages. + * @param message ReportValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IReportValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.verify|verify} messages. + * @param message ReportValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IReportValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportValue + * @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.ads.admanager.v1.ReportValue; + + /** + * Decodes a ReportValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportValue + * @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.ads.admanager.v1.ReportValue; + + /** + * Verifies a ReportValue 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 ReportValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportValue + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportValue; + + /** + * Creates a plain object from a ReportValue message. Also converts values to other types if specified. + * @param message ReportValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportValue { + + /** Properties of an IntList. */ + interface IIntList { + + /** IntList values */ + values?: ((number|Long|string)[]|null); + } + + /** Represents an IntList. */ + class IntList implements IIntList { + + /** + * Constructs a new IntList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportValue.IIntList); + + /** IntList values. */ + public values: (number|Long|string)[]; + + /** + * Creates a new IntList instance using the specified properties. + * @param [properties] Properties to set + * @returns IntList instance + */ + public static create(properties?: google.ads.admanager.v1.ReportValue.IIntList): google.ads.admanager.v1.ReportValue.IntList; + + /** + * Encodes the specified IntList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.IntList.verify|verify} messages. + * @param message IntList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportValue.IIntList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.IntList.verify|verify} messages. + * @param message IntList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportValue.IIntList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntList + * @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.ads.admanager.v1.ReportValue.IntList; + + /** + * Decodes an IntList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntList + * @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.ads.admanager.v1.ReportValue.IntList; + + /** + * Verifies an IntList 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 IntList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntList + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportValue.IntList; + + /** + * Creates a plain object from an IntList message. Also converts values to other types if specified. + * @param message IntList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportValue.IntList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringList. */ + interface IStringList { + + /** StringList values */ + values?: (string[]|null); + } + + /** Represents a StringList. */ + class StringList implements IStringList { + + /** + * Constructs a new StringList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportValue.IStringList); + + /** StringList values. */ + public values: string[]; + + /** + * Creates a new StringList instance using the specified properties. + * @param [properties] Properties to set + * @returns StringList instance + */ + public static create(properties?: google.ads.admanager.v1.ReportValue.IStringList): google.ads.admanager.v1.ReportValue.StringList; + + /** + * Encodes the specified StringList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportValue.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportValue.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringList + * @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.ads.admanager.v1.ReportValue.StringList; + + /** + * Decodes a StringList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringList + * @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.ads.admanager.v1.ReportValue.StringList; + + /** + * Verifies a StringList 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 StringList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringList + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportValue.StringList; + + /** + * Creates a plain object from a StringList message. Also converts values to other types if specified. + * @param message StringList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportValue.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleList. */ + interface IDoubleList { + + /** DoubleList values */ + values?: (number[]|null); + } + + /** Represents a DoubleList. */ + class DoubleList implements IDoubleList { + + /** + * Constructs a new DoubleList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportValue.IDoubleList); + + /** DoubleList values. */ + public values: number[]; + + /** + * Creates a new DoubleList instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleList instance + */ + public static create(properties?: google.ads.admanager.v1.ReportValue.IDoubleList): google.ads.admanager.v1.ReportValue.DoubleList; + + /** + * Encodes the specified DoubleList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.DoubleList.verify|verify} messages. + * @param message DoubleList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportValue.IDoubleList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.DoubleList.verify|verify} messages. + * @param message DoubleList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportValue.IDoubleList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleList + * @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.ads.admanager.v1.ReportValue.DoubleList; + + /** + * Decodes a DoubleList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleList + * @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.ads.admanager.v1.ReportValue.DoubleList; + + /** + * Verifies a DoubleList 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 DoubleList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleList + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportValue.DoubleList; + + /** + * Creates a plain object from a DoubleList message. Also converts values to other types if specified. + * @param message DoubleList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportValue.DoubleList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Report. */ + interface IReport { + + /** Report name */ + name?: (string|null); + + /** Report reportId */ + reportId?: (number|Long|string|null); + + /** Report visibility */ + visibility?: (google.ads.admanager.v1.Report.Visibility|keyof typeof google.ads.admanager.v1.Report.Visibility|null); + + /** Report reportDefinition */ + reportDefinition?: (google.ads.admanager.v1.IReportDefinition|null); + + /** Report displayName */ + displayName?: (string|null); + + /** Report updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Report createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Report locale */ + locale?: (string|null); + + /** Report scheduleOptions */ + scheduleOptions?: (google.ads.admanager.v1.IScheduleOptions|null); + } + + /** Represents a Report. */ + class Report implements IReport { + + /** + * Constructs a new Report. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IReport); + + /** Report name. */ + public name: string; + + /** Report reportId. */ + public reportId: (number|Long|string); + + /** Report visibility. */ + public visibility: (google.ads.admanager.v1.Report.Visibility|keyof typeof google.ads.admanager.v1.Report.Visibility); + + /** Report reportDefinition. */ + public reportDefinition?: (google.ads.admanager.v1.IReportDefinition|null); + + /** Report displayName. */ + public displayName: string; + + /** Report updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Report createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Report locale. */ + public locale: string; + + /** Report scheduleOptions. */ + public scheduleOptions?: (google.ads.admanager.v1.IScheduleOptions|null); + + /** + * Creates a new Report instance using the specified properties. + * @param [properties] Properties to set + * @returns Report instance + */ + public static create(properties?: google.ads.admanager.v1.IReport): google.ads.admanager.v1.Report; + + /** + * Encodes the specified Report message. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * @param message Report message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Report message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * @param message Report message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Report message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Report + * @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.ads.admanager.v1.Report; + + /** + * Decodes a Report message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Report + * @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.ads.admanager.v1.Report; + + /** + * Verifies a Report 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 Report message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Report + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Report; + + /** + * Creates a plain object from a Report message. Also converts values to other types if specified. + * @param message Report + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Report, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Report to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Report + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Report { + + /** Visibility enum. */ + enum Visibility { + HIDDEN = 0, + DRAFT = 1, + SAVED = 2 + } + } + + /** Properties of a ReportDataTable. */ + interface IReportDataTable { + } + + /** Represents a ReportDataTable. */ + class ReportDataTable implements IReportDataTable { + + /** + * Constructs a new ReportDataTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IReportDataTable); + + /** + * Creates a new ReportDataTable instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDataTable instance + */ + public static create(properties?: google.ads.admanager.v1.IReportDataTable): google.ads.admanager.v1.ReportDataTable; + + /** + * Encodes the specified ReportDataTable message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.verify|verify} messages. + * @param message ReportDataTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IReportDataTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDataTable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.verify|verify} messages. + * @param message ReportDataTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IReportDataTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDataTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDataTable + * @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.ads.admanager.v1.ReportDataTable; + + /** + * Decodes a ReportDataTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDataTable + * @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.ads.admanager.v1.ReportDataTable; + + /** + * Verifies a ReportDataTable 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 ReportDataTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDataTable + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDataTable; + + /** + * Creates a plain object from a ReportDataTable message. Also converts values to other types if specified. + * @param message ReportDataTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDataTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDataTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDataTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportDataTable { + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** Row metricValueGroups */ + metricValueGroups?: (google.ads.admanager.v1.ReportDataTable.IMetricValueGroup[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDataTable.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.ads.admanager.v1.IReportValue[]; + + /** Row metricValueGroups. */ + public metricValueGroups: google.ads.admanager.v1.ReportDataTable.IMetricValueGroup[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDataTable.IRow): google.ads.admanager.v1.ReportDataTable.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDataTable.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDataTable.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.ads.admanager.v1.ReportDataTable.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.ads.admanager.v1.ReportDataTable.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDataTable.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDataTable.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValueGroup. */ + interface IMetricValueGroup { + + /** MetricValueGroup primaryValues */ + primaryValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup primaryPercentOfTotalValues */ + primaryPercentOfTotalValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup comparisonValues */ + comparisonValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup comparisonPercentOfTotalValues */ + comparisonPercentOfTotalValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup absoluteChangeValues */ + absoluteChangeValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup relativeChangeValues */ + relativeChangeValues?: (google.ads.admanager.v1.IReportValue[]|null); + + /** MetricValueGroup flagValues */ + flagValues?: (boolean[]|null); + } + + /** Represents a MetricValueGroup. */ + class MetricValueGroup implements IMetricValueGroup { + + /** + * Constructs a new MetricValueGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ReportDataTable.IMetricValueGroup); + + /** MetricValueGroup primaryValues. */ + public primaryValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup primaryPercentOfTotalValues. */ + public primaryPercentOfTotalValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup comparisonValues. */ + public comparisonValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup comparisonPercentOfTotalValues. */ + public comparisonPercentOfTotalValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup absoluteChangeValues. */ + public absoluteChangeValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup relativeChangeValues. */ + public relativeChangeValues: google.ads.admanager.v1.IReportValue[]; + + /** MetricValueGroup flagValues. */ + public flagValues: boolean[]; + + /** + * Creates a new MetricValueGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValueGroup instance + */ + public static create(properties?: google.ads.admanager.v1.ReportDataTable.IMetricValueGroup): google.ads.admanager.v1.ReportDataTable.MetricValueGroup; + + /** + * Encodes the specified MetricValueGroup message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.MetricValueGroup.verify|verify} messages. + * @param message MetricValueGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ReportDataTable.IMetricValueGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValueGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.MetricValueGroup.verify|verify} messages. + * @param message MetricValueGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ReportDataTable.IMetricValueGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValueGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValueGroup + * @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.ads.admanager.v1.ReportDataTable.MetricValueGroup; + + /** + * Decodes a MetricValueGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValueGroup + * @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.ads.admanager.v1.ReportDataTable.MetricValueGroup; + + /** + * Verifies a MetricValueGroup 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 MetricValueGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValueGroup + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDataTable.MetricValueGroup; + + /** + * Creates a plain object from a MetricValueGroup message. Also converts values to other types if specified. + * @param message MetricValueGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ReportDataTable.MetricValueGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValueGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValueGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ScheduleOptions. */ + interface IScheduleOptions { + + /** ScheduleOptions schedule */ + schedule?: (google.ads.admanager.v1.ScheduleOptions.ISchedule|null); + + /** ScheduleOptions deliveryCondition */ + deliveryCondition?: (google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|keyof typeof google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|null); + + /** ScheduleOptions flags */ + flags?: (google.ads.admanager.v1.ReportDefinition.IFlag[]|null); + } + + /** Represents a ScheduleOptions. */ + class ScheduleOptions implements IScheduleOptions { + + /** + * Constructs a new ScheduleOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IScheduleOptions); + + /** ScheduleOptions schedule. */ + public schedule?: (google.ads.admanager.v1.ScheduleOptions.ISchedule|null); + + /** ScheduleOptions deliveryCondition. */ + public deliveryCondition: (google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|keyof typeof google.ads.admanager.v1.ScheduleOptions.DeliveryCondition); + + /** ScheduleOptions flags. */ + public flags: google.ads.admanager.v1.ReportDefinition.IFlag[]; + + /** + * Creates a new ScheduleOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduleOptions instance + */ + public static create(properties?: google.ads.admanager.v1.IScheduleOptions): google.ads.admanager.v1.ScheduleOptions; + + /** + * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * @param message ScheduleOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * @param message ScheduleOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduleOptions + * @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.ads.admanager.v1.ScheduleOptions; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduleOptions + * @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.ads.admanager.v1.ScheduleOptions; + + /** + * Verifies a ScheduleOptions 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 ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduleOptions + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ScheduleOptions; + + /** + * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. + * @param message ScheduleOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ScheduleOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduleOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduleOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScheduleOptions { + + /** Properties of a Schedule. */ + interface ISchedule { + + /** Schedule weeklySchedule */ + weeklySchedule?: (google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule|null); + + /** Schedule monthlySchedule */ + monthlySchedule?: (google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule|null); + + /** Schedule startDate */ + startDate?: (google.type.IDate|null); + + /** Schedule endDate */ + endDate?: (google.type.IDate|null); + + /** Schedule frequency */ + frequency?: (google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency|keyof typeof google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency|null); + + /** Schedule startTime */ + startTime?: (google.type.ITimeOfDay|null); + } + + /** Represents a Schedule. */ + class Schedule implements ISchedule { + + /** + * Constructs a new Schedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ScheduleOptions.ISchedule); + + /** Schedule weeklySchedule. */ + public weeklySchedule?: (google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule|null); + + /** Schedule monthlySchedule. */ + public monthlySchedule?: (google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule|null); + + /** Schedule startDate. */ + public startDate?: (google.type.IDate|null); + + /** Schedule endDate. */ + public endDate?: (google.type.IDate|null); + + /** Schedule frequency. */ + public frequency: (google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency|keyof typeof google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency); + + /** Schedule startTime. */ + public startTime?: (google.type.ITimeOfDay|null); + + /** Schedule frequencySchedule. */ + public frequencySchedule?: ("weeklySchedule"|"monthlySchedule"); + + /** + * Creates a new Schedule instance using the specified properties. + * @param [properties] Properties to set + * @returns Schedule instance + */ + public static create(properties?: google.ads.admanager.v1.ScheduleOptions.ISchedule): google.ads.admanager.v1.ScheduleOptions.Schedule; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ScheduleOptions.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ScheduleOptions.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule; + + /** + * Verifies a Schedule 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 Schedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schedule + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ScheduleOptions.Schedule; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @param message Schedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ScheduleOptions.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Schedule { + + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { + + /** WeeklySchedule weeklyScheduledDays */ + weeklyScheduledDays?: (google.type.DayOfWeek[]|null); + } + + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { + + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule); + + /** WeeklySchedule weeklyScheduledDays. */ + public weeklyScheduledDays: google.type.DayOfWeek[]; + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule): google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeeklySchedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeeklySchedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule; + + /** + * Verifies a WeeklySchedule 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 WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeeklySchedule + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @param message WeeklySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeeklySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeeklySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MonthlySchedule. */ + interface IMonthlySchedule { + + /** MonthlySchedule monthlyScheduledDays */ + monthlyScheduledDays?: (number[]|null); + } + + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { + + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule); + + /** MonthlySchedule monthlyScheduledDays. */ + public monthlyScheduledDays: number[]; + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule): google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonthlySchedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonthlySchedule + * @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.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule; + + /** + * Verifies a MonthlySchedule 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 MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonthlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @param message MonthlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonthlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonthlySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Frequency enum. */ + enum Frequency { + FREQUENCY_UNSPECIFIED = 0, + HOURLY = 1, + TWO_TIMES_DAILY = 2, + THREE_TIMES_DAILY = 3, + FOUR_TIMES_DAILY = 4, + DAILY = 5, + WEEKLY = 6, + MONTHLY = 7 + } + } + + /** DeliveryCondition enum. */ + enum DeliveryCondition { + NEVER = 0, + ALWAYS = 1, + WHEN_FLAG_CONDITIONS_MET = 2 + } + } + + /** Represents a ReportService */ + class ReportService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReportService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ReportService 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): ReportService; + + /** + * Calls GetReport. + * @param request GetReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Report + */ + public getReport(request: google.ads.admanager.v1.IGetReportRequest, callback: google.ads.admanager.v1.ReportService.GetReportCallback): void; + + /** + * Calls GetReport. + * @param request GetReportRequest message or plain object + * @returns Promise + */ + public getReport(request: google.ads.admanager.v1.IGetReportRequest): Promise; + + /** + * Calls ListReports. + * @param request ListReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportsResponse + */ + public listReports(request: google.ads.admanager.v1.IListReportsRequest, callback: google.ads.admanager.v1.ReportService.ListReportsCallback): void; + + /** + * Calls ListReports. + * @param request ListReportsRequest message or plain object + * @returns Promise + */ + public listReports(request: google.ads.admanager.v1.IListReportsRequest): Promise; + + /** + * Calls CreateReport. + * @param request CreateReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Report + */ + public createReport(request: google.ads.admanager.v1.ICreateReportRequest, callback: google.ads.admanager.v1.ReportService.CreateReportCallback): void; + + /** + * Calls CreateReport. + * @param request CreateReportRequest message or plain object + * @returns Promise + */ + public createReport(request: google.ads.admanager.v1.ICreateReportRequest): Promise; + + /** + * Calls UpdateReport. + * @param request UpdateReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Report + */ + public updateReport(request: google.ads.admanager.v1.IUpdateReportRequest, callback: google.ads.admanager.v1.ReportService.UpdateReportCallback): void; + + /** + * Calls UpdateReport. + * @param request UpdateReportRequest message or plain object + * @returns Promise + */ + public updateReport(request: google.ads.admanager.v1.IUpdateReportRequest): Promise; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public runReport(request: google.ads.admanager.v1.IRunReportRequest, callback: google.ads.admanager.v1.ReportService.RunReportCallback): void; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @returns Promise + */ + public runReport(request: google.ads.admanager.v1.IRunReportRequest): Promise; + + /** + * Calls FetchReportResultRows. + * @param request FetchReportResultRowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchReportResultRowsResponse + */ + public fetchReportResultRows(request: google.ads.admanager.v1.IFetchReportResultRowsRequest, callback: google.ads.admanager.v1.ReportService.FetchReportResultRowsCallback): void; + + /** + * Calls FetchReportResultRows. + * @param request FetchReportResultRowsRequest message or plain object + * @returns Promise + */ + public fetchReportResultRows(request: google.ads.admanager.v1.IFetchReportResultRowsRequest): Promise; + } + + namespace ReportService { + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|getReport}. + * @param error Error, if any + * @param [response] Report + */ + type GetReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|listReports}. + * @param error Error, if any + * @param [response] ListReportsResponse + */ + type ListReportsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListReportsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|createReport}. + * @param error Error, if any + * @param [response] Report + */ + type CreateReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|updateReport}. + * @param error Error, if any + * @param [response] Report + */ + type UpdateReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|runReport}. + * @param error Error, if any + * @param [response] Operation + */ + type RunReportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|fetchReportResultRows}. + * @param error Error, if any + * @param [response] FetchReportResultRowsResponse + */ + type FetchReportResultRowsCallback = (error: (Error|null), response?: google.ads.admanager.v1.FetchReportResultRowsResponse) => void; + } + + /** Properties of a RunReportRequest. */ + interface IRunReportRequest { + + /** RunReportRequest name */ + name?: (string|null); + } + + /** Represents a RunReportRequest. */ + class RunReportRequest implements IRunReportRequest { + + /** + * Constructs a new RunReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRunReportRequest); + + /** RunReportRequest name. */ + public name: string; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IRunReportRequest): google.ads.admanager.v1.RunReportRequest; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportRequest + * @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.ads.admanager.v1.RunReportRequest; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportRequest + * @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.ads.admanager.v1.RunReportRequest; + + /** + * Verifies a RunReportRequest 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 RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportRequest; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @param message RunReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportMetadata. */ + interface IRunReportMetadata { + + /** RunReportMetadata percentComplete */ + percentComplete?: (number|null); + + /** RunReportMetadata report */ + report?: (string|null); + } + + /** Represents a RunReportMetadata. */ + class RunReportMetadata implements IRunReportMetadata { + + /** + * Constructs a new RunReportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRunReportMetadata); + + /** RunReportMetadata percentComplete. */ + public percentComplete: number; + + /** RunReportMetadata report. */ + public report: string; + + /** + * Creates a new RunReportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportMetadata instance + */ + public static create(properties?: google.ads.admanager.v1.IRunReportMetadata): google.ads.admanager.v1.RunReportMetadata; + + /** + * Encodes the specified RunReportMetadata message. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * @param message RunReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRunReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * @param message RunReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRunReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportMetadata + * @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.ads.admanager.v1.RunReportMetadata; + + /** + * Decodes a RunReportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportMetadata + * @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.ads.admanager.v1.RunReportMetadata; + + /** + * Verifies a RunReportMetadata 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 RunReportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportMetadata; + + /** + * Creates a plain object from a RunReportMetadata message. Also converts values to other types if specified. + * @param message RunReportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RunReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportResponse. */ + interface IRunReportResponse { + + /** RunReportResponse reportResult */ + reportResult?: (string|null); + } + + /** Represents a RunReportResponse. */ + class RunReportResponse implements IRunReportResponse { + + /** + * Constructs a new RunReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRunReportResponse); + + /** RunReportResponse reportResult. */ + public reportResult: string; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IRunReportResponse): google.ads.admanager.v1.RunReportResponse; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportResponse + * @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.ads.admanager.v1.RunReportResponse; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportResponse + * @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.ads.admanager.v1.RunReportResponse; + + /** + * Verifies a RunReportResponse 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 RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportResponse; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @param message RunReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportRequest. */ + interface IGetReportRequest { + + /** GetReportRequest name */ + name?: (string|null); + } + + /** Represents a GetReportRequest. */ + class GetReportRequest implements IGetReportRequest { + + /** + * Constructs a new GetReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetReportRequest); + + /** GetReportRequest name. */ + public name: string; + + /** + * Creates a new GetReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetReportRequest): google.ads.admanager.v1.GetReportRequest; + + /** + * Encodes the specified GetReportRequest message. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * @param message GetReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * @param message GetReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportRequest + * @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.ads.admanager.v1.GetReportRequest; + + /** + * Decodes a GetReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportRequest + * @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.ads.admanager.v1.GetReportRequest; + + /** + * Verifies a GetReportRequest 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 GetReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetReportRequest; + + /** + * Creates a plain object from a GetReportRequest message. Also converts values to other types if specified. + * @param message GetReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportsRequest. */ + interface IListReportsRequest { + + /** ListReportsRequest parent */ + parent?: (string|null); + + /** ListReportsRequest pageSize */ + pageSize?: (number|null); + + /** ListReportsRequest pageToken */ + pageToken?: (string|null); + + /** ListReportsRequest filter */ + filter?: (string|null); + + /** ListReportsRequest orderBy */ + orderBy?: (string|null); + + /** ListReportsRequest skip */ + skip?: (number|null); + } + + /** Represents a ListReportsRequest. */ + class ListReportsRequest implements IListReportsRequest { + + /** + * Constructs a new ListReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListReportsRequest); + + /** ListReportsRequest parent. */ + public parent: string; + + /** ListReportsRequest pageSize. */ + public pageSize: number; + + /** ListReportsRequest pageToken. */ + public pageToken: string; + + /** ListReportsRequest filter. */ + public filter: string; + + /** ListReportsRequest orderBy. */ + public orderBy: string; + + /** ListReportsRequest skip. */ + public skip: number; + + /** + * Creates a new ListReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListReportsRequest): google.ads.admanager.v1.ListReportsRequest; + + /** + * Encodes the specified ListReportsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * @param message ListReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * @param message ListReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportsRequest + * @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.ads.admanager.v1.ListReportsRequest; + + /** + * Decodes a ListReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportsRequest + * @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.ads.admanager.v1.ListReportsRequest; + + /** + * Verifies a ListReportsRequest 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 ListReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListReportsRequest; + + /** + * Creates a plain object from a ListReportsRequest message. Also converts values to other types if specified. + * @param message ListReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportsResponse. */ + interface IListReportsResponse { + + /** ListReportsResponse reports */ + reports?: (google.ads.admanager.v1.IReport[]|null); + + /** ListReportsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReportsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListReportsResponse. */ + class ListReportsResponse implements IListReportsResponse { + + /** + * Constructs a new ListReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListReportsResponse); + + /** ListReportsResponse reports. */ + public reports: google.ads.admanager.v1.IReport[]; + + /** ListReportsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReportsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListReportsResponse): google.ads.admanager.v1.ListReportsResponse; + + /** + * Encodes the specified ListReportsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * @param message ListReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * @param message ListReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportsResponse + * @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.ads.admanager.v1.ListReportsResponse; + + /** + * Decodes a ListReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportsResponse + * @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.ads.admanager.v1.ListReportsResponse; + + /** + * Verifies a ListReportsResponse 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 ListReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListReportsResponse; + + /** + * Creates a plain object from a ListReportsResponse message. Also converts values to other types if specified. + * @param message ListReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateReportRequest. */ + interface ICreateReportRequest { + + /** CreateReportRequest parent */ + parent?: (string|null); + + /** CreateReportRequest report */ + report?: (google.ads.admanager.v1.IReport|null); + } + + /** Represents a CreateReportRequest. */ + class CreateReportRequest implements ICreateReportRequest { + + /** + * Constructs a new CreateReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ICreateReportRequest); + + /** CreateReportRequest parent. */ + public parent: string; + + /** CreateReportRequest report. */ + public report?: (google.ads.admanager.v1.IReport|null); + + /** + * Creates a new CreateReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReportRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreateReportRequest): google.ads.admanager.v1.CreateReportRequest; + + /** + * Encodes the specified CreateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * @param message CreateReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * @param message CreateReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReportRequest + * @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.ads.admanager.v1.CreateReportRequest; + + /** + * Decodes a CreateReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReportRequest + * @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.ads.admanager.v1.CreateReportRequest; + + /** + * Verifies a CreateReportRequest 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 CreateReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateReportRequest; + + /** + * Creates a plain object from a CreateReportRequest message. Also converts values to other types if specified. + * @param message CreateReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreateReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateReportRequest. */ + interface IUpdateReportRequest { + + /** UpdateReportRequest report */ + report?: (google.ads.admanager.v1.IReport|null); + + /** UpdateReportRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateReportRequest. */ + class UpdateReportRequest implements IUpdateReportRequest { + + /** + * Constructs a new UpdateReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdateReportRequest); + + /** UpdateReportRequest report. */ + public report?: (google.ads.admanager.v1.IReport|null); + + /** UpdateReportRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateReportRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IUpdateReportRequest): google.ads.admanager.v1.UpdateReportRequest; + + /** + * Encodes the specified UpdateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. + * @param message UpdateReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IUpdateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. + * @param message UpdateReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateReportRequest + * @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.ads.admanager.v1.UpdateReportRequest; + + /** + * Decodes an UpdateReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateReportRequest + * @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.ads.admanager.v1.UpdateReportRequest; + + /** + * Verifies an UpdateReportRequest 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 UpdateReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateReportRequest; + + /** + * Creates a plain object from an UpdateReportRequest message. Also converts values to other types if specified. + * @param message UpdateReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.UpdateReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReportResultRowsRequest. */ + interface IFetchReportResultRowsRequest { + + /** FetchReportResultRowsRequest name */ + name?: (string|null); + + /** FetchReportResultRowsRequest pageSize */ + pageSize?: (number|null); + + /** FetchReportResultRowsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a FetchReportResultRowsRequest. */ + class FetchReportResultRowsRequest implements IFetchReportResultRowsRequest { + + /** + * Constructs a new FetchReportResultRowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IFetchReportResultRowsRequest); + + /** FetchReportResultRowsRequest name. */ + public name: string; + + /** FetchReportResultRowsRequest pageSize. */ + public pageSize: number; + + /** FetchReportResultRowsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new FetchReportResultRowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReportResultRowsRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IFetchReportResultRowsRequest): google.ads.admanager.v1.FetchReportResultRowsRequest; + + /** + * Encodes the specified FetchReportResultRowsRequest message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * @param message FetchReportResultRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IFetchReportResultRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReportResultRowsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * @param message FetchReportResultRowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IFetchReportResultRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReportResultRowsRequest + * @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.ads.admanager.v1.FetchReportResultRowsRequest; + + /** + * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReportResultRowsRequest + * @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.ads.admanager.v1.FetchReportResultRowsRequest; + + /** + * Verifies a FetchReportResultRowsRequest 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 FetchReportResultRowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReportResultRowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FetchReportResultRowsRequest; + + /** + * Creates a plain object from a FetchReportResultRowsRequest message. Also converts values to other types if specified. + * @param message FetchReportResultRowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.FetchReportResultRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReportResultRowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReportResultRowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReportResultRowsResponse. */ + interface IFetchReportResultRowsResponse { + + /** FetchReportResultRowsResponse rows */ + rows?: (google.ads.admanager.v1.ReportDataTable.IRow[]|null); + + /** FetchReportResultRowsResponse runTime */ + runTime?: (google.protobuf.ITimestamp|null); + + /** FetchReportResultRowsResponse dateRanges */ + dateRanges?: (google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange[]|null); + + /** FetchReportResultRowsResponse comparisonDateRanges */ + comparisonDateRanges?: (google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange[]|null); + + /** FetchReportResultRowsResponse totalRowCount */ + totalRowCount?: (number|null); + + /** FetchReportResultRowsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchReportResultRowsResponse. */ + class FetchReportResultRowsResponse implements IFetchReportResultRowsResponse { + + /** + * Constructs a new FetchReportResultRowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IFetchReportResultRowsResponse); + + /** FetchReportResultRowsResponse rows. */ + public rows: google.ads.admanager.v1.ReportDataTable.IRow[]; + + /** FetchReportResultRowsResponse runTime. */ + public runTime?: (google.protobuf.ITimestamp|null); + + /** FetchReportResultRowsResponse dateRanges. */ + public dateRanges: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange[]; + + /** FetchReportResultRowsResponse comparisonDateRanges. */ + public comparisonDateRanges: google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange[]; + + /** FetchReportResultRowsResponse totalRowCount. */ + public totalRowCount: number; + + /** FetchReportResultRowsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchReportResultRowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReportResultRowsResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IFetchReportResultRowsResponse): google.ads.admanager.v1.FetchReportResultRowsResponse; + + /** + * Encodes the specified FetchReportResultRowsResponse message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * @param message FetchReportResultRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IFetchReportResultRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReportResultRowsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * @param message FetchReportResultRowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IFetchReportResultRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReportResultRowsResponse + * @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.ads.admanager.v1.FetchReportResultRowsResponse; + + /** + * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReportResultRowsResponse + * @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.ads.admanager.v1.FetchReportResultRowsResponse; + + /** + * Verifies a FetchReportResultRowsResponse 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 FetchReportResultRowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReportResultRowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FetchReportResultRowsResponse; + + /** + * Creates a plain object from a FetchReportResultRowsResponse message. Also converts values to other types if specified. + * @param message FetchReportResultRowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.FetchReportResultRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReportResultRowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReportResultRowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RoleStatusEnum. */ + interface IRoleStatusEnum { + } + + /** Represents a RoleStatusEnum. */ + class RoleStatusEnum implements IRoleStatusEnum { + + /** + * Constructs a new RoleStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRoleStatusEnum); + + /** + * Creates a new RoleStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns RoleStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.IRoleStatusEnum): google.ads.admanager.v1.RoleStatusEnum; + + /** + * Encodes the specified RoleStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * @param message RoleStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRoleStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RoleStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * @param message RoleStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRoleStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RoleStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RoleStatusEnum + * @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.ads.admanager.v1.RoleStatusEnum; + + /** + * Decodes a RoleStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RoleStatusEnum + * @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.ads.admanager.v1.RoleStatusEnum; + + /** + * Verifies a RoleStatusEnum 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 RoleStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RoleStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RoleStatusEnum; + + /** + * Creates a plain object from a RoleStatusEnum message. Also converts values to other types if specified. + * @param message RoleStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.RoleStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RoleStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RoleStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RoleStatusEnum { + + /** RoleStatus enum. */ + enum RoleStatus { + ROLE_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } + + /** Properties of a Role. */ + interface IRole { + + /** Role name */ + name?: (string|null); + + /** Role roleId */ + roleId?: (number|Long|string|null); + + /** Role displayName */ + displayName?: (string|null); + + /** Role description */ + description?: (string|null); + + /** Role builtIn */ + builtIn?: (boolean|null); + + /** Role status */ + status?: (google.ads.admanager.v1.RoleStatusEnum.RoleStatus|keyof typeof google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null); + } + + /** Represents a Role. */ + class Role implements IRole { + + /** + * Constructs a new Role. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IRole); + + /** Role name. */ + public name: string; + + /** Role roleId. */ + public roleId?: (number|Long|string|null); + + /** Role displayName. */ + public displayName?: (string|null); + + /** Role description. */ + public description?: (string|null); + + /** Role builtIn. */ + public builtIn?: (boolean|null); + + /** Role status. */ + public status?: (google.ads.admanager.v1.RoleStatusEnum.RoleStatus|keyof typeof google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null); + + /** + * Creates a new Role instance using the specified properties. + * @param [properties] Properties to set + * @returns Role instance + */ + public static create(properties?: google.ads.admanager.v1.IRole): google.ads.admanager.v1.Role; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Role message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Role + * @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.ads.admanager.v1.Role; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Role + * @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.ads.admanager.v1.Role; + + /** + * Verifies a Role 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 Role message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Role + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Role; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @param message Role + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Role to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Role + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a RoleService */ + class RoleService extends $protobuf.rpc.Service { + + /** + * Constructs a new RoleService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new RoleService 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): RoleService; + + /** + * Calls GetRole. + * @param request GetRoleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Role + */ + public getRole(request: google.ads.admanager.v1.IGetRoleRequest, callback: google.ads.admanager.v1.RoleService.GetRoleCallback): void; + + /** + * Calls GetRole. + * @param request GetRoleRequest message or plain object + * @returns Promise + */ + public getRole(request: google.ads.admanager.v1.IGetRoleRequest): Promise; + + /** + * Calls ListRoles. + * @param request ListRolesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRolesResponse + */ + public listRoles(request: google.ads.admanager.v1.IListRolesRequest, callback: google.ads.admanager.v1.RoleService.ListRolesCallback): void; + + /** + * Calls ListRoles. + * @param request ListRolesRequest message or plain object + * @returns Promise + */ + public listRoles(request: google.ads.admanager.v1.IListRolesRequest): Promise; + } + + namespace RoleService { + + /** + * Callback as used by {@link google.ads.admanager.v1.RoleService|getRole}. + * @param error Error, if any + * @param [response] Role + */ + type GetRoleCallback = (error: (Error|null), response?: google.ads.admanager.v1.Role) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.RoleService|listRoles}. + * @param error Error, if any + * @param [response] ListRolesResponse + */ + type ListRolesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListRolesResponse) => void; + } + + /** Properties of a GetRoleRequest. */ + interface IGetRoleRequest { + + /** GetRoleRequest name */ + name?: (string|null); + } + + /** Represents a GetRoleRequest. */ + class GetRoleRequest implements IGetRoleRequest { + + /** + * Constructs a new GetRoleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetRoleRequest); + + /** GetRoleRequest name. */ + public name: string; + + /** + * Creates a new GetRoleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRoleRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetRoleRequest): google.ads.admanager.v1.GetRoleRequest; + + /** + * Encodes the specified GetRoleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * @param message GetRoleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetRoleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRoleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * @param message GetRoleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetRoleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRoleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRoleRequest + * @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.ads.admanager.v1.GetRoleRequest; + + /** + * Decodes a GetRoleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRoleRequest + * @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.ads.admanager.v1.GetRoleRequest; + + /** + * Verifies a GetRoleRequest 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 GetRoleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRoleRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetRoleRequest; + + /** + * Creates a plain object from a GetRoleRequest message. Also converts values to other types if specified. + * @param message GetRoleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetRoleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRoleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRoleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRolesRequest. */ + interface IListRolesRequest { + + /** ListRolesRequest parent */ + parent?: (string|null); + + /** ListRolesRequest pageSize */ + pageSize?: (number|null); + + /** ListRolesRequest pageToken */ + pageToken?: (string|null); + + /** ListRolesRequest filter */ + filter?: (string|null); + + /** ListRolesRequest orderBy */ + orderBy?: (string|null); + + /** ListRolesRequest skip */ + skip?: (number|null); + } + + /** Represents a ListRolesRequest. */ + class ListRolesRequest implements IListRolesRequest { + + /** + * Constructs a new ListRolesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListRolesRequest); + + /** ListRolesRequest parent. */ + public parent: string; + + /** ListRolesRequest pageSize. */ + public pageSize: number; + + /** ListRolesRequest pageToken. */ + public pageToken: string; + + /** ListRolesRequest filter. */ + public filter: string; + + /** ListRolesRequest orderBy. */ + public orderBy: string; + + /** ListRolesRequest skip. */ + public skip: number; + + /** + * Creates a new ListRolesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListRolesRequest): google.ads.admanager.v1.ListRolesRequest; + + /** + * Encodes the specified ListRolesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * @param message ListRolesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListRolesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * @param message ListRolesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListRolesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolesRequest + * @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.ads.admanager.v1.ListRolesRequest; + + /** + * Decodes a ListRolesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolesRequest + * @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.ads.admanager.v1.ListRolesRequest; + + /** + * Verifies a ListRolesRequest 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 ListRolesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListRolesRequest; + + /** + * Creates a plain object from a ListRolesRequest message. Also converts values to other types if specified. + * @param message ListRolesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListRolesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRolesResponse. */ + interface IListRolesResponse { + + /** ListRolesResponse roles */ + roles?: (google.ads.admanager.v1.IRole[]|null); + + /** ListRolesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRolesResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListRolesResponse. */ + class ListRolesResponse implements IListRolesResponse { + + /** + * Constructs a new ListRolesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListRolesResponse); + + /** ListRolesResponse roles. */ + public roles: google.ads.admanager.v1.IRole[]; + + /** ListRolesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRolesResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListRolesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListRolesResponse): google.ads.admanager.v1.ListRolesResponse; + + /** + * Encodes the specified ListRolesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * @param message ListRolesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListRolesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * @param message ListRolesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListRolesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolesResponse + * @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.ads.admanager.v1.ListRolesResponse; + + /** + * Decodes a ListRolesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolesResponse + * @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.ads.admanager.v1.ListRolesResponse; + + /** + * Verifies a ListRolesResponse 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 ListRolesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListRolesResponse; + + /** + * Creates a plain object from a ListRolesResponse message. Also converts values to other types if specified. + * @param message ListRolesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListRolesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SiteDisapprovalReasonEnum. */ + interface ISiteDisapprovalReasonEnum { + } + + /** Represents a SiteDisapprovalReasonEnum. */ + class SiteDisapprovalReasonEnum implements ISiteDisapprovalReasonEnum { + + /** + * Constructs a new SiteDisapprovalReasonEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ISiteDisapprovalReasonEnum); + + /** + * Creates a new SiteDisapprovalReasonEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns SiteDisapprovalReasonEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ISiteDisapprovalReasonEnum): google.ads.admanager.v1.SiteDisapprovalReasonEnum; + + /** + * Encodes the specified SiteDisapprovalReasonEnum message. Does not implicitly {@link google.ads.admanager.v1.SiteDisapprovalReasonEnum.verify|verify} messages. + * @param message SiteDisapprovalReasonEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ISiteDisapprovalReasonEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SiteDisapprovalReasonEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SiteDisapprovalReasonEnum.verify|verify} messages. + * @param message SiteDisapprovalReasonEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ISiteDisapprovalReasonEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SiteDisapprovalReasonEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SiteDisapprovalReasonEnum + * @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.ads.admanager.v1.SiteDisapprovalReasonEnum; + + /** + * Decodes a SiteDisapprovalReasonEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SiteDisapprovalReasonEnum + * @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.ads.admanager.v1.SiteDisapprovalReasonEnum; + + /** + * Verifies a SiteDisapprovalReasonEnum 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 SiteDisapprovalReasonEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SiteDisapprovalReasonEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SiteDisapprovalReasonEnum; + + /** + * Creates a plain object from a SiteDisapprovalReasonEnum message. Also converts values to other types if specified. + * @param message SiteDisapprovalReasonEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.SiteDisapprovalReasonEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SiteDisapprovalReasonEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SiteDisapprovalReasonEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SiteDisapprovalReasonEnum { + + /** SiteDisapprovalReason enum. */ + enum SiteDisapprovalReason { + SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0, + CONTENT = 1, + OTHER = 2, + OWNERSHIP = 3 + } + } + + /** Properties of a SiteApprovalStatusEnum. */ + interface ISiteApprovalStatusEnum { + } + + /** Represents a SiteApprovalStatusEnum. */ + class SiteApprovalStatusEnum implements ISiteApprovalStatusEnum { + + /** + * Constructs a new SiteApprovalStatusEnum. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ISiteApprovalStatusEnum); + + /** + * Creates a new SiteApprovalStatusEnum instance using the specified properties. + * @param [properties] Properties to set + * @returns SiteApprovalStatusEnum instance + */ + public static create(properties?: google.ads.admanager.v1.ISiteApprovalStatusEnum): google.ads.admanager.v1.SiteApprovalStatusEnum; + + /** + * Encodes the specified SiteApprovalStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.SiteApprovalStatusEnum.verify|verify} messages. + * @param message SiteApprovalStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ISiteApprovalStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SiteApprovalStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SiteApprovalStatusEnum.verify|verify} messages. + * @param message SiteApprovalStatusEnum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ISiteApprovalStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SiteApprovalStatusEnum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SiteApprovalStatusEnum + * @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.ads.admanager.v1.SiteApprovalStatusEnum; + + /** + * Decodes a SiteApprovalStatusEnum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SiteApprovalStatusEnum + * @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.ads.admanager.v1.SiteApprovalStatusEnum; + + /** + * Verifies a SiteApprovalStatusEnum 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 SiteApprovalStatusEnum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SiteApprovalStatusEnum + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.SiteApprovalStatusEnum; + + /** + * Creates a plain object from a SiteApprovalStatusEnum message. Also converts values to other types if specified. + * @param message SiteApprovalStatusEnum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.SiteApprovalStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SiteApprovalStatusEnum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SiteApprovalStatusEnum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SiteApprovalStatusEnum { + + /** SiteApprovalStatus enum. */ + enum SiteApprovalStatus { + SITE_APPROVAL_STATUS_UNSPECIFIED = 0, + APPROVED = 1, + DISAPPROVED = 2, + DRAFT = 3, + REQUIRES_REVIEW = 4, + UNCHECKED = 5 + } + } + + /** Properties of a Site. */ + interface ISite { + + /** Site name */ + name?: (string|null); + + /** Site url */ + url?: (string|null); + + /** Site childNetworkCode */ + childNetworkCode?: (string|null); + + /** Site approvalStatus */ + approvalStatus?: (google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|keyof typeof google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|null); + + /** Site approvalStatusUpdateTime */ + approvalStatusUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Site disapprovalReasons */ + disapprovalReasons?: (google.ads.admanager.v1.IDisapprovalReason[]|null); + } + + /** Represents a Site. */ + class Site implements ISite { + + /** + * Constructs a new Site. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.ISite); + + /** Site name. */ + public name: string; + + /** Site url. */ + public url?: (string|null); + + /** Site childNetworkCode. */ + public childNetworkCode?: (string|null); + + /** Site approvalStatus. */ + public approvalStatus?: (google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|keyof typeof google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|null); + + /** Site approvalStatusUpdateTime. */ + public approvalStatusUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Site disapprovalReasons. */ + public disapprovalReasons: google.ads.admanager.v1.IDisapprovalReason[]; + + /** + * Creates a new Site instance using the specified properties. + * @param [properties] Properties to set + * @returns Site instance + */ + public static create(properties?: google.ads.admanager.v1.ISite): google.ads.admanager.v1.Site; + + /** + * Encodes the specified Site message. Does not implicitly {@link google.ads.admanager.v1.Site.verify|verify} messages. + * @param message Site message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ISite, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Site message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Site.verify|verify} messages. + * @param message Site message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ISite, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Site message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Site + * @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.ads.admanager.v1.Site; + + /** + * Decodes a Site message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Site + * @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.ads.admanager.v1.Site; + + /** + * Verifies a Site 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 Site message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Site + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Site; + + /** + * Creates a plain object from a Site message. Also converts values to other types if specified. + * @param message Site + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.Site, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Site to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Site + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisapprovalReason. */ + interface IDisapprovalReason { + + /** DisapprovalReason type */ + type?: (google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|keyof typeof google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|null); + + /** DisapprovalReason details */ + details?: (string|null); + } + + /** Represents a DisapprovalReason. */ + class DisapprovalReason implements IDisapprovalReason { + + /** + * Constructs a new DisapprovalReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IDisapprovalReason); + + /** DisapprovalReason type. */ + public type?: (google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|keyof typeof google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|null); + + /** DisapprovalReason details. */ + public details?: (string|null); + + /** + * Creates a new DisapprovalReason instance using the specified properties. + * @param [properties] Properties to set + * @returns DisapprovalReason instance + */ + public static create(properties?: google.ads.admanager.v1.IDisapprovalReason): google.ads.admanager.v1.DisapprovalReason; + + /** + * Encodes the specified DisapprovalReason message. Does not implicitly {@link google.ads.admanager.v1.DisapprovalReason.verify|verify} messages. + * @param message DisapprovalReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IDisapprovalReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisapprovalReason message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DisapprovalReason.verify|verify} messages. + * @param message DisapprovalReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IDisapprovalReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisapprovalReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisapprovalReason + * @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.ads.admanager.v1.DisapprovalReason; + + /** + * Decodes a DisapprovalReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisapprovalReason + * @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.ads.admanager.v1.DisapprovalReason; + + /** + * Verifies a DisapprovalReason 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 DisapprovalReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisapprovalReason + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.DisapprovalReason; + + /** + * Creates a plain object from a DisapprovalReason message. Also converts values to other types if specified. + * @param message DisapprovalReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.DisapprovalReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisapprovalReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisapprovalReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a SiteService */ + class SiteService extends $protobuf.rpc.Service { + + /** + * Constructs a new SiteService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new SiteService 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): SiteService; + + /** + * Calls GetSite. + * @param request GetSiteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Site + */ + public getSite(request: google.ads.admanager.v1.IGetSiteRequest, callback: google.ads.admanager.v1.SiteService.GetSiteCallback): void; + + /** + * Calls GetSite. + * @param request GetSiteRequest message or plain object + * @returns Promise + */ + public getSite(request: google.ads.admanager.v1.IGetSiteRequest): Promise; + + /** + * Calls ListSites. + * @param request ListSitesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSitesResponse + */ + public listSites(request: google.ads.admanager.v1.IListSitesRequest, callback: google.ads.admanager.v1.SiteService.ListSitesCallback): void; + + /** + * Calls ListSites. + * @param request ListSitesRequest message or plain object + * @returns Promise + */ + public listSites(request: google.ads.admanager.v1.IListSitesRequest): Promise; + + /** + * Calls CreateSite. + * @param request CreateSiteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Site + */ + public createSite(request: google.ads.admanager.v1.ICreateSiteRequest, callback: google.ads.admanager.v1.SiteService.CreateSiteCallback): void; + + /** + * Calls CreateSite. + * @param request CreateSiteRequest message or plain object + * @returns Promise + */ + public createSite(request: google.ads.admanager.v1.ICreateSiteRequest): Promise; + + /** + * Calls BatchCreateSites. + * @param request BatchCreateSitesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateSitesResponse + */ + public batchCreateSites(request: google.ads.admanager.v1.IBatchCreateSitesRequest, callback: google.ads.admanager.v1.SiteService.BatchCreateSitesCallback): void; + + /** + * Calls BatchCreateSites. + * @param request BatchCreateSitesRequest message or plain object + * @returns Promise + */ + public batchCreateSites(request: google.ads.admanager.v1.IBatchCreateSitesRequest): Promise; + + /** + * Calls UpdateSite. + * @param request UpdateSiteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Site + */ + public updateSite(request: google.ads.admanager.v1.IUpdateSiteRequest, callback: google.ads.admanager.v1.SiteService.UpdateSiteCallback): void; + + /** + * Calls UpdateSite. + * @param request UpdateSiteRequest message or plain object + * @returns Promise + */ + public updateSite(request: google.ads.admanager.v1.IUpdateSiteRequest): Promise; + + /** + * Calls BatchUpdateSites. + * @param request BatchUpdateSitesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateSitesResponse + */ + public batchUpdateSites(request: google.ads.admanager.v1.IBatchUpdateSitesRequest, callback: google.ads.admanager.v1.SiteService.BatchUpdateSitesCallback): void; + + /** + * Calls BatchUpdateSites. + * @param request BatchUpdateSitesRequest message or plain object + * @returns Promise + */ + public batchUpdateSites(request: google.ads.admanager.v1.IBatchUpdateSitesRequest): Promise; + + /** + * Calls BatchDeactivateSites. + * @param request BatchDeactivateSitesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchDeactivateSitesResponse + */ + public batchDeactivateSites(request: google.ads.admanager.v1.IBatchDeactivateSitesRequest, callback: google.ads.admanager.v1.SiteService.BatchDeactivateSitesCallback): void; + + /** + * Calls BatchDeactivateSites. + * @param request BatchDeactivateSitesRequest message or plain object + * @returns Promise + */ + public batchDeactivateSites(request: google.ads.admanager.v1.IBatchDeactivateSitesRequest): Promise; + + /** + * Calls BatchSubmitSitesForApproval. + * @param request BatchSubmitSitesForApprovalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchSubmitSitesForApprovalResponse + */ + public batchSubmitSitesForApproval(request: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, callback: google.ads.admanager.v1.SiteService.BatchSubmitSitesForApprovalCallback): void; + + /** + * Calls BatchSubmitSitesForApproval. + * @param request BatchSubmitSitesForApprovalRequest message or plain object + * @returns Promise + */ + public batchSubmitSitesForApproval(request: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest): Promise; + } + + namespace SiteService { + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|getSite}. + * @param error Error, if any + * @param [response] Site + */ + type GetSiteCallback = (error: (Error|null), response?: google.ads.admanager.v1.Site) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|listSites}. + * @param error Error, if any + * @param [response] ListSitesResponse + */ + type ListSitesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListSitesResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|createSite}. + * @param error Error, if any + * @param [response] Site + */ + type CreateSiteCallback = (error: (Error|null), response?: google.ads.admanager.v1.Site) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchCreateSites}. + * @param error Error, if any + * @param [response] BatchCreateSitesResponse + */ + type BatchCreateSitesCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateSitesResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|updateSite}. + * @param error Error, if any + * @param [response] Site + */ + type UpdateSiteCallback = (error: (Error|null), response?: google.ads.admanager.v1.Site) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchUpdateSites}. + * @param error Error, if any + * @param [response] BatchUpdateSitesResponse + */ + type BatchUpdateSitesCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateSitesResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchDeactivateSites}. + * @param error Error, if any + * @param [response] BatchDeactivateSitesResponse + */ + type BatchDeactivateSitesCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchDeactivateSitesResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchSubmitSitesForApproval}. + * @param error Error, if any + * @param [response] BatchSubmitSitesForApprovalResponse + */ + type BatchSubmitSitesForApprovalCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse) => void; + } + + /** Properties of a GetSiteRequest. */ + interface IGetSiteRequest { + + /** GetSiteRequest name */ + name?: (string|null); + } + + /** Represents a GetSiteRequest. */ + class GetSiteRequest implements IGetSiteRequest { + + /** + * Constructs a new GetSiteRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IGetSiteRequest); + + /** GetSiteRequest name. */ + public name: string; + + /** + * Creates a new GetSiteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSiteRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IGetSiteRequest): google.ads.admanager.v1.GetSiteRequest; + + /** + * Encodes the specified GetSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.GetSiteRequest.verify|verify} messages. + * @param message GetSiteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IGetSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetSiteRequest.verify|verify} messages. + * @param message GetSiteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IGetSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSiteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSiteRequest + * @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.ads.admanager.v1.GetSiteRequest; + + /** + * Decodes a GetSiteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSiteRequest + * @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.ads.admanager.v1.GetSiteRequest; + + /** + * Verifies a GetSiteRequest 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 GetSiteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSiteRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetSiteRequest; + + /** + * Creates a plain object from a GetSiteRequest message. Also converts values to other types if specified. + * @param message GetSiteRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.GetSiteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSiteRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSiteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSitesRequest. */ + interface IListSitesRequest { + + /** ListSitesRequest parent */ + parent?: (string|null); + + /** ListSitesRequest pageSize */ + pageSize?: (number|null); + + /** ListSitesRequest pageToken */ + pageToken?: (string|null); + + /** ListSitesRequest filter */ + filter?: (string|null); + + /** ListSitesRequest orderBy */ + orderBy?: (string|null); + + /** ListSitesRequest skip */ + skip?: (number|null); + } + + /** Represents a ListSitesRequest. */ + class ListSitesRequest implements IListSitesRequest { + + /** + * Constructs a new ListSitesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListSitesRequest); + + /** ListSitesRequest parent. */ + public parent: string; + + /** ListSitesRequest pageSize. */ + public pageSize: number; + + /** ListSitesRequest pageToken. */ + public pageToken: string; + + /** ListSitesRequest filter. */ + public filter: string; + + /** ListSitesRequest orderBy. */ + public orderBy: string; + + /** ListSitesRequest skip. */ + public skip: number; + + /** + * Creates a new ListSitesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSitesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IListSitesRequest): google.ads.admanager.v1.ListSitesRequest; + + /** + * Encodes the specified ListSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListSitesRequest.verify|verify} messages. + * @param message ListSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListSitesRequest.verify|verify} messages. + * @param message ListSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSitesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSitesRequest + * @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.ads.admanager.v1.ListSitesRequest; + + /** + * Decodes a ListSitesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSitesRequest + * @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.ads.admanager.v1.ListSitesRequest; + + /** + * Verifies a ListSitesRequest 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 ListSitesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSitesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListSitesRequest; - /** MetricValueType enum. */ - enum MetricValueType { - PRIMARY = 0, - PRIMARY_PERCENT_OF_TOTAL = 1, - COMPARISON = 2, - COMPARISON_PERCENT_OF_TOTAL = 3, - ABSOLUTE_CHANGE = 4, - RELATIVE_CHANGE = 5 - } + /** + * Creates a plain object from a ListSitesRequest message. Also converts values to other types if specified. + * @param message ListSitesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListSitesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ReportType enum. */ - enum ReportType { - REPORT_TYPE_UNSPECIFIED = 0, - HISTORICAL = 1 - } + /** + * Converts this ListSitesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Visibility enum. */ - enum Visibility { - HIDDEN = 0, - DRAFT = 1, - SAVED = 2 - } + /** + * Gets the default type url for ListSitesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** TimeZoneSource enum. */ - enum TimeZoneSource { - TIME_ZONE_SOURCE_UNSPECIFIED = 0, - PUBLISHER = 1, - AD_EXCHANGE = 2, - UTC = 3, - PROVIDED = 4 - } + /** Properties of a ListSitesResponse. */ + interface IListSitesResponse { + + /** ListSitesResponse sites */ + sites?: (google.ads.admanager.v1.ISite[]|null); + + /** ListSitesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListSitesResponse totalSize */ + totalSize?: (number|null); } - /** Properties of a ReportDefinition. */ - interface IReportDefinition { + /** Represents a ListSitesResponse. */ + class ListSitesResponse implements IListSitesResponse { - /** ReportDefinition dimensions */ - dimensions?: (google.ads.admanager.v1.Report.Dimension[]|null); + /** + * Constructs a new ListSitesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IListSitesResponse); - /** ReportDefinition metrics */ - metrics?: (google.ads.admanager.v1.Report.Metric[]|null); + /** ListSitesResponse sites. */ + public sites: google.ads.admanager.v1.ISite[]; - /** ReportDefinition filters */ - filters?: (google.ads.admanager.v1.Report.IFilter[]|null); + /** ListSitesResponse nextPageToken. */ + public nextPageToken: string; - /** ReportDefinition timeZoneSource */ - timeZoneSource?: (google.ads.admanager.v1.Report.TimeZoneSource|keyof typeof google.ads.admanager.v1.Report.TimeZoneSource|null); + /** ListSitesResponse totalSize. */ + public totalSize: number; - /** ReportDefinition timeZone */ - timeZone?: (string|null); + /** + * Creates a new ListSitesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSitesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IListSitesResponse): google.ads.admanager.v1.ListSitesResponse; - /** ReportDefinition currencyCode */ - currencyCode?: (string|null); + /** + * Encodes the specified ListSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListSitesResponse.verify|verify} messages. + * @param message ListSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IListSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReportDefinition dateRange */ - dateRange?: (google.ads.admanager.v1.Report.IDateRange|null); + /** + * Encodes the specified ListSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListSitesResponse.verify|verify} messages. + * @param message ListSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IListSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReportDefinition comparisonDateRange */ - comparisonDateRange?: (google.ads.admanager.v1.Report.IDateRange|null); + /** + * Decodes a ListSitesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSitesResponse + * @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.ads.admanager.v1.ListSitesResponse; - /** ReportDefinition customDimensionKeyIds */ - customDimensionKeyIds?: ((number|Long|string)[]|null); + /** + * Decodes a ListSitesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSitesResponse + * @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.ads.admanager.v1.ListSitesResponse; - /** ReportDefinition lineItemCustomFieldIds */ - lineItemCustomFieldIds?: ((number|Long|string)[]|null); + /** + * Verifies a ListSitesResponse 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); - /** ReportDefinition orderCustomFieldIds */ - orderCustomFieldIds?: ((number|Long|string)[]|null); + /** + * Creates a ListSitesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSitesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListSitesResponse; - /** ReportDefinition creativeCustomFieldIds */ - creativeCustomFieldIds?: ((number|Long|string)[]|null); + /** + * Creates a plain object from a ListSitesResponse message. Also converts values to other types if specified. + * @param message ListSitesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.ListSitesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ReportDefinition reportType */ - reportType?: (google.ads.admanager.v1.Report.ReportType|keyof typeof google.ads.admanager.v1.Report.ReportType|null); + /** + * Converts this ListSitesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReportDefinition timePeriodColumn */ - timePeriodColumn?: (google.ads.admanager.v1.Report.TimePeriodColumn|keyof typeof google.ads.admanager.v1.Report.TimePeriodColumn|null); + /** + * Gets the default type url for ListSitesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ReportDefinition flags */ - flags?: (google.ads.admanager.v1.Report.IFlag[]|null); + /** Properties of a CreateSiteRequest. */ + interface ICreateSiteRequest { - /** ReportDefinition sorts */ - sorts?: (google.ads.admanager.v1.Report.ISort[]|null); + /** CreateSiteRequest parent */ + parent?: (string|null); + + /** CreateSiteRequest site */ + site?: (google.ads.admanager.v1.ISite|null); } - /** Represents a ReportDefinition. */ - class ReportDefinition implements IReportDefinition { + /** Represents a CreateSiteRequest. */ + class CreateSiteRequest implements ICreateSiteRequest { /** - * Constructs a new ReportDefinition. + * Constructs a new CreateSiteRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IReportDefinition); + constructor(properties?: google.ads.admanager.v1.ICreateSiteRequest); - /** ReportDefinition dimensions. */ - public dimensions: google.ads.admanager.v1.Report.Dimension[]; + /** CreateSiteRequest parent. */ + public parent: string; - /** ReportDefinition metrics. */ - public metrics: google.ads.admanager.v1.Report.Metric[]; + /** CreateSiteRequest site. */ + public site?: (google.ads.admanager.v1.ISite|null); - /** ReportDefinition filters. */ - public filters: google.ads.admanager.v1.Report.IFilter[]; + /** + * Creates a new CreateSiteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSiteRequest instance + */ + public static create(properties?: google.ads.admanager.v1.ICreateSiteRequest): google.ads.admanager.v1.CreateSiteRequest; - /** ReportDefinition timeZoneSource. */ - public timeZoneSource: (google.ads.admanager.v1.Report.TimeZoneSource|keyof typeof google.ads.admanager.v1.Report.TimeZoneSource); + /** + * Encodes the specified CreateSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateSiteRequest.verify|verify} messages. + * @param message CreateSiteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.ICreateSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReportDefinition timeZone. */ - public timeZone: string; + /** + * Encodes the specified CreateSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateSiteRequest.verify|verify} messages. + * @param message CreateSiteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.ICreateSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReportDefinition currencyCode. */ - public currencyCode: string; + /** + * Decodes a CreateSiteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSiteRequest + * @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.ads.admanager.v1.CreateSiteRequest; - /** ReportDefinition dateRange. */ - public dateRange?: (google.ads.admanager.v1.Report.IDateRange|null); + /** + * Decodes a CreateSiteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSiteRequest + * @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.ads.admanager.v1.CreateSiteRequest; - /** ReportDefinition comparisonDateRange. */ - public comparisonDateRange?: (google.ads.admanager.v1.Report.IDateRange|null); + /** + * Verifies a CreateSiteRequest 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); - /** ReportDefinition customDimensionKeyIds. */ - public customDimensionKeyIds: (number|Long|string)[]; + /** + * Creates a CreateSiteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSiteRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateSiteRequest; - /** ReportDefinition lineItemCustomFieldIds. */ - public lineItemCustomFieldIds: (number|Long|string)[]; + /** + * Creates a plain object from a CreateSiteRequest message. Also converts values to other types if specified. + * @param message CreateSiteRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.CreateSiteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ReportDefinition orderCustomFieldIds. */ - public orderCustomFieldIds: (number|Long|string)[]; + /** + * Converts this CreateSiteRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReportDefinition creativeCustomFieldIds. */ - public creativeCustomFieldIds: (number|Long|string)[]; + /** + * Gets the default type url for CreateSiteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ReportDefinition reportType. */ - public reportType: (google.ads.admanager.v1.Report.ReportType|keyof typeof google.ads.admanager.v1.Report.ReportType); + /** Properties of a BatchCreateSitesRequest. */ + interface IBatchCreateSitesRequest { - /** ReportDefinition timePeriodColumn. */ - public timePeriodColumn: (google.ads.admanager.v1.Report.TimePeriodColumn|keyof typeof google.ads.admanager.v1.Report.TimePeriodColumn); + /** BatchCreateSitesRequest parent */ + parent?: (string|null); + + /** BatchCreateSitesRequest requests */ + requests?: (google.ads.admanager.v1.ICreateSiteRequest[]|null); + } + + /** Represents a BatchCreateSitesRequest. */ + class BatchCreateSitesRequest implements IBatchCreateSitesRequest { + + /** + * Constructs a new BatchCreateSitesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreateSitesRequest); + + /** BatchCreateSitesRequest parent. */ + public parent: string; + + /** BatchCreateSitesRequest requests. */ + public requests: google.ads.admanager.v1.ICreateSiteRequest[]; + + /** + * Creates a new BatchCreateSitesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateSitesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreateSitesRequest): google.ads.admanager.v1.BatchCreateSitesRequest; + + /** + * Encodes the specified BatchCreateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesRequest.verify|verify} messages. + * @param message BatchCreateSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesRequest.verify|verify} messages. + * @param message BatchCreateSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateSitesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateSitesRequest + * @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.ads.admanager.v1.BatchCreateSitesRequest; + + /** + * Decodes a BatchCreateSitesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateSitesRequest + * @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.ads.admanager.v1.BatchCreateSitesRequest; + + /** + * Verifies a BatchCreateSitesRequest 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 BatchCreateSitesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateSitesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateSitesRequest; + + /** + * Creates a plain object from a BatchCreateSitesRequest message. Also converts values to other types if specified. + * @param message BatchCreateSitesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreateSitesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateSitesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateSitesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateSitesResponse. */ + interface IBatchCreateSitesResponse { + + /** BatchCreateSitesResponse sites */ + sites?: (google.ads.admanager.v1.ISite[]|null); + } + + /** Represents a BatchCreateSitesResponse. */ + class BatchCreateSitesResponse implements IBatchCreateSitesResponse { + + /** + * Constructs a new BatchCreateSitesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchCreateSitesResponse); + + /** BatchCreateSitesResponse sites. */ + public sites: google.ads.admanager.v1.ISite[]; + + /** + * Creates a new BatchCreateSitesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateSitesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchCreateSitesResponse): google.ads.admanager.v1.BatchCreateSitesResponse; + + /** + * Encodes the specified BatchCreateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesResponse.verify|verify} messages. + * @param message BatchCreateSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchCreateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesResponse.verify|verify} messages. + * @param message BatchCreateSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateSitesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateSitesResponse + * @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.ads.admanager.v1.BatchCreateSitesResponse; + + /** + * Decodes a BatchCreateSitesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateSitesResponse + * @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.ads.admanager.v1.BatchCreateSitesResponse; + + /** + * Verifies a BatchCreateSitesResponse 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 BatchCreateSitesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateSitesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateSitesResponse; + + /** + * Creates a plain object from a BatchCreateSitesResponse message. Also converts values to other types if specified. + * @param message BatchCreateSitesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchCreateSitesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateSitesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateSitesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSiteRequest. */ + interface IUpdateSiteRequest { + + /** UpdateSiteRequest site */ + site?: (google.ads.admanager.v1.ISite|null); + + /** UpdateSiteRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSiteRequest. */ + class UpdateSiteRequest implements IUpdateSiteRequest { + + /** + * Constructs a new UpdateSiteRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IUpdateSiteRequest); - /** ReportDefinition flags. */ - public flags: google.ads.admanager.v1.Report.IFlag[]; + /** UpdateSiteRequest site. */ + public site?: (google.ads.admanager.v1.ISite|null); - /** ReportDefinition sorts. */ - public sorts: google.ads.admanager.v1.Report.ISort[]; + /** UpdateSiteRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ReportDefinition instance using the specified properties. + * Creates a new UpdateSiteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReportDefinition instance + * @returns UpdateSiteRequest instance */ - public static create(properties?: google.ads.admanager.v1.IReportDefinition): google.ads.admanager.v1.ReportDefinition; + public static create(properties?: google.ads.admanager.v1.IUpdateSiteRequest): google.ads.admanager.v1.UpdateSiteRequest; /** - * Encodes the specified ReportDefinition message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. - * @param message ReportDefinition message or plain object to encode + * Encodes the specified UpdateSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateSiteRequest.verify|verify} messages. + * @param message UpdateSiteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IUpdateSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. - * @param message ReportDefinition message or plain object to encode + * Encodes the specified UpdateSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateSiteRequest.verify|verify} messages. + * @param message UpdateSiteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateSiteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReportDefinition message from the specified reader or buffer. + * Decodes an UpdateSiteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReportDefinition + * @returns UpdateSiteRequest * @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.ads.admanager.v1.ReportDefinition; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.UpdateSiteRequest; /** - * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * Decodes an UpdateSiteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReportDefinition + * @returns UpdateSiteRequest * @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.ads.admanager.v1.ReportDefinition; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.UpdateSiteRequest; /** - * Verifies a ReportDefinition message. + * Verifies an UpdateSiteRequest 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 ReportDefinition message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSiteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReportDefinition + * @returns UpdateSiteRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ReportDefinition; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateSiteRequest; /** - * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. - * @param message ReportDefinition + * Creates a plain object from an UpdateSiteRequest message. Also converts values to other types if specified. + * @param message UpdateSiteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.UpdateSiteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReportDefinition to JSON. + * Converts this UpdateSiteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReportDefinition + * Gets the default type url for UpdateSiteRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ScheduleOptions. */ - interface IScheduleOptions { - - /** ScheduleOptions schedule */ - schedule?: (google.ads.admanager.v1.ISchedule|null); + /** Properties of a BatchUpdateSitesRequest. */ + interface IBatchUpdateSitesRequest { - /** ScheduleOptions deliveryCondition */ - deliveryCondition?: (google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|keyof typeof google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|null); + /** BatchUpdateSitesRequest parent */ + parent?: (string|null); - /** ScheduleOptions flags */ - flags?: (google.ads.admanager.v1.Report.IFlag[]|null); + /** BatchUpdateSitesRequest requests */ + requests?: (google.ads.admanager.v1.IUpdateSiteRequest[]|null); } - /** Represents a ScheduleOptions. */ - class ScheduleOptions implements IScheduleOptions { + /** Represents a BatchUpdateSitesRequest. */ + class BatchUpdateSitesRequest implements IBatchUpdateSitesRequest { /** - * Constructs a new ScheduleOptions. + * Constructs a new BatchUpdateSitesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IScheduleOptions); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateSitesRequest); - /** ScheduleOptions schedule. */ - public schedule?: (google.ads.admanager.v1.ISchedule|null); - - /** ScheduleOptions deliveryCondition. */ - public deliveryCondition: (google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|keyof typeof google.ads.admanager.v1.ScheduleOptions.DeliveryCondition); + /** BatchUpdateSitesRequest parent. */ + public parent: string; - /** ScheduleOptions flags. */ - public flags: google.ads.admanager.v1.Report.IFlag[]; + /** BatchUpdateSitesRequest requests. */ + public requests: google.ads.admanager.v1.IUpdateSiteRequest[]; /** - * Creates a new ScheduleOptions instance using the specified properties. + * Creates a new BatchUpdateSitesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ScheduleOptions instance + * @returns BatchUpdateSitesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IScheduleOptions): google.ads.admanager.v1.ScheduleOptions; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateSitesRequest): google.ads.admanager.v1.BatchUpdateSitesRequest; /** - * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. - * @param message ScheduleOptions message or plain object to encode + * Encodes the specified BatchUpdateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesRequest.verify|verify} messages. + * @param message BatchUpdateSitesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. - * @param message ScheduleOptions message or plain object to encode + * Encodes the specified BatchUpdateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesRequest.verify|verify} messages. + * @param message BatchUpdateSitesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ScheduleOptions message from the specified reader or buffer. + * Decodes a BatchUpdateSitesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ScheduleOptions + * @returns BatchUpdateSitesRequest * @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.ads.admanager.v1.ScheduleOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateSitesRequest; /** - * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateSitesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ScheduleOptions + * @returns BatchUpdateSitesRequest * @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.ads.admanager.v1.ScheduleOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateSitesRequest; /** - * Verifies a ScheduleOptions message. + * Verifies a BatchUpdateSitesRequest 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 ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateSitesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ScheduleOptions + * @returns BatchUpdateSitesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ScheduleOptions; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateSitesRequest; /** - * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. - * @param message ScheduleOptions + * Creates a plain object from a BatchUpdateSitesRequest message. Also converts values to other types if specified. + * @param message BatchUpdateSitesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ScheduleOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateSitesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ScheduleOptions to JSON. + * Converts this BatchUpdateSitesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ScheduleOptions + * Gets the default type url for BatchUpdateSitesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ScheduleOptions { - - /** DeliveryCondition enum. */ - enum DeliveryCondition { - NEVER = 0, - ALWAYS = 1, - WHEN_FLAG_CONDITIONS_MET = 2 - } - } - - /** Properties of a Schedule. */ - interface ISchedule { + /** Properties of a BatchUpdateSitesResponse. */ + interface IBatchUpdateSitesResponse { - /** Schedule weeklySchedule */ - weeklySchedule?: (google.ads.admanager.v1.Schedule.IWeeklySchedule|null); - - /** Schedule monthlySchedule */ - monthlySchedule?: (google.ads.admanager.v1.Schedule.IMonthlySchedule|null); - - /** Schedule startDate */ - startDate?: (google.type.IDate|null); - - /** Schedule endDate */ - endDate?: (google.type.IDate|null); - - /** Schedule frequency */ - frequency?: (google.ads.admanager.v1.Schedule.Frequency|keyof typeof google.ads.admanager.v1.Schedule.Frequency|null); - - /** Schedule startTime */ - startTime?: (google.type.ITimeOfDay|null); + /** BatchUpdateSitesResponse sites */ + sites?: (google.ads.admanager.v1.ISite[]|null); } - /** Represents a Schedule. */ - class Schedule implements ISchedule { + /** Represents a BatchUpdateSitesResponse. */ + class BatchUpdateSitesResponse implements IBatchUpdateSitesResponse { /** - * Constructs a new Schedule. + * Constructs a new BatchUpdateSitesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ISchedule); - - /** Schedule weeklySchedule. */ - public weeklySchedule?: (google.ads.admanager.v1.Schedule.IWeeklySchedule|null); - - /** Schedule monthlySchedule. */ - public monthlySchedule?: (google.ads.admanager.v1.Schedule.IMonthlySchedule|null); - - /** Schedule startDate. */ - public startDate?: (google.type.IDate|null); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateSitesResponse); - /** Schedule endDate. */ - public endDate?: (google.type.IDate|null); - - /** Schedule frequency. */ - public frequency: (google.ads.admanager.v1.Schedule.Frequency|keyof typeof google.ads.admanager.v1.Schedule.Frequency); - - /** Schedule startTime. */ - public startTime?: (google.type.ITimeOfDay|null); - - /** Schedule frequencySchedule. */ - public frequencySchedule?: ("weeklySchedule"|"monthlySchedule"); + /** BatchUpdateSitesResponse sites. */ + public sites: google.ads.admanager.v1.ISite[]; /** - * Creates a new Schedule instance using the specified properties. + * Creates a new BatchUpdateSitesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Schedule instance + * @returns BatchUpdateSitesResponse instance */ - public static create(properties?: google.ads.admanager.v1.ISchedule): google.ads.admanager.v1.Schedule; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateSitesResponse): google.ads.admanager.v1.BatchUpdateSitesResponse; /** - * Encodes the specified Schedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode + * Encodes the specified BatchUpdateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesResponse.verify|verify} messages. + * @param message BatchUpdateSitesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode + * Encodes the specified BatchUpdateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesResponse.verify|verify} messages. + * @param message BatchUpdateSitesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Schedule message from the specified reader or buffer. + * Decodes a BatchUpdateSitesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Schedule + * @returns BatchUpdateSitesResponse * @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.ads.admanager.v1.Schedule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateSitesResponse; /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateSitesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Schedule + * @returns BatchUpdateSitesResponse * @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.ads.admanager.v1.Schedule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateSitesResponse; /** - * Verifies a Schedule message. + * Verifies a BatchUpdateSitesResponse 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 Schedule message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateSitesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Schedule + * @returns BatchUpdateSitesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Schedule; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateSitesResponse; /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @param message Schedule + * Creates a plain object from a BatchUpdateSitesResponse message. Also converts values to other types if specified. + * @param message BatchUpdateSitesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateSitesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Schedule to JSON. + * Converts this BatchUpdateSitesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Schedule + * Gets the default type url for BatchUpdateSitesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Schedule { + /** Properties of a BatchDeactivateSitesRequest. */ + interface IBatchDeactivateSitesRequest { - /** Properties of a WeeklySchedule. */ - interface IWeeklySchedule { + /** BatchDeactivateSitesRequest parent */ + parent?: (string|null); - /** WeeklySchedule weeklyScheduledDays */ - weeklyScheduledDays?: (google.type.DayOfWeek[]|null); - } + /** BatchDeactivateSitesRequest names */ + names?: (string[]|null); + } - /** Represents a WeeklySchedule. */ - class WeeklySchedule implements IWeeklySchedule { + /** Represents a BatchDeactivateSitesRequest. */ + class BatchDeactivateSitesRequest implements IBatchDeactivateSitesRequest { - /** - * Constructs a new WeeklySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Schedule.IWeeklySchedule); + /** + * Constructs a new BatchDeactivateSitesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateSitesRequest); - /** WeeklySchedule weeklyScheduledDays. */ - public weeklyScheduledDays: google.type.DayOfWeek[]; + /** BatchDeactivateSitesRequest parent. */ + public parent: string; - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns WeeklySchedule instance - */ - public static create(properties?: google.ads.admanager.v1.Schedule.IWeeklySchedule): google.ads.admanager.v1.Schedule.WeeklySchedule; + /** BatchDeactivateSitesRequest names. */ + public names: string[]; - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Schedule.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BatchDeactivateSitesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeactivateSitesRequest instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateSitesRequest): google.ads.admanager.v1.BatchDeactivateSitesRequest; - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Schedule.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified BatchDeactivateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesRequest.verify|verify} messages. + * @param message BatchDeactivateSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchDeactivateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeeklySchedule - * @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.ads.admanager.v1.Schedule.WeeklySchedule; + /** + * Encodes the specified BatchDeactivateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesRequest.verify|verify} messages. + * @param message BatchDeactivateSitesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateSitesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeeklySchedule - * @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.ads.admanager.v1.Schedule.WeeklySchedule; + /** + * Decodes a BatchDeactivateSitesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeactivateSitesRequest + * @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.ads.admanager.v1.BatchDeactivateSitesRequest; - /** - * Verifies a WeeklySchedule 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 BatchDeactivateSitesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeactivateSitesRequest + * @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.ads.admanager.v1.BatchDeactivateSitesRequest; - /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeeklySchedule - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Schedule.WeeklySchedule; + /** + * Verifies a BatchDeactivateSitesRequest 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 WeeklySchedule message. Also converts values to other types if specified. - * @param message WeeklySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Schedule.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a BatchDeactivateSitesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeactivateSitesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateSitesRequest; - /** - * Converts this WeeklySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a BatchDeactivateSitesRequest message. Also converts values to other types if specified. + * @param message BatchDeactivateSitesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchDeactivateSitesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for WeeklySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this BatchDeactivateSitesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a MonthlySchedule. */ - interface IMonthlySchedule { + /** + * Gets the default type url for BatchDeactivateSitesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MonthlySchedule monthlyScheduledDays */ - monthlyScheduledDays?: (number[]|null); - } + /** Properties of a BatchDeactivateSitesResponse. */ + interface IBatchDeactivateSitesResponse { + } - /** Represents a MonthlySchedule. */ - class MonthlySchedule implements IMonthlySchedule { + /** Represents a BatchDeactivateSitesResponse. */ + class BatchDeactivateSitesResponse implements IBatchDeactivateSitesResponse { - /** - * Constructs a new MonthlySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.Schedule.IMonthlySchedule); + /** + * Constructs a new BatchDeactivateSitesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateSitesResponse); - /** MonthlySchedule monthlyScheduledDays. */ - public monthlyScheduledDays: number[]; + /** + * Creates a new BatchDeactivateSitesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeactivateSitesResponse instance + */ + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateSitesResponse): google.ads.admanager.v1.BatchDeactivateSitesResponse; - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns MonthlySchedule instance - */ - public static create(properties?: google.ads.admanager.v1.Schedule.IMonthlySchedule): google.ads.admanager.v1.Schedule.MonthlySchedule; + /** + * Encodes the specified BatchDeactivateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesResponse.verify|verify} messages. + * @param message BatchDeactivateSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IBatchDeactivateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.admanager.v1.Schedule.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified BatchDeactivateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesResponse.verify|verify} messages. + * @param message BatchDeactivateSitesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateSitesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.admanager.v1.Schedule.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a BatchDeactivateSitesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeactivateSitesResponse + * @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.ads.admanager.v1.BatchDeactivateSitesResponse; - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonthlySchedule - * @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.ads.admanager.v1.Schedule.MonthlySchedule; + /** + * Decodes a BatchDeactivateSitesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeactivateSitesResponse + * @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.ads.admanager.v1.BatchDeactivateSitesResponse; - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonthlySchedule - * @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.ads.admanager.v1.Schedule.MonthlySchedule; + /** + * Verifies a BatchDeactivateSitesResponse 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 MonthlySchedule 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 BatchDeactivateSitesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeactivateSitesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateSitesResponse; - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonthlySchedule - */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Schedule.MonthlySchedule; + /** + * Creates a plain object from a BatchDeactivateSitesResponse message. Also converts values to other types if specified. + * @param message BatchDeactivateSitesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.BatchDeactivateSitesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @param message MonthlySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.Schedule.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this BatchDeactivateSitesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this MonthlySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for BatchDeactivateSitesResponse + * @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 MonthlySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a BatchSubmitSitesForApprovalRequest. */ + interface IBatchSubmitSitesForApprovalRequest { - /** Frequency enum. */ - enum Frequency { - FREQUENCY_UNSPECIFIED = 0, - HOURLY = 1, - TWO_TIMES_DAILY = 2, - THREE_TIMES_DAILY = 3, - FOUR_TIMES_DAILY = 4, - DAILY = 5, - WEEKLY = 6, - MONTHLY = 7 - } + /** BatchSubmitSitesForApprovalRequest parent */ + parent?: (string|null); + + /** BatchSubmitSitesForApprovalRequest names */ + names?: (string[]|null); } - /** Represents a ReportService */ - class ReportService extends $protobuf.rpc.Service { + /** Represents a BatchSubmitSitesForApprovalRequest. */ + class BatchSubmitSitesForApprovalRequest implements IBatchSubmitSitesForApprovalRequest { /** - * Constructs a new ReportService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new BatchSubmitSitesForApprovalRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest); + + /** BatchSubmitSitesForApprovalRequest parent. */ + public parent: string; + + /** BatchSubmitSitesForApprovalRequest names. */ + public names: string[]; /** - * Creates new ReportService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new BatchSubmitSitesForApprovalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchSubmitSitesForApprovalRequest instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ReportService; + public static create(properties?: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest): google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest; /** - * Calls GetReport. - * @param request GetReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Report + * Encodes the specified BatchSubmitSitesForApprovalRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest.verify|verify} messages. + * @param message BatchSubmitSitesForApprovalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getReport(request: google.ads.admanager.v1.IGetReportRequest, callback: google.ads.admanager.v1.ReportService.GetReportCallback): void; + public static encode(message: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetReport. - * @param request GetReportRequest message or plain object - * @returns Promise + * Encodes the specified BatchSubmitSitesForApprovalRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest.verify|verify} messages. + * @param message BatchSubmitSitesForApprovalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getReport(request: google.ads.admanager.v1.IGetReportRequest): Promise; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListReports. - * @param request ListReportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListReportsResponse + * Decodes a BatchSubmitSitesForApprovalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchSubmitSitesForApprovalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listReports(request: google.ads.admanager.v1.IListReportsRequest, callback: google.ads.admanager.v1.ReportService.ListReportsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest; /** - * Calls ListReports. - * @param request ListReportsRequest message or plain object - * @returns Promise + * Decodes a BatchSubmitSitesForApprovalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchSubmitSitesForApprovalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listReports(request: google.ads.admanager.v1.IListReportsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest; /** - * Calls CreateReport. - * @param request CreateReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Report + * Verifies a BatchSubmitSitesForApprovalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createReport(request: google.ads.admanager.v1.ICreateReportRequest, callback: google.ads.admanager.v1.ReportService.CreateReportCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateReport. - * @param request CreateReportRequest message or plain object - * @returns Promise + * Creates a BatchSubmitSitesForApprovalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchSubmitSitesForApprovalRequest */ - public createReport(request: google.ads.admanager.v1.ICreateReportRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest; /** - * Calls UpdateReport. - * @param request UpdateReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Report + * Creates a plain object from a BatchSubmitSitesForApprovalRequest message. Also converts values to other types if specified. + * @param message BatchSubmitSitesForApprovalRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateReport(request: google.ads.admanager.v1.IUpdateReportRequest, callback: google.ads.admanager.v1.ReportService.UpdateReportCallback): void; + public static toObject(message: google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateReport. - * @param request UpdateReportRequest message or plain object - * @returns Promise + * Converts this BatchSubmitSitesForApprovalRequest to JSON. + * @returns JSON object */ - public updateReport(request: google.ads.admanager.v1.IUpdateReportRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for BatchSubmitSitesForApprovalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public runReport(request: google.ads.admanager.v1.IRunReportRequest, callback: google.ads.admanager.v1.ReportService.RunReportCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchSubmitSitesForApprovalResponse. */ + interface IBatchSubmitSitesForApprovalResponse { + } + + /** Represents a BatchSubmitSitesForApprovalResponse. */ + class BatchSubmitSitesForApprovalResponse implements IBatchSubmitSitesForApprovalResponse { /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @returns Promise + * Constructs a new BatchSubmitSitesForApprovalResponse. + * @param [properties] Properties to set */ - public runReport(request: google.ads.admanager.v1.IRunReportRequest): Promise; + constructor(properties?: google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse); /** - * Calls FetchReportResultRows. - * @param request FetchReportResultRowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchReportResultRowsResponse + * Creates a new BatchSubmitSitesForApprovalResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchSubmitSitesForApprovalResponse instance */ - public fetchReportResultRows(request: google.ads.admanager.v1.IFetchReportResultRowsRequest, callback: google.ads.admanager.v1.ReportService.FetchReportResultRowsCallback): void; + public static create(properties?: google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse): google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse; /** - * Calls FetchReportResultRows. - * @param request FetchReportResultRowsRequest message or plain object - * @returns Promise + * Encodes the specified BatchSubmitSitesForApprovalResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse.verify|verify} messages. + * @param message BatchSubmitSitesForApprovalResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public fetchReportResultRows(request: google.ads.admanager.v1.IFetchReportResultRowsRequest): Promise; - } + public static encode(message: google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - namespace ReportService { + /** + * Encodes the specified BatchSubmitSitesForApprovalResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse.verify|verify} messages. + * @param message BatchSubmitSitesForApprovalResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|getReport}. - * @param error Error, if any - * @param [response] Report + * Decodes a BatchSubmitSitesForApprovalResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchSubmitSitesForApprovalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|listReports}. - * @param error Error, if any - * @param [response] ListReportsResponse + * Decodes a BatchSubmitSitesForApprovalResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchSubmitSitesForApprovalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListReportsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListReportsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|createReport}. - * @param error Error, if any - * @param [response] Report + * Verifies a BatchSubmitSitesForApprovalResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|updateReport}. - * @param error Error, if any - * @param [response] Report + * Creates a BatchSubmitSitesForApprovalResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchSubmitSitesForApprovalResponse */ - type UpdateReportCallback = (error: (Error|null), response?: google.ads.admanager.v1.Report) => void; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|runReport}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a BatchSubmitSitesForApprovalResponse message. Also converts values to other types if specified. + * @param message BatchSubmitSitesForApprovalResponse + * @param [options] Conversion options + * @returns Plain object */ - type RunReportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|fetchReportResultRows}. - * @param error Error, if any - * @param [response] FetchReportResultRowsResponse + * Converts this BatchSubmitSitesForApprovalResponse to JSON. + * @returns JSON object */ - type FetchReportResultRowsCallback = (error: (Error|null), response?: google.ads.admanager.v1.FetchReportResultRowsResponse) => void; + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchSubmitSitesForApprovalResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RunReportRequest. */ - interface IRunReportRequest { + /** Properties of a TaxonomyCategory. */ + interface ITaxonomyCategory { - /** RunReportRequest name */ + /** TaxonomyCategory name */ name?: (string|null); + + /** TaxonomyCategory taxonomyCategoryId */ + taxonomyCategoryId?: (number|Long|string|null); + + /** TaxonomyCategory displayName */ + displayName?: (string|null); + + /** TaxonomyCategory groupingOnly */ + groupingOnly?: (boolean|null); + + /** TaxonomyCategory parentTaxonomyCategoryId */ + parentTaxonomyCategoryId?: (number|Long|string|null); + + /** TaxonomyCategory taxonomyType */ + taxonomyType?: (google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|keyof typeof google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null); + + /** TaxonomyCategory ancestorNames */ + ancestorNames?: (string[]|null); + + /** TaxonomyCategory ancestorTaxonomyCategoryIds */ + ancestorTaxonomyCategoryIds?: ((number|Long|string)[]|null); } - /** Represents a RunReportRequest. */ - class RunReportRequest implements IRunReportRequest { + /** Represents a TaxonomyCategory. */ + class TaxonomyCategory implements ITaxonomyCategory { /** - * Constructs a new RunReportRequest. + * Constructs a new TaxonomyCategory. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRunReportRequest); + constructor(properties?: google.ads.admanager.v1.ITaxonomyCategory); - /** RunReportRequest name. */ + /** TaxonomyCategory name. */ public name: string; + /** TaxonomyCategory taxonomyCategoryId. */ + public taxonomyCategoryId?: (number|Long|string|null); + + /** TaxonomyCategory displayName. */ + public displayName?: (string|null); + + /** TaxonomyCategory groupingOnly. */ + public groupingOnly?: (boolean|null); + + /** TaxonomyCategory parentTaxonomyCategoryId. */ + public parentTaxonomyCategoryId?: (number|Long|string|null); + + /** TaxonomyCategory taxonomyType. */ + public taxonomyType?: (google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|keyof typeof google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null); + + /** TaxonomyCategory ancestorNames. */ + public ancestorNames: string[]; + + /** TaxonomyCategory ancestorTaxonomyCategoryIds. */ + public ancestorTaxonomyCategoryIds: (number|Long|string)[]; + /** - * Creates a new RunReportRequest instance using the specified properties. + * Creates a new TaxonomyCategory instance using the specified properties. * @param [properties] Properties to set - * @returns RunReportRequest instance + * @returns TaxonomyCategory instance */ - public static create(properties?: google.ads.admanager.v1.IRunReportRequest): google.ads.admanager.v1.RunReportRequest; + public static create(properties?: google.ads.admanager.v1.ITaxonomyCategory): google.ads.admanager.v1.TaxonomyCategory; /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode + * Encodes the specified TaxonomyCategory message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * @param message TaxonomyCategory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITaxonomyCategory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode + * Encodes the specified TaxonomyCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * @param message TaxonomyCategory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITaxonomyCategory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunReportRequest message from the specified reader or buffer. + * Decodes a TaxonomyCategory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunReportRequest + * @returns TaxonomyCategory * @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.ads.admanager.v1.RunReportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TaxonomyCategory; /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * Decodes a TaxonomyCategory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunReportRequest + * @returns TaxonomyCategory * @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.ads.admanager.v1.RunReportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TaxonomyCategory; /** - * Verifies a RunReportRequest message. + * Verifies a TaxonomyCategory 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 RunReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TaxonomyCategory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunReportRequest + * @returns TaxonomyCategory */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TaxonomyCategory; /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. - * @param message RunReportRequest + * Creates a plain object from a TaxonomyCategory message. Also converts values to other types if specified. + * @param message TaxonomyCategory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TaxonomyCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunReportRequest to JSON. + * Converts this TaxonomyCategory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RunReportRequest + * Gets the default type url for TaxonomyCategory * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RunReportMetadata. */ - interface IRunReportMetadata { - - /** RunReportMetadata percentComplete */ - percentComplete?: (number|null); - - /** RunReportMetadata report */ - report?: (string|null); + /** Properties of a TaxonomyTypeEnum. */ + interface ITaxonomyTypeEnum { } - /** Represents a RunReportMetadata. */ - class RunReportMetadata implements IRunReportMetadata { + /** Represents a TaxonomyTypeEnum. */ + class TaxonomyTypeEnum implements ITaxonomyTypeEnum { /** - * Constructs a new RunReportMetadata. + * Constructs a new TaxonomyTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRunReportMetadata); - - /** RunReportMetadata percentComplete. */ - public percentComplete: number; - - /** RunReportMetadata report. */ - public report: string; + constructor(properties?: google.ads.admanager.v1.ITaxonomyTypeEnum); /** - * Creates a new RunReportMetadata instance using the specified properties. + * Creates a new TaxonomyTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns RunReportMetadata instance + * @returns TaxonomyTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IRunReportMetadata): google.ads.admanager.v1.RunReportMetadata; + public static create(properties?: google.ads.admanager.v1.ITaxonomyTypeEnum): google.ads.admanager.v1.TaxonomyTypeEnum; /** - * Encodes the specified RunReportMetadata message. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. - * @param message RunReportMetadata message or plain object to encode + * Encodes the specified TaxonomyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. + * @param message TaxonomyTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRunReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITaxonomyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunReportMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. - * @param message RunReportMetadata message or plain object to encode + * Encodes the specified TaxonomyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. + * @param message TaxonomyTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRunReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITaxonomyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunReportMetadata message from the specified reader or buffer. + * Decodes a TaxonomyTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunReportMetadata + * @returns TaxonomyTypeEnum * @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.ads.admanager.v1.RunReportMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TaxonomyTypeEnum; /** - * Decodes a RunReportMetadata message from the specified reader or buffer, length delimited. + * Decodes a TaxonomyTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunReportMetadata + * @returns TaxonomyTypeEnum * @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.ads.admanager.v1.RunReportMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TaxonomyTypeEnum; /** - * Verifies a RunReportMetadata message. + * Verifies a TaxonomyTypeEnum 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 RunReportMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TaxonomyTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunReportMetadata + * @returns TaxonomyTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportMetadata; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TaxonomyTypeEnum; /** - * Creates a plain object from a RunReportMetadata message. Also converts values to other types if specified. - * @param message RunReportMetadata + * Creates a plain object from a TaxonomyTypeEnum message. Also converts values to other types if specified. + * @param message TaxonomyTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.RunReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TaxonomyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunReportMetadata to JSON. + * Converts this TaxonomyTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RunReportMetadata + * Gets the default type url for TaxonomyTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RunReportResponse. */ - interface IRunReportResponse { + namespace TaxonomyTypeEnum { - /** RunReportResponse reportResult */ - reportResult?: (string|null); + /** TaxonomyType enum. */ + enum TaxonomyType { + TAXONOMY_TYPE_UNSPECIFIED = 0, + TAXONOMY_IAB_AUDIENCE_1_1 = 3, + TAXONOMY_IAB_CONTENT_1_0 = 8, + TAXONOMY_IAB_CONTENT_2_1 = 4, + TAXONOMY_IAB_CONTENT_2_2 = 6, + TAXONOMY_IAB_CONTENT_3_0 = 5, + TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 = 7 + } } - /** Represents a RunReportResponse. */ - class RunReportResponse implements IRunReportResponse { - - /** - * Constructs a new RunReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.admanager.v1.IRunReportResponse); - - /** RunReportResponse reportResult. */ - public reportResult: string; - - /** - * Creates a new RunReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunReportResponse instance - */ - public static create(properties?: google.ads.admanager.v1.IRunReportResponse): google.ads.admanager.v1.RunReportResponse; + /** Represents a TaxonomyCategoryService */ + class TaxonomyCategoryService extends $protobuf.rpc.Service { /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Constructs a new TaxonomyCategoryService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static encode(message: google.ads.admanager.v1.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Creates new TaxonomyCategoryService 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 encodeDelimited(message: google.ads.admanager.v1.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TaxonomyCategoryService; /** - * Decodes a RunReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetTaxonomyCategory. + * @param request GetTaxonomyCategoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TaxonomyCategory */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.RunReportResponse; + public getTaxonomyCategory(request: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, callback: google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategoryCallback): void; /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetTaxonomyCategory. + * @param request GetTaxonomyCategoryRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.RunReportResponse; + public getTaxonomyCategory(request: google.ads.admanager.v1.IGetTaxonomyCategoryRequest): Promise; /** - * Verifies a RunReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListTaxonomyCategories. + * @param request ListTaxonomyCategoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTaxonomyCategoriesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listTaxonomyCategories(request: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, callback: google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategoriesCallback): void; /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunReportResponse + * Calls ListTaxonomyCategories. + * @param request ListTaxonomyCategoriesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RunReportResponse; + public listTaxonomyCategories(request: google.ads.admanager.v1.IListTaxonomyCategoriesRequest): Promise; + } - /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. - * @param message RunReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.admanager.v1.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace TaxonomyCategoryService { /** - * Converts this RunReportResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|getTaxonomyCategory}. + * @param error Error, if any + * @param [response] TaxonomyCategory */ - public toJSON(): { [k: string]: any }; + type GetTaxonomyCategoryCallback = (error: (Error|null), response?: google.ads.admanager.v1.TaxonomyCategory) => void; /** - * Gets the default type url for RunReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|listTaxonomyCategories}. + * @param error Error, if any + * @param [response] ListTaxonomyCategoriesResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ListTaxonomyCategoriesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListTaxonomyCategoriesResponse) => void; } - /** Properties of a GetReportRequest. */ - interface IGetReportRequest { + /** Properties of a GetTaxonomyCategoryRequest. */ + interface IGetTaxonomyCategoryRequest { - /** GetReportRequest name */ + /** GetTaxonomyCategoryRequest name */ name?: (string|null); } - /** Represents a GetReportRequest. */ - class GetReportRequest implements IGetReportRequest { + /** Represents a GetTaxonomyCategoryRequest. */ + class GetTaxonomyCategoryRequest implements IGetTaxonomyCategoryRequest { /** - * Constructs a new GetReportRequest. + * Constructs a new GetTaxonomyCategoryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetReportRequest); + constructor(properties?: google.ads.admanager.v1.IGetTaxonomyCategoryRequest); - /** GetReportRequest name. */ + /** GetTaxonomyCategoryRequest name. */ public name: string; /** - * Creates a new GetReportRequest instance using the specified properties. + * Creates a new GetTaxonomyCategoryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetReportRequest instance + * @returns GetTaxonomyCategoryRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetReportRequest): google.ads.admanager.v1.GetReportRequest; + public static create(properties?: google.ads.admanager.v1.IGetTaxonomyCategoryRequest): google.ads.admanager.v1.GetTaxonomyCategoryRequest; /** - * Encodes the specified GetReportRequest message. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. - * @param message GetReportRequest message or plain object to encode + * Encodes the specified GetTaxonomyCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. + * @param message GetTaxonomyCategoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. - * @param message GetReportRequest message or plain object to encode + * Encodes the specified GetTaxonomyCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. + * @param message GetTaxonomyCategoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetReportRequest message from the specified reader or buffer. + * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetReportRequest + * @returns GetTaxonomyCategoryRequest * @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.ads.admanager.v1.GetReportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetTaxonomyCategoryRequest; /** - * Decodes a GetReportRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetReportRequest + * @returns GetTaxonomyCategoryRequest * @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.ads.admanager.v1.GetReportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetTaxonomyCategoryRequest; /** - * Verifies a GetReportRequest message. + * Verifies a GetTaxonomyCategoryRequest 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 GetReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaxonomyCategoryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetReportRequest + * @returns GetTaxonomyCategoryRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetReportRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetTaxonomyCategoryRequest; /** - * Creates a plain object from a GetReportRequest message. Also converts values to other types if specified. - * @param message GetReportRequest + * Creates a plain object from a GetTaxonomyCategoryRequest message. Also converts values to other types if specified. + * @param message GetTaxonomyCategoryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetTaxonomyCategoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetReportRequest to JSON. + * Converts this GetTaxonomyCategoryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetReportRequest + * Gets the default type url for GetTaxonomyCategoryRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListReportsRequest. */ - interface IListReportsRequest { + /** Properties of a ListTaxonomyCategoriesRequest. */ + interface IListTaxonomyCategoriesRequest { - /** ListReportsRequest parent */ + /** ListTaxonomyCategoriesRequest parent */ parent?: (string|null); - /** ListReportsRequest pageSize */ + /** ListTaxonomyCategoriesRequest pageSize */ pageSize?: (number|null); - /** ListReportsRequest pageToken */ + /** ListTaxonomyCategoriesRequest pageToken */ pageToken?: (string|null); - /** ListReportsRequest filter */ + /** ListTaxonomyCategoriesRequest filter */ filter?: (string|null); - /** ListReportsRequest orderBy */ + /** ListTaxonomyCategoriesRequest orderBy */ orderBy?: (string|null); - /** ListReportsRequest skip */ + /** ListTaxonomyCategoriesRequest skip */ skip?: (number|null); } - /** Represents a ListReportsRequest. */ - class ListReportsRequest implements IListReportsRequest { + /** Represents a ListTaxonomyCategoriesRequest. */ + class ListTaxonomyCategoriesRequest implements IListTaxonomyCategoriesRequest { /** - * Constructs a new ListReportsRequest. + * Constructs a new ListTaxonomyCategoriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListReportsRequest); + constructor(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesRequest); - /** ListReportsRequest parent. */ + /** ListTaxonomyCategoriesRequest parent. */ public parent: string; - /** ListReportsRequest pageSize. */ + /** ListTaxonomyCategoriesRequest pageSize. */ public pageSize: number; - /** ListReportsRequest pageToken. */ + /** ListTaxonomyCategoriesRequest pageToken. */ public pageToken: string; - /** ListReportsRequest filter. */ + /** ListTaxonomyCategoriesRequest filter. */ public filter: string; - /** ListReportsRequest orderBy. */ + /** ListTaxonomyCategoriesRequest orderBy. */ public orderBy: string; - /** ListReportsRequest skip. */ + /** ListTaxonomyCategoriesRequest skip. */ public skip: number; /** - * Creates a new ListReportsRequest instance using the specified properties. + * Creates a new ListTaxonomyCategoriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListReportsRequest instance + * @returns ListTaxonomyCategoriesRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListReportsRequest): google.ads.admanager.v1.ListReportsRequest; + public static create(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesRequest): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; /** - * Encodes the specified ListReportsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. - * @param message ListReportsRequest message or plain object to encode + * Encodes the specified ListTaxonomyCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. + * @param message ListTaxonomyCategoriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListReportsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. - * @param message ListReportsRequest message or plain object to encode + * Encodes the specified ListTaxonomyCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. + * @param message ListTaxonomyCategoriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListReportsRequest message from the specified reader or buffer. + * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListReportsRequest + * @returns ListTaxonomyCategoriesRequest * @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.ads.admanager.v1.ListReportsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; /** - * Decodes a ListReportsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListReportsRequest + * @returns ListTaxonomyCategoriesRequest * @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.ads.admanager.v1.ListReportsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; /** - * Verifies a ListReportsRequest message. + * Verifies a ListTaxonomyCategoriesRequest 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 ListReportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomyCategoriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListReportsRequest + * @returns ListTaxonomyCategoriesRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListReportsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; /** - * Creates a plain object from a ListReportsRequest message. Also converts values to other types if specified. - * @param message ListReportsRequest + * Creates a plain object from a ListTaxonomyCategoriesRequest message. Also converts values to other types if specified. + * @param message ListTaxonomyCategoriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListTaxonomyCategoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListReportsRequest to JSON. + * Converts this ListTaxonomyCategoriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListReportsRequest + * Gets the default type url for ListTaxonomyCategoriesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListReportsResponse. */ - interface IListReportsResponse { + /** Properties of a ListTaxonomyCategoriesResponse. */ + interface IListTaxonomyCategoriesResponse { - /** ListReportsResponse reports */ - reports?: (google.ads.admanager.v1.IReport[]|null); + /** ListTaxonomyCategoriesResponse taxonomyCategories */ + taxonomyCategories?: (google.ads.admanager.v1.ITaxonomyCategory[]|null); - /** ListReportsResponse nextPageToken */ + /** ListTaxonomyCategoriesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListReportsResponse totalSize */ + /** ListTaxonomyCategoriesResponse totalSize */ totalSize?: (number|null); } - /** Represents a ListReportsResponse. */ - class ListReportsResponse implements IListReportsResponse { + /** Represents a ListTaxonomyCategoriesResponse. */ + class ListTaxonomyCategoriesResponse implements IListTaxonomyCategoriesResponse { /** - * Constructs a new ListReportsResponse. + * Constructs a new ListTaxonomyCategoriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListReportsResponse); + constructor(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesResponse); - /** ListReportsResponse reports. */ - public reports: google.ads.admanager.v1.IReport[]; + /** ListTaxonomyCategoriesResponse taxonomyCategories. */ + public taxonomyCategories: google.ads.admanager.v1.ITaxonomyCategory[]; - /** ListReportsResponse nextPageToken. */ + /** ListTaxonomyCategoriesResponse nextPageToken. */ public nextPageToken: string; - /** ListReportsResponse totalSize. */ + /** ListTaxonomyCategoriesResponse totalSize. */ public totalSize: number; /** - * Creates a new ListReportsResponse instance using the specified properties. + * Creates a new ListTaxonomyCategoriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListReportsResponse instance + * @returns ListTaxonomyCategoriesResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListReportsResponse): google.ads.admanager.v1.ListReportsResponse; + public static create(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesResponse): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; /** - * Encodes the specified ListReportsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. - * @param message ListReportsResponse message or plain object to encode + * Encodes the specified ListTaxonomyCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. + * @param message ListTaxonomyCategoriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListTaxonomyCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListReportsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. - * @param message ListReportsResponse message or plain object to encode + * Encodes the specified ListTaxonomyCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. + * @param message ListTaxonomyCategoriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListTaxonomyCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListReportsResponse message from the specified reader or buffer. + * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListReportsResponse + * @returns ListTaxonomyCategoriesResponse * @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.ads.admanager.v1.ListReportsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; /** - * Decodes a ListReportsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListReportsResponse + * @returns ListTaxonomyCategoriesResponse * @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.ads.admanager.v1.ListReportsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; /** - * Verifies a ListReportsResponse message. + * Verifies a ListTaxonomyCategoriesResponse 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 ListReportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomyCategoriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListReportsResponse + * @returns ListTaxonomyCategoriesResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListReportsResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; /** - * Creates a plain object from a ListReportsResponse message. Also converts values to other types if specified. - * @param message ListReportsResponse + * Creates a plain object from a ListTaxonomyCategoriesResponse message. Also converts values to other types if specified. + * @param message ListTaxonomyCategoriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListTaxonomyCategoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListReportsResponse to JSON. + * Converts this ListTaxonomyCategoriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListReportsResponse + * Gets the default type url for ListTaxonomyCategoriesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateReportRequest. */ - interface ICreateReportRequest { - - /** CreateReportRequest parent */ - parent?: (string|null); - - /** CreateReportRequest report */ - report?: (google.ads.admanager.v1.IReport|null); + /** Properties of a TeamStatusEnum. */ + interface ITeamStatusEnum { } - /** Represents a CreateReportRequest. */ - class CreateReportRequest implements ICreateReportRequest { + /** Represents a TeamStatusEnum. */ + class TeamStatusEnum implements ITeamStatusEnum { /** - * Constructs a new CreateReportRequest. + * Constructs a new TeamStatusEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ICreateReportRequest); - - /** CreateReportRequest parent. */ - public parent: string; - - /** CreateReportRequest report. */ - public report?: (google.ads.admanager.v1.IReport|null); + constructor(properties?: google.ads.admanager.v1.ITeamStatusEnum); /** - * Creates a new CreateReportRequest instance using the specified properties. + * Creates a new TeamStatusEnum instance using the specified properties. * @param [properties] Properties to set - * @returns CreateReportRequest instance + * @returns TeamStatusEnum instance */ - public static create(properties?: google.ads.admanager.v1.ICreateReportRequest): google.ads.admanager.v1.CreateReportRequest; + public static create(properties?: google.ads.admanager.v1.ITeamStatusEnum): google.ads.admanager.v1.TeamStatusEnum; /** - * Encodes the specified CreateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. - * @param message CreateReportRequest message or plain object to encode + * Encodes the specified TeamStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.TeamStatusEnum.verify|verify} messages. + * @param message TeamStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ICreateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITeamStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. - * @param message CreateReportRequest message or plain object to encode + * Encodes the specified TeamStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TeamStatusEnum.verify|verify} messages. + * @param message TeamStatusEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ICreateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITeamStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateReportRequest message from the specified reader or buffer. + * Decodes a TeamStatusEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateReportRequest + * @returns TeamStatusEnum * @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.ads.admanager.v1.CreateReportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TeamStatusEnum; /** - * Decodes a CreateReportRequest message from the specified reader or buffer, length delimited. + * Decodes a TeamStatusEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateReportRequest + * @returns TeamStatusEnum * @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.ads.admanager.v1.CreateReportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TeamStatusEnum; /** - * Verifies a CreateReportRequest message. + * Verifies a TeamStatusEnum 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 CreateReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TeamStatusEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateReportRequest + * @returns TeamStatusEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateReportRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TeamStatusEnum; /** - * Creates a plain object from a CreateReportRequest message. Also converts values to other types if specified. - * @param message CreateReportRequest + * Creates a plain object from a TeamStatusEnum message. Also converts values to other types if specified. + * @param message TeamStatusEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.CreateReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TeamStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateReportRequest to JSON. + * Converts this TeamStatusEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateReportRequest + * Gets the default type url for TeamStatusEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateReportRequest. */ - interface IUpdateReportRequest { + namespace TeamStatusEnum { - /** UpdateReportRequest report */ - report?: (google.ads.admanager.v1.IReport|null); + /** TeamStatus enum. */ + enum TeamStatus { + TEAM_STATUS_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + } - /** UpdateReportRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a TeamAccessTypeEnum. */ + interface ITeamAccessTypeEnum { } - /** Represents an UpdateReportRequest. */ - class UpdateReportRequest implements IUpdateReportRequest { + /** Represents a TeamAccessTypeEnum. */ + class TeamAccessTypeEnum implements ITeamAccessTypeEnum { /** - * Constructs a new UpdateReportRequest. + * Constructs a new TeamAccessTypeEnum. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IUpdateReportRequest); - - /** UpdateReportRequest report. */ - public report?: (google.ads.admanager.v1.IReport|null); - - /** UpdateReportRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.ads.admanager.v1.ITeamAccessTypeEnum); /** - * Creates a new UpdateReportRequest instance using the specified properties. + * Creates a new TeamAccessTypeEnum instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateReportRequest instance + * @returns TeamAccessTypeEnum instance */ - public static create(properties?: google.ads.admanager.v1.IUpdateReportRequest): google.ads.admanager.v1.UpdateReportRequest; + public static create(properties?: google.ads.admanager.v1.ITeamAccessTypeEnum): google.ads.admanager.v1.TeamAccessTypeEnum; /** - * Encodes the specified UpdateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. - * @param message UpdateReportRequest message or plain object to encode + * Encodes the specified TeamAccessTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TeamAccessTypeEnum.verify|verify} messages. + * @param message TeamAccessTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IUpdateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITeamAccessTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. - * @param message UpdateReportRequest message or plain object to encode + * Encodes the specified TeamAccessTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TeamAccessTypeEnum.verify|verify} messages. + * @param message TeamAccessTypeEnum message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IUpdateReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITeamAccessTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateReportRequest message from the specified reader or buffer. + * Decodes a TeamAccessTypeEnum message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateReportRequest + * @returns TeamAccessTypeEnum * @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.ads.admanager.v1.UpdateReportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.TeamAccessTypeEnum; /** - * Decodes an UpdateReportRequest message from the specified reader or buffer, length delimited. + * Decodes a TeamAccessTypeEnum message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateReportRequest + * @returns TeamAccessTypeEnum * @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.ads.admanager.v1.UpdateReportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.TeamAccessTypeEnum; /** - * Verifies an UpdateReportRequest message. + * Verifies a TeamAccessTypeEnum 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 UpdateReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TeamAccessTypeEnum message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateReportRequest + * @returns TeamAccessTypeEnum */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateReportRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TeamAccessTypeEnum; /** - * Creates a plain object from an UpdateReportRequest message. Also converts values to other types if specified. - * @param message UpdateReportRequest + * Creates a plain object from a TeamAccessTypeEnum message. Also converts values to other types if specified. + * @param message TeamAccessTypeEnum * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.UpdateReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.TeamAccessTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateReportRequest to JSON. + * Converts this TeamAccessTypeEnum to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateReportRequest + * Gets the default type url for TeamAccessTypeEnum * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchReportResultRowsRequest. */ - interface IFetchReportResultRowsRequest { + namespace TeamAccessTypeEnum { - /** FetchReportResultRowsRequest name */ + /** TeamAccessType enum. */ + enum TeamAccessType { + TEAM_ACCESS_TYPE_UNSPECIFIED = 0, + NONE = 1, + READ_ONLY = 2, + READ_WRITE = 3 + } + } + + /** Properties of a Team. */ + interface ITeam { + + /** Team name */ name?: (string|null); - /** FetchReportResultRowsRequest pageSize */ - pageSize?: (number|null); + /** Team displayName */ + displayName?: (string|null); - /** FetchReportResultRowsRequest pageToken */ - pageToken?: (string|null); + /** Team description */ + description?: (string|null); + + /** Team status */ + status?: (google.ads.admanager.v1.TeamStatusEnum.TeamStatus|keyof typeof google.ads.admanager.v1.TeamStatusEnum.TeamStatus|null); + + /** Team allCompaniesAccess */ + allCompaniesAccess?: (boolean|null); + + /** Team allInventoryAccess */ + allInventoryAccess?: (boolean|null); + + /** Team accessType */ + accessType?: (google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|keyof typeof google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|null); } - /** Represents a FetchReportResultRowsRequest. */ - class FetchReportResultRowsRequest implements IFetchReportResultRowsRequest { + /** Represents a Team. */ + class Team implements ITeam { /** - * Constructs a new FetchReportResultRowsRequest. + * Constructs a new Team. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IFetchReportResultRowsRequest); + constructor(properties?: google.ads.admanager.v1.ITeam); - /** FetchReportResultRowsRequest name. */ + /** Team name. */ public name: string; - /** FetchReportResultRowsRequest pageSize. */ - public pageSize: number; + /** Team displayName. */ + public displayName?: (string|null); - /** FetchReportResultRowsRequest pageToken. */ - public pageToken: string; + /** Team description. */ + public description?: (string|null); + + /** Team status. */ + public status?: (google.ads.admanager.v1.TeamStatusEnum.TeamStatus|keyof typeof google.ads.admanager.v1.TeamStatusEnum.TeamStatus|null); + + /** Team allCompaniesAccess. */ + public allCompaniesAccess?: (boolean|null); + + /** Team allInventoryAccess. */ + public allInventoryAccess?: (boolean|null); + + /** Team accessType. */ + public accessType?: (google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|keyof typeof google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|null); /** - * Creates a new FetchReportResultRowsRequest instance using the specified properties. + * Creates a new Team instance using the specified properties. * @param [properties] Properties to set - * @returns FetchReportResultRowsRequest instance + * @returns Team instance */ - public static create(properties?: google.ads.admanager.v1.IFetchReportResultRowsRequest): google.ads.admanager.v1.FetchReportResultRowsRequest; + public static create(properties?: google.ads.admanager.v1.ITeam): google.ads.admanager.v1.Team; /** - * Encodes the specified FetchReportResultRowsRequest message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. - * @param message FetchReportResultRowsRequest message or plain object to encode + * Encodes the specified Team message. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. + * @param message Team message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IFetchReportResultRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ITeam, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchReportResultRowsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. - * @param message FetchReportResultRowsRequest message or plain object to encode + * Encodes the specified Team message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. + * @param message Team message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IFetchReportResultRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ITeam, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer. + * Decodes a Team message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchReportResultRowsRequest + * @returns Team * @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.ads.admanager.v1.FetchReportResultRowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.Team; /** - * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer, length delimited. + * Decodes a Team message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchReportResultRowsRequest + * @returns Team * @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.ads.admanager.v1.FetchReportResultRowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.Team; /** - * Verifies a FetchReportResultRowsRequest message. + * Verifies a Team 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 FetchReportResultRowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Team message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchReportResultRowsRequest + * @returns Team */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FetchReportResultRowsRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Team; /** - * Creates a plain object from a FetchReportResultRowsRequest message. Also converts values to other types if specified. - * @param message FetchReportResultRowsRequest + * Creates a plain object from a Team message. Also converts values to other types if specified. + * @param message Team * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.FetchReportResultRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.Team, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchReportResultRowsRequest to JSON. + * Converts this Team to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchReportResultRowsRequest + * Gets the default type url for Team * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchReportResultRowsResponse. */ - interface IFetchReportResultRowsResponse { + /** Represents a TeamService */ + class TeamService extends $protobuf.rpc.Service { - /** FetchReportResultRowsResponse rows */ - rows?: (google.ads.admanager.v1.Report.DataTable.IRow[]|null); + /** + * Constructs a new TeamService 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); - /** FetchReportResultRowsResponse runTime */ - runTime?: (google.protobuf.ITimestamp|null); + /** + * Creates new TeamService 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): TeamService; - /** FetchReportResultRowsResponse dateRanges */ - dateRanges?: (google.ads.admanager.v1.Report.DateRange.IFixedDateRange[]|null); + /** + * Calls GetTeam. + * @param request GetTeamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Team + */ + public getTeam(request: google.ads.admanager.v1.IGetTeamRequest, callback: google.ads.admanager.v1.TeamService.GetTeamCallback): void; - /** FetchReportResultRowsResponse comparisonDateRanges */ - comparisonDateRanges?: (google.ads.admanager.v1.Report.DateRange.IFixedDateRange[]|null); + /** + * Calls GetTeam. + * @param request GetTeamRequest message or plain object + * @returns Promise + */ + public getTeam(request: google.ads.admanager.v1.IGetTeamRequest): Promise; - /** FetchReportResultRowsResponse totalRowCount */ - totalRowCount?: (number|null); + /** + * Calls ListTeams. + * @param request ListTeamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTeamsResponse + */ + public listTeams(request: google.ads.admanager.v1.IListTeamsRequest, callback: google.ads.admanager.v1.TeamService.ListTeamsCallback): void; - /** FetchReportResultRowsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Calls ListTeams. + * @param request ListTeamsRequest message or plain object + * @returns Promise + */ + public listTeams(request: google.ads.admanager.v1.IListTeamsRequest): Promise; - /** Represents a FetchReportResultRowsResponse. */ - class FetchReportResultRowsResponse implements IFetchReportResultRowsResponse { + /** + * Calls CreateTeam. + * @param request CreateTeamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Team + */ + public createTeam(request: google.ads.admanager.v1.ICreateTeamRequest, callback: google.ads.admanager.v1.TeamService.CreateTeamCallback): void; /** - * Constructs a new FetchReportResultRowsResponse. - * @param [properties] Properties to set + * Calls CreateTeam. + * @param request CreateTeamRequest message or plain object + * @returns Promise */ - constructor(properties?: google.ads.admanager.v1.IFetchReportResultRowsResponse); + public createTeam(request: google.ads.admanager.v1.ICreateTeamRequest): Promise; - /** FetchReportResultRowsResponse rows. */ - public rows: google.ads.admanager.v1.Report.DataTable.IRow[]; + /** + * Calls BatchCreateTeams. + * @param request BatchCreateTeamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateTeamsResponse + */ + public batchCreateTeams(request: google.ads.admanager.v1.IBatchCreateTeamsRequest, callback: google.ads.admanager.v1.TeamService.BatchCreateTeamsCallback): void; - /** FetchReportResultRowsResponse runTime. */ - public runTime?: (google.protobuf.ITimestamp|null); + /** + * Calls BatchCreateTeams. + * @param request BatchCreateTeamsRequest message or plain object + * @returns Promise + */ + public batchCreateTeams(request: google.ads.admanager.v1.IBatchCreateTeamsRequest): Promise; - /** FetchReportResultRowsResponse dateRanges. */ - public dateRanges: google.ads.admanager.v1.Report.DateRange.IFixedDateRange[]; + /** + * Calls UpdateTeam. + * @param request UpdateTeamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Team + */ + public updateTeam(request: google.ads.admanager.v1.IUpdateTeamRequest, callback: google.ads.admanager.v1.TeamService.UpdateTeamCallback): void; - /** FetchReportResultRowsResponse comparisonDateRanges. */ - public comparisonDateRanges: google.ads.admanager.v1.Report.DateRange.IFixedDateRange[]; + /** + * Calls UpdateTeam. + * @param request UpdateTeamRequest message or plain object + * @returns Promise + */ + public updateTeam(request: google.ads.admanager.v1.IUpdateTeamRequest): Promise; - /** FetchReportResultRowsResponse totalRowCount. */ - public totalRowCount: number; + /** + * Calls BatchUpdateTeams. + * @param request BatchUpdateTeamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateTeamsResponse + */ + public batchUpdateTeams(request: google.ads.admanager.v1.IBatchUpdateTeamsRequest, callback: google.ads.admanager.v1.TeamService.BatchUpdateTeamsCallback): void; - /** FetchReportResultRowsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Calls BatchUpdateTeams. + * @param request BatchUpdateTeamsRequest message or plain object + * @returns Promise + */ + public batchUpdateTeams(request: google.ads.admanager.v1.IBatchUpdateTeamsRequest): Promise; /** - * Creates a new FetchReportResultRowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchReportResultRowsResponse instance + * Calls BatchActivateTeams. + * @param request BatchActivateTeamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchActivateTeamsResponse */ - public static create(properties?: google.ads.admanager.v1.IFetchReportResultRowsResponse): google.ads.admanager.v1.FetchReportResultRowsResponse; + public batchActivateTeams(request: google.ads.admanager.v1.IBatchActivateTeamsRequest, callback: google.ads.admanager.v1.TeamService.BatchActivateTeamsCallback): void; /** - * Encodes the specified FetchReportResultRowsResponse message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. - * @param message FetchReportResultRowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls BatchActivateTeams. + * @param request BatchActivateTeamsRequest message or plain object + * @returns Promise */ - public static encode(message: google.ads.admanager.v1.IFetchReportResultRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public batchActivateTeams(request: google.ads.admanager.v1.IBatchActivateTeamsRequest): Promise; /** - * Encodes the specified FetchReportResultRowsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. - * @param message FetchReportResultRowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls BatchDeactivateTeams. + * @param request BatchDeactivateTeamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchDeactivateTeamsResponse */ - public static encodeDelimited(message: google.ads.admanager.v1.IFetchReportResultRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public batchDeactivateTeams(request: google.ads.admanager.v1.IBatchDeactivateTeamsRequest, callback: google.ads.admanager.v1.TeamService.BatchDeactivateTeamsCallback): void; /** - * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchReportResultRowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchDeactivateTeams. + * @param request BatchDeactivateTeamsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.FetchReportResultRowsResponse; + public batchDeactivateTeams(request: google.ads.admanager.v1.IBatchDeactivateTeamsRequest): Promise; + } + + namespace TeamService { /** - * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchReportResultRowsResponse - * @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.ads.admanager.v1.TeamService|getTeam}. + * @param error Error, if any + * @param [response] Team */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.FetchReportResultRowsResponse; + type GetTeamCallback = (error: (Error|null), response?: google.ads.admanager.v1.Team) => void; /** - * Verifies a FetchReportResultRowsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.ads.admanager.v1.TeamService|listTeams}. + * @param error Error, if any + * @param [response] ListTeamsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListTeamsCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListTeamsResponse) => void; /** - * Creates a FetchReportResultRowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchReportResultRowsResponse + * Callback as used by {@link google.ads.admanager.v1.TeamService|createTeam}. + * @param error Error, if any + * @param [response] Team */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.FetchReportResultRowsResponse; + type CreateTeamCallback = (error: (Error|null), response?: google.ads.admanager.v1.Team) => void; /** - * Creates a plain object from a FetchReportResultRowsResponse message. Also converts values to other types if specified. - * @param message FetchReportResultRowsResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchCreateTeams}. + * @param error Error, if any + * @param [response] BatchCreateTeamsResponse */ - public static toObject(message: google.ads.admanager.v1.FetchReportResultRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type BatchCreateTeamsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchCreateTeamsResponse) => void; /** - * Converts this FetchReportResultRowsResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.ads.admanager.v1.TeamService|updateTeam}. + * @param error Error, if any + * @param [response] Team */ - public toJSON(): { [k: string]: any }; + type UpdateTeamCallback = (error: (Error|null), response?: google.ads.admanager.v1.Team) => void; /** - * Gets the default type url for FetchReportResultRowsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchUpdateTeams}. + * @param error Error, if any + * @param [response] BatchUpdateTeamsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type BatchUpdateTeamsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchUpdateTeamsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchActivateTeams}. + * @param error Error, if any + * @param [response] BatchActivateTeamsResponse + */ + type BatchActivateTeamsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchActivateTeamsResponse) => void; + + /** + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchDeactivateTeams}. + * @param error Error, if any + * @param [response] BatchDeactivateTeamsResponse + */ + type BatchDeactivateTeamsCallback = (error: (Error|null), response?: google.ads.admanager.v1.BatchDeactivateTeamsResponse) => void; } - /** Properties of a RoleStatusEnum. */ - interface IRoleStatusEnum { + /** Properties of a GetTeamRequest. */ + interface IGetTeamRequest { + + /** GetTeamRequest name */ + name?: (string|null); } - /** Represents a RoleStatusEnum. */ - class RoleStatusEnum implements IRoleStatusEnum { + /** Represents a GetTeamRequest. */ + class GetTeamRequest implements IGetTeamRequest { /** - * Constructs a new RoleStatusEnum. + * Constructs a new GetTeamRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRoleStatusEnum); + constructor(properties?: google.ads.admanager.v1.IGetTeamRequest); + + /** GetTeamRequest name. */ + public name: string; /** - * Creates a new RoleStatusEnum instance using the specified properties. + * Creates a new GetTeamRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RoleStatusEnum instance + * @returns GetTeamRequest instance */ - public static create(properties?: google.ads.admanager.v1.IRoleStatusEnum): google.ads.admanager.v1.RoleStatusEnum; + public static create(properties?: google.ads.admanager.v1.IGetTeamRequest): google.ads.admanager.v1.GetTeamRequest; /** - * Encodes the specified RoleStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. - * @param message RoleStatusEnum message or plain object to encode + * Encodes the specified GetTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTeamRequest.verify|verify} messages. + * @param message GetTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRoleStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IGetTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RoleStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. - * @param message RoleStatusEnum message or plain object to encode + * Encodes the specified GetTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTeamRequest.verify|verify} messages. + * @param message GetTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRoleStatusEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IGetTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RoleStatusEnum message from the specified reader or buffer. + * Decodes a GetTeamRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RoleStatusEnum + * @returns GetTeamRequest * @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.ads.admanager.v1.RoleStatusEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.GetTeamRequest; /** - * Decodes a RoleStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a GetTeamRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RoleStatusEnum + * @returns GetTeamRequest * @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.ads.admanager.v1.RoleStatusEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.GetTeamRequest; /** - * Verifies a RoleStatusEnum message. + * Verifies a GetTeamRequest 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 RoleStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetTeamRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RoleStatusEnum + * @returns GetTeamRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.RoleStatusEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetTeamRequest; /** - * Creates a plain object from a RoleStatusEnum message. Also converts values to other types if specified. - * @param message RoleStatusEnum + * Creates a plain object from a GetTeamRequest message. Also converts values to other types if specified. + * @param message GetTeamRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.RoleStatusEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.GetTeamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RoleStatusEnum to JSON. + * Converts this GetTeamRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RoleStatusEnum + * Gets the default type url for GetTeamRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace RoleStatusEnum { - - /** RoleStatus enum. */ - enum RoleStatus { - ROLE_STATUS_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - } - - /** Properties of a Role. */ - interface IRole { + /** Properties of a ListTeamsRequest. */ + interface IListTeamsRequest { - /** Role name */ - name?: (string|null); + /** ListTeamsRequest parent */ + parent?: (string|null); - /** Role roleId */ - roleId?: (number|Long|string|null); + /** ListTeamsRequest pageSize */ + pageSize?: (number|null); - /** Role displayName */ - displayName?: (string|null); + /** ListTeamsRequest pageToken */ + pageToken?: (string|null); - /** Role description */ - description?: (string|null); + /** ListTeamsRequest filter */ + filter?: (string|null); - /** Role builtIn */ - builtIn?: (boolean|null); + /** ListTeamsRequest orderBy */ + orderBy?: (string|null); - /** Role status */ - status?: (google.ads.admanager.v1.RoleStatusEnum.RoleStatus|keyof typeof google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null); + /** ListTeamsRequest skip */ + skip?: (number|null); } - /** Represents a Role. */ - class Role implements IRole { + /** Represents a ListTeamsRequest. */ + class ListTeamsRequest implements IListTeamsRequest { /** - * Constructs a new Role. + * Constructs a new ListTeamsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IRole); + constructor(properties?: google.ads.admanager.v1.IListTeamsRequest); - /** Role name. */ - public name: string; + /** ListTeamsRequest parent. */ + public parent: string; - /** Role roleId. */ - public roleId?: (number|Long|string|null); + /** ListTeamsRequest pageSize. */ + public pageSize: number; - /** Role displayName. */ - public displayName?: (string|null); + /** ListTeamsRequest pageToken. */ + public pageToken: string; - /** Role description. */ - public description?: (string|null); + /** ListTeamsRequest filter. */ + public filter: string; - /** Role builtIn. */ - public builtIn?: (boolean|null); + /** ListTeamsRequest orderBy. */ + public orderBy: string; - /** Role status. */ - public status?: (google.ads.admanager.v1.RoleStatusEnum.RoleStatus|keyof typeof google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null); + /** ListTeamsRequest skip. */ + public skip: number; /** - * Creates a new Role instance using the specified properties. + * Creates a new ListTeamsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Role instance + * @returns ListTeamsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IRole): google.ads.admanager.v1.Role; + public static create(properties?: google.ads.admanager.v1.IListTeamsRequest): google.ads.admanager.v1.ListTeamsRequest; /** - * Encodes the specified Role message. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. - * @param message Role message or plain object to encode + * Encodes the specified ListTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTeamsRequest.verify|verify} messages. + * @param message ListTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IListTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. - * @param message Role message or plain object to encode + * Encodes the specified ListTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTeamsRequest.verify|verify} messages. + * @param message ListTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IListTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Role message from the specified reader or buffer. + * Decodes a ListTeamsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Role + * @returns ListTeamsRequest * @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.ads.admanager.v1.Role; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListTeamsRequest; /** - * Decodes a Role message from the specified reader or buffer, length delimited. + * Decodes a ListTeamsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Role + * @returns ListTeamsRequest * @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.ads.admanager.v1.Role; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListTeamsRequest; /** - * Verifies a Role message. + * Verifies a ListTeamsRequest 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 Role message from a plain object. Also converts values to their respective internal types. + * Creates a ListTeamsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Role + * @returns ListTeamsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Role; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTeamsRequest; /** - * Creates a plain object from a Role message. Also converts values to other types if specified. - * @param message Role + * Creates a plain object from a ListTeamsRequest message. Also converts values to other types if specified. + * @param message ListTeamsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.ListTeamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Role to JSON. + * Converts this ListTeamsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Role + * Gets the default type url for ListTeamsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a RoleService */ - class RoleService extends $protobuf.rpc.Service { + /** Properties of a ListTeamsResponse. */ + interface IListTeamsResponse { + + /** ListTeamsResponse teams */ + teams?: (google.ads.admanager.v1.ITeam[]|null); + + /** ListTeamsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTeamsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListTeamsResponse. */ + class ListTeamsResponse implements IListTeamsResponse { /** - * Constructs a new RoleService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new ListTeamsResponse. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.ads.admanager.v1.IListTeamsResponse); + + /** ListTeamsResponse teams. */ + public teams: google.ads.admanager.v1.ITeam[]; + + /** ListTeamsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTeamsResponse totalSize. */ + public totalSize: number; /** - * Creates new RoleService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new ListTeamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTeamsResponse instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): RoleService; + public static create(properties?: google.ads.admanager.v1.IListTeamsResponse): google.ads.admanager.v1.ListTeamsResponse; /** - * Calls GetRole. - * @param request GetRoleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Role + * Encodes the specified ListTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTeamsResponse.verify|verify} messages. + * @param message ListTeamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getRole(request: google.ads.admanager.v1.IGetRoleRequest, callback: google.ads.admanager.v1.RoleService.GetRoleCallback): void; + public static encode(message: google.ads.admanager.v1.IListTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetRole. - * @param request GetRoleRequest message or plain object - * @returns Promise + * Encodes the specified ListTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTeamsResponse.verify|verify} messages. + * @param message ListTeamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getRole(request: google.ads.admanager.v1.IGetRoleRequest): Promise; + public static encodeDelimited(message: google.ads.admanager.v1.IListTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListRoles. - * @param request ListRolesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRolesResponse + * Decodes a ListTeamsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTeamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listRoles(request: google.ads.admanager.v1.IListRolesRequest, callback: google.ads.admanager.v1.RoleService.ListRolesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.ListTeamsResponse; /** - * Calls ListRoles. - * @param request ListRolesRequest message or plain object - * @returns Promise + * Decodes a ListTeamsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTeamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listRoles(request: google.ads.admanager.v1.IListRolesRequest): Promise; - } + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.ListTeamsResponse; - namespace RoleService { + /** + * Verifies a ListTeamsResponse 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); /** - * Callback as used by {@link google.ads.admanager.v1.RoleService|getRole}. - * @param error Error, if any - * @param [response] Role + * Creates a ListTeamsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTeamsResponse */ - type GetRoleCallback = (error: (Error|null), response?: google.ads.admanager.v1.Role) => void; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTeamsResponse; /** - * Callback as used by {@link google.ads.admanager.v1.RoleService|listRoles}. - * @param error Error, if any - * @param [response] ListRolesResponse + * Creates a plain object from a ListTeamsResponse message. Also converts values to other types if specified. + * @param message ListTeamsResponse + * @param [options] Conversion options + * @returns Plain object */ - type ListRolesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListRolesResponse) => void; + public static toObject(message: google.ads.admanager.v1.ListTeamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTeamsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTeamsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetRoleRequest. */ - interface IGetRoleRequest { + /** Properties of a CreateTeamRequest. */ + interface ICreateTeamRequest { - /** GetRoleRequest name */ - name?: (string|null); + /** CreateTeamRequest parent */ + parent?: (string|null); + + /** CreateTeamRequest team */ + team?: (google.ads.admanager.v1.ITeam|null); } - /** Represents a GetRoleRequest. */ - class GetRoleRequest implements IGetRoleRequest { + /** Represents a CreateTeamRequest. */ + class CreateTeamRequest implements ICreateTeamRequest { /** - * Constructs a new GetRoleRequest. + * Constructs a new CreateTeamRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetRoleRequest); + constructor(properties?: google.ads.admanager.v1.ICreateTeamRequest); - /** GetRoleRequest name. */ - public name: string; + /** CreateTeamRequest parent. */ + public parent: string; + + /** CreateTeamRequest team. */ + public team?: (google.ads.admanager.v1.ITeam|null); /** - * Creates a new GetRoleRequest instance using the specified properties. + * Creates a new CreateTeamRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetRoleRequest instance + * @returns CreateTeamRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetRoleRequest): google.ads.admanager.v1.GetRoleRequest; + public static create(properties?: google.ads.admanager.v1.ICreateTeamRequest): google.ads.admanager.v1.CreateTeamRequest; /** - * Encodes the specified GetRoleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. - * @param message GetRoleRequest message or plain object to encode + * Encodes the specified CreateTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateTeamRequest.verify|verify} messages. + * @param message CreateTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetRoleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.ICreateTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRoleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. - * @param message GetRoleRequest message or plain object to encode + * Encodes the specified CreateTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateTeamRequest.verify|verify} messages. + * @param message CreateTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetRoleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.ICreateTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRoleRequest message from the specified reader or buffer. + * Decodes a CreateTeamRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetRoleRequest + * @returns CreateTeamRequest * @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.ads.admanager.v1.GetRoleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.CreateTeamRequest; /** - * Decodes a GetRoleRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTeamRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRoleRequest + * @returns CreateTeamRequest * @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.ads.admanager.v1.GetRoleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.CreateTeamRequest; /** - * Verifies a GetRoleRequest message. + * Verifies a CreateTeamRequest 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 GetRoleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTeamRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRoleRequest + * @returns CreateTeamRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetRoleRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.CreateTeamRequest; /** - * Creates a plain object from a GetRoleRequest message. Also converts values to other types if specified. - * @param message GetRoleRequest + * Creates a plain object from a CreateTeamRequest message. Also converts values to other types if specified. + * @param message CreateTeamRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetRoleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.CreateTeamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRoleRequest to JSON. + * Converts this CreateTeamRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetRoleRequest + * Gets the default type url for CreateTeamRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListRolesRequest. */ - interface IListRolesRequest { + /** Properties of a BatchCreateTeamsRequest. */ + interface IBatchCreateTeamsRequest { - /** ListRolesRequest parent */ + /** BatchCreateTeamsRequest parent */ parent?: (string|null); - /** ListRolesRequest pageSize */ - pageSize?: (number|null); - - /** ListRolesRequest pageToken */ - pageToken?: (string|null); - - /** ListRolesRequest filter */ - filter?: (string|null); - - /** ListRolesRequest orderBy */ - orderBy?: (string|null); - - /** ListRolesRequest skip */ - skip?: (number|null); + /** BatchCreateTeamsRequest requests */ + requests?: (google.ads.admanager.v1.ICreateTeamRequest[]|null); } - /** Represents a ListRolesRequest. */ - class ListRolesRequest implements IListRolesRequest { + /** Represents a BatchCreateTeamsRequest. */ + class BatchCreateTeamsRequest implements IBatchCreateTeamsRequest { /** - * Constructs a new ListRolesRequest. + * Constructs a new BatchCreateTeamsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListRolesRequest); + constructor(properties?: google.ads.admanager.v1.IBatchCreateTeamsRequest); - /** ListRolesRequest parent. */ + /** BatchCreateTeamsRequest parent. */ public parent: string; - /** ListRolesRequest pageSize. */ - public pageSize: number; - - /** ListRolesRequest pageToken. */ - public pageToken: string; - - /** ListRolesRequest filter. */ - public filter: string; - - /** ListRolesRequest orderBy. */ - public orderBy: string; - - /** ListRolesRequest skip. */ - public skip: number; + /** BatchCreateTeamsRequest requests. */ + public requests: google.ads.admanager.v1.ICreateTeamRequest[]; /** - * Creates a new ListRolesRequest instance using the specified properties. + * Creates a new BatchCreateTeamsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListRolesRequest instance + * @returns BatchCreateTeamsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListRolesRequest): google.ads.admanager.v1.ListRolesRequest; + public static create(properties?: google.ads.admanager.v1.IBatchCreateTeamsRequest): google.ads.admanager.v1.BatchCreateTeamsRequest; /** - * Encodes the specified ListRolesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. - * @param message ListRolesRequest message or plain object to encode + * Encodes the specified BatchCreateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsRequest.verify|verify} messages. + * @param message BatchCreateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListRolesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRolesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. - * @param message ListRolesRequest message or plain object to encode + * Encodes the specified BatchCreateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsRequest.verify|verify} messages. + * @param message BatchCreateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListRolesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRolesRequest message from the specified reader or buffer. + * Decodes a BatchCreateTeamsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRolesRequest + * @returns BatchCreateTeamsRequest * @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.ads.admanager.v1.ListRolesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateTeamsRequest; /** - * Decodes a ListRolesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateTeamsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRolesRequest + * @returns BatchCreateTeamsRequest * @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.ads.admanager.v1.ListRolesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateTeamsRequest; /** - * Verifies a ListRolesRequest message. + * Verifies a BatchCreateTeamsRequest 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 ListRolesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRolesRequest + * @returns BatchCreateTeamsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListRolesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateTeamsRequest; /** - * Creates a plain object from a ListRolesRequest message. Also converts values to other types if specified. - * @param message ListRolesRequest + * Creates a plain object from a BatchCreateTeamsRequest message. Also converts values to other types if specified. + * @param message BatchCreateTeamsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListRolesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateTeamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRolesRequest to JSON. + * Converts this BatchCreateTeamsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListRolesRequest + * Gets the default type url for BatchCreateTeamsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListRolesResponse. */ - interface IListRolesResponse { - - /** ListRolesResponse roles */ - roles?: (google.ads.admanager.v1.IRole[]|null); - - /** ListRolesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a BatchCreateTeamsResponse. */ + interface IBatchCreateTeamsResponse { - /** ListRolesResponse totalSize */ - totalSize?: (number|null); + /** BatchCreateTeamsResponse teams */ + teams?: (google.ads.admanager.v1.ITeam[]|null); } - /** Represents a ListRolesResponse. */ - class ListRolesResponse implements IListRolesResponse { + /** Represents a BatchCreateTeamsResponse. */ + class BatchCreateTeamsResponse implements IBatchCreateTeamsResponse { /** - * Constructs a new ListRolesResponse. + * Constructs a new BatchCreateTeamsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListRolesResponse); - - /** ListRolesResponse roles. */ - public roles: google.ads.admanager.v1.IRole[]; + constructor(properties?: google.ads.admanager.v1.IBatchCreateTeamsResponse); - /** ListRolesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListRolesResponse totalSize. */ - public totalSize: number; + /** BatchCreateTeamsResponse teams. */ + public teams: google.ads.admanager.v1.ITeam[]; /** - * Creates a new ListRolesResponse instance using the specified properties. + * Creates a new BatchCreateTeamsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListRolesResponse instance + * @returns BatchCreateTeamsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListRolesResponse): google.ads.admanager.v1.ListRolesResponse; + public static create(properties?: google.ads.admanager.v1.IBatchCreateTeamsResponse): google.ads.admanager.v1.BatchCreateTeamsResponse; /** - * Encodes the specified ListRolesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. - * @param message ListRolesResponse message or plain object to encode + * Encodes the specified BatchCreateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsResponse.verify|verify} messages. + * @param message BatchCreateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListRolesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchCreateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRolesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. - * @param message ListRolesResponse message or plain object to encode + * Encodes the specified BatchCreateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsResponse.verify|verify} messages. + * @param message BatchCreateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListRolesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchCreateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRolesResponse message from the specified reader or buffer. + * Decodes a BatchCreateTeamsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRolesResponse + * @returns BatchCreateTeamsResponse * @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.ads.admanager.v1.ListRolesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchCreateTeamsResponse; /** - * Decodes a ListRolesResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateTeamsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRolesResponse + * @returns BatchCreateTeamsResponse * @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.ads.admanager.v1.ListRolesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchCreateTeamsResponse; /** - * Verifies a ListRolesResponse message. + * Verifies a BatchCreateTeamsResponse 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 ListRolesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRolesResponse + * @returns BatchCreateTeamsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListRolesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchCreateTeamsResponse; /** - * Creates a plain object from a ListRolesResponse message. Also converts values to other types if specified. - * @param message ListRolesResponse + * Creates a plain object from a BatchCreateTeamsResponse message. Also converts values to other types if specified. + * @param message BatchCreateTeamsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListRolesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchCreateTeamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRolesResponse to JSON. + * Converts this BatchCreateTeamsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListRolesResponse + * Gets the default type url for BatchCreateTeamsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TaxonomyCategory. */ - interface ITaxonomyCategory { - - /** TaxonomyCategory name */ - name?: (string|null); - - /** TaxonomyCategory taxonomyCategoryId */ - taxonomyCategoryId?: (number|Long|string|null); - - /** TaxonomyCategory displayName */ - displayName?: (string|null); - - /** TaxonomyCategory groupingOnly */ - groupingOnly?: (boolean|null); - - /** TaxonomyCategory parentTaxonomyCategoryId */ - parentTaxonomyCategoryId?: (number|Long|string|null); - - /** TaxonomyCategory taxonomyType */ - taxonomyType?: (google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|keyof typeof google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null); + /** Properties of an UpdateTeamRequest. */ + interface IUpdateTeamRequest { - /** TaxonomyCategory ancestorNames */ - ancestorNames?: (string[]|null); + /** UpdateTeamRequest team */ + team?: (google.ads.admanager.v1.ITeam|null); - /** TaxonomyCategory ancestorTaxonomyCategoryIds */ - ancestorTaxonomyCategoryIds?: ((number|Long|string)[]|null); + /** UpdateTeamRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a TaxonomyCategory. */ - class TaxonomyCategory implements ITaxonomyCategory { + /** Represents an UpdateTeamRequest. */ + class UpdateTeamRequest implements IUpdateTeamRequest { /** - * Constructs a new TaxonomyCategory. + * Constructs a new UpdateTeamRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITaxonomyCategory); - - /** TaxonomyCategory name. */ - public name: string; - - /** TaxonomyCategory taxonomyCategoryId. */ - public taxonomyCategoryId?: (number|Long|string|null); + constructor(properties?: google.ads.admanager.v1.IUpdateTeamRequest); - /** TaxonomyCategory displayName. */ - public displayName?: (string|null); - - /** TaxonomyCategory groupingOnly. */ - public groupingOnly?: (boolean|null); - - /** TaxonomyCategory parentTaxonomyCategoryId. */ - public parentTaxonomyCategoryId?: (number|Long|string|null); + /** UpdateTeamRequest team. */ + public team?: (google.ads.admanager.v1.ITeam|null); - /** TaxonomyCategory taxonomyType. */ - public taxonomyType?: (google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|keyof typeof google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null); - - /** TaxonomyCategory ancestorNames. */ - public ancestorNames: string[]; - - /** TaxonomyCategory ancestorTaxonomyCategoryIds. */ - public ancestorTaxonomyCategoryIds: (number|Long|string)[]; + /** UpdateTeamRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new TaxonomyCategory instance using the specified properties. + * Creates a new UpdateTeamRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TaxonomyCategory instance + * @returns UpdateTeamRequest instance */ - public static create(properties?: google.ads.admanager.v1.ITaxonomyCategory): google.ads.admanager.v1.TaxonomyCategory; + public static create(properties?: google.ads.admanager.v1.IUpdateTeamRequest): google.ads.admanager.v1.UpdateTeamRequest; /** - * Encodes the specified TaxonomyCategory message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. - * @param message TaxonomyCategory message or plain object to encode + * Encodes the specified UpdateTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateTeamRequest.verify|verify} messages. + * @param message UpdateTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITaxonomyCategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IUpdateTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TaxonomyCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. - * @param message TaxonomyCategory message or plain object to encode + * Encodes the specified UpdateTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateTeamRequest.verify|verify} messages. + * @param message UpdateTeamRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITaxonomyCategory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IUpdateTeamRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TaxonomyCategory message from the specified reader or buffer. + * Decodes an UpdateTeamRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TaxonomyCategory + * @returns UpdateTeamRequest * @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.ads.admanager.v1.TaxonomyCategory; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.UpdateTeamRequest; /** - * Decodes a TaxonomyCategory message from the specified reader or buffer, length delimited. + * Decodes an UpdateTeamRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TaxonomyCategory + * @returns UpdateTeamRequest * @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.ads.admanager.v1.TaxonomyCategory; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.UpdateTeamRequest; /** - * Verifies a TaxonomyCategory message. + * Verifies an UpdateTeamRequest 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 TaxonomyCategory message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTeamRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TaxonomyCategory + * @returns UpdateTeamRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TaxonomyCategory; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.UpdateTeamRequest; /** - * Creates a plain object from a TaxonomyCategory message. Also converts values to other types if specified. - * @param message TaxonomyCategory + * Creates a plain object from an UpdateTeamRequest message. Also converts values to other types if specified. + * @param message UpdateTeamRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TaxonomyCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.UpdateTeamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TaxonomyCategory to JSON. + * Converts this UpdateTeamRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TaxonomyCategory + * Gets the default type url for UpdateTeamRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TaxonomyTypeEnum. */ - interface ITaxonomyTypeEnum { + /** Properties of a BatchUpdateTeamsRequest. */ + interface IBatchUpdateTeamsRequest { + + /** BatchUpdateTeamsRequest parent */ + parent?: (string|null); + + /** BatchUpdateTeamsRequest requests */ + requests?: (google.ads.admanager.v1.IUpdateTeamRequest[]|null); } - /** Represents a TaxonomyTypeEnum. */ - class TaxonomyTypeEnum implements ITaxonomyTypeEnum { + /** Represents a BatchUpdateTeamsRequest. */ + class BatchUpdateTeamsRequest implements IBatchUpdateTeamsRequest { /** - * Constructs a new TaxonomyTypeEnum. + * Constructs a new BatchUpdateTeamsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITaxonomyTypeEnum); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateTeamsRequest); + + /** BatchUpdateTeamsRequest parent. */ + public parent: string; + + /** BatchUpdateTeamsRequest requests. */ + public requests: google.ads.admanager.v1.IUpdateTeamRequest[]; /** - * Creates a new TaxonomyTypeEnum instance using the specified properties. + * Creates a new BatchUpdateTeamsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TaxonomyTypeEnum instance + * @returns BatchUpdateTeamsRequest instance */ - public static create(properties?: google.ads.admanager.v1.ITaxonomyTypeEnum): google.ads.admanager.v1.TaxonomyTypeEnum; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateTeamsRequest): google.ads.admanager.v1.BatchUpdateTeamsRequest; /** - * Encodes the specified TaxonomyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. - * @param message TaxonomyTypeEnum message or plain object to encode + * Encodes the specified BatchUpdateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsRequest.verify|verify} messages. + * @param message BatchUpdateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITaxonomyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchUpdateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TaxonomyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. - * @param message TaxonomyTypeEnum message or plain object to encode + * Encodes the specified BatchUpdateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsRequest.verify|verify} messages. + * @param message BatchUpdateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITaxonomyTypeEnum, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TaxonomyTypeEnum message from the specified reader or buffer. + * Decodes a BatchUpdateTeamsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TaxonomyTypeEnum + * @returns BatchUpdateTeamsRequest * @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.ads.admanager.v1.TaxonomyTypeEnum; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateTeamsRequest; /** - * Decodes a TaxonomyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateTeamsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TaxonomyTypeEnum + * @returns BatchUpdateTeamsRequest * @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.ads.admanager.v1.TaxonomyTypeEnum; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateTeamsRequest; /** - * Verifies a TaxonomyTypeEnum message. + * Verifies a BatchUpdateTeamsRequest 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 TaxonomyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TaxonomyTypeEnum + * @returns BatchUpdateTeamsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.TaxonomyTypeEnum; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateTeamsRequest; /** - * Creates a plain object from a TaxonomyTypeEnum message. Also converts values to other types if specified. - * @param message TaxonomyTypeEnum + * Creates a plain object from a BatchUpdateTeamsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateTeamsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.TaxonomyTypeEnum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchUpdateTeamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TaxonomyTypeEnum to JSON. + * Converts this BatchUpdateTeamsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TaxonomyTypeEnum + * Gets the default type url for BatchUpdateTeamsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TaxonomyTypeEnum { + /** Properties of a BatchUpdateTeamsResponse. */ + interface IBatchUpdateTeamsResponse { - /** TaxonomyType enum. */ - enum TaxonomyType { - TAXONOMY_TYPE_UNSPECIFIED = 0, - TAXONOMY_IAB_AUDIENCE_1_1 = 3, - TAXONOMY_IAB_CONTENT_2_1 = 4, - TAXONOMY_IAB_CONTENT_2_2 = 6, - TAXONOMY_IAB_CONTENT_3_0 = 5, - TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 = 7 - } + /** BatchUpdateTeamsResponse teams */ + teams?: (google.ads.admanager.v1.ITeam[]|null); } - /** Represents a TaxonomyCategoryService */ - class TaxonomyCategoryService extends $protobuf.rpc.Service { + /** Represents a BatchUpdateTeamsResponse. */ + class BatchUpdateTeamsResponse implements IBatchUpdateTeamsResponse { /** - * Constructs a new TaxonomyCategoryService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new BatchUpdateTeamsResponse. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.ads.admanager.v1.IBatchUpdateTeamsResponse); + + /** BatchUpdateTeamsResponse teams. */ + public teams: google.ads.admanager.v1.ITeam[]; /** - * Creates new TaxonomyCategoryService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new BatchUpdateTeamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateTeamsResponse instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TaxonomyCategoryService; + public static create(properties?: google.ads.admanager.v1.IBatchUpdateTeamsResponse): google.ads.admanager.v1.BatchUpdateTeamsResponse; /** - * Calls GetTaxonomyCategory. - * @param request GetTaxonomyCategoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TaxonomyCategory + * Encodes the specified BatchUpdateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsResponse.verify|verify} messages. + * @param message BatchUpdateTeamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTaxonomyCategory(request: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, callback: google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategoryCallback): void; + public static encode(message: google.ads.admanager.v1.IBatchUpdateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetTaxonomyCategory. - * @param request GetTaxonomyCategoryRequest message or plain object - * @returns Promise + * Encodes the specified BatchUpdateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsResponse.verify|verify} messages. + * @param message BatchUpdateTeamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTaxonomyCategory(request: google.ads.admanager.v1.IGetTaxonomyCategoryRequest): Promise; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchUpdateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListTaxonomyCategories. - * @param request ListTaxonomyCategoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTaxonomyCategoriesResponse + * Decodes a BatchUpdateTeamsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateTeamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listTaxonomyCategories(request: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, callback: google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategoriesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchUpdateTeamsResponse; /** - * Calls ListTaxonomyCategories. - * @param request ListTaxonomyCategoriesRequest message or plain object - * @returns Promise + * Decodes a BatchUpdateTeamsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateTeamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listTaxonomyCategories(request: google.ads.admanager.v1.IListTaxonomyCategoriesRequest): Promise; - } + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchUpdateTeamsResponse; - namespace TaxonomyCategoryService { + /** + * Verifies a BatchUpdateTeamsResponse 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); /** - * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|getTaxonomyCategory}. - * @param error Error, if any - * @param [response] TaxonomyCategory + * Creates a BatchUpdateTeamsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateTeamsResponse */ - type GetTaxonomyCategoryCallback = (error: (Error|null), response?: google.ads.admanager.v1.TaxonomyCategory) => void; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchUpdateTeamsResponse; /** - * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|listTaxonomyCategories}. - * @param error Error, if any - * @param [response] ListTaxonomyCategoriesResponse + * Creates a plain object from a BatchUpdateTeamsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateTeamsResponse + * @param [options] Conversion options + * @returns Plain object */ - type ListTaxonomyCategoriesCallback = (error: (Error|null), response?: google.ads.admanager.v1.ListTaxonomyCategoriesResponse) => void; + public static toObject(message: google.ads.admanager.v1.BatchUpdateTeamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdateTeamsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdateTeamsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetTaxonomyCategoryRequest. */ - interface IGetTaxonomyCategoryRequest { + /** Properties of a BatchActivateTeamsRequest. */ + interface IBatchActivateTeamsRequest { - /** GetTaxonomyCategoryRequest name */ - name?: (string|null); + /** BatchActivateTeamsRequest parent */ + parent?: (string|null); + + /** BatchActivateTeamsRequest names */ + names?: (string[]|null); } - /** Represents a GetTaxonomyCategoryRequest. */ - class GetTaxonomyCategoryRequest implements IGetTaxonomyCategoryRequest { + /** Represents a BatchActivateTeamsRequest. */ + class BatchActivateTeamsRequest implements IBatchActivateTeamsRequest { /** - * Constructs a new GetTaxonomyCategoryRequest. + * Constructs a new BatchActivateTeamsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IGetTaxonomyCategoryRequest); + constructor(properties?: google.ads.admanager.v1.IBatchActivateTeamsRequest); - /** GetTaxonomyCategoryRequest name. */ - public name: string; + /** BatchActivateTeamsRequest parent. */ + public parent: string; + + /** BatchActivateTeamsRequest names. */ + public names: string[]; /** - * Creates a new GetTaxonomyCategoryRequest instance using the specified properties. + * Creates a new BatchActivateTeamsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTaxonomyCategoryRequest instance + * @returns BatchActivateTeamsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IGetTaxonomyCategoryRequest): google.ads.admanager.v1.GetTaxonomyCategoryRequest; + public static create(properties?: google.ads.admanager.v1.IBatchActivateTeamsRequest): google.ads.admanager.v1.BatchActivateTeamsRequest; /** - * Encodes the specified GetTaxonomyCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. - * @param message GetTaxonomyCategoryRequest message or plain object to encode + * Encodes the specified BatchActivateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsRequest.verify|verify} messages. + * @param message BatchActivateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchActivateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTaxonomyCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. - * @param message GetTaxonomyCategoryRequest message or plain object to encode + * Encodes the specified BatchActivateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsRequest.verify|verify} messages. + * @param message BatchActivateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IGetTaxonomyCategoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer. + * Decodes a BatchActivateTeamsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTaxonomyCategoryRequest + * @returns BatchActivateTeamsRequest * @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.ads.admanager.v1.GetTaxonomyCategoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchActivateTeamsRequest; /** - * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateTeamsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTaxonomyCategoryRequest + * @returns BatchActivateTeamsRequest * @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.ads.admanager.v1.GetTaxonomyCategoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchActivateTeamsRequest; /** - * Verifies a GetTaxonomyCategoryRequest message. + * Verifies a BatchActivateTeamsRequest 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 GetTaxonomyCategoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTaxonomyCategoryRequest + * @returns BatchActivateTeamsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.GetTaxonomyCategoryRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivateTeamsRequest; /** - * Creates a plain object from a GetTaxonomyCategoryRequest message. Also converts values to other types if specified. - * @param message GetTaxonomyCategoryRequest + * Creates a plain object from a BatchActivateTeamsRequest message. Also converts values to other types if specified. + * @param message BatchActivateTeamsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.GetTaxonomyCategoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchActivateTeamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTaxonomyCategoryRequest to JSON. + * Converts this BatchActivateTeamsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetTaxonomyCategoryRequest + * Gets the default type url for BatchActivateTeamsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTaxonomyCategoriesRequest. */ - interface IListTaxonomyCategoriesRequest { - - /** ListTaxonomyCategoriesRequest parent */ - parent?: (string|null); - - /** ListTaxonomyCategoriesRequest pageSize */ - pageSize?: (number|null); - - /** ListTaxonomyCategoriesRequest pageToken */ - pageToken?: (string|null); - - /** ListTaxonomyCategoriesRequest filter */ - filter?: (string|null); - - /** ListTaxonomyCategoriesRequest orderBy */ - orderBy?: (string|null); - - /** ListTaxonomyCategoriesRequest skip */ - skip?: (number|null); + /** Properties of a BatchActivateTeamsResponse. */ + interface IBatchActivateTeamsResponse { } - /** Represents a ListTaxonomyCategoriesRequest. */ - class ListTaxonomyCategoriesRequest implements IListTaxonomyCategoriesRequest { + /** Represents a BatchActivateTeamsResponse. */ + class BatchActivateTeamsResponse implements IBatchActivateTeamsResponse { /** - * Constructs a new ListTaxonomyCategoriesRequest. + * Constructs a new BatchActivateTeamsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesRequest); - - /** ListTaxonomyCategoriesRequest parent. */ - public parent: string; - - /** ListTaxonomyCategoriesRequest pageSize. */ - public pageSize: number; - - /** ListTaxonomyCategoriesRequest pageToken. */ - public pageToken: string; - - /** ListTaxonomyCategoriesRequest filter. */ - public filter: string; - - /** ListTaxonomyCategoriesRequest orderBy. */ - public orderBy: string; - - /** ListTaxonomyCategoriesRequest skip. */ - public skip: number; + constructor(properties?: google.ads.admanager.v1.IBatchActivateTeamsResponse); /** - * Creates a new ListTaxonomyCategoriesRequest instance using the specified properties. + * Creates a new BatchActivateTeamsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListTaxonomyCategoriesRequest instance + * @returns BatchActivateTeamsResponse instance */ - public static create(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesRequest): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; + public static create(properties?: google.ads.admanager.v1.IBatchActivateTeamsResponse): google.ads.admanager.v1.BatchActivateTeamsResponse; /** - * Encodes the specified ListTaxonomyCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. - * @param message ListTaxonomyCategoriesRequest message or plain object to encode + * Encodes the specified BatchActivateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsResponse.verify|verify} messages. + * @param message BatchActivateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchActivateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTaxonomyCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. - * @param message ListTaxonomyCategoriesRequest message or plain object to encode + * Encodes the specified BatchActivateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsResponse.verify|verify} messages. + * @param message BatchActivateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListTaxonomyCategoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchActivateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer. + * Decodes a BatchActivateTeamsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTaxonomyCategoriesRequest + * @returns BatchActivateTeamsResponse * @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.ads.admanager.v1.ListTaxonomyCategoriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchActivateTeamsResponse; /** - * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateTeamsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTaxonomyCategoriesRequest + * @returns BatchActivateTeamsResponse * @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.ads.admanager.v1.ListTaxonomyCategoriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchActivateTeamsResponse; /** - * Verifies a ListTaxonomyCategoriesRequest message. + * Verifies a BatchActivateTeamsResponse 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 ListTaxonomyCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTaxonomyCategoriesRequest + * @returns BatchActivateTeamsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTaxonomyCategoriesRequest; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchActivateTeamsResponse; /** - * Creates a plain object from a ListTaxonomyCategoriesRequest message. Also converts values to other types if specified. - * @param message ListTaxonomyCategoriesRequest + * Creates a plain object from a BatchActivateTeamsResponse message. Also converts values to other types if specified. + * @param message BatchActivateTeamsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListTaxonomyCategoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchActivateTeamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTaxonomyCategoriesRequest to JSON. + * Converts this BatchActivateTeamsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTaxonomyCategoriesRequest + * Gets the default type url for BatchActivateTeamsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTaxonomyCategoriesResponse. */ - interface IListTaxonomyCategoriesResponse { - - /** ListTaxonomyCategoriesResponse taxonomyCategories */ - taxonomyCategories?: (google.ads.admanager.v1.ITaxonomyCategory[]|null); + /** Properties of a BatchDeactivateTeamsRequest. */ + interface IBatchDeactivateTeamsRequest { - /** ListTaxonomyCategoriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** BatchDeactivateTeamsRequest parent */ + parent?: (string|null); - /** ListTaxonomyCategoriesResponse totalSize */ - totalSize?: (number|null); + /** BatchDeactivateTeamsRequest names */ + names?: (string[]|null); } - /** Represents a ListTaxonomyCategoriesResponse. */ - class ListTaxonomyCategoriesResponse implements IListTaxonomyCategoriesResponse { + /** Represents a BatchDeactivateTeamsRequest. */ + class BatchDeactivateTeamsRequest implements IBatchDeactivateTeamsRequest { /** - * Constructs a new ListTaxonomyCategoriesResponse. + * Constructs a new BatchDeactivateTeamsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesResponse); - - /** ListTaxonomyCategoriesResponse taxonomyCategories. */ - public taxonomyCategories: google.ads.admanager.v1.ITaxonomyCategory[]; + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateTeamsRequest); - /** ListTaxonomyCategoriesResponse nextPageToken. */ - public nextPageToken: string; + /** BatchDeactivateTeamsRequest parent. */ + public parent: string; - /** ListTaxonomyCategoriesResponse totalSize. */ - public totalSize: number; + /** BatchDeactivateTeamsRequest names. */ + public names: string[]; /** - * Creates a new ListTaxonomyCategoriesResponse instance using the specified properties. + * Creates a new BatchDeactivateTeamsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTaxonomyCategoriesResponse instance + * @returns BatchDeactivateTeamsRequest instance */ - public static create(properties?: google.ads.admanager.v1.IListTaxonomyCategoriesResponse): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateTeamsRequest): google.ads.admanager.v1.BatchDeactivateTeamsRequest; /** - * Encodes the specified ListTaxonomyCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. - * @param message ListTaxonomyCategoriesResponse message or plain object to encode + * Encodes the specified BatchDeactivateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsRequest.verify|verify} messages. + * @param message BatchDeactivateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.IListTaxonomyCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchDeactivateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTaxonomyCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. - * @param message ListTaxonomyCategoriesResponse message or plain object to encode + * Encodes the specified BatchDeactivateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsRequest.verify|verify} messages. + * @param message BatchDeactivateTeamsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.IListTaxonomyCategoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateTeamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer. + * Decodes a BatchDeactivateTeamsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTaxonomyCategoriesResponse + * @returns BatchDeactivateTeamsRequest * @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.ads.admanager.v1.ListTaxonomyCategoriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchDeactivateTeamsRequest; /** - * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateTeamsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTaxonomyCategoriesResponse + * @returns BatchDeactivateTeamsRequest * @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.ads.admanager.v1.ListTaxonomyCategoriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchDeactivateTeamsRequest; /** - * Verifies a ListTaxonomyCategoriesResponse message. + * Verifies a BatchDeactivateTeamsRequest 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 ListTaxonomyCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTaxonomyCategoriesResponse + * @returns BatchDeactivateTeamsRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.ListTaxonomyCategoriesResponse; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateTeamsRequest; /** - * Creates a plain object from a ListTaxonomyCategoriesResponse message. Also converts values to other types if specified. - * @param message ListTaxonomyCategoriesResponse + * Creates a plain object from a BatchDeactivateTeamsRequest message. Also converts values to other types if specified. + * @param message BatchDeactivateTeamsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.ListTaxonomyCategoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchDeactivateTeamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTaxonomyCategoriesResponse to JSON. + * Converts this BatchDeactivateTeamsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTaxonomyCategoriesResponse + * Gets the default type url for BatchDeactivateTeamsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Team. */ - interface ITeam { - - /** Team name */ - name?: (string|null); + /** Properties of a BatchDeactivateTeamsResponse. */ + interface IBatchDeactivateTeamsResponse { } - /** Represents a Team. */ - class Team implements ITeam { + /** Represents a BatchDeactivateTeamsResponse. */ + class BatchDeactivateTeamsResponse implements IBatchDeactivateTeamsResponse { /** - * Constructs a new Team. + * Constructs a new BatchDeactivateTeamsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ads.admanager.v1.ITeam); - - /** Team name. */ - public name: string; + constructor(properties?: google.ads.admanager.v1.IBatchDeactivateTeamsResponse); /** - * Creates a new Team instance using the specified properties. + * Creates a new BatchDeactivateTeamsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Team instance + * @returns BatchDeactivateTeamsResponse instance */ - public static create(properties?: google.ads.admanager.v1.ITeam): google.ads.admanager.v1.Team; + public static create(properties?: google.ads.admanager.v1.IBatchDeactivateTeamsResponse): google.ads.admanager.v1.BatchDeactivateTeamsResponse; /** - * Encodes the specified Team message. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. - * @param message Team message or plain object to encode + * Encodes the specified BatchDeactivateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsResponse.verify|verify} messages. + * @param message BatchDeactivateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ads.admanager.v1.ITeam, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ads.admanager.v1.IBatchDeactivateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Team message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. - * @param message Team message or plain object to encode + * Encodes the specified BatchDeactivateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsResponse.verify|verify} messages. + * @param message BatchDeactivateTeamsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ads.admanager.v1.ITeam, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ads.admanager.v1.IBatchDeactivateTeamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Team message from the specified reader or buffer. + * Decodes a BatchDeactivateTeamsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Team + * @returns BatchDeactivateTeamsResponse * @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.ads.admanager.v1.Team; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.BatchDeactivateTeamsResponse; /** - * Decodes a Team message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateTeamsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Team + * @returns BatchDeactivateTeamsResponse * @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.ads.admanager.v1.Team; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.BatchDeactivateTeamsResponse; /** - * Verifies a Team message. + * Verifies a BatchDeactivateTeamsResponse 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 Team message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Team + * @returns BatchDeactivateTeamsResponse */ - public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.Team; + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.BatchDeactivateTeamsResponse; /** - * Creates a plain object from a Team message. Also converts values to other types if specified. - * @param message Team + * Creates a plain object from a BatchDeactivateTeamsResponse message. Also converts values to other types if specified. + * @param message BatchDeactivateTeamsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.admanager.v1.Team, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.admanager.v1.BatchDeactivateTeamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Team to JSON. + * Converts this BatchDeactivateTeamsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Team + * Gets the default type url for BatchDeactivateTeamsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -23577,6 +42713,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a WebProperty. */ + interface IWebProperty { + + /** WebProperty name */ + name?: (string|null); + + /** WebProperty webPropertyCode */ + webPropertyCode?: (string|null); + + /** WebProperty productType */ + productType?: (google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|keyof typeof google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|null); + + /** WebProperty webPropertyId */ + webPropertyId?: (number|Long|string|null); + } + + /** Represents a WebProperty. */ + class WebProperty implements IWebProperty { + + /** + * Constructs a new WebProperty. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.admanager.v1.IWebProperty); + + /** WebProperty name. */ + public name: string; + + /** WebProperty webPropertyCode. */ + public webPropertyCode: string; + + /** WebProperty productType. */ + public productType: (google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|keyof typeof google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct); + + /** WebProperty webPropertyId. */ + public webPropertyId: (number|Long|string); + + /** + * Creates a new WebProperty instance using the specified properties. + * @param [properties] Properties to set + * @returns WebProperty instance + */ + public static create(properties?: google.ads.admanager.v1.IWebProperty): google.ads.admanager.v1.WebProperty; + + /** + * Encodes the specified WebProperty message. Does not implicitly {@link google.ads.admanager.v1.WebProperty.verify|verify} messages. + * @param message WebProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.admanager.v1.IWebProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebProperty message, length delimited. Does not implicitly {@link google.ads.admanager.v1.WebProperty.verify|verify} messages. + * @param message WebProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.admanager.v1.IWebProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebProperty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebProperty + * @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.ads.admanager.v1.WebProperty; + + /** + * Decodes a WebProperty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebProperty + * @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.ads.admanager.v1.WebProperty; + + /** + * Verifies a WebProperty 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 WebProperty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebProperty + */ + public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.WebProperty; + + /** + * Creates a plain object from a WebProperty message. Also converts values to other types if specified. + * @param message WebProperty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.admanager.v1.WebProperty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebProperty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebProperty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } @@ -30312,355 +49563,6 @@ export namespace google { } } - /** Namespace type. */ - namespace type { - - /** Properties of a Money. */ - interface IMoney { - - /** Money currencyCode */ - currencyCode?: (string|null); - - /** Money units */ - units?: (number|Long|string|null); - - /** Money nanos */ - nanos?: (number|null); - } - - /** Represents a Money. */ - class Money implements IMoney { - - /** - * Constructs a new Money. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IMoney); - - /** Money currencyCode. */ - public currencyCode: string; - - /** Money units. */ - public units: (number|Long|string); - - /** Money nanos. */ - public nanos: number; - - /** - * Creates a new Money instance using the specified properties. - * @param [properties] Properties to set - * @returns Money instance - */ - public static create(properties?: google.type.IMoney): google.type.Money; - - /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Money message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Money - * @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.type.Money; - - /** - * Decodes a Money message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Money - * @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.type.Money; - - /** - * Verifies a Money 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 Money message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Money - */ - public static fromObject(object: { [k: string]: any }): google.type.Money; - - /** - * Creates a plain object from a Money message. Also converts values to other types if specified. - * @param message Money - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Money to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Money - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @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.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @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.type.Date; - - /** - * Verifies a Date 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 Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Properties of a TimeOfDay. */ - interface ITimeOfDay { - - /** TimeOfDay hours */ - hours?: (number|null); - - /** TimeOfDay minutes */ - minutes?: (number|null); - - /** TimeOfDay seconds */ - seconds?: (number|null); - - /** TimeOfDay nanos */ - nanos?: (number|null); - } - - /** Represents a TimeOfDay. */ - class TimeOfDay implements ITimeOfDay { - - /** - * Constructs a new TimeOfDay. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ITimeOfDay); - - /** TimeOfDay hours. */ - public hours: number; - - /** TimeOfDay minutes. */ - public minutes: number; - - /** TimeOfDay seconds. */ - public seconds: number; - - /** TimeOfDay nanos. */ - public nanos: number; - - /** - * Creates a new TimeOfDay instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeOfDay instance - */ - public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; - - /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeOfDay message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeOfDay - * @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.type.TimeOfDay; - - /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeOfDay - * @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.type.TimeOfDay; - - /** - * Verifies a TimeOfDay 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeOfDay - */ - public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; - - /** - * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. - * @param message TimeOfDay - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeOfDay to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeOfDay - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Namespace longrunning. */ namespace longrunning { @@ -31745,4 +50647,456 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @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.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @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.type.Interval; + + /** + * Verifies an Interval 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Money. */ + interface IMoney { + + /** Money currencyCode */ + currencyCode?: (string|null); + + /** Money units */ + units?: (number|Long|string|null); + + /** Money nanos */ + nanos?: (number|null); + } + + /** Represents a Money. */ + class Money implements IMoney { + + /** + * Constructs a new Money. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IMoney); + + /** Money currencyCode. */ + public currencyCode: string; + + /** Money units. */ + public units: (number|Long|string); + + /** Money nanos. */ + public nanos: number; + + /** + * Creates a new Money instance using the specified properties. + * @param [properties] Properties to set + * @returns Money instance + */ + public static create(properties?: google.type.IMoney): google.type.Money; + + /** + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Money message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Money + * @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.type.Money; + + /** + * Decodes a Money message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Money + * @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.type.Money; + + /** + * Verifies a Money 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 Money message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Money + */ + public static fromObject(object: { [k: string]: any }): google.type.Money; + + /** + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @param message Money + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Money to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Money + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @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.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @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.type.Date; + + /** + * Verifies a Date 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 Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { + + /** TimeOfDay hours */ + hours?: (number|null); + + /** TimeOfDay minutes */ + minutes?: (number|null); + + /** TimeOfDay seconds */ + seconds?: (number|null); + + /** TimeOfDay nanos */ + nanos?: (number|null); + } + + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { + + /** + * Constructs a new TimeOfDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeOfDay); + + /** TimeOfDay hours. */ + public hours: number; + + /** TimeOfDay minutes. */ + public minutes: number; + + /** TimeOfDay seconds. */ + public seconds: number; + + /** TimeOfDay nanos. */ + public nanos: number; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeOfDay instance + */ + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeOfDay + * @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.type.TimeOfDay; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeOfDay + * @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.type.TimeOfDay; + + /** + * Verifies a TimeOfDay 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeOfDay + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeOfDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeOfDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } diff --git a/packages/google-ads-admanager/protos/protos.js b/packages/google-ads-admanager/protos/protos.js index 028625c7dbc0..5020e2aab7db 100644 --- a/packages/google-ads-admanager/protos/protos.js +++ b/packages/google-ads-admanager/protos/protos.js @@ -2529,23 +2529,23 @@ return DeleteAdBreakRequest; })(); - v1.AdUnitStatusEnum = (function() { + v1.AdReviewCenterAdStatusEnum = (function() { /** - * Properties of an AdUnitStatusEnum. + * Properties of an AdReviewCenterAdStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IAdUnitStatusEnum + * @interface IAdReviewCenterAdStatusEnum */ /** - * Constructs a new AdUnitStatusEnum. + * Constructs a new AdReviewCenterAdStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnitStatusEnum. - * @implements IAdUnitStatusEnum + * @classdesc Represents an AdReviewCenterAdStatusEnum. + * @implements IAdReviewCenterAdStatusEnum * @constructor - * @param {google.ads.admanager.v1.IAdUnitStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAdReviewCenterAdStatusEnum=} [properties] Properties to set */ - function AdUnitStatusEnum(properties) { + function AdReviewCenterAdStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2553,60 +2553,60 @@ } /** - * Creates a new AdUnitStatusEnum instance using the specified properties. + * Creates a new AdReviewCenterAdStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static - * @param {google.ads.admanager.v1.IAdUnitStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum instance + * @param {google.ads.admanager.v1.IAdReviewCenterAdStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdReviewCenterAdStatusEnum} AdReviewCenterAdStatusEnum instance */ - AdUnitStatusEnum.create = function create(properties) { - return new AdUnitStatusEnum(properties); + AdReviewCenterAdStatusEnum.create = function create(properties) { + return new AdReviewCenterAdStatusEnum(properties); }; /** - * Encodes the specified AdUnitStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. + * Encodes the specified AdReviewCenterAdStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAdStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static - * @param {google.ads.admanager.v1.IAdUnitStatusEnum} message AdUnitStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdReviewCenterAdStatusEnum} message AdReviewCenterAdStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitStatusEnum.encode = function encode(message, writer) { + AdReviewCenterAdStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified AdUnitStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. + * Encodes the specified AdReviewCenterAdStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAdStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static - * @param {google.ads.admanager.v1.IAdUnitStatusEnum} message AdUnitStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdReviewCenterAdStatusEnum} message AdReviewCenterAdStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + AdReviewCenterAdStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdUnitStatusEnum message from the specified reader or buffer. + * Decodes an AdReviewCenterAdStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAdStatusEnum} AdReviewCenterAdStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitStatusEnum.decode = function decode(reader, length, error) { + AdReviewCenterAdStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -2621,126 +2621,131 @@ }; /** - * Decodes an AdUnitStatusEnum message from the specified reader or buffer, length delimited. + * Decodes an AdReviewCenterAdStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAdStatusEnum} AdReviewCenterAdStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitStatusEnum.decodeDelimited = function decodeDelimited(reader) { + AdReviewCenterAdStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdUnitStatusEnum message. + * Verifies an AdReviewCenterAdStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdUnitStatusEnum.verify = function verify(message) { + AdReviewCenterAdStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an AdUnitStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdReviewCenterAdStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAdStatusEnum} AdReviewCenterAdStatusEnum */ - AdUnitStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdUnitStatusEnum) + AdReviewCenterAdStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum) return object; - return new $root.google.ads.admanager.v1.AdUnitStatusEnum(); + return new $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum(); }; /** - * Creates a plain object from an AdUnitStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from an AdReviewCenterAdStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static - * @param {google.ads.admanager.v1.AdUnitStatusEnum} message AdUnitStatusEnum + * @param {google.ads.admanager.v1.AdReviewCenterAdStatusEnum} message AdReviewCenterAdStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdUnitStatusEnum.toObject = function toObject() { + AdReviewCenterAdStatusEnum.toObject = function toObject() { return {}; }; /** - * Converts this AdUnitStatusEnum to JSON. + * Converts this AdReviewCenterAdStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @instance * @returns {Object.} JSON object */ - AdUnitStatusEnum.prototype.toJSON = function toJSON() { + AdReviewCenterAdStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdUnitStatusEnum + * Gets the default type url for AdReviewCenterAdStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdUnitStatusEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAdStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdUnitStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdReviewCenterAdStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdReviewCenterAdStatusEnum"; }; /** - * AdUnitStatus enum. - * @name google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus + * AdReviewCenterAdStatus enum. + * @name google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus * @enum {number} - * @property {number} AD_UNIT_STATUS_UNSPECIFIED=0 AD_UNIT_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - * @property {number} ARCHIVED=3 ARCHIVED value + * @property {number} AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED=0 AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED value + * @property {number} ALLOWED=1 ALLOWED value + * @property {number} BLOCKED=2 BLOCKED value + * @property {number} UNREVIEWED=3 UNREVIEWED value */ - AdUnitStatusEnum.AdUnitStatus = (function() { + AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AD_UNIT_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - values[valuesById[3] = "ARCHIVED"] = 3; + values[valuesById[0] = "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALLOWED"] = 1; + values[valuesById[2] = "BLOCKED"] = 2; + values[valuesById[3] = "UNREVIEWED"] = 3; return values; })(); - return AdUnitStatusEnum; + return AdReviewCenterAdStatusEnum; })(); - v1.SmartSizeModeEnum = (function() { + v1.AdReviewCenterAd = (function() { /** - * Properties of a SmartSizeModeEnum. + * Properties of an AdReviewCenterAd. * @memberof google.ads.admanager.v1 - * @interface ISmartSizeModeEnum + * @interface IAdReviewCenterAd + * @property {string|null} [name] AdReviewCenterAd name + * @property {string|null} [adReviewCenterAdId] AdReviewCenterAd adReviewCenterAdId + * @property {google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|null} [productType] AdReviewCenterAd productType + * @property {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|null} [status] AdReviewCenterAd status + * @property {string|null} [previewUrl] AdReviewCenterAd previewUrl */ /** - * Constructs a new SmartSizeModeEnum. + * Constructs a new AdReviewCenterAd. * @memberof google.ads.admanager.v1 - * @classdesc Represents a SmartSizeModeEnum. - * @implements ISmartSizeModeEnum + * @classdesc Represents an AdReviewCenterAd. + * @implements IAdReviewCenterAd * @constructor - * @param {google.ads.admanager.v1.ISmartSizeModeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAdReviewCenterAd=} [properties] Properties to set */ - function SmartSizeModeEnum(properties) { + function AdReviewCenterAd(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2748,65 +2753,144 @@ } /** - * Creates a new SmartSizeModeEnum instance using the specified properties. + * AdReviewCenterAd name. + * @member {string} name + * @memberof google.ads.admanager.v1.AdReviewCenterAd + * @instance + */ + AdReviewCenterAd.prototype.name = ""; + + /** + * AdReviewCenterAd adReviewCenterAdId. + * @member {string} adReviewCenterAdId + * @memberof google.ads.admanager.v1.AdReviewCenterAd + * @instance + */ + AdReviewCenterAd.prototype.adReviewCenterAdId = ""; + + /** + * AdReviewCenterAd productType. + * @member {google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct} productType + * @memberof google.ads.admanager.v1.AdReviewCenterAd + * @instance + */ + AdReviewCenterAd.prototype.productType = 0; + + /** + * AdReviewCenterAd status. + * @member {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus} status + * @memberof google.ads.admanager.v1.AdReviewCenterAd + * @instance + */ + AdReviewCenterAd.prototype.status = 0; + + /** + * AdReviewCenterAd previewUrl. + * @member {string|null|undefined} previewUrl + * @memberof google.ads.admanager.v1.AdReviewCenterAd + * @instance + */ + AdReviewCenterAd.prototype.previewUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdReviewCenterAd.prototype, "_previewUrl", { + get: $util.oneOfGetter($oneOfFields = ["previewUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdReviewCenterAd instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static - * @param {google.ads.admanager.v1.ISmartSizeModeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum instance + * @param {google.ads.admanager.v1.IAdReviewCenterAd=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdReviewCenterAd} AdReviewCenterAd instance */ - SmartSizeModeEnum.create = function create(properties) { - return new SmartSizeModeEnum(properties); + AdReviewCenterAd.create = function create(properties) { + return new AdReviewCenterAd(properties); }; /** - * Encodes the specified SmartSizeModeEnum message. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. + * Encodes the specified AdReviewCenterAd message. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAd.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static - * @param {google.ads.admanager.v1.ISmartSizeModeEnum} message SmartSizeModeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdReviewCenterAd} message AdReviewCenterAd message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartSizeModeEnum.encode = function encode(message, writer) { + AdReviewCenterAd.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.adReviewCenterAdId != null && Object.hasOwnProperty.call(message, "adReviewCenterAdId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.adReviewCenterAdId); + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.productType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.previewUrl != null && Object.hasOwnProperty.call(message, "previewUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.previewUrl); return writer; }; /** - * Encodes the specified SmartSizeModeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. + * Encodes the specified AdReviewCenterAd message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdReviewCenterAd.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static - * @param {google.ads.admanager.v1.ISmartSizeModeEnum} message SmartSizeModeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdReviewCenterAd} message AdReviewCenterAd message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartSizeModeEnum.encodeDelimited = function encodeDelimited(message, writer) { + AdReviewCenterAd.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartSizeModeEnum message from the specified reader or buffer. + * Decodes an AdReviewCenterAd message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAd} AdReviewCenterAd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartSizeModeEnum.decode = function decode(reader, length, error) { + AdReviewCenterAd.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SmartSizeModeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdReviewCenterAd(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.adReviewCenterAdId = reader.string(); + break; + } + case 3: { + message.productType = reader.int32(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.previewUrl = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2816,126 +2900,222 @@ }; /** - * Decodes a SmartSizeModeEnum message from the specified reader or buffer, length delimited. + * Decodes an AdReviewCenterAd message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAd} AdReviewCenterAd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartSizeModeEnum.decodeDelimited = function decodeDelimited(reader) { + AdReviewCenterAd.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SmartSizeModeEnum message. + * Verifies an AdReviewCenterAd message. * @function verify - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SmartSizeModeEnum.verify = function verify(message) { + AdReviewCenterAd.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.adReviewCenterAdId != null && message.hasOwnProperty("adReviewCenterAdId")) + if (!$util.isString(message.adReviewCenterAdId)) + return "adReviewCenterAdId: string expected"; + if (message.productType != null && message.hasOwnProperty("productType")) + switch (message.productType) { + default: + return "productType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.previewUrl != null && message.hasOwnProperty("previewUrl")) { + properties._previewUrl = 1; + if (!$util.isString(message.previewUrl)) + return "previewUrl: string expected"; + } return null; }; /** - * Creates a SmartSizeModeEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdReviewCenterAd message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum + * @returns {google.ads.admanager.v1.AdReviewCenterAd} AdReviewCenterAd */ - SmartSizeModeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.SmartSizeModeEnum) + AdReviewCenterAd.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdReviewCenterAd) return object; - return new $root.google.ads.admanager.v1.SmartSizeModeEnum(); + var message = new $root.google.ads.admanager.v1.AdReviewCenterAd(); + if (object.name != null) + message.name = String(object.name); + if (object.adReviewCenterAdId != null) + message.adReviewCenterAdId = String(object.adReviewCenterAdId); + switch (object.productType) { + default: + if (typeof object.productType === "number") { + message.productType = object.productType; + break; + } + break; + case "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED": + case 0: + message.productType = 0; + break; + case "DISPLAY": + case 1: + message.productType = 1; + break; + case "MOBILE_APP": + case 2: + message.productType = 2; + break; + case "VIDEO_AND_AUDIO": + case 3: + message.productType = 3; + break; + case "GAMES": + case 4: + message.productType = 4; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ALLOWED": + case 1: + message.status = 1; + break; + case "BLOCKED": + case 2: + message.status = 2; + break; + case "UNREVIEWED": + case 3: + message.status = 3; + break; + } + if (object.previewUrl != null) + message.previewUrl = String(object.previewUrl); + return message; }; /** - * Creates a plain object from a SmartSizeModeEnum message. Also converts values to other types if specified. + * Creates a plain object from an AdReviewCenterAd message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static - * @param {google.ads.admanager.v1.SmartSizeModeEnum} message SmartSizeModeEnum + * @param {google.ads.admanager.v1.AdReviewCenterAd} message AdReviewCenterAd * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SmartSizeModeEnum.toObject = function toObject() { - return {}; + AdReviewCenterAd.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.adReviewCenterAdId = ""; + object.productType = options.enums === String ? "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED" : 0; + object.status = options.enums === String ? "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adReviewCenterAdId != null && message.hasOwnProperty("adReviewCenterAdId")) + object.adReviewCenterAdId = message.adReviewCenterAdId; + if (message.productType != null && message.hasOwnProperty("productType")) + object.productType = options.enums === String ? $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct[message.productType] === undefined ? message.productType : $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct[message.productType] : message.productType; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus[message.status] : message.status; + if (message.previewUrl != null && message.hasOwnProperty("previewUrl")) { + object.previewUrl = message.previewUrl; + if (options.oneofs) + object._previewUrl = "previewUrl"; + } + return object; }; /** - * Converts this SmartSizeModeEnum to JSON. + * Converts this AdReviewCenterAd to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @instance * @returns {Object.} JSON object */ - SmartSizeModeEnum.prototype.toJSON = function toJSON() { + AdReviewCenterAd.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SmartSizeModeEnum + * Gets the default type url for AdReviewCenterAd * @function getTypeUrl - * @memberof google.ads.admanager.v1.SmartSizeModeEnum + * @memberof google.ads.admanager.v1.AdReviewCenterAd * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SmartSizeModeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdReviewCenterAd.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.SmartSizeModeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdReviewCenterAd"; }; - /** - * SmartSizeMode enum. - * @name google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode - * @enum {number} - * @property {number} SMART_SIZE_MODE_UNSPECIFIED=0 SMART_SIZE_MODE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} SMART_BANNER=2 SMART_BANNER value - * @property {number} DYNAMIC_SIZE=3 DYNAMIC_SIZE value - */ - SmartSizeModeEnum.SmartSizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SMART_SIZE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "SMART_BANNER"] = 2; - values[valuesById[3] = "DYNAMIC_SIZE"] = 3; - return values; - })(); - - return SmartSizeModeEnum; + return AdReviewCenterAd; })(); - v1.TargetWindowEnum = (function() { + v1.ExchangeSyndicationProductEnum = (function() { /** - * Properties of a TargetWindowEnum. + * Properties of an ExchangeSyndicationProductEnum. * @memberof google.ads.admanager.v1 - * @interface ITargetWindowEnum + * @interface IExchangeSyndicationProductEnum */ /** - * Constructs a new TargetWindowEnum. + * Constructs a new ExchangeSyndicationProductEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TargetWindowEnum. - * @implements ITargetWindowEnum + * @classdesc Represents an ExchangeSyndicationProductEnum. + * @implements IExchangeSyndicationProductEnum * @constructor - * @param {google.ads.admanager.v1.ITargetWindowEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IExchangeSyndicationProductEnum=} [properties] Properties to set */ - function TargetWindowEnum(properties) { + function ExchangeSyndicationProductEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2943,60 +3123,60 @@ } /** - * Creates a new TargetWindowEnum instance using the specified properties. + * Creates a new ExchangeSyndicationProductEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static - * @param {google.ads.admanager.v1.ITargetWindowEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum instance + * @param {google.ads.admanager.v1.IExchangeSyndicationProductEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ExchangeSyndicationProductEnum} ExchangeSyndicationProductEnum instance */ - TargetWindowEnum.create = function create(properties) { - return new TargetWindowEnum(properties); + ExchangeSyndicationProductEnum.create = function create(properties) { + return new ExchangeSyndicationProductEnum(properties); }; /** - * Encodes the specified TargetWindowEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. + * Encodes the specified ExchangeSyndicationProductEnum message. Does not implicitly {@link google.ads.admanager.v1.ExchangeSyndicationProductEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static - * @param {google.ads.admanager.v1.ITargetWindowEnum} message TargetWindowEnum message or plain object to encode + * @param {google.ads.admanager.v1.IExchangeSyndicationProductEnum} message ExchangeSyndicationProductEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetWindowEnum.encode = function encode(message, writer) { + ExchangeSyndicationProductEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified TargetWindowEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. + * Encodes the specified ExchangeSyndicationProductEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ExchangeSyndicationProductEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static - * @param {google.ads.admanager.v1.ITargetWindowEnum} message TargetWindowEnum message or plain object to encode + * @param {google.ads.admanager.v1.IExchangeSyndicationProductEnum} message ExchangeSyndicationProductEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetWindowEnum.encodeDelimited = function encodeDelimited(message, writer) { + ExchangeSyndicationProductEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetWindowEnum message from the specified reader or buffer. + * Decodes an ExchangeSyndicationProductEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum + * @returns {google.ads.admanager.v1.ExchangeSyndicationProductEnum} ExchangeSyndicationProductEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetWindowEnum.decode = function decode(reader, length, error) { + ExchangeSyndicationProductEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TargetWindowEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -3011,688 +3191,466 @@ }; /** - * Decodes a TargetWindowEnum message from the specified reader or buffer, length delimited. + * Decodes an ExchangeSyndicationProductEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum + * @returns {google.ads.admanager.v1.ExchangeSyndicationProductEnum} ExchangeSyndicationProductEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetWindowEnum.decodeDelimited = function decodeDelimited(reader) { + ExchangeSyndicationProductEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetWindowEnum message. + * Verifies an ExchangeSyndicationProductEnum message. * @function verify - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetWindowEnum.verify = function verify(message) { + ExchangeSyndicationProductEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a TargetWindowEnum message from a plain object. Also converts values to their respective internal types. + * Creates an ExchangeSyndicationProductEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum + * @returns {google.ads.admanager.v1.ExchangeSyndicationProductEnum} ExchangeSyndicationProductEnum */ - TargetWindowEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TargetWindowEnum) + ExchangeSyndicationProductEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum) return object; - return new $root.google.ads.admanager.v1.TargetWindowEnum(); + return new $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum(); }; /** - * Creates a plain object from a TargetWindowEnum message. Also converts values to other types if specified. + * Creates a plain object from an ExchangeSyndicationProductEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static - * @param {google.ads.admanager.v1.TargetWindowEnum} message TargetWindowEnum + * @param {google.ads.admanager.v1.ExchangeSyndicationProductEnum} message ExchangeSyndicationProductEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetWindowEnum.toObject = function toObject() { + ExchangeSyndicationProductEnum.toObject = function toObject() { return {}; }; /** - * Converts this TargetWindowEnum to JSON. + * Converts this ExchangeSyndicationProductEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @instance * @returns {Object.} JSON object */ - TargetWindowEnum.prototype.toJSON = function toJSON() { + ExchangeSyndicationProductEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetWindowEnum + * Gets the default type url for ExchangeSyndicationProductEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.TargetWindowEnum + * @memberof google.ads.admanager.v1.ExchangeSyndicationProductEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetWindowEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExchangeSyndicationProductEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TargetWindowEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ExchangeSyndicationProductEnum"; }; /** - * TargetWindow enum. - * @name google.ads.admanager.v1.TargetWindowEnum.TargetWindow + * ExchangeSyndicationProduct enum. + * @name google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct * @enum {number} - * @property {number} TARGET_WINDOW_UNSPECIFIED=0 TARGET_WINDOW_UNSPECIFIED value - * @property {number} TOP=1 TOP value - * @property {number} BLANK=2 BLANK value + * @property {number} EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED=0 EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED value + * @property {number} DISPLAY=1 DISPLAY value + * @property {number} MOBILE_APP=2 MOBILE_APP value + * @property {number} VIDEO_AND_AUDIO=3 VIDEO_AND_AUDIO value + * @property {number} GAMES=4 GAMES value */ - TargetWindowEnum.TargetWindow = (function() { + ExchangeSyndicationProductEnum.ExchangeSyndicationProduct = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_WINDOW_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOP"] = 1; - values[valuesById[2] = "BLANK"] = 2; + values[valuesById[0] = "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISPLAY"] = 1; + values[valuesById[2] = "MOBILE_APP"] = 2; + values[valuesById[3] = "VIDEO_AND_AUDIO"] = 3; + values[valuesById[4] = "GAMES"] = 4; return values; })(); - return TargetWindowEnum; + return ExchangeSyndicationProductEnum; })(); - v1.AdUnit = (function() { - - /** - * Properties of an AdUnit. - * @memberof google.ads.admanager.v1 - * @interface IAdUnit - * @property {string|null} [name] AdUnit name - * @property {number|Long|null} [adUnitId] AdUnit adUnitId - * @property {string|null} [parentAdUnit] AdUnit parentAdUnit - * @property {Array.|null} [parentPath] AdUnit parentPath - * @property {string|null} [displayName] AdUnit displayName - * @property {string|null} [adUnitCode] AdUnit adUnitCode - * @property {google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null} [status] AdUnit status - * @property {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null} [appliedTargetWindow] AdUnit appliedTargetWindow - * @property {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null} [effectiveTargetWindow] AdUnit effectiveTargetWindow - * @property {Array.|null} [appliedTeams] AdUnit appliedTeams - * @property {Array.|null} [teams] AdUnit teams - * @property {string|null} [description] AdUnit description - * @property {boolean|null} [explicitlyTargeted] AdUnit explicitlyTargeted - * @property {boolean|null} [hasChildren] AdUnit hasChildren - * @property {google.protobuf.ITimestamp|null} [updateTime] AdUnit updateTime - * @property {Array.|null} [adUnitSizes] AdUnit adUnitSizes - * @property {string|null} [externalSetTopBoxChannelId] AdUnit externalSetTopBoxChannelId - * @property {google.protobuf.IDuration|null} [refreshDelay] AdUnit refreshDelay - * @property {Array.|null} [appliedLabels] AdUnit appliedLabels - * @property {Array.|null} [effectiveAppliedLabels] AdUnit effectiveAppliedLabels - * @property {Array.|null} [appliedLabelFrequencyCaps] AdUnit appliedLabelFrequencyCaps - * @property {Array.|null} [effectiveLabelFrequencyCaps] AdUnit effectiveLabelFrequencyCaps - * @property {google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null} [smartSizeMode] AdUnit smartSizeMode - * @property {boolean|null} [appliedAdsenseEnabled] AdUnit appliedAdsenseEnabled - * @property {boolean|null} [effectiveAdsenseEnabled] AdUnit effectiveAdsenseEnabled - */ + v1.AdReviewCenterAdService = (function() { /** - * Constructs a new AdUnit. + * Constructs a new AdReviewCenterAdService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnit. - * @implements IAdUnit + * @classdesc Represents an AdReviewCenterAdService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.ads.admanager.v1.IAdUnit=} [properties] Properties to set + * @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 AdUnit(properties) { - this.parentPath = []; - this.appliedTeams = []; - this.teams = []; - this.adUnitSizes = []; - this.appliedLabels = []; - this.effectiveAppliedLabels = []; - this.appliedLabelFrequencyCaps = []; - this.effectiveLabelFrequencyCaps = []; - 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]]; + function AdReviewCenterAdService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (AdReviewCenterAdService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AdReviewCenterAdService; + /** - * AdUnit name. - * @member {string} name - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Creates new AdReviewCenterAdService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.AdReviewCenterAdService + * @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 {AdReviewCenterAdService} RPC service. Useful where requests and/or responses are streamed. */ - AdUnit.prototype.name = ""; + AdReviewCenterAdService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * AdUnit adUnitId. - * @member {number|Long} adUnitId - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|searchAdReviewCenterAds}. + * @memberof google.ads.admanager.v1.AdReviewCenterAdService + * @typedef SearchAdReviewCenterAdsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} [response] SearchAdReviewCenterAdsResponse */ - AdUnit.prototype.adUnitId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * AdUnit parentAdUnit. - * @member {string|null|undefined} parentAdUnit - * @memberof google.ads.admanager.v1.AdUnit + * Calls SearchAdReviewCenterAds. + * @function searchAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest} request SearchAdReviewCenterAdsRequest message or plain object + * @param {google.ads.admanager.v1.AdReviewCenterAdService.SearchAdReviewCenterAdsCallback} callback Node-style callback called with the error, if any, and SearchAdReviewCenterAdsResponse + * @returns {undefined} + * @variation 1 */ - AdUnit.prototype.parentAdUnit = null; + Object.defineProperty(AdReviewCenterAdService.prototype.searchAdReviewCenterAds = function searchAdReviewCenterAds(request, callback) { + return this.rpcCall(searchAdReviewCenterAds, $root.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest, $root.google.ads.admanager.v1.SearchAdReviewCenterAdsResponse, request, callback); + }, "name", { value: "SearchAdReviewCenterAds" }); /** - * AdUnit parentPath. - * @member {Array.} parentPath - * @memberof google.ads.admanager.v1.AdUnit + * Calls SearchAdReviewCenterAds. + * @function searchAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest} request SearchAdReviewCenterAdsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AdUnit.prototype.parentPath = $util.emptyArray; /** - * AdUnit displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|batchAllowAdReviewCenterAds}. + * @memberof google.ads.admanager.v1.AdReviewCenterAdService + * @typedef BatchAllowAdReviewCenterAdsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AdUnit.prototype.displayName = null; /** - * AdUnit adUnitCode. - * @member {string|null|undefined} adUnitCode - * @memberof google.ads.admanager.v1.AdUnit + * Calls BatchAllowAdReviewCenterAds. + * @function batchAllowAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest} request BatchAllowAdReviewCenterAdsRequest message or plain object + * @param {google.ads.admanager.v1.AdReviewCenterAdService.BatchAllowAdReviewCenterAdsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AdUnit.prototype.adUnitCode = null; + Object.defineProperty(AdReviewCenterAdService.prototype.batchAllowAdReviewCenterAds = function batchAllowAdReviewCenterAds(request, callback) { + return this.rpcCall(batchAllowAdReviewCenterAds, $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchAllowAdReviewCenterAds" }); /** - * AdUnit status. - * @member {google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null|undefined} status - * @memberof google.ads.admanager.v1.AdUnit + * Calls BatchAllowAdReviewCenterAds. + * @function batchAllowAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest} request BatchAllowAdReviewCenterAdsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AdUnit.prototype.status = null; /** - * AdUnit appliedTargetWindow. - * @member {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null|undefined} appliedTargetWindow - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdReviewCenterAdService|batchBlockAdReviewCenterAds}. + * @memberof google.ads.admanager.v1.AdReviewCenterAdService + * @typedef BatchBlockAdReviewCenterAdsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AdUnit.prototype.appliedTargetWindow = null; /** - * AdUnit effectiveTargetWindow. - * @member {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null|undefined} effectiveTargetWindow - * @memberof google.ads.admanager.v1.AdUnit + * Calls BatchBlockAdReviewCenterAds. + * @function batchBlockAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest} request BatchBlockAdReviewCenterAdsRequest message or plain object + * @param {google.ads.admanager.v1.AdReviewCenterAdService.BatchBlockAdReviewCenterAdsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AdUnit.prototype.effectiveTargetWindow = null; + Object.defineProperty(AdReviewCenterAdService.prototype.batchBlockAdReviewCenterAds = function batchBlockAdReviewCenterAds(request, callback) { + return this.rpcCall(batchBlockAdReviewCenterAds, $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchBlockAdReviewCenterAds" }); /** - * AdUnit appliedTeams. - * @member {Array.} appliedTeams - * @memberof google.ads.admanager.v1.AdUnit + * Calls BatchBlockAdReviewCenterAds. + * @function batchBlockAdReviewCenterAds + * @memberof google.ads.admanager.v1.AdReviewCenterAdService * @instance + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest} request BatchBlockAdReviewCenterAdsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AdUnit.prototype.appliedTeams = $util.emptyArray; + + return AdReviewCenterAdService; + })(); + + v1.SearchAdReviewCenterAdsRequest = (function() { /** - * AdUnit teams. - * @member {Array.} teams - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Properties of a SearchAdReviewCenterAdsRequest. + * @memberof google.ads.admanager.v1 + * @interface ISearchAdReviewCenterAdsRequest + * @property {string|null} [parent] SearchAdReviewCenterAdsRequest parent + * @property {number|null} [pageSize] SearchAdReviewCenterAdsRequest pageSize + * @property {string|null} [pageToken] SearchAdReviewCenterAdsRequest pageToken + * @property {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus|null} [status] SearchAdReviewCenterAdsRequest status + * @property {Array.|null} [adReviewCenterAdId] SearchAdReviewCenterAdsRequest adReviewCenterAdId + * @property {google.type.IInterval|null} [dateTimeRange] SearchAdReviewCenterAdsRequest dateTimeRange + * @property {Array.|null} [searchText] SearchAdReviewCenterAdsRequest searchText + * @property {Array.|null} [buyerAccountId] SearchAdReviewCenterAdsRequest buyerAccountId */ - AdUnit.prototype.teams = $util.emptyArray; /** - * AdUnit description. - * @member {string|null|undefined} description - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Constructs a new SearchAdReviewCenterAdsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a SearchAdReviewCenterAdsRequest. + * @implements ISearchAdReviewCenterAdsRequest + * @constructor + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest=} [properties] Properties to set */ - AdUnit.prototype.description = null; + function SearchAdReviewCenterAdsRequest(properties) { + this.adReviewCenterAdId = []; + this.searchText = []; + this.buyerAccountId = []; + 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]]; + } /** - * AdUnit explicitlyTargeted. - * @member {boolean|null|undefined} explicitlyTargeted - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.explicitlyTargeted = null; + SearchAdReviewCenterAdsRequest.prototype.parent = ""; /** - * AdUnit hasChildren. - * @member {boolean|null|undefined} hasChildren - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.hasChildren = null; + SearchAdReviewCenterAdsRequest.prototype.pageSize = 0; /** - * AdUnit updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.updateTime = null; + SearchAdReviewCenterAdsRequest.prototype.pageToken = ""; /** - * AdUnit adUnitSizes. - * @member {Array.} adUnitSizes - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest status. + * @member {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus} status + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.adUnitSizes = $util.emptyArray; + SearchAdReviewCenterAdsRequest.prototype.status = 0; /** - * AdUnit externalSetTopBoxChannelId. - * @member {string|null|undefined} externalSetTopBoxChannelId - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest adReviewCenterAdId. + * @member {Array.} adReviewCenterAdId + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.externalSetTopBoxChannelId = null; + SearchAdReviewCenterAdsRequest.prototype.adReviewCenterAdId = $util.emptyArray; /** - * AdUnit refreshDelay. - * @member {google.protobuf.IDuration|null|undefined} refreshDelay - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest dateTimeRange. + * @member {google.type.IInterval|null|undefined} dateTimeRange + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.refreshDelay = null; + SearchAdReviewCenterAdsRequest.prototype.dateTimeRange = null; /** - * AdUnit appliedLabels. - * @member {Array.} appliedLabels - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest searchText. + * @member {Array.} searchText + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.appliedLabels = $util.emptyArray; + SearchAdReviewCenterAdsRequest.prototype.searchText = $util.emptyArray; /** - * AdUnit effectiveAppliedLabels. - * @member {Array.} effectiveAppliedLabels - * @memberof google.ads.admanager.v1.AdUnit + * SearchAdReviewCenterAdsRequest buyerAccountId. + * @member {Array.} buyerAccountId + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance */ - AdUnit.prototype.effectiveAppliedLabels = $util.emptyArray; + SearchAdReviewCenterAdsRequest.prototype.buyerAccountId = $util.emptyArray; /** - * AdUnit appliedLabelFrequencyCaps. - * @member {Array.} appliedLabelFrequencyCaps - * @memberof google.ads.admanager.v1.AdUnit - * @instance + * Creates a new SearchAdReviewCenterAdsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest + * @static + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsRequest} SearchAdReviewCenterAdsRequest instance */ - AdUnit.prototype.appliedLabelFrequencyCaps = $util.emptyArray; + SearchAdReviewCenterAdsRequest.create = function create(properties) { + return new SearchAdReviewCenterAdsRequest(properties); + }; /** - * AdUnit effectiveLabelFrequencyCaps. - * @member {Array.} effectiveLabelFrequencyCaps - * @memberof google.ads.admanager.v1.AdUnit - * @instance - */ - AdUnit.prototype.effectiveLabelFrequencyCaps = $util.emptyArray; - - /** - * AdUnit smartSizeMode. - * @member {google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null|undefined} smartSizeMode - * @memberof google.ads.admanager.v1.AdUnit - * @instance - */ - AdUnit.prototype.smartSizeMode = null; - - /** - * AdUnit appliedAdsenseEnabled. - * @member {boolean|null|undefined} appliedAdsenseEnabled - * @memberof google.ads.admanager.v1.AdUnit - * @instance - */ - AdUnit.prototype.appliedAdsenseEnabled = null; - - /** - * AdUnit effectiveAdsenseEnabled. - * @member {boolean|null|undefined} effectiveAdsenseEnabled - * @memberof google.ads.admanager.v1.AdUnit - * @instance - */ - AdUnit.prototype.effectiveAdsenseEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_parentAdUnit", { - get: $util.oneOfGetter($oneOfFields = ["parentAdUnit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_adUnitCode", { - get: $util.oneOfGetter($oneOfFields = ["adUnitCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_appliedTargetWindow", { - get: $util.oneOfGetter($oneOfFields = ["appliedTargetWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_effectiveTargetWindow", { - get: $util.oneOfGetter($oneOfFields = ["effectiveTargetWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_explicitlyTargeted", { - get: $util.oneOfGetter($oneOfFields = ["explicitlyTargeted"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_hasChildren", { - get: $util.oneOfGetter($oneOfFields = ["hasChildren"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_externalSetTopBoxChannelId", { - get: $util.oneOfGetter($oneOfFields = ["externalSetTopBoxChannelId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_refreshDelay", { - get: $util.oneOfGetter($oneOfFields = ["refreshDelay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_smartSizeMode", { - get: $util.oneOfGetter($oneOfFields = ["smartSizeMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_appliedAdsenseEnabled", { - get: $util.oneOfGetter($oneOfFields = ["appliedAdsenseEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnit.prototype, "_effectiveAdsenseEnabled", { - get: $util.oneOfGetter($oneOfFields = ["effectiveAdsenseEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdUnit instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.AdUnit - * @static - * @param {google.ads.admanager.v1.IAdUnit=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdUnit} AdUnit instance - */ - AdUnit.create = function create(properties) { - return new AdUnit(properties); - }; - - /** - * Encodes the specified AdUnit message. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. + * Encodes the specified SearchAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAdUnit} message AdUnit message or plain object to encode + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest} message SearchAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnit.encode = function encode(message, writer) { + SearchAdReviewCenterAdsRequest.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.adUnitCode != null && Object.hasOwnProperty.call(message, "adUnitCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.adUnitCode); - if (message.appliedTeams != null && message.appliedTeams.length) - for (var i = 0; i < message.appliedTeams.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.appliedTeams[i]); - if (message.teams != null && message.teams.length) - for (var i = 0; i < message.teams.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.teams[i]); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.explicitlyTargeted != null && Object.hasOwnProperty.call(message, "explicitlyTargeted")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.explicitlyTargeted); - if (message.hasChildren != null && Object.hasOwnProperty.call(message, "hasChildren")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.hasChildren); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.displayName); - if (message.parentAdUnit != null && Object.hasOwnProperty.call(message, "parentAdUnit")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.parentAdUnit); - if (message.parentPath != null && message.parentPath.length) - for (var i = 0; i < message.parentPath.length; ++i) - $root.google.ads.admanager.v1.AdUnitParent.encode(message.parentPath[i], writer.uint32(/* id 11, wireType 2 =*/90).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.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.status); - if (message.adUnitSizes != null && message.adUnitSizes.length) - for (var i = 0; i < message.adUnitSizes.length; ++i) - $root.google.ads.admanager.v1.AdUnitSize.encode(message.adUnitSizes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.adUnitId != null && Object.hasOwnProperty.call(message, "adUnitId")) - writer.uint32(/* id 15, wireType 0 =*/120).int64(message.adUnitId); - if (message.externalSetTopBoxChannelId != null && Object.hasOwnProperty.call(message, "externalSetTopBoxChannelId")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.externalSetTopBoxChannelId); - if (message.refreshDelay != null && Object.hasOwnProperty.call(message, "refreshDelay")) - $root.google.protobuf.Duration.encode(message.refreshDelay, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.appliedLabels != null && message.appliedLabels.length) - for (var i = 0; i < message.appliedLabels.length; ++i) - $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.effectiveAppliedLabels != null && message.effectiveAppliedLabels.length) - for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) - $root.google.ads.admanager.v1.AppliedLabel.encode(message.effectiveAppliedLabels[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.appliedLabelFrequencyCaps != null && message.appliedLabelFrequencyCaps.length) - for (var i = 0; i < message.appliedLabelFrequencyCaps.length; ++i) - $root.google.ads.admanager.v1.LabelFrequencyCap.encode(message.appliedLabelFrequencyCaps[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.effectiveLabelFrequencyCaps != null && message.effectiveLabelFrequencyCaps.length) - for (var i = 0; i < message.effectiveLabelFrequencyCaps.length; ++i) - $root.google.ads.admanager.v1.LabelFrequencyCap.encode(message.effectiveLabelFrequencyCaps[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.smartSizeMode != null && Object.hasOwnProperty.call(message, "smartSizeMode")) - writer.uint32(/* id 25, wireType 0 =*/200).int32(message.smartSizeMode); - if (message.appliedAdsenseEnabled != null && Object.hasOwnProperty.call(message, "appliedAdsenseEnabled")) - writer.uint32(/* id 26, wireType 0 =*/208).bool(message.appliedAdsenseEnabled); - if (message.effectiveAdsenseEnabled != null && Object.hasOwnProperty.call(message, "effectiveAdsenseEnabled")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.effectiveAdsenseEnabled); - if (message.appliedTargetWindow != null && Object.hasOwnProperty.call(message, "appliedTargetWindow")) - writer.uint32(/* id 44, wireType 0 =*/352).int32(message.appliedTargetWindow); - if (message.effectiveTargetWindow != null && Object.hasOwnProperty.call(message, "effectiveTargetWindow")) - writer.uint32(/* id 45, wireType 0 =*/360).int32(message.effectiveTargetWindow); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.adReviewCenterAdId != null && message.adReviewCenterAdId.length) + for (var i = 0; i < message.adReviewCenterAdId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.adReviewCenterAdId[i]); + if (message.dateTimeRange != null && Object.hasOwnProperty.call(message, "dateTimeRange")) + $root.google.type.Interval.encode(message.dateTimeRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.searchText != null && message.searchText.length) + for (var i = 0; i < message.searchText.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.searchText[i]); + if (message.buyerAccountId != null && message.buyerAccountId.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.buyerAccountId.length; ++i) + writer.int64(message.buyerAccountId[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified AdUnit message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. + * Encodes the specified SearchAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAdUnit} message AdUnit message or plain object to encode + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest} message SearchAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnit.encodeDelimited = function encodeDelimited(message, writer) { + SearchAdReviewCenterAdsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdUnit message from the specified reader or buffer. + * Decodes a SearchAdReviewCenterAdsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdUnit} AdUnit + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsRequest} SearchAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnit.decode = function decode(reader, length, error) { + SearchAdReviewCenterAdsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnit(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 15: { - message.adUnitId = reader.int64(); - break; - } - case 10: { - message.parentAdUnit = reader.string(); - break; - } - case 11: { - if (!(message.parentPath && message.parentPath.length)) - message.parentPath = []; - message.parentPath.push($root.google.ads.admanager.v1.AdUnitParent.decode(reader, reader.uint32())); - break; - } - case 9: { - message.displayName = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.adUnitCode = reader.string(); - break; - } - case 13: { - message.status = reader.int32(); - break; - } - case 44: { - message.appliedTargetWindow = reader.int32(); - break; - } - case 45: { - message.effectiveTargetWindow = reader.int32(); + message.pageSize = reader.int32(); break; } case 3: { - if (!(message.appliedTeams && message.appliedTeams.length)) - message.appliedTeams = []; - message.appliedTeams.push(reader.string()); + message.pageToken = reader.string(); break; } case 4: { - if (!(message.teams && message.teams.length)) - message.teams = []; - message.teams.push(reader.string()); + message.status = reader.int32(); break; } case 5: { - message.description = reader.string(); + if (!(message.adReviewCenterAdId && message.adReviewCenterAdId.length)) + message.adReviewCenterAdId = []; + message.adReviewCenterAdId.push(reader.string()); break; } case 6: { - message.explicitlyTargeted = reader.bool(); + message.dateTimeRange = $root.google.type.Interval.decode(reader, reader.uint32()); break; } case 7: { - message.hasChildren = reader.bool(); + if (!(message.searchText && message.searchText.length)) + message.searchText = []; + message.searchText.push(reader.string()); break; } case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 14: { - if (!(message.adUnitSizes && message.adUnitSizes.length)) - message.adUnitSizes = []; - message.adUnitSizes.push($root.google.ads.admanager.v1.AdUnitSize.decode(reader, reader.uint32())); - break; - } - case 17: { - message.externalSetTopBoxChannelId = reader.string(); - break; - } - case 19: { - message.refreshDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 21: { - if (!(message.appliedLabels && message.appliedLabels.length)) - message.appliedLabels = []; - message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); - break; - } - case 22: { - if (!(message.effectiveAppliedLabels && message.effectiveAppliedLabels.length)) - message.effectiveAppliedLabels = []; - message.effectiveAppliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); - break; - } - case 23: { - if (!(message.appliedLabelFrequencyCaps && message.appliedLabelFrequencyCaps.length)) - message.appliedLabelFrequencyCaps = []; - message.appliedLabelFrequencyCaps.push($root.google.ads.admanager.v1.LabelFrequencyCap.decode(reader, reader.uint32())); - break; - } - case 24: { - if (!(message.effectiveLabelFrequencyCaps && message.effectiveLabelFrequencyCaps.length)) - message.effectiveLabelFrequencyCaps = []; - message.effectiveLabelFrequencyCaps.push($root.google.ads.admanager.v1.LabelFrequencyCap.decode(reader, reader.uint32())); - break; - } - case 25: { - message.smartSizeMode = reader.int32(); - break; - } - case 26: { - message.appliedAdsenseEnabled = reader.bool(); - break; - } - case 27: { - message.effectiveAdsenseEnabled = reader.bool(); + if (!(message.buyerAccountId && message.buyerAccountId.length)) + message.buyerAccountId = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.buyerAccountId.push(reader.int64()); + } else + message.buyerAccountId.push(reader.int64()); break; } default: @@ -3704,65 +3662,42 @@ }; /** - * Decodes an AdUnit message from the specified reader or buffer, length delimited. + * Decodes a SearchAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdUnit} AdUnit + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsRequest} SearchAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnit.decodeDelimited = function decodeDelimited(reader) { + SearchAdReviewCenterAdsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdUnit message. + * Verifies a SearchAdReviewCenterAdsRequest message. * @function verify - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdUnit.verify = function verify(message) { + SearchAdReviewCenterAdsRequest.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.adUnitId != null && message.hasOwnProperty("adUnitId")) - if (!$util.isInteger(message.adUnitId) && !(message.adUnitId && $util.isInteger(message.adUnitId.low) && $util.isInteger(message.adUnitId.high))) - return "adUnitId: integer|Long expected"; - if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { - properties._parentAdUnit = 1; - if (!$util.isString(message.parentAdUnit)) - return "parentAdUnit: string expected"; - } - if (message.parentPath != null && message.hasOwnProperty("parentPath")) { - if (!Array.isArray(message.parentPath)) - return "parentPath: array expected"; - for (var i = 0; i < message.parentPath.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnitParent.verify(message.parentPath[i]); - if (error) - return "parentPath." + error; - } - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { - properties._adUnitCode = 1; - if (!$util.isString(message.adUnitCode)) - return "adUnitCode: string expected"; - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; + 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.status != null && message.hasOwnProperty("status")) switch (message.status) { default: return "status: enum value expected"; @@ -3772,188 +3707,53 @@ case 3: break; } + if (message.adReviewCenterAdId != null && message.hasOwnProperty("adReviewCenterAdId")) { + if (!Array.isArray(message.adReviewCenterAdId)) + return "adReviewCenterAdId: array expected"; + for (var i = 0; i < message.adReviewCenterAdId.length; ++i) + if (!$util.isString(message.adReviewCenterAdId[i])) + return "adReviewCenterAdId: string[] expected"; + } + if (message.dateTimeRange != null && message.hasOwnProperty("dateTimeRange")) { + var error = $root.google.type.Interval.verify(message.dateTimeRange); + if (error) + return "dateTimeRange." + error; } - if (message.appliedTargetWindow != null && message.hasOwnProperty("appliedTargetWindow")) { - properties._appliedTargetWindow = 1; - switch (message.appliedTargetWindow) { - default: - return "appliedTargetWindow: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.effectiveTargetWindow != null && message.hasOwnProperty("effectiveTargetWindow")) { - properties._effectiveTargetWindow = 1; - switch (message.effectiveTargetWindow) { - default: - return "effectiveTargetWindow: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { - if (!Array.isArray(message.appliedTeams)) - return "appliedTeams: array expected"; - for (var i = 0; i < message.appliedTeams.length; ++i) - if (!$util.isString(message.appliedTeams[i])) - return "appliedTeams: string[] expected"; - } - if (message.teams != null && message.hasOwnProperty("teams")) { - if (!Array.isArray(message.teams)) - return "teams: array expected"; - for (var i = 0; i < message.teams.length; ++i) - if (!$util.isString(message.teams[i])) - return "teams: string[] expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.explicitlyTargeted != null && message.hasOwnProperty("explicitlyTargeted")) { - properties._explicitlyTargeted = 1; - if (typeof message.explicitlyTargeted !== "boolean") - return "explicitlyTargeted: boolean expected"; - } - if (message.hasChildren != null && message.hasOwnProperty("hasChildren")) { - properties._hasChildren = 1; - if (typeof message.hasChildren !== "boolean") - return "hasChildren: boolean expected"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.adUnitSizes != null && message.hasOwnProperty("adUnitSizes")) { - if (!Array.isArray(message.adUnitSizes)) - return "adUnitSizes: array expected"; - for (var i = 0; i < message.adUnitSizes.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnitSize.verify(message.adUnitSizes[i]); - if (error) - return "adUnitSizes." + error; - } - } - if (message.externalSetTopBoxChannelId != null && message.hasOwnProperty("externalSetTopBoxChannelId")) { - properties._externalSetTopBoxChannelId = 1; - if (!$util.isString(message.externalSetTopBoxChannelId)) - return "externalSetTopBoxChannelId: string expected"; - } - if (message.refreshDelay != null && message.hasOwnProperty("refreshDelay")) { - properties._refreshDelay = 1; - { - var error = $root.google.protobuf.Duration.verify(message.refreshDelay); - if (error) - return "refreshDelay." + error; - } - } - if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { - if (!Array.isArray(message.appliedLabels)) - return "appliedLabels: array expected"; - for (var i = 0; i < message.appliedLabels.length; ++i) { - var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); - if (error) - return "appliedLabels." + error; - } - } - if (message.effectiveAppliedLabels != null && message.hasOwnProperty("effectiveAppliedLabels")) { - if (!Array.isArray(message.effectiveAppliedLabels)) - return "effectiveAppliedLabels: array expected"; - for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) { - var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.effectiveAppliedLabels[i]); - if (error) - return "effectiveAppliedLabels." + error; - } - } - if (message.appliedLabelFrequencyCaps != null && message.hasOwnProperty("appliedLabelFrequencyCaps")) { - if (!Array.isArray(message.appliedLabelFrequencyCaps)) - return "appliedLabelFrequencyCaps: array expected"; - for (var i = 0; i < message.appliedLabelFrequencyCaps.length; ++i) { - var error = $root.google.ads.admanager.v1.LabelFrequencyCap.verify(message.appliedLabelFrequencyCaps[i]); - if (error) - return "appliedLabelFrequencyCaps." + error; - } - } - if (message.effectiveLabelFrequencyCaps != null && message.hasOwnProperty("effectiveLabelFrequencyCaps")) { - if (!Array.isArray(message.effectiveLabelFrequencyCaps)) - return "effectiveLabelFrequencyCaps: array expected"; - for (var i = 0; i < message.effectiveLabelFrequencyCaps.length; ++i) { - var error = $root.google.ads.admanager.v1.LabelFrequencyCap.verify(message.effectiveLabelFrequencyCaps[i]); - if (error) - return "effectiveLabelFrequencyCaps." + error; - } - } - if (message.smartSizeMode != null && message.hasOwnProperty("smartSizeMode")) { - properties._smartSizeMode = 1; - switch (message.smartSizeMode) { - default: - return "smartSizeMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.appliedAdsenseEnabled != null && message.hasOwnProperty("appliedAdsenseEnabled")) { - properties._appliedAdsenseEnabled = 1; - if (typeof message.appliedAdsenseEnabled !== "boolean") - return "appliedAdsenseEnabled: boolean expected"; + if (message.searchText != null && message.hasOwnProperty("searchText")) { + if (!Array.isArray(message.searchText)) + return "searchText: array expected"; + for (var i = 0; i < message.searchText.length; ++i) + if (!$util.isString(message.searchText[i])) + return "searchText: string[] expected"; } - if (message.effectiveAdsenseEnabled != null && message.hasOwnProperty("effectiveAdsenseEnabled")) { - properties._effectiveAdsenseEnabled = 1; - if (typeof message.effectiveAdsenseEnabled !== "boolean") - return "effectiveAdsenseEnabled: boolean expected"; + if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { + if (!Array.isArray(message.buyerAccountId)) + return "buyerAccountId: array expected"; + for (var i = 0; i < message.buyerAccountId.length; ++i) + if (!$util.isInteger(message.buyerAccountId[i]) && !(message.buyerAccountId[i] && $util.isInteger(message.buyerAccountId[i].low) && $util.isInteger(message.buyerAccountId[i].high))) + return "buyerAccountId: integer|Long[] expected"; } return null; }; /** - * Creates an AdUnit message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdUnit} AdUnit + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsRequest} SearchAdReviewCenterAdsRequest */ - AdUnit.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdUnit) + SearchAdReviewCenterAdsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest) return object; - var message = new $root.google.ads.admanager.v1.AdUnit(); - if (object.name != null) - message.name = String(object.name); - if (object.adUnitId != null) - if ($util.Long) - (message.adUnitId = $util.Long.fromValue(object.adUnitId)).unsigned = false; - else if (typeof object.adUnitId === "string") - message.adUnitId = parseInt(object.adUnitId, 10); - else if (typeof object.adUnitId === "number") - message.adUnitId = object.adUnitId; - else if (typeof object.adUnitId === "object") - message.adUnitId = new $util.LongBits(object.adUnitId.low >>> 0, object.adUnitId.high >>> 0).toNumber(); - if (object.parentAdUnit != null) - message.parentAdUnit = String(object.parentAdUnit); - if (object.parentPath) { - if (!Array.isArray(object.parentPath)) - throw TypeError(".google.ads.admanager.v1.AdUnit.parentPath: array expected"); - message.parentPath = []; - for (var i = 0; i < object.parentPath.length; ++i) { - if (typeof object.parentPath[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.parentPath: object expected"); - message.parentPath[i] = $root.google.ads.admanager.v1.AdUnitParent.fromObject(object.parentPath[i]); - } - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.adUnitCode != null) - message.adUnitCode = String(object.adUnitCode); + var message = new $root.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest(); + 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); switch (object.status) { default: if (typeof object.status === "number") { @@ -3961,382 +3761,164 @@ break; } break; - case "AD_UNIT_STATUS_UNSPECIFIED": + case "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED": case 0: message.status = 0; break; - case "ACTIVE": + case "ALLOWED": case 1: message.status = 1; break; - case "INACTIVE": + case "BLOCKED": case 2: message.status = 2; break; - case "ARCHIVED": + case "UNREVIEWED": case 3: message.status = 3; break; } - switch (object.appliedTargetWindow) { - default: - if (typeof object.appliedTargetWindow === "number") { - message.appliedTargetWindow = object.appliedTargetWindow; - break; - } - break; - case "TARGET_WINDOW_UNSPECIFIED": - case 0: - message.appliedTargetWindow = 0; - break; - case "TOP": - case 1: - message.appliedTargetWindow = 1; - break; - case "BLANK": - case 2: - message.appliedTargetWindow = 2; - break; - } - switch (object.effectiveTargetWindow) { - default: - if (typeof object.effectiveTargetWindow === "number") { - message.effectiveTargetWindow = object.effectiveTargetWindow; - break; - } - break; - case "TARGET_WINDOW_UNSPECIFIED": - case 0: - message.effectiveTargetWindow = 0; - break; - case "TOP": - case 1: - message.effectiveTargetWindow = 1; - break; - case "BLANK": - case 2: - message.effectiveTargetWindow = 2; - break; - } - if (object.appliedTeams) { - if (!Array.isArray(object.appliedTeams)) - throw TypeError(".google.ads.admanager.v1.AdUnit.appliedTeams: array expected"); - message.appliedTeams = []; - for (var i = 0; i < object.appliedTeams.length; ++i) - message.appliedTeams[i] = String(object.appliedTeams[i]); - } - if (object.teams) { - if (!Array.isArray(object.teams)) - throw TypeError(".google.ads.admanager.v1.AdUnit.teams: array expected"); - message.teams = []; - for (var i = 0; i < object.teams.length; ++i) - message.teams[i] = String(object.teams[i]); - } - if (object.description != null) - message.description = String(object.description); - if (object.explicitlyTargeted != null) - message.explicitlyTargeted = Boolean(object.explicitlyTargeted); - if (object.hasChildren != null) - message.hasChildren = Boolean(object.hasChildren); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.adUnitSizes) { - if (!Array.isArray(object.adUnitSizes)) - throw TypeError(".google.ads.admanager.v1.AdUnit.adUnitSizes: array expected"); - message.adUnitSizes = []; - for (var i = 0; i < object.adUnitSizes.length; ++i) { - if (typeof object.adUnitSizes[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.adUnitSizes: object expected"); - message.adUnitSizes[i] = $root.google.ads.admanager.v1.AdUnitSize.fromObject(object.adUnitSizes[i]); - } - } - if (object.externalSetTopBoxChannelId != null) - message.externalSetTopBoxChannelId = String(object.externalSetTopBoxChannelId); - if (object.refreshDelay != null) { - if (typeof object.refreshDelay !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.refreshDelay: object expected"); - message.refreshDelay = $root.google.protobuf.Duration.fromObject(object.refreshDelay); - } - if (object.appliedLabels) { - if (!Array.isArray(object.appliedLabels)) - throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabels: array expected"); - message.appliedLabels = []; - for (var i = 0; i < object.appliedLabels.length; ++i) { - if (typeof object.appliedLabels[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabels: object expected"); - message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); - } - } - if (object.effectiveAppliedLabels) { - if (!Array.isArray(object.effectiveAppliedLabels)) - throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveAppliedLabels: array expected"); - message.effectiveAppliedLabels = []; - for (var i = 0; i < object.effectiveAppliedLabels.length; ++i) { - if (typeof object.effectiveAppliedLabels[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveAppliedLabels: object expected"); - message.effectiveAppliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.effectiveAppliedLabels[i]); - } - } - if (object.appliedLabelFrequencyCaps) { - if (!Array.isArray(object.appliedLabelFrequencyCaps)) - throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabelFrequencyCaps: array expected"); - message.appliedLabelFrequencyCaps = []; - for (var i = 0; i < object.appliedLabelFrequencyCaps.length; ++i) { - if (typeof object.appliedLabelFrequencyCaps[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabelFrequencyCaps: object expected"); - message.appliedLabelFrequencyCaps[i] = $root.google.ads.admanager.v1.LabelFrequencyCap.fromObject(object.appliedLabelFrequencyCaps[i]); - } - } - if (object.effectiveLabelFrequencyCaps) { - if (!Array.isArray(object.effectiveLabelFrequencyCaps)) - throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveLabelFrequencyCaps: array expected"); - message.effectiveLabelFrequencyCaps = []; - for (var i = 0; i < object.effectiveLabelFrequencyCaps.length; ++i) { - if (typeof object.effectiveLabelFrequencyCaps[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveLabelFrequencyCaps: object expected"); - message.effectiveLabelFrequencyCaps[i] = $root.google.ads.admanager.v1.LabelFrequencyCap.fromObject(object.effectiveLabelFrequencyCaps[i]); - } - } - switch (object.smartSizeMode) { - default: - if (typeof object.smartSizeMode === "number") { - message.smartSizeMode = object.smartSizeMode; - break; - } - break; - case "SMART_SIZE_MODE_UNSPECIFIED": - case 0: - message.smartSizeMode = 0; - break; - case "NONE": - case 1: - message.smartSizeMode = 1; - break; - case "SMART_BANNER": - case 2: - message.smartSizeMode = 2; - break; - case "DYNAMIC_SIZE": - case 3: - message.smartSizeMode = 3; - break; + if (object.adReviewCenterAdId) { + if (!Array.isArray(object.adReviewCenterAdId)) + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.adReviewCenterAdId: array expected"); + message.adReviewCenterAdId = []; + for (var i = 0; i < object.adReviewCenterAdId.length; ++i) + message.adReviewCenterAdId[i] = String(object.adReviewCenterAdId[i]); + } + if (object.dateTimeRange != null) { + if (typeof object.dateTimeRange !== "object") + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.dateTimeRange: object expected"); + message.dateTimeRange = $root.google.type.Interval.fromObject(object.dateTimeRange); + } + if (object.searchText) { + if (!Array.isArray(object.searchText)) + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.searchText: array expected"); + message.searchText = []; + for (var i = 0; i < object.searchText.length; ++i) + message.searchText[i] = String(object.searchText[i]); + } + if (object.buyerAccountId) { + if (!Array.isArray(object.buyerAccountId)) + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsRequest.buyerAccountId: array expected"); + message.buyerAccountId = []; + for (var i = 0; i < object.buyerAccountId.length; ++i) + if ($util.Long) + (message.buyerAccountId[i] = $util.Long.fromValue(object.buyerAccountId[i])).unsigned = false; + else if (typeof object.buyerAccountId[i] === "string") + message.buyerAccountId[i] = parseInt(object.buyerAccountId[i], 10); + else if (typeof object.buyerAccountId[i] === "number") + message.buyerAccountId[i] = object.buyerAccountId[i]; + else if (typeof object.buyerAccountId[i] === "object") + message.buyerAccountId[i] = new $util.LongBits(object.buyerAccountId[i].low >>> 0, object.buyerAccountId[i].high >>> 0).toNumber(); } - if (object.appliedAdsenseEnabled != null) - message.appliedAdsenseEnabled = Boolean(object.appliedAdsenseEnabled); - if (object.effectiveAdsenseEnabled != null) - message.effectiveAdsenseEnabled = Boolean(object.effectiveAdsenseEnabled); return message; }; /** - * Creates a plain object from an AdUnit message. Also converts values to other types if specified. + * Creates a plain object from a SearchAdReviewCenterAdsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.AdUnit} message AdUnit + * @param {google.ads.admanager.v1.SearchAdReviewCenterAdsRequest} message SearchAdReviewCenterAdsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdUnit.toObject = function toObject(message, options) { + SearchAdReviewCenterAdsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.appliedTeams = []; - object.teams = []; - object.parentPath = []; - object.adUnitSizes = []; - object.appliedLabels = []; - object.effectiveAppliedLabels = []; - object.appliedLabelFrequencyCaps = []; - object.effectiveLabelFrequencyCaps = []; + object.adReviewCenterAdId = []; + object.searchText = []; + object.buyerAccountId = []; } if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.adUnitId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.adUnitId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { - object.adUnitCode = message.adUnitCode; - if (options.oneofs) - object._adUnitCode = "adUnitCode"; - } - if (message.appliedTeams && message.appliedTeams.length) { - object.appliedTeams = []; - for (var j = 0; j < message.appliedTeams.length; ++j) - object.appliedTeams[j] = message.appliedTeams[j]; - } - if (message.teams && message.teams.length) { - object.teams = []; - for (var j = 0; j < message.teams.length; ++j) - object.teams[j] = message.teams[j]; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.explicitlyTargeted != null && message.hasOwnProperty("explicitlyTargeted")) { - object.explicitlyTargeted = message.explicitlyTargeted; - if (options.oneofs) - object._explicitlyTargeted = "explicitlyTargeted"; - } - if (message.hasChildren != null && message.hasOwnProperty("hasChildren")) { - object.hasChildren = message.hasChildren; - if (options.oneofs) - object._hasChildren = "hasChildren"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { - object.parentAdUnit = message.parentAdUnit; - if (options.oneofs) - object._parentAdUnit = "parentAdUnit"; - } - if (message.parentPath && message.parentPath.length) { - object.parentPath = []; - for (var j = 0; j < message.parentPath.length; ++j) - object.parentPath[j] = $root.google.ads.admanager.v1.AdUnitParent.toObject(message.parentPath[j], options); - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.adUnitSizes && message.adUnitSizes.length) { - object.adUnitSizes = []; - for (var j = 0; j < message.adUnitSizes.length; ++j) - object.adUnitSizes[j] = $root.google.ads.admanager.v1.AdUnitSize.toObject(message.adUnitSizes[j], options); - } - if (message.adUnitId != null && message.hasOwnProperty("adUnitId")) - if (typeof message.adUnitId === "number") - object.adUnitId = options.longs === String ? String(message.adUnitId) : message.adUnitId; - else - object.adUnitId = options.longs === String ? $util.Long.prototype.toString.call(message.adUnitId) : options.longs === Number ? new $util.LongBits(message.adUnitId.low >>> 0, message.adUnitId.high >>> 0).toNumber() : message.adUnitId; - if (message.externalSetTopBoxChannelId != null && message.hasOwnProperty("externalSetTopBoxChannelId")) { - object.externalSetTopBoxChannelId = message.externalSetTopBoxChannelId; - if (options.oneofs) - object._externalSetTopBoxChannelId = "externalSetTopBoxChannelId"; - } - if (message.refreshDelay != null && message.hasOwnProperty("refreshDelay")) { - object.refreshDelay = $root.google.protobuf.Duration.toObject(message.refreshDelay, options); - if (options.oneofs) - object._refreshDelay = "refreshDelay"; - } - if (message.appliedLabels && message.appliedLabels.length) { - object.appliedLabels = []; - for (var j = 0; j < message.appliedLabels.length; ++j) - object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); - } - if (message.effectiveAppliedLabels && message.effectiveAppliedLabels.length) { - object.effectiveAppliedLabels = []; - for (var j = 0; j < message.effectiveAppliedLabels.length; ++j) - object.effectiveAppliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.effectiveAppliedLabels[j], options); - } - if (message.appliedLabelFrequencyCaps && message.appliedLabelFrequencyCaps.length) { - object.appliedLabelFrequencyCaps = []; - for (var j = 0; j < message.appliedLabelFrequencyCaps.length; ++j) - object.appliedLabelFrequencyCaps[j] = $root.google.ads.admanager.v1.LabelFrequencyCap.toObject(message.appliedLabelFrequencyCaps[j], options); - } - if (message.effectiveLabelFrequencyCaps && message.effectiveLabelFrequencyCaps.length) { - object.effectiveLabelFrequencyCaps = []; - for (var j = 0; j < message.effectiveLabelFrequencyCaps.length; ++j) - object.effectiveLabelFrequencyCaps[j] = $root.google.ads.admanager.v1.LabelFrequencyCap.toObject(message.effectiveLabelFrequencyCaps[j], options); - } - if (message.smartSizeMode != null && message.hasOwnProperty("smartSizeMode")) { - object.smartSizeMode = options.enums === String ? $root.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode[message.smartSizeMode] === undefined ? message.smartSizeMode : $root.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode[message.smartSizeMode] : message.smartSizeMode; - if (options.oneofs) - object._smartSizeMode = "smartSizeMode"; - } - if (message.appliedAdsenseEnabled != null && message.hasOwnProperty("appliedAdsenseEnabled")) { - object.appliedAdsenseEnabled = message.appliedAdsenseEnabled; - if (options.oneofs) - object._appliedAdsenseEnabled = "appliedAdsenseEnabled"; - } - if (message.effectiveAdsenseEnabled != null && message.hasOwnProperty("effectiveAdsenseEnabled")) { - object.effectiveAdsenseEnabled = message.effectiveAdsenseEnabled; - if (options.oneofs) - object._effectiveAdsenseEnabled = "effectiveAdsenseEnabled"; - } - if (message.appliedTargetWindow != null && message.hasOwnProperty("appliedTargetWindow")) { - object.appliedTargetWindow = options.enums === String ? $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.appliedTargetWindow] === undefined ? message.appliedTargetWindow : $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.appliedTargetWindow] : message.appliedTargetWindow; - if (options.oneofs) - object._appliedTargetWindow = "appliedTargetWindow"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.status = options.enums === String ? "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED" : 0; + object.dateTimeRange = null; } - if (message.effectiveTargetWindow != null && message.hasOwnProperty("effectiveTargetWindow")) { - object.effectiveTargetWindow = options.enums === String ? $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.effectiveTargetWindow] === undefined ? message.effectiveTargetWindow : $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.effectiveTargetWindow] : message.effectiveTargetWindow; - if (options.oneofs) - object._effectiveTargetWindow = "effectiveTargetWindow"; + 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.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus[message.status] : message.status; + if (message.adReviewCenterAdId && message.adReviewCenterAdId.length) { + object.adReviewCenterAdId = []; + for (var j = 0; j < message.adReviewCenterAdId.length; ++j) + object.adReviewCenterAdId[j] = message.adReviewCenterAdId[j]; + } + if (message.dateTimeRange != null && message.hasOwnProperty("dateTimeRange")) + object.dateTimeRange = $root.google.type.Interval.toObject(message.dateTimeRange, options); + if (message.searchText && message.searchText.length) { + object.searchText = []; + for (var j = 0; j < message.searchText.length; ++j) + object.searchText[j] = message.searchText[j]; + } + if (message.buyerAccountId && message.buyerAccountId.length) { + object.buyerAccountId = []; + for (var j = 0; j < message.buyerAccountId.length; ++j) + if (typeof message.buyerAccountId[j] === "number") + object.buyerAccountId[j] = options.longs === String ? String(message.buyerAccountId[j]) : message.buyerAccountId[j]; + else + object.buyerAccountId[j] = options.longs === String ? $util.Long.prototype.toString.call(message.buyerAccountId[j]) : options.longs === Number ? new $util.LongBits(message.buyerAccountId[j].low >>> 0, message.buyerAccountId[j].high >>> 0).toNumber() : message.buyerAccountId[j]; } return object; }; /** - * Converts this AdUnit to JSON. + * Converts this SearchAdReviewCenterAdsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @instance * @returns {Object.} JSON object */ - AdUnit.prototype.toJSON = function toJSON() { + SearchAdReviewCenterAdsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdUnit + * Gets the default type url for SearchAdReviewCenterAdsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdUnit + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdUnit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchAdReviewCenterAdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdUnit"; + return typeUrlPrefix + "/google.ads.admanager.v1.SearchAdReviewCenterAdsRequest"; }; - return AdUnit; + return SearchAdReviewCenterAdsRequest; })(); - v1.AdUnitSize = (function() { + v1.SearchAdReviewCenterAdsResponse = (function() { /** - * Properties of an AdUnitSize. + * Properties of a SearchAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @interface IAdUnitSize - * @property {google.ads.admanager.v1.ISize|null} [size] AdUnitSize size - * @property {google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null} [environmentType] AdUnitSize environmentType - * @property {Array.|null} [companions] AdUnitSize companions + * @interface ISearchAdReviewCenterAdsResponse + * @property {Array.|null} [adReviewCenterAds] SearchAdReviewCenterAdsResponse adReviewCenterAds + * @property {string|null} [nextPageToken] SearchAdReviewCenterAdsResponse nextPageToken */ /** - * Constructs a new AdUnitSize. + * Constructs a new SearchAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnitSize. - * @implements IAdUnitSize + * @classdesc Represents a SearchAdReviewCenterAdsResponse. + * @implements ISearchAdReviewCenterAdsResponse * @constructor - * @param {google.ads.admanager.v1.IAdUnitSize=} [properties] Properties to set + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse=} [properties] Properties to set */ - function AdUnitSize(properties) { - this.companions = []; + function SearchAdReviewCenterAdsResponse(properties) { + this.adReviewCenterAds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4344,108 +3926,94 @@ } /** - * AdUnitSize size. - * @member {google.ads.admanager.v1.ISize|null|undefined} size - * @memberof google.ads.admanager.v1.AdUnitSize - * @instance - */ - AdUnitSize.prototype.size = null; - - /** - * AdUnitSize environmentType. - * @member {google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType} environmentType - * @memberof google.ads.admanager.v1.AdUnitSize + * SearchAdReviewCenterAdsResponse adReviewCenterAds. + * @member {Array.} adReviewCenterAds + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @instance */ - AdUnitSize.prototype.environmentType = 0; + SearchAdReviewCenterAdsResponse.prototype.adReviewCenterAds = $util.emptyArray; /** - * AdUnitSize companions. - * @member {Array.} companions - * @memberof google.ads.admanager.v1.AdUnitSize + * SearchAdReviewCenterAdsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @instance */ - AdUnitSize.prototype.companions = $util.emptyArray; + SearchAdReviewCenterAdsResponse.prototype.nextPageToken = ""; /** - * Creates a new AdUnitSize instance using the specified properties. + * Creates a new SearchAdReviewCenterAdsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IAdUnitSize=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize instance + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} SearchAdReviewCenterAdsResponse instance */ - AdUnitSize.create = function create(properties) { - return new AdUnitSize(properties); + SearchAdReviewCenterAdsResponse.create = function create(properties) { + return new SearchAdReviewCenterAdsResponse(properties); }; /** - * Encodes the specified AdUnitSize message. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. + * Encodes the specified SearchAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IAdUnitSize} message AdUnitSize message or plain object to encode + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse} message SearchAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitSize.encode = function encode(message, writer) { + SearchAdReviewCenterAdsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.size != null && Object.hasOwnProperty.call(message, "size")) - $root.google.ads.admanager.v1.Size.encode(message.size, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.environmentType != null && Object.hasOwnProperty.call(message, "environmentType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.environmentType); - if (message.companions != null && message.companions.length) - for (var i = 0; i < message.companions.length; ++i) - $root.google.ads.admanager.v1.Size.encode(message.companions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.adReviewCenterAds != null && message.adReviewCenterAds.length) + for (var i = 0; i < message.adReviewCenterAds.length; ++i) + $root.google.ads.admanager.v1.AdReviewCenterAd.encode(message.adReviewCenterAds[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 AdUnitSize message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. + * Encodes the specified SearchAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IAdUnitSize} message AdUnitSize message or plain object to encode + * @param {google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse} message SearchAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitSize.encodeDelimited = function encodeDelimited(message, writer) { + SearchAdReviewCenterAdsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdUnitSize message from the specified reader or buffer. + * Decodes a SearchAdReviewCenterAdsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} SearchAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitSize.decode = function decode(reader, length, error) { + SearchAdReviewCenterAdsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitSize(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SearchAdReviewCenterAdsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.size = $root.google.ads.admanager.v1.Size.decode(reader, reader.uint32()); + if (!(message.adReviewCenterAds && message.adReviewCenterAds.length)) + message.adReviewCenterAds = []; + message.adReviewCenterAds.push($root.google.ads.admanager.v1.AdReviewCenterAd.decode(reader, reader.uint32())); break; } case 2: { - message.environmentType = reader.int32(); - break; - } - case 3: { - if (!(message.companions && message.companions.length)) - message.companions = []; - message.companions.push($root.google.ads.admanager.v1.Size.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); break; } default: @@ -4457,188 +4025,150 @@ }; /** - * Decodes an AdUnitSize message from the specified reader or buffer, length delimited. + * Decodes a SearchAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} SearchAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitSize.decodeDelimited = function decodeDelimited(reader) { + SearchAdReviewCenterAdsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdUnitSize message. + * Verifies a SearchAdReviewCenterAdsResponse message. * @function verify - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdUnitSize.verify = function verify(message) { + SearchAdReviewCenterAdsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.size != null && message.hasOwnProperty("size")) { - var error = $root.google.ads.admanager.v1.Size.verify(message.size); - if (error) - return "size." + error; - } - if (message.environmentType != null && message.hasOwnProperty("environmentType")) - switch (message.environmentType) { - default: - return "environmentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.companions != null && message.hasOwnProperty("companions")) { - if (!Array.isArray(message.companions)) - return "companions: array expected"; - for (var i = 0; i < message.companions.length; ++i) { - var error = $root.google.ads.admanager.v1.Size.verify(message.companions[i]); + if (message.adReviewCenterAds != null && message.hasOwnProperty("adReviewCenterAds")) { + if (!Array.isArray(message.adReviewCenterAds)) + return "adReviewCenterAds: array expected"; + for (var i = 0; i < message.adReviewCenterAds.length; ++i) { + var error = $root.google.ads.admanager.v1.AdReviewCenterAd.verify(message.adReviewCenterAds[i]); if (error) - return "companions." + error; + return "adReviewCenterAds." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an AdUnitSize message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize + * @returns {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} SearchAdReviewCenterAdsResponse */ - AdUnitSize.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdUnitSize) + SearchAdReviewCenterAdsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SearchAdReviewCenterAdsResponse) return object; - var message = new $root.google.ads.admanager.v1.AdUnitSize(); - if (object.size != null) { - if (typeof object.size !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnitSize.size: object expected"); - message.size = $root.google.ads.admanager.v1.Size.fromObject(object.size); - } - switch (object.environmentType) { - default: - if (typeof object.environmentType === "number") { - message.environmentType = object.environmentType; - break; - } - break; - case "ENVIRONMENT_TYPE_UNSPECIFIED": - case 0: - message.environmentType = 0; - break; - case "BROWSER": - case 1: - message.environmentType = 1; - break; - case "VIDEO_PLAYER": - case 2: - message.environmentType = 2; - break; - } - if (object.companions) { - if (!Array.isArray(object.companions)) - throw TypeError(".google.ads.admanager.v1.AdUnitSize.companions: array expected"); - message.companions = []; - for (var i = 0; i < object.companions.length; ++i) { - if (typeof object.companions[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdUnitSize.companions: object expected"); - message.companions[i] = $root.google.ads.admanager.v1.Size.fromObject(object.companions[i]); + var message = new $root.google.ads.admanager.v1.SearchAdReviewCenterAdsResponse(); + if (object.adReviewCenterAds) { + if (!Array.isArray(object.adReviewCenterAds)) + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.adReviewCenterAds: array expected"); + message.adReviewCenterAds = []; + for (var i = 0; i < object.adReviewCenterAds.length; ++i) { + if (typeof object.adReviewCenterAds[i] !== "object") + throw TypeError(".google.ads.admanager.v1.SearchAdReviewCenterAdsResponse.adReviewCenterAds: object expected"); + message.adReviewCenterAds[i] = $root.google.ads.admanager.v1.AdReviewCenterAd.fromObject(object.adReviewCenterAds[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an AdUnitSize message. Also converts values to other types if specified. + * Creates a plain object from a SearchAdReviewCenterAdsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.AdUnitSize} message AdUnitSize + * @param {google.ads.admanager.v1.SearchAdReviewCenterAdsResponse} message SearchAdReviewCenterAdsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdUnitSize.toObject = function toObject(message, options) { + SearchAdReviewCenterAdsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.companions = []; - if (options.defaults) { - object.size = null; - object.environmentType = options.enums === String ? "ENVIRONMENT_TYPE_UNSPECIFIED" : 0; - } - if (message.size != null && message.hasOwnProperty("size")) - object.size = $root.google.ads.admanager.v1.Size.toObject(message.size, options); - if (message.environmentType != null && message.hasOwnProperty("environmentType")) - object.environmentType = options.enums === String ? $root.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType[message.environmentType] === undefined ? message.environmentType : $root.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType[message.environmentType] : message.environmentType; - if (message.companions && message.companions.length) { - object.companions = []; - for (var j = 0; j < message.companions.length; ++j) - object.companions[j] = $root.google.ads.admanager.v1.Size.toObject(message.companions[j], options); + object.adReviewCenterAds = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.adReviewCenterAds && message.adReviewCenterAds.length) { + object.adReviewCenterAds = []; + for (var j = 0; j < message.adReviewCenterAds.length; ++j) + object.adReviewCenterAds[j] = $root.google.ads.admanager.v1.AdReviewCenterAd.toObject(message.adReviewCenterAds[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this AdUnitSize to JSON. + * Converts this SearchAdReviewCenterAdsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @instance * @returns {Object.} JSON object */ - AdUnitSize.prototype.toJSON = function toJSON() { + SearchAdReviewCenterAdsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdUnitSize + * Gets the default type url for SearchAdReviewCenterAdsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdUnitSize + * @memberof google.ads.admanager.v1.SearchAdReviewCenterAdsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdUnitSize.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchAdReviewCenterAdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitSize"; + return typeUrlPrefix + "/google.ads.admanager.v1.SearchAdReviewCenterAdsResponse"; }; - return AdUnitSize; + return SearchAdReviewCenterAdsResponse; })(); - v1.AdUnitParent = (function() { + v1.BatchAllowAdReviewCenterAdsRequest = (function() { /** - * Properties of an AdUnitParent. + * Properties of a BatchAllowAdReviewCenterAdsRequest. * @memberof google.ads.admanager.v1 - * @interface IAdUnitParent - * @property {string|null} [parentAdUnit] AdUnitParent parentAdUnit - * @property {string|null} [displayName] AdUnitParent displayName - * @property {string|null} [adUnitCode] AdUnitParent adUnitCode + * @interface IBatchAllowAdReviewCenterAdsRequest + * @property {string|null} [parent] BatchAllowAdReviewCenterAdsRequest parent + * @property {Array.|null} [names] BatchAllowAdReviewCenterAdsRequest names */ /** - * Constructs a new AdUnitParent. + * Constructs a new BatchAllowAdReviewCenterAdsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnitParent. - * @implements IAdUnitParent + * @classdesc Represents a BatchAllowAdReviewCenterAdsRequest. + * @implements IBatchAllowAdReviewCenterAdsRequest * @constructor - * @param {google.ads.admanager.v1.IAdUnitParent=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest=} [properties] Properties to set */ - function AdUnitParent(properties) { + function BatchAllowAdReviewCenterAdsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4646,105 +4176,94 @@ } /** - * AdUnitParent parentAdUnit. - * @member {string} parentAdUnit - * @memberof google.ads.admanager.v1.AdUnitParent + * BatchAllowAdReviewCenterAdsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @instance */ - AdUnitParent.prototype.parentAdUnit = ""; + BatchAllowAdReviewCenterAdsRequest.prototype.parent = ""; /** - * AdUnitParent displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.AdUnitParent - * @instance - */ - AdUnitParent.prototype.displayName = ""; - - /** - * AdUnitParent adUnitCode. - * @member {string} adUnitCode - * @memberof google.ads.admanager.v1.AdUnitParent + * BatchAllowAdReviewCenterAdsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @instance */ - AdUnitParent.prototype.adUnitCode = ""; + BatchAllowAdReviewCenterAdsRequest.prototype.names = $util.emptyArray; /** - * Creates a new AdUnitParent instance using the specified properties. + * Creates a new BatchAllowAdReviewCenterAdsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitParent=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent instance + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest} BatchAllowAdReviewCenterAdsRequest instance */ - AdUnitParent.create = function create(properties) { - return new AdUnitParent(properties); + BatchAllowAdReviewCenterAdsRequest.create = function create(properties) { + return new BatchAllowAdReviewCenterAdsRequest(properties); }; /** - * Encodes the specified AdUnitParent message. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. + * Encodes the specified BatchAllowAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitParent} message AdUnitParent message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest} message BatchAllowAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitParent.encode = function encode(message, writer) { + BatchAllowAdReviewCenterAdsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parentAdUnit != null && Object.hasOwnProperty.call(message, "parentAdUnit")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parentAdUnit); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.adUnitCode != null && Object.hasOwnProperty.call(message, "adUnitCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.adUnitCode); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified AdUnitParent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. + * Encodes the specified BatchAllowAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitParent} message AdUnitParent message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest} message BatchAllowAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitParent.encodeDelimited = function encodeDelimited(message, writer) { + BatchAllowAdReviewCenterAdsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdUnitParent message from the specified reader or buffer. + * Decodes a BatchAllowAdReviewCenterAdsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest} BatchAllowAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitParent.decode = function decode(reader, length, error) { + BatchAllowAdReviewCenterAdsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitParent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parentAdUnit = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.adUnitCode = reader.string(); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -4756,140 +4275,142 @@ }; /** - * Decodes an AdUnitParent message from the specified reader or buffer, length delimited. + * Decodes a BatchAllowAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest} BatchAllowAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitParent.decodeDelimited = function decodeDelimited(reader) { + BatchAllowAdReviewCenterAdsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdUnitParent message. + * Verifies a BatchAllowAdReviewCenterAdsRequest message. * @function verify - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdUnitParent.verify = function verify(message) { + BatchAllowAdReviewCenterAdsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) - if (!$util.isString(message.parentAdUnit)) - return "parentAdUnit: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) - if (!$util.isString(message.adUnitCode)) - return "adUnitCode: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } return null; }; /** - * Creates an AdUnitParent message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAllowAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest} BatchAllowAdReviewCenterAdsRequest */ - AdUnitParent.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdUnitParent) + BatchAllowAdReviewCenterAdsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest) return object; - var message = new $root.google.ads.admanager.v1.AdUnitParent(); - if (object.parentAdUnit != null) - message.parentAdUnit = String(object.parentAdUnit); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.adUnitCode != null) - message.adUnitCode = String(object.adUnitCode); + var message = new $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } return message; }; /** - * Creates a plain object from an AdUnitParent message. Also converts values to other types if specified. + * Creates a plain object from a BatchAllowAdReviewCenterAdsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.AdUnitParent} message AdUnitParent + * @param {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest} message BatchAllowAdReviewCenterAdsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdUnitParent.toObject = function toObject(message, options) { + BatchAllowAdReviewCenterAdsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parentAdUnit = ""; - object.displayName = ""; - object.adUnitCode = ""; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } - if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) - object.parentAdUnit = message.parentAdUnit; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) - object.adUnitCode = message.adUnitCode; return object; }; /** - * Converts this AdUnitParent to JSON. + * Converts this BatchAllowAdReviewCenterAdsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @instance * @returns {Object.} JSON object */ - AdUnitParent.prototype.toJSON = function toJSON() { + BatchAllowAdReviewCenterAdsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdUnitParent + * Gets the default type url for BatchAllowAdReviewCenterAdsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdUnitParent + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdUnitParent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchAllowAdReviewCenterAdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitParent"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest"; }; - return AdUnitParent; + return BatchAllowAdReviewCenterAdsRequest; })(); - v1.LabelFrequencyCap = (function() { + v1.BatchAllowAdReviewCenterAdsResponse = (function() { /** - * Properties of a LabelFrequencyCap. + * Properties of a BatchAllowAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @interface ILabelFrequencyCap - * @property {string|null} [label] LabelFrequencyCap label - * @property {google.ads.admanager.v1.IFrequencyCap|null} [frequencyCap] LabelFrequencyCap frequencyCap + * @interface IBatchAllowAdReviewCenterAdsResponse */ /** - * Constructs a new LabelFrequencyCap. + * Constructs a new BatchAllowAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a LabelFrequencyCap. - * @implements ILabelFrequencyCap + * @classdesc Represents a BatchAllowAdReviewCenterAdsResponse. + * @implements IBatchAllowAdReviewCenterAdsResponse * @constructor - * @param {google.ads.admanager.v1.ILabelFrequencyCap=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse=} [properties] Properties to set */ - function LabelFrequencyCap(properties) { + function BatchAllowAdReviewCenterAdsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4897,93 +4418,65 @@ } /** - * LabelFrequencyCap label. - * @member {string} label - * @memberof google.ads.admanager.v1.LabelFrequencyCap - * @instance - */ - LabelFrequencyCap.prototype.label = ""; - - /** - * LabelFrequencyCap frequencyCap. - * @member {google.ads.admanager.v1.IFrequencyCap|null|undefined} frequencyCap - * @memberof google.ads.admanager.v1.LabelFrequencyCap - * @instance - */ - LabelFrequencyCap.prototype.frequencyCap = null; - - /** - * Creates a new LabelFrequencyCap instance using the specified properties. + * Creates a new BatchAllowAdReviewCenterAdsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.ILabelFrequencyCap=} [properties] Properties to set - * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap instance + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse} BatchAllowAdReviewCenterAdsResponse instance */ - LabelFrequencyCap.create = function create(properties) { - return new LabelFrequencyCap(properties); + BatchAllowAdReviewCenterAdsResponse.create = function create(properties) { + return new BatchAllowAdReviewCenterAdsResponse(properties); }; /** - * Encodes the specified LabelFrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. + * Encodes the specified BatchAllowAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.ILabelFrequencyCap} message LabelFrequencyCap message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse} message BatchAllowAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelFrequencyCap.encode = function encode(message, writer) { + BatchAllowAdReviewCenterAdsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.frequencyCap != null && Object.hasOwnProperty.call(message, "frequencyCap")) - $root.google.ads.admanager.v1.FrequencyCap.encode(message.frequencyCap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LabelFrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. + * Encodes the specified BatchAllowAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.ILabelFrequencyCap} message LabelFrequencyCap message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsResponse} message BatchAllowAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelFrequencyCap.encodeDelimited = function encodeDelimited(message, writer) { + BatchAllowAdReviewCenterAdsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelFrequencyCap message from the specified reader or buffer. + * Decodes a BatchAllowAdReviewCenterAdsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse} BatchAllowAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelFrequencyCap.decode = function decode(reader, length, error) { + BatchAllowAdReviewCenterAdsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.LabelFrequencyCap(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.label = reader.string(); - break; - } - case 2: { - message.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -4993,137 +4486,111 @@ }; /** - * Decodes a LabelFrequencyCap message from the specified reader or buffer, length delimited. + * Decodes a BatchAllowAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse} BatchAllowAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelFrequencyCap.decodeDelimited = function decodeDelimited(reader) { + BatchAllowAdReviewCenterAdsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelFrequencyCap message. + * Verifies a BatchAllowAdReviewCenterAdsResponse message. * @function verify - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelFrequencyCap.verify = function verify(message) { + BatchAllowAdReviewCenterAdsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.frequencyCap != null && message.hasOwnProperty("frequencyCap")) { - var error = $root.google.ads.admanager.v1.FrequencyCap.verify(message.frequencyCap); - if (error) - return "frequencyCap." + error; - } return null; }; /** - * Creates a LabelFrequencyCap message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAllowAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap + * @returns {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse} BatchAllowAdReviewCenterAdsResponse */ - LabelFrequencyCap.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.LabelFrequencyCap) + BatchAllowAdReviewCenterAdsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse) return object; - var message = new $root.google.ads.admanager.v1.LabelFrequencyCap(); - if (object.label != null) - message.label = String(object.label); - if (object.frequencyCap != null) { - if (typeof object.frequencyCap !== "object") - throw TypeError(".google.ads.admanager.v1.LabelFrequencyCap.frequencyCap: object expected"); - message.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.fromObject(object.frequencyCap); - } - return message; + return new $root.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse(); }; /** - * Creates a plain object from a LabelFrequencyCap message. Also converts values to other types if specified. + * Creates a plain object from a BatchAllowAdReviewCenterAdsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.LabelFrequencyCap} message LabelFrequencyCap + * @param {google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse} message BatchAllowAdReviewCenterAdsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelFrequencyCap.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.frequencyCap = null; - } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.frequencyCap != null && message.hasOwnProperty("frequencyCap")) - object.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.toObject(message.frequencyCap, options); - return object; + BatchAllowAdReviewCenterAdsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this LabelFrequencyCap to JSON. + * Converts this BatchAllowAdReviewCenterAdsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @instance * @returns {Object.} JSON object */ - LabelFrequencyCap.prototype.toJSON = function toJSON() { + BatchAllowAdReviewCenterAdsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LabelFrequencyCap + * Gets the default type url for BatchAllowAdReviewCenterAdsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.LabelFrequencyCap + * @memberof google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LabelFrequencyCap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchAllowAdReviewCenterAdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.LabelFrequencyCap"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse"; }; - return LabelFrequencyCap; + return BatchAllowAdReviewCenterAdsResponse; })(); - v1.AppliedLabel = (function() { + v1.BatchBlockAdReviewCenterAdsRequest = (function() { /** - * Properties of an AppliedLabel. + * Properties of a BatchBlockAdReviewCenterAdsRequest. * @memberof google.ads.admanager.v1 - * @interface IAppliedLabel - * @property {string|null} [label] AppliedLabel label - * @property {boolean|null} [negated] AppliedLabel negated + * @interface IBatchBlockAdReviewCenterAdsRequest + * @property {string|null} [parent] BatchBlockAdReviewCenterAdsRequest parent + * @property {Array.|null} [names] BatchBlockAdReviewCenterAdsRequest names */ /** - * Constructs a new AppliedLabel. + * Constructs a new BatchBlockAdReviewCenterAdsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AppliedLabel. - * @implements IAppliedLabel + * @classdesc Represents a BatchBlockAdReviewCenterAdsRequest. + * @implements IBatchBlockAdReviewCenterAdsRequest * @constructor - * @param {google.ads.admanager.v1.IAppliedLabel=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest=} [properties] Properties to set */ - function AppliedLabel(properties) { + function BatchBlockAdReviewCenterAdsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5131,91 +4598,94 @@ } /** - * AppliedLabel label. - * @member {string} label - * @memberof google.ads.admanager.v1.AppliedLabel + * BatchBlockAdReviewCenterAdsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @instance */ - AppliedLabel.prototype.label = ""; + BatchBlockAdReviewCenterAdsRequest.prototype.parent = ""; /** - * AppliedLabel negated. - * @member {boolean} negated - * @memberof google.ads.admanager.v1.AppliedLabel + * BatchBlockAdReviewCenterAdsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @instance */ - AppliedLabel.prototype.negated = false; + BatchBlockAdReviewCenterAdsRequest.prototype.names = $util.emptyArray; /** - * Creates a new AppliedLabel instance using the specified properties. + * Creates a new BatchBlockAdReviewCenterAdsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAppliedLabel=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel instance + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest} BatchBlockAdReviewCenterAdsRequest instance */ - AppliedLabel.create = function create(properties) { - return new AppliedLabel(properties); + BatchBlockAdReviewCenterAdsRequest.create = function create(properties) { + return new BatchBlockAdReviewCenterAdsRequest(properties); }; /** - * Encodes the specified AppliedLabel message. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. + * Encodes the specified BatchBlockAdReviewCenterAdsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAppliedLabel} message AppliedLabel message or plain object to encode + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest} message BatchBlockAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppliedLabel.encode = function encode(message, writer) { + BatchBlockAdReviewCenterAdsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.negated); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified AppliedLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. + * Encodes the specified BatchBlockAdReviewCenterAdsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.IAppliedLabel} message AppliedLabel message or plain object to encode + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest} message BatchBlockAdReviewCenterAdsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppliedLabel.encodeDelimited = function encodeDelimited(message, writer) { + BatchBlockAdReviewCenterAdsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppliedLabel message from the specified reader or buffer. + * Decodes a BatchBlockAdReviewCenterAdsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest} BatchBlockAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppliedLabel.decode = function decode(reader, length, error) { + BatchBlockAdReviewCenterAdsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AppliedLabel(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.label = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.negated = reader.bool(); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -5227,130 +4697,142 @@ }; /** - * Decodes an AppliedLabel message from the specified reader or buffer, length delimited. + * Decodes a BatchBlockAdReviewCenterAdsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest} BatchBlockAdReviewCenterAdsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppliedLabel.decodeDelimited = function decodeDelimited(reader) { + BatchBlockAdReviewCenterAdsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppliedLabel message. + * Verifies a BatchBlockAdReviewCenterAdsRequest message. * @function verify - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppliedLabel.verify = function verify(message) { + BatchBlockAdReviewCenterAdsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.negated != null && message.hasOwnProperty("negated")) - if (typeof message.negated !== "boolean") - return "negated: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } return null; }; /** - * Creates an AppliedLabel message from a plain object. Also converts values to their respective internal types. + * Creates a BatchBlockAdReviewCenterAdsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest} BatchBlockAdReviewCenterAdsRequest */ - AppliedLabel.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AppliedLabel) + BatchBlockAdReviewCenterAdsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest) return object; - var message = new $root.google.ads.admanager.v1.AppliedLabel(); - if (object.label != null) - message.label = String(object.label); - if (object.negated != null) - message.negated = Boolean(object.negated); + var message = new $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } return message; }; /** - * Creates a plain object from an AppliedLabel message. Also converts values to other types if specified. + * Creates a plain object from a BatchBlockAdReviewCenterAdsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static - * @param {google.ads.admanager.v1.AppliedLabel} message AppliedLabel + * @param {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest} message BatchBlockAdReviewCenterAdsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppliedLabel.toObject = function toObject(message, options) { + BatchBlockAdReviewCenterAdsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.label = ""; - object.negated = false; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.negated != null && message.hasOwnProperty("negated")) - object.negated = message.negated; return object; }; /** - * Converts this AppliedLabel to JSON. + * Converts this BatchBlockAdReviewCenterAdsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @instance * @returns {Object.} JSON object */ - AppliedLabel.prototype.toJSON = function toJSON() { + BatchBlockAdReviewCenterAdsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AppliedLabel + * Gets the default type url for BatchBlockAdReviewCenterAdsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.AppliedLabel + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AppliedLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchBlockAdReviewCenterAdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AppliedLabel"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest"; }; - return AppliedLabel; + return BatchBlockAdReviewCenterAdsRequest; })(); - v1.EnvironmentTypeEnum = (function() { + v1.BatchBlockAdReviewCenterAdsResponse = (function() { /** - * Properties of an EnvironmentTypeEnum. + * Properties of a BatchBlockAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @interface IEnvironmentTypeEnum + * @interface IBatchBlockAdReviewCenterAdsResponse */ /** - * Constructs a new EnvironmentTypeEnum. + * Constructs a new BatchBlockAdReviewCenterAdsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents an EnvironmentTypeEnum. - * @implements IEnvironmentTypeEnum + * @classdesc Represents a BatchBlockAdReviewCenterAdsResponse. + * @implements IBatchBlockAdReviewCenterAdsResponse * @constructor - * @param {google.ads.admanager.v1.IEnvironmentTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse=} [properties] Properties to set */ - function EnvironmentTypeEnum(properties) { + function BatchBlockAdReviewCenterAdsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5358,60 +4840,60 @@ } /** - * Creates a new EnvironmentTypeEnum instance using the specified properties. + * Creates a new BatchBlockAdReviewCenterAdsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IEnvironmentTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum instance + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse} BatchBlockAdReviewCenterAdsResponse instance */ - EnvironmentTypeEnum.create = function create(properties) { - return new EnvironmentTypeEnum(properties); + BatchBlockAdReviewCenterAdsResponse.create = function create(properties) { + return new BatchBlockAdReviewCenterAdsResponse(properties); }; /** - * Encodes the specified EnvironmentTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. + * Encodes the specified BatchBlockAdReviewCenterAdsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IEnvironmentTypeEnum} message EnvironmentTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse} message BatchBlockAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentTypeEnum.encode = function encode(message, writer) { + BatchBlockAdReviewCenterAdsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified EnvironmentTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. + * Encodes the specified BatchBlockAdReviewCenterAdsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.IEnvironmentTypeEnum} message EnvironmentTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsResponse} message BatchBlockAdReviewCenterAdsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + BatchBlockAdReviewCenterAdsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnvironmentTypeEnum message from the specified reader or buffer. + * Decodes a BatchBlockAdReviewCenterAdsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse} BatchBlockAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentTypeEnum.decode = function decode(reader, length, error) { + BatchBlockAdReviewCenterAdsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.EnvironmentTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5426,127 +4908,110 @@ }; /** - * Decodes an EnvironmentTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchBlockAdReviewCenterAdsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse} BatchBlockAdReviewCenterAdsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentTypeEnum.decodeDelimited = function decodeDelimited(reader) { + BatchBlockAdReviewCenterAdsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnvironmentTypeEnum message. + * Verifies a BatchBlockAdReviewCenterAdsResponse message. * @function verify - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnvironmentTypeEnum.verify = function verify(message) { + BatchBlockAdReviewCenterAdsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an EnvironmentTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchBlockAdReviewCenterAdsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum + * @returns {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse} BatchBlockAdReviewCenterAdsResponse */ - EnvironmentTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.EnvironmentTypeEnum) + BatchBlockAdReviewCenterAdsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse) return object; - return new $root.google.ads.admanager.v1.EnvironmentTypeEnum(); + return new $root.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse(); }; /** - * Creates a plain object from an EnvironmentTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a BatchBlockAdReviewCenterAdsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static - * @param {google.ads.admanager.v1.EnvironmentTypeEnum} message EnvironmentTypeEnum + * @param {google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse} message BatchBlockAdReviewCenterAdsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnvironmentTypeEnum.toObject = function toObject() { + BatchBlockAdReviewCenterAdsResponse.toObject = function toObject() { return {}; }; /** - * Converts this EnvironmentTypeEnum to JSON. + * Converts this BatchBlockAdReviewCenterAdsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @instance * @returns {Object.} JSON object */ - EnvironmentTypeEnum.prototype.toJSON = function toJSON() { + BatchBlockAdReviewCenterAdsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnvironmentTypeEnum + * Gets the default type url for BatchBlockAdReviewCenterAdsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.EnvironmentTypeEnum + * @memberof google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnvironmentTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchBlockAdReviewCenterAdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.EnvironmentTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse"; }; - /** - * EnvironmentType enum. - * @name google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType - * @enum {number} - * @property {number} ENVIRONMENT_TYPE_UNSPECIFIED=0 ENVIRONMENT_TYPE_UNSPECIFIED value - * @property {number} BROWSER=1 BROWSER value - * @property {number} VIDEO_PLAYER=2 VIDEO_PLAYER value - */ - EnvironmentTypeEnum.EnvironmentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENVIRONMENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BROWSER"] = 1; - values[valuesById[2] = "VIDEO_PLAYER"] = 2; - return values; - })(); - - return EnvironmentTypeEnum; + return BatchBlockAdReviewCenterAdsResponse; })(); - v1.FrequencyCap = (function() { + v1.BatchAdReviewCenterAdsOperationMetadata = (function() { /** - * Properties of a FrequencyCap. + * Properties of a BatchAdReviewCenterAdsOperationMetadata. * @memberof google.ads.admanager.v1 - * @interface IFrequencyCap - * @property {number|Long|null} [maxImpressions] FrequencyCap maxImpressions - * @property {number|Long|null} [timeAmount] FrequencyCap timeAmount - * @property {google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null} [timeUnit] FrequencyCap timeUnit + * @interface IBatchAdReviewCenterAdsOperationMetadata + * @property {Object.|null} [failedRequests] BatchAdReviewCenterAdsOperationMetadata failedRequests */ /** - * Constructs a new FrequencyCap. + * Constructs a new BatchAdReviewCenterAdsOperationMetadata. * @memberof google.ads.admanager.v1 - * @classdesc Represents a FrequencyCap. - * @implements IFrequencyCap + * @classdesc Represents a BatchAdReviewCenterAdsOperationMetadata. + * @implements IBatchAdReviewCenterAdsOperationMetadata * @constructor - * @param {google.ads.admanager.v1.IFrequencyCap=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata=} [properties] Properties to set */ - function FrequencyCap(properties) { + function BatchAdReviewCenterAdsOperationMetadata(properties) { + this.failedRequests = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5554,126 +5019,99 @@ } /** - * FrequencyCap maxImpressions. - * @member {number|Long|null|undefined} maxImpressions - * @memberof google.ads.admanager.v1.FrequencyCap - * @instance - */ - FrequencyCap.prototype.maxImpressions = null; - - /** - * FrequencyCap timeAmount. - * @member {number|Long|null|undefined} timeAmount - * @memberof google.ads.admanager.v1.FrequencyCap - * @instance - */ - FrequencyCap.prototype.timeAmount = null; - - /** - * FrequencyCap timeUnit. - * @member {google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null|undefined} timeUnit - * @memberof google.ads.admanager.v1.FrequencyCap + * BatchAdReviewCenterAdsOperationMetadata failedRequests. + * @member {Object.} failedRequests + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @instance */ - FrequencyCap.prototype.timeUnit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FrequencyCap.prototype, "_maxImpressions", { - get: $util.oneOfGetter($oneOfFields = ["maxImpressions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FrequencyCap.prototype, "_timeAmount", { - get: $util.oneOfGetter($oneOfFields = ["timeAmount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FrequencyCap.prototype, "_timeUnit", { - get: $util.oneOfGetter($oneOfFields = ["timeUnit"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchAdReviewCenterAdsOperationMetadata.prototype.failedRequests = $util.emptyObject; /** - * Creates a new FrequencyCap instance using the specified properties. + * Creates a new BatchAdReviewCenterAdsOperationMetadata instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static - * @param {google.ads.admanager.v1.IFrequencyCap=} [properties] Properties to set - * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap instance + * @param {google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata} BatchAdReviewCenterAdsOperationMetadata instance */ - FrequencyCap.create = function create(properties) { - return new FrequencyCap(properties); + BatchAdReviewCenterAdsOperationMetadata.create = function create(properties) { + return new BatchAdReviewCenterAdsOperationMetadata(properties); }; /** - * Encodes the specified FrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. + * Encodes the specified BatchAdReviewCenterAdsOperationMetadata message. Does not implicitly {@link google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static - * @param {google.ads.admanager.v1.IFrequencyCap} message FrequencyCap message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata} message BatchAdReviewCenterAdsOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FrequencyCap.encode = function encode(message, writer) { + BatchAdReviewCenterAdsOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.maxImpressions != null && Object.hasOwnProperty.call(message, "maxImpressions")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxImpressions); - if (message.timeAmount != null && Object.hasOwnProperty.call(message, "timeAmount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timeAmount); - if (message.timeUnit != null && Object.hasOwnProperty.call(message, "timeUnit")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.timeUnit); + if (message.failedRequests != null && Object.hasOwnProperty.call(message, "failedRequests")) + for (var keys = Object.keys(message.failedRequests), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); + $root.google.rpc.Status.encode(message.failedRequests[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified FrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. + * Encodes the specified BatchAdReviewCenterAdsOperationMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static - * @param {google.ads.admanager.v1.IFrequencyCap} message FrequencyCap message or plain object to encode + * @param {google.ads.admanager.v1.IBatchAdReviewCenterAdsOperationMetadata} message BatchAdReviewCenterAdsOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FrequencyCap.encodeDelimited = function encodeDelimited(message, writer) { + BatchAdReviewCenterAdsOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FrequencyCap message from the specified reader or buffer. + * Decodes a BatchAdReviewCenterAdsOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap + * @returns {google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata} BatchAdReviewCenterAdsOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FrequencyCap.decode = function decode(reader, length, error) { + BatchAdReviewCenterAdsOperationMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FrequencyCap(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.maxImpressions = reader.int64(); - break; - } - case 2: { - message.timeAmount = reader.int64(); - break; - } - case 3: { - message.timeUnit = reader.int32(); + if (message.failedRequests === $util.emptyObject) + message.failedRequests = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.failedRequests[key] = value; break; } default: @@ -5685,223 +5123,144 @@ }; /** - * Decodes a FrequencyCap message from the specified reader or buffer, length delimited. + * Decodes a BatchAdReviewCenterAdsOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap + * @returns {google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata} BatchAdReviewCenterAdsOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FrequencyCap.decodeDelimited = function decodeDelimited(reader) { + BatchAdReviewCenterAdsOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FrequencyCap message. + * Verifies a BatchAdReviewCenterAdsOperationMetadata message. * @function verify - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FrequencyCap.verify = function verify(message) { + BatchAdReviewCenterAdsOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.maxImpressions != null && message.hasOwnProperty("maxImpressions")) { - properties._maxImpressions = 1; - if (!$util.isInteger(message.maxImpressions) && !(message.maxImpressions && $util.isInteger(message.maxImpressions.low) && $util.isInteger(message.maxImpressions.high))) - return "maxImpressions: integer|Long expected"; - } - if (message.timeAmount != null && message.hasOwnProperty("timeAmount")) { - properties._timeAmount = 1; - if (!$util.isInteger(message.timeAmount) && !(message.timeAmount && $util.isInteger(message.timeAmount.low) && $util.isInteger(message.timeAmount.high))) - return "timeAmount: integer|Long expected"; - } - if (message.timeUnit != null && message.hasOwnProperty("timeUnit")) { - properties._timeUnit = 1; - switch (message.timeUnit) { - default: - return "timeUnit: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + if (message.failedRequests != null && message.hasOwnProperty("failedRequests")) { + if (!$util.isObject(message.failedRequests)) + return "failedRequests: object expected"; + var key = Object.keys(message.failedRequests); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "failedRequests: integer key{k:int32} expected"; + { + var error = $root.google.rpc.Status.verify(message.failedRequests[key[i]]); + if (error) + return "failedRequests." + error; + } } } return null; }; /** - * Creates a FrequencyCap message from a plain object. Also converts values to their respective internal types. + * Creates a BatchAdReviewCenterAdsOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap + * @returns {google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata} BatchAdReviewCenterAdsOperationMetadata */ - FrequencyCap.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.FrequencyCap) + BatchAdReviewCenterAdsOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata) return object; - var message = new $root.google.ads.admanager.v1.FrequencyCap(); - if (object.maxImpressions != null) - if ($util.Long) - (message.maxImpressions = $util.Long.fromValue(object.maxImpressions)).unsigned = false; - else if (typeof object.maxImpressions === "string") - message.maxImpressions = parseInt(object.maxImpressions, 10); - else if (typeof object.maxImpressions === "number") - message.maxImpressions = object.maxImpressions; - else if (typeof object.maxImpressions === "object") - message.maxImpressions = new $util.LongBits(object.maxImpressions.low >>> 0, object.maxImpressions.high >>> 0).toNumber(); - if (object.timeAmount != null) - if ($util.Long) - (message.timeAmount = $util.Long.fromValue(object.timeAmount)).unsigned = false; - else if (typeof object.timeAmount === "string") - message.timeAmount = parseInt(object.timeAmount, 10); - else if (typeof object.timeAmount === "number") - message.timeAmount = object.timeAmount; - else if (typeof object.timeAmount === "object") - message.timeAmount = new $util.LongBits(object.timeAmount.low >>> 0, object.timeAmount.high >>> 0).toNumber(); - switch (object.timeUnit) { - default: - if (typeof object.timeUnit === "number") { - message.timeUnit = object.timeUnit; - break; + var message = new $root.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata(); + if (object.failedRequests) { + if (typeof object.failedRequests !== "object") + throw TypeError(".google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.failedRequests: object expected"); + message.failedRequests = {}; + for (var keys = Object.keys(object.failedRequests), i = 0; i < keys.length; ++i) { + if (typeof object.failedRequests[keys[i]] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.failedRequests: object expected"); + message.failedRequests[keys[i]] = $root.google.rpc.Status.fromObject(object.failedRequests[keys[i]]); } - break; - case "TIME_UNIT_UNSPECIFIED": - case 0: - message.timeUnit = 0; - break; - case "MINUTE": - case 1: - message.timeUnit = 1; - break; - case "HOUR": - case 2: - message.timeUnit = 2; - break; - case "DAY": - case 3: - message.timeUnit = 3; - break; - case "WEEK": - case 4: - message.timeUnit = 4; - break; - case "MONTH": - case 5: - message.timeUnit = 5; - break; - case "LIFETIME": - case 6: - message.timeUnit = 6; - break; - case "POD": - case 7: - message.timeUnit = 7; - break; - case "STREAM": - case 8: - message.timeUnit = 8; - break; } return message; }; /** - * Creates a plain object from a FrequencyCap message. Also converts values to other types if specified. + * Creates a plain object from a BatchAdReviewCenterAdsOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static - * @param {google.ads.admanager.v1.FrequencyCap} message FrequencyCap + * @param {google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata} message BatchAdReviewCenterAdsOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FrequencyCap.toObject = function toObject(message, options) { + BatchAdReviewCenterAdsOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.maxImpressions != null && message.hasOwnProperty("maxImpressions")) { - if (typeof message.maxImpressions === "number") - object.maxImpressions = options.longs === String ? String(message.maxImpressions) : message.maxImpressions; - else - object.maxImpressions = options.longs === String ? $util.Long.prototype.toString.call(message.maxImpressions) : options.longs === Number ? new $util.LongBits(message.maxImpressions.low >>> 0, message.maxImpressions.high >>> 0).toNumber() : message.maxImpressions; - if (options.oneofs) - object._maxImpressions = "maxImpressions"; - } - if (message.timeAmount != null && message.hasOwnProperty("timeAmount")) { - if (typeof message.timeAmount === "number") - object.timeAmount = options.longs === String ? String(message.timeAmount) : message.timeAmount; - else - object.timeAmount = options.longs === String ? $util.Long.prototype.toString.call(message.timeAmount) : options.longs === Number ? new $util.LongBits(message.timeAmount.low >>> 0, message.timeAmount.high >>> 0).toNumber() : message.timeAmount; - if (options.oneofs) - object._timeAmount = "timeAmount"; - } - if (message.timeUnit != null && message.hasOwnProperty("timeUnit")) { - object.timeUnit = options.enums === String ? $root.google.ads.admanager.v1.TimeUnitEnum.TimeUnit[message.timeUnit] === undefined ? message.timeUnit : $root.google.ads.admanager.v1.TimeUnitEnum.TimeUnit[message.timeUnit] : message.timeUnit; - if (options.oneofs) - object._timeUnit = "timeUnit"; + if (options.objects || options.defaults) + object.failedRequests = {}; + var keys2; + if (message.failedRequests && (keys2 = Object.keys(message.failedRequests)).length) { + object.failedRequests = {}; + for (var j = 0; j < keys2.length; ++j) + object.failedRequests[keys2[j]] = $root.google.rpc.Status.toObject(message.failedRequests[keys2[j]], options); } return object; }; /** - * Converts this FrequencyCap to JSON. + * Converts this BatchAdReviewCenterAdsOperationMetadata to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @instance * @returns {Object.} JSON object */ - FrequencyCap.prototype.toJSON = function toJSON() { + BatchAdReviewCenterAdsOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FrequencyCap + * Gets the default type url for BatchAdReviewCenterAdsOperationMetadata * @function getTypeUrl - * @memberof google.ads.admanager.v1.FrequencyCap + * @memberof google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FrequencyCap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchAdReviewCenterAdsOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.FrequencyCap"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata"; }; - return FrequencyCap; + return BatchAdReviewCenterAdsOperationMetadata; })(); - v1.TimeUnitEnum = (function() { + v1.AdUnitStatusEnum = (function() { /** - * Properties of a TimeUnitEnum. + * Properties of an AdUnitStatusEnum. * @memberof google.ads.admanager.v1 - * @interface ITimeUnitEnum + * @interface IAdUnitStatusEnum */ /** - * Constructs a new TimeUnitEnum. + * Constructs a new AdUnitStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TimeUnitEnum. - * @implements ITimeUnitEnum + * @classdesc Represents an AdUnitStatusEnum. + * @implements IAdUnitStatusEnum * @constructor - * @param {google.ads.admanager.v1.ITimeUnitEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAdUnitStatusEnum=} [properties] Properties to set */ - function TimeUnitEnum(properties) { + function AdUnitStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5909,60 +5268,60 @@ } /** - * Creates a new TimeUnitEnum instance using the specified properties. + * Creates a new AdUnitStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static - * @param {google.ads.admanager.v1.ITimeUnitEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum instance + * @param {google.ads.admanager.v1.IAdUnitStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum instance */ - TimeUnitEnum.create = function create(properties) { - return new TimeUnitEnum(properties); + AdUnitStatusEnum.create = function create(properties) { + return new AdUnitStatusEnum(properties); }; /** - * Encodes the specified TimeUnitEnum message. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. + * Encodes the specified AdUnitStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static - * @param {google.ads.admanager.v1.ITimeUnitEnum} message TimeUnitEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitStatusEnum} message AdUnitStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeUnitEnum.encode = function encode(message, writer) { + AdUnitStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified TimeUnitEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. + * Encodes the specified AdUnitStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static - * @param {google.ads.admanager.v1.ITimeUnitEnum} message TimeUnitEnum message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitStatusEnum} message AdUnitStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeUnitEnum.encodeDelimited = function encodeDelimited(message, writer) { + AdUnitStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeUnitEnum message from the specified reader or buffer. + * Decodes an AdUnitStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum + * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeUnitEnum.decode = function decode(reader, length, error) { + AdUnitStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TimeUnitEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5977,139 +5336,126 @@ }; /** - * Decodes a TimeUnitEnum message from the specified reader or buffer, length delimited. + * Decodes an AdUnitStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum + * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeUnitEnum.decodeDelimited = function decodeDelimited(reader) { + AdUnitStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeUnitEnum message. + * Verifies an AdUnitStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeUnitEnum.verify = function verify(message) { + AdUnitStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a TimeUnitEnum message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum + * @returns {google.ads.admanager.v1.AdUnitStatusEnum} AdUnitStatusEnum */ - TimeUnitEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TimeUnitEnum) + AdUnitStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdUnitStatusEnum) return object; - return new $root.google.ads.admanager.v1.TimeUnitEnum(); + return new $root.google.ads.admanager.v1.AdUnitStatusEnum(); }; /** - * Creates a plain object from a TimeUnitEnum message. Also converts values to other types if specified. + * Creates a plain object from an AdUnitStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static - * @param {google.ads.admanager.v1.TimeUnitEnum} message TimeUnitEnum + * @param {google.ads.admanager.v1.AdUnitStatusEnum} message AdUnitStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeUnitEnum.toObject = function toObject() { + AdUnitStatusEnum.toObject = function toObject() { return {}; }; /** - * Converts this TimeUnitEnum to JSON. + * Converts this AdUnitStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @instance * @returns {Object.} JSON object */ - TimeUnitEnum.prototype.toJSON = function toJSON() { + AdUnitStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TimeUnitEnum + * Gets the default type url for AdUnitStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.TimeUnitEnum + * @memberof google.ads.admanager.v1.AdUnitStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TimeUnitEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdUnitStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TimeUnitEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitStatusEnum"; }; /** - * TimeUnit enum. - * @name google.ads.admanager.v1.TimeUnitEnum.TimeUnit + * AdUnitStatus enum. + * @name google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus * @enum {number} - * @property {number} TIME_UNIT_UNSPECIFIED=0 TIME_UNIT_UNSPECIFIED value - * @property {number} MINUTE=1 MINUTE value - * @property {number} HOUR=2 HOUR value - * @property {number} DAY=3 DAY value - * @property {number} WEEK=4 WEEK value - * @property {number} MONTH=5 MONTH value - * @property {number} LIFETIME=6 LIFETIME value - * @property {number} POD=7 POD value - * @property {number} STREAM=8 STREAM value + * @property {number} AD_UNIT_STATUS_UNSPECIFIED=0 AD_UNIT_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} ARCHIVED=3 ARCHIVED value */ - TimeUnitEnum.TimeUnit = (function() { + AdUnitStatusEnum.AdUnitStatus = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIME_UNIT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MINUTE"] = 1; - values[valuesById[2] = "HOUR"] = 2; - values[valuesById[3] = "DAY"] = 3; - values[valuesById[4] = "WEEK"] = 4; - values[valuesById[5] = "MONTH"] = 5; - values[valuesById[6] = "LIFETIME"] = 6; - values[valuesById[7] = "POD"] = 7; - values[valuesById[8] = "STREAM"] = 8; + values[valuesById[0] = "AD_UNIT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "ARCHIVED"] = 3; return values; })(); - return TimeUnitEnum; + return AdUnitStatusEnum; })(); - v1.Size = (function() { + v1.SmartSizeModeEnum = (function() { /** - * Properties of a Size. + * Properties of a SmartSizeModeEnum. * @memberof google.ads.admanager.v1 - * @interface ISize - * @property {number|null} [width] Size width - * @property {number|null} [height] Size height - * @property {google.ads.admanager.v1.SizeTypeEnum.SizeType|null} [sizeType] Size sizeType + * @interface ISmartSizeModeEnum */ /** - * Constructs a new Size. + * Constructs a new SmartSizeModeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Size. - * @implements ISize + * @classdesc Represents a SmartSizeModeEnum. + * @implements ISmartSizeModeEnum * @constructor - * @param {google.ads.admanager.v1.ISize=} [properties] Properties to set + * @param {google.ads.admanager.v1.ISmartSizeModeEnum=} [properties] Properties to set */ - function Size(properties) { + function SmartSizeModeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6117,107 +5463,65 @@ } /** - * Size width. - * @member {number} width - * @memberof google.ads.admanager.v1.Size - * @instance - */ - Size.prototype.width = 0; - - /** - * Size height. - * @member {number} height - * @memberof google.ads.admanager.v1.Size - * @instance - */ - Size.prototype.height = 0; - - /** - * Size sizeType. - * @member {google.ads.admanager.v1.SizeTypeEnum.SizeType} sizeType - * @memberof google.ads.admanager.v1.Size - * @instance - */ - Size.prototype.sizeType = 0; - - /** - * Creates a new Size instance using the specified properties. + * Creates a new SmartSizeModeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static - * @param {google.ads.admanager.v1.ISize=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Size} Size instance + * @param {google.ads.admanager.v1.ISmartSizeModeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum instance */ - Size.create = function create(properties) { - return new Size(properties); + SmartSizeModeEnum.create = function create(properties) { + return new SmartSizeModeEnum(properties); }; /** - * Encodes the specified Size message. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. + * Encodes the specified SmartSizeModeEnum message. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static - * @param {google.ads.admanager.v1.ISize} message Size message or plain object to encode + * @param {google.ads.admanager.v1.ISmartSizeModeEnum} message SmartSizeModeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Size.encode = function encode(message, writer) { + SmartSizeModeEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.width); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.height); - if (message.sizeType != null && Object.hasOwnProperty.call(message, "sizeType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sizeType); return writer; }; /** - * Encodes the specified Size message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. + * Encodes the specified SmartSizeModeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SmartSizeModeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static - * @param {google.ads.admanager.v1.ISize} message Size message or plain object to encode + * @param {google.ads.admanager.v1.ISmartSizeModeEnum} message SmartSizeModeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Size.encodeDelimited = function encodeDelimited(message, writer) { + SmartSizeModeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Size message from the specified reader or buffer. + * Decodes a SmartSizeModeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Size} Size + * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Size.decode = function decode(reader, length, error) { + SmartSizeModeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Size(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SmartSizeModeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.width = reader.int32(); - break; - } - case 2: { - message.height = reader.int32(); - break; - } - case 3: { - message.sizeType = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6227,187 +5531,126 @@ }; /** - * Decodes a Size message from the specified reader or buffer, length delimited. + * Decodes a SmartSizeModeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Size} Size + * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Size.decodeDelimited = function decodeDelimited(reader) { + SmartSizeModeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Size message. + * Verifies a SmartSizeModeEnum message. * @function verify - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Size.verify = function verify(message) { + SmartSizeModeEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (!$util.isInteger(message.width)) - return "width: integer expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height)) - return "height: integer expected"; - if (message.sizeType != null && message.hasOwnProperty("sizeType")) - switch (message.sizeType) { - default: - return "sizeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } return null; }; /** - * Creates a Size message from a plain object. Also converts values to their respective internal types. + * Creates a SmartSizeModeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Size} Size + * @returns {google.ads.admanager.v1.SmartSizeModeEnum} SmartSizeModeEnum */ - Size.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Size) + SmartSizeModeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SmartSizeModeEnum) return object; - var message = new $root.google.ads.admanager.v1.Size(); - if (object.width != null) - message.width = object.width | 0; - if (object.height != null) - message.height = object.height | 0; - switch (object.sizeType) { - default: - if (typeof object.sizeType === "number") { - message.sizeType = object.sizeType; - break; - } - break; - case "SIZE_TYPE_UNSPECIFIED": - case 0: - message.sizeType = 0; - break; - case "PIXEL": - case 1: - message.sizeType = 1; - break; - case "ASPECT_RATIO": - case 2: - message.sizeType = 2; - break; - case "INTERSTITIAL": - case 3: - message.sizeType = 3; - break; - case "IGNORED": - case 4: - message.sizeType = 4; - break; - case "NATIVE": - case 5: - message.sizeType = 5; - break; - case "FLUID": - case 6: - message.sizeType = 6; - break; - case "AUDIO": - case 7: - message.sizeType = 7; - break; - } - return message; + return new $root.google.ads.admanager.v1.SmartSizeModeEnum(); }; /** - * Creates a plain object from a Size message. Also converts values to other types if specified. + * Creates a plain object from a SmartSizeModeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static - * @param {google.ads.admanager.v1.Size} message Size + * @param {google.ads.admanager.v1.SmartSizeModeEnum} message SmartSizeModeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Size.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.width = 0; - object.height = 0; - object.sizeType = options.enums === String ? "SIZE_TYPE_UNSPECIFIED" : 0; - } - if (message.width != null && message.hasOwnProperty("width")) - object.width = message.width; - if (message.height != null && message.hasOwnProperty("height")) - object.height = message.height; - if (message.sizeType != null && message.hasOwnProperty("sizeType")) - object.sizeType = options.enums === String ? $root.google.ads.admanager.v1.SizeTypeEnum.SizeType[message.sizeType] === undefined ? message.sizeType : $root.google.ads.admanager.v1.SizeTypeEnum.SizeType[message.sizeType] : message.sizeType; - return object; + SmartSizeModeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this Size to JSON. + * Converts this SmartSizeModeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @instance * @returns {Object.} JSON object */ - Size.prototype.toJSON = function toJSON() { + SmartSizeModeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Size + * Gets the default type url for SmartSizeModeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.Size + * @memberof google.ads.admanager.v1.SmartSizeModeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Size.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SmartSizeModeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Size"; + return typeUrlPrefix + "/google.ads.admanager.v1.SmartSizeModeEnum"; }; - return Size; + /** + * SmartSizeMode enum. + * @name google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode + * @enum {number} + * @property {number} SMART_SIZE_MODE_UNSPECIFIED=0 SMART_SIZE_MODE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} SMART_BANNER=2 SMART_BANNER value + * @property {number} DYNAMIC_SIZE=3 DYNAMIC_SIZE value + */ + SmartSizeModeEnum.SmartSizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SMART_SIZE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "SMART_BANNER"] = 2; + values[valuesById[3] = "DYNAMIC_SIZE"] = 3; + return values; + })(); + + return SmartSizeModeEnum; })(); - v1.SizeTypeEnum = (function() { + v1.TargetWindowEnum = (function() { /** - * Properties of a SizeTypeEnum. + * Properties of a TargetWindowEnum. * @memberof google.ads.admanager.v1 - * @interface ISizeTypeEnum + * @interface ITargetWindowEnum */ /** - * Constructs a new SizeTypeEnum. + * Constructs a new TargetWindowEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a SizeTypeEnum. - * @implements ISizeTypeEnum + * @classdesc Represents a TargetWindowEnum. + * @implements ITargetWindowEnum * @constructor - * @param {google.ads.admanager.v1.ISizeTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITargetWindowEnum=} [properties] Properties to set */ - function SizeTypeEnum(properties) { + function TargetWindowEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6415,60 +5658,60 @@ } /** - * Creates a new SizeTypeEnum instance using the specified properties. + * Creates a new TargetWindowEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static - * @param {google.ads.admanager.v1.ISizeTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum instance + * @param {google.ads.admanager.v1.ITargetWindowEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum instance */ - SizeTypeEnum.create = function create(properties) { - return new SizeTypeEnum(properties); + TargetWindowEnum.create = function create(properties) { + return new TargetWindowEnum(properties); }; /** - * Encodes the specified SizeTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. + * Encodes the specified TargetWindowEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static - * @param {google.ads.admanager.v1.ISizeTypeEnum} message SizeTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ITargetWindowEnum} message TargetWindowEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SizeTypeEnum.encode = function encode(message, writer) { + TargetWindowEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SizeTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. + * Encodes the specified TargetWindowEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetWindowEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static - * @param {google.ads.admanager.v1.ISizeTypeEnum} message SizeTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ITargetWindowEnum} message TargetWindowEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SizeTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + TargetWindowEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SizeTypeEnum message from the specified reader or buffer. + * Decodes a TargetWindowEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum + * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SizeTypeEnum.decode = function decode(reader, length, error) { + TargetWindowEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SizeTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TargetWindowEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6483,627 +5726,688 @@ }; /** - * Decodes a SizeTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a TargetWindowEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum + * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SizeTypeEnum.decodeDelimited = function decodeDelimited(reader) { + TargetWindowEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SizeTypeEnum message. + * Verifies a TargetWindowEnum message. * @function verify - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SizeTypeEnum.verify = function verify(message) { + TargetWindowEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SizeTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a TargetWindowEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum + * @returns {google.ads.admanager.v1.TargetWindowEnum} TargetWindowEnum */ - SizeTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.SizeTypeEnum) + TargetWindowEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TargetWindowEnum) return object; - return new $root.google.ads.admanager.v1.SizeTypeEnum(); + return new $root.google.ads.admanager.v1.TargetWindowEnum(); }; /** - * Creates a plain object from a SizeTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a TargetWindowEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static - * @param {google.ads.admanager.v1.SizeTypeEnum} message SizeTypeEnum + * @param {google.ads.admanager.v1.TargetWindowEnum} message TargetWindowEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SizeTypeEnum.toObject = function toObject() { + TargetWindowEnum.toObject = function toObject() { return {}; }; /** - * Converts this SizeTypeEnum to JSON. + * Converts this TargetWindowEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @instance * @returns {Object.} JSON object */ - SizeTypeEnum.prototype.toJSON = function toJSON() { + TargetWindowEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SizeTypeEnum + * Gets the default type url for TargetWindowEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.SizeTypeEnum + * @memberof google.ads.admanager.v1.TargetWindowEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SizeTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TargetWindowEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.SizeTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.TargetWindowEnum"; }; /** - * SizeType enum. - * @name google.ads.admanager.v1.SizeTypeEnum.SizeType + * TargetWindow enum. + * @name google.ads.admanager.v1.TargetWindowEnum.TargetWindow * @enum {number} - * @property {number} SIZE_TYPE_UNSPECIFIED=0 SIZE_TYPE_UNSPECIFIED value - * @property {number} PIXEL=1 PIXEL value - * @property {number} ASPECT_RATIO=2 ASPECT_RATIO value - * @property {number} INTERSTITIAL=3 INTERSTITIAL value - * @property {number} IGNORED=4 IGNORED value - * @property {number} NATIVE=5 NATIVE value - * @property {number} FLUID=6 FLUID value - * @property {number} AUDIO=7 AUDIO value + * @property {number} TARGET_WINDOW_UNSPECIFIED=0 TARGET_WINDOW_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} BLANK=2 BLANK value */ - SizeTypeEnum.SizeType = (function() { + TargetWindowEnum.TargetWindow = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIZE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PIXEL"] = 1; - values[valuesById[2] = "ASPECT_RATIO"] = 2; - values[valuesById[3] = "INTERSTITIAL"] = 3; - values[valuesById[4] = "IGNORED"] = 4; - values[valuesById[5] = "NATIVE"] = 5; - values[valuesById[6] = "FLUID"] = 6; - values[valuesById[7] = "AUDIO"] = 7; + values[valuesById[0] = "TARGET_WINDOW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "BLANK"] = 2; return values; })(); - return SizeTypeEnum; + return TargetWindowEnum; })(); - v1.AdUnitService = (function() { + v1.AdUnit = (function() { /** - * Constructs a new AdUnitService service. + * Properties of an AdUnit. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnitService - * @extends $protobuf.rpc.Service + * @interface IAdUnit + * @property {string|null} [name] AdUnit name + * @property {number|Long|null} [adUnitId] AdUnit adUnitId + * @property {string|null} [parentAdUnit] AdUnit parentAdUnit + * @property {Array.|null} [parentPath] AdUnit parentPath + * @property {string|null} [displayName] AdUnit displayName + * @property {string|null} [adUnitCode] AdUnit adUnitCode + * @property {google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null} [status] AdUnit status + * @property {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null} [appliedTargetWindow] AdUnit appliedTargetWindow + * @property {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null} [effectiveTargetWindow] AdUnit effectiveTargetWindow + * @property {Array.|null} [appliedTeams] AdUnit appliedTeams + * @property {Array.|null} [teams] AdUnit teams + * @property {string|null} [description] AdUnit description + * @property {boolean|null} [explicitlyTargeted] AdUnit explicitlyTargeted + * @property {boolean|null} [hasChildren] AdUnit hasChildren + * @property {google.protobuf.ITimestamp|null} [updateTime] AdUnit updateTime + * @property {Array.|null} [adUnitSizes] AdUnit adUnitSizes + * @property {string|null} [externalSetTopBoxChannelId] AdUnit externalSetTopBoxChannelId + * @property {google.protobuf.IDuration|null} [refreshDelay] AdUnit refreshDelay + * @property {Array.|null} [appliedLabels] AdUnit appliedLabels + * @property {Array.|null} [effectiveAppliedLabels] AdUnit effectiveAppliedLabels + * @property {Array.|null} [appliedLabelFrequencyCaps] AdUnit appliedLabelFrequencyCaps + * @property {Array.|null} [effectiveLabelFrequencyCaps] AdUnit effectiveLabelFrequencyCaps + * @property {google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null} [smartSizeMode] AdUnit smartSizeMode + * @property {boolean|null} [appliedAdsenseEnabled] AdUnit appliedAdsenseEnabled + * @property {boolean|null} [effectiveAdsenseEnabled] AdUnit effectiveAdsenseEnabled + */ + + /** + * Constructs a new AdUnit. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an AdUnit. + * @implements IAdUnit * @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 + * @param {google.ads.admanager.v1.IAdUnit=} [properties] Properties to set */ - function AdUnitService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function AdUnit(properties) { + this.parentPath = []; + this.appliedTeams = []; + this.teams = []; + this.adUnitSizes = []; + this.appliedLabels = []; + this.effectiveAppliedLabels = []; + this.appliedLabelFrequencyCaps = []; + this.effectiveLabelFrequencyCaps = []; + 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]]; } - (AdUnitService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AdUnitService; - /** - * Creates new AdUnitService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.AdUnitService - * @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 {AdUnitService} RPC service. Useful where requests and/or responses are streamed. + * AdUnit name. + * @member {string} name + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - AdUnitService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + AdUnit.prototype.name = ""; /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|getAdUnit}. - * @memberof google.ads.admanager.v1.AdUnitService - * @typedef GetAdUnitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.AdUnit} [response] AdUnit + * AdUnit adUnitId. + * @member {number|Long} adUnitId + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ + AdUnit.prototype.adUnitId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Calls GetAdUnit. - * @function getAdUnit - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit parentAdUnit. + * @member {string|null|undefined} parentAdUnit + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IGetAdUnitRequest} request GetAdUnitRequest message or plain object - * @param {google.ads.admanager.v1.AdUnitService.GetAdUnitCallback} callback Node-style callback called with the error, if any, and AdUnit - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AdUnitService.prototype.getAdUnit = function getAdUnit(request, callback) { - return this.rpcCall(getAdUnit, $root.google.ads.admanager.v1.GetAdUnitRequest, $root.google.ads.admanager.v1.AdUnit, request, callback); - }, "name", { value: "GetAdUnit" }); + AdUnit.prototype.parentAdUnit = null; /** - * Calls GetAdUnit. - * @function getAdUnit - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit parentPath. + * @member {Array.} parentPath + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IGetAdUnitRequest} request GetAdUnitRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AdUnit.prototype.parentPath = $util.emptyArray; /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnits}. - * @memberof google.ads.admanager.v1.AdUnitService - * @typedef ListAdUnitsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListAdUnitsResponse} [response] ListAdUnitsResponse + * AdUnit displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ + AdUnit.prototype.displayName = null; /** - * Calls ListAdUnits. - * @function listAdUnits - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit adUnitCode. + * @member {string|null|undefined} adUnitCode + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IListAdUnitsRequest} request ListAdUnitsRequest message or plain object - * @param {google.ads.admanager.v1.AdUnitService.ListAdUnitsCallback} callback Node-style callback called with the error, if any, and ListAdUnitsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AdUnitService.prototype.listAdUnits = function listAdUnits(request, callback) { - return this.rpcCall(listAdUnits, $root.google.ads.admanager.v1.ListAdUnitsRequest, $root.google.ads.admanager.v1.ListAdUnitsResponse, request, callback); - }, "name", { value: "ListAdUnits" }); + AdUnit.prototype.adUnitCode = null; /** - * Calls ListAdUnits. - * @function listAdUnits - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit status. + * @member {google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|null|undefined} status + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IListAdUnitsRequest} request ListAdUnitsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AdUnit.prototype.status = null; /** - * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnitSizes}. - * @memberof google.ads.admanager.v1.AdUnitService - * @typedef ListAdUnitSizesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListAdUnitSizesResponse} [response] ListAdUnitSizesResponse + * AdUnit appliedTargetWindow. + * @member {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null|undefined} appliedTargetWindow + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ + AdUnit.prototype.appliedTargetWindow = null; /** - * Calls ListAdUnitSizes. - * @function listAdUnitSizes - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit effectiveTargetWindow. + * @member {google.ads.admanager.v1.TargetWindowEnum.TargetWindow|null|undefined} effectiveTargetWindow + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} request ListAdUnitSizesRequest message or plain object - * @param {google.ads.admanager.v1.AdUnitService.ListAdUnitSizesCallback} callback Node-style callback called with the error, if any, and ListAdUnitSizesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AdUnitService.prototype.listAdUnitSizes = function listAdUnitSizes(request, callback) { - return this.rpcCall(listAdUnitSizes, $root.google.ads.admanager.v1.ListAdUnitSizesRequest, $root.google.ads.admanager.v1.ListAdUnitSizesResponse, request, callback); - }, "name", { value: "ListAdUnitSizes" }); + AdUnit.prototype.effectiveTargetWindow = null; /** - * Calls ListAdUnitSizes. - * @function listAdUnitSizes - * @memberof google.ads.admanager.v1.AdUnitService + * AdUnit appliedTeams. + * @member {Array.} appliedTeams + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} request ListAdUnitSizesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ - - return AdUnitService; - })(); - - v1.GetAdUnitRequest = (function() { + AdUnit.prototype.appliedTeams = $util.emptyArray; /** - * Properties of a GetAdUnitRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetAdUnitRequest - * @property {string|null} [name] GetAdUnitRequest name + * AdUnit teams. + * @member {Array.} teams + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ + AdUnit.prototype.teams = $util.emptyArray; /** - * Constructs a new GetAdUnitRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetAdUnitRequest. - * @implements IGetAdUnitRequest - * @constructor - * @param {google.ads.admanager.v1.IGetAdUnitRequest=} [properties] Properties to set + * AdUnit description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - function GetAdUnitRequest(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]]; - } + AdUnit.prototype.description = null; /** - * GetAdUnitRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetAdUnitRequest + * AdUnit explicitlyTargeted. + * @member {boolean|null|undefined} explicitlyTargeted + * @memberof google.ads.admanager.v1.AdUnit * @instance */ - GetAdUnitRequest.prototype.name = ""; + AdUnit.prototype.explicitlyTargeted = null; /** - * Creates a new GetAdUnitRequest instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {google.ads.admanager.v1.IGetAdUnitRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest instance + * AdUnit hasChildren. + * @member {boolean|null|undefined} hasChildren + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.create = function create(properties) { - return new GetAdUnitRequest(properties); - }; + AdUnit.prototype.hasChildren = null; /** - * Encodes the specified GetAdUnitRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {google.ads.admanager.v1.IGetAdUnitRequest} message GetAdUnitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AdUnit updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.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; - }; + AdUnit.prototype.updateTime = null; /** - * Encodes the specified GetAdUnitRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {google.ads.admanager.v1.IGetAdUnitRequest} message GetAdUnitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AdUnit adUnitSizes. + * @member {Array.} adUnitSizes + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + AdUnit.prototype.adUnitSizes = $util.emptyArray; /** - * Decodes a GetAdUnitRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * AdUnit externalSetTopBoxChannelId. + * @member {string|null|undefined} externalSetTopBoxChannelId + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetAdUnitRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + AdUnit.prototype.externalSetTopBoxChannelId = null; /** - * Decodes a GetAdUnitRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * AdUnit refreshDelay. + * @member {google.protobuf.IDuration|null|undefined} refreshDelay + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + AdUnit.prototype.refreshDelay = null; /** - * Verifies a GetAdUnitRequest message. - * @function verify - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * AdUnit appliedLabels. + * @member {Array.} appliedLabels + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.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; - }; + AdUnit.prototype.appliedLabels = $util.emptyArray; /** - * Creates a GetAdUnitRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest + * AdUnit effectiveAppliedLabels. + * @member {Array.} effectiveAppliedLabels + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetAdUnitRequest) - return object; - var message = new $root.google.ads.admanager.v1.GetAdUnitRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + AdUnit.prototype.effectiveAppliedLabels = $util.emptyArray; /** - * Creates a plain object from a GetAdUnitRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {google.ads.admanager.v1.GetAdUnitRequest} message GetAdUnitRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * AdUnit appliedLabelFrequencyCaps. + * @member {Array.} appliedLabelFrequencyCaps + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.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; - }; + AdUnit.prototype.appliedLabelFrequencyCaps = $util.emptyArray; /** - * Converts this GetAdUnitRequest to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.GetAdUnitRequest + * AdUnit effectiveLabelFrequencyCaps. + * @member {Array.} effectiveLabelFrequencyCaps + * @memberof google.ads.admanager.v1.AdUnit * @instance - * @returns {Object.} JSON object */ - GetAdUnitRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + AdUnit.prototype.effectiveLabelFrequencyCaps = $util.emptyArray; /** - * Gets the default type url for GetAdUnitRequest - * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetAdUnitRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * AdUnit smartSizeMode. + * @member {google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|null|undefined} smartSizeMode + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ - GetAdUnitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.GetAdUnitRequest"; - }; - - return GetAdUnitRequest; - })(); + AdUnit.prototype.smartSizeMode = null; - v1.ListAdUnitsRequest = (function() { + /** + * AdUnit appliedAdsenseEnabled. + * @member {boolean|null|undefined} appliedAdsenseEnabled + * @memberof google.ads.admanager.v1.AdUnit + * @instance + */ + AdUnit.prototype.appliedAdsenseEnabled = null; /** - * Properties of a ListAdUnitsRequest. - * @memberof google.ads.admanager.v1 - * @interface IListAdUnitsRequest - * @property {string|null} [parent] ListAdUnitsRequest parent - * @property {number|null} [pageSize] ListAdUnitsRequest pageSize - * @property {string|null} [pageToken] ListAdUnitsRequest pageToken - * @property {string|null} [filter] ListAdUnitsRequest filter - * @property {string|null} [orderBy] ListAdUnitsRequest orderBy - * @property {number|null} [skip] ListAdUnitsRequest skip + * AdUnit effectiveAdsenseEnabled. + * @member {boolean|null|undefined} effectiveAdsenseEnabled + * @memberof google.ads.admanager.v1.AdUnit + * @instance */ + AdUnit.prototype.effectiveAdsenseEnabled = null; - /** - * Constructs a new ListAdUnitsRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListAdUnitsRequest. - * @implements IListAdUnitsRequest - * @constructor - * @param {google.ads.admanager.v1.IListAdUnitsRequest=} [properties] Properties to set - */ - function ListAdUnitsRequest(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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ListAdUnitsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.parent = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_parentAdUnit", { + get: $util.oneOfGetter($oneOfFields = ["parentAdUnit"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListAdUnitsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.pageSize = 0; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListAdUnitsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.pageToken = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_adUnitCode", { + get: $util.oneOfGetter($oneOfFields = ["adUnitCode"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListAdUnitsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.filter = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListAdUnitsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.orderBy = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_appliedTargetWindow", { + get: $util.oneOfGetter($oneOfFields = ["appliedTargetWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListAdUnitsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - */ - ListAdUnitsRequest.prototype.skip = 0; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_effectiveTargetWindow", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTargetWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_explicitlyTargeted", { + get: $util.oneOfGetter($oneOfFields = ["explicitlyTargeted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_hasChildren", { + get: $util.oneOfGetter($oneOfFields = ["hasChildren"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_externalSetTopBoxChannelId", { + get: $util.oneOfGetter($oneOfFields = ["externalSetTopBoxChannelId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_refreshDelay", { + get: $util.oneOfGetter($oneOfFields = ["refreshDelay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_smartSizeMode", { + get: $util.oneOfGetter($oneOfFields = ["smartSizeMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_appliedAdsenseEnabled", { + get: $util.oneOfGetter($oneOfFields = ["appliedAdsenseEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnit.prototype, "_effectiveAdsenseEnabled", { + get: $util.oneOfGetter($oneOfFields = ["effectiveAdsenseEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListAdUnitsRequest instance using the specified properties. + * Creates a new AdUnit instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static - * @param {google.ads.admanager.v1.IListAdUnitsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest instance + * @param {google.ads.admanager.v1.IAdUnit=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdUnit} AdUnit instance */ - ListAdUnitsRequest.create = function create(properties) { - return new ListAdUnitsRequest(properties); + AdUnit.create = function create(properties) { + return new AdUnit(properties); }; /** - * Encodes the specified ListAdUnitsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. + * Encodes the specified AdUnit message. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static - * @param {google.ads.admanager.v1.IListAdUnitsRequest} message ListAdUnitsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnit} message AdUnit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitsRequest.encode = function encode(message, writer) { + AdUnit.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.adUnitCode != null && Object.hasOwnProperty.call(message, "adUnitCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.adUnitCode); + if (message.appliedTeams != null && message.appliedTeams.length) + for (var i = 0; i < message.appliedTeams.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.appliedTeams[i]); + if (message.teams != null && message.teams.length) + for (var i = 0; i < message.teams.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.teams[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.explicitlyTargeted != null && Object.hasOwnProperty.call(message, "explicitlyTargeted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.explicitlyTargeted); + if (message.hasChildren != null && Object.hasOwnProperty.call(message, "hasChildren")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.hasChildren); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.displayName); + if (message.parentAdUnit != null && Object.hasOwnProperty.call(message, "parentAdUnit")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.parentAdUnit); + if (message.parentPath != null && message.parentPath.length) + for (var i = 0; i < message.parentPath.length; ++i) + $root.google.ads.admanager.v1.AdUnitParent.encode(message.parentPath[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.status); + if (message.adUnitSizes != null && message.adUnitSizes.length) + for (var i = 0; i < message.adUnitSizes.length; ++i) + $root.google.ads.admanager.v1.AdUnitSize.encode(message.adUnitSizes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.adUnitId != null && Object.hasOwnProperty.call(message, "adUnitId")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.adUnitId); + if (message.externalSetTopBoxChannelId != null && Object.hasOwnProperty.call(message, "externalSetTopBoxChannelId")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.externalSetTopBoxChannelId); + if (message.refreshDelay != null && Object.hasOwnProperty.call(message, "refreshDelay")) + $root.google.protobuf.Duration.encode(message.refreshDelay, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.appliedLabels != null && message.appliedLabels.length) + for (var i = 0; i < message.appliedLabels.length; ++i) + $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.effectiveAppliedLabels != null && message.effectiveAppliedLabels.length) + for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) + $root.google.ads.admanager.v1.AppliedLabel.encode(message.effectiveAppliedLabels[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.appliedLabelFrequencyCaps != null && message.appliedLabelFrequencyCaps.length) + for (var i = 0; i < message.appliedLabelFrequencyCaps.length; ++i) + $root.google.ads.admanager.v1.LabelFrequencyCap.encode(message.appliedLabelFrequencyCaps[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.effectiveLabelFrequencyCaps != null && message.effectiveLabelFrequencyCaps.length) + for (var i = 0; i < message.effectiveLabelFrequencyCaps.length; ++i) + $root.google.ads.admanager.v1.LabelFrequencyCap.encode(message.effectiveLabelFrequencyCaps[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.smartSizeMode != null && Object.hasOwnProperty.call(message, "smartSizeMode")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.smartSizeMode); + if (message.appliedAdsenseEnabled != null && Object.hasOwnProperty.call(message, "appliedAdsenseEnabled")) + writer.uint32(/* id 26, wireType 0 =*/208).bool(message.appliedAdsenseEnabled); + if (message.effectiveAdsenseEnabled != null && Object.hasOwnProperty.call(message, "effectiveAdsenseEnabled")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.effectiveAdsenseEnabled); + if (message.appliedTargetWindow != null && Object.hasOwnProperty.call(message, "appliedTargetWindow")) + writer.uint32(/* id 44, wireType 0 =*/352).int32(message.appliedTargetWindow); + if (message.effectiveTargetWindow != null && Object.hasOwnProperty.call(message, "effectiveTargetWindow")) + writer.uint32(/* id 45, wireType 0 =*/360).int32(message.effectiveTargetWindow); return writer; }; /** - * Encodes the specified ListAdUnitsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. + * Encodes the specified AdUnit message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnit.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static - * @param {google.ads.admanager.v1.IListAdUnitsRequest} message ListAdUnitsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnit} message AdUnit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + AdUnit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAdUnitsRequest message from the specified reader or buffer. + * Decodes an AdUnit message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest + * @returns {google.ads.admanager.v1.AdUnit} AdUnit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitsRequest.decode = function decode(reader, length, error) { + AdUnit.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnit(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); + break; + } + case 15: { + message.adUnitId = reader.int64(); + break; + } + case 10: { + message.parentAdUnit = reader.string(); + break; + } + case 11: { + if (!(message.parentPath && message.parentPath.length)) + message.parentPath = []; + message.parentPath.push($root.google.ads.admanager.v1.AdUnitParent.decode(reader, reader.uint32())); + break; + } + case 9: { + message.displayName = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.adUnitCode = reader.string(); + break; + } + case 13: { + message.status = reader.int32(); + break; + } + case 44: { + message.appliedTargetWindow = reader.int32(); + break; + } + case 45: { + message.effectiveTargetWindow = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); + if (!(message.appliedTeams && message.appliedTeams.length)) + message.appliedTeams = []; + message.appliedTeams.push(reader.string()); break; } case 4: { - message.filter = reader.string(); + if (!(message.teams && message.teams.length)) + message.teams = []; + message.teams.push(reader.string()); break; } case 5: { - message.orderBy = reader.string(); + message.description = reader.string(); break; } case 6: { - message.skip = reader.int32(); + message.explicitlyTargeted = reader.bool(); + break; + } + case 7: { + message.hasChildren = reader.bool(); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + if (!(message.adUnitSizes && message.adUnitSizes.length)) + message.adUnitSizes = []; + message.adUnitSizes.push($root.google.ads.admanager.v1.AdUnitSize.decode(reader, reader.uint32())); + break; + } + case 17: { + message.externalSetTopBoxChannelId = reader.string(); + break; + } + case 19: { + message.refreshDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 21: { + if (!(message.appliedLabels && message.appliedLabels.length)) + message.appliedLabels = []; + message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); + break; + } + case 22: { + if (!(message.effectiveAppliedLabels && message.effectiveAppliedLabels.length)) + message.effectiveAppliedLabels = []; + message.effectiveAppliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); + break; + } + case 23: { + if (!(message.appliedLabelFrequencyCaps && message.appliedLabelFrequencyCaps.length)) + message.appliedLabelFrequencyCaps = []; + message.appliedLabelFrequencyCaps.push($root.google.ads.admanager.v1.LabelFrequencyCap.decode(reader, reader.uint32())); + break; + } + case 24: { + if (!(message.effectiveLabelFrequencyCaps && message.effectiveLabelFrequencyCaps.length)) + message.effectiveLabelFrequencyCaps = []; + message.effectiveLabelFrequencyCaps.push($root.google.ads.admanager.v1.LabelFrequencyCap.decode(reader, reader.uint32())); + break; + } + case 25: { + message.smartSizeMode = reader.int32(); + break; + } + case 26: { + message.appliedAdsenseEnabled = reader.bool(); + break; + } + case 27: { + message.effectiveAdsenseEnabled = reader.bool(); break; } default: @@ -7115,590 +6419,763 @@ }; /** - * Decodes a ListAdUnitsRequest message from the specified reader or buffer, length delimited. + * Decodes an AdUnit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest + * @returns {google.ads.admanager.v1.AdUnit} AdUnit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitsRequest.decodeDelimited = function decodeDelimited(reader) { + AdUnit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAdUnitsRequest message. + * Verifies an AdUnit message. * @function verify - * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @memberof google.ads.admanager.v1.AdUnit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAdUnitsRequest.verify = function verify(message) { + AdUnit.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; - return null; - }; - - /** - * Creates a ListAdUnitsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest - */ - ListAdUnitsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListAdUnitsRequest) - return object; - var message = new $root.google.ads.admanager.v1.ListAdUnitsRequest(); - 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.skip != null) - message.skip = object.skip | 0; - return message; - }; - - /** - * Creates a plain object from a ListAdUnitsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @static - * @param {google.ads.admanager.v1.ListAdUnitsRequest} message ListAdUnitsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAdUnitsRequest.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.skip = 0; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.adUnitId != null && message.hasOwnProperty("adUnitId")) + if (!$util.isInteger(message.adUnitId) && !(message.adUnitId && $util.isInteger(message.adUnitId.low) && $util.isInteger(message.adUnitId.high))) + return "adUnitId: integer|Long expected"; + if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { + properties._parentAdUnit = 1; + if (!$util.isString(message.parentAdUnit)) + return "parentAdUnit: string expected"; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; - return object; - }; - - /** - * Converts this ListAdUnitsRequest to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAdUnitsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAdUnitsRequest - * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListAdUnitsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAdUnitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (message.parentPath != null && message.hasOwnProperty("parentPath")) { + if (!Array.isArray(message.parentPath)) + return "parentPath: array expected"; + for (var i = 0; i < message.parentPath.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnitParent.verify(message.parentPath[i]); + if (error) + return "parentPath." + error; + } } - return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitsRequest"; - }; - - return ListAdUnitsRequest; - })(); - - v1.ListAdUnitsResponse = (function() { - - /** - * Properties of a ListAdUnitsResponse. - * @memberof google.ads.admanager.v1 - * @interface IListAdUnitsResponse - * @property {Array.|null} [adUnits] ListAdUnitsResponse adUnits - * @property {string|null} [nextPageToken] ListAdUnitsResponse nextPageToken - * @property {number|null} [totalSize] ListAdUnitsResponse totalSize - */ - - /** - * Constructs a new ListAdUnitsResponse. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListAdUnitsResponse. - * @implements IListAdUnitsResponse - * @constructor - * @param {google.ads.admanager.v1.IListAdUnitsResponse=} [properties] Properties to set - */ - function ListAdUnitsResponse(properties) { - this.adUnits = []; - 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]]; - } - - /** - * ListAdUnitsResponse adUnits. - * @member {Array.} adUnits - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @instance - */ - ListAdUnitsResponse.prototype.adUnits = $util.emptyArray; - - /** - * ListAdUnitsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @instance - */ - ListAdUnitsResponse.prototype.nextPageToken = ""; - - /** - * ListAdUnitsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @instance - */ - ListAdUnitsResponse.prototype.totalSize = 0; - - /** - * Creates a new ListAdUnitsResponse instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {google.ads.admanager.v1.IListAdUnitsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse instance - */ - ListAdUnitsResponse.create = function create(properties) { - return new ListAdUnitsResponse(properties); - }; - - /** - * Encodes the specified ListAdUnitsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {google.ads.admanager.v1.IListAdUnitsResponse} message ListAdUnitsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAdUnitsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.adUnits != null && message.adUnits.length) - for (var i = 0; i < message.adUnits.length; ++i) - $root.google.ads.admanager.v1.AdUnit.encode(message.adUnits[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); - return writer; - }; - - /** - * Encodes the specified ListAdUnitsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {google.ads.admanager.v1.IListAdUnitsResponse} message ListAdUnitsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAdUnitsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAdUnitsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAdUnitsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { + properties._adUnitCode = 1; + if (!$util.isString(message.adUnitCode)) + return "adUnitCode: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; - switch (tag >>> 3) { - case 1: { - if (!(message.adUnits && message.adUnits.length)) - message.adUnits = []; - message.adUnits.push($root.google.ads.admanager.v1.AdUnit.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); - break; - } + } + } + if (message.appliedTargetWindow != null && message.hasOwnProperty("appliedTargetWindow")) { + properties._appliedTargetWindow = 1; + switch (message.appliedTargetWindow) { default: - reader.skipType(tag & 7); + return "appliedTargetWindow: enum value expected"; + case 0: + case 1: + case 2: break; } } - return message; - }; - - /** - * Decodes a ListAdUnitsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAdUnitsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAdUnitsResponse message. - * @function verify - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAdUnitsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.adUnits != null && message.hasOwnProperty("adUnits")) { - if (!Array.isArray(message.adUnits)) - return "adUnits: array expected"; - for (var i = 0; i < message.adUnits.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnit.verify(message.adUnits[i]); + if (message.effectiveTargetWindow != null && message.hasOwnProperty("effectiveTargetWindow")) { + properties._effectiveTargetWindow = 1; + switch (message.effectiveTargetWindow) { + default: + return "effectiveTargetWindow: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { + if (!Array.isArray(message.appliedTeams)) + return "appliedTeams: array expected"; + for (var i = 0; i < message.appliedTeams.length; ++i) + if (!$util.isString(message.appliedTeams[i])) + return "appliedTeams: string[] expected"; + } + if (message.teams != null && message.hasOwnProperty("teams")) { + if (!Array.isArray(message.teams)) + return "teams: array expected"; + for (var i = 0; i < message.teams.length; ++i) + if (!$util.isString(message.teams[i])) + return "teams: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.explicitlyTargeted != null && message.hasOwnProperty("explicitlyTargeted")) { + properties._explicitlyTargeted = 1; + if (typeof message.explicitlyTargeted !== "boolean") + return "explicitlyTargeted: boolean expected"; + } + if (message.hasChildren != null && message.hasOwnProperty("hasChildren")) { + properties._hasChildren = 1; + if (typeof message.hasChildren !== "boolean") + return "hasChildren: boolean expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "adUnits." + error; + return "updateTime." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.adUnitSizes != null && message.hasOwnProperty("adUnitSizes")) { + if (!Array.isArray(message.adUnitSizes)) + return "adUnitSizes: array expected"; + for (var i = 0; i < message.adUnitSizes.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnitSize.verify(message.adUnitSizes[i]); + if (error) + return "adUnitSizes." + error; + } + } + if (message.externalSetTopBoxChannelId != null && message.hasOwnProperty("externalSetTopBoxChannelId")) { + properties._externalSetTopBoxChannelId = 1; + if (!$util.isString(message.externalSetTopBoxChannelId)) + return "externalSetTopBoxChannelId: string expected"; + } + if (message.refreshDelay != null && message.hasOwnProperty("refreshDelay")) { + properties._refreshDelay = 1; + { + var error = $root.google.protobuf.Duration.verify(message.refreshDelay); + if (error) + return "refreshDelay." + error; + } + } + if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { + if (!Array.isArray(message.appliedLabels)) + return "appliedLabels: array expected"; + for (var i = 0; i < message.appliedLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); + if (error) + return "appliedLabels." + error; + } + } + if (message.effectiveAppliedLabels != null && message.hasOwnProperty("effectiveAppliedLabels")) { + if (!Array.isArray(message.effectiveAppliedLabels)) + return "effectiveAppliedLabels: array expected"; + for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.effectiveAppliedLabels[i]); + if (error) + return "effectiveAppliedLabels." + error; + } + } + if (message.appliedLabelFrequencyCaps != null && message.hasOwnProperty("appliedLabelFrequencyCaps")) { + if (!Array.isArray(message.appliedLabelFrequencyCaps)) + return "appliedLabelFrequencyCaps: array expected"; + for (var i = 0; i < message.appliedLabelFrequencyCaps.length; ++i) { + var error = $root.google.ads.admanager.v1.LabelFrequencyCap.verify(message.appliedLabelFrequencyCaps[i]); + if (error) + return "appliedLabelFrequencyCaps." + error; + } + } + if (message.effectiveLabelFrequencyCaps != null && message.hasOwnProperty("effectiveLabelFrequencyCaps")) { + if (!Array.isArray(message.effectiveLabelFrequencyCaps)) + return "effectiveLabelFrequencyCaps: array expected"; + for (var i = 0; i < message.effectiveLabelFrequencyCaps.length; ++i) { + var error = $root.google.ads.admanager.v1.LabelFrequencyCap.verify(message.effectiveLabelFrequencyCaps[i]); + if (error) + return "effectiveLabelFrequencyCaps." + error; + } + } + if (message.smartSizeMode != null && message.hasOwnProperty("smartSizeMode")) { + properties._smartSizeMode = 1; + switch (message.smartSizeMode) { + default: + return "smartSizeMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.appliedAdsenseEnabled != null && message.hasOwnProperty("appliedAdsenseEnabled")) { + properties._appliedAdsenseEnabled = 1; + if (typeof message.appliedAdsenseEnabled !== "boolean") + return "appliedAdsenseEnabled: boolean expected"; + } + if (message.effectiveAdsenseEnabled != null && message.hasOwnProperty("effectiveAdsenseEnabled")) { + properties._effectiveAdsenseEnabled = 1; + if (typeof message.effectiveAdsenseEnabled !== "boolean") + return "effectiveAdsenseEnabled: boolean expected"; + } return null; }; /** - * Creates a ListAdUnitsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @memberof google.ads.admanager.v1.AdUnit * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse + * @returns {google.ads.admanager.v1.AdUnit} AdUnit */ - ListAdUnitsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListAdUnitsResponse) + AdUnit.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdUnit) return object; - var message = new $root.google.ads.admanager.v1.ListAdUnitsResponse(); - if (object.adUnits) { - if (!Array.isArray(object.adUnits)) - throw TypeError(".google.ads.admanager.v1.ListAdUnitsResponse.adUnits: array expected"); - message.adUnits = []; - for (var i = 0; i < object.adUnits.length; ++i) { - if (typeof object.adUnits[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListAdUnitsResponse.adUnits: object expected"); - message.adUnits[i] = $root.google.ads.admanager.v1.AdUnit.fromObject(object.adUnits[i]); + var message = new $root.google.ads.admanager.v1.AdUnit(); + if (object.name != null) + message.name = String(object.name); + if (object.adUnitId != null) + if ($util.Long) + (message.adUnitId = $util.Long.fromValue(object.adUnitId)).unsigned = false; + else if (typeof object.adUnitId === "string") + message.adUnitId = parseInt(object.adUnitId, 10); + else if (typeof object.adUnitId === "number") + message.adUnitId = object.adUnitId; + else if (typeof object.adUnitId === "object") + message.adUnitId = new $util.LongBits(object.adUnitId.low >>> 0, object.adUnitId.high >>> 0).toNumber(); + if (object.parentAdUnit != null) + message.parentAdUnit = String(object.parentAdUnit); + if (object.parentPath) { + if (!Array.isArray(object.parentPath)) + throw TypeError(".google.ads.admanager.v1.AdUnit.parentPath: array expected"); + message.parentPath = []; + for (var i = 0; i < object.parentPath.length; ++i) { + if (typeof object.parentPath[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.parentPath: object expected"); + message.parentPath[i] = $root.google.ads.admanager.v1.AdUnitParent.fromObject(object.parentPath[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; - return message; - }; - - /** - * Creates a plain object from a ListAdUnitsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {google.ads.admanager.v1.ListAdUnitsResponse} message ListAdUnitsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAdUnitsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.adUnits = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.adUnitCode != null) + message.adUnitCode = String(object.adUnitCode); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "AD_UNIT_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + case "ARCHIVED": + case 3: + message.status = 3; + break; } - if (message.adUnits && message.adUnits.length) { - object.adUnits = []; - for (var j = 0; j < message.adUnits.length; ++j) - object.adUnits[j] = $root.google.ads.admanager.v1.AdUnit.toObject(message.adUnits[j], options); + switch (object.appliedTargetWindow) { + default: + if (typeof object.appliedTargetWindow === "number") { + message.appliedTargetWindow = object.appliedTargetWindow; + break; + } + break; + case "TARGET_WINDOW_UNSPECIFIED": + case 0: + message.appliedTargetWindow = 0; + break; + case "TOP": + case 1: + message.appliedTargetWindow = 1; + break; + case "BLANK": + case 2: + message.appliedTargetWindow = 2; + break; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; - }; - - /** - * Converts this ListAdUnitsResponse to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAdUnitsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAdUnitsResponse - * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListAdUnitsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAdUnitsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + switch (object.effectiveTargetWindow) { + default: + if (typeof object.effectiveTargetWindow === "number") { + message.effectiveTargetWindow = object.effectiveTargetWindow; + break; + } + break; + case "TARGET_WINDOW_UNSPECIFIED": + case 0: + message.effectiveTargetWindow = 0; + break; + case "TOP": + case 1: + message.effectiveTargetWindow = 1; + break; + case "BLANK": + case 2: + message.effectiveTargetWindow = 2; + break; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitsResponse"; - }; - - return ListAdUnitsResponse; - })(); - - v1.ListAdUnitSizesRequest = (function() { - - /** - * Properties of a ListAdUnitSizesRequest. - * @memberof google.ads.admanager.v1 - * @interface IListAdUnitSizesRequest - * @property {string|null} [parent] ListAdUnitSizesRequest parent - * @property {number|null} [pageSize] ListAdUnitSizesRequest pageSize - * @property {string|null} [pageToken] ListAdUnitSizesRequest pageToken - * @property {string|null} [filter] ListAdUnitSizesRequest filter - * @property {string|null} [orderBy] ListAdUnitSizesRequest orderBy - * @property {number|null} [skip] ListAdUnitSizesRequest skip - */ - - /** - * Constructs a new ListAdUnitSizesRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListAdUnitSizesRequest. - * @implements IListAdUnitSizesRequest - * @constructor - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest=} [properties] Properties to set + if (object.appliedTeams) { + if (!Array.isArray(object.appliedTeams)) + throw TypeError(".google.ads.admanager.v1.AdUnit.appliedTeams: array expected"); + message.appliedTeams = []; + for (var i = 0; i < object.appliedTeams.length; ++i) + message.appliedTeams[i] = String(object.appliedTeams[i]); + } + if (object.teams) { + if (!Array.isArray(object.teams)) + throw TypeError(".google.ads.admanager.v1.AdUnit.teams: array expected"); + message.teams = []; + for (var i = 0; i < object.teams.length; ++i) + message.teams[i] = String(object.teams[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.explicitlyTargeted != null) + message.explicitlyTargeted = Boolean(object.explicitlyTargeted); + if (object.hasChildren != null) + message.hasChildren = Boolean(object.hasChildren); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.adUnitSizes) { + if (!Array.isArray(object.adUnitSizes)) + throw TypeError(".google.ads.admanager.v1.AdUnit.adUnitSizes: array expected"); + message.adUnitSizes = []; + for (var i = 0; i < object.adUnitSizes.length; ++i) { + if (typeof object.adUnitSizes[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.adUnitSizes: object expected"); + message.adUnitSizes[i] = $root.google.ads.admanager.v1.AdUnitSize.fromObject(object.adUnitSizes[i]); + } + } + if (object.externalSetTopBoxChannelId != null) + message.externalSetTopBoxChannelId = String(object.externalSetTopBoxChannelId); + if (object.refreshDelay != null) { + if (typeof object.refreshDelay !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.refreshDelay: object expected"); + message.refreshDelay = $root.google.protobuf.Duration.fromObject(object.refreshDelay); + } + if (object.appliedLabels) { + if (!Array.isArray(object.appliedLabels)) + throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabels: array expected"); + message.appliedLabels = []; + for (var i = 0; i < object.appliedLabels.length; ++i) { + if (typeof object.appliedLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabels: object expected"); + message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); + } + } + if (object.effectiveAppliedLabels) { + if (!Array.isArray(object.effectiveAppliedLabels)) + throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveAppliedLabels: array expected"); + message.effectiveAppliedLabels = []; + for (var i = 0; i < object.effectiveAppliedLabels.length; ++i) { + if (typeof object.effectiveAppliedLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveAppliedLabels: object expected"); + message.effectiveAppliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.effectiveAppliedLabels[i]); + } + } + if (object.appliedLabelFrequencyCaps) { + if (!Array.isArray(object.appliedLabelFrequencyCaps)) + throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabelFrequencyCaps: array expected"); + message.appliedLabelFrequencyCaps = []; + for (var i = 0; i < object.appliedLabelFrequencyCaps.length; ++i) { + if (typeof object.appliedLabelFrequencyCaps[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.appliedLabelFrequencyCaps: object expected"); + message.appliedLabelFrequencyCaps[i] = $root.google.ads.admanager.v1.LabelFrequencyCap.fromObject(object.appliedLabelFrequencyCaps[i]); + } + } + if (object.effectiveLabelFrequencyCaps) { + if (!Array.isArray(object.effectiveLabelFrequencyCaps)) + throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveLabelFrequencyCaps: array expected"); + message.effectiveLabelFrequencyCaps = []; + for (var i = 0; i < object.effectiveLabelFrequencyCaps.length; ++i) { + if (typeof object.effectiveLabelFrequencyCaps[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnit.effectiveLabelFrequencyCaps: object expected"); + message.effectiveLabelFrequencyCaps[i] = $root.google.ads.admanager.v1.LabelFrequencyCap.fromObject(object.effectiveLabelFrequencyCaps[i]); + } + } + switch (object.smartSizeMode) { + default: + if (typeof object.smartSizeMode === "number") { + message.smartSizeMode = object.smartSizeMode; + break; + } + break; + case "SMART_SIZE_MODE_UNSPECIFIED": + case 0: + message.smartSizeMode = 0; + break; + case "NONE": + case 1: + message.smartSizeMode = 1; + break; + case "SMART_BANNER": + case 2: + message.smartSizeMode = 2; + break; + case "DYNAMIC_SIZE": + case 3: + message.smartSizeMode = 3; + break; + } + if (object.appliedAdsenseEnabled != null) + message.appliedAdsenseEnabled = Boolean(object.appliedAdsenseEnabled); + if (object.effectiveAdsenseEnabled != null) + message.effectiveAdsenseEnabled = Boolean(object.effectiveAdsenseEnabled); + return message; + }; + + /** + * Creates a plain object from an AdUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.AdUnit + * @static + * @param {google.ads.admanager.v1.AdUnit} message AdUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - function ListAdUnitSizesRequest(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]]; - } + AdUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.appliedTeams = []; + object.teams = []; + object.parentPath = []; + object.adUnitSizes = []; + object.appliedLabels = []; + object.effectiveAppliedLabels = []; + object.appliedLabelFrequencyCaps = []; + object.effectiveLabelFrequencyCaps = []; + } + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.adUnitId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.adUnitId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { + object.adUnitCode = message.adUnitCode; + if (options.oneofs) + object._adUnitCode = "adUnitCode"; + } + if (message.appliedTeams && message.appliedTeams.length) { + object.appliedTeams = []; + for (var j = 0; j < message.appliedTeams.length; ++j) + object.appliedTeams[j] = message.appliedTeams[j]; + } + if (message.teams && message.teams.length) { + object.teams = []; + for (var j = 0; j < message.teams.length; ++j) + object.teams[j] = message.teams[j]; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.explicitlyTargeted != null && message.hasOwnProperty("explicitlyTargeted")) { + object.explicitlyTargeted = message.explicitlyTargeted; + if (options.oneofs) + object._explicitlyTargeted = "explicitlyTargeted"; + } + if (message.hasChildren != null && message.hasOwnProperty("hasChildren")) { + object.hasChildren = message.hasChildren; + if (options.oneofs) + object._hasChildren = "hasChildren"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { + object.parentAdUnit = message.parentAdUnit; + if (options.oneofs) + object._parentAdUnit = "parentAdUnit"; + } + if (message.parentPath && message.parentPath.length) { + object.parentPath = []; + for (var j = 0; j < message.parentPath.length; ++j) + object.parentPath[j] = $root.google.ads.admanager.v1.AdUnitParent.toObject(message.parentPath[j], options); + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.adUnitSizes && message.adUnitSizes.length) { + object.adUnitSizes = []; + for (var j = 0; j < message.adUnitSizes.length; ++j) + object.adUnitSizes[j] = $root.google.ads.admanager.v1.AdUnitSize.toObject(message.adUnitSizes[j], options); + } + if (message.adUnitId != null && message.hasOwnProperty("adUnitId")) + if (typeof message.adUnitId === "number") + object.adUnitId = options.longs === String ? String(message.adUnitId) : message.adUnitId; + else + object.adUnitId = options.longs === String ? $util.Long.prototype.toString.call(message.adUnitId) : options.longs === Number ? new $util.LongBits(message.adUnitId.low >>> 0, message.adUnitId.high >>> 0).toNumber() : message.adUnitId; + if (message.externalSetTopBoxChannelId != null && message.hasOwnProperty("externalSetTopBoxChannelId")) { + object.externalSetTopBoxChannelId = message.externalSetTopBoxChannelId; + if (options.oneofs) + object._externalSetTopBoxChannelId = "externalSetTopBoxChannelId"; + } + if (message.refreshDelay != null && message.hasOwnProperty("refreshDelay")) { + object.refreshDelay = $root.google.protobuf.Duration.toObject(message.refreshDelay, options); + if (options.oneofs) + object._refreshDelay = "refreshDelay"; + } + if (message.appliedLabels && message.appliedLabels.length) { + object.appliedLabels = []; + for (var j = 0; j < message.appliedLabels.length; ++j) + object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); + } + if (message.effectiveAppliedLabels && message.effectiveAppliedLabels.length) { + object.effectiveAppliedLabels = []; + for (var j = 0; j < message.effectiveAppliedLabels.length; ++j) + object.effectiveAppliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.effectiveAppliedLabels[j], options); + } + if (message.appliedLabelFrequencyCaps && message.appliedLabelFrequencyCaps.length) { + object.appliedLabelFrequencyCaps = []; + for (var j = 0; j < message.appliedLabelFrequencyCaps.length; ++j) + object.appliedLabelFrequencyCaps[j] = $root.google.ads.admanager.v1.LabelFrequencyCap.toObject(message.appliedLabelFrequencyCaps[j], options); + } + if (message.effectiveLabelFrequencyCaps && message.effectiveLabelFrequencyCaps.length) { + object.effectiveLabelFrequencyCaps = []; + for (var j = 0; j < message.effectiveLabelFrequencyCaps.length; ++j) + object.effectiveLabelFrequencyCaps[j] = $root.google.ads.admanager.v1.LabelFrequencyCap.toObject(message.effectiveLabelFrequencyCaps[j], options); + } + if (message.smartSizeMode != null && message.hasOwnProperty("smartSizeMode")) { + object.smartSizeMode = options.enums === String ? $root.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode[message.smartSizeMode] === undefined ? message.smartSizeMode : $root.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode[message.smartSizeMode] : message.smartSizeMode; + if (options.oneofs) + object._smartSizeMode = "smartSizeMode"; + } + if (message.appliedAdsenseEnabled != null && message.hasOwnProperty("appliedAdsenseEnabled")) { + object.appliedAdsenseEnabled = message.appliedAdsenseEnabled; + if (options.oneofs) + object._appliedAdsenseEnabled = "appliedAdsenseEnabled"; + } + if (message.effectiveAdsenseEnabled != null && message.hasOwnProperty("effectiveAdsenseEnabled")) { + object.effectiveAdsenseEnabled = message.effectiveAdsenseEnabled; + if (options.oneofs) + object._effectiveAdsenseEnabled = "effectiveAdsenseEnabled"; + } + if (message.appliedTargetWindow != null && message.hasOwnProperty("appliedTargetWindow")) { + object.appliedTargetWindow = options.enums === String ? $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.appliedTargetWindow] === undefined ? message.appliedTargetWindow : $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.appliedTargetWindow] : message.appliedTargetWindow; + if (options.oneofs) + object._appliedTargetWindow = "appliedTargetWindow"; + } + if (message.effectiveTargetWindow != null && message.hasOwnProperty("effectiveTargetWindow")) { + object.effectiveTargetWindow = options.enums === String ? $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.effectiveTargetWindow] === undefined ? message.effectiveTargetWindow : $root.google.ads.admanager.v1.TargetWindowEnum.TargetWindow[message.effectiveTargetWindow] : message.effectiveTargetWindow; + if (options.oneofs) + object._effectiveTargetWindow = "effectiveTargetWindow"; + } + return object; + }; /** - * ListAdUnitSizesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * Converts this AdUnit to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.AdUnit * @instance + * @returns {Object.} JSON object */ - ListAdUnitSizesRequest.prototype.parent = ""; + AdUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ListAdUnitSizesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest - * @instance + * Gets the default type url for AdUnit + * @function getTypeUrl + * @memberof google.ads.admanager.v1.AdUnit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ListAdUnitSizesRequest.prototype.pageSize = 0; + AdUnit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.AdUnit"; + }; + + return AdUnit; + })(); + + v1.AdUnitSize = (function() { /** - * ListAdUnitSizesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest - * @instance + * Properties of an AdUnitSize. + * @memberof google.ads.admanager.v1 + * @interface IAdUnitSize + * @property {google.ads.admanager.v1.ISize|null} [size] AdUnitSize size + * @property {google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null} [environmentType] AdUnitSize environmentType + * @property {Array.|null} [companions] AdUnitSize companions */ - ListAdUnitSizesRequest.prototype.pageToken = ""; /** - * ListAdUnitSizesRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * Constructs a new AdUnitSize. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an AdUnitSize. + * @implements IAdUnitSize + * @constructor + * @param {google.ads.admanager.v1.IAdUnitSize=} [properties] Properties to set + */ + function AdUnitSize(properties) { + this.companions = []; + 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]]; + } + + /** + * AdUnitSize size. + * @member {google.ads.admanager.v1.ISize|null|undefined} size + * @memberof google.ads.admanager.v1.AdUnitSize * @instance */ - ListAdUnitSizesRequest.prototype.filter = ""; + AdUnitSize.prototype.size = null; /** - * ListAdUnitSizesRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * AdUnitSize environmentType. + * @member {google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType|null|undefined} environmentType + * @memberof google.ads.admanager.v1.AdUnitSize * @instance */ - ListAdUnitSizesRequest.prototype.orderBy = ""; + AdUnitSize.prototype.environmentType = null; /** - * ListAdUnitSizesRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * AdUnitSize companions. + * @member {Array.} companions + * @memberof google.ads.admanager.v1.AdUnitSize * @instance */ - ListAdUnitSizesRequest.prototype.skip = 0; + AdUnitSize.prototype.companions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitSize.prototype, "_size", { + get: $util.oneOfGetter($oneOfFields = ["size"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitSize.prototype, "_environmentType", { + get: $util.oneOfGetter($oneOfFields = ["environmentType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListAdUnitSizesRequest instance using the specified properties. + * Creates a new AdUnitSize instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest instance + * @param {google.ads.admanager.v1.IAdUnitSize=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize instance */ - ListAdUnitSizesRequest.create = function create(properties) { - return new ListAdUnitSizesRequest(properties); + AdUnitSize.create = function create(properties) { + return new AdUnitSize(properties); }; /** - * Encodes the specified ListAdUnitSizesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. + * Encodes the specified AdUnitSize message. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} message ListAdUnitSizesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitSize} message AdUnitSize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitSizesRequest.encode = function encode(message, writer) { + AdUnitSize.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.size != null && Object.hasOwnProperty.call(message, "size")) + $root.google.ads.admanager.v1.Size.encode(message.size, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environmentType != null && Object.hasOwnProperty.call(message, "environmentType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.environmentType); + if (message.companions != null && message.companions.length) + for (var i = 0; i < message.companions.length; ++i) + $root.google.ads.admanager.v1.Size.encode(message.companions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAdUnitSizesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. + * Encodes the specified AdUnitSize message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitSize.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} message ListAdUnitSizesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitSize} message AdUnitSize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitSizesRequest.encodeDelimited = function encodeDelimited(message, writer) { + AdUnitSize.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer. + * Decodes an AdUnitSize message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest + * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitSizesRequest.decode = function decode(reader, length, error) { + AdUnitSize.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitSizesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitSize(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.size = $root.google.ads.admanager.v1.Size.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.environmentType = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.skip = reader.int32(); + if (!(message.companions && message.companions.length)) + message.companions = []; + message.companions.push($root.google.ads.admanager.v1.Size.decode(reader, reader.uint32())); break; } default: @@ -7710,166 +7187,196 @@ }; /** - * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer, length delimited. + * Decodes an AdUnitSize message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest + * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitSizesRequest.decodeDelimited = function decodeDelimited(reader) { + AdUnitSize.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAdUnitSizesRequest message. + * Verifies an AdUnitSize message. * @function verify - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAdUnitSizesRequest.verify = function verify(message) { + AdUnitSize.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + var properties = {}; + if (message.size != null && message.hasOwnProperty("size")) { + properties._size = 1; + { + var error = $root.google.ads.admanager.v1.Size.verify(message.size); + if (error) + return "size." + error; + } + } + if (message.environmentType != null && message.hasOwnProperty("environmentType")) { + properties._environmentType = 1; + switch (message.environmentType) { + default: + return "environmentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.companions != null && message.hasOwnProperty("companions")) { + if (!Array.isArray(message.companions)) + return "companions: array expected"; + for (var i = 0; i < message.companions.length; ++i) { + var error = $root.google.ads.admanager.v1.Size.verify(message.companions[i]); + if (error) + return "companions." + error; + } + } return null; }; /** - * Creates a ListAdUnitSizesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitSize message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest + * @returns {google.ads.admanager.v1.AdUnitSize} AdUnitSize */ - ListAdUnitSizesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListAdUnitSizesRequest) + AdUnitSize.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdUnitSize) return object; - var message = new $root.google.ads.admanager.v1.ListAdUnitSizesRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.AdUnitSize(); + if (object.size != null) { + if (typeof object.size !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnitSize.size: object expected"); + message.size = $root.google.ads.admanager.v1.Size.fromObject(object.size); + } + switch (object.environmentType) { + default: + if (typeof object.environmentType === "number") { + message.environmentType = object.environmentType; + break; + } + break; + case "ENVIRONMENT_TYPE_UNSPECIFIED": + case 0: + message.environmentType = 0; + break; + case "BROWSER": + case 1: + message.environmentType = 1; + break; + case "VIDEO_PLAYER": + case 2: + message.environmentType = 2; + break; + } + if (object.companions) { + if (!Array.isArray(object.companions)) + throw TypeError(".google.ads.admanager.v1.AdUnitSize.companions: array expected"); + message.companions = []; + for (var i = 0; i < object.companions.length; ++i) { + if (typeof object.companions[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdUnitSize.companions: object expected"); + message.companions[i] = $root.google.ads.admanager.v1.Size.fromObject(object.companions[i]); + } + } return message; }; /** - * Creates a plain object from a ListAdUnitSizesRequest message. Also converts values to other types if specified. + * Creates a plain object from an AdUnitSize message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static - * @param {google.ads.admanager.v1.ListAdUnitSizesRequest} message ListAdUnitSizesRequest + * @param {google.ads.admanager.v1.AdUnitSize} message AdUnitSize * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAdUnitSizesRequest.toObject = function toObject(message, options) { + AdUnitSize.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.skip = 0; + if (options.arrays || options.defaults) + object.companions = []; + if (message.size != null && message.hasOwnProperty("size")) { + object.size = $root.google.ads.admanager.v1.Size.toObject(message.size, options); + if (options.oneofs) + object._size = "size"; + } + if (message.environmentType != null && message.hasOwnProperty("environmentType")) { + object.environmentType = options.enums === String ? $root.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType[message.environmentType] === undefined ? message.environmentType : $root.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType[message.environmentType] : message.environmentType; + if (options.oneofs) + object._environmentType = "environmentType"; + } + if (message.companions && message.companions.length) { + object.companions = []; + for (var j = 0; j < message.companions.length; ++j) + object.companions[j] = $root.google.ads.admanager.v1.Size.toObject(message.companions[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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListAdUnitSizesRequest to JSON. + * Converts this AdUnitSize to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @instance * @returns {Object.} JSON object */ - ListAdUnitSizesRequest.prototype.toJSON = function toJSON() { + AdUnitSize.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAdUnitSizesRequest + * Gets the default type url for AdUnitSize * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @memberof google.ads.admanager.v1.AdUnitSize * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAdUnitSizesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdUnitSize.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitSizesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitSize"; }; - return ListAdUnitSizesRequest; + return AdUnitSize; })(); - v1.ListAdUnitSizesResponse = (function() { + v1.AdUnitParent = (function() { /** - * Properties of a ListAdUnitSizesResponse. + * Properties of an AdUnitParent. * @memberof google.ads.admanager.v1 - * @interface IListAdUnitSizesResponse - * @property {Array.|null} [adUnitSizes] ListAdUnitSizesResponse adUnitSizes - * @property {string|null} [nextPageToken] ListAdUnitSizesResponse nextPageToken - * @property {number|null} [totalSize] ListAdUnitSizesResponse totalSize + * @interface IAdUnitParent + * @property {string|null} [parentAdUnit] AdUnitParent parentAdUnit + * @property {string|null} [displayName] AdUnitParent displayName + * @property {string|null} [adUnitCode] AdUnitParent adUnitCode */ /** - * Constructs a new ListAdUnitSizesResponse. + * Constructs a new AdUnitParent. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListAdUnitSizesResponse. - * @implements IListAdUnitSizesResponse + * @classdesc Represents an AdUnitParent. + * @implements IAdUnitParent * @constructor - * @param {google.ads.admanager.v1.IListAdUnitSizesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAdUnitParent=} [properties] Properties to set */ - function ListAdUnitSizesResponse(properties) { - this.adUnitSizes = []; + function AdUnitParent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7877,108 +7384,126 @@ } /** - * ListAdUnitSizesResponse adUnitSizes. - * @member {Array.} adUnitSizes - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * AdUnitParent parentAdUnit. + * @member {string|null|undefined} parentAdUnit + * @memberof google.ads.admanager.v1.AdUnitParent * @instance */ - ListAdUnitSizesResponse.prototype.adUnitSizes = $util.emptyArray; + AdUnitParent.prototype.parentAdUnit = null; /** - * ListAdUnitSizesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * AdUnitParent displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.AdUnitParent * @instance */ - ListAdUnitSizesResponse.prototype.nextPageToken = ""; + AdUnitParent.prototype.displayName = null; /** - * ListAdUnitSizesResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * AdUnitParent adUnitCode. + * @member {string|null|undefined} adUnitCode + * @memberof google.ads.admanager.v1.AdUnitParent * @instance */ - ListAdUnitSizesResponse.prototype.totalSize = 0; + AdUnitParent.prototype.adUnitCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitParent.prototype, "_parentAdUnit", { + get: $util.oneOfGetter($oneOfFields = ["parentAdUnit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitParent.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitParent.prototype, "_adUnitCode", { + get: $util.oneOfGetter($oneOfFields = ["adUnitCode"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListAdUnitSizesResponse instance using the specified properties. + * Creates a new AdUnitParent instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse instance + * @param {google.ads.admanager.v1.IAdUnitParent=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent instance */ - ListAdUnitSizesResponse.create = function create(properties) { - return new ListAdUnitSizesResponse(properties); + AdUnitParent.create = function create(properties) { + return new AdUnitParent(properties); }; /** - * Encodes the specified ListAdUnitSizesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. + * Encodes the specified AdUnitParent message. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesResponse} message ListAdUnitSizesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitParent} message AdUnitParent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitSizesResponse.encode = function encode(message, writer) { + AdUnitParent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.adUnitSizes != null && message.adUnitSizes.length) - for (var i = 0; i < message.adUnitSizes.length; ++i) - $root.google.ads.admanager.v1.AdUnitSize.encode(message.adUnitSizes[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.parentAdUnit != null && Object.hasOwnProperty.call(message, "parentAdUnit")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parentAdUnit); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.adUnitCode != null && Object.hasOwnProperty.call(message, "adUnitCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.adUnitCode); return writer; }; /** - * Encodes the specified ListAdUnitSizesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. + * Encodes the specified AdUnitParent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitParent.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static - * @param {google.ads.admanager.v1.IListAdUnitSizesResponse} message ListAdUnitSizesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IAdUnitParent} message AdUnitParent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAdUnitSizesResponse.encodeDelimited = function encodeDelimited(message, writer) { + AdUnitParent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer. + * Decodes an AdUnitParent message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse + * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitSizesResponse.decode = function decode(reader, length, error) { + AdUnitParent.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitSizesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitParent(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.adUnitSizes && message.adUnitSizes.length)) - message.adUnitSizes = []; - message.adUnitSizes.push($root.google.ads.admanager.v1.AdUnitSize.decode(reader, reader.uint32())); + message.parentAdUnit = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.totalSize = reader.int32(); + message.adUnitCode = reader.string(); break; } default: @@ -7990,163 +7515,151 @@ }; /** - * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer, length delimited. + * Decodes an AdUnitParent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse + * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAdUnitSizesResponse.decodeDelimited = function decodeDelimited(reader) { + AdUnitParent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAdUnitSizesResponse message. + * Verifies an AdUnitParent message. * @function verify - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAdUnitSizesResponse.verify = function verify(message) { + AdUnitParent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adUnitSizes != null && message.hasOwnProperty("adUnitSizes")) { - if (!Array.isArray(message.adUnitSizes)) - return "adUnitSizes: array expected"; - for (var i = 0; i < message.adUnitSizes.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnitSize.verify(message.adUnitSizes[i]); - if (error) - return "adUnitSizes." + error; - } + var properties = {}; + if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { + properties._parentAdUnit = 1; + if (!$util.isString(message.parentAdUnit)) + return "parentAdUnit: string expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { + properties._adUnitCode = 1; + if (!$util.isString(message.adUnitCode)) + return "adUnitCode: string expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListAdUnitSizesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AdUnitParent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse + * @returns {google.ads.admanager.v1.AdUnitParent} AdUnitParent */ - ListAdUnitSizesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListAdUnitSizesResponse) + AdUnitParent.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdUnitParent) return object; - var message = new $root.google.ads.admanager.v1.ListAdUnitSizesResponse(); - if (object.adUnitSizes) { - if (!Array.isArray(object.adUnitSizes)) - throw TypeError(".google.ads.admanager.v1.ListAdUnitSizesResponse.adUnitSizes: array expected"); - message.adUnitSizes = []; - for (var i = 0; i < object.adUnitSizes.length; ++i) { - if (typeof object.adUnitSizes[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListAdUnitSizesResponse.adUnitSizes: object expected"); - message.adUnitSizes[i] = $root.google.ads.admanager.v1.AdUnitSize.fromObject(object.adUnitSizes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.ads.admanager.v1.AdUnitParent(); + if (object.parentAdUnit != null) + message.parentAdUnit = String(object.parentAdUnit); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.adUnitCode != null) + message.adUnitCode = String(object.adUnitCode); return message; }; /** - * Creates a plain object from a ListAdUnitSizesResponse message. Also converts values to other types if specified. + * Creates a plain object from an AdUnitParent message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static - * @param {google.ads.admanager.v1.ListAdUnitSizesResponse} message ListAdUnitSizesResponse + * @param {google.ads.admanager.v1.AdUnitParent} message AdUnitParent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAdUnitSizesResponse.toObject = function toObject(message, options) { + AdUnitParent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.adUnitSizes = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; + if (message.parentAdUnit != null && message.hasOwnProperty("parentAdUnit")) { + object.parentAdUnit = message.parentAdUnit; + if (options.oneofs) + object._parentAdUnit = "parentAdUnit"; } - if (message.adUnitSizes && message.adUnitSizes.length) { - object.adUnitSizes = []; - for (var j = 0; j < message.adUnitSizes.length; ++j) - object.adUnitSizes[j] = $root.google.ads.admanager.v1.AdUnitSize.toObject(message.adUnitSizes[j], options); + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.adUnitCode != null && message.hasOwnProperty("adUnitCode")) { + object.adUnitCode = message.adUnitCode; + if (options.oneofs) + object._adUnitCode = "adUnitCode"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; return object; }; /** - * Converts this ListAdUnitSizesResponse to JSON. + * Converts this AdUnitParent to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @instance * @returns {Object.} JSON object */ - ListAdUnitSizesResponse.prototype.toJSON = function toJSON() { + AdUnitParent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAdUnitSizesResponse + * Gets the default type url for AdUnitParent * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse + * @memberof google.ads.admanager.v1.AdUnitParent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAdUnitSizesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdUnitParent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitSizesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitParent"; }; - return ListAdUnitSizesResponse; + return AdUnitParent; })(); - v1.AdManagerError = (function() { + v1.LabelFrequencyCap = (function() { /** - * Properties of an AdManagerError. + * Properties of a LabelFrequencyCap. * @memberof google.ads.admanager.v1 - * @interface IAdManagerError - * @property {string|null} [errorCode] AdManagerError errorCode - * @property {string|null} [message] AdManagerError message - * @property {string|null} [fieldPath] AdManagerError fieldPath - * @property {string|null} [trigger] AdManagerError trigger - * @property {string|null} [stackTrace] AdManagerError stackTrace - * @property {Array.|null} [details] AdManagerError details + * @interface ILabelFrequencyCap + * @property {string|null} [label] LabelFrequencyCap label + * @property {google.ads.admanager.v1.IFrequencyCap|null} [frequencyCap] LabelFrequencyCap frequencyCap */ /** - * Constructs a new AdManagerError. + * Constructs a new LabelFrequencyCap. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdManagerError. - * @implements IAdManagerError + * @classdesc Represents a LabelFrequencyCap. + * @implements ILabelFrequencyCap * @constructor - * @param {google.ads.admanager.v1.IAdManagerError=} [properties] Properties to set + * @param {google.ads.admanager.v1.ILabelFrequencyCap=} [properties] Properties to set */ - function AdManagerError(properties) { - this.details = []; + function LabelFrequencyCap(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8154,150 +7667,106 @@ } /** - * AdManagerError errorCode. - * @member {string} errorCode - * @memberof google.ads.admanager.v1.AdManagerError - * @instance - */ - AdManagerError.prototype.errorCode = ""; - - /** - * AdManagerError message. - * @member {string} message - * @memberof google.ads.admanager.v1.AdManagerError + * LabelFrequencyCap label. + * @member {string|null|undefined} label + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @instance */ - AdManagerError.prototype.message = ""; + LabelFrequencyCap.prototype.label = null; /** - * AdManagerError fieldPath. - * @member {string} fieldPath - * @memberof google.ads.admanager.v1.AdManagerError + * LabelFrequencyCap frequencyCap. + * @member {google.ads.admanager.v1.IFrequencyCap|null|undefined} frequencyCap + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @instance */ - AdManagerError.prototype.fieldPath = ""; + LabelFrequencyCap.prototype.frequencyCap = null; - /** - * AdManagerError trigger. - * @member {string} trigger - * @memberof google.ads.admanager.v1.AdManagerError - * @instance - */ - AdManagerError.prototype.trigger = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * AdManagerError stackTrace. - * @member {string} stackTrace - * @memberof google.ads.admanager.v1.AdManagerError - * @instance - */ - AdManagerError.prototype.stackTrace = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelFrequencyCap.prototype, "_label", { + get: $util.oneOfGetter($oneOfFields = ["label"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * AdManagerError details. - * @member {Array.} details - * @memberof google.ads.admanager.v1.AdManagerError - * @instance - */ - AdManagerError.prototype.details = $util.emptyArray; + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelFrequencyCap.prototype, "_frequencyCap", { + get: $util.oneOfGetter($oneOfFields = ["frequencyCap"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new AdManagerError instance using the specified properties. + * Creates a new LabelFrequencyCap instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static - * @param {google.ads.admanager.v1.IAdManagerError=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError instance + * @param {google.ads.admanager.v1.ILabelFrequencyCap=} [properties] Properties to set + * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap instance */ - AdManagerError.create = function create(properties) { - return new AdManagerError(properties); + LabelFrequencyCap.create = function create(properties) { + return new LabelFrequencyCap(properties); }; /** - * Encodes the specified AdManagerError message. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. + * Encodes the specified LabelFrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static - * @param {google.ads.admanager.v1.IAdManagerError} message AdManagerError message or plain object to encode + * @param {google.ads.admanager.v1.ILabelFrequencyCap} message LabelFrequencyCap message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdManagerError.encode = function encode(message, writer) { + LabelFrequencyCap.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.errorCode); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fieldPath); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trigger); - if (message.stackTrace != null && Object.hasOwnProperty.call(message, "stackTrace")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stackTrace); - 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 6, wireType 2 =*/50).fork()).ldelim(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.frequencyCap != null && Object.hasOwnProperty.call(message, "frequencyCap")) + $root.google.ads.admanager.v1.FrequencyCap.encode(message.frequencyCap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AdManagerError message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. + * Encodes the specified LabelFrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LabelFrequencyCap.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static - * @param {google.ads.admanager.v1.IAdManagerError} message AdManagerError message or plain object to encode + * @param {google.ads.admanager.v1.ILabelFrequencyCap} message LabelFrequencyCap message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdManagerError.encodeDelimited = function encodeDelimited(message, writer) { + LabelFrequencyCap.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdManagerError message from the specified reader or buffer. + * Decodes a LabelFrequencyCap message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError + * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdManagerError.decode = function decode(reader, length, error) { + LabelFrequencyCap.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdManagerError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.LabelFrequencyCap(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.errorCode = reader.string(); + message.label = reader.string(); break; } case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.fieldPath = reader.string(); - break; - } - case 4: { - message.trigger = reader.string(); - break; - } - case 5: { - message.stackTrace = reader.string(); - break; - } - case 6: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + message.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.decode(reader, reader.uint32()); break; } default: @@ -8309,182 +7778,145 @@ }; /** - * Decodes an AdManagerError message from the specified reader or buffer, length delimited. + * Decodes a LabelFrequencyCap message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError + * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdManagerError.decodeDelimited = function decodeDelimited(reader) { + LabelFrequencyCap.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdManagerError message. + * Verifies a LabelFrequencyCap message. * @function verify - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdManagerError.verify = function verify(message) { + LabelFrequencyCap.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - if (!$util.isString(message.errorCode)) - return "errorCode: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) - if (!$util.isString(message.fieldPath)) - return "fieldPath: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) - if (!$util.isString(message.trigger)) - return "trigger: string expected"; - if (message.stackTrace != null && message.hasOwnProperty("stackTrace")) - if (!$util.isString(message.stackTrace)) - return "stackTrace: 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]); + var properties = {}; + if (message.label != null && message.hasOwnProperty("label")) { + properties._label = 1; + if (!$util.isString(message.label)) + return "label: string expected"; + } + if (message.frequencyCap != null && message.hasOwnProperty("frequencyCap")) { + properties._frequencyCap = 1; + { + var error = $root.google.ads.admanager.v1.FrequencyCap.verify(message.frequencyCap); if (error) - return "details." + error; + return "frequencyCap." + error; } } return null; }; /** - * Creates an AdManagerError message from a plain object. Also converts values to their respective internal types. + * Creates a LabelFrequencyCap message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError + * @returns {google.ads.admanager.v1.LabelFrequencyCap} LabelFrequencyCap */ - AdManagerError.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdManagerError) + LabelFrequencyCap.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.LabelFrequencyCap) return object; - var message = new $root.google.ads.admanager.v1.AdManagerError(); - if (object.errorCode != null) - message.errorCode = String(object.errorCode); - if (object.message != null) - message.message = String(object.message); - if (object.fieldPath != null) - message.fieldPath = String(object.fieldPath); - if (object.trigger != null) - message.trigger = String(object.trigger); - if (object.stackTrace != null) - message.stackTrace = String(object.stackTrace); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.ads.admanager.v1.AdManagerError.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.ads.admanager.v1.AdManagerError.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } + var message = new $root.google.ads.admanager.v1.LabelFrequencyCap(); + if (object.label != null) + message.label = String(object.label); + if (object.frequencyCap != null) { + if (typeof object.frequencyCap !== "object") + throw TypeError(".google.ads.admanager.v1.LabelFrequencyCap.frequencyCap: object expected"); + message.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.fromObject(object.frequencyCap); } return message; }; /** - * Creates a plain object from an AdManagerError message. Also converts values to other types if specified. + * Creates a plain object from a LabelFrequencyCap message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static - * @param {google.ads.admanager.v1.AdManagerError} message AdManagerError + * @param {google.ads.admanager.v1.LabelFrequencyCap} message LabelFrequencyCap * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdManagerError.toObject = function toObject(message, options) { + LabelFrequencyCap.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.errorCode = ""; - object.message = ""; - object.fieldPath = ""; - object.trigger = ""; - object.stackTrace = ""; + if (message.label != null && message.hasOwnProperty("label")) { + object.label = message.label; + if (options.oneofs) + object._label = "label"; } - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = message.errorCode; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) - object.fieldPath = message.fieldPath; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = message.trigger; - if (message.stackTrace != null && message.hasOwnProperty("stackTrace")) - object.stackTrace = message.stackTrace; - 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); + if (message.frequencyCap != null && message.hasOwnProperty("frequencyCap")) { + object.frequencyCap = $root.google.ads.admanager.v1.FrequencyCap.toObject(message.frequencyCap, options); + if (options.oneofs) + object._frequencyCap = "frequencyCap"; } return object; }; /** - * Converts this AdManagerError to JSON. + * Converts this LabelFrequencyCap to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @instance * @returns {Object.} JSON object */ - AdManagerError.prototype.toJSON = function toJSON() { + LabelFrequencyCap.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdManagerError + * Gets the default type url for LabelFrequencyCap * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdManagerError + * @memberof google.ads.admanager.v1.LabelFrequencyCap * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdManagerError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LabelFrequencyCap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdManagerError"; + return typeUrlPrefix + "/google.ads.admanager.v1.LabelFrequencyCap"; }; - return AdManagerError; + return LabelFrequencyCap; })(); - v1.BandwidthGroup = (function() { + v1.AppliedLabel = (function() { /** - * Properties of a BandwidthGroup. + * Properties of an AppliedLabel. * @memberof google.ads.admanager.v1 - * @interface IBandwidthGroup - * @property {string|null} [name] BandwidthGroup name - * @property {string|null} [displayName] BandwidthGroup displayName + * @interface IAppliedLabel + * @property {string|null} [label] AppliedLabel label + * @property {boolean|null} [negated] AppliedLabel negated */ /** - * Constructs a new BandwidthGroup. + * Constructs a new AppliedLabel. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BandwidthGroup. - * @implements IBandwidthGroup + * @classdesc Represents an AppliedLabel. + * @implements IAppliedLabel * @constructor - * @param {google.ads.admanager.v1.IBandwidthGroup=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAppliedLabel=} [properties] Properties to set */ - function BandwidthGroup(properties) { + function AppliedLabel(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8492,106 +7924,91 @@ } /** - * BandwidthGroup name. - * @member {string|null|undefined} name - * @memberof google.ads.admanager.v1.BandwidthGroup + * AppliedLabel label. + * @member {string} label + * @memberof google.ads.admanager.v1.AppliedLabel * @instance */ - BandwidthGroup.prototype.name = null; + AppliedLabel.prototype.label = ""; /** - * BandwidthGroup displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.BandwidthGroup + * AppliedLabel negated. + * @member {boolean} negated + * @memberof google.ads.admanager.v1.AppliedLabel * @instance */ - BandwidthGroup.prototype.displayName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BandwidthGroup.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BandwidthGroup.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + AppliedLabel.prototype.negated = false; /** - * Creates a new BandwidthGroup instance using the specified properties. + * Creates a new AppliedLabel instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static - * @param {google.ads.admanager.v1.IBandwidthGroup=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup instance + * @param {google.ads.admanager.v1.IAppliedLabel=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel instance */ - BandwidthGroup.create = function create(properties) { - return new BandwidthGroup(properties); + AppliedLabel.create = function create(properties) { + return new AppliedLabel(properties); }; /** - * Encodes the specified BandwidthGroup message. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. + * Encodes the specified AppliedLabel message. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static - * @param {google.ads.admanager.v1.IBandwidthGroup} message BandwidthGroup message or plain object to encode + * @param {google.ads.admanager.v1.IAppliedLabel} message AppliedLabel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BandwidthGroup.encode = function encode(message, writer) { + AppliedLabel.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.negated); return writer; }; /** - * Encodes the specified BandwidthGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. + * Encodes the specified AppliedLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AppliedLabel.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static - * @param {google.ads.admanager.v1.IBandwidthGroup} message BandwidthGroup message or plain object to encode + * @param {google.ads.admanager.v1.IAppliedLabel} message AppliedLabel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BandwidthGroup.encodeDelimited = function encodeDelimited(message, writer) { + AppliedLabel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BandwidthGroup message from the specified reader or buffer. + * Decodes an AppliedLabel message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup + * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BandwidthGroup.decode = function decode(reader, length, error) { + AppliedLabel.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BandwidthGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AppliedLabel(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.label = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.negated = reader.bool(); break; } default: @@ -8603,239 +8020,130 @@ }; /** - * Decodes a BandwidthGroup message from the specified reader or buffer, length delimited. + * Decodes an AppliedLabel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup + * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BandwidthGroup.decodeDelimited = function decodeDelimited(reader) { + AppliedLabel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BandwidthGroup message. + * Verifies an AppliedLabel message. * @function verify - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BandwidthGroup.verify = function verify(message) { + AppliedLabel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.negated != null && message.hasOwnProperty("negated")) + if (typeof message.negated !== "boolean") + return "negated: boolean expected"; return null; }; /** - * Creates a BandwidthGroup message from a plain object. Also converts values to their respective internal types. + * Creates an AppliedLabel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup + * @returns {google.ads.admanager.v1.AppliedLabel} AppliedLabel */ - BandwidthGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BandwidthGroup) + AppliedLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AppliedLabel) return object; - var message = new $root.google.ads.admanager.v1.BandwidthGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); + var message = new $root.google.ads.admanager.v1.AppliedLabel(); + if (object.label != null) + message.label = String(object.label); + if (object.negated != null) + message.negated = Boolean(object.negated); return message; }; /** - * Creates a plain object from a BandwidthGroup message. Also converts values to other types if specified. + * Creates a plain object from an AppliedLabel message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static - * @param {google.ads.admanager.v1.BandwidthGroup} message BandwidthGroup + * @param {google.ads.admanager.v1.AppliedLabel} message AppliedLabel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BandwidthGroup.toObject = function toObject(message, options) { + AppliedLabel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; + if (options.defaults) { + object.label = ""; + object.negated = false; } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.negated != null && message.hasOwnProperty("negated")) + object.negated = message.negated; return object; }; /** - * Converts this BandwidthGroup to JSON. + * Converts this AppliedLabel to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @instance * @returns {Object.} JSON object */ - BandwidthGroup.prototype.toJSON = function toJSON() { + AppliedLabel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BandwidthGroup + * Gets the default type url for AppliedLabel * @function getTypeUrl - * @memberof google.ads.admanager.v1.BandwidthGroup + * @memberof google.ads.admanager.v1.AppliedLabel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BandwidthGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AppliedLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BandwidthGroup"; - }; - - return BandwidthGroup; - })(); - - v1.BandwidthGroupService = (function() { - - /** - * Constructs a new BandwidthGroupService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a BandwidthGroupService - * @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 BandwidthGroupService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (BandwidthGroupService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BandwidthGroupService; - - /** - * Creates new BandwidthGroupService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @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 {BandwidthGroupService} RPC service. Useful where requests and/or responses are streamed. - */ - BandwidthGroupService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.ads.admanager.v1.AppliedLabel"; }; - /** - * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|getBandwidthGroup}. - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @typedef GetBandwidthGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.BandwidthGroup} [response] BandwidthGroup - */ - - /** - * Calls GetBandwidthGroup. - * @function getBandwidthGroup - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @instance - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} request GetBandwidthGroupRequest message or plain object - * @param {google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroupCallback} callback Node-style callback called with the error, if any, and BandwidthGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BandwidthGroupService.prototype.getBandwidthGroup = function getBandwidthGroup(request, callback) { - return this.rpcCall(getBandwidthGroup, $root.google.ads.admanager.v1.GetBandwidthGroupRequest, $root.google.ads.admanager.v1.BandwidthGroup, request, callback); - }, "name", { value: "GetBandwidthGroup" }); - - /** - * Calls GetBandwidthGroup. - * @function getBandwidthGroup - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @instance - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} request GetBandwidthGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|listBandwidthGroups}. - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @typedef ListBandwidthGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListBandwidthGroupsResponse} [response] ListBandwidthGroupsResponse - */ - - /** - * Calls ListBandwidthGroups. - * @function listBandwidthGroups - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @instance - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} request ListBandwidthGroupsRequest message or plain object - * @param {google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroupsCallback} callback Node-style callback called with the error, if any, and ListBandwidthGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BandwidthGroupService.prototype.listBandwidthGroups = function listBandwidthGroups(request, callback) { - return this.rpcCall(listBandwidthGroups, $root.google.ads.admanager.v1.ListBandwidthGroupsRequest, $root.google.ads.admanager.v1.ListBandwidthGroupsResponse, request, callback); - }, "name", { value: "ListBandwidthGroups" }); - - /** - * Calls ListBandwidthGroups. - * @function listBandwidthGroups - * @memberof google.ads.admanager.v1.BandwidthGroupService - * @instance - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} request ListBandwidthGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return BandwidthGroupService; + return AppliedLabel; })(); - v1.GetBandwidthGroupRequest = (function() { + v1.EnvironmentTypeEnum = (function() { /** - * Properties of a GetBandwidthGroupRequest. + * Properties of an EnvironmentTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IGetBandwidthGroupRequest - * @property {string|null} [name] GetBandwidthGroupRequest name + * @interface IEnvironmentTypeEnum */ /** - * Constructs a new GetBandwidthGroupRequest. + * Constructs a new EnvironmentTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetBandwidthGroupRequest. - * @implements IGetBandwidthGroupRequest + * @classdesc Represents an EnvironmentTypeEnum. + * @implements IEnvironmentTypeEnum * @constructor - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IEnvironmentTypeEnum=} [properties] Properties to set */ - function GetBandwidthGroupRequest(properties) { + function EnvironmentTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8843,79 +8151,65 @@ } /** - * GetBandwidthGroupRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest - * @instance - */ - GetBandwidthGroupRequest.prototype.name = ""; - - /** - * Creates a new GetBandwidthGroupRequest instance using the specified properties. + * Creates a new EnvironmentTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest instance + * @param {google.ads.admanager.v1.IEnvironmentTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum instance */ - GetBandwidthGroupRequest.create = function create(properties) { - return new GetBandwidthGroupRequest(properties); + EnvironmentTypeEnum.create = function create(properties) { + return new EnvironmentTypeEnum(properties); }; /** - * Encodes the specified GetBandwidthGroupRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. + * Encodes the specified EnvironmentTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} message GetBandwidthGroupRequest message or plain object to encode + * @param {google.ads.admanager.v1.IEnvironmentTypeEnum} message EnvironmentTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBandwidthGroupRequest.encode = function encode(message, writer) { + EnvironmentTypeEnum.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 GetBandwidthGroupRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. + * Encodes the specified EnvironmentTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EnvironmentTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static - * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} message GetBandwidthGroupRequest message or plain object to encode + * @param {google.ads.admanager.v1.IEnvironmentTypeEnum} message EnvironmentTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBandwidthGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + EnvironmentTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer. + * Decodes an EnvironmentTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest + * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBandwidthGroupRequest.decode = function decode(reader, length, error) { + EnvironmentTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetBandwidthGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.EnvironmentTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -8925,127 +8219,127 @@ }; /** - * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer, length delimited. + * Decodes an EnvironmentTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest + * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBandwidthGroupRequest.decodeDelimited = function decodeDelimited(reader) { + EnvironmentTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBandwidthGroupRequest message. + * Verifies an EnvironmentTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBandwidthGroupRequest.verify = function verify(message) { + EnvironmentTypeEnum.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 GetBandwidthGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnvironmentTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest + * @returns {google.ads.admanager.v1.EnvironmentTypeEnum} EnvironmentTypeEnum */ - GetBandwidthGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetBandwidthGroupRequest) - return object; - var message = new $root.google.ads.admanager.v1.GetBandwidthGroupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + EnvironmentTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.EnvironmentTypeEnum) + return object; + return new $root.google.ads.admanager.v1.EnvironmentTypeEnum(); }; /** - * Creates a plain object from a GetBandwidthGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from an EnvironmentTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static - * @param {google.ads.admanager.v1.GetBandwidthGroupRequest} message GetBandwidthGroupRequest + * @param {google.ads.admanager.v1.EnvironmentTypeEnum} message EnvironmentTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBandwidthGroupRequest.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; + EnvironmentTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this GetBandwidthGroupRequest to JSON. + * Converts this EnvironmentTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @instance * @returns {Object.} JSON object */ - GetBandwidthGroupRequest.prototype.toJSON = function toJSON() { + EnvironmentTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBandwidthGroupRequest + * Gets the default type url for EnvironmentTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @memberof google.ads.admanager.v1.EnvironmentTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBandwidthGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnvironmentTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetBandwidthGroupRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.EnvironmentTypeEnum"; }; - return GetBandwidthGroupRequest; + /** + * EnvironmentType enum. + * @name google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType + * @enum {number} + * @property {number} ENVIRONMENT_TYPE_UNSPECIFIED=0 ENVIRONMENT_TYPE_UNSPECIFIED value + * @property {number} BROWSER=1 BROWSER value + * @property {number} VIDEO_PLAYER=2 VIDEO_PLAYER value + */ + EnvironmentTypeEnum.EnvironmentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENVIRONMENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BROWSER"] = 1; + values[valuesById[2] = "VIDEO_PLAYER"] = 2; + return values; + })(); + + return EnvironmentTypeEnum; })(); - v1.ListBandwidthGroupsRequest = (function() { + v1.FrequencyCap = (function() { /** - * Properties of a ListBandwidthGroupsRequest. + * Properties of a FrequencyCap. * @memberof google.ads.admanager.v1 - * @interface IListBandwidthGroupsRequest - * @property {string|null} [parent] ListBandwidthGroupsRequest parent - * @property {number|null} [pageSize] ListBandwidthGroupsRequest pageSize - * @property {string|null} [pageToken] ListBandwidthGroupsRequest pageToken - * @property {string|null} [filter] ListBandwidthGroupsRequest filter - * @property {string|null} [orderBy] ListBandwidthGroupsRequest orderBy - * @property {number|null} [skip] ListBandwidthGroupsRequest skip + * @interface IFrequencyCap + * @property {number|Long|null} [maxImpressions] FrequencyCap maxImpressions + * @property {number|Long|null} [timeAmount] FrequencyCap timeAmount + * @property {google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null} [timeUnit] FrequencyCap timeUnit */ /** - * Constructs a new ListBandwidthGroupsRequest. + * Constructs a new FrequencyCap. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListBandwidthGroupsRequest. - * @implements IListBandwidthGroupsRequest + * @classdesc Represents a FrequencyCap. + * @implements IFrequencyCap * @constructor - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IFrequencyCap=} [properties] Properties to set */ - function ListBandwidthGroupsRequest(properties) { + function FrequencyCap(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9053,147 +8347,126 @@ } /** - * ListBandwidthGroupsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * FrequencyCap maxImpressions. + * @member {number|Long|null|undefined} maxImpressions + * @memberof google.ads.admanager.v1.FrequencyCap * @instance */ - ListBandwidthGroupsRequest.prototype.parent = ""; + FrequencyCap.prototype.maxImpressions = null; /** - * ListBandwidthGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * FrequencyCap timeAmount. + * @member {number|Long|null|undefined} timeAmount + * @memberof google.ads.admanager.v1.FrequencyCap * @instance */ - ListBandwidthGroupsRequest.prototype.pageSize = 0; + FrequencyCap.prototype.timeAmount = null; /** - * ListBandwidthGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * FrequencyCap timeUnit. + * @member {google.ads.admanager.v1.TimeUnitEnum.TimeUnit|null|undefined} timeUnit + * @memberof google.ads.admanager.v1.FrequencyCap * @instance */ - ListBandwidthGroupsRequest.prototype.pageToken = ""; + FrequencyCap.prototype.timeUnit = null; - /** - * ListBandwidthGroupsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest - * @instance - */ - ListBandwidthGroupsRequest.prototype.filter = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ListBandwidthGroupsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest - * @instance - */ - ListBandwidthGroupsRequest.prototype.orderBy = ""; + // Virtual OneOf for proto3 optional field + Object.defineProperty(FrequencyCap.prototype, "_maxImpressions", { + get: $util.oneOfGetter($oneOfFields = ["maxImpressions"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ListBandwidthGroupsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest - * @instance - */ - ListBandwidthGroupsRequest.prototype.skip = 0; + // Virtual OneOf for proto3 optional field + Object.defineProperty(FrequencyCap.prototype, "_timeAmount", { + get: $util.oneOfGetter($oneOfFields = ["timeAmount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FrequencyCap.prototype, "_timeUnit", { + get: $util.oneOfGetter($oneOfFields = ["timeUnit"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListBandwidthGroupsRequest instance using the specified properties. + * Creates a new FrequencyCap instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest instance + * @param {google.ads.admanager.v1.IFrequencyCap=} [properties] Properties to set + * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap instance */ - ListBandwidthGroupsRequest.create = function create(properties) { - return new ListBandwidthGroupsRequest(properties); + FrequencyCap.create = function create(properties) { + return new FrequencyCap(properties); }; /** - * Encodes the specified ListBandwidthGroupsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. + * Encodes the specified FrequencyCap message. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} message ListBandwidthGroupsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IFrequencyCap} message FrequencyCap message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBandwidthGroupsRequest.encode = function encode(message, writer) { + FrequencyCap.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.maxImpressions != null && Object.hasOwnProperty.call(message, "maxImpressions")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxImpressions); + if (message.timeAmount != null && Object.hasOwnProperty.call(message, "timeAmount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timeAmount); + if (message.timeUnit != null && Object.hasOwnProperty.call(message, "timeUnit")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.timeUnit); return writer; }; /** - * Encodes the specified ListBandwidthGroupsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. + * Encodes the specified FrequencyCap message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FrequencyCap.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} message ListBandwidthGroupsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IFrequencyCap} message FrequencyCap message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBandwidthGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + FrequencyCap.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer. + * Decodes a FrequencyCap message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest + * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBandwidthGroupsRequest.decode = function decode(reader, length, error) { + FrequencyCap.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBandwidthGroupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FrequencyCap(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.maxImpressions = reader.int64(); break; } case 2: { - message.pageSize = reader.int32(); + message.timeAmount = reader.int64(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.skip = reader.int32(); + message.timeUnit = reader.int32(); break; } default: @@ -9205,166 +8478,223 @@ }; /** - * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a FrequencyCap message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest + * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBandwidthGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + FrequencyCap.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBandwidthGroupsRequest message. + * Verifies a FrequencyCap message. * @function verify - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBandwidthGroupsRequest.verify = function verify(message) { + FrequencyCap.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + var properties = {}; + if (message.maxImpressions != null && message.hasOwnProperty("maxImpressions")) { + properties._maxImpressions = 1; + if (!$util.isInteger(message.maxImpressions) && !(message.maxImpressions && $util.isInteger(message.maxImpressions.low) && $util.isInteger(message.maxImpressions.high))) + return "maxImpressions: integer|Long expected"; + } + if (message.timeAmount != null && message.hasOwnProperty("timeAmount")) { + properties._timeAmount = 1; + if (!$util.isInteger(message.timeAmount) && !(message.timeAmount && $util.isInteger(message.timeAmount.low) && $util.isInteger(message.timeAmount.high))) + return "timeAmount: integer|Long expected"; + } + if (message.timeUnit != null && message.hasOwnProperty("timeUnit")) { + properties._timeUnit = 1; + switch (message.timeUnit) { + default: + return "timeUnit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } return null; }; /** - * Creates a ListBandwidthGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FrequencyCap message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest + * @returns {google.ads.admanager.v1.FrequencyCap} FrequencyCap */ - ListBandwidthGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListBandwidthGroupsRequest) + FrequencyCap.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.FrequencyCap) return object; - var message = new $root.google.ads.admanager.v1.ListBandwidthGroupsRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.FrequencyCap(); + if (object.maxImpressions != null) + if ($util.Long) + (message.maxImpressions = $util.Long.fromValue(object.maxImpressions)).unsigned = false; + else if (typeof object.maxImpressions === "string") + message.maxImpressions = parseInt(object.maxImpressions, 10); + else if (typeof object.maxImpressions === "number") + message.maxImpressions = object.maxImpressions; + else if (typeof object.maxImpressions === "object") + message.maxImpressions = new $util.LongBits(object.maxImpressions.low >>> 0, object.maxImpressions.high >>> 0).toNumber(); + if (object.timeAmount != null) + if ($util.Long) + (message.timeAmount = $util.Long.fromValue(object.timeAmount)).unsigned = false; + else if (typeof object.timeAmount === "string") + message.timeAmount = parseInt(object.timeAmount, 10); + else if (typeof object.timeAmount === "number") + message.timeAmount = object.timeAmount; + else if (typeof object.timeAmount === "object") + message.timeAmount = new $util.LongBits(object.timeAmount.low >>> 0, object.timeAmount.high >>> 0).toNumber(); + switch (object.timeUnit) { + default: + if (typeof object.timeUnit === "number") { + message.timeUnit = object.timeUnit; + break; + } + break; + case "TIME_UNIT_UNSPECIFIED": + case 0: + message.timeUnit = 0; + break; + case "MINUTE": + case 1: + message.timeUnit = 1; + break; + case "HOUR": + case 2: + message.timeUnit = 2; + break; + case "DAY": + case 3: + message.timeUnit = 3; + break; + case "WEEK": + case 4: + message.timeUnit = 4; + break; + case "MONTH": + case 5: + message.timeUnit = 5; + break; + case "LIFETIME": + case 6: + message.timeUnit = 6; + break; + case "POD": + case 7: + message.timeUnit = 7; + break; + case "STREAM": + case 8: + message.timeUnit = 8; + break; + } return message; }; /** - * Creates a plain object from a ListBandwidthGroupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a FrequencyCap message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static - * @param {google.ads.admanager.v1.ListBandwidthGroupsRequest} message ListBandwidthGroupsRequest + * @param {google.ads.admanager.v1.FrequencyCap} message FrequencyCap * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBandwidthGroupsRequest.toObject = function toObject(message, options) { + FrequencyCap.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.skip = 0; + if (message.maxImpressions != null && message.hasOwnProperty("maxImpressions")) { + if (typeof message.maxImpressions === "number") + object.maxImpressions = options.longs === String ? String(message.maxImpressions) : message.maxImpressions; + else + object.maxImpressions = options.longs === String ? $util.Long.prototype.toString.call(message.maxImpressions) : options.longs === Number ? new $util.LongBits(message.maxImpressions.low >>> 0, message.maxImpressions.high >>> 0).toNumber() : message.maxImpressions; + if (options.oneofs) + object._maxImpressions = "maxImpressions"; + } + if (message.timeAmount != null && message.hasOwnProperty("timeAmount")) { + if (typeof message.timeAmount === "number") + object.timeAmount = options.longs === String ? String(message.timeAmount) : message.timeAmount; + else + object.timeAmount = options.longs === String ? $util.Long.prototype.toString.call(message.timeAmount) : options.longs === Number ? new $util.LongBits(message.timeAmount.low >>> 0, message.timeAmount.high >>> 0).toNumber() : message.timeAmount; + if (options.oneofs) + object._timeAmount = "timeAmount"; + } + if (message.timeUnit != null && message.hasOwnProperty("timeUnit")) { + object.timeUnit = options.enums === String ? $root.google.ads.admanager.v1.TimeUnitEnum.TimeUnit[message.timeUnit] === undefined ? message.timeUnit : $root.google.ads.admanager.v1.TimeUnitEnum.TimeUnit[message.timeUnit] : message.timeUnit; + if (options.oneofs) + object._timeUnit = "timeUnit"; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListBandwidthGroupsRequest to JSON. + * Converts this FrequencyCap to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @instance * @returns {Object.} JSON object */ - ListBandwidthGroupsRequest.prototype.toJSON = function toJSON() { + FrequencyCap.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBandwidthGroupsRequest + * Gets the default type url for FrequencyCap * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @memberof google.ads.admanager.v1.FrequencyCap * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBandwidthGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FrequencyCap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListBandwidthGroupsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.FrequencyCap"; }; - return ListBandwidthGroupsRequest; + return FrequencyCap; })(); - v1.ListBandwidthGroupsResponse = (function() { + v1.TimeUnitEnum = (function() { /** - * Properties of a ListBandwidthGroupsResponse. + * Properties of a TimeUnitEnum. * @memberof google.ads.admanager.v1 - * @interface IListBandwidthGroupsResponse - * @property {Array.|null} [bandwidthGroups] ListBandwidthGroupsResponse bandwidthGroups - * @property {string|null} [nextPageToken] ListBandwidthGroupsResponse nextPageToken - * @property {number|null} [totalSize] ListBandwidthGroupsResponse totalSize + * @interface ITimeUnitEnum */ /** - * Constructs a new ListBandwidthGroupsResponse. + * Constructs a new TimeUnitEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListBandwidthGroupsResponse. - * @implements IListBandwidthGroupsResponse + * @classdesc Represents a TimeUnitEnum. + * @implements ITimeUnitEnum * @constructor - * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITimeUnitEnum=} [properties] Properties to set */ - function ListBandwidthGroupsResponse(properties) { - this.bandwidthGroups = []; + function TimeUnitEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9372,110 +8702,65 @@ } /** - * ListBandwidthGroupsResponse bandwidthGroups. - * @member {Array.} bandwidthGroups - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse - * @instance - */ - ListBandwidthGroupsResponse.prototype.bandwidthGroups = $util.emptyArray; - - /** - * ListBandwidthGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse - * @instance - */ - ListBandwidthGroupsResponse.prototype.nextPageToken = ""; - - /** - * ListBandwidthGroupsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse - * @instance - */ - ListBandwidthGroupsResponse.prototype.totalSize = 0; - - /** - * Creates a new ListBandwidthGroupsResponse instance using the specified properties. + * Creates a new TimeUnitEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse instance + * @param {google.ads.admanager.v1.ITimeUnitEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum instance */ - ListBandwidthGroupsResponse.create = function create(properties) { - return new ListBandwidthGroupsResponse(properties); + TimeUnitEnum.create = function create(properties) { + return new TimeUnitEnum(properties); }; /** - * Encodes the specified ListBandwidthGroupsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. + * Encodes the specified TimeUnitEnum message. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse} message ListBandwidthGroupsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ITimeUnitEnum} message TimeUnitEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBandwidthGroupsResponse.encode = function encode(message, writer) { + TimeUnitEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bandwidthGroups != null && message.bandwidthGroups.length) - for (var i = 0; i < message.bandwidthGroups.length; ++i) - $root.google.ads.admanager.v1.BandwidthGroup.encode(message.bandwidthGroups[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListBandwidthGroupsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. + * Encodes the specified TimeUnitEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TimeUnitEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static - * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse} message ListBandwidthGroupsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ITimeUnitEnum} message TimeUnitEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBandwidthGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TimeUnitEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer. + * Decodes a TimeUnitEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse + * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBandwidthGroupsResponse.decode = function decode(reader, length, error) { + TimeUnitEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBandwidthGroupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TimeUnitEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.bandwidthGroups && message.bandwidthGroups.length)) - message.bandwidthGroups = []; - message.bandwidthGroups.push($root.google.ads.admanager.v1.BandwidthGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -9485,156 +8770,139 @@ }; /** - * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a TimeUnitEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse + * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBandwidthGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + TimeUnitEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBandwidthGroupsResponse message. + * Verifies a TimeUnitEnum message. * @function verify - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBandwidthGroupsResponse.verify = function verify(message) { + TimeUnitEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bandwidthGroups != null && message.hasOwnProperty("bandwidthGroups")) { - if (!Array.isArray(message.bandwidthGroups)) - return "bandwidthGroups: array expected"; - for (var i = 0; i < message.bandwidthGroups.length; ++i) { - var error = $root.google.ads.admanager.v1.BandwidthGroup.verify(message.bandwidthGroups[i]); - if (error) - return "bandwidthGroups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListBandwidthGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TimeUnitEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse + * @returns {google.ads.admanager.v1.TimeUnitEnum} TimeUnitEnum */ - ListBandwidthGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListBandwidthGroupsResponse) + TimeUnitEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TimeUnitEnum) return object; - var message = new $root.google.ads.admanager.v1.ListBandwidthGroupsResponse(); - if (object.bandwidthGroups) { - if (!Array.isArray(object.bandwidthGroups)) - throw TypeError(".google.ads.admanager.v1.ListBandwidthGroupsResponse.bandwidthGroups: array expected"); - message.bandwidthGroups = []; - for (var i = 0; i < object.bandwidthGroups.length; ++i) { - if (typeof object.bandwidthGroups[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListBandwidthGroupsResponse.bandwidthGroups: object expected"); - message.bandwidthGroups[i] = $root.google.ads.admanager.v1.BandwidthGroup.fromObject(object.bandwidthGroups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; - return message; + return new $root.google.ads.admanager.v1.TimeUnitEnum(); }; /** - * Creates a plain object from a ListBandwidthGroupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TimeUnitEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static - * @param {google.ads.admanager.v1.ListBandwidthGroupsResponse} message ListBandwidthGroupsResponse + * @param {google.ads.admanager.v1.TimeUnitEnum} message TimeUnitEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBandwidthGroupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bandwidthGroups = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.bandwidthGroups && message.bandwidthGroups.length) { - object.bandwidthGroups = []; - for (var j = 0; j < message.bandwidthGroups.length; ++j) - object.bandwidthGroups[j] = $root.google.ads.admanager.v1.BandwidthGroup.toObject(message.bandwidthGroups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; + TimeUnitEnum.toObject = function toObject() { + return {}; }; /** - * Converts this ListBandwidthGroupsResponse to JSON. + * Converts this TimeUnitEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @instance * @returns {Object.} JSON object */ - ListBandwidthGroupsResponse.prototype.toJSON = function toJSON() { + TimeUnitEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBandwidthGroupsResponse + * Gets the default type url for TimeUnitEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @memberof google.ads.admanager.v1.TimeUnitEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBandwidthGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TimeUnitEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListBandwidthGroupsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.TimeUnitEnum"; }; - return ListBandwidthGroupsResponse; + /** + * TimeUnit enum. + * @name google.ads.admanager.v1.TimeUnitEnum.TimeUnit + * @enum {number} + * @property {number} TIME_UNIT_UNSPECIFIED=0 TIME_UNIT_UNSPECIFIED value + * @property {number} MINUTE=1 MINUTE value + * @property {number} HOUR=2 HOUR value + * @property {number} DAY=3 DAY value + * @property {number} WEEK=4 WEEK value + * @property {number} MONTH=5 MONTH value + * @property {number} LIFETIME=6 LIFETIME value + * @property {number} POD=7 POD value + * @property {number} STREAM=8 STREAM value + */ + TimeUnitEnum.TimeUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MINUTE"] = 1; + values[valuesById[2] = "HOUR"] = 2; + values[valuesById[3] = "DAY"] = 3; + values[valuesById[4] = "WEEK"] = 4; + values[valuesById[5] = "MONTH"] = 5; + values[valuesById[6] = "LIFETIME"] = 6; + values[valuesById[7] = "POD"] = 7; + values[valuesById[8] = "STREAM"] = 8; + return values; + })(); + + return TimeUnitEnum; })(); - v1.CompanyTypeEnum = (function() { + v1.Size = (function() { /** - * Properties of a CompanyTypeEnum. + * Properties of a Size. * @memberof google.ads.admanager.v1 - * @interface ICompanyTypeEnum + * @interface ISize + * @property {number|null} [width] Size width + * @property {number|null} [height] Size height + * @property {google.ads.admanager.v1.SizeTypeEnum.SizeType|null} [sizeType] Size sizeType */ /** - * Constructs a new CompanyTypeEnum. + * Constructs a new Size. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CompanyTypeEnum. - * @implements ICompanyTypeEnum + * @classdesc Represents a Size. + * @implements ISize * @constructor - * @param {google.ads.admanager.v1.ICompanyTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ISize=} [properties] Properties to set */ - function CompanyTypeEnum(properties) { + function Size(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9642,65 +8910,107 @@ } /** - * Creates a new CompanyTypeEnum instance using the specified properties. + * Size width. + * @member {number} width + * @memberof google.ads.admanager.v1.Size + * @instance + */ + Size.prototype.width = 0; + + /** + * Size height. + * @member {number} height + * @memberof google.ads.admanager.v1.Size + * @instance + */ + Size.prototype.height = 0; + + /** + * Size sizeType. + * @member {google.ads.admanager.v1.SizeTypeEnum.SizeType} sizeType + * @memberof google.ads.admanager.v1.Size + * @instance + */ + Size.prototype.sizeType = 0; + + /** + * Creates a new Size instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static - * @param {google.ads.admanager.v1.ICompanyTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum instance + * @param {google.ads.admanager.v1.ISize=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Size} Size instance */ - CompanyTypeEnum.create = function create(properties) { - return new CompanyTypeEnum(properties); + Size.create = function create(properties) { + return new Size(properties); }; /** - * Encodes the specified CompanyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. + * Encodes the specified Size message. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static - * @param {google.ads.admanager.v1.ICompanyTypeEnum} message CompanyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ISize} message Size message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompanyTypeEnum.encode = function encode(message, writer) { + Size.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.height); + if (message.sizeType != null && Object.hasOwnProperty.call(message, "sizeType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sizeType); return writer; }; /** - * Encodes the specified CompanyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. + * Encodes the specified Size message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Size.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static - * @param {google.ads.admanager.v1.ICompanyTypeEnum} message CompanyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ISize} message Size message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompanyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + Size.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompanyTypeEnum message from the specified reader or buffer. + * Decodes a Size message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum + * @returns {google.ads.admanager.v1.Size} Size * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompanyTypeEnum.decode = function decode(reader, length, error) { + Size.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CompanyTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Size(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.width = reader.int32(); + break; + } + case 2: { + message.height = reader.int32(); + break; + } + case 3: { + message.sizeType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -9710,130 +9020,187 @@ }; /** - * Decodes a CompanyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a Size message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum + * @returns {google.ads.admanager.v1.Size} Size * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompanyTypeEnum.decodeDelimited = function decodeDelimited(reader) { + Size.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompanyTypeEnum message. + * Verifies a Size message. * @function verify - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompanyTypeEnum.verify = function verify(message) { + Size.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + if (message.sizeType != null && message.hasOwnProperty("sizeType")) + switch (message.sizeType) { + default: + return "sizeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } return null; }; /** - * Creates a CompanyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a Size message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum + * @returns {google.ads.admanager.v1.Size} Size */ - CompanyTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CompanyTypeEnum) + Size.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Size) return object; - return new $root.google.ads.admanager.v1.CompanyTypeEnum(); + var message = new $root.google.ads.admanager.v1.Size(); + if (object.width != null) + message.width = object.width | 0; + if (object.height != null) + message.height = object.height | 0; + switch (object.sizeType) { + default: + if (typeof object.sizeType === "number") { + message.sizeType = object.sizeType; + break; + } + break; + case "SIZE_TYPE_UNSPECIFIED": + case 0: + message.sizeType = 0; + break; + case "PIXEL": + case 1: + message.sizeType = 1; + break; + case "ASPECT_RATIO": + case 2: + message.sizeType = 2; + break; + case "INTERSTITIAL": + case 3: + message.sizeType = 3; + break; + case "IGNORED": + case 4: + message.sizeType = 4; + break; + case "NATIVE": + case 5: + message.sizeType = 5; + break; + case "FLUID": + case 6: + message.sizeType = 6; + break; + case "AUDIO": + case 7: + message.sizeType = 7; + break; + } + return message; }; /** - * Creates a plain object from a CompanyTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a Size message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static - * @param {google.ads.admanager.v1.CompanyTypeEnum} message CompanyTypeEnum + * @param {google.ads.admanager.v1.Size} message Size * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompanyTypeEnum.toObject = function toObject() { - return {}; + Size.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.width = 0; + object.height = 0; + object.sizeType = options.enums === String ? "SIZE_TYPE_UNSPECIFIED" : 0; + } + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.sizeType != null && message.hasOwnProperty("sizeType")) + object.sizeType = options.enums === String ? $root.google.ads.admanager.v1.SizeTypeEnum.SizeType[message.sizeType] === undefined ? message.sizeType : $root.google.ads.admanager.v1.SizeTypeEnum.SizeType[message.sizeType] : message.sizeType; + return object; }; /** - * Converts this CompanyTypeEnum to JSON. + * Converts this Size to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @instance * @returns {Object.} JSON object */ - CompanyTypeEnum.prototype.toJSON = function toJSON() { + Size.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompanyTypeEnum + * Gets the default type url for Size * @function getTypeUrl - * @memberof google.ads.admanager.v1.CompanyTypeEnum + * @memberof google.ads.admanager.v1.Size * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompanyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Size.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CompanyTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.Size"; }; - /** - * CompanyType enum. - * @name google.ads.admanager.v1.CompanyTypeEnum.CompanyType - * @enum {number} - * @property {number} COMPANY_TYPE_UNSPECIFIED=0 COMPANY_TYPE_UNSPECIFIED value - * @property {number} ADVERTISER=1 ADVERTISER value - * @property {number} HOUSE_ADVERTISER=2 HOUSE_ADVERTISER value - * @property {number} AGENCY=3 AGENCY value - * @property {number} HOUSE_AGENCY=4 HOUSE_AGENCY value - * @property {number} AD_NETWORK=5 AD_NETWORK value - */ - CompanyTypeEnum.CompanyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPANY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADVERTISER"] = 1; - values[valuesById[2] = "HOUSE_ADVERTISER"] = 2; - values[valuesById[3] = "AGENCY"] = 3; - values[valuesById[4] = "HOUSE_AGENCY"] = 4; - values[valuesById[5] = "AD_NETWORK"] = 5; - return values; - })(); - - return CompanyTypeEnum; + return Size; })(); - v1.CompanyCreditStatusEnum = (function() { + v1.SizeTypeEnum = (function() { /** - * Properties of a CompanyCreditStatusEnum. + * Properties of a SizeTypeEnum. * @memberof google.ads.admanager.v1 - * @interface ICompanyCreditStatusEnum + * @interface ISizeTypeEnum */ /** - * Constructs a new CompanyCreditStatusEnum. + * Constructs a new SizeTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CompanyCreditStatusEnum. - * @implements ICompanyCreditStatusEnum + * @classdesc Represents a SizeTypeEnum. + * @implements ISizeTypeEnum * @constructor - * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ISizeTypeEnum=} [properties] Properties to set */ - function CompanyCreditStatusEnum(properties) { + function SizeTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9841,60 +9208,60 @@ } /** - * Creates a new CompanyCreditStatusEnum instance using the specified properties. + * Creates a new SizeTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static - * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum instance + * @param {google.ads.admanager.v1.ISizeTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum instance */ - CompanyCreditStatusEnum.create = function create(properties) { - return new CompanyCreditStatusEnum(properties); + SizeTypeEnum.create = function create(properties) { + return new SizeTypeEnum(properties); }; /** - * Encodes the specified CompanyCreditStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. + * Encodes the specified SizeTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static - * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum} message CompanyCreditStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.ISizeTypeEnum} message SizeTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompanyCreditStatusEnum.encode = function encode(message, writer) { + SizeTypeEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified CompanyCreditStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. + * Encodes the specified SizeTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SizeTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static - * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum} message CompanyCreditStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.ISizeTypeEnum} message SizeTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompanyCreditStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + SizeTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer. + * Decodes a SizeTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum + * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompanyCreditStatusEnum.decode = function decode(reader, length, error) { + SizeTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CompanyCreditStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SizeTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -9909,380 +9276,340 @@ }; /** - * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a SizeTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum + * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompanyCreditStatusEnum.decodeDelimited = function decodeDelimited(reader) { + SizeTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompanyCreditStatusEnum message. + * Verifies a SizeTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompanyCreditStatusEnum.verify = function verify(message) { + SizeTypeEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a CompanyCreditStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a SizeTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum + * @returns {google.ads.admanager.v1.SizeTypeEnum} SizeTypeEnum */ - CompanyCreditStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CompanyCreditStatusEnum) + SizeTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SizeTypeEnum) return object; - return new $root.google.ads.admanager.v1.CompanyCreditStatusEnum(); + return new $root.google.ads.admanager.v1.SizeTypeEnum(); }; /** - * Creates a plain object from a CompanyCreditStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a SizeTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static - * @param {google.ads.admanager.v1.CompanyCreditStatusEnum} message CompanyCreditStatusEnum + * @param {google.ads.admanager.v1.SizeTypeEnum} message SizeTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompanyCreditStatusEnum.toObject = function toObject() { + SizeTypeEnum.toObject = function toObject() { return {}; }; /** - * Converts this CompanyCreditStatusEnum to JSON. + * Converts this SizeTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @instance * @returns {Object.} JSON object */ - CompanyCreditStatusEnum.prototype.toJSON = function toJSON() { + SizeTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompanyCreditStatusEnum + * Gets the default type url for SizeTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum + * @memberof google.ads.admanager.v1.SizeTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompanyCreditStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SizeTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CompanyCreditStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.SizeTypeEnum"; }; /** - * CompanyCreditStatus enum. - * @name google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus + * SizeType enum. + * @name google.ads.admanager.v1.SizeTypeEnum.SizeType * @enum {number} - * @property {number} COMPANY_CREDIT_STATUS_UNSPECIFIED=0 COMPANY_CREDIT_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - * @property {number} ON_HOLD=3 ON_HOLD value - * @property {number} STOP=4 STOP value - * @property {number} BLOCKED=5 BLOCKED value - */ - CompanyCreditStatusEnum.CompanyCreditStatus = (function() { + * @property {number} SIZE_TYPE_UNSPECIFIED=0 SIZE_TYPE_UNSPECIFIED value + * @property {number} PIXEL=1 PIXEL value + * @property {number} ASPECT_RATIO=2 ASPECT_RATIO value + * @property {number} INTERSTITIAL=3 INTERSTITIAL value + * @property {number} IGNORED=4 IGNORED value + * @property {number} NATIVE=5 NATIVE value + * @property {number} FLUID=6 FLUID value + * @property {number} AUDIO=7 AUDIO value + */ + SizeTypeEnum.SizeType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPANY_CREDIT_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - values[valuesById[3] = "ON_HOLD"] = 3; - values[valuesById[4] = "STOP"] = 4; - values[valuesById[5] = "BLOCKED"] = 5; + values[valuesById[0] = "SIZE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PIXEL"] = 1; + values[valuesById[2] = "ASPECT_RATIO"] = 2; + values[valuesById[3] = "INTERSTITIAL"] = 3; + values[valuesById[4] = "IGNORED"] = 4; + values[valuesById[5] = "NATIVE"] = 5; + values[valuesById[6] = "FLUID"] = 6; + values[valuesById[7] = "AUDIO"] = 7; return values; })(); - return CompanyCreditStatusEnum; + return SizeTypeEnum; })(); - v1.Company = (function() { - - /** - * Properties of a Company. - * @memberof google.ads.admanager.v1 - * @interface ICompany - * @property {string|null} [name] Company name - * @property {number|Long|null} [companyId] Company companyId - * @property {string|null} [displayName] Company displayName - * @property {google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null} [type] Company type - * @property {string|null} [address] Company address - * @property {string|null} [email] Company email - * @property {string|null} [fax] Company fax - * @property {string|null} [phone] Company phone - * @property {string|null} [externalId] Company externalId - * @property {string|null} [comment] Company comment - * @property {google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null} [creditStatus] Company creditStatus - * @property {Array.|null} [appliedLabels] Company appliedLabels - * @property {string|null} [primaryContact] Company primaryContact - * @property {Array.|null} [appliedTeams] Company appliedTeams - * @property {number|Long|null} [thirdPartyCompanyId] Company thirdPartyCompanyId - * @property {google.protobuf.ITimestamp|null} [updateTime] Company updateTime - */ + v1.AdUnitService = (function() { /** - * Constructs a new Company. + * Constructs a new AdUnitService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Company. - * @implements ICompany + * @classdesc Represents an AdUnitService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.ads.admanager.v1.ICompany=} [properties] Properties to set + * @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 Company(properties) { - this.appliedLabels = []; - this.appliedTeams = []; - 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]]; + function AdUnitService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * Company name. - * @member {string} name - * @memberof google.ads.admanager.v1.Company - * @instance - */ - Company.prototype.name = ""; + (AdUnitService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AdUnitService; /** - * Company companyId. - * @member {number|Long} companyId - * @memberof google.ads.admanager.v1.Company - * @instance + * Creates new AdUnitService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.AdUnitService + * @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 {AdUnitService} RPC service. Useful where requests and/or responses are streamed. */ - Company.prototype.companyId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AdUnitService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Company displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.Company - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|getAdUnit}. + * @memberof google.ads.admanager.v1.AdUnitService + * @typedef GetAdUnitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.AdUnit} [response] AdUnit */ - Company.prototype.displayName = ""; /** - * Company type. - * @member {google.ads.admanager.v1.CompanyTypeEnum.CompanyType} type - * @memberof google.ads.admanager.v1.Company + * Calls GetAdUnit. + * @function getAdUnit + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IGetAdUnitRequest} request GetAdUnitRequest message or plain object + * @param {google.ads.admanager.v1.AdUnitService.GetAdUnitCallback} callback Node-style callback called with the error, if any, and AdUnit + * @returns {undefined} + * @variation 1 */ - Company.prototype.type = 0; + Object.defineProperty(AdUnitService.prototype.getAdUnit = function getAdUnit(request, callback) { + return this.rpcCall(getAdUnit, $root.google.ads.admanager.v1.GetAdUnitRequest, $root.google.ads.admanager.v1.AdUnit, request, callback); + }, "name", { value: "GetAdUnit" }); /** - * Company address. - * @member {string} address - * @memberof google.ads.admanager.v1.Company + * Calls GetAdUnit. + * @function getAdUnit + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IGetAdUnitRequest} request GetAdUnitRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Company.prototype.address = ""; /** - * Company email. - * @member {string} email - * @memberof google.ads.admanager.v1.Company - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnits}. + * @memberof google.ads.admanager.v1.AdUnitService + * @typedef ListAdUnitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListAdUnitsResponse} [response] ListAdUnitsResponse */ - Company.prototype.email = ""; /** - * Company fax. - * @member {string} fax - * @memberof google.ads.admanager.v1.Company + * Calls ListAdUnits. + * @function listAdUnits + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IListAdUnitsRequest} request ListAdUnitsRequest message or plain object + * @param {google.ads.admanager.v1.AdUnitService.ListAdUnitsCallback} callback Node-style callback called with the error, if any, and ListAdUnitsResponse + * @returns {undefined} + * @variation 1 */ - Company.prototype.fax = ""; + Object.defineProperty(AdUnitService.prototype.listAdUnits = function listAdUnits(request, callback) { + return this.rpcCall(listAdUnits, $root.google.ads.admanager.v1.ListAdUnitsRequest, $root.google.ads.admanager.v1.ListAdUnitsResponse, request, callback); + }, "name", { value: "ListAdUnits" }); /** - * Company phone. - * @member {string} phone - * @memberof google.ads.admanager.v1.Company + * Calls ListAdUnits. + * @function listAdUnits + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IListAdUnitsRequest} request ListAdUnitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Company.prototype.phone = ""; /** - * Company externalId. - * @member {string} externalId - * @memberof google.ads.admanager.v1.Company - * @instance + * Callback as used by {@link google.ads.admanager.v1.AdUnitService|listAdUnitSizes}. + * @memberof google.ads.admanager.v1.AdUnitService + * @typedef ListAdUnitSizesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListAdUnitSizesResponse} [response] ListAdUnitSizesResponse */ - Company.prototype.externalId = ""; /** - * Company comment. - * @member {string} comment - * @memberof google.ads.admanager.v1.Company + * Calls ListAdUnitSizes. + * @function listAdUnitSizes + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} request ListAdUnitSizesRequest message or plain object + * @param {google.ads.admanager.v1.AdUnitService.ListAdUnitSizesCallback} callback Node-style callback called with the error, if any, and ListAdUnitSizesResponse + * @returns {undefined} + * @variation 1 */ - Company.prototype.comment = ""; + Object.defineProperty(AdUnitService.prototype.listAdUnitSizes = function listAdUnitSizes(request, callback) { + return this.rpcCall(listAdUnitSizes, $root.google.ads.admanager.v1.ListAdUnitSizesRequest, $root.google.ads.admanager.v1.ListAdUnitSizesResponse, request, callback); + }, "name", { value: "ListAdUnitSizes" }); /** - * Company creditStatus. - * @member {google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus} creditStatus - * @memberof google.ads.admanager.v1.Company + * Calls ListAdUnitSizes. + * @function listAdUnitSizes + * @memberof google.ads.admanager.v1.AdUnitService * @instance + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} request ListAdUnitSizesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Company.prototype.creditStatus = 0; - /** - * Company appliedLabels. - * @member {Array.} appliedLabels - * @memberof google.ads.admanager.v1.Company - * @instance - */ - Company.prototype.appliedLabels = $util.emptyArray; + return AdUnitService; + })(); - /** - * Company primaryContact. - * @member {string|null|undefined} primaryContact - * @memberof google.ads.admanager.v1.Company - * @instance - */ - Company.prototype.primaryContact = null; + v1.GetAdUnitRequest = (function() { /** - * Company appliedTeams. - * @member {Array.} appliedTeams - * @memberof google.ads.admanager.v1.Company - * @instance + * Properties of a GetAdUnitRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetAdUnitRequest + * @property {string|null} [name] GetAdUnitRequest name */ - Company.prototype.appliedTeams = $util.emptyArray; /** - * Company thirdPartyCompanyId. - * @member {number|Long} thirdPartyCompanyId - * @memberof google.ads.admanager.v1.Company - * @instance + * Constructs a new GetAdUnitRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetAdUnitRequest. + * @implements IGetAdUnitRequest + * @constructor + * @param {google.ads.admanager.v1.IGetAdUnitRequest=} [properties] Properties to set */ - Company.prototype.thirdPartyCompanyId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + function GetAdUnitRequest(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]]; + } /** - * Company updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.Company + * GetAdUnitRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @instance */ - Company.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Company.prototype, "_primaryContact", { - get: $util.oneOfGetter($oneOfFields = ["primaryContact"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetAdUnitRequest.prototype.name = ""; /** - * Creates a new Company instance using the specified properties. + * Creates a new GetAdUnitRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static - * @param {google.ads.admanager.v1.ICompany=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Company} Company instance + * @param {google.ads.admanager.v1.IGetAdUnitRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest instance */ - Company.create = function create(properties) { - return new Company(properties); + GetAdUnitRequest.create = function create(properties) { + return new GetAdUnitRequest(properties); }; /** - * Encodes the specified Company message. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. + * Encodes the specified GetAdUnitRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static - * @param {google.ads.admanager.v1.ICompany} message Company message or plain object to encode + * @param {google.ads.admanager.v1.IGetAdUnitRequest} message GetAdUnitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Company.encode = function encode(message, writer) { + GetAdUnitRequest.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.companyId != null && Object.hasOwnProperty.call(message, "companyId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.companyId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.address); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.email); - if (message.fax != null && Object.hasOwnProperty.call(message, "fax")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.fax); - if (message.phone != null && Object.hasOwnProperty.call(message, "phone")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.phone); - if (message.externalId != null && Object.hasOwnProperty.call(message, "externalId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.externalId); - if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.comment); - if (message.creditStatus != null && Object.hasOwnProperty.call(message, "creditStatus")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.creditStatus); - if (message.appliedLabels != null && message.appliedLabels.length) - for (var i = 0; i < message.appliedLabels.length; ++i) - $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.primaryContact != null && Object.hasOwnProperty.call(message, "primaryContact")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.primaryContact); - if (message.appliedTeams != null && message.appliedTeams.length) - for (var i = 0; i < message.appliedTeams.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.appliedTeams[i]); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.thirdPartyCompanyId != null && Object.hasOwnProperty.call(message, "thirdPartyCompanyId")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.thirdPartyCompanyId); return writer; }; /** - * Encodes the specified Company message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. + * Encodes the specified GetAdUnitRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAdUnitRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static - * @param {google.ads.admanager.v1.ICompany} message Company message or plain object to encode + * @param {google.ads.admanager.v1.IGetAdUnitRequest} message GetAdUnitRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Company.encodeDelimited = function encodeDelimited(message, writer) { + GetAdUnitRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Company message from the specified reader or buffer. + * Decodes a GetAdUnitRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Company} Company + * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Company.decode = function decode(reader, length, error) { + GetAdUnitRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Company(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetAdUnitRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -10292,70 +9619,6 @@ message.name = reader.string(); break; } - case 2: { - message.companyId = reader.int64(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - case 5: { - message.address = reader.string(); - break; - } - case 6: { - message.email = reader.string(); - break; - } - case 7: { - message.fax = reader.string(); - break; - } - case 8: { - message.phone = reader.string(); - break; - } - case 9: { - message.externalId = reader.string(); - break; - } - case 10: { - message.comment = reader.string(); - break; - } - case 11: { - message.creditStatus = reader.int32(); - break; - } - case 12: { - if (!(message.appliedLabels && message.appliedLabels.length)) - message.appliedLabels = []; - message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); - break; - } - case 13: { - message.primaryContact = reader.string(); - break; - } - case 14: { - if (!(message.appliedTeams && message.appliedTeams.length)) - message.appliedTeams = []; - message.appliedTeams.push(reader.string()); - break; - } - case 16: { - message.thirdPartyCompanyId = reader.int64(); - break; - } - case 15: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -10365,569 +9628,275 @@ }; /** - * Decodes a Company message from the specified reader or buffer, length delimited. + * Decodes a GetAdUnitRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Company} Company + * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Company.decodeDelimited = function decodeDelimited(reader) { + GetAdUnitRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Company message. + * Verifies a GetAdUnitRequest message. * @function verify - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Company.verify = function verify(message) { + GetAdUnitRequest.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.companyId != null && message.hasOwnProperty("companyId")) - if (!$util.isInteger(message.companyId) && !(message.companyId && $util.isInteger(message.companyId.low) && $util.isInteger(message.companyId.high))) - return "companyId: integer|Long expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.email != null && message.hasOwnProperty("email")) - if (!$util.isString(message.email)) - return "email: string expected"; - if (message.fax != null && message.hasOwnProperty("fax")) - if (!$util.isString(message.fax)) - return "fax: string expected"; - if (message.phone != null && message.hasOwnProperty("phone")) - if (!$util.isString(message.phone)) - return "phone: string expected"; - if (message.externalId != null && message.hasOwnProperty("externalId")) - if (!$util.isString(message.externalId)) - return "externalId: string expected"; - if (message.comment != null && message.hasOwnProperty("comment")) - if (!$util.isString(message.comment)) - return "comment: string expected"; - if (message.creditStatus != null && message.hasOwnProperty("creditStatus")) - switch (message.creditStatus) { - default: - return "creditStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { - if (!Array.isArray(message.appliedLabels)) - return "appliedLabels: array expected"; - for (var i = 0; i < message.appliedLabels.length; ++i) { - var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); - if (error) - return "appliedLabels." + error; - } - } - if (message.primaryContact != null && message.hasOwnProperty("primaryContact")) { - properties._primaryContact = 1; - if (!$util.isString(message.primaryContact)) - return "primaryContact: string expected"; - } - if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { - if (!Array.isArray(message.appliedTeams)) - return "appliedTeams: array expected"; - for (var i = 0; i < message.appliedTeams.length; ++i) - if (!$util.isString(message.appliedTeams[i])) - return "appliedTeams: string[] expected"; - } - if (message.thirdPartyCompanyId != null && message.hasOwnProperty("thirdPartyCompanyId")) - if (!$util.isInteger(message.thirdPartyCompanyId) && !(message.thirdPartyCompanyId && $util.isInteger(message.thirdPartyCompanyId.low) && $util.isInteger(message.thirdPartyCompanyId.high))) - return "thirdPartyCompanyId: integer|Long expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } return null; }; /** - * Creates a Company message from a plain object. Also converts values to their respective internal types. + * Creates a GetAdUnitRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Company} Company + * @returns {google.ads.admanager.v1.GetAdUnitRequest} GetAdUnitRequest */ - Company.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Company) + GetAdUnitRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetAdUnitRequest) return object; - var message = new $root.google.ads.admanager.v1.Company(); + var message = new $root.google.ads.admanager.v1.GetAdUnitRequest(); if (object.name != null) message.name = String(object.name); - if (object.companyId != null) - if ($util.Long) - (message.companyId = $util.Long.fromValue(object.companyId)).unsigned = false; - else if (typeof object.companyId === "string") - message.companyId = parseInt(object.companyId, 10); - else if (typeof object.companyId === "number") - message.companyId = object.companyId; - else if (typeof object.companyId === "object") - message.companyId = new $util.LongBits(object.companyId.low >>> 0, object.companyId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "COMPANY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ADVERTISER": - case 1: - message.type = 1; - break; - case "HOUSE_ADVERTISER": - case 2: - message.type = 2; - break; - case "AGENCY": - case 3: - message.type = 3; - break; - case "HOUSE_AGENCY": - case 4: - message.type = 4; - break; - case "AD_NETWORK": - case 5: - message.type = 5; - break; - } - if (object.address != null) - message.address = String(object.address); - if (object.email != null) - message.email = String(object.email); - if (object.fax != null) - message.fax = String(object.fax); - if (object.phone != null) - message.phone = String(object.phone); - if (object.externalId != null) - message.externalId = String(object.externalId); - if (object.comment != null) - message.comment = String(object.comment); - switch (object.creditStatus) { - default: - if (typeof object.creditStatus === "number") { - message.creditStatus = object.creditStatus; - break; - } - break; - case "COMPANY_CREDIT_STATUS_UNSPECIFIED": - case 0: - message.creditStatus = 0; - break; - case "ACTIVE": - case 1: - message.creditStatus = 1; - break; - case "INACTIVE": - case 2: - message.creditStatus = 2; - break; - case "ON_HOLD": - case 3: - message.creditStatus = 3; - break; - case "STOP": - case 4: - message.creditStatus = 4; - break; - case "BLOCKED": - case 5: - message.creditStatus = 5; - break; - } - if (object.appliedLabels) { - if (!Array.isArray(object.appliedLabels)) - throw TypeError(".google.ads.admanager.v1.Company.appliedLabels: array expected"); - message.appliedLabels = []; - for (var i = 0; i < object.appliedLabels.length; ++i) { - if (typeof object.appliedLabels[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Company.appliedLabels: object expected"); - message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); - } - } - if (object.primaryContact != null) - message.primaryContact = String(object.primaryContact); - if (object.appliedTeams) { - if (!Array.isArray(object.appliedTeams)) - throw TypeError(".google.ads.admanager.v1.Company.appliedTeams: array expected"); - message.appliedTeams = []; - for (var i = 0; i < object.appliedTeams.length; ++i) - message.appliedTeams[i] = String(object.appliedTeams[i]); - } - if (object.thirdPartyCompanyId != null) - if ($util.Long) - (message.thirdPartyCompanyId = $util.Long.fromValue(object.thirdPartyCompanyId)).unsigned = false; - else if (typeof object.thirdPartyCompanyId === "string") - message.thirdPartyCompanyId = parseInt(object.thirdPartyCompanyId, 10); - else if (typeof object.thirdPartyCompanyId === "number") - message.thirdPartyCompanyId = object.thirdPartyCompanyId; - else if (typeof object.thirdPartyCompanyId === "object") - message.thirdPartyCompanyId = new $util.LongBits(object.thirdPartyCompanyId.low >>> 0, object.thirdPartyCompanyId.high >>> 0).toNumber(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.Company.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } return message; }; /** - * Creates a plain object from a Company message. Also converts values to other types if specified. + * Creates a plain object from a GetAdUnitRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static - * @param {google.ads.admanager.v1.Company} message Company + * @param {google.ads.admanager.v1.GetAdUnitRequest} message GetAdUnitRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Company.toObject = function toObject(message, options) { + GetAdUnitRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.appliedLabels = []; - object.appliedTeams = []; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.companyId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.companyId = options.longs === String ? "0" : 0; - object.displayName = ""; - object.type = options.enums === String ? "COMPANY_TYPE_UNSPECIFIED" : 0; - object.address = ""; - object.email = ""; - object.fax = ""; - object.phone = ""; - object.externalId = ""; - object.comment = ""; - object.creditStatus = options.enums === String ? "COMPANY_CREDIT_STATUS_UNSPECIFIED" : 0; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.thirdPartyCompanyId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.thirdPartyCompanyId = options.longs === String ? "0" : 0; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.companyId != null && message.hasOwnProperty("companyId")) - if (typeof message.companyId === "number") - object.companyId = options.longs === String ? String(message.companyId) : message.companyId; - else - object.companyId = options.longs === String ? $util.Long.prototype.toString.call(message.companyId) : options.longs === Number ? new $util.LongBits(message.companyId.low >>> 0, message.companyId.high >>> 0).toNumber() : message.companyId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.ads.admanager.v1.CompanyTypeEnum.CompanyType[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.CompanyTypeEnum.CompanyType[message.type] : message.type; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.email != null && message.hasOwnProperty("email")) - object.email = message.email; - if (message.fax != null && message.hasOwnProperty("fax")) - object.fax = message.fax; - if (message.phone != null && message.hasOwnProperty("phone")) - object.phone = message.phone; - if (message.externalId != null && message.hasOwnProperty("externalId")) - object.externalId = message.externalId; - if (message.comment != null && message.hasOwnProperty("comment")) - object.comment = message.comment; - if (message.creditStatus != null && message.hasOwnProperty("creditStatus")) - object.creditStatus = options.enums === String ? $root.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus[message.creditStatus] === undefined ? message.creditStatus : $root.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus[message.creditStatus] : message.creditStatus; - if (message.appliedLabels && message.appliedLabels.length) { - object.appliedLabels = []; - for (var j = 0; j < message.appliedLabels.length; ++j) - object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); - } - if (message.primaryContact != null && message.hasOwnProperty("primaryContact")) { - object.primaryContact = message.primaryContact; - if (options.oneofs) - object._primaryContact = "primaryContact"; - } - if (message.appliedTeams && message.appliedTeams.length) { - object.appliedTeams = []; - for (var j = 0; j < message.appliedTeams.length; ++j) - object.appliedTeams[j] = message.appliedTeams[j]; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.thirdPartyCompanyId != null && message.hasOwnProperty("thirdPartyCompanyId")) - if (typeof message.thirdPartyCompanyId === "number") - object.thirdPartyCompanyId = options.longs === String ? String(message.thirdPartyCompanyId) : message.thirdPartyCompanyId; - else - object.thirdPartyCompanyId = options.longs === String ? $util.Long.prototype.toString.call(message.thirdPartyCompanyId) : options.longs === Number ? new $util.LongBits(message.thirdPartyCompanyId.low >>> 0, message.thirdPartyCompanyId.high >>> 0).toNumber() : message.thirdPartyCompanyId; return object; }; /** - * Converts this Company to JSON. + * Converts this GetAdUnitRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @instance * @returns {Object.} JSON object */ - Company.prototype.toJSON = function toJSON() { + GetAdUnitRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Company + * Gets the default type url for GetAdUnitRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.Company + * @memberof google.ads.admanager.v1.GetAdUnitRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Company.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAdUnitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Company"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetAdUnitRequest"; }; - return Company; + return GetAdUnitRequest; })(); - v1.CompanyService = (function() { + v1.ListAdUnitsRequest = (function() { /** - * Constructs a new CompanyService service. + * Properties of a ListAdUnitsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CompanyService - * @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 CompanyService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CompanyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompanyService; - - /** - * Creates new CompanyService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.CompanyService - * @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 {CompanyService} RPC service. Useful where requests and/or responses are streamed. + * @interface IListAdUnitsRequest + * @property {string|null} [parent] ListAdUnitsRequest parent + * @property {number|null} [pageSize] ListAdUnitsRequest pageSize + * @property {string|null} [pageToken] ListAdUnitsRequest pageToken + * @property {string|null} [filter] ListAdUnitsRequest filter + * @property {string|null} [orderBy] ListAdUnitsRequest orderBy + * @property {number|null} [skip] ListAdUnitsRequest skip */ - CompanyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.ads.admanager.v1.CompanyService|getCompany}. - * @memberof google.ads.admanager.v1.CompanyService - * @typedef GetCompanyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Company} [response] Company + * Constructs a new ListAdUnitsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListAdUnitsRequest. + * @implements IListAdUnitsRequest + * @constructor + * @param {google.ads.admanager.v1.IListAdUnitsRequest=} [properties] Properties to set */ + function ListAdUnitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetCompany. - * @function getCompany - * @memberof google.ads.admanager.v1.CompanyService + * ListAdUnitsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance - * @param {google.ads.admanager.v1.IGetCompanyRequest} request GetCompanyRequest message or plain object - * @param {google.ads.admanager.v1.CompanyService.GetCompanyCallback} callback Node-style callback called with the error, if any, and Company - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CompanyService.prototype.getCompany = function getCompany(request, callback) { - return this.rpcCall(getCompany, $root.google.ads.admanager.v1.GetCompanyRequest, $root.google.ads.admanager.v1.Company, request, callback); - }, "name", { value: "GetCompany" }); + ListAdUnitsRequest.prototype.parent = ""; /** - * Calls GetCompany. - * @function getCompany - * @memberof google.ads.admanager.v1.CompanyService + * ListAdUnitsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance - * @param {google.ads.admanager.v1.IGetCompanyRequest} request GetCompanyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.CompanyService|listCompanies}. - * @memberof google.ads.admanager.v1.CompanyService - * @typedef ListCompaniesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListCompaniesResponse} [response] ListCompaniesResponse */ + ListAdUnitsRequest.prototype.pageSize = 0; /** - * Calls ListCompanies. - * @function listCompanies - * @memberof google.ads.admanager.v1.CompanyService + * ListAdUnitsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance - * @param {google.ads.admanager.v1.IListCompaniesRequest} request ListCompaniesRequest message or plain object - * @param {google.ads.admanager.v1.CompanyService.ListCompaniesCallback} callback Node-style callback called with the error, if any, and ListCompaniesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CompanyService.prototype.listCompanies = function listCompanies(request, callback) { - return this.rpcCall(listCompanies, $root.google.ads.admanager.v1.ListCompaniesRequest, $root.google.ads.admanager.v1.ListCompaniesResponse, request, callback); - }, "name", { value: "ListCompanies" }); + ListAdUnitsRequest.prototype.pageToken = ""; /** - * Calls ListCompanies. - * @function listCompanies - * @memberof google.ads.admanager.v1.CompanyService + * ListAdUnitsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance - * @param {google.ads.admanager.v1.IListCompaniesRequest} request ListCompaniesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CompanyService; - })(); - - v1.GetCompanyRequest = (function() { - - /** - * Properties of a GetCompanyRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetCompanyRequest - * @property {string|null} [name] GetCompanyRequest name */ + ListAdUnitsRequest.prototype.filter = ""; /** - * Constructs a new GetCompanyRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetCompanyRequest. - * @implements IGetCompanyRequest - * @constructor - * @param {google.ads.admanager.v1.IGetCompanyRequest=} [properties] Properties to set + * ListAdUnitsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListAdUnitsRequest + * @instance */ - function GetCompanyRequest(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]]; - } + ListAdUnitsRequest.prototype.orderBy = ""; /** - * GetCompanyRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetCompanyRequest + * ListAdUnitsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance */ - GetCompanyRequest.prototype.name = ""; + ListAdUnitsRequest.prototype.skip = 0; /** - * Creates a new GetCompanyRequest instance using the specified properties. + * Creates a new ListAdUnitsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static - * @param {google.ads.admanager.v1.IGetCompanyRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest instance + * @param {google.ads.admanager.v1.IListAdUnitsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest instance */ - GetCompanyRequest.create = function create(properties) { - return new GetCompanyRequest(properties); + ListAdUnitsRequest.create = function create(properties) { + return new ListAdUnitsRequest(properties); }; /** - * Encodes the specified GetCompanyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. + * Encodes the specified ListAdUnitsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static - * @param {google.ads.admanager.v1.IGetCompanyRequest} message GetCompanyRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitsRequest} message ListAdUnitsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCompanyRequest.encode = function encode(message, writer) { + ListAdUnitsRequest.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); + if (message.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified GetCompanyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. + * Encodes the specified ListAdUnitsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static - * @param {google.ads.admanager.v1.IGetCompanyRequest} message GetCompanyRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitsRequest} message ListAdUnitsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCompanyRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAdUnitsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCompanyRequest message from the specified reader or buffer. + * Decodes a ListAdUnitsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest + * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCompanyRequest.decode = function decode(reader, length, error) { + ListAdUnitsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCompanyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -10939,127 +9908,166 @@ }; /** - * Decodes a GetCompanyRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest + * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCompanyRequest.decodeDelimited = function decodeDelimited(reader) { + ListAdUnitsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCompanyRequest message. + * Verifies a ListAdUnitsRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCompanyRequest.verify = function verify(message) { + ListAdUnitsRequest.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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a GetCompanyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest + * @returns {google.ads.admanager.v1.ListAdUnitsRequest} ListAdUnitsRequest */ - GetCompanyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetCompanyRequest) + ListAdUnitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAdUnitsRequest) return object; - var message = new $root.google.ads.admanager.v1.GetCompanyRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.ListAdUnitsRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a GetCompanyRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAdUnitsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static - * @param {google.ads.admanager.v1.GetCompanyRequest} message GetCompanyRequest + * @param {google.ads.admanager.v1.ListAdUnitsRequest} message ListAdUnitsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCompanyRequest.toObject = function toObject(message, options) { + ListAdUnitsRequest.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 = ""; + object.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this GetCompanyRequest to JSON. + * Converts this ListAdUnitsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @instance * @returns {Object.} JSON object */ - GetCompanyRequest.prototype.toJSON = function toJSON() { + ListAdUnitsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCompanyRequest + * Gets the default type url for ListAdUnitsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetCompanyRequest + * @memberof google.ads.admanager.v1.ListAdUnitsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCompanyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAdUnitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetCompanyRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitsRequest"; }; - return GetCompanyRequest; + return ListAdUnitsRequest; })(); - v1.ListCompaniesRequest = (function() { + v1.ListAdUnitsResponse = (function() { /** - * Properties of a ListCompaniesRequest. + * Properties of a ListAdUnitsResponse. * @memberof google.ads.admanager.v1 - * @interface IListCompaniesRequest - * @property {string|null} [parent] ListCompaniesRequest parent - * @property {number|null} [pageSize] ListCompaniesRequest pageSize - * @property {string|null} [pageToken] ListCompaniesRequest pageToken - * @property {string|null} [filter] ListCompaniesRequest filter - * @property {string|null} [orderBy] ListCompaniesRequest orderBy - * @property {number|null} [skip] ListCompaniesRequest skip + * @interface IListAdUnitsResponse + * @property {Array.|null} [adUnits] ListAdUnitsResponse adUnits + * @property {string|null} [nextPageToken] ListAdUnitsResponse nextPageToken + * @property {number|null} [totalSize] ListAdUnitsResponse totalSize */ /** - * Constructs a new ListCompaniesRequest. + * Constructs a new ListAdUnitsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCompaniesRequest. - * @implements IListCompaniesRequest + * @classdesc Represents a ListAdUnitsResponse. + * @implements IListAdUnitsResponse * @constructor - * @param {google.ads.admanager.v1.IListCompaniesRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListAdUnitsResponse=} [properties] Properties to set */ - function ListCompaniesRequest(properties) { + function ListAdUnitsResponse(properties) { + this.adUnits = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11067,75 +10075,351 @@ } /** - * ListCompaniesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * ListAdUnitsResponse adUnits. + * @member {Array.} adUnits + * @memberof google.ads.admanager.v1.ListAdUnitsResponse * @instance */ - ListCompaniesRequest.prototype.parent = ""; + ListAdUnitsResponse.prototype.adUnits = $util.emptyArray; /** - * ListCompaniesRequest pageSize. + * ListAdUnitsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @instance + */ + ListAdUnitsResponse.prototype.nextPageToken = ""; + + /** + * ListAdUnitsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @instance + */ + ListAdUnitsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListAdUnitsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {google.ads.admanager.v1.IListAdUnitsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse instance + */ + ListAdUnitsResponse.create = function create(properties) { + return new ListAdUnitsResponse(properties); + }; + + /** + * Encodes the specified ListAdUnitsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {google.ads.admanager.v1.IListAdUnitsResponse} message ListAdUnitsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdUnitsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adUnits != null && message.adUnits.length) + for (var i = 0; i < message.adUnits.length; ++i) + $root.google.ads.admanager.v1.AdUnit.encode(message.adUnits[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListAdUnitsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {google.ads.admanager.v1.IListAdUnitsResponse} message ListAdUnitsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdUnitsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAdUnitsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdUnitsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.adUnits && message.adUnits.length)) + message.adUnits = []; + message.adUnits.push($root.google.ads.admanager.v1.AdUnit.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAdUnitsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdUnitsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAdUnitsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAdUnitsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adUnits != null && message.hasOwnProperty("adUnits")) { + if (!Array.isArray(message.adUnits)) + return "adUnits: array expected"; + for (var i = 0; i < message.adUnits.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnit.verify(message.adUnits[i]); + if (error) + return "adUnits." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListAdUnitsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListAdUnitsResponse} ListAdUnitsResponse + */ + ListAdUnitsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAdUnitsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListAdUnitsResponse(); + if (object.adUnits) { + if (!Array.isArray(object.adUnits)) + throw TypeError(".google.ads.admanager.v1.ListAdUnitsResponse.adUnits: array expected"); + message.adUnits = []; + for (var i = 0; i < object.adUnits.length; ++i) { + if (typeof object.adUnits[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListAdUnitsResponse.adUnits: object expected"); + message.adUnits[i] = $root.google.ads.admanager.v1.AdUnit.fromObject(object.adUnits[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListAdUnitsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {google.ads.admanager.v1.ListAdUnitsResponse} message ListAdUnitsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAdUnitsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adUnits = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.adUnits && message.adUnits.length) { + object.adUnits = []; + for (var j = 0; j < message.adUnits.length; ++j) + object.adUnits[j] = $root.google.ads.admanager.v1.AdUnit.toObject(message.adUnits[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListAdUnitsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAdUnitsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAdUnitsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListAdUnitsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAdUnitsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitsResponse"; + }; + + return ListAdUnitsResponse; + })(); + + v1.ListAdUnitSizesRequest = (function() { + + /** + * Properties of a ListAdUnitSizesRequest. + * @memberof google.ads.admanager.v1 + * @interface IListAdUnitSizesRequest + * @property {string|null} [parent] ListAdUnitSizesRequest parent + * @property {number|null} [pageSize] ListAdUnitSizesRequest pageSize + * @property {string|null} [pageToken] ListAdUnitSizesRequest pageToken + * @property {string|null} [filter] ListAdUnitSizesRequest filter + * @property {string|null} [orderBy] ListAdUnitSizesRequest orderBy + * @property {number|null} [skip] ListAdUnitSizesRequest skip + */ + + /** + * Constructs a new ListAdUnitSizesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListAdUnitSizesRequest. + * @implements IListAdUnitSizesRequest + * @constructor + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest=} [properties] Properties to set + */ + function ListAdUnitSizesRequest(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]]; + } + + /** + * ListAdUnitSizesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest + * @instance + */ + ListAdUnitSizesRequest.prototype.parent = ""; + + /** + * ListAdUnitSizesRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance */ - ListCompaniesRequest.prototype.pageSize = 0; + ListAdUnitSizesRequest.prototype.pageSize = 0; /** - * ListCompaniesRequest pageToken. + * ListAdUnitSizesRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance */ - ListCompaniesRequest.prototype.pageToken = ""; + ListAdUnitSizesRequest.prototype.pageToken = ""; /** - * ListCompaniesRequest filter. + * ListAdUnitSizesRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance */ - ListCompaniesRequest.prototype.filter = ""; + ListAdUnitSizesRequest.prototype.filter = ""; /** - * ListCompaniesRequest orderBy. + * ListAdUnitSizesRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance */ - ListCompaniesRequest.prototype.orderBy = ""; + ListAdUnitSizesRequest.prototype.orderBy = ""; /** - * ListCompaniesRequest skip. + * ListAdUnitSizesRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance */ - ListCompaniesRequest.prototype.skip = 0; + ListAdUnitSizesRequest.prototype.skip = 0; /** - * Creates a new ListCompaniesRequest instance using the specified properties. + * Creates a new ListAdUnitSizesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static - * @param {google.ads.admanager.v1.IListCompaniesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest instance + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest instance */ - ListCompaniesRequest.create = function create(properties) { - return new ListCompaniesRequest(properties); + ListAdUnitSizesRequest.create = function create(properties) { + return new ListAdUnitSizesRequest(properties); }; /** - * Encodes the specified ListCompaniesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. + * Encodes the specified ListAdUnitSizesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static - * @param {google.ads.admanager.v1.IListCompaniesRequest} message ListCompaniesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} message ListAdUnitSizesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCompaniesRequest.encode = function encode(message, writer) { + ListAdUnitSizesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -11154,33 +10438,33 @@ }; /** - * Encodes the specified ListCompaniesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. + * Encodes the specified ListAdUnitSizesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static - * @param {google.ads.admanager.v1.IListCompaniesRequest} message ListCompaniesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitSizesRequest} message ListAdUnitSizesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCompaniesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAdUnitSizesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCompaniesRequest message from the specified reader or buffer. + * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest + * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCompaniesRequest.decode = function decode(reader, length, error) { + ListAdUnitSizesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCompaniesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitSizesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -11219,30 +10503,30 @@ }; /** - * Decodes a ListCompaniesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitSizesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest + * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCompaniesRequest.decodeDelimited = function decodeDelimited(reader) { + ListAdUnitSizesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCompaniesRequest message. + * Verifies a ListAdUnitSizesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCompaniesRequest.verify = function verify(message) { + ListAdUnitSizesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -11267,17 +10551,17 @@ }; /** - * Creates a ListCompaniesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitSizesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest + * @returns {google.ads.admanager.v1.ListAdUnitSizesRequest} ListAdUnitSizesRequest */ - ListCompaniesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCompaniesRequest) + ListAdUnitSizesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAdUnitSizesRequest) return object; - var message = new $root.google.ads.admanager.v1.ListCompaniesRequest(); + var message = new $root.google.ads.admanager.v1.ListAdUnitSizesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -11294,15 +10578,15 @@ }; /** - * Creates a plain object from a ListCompaniesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAdUnitSizesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static - * @param {google.ads.admanager.v1.ListCompaniesRequest} message ListCompaniesRequest + * @param {google.ads.admanager.v1.ListAdUnitSizesRequest} message ListAdUnitSizesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCompaniesRequest.toObject = function toObject(message, options) { + ListAdUnitSizesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -11330,55 +10614,55 @@ }; /** - * Converts this ListCompaniesRequest to JSON. + * Converts this ListAdUnitSizesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @instance * @returns {Object.} JSON object */ - ListCompaniesRequest.prototype.toJSON = function toJSON() { + ListAdUnitSizesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCompaniesRequest + * Gets the default type url for ListAdUnitSizesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @memberof google.ads.admanager.v1.ListAdUnitSizesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCompaniesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAdUnitSizesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCompaniesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitSizesRequest"; }; - return ListCompaniesRequest; + return ListAdUnitSizesRequest; })(); - v1.ListCompaniesResponse = (function() { + v1.ListAdUnitSizesResponse = (function() { /** - * Properties of a ListCompaniesResponse. + * Properties of a ListAdUnitSizesResponse. * @memberof google.ads.admanager.v1 - * @interface IListCompaniesResponse - * @property {Array.|null} [companies] ListCompaniesResponse companies - * @property {string|null} [nextPageToken] ListCompaniesResponse nextPageToken - * @property {number|null} [totalSize] ListCompaniesResponse totalSize + * @interface IListAdUnitSizesResponse + * @property {Array.|null} [adUnitSizes] ListAdUnitSizesResponse adUnitSizes + * @property {string|null} [nextPageToken] ListAdUnitSizesResponse nextPageToken + * @property {number|null} [totalSize] ListAdUnitSizesResponse totalSize */ /** - * Constructs a new ListCompaniesResponse. + * Constructs a new ListAdUnitSizesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCompaniesResponse. - * @implements IListCompaniesResponse + * @classdesc Represents a ListAdUnitSizesResponse. + * @implements IListAdUnitSizesResponse * @constructor - * @param {google.ads.admanager.v1.IListCompaniesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListAdUnitSizesResponse=} [properties] Properties to set */ - function ListCompaniesResponse(properties) { - this.companies = []; + function ListAdUnitSizesResponse(properties) { + this.adUnitSizes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11386,56 +10670,56 @@ } /** - * ListCompaniesResponse companies. - * @member {Array.} companies - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * ListAdUnitSizesResponse adUnitSizes. + * @member {Array.} adUnitSizes + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @instance */ - ListCompaniesResponse.prototype.companies = $util.emptyArray; + ListAdUnitSizesResponse.prototype.adUnitSizes = $util.emptyArray; /** - * ListCompaniesResponse nextPageToken. + * ListAdUnitSizesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @instance */ - ListCompaniesResponse.prototype.nextPageToken = ""; + ListAdUnitSizesResponse.prototype.nextPageToken = ""; /** - * ListCompaniesResponse totalSize. + * ListAdUnitSizesResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @instance */ - ListCompaniesResponse.prototype.totalSize = 0; + ListAdUnitSizesResponse.prototype.totalSize = 0; /** - * Creates a new ListCompaniesResponse instance using the specified properties. + * Creates a new ListAdUnitSizesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static - * @param {google.ads.admanager.v1.IListCompaniesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse instance + * @param {google.ads.admanager.v1.IListAdUnitSizesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse instance */ - ListCompaniesResponse.create = function create(properties) { - return new ListCompaniesResponse(properties); + ListAdUnitSizesResponse.create = function create(properties) { + return new ListAdUnitSizesResponse(properties); }; /** - * Encodes the specified ListCompaniesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. + * Encodes the specified ListAdUnitSizesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static - * @param {google.ads.admanager.v1.IListCompaniesResponse} message ListCompaniesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitSizesResponse} message ListAdUnitSizesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCompaniesResponse.encode = function encode(message, writer) { + ListAdUnitSizesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.companies != null && message.companies.length) - for (var i = 0; i < message.companies.length; ++i) - $root.google.ads.admanager.v1.Company.encode(message.companies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.adUnitSizes != null && message.adUnitSizes.length) + for (var i = 0; i < message.adUnitSizes.length; ++i) + $root.google.ads.admanager.v1.AdUnitSize.encode(message.adUnitSizes[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -11444,42 +10728,42 @@ }; /** - * Encodes the specified ListCompaniesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. + * Encodes the specified ListAdUnitSizesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAdUnitSizesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static - * @param {google.ads.admanager.v1.IListCompaniesResponse} message ListCompaniesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListAdUnitSizesResponse} message ListAdUnitSizesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCompaniesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAdUnitSizesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCompaniesResponse message from the specified reader or buffer. + * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse + * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCompaniesResponse.decode = function decode(reader, length, error) { + ListAdUnitSizesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCompaniesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAdUnitSizesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.companies && message.companies.length)) - message.companies = []; - message.companies.push($root.google.ads.admanager.v1.Company.decode(reader, reader.uint32())); + if (!(message.adUnitSizes && message.adUnitSizes.length)) + message.adUnitSizes = []; + message.adUnitSizes.push($root.google.ads.admanager.v1.AdUnitSize.decode(reader, reader.uint32())); break; } case 2: { @@ -11499,41 +10783,41 @@ }; /** - * Decodes a ListCompaniesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAdUnitSizesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse + * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCompaniesResponse.decodeDelimited = function decodeDelimited(reader) { + ListAdUnitSizesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCompaniesResponse message. + * Verifies a ListAdUnitSizesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCompaniesResponse.verify = function verify(message) { + ListAdUnitSizesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.companies != null && message.hasOwnProperty("companies")) { - if (!Array.isArray(message.companies)) - return "companies: array expected"; - for (var i = 0; i < message.companies.length; ++i) { - var error = $root.google.ads.admanager.v1.Company.verify(message.companies[i]); - if (error) - return "companies." + error; - } - } + if (message.adUnitSizes != null && message.hasOwnProperty("adUnitSizes")) { + if (!Array.isArray(message.adUnitSizes)) + return "adUnitSizes: array expected"; + for (var i = 0; i < message.adUnitSizes.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnitSize.verify(message.adUnitSizes[i]); + if (error) + return "adUnitSizes." + error; + } + } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; @@ -11544,25 +10828,25 @@ }; /** - * Creates a ListCompaniesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAdUnitSizesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse + * @returns {google.ads.admanager.v1.ListAdUnitSizesResponse} ListAdUnitSizesResponse */ - ListCompaniesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCompaniesResponse) + ListAdUnitSizesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAdUnitSizesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListCompaniesResponse(); - if (object.companies) { - if (!Array.isArray(object.companies)) - throw TypeError(".google.ads.admanager.v1.ListCompaniesResponse.companies: array expected"); - message.companies = []; - for (var i = 0; i < object.companies.length; ++i) { - if (typeof object.companies[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListCompaniesResponse.companies: object expected"); - message.companies[i] = $root.google.ads.admanager.v1.Company.fromObject(object.companies[i]); + var message = new $root.google.ads.admanager.v1.ListAdUnitSizesResponse(); + if (object.adUnitSizes) { + if (!Array.isArray(object.adUnitSizes)) + throw TypeError(".google.ads.admanager.v1.ListAdUnitSizesResponse.adUnitSizes: array expected"); + message.adUnitSizes = []; + for (var i = 0; i < object.adUnitSizes.length; ++i) { + if (typeof object.adUnitSizes[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListAdUnitSizesResponse.adUnitSizes: object expected"); + message.adUnitSizes[i] = $root.google.ads.admanager.v1.AdUnitSize.fromObject(object.adUnitSizes[i]); } } if (object.nextPageToken != null) @@ -11573,28 +10857,28 @@ }; /** - * Creates a plain object from a ListCompaniesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAdUnitSizesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static - * @param {google.ads.admanager.v1.ListCompaniesResponse} message ListCompaniesResponse + * @param {google.ads.admanager.v1.ListAdUnitSizesResponse} message ListAdUnitSizesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCompaniesResponse.toObject = function toObject(message, options) { + ListAdUnitSizesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.companies = []; + object.adUnitSizes = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.companies && message.companies.length) { - object.companies = []; - for (var j = 0; j < message.companies.length; ++j) - object.companies[j] = $root.google.ads.admanager.v1.Company.toObject(message.companies[j], options); + if (message.adUnitSizes && message.adUnitSizes.length) { + object.adUnitSizes = []; + for (var j = 0; j < message.adUnitSizes.length; ++j) + object.adUnitSizes[j] = $root.google.ads.admanager.v1.AdUnitSize.toObject(message.adUnitSizes[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -11604,53 +10888,58 @@ }; /** - * Converts this ListCompaniesResponse to JSON. + * Converts this ListAdUnitSizesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @instance * @returns {Object.} JSON object */ - ListCompaniesResponse.prototype.toJSON = function toJSON() { + ListAdUnitSizesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCompaniesResponse + * Gets the default type url for ListAdUnitSizesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @memberof google.ads.admanager.v1.ListAdUnitSizesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCompaniesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAdUnitSizesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCompaniesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListAdUnitSizesResponse"; }; - return ListCompaniesResponse; + return ListAdUnitSizesResponse; })(); - v1.Contact = (function() { + v1.AdManagerError = (function() { /** - * Properties of a Contact. + * Properties of an AdManagerError. * @memberof google.ads.admanager.v1 - * @interface IContact - * @property {string|null} [name] Contact name - * @property {string|null} [companyDisplayName] Contact companyDisplayName + * @interface IAdManagerError + * @property {string|null} [errorCode] AdManagerError errorCode + * @property {string|null} [message] AdManagerError message + * @property {string|null} [fieldPath] AdManagerError fieldPath + * @property {string|null} [trigger] AdManagerError trigger + * @property {string|null} [stackTrace] AdManagerError stackTrace + * @property {Array.|null} [details] AdManagerError details */ /** - * Constructs a new Contact. + * Constructs a new AdManagerError. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Contact. - * @implements IContact + * @classdesc Represents an AdManagerError. + * @implements IAdManagerError * @constructor - * @param {google.ads.admanager.v1.IContact=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAdManagerError=} [properties] Properties to set */ - function Contact(properties) { + function AdManagerError(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11658,100 +10947,150 @@ } /** - * Contact name. - * @member {string} name - * @memberof google.ads.admanager.v1.Contact + * AdManagerError errorCode. + * @member {string} errorCode + * @memberof google.ads.admanager.v1.AdManagerError * @instance */ - Contact.prototype.name = ""; + AdManagerError.prototype.errorCode = ""; /** - * Contact companyDisplayName. - * @member {string|null|undefined} companyDisplayName - * @memberof google.ads.admanager.v1.Contact + * AdManagerError message. + * @member {string} message + * @memberof google.ads.admanager.v1.AdManagerError * @instance */ - Contact.prototype.companyDisplayName = null; + AdManagerError.prototype.message = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * AdManagerError fieldPath. + * @member {string} fieldPath + * @memberof google.ads.admanager.v1.AdManagerError + * @instance + */ + AdManagerError.prototype.fieldPath = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Contact.prototype, "_companyDisplayName", { - get: $util.oneOfGetter($oneOfFields = ["companyDisplayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * AdManagerError trigger. + * @member {string} trigger + * @memberof google.ads.admanager.v1.AdManagerError + * @instance + */ + AdManagerError.prototype.trigger = ""; /** - * Creates a new Contact instance using the specified properties. + * AdManagerError stackTrace. + * @member {string} stackTrace + * @memberof google.ads.admanager.v1.AdManagerError + * @instance + */ + AdManagerError.prototype.stackTrace = ""; + + /** + * AdManagerError details. + * @member {Array.} details + * @memberof google.ads.admanager.v1.AdManagerError + * @instance + */ + AdManagerError.prototype.details = $util.emptyArray; + + /** + * Creates a new AdManagerError instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static - * @param {google.ads.admanager.v1.IContact=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Contact} Contact instance + * @param {google.ads.admanager.v1.IAdManagerError=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError instance */ - Contact.create = function create(properties) { - return new Contact(properties); + AdManagerError.create = function create(properties) { + return new AdManagerError(properties); }; /** - * Encodes the specified Contact message. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. + * Encodes the specified AdManagerError message. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static - * @param {google.ads.admanager.v1.IContact} message Contact message or plain object to encode + * @param {google.ads.admanager.v1.IAdManagerError} message AdManagerError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encode = function encode(message, writer) { + AdManagerError.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.companyDisplayName != null && Object.hasOwnProperty.call(message, "companyDisplayName")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.companyDisplayName); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.errorCode); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fieldPath); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trigger); + if (message.stackTrace != null && Object.hasOwnProperty.call(message, "stackTrace")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stackTrace); + 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 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. + * Encodes the specified AdManagerError message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdManagerError.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static - * @param {google.ads.admanager.v1.IContact} message Contact message or plain object to encode + * @param {google.ads.admanager.v1.IAdManagerError} message AdManagerError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encodeDelimited = function encodeDelimited(message, writer) { + AdManagerError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes an AdManagerError message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Contact} Contact + * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decode = function decode(reader, length, error) { + AdManagerError.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Contact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdManagerError(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.errorCode = reader.string(); break; } - case 19: { - message.companyDisplayName = reader.string(); + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.fieldPath = reader.string(); + break; + } + case 4: { + message.trigger = reader.string(); + break; + } + case 5: { + message.stackTrace = reader.string(); + break; + } + case 6: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; } default: @@ -11763,134 +11102,182 @@ }; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes an AdManagerError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Contact} Contact + * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decodeDelimited = function decodeDelimited(reader) { + AdManagerError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Contact message. + * Verifies an AdManagerError message. * @function verify - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Contact.verify = function verify(message) { + AdManagerError.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.companyDisplayName != null && message.hasOwnProperty("companyDisplayName")) { - properties._companyDisplayName = 1; - if (!$util.isString(message.companyDisplayName)) - return "companyDisplayName: string expected"; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + if (!$util.isString(message.errorCode)) + return "errorCode: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + if (!$util.isString(message.fieldPath)) + return "fieldPath: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) + if (!$util.isString(message.trigger)) + return "trigger: string expected"; + if (message.stackTrace != null && message.hasOwnProperty("stackTrace")) + if (!$util.isString(message.stackTrace)) + return "stackTrace: 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 Contact message from a plain object. Also converts values to their respective internal types. + * Creates an AdManagerError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Contact} Contact + * @returns {google.ads.admanager.v1.AdManagerError} AdManagerError */ - Contact.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Contact) + AdManagerError.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdManagerError) return object; - var message = new $root.google.ads.admanager.v1.Contact(); - if (object.name != null) - message.name = String(object.name); - if (object.companyDisplayName != null) - message.companyDisplayName = String(object.companyDisplayName); + var message = new $root.google.ads.admanager.v1.AdManagerError(); + if (object.errorCode != null) + message.errorCode = String(object.errorCode); + if (object.message != null) + message.message = String(object.message); + if (object.fieldPath != null) + message.fieldPath = String(object.fieldPath); + if (object.trigger != null) + message.trigger = String(object.trigger); + if (object.stackTrace != null) + message.stackTrace = String(object.stackTrace); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.ads.admanager.v1.AdManagerError.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.ads.admanager.v1.AdManagerError.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } return message; }; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. + * Creates a plain object from an AdManagerError message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static - * @param {google.ads.admanager.v1.Contact} message Contact + * @param {google.ads.admanager.v1.AdManagerError} message AdManagerError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Contact.toObject = function toObject(message, options) { + AdManagerError.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 (message.companyDisplayName != null && message.hasOwnProperty("companyDisplayName")) { - object.companyDisplayName = message.companyDisplayName; - if (options.oneofs) - object._companyDisplayName = "companyDisplayName"; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.errorCode = ""; + object.message = ""; + object.fieldPath = ""; + object.trigger = ""; + object.stackTrace = ""; + } + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = message.errorCode; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + object.fieldPath = message.fieldPath; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = message.trigger; + if (message.stackTrace != null && message.hasOwnProperty("stackTrace")) + object.stackTrace = message.stackTrace; + 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 Contact to JSON. + * Converts this AdManagerError to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @instance * @returns {Object.} JSON object */ - Contact.prototype.toJSON = function toJSON() { + AdManagerError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Contact + * Gets the default type url for AdManagerError * @function getTypeUrl - * @memberof google.ads.admanager.v1.Contact + * @memberof google.ads.admanager.v1.AdManagerError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdManagerError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Contact"; + return typeUrlPrefix + "/google.ads.admanager.v1.AdManagerError"; }; - return Contact; + return AdManagerError; })(); - v1.CustomFieldDataTypeEnum = (function() { + v1.Application = (function() { /** - * Properties of a CustomFieldDataTypeEnum. + * Properties of an Application. * @memberof google.ads.admanager.v1 - * @interface ICustomFieldDataTypeEnum + * @interface IApplication + * @property {string|null} [name] Application name + * @property {string|null} [displayName] Application displayName */ /** - * Constructs a new CustomFieldDataTypeEnum. + * Constructs a new Application. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldDataTypeEnum. - * @implements ICustomFieldDataTypeEnum + * @classdesc Represents an Application. + * @implements IApplication * @constructor - * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IApplication=} [properties] Properties to set */ - function CustomFieldDataTypeEnum(properties) { + function Application(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11898,65 +11285,102 @@ } /** - * Creates a new CustomFieldDataTypeEnum instance using the specified properties. + * Application name. + * @member {string} name + * @memberof google.ads.admanager.v1.Application + * @instance + */ + Application.prototype.name = ""; + + /** + * Application displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Application + * @instance + */ + Application.prototype.displayName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Application.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Application instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static - * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum instance + * @param {google.ads.admanager.v1.IApplication=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Application} Application instance */ - CustomFieldDataTypeEnum.create = function create(properties) { - return new CustomFieldDataTypeEnum(properties); + Application.create = function create(properties) { + return new Application(properties); }; /** - * Encodes the specified CustomFieldDataTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * Encodes the specified Application message. Does not implicitly {@link google.ads.admanager.v1.Application.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static - * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum} message CustomFieldDataTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IApplication} message Application message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldDataTypeEnum.encode = function encode(message, writer) { + Application.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); return writer; }; /** - * Encodes the specified CustomFieldDataTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * Encodes the specified Application message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Application.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static - * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum} message CustomFieldDataTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IApplication} message Application message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldDataTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + Application.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer. + * Decodes an Application message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum + * @returns {google.ads.admanager.v1.Application} Application * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldDataTypeEnum.decode = function decode(reader, length, error) { + Application.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldDataTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Application(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11966,194 +11390,316 @@ }; /** - * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer, length delimited. + * Decodes an Application message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum + * @returns {google.ads.admanager.v1.Application} Application * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldDataTypeEnum.decodeDelimited = function decodeDelimited(reader) { + Application.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomFieldDataTypeEnum message. + * Verifies an Application message. * @function verify - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomFieldDataTypeEnum.verify = function verify(message) { + Application.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } return null; }; /** - * Creates a CustomFieldDataTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates an Application message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum + * @returns {google.ads.admanager.v1.Application} Application */ - CustomFieldDataTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldDataTypeEnum) + Application.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Application) return object; - return new $root.google.ads.admanager.v1.CustomFieldDataTypeEnum(); + var message = new $root.google.ads.admanager.v1.Application(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; }; /** - * Creates a plain object from a CustomFieldDataTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from an Application message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static - * @param {google.ads.admanager.v1.CustomFieldDataTypeEnum} message CustomFieldDataTypeEnum + * @param {google.ads.admanager.v1.Application} message Application * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomFieldDataTypeEnum.toObject = function toObject() { - return {}; + Application.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + return object; }; /** - * Converts this CustomFieldDataTypeEnum to JSON. + * Converts this Application to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @instance * @returns {Object.} JSON object */ - CustomFieldDataTypeEnum.prototype.toJSON = function toJSON() { + Application.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomFieldDataTypeEnum + * Gets the default type url for Application * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @memberof google.ads.admanager.v1.Application * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomFieldDataTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Application.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldDataTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.Application"; }; - /** - * CustomFieldDataType enum. - * @name google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType - * @enum {number} - * @property {number} CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED=0 CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED value - * @property {number} STRING=1 STRING value - * @property {number} NUMBER=2 NUMBER value - * @property {number} TOGGLE=3 TOGGLE value - * @property {number} DROP_DOWN=4 DROP_DOWN value - */ - CustomFieldDataTypeEnum.CustomFieldDataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STRING"] = 1; - values[valuesById[2] = "NUMBER"] = 2; - values[valuesById[3] = "TOGGLE"] = 3; - values[valuesById[4] = "DROP_DOWN"] = 4; - return values; - })(); - - return CustomFieldDataTypeEnum; + return Application; })(); - v1.CustomFieldEntityTypeEnum = (function() { - - /** - * Properties of a CustomFieldEntityTypeEnum. - * @memberof google.ads.admanager.v1 - * @interface ICustomFieldEntityTypeEnum - */ + v1.ApplicationService = (function() { /** - * Constructs a new CustomFieldEntityTypeEnum. + * Constructs a new ApplicationService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldEntityTypeEnum. - * @implements ICustomFieldEntityTypeEnum + * @classdesc Represents an ApplicationService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum=} [properties] Properties to set + * @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 CustomFieldEntityTypeEnum(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]]; + function ApplicationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (ApplicationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ApplicationService; + /** - * Creates a new CustomFieldEntityTypeEnum instance using the specified properties. + * Creates new ApplicationService service using the specified rpc implementation. * @function create - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.ApplicationService * @static - * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum instance + * @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 {ApplicationService} RPC service. Useful where requests and/or responses are streamed. */ - CustomFieldEntityTypeEnum.create = function create(properties) { - return new CustomFieldEntityTypeEnum(properties); + ApplicationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified CustomFieldEntityTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum - * @static - * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum message or plain object to encode + * Callback as used by {@link google.ads.admanager.v1.ApplicationService|getApplication}. + * @memberof google.ads.admanager.v1.ApplicationService + * @typedef GetApplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Application} [response] Application + */ + + /** + * Calls GetApplication. + * @function getApplication + * @memberof google.ads.admanager.v1.ApplicationService + * @instance + * @param {google.ads.admanager.v1.IGetApplicationRequest} request GetApplicationRequest message or plain object + * @param {google.ads.admanager.v1.ApplicationService.GetApplicationCallback} callback Node-style callback called with the error, if any, and Application + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ApplicationService.prototype.getApplication = function getApplication(request, callback) { + return this.rpcCall(getApplication, $root.google.ads.admanager.v1.GetApplicationRequest, $root.google.ads.admanager.v1.Application, request, callback); + }, "name", { value: "GetApplication" }); + + /** + * Calls GetApplication. + * @function getApplication + * @memberof google.ads.admanager.v1.ApplicationService + * @instance + * @param {google.ads.admanager.v1.IGetApplicationRequest} request GetApplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ApplicationService|listApplications}. + * @memberof google.ads.admanager.v1.ApplicationService + * @typedef ListApplicationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListApplicationsResponse} [response] ListApplicationsResponse + */ + + /** + * Calls ListApplications. + * @function listApplications + * @memberof google.ads.admanager.v1.ApplicationService + * @instance + * @param {google.ads.admanager.v1.IListApplicationsRequest} request ListApplicationsRequest message or plain object + * @param {google.ads.admanager.v1.ApplicationService.ListApplicationsCallback} callback Node-style callback called with the error, if any, and ListApplicationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ApplicationService.prototype.listApplications = function listApplications(request, callback) { + return this.rpcCall(listApplications, $root.google.ads.admanager.v1.ListApplicationsRequest, $root.google.ads.admanager.v1.ListApplicationsResponse, request, callback); + }, "name", { value: "ListApplications" }); + + /** + * Calls ListApplications. + * @function listApplications + * @memberof google.ads.admanager.v1.ApplicationService + * @instance + * @param {google.ads.admanager.v1.IListApplicationsRequest} request ListApplicationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ApplicationService; + })(); + + v1.GetApplicationRequest = (function() { + + /** + * Properties of a GetApplicationRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetApplicationRequest + * @property {string|null} [name] GetApplicationRequest name + */ + + /** + * Constructs a new GetApplicationRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetApplicationRequest. + * @implements IGetApplicationRequest + * @constructor + * @param {google.ads.admanager.v1.IGetApplicationRequest=} [properties] Properties to set + */ + function GetApplicationRequest(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]]; + } + + /** + * GetApplicationRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetApplicationRequest + * @instance + */ + GetApplicationRequest.prototype.name = ""; + + /** + * Creates a new GetApplicationRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetApplicationRequest + * @static + * @param {google.ads.admanager.v1.IGetApplicationRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetApplicationRequest} GetApplicationRequest instance + */ + GetApplicationRequest.create = function create(properties) { + return new GetApplicationRequest(properties); + }; + + /** + * Encodes the specified GetApplicationRequest message. Does not implicitly {@link google.ads.admanager.v1.GetApplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetApplicationRequest + * @static + * @param {google.ads.admanager.v1.IGetApplicationRequest} message GetApplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldEntityTypeEnum.encode = function encode(message, writer) { + GetApplicationRequest.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 CustomFieldEntityTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. + * Encodes the specified GetApplicationRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetApplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetApplicationRequest} message GetApplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldEntityTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + GetApplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer. + * Decodes a GetApplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum + * @returns {google.ads.admanager.v1.GetApplicationRequest} GetApplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldEntityTypeEnum.decode = function decode(reader, length, error) { + GetApplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetApplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12163,130 +11709,127 @@ }; /** - * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a GetApplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum + * @returns {google.ads.admanager.v1.GetApplicationRequest} GetApplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldEntityTypeEnum.decodeDelimited = function decodeDelimited(reader) { + GetApplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomFieldEntityTypeEnum message. + * Verifies a GetApplicationRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomFieldEntityTypeEnum.verify = function verify(message) { + GetApplicationRequest.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 CustomFieldEntityTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetApplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum + * @returns {google.ads.admanager.v1.GetApplicationRequest} GetApplicationRequest */ - CustomFieldEntityTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum) + GetApplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetApplicationRequest) return object; - return new $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum(); + var message = new $root.google.ads.admanager.v1.GetApplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a CustomFieldEntityTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a GetApplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static - * @param {google.ads.admanager.v1.CustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum + * @param {google.ads.admanager.v1.GetApplicationRequest} message GetApplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomFieldEntityTypeEnum.toObject = function toObject() { - return {}; + GetApplicationRequest.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 CustomFieldEntityTypeEnum to JSON. + * Converts this GetApplicationRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @instance * @returns {Object.} JSON object */ - CustomFieldEntityTypeEnum.prototype.toJSON = function toJSON() { + GetApplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomFieldEntityTypeEnum + * Gets the default type url for GetApplicationRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum + * @memberof google.ads.admanager.v1.GetApplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomFieldEntityTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetApplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldEntityTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetApplicationRequest"; }; - /** - * CustomFieldEntityType enum. - * @name google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType - * @enum {number} - * @property {number} CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED=0 CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED value - * @property {number} LINE_ITEM=1 LINE_ITEM value - * @property {number} ORDER=2 ORDER value - * @property {number} CREATIVE=3 CREATIVE value - * @property {number} PROPOSAL=4 PROPOSAL value - * @property {number} PROPOSAL_LINE_ITEM=5 PROPOSAL_LINE_ITEM value - */ - CustomFieldEntityTypeEnum.CustomFieldEntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM"] = 1; - values[valuesById[2] = "ORDER"] = 2; - values[valuesById[3] = "CREATIVE"] = 3; - values[valuesById[4] = "PROPOSAL"] = 4; - values[valuesById[5] = "PROPOSAL_LINE_ITEM"] = 5; - return values; - })(); - - return CustomFieldEntityTypeEnum; + return GetApplicationRequest; })(); - v1.CustomFieldStatusEnum = (function() { + v1.ListApplicationsRequest = (function() { /** - * Properties of a CustomFieldStatusEnum. + * Properties of a ListApplicationsRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomFieldStatusEnum + * @interface IListApplicationsRequest + * @property {string|null} [parent] ListApplicationsRequest parent + * @property {number|null} [pageSize] ListApplicationsRequest pageSize + * @property {string|null} [pageToken] ListApplicationsRequest pageToken + * @property {string|null} [filter] ListApplicationsRequest filter + * @property {string|null} [orderBy] ListApplicationsRequest orderBy + * @property {number|null} [skip] ListApplicationsRequest skip */ /** - * Constructs a new CustomFieldStatusEnum. + * Constructs a new ListApplicationsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldStatusEnum. - * @implements ICustomFieldStatusEnum + * @classdesc Represents a ListApplicationsRequest. + * @implements IListApplicationsRequest * @constructor - * @param {google.ads.admanager.v1.ICustomFieldStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListApplicationsRequest=} [properties] Properties to set */ - function CustomFieldStatusEnum(properties) { + function ListApplicationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12294,65 +11837,149 @@ } /** - * Creates a new CustomFieldStatusEnum instance using the specified properties. + * ListApplicationsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.parent = ""; + + /** + * ListApplicationsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.pageSize = 0; + + /** + * ListApplicationsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.pageToken = ""; + + /** + * ListApplicationsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.filter = ""; + + /** + * ListApplicationsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.orderBy = ""; + + /** + * ListApplicationsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListApplicationsRequest + * @instance + */ + ListApplicationsRequest.prototype.skip = 0; + + /** + * Creates a new ListApplicationsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum instance + * @param {google.ads.admanager.v1.IListApplicationsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListApplicationsRequest} ListApplicationsRequest instance */ - CustomFieldStatusEnum.create = function create(properties) { - return new CustomFieldStatusEnum(properties); + ListApplicationsRequest.create = function create(properties) { + return new ListApplicationsRequest(properties); }; /** - * Encodes the specified CustomFieldStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. + * Encodes the specified ListApplicationsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldStatusEnum} message CustomFieldStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListApplicationsRequest} message ListApplicationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldStatusEnum.encode = function encode(message, writer) { + ListApplicationsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified CustomFieldStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. + * Encodes the specified ListApplicationsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldStatusEnum} message CustomFieldStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListApplicationsRequest} message ListApplicationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + ListApplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomFieldStatusEnum message from the specified reader or buffer. + * Decodes a ListApplicationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum + * @returns {google.ads.admanager.v1.ListApplicationsRequest} ListApplicationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldStatusEnum.decode = function decode(reader, length, error) { + ListApplicationsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListApplicationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; + } + case 6: { + message.skip = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12362,124 +11989,166 @@ }; /** - * Decodes a CustomFieldStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a ListApplicationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum + * @returns {google.ads.admanager.v1.ListApplicationsRequest} ListApplicationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldStatusEnum.decodeDelimited = function decodeDelimited(reader) { + ListApplicationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomFieldStatusEnum message. + * Verifies a ListApplicationsRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomFieldStatusEnum.verify = function verify(message) { + ListApplicationsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a CustomFieldStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListApplicationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum + * @returns {google.ads.admanager.v1.ListApplicationsRequest} ListApplicationsRequest */ - CustomFieldStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldStatusEnum) + ListApplicationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListApplicationsRequest) return object; - return new $root.google.ads.admanager.v1.CustomFieldStatusEnum(); + var message = new $root.google.ads.admanager.v1.ListApplicationsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; }; /** - * Creates a plain object from a CustomFieldStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a ListApplicationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static - * @param {google.ads.admanager.v1.CustomFieldStatusEnum} message CustomFieldStatusEnum + * @param {google.ads.admanager.v1.ListApplicationsRequest} message ListApplicationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomFieldStatusEnum.toObject = function toObject() { - return {}; + ListApplicationsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; }; /** - * Converts this CustomFieldStatusEnum to JSON. + * Converts this ListApplicationsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @instance * @returns {Object.} JSON object */ - CustomFieldStatusEnum.prototype.toJSON = function toJSON() { + ListApplicationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomFieldStatusEnum + * Gets the default type url for ListApplicationsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldStatusEnum + * @memberof google.ads.admanager.v1.ListApplicationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomFieldStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListApplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListApplicationsRequest"; }; - /** - * CustomFieldStatus enum. - * @name google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus - * @enum {number} - * @property {number} CUSTOM_FIELD_STATUS_UNSPECIFIED=0 CUSTOM_FIELD_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - CustomFieldStatusEnum.CustomFieldStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_FIELD_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - return CustomFieldStatusEnum; + return ListApplicationsRequest; })(); - v1.CustomFieldVisibilityEnum = (function() { + v1.ListApplicationsResponse = (function() { /** - * Properties of a CustomFieldVisibilityEnum. + * Properties of a ListApplicationsResponse. * @memberof google.ads.admanager.v1 - * @interface ICustomFieldVisibilityEnum + * @interface IListApplicationsResponse + * @property {Array.|null} [applications] ListApplicationsResponse applications + * @property {string|null} [nextPageToken] ListApplicationsResponse nextPageToken + * @property {number|null} [totalSize] ListApplicationsResponse totalSize */ /** - * Constructs a new CustomFieldVisibilityEnum. + * Constructs a new ListApplicationsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldVisibilityEnum. - * @implements ICustomFieldVisibilityEnum + * @classdesc Represents a ListApplicationsResponse. + * @implements IListApplicationsResponse * @constructor - * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListApplicationsResponse=} [properties] Properties to set */ - function CustomFieldVisibilityEnum(properties) { + function ListApplicationsResponse(properties) { + this.applications = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12487,65 +12156,110 @@ } /** - * Creates a new CustomFieldVisibilityEnum instance using the specified properties. + * ListApplicationsResponse applications. + * @member {Array.} applications + * @memberof google.ads.admanager.v1.ListApplicationsResponse + * @instance + */ + ListApplicationsResponse.prototype.applications = $util.emptyArray; + + /** + * ListApplicationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListApplicationsResponse + * @instance + */ + ListApplicationsResponse.prototype.nextPageToken = ""; + + /** + * ListApplicationsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListApplicationsResponse + * @instance + */ + ListApplicationsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListApplicationsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static - * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum instance + * @param {google.ads.admanager.v1.IListApplicationsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListApplicationsResponse} ListApplicationsResponse instance */ - CustomFieldVisibilityEnum.create = function create(properties) { - return new CustomFieldVisibilityEnum(properties); + ListApplicationsResponse.create = function create(properties) { + return new ListApplicationsResponse(properties); }; /** - * Encodes the specified CustomFieldVisibilityEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. + * Encodes the specified ListApplicationsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static - * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum} message CustomFieldVisibilityEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListApplicationsResponse} message ListApplicationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldVisibilityEnum.encode = function encode(message, writer) { + ListApplicationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.applications != null && message.applications.length) + for (var i = 0; i < message.applications.length; ++i) + $root.google.ads.admanager.v1.Application.encode(message.applications[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified CustomFieldVisibilityEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. + * Encodes the specified ListApplicationsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListApplicationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static - * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum} message CustomFieldVisibilityEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListApplicationsResponse} message ListApplicationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldVisibilityEnum.encodeDelimited = function encodeDelimited(message, writer) { + ListApplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer. + * Decodes a ListApplicationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum + * @returns {google.ads.admanager.v1.ListApplicationsResponse} ListApplicationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldVisibilityEnum.decode = function decode(reader, length, error) { + ListApplicationsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldVisibilityEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListApplicationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.applications && message.applications.length)) + message.applications = []; + message.applications.push($root.google.ads.admanager.v1.Application.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12555,136 +12269,158 @@ }; /** - * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer, length delimited. + * Decodes a ListApplicationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum + * @returns {google.ads.admanager.v1.ListApplicationsResponse} ListApplicationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldVisibilityEnum.decodeDelimited = function decodeDelimited(reader) { + ListApplicationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomFieldVisibilityEnum message. + * Verifies a ListApplicationsResponse message. * @function verify - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomFieldVisibilityEnum.verify = function verify(message) { + ListApplicationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.applications != null && message.hasOwnProperty("applications")) { + if (!Array.isArray(message.applications)) + return "applications: array expected"; + for (var i = 0; i < message.applications.length; ++i) { + var error = $root.google.ads.admanager.v1.Application.verify(message.applications[i]); + if (error) + return "applications." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a CustomFieldVisibilityEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListApplicationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum + * @returns {google.ads.admanager.v1.ListApplicationsResponse} ListApplicationsResponse */ - CustomFieldVisibilityEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldVisibilityEnum) + ListApplicationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListApplicationsResponse) return object; - return new $root.google.ads.admanager.v1.CustomFieldVisibilityEnum(); + var message = new $root.google.ads.admanager.v1.ListApplicationsResponse(); + if (object.applications) { + if (!Array.isArray(object.applications)) + throw TypeError(".google.ads.admanager.v1.ListApplicationsResponse.applications: array expected"); + message.applications = []; + for (var i = 0; i < object.applications.length; ++i) { + if (typeof object.applications[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListApplicationsResponse.applications: object expected"); + message.applications[i] = $root.google.ads.admanager.v1.Application.fromObject(object.applications[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; }; /** - * Creates a plain object from a CustomFieldVisibilityEnum message. Also converts values to other types if specified. + * Creates a plain object from a ListApplicationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static - * @param {google.ads.admanager.v1.CustomFieldVisibilityEnum} message CustomFieldVisibilityEnum + * @param {google.ads.admanager.v1.ListApplicationsResponse} message ListApplicationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomFieldVisibilityEnum.toObject = function toObject() { - return {}; + ListApplicationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.applications = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.applications && message.applications.length) { + object.applications = []; + for (var j = 0; j < message.applications.length; ++j) + object.applications[j] = $root.google.ads.admanager.v1.Application.toObject(message.applications[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; }; /** - * Converts this CustomFieldVisibilityEnum to JSON. + * Converts this ListApplicationsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @instance * @returns {Object.} JSON object */ - CustomFieldVisibilityEnum.prototype.toJSON = function toJSON() { + ListApplicationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomFieldVisibilityEnum + * Gets the default type url for ListApplicationsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum + * @memberof google.ads.admanager.v1.ListApplicationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomFieldVisibilityEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListApplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldVisibilityEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListApplicationsResponse"; }; - /** - * CustomFieldVisibility enum. - * @name google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility - * @enum {number} - * @property {number} CUSTOM_FIELD_VISIBILITY_UNSPECIFIED=0 CUSTOM_FIELD_VISIBILITY_UNSPECIFIED value - * @property {number} HIDDEN=1 HIDDEN value - * @property {number} READ_ONLY=2 READ_ONLY value - * @property {number} EDITABLE=3 EDITABLE value - */ - CustomFieldVisibilityEnum.CustomFieldVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIDDEN"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - values[valuesById[3] = "EDITABLE"] = 3; - return values; - })(); - - return CustomFieldVisibilityEnum; + return ListApplicationsResponse; })(); - v1.CustomField = (function() { + v1.AudienceSegment = (function() { /** - * Properties of a CustomField. + * Properties of an AudienceSegment. * @memberof google.ads.admanager.v1 - * @interface ICustomField - * @property {string|null} [name] CustomField name - * @property {number|Long|null} [customFieldId] CustomField customFieldId - * @property {string|null} [displayName] CustomField displayName - * @property {string|null} [description] CustomField description - * @property {google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null} [status] CustomField status - * @property {google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null} [entityType] CustomField entityType - * @property {google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null} [dataType] CustomField dataType - * @property {google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null} [visibility] CustomField visibility - * @property {Array.|null} [options] CustomField options + * @interface IAudienceSegment + * @property {string|null} [name] AudienceSegment name + * @property {string|null} [displayName] AudienceSegment displayName */ /** - * Constructs a new CustomField. + * Constructs a new AudienceSegment. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomField. - * @implements ICustomField + * @classdesc Represents an AudienceSegment. + * @implements IAudienceSegment * @constructor - * @param {google.ads.admanager.v1.ICustomField=} [properties] Properties to set + * @param {google.ads.admanager.v1.IAudienceSegment=} [properties] Properties to set */ - function CustomField(properties) { - this.options = []; + function AudienceSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12692,196 +12428,89 @@ } /** - * CustomField name. + * AudienceSegment name. * @member {string} name - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.name = ""; - - /** - * CustomField customFieldId. - * @member {number|Long|null|undefined} customFieldId - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @instance */ - CustomField.prototype.customFieldId = null; + AudienceSegment.prototype.name = ""; /** - * CustomField displayName. + * AudienceSegment displayName. * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @instance */ - CustomField.prototype.displayName = null; + AudienceSegment.prototype.displayName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceSegment.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * CustomField description. - * @member {string|null|undefined} description - * @memberof google.ads.admanager.v1.CustomField - * @instance + * Creates a new AudienceSegment instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.AudienceSegment + * @static + * @param {google.ads.admanager.v1.IAudienceSegment=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AudienceSegment} AudienceSegment instance */ - CustomField.prototype.description = null; + AudienceSegment.create = function create(properties) { + return new AudienceSegment(properties); + }; /** - * CustomField status. - * @member {google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null|undefined} status - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.status = null; - - /** - * CustomField entityType. - * @member {google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null|undefined} entityType - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.entityType = null; - - /** - * CustomField dataType. - * @member {google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null|undefined} dataType - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.dataType = null; - - /** - * CustomField visibility. - * @member {google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null|undefined} visibility - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.visibility = null; - - /** - * CustomField options. - * @member {Array.} options - * @memberof google.ads.admanager.v1.CustomField - * @instance - */ - CustomField.prototype.options = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_customFieldId", { - get: $util.oneOfGetter($oneOfFields = ["customFieldId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_entityType", { - get: $util.oneOfGetter($oneOfFields = ["entityType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_dataType", { - get: $util.oneOfGetter($oneOfFields = ["dataType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomField.prototype, "_visibility", { - get: $util.oneOfGetter($oneOfFields = ["visibility"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CustomField instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.CustomField - * @static - * @param {google.ads.admanager.v1.ICustomField=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomField} CustomField instance - */ - CustomField.create = function create(properties) { - return new CustomField(properties); - }; - - /** - * Encodes the specified CustomField message. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. + * Encodes the specified AudienceSegment message. Does not implicitly {@link google.ads.admanager.v1.AudienceSegment.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static - * @param {google.ads.admanager.v1.ICustomField} message CustomField message or plain object to encode + * @param {google.ads.admanager.v1.IAudienceSegment} message AudienceSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomField.encode = function encode(message, writer) { + AudienceSegment.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.customFieldId != null && Object.hasOwnProperty.call(message, "customFieldId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.customFieldId); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.entityType); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.dataType); - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.visibility); - if (message.options != null && message.options.length) - for (var i = 0; i < message.options.length; ++i) - $root.google.ads.admanager.v1.CustomFieldOption.encode(message.options[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified CustomField message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. + * Encodes the specified AudienceSegment message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AudienceSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static - * @param {google.ads.admanager.v1.ICustomField} message CustomField message or plain object to encode + * @param {google.ads.admanager.v1.IAudienceSegment} message AudienceSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomField.encodeDelimited = function encodeDelimited(message, writer) { + AudienceSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomField message from the specified reader or buffer. + * Decodes an AudienceSegment message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomField} CustomField + * @returns {google.ads.admanager.v1.AudienceSegment} AudienceSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomField.decode = function decode(reader, length, error) { + AudienceSegment.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomField(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AudienceSegment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -12892,39 +12521,9 @@ break; } case 2: { - message.customFieldId = reader.int64(); - break; - } - case 3: { message.displayName = reader.string(); break; } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.status = reader.int32(); - break; - } - case 7: { - message.entityType = reader.int32(); - break; - } - case 8: { - message.dataType = reader.int32(); - break; - } - case 9: { - message.visibility = reader.int32(); - break; - } - case 10: { - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.ads.admanager.v1.CustomFieldOption.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -12934,370 +12533,236 @@ }; /** - * Decodes a CustomField message from the specified reader or buffer, length delimited. + * Decodes an AudienceSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomField} CustomField + * @returns {google.ads.admanager.v1.AudienceSegment} AudienceSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomField.decodeDelimited = function decodeDelimited(reader) { + AudienceSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomField message. + * Verifies an AudienceSegment message. * @function verify - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomField.verify = function verify(message) { + AudienceSegment.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.customFieldId != null && message.hasOwnProperty("customFieldId")) { - properties._customFieldId = 1; - if (!$util.isInteger(message.customFieldId) && !(message.customFieldId && $util.isInteger(message.customFieldId.low) && $util.isInteger(message.customFieldId.high))) - return "customFieldId: integer|Long expected"; - } if (message.displayName != null && message.hasOwnProperty("displayName")) { properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.entityType != null && message.hasOwnProperty("entityType")) { - properties._entityType = 1; - switch (message.entityType) { - default: - return "entityType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.dataType != null && message.hasOwnProperty("dataType")) { - properties._dataType = 1; - switch (message.dataType) { - default: - return "dataType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.visibility != null && message.hasOwnProperty("visibility")) { - properties._visibility = 1; - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (var i = 0; i < message.options.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomFieldOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } return null; }; /** - * Creates a CustomField message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomField} CustomField + * @returns {google.ads.admanager.v1.AudienceSegment} AudienceSegment */ - CustomField.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomField) + AudienceSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AudienceSegment) return object; - var message = new $root.google.ads.admanager.v1.CustomField(); + var message = new $root.google.ads.admanager.v1.AudienceSegment(); if (object.name != null) message.name = String(object.name); - if (object.customFieldId != null) - if ($util.Long) - (message.customFieldId = $util.Long.fromValue(object.customFieldId)).unsigned = false; - else if (typeof object.customFieldId === "string") - message.customFieldId = parseInt(object.customFieldId, 10); - else if (typeof object.customFieldId === "number") - message.customFieldId = object.customFieldId; - else if (typeof object.customFieldId === "object") - message.customFieldId = new $util.LongBits(object.customFieldId.low >>> 0, object.customFieldId.high >>> 0).toNumber(); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "CUSTOM_FIELD_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "ACTIVE": - case 1: - message.status = 1; - break; - case "INACTIVE": - case 2: - message.status = 2; - break; - } - switch (object.entityType) { - default: - if (typeof object.entityType === "number") { - message.entityType = object.entityType; - break; - } - break; - case "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED": - case 0: - message.entityType = 0; - break; - case "LINE_ITEM": - case 1: - message.entityType = 1; - break; - case "ORDER": - case 2: - message.entityType = 2; - break; - case "CREATIVE": - case 3: - message.entityType = 3; - break; - case "PROPOSAL": - case 4: - message.entityType = 4; - break; - case "PROPOSAL_LINE_ITEM": - case 5: - message.entityType = 5; - break; - } - switch (object.dataType) { - default: - if (typeof object.dataType === "number") { - message.dataType = object.dataType; - break; - } - break; - case "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED": - case 0: - message.dataType = 0; - break; - case "STRING": - case 1: - message.dataType = 1; - break; - case "NUMBER": - case 2: - message.dataType = 2; - break; - case "TOGGLE": - case 3: - message.dataType = 3; - break; - case "DROP_DOWN": - case 4: - message.dataType = 4; - break; - } - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED": - case 0: - message.visibility = 0; - break; - case "HIDDEN": - case 1: - message.visibility = 1; - break; - case "READ_ONLY": - case 2: - message.visibility = 2; - break; - case "EDITABLE": - case 3: - message.visibility = 3; - break; - } - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".google.ads.admanager.v1.CustomField.options: array expected"); - message.options = []; - for (var i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".google.ads.admanager.v1.CustomField.options: object expected"); - message.options[i] = $root.google.ads.admanager.v1.CustomFieldOption.fromObject(object.options[i]); - } - } return message; }; /** - * Creates a plain object from a CustomField message. Also converts values to other types if specified. + * Creates a plain object from an AudienceSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static - * @param {google.ads.admanager.v1.CustomField} message CustomField + * @param {google.ads.admanager.v1.AudienceSegment} message AudienceSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomField.toObject = function toObject(message, options) { + AudienceSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.options = []; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.customFieldId != null && message.hasOwnProperty("customFieldId")) { - if (typeof message.customFieldId === "number") - object.customFieldId = options.longs === String ? String(message.customFieldId) : message.customFieldId; - else - object.customFieldId = options.longs === String ? $util.Long.prototype.toString.call(message.customFieldId) : options.longs === Number ? new $util.LongBits(message.customFieldId.low >>> 0, message.customFieldId.high >>> 0).toNumber() : message.customFieldId; - if (options.oneofs) - object._customFieldId = "customFieldId"; - } if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; if (options.oneofs) object._displayName = "displayName"; } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.entityType != null && message.hasOwnProperty("entityType")) { - object.entityType = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType[message.entityType] === undefined ? message.entityType : $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType[message.entityType] : message.entityType; - if (options.oneofs) - object._entityType = "entityType"; - } - if (message.dataType != null && message.hasOwnProperty("dataType")) { - object.dataType = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType[message.dataType] === undefined ? message.dataType : $root.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType[message.dataType] : message.dataType; - if (options.oneofs) - object._dataType = "dataType"; - } - if (message.visibility != null && message.hasOwnProperty("visibility")) { - object.visibility = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility[message.visibility] === undefined ? message.visibility : $root.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility[message.visibility] : message.visibility; - if (options.oneofs) - object._visibility = "visibility"; - } - if (message.options && message.options.length) { - object.options = []; - for (var j = 0; j < message.options.length; ++j) - object.options[j] = $root.google.ads.admanager.v1.CustomFieldOption.toObject(message.options[j], options); - } return object; }; /** - * Converts this CustomField to JSON. + * Converts this AudienceSegment to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @instance * @returns {Object.} JSON object */ - CustomField.prototype.toJSON = function toJSON() { + AudienceSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomField + * Gets the default type url for AudienceSegment * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomField + * @memberof google.ads.admanager.v1.AudienceSegment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomField"; + return typeUrlPrefix + "/google.ads.admanager.v1.AudienceSegment"; }; - return CustomField; + return AudienceSegment; })(); - v1.CustomFieldOption = (function() { + v1.AudienceSegmentService = (function() { /** - * Properties of a CustomFieldOption. + * Constructs a new AudienceSegmentService service. * @memberof google.ads.admanager.v1 - * @interface ICustomFieldOption - * @property {number|Long|null} [customFieldOptionId] CustomFieldOption customFieldOptionId - * @property {string|null} [displayName] CustomFieldOption displayName + * @classdesc Represents an AudienceSegmentService + * @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 AudienceSegmentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AudienceSegmentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AudienceSegmentService; /** - * Constructs a new CustomFieldOption. + * Creates new AudienceSegmentService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @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 {AudienceSegmentService} RPC service. Useful where requests and/or responses are streamed. + */ + AudienceSegmentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.AudienceSegmentService|getAudienceSegment}. + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @typedef GetAudienceSegmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.AudienceSegment} [response] AudienceSegment + */ + + /** + * Calls GetAudienceSegment. + * @function getAudienceSegment + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @instance + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest} request GetAudienceSegmentRequest message or plain object + * @param {google.ads.admanager.v1.AudienceSegmentService.GetAudienceSegmentCallback} callback Node-style callback called with the error, if any, and AudienceSegment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AudienceSegmentService.prototype.getAudienceSegment = function getAudienceSegment(request, callback) { + return this.rpcCall(getAudienceSegment, $root.google.ads.admanager.v1.GetAudienceSegmentRequest, $root.google.ads.admanager.v1.AudienceSegment, request, callback); + }, "name", { value: "GetAudienceSegment" }); + + /** + * Calls GetAudienceSegment. + * @function getAudienceSegment + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @instance + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest} request GetAudienceSegmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.AudienceSegmentService|listAudienceSegments}. + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @typedef ListAudienceSegmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListAudienceSegmentsResponse} [response] ListAudienceSegmentsResponse + */ + + /** + * Calls ListAudienceSegments. + * @function listAudienceSegments + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @instance + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest} request ListAudienceSegmentsRequest message or plain object + * @param {google.ads.admanager.v1.AudienceSegmentService.ListAudienceSegmentsCallback} callback Node-style callback called with the error, if any, and ListAudienceSegmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AudienceSegmentService.prototype.listAudienceSegments = function listAudienceSegments(request, callback) { + return this.rpcCall(listAudienceSegments, $root.google.ads.admanager.v1.ListAudienceSegmentsRequest, $root.google.ads.admanager.v1.ListAudienceSegmentsResponse, request, callback); + }, "name", { value: "ListAudienceSegments" }); + + /** + * Calls ListAudienceSegments. + * @function listAudienceSegments + * @memberof google.ads.admanager.v1.AudienceSegmentService + * @instance + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest} request ListAudienceSegmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AudienceSegmentService; + })(); + + v1.GetAudienceSegmentRequest = (function() { + + /** + * Properties of a GetAudienceSegmentRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldOption. - * @implements ICustomFieldOption + * @interface IGetAudienceSegmentRequest + * @property {string|null} [name] GetAudienceSegmentRequest name + */ + + /** + * Constructs a new GetAudienceSegmentRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetAudienceSegmentRequest. + * @implements IGetAudienceSegmentRequest * @constructor - * @param {google.ads.admanager.v1.ICustomFieldOption=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest=} [properties] Properties to set */ - function CustomFieldOption(properties) { + function GetAudienceSegmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13305,413 +12770,70 @@ } /** - * CustomFieldOption customFieldOptionId. - * @member {number|Long} customFieldOptionId - * @memberof google.ads.admanager.v1.CustomFieldOption - * @instance - */ - CustomFieldOption.prototype.customFieldOptionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CustomFieldOption displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.CustomFieldOption + * GetAudienceSegmentRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @instance */ - CustomFieldOption.prototype.displayName = ""; + GetAudienceSegmentRequest.prototype.name = ""; /** - * Creates a new CustomFieldOption instance using the specified properties. + * Creates a new GetAudienceSegmentRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomFieldOption + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldOption=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption instance + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetAudienceSegmentRequest} GetAudienceSegmentRequest instance */ - CustomFieldOption.create = function create(properties) { - return new CustomFieldOption(properties); + GetAudienceSegmentRequest.create = function create(properties) { + return new GetAudienceSegmentRequest(properties); }; /** - * Encodes the specified CustomFieldOption message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. + * Encodes the specified GetAudienceSegmentRequest message. Does not implicitly {@link google.ads.admanager.v1.GetAudienceSegmentRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomFieldOption + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldOption} message CustomFieldOption message or plain object to encode + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest} message GetAudienceSegmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldOption.encode = function encode(message, writer) { + GetAudienceSegmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customFieldOptionId != null && Object.hasOwnProperty.call(message, "customFieldOptionId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.customFieldOptionId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CustomFieldOption message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. + * Encodes the specified GetAudienceSegmentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetAudienceSegmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldOption + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static - * @param {google.ads.admanager.v1.ICustomFieldOption} message CustomFieldOption message or plain object to encode + * @param {google.ads.admanager.v1.IGetAudienceSegmentRequest} message GetAudienceSegmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomFieldOption message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomFieldOption.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.customFieldOptionId = reader.int64(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomFieldOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomFieldOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomFieldOption message. - * @function verify - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomFieldOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.customFieldOptionId != null && message.hasOwnProperty("customFieldOptionId")) - if (!$util.isInteger(message.customFieldOptionId) && !(message.customFieldOptionId && $util.isInteger(message.customFieldOptionId.low) && $util.isInteger(message.customFieldOptionId.high))) - return "customFieldOptionId: integer|Long expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates a CustomFieldOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption - */ - CustomFieldOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldOption) - return object; - var message = new $root.google.ads.admanager.v1.CustomFieldOption(); - if (object.customFieldOptionId != null) - if ($util.Long) - (message.customFieldOptionId = $util.Long.fromValue(object.customFieldOptionId)).unsigned = false; - else if (typeof object.customFieldOptionId === "string") - message.customFieldOptionId = parseInt(object.customFieldOptionId, 10); - else if (typeof object.customFieldOptionId === "number") - message.customFieldOptionId = object.customFieldOptionId; - else if (typeof object.customFieldOptionId === "object") - message.customFieldOptionId = new $util.LongBits(object.customFieldOptionId.low >>> 0, object.customFieldOptionId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from a CustomFieldOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {google.ads.admanager.v1.CustomFieldOption} message CustomFieldOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomFieldOption.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.customFieldOptionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.customFieldOptionId = options.longs === String ? "0" : 0; - object.displayName = ""; - } - if (message.customFieldOptionId != null && message.hasOwnProperty("customFieldOptionId")) - if (typeof message.customFieldOptionId === "number") - object.customFieldOptionId = options.longs === String ? String(message.customFieldOptionId) : message.customFieldOptionId; - else - object.customFieldOptionId = options.longs === String ? $util.Long.prototype.toString.call(message.customFieldOptionId) : options.longs === Number ? new $util.LongBits(message.customFieldOptionId.low >>> 0, message.customFieldOptionId.high >>> 0).toNumber() : message.customFieldOptionId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this CustomFieldOption to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldOption - * @instance - * @returns {Object.} JSON object - */ - CustomFieldOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomFieldOption - * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomFieldOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldOption"; - }; - - return CustomFieldOption; - })(); - - v1.CustomFieldService = (function() { - - /** - * Constructs a new CustomFieldService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldService - * @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 CustomFieldService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CustomFieldService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomFieldService; - - /** - * Creates new CustomFieldService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.CustomFieldService - * @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 {CustomFieldService} RPC service. Useful where requests and/or responses are streamed. - */ - CustomFieldService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|getCustomField}. - * @memberof google.ads.admanager.v1.CustomFieldService - * @typedef GetCustomFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.CustomField} [response] CustomField - */ - - /** - * Calls GetCustomField. - * @function getCustomField - * @memberof google.ads.admanager.v1.CustomFieldService - * @instance - * @param {google.ads.admanager.v1.IGetCustomFieldRequest} request GetCustomFieldRequest message or plain object - * @param {google.ads.admanager.v1.CustomFieldService.GetCustomFieldCallback} callback Node-style callback called with the error, if any, and CustomField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CustomFieldService.prototype.getCustomField = function getCustomField(request, callback) { - return this.rpcCall(getCustomField, $root.google.ads.admanager.v1.GetCustomFieldRequest, $root.google.ads.admanager.v1.CustomField, request, callback); - }, "name", { value: "GetCustomField" }); - - /** - * Calls GetCustomField. - * @function getCustomField - * @memberof google.ads.admanager.v1.CustomFieldService - * @instance - * @param {google.ads.admanager.v1.IGetCustomFieldRequest} request GetCustomFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|listCustomFields}. - * @memberof google.ads.admanager.v1.CustomFieldService - * @typedef ListCustomFieldsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListCustomFieldsResponse} [response] ListCustomFieldsResponse - */ - - /** - * Calls ListCustomFields. - * @function listCustomFields - * @memberof google.ads.admanager.v1.CustomFieldService - * @instance - * @param {google.ads.admanager.v1.IListCustomFieldsRequest} request ListCustomFieldsRequest message or plain object - * @param {google.ads.admanager.v1.CustomFieldService.ListCustomFieldsCallback} callback Node-style callback called with the error, if any, and ListCustomFieldsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CustomFieldService.prototype.listCustomFields = function listCustomFields(request, callback) { - return this.rpcCall(listCustomFields, $root.google.ads.admanager.v1.ListCustomFieldsRequest, $root.google.ads.admanager.v1.ListCustomFieldsResponse, request, callback); - }, "name", { value: "ListCustomFields" }); - - /** - * Calls ListCustomFields. - * @function listCustomFields - * @memberof google.ads.admanager.v1.CustomFieldService - * @instance - * @param {google.ads.admanager.v1.IListCustomFieldsRequest} request ListCustomFieldsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CustomFieldService; - })(); - - v1.GetCustomFieldRequest = (function() { - - /** - * Properties of a GetCustomFieldRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetCustomFieldRequest - * @property {string|null} [name] GetCustomFieldRequest name - */ - - /** - * Constructs a new GetCustomFieldRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetCustomFieldRequest. - * @implements IGetCustomFieldRequest - * @constructor - * @param {google.ads.admanager.v1.IGetCustomFieldRequest=} [properties] Properties to set - */ - function GetCustomFieldRequest(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]]; - } - - /** - * GetCustomFieldRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetCustomFieldRequest - * @instance - */ - GetCustomFieldRequest.prototype.name = ""; - - /** - * Creates a new GetCustomFieldRequest instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.GetCustomFieldRequest - * @static - * @param {google.ads.admanager.v1.IGetCustomFieldRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest instance - */ - GetCustomFieldRequest.create = function create(properties) { - return new GetCustomFieldRequest(properties); - }; - - /** - * Encodes the specified GetCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.GetCustomFieldRequest - * @static - * @param {google.ads.admanager.v1.IGetCustomFieldRequest} message GetCustomFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCustomFieldRequest.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 GetCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetCustomFieldRequest - * @static - * @param {google.ads.admanager.v1.IGetCustomFieldRequest} message GetCustomFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCustomFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAudienceSegmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCustomFieldRequest message from the specified reader or buffer. + * Decodes a GetAudienceSegmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest + * @returns {google.ads.admanager.v1.GetAudienceSegmentRequest} GetAudienceSegmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomFieldRequest.decode = function decode(reader, length, error) { + GetAudienceSegmentRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomFieldRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetAudienceSegmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -13730,30 +12852,30 @@ }; /** - * Decodes a GetCustomFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAudienceSegmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest + * @returns {google.ads.admanager.v1.GetAudienceSegmentRequest} GetAudienceSegmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomFieldRequest.decodeDelimited = function decodeDelimited(reader) { + GetAudienceSegmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCustomFieldRequest message. + * Verifies a GetAudienceSegmentRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCustomFieldRequest.verify = function verify(message) { + GetAudienceSegmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -13763,32 +12885,32 @@ }; /** - * Creates a GetCustomFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAudienceSegmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest + * @returns {google.ads.admanager.v1.GetAudienceSegmentRequest} GetAudienceSegmentRequest */ - GetCustomFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetCustomFieldRequest) + GetAudienceSegmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetAudienceSegmentRequest) return object; - var message = new $root.google.ads.admanager.v1.GetCustomFieldRequest(); + var message = new $root.google.ads.admanager.v1.GetAudienceSegmentRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetCustomFieldRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAudienceSegmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static - * @param {google.ads.admanager.v1.GetCustomFieldRequest} message GetCustomFieldRequest + * @param {google.ads.admanager.v1.GetAudienceSegmentRequest} message GetAudienceSegmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomFieldRequest.toObject = function toObject(message, options) { + GetAudienceSegmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -13800,57 +12922,57 @@ }; /** - * Converts this GetCustomFieldRequest to JSON. + * Converts this GetAudienceSegmentRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @instance * @returns {Object.} JSON object */ - GetCustomFieldRequest.prototype.toJSON = function toJSON() { + GetAudienceSegmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCustomFieldRequest + * Gets the default type url for GetAudienceSegmentRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetCustomFieldRequest + * @memberof google.ads.admanager.v1.GetAudienceSegmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCustomFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAudienceSegmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomFieldRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetAudienceSegmentRequest"; }; - return GetCustomFieldRequest; + return GetAudienceSegmentRequest; })(); - v1.ListCustomFieldsRequest = (function() { + v1.ListAudienceSegmentsRequest = (function() { /** - * Properties of a ListCustomFieldsRequest. + * Properties of a ListAudienceSegmentsRequest. * @memberof google.ads.admanager.v1 - * @interface IListCustomFieldsRequest - * @property {string|null} [parent] ListCustomFieldsRequest parent - * @property {number|null} [pageSize] ListCustomFieldsRequest pageSize - * @property {string|null} [pageToken] ListCustomFieldsRequest pageToken - * @property {string|null} [filter] ListCustomFieldsRequest filter - * @property {string|null} [orderBy] ListCustomFieldsRequest orderBy - * @property {number|null} [skip] ListCustomFieldsRequest skip + * @interface IListAudienceSegmentsRequest + * @property {string|null} [parent] ListAudienceSegmentsRequest parent + * @property {number|null} [pageSize] ListAudienceSegmentsRequest pageSize + * @property {string|null} [pageToken] ListAudienceSegmentsRequest pageToken + * @property {string|null} [filter] ListAudienceSegmentsRequest filter + * @property {string|null} [orderBy] ListAudienceSegmentsRequest orderBy + * @property {number|null} [skip] ListAudienceSegmentsRequest skip */ /** - * Constructs a new ListCustomFieldsRequest. + * Constructs a new ListAudienceSegmentsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomFieldsRequest. - * @implements IListCustomFieldsRequest + * @classdesc Represents a ListAudienceSegmentsRequest. + * @implements IListAudienceSegmentsRequest * @constructor - * @param {google.ads.admanager.v1.IListCustomFieldsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest=} [properties] Properties to set */ - function ListCustomFieldsRequest(properties) { + function ListAudienceSegmentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13858,75 +12980,75 @@ } /** - * ListCustomFieldsRequest parent. + * ListAudienceSegmentsRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.parent = ""; + ListAudienceSegmentsRequest.prototype.parent = ""; /** - * ListCustomFieldsRequest pageSize. + * ListAudienceSegmentsRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.pageSize = 0; + ListAudienceSegmentsRequest.prototype.pageSize = 0; /** - * ListCustomFieldsRequest pageToken. + * ListAudienceSegmentsRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.pageToken = ""; + ListAudienceSegmentsRequest.prototype.pageToken = ""; /** - * ListCustomFieldsRequest filter. + * ListAudienceSegmentsRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.filter = ""; + ListAudienceSegmentsRequest.prototype.filter = ""; /** - * ListCustomFieldsRequest orderBy. + * ListAudienceSegmentsRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.orderBy = ""; + ListAudienceSegmentsRequest.prototype.orderBy = ""; /** - * ListCustomFieldsRequest skip. + * ListAudienceSegmentsRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance */ - ListCustomFieldsRequest.prototype.skip = 0; + ListAudienceSegmentsRequest.prototype.skip = 0; /** - * Creates a new ListCustomFieldsRequest instance using the specified properties. + * Creates a new ListAudienceSegmentsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static - * @param {google.ads.admanager.v1.IListCustomFieldsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest instance + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAudienceSegmentsRequest} ListAudienceSegmentsRequest instance */ - ListCustomFieldsRequest.create = function create(properties) { - return new ListCustomFieldsRequest(properties); + ListAudienceSegmentsRequest.create = function create(properties) { + return new ListAudienceSegmentsRequest(properties); }; /** - * Encodes the specified ListCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. + * Encodes the specified ListAudienceSegmentsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static - * @param {google.ads.admanager.v1.IListCustomFieldsRequest} message ListCustomFieldsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest} message ListAudienceSegmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomFieldsRequest.encode = function encode(message, writer) { + ListAudienceSegmentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -13945,33 +13067,33 @@ }; /** - * Encodes the specified ListCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. + * Encodes the specified ListAudienceSegmentsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static - * @param {google.ads.admanager.v1.IListCustomFieldsRequest} message ListCustomFieldsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListAudienceSegmentsRequest} message ListAudienceSegmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAudienceSegmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomFieldsRequest message from the specified reader or buffer. + * Decodes a ListAudienceSegmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest + * @returns {google.ads.admanager.v1.ListAudienceSegmentsRequest} ListAudienceSegmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomFieldsRequest.decode = function decode(reader, length, error) { + ListAudienceSegmentsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomFieldsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAudienceSegmentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -14010,30 +13132,30 @@ }; /** - * Decodes a ListCustomFieldsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAudienceSegmentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest + * @returns {google.ads.admanager.v1.ListAudienceSegmentsRequest} ListAudienceSegmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { + ListAudienceSegmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomFieldsRequest message. + * Verifies a ListAudienceSegmentsRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomFieldsRequest.verify = function verify(message) { + ListAudienceSegmentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -14058,17 +13180,17 @@ }; /** - * Creates a ListCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAudienceSegmentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest + * @returns {google.ads.admanager.v1.ListAudienceSegmentsRequest} ListAudienceSegmentsRequest */ - ListCustomFieldsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomFieldsRequest) + ListAudienceSegmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAudienceSegmentsRequest) return object; - var message = new $root.google.ads.admanager.v1.ListCustomFieldsRequest(); + var message = new $root.google.ads.admanager.v1.ListAudienceSegmentsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -14085,15 +13207,15 @@ }; /** - * Creates a plain object from a ListCustomFieldsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAudienceSegmentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static - * @param {google.ads.admanager.v1.ListCustomFieldsRequest} message ListCustomFieldsRequest + * @param {google.ads.admanager.v1.ListAudienceSegmentsRequest} message ListAudienceSegmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomFieldsRequest.toObject = function toObject(message, options) { + ListAudienceSegmentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -14121,55 +13243,55 @@ }; /** - * Converts this ListCustomFieldsRequest to JSON. + * Converts this ListAudienceSegmentsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @instance * @returns {Object.} JSON object */ - ListCustomFieldsRequest.prototype.toJSON = function toJSON() { + ListAudienceSegmentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomFieldsRequest + * Gets the default type url for ListAudienceSegmentsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @memberof google.ads.admanager.v1.ListAudienceSegmentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAudienceSegmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomFieldsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListAudienceSegmentsRequest"; }; - return ListCustomFieldsRequest; + return ListAudienceSegmentsRequest; })(); - v1.ListCustomFieldsResponse = (function() { + v1.ListAudienceSegmentsResponse = (function() { /** - * Properties of a ListCustomFieldsResponse. + * Properties of a ListAudienceSegmentsResponse. * @memberof google.ads.admanager.v1 - * @interface IListCustomFieldsResponse - * @property {Array.|null} [customFields] ListCustomFieldsResponse customFields - * @property {string|null} [nextPageToken] ListCustomFieldsResponse nextPageToken - * @property {number|null} [totalSize] ListCustomFieldsResponse totalSize + * @interface IListAudienceSegmentsResponse + * @property {Array.|null} [audienceSegments] ListAudienceSegmentsResponse audienceSegments + * @property {string|null} [nextPageToken] ListAudienceSegmentsResponse nextPageToken + * @property {number|null} [totalSize] ListAudienceSegmentsResponse totalSize */ /** - * Constructs a new ListCustomFieldsResponse. + * Constructs a new ListAudienceSegmentsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomFieldsResponse. - * @implements IListCustomFieldsResponse + * @classdesc Represents a ListAudienceSegmentsResponse. + * @implements IListAudienceSegmentsResponse * @constructor - * @param {google.ads.admanager.v1.IListCustomFieldsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListAudienceSegmentsResponse=} [properties] Properties to set */ - function ListCustomFieldsResponse(properties) { - this.customFields = []; + function ListAudienceSegmentsResponse(properties) { + this.audienceSegments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14177,56 +13299,56 @@ } /** - * ListCustomFieldsResponse customFields. - * @member {Array.} customFields - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * ListAudienceSegmentsResponse audienceSegments. + * @member {Array.} audienceSegments + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @instance */ - ListCustomFieldsResponse.prototype.customFields = $util.emptyArray; + ListAudienceSegmentsResponse.prototype.audienceSegments = $util.emptyArray; /** - * ListCustomFieldsResponse nextPageToken. + * ListAudienceSegmentsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @instance */ - ListCustomFieldsResponse.prototype.nextPageToken = ""; + ListAudienceSegmentsResponse.prototype.nextPageToken = ""; /** - * ListCustomFieldsResponse totalSize. + * ListAudienceSegmentsResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @instance */ - ListCustomFieldsResponse.prototype.totalSize = 0; + ListAudienceSegmentsResponse.prototype.totalSize = 0; /** - * Creates a new ListCustomFieldsResponse instance using the specified properties. + * Creates a new ListAudienceSegmentsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static - * @param {google.ads.admanager.v1.IListCustomFieldsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse instance + * @param {google.ads.admanager.v1.IListAudienceSegmentsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListAudienceSegmentsResponse} ListAudienceSegmentsResponse instance */ - ListCustomFieldsResponse.create = function create(properties) { - return new ListCustomFieldsResponse(properties); + ListAudienceSegmentsResponse.create = function create(properties) { + return new ListAudienceSegmentsResponse(properties); }; /** - * Encodes the specified ListCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. + * Encodes the specified ListAudienceSegmentsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static - * @param {google.ads.admanager.v1.IListCustomFieldsResponse} message ListCustomFieldsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListAudienceSegmentsResponse} message ListAudienceSegmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomFieldsResponse.encode = function encode(message, writer) { + ListAudienceSegmentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customFields != null && message.customFields.length) - for (var i = 0; i < message.customFields.length; ++i) - $root.google.ads.admanager.v1.CustomField.encode(message.customFields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceSegments != null && message.audienceSegments.length) + for (var i = 0; i < message.audienceSegments.length; ++i) + $root.google.ads.admanager.v1.AudienceSegment.encode(message.audienceSegments[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -14235,42 +13357,42 @@ }; /** - * Encodes the specified ListCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. + * Encodes the specified ListAudienceSegmentsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListAudienceSegmentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static - * @param {google.ads.admanager.v1.IListCustomFieldsResponse} message ListCustomFieldsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListAudienceSegmentsResponse} message ListAudienceSegmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAudienceSegmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomFieldsResponse message from the specified reader or buffer. + * Decodes a ListAudienceSegmentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse + * @returns {google.ads.admanager.v1.ListAudienceSegmentsResponse} ListAudienceSegmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomFieldsResponse.decode = function decode(reader, length, error) { + ListAudienceSegmentsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomFieldsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListAudienceSegmentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.customFields && message.customFields.length)) - message.customFields = []; - message.customFields.push($root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32())); + if (!(message.audienceSegments && message.audienceSegments.length)) + message.audienceSegments = []; + message.audienceSegments.push($root.google.ads.admanager.v1.AudienceSegment.decode(reader, reader.uint32())); break; } case 2: { @@ -14290,39 +13412,39 @@ }; /** - * Decodes a ListCustomFieldsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAudienceSegmentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse + * @returns {google.ads.admanager.v1.ListAudienceSegmentsResponse} ListAudienceSegmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { + ListAudienceSegmentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomFieldsResponse message. + * Verifies a ListAudienceSegmentsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomFieldsResponse.verify = function verify(message) { + ListAudienceSegmentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.customFields != null && message.hasOwnProperty("customFields")) { - if (!Array.isArray(message.customFields)) - return "customFields: array expected"; - for (var i = 0; i < message.customFields.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomField.verify(message.customFields[i]); + if (message.audienceSegments != null && message.hasOwnProperty("audienceSegments")) { + if (!Array.isArray(message.audienceSegments)) + return "audienceSegments: array expected"; + for (var i = 0; i < message.audienceSegments.length; ++i) { + var error = $root.google.ads.admanager.v1.AudienceSegment.verify(message.audienceSegments[i]); if (error) - return "customFields." + error; + return "audienceSegments." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -14335,25 +13457,25 @@ }; /** - * Creates a ListCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAudienceSegmentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse + * @returns {google.ads.admanager.v1.ListAudienceSegmentsResponse} ListAudienceSegmentsResponse */ - ListCustomFieldsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomFieldsResponse) + ListAudienceSegmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListAudienceSegmentsResponse) return object; - var message = new $root.google.ads.admanager.v1.ListCustomFieldsResponse(); - if (object.customFields) { - if (!Array.isArray(object.customFields)) - throw TypeError(".google.ads.admanager.v1.ListCustomFieldsResponse.customFields: array expected"); - message.customFields = []; - for (var i = 0; i < object.customFields.length; ++i) { - if (typeof object.customFields[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListCustomFieldsResponse.customFields: object expected"); - message.customFields[i] = $root.google.ads.admanager.v1.CustomField.fromObject(object.customFields[i]); + var message = new $root.google.ads.admanager.v1.ListAudienceSegmentsResponse(); + if (object.audienceSegments) { + if (!Array.isArray(object.audienceSegments)) + throw TypeError(".google.ads.admanager.v1.ListAudienceSegmentsResponse.audienceSegments: array expected"); + message.audienceSegments = []; + for (var i = 0; i < object.audienceSegments.length; ++i) { + if (typeof object.audienceSegments[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListAudienceSegmentsResponse.audienceSegments: object expected"); + message.audienceSegments[i] = $root.google.ads.admanager.v1.AudienceSegment.fromObject(object.audienceSegments[i]); } } if (object.nextPageToken != null) @@ -14364,28 +13486,28 @@ }; /** - * Creates a plain object from a ListCustomFieldsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAudienceSegmentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static - * @param {google.ads.admanager.v1.ListCustomFieldsResponse} message ListCustomFieldsResponse + * @param {google.ads.admanager.v1.ListAudienceSegmentsResponse} message ListAudienceSegmentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomFieldsResponse.toObject = function toObject(message, options) { + ListAudienceSegmentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.customFields = []; + object.audienceSegments = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.customFields && message.customFields.length) { - object.customFields = []; - for (var j = 0; j < message.customFields.length; ++j) - object.customFields[j] = $root.google.ads.admanager.v1.CustomField.toObject(message.customFields[j], options); + if (message.audienceSegments && message.audienceSegments.length) { + object.audienceSegments = []; + for (var j = 0; j < message.audienceSegments.length; ++j) + object.audienceSegments[j] = $root.google.ads.admanager.v1.AudienceSegment.toObject(message.audienceSegments[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -14395,53 +13517,53 @@ }; /** - * Converts this ListCustomFieldsResponse to JSON. + * Converts this ListAudienceSegmentsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @instance * @returns {Object.} JSON object */ - ListCustomFieldsResponse.prototype.toJSON = function toJSON() { + ListAudienceSegmentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomFieldsResponse + * Gets the default type url for ListAudienceSegmentsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomFieldsResponse + * @memberof google.ads.admanager.v1.ListAudienceSegmentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAudienceSegmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomFieldsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListAudienceSegmentsResponse"; }; - return ListCustomFieldsResponse; + return ListAudienceSegmentsResponse; })(); - v1.CustomFieldValue = (function() { + v1.BandwidthGroup = (function() { /** - * Properties of a CustomFieldValue. + * Properties of a BandwidthGroup. * @memberof google.ads.admanager.v1 - * @interface ICustomFieldValue - * @property {string|null} [customField] CustomFieldValue customField - * @property {google.ads.admanager.v1.CustomFieldValue.IValue|null} [value] CustomFieldValue value + * @interface IBandwidthGroup + * @property {string|null} [name] BandwidthGroup name + * @property {string|null} [displayName] BandwidthGroup displayName */ /** - * Constructs a new CustomFieldValue. + * Constructs a new BandwidthGroup. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomFieldValue. - * @implements ICustomFieldValue + * @classdesc Represents a BandwidthGroup. + * @implements IBandwidthGroup * @constructor - * @param {google.ads.admanager.v1.ICustomFieldValue=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBandwidthGroup=} [properties] Properties to set */ - function CustomFieldValue(properties) { + function BandwidthGroup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14449,100 +13571,106 @@ } /** - * CustomFieldValue customField. - * @member {string} customField - * @memberof google.ads.admanager.v1.CustomFieldValue + * BandwidthGroup name. + * @member {string|null|undefined} name + * @memberof google.ads.admanager.v1.BandwidthGroup * @instance */ - CustomFieldValue.prototype.customField = ""; + BandwidthGroup.prototype.name = null; /** - * CustomFieldValue value. - * @member {google.ads.admanager.v1.CustomFieldValue.IValue|null|undefined} value - * @memberof google.ads.admanager.v1.CustomFieldValue + * BandwidthGroup displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.BandwidthGroup * @instance */ - CustomFieldValue.prototype.value = null; + BandwidthGroup.prototype.displayName = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomFieldValue.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), + Object.defineProperty(BandwidthGroup.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BandwidthGroup.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CustomFieldValue instance using the specified properties. + * Creates a new BandwidthGroup instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static - * @param {google.ads.admanager.v1.ICustomFieldValue=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue instance + * @param {google.ads.admanager.v1.IBandwidthGroup=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup instance */ - CustomFieldValue.create = function create(properties) { - return new CustomFieldValue(properties); + BandwidthGroup.create = function create(properties) { + return new BandwidthGroup(properties); }; /** - * Encodes the specified CustomFieldValue message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. + * Encodes the specified BandwidthGroup message. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static - * @param {google.ads.admanager.v1.ICustomFieldValue} message CustomFieldValue message or plain object to encode + * @param {google.ads.admanager.v1.IBandwidthGroup} message BandwidthGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldValue.encode = function encode(message, writer) { + BandwidthGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customField != null && Object.hasOwnProperty.call(message, "customField")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.customField); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.ads.admanager.v1.CustomFieldValue.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified CustomFieldValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. + * Encodes the specified BandwidthGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static - * @param {google.ads.admanager.v1.ICustomFieldValue} message CustomFieldValue message or plain object to encode + * @param {google.ads.admanager.v1.IBandwidthGroup} message BandwidthGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomFieldValue.encodeDelimited = function encodeDelimited(message, writer) { + BandwidthGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomFieldValue message from the specified reader or buffer. + * Decodes a BandwidthGroup message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue + * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldValue.decode = function decode(reader, length, error) { + BandwidthGroup.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BandwidthGroup(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.customField = reader.string(); + message.name = reader.string(); break; } case 2: { - message.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } default: @@ -14554,460 +13682,239 @@ }; /** - * Decodes a CustomFieldValue message from the specified reader or buffer, length delimited. + * Decodes a BandwidthGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue + * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomFieldValue.decodeDelimited = function decodeDelimited(reader) { + BandwidthGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomFieldValue message. + * Verifies a BandwidthGroup message. * @function verify - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomFieldValue.verify = function verify(message) { + BandwidthGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.customField != null && message.hasOwnProperty("customField")) - if (!$util.isString(message.customField)) - return "customField: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - { - var error = $root.google.ads.admanager.v1.CustomFieldValue.Value.verify(message.value); - if (error) - return "value." + error; - } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; } return null; }; /** - * Creates a CustomFieldValue message from a plain object. Also converts values to their respective internal types. + * Creates a BandwidthGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue + * @returns {google.ads.admanager.v1.BandwidthGroup} BandwidthGroup */ - CustomFieldValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldValue) + BandwidthGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BandwidthGroup) return object; - var message = new $root.google.ads.admanager.v1.CustomFieldValue(); - if (object.customField != null) - message.customField = String(object.customField); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.ads.admanager.v1.CustomFieldValue.value: object expected"); - message.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.fromObject(object.value); - } + var message = new $root.google.ads.admanager.v1.BandwidthGroup(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a CustomFieldValue message. Also converts values to other types if specified. + * Creates a plain object from a BandwidthGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static - * @param {google.ads.admanager.v1.CustomFieldValue} message CustomFieldValue + * @param {google.ads.admanager.v1.BandwidthGroup} message BandwidthGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomFieldValue.toObject = function toObject(message, options) { + BandwidthGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.customField = ""; - if (message.customField != null && message.hasOwnProperty("customField")) - object.customField = message.customField; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.toObject(message.value, options); + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; if (options.oneofs) - object._value = "value"; + object._name = "name"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; } return object; }; /** - * Converts this CustomFieldValue to JSON. + * Converts this BandwidthGroup to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @instance * @returns {Object.} JSON object */ - CustomFieldValue.prototype.toJSON = function toJSON() { + BandwidthGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomFieldValue + * Gets the default type url for BandwidthGroup * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldValue + * @memberof google.ads.admanager.v1.BandwidthGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomFieldValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BandwidthGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldValue"; + return typeUrlPrefix + "/google.ads.admanager.v1.BandwidthGroup"; }; - CustomFieldValue.Value = (function() { + return BandwidthGroup; + })(); - /** - * Properties of a Value. - * @memberof google.ads.admanager.v1.CustomFieldValue - * @interface IValue - * @property {number|Long|null} [dropdownValue] Value dropdownValue - * @property {string|null} [stringValue] Value stringValue - * @property {number|null} [numberValue] Value numberValue - * @property {boolean|null} [toggleValue] Value toggleValue - */ + v1.BandwidthGroupService = (function() { - /** - * Constructs a new Value. - * @memberof google.ads.admanager.v1.CustomFieldValue - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.ads.admanager.v1.CustomFieldValue.IValue=} [properties] Properties to set - */ - function Value(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 BandwidthGroupService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BandwidthGroupService + * @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 BandwidthGroupService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Value dropdownValue. - * @member {number|Long|null|undefined} dropdownValue - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - */ - Value.prototype.dropdownValue = null; + (BandwidthGroupService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BandwidthGroupService; - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - */ - Value.prototype.stringValue = null; + /** + * Creates new BandwidthGroupService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @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 {BandwidthGroupService} RPC service. Useful where requests and/or responses are streamed. + */ + BandwidthGroupService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - */ - Value.prototype.numberValue = null; + /** + * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|getBandwidthGroup}. + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @typedef GetBandwidthGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BandwidthGroup} [response] BandwidthGroup + */ - /** - * Value toggleValue. - * @member {boolean|null|undefined} toggleValue - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - */ - Value.prototype.toggleValue = null; + /** + * Calls GetBandwidthGroup. + * @function getBandwidthGroup + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @instance + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} request GetBandwidthGroupRequest message or plain object + * @param {google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroupCallback} callback Node-style callback called with the error, if any, and BandwidthGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BandwidthGroupService.prototype.getBandwidthGroup = function getBandwidthGroup(request, callback) { + return this.rpcCall(getBandwidthGroup, $root.google.ads.admanager.v1.GetBandwidthGroupRequest, $root.google.ads.admanager.v1.BandwidthGroup, request, callback); + }, "name", { value: "GetBandwidthGroup" }); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Calls GetBandwidthGroup. + * @function getBandwidthGroup + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @instance + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} request GetBandwidthGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Value value. - * @member {"dropdownValue"|"stringValue"|"numberValue"|"toggleValue"|undefined} value - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - */ - Object.defineProperty(Value.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["dropdownValue", "stringValue", "numberValue", "toggleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Callback as used by {@link google.ads.admanager.v1.BandwidthGroupService|listBandwidthGroups}. + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @typedef ListBandwidthGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListBandwidthGroupsResponse} [response] ListBandwidthGroupsResponse + */ - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {google.ads.admanager.v1.CustomFieldValue.IValue=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * Calls ListBandwidthGroups. + * @function listBandwidthGroups + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @instance + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} request ListBandwidthGroupsRequest message or plain object + * @param {google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroupsCallback} callback Node-style callback called with the error, if any, and ListBandwidthGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BandwidthGroupService.prototype.listBandwidthGroups = function listBandwidthGroups(request, callback) { + return this.rpcCall(listBandwidthGroups, $root.google.ads.admanager.v1.ListBandwidthGroupsRequest, $root.google.ads.admanager.v1.ListBandwidthGroupsResponse, request, callback); + }, "name", { value: "ListBandwidthGroups" }); - /** - * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.Value.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {google.ads.admanager.v1.CustomFieldValue.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dropdownValue != null && Object.hasOwnProperty.call(message, "dropdownValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dropdownValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.numberValue); - if (message.toggleValue != null && Object.hasOwnProperty.call(message, "toggleValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toggleValue); - return writer; - }; + /** + * Calls ListBandwidthGroups. + * @function listBandwidthGroups + * @memberof google.ads.admanager.v1.BandwidthGroupService + * @instance + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} request ListBandwidthGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {google.ads.admanager.v1.CustomFieldValue.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return BandwidthGroupService; + })(); - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldValue.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dropdownValue = reader.int64(); - break; - } - case 2: { - message.stringValue = reader.string(); - break; - } - case 3: { - message.numberValue = reader.double(); - break; - } - case 4: { - message.toggleValue = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.GetBandwidthGroupRequest = (function() { - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dropdownValue != null && message.hasOwnProperty("dropdownValue")) { - properties.value = 1; - if (!$util.isInteger(message.dropdownValue) && !(message.dropdownValue && $util.isInteger(message.dropdownValue.low) && $util.isInteger(message.dropdownValue.high))) - return "dropdownValue: integer|Long expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.toggleValue != null && message.hasOwnProperty("toggleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.toggleValue !== "boolean") - return "toggleValue: boolean expected"; - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomFieldValue.Value) - return object; - var message = new $root.google.ads.admanager.v1.CustomFieldValue.Value(); - if (object.dropdownValue != null) - if ($util.Long) - (message.dropdownValue = $util.Long.fromValue(object.dropdownValue)).unsigned = false; - else if (typeof object.dropdownValue === "string") - message.dropdownValue = parseInt(object.dropdownValue, 10); - else if (typeof object.dropdownValue === "number") - message.dropdownValue = object.dropdownValue; - else if (typeof object.dropdownValue === "object") - message.dropdownValue = new $util.LongBits(object.dropdownValue.low >>> 0, object.dropdownValue.high >>> 0).toNumber(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.toggleValue != null) - message.toggleValue = Boolean(object.toggleValue); - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {google.ads.admanager.v1.CustomFieldValue.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dropdownValue != null && message.hasOwnProperty("dropdownValue")) { - if (typeof message.dropdownValue === "number") - object.dropdownValue = options.longs === String ? String(message.dropdownValue) : message.dropdownValue; - else - object.dropdownValue = options.longs === String ? $util.Long.prototype.toString.call(message.dropdownValue) : options.longs === Number ? new $util.LongBits(message.dropdownValue.low >>> 0, message.dropdownValue.high >>> 0).toNumber() : message.dropdownValue; - if (options.oneofs) - object.value = "dropdownValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.value = "numberValue"; - } - if (message.toggleValue != null && message.hasOwnProperty("toggleValue")) { - object.toggleValue = message.toggleValue; - if (options.oneofs) - object.value = "toggleValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomFieldValue.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldValue.Value"; - }; - - return Value; - })(); - - return CustomFieldValue; - })(); - - v1.CustomTargetingKeyStatusEnum = (function() { - - /** - * Properties of a CustomTargetingKeyStatusEnum. - * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingKeyStatusEnum - */ + /** + * Properties of a GetBandwidthGroupRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetBandwidthGroupRequest + * @property {string|null} [name] GetBandwidthGroupRequest name + */ /** - * Constructs a new CustomTargetingKeyStatusEnum. + * Constructs a new GetBandwidthGroupRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingKeyStatusEnum. - * @implements ICustomTargetingKeyStatusEnum + * @classdesc Represents a GetBandwidthGroupRequest. + * @implements IGetBandwidthGroupRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest=} [properties] Properties to set */ - function CustomTargetingKeyStatusEnum(properties) { + function GetBandwidthGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15015,65 +13922,79 @@ } /** - * Creates a new CustomTargetingKeyStatusEnum instance using the specified properties. + * GetBandwidthGroupRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest + * @instance + */ + GetBandwidthGroupRequest.prototype.name = ""; + + /** + * Creates a new GetBandwidthGroupRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum instance + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest instance */ - CustomTargetingKeyStatusEnum.create = function create(properties) { - return new CustomTargetingKeyStatusEnum(properties); + GetBandwidthGroupRequest.create = function create(properties) { + return new GetBandwidthGroupRequest(properties); }; /** - * Encodes the specified CustomTargetingKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. + * Encodes the specified GetBandwidthGroupRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} message GetBandwidthGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyStatusEnum.encode = function encode(message, writer) { + GetBandwidthGroupRequest.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 CustomTargetingKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. + * Encodes the specified GetBandwidthGroupRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBandwidthGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetBandwidthGroupRequest} message GetBandwidthGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + GetBandwidthGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer. + * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum + * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyStatusEnum.decode = function decode(reader, length, error) { + GetBandwidthGroupRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetBandwidthGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15083,124 +14004,127 @@ }; /** - * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a GetBandwidthGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum + * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyStatusEnum.decodeDelimited = function decodeDelimited(reader) { + GetBandwidthGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingKeyStatusEnum message. + * Verifies a GetBandwidthGroupRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingKeyStatusEnum.verify = function verify(message) { + GetBandwidthGroupRequest.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 CustomTargetingKeyStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetBandwidthGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum + * @returns {google.ads.admanager.v1.GetBandwidthGroupRequest} GetBandwidthGroupRequest */ - CustomTargetingKeyStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum) + GetBandwidthGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetBandwidthGroupRequest) return object; - return new $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum(); + var message = new $root.google.ads.admanager.v1.GetBandwidthGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a CustomTargetingKeyStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a GetBandwidthGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static - * @param {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum + * @param {google.ads.admanager.v1.GetBandwidthGroupRequest} message GetBandwidthGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingKeyStatusEnum.toObject = function toObject() { - return {}; + GetBandwidthGroupRequest.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 CustomTargetingKeyStatusEnum to JSON. + * Converts this GetBandwidthGroupRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @instance * @returns {Object.} JSON object */ - CustomTargetingKeyStatusEnum.prototype.toJSON = function toJSON() { + GetBandwidthGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingKeyStatusEnum + * Gets the default type url for GetBandwidthGroupRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum + * @memberof google.ads.admanager.v1.GetBandwidthGroupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingKeyStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBandwidthGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetBandwidthGroupRequest"; }; - /** - * CustomTargetingKeyStatus enum. - * @name google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus - * @enum {number} - * @property {number} CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - return CustomTargetingKeyStatusEnum; + return GetBandwidthGroupRequest; })(); - v1.CustomTargetingKeyTypeEnum = (function() { + v1.ListBandwidthGroupsRequest = (function() { /** - * Properties of a CustomTargetingKeyTypeEnum. + * Properties of a ListBandwidthGroupsRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingKeyTypeEnum + * @interface IListBandwidthGroupsRequest + * @property {string|null} [parent] ListBandwidthGroupsRequest parent + * @property {number|null} [pageSize] ListBandwidthGroupsRequest pageSize + * @property {string|null} [pageToken] ListBandwidthGroupsRequest pageToken + * @property {string|null} [filter] ListBandwidthGroupsRequest filter + * @property {string|null} [orderBy] ListBandwidthGroupsRequest orderBy + * @property {number|null} [skip] ListBandwidthGroupsRequest skip */ /** - * Constructs a new CustomTargetingKeyTypeEnum. + * Constructs a new ListBandwidthGroupsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingKeyTypeEnum. - * @implements ICustomTargetingKeyTypeEnum + * @classdesc Represents a ListBandwidthGroupsRequest. + * @implements IListBandwidthGroupsRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest=} [properties] Properties to set */ - function CustomTargetingKeyTypeEnum(properties) { + function ListBandwidthGroupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15208,65 +14132,149 @@ } /** - * Creates a new CustomTargetingKeyTypeEnum instance using the specified properties. + * ListBandwidthGroupsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.parent = ""; + + /** + * ListBandwidthGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.pageSize = 0; + + /** + * ListBandwidthGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.pageToken = ""; + + /** + * ListBandwidthGroupsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.filter = ""; + + /** + * ListBandwidthGroupsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.orderBy = ""; + + /** + * ListBandwidthGroupsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest + * @instance + */ + ListBandwidthGroupsRequest.prototype.skip = 0; + + /** + * Creates a new ListBandwidthGroupsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum instance + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest instance */ - CustomTargetingKeyTypeEnum.create = function create(properties) { - return new CustomTargetingKeyTypeEnum(properties); + ListBandwidthGroupsRequest.create = function create(properties) { + return new ListBandwidthGroupsRequest(properties); }; /** - * Encodes the specified CustomTargetingKeyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. + * Encodes the specified ListBandwidthGroupsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} message ListBandwidthGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyTypeEnum.encode = function encode(message, writer) { + ListBandwidthGroupsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified CustomTargetingKeyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. + * Encodes the specified ListBandwidthGroupsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListBandwidthGroupsRequest} message ListBandwidthGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + ListBandwidthGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer. + * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyTypeEnum.decode = function decode(reader, length, error) { + ListBandwidthGroupsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBandwidthGroupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; + } + case 6: { + message.skip = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -15276,124 +14284,166 @@ }; /** - * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a ListBandwidthGroupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyTypeEnum.decodeDelimited = function decodeDelimited(reader) { + ListBandwidthGroupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingKeyTypeEnum message. + * Verifies a ListBandwidthGroupsRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingKeyTypeEnum.verify = function verify(message) { + ListBandwidthGroupsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a CustomTargetingKeyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListBandwidthGroupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsRequest} ListBandwidthGroupsRequest */ - CustomTargetingKeyTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum) + ListBandwidthGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBandwidthGroupsRequest) return object; - return new $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum(); + var message = new $root.google.ads.admanager.v1.ListBandwidthGroupsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; }; /** - * Creates a plain object from a CustomTargetingKeyTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a ListBandwidthGroupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static - * @param {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum + * @param {google.ads.admanager.v1.ListBandwidthGroupsRequest} message ListBandwidthGroupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingKeyTypeEnum.toObject = function toObject() { - return {}; + ListBandwidthGroupsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; }; /** - * Converts this CustomTargetingKeyTypeEnum to JSON. + * Converts this ListBandwidthGroupsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @instance * @returns {Object.} JSON object */ - CustomTargetingKeyTypeEnum.prototype.toJSON = function toJSON() { + ListBandwidthGroupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingKeyTypeEnum + * Gets the default type url for ListBandwidthGroupsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingKeyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBandwidthGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBandwidthGroupsRequest"; }; + return ListBandwidthGroupsRequest; + })(); + + v1.ListBandwidthGroupsResponse = (function() { + /** - * CustomTargetingKeyType enum. - * @name google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType - * @enum {number} - * @property {number} CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED value - * @property {number} PREDEFINED=1 PREDEFINED value - * @property {number} FREEFORM=2 FREEFORM value - */ - CustomTargetingKeyTypeEnum.CustomTargetingKeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREDEFINED"] = 1; - values[valuesById[2] = "FREEFORM"] = 2; - return values; - })(); - - return CustomTargetingKeyTypeEnum; - })(); - - v1.CustomTargetingKeyReportableTypeEnum = (function() { - - /** - * Properties of a CustomTargetingKeyReportableTypeEnum. + * Properties of a ListBandwidthGroupsResponse. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingKeyReportableTypeEnum + * @interface IListBandwidthGroupsResponse + * @property {Array.|null} [bandwidthGroups] ListBandwidthGroupsResponse bandwidthGroups + * @property {string|null} [nextPageToken] ListBandwidthGroupsResponse nextPageToken + * @property {number|null} [totalSize] ListBandwidthGroupsResponse totalSize */ /** - * Constructs a new CustomTargetingKeyReportableTypeEnum. + * Constructs a new ListBandwidthGroupsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingKeyReportableTypeEnum. - * @implements ICustomTargetingKeyReportableTypeEnum + * @classdesc Represents a ListBandwidthGroupsResponse. + * @implements IListBandwidthGroupsResponse * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse=} [properties] Properties to set */ - function CustomTargetingKeyReportableTypeEnum(properties) { + function ListBandwidthGroupsResponse(properties) { + this.bandwidthGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15401,65 +14451,110 @@ } /** - * Creates a new CustomTargetingKeyReportableTypeEnum instance using the specified properties. + * ListBandwidthGroupsResponse bandwidthGroups. + * @member {Array.} bandwidthGroups + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @instance + */ + ListBandwidthGroupsResponse.prototype.bandwidthGroups = $util.emptyArray; + + /** + * ListBandwidthGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @instance + */ + ListBandwidthGroupsResponse.prototype.nextPageToken = ""; + + /** + * ListBandwidthGroupsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse + * @instance + */ + ListBandwidthGroupsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListBandwidthGroupsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum instance + * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse instance */ - CustomTargetingKeyReportableTypeEnum.create = function create(properties) { - return new CustomTargetingKeyReportableTypeEnum(properties); + ListBandwidthGroupsResponse.create = function create(properties) { + return new ListBandwidthGroupsResponse(properties); }; /** - * Encodes the specified CustomTargetingKeyReportableTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. + * Encodes the specified ListBandwidthGroupsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse} message ListBandwidthGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyReportableTypeEnum.encode = function encode(message, writer) { + ListBandwidthGroupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.bandwidthGroups != null && message.bandwidthGroups.length) + for (var i = 0; i < message.bandwidthGroups.length; ++i) + $root.google.ads.admanager.v1.BandwidthGroup.encode(message.bandwidthGroups[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified CustomTargetingKeyReportableTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. + * Encodes the specified ListBandwidthGroupsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBandwidthGroupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListBandwidthGroupsResponse} message ListBandwidthGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKeyReportableTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + ListBandwidthGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer. + * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyReportableTypeEnum.decode = function decode(reader, length, error) { + ListBandwidthGroupsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBandwidthGroupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.bandwidthGroups && message.bandwidthGroups.length)) + message.bandwidthGroups = []; + message.bandwidthGroups.push($root.google.ads.admanager.v1.BandwidthGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -15469,133 +14564,158 @@ }; /** - * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a ListBandwidthGroupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKeyReportableTypeEnum.decodeDelimited = function decodeDelimited(reader) { + ListBandwidthGroupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingKeyReportableTypeEnum message. + * Verifies a ListBandwidthGroupsResponse message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingKeyReportableTypeEnum.verify = function verify(message) { + ListBandwidthGroupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.bandwidthGroups != null && message.hasOwnProperty("bandwidthGroups")) { + if (!Array.isArray(message.bandwidthGroups)) + return "bandwidthGroups: array expected"; + for (var i = 0; i < message.bandwidthGroups.length; ++i) { + var error = $root.google.ads.admanager.v1.BandwidthGroup.verify(message.bandwidthGroups[i]); + if (error) + return "bandwidthGroups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a CustomTargetingKeyReportableTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListBandwidthGroupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum + * @returns {google.ads.admanager.v1.ListBandwidthGroupsResponse} ListBandwidthGroupsResponse */ - CustomTargetingKeyReportableTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum) + ListBandwidthGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBandwidthGroupsResponse) return object; - return new $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum(); + var message = new $root.google.ads.admanager.v1.ListBandwidthGroupsResponse(); + if (object.bandwidthGroups) { + if (!Array.isArray(object.bandwidthGroups)) + throw TypeError(".google.ads.admanager.v1.ListBandwidthGroupsResponse.bandwidthGroups: array expected"); + message.bandwidthGroups = []; + for (var i = 0; i < object.bandwidthGroups.length; ++i) { + if (typeof object.bandwidthGroups[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListBandwidthGroupsResponse.bandwidthGroups: object expected"); + message.bandwidthGroups[i] = $root.google.ads.admanager.v1.BandwidthGroup.fromObject(object.bandwidthGroups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; }; /** - * Creates a plain object from a CustomTargetingKeyReportableTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a ListBandwidthGroupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static - * @param {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum + * @param {google.ads.admanager.v1.ListBandwidthGroupsResponse} message ListBandwidthGroupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingKeyReportableTypeEnum.toObject = function toObject() { - return {}; + ListBandwidthGroupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bandwidthGroups = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.bandwidthGroups && message.bandwidthGroups.length) { + object.bandwidthGroups = []; + for (var j = 0; j < message.bandwidthGroups.length; ++j) + object.bandwidthGroups[j] = $root.google.ads.admanager.v1.BandwidthGroup.toObject(message.bandwidthGroups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; }; /** - * Converts this CustomTargetingKeyReportableTypeEnum to JSON. + * Converts this ListBandwidthGroupsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @instance * @returns {Object.} JSON object */ - CustomTargetingKeyReportableTypeEnum.prototype.toJSON = function toJSON() { + ListBandwidthGroupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingKeyReportableTypeEnum + * Gets the default type url for ListBandwidthGroupsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + * @memberof google.ads.admanager.v1.ListBandwidthGroupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingKeyReportableTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBandwidthGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBandwidthGroupsResponse"; }; - /** - * CustomTargetingKeyReportableType enum. - * @name google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType - * @enum {number} - * @property {number} CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED value - * @property {number} OFF=1 OFF value - * @property {number} ON=2 ON value - * @property {number} CUSTOM_DIMENSION=3 CUSTOM_DIMENSION value - */ - CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "OFF"] = 1; - values[valuesById[2] = "ON"] = 2; - values[valuesById[3] = "CUSTOM_DIMENSION"] = 3; - return values; - })(); - - return CustomTargetingKeyReportableTypeEnum; + return ListBandwidthGroupsResponse; })(); - v1.CustomTargetingKey = (function() { + v1.BrowserLanguage = (function() { /** - * Properties of a CustomTargetingKey. + * Properties of a BrowserLanguage. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingKey - * @property {string|null} [name] CustomTargetingKey name - * @property {number|Long|null} [customTargetingKeyId] CustomTargetingKey customTargetingKeyId - * @property {string|null} [adTagName] CustomTargetingKey adTagName - * @property {string|null} [displayName] CustomTargetingKey displayName - * @property {google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null} [type] CustomTargetingKey type - * @property {google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null} [status] CustomTargetingKey status - * @property {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null} [reportableType] CustomTargetingKey reportableType + * @interface IBrowserLanguage + * @property {string|null} [name] BrowserLanguage name + * @property {string|null} [displayName] BrowserLanguage displayName */ /** - * Constructs a new CustomTargetingKey. + * Constructs a new BrowserLanguage. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingKey. - * @implements ICustomTargetingKey + * @classdesc Represents a BrowserLanguage. + * @implements IBrowserLanguage * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingKey=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBrowserLanguage=} [properties] Properties to set */ - function CustomTargetingKey(properties) { + function BrowserLanguage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15603,130 +14723,89 @@ } /** - * CustomTargetingKey name. + * BrowserLanguage name. * @member {string} name - * @memberof google.ads.admanager.v1.CustomTargetingKey - * @instance - */ - CustomTargetingKey.prototype.name = ""; - - /** - * CustomTargetingKey customTargetingKeyId. - * @member {number|Long} customTargetingKeyId - * @memberof google.ads.admanager.v1.CustomTargetingKey - * @instance - */ - CustomTargetingKey.prototype.customTargetingKeyId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CustomTargetingKey adTagName. - * @member {string} adTagName - * @memberof google.ads.admanager.v1.CustomTargetingKey - * @instance - */ - CustomTargetingKey.prototype.adTagName = ""; - - /** - * CustomTargetingKey displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @instance */ - CustomTargetingKey.prototype.displayName = ""; + BrowserLanguage.prototype.name = ""; /** - * CustomTargetingKey type. - * @member {google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType} type - * @memberof google.ads.admanager.v1.CustomTargetingKey + * BrowserLanguage displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.BrowserLanguage * @instance */ - CustomTargetingKey.prototype.type = 0; + BrowserLanguage.prototype.displayName = null; - /** - * CustomTargetingKey status. - * @member {google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus} status - * @memberof google.ads.admanager.v1.CustomTargetingKey - * @instance - */ - CustomTargetingKey.prototype.status = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * CustomTargetingKey reportableType. - * @member {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType} reportableType - * @memberof google.ads.admanager.v1.CustomTargetingKey - * @instance - */ - CustomTargetingKey.prototype.reportableType = 0; + // Virtual OneOf for proto3 optional field + Object.defineProperty(BrowserLanguage.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CustomTargetingKey instance using the specified properties. + * Creates a new BrowserLanguage instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static - * @param {google.ads.admanager.v1.ICustomTargetingKey=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey instance + * @param {google.ads.admanager.v1.IBrowserLanguage=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BrowserLanguage} BrowserLanguage instance */ - CustomTargetingKey.create = function create(properties) { - return new CustomTargetingKey(properties); + BrowserLanguage.create = function create(properties) { + return new BrowserLanguage(properties); }; /** - * Encodes the specified CustomTargetingKey message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. + * Encodes the specified BrowserLanguage message. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguage.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static - * @param {google.ads.admanager.v1.ICustomTargetingKey} message CustomTargetingKey message or plain object to encode + * @param {google.ads.admanager.v1.IBrowserLanguage} message BrowserLanguage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKey.encode = function encode(message, writer) { + BrowserLanguage.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.customTargetingKeyId != null && Object.hasOwnProperty.call(message, "customTargetingKeyId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.customTargetingKeyId); - if (message.adTagName != null && Object.hasOwnProperty.call(message, "adTagName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.adTagName); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); - if (message.reportableType != null && Object.hasOwnProperty.call(message, "reportableType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.reportableType); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified CustomTargetingKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. + * Encodes the specified BrowserLanguage message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguage.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static - * @param {google.ads.admanager.v1.ICustomTargetingKey} message CustomTargetingKey message or plain object to encode + * @param {google.ads.admanager.v1.IBrowserLanguage} message BrowserLanguage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingKey.encodeDelimited = function encodeDelimited(message, writer) { + BrowserLanguage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingKey message from the specified reader or buffer. + * Decodes a BrowserLanguage message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey + * @returns {google.ads.admanager.v1.BrowserLanguage} BrowserLanguage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKey.decode = function decode(reader, length, error) { + BrowserLanguage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BrowserLanguage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -15737,29 +14816,9 @@ break; } case 2: { - message.customTargetingKeyId = reader.int64(); - break; - } - case 3: { - message.adTagName = reader.string(); - break; - } - case 4: { message.displayName = reader.string(); break; } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.status = reader.int32(); - break; - } - case 7: { - message.reportableType = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -15769,363 +14828,236 @@ }; /** - * Decodes a CustomTargetingKey message from the specified reader or buffer, length delimited. + * Decodes a BrowserLanguage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey + * @returns {google.ads.admanager.v1.BrowserLanguage} BrowserLanguage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingKey.decodeDelimited = function decodeDelimited(reader) { + BrowserLanguage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingKey message. + * Verifies a BrowserLanguage message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingKey.verify = function verify(message) { + BrowserLanguage.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.customTargetingKeyId != null && message.hasOwnProperty("customTargetingKeyId")) - if (!$util.isInteger(message.customTargetingKeyId) && !(message.customTargetingKeyId && $util.isInteger(message.customTargetingKeyId.low) && $util.isInteger(message.customTargetingKeyId.high))) - return "customTargetingKeyId: integer|Long expected"; - if (message.adTagName != null && message.hasOwnProperty("adTagName")) - if (!$util.isString(message.adTagName)) - return "adTagName: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.reportableType != null && message.hasOwnProperty("reportableType")) - switch (message.reportableType) { - default: - return "reportableType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + } return null; }; /** - * Creates a CustomTargetingKey message from a plain object. Also converts values to their respective internal types. + * Creates a BrowserLanguage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey + * @returns {google.ads.admanager.v1.BrowserLanguage} BrowserLanguage */ - CustomTargetingKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKey) + BrowserLanguage.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BrowserLanguage) return object; - var message = new $root.google.ads.admanager.v1.CustomTargetingKey(); + var message = new $root.google.ads.admanager.v1.BrowserLanguage(); if (object.name != null) message.name = String(object.name); - if (object.customTargetingKeyId != null) - if ($util.Long) - (message.customTargetingKeyId = $util.Long.fromValue(object.customTargetingKeyId)).unsigned = false; - else if (typeof object.customTargetingKeyId === "string") - message.customTargetingKeyId = parseInt(object.customTargetingKeyId, 10); - else if (typeof object.customTargetingKeyId === "number") - message.customTargetingKeyId = object.customTargetingKeyId; - else if (typeof object.customTargetingKeyId === "object") - message.customTargetingKeyId = new $util.LongBits(object.customTargetingKeyId.low >>> 0, object.customTargetingKeyId.high >>> 0).toNumber(); - if (object.adTagName != null) - message.adTagName = String(object.adTagName); if (object.displayName != null) message.displayName = String(object.displayName); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PREDEFINED": - case 1: - message.type = 1; - break; - case "FREEFORM": - case 2: - message.type = 2; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "ACTIVE": - case 1: - message.status = 1; - break; - case "INACTIVE": - case 2: - message.status = 2; - break; - } - switch (object.reportableType) { - default: - if (typeof object.reportableType === "number") { - message.reportableType = object.reportableType; - break; - } - break; - case "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED": - case 0: - message.reportableType = 0; - break; - case "OFF": - case 1: - message.reportableType = 1; - break; - case "ON": - case 2: - message.reportableType = 2; - break; - case "CUSTOM_DIMENSION": - case 3: - message.reportableType = 3; - break; - } return message; }; /** - * Creates a plain object from a CustomTargetingKey message. Also converts values to other types if specified. + * Creates a plain object from a BrowserLanguage message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static - * @param {google.ads.admanager.v1.CustomTargetingKey} message CustomTargetingKey + * @param {google.ads.admanager.v1.BrowserLanguage} message BrowserLanguage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingKey.toObject = function toObject(message, options) { + BrowserLanguage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.customTargetingKeyId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.customTargetingKeyId = options.longs === String ? "0" : 0; - object.adTagName = ""; - object.displayName = ""; - object.type = options.enums === String ? "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED" : 0; - object.status = options.enums === String ? "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED" : 0; - object.reportableType = options.enums === String ? "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED" : 0; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.customTargetingKeyId != null && message.hasOwnProperty("customTargetingKeyId")) - if (typeof message.customTargetingKeyId === "number") - object.customTargetingKeyId = options.longs === String ? String(message.customTargetingKeyId) : message.customTargetingKeyId; - else - object.customTargetingKeyId = options.longs === String ? $util.Long.prototype.toString.call(message.customTargetingKeyId) : options.longs === Number ? new $util.LongBits(message.customTargetingKeyId.low >>> 0, message.customTargetingKeyId.high >>> 0).toNumber() : message.customTargetingKeyId; - if (message.adTagName != null && message.hasOwnProperty("adTagName")) - object.adTagName = message.adTagName; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType[message.type] : message.type; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus[message.status] : message.status; - if (message.reportableType != null && message.hasOwnProperty("reportableType")) - object.reportableType = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType[message.reportableType] === undefined ? message.reportableType : $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType[message.reportableType] : message.reportableType; + if (options.oneofs) + object._displayName = "displayName"; + } return object; }; /** - * Converts this CustomTargetingKey to JSON. + * Converts this BrowserLanguage to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @instance * @returns {Object.} JSON object */ - CustomTargetingKey.prototype.toJSON = function toJSON() { + BrowserLanguage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingKey + * Gets the default type url for BrowserLanguage * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingKey + * @memberof google.ads.admanager.v1.BrowserLanguage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BrowserLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKey"; + return typeUrlPrefix + "/google.ads.admanager.v1.BrowserLanguage"; }; - return CustomTargetingKey; + return BrowserLanguage; })(); - v1.CustomTargetingKeyService = (function() { + v1.BrowserLanguageService = (function() { /** - * Constructs a new CustomTargetingKeyService service. + * Constructs a new BrowserLanguageService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingKeyService + * @classdesc Represents a BrowserLanguageService * @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 CustomTargetingKeyService(rpcImpl, requestDelimited, responseDelimited) { + function BrowserLanguageService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (CustomTargetingKeyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomTargetingKeyService; + (BrowserLanguageService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BrowserLanguageService; /** - * Creates new CustomTargetingKeyService service using the specified rpc implementation. + * Creates new BrowserLanguageService service using the specified rpc implementation. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @memberof google.ads.admanager.v1.BrowserLanguageService * @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 {CustomTargetingKeyService} RPC service. Useful where requests and/or responses are streamed. + * @returns {BrowserLanguageService} RPC service. Useful where requests and/or responses are streamed. */ - CustomTargetingKeyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + BrowserLanguageService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|getCustomTargetingKey}. - * @memberof google.ads.admanager.v1.CustomTargetingKeyService - * @typedef GetCustomTargetingKeyCallback + * Callback as used by {@link google.ads.admanager.v1.BrowserLanguageService|getBrowserLanguage}. + * @memberof google.ads.admanager.v1.BrowserLanguageService + * @typedef GetBrowserLanguageCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.CustomTargetingKey} [response] CustomTargetingKey + * @param {google.ads.admanager.v1.BrowserLanguage} [response] BrowserLanguage */ /** - * Calls GetCustomTargetingKey. - * @function getCustomTargetingKey - * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * Calls GetBrowserLanguage. + * @function getBrowserLanguage + * @memberof google.ads.admanager.v1.BrowserLanguageService * @instance - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} request GetCustomTargetingKeyRequest message or plain object - * @param {google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKeyCallback} callback Node-style callback called with the error, if any, and CustomTargetingKey + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest} request GetBrowserLanguageRequest message or plain object + * @param {google.ads.admanager.v1.BrowserLanguageService.GetBrowserLanguageCallback} callback Node-style callback called with the error, if any, and BrowserLanguage * @returns {undefined} * @variation 1 */ - Object.defineProperty(CustomTargetingKeyService.prototype.getCustomTargetingKey = function getCustomTargetingKey(request, callback) { - return this.rpcCall(getCustomTargetingKey, $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest, $root.google.ads.admanager.v1.CustomTargetingKey, request, callback); - }, "name", { value: "GetCustomTargetingKey" }); + Object.defineProperty(BrowserLanguageService.prototype.getBrowserLanguage = function getBrowserLanguage(request, callback) { + return this.rpcCall(getBrowserLanguage, $root.google.ads.admanager.v1.GetBrowserLanguageRequest, $root.google.ads.admanager.v1.BrowserLanguage, request, callback); + }, "name", { value: "GetBrowserLanguage" }); /** - * Calls GetCustomTargetingKey. - * @function getCustomTargetingKey - * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * Calls GetBrowserLanguage. + * @function getBrowserLanguage + * @memberof google.ads.admanager.v1.BrowserLanguageService * @instance - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} request GetCustomTargetingKeyRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest} request GetBrowserLanguageRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|listCustomTargetingKeys}. - * @memberof google.ads.admanager.v1.CustomTargetingKeyService - * @typedef ListCustomTargetingKeysCallback + * Callback as used by {@link google.ads.admanager.v1.BrowserLanguageService|listBrowserLanguages}. + * @memberof google.ads.admanager.v1.BrowserLanguageService + * @typedef ListBrowserLanguagesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListCustomTargetingKeysResponse} [response] ListCustomTargetingKeysResponse + * @param {google.ads.admanager.v1.ListBrowserLanguagesResponse} [response] ListBrowserLanguagesResponse */ /** - * Calls ListCustomTargetingKeys. - * @function listCustomTargetingKeys - * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * Calls ListBrowserLanguages. + * @function listBrowserLanguages + * @memberof google.ads.admanager.v1.BrowserLanguageService * @instance - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} request ListCustomTargetingKeysRequest message or plain object - * @param {google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeysCallback} callback Node-style callback called with the error, if any, and ListCustomTargetingKeysResponse + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest} request ListBrowserLanguagesRequest message or plain object + * @param {google.ads.admanager.v1.BrowserLanguageService.ListBrowserLanguagesCallback} callback Node-style callback called with the error, if any, and ListBrowserLanguagesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(CustomTargetingKeyService.prototype.listCustomTargetingKeys = function listCustomTargetingKeys(request, callback) { - return this.rpcCall(listCustomTargetingKeys, $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest, $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse, request, callback); - }, "name", { value: "ListCustomTargetingKeys" }); + Object.defineProperty(BrowserLanguageService.prototype.listBrowserLanguages = function listBrowserLanguages(request, callback) { + return this.rpcCall(listBrowserLanguages, $root.google.ads.admanager.v1.ListBrowserLanguagesRequest, $root.google.ads.admanager.v1.ListBrowserLanguagesResponse, request, callback); + }, "name", { value: "ListBrowserLanguages" }); /** - * Calls ListCustomTargetingKeys. - * @function listCustomTargetingKeys - * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * Calls ListBrowserLanguages. + * @function listBrowserLanguages + * @memberof google.ads.admanager.v1.BrowserLanguageService * @instance - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} request ListCustomTargetingKeysRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest} request ListBrowserLanguagesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return CustomTargetingKeyService; + return BrowserLanguageService; })(); - v1.GetCustomTargetingKeyRequest = (function() { + v1.GetBrowserLanguageRequest = (function() { /** - * Properties of a GetCustomTargetingKeyRequest. + * Properties of a GetBrowserLanguageRequest. * @memberof google.ads.admanager.v1 - * @interface IGetCustomTargetingKeyRequest - * @property {string|null} [name] GetCustomTargetingKeyRequest name + * @interface IGetBrowserLanguageRequest + * @property {string|null} [name] GetBrowserLanguageRequest name */ /** - * Constructs a new GetCustomTargetingKeyRequest. + * Constructs a new GetBrowserLanguageRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetCustomTargetingKeyRequest. - * @implements IGetCustomTargetingKeyRequest + * @classdesc Represents a GetBrowserLanguageRequest. + * @implements IGetBrowserLanguageRequest * @constructor - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest=} [properties] Properties to set */ - function GetCustomTargetingKeyRequest(properties) { + function GetBrowserLanguageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16133,35 +15065,35 @@ } /** - * GetCustomTargetingKeyRequest name. + * GetBrowserLanguageRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @instance */ - GetCustomTargetingKeyRequest.prototype.name = ""; + GetBrowserLanguageRequest.prototype.name = ""; /** - * Creates a new GetCustomTargetingKeyRequest instance using the specified properties. + * Creates a new GetBrowserLanguageRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest instance + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetBrowserLanguageRequest} GetBrowserLanguageRequest instance */ - GetCustomTargetingKeyRequest.create = function create(properties) { - return new GetCustomTargetingKeyRequest(properties); + GetBrowserLanguageRequest.create = function create(properties) { + return new GetBrowserLanguageRequest(properties); }; /** - * Encodes the specified GetCustomTargetingKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. + * Encodes the specified GetBrowserLanguageRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBrowserLanguageRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest} message GetBrowserLanguageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomTargetingKeyRequest.encode = function encode(message, writer) { + GetBrowserLanguageRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -16170,33 +15102,33 @@ }; /** - * Encodes the specified GetCustomTargetingKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. + * Encodes the specified GetBrowserLanguageRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBrowserLanguageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetBrowserLanguageRequest} message GetBrowserLanguageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomTargetingKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBrowserLanguageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer. + * Decodes a GetBrowserLanguageRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest + * @returns {google.ads.admanager.v1.GetBrowserLanguageRequest} GetBrowserLanguageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomTargetingKeyRequest.decode = function decode(reader, length, error) { + GetBrowserLanguageRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetBrowserLanguageRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16215,30 +15147,30 @@ }; /** - * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBrowserLanguageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest + * @returns {google.ads.admanager.v1.GetBrowserLanguageRequest} GetBrowserLanguageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomTargetingKeyRequest.decodeDelimited = function decodeDelimited(reader) { + GetBrowserLanguageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCustomTargetingKeyRequest message. + * Verifies a GetBrowserLanguageRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCustomTargetingKeyRequest.verify = function verify(message) { + GetBrowserLanguageRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -16248,32 +15180,32 @@ }; /** - * Creates a GetCustomTargetingKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBrowserLanguageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest + * @returns {google.ads.admanager.v1.GetBrowserLanguageRequest} GetBrowserLanguageRequest */ - GetCustomTargetingKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest) + GetBrowserLanguageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetBrowserLanguageRequest) return object; - var message = new $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest(); + var message = new $root.google.ads.admanager.v1.GetBrowserLanguageRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetCustomTargetingKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBrowserLanguageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static - * @param {google.ads.admanager.v1.GetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest + * @param {google.ads.admanager.v1.GetBrowserLanguageRequest} message GetBrowserLanguageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomTargetingKeyRequest.toObject = function toObject(message, options) { + GetBrowserLanguageRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16285,57 +15217,57 @@ }; /** - * Converts this GetCustomTargetingKeyRequest to JSON. + * Converts this GetBrowserLanguageRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @instance * @returns {Object.} JSON object */ - GetCustomTargetingKeyRequest.prototype.toJSON = function toJSON() { + GetBrowserLanguageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCustomTargetingKeyRequest + * Gets the default type url for GetBrowserLanguageRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @memberof google.ads.admanager.v1.GetBrowserLanguageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCustomTargetingKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBrowserLanguageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomTargetingKeyRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetBrowserLanguageRequest"; }; - return GetCustomTargetingKeyRequest; + return GetBrowserLanguageRequest; })(); - v1.ListCustomTargetingKeysRequest = (function() { + v1.ListBrowserLanguagesRequest = (function() { /** - * Properties of a ListCustomTargetingKeysRequest. + * Properties of a ListBrowserLanguagesRequest. * @memberof google.ads.admanager.v1 - * @interface IListCustomTargetingKeysRequest - * @property {string|null} [parent] ListCustomTargetingKeysRequest parent - * @property {number|null} [pageSize] ListCustomTargetingKeysRequest pageSize - * @property {string|null} [pageToken] ListCustomTargetingKeysRequest pageToken - * @property {string|null} [filter] ListCustomTargetingKeysRequest filter - * @property {string|null} [orderBy] ListCustomTargetingKeysRequest orderBy - * @property {number|null} [skip] ListCustomTargetingKeysRequest skip + * @interface IListBrowserLanguagesRequest + * @property {string|null} [parent] ListBrowserLanguagesRequest parent + * @property {number|null} [pageSize] ListBrowserLanguagesRequest pageSize + * @property {string|null} [pageToken] ListBrowserLanguagesRequest pageToken + * @property {string|null} [filter] ListBrowserLanguagesRequest filter + * @property {string|null} [orderBy] ListBrowserLanguagesRequest orderBy + * @property {number|null} [skip] ListBrowserLanguagesRequest skip */ /** - * Constructs a new ListCustomTargetingKeysRequest. + * Constructs a new ListBrowserLanguagesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomTargetingKeysRequest. - * @implements IListCustomTargetingKeysRequest + * @classdesc Represents a ListBrowserLanguagesRequest. + * @implements IListBrowserLanguagesRequest * @constructor - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest=} [properties] Properties to set */ - function ListCustomTargetingKeysRequest(properties) { + function ListBrowserLanguagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16343,75 +15275,75 @@ } /** - * ListCustomTargetingKeysRequest parent. + * ListBrowserLanguagesRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.parent = ""; + ListBrowserLanguagesRequest.prototype.parent = ""; /** - * ListCustomTargetingKeysRequest pageSize. + * ListBrowserLanguagesRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.pageSize = 0; + ListBrowserLanguagesRequest.prototype.pageSize = 0; /** - * ListCustomTargetingKeysRequest pageToken. + * ListBrowserLanguagesRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.pageToken = ""; + ListBrowserLanguagesRequest.prototype.pageToken = ""; /** - * ListCustomTargetingKeysRequest filter. + * ListBrowserLanguagesRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.filter = ""; + ListBrowserLanguagesRequest.prototype.filter = ""; /** - * ListCustomTargetingKeysRequest orderBy. + * ListBrowserLanguagesRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.orderBy = ""; + ListBrowserLanguagesRequest.prototype.orderBy = ""; /** - * ListCustomTargetingKeysRequest skip. + * ListBrowserLanguagesRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance */ - ListCustomTargetingKeysRequest.prototype.skip = 0; + ListBrowserLanguagesRequest.prototype.skip = 0; /** - * Creates a new ListCustomTargetingKeysRequest instance using the specified properties. + * Creates a new ListBrowserLanguagesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest instance + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBrowserLanguagesRequest} ListBrowserLanguagesRequest instance */ - ListCustomTargetingKeysRequest.create = function create(properties) { - return new ListCustomTargetingKeysRequest(properties); + ListBrowserLanguagesRequest.create = function create(properties) { + return new ListBrowserLanguagesRequest(properties); }; /** - * Encodes the specified ListCustomTargetingKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. + * Encodes the specified ListBrowserLanguagesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest} message ListBrowserLanguagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingKeysRequest.encode = function encode(message, writer) { + ListBrowserLanguagesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -16430,33 +15362,33 @@ }; /** - * Encodes the specified ListCustomTargetingKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. + * Encodes the specified ListBrowserLanguagesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowserLanguagesRequest} message ListBrowserLanguagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBrowserLanguagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer. + * Decodes a ListBrowserLanguagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest + * @returns {google.ads.admanager.v1.ListBrowserLanguagesRequest} ListBrowserLanguagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingKeysRequest.decode = function decode(reader, length, error) { + ListBrowserLanguagesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBrowserLanguagesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16495,30 +15427,30 @@ }; /** - * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBrowserLanguagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest + * @returns {google.ads.admanager.v1.ListBrowserLanguagesRequest} ListBrowserLanguagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingKeysRequest.decodeDelimited = function decodeDelimited(reader) { + ListBrowserLanguagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomTargetingKeysRequest message. + * Verifies a ListBrowserLanguagesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomTargetingKeysRequest.verify = function verify(message) { + ListBrowserLanguagesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -16543,17 +15475,17 @@ }; /** - * Creates a ListCustomTargetingKeysRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowserLanguagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest + * @returns {google.ads.admanager.v1.ListBrowserLanguagesRequest} ListBrowserLanguagesRequest */ - ListCustomTargetingKeysRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest) + ListBrowserLanguagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBrowserLanguagesRequest) return object; - var message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest(); + var message = new $root.google.ads.admanager.v1.ListBrowserLanguagesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -16570,15 +15502,15 @@ }; /** - * Creates a plain object from a ListCustomTargetingKeysRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBrowserLanguagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static - * @param {google.ads.admanager.v1.ListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest + * @param {google.ads.admanager.v1.ListBrowserLanguagesRequest} message ListBrowserLanguagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomTargetingKeysRequest.toObject = function toObject(message, options) { + ListBrowserLanguagesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16606,55 +15538,55 @@ }; /** - * Converts this ListCustomTargetingKeysRequest to JSON. + * Converts this ListBrowserLanguagesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @instance * @returns {Object.} JSON object */ - ListCustomTargetingKeysRequest.prototype.toJSON = function toJSON() { + ListBrowserLanguagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomTargetingKeysRequest + * Gets the default type url for ListBrowserLanguagesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @memberof google.ads.admanager.v1.ListBrowserLanguagesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomTargetingKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBrowserLanguagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingKeysRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBrowserLanguagesRequest"; }; - return ListCustomTargetingKeysRequest; + return ListBrowserLanguagesRequest; })(); - v1.ListCustomTargetingKeysResponse = (function() { + v1.ListBrowserLanguagesResponse = (function() { /** - * Properties of a ListCustomTargetingKeysResponse. + * Properties of a ListBrowserLanguagesResponse. * @memberof google.ads.admanager.v1 - * @interface IListCustomTargetingKeysResponse - * @property {Array.|null} [customTargetingKeys] ListCustomTargetingKeysResponse customTargetingKeys - * @property {string|null} [nextPageToken] ListCustomTargetingKeysResponse nextPageToken - * @property {number|null} [totalSize] ListCustomTargetingKeysResponse totalSize + * @interface IListBrowserLanguagesResponse + * @property {Array.|null} [browserLanguages] ListBrowserLanguagesResponse browserLanguages + * @property {string|null} [nextPageToken] ListBrowserLanguagesResponse nextPageToken + * @property {number|null} [totalSize] ListBrowserLanguagesResponse totalSize */ /** - * Constructs a new ListCustomTargetingKeysResponse. + * Constructs a new ListBrowserLanguagesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomTargetingKeysResponse. - * @implements IListCustomTargetingKeysResponse + * @classdesc Represents a ListBrowserLanguagesResponse. + * @implements IListBrowserLanguagesResponse * @constructor - * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListBrowserLanguagesResponse=} [properties] Properties to set */ - function ListCustomTargetingKeysResponse(properties) { - this.customTargetingKeys = []; + function ListBrowserLanguagesResponse(properties) { + this.browserLanguages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16662,56 +15594,56 @@ } /** - * ListCustomTargetingKeysResponse customTargetingKeys. - * @member {Array.} customTargetingKeys - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * ListBrowserLanguagesResponse browserLanguages. + * @member {Array.} browserLanguages + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @instance */ - ListCustomTargetingKeysResponse.prototype.customTargetingKeys = $util.emptyArray; + ListBrowserLanguagesResponse.prototype.browserLanguages = $util.emptyArray; /** - * ListCustomTargetingKeysResponse nextPageToken. + * ListBrowserLanguagesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @instance */ - ListCustomTargetingKeysResponse.prototype.nextPageToken = ""; + ListBrowserLanguagesResponse.prototype.nextPageToken = ""; /** - * ListCustomTargetingKeysResponse totalSize. + * ListBrowserLanguagesResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @instance */ - ListCustomTargetingKeysResponse.prototype.totalSize = 0; + ListBrowserLanguagesResponse.prototype.totalSize = 0; /** - * Creates a new ListCustomTargetingKeysResponse instance using the specified properties. + * Creates a new ListBrowserLanguagesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse instance + * @param {google.ads.admanager.v1.IListBrowserLanguagesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBrowserLanguagesResponse} ListBrowserLanguagesResponse instance */ - ListCustomTargetingKeysResponse.create = function create(properties) { - return new ListCustomTargetingKeysResponse(properties); + ListBrowserLanguagesResponse.create = function create(properties) { + return new ListBrowserLanguagesResponse(properties); }; /** - * Encodes the specified ListCustomTargetingKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. + * Encodes the specified ListBrowserLanguagesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowserLanguagesResponse} message ListBrowserLanguagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingKeysResponse.encode = function encode(message, writer) { + ListBrowserLanguagesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customTargetingKeys != null && message.customTargetingKeys.length) - for (var i = 0; i < message.customTargetingKeys.length; ++i) - $root.google.ads.admanager.v1.CustomTargetingKey.encode(message.customTargetingKeys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.browserLanguages != null && message.browserLanguages.length) + for (var i = 0; i < message.browserLanguages.length; ++i) + $root.google.ads.admanager.v1.BrowserLanguage.encode(message.browserLanguages[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -16720,42 +15652,42 @@ }; /** - * Encodes the specified ListCustomTargetingKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. + * Encodes the specified ListBrowserLanguagesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowserLanguagesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static - * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowserLanguagesResponse} message ListBrowserLanguagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListBrowserLanguagesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer. + * Decodes a ListBrowserLanguagesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse + * @returns {google.ads.admanager.v1.ListBrowserLanguagesResponse} ListBrowserLanguagesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingKeysResponse.decode = function decode(reader, length, error) { + ListBrowserLanguagesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBrowserLanguagesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.customTargetingKeys && message.customTargetingKeys.length)) - message.customTargetingKeys = []; - message.customTargetingKeys.push($root.google.ads.admanager.v1.CustomTargetingKey.decode(reader, reader.uint32())); + if (!(message.browserLanguages && message.browserLanguages.length)) + message.browserLanguages = []; + message.browserLanguages.push($root.google.ads.admanager.v1.BrowserLanguage.decode(reader, reader.uint32())); break; } case 2: { @@ -16775,39 +15707,39 @@ }; /** - * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer, length delimited. + * Decodes a ListBrowserLanguagesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse + * @returns {google.ads.admanager.v1.ListBrowserLanguagesResponse} ListBrowserLanguagesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingKeysResponse.decodeDelimited = function decodeDelimited(reader) { + ListBrowserLanguagesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomTargetingKeysResponse message. + * Verifies a ListBrowserLanguagesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomTargetingKeysResponse.verify = function verify(message) { + ListBrowserLanguagesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.customTargetingKeys != null && message.hasOwnProperty("customTargetingKeys")) { - if (!Array.isArray(message.customTargetingKeys)) - return "customTargetingKeys: array expected"; - for (var i = 0; i < message.customTargetingKeys.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomTargetingKey.verify(message.customTargetingKeys[i]); + if (message.browserLanguages != null && message.hasOwnProperty("browserLanguages")) { + if (!Array.isArray(message.browserLanguages)) + return "browserLanguages: array expected"; + for (var i = 0; i < message.browserLanguages.length; ++i) { + var error = $root.google.ads.admanager.v1.BrowserLanguage.verify(message.browserLanguages[i]); if (error) - return "customTargetingKeys." + error; + return "browserLanguages." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -16820,25 +15752,25 @@ }; /** - * Creates a ListCustomTargetingKeysResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowserLanguagesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse + * @returns {google.ads.admanager.v1.ListBrowserLanguagesResponse} ListBrowserLanguagesResponse */ - ListCustomTargetingKeysResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse) + ListBrowserLanguagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBrowserLanguagesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse(); - if (object.customTargetingKeys) { - if (!Array.isArray(object.customTargetingKeys)) - throw TypeError(".google.ads.admanager.v1.ListCustomTargetingKeysResponse.customTargetingKeys: array expected"); - message.customTargetingKeys = []; - for (var i = 0; i < object.customTargetingKeys.length; ++i) { - if (typeof object.customTargetingKeys[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListCustomTargetingKeysResponse.customTargetingKeys: object expected"); - message.customTargetingKeys[i] = $root.google.ads.admanager.v1.CustomTargetingKey.fromObject(object.customTargetingKeys[i]); + var message = new $root.google.ads.admanager.v1.ListBrowserLanguagesResponse(); + if (object.browserLanguages) { + if (!Array.isArray(object.browserLanguages)) + throw TypeError(".google.ads.admanager.v1.ListBrowserLanguagesResponse.browserLanguages: array expected"); + message.browserLanguages = []; + for (var i = 0; i < object.browserLanguages.length; ++i) { + if (typeof object.browserLanguages[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListBrowserLanguagesResponse.browserLanguages: object expected"); + message.browserLanguages[i] = $root.google.ads.admanager.v1.BrowserLanguage.fromObject(object.browserLanguages[i]); } } if (object.nextPageToken != null) @@ -16849,28 +15781,28 @@ }; /** - * Creates a plain object from a ListCustomTargetingKeysResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListBrowserLanguagesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static - * @param {google.ads.admanager.v1.ListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse + * @param {google.ads.admanager.v1.ListBrowserLanguagesResponse} message ListBrowserLanguagesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomTargetingKeysResponse.toObject = function toObject(message, options) { + ListBrowserLanguagesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.customTargetingKeys = []; + object.browserLanguages = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.customTargetingKeys && message.customTargetingKeys.length) { - object.customTargetingKeys = []; - for (var j = 0; j < message.customTargetingKeys.length; ++j) - object.customTargetingKeys[j] = $root.google.ads.admanager.v1.CustomTargetingKey.toObject(message.customTargetingKeys[j], options); + if (message.browserLanguages && message.browserLanguages.length) { + object.browserLanguages = []; + for (var j = 0; j < message.browserLanguages.length; ++j) + object.browserLanguages[j] = $root.google.ads.admanager.v1.BrowserLanguage.toObject(message.browserLanguages[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -16880,51 +15812,55 @@ }; /** - * Converts this ListCustomTargetingKeysResponse to JSON. + * Converts this ListBrowserLanguagesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @instance * @returns {Object.} JSON object */ - ListCustomTargetingKeysResponse.prototype.toJSON = function toJSON() { + ListBrowserLanguagesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomTargetingKeysResponse + * Gets the default type url for ListBrowserLanguagesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @memberof google.ads.admanager.v1.ListBrowserLanguagesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomTargetingKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBrowserLanguagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingKeysResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBrowserLanguagesResponse"; }; - return ListCustomTargetingKeysResponse; + return ListBrowserLanguagesResponse; })(); - v1.CustomTargetingValueStatusEnum = (function() { + v1.Browser = (function() { /** - * Properties of a CustomTargetingValueStatusEnum. + * Properties of a Browser. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingValueStatusEnum + * @interface IBrowser + * @property {string|null} [name] Browser name + * @property {string|null} [displayName] Browser displayName + * @property {string|null} [majorVersion] Browser majorVersion + * @property {string|null} [minorVersion] Browser minorVersion */ /** - * Constructs a new CustomTargetingValueStatusEnum. + * Constructs a new Browser. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingValueStatusEnum. - * @implements ICustomTargetingValueStatusEnum + * @classdesc Represents a Browser. + * @implements IBrowser * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBrowser=} [properties] Properties to set */ - function CustomTargetingValueStatusEnum(properties) { + function Browser(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16932,65 +15868,142 @@ } /** - * Creates a new CustomTargetingValueStatusEnum instance using the specified properties. + * Browser name. + * @member {string} name + * @memberof google.ads.admanager.v1.Browser + * @instance + */ + Browser.prototype.name = ""; + + /** + * Browser displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Browser + * @instance + */ + Browser.prototype.displayName = null; + + /** + * Browser majorVersion. + * @member {string|null|undefined} majorVersion + * @memberof google.ads.admanager.v1.Browser + * @instance + */ + Browser.prototype.majorVersion = null; + + /** + * Browser minorVersion. + * @member {string|null|undefined} minorVersion + * @memberof google.ads.admanager.v1.Browser + * @instance + */ + Browser.prototype.minorVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Browser.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Browser.prototype, "_majorVersion", { + get: $util.oneOfGetter($oneOfFields = ["majorVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Browser.prototype, "_minorVersion", { + get: $util.oneOfGetter($oneOfFields = ["minorVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Browser instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum instance + * @param {google.ads.admanager.v1.IBrowser=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Browser} Browser instance */ - CustomTargetingValueStatusEnum.create = function create(properties) { - return new CustomTargetingValueStatusEnum(properties); + Browser.create = function create(properties) { + return new Browser(properties); }; /** - * Encodes the specified CustomTargetingValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. + * Encodes the specified Browser message. Does not implicitly {@link google.ads.admanager.v1.Browser.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBrowser} message Browser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValueStatusEnum.encode = function encode(message, writer) { + Browser.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.majorVersion != null && Object.hasOwnProperty.call(message, "majorVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.majorVersion); + if (message.minorVersion != null && Object.hasOwnProperty.call(message, "minorVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.minorVersion); return writer; }; /** - * Encodes the specified CustomTargetingValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. + * Encodes the specified Browser message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Browser.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBrowser} message Browser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValueStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + Browser.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer. + * Decodes a Browser message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum + * @returns {google.ads.admanager.v1.Browser} Browser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValueStatusEnum.decode = function decode(reader, length, error) { + Browser.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Browser(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 4: { + message.majorVersion = reader.string(); + break; + } + case 5: { + message.minorVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17000,124 +16013,260 @@ }; /** - * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a Browser message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum + * @returns {google.ads.admanager.v1.Browser} Browser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValueStatusEnum.decodeDelimited = function decodeDelimited(reader) { + Browser.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingValueStatusEnum message. + * Verifies a Browser message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingValueStatusEnum.verify = function verify(message) { + Browser.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.majorVersion != null && message.hasOwnProperty("majorVersion")) { + properties._majorVersion = 1; + if (!$util.isString(message.majorVersion)) + return "majorVersion: string expected"; + } + if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { + properties._minorVersion = 1; + if (!$util.isString(message.minorVersion)) + return "minorVersion: string expected"; + } return null; }; /** - * Creates a CustomTargetingValueStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a Browser message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum + * @returns {google.ads.admanager.v1.Browser} Browser */ - CustomTargetingValueStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum) + Browser.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Browser) return object; - return new $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum(); + var message = new $root.google.ads.admanager.v1.Browser(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.majorVersion != null) + message.majorVersion = String(object.majorVersion); + if (object.minorVersion != null) + message.minorVersion = String(object.minorVersion); + return message; }; /** - * Creates a plain object from a CustomTargetingValueStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a Browser message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static - * @param {google.ads.admanager.v1.CustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum + * @param {google.ads.admanager.v1.Browser} message Browser * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingValueStatusEnum.toObject = function toObject() { - return {}; + Browser.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.majorVersion != null && message.hasOwnProperty("majorVersion")) { + object.majorVersion = message.majorVersion; + if (options.oneofs) + object._majorVersion = "majorVersion"; + } + if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { + object.minorVersion = message.minorVersion; + if (options.oneofs) + object._minorVersion = "minorVersion"; + } + return object; }; /** - * Converts this CustomTargetingValueStatusEnum to JSON. + * Converts this Browser to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @instance * @returns {Object.} JSON object */ - CustomTargetingValueStatusEnum.prototype.toJSON = function toJSON() { + Browser.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingValueStatusEnum + * Gets the default type url for Browser * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum + * @memberof google.ads.admanager.v1.Browser * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingValueStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Browser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValueStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.Browser"; }; + return Browser; + })(); + + v1.BrowserService = (function() { + /** - * CustomTargetingValueStatus enum. - * @name google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus - * @enum {number} - * @property {number} CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED=0 CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value + * Constructs a new BrowserService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BrowserService + * @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 */ - CustomTargetingValueStatusEnum.CustomTargetingValueStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); + function BrowserService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - return CustomTargetingValueStatusEnum; + (BrowserService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BrowserService; + + /** + * Creates new BrowserService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.BrowserService + * @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 {BrowserService} RPC service. Useful where requests and/or responses are streamed. + */ + BrowserService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.BrowserService|getBrowser}. + * @memberof google.ads.admanager.v1.BrowserService + * @typedef GetBrowserCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Browser} [response] Browser + */ + + /** + * Calls GetBrowser. + * @function getBrowser + * @memberof google.ads.admanager.v1.BrowserService + * @instance + * @param {google.ads.admanager.v1.IGetBrowserRequest} request GetBrowserRequest message or plain object + * @param {google.ads.admanager.v1.BrowserService.GetBrowserCallback} callback Node-style callback called with the error, if any, and Browser + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BrowserService.prototype.getBrowser = function getBrowser(request, callback) { + return this.rpcCall(getBrowser, $root.google.ads.admanager.v1.GetBrowserRequest, $root.google.ads.admanager.v1.Browser, request, callback); + }, "name", { value: "GetBrowser" }); + + /** + * Calls GetBrowser. + * @function getBrowser + * @memberof google.ads.admanager.v1.BrowserService + * @instance + * @param {google.ads.admanager.v1.IGetBrowserRequest} request GetBrowserRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.BrowserService|listBrowsers}. + * @memberof google.ads.admanager.v1.BrowserService + * @typedef ListBrowsersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListBrowsersResponse} [response] ListBrowsersResponse + */ + + /** + * Calls ListBrowsers. + * @function listBrowsers + * @memberof google.ads.admanager.v1.BrowserService + * @instance + * @param {google.ads.admanager.v1.IListBrowsersRequest} request ListBrowsersRequest message or plain object + * @param {google.ads.admanager.v1.BrowserService.ListBrowsersCallback} callback Node-style callback called with the error, if any, and ListBrowsersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BrowserService.prototype.listBrowsers = function listBrowsers(request, callback) { + return this.rpcCall(listBrowsers, $root.google.ads.admanager.v1.ListBrowsersRequest, $root.google.ads.admanager.v1.ListBrowsersResponse, request, callback); + }, "name", { value: "ListBrowsers" }); + + /** + * Calls ListBrowsers. + * @function listBrowsers + * @memberof google.ads.admanager.v1.BrowserService + * @instance + * @param {google.ads.admanager.v1.IListBrowsersRequest} request ListBrowsersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BrowserService; })(); - v1.CustomTargetingValueMatchTypeEnum = (function() { + v1.GetBrowserRequest = (function() { /** - * Properties of a CustomTargetingValueMatchTypeEnum. + * Properties of a GetBrowserRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingValueMatchTypeEnum + * @interface IGetBrowserRequest + * @property {string|null} [name] GetBrowserRequest name */ /** - * Constructs a new CustomTargetingValueMatchTypeEnum. + * Constructs a new GetBrowserRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingValueMatchTypeEnum. - * @implements ICustomTargetingValueMatchTypeEnum + * @classdesc Represents a GetBrowserRequest. + * @implements IGetBrowserRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetBrowserRequest=} [properties] Properties to set */ - function CustomTargetingValueMatchTypeEnum(properties) { + function GetBrowserRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17125,206 +16274,209 @@ } /** - * Creates a new CustomTargetingValueMatchTypeEnum instance using the specified properties. + * GetBrowserRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetBrowserRequest + * @instance + */ + GetBrowserRequest.prototype.name = ""; + + /** + * Creates a new GetBrowserRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum instance + * @param {google.ads.admanager.v1.IGetBrowserRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetBrowserRequest} GetBrowserRequest instance */ - CustomTargetingValueMatchTypeEnum.create = function create(properties) { - return new CustomTargetingValueMatchTypeEnum(properties); + GetBrowserRequest.create = function create(properties) { + return new GetBrowserRequest(properties); }; /** - * Encodes the specified CustomTargetingValueMatchTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. + * Encodes the specified GetBrowserRequest message. Does not implicitly {@link google.ads.admanager.v1.GetBrowserRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetBrowserRequest} message GetBrowserRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValueMatchTypeEnum.encode = function encode(message, writer) { + GetBrowserRequest.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 CustomTargetingValueMatchTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. + * Encodes the specified GetBrowserRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetBrowserRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetBrowserRequest} message GetBrowserRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValueMatchTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + GetBrowserRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer. + * Decodes a GetBrowserRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum + * @returns {google.ads.admanager.v1.GetBrowserRequest} GetBrowserRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValueMatchTypeEnum.decode = function decode(reader, length, error) { + GetBrowserRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetBrowserRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a GetBrowserRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum + * @returns {google.ads.admanager.v1.GetBrowserRequest} GetBrowserRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValueMatchTypeEnum.decodeDelimited = function decodeDelimited(reader) { + GetBrowserRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingValueMatchTypeEnum message. + * Verifies a GetBrowserRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingValueMatchTypeEnum.verify = function verify(message) { + GetBrowserRequest.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 CustomTargetingValueMatchTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetBrowserRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum + * @returns {google.ads.admanager.v1.GetBrowserRequest} GetBrowserRequest */ - CustomTargetingValueMatchTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum) + GetBrowserRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetBrowserRequest) return object; - return new $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum(); + var message = new $root.google.ads.admanager.v1.GetBrowserRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a CustomTargetingValueMatchTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a GetBrowserRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static - * @param {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum + * @param {google.ads.admanager.v1.GetBrowserRequest} message GetBrowserRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingValueMatchTypeEnum.toObject = function toObject() { - return {}; + GetBrowserRequest.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 CustomTargetingValueMatchTypeEnum to JSON. + * Converts this GetBrowserRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @instance * @returns {Object.} JSON object */ - CustomTargetingValueMatchTypeEnum.prototype.toJSON = function toJSON() { + GetBrowserRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingValueMatchTypeEnum + * Gets the default type url for GetBrowserRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + * @memberof google.ads.admanager.v1.GetBrowserRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingValueMatchTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBrowserRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetBrowserRequest"; }; - /** - * CustomTargetingValueMatchType enum. - * @name google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType - * @enum {number} - * @property {number} CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BROAD=2 BROAD value - * @property {number} PREFIX=3 PREFIX value - * @property {number} BROAD_PREFIX=4 BROAD_PREFIX value - * @property {number} SUFFIX=5 SUFFIX value - * @property {number} CONTAINS=6 CONTAINS value - */ - CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BROAD"] = 2; - values[valuesById[3] = "PREFIX"] = 3; - values[valuesById[4] = "BROAD_PREFIX"] = 4; - values[valuesById[5] = "SUFFIX"] = 5; - values[valuesById[6] = "CONTAINS"] = 6; - return values; - })(); - - return CustomTargetingValueMatchTypeEnum; + return GetBrowserRequest; })(); - v1.CustomTargetingValue = (function() { + v1.ListBrowsersRequest = (function() { /** - * Properties of a CustomTargetingValue. + * Properties of a ListBrowsersRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingValue - * @property {string|null} [name] CustomTargetingValue name - * @property {string|null} [customTargetingKey] CustomTargetingValue customTargetingKey - * @property {string|null} [adTagName] CustomTargetingValue adTagName - * @property {string|null} [displayName] CustomTargetingValue displayName - * @property {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null} [matchType] CustomTargetingValue matchType - * @property {google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null} [status] CustomTargetingValue status + * @interface IListBrowsersRequest + * @property {string|null} [parent] ListBrowsersRequest parent + * @property {number|null} [pageSize] ListBrowsersRequest pageSize + * @property {string|null} [pageToken] ListBrowsersRequest pageToken + * @property {string|null} [filter] ListBrowsersRequest filter + * @property {string|null} [orderBy] ListBrowsersRequest orderBy + * @property {number|null} [skip] ListBrowsersRequest skip */ /** - * Constructs a new CustomTargetingValue. + * Constructs a new ListBrowsersRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingValue. - * @implements ICustomTargetingValue + * @classdesc Represents a ListBrowsersRequest. + * @implements IListBrowsersRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingValue=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListBrowsersRequest=} [properties] Properties to set */ - function CustomTargetingValue(properties) { + function ListBrowsersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17332,147 +16484,147 @@ } /** - * CustomTargetingValue name. - * @member {string} name - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.name = ""; + ListBrowsersRequest.prototype.parent = ""; /** - * CustomTargetingValue customTargetingKey. - * @member {string} customTargetingKey - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.customTargetingKey = ""; + ListBrowsersRequest.prototype.pageSize = 0; /** - * CustomTargetingValue adTagName. - * @member {string} adTagName - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.adTagName = ""; + ListBrowsersRequest.prototype.pageToken = ""; /** - * CustomTargetingValue displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.displayName = ""; + ListBrowsersRequest.prototype.filter = ""; /** - * CustomTargetingValue matchType. - * @member {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType} matchType - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.matchType = 0; + ListBrowsersRequest.prototype.orderBy = ""; /** - * CustomTargetingValue status. - * @member {google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus} status - * @memberof google.ads.admanager.v1.CustomTargetingValue + * ListBrowsersRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance */ - CustomTargetingValue.prototype.status = 0; + ListBrowsersRequest.prototype.skip = 0; /** - * Creates a new CustomTargetingValue instance using the specified properties. + * Creates a new ListBrowsersRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValue=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue instance + * @param {google.ads.admanager.v1.IListBrowsersRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBrowsersRequest} ListBrowsersRequest instance */ - CustomTargetingValue.create = function create(properties) { - return new CustomTargetingValue(properties); + ListBrowsersRequest.create = function create(properties) { + return new ListBrowsersRequest(properties); }; /** - * Encodes the specified CustomTargetingValue message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. + * Encodes the specified ListBrowsersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValue} message CustomTargetingValue message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowsersRequest} message ListBrowsersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValue.encode = function encode(message, writer) { + ListBrowsersRequest.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.adTagName != null && Object.hasOwnProperty.call(message, "adTagName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.adTagName); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.matchType); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.status); - if (message.customTargetingKey != null && Object.hasOwnProperty.call(message, "customTargetingKey")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.customTargetingKey); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified CustomTargetingValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. + * Encodes the specified ListBrowsersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingValue} message CustomTargetingValue message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowsersRequest} message ListBrowsersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingValue.encodeDelimited = function encodeDelimited(message, writer) { + ListBrowsersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingValue message from the specified reader or buffer. + * Decodes a ListBrowsersRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue + * @returns {google.ads.admanager.v1.ListBrowsersRequest} ListBrowsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValue.decode = function decode(reader, length, error) { + ListBrowsersRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBrowsersRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } - case 8: { - message.customTargetingKey = reader.string(); + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } case 4: { - message.adTagName = reader.string(); + message.filter = reader.string(); break; } case 5: { - message.displayName = reader.string(); + message.orderBy = reader.string(); break; } case 6: { - message.matchType = reader.int32(); - break; - } - case 7: { - message.status = reader.int32(); + message.skip = reader.int32(); break; } default: @@ -17484,410 +16636,275 @@ }; /** - * Decodes a CustomTargetingValue message from the specified reader or buffer, length delimited. + * Decodes a ListBrowsersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue + * @returns {google.ads.admanager.v1.ListBrowsersRequest} ListBrowsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingValue.decodeDelimited = function decodeDelimited(reader) { + ListBrowsersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingValue message. + * Verifies a ListBrowsersRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingValue.verify = function verify(message) { + ListBrowsersRequest.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.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) - if (!$util.isString(message.customTargetingKey)) - return "customTargetingKey: string expected"; - if (message.adTagName != null && message.hasOwnProperty("adTagName")) - if (!$util.isString(message.adTagName)) - return "adTagName: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - break; - } + 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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a CustomTargetingValue message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowsersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue + * @returns {google.ads.admanager.v1.ListBrowsersRequest} ListBrowsersRequest */ - CustomTargetingValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValue) + ListBrowsersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBrowsersRequest) return object; - var message = new $root.google.ads.admanager.v1.CustomTargetingValue(); - if (object.name != null) - message.name = String(object.name); - if (object.customTargetingKey != null) - message.customTargetingKey = String(object.customTargetingKey); - if (object.adTagName != null) - message.adTagName = String(object.adTagName); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "BROAD": - case 2: - message.matchType = 2; - break; - case "PREFIX": - case 3: - message.matchType = 3; - break; - case "BROAD_PREFIX": - case 4: - message.matchType = 4; - break; - case "SUFFIX": - case 5: - message.matchType = 5; - break; - case "CONTAINS": - case 6: - message.matchType = 6; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "ACTIVE": - case 1: - message.status = 1; - break; - case "INACTIVE": - case 2: - message.status = 2; - break; - } + var message = new $root.google.ads.admanager.v1.ListBrowsersRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a CustomTargetingValue message. Also converts values to other types if specified. + * Creates a plain object from a ListBrowsersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static - * @param {google.ads.admanager.v1.CustomTargetingValue} message CustomTargetingValue + * @param {google.ads.admanager.v1.ListBrowsersRequest} message ListBrowsersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingValue.toObject = function toObject(message, options) { + ListBrowsersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.adTagName = ""; - object.displayName = ""; - object.matchType = options.enums === String ? "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED" : 0; - object.status = options.enums === String ? "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED" : 0; - object.customTargetingKey = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.adTagName != null && message.hasOwnProperty("adTagName")) - object.adTagName = message.adTagName; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType[message.matchType] === undefined ? message.matchType : $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType[message.matchType] : message.matchType; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus[message.status] : message.status; - if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) - object.customTargetingKey = message.customTargetingKey; + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this CustomTargetingValue to JSON. + * Converts this ListBrowsersRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @instance * @returns {Object.} JSON object */ - CustomTargetingValue.prototype.toJSON = function toJSON() { + ListBrowsersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingValue + * Gets the default type url for ListBrowsersRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingValue + * @memberof google.ads.admanager.v1.ListBrowsersRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBrowsersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValue"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBrowsersRequest"; }; - return CustomTargetingValue; + return ListBrowsersRequest; })(); - v1.CustomTargetingValueService = (function() { + v1.ListBrowsersResponse = (function() { /** - * Constructs a new CustomTargetingValueService service. + * Properties of a ListBrowsersResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingValueService - * @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 CustomTargetingValueService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CustomTargetingValueService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomTargetingValueService; - - /** - * Creates new CustomTargetingValueService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.CustomTargetingValueService - * @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 {CustomTargetingValueService} RPC service. Useful where requests and/or responses are streamed. - */ - CustomTargetingValueService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|getCustomTargetingValue}. - * @memberof google.ads.admanager.v1.CustomTargetingValueService - * @typedef GetCustomTargetingValueCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.CustomTargetingValue} [response] CustomTargetingValue + * @interface IListBrowsersResponse + * @property {Array.|null} [browsers] ListBrowsersResponse browsers + * @property {string|null} [nextPageToken] ListBrowsersResponse nextPageToken + * @property {number|null} [totalSize] ListBrowsersResponse totalSize */ /** - * Calls GetCustomTargetingValue. - * @function getCustomTargetingValue - * @memberof google.ads.admanager.v1.CustomTargetingValueService - * @instance - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} request GetCustomTargetingValueRequest message or plain object - * @param {google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValueCallback} callback Node-style callback called with the error, if any, and CustomTargetingValue - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CustomTargetingValueService.prototype.getCustomTargetingValue = function getCustomTargetingValue(request, callback) { - return this.rpcCall(getCustomTargetingValue, $root.google.ads.admanager.v1.GetCustomTargetingValueRequest, $root.google.ads.admanager.v1.CustomTargetingValue, request, callback); - }, "name", { value: "GetCustomTargetingValue" }); - - /** - * Calls GetCustomTargetingValue. - * @function getCustomTargetingValue - * @memberof google.ads.admanager.v1.CustomTargetingValueService - * @instance - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} request GetCustomTargetingValueRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|listCustomTargetingValues}. - * @memberof google.ads.admanager.v1.CustomTargetingValueService - * @typedef ListCustomTargetingValuesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListCustomTargetingValuesResponse} [response] ListCustomTargetingValuesResponse + * Constructs a new ListBrowsersResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListBrowsersResponse. + * @implements IListBrowsersResponse + * @constructor + * @param {google.ads.admanager.v1.IListBrowsersResponse=} [properties] Properties to set */ + function ListBrowsersResponse(properties) { + this.browsers = []; + 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 ListCustomTargetingValues. - * @function listCustomTargetingValues - * @memberof google.ads.admanager.v1.CustomTargetingValueService + * ListBrowsersResponse browsers. + * @member {Array.} browsers + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @instance - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} request ListCustomTargetingValuesRequest message or plain object - * @param {google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValuesCallback} callback Node-style callback called with the error, if any, and ListCustomTargetingValuesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CustomTargetingValueService.prototype.listCustomTargetingValues = function listCustomTargetingValues(request, callback) { - return this.rpcCall(listCustomTargetingValues, $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest, $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse, request, callback); - }, "name", { value: "ListCustomTargetingValues" }); + ListBrowsersResponse.prototype.browsers = $util.emptyArray; /** - * Calls ListCustomTargetingValues. - * @function listCustomTargetingValues - * @memberof google.ads.admanager.v1.CustomTargetingValueService + * ListBrowsersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @instance - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} request ListCustomTargetingValuesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CustomTargetingValueService; - })(); - - v1.GetCustomTargetingValueRequest = (function() { - - /** - * Properties of a GetCustomTargetingValueRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetCustomTargetingValueRequest - * @property {string|null} [name] GetCustomTargetingValueRequest name - */ - - /** - * Constructs a new GetCustomTargetingValueRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetCustomTargetingValueRequest. - * @implements IGetCustomTargetingValueRequest - * @constructor - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest=} [properties] Properties to set */ - function GetCustomTargetingValueRequest(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]]; - } + ListBrowsersResponse.prototype.nextPageToken = ""; /** - * GetCustomTargetingValueRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * ListBrowsersResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @instance */ - GetCustomTargetingValueRequest.prototype.name = ""; + ListBrowsersResponse.prototype.totalSize = 0; /** - * Creates a new GetCustomTargetingValueRequest instance using the specified properties. + * Creates a new ListBrowsersResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest instance + * @param {google.ads.admanager.v1.IListBrowsersResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListBrowsersResponse} ListBrowsersResponse instance */ - GetCustomTargetingValueRequest.create = function create(properties) { - return new GetCustomTargetingValueRequest(properties); + ListBrowsersResponse.create = function create(properties) { + return new ListBrowsersResponse(properties); }; /** - * Encodes the specified GetCustomTargetingValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. + * Encodes the specified ListBrowsersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} message GetCustomTargetingValueRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowsersResponse} message ListBrowsersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomTargetingValueRequest.encode = function encode(message, writer) { + ListBrowsersResponse.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.browsers != null && message.browsers.length) + for (var i = 0; i < message.browsers.length; ++i) + $root.google.ads.admanager.v1.Browser.encode(message.browsers[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified GetCustomTargetingValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. + * Encodes the specified ListBrowsersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListBrowsersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static - * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} message GetCustomTargetingValueRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListBrowsersResponse} message ListBrowsersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomTargetingValueRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBrowsersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer. + * Decodes a ListBrowsersResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest + * @returns {google.ads.admanager.v1.ListBrowsersResponse} ListBrowsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomTargetingValueRequest.decode = function decode(reader, length, error) { + ListBrowsersResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomTargetingValueRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListBrowsersResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.browsers && message.browsers.length)) + message.browsers = []; + message.browsers.push($root.google.ads.admanager.v1.Browser.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -17899,127 +16916,156 @@ }; /** - * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBrowsersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest + * @returns {google.ads.admanager.v1.ListBrowsersResponse} ListBrowsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCustomTargetingValueRequest.decodeDelimited = function decodeDelimited(reader) { + ListBrowsersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCustomTargetingValueRequest message. + * Verifies a ListBrowsersResponse message. * @function verify - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCustomTargetingValueRequest.verify = function verify(message) { + ListBrowsersResponse.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.browsers != null && message.hasOwnProperty("browsers")) { + if (!Array.isArray(message.browsers)) + return "browsers: array expected"; + for (var i = 0; i < message.browsers.length; ++i) { + var error = $root.google.ads.admanager.v1.Browser.verify(message.browsers[i]); + if (error) + return "browsers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a GetCustomTargetingValueRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBrowsersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest + * @returns {google.ads.admanager.v1.ListBrowsersResponse} ListBrowsersResponse */ - GetCustomTargetingValueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetCustomTargetingValueRequest) + ListBrowsersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListBrowsersResponse) return object; - var message = new $root.google.ads.admanager.v1.GetCustomTargetingValueRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.ListBrowsersResponse(); + if (object.browsers) { + if (!Array.isArray(object.browsers)) + throw TypeError(".google.ads.admanager.v1.ListBrowsersResponse.browsers: array expected"); + message.browsers = []; + for (var i = 0; i < object.browsers.length; ++i) { + if (typeof object.browsers[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListBrowsersResponse.browsers: object expected"); + message.browsers[i] = $root.google.ads.admanager.v1.Browser.fromObject(object.browsers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a GetCustomTargetingValueRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBrowsersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static - * @param {google.ads.admanager.v1.GetCustomTargetingValueRequest} message GetCustomTargetingValueRequest + * @param {google.ads.admanager.v1.ListBrowsersResponse} message ListBrowsersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomTargetingValueRequest.toObject = function toObject(message, options) { + ListBrowsersResponse.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.arrays || options.defaults) + object.browsers = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.browsers && message.browsers.length) { + object.browsers = []; + for (var j = 0; j < message.browsers.length; ++j) + object.browsers[j] = $root.google.ads.admanager.v1.Browser.toObject(message.browsers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this GetCustomTargetingValueRequest to JSON. + * Converts this ListBrowsersResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @instance * @returns {Object.} JSON object */ - GetCustomTargetingValueRequest.prototype.toJSON = function toJSON() { + ListBrowsersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCustomTargetingValueRequest + * Gets the default type url for ListBrowsersResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @memberof google.ads.admanager.v1.ListBrowsersResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCustomTargetingValueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBrowsersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomTargetingValueRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListBrowsersResponse"; }; - return GetCustomTargetingValueRequest; + return ListBrowsersResponse; })(); - v1.ListCustomTargetingValuesRequest = (function() { + v1.CmsMetadataKeyStatusEnum = (function() { /** - * Properties of a ListCustomTargetingValuesRequest. + * Properties of a CmsMetadataKeyStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IListCustomTargetingValuesRequest - * @property {string|null} [parent] ListCustomTargetingValuesRequest parent - * @property {number|null} [pageSize] ListCustomTargetingValuesRequest pageSize - * @property {string|null} [pageToken] ListCustomTargetingValuesRequest pageToken - * @property {string|null} [filter] ListCustomTargetingValuesRequest filter - * @property {string|null} [orderBy] ListCustomTargetingValuesRequest orderBy - * @property {number|null} [skip] ListCustomTargetingValuesRequest skip + * @interface ICmsMetadataKeyStatusEnum */ /** - * Constructs a new ListCustomTargetingValuesRequest. + * Constructs a new CmsMetadataKeyStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomTargetingValuesRequest. - * @implements IListCustomTargetingValuesRequest + * @classdesc Represents a CmsMetadataKeyStatusEnum. + * @implements ICmsMetadataKeyStatusEnum * @constructor - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICmsMetadataKeyStatusEnum=} [properties] Properties to set */ - function ListCustomTargetingValuesRequest(properties) { + function CmsMetadataKeyStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18027,149 +17073,65 @@ } /** - * ListCustomTargetingValuesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.parent = ""; - - /** - * ListCustomTargetingValuesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.pageSize = 0; - - /** - * ListCustomTargetingValuesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.pageToken = ""; - - /** - * ListCustomTargetingValuesRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.filter = ""; - - /** - * ListCustomTargetingValuesRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.orderBy = ""; - - /** - * ListCustomTargetingValuesRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest - * @instance - */ - ListCustomTargetingValuesRequest.prototype.skip = 0; - - /** - * Creates a new ListCustomTargetingValuesRequest instance using the specified properties. + * Creates a new CmsMetadataKeyStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest instance + * @param {google.ads.admanager.v1.ICmsMetadataKeyStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CmsMetadataKeyStatusEnum} CmsMetadataKeyStatusEnum instance */ - ListCustomTargetingValuesRequest.create = function create(properties) { - return new ListCustomTargetingValuesRequest(properties); + CmsMetadataKeyStatusEnum.create = function create(properties) { + return new CmsMetadataKeyStatusEnum(properties); }; /** - * Encodes the specified ListCustomTargetingValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. + * Encodes the specified CmsMetadataKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKeyStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataKeyStatusEnum} message CmsMetadataKeyStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingValuesRequest.encode = function encode(message, writer) { + CmsMetadataKeyStatusEnum.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified ListCustomTargetingValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. + * Encodes the specified CmsMetadataKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKeyStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataKeyStatusEnum} message CmsMetadataKeyStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingValuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CmsMetadataKeyStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer. + * Decodes a CmsMetadataKeyStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest + * @returns {google.ads.admanager.v1.CmsMetadataKeyStatusEnum} CmsMetadataKeyStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingValuesRequest.decode = function decode(reader, length, error) { + CmsMetadataKeyStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CmsMetadataKeyStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; - } - case 6: { - message.skip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -18179,166 +17141,127 @@ }; /** - * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataKeyStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest + * @returns {google.ads.admanager.v1.CmsMetadataKeyStatusEnum} CmsMetadataKeyStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingValuesRequest.decodeDelimited = function decodeDelimited(reader) { + CmsMetadataKeyStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomTargetingValuesRequest message. + * Verifies a CmsMetadataKeyStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomTargetingValuesRequest.verify = function verify(message) { + CmsMetadataKeyStatusEnum.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; return null; }; /** - * Creates a ListCustomTargetingValuesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataKeyStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest + * @returns {google.ads.admanager.v1.CmsMetadataKeyStatusEnum} CmsMetadataKeyStatusEnum */ - ListCustomTargetingValuesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest) + CmsMetadataKeyStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CmsMetadataKeyStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest(); - 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.skip != null) - message.skip = object.skip | 0; - return message; + return new $root.google.ads.admanager.v1.CmsMetadataKeyStatusEnum(); }; /** - * Creates a plain object from a ListCustomTargetingValuesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CmsMetadataKeyStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static - * @param {google.ads.admanager.v1.ListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest + * @param {google.ads.admanager.v1.CmsMetadataKeyStatusEnum} message CmsMetadataKeyStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomTargetingValuesRequest.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.skip = 0; - } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; - return object; + CmsMetadataKeyStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this ListCustomTargetingValuesRequest to JSON. + * Converts this CmsMetadataKeyStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @instance * @returns {Object.} JSON object */ - ListCustomTargetingValuesRequest.prototype.toJSON = function toJSON() { + CmsMetadataKeyStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomTargetingValuesRequest + * Gets the default type url for CmsMetadataKeyStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @memberof google.ads.admanager.v1.CmsMetadataKeyStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomTargetingValuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CmsMetadataKeyStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingValuesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CmsMetadataKeyStatusEnum"; }; - return ListCustomTargetingValuesRequest; + /** + * CmsMetadataKeyStatus enum. + * @name google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus + * @enum {number} + * @property {number} CMS_METADATA_KEY_STATUS_UNSPECIFIED=0 CMS_METADATA_KEY_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CMS_METADATA_KEY_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + return CmsMetadataKeyStatusEnum; })(); - v1.ListCustomTargetingValuesResponse = (function() { + v1.CmsMetadataKey = (function() { /** - * Properties of a ListCustomTargetingValuesResponse. + * Properties of a CmsMetadataKey. * @memberof google.ads.admanager.v1 - * @interface IListCustomTargetingValuesResponse - * @property {Array.|null} [customTargetingValues] ListCustomTargetingValuesResponse customTargetingValues - * @property {string|null} [nextPageToken] ListCustomTargetingValuesResponse nextPageToken - * @property {number|null} [totalSize] ListCustomTargetingValuesResponse totalSize + * @interface ICmsMetadataKey + * @property {string|null} [name] CmsMetadataKey name + * @property {string|null} [displayName] CmsMetadataKey displayName + * @property {google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus|null} [status] CmsMetadataKey status */ /** - * Constructs a new ListCustomTargetingValuesResponse. + * Constructs a new CmsMetadataKey. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListCustomTargetingValuesResponse. - * @implements IListCustomTargetingValuesResponse + * @classdesc Represents a CmsMetadataKey. + * @implements ICmsMetadataKey * @constructor - * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICmsMetadataKey=} [properties] Properties to set */ - function ListCustomTargetingValuesResponse(properties) { - this.customTargetingValues = []; + function CmsMetadataKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18346,108 +17269,105 @@ } /** - * ListCustomTargetingValuesResponse customTargetingValues. - * @member {Array.} customTargetingValues - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * CmsMetadataKey name. + * @member {string} name + * @memberof google.ads.admanager.v1.CmsMetadataKey * @instance */ - ListCustomTargetingValuesResponse.prototype.customTargetingValues = $util.emptyArray; + CmsMetadataKey.prototype.name = ""; /** - * ListCustomTargetingValuesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * CmsMetadataKey displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.CmsMetadataKey * @instance */ - ListCustomTargetingValuesResponse.prototype.nextPageToken = ""; + CmsMetadataKey.prototype.displayName = ""; /** - * ListCustomTargetingValuesResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * CmsMetadataKey status. + * @member {google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus} status + * @memberof google.ads.admanager.v1.CmsMetadataKey * @instance */ - ListCustomTargetingValuesResponse.prototype.totalSize = 0; + CmsMetadataKey.prototype.status = 0; /** - * Creates a new ListCustomTargetingValuesResponse instance using the specified properties. + * Creates a new CmsMetadataKey instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse instance + * @param {google.ads.admanager.v1.ICmsMetadataKey=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CmsMetadataKey} CmsMetadataKey instance */ - ListCustomTargetingValuesResponse.create = function create(properties) { - return new ListCustomTargetingValuesResponse(properties); + CmsMetadataKey.create = function create(properties) { + return new CmsMetadataKey(properties); }; /** - * Encodes the specified ListCustomTargetingValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. + * Encodes the specified CmsMetadataKey message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKey.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataKey} message CmsMetadataKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingValuesResponse.encode = function encode(message, writer) { + CmsMetadataKey.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customTargetingValues != null && message.customTargetingValues.length) - for (var i = 0; i < message.customTargetingValues.length; ++i) - $root.google.ads.admanager.v1.CustomTargetingValue.encode(message.customTargetingValues[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); return writer; }; /** - * Encodes the specified ListCustomTargetingValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. + * Encodes the specified CmsMetadataKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataKey.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static - * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataKey} message CmsMetadataKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomTargetingValuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CmsMetadataKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer. + * Decodes a CmsMetadataKey message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse + * @returns {google.ads.admanager.v1.CmsMetadataKey} CmsMetadataKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingValuesResponse.decode = function decode(reader, length, error) { + CmsMetadataKey.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CmsMetadataKey(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.customTargetingValues && message.customTargetingValues.length)) - message.customTargetingValues = []; - message.customTargetingValues.push($root.google.ads.admanager.v1.CustomTargetingValue.decode(reader, reader.uint32())); + message.name = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.displayName = reader.string(); break; } - case 3: { - message.totalSize = reader.int32(); + case 4: { + message.status = reader.int32(); break; } default: @@ -18459,156 +17379,264 @@ }; /** - * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataKey message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse + * @returns {google.ads.admanager.v1.CmsMetadataKey} CmsMetadataKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCustomTargetingValuesResponse.decodeDelimited = function decodeDelimited(reader) { + CmsMetadataKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCustomTargetingValuesResponse message. + * Verifies a CmsMetadataKey message. * @function verify - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCustomTargetingValuesResponse.verify = function verify(message) { + CmsMetadataKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.customTargetingValues != null && message.hasOwnProperty("customTargetingValues")) { - if (!Array.isArray(message.customTargetingValues)) - return "customTargetingValues: array expected"; - for (var i = 0; i < message.customTargetingValues.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomTargetingValue.verify(message.customTargetingValues[i]); - if (error) - return "customTargetingValues." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListCustomTargetingValuesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataKey message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse + * @returns {google.ads.admanager.v1.CmsMetadataKey} CmsMetadataKey */ - ListCustomTargetingValuesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse) + CmsMetadataKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CmsMetadataKey) return object; - var message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse(); - if (object.customTargetingValues) { - if (!Array.isArray(object.customTargetingValues)) - throw TypeError(".google.ads.admanager.v1.ListCustomTargetingValuesResponse.customTargetingValues: array expected"); - message.customTargetingValues = []; - for (var i = 0; i < object.customTargetingValues.length; ++i) { - if (typeof object.customTargetingValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListCustomTargetingValuesResponse.customTargetingValues: object expected"); - message.customTargetingValues[i] = $root.google.ads.admanager.v1.CustomTargetingValue.fromObject(object.customTargetingValues[i]); + var message = new $root.google.ads.admanager.v1.CmsMetadataKey(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; } + break; + case "CMS_METADATA_KEY_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListCustomTargetingValuesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CmsMetadataKey message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static - * @param {google.ads.admanager.v1.ListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse + * @param {google.ads.admanager.v1.CmsMetadataKey} message CmsMetadataKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomTargetingValuesResponse.toObject = function toObject(message, options) { + CmsMetadataKey.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.customTargetingValues = []; if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.customTargetingValues && message.customTargetingValues.length) { - object.customTargetingValues = []; - for (var j = 0; j < message.customTargetingValues.length; ++j) - object.customTargetingValues[j] = $root.google.ads.admanager.v1.CustomTargetingValue.toObject(message.customTargetingValues[j], options); + object.name = ""; + object.displayName = ""; + object.status = options.enums === String ? "CMS_METADATA_KEY_STATUS_UNSPECIFIED" : 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus[message.status] : message.status; return object; }; /** - * Converts this ListCustomTargetingValuesResponse to JSON. + * Converts this CmsMetadataKey to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @instance * @returns {Object.} JSON object */ - ListCustomTargetingValuesResponse.prototype.toJSON = function toJSON() { + CmsMetadataKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCustomTargetingValuesResponse + * Gets the default type url for CmsMetadataKey * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @memberof google.ads.admanager.v1.CmsMetadataKey * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCustomTargetingValuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CmsMetadataKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingValuesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.CmsMetadataKey"; }; - return ListCustomTargetingValuesResponse; + return CmsMetadataKey; })(); - v1.DealBuyerPermissionTypeEnum = (function() { + v1.CmsMetadataKeyService = (function() { /** - * Properties of a DealBuyerPermissionTypeEnum. + * Constructs a new CmsMetadataKeyService service. * @memberof google.ads.admanager.v1 - * @interface IDealBuyerPermissionTypeEnum + * @classdesc Represents a CmsMetadataKeyService + * @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 CmsMetadataKeyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CmsMetadataKeyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CmsMetadataKeyService; /** - * Constructs a new DealBuyerPermissionTypeEnum. + * Creates new CmsMetadataKeyService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @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 {CmsMetadataKeyService} RPC service. Useful where requests and/or responses are streamed. + */ + CmsMetadataKeyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataKeyService|getCmsMetadataKey}. + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @typedef GetCmsMetadataKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CmsMetadataKey} [response] CmsMetadataKey + */ + + /** + * Calls GetCmsMetadataKey. + * @function getCmsMetadataKey + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @instance + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest} request GetCmsMetadataKeyRequest message or plain object + * @param {google.ads.admanager.v1.CmsMetadataKeyService.GetCmsMetadataKeyCallback} callback Node-style callback called with the error, if any, and CmsMetadataKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CmsMetadataKeyService.prototype.getCmsMetadataKey = function getCmsMetadataKey(request, callback) { + return this.rpcCall(getCmsMetadataKey, $root.google.ads.admanager.v1.GetCmsMetadataKeyRequest, $root.google.ads.admanager.v1.CmsMetadataKey, request, callback); + }, "name", { value: "GetCmsMetadataKey" }); + + /** + * Calls GetCmsMetadataKey. + * @function getCmsMetadataKey + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @instance + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest} request GetCmsMetadataKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataKeyService|listCmsMetadataKeys}. + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @typedef ListCmsMetadataKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCmsMetadataKeysResponse} [response] ListCmsMetadataKeysResponse + */ + + /** + * Calls ListCmsMetadataKeys. + * @function listCmsMetadataKeys + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @instance + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest} request ListCmsMetadataKeysRequest message or plain object + * @param {google.ads.admanager.v1.CmsMetadataKeyService.ListCmsMetadataKeysCallback} callback Node-style callback called with the error, if any, and ListCmsMetadataKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CmsMetadataKeyService.prototype.listCmsMetadataKeys = function listCmsMetadataKeys(request, callback) { + return this.rpcCall(listCmsMetadataKeys, $root.google.ads.admanager.v1.ListCmsMetadataKeysRequest, $root.google.ads.admanager.v1.ListCmsMetadataKeysResponse, request, callback); + }, "name", { value: "ListCmsMetadataKeys" }); + + /** + * Calls ListCmsMetadataKeys. + * @function listCmsMetadataKeys + * @memberof google.ads.admanager.v1.CmsMetadataKeyService + * @instance + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest} request ListCmsMetadataKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CmsMetadataKeyService; + })(); + + v1.GetCmsMetadataKeyRequest = (function() { + + /** + * Properties of a GetCmsMetadataKeyRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a DealBuyerPermissionTypeEnum. - * @implements IDealBuyerPermissionTypeEnum + * @interface IGetCmsMetadataKeyRequest + * @property {string|null} [name] GetCmsMetadataKeyRequest name + */ + + /** + * Constructs a new GetCmsMetadataKeyRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCmsMetadataKeyRequest. + * @implements IGetCmsMetadataKeyRequest * @constructor - * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest=} [properties] Properties to set */ - function DealBuyerPermissionTypeEnum(properties) { + function GetCmsMetadataKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18616,65 +17644,79 @@ } /** - * Creates a new DealBuyerPermissionTypeEnum instance using the specified properties. + * GetCmsMetadataKeyRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest + * @instance + */ + GetCmsMetadataKeyRequest.prototype.name = ""; + + /** + * Creates a new GetCmsMetadataKeyRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static - * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum instance + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCmsMetadataKeyRequest} GetCmsMetadataKeyRequest instance */ - DealBuyerPermissionTypeEnum.create = function create(properties) { - return new DealBuyerPermissionTypeEnum(properties); + GetCmsMetadataKeyRequest.create = function create(properties) { + return new GetCmsMetadataKeyRequest(properties); }; /** - * Encodes the specified DealBuyerPermissionTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * Encodes the specified GetCmsMetadataKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataKeyRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static - * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest} message GetCmsMetadataKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DealBuyerPermissionTypeEnum.encode = function encode(message, writer) { + GetCmsMetadataKeyRequest.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 DealBuyerPermissionTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * Encodes the specified GetCmsMetadataKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static - * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IGetCmsMetadataKeyRequest} message GetCmsMetadataKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DealBuyerPermissionTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + GetCmsMetadataKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer. + * Decodes a GetCmsMetadataKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum + * @returns {google.ads.admanager.v1.GetCmsMetadataKeyRequest} GetCmsMetadataKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DealBuyerPermissionTypeEnum.decode = function decode(reader, length, error) { + GetCmsMetadataKeyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCmsMetadataKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18684,126 +17726,127 @@ }; /** - * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a GetCmsMetadataKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum + * @returns {google.ads.admanager.v1.GetCmsMetadataKeyRequest} GetCmsMetadataKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DealBuyerPermissionTypeEnum.decodeDelimited = function decodeDelimited(reader) { + GetCmsMetadataKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DealBuyerPermissionTypeEnum message. + * Verifies a GetCmsMetadataKeyRequest message. * @function verify - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DealBuyerPermissionTypeEnum.verify = function verify(message) { + GetCmsMetadataKeyRequest.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 DealBuyerPermissionTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a GetCmsMetadataKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum + * @returns {google.ads.admanager.v1.GetCmsMetadataKeyRequest} GetCmsMetadataKeyRequest */ - DealBuyerPermissionTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum) + GetCmsMetadataKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCmsMetadataKeyRequest) return object; - return new $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum(); + var message = new $root.google.ads.admanager.v1.GetCmsMetadataKeyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a DealBuyerPermissionTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a GetCmsMetadataKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static - * @param {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum + * @param {google.ads.admanager.v1.GetCmsMetadataKeyRequest} message GetCmsMetadataKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DealBuyerPermissionTypeEnum.toObject = function toObject() { - return {}; + GetCmsMetadataKeyRequest.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 DealBuyerPermissionTypeEnum to JSON. + * Converts this GetCmsMetadataKeyRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @instance * @returns {Object.} JSON object */ - DealBuyerPermissionTypeEnum.prototype.toJSON = function toJSON() { + GetCmsMetadataKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DealBuyerPermissionTypeEnum + * Gets the default type url for GetCmsMetadataKeyRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @memberof google.ads.admanager.v1.GetCmsMetadataKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DealBuyerPermissionTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCmsMetadataKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.DealBuyerPermissionTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCmsMetadataKeyRequest"; }; - /** - * DealBuyerPermissionType enum. - * @name google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType - * @enum {number} - * @property {number} DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED=0 DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED value - * @property {number} NEGOTIATOR_ONLY=1 NEGOTIATOR_ONLY value - * @property {number} BIDDER=2 BIDDER value - */ - DealBuyerPermissionTypeEnum.DealBuyerPermissionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEGOTIATOR_ONLY"] = 1; - values[valuesById[2] = "BIDDER"] = 2; - return values; - })(); - - return DealBuyerPermissionTypeEnum; + return GetCmsMetadataKeyRequest; })(); - v1.DeviceCategory = (function() { + v1.ListCmsMetadataKeysRequest = (function() { /** - * Properties of a DeviceCategory. + * Properties of a ListCmsMetadataKeysRequest. * @memberof google.ads.admanager.v1 - * @interface IDeviceCategory - * @property {string|null} [name] DeviceCategory name - * @property {string|null} [displayName] DeviceCategory displayName + * @interface IListCmsMetadataKeysRequest + * @property {string|null} [parent] ListCmsMetadataKeysRequest parent + * @property {number|null} [pageSize] ListCmsMetadataKeysRequest pageSize + * @property {string|null} [pageToken] ListCmsMetadataKeysRequest pageToken + * @property {string|null} [filter] ListCmsMetadataKeysRequest filter + * @property {string|null} [orderBy] ListCmsMetadataKeysRequest orderBy + * @property {number|null} [skip] ListCmsMetadataKeysRequest skip */ /** - * Constructs a new DeviceCategory. + * Constructs a new ListCmsMetadataKeysRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a DeviceCategory. - * @implements IDeviceCategory + * @classdesc Represents a ListCmsMetadataKeysRequest. + * @implements IListCmsMetadataKeysRequest * @constructor - * @param {google.ads.admanager.v1.IDeviceCategory=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest=} [properties] Properties to set */ - function DeviceCategory(properties) { + function ListCmsMetadataKeysRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18811,100 +17854,147 @@ } /** - * DeviceCategory name. - * @member {string} name - * @memberof google.ads.admanager.v1.DeviceCategory + * ListCmsMetadataKeysRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @instance */ - DeviceCategory.prototype.name = ""; + ListCmsMetadataKeysRequest.prototype.parent = ""; /** - * DeviceCategory displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.DeviceCategory + * ListCmsMetadataKeysRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @instance */ - DeviceCategory.prototype.displayName = null; + ListCmsMetadataKeysRequest.prototype.pageSize = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ListCmsMetadataKeysRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest + * @instance + */ + ListCmsMetadataKeysRequest.prototype.pageToken = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(DeviceCategory.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListCmsMetadataKeysRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest + * @instance + */ + ListCmsMetadataKeysRequest.prototype.filter = ""; /** - * Creates a new DeviceCategory instance using the specified properties. + * ListCmsMetadataKeysRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest + * @instance + */ + ListCmsMetadataKeysRequest.prototype.orderBy = ""; + + /** + * ListCmsMetadataKeysRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest + * @instance + */ + ListCmsMetadataKeysRequest.prototype.skip = 0; + + /** + * Creates a new ListCmsMetadataKeysRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategory=} [properties] Properties to set - * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory instance + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysRequest} ListCmsMetadataKeysRequest instance */ - DeviceCategory.create = function create(properties) { - return new DeviceCategory(properties); + ListCmsMetadataKeysRequest.create = function create(properties) { + return new ListCmsMetadataKeysRequest(properties); }; /** - * Encodes the specified DeviceCategory message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. + * Encodes the specified ListCmsMetadataKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategory} message DeviceCategory message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest} message ListCmsMetadataKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCategory.encode = function encode(message, writer) { + ListCmsMetadataKeysRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified DeviceCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. + * Encodes the specified ListCmsMetadataKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategory} message DeviceCategory message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataKeysRequest} message ListCmsMetadataKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCategory.encodeDelimited = function encodeDelimited(message, writer) { + ListCmsMetadataKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceCategory message from the specified reader or buffer. + * Decodes a ListCmsMetadataKeysRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysRequest} ListCmsMetadataKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCategory.decode = function decode(reader, length, error) { + ListCmsMetadataKeysRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCategory(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCmsMetadataKeysRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -18916,314 +18006,275 @@ }; /** - * Decodes a DeviceCategory message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataKeysRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysRequest} ListCmsMetadataKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCategory.decodeDelimited = function decodeDelimited(reader) { + ListCmsMetadataKeysRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceCategory message. + * Verifies a ListCmsMetadataKeysRequest message. * @function verify - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceCategory.verify = function verify(message) { + ListCmsMetadataKeysRequest.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.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: 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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a DeviceCategory message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataKeysRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysRequest} ListCmsMetadataKeysRequest */ - DeviceCategory.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.DeviceCategory) + ListCmsMetadataKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCmsMetadataKeysRequest) return object; - var message = new $root.google.ads.admanager.v1.DeviceCategory(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); + var message = new $root.google.ads.admanager.v1.ListCmsMetadataKeysRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a DeviceCategory message. Also converts values to other types if specified. + * Creates a plain object from a ListCmsMetadataKeysRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static - * @param {google.ads.admanager.v1.DeviceCategory} message DeviceCategory + * @param {google.ads.admanager.v1.ListCmsMetadataKeysRequest} message ListCmsMetadataKeysRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceCategory.toObject = function toObject(message, options) { + ListCmsMetadataKeysRequest.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 (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this DeviceCategory to JSON. + * Converts this ListCmsMetadataKeysRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @instance * @returns {Object.} JSON object */ - DeviceCategory.prototype.toJSON = function toJSON() { + ListCmsMetadataKeysRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeviceCategory + * Gets the default type url for ListCmsMetadataKeysRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.DeviceCategory + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeviceCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCmsMetadataKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCategory"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCmsMetadataKeysRequest"; }; - return DeviceCategory; + return ListCmsMetadataKeysRequest; })(); - v1.DeviceCategoryService = (function() { + v1.ListCmsMetadataKeysResponse = (function() { /** - * Constructs a new DeviceCategoryService service. + * Properties of a ListCmsMetadataKeysResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a DeviceCategoryService - * @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 DeviceCategoryService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DeviceCategoryService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceCategoryService; - - /** - * Creates new DeviceCategoryService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.DeviceCategoryService - * @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 {DeviceCategoryService} RPC service. Useful where requests and/or responses are streamed. - */ - DeviceCategoryService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|getDeviceCategory}. - * @memberof google.ads.admanager.v1.DeviceCategoryService - * @typedef GetDeviceCategoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.DeviceCategory} [response] DeviceCategory - */ - - /** - * Calls GetDeviceCategory. - * @function getDeviceCategory - * @memberof google.ads.admanager.v1.DeviceCategoryService - * @instance - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} request GetDeviceCategoryRequest message or plain object - * @param {google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategoryCallback} callback Node-style callback called with the error, if any, and DeviceCategory - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DeviceCategoryService.prototype.getDeviceCategory = function getDeviceCategory(request, callback) { - return this.rpcCall(getDeviceCategory, $root.google.ads.admanager.v1.GetDeviceCategoryRequest, $root.google.ads.admanager.v1.DeviceCategory, request, callback); - }, "name", { value: "GetDeviceCategory" }); - - /** - * Calls GetDeviceCategory. - * @function getDeviceCategory - * @memberof google.ads.admanager.v1.DeviceCategoryService - * @instance - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} request GetDeviceCategoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface IListCmsMetadataKeysResponse + * @property {Array.|null} [cmsMetadataKeys] ListCmsMetadataKeysResponse cmsMetadataKeys + * @property {string|null} [nextPageToken] ListCmsMetadataKeysResponse nextPageToken + * @property {number|null} [totalSize] ListCmsMetadataKeysResponse totalSize */ /** - * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|listDeviceCategories}. - * @memberof google.ads.admanager.v1.DeviceCategoryService - * @typedef ListDeviceCategoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListDeviceCategoriesResponse} [response] ListDeviceCategoriesResponse + * Constructs a new ListCmsMetadataKeysResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListCmsMetadataKeysResponse. + * @implements IListCmsMetadataKeysResponse + * @constructor + * @param {google.ads.admanager.v1.IListCmsMetadataKeysResponse=} [properties] Properties to set */ + function ListCmsMetadataKeysResponse(properties) { + this.cmsMetadataKeys = []; + 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 ListDeviceCategories. - * @function listDeviceCategories - * @memberof google.ads.admanager.v1.DeviceCategoryService + * ListCmsMetadataKeysResponse cmsMetadataKeys. + * @member {Array.} cmsMetadataKeys + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @instance - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} request ListDeviceCategoriesRequest message or plain object - * @param {google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategoriesCallback} callback Node-style callback called with the error, if any, and ListDeviceCategoriesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DeviceCategoryService.prototype.listDeviceCategories = function listDeviceCategories(request, callback) { - return this.rpcCall(listDeviceCategories, $root.google.ads.admanager.v1.ListDeviceCategoriesRequest, $root.google.ads.admanager.v1.ListDeviceCategoriesResponse, request, callback); - }, "name", { value: "ListDeviceCategories" }); + ListCmsMetadataKeysResponse.prototype.cmsMetadataKeys = $util.emptyArray; /** - * Calls ListDeviceCategories. - * @function listDeviceCategories - * @memberof google.ads.admanager.v1.DeviceCategoryService + * ListCmsMetadataKeysResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @instance - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} request ListDeviceCategoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DeviceCategoryService; - })(); - - v1.GetDeviceCategoryRequest = (function() { - - /** - * Properties of a GetDeviceCategoryRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetDeviceCategoryRequest - * @property {string|null} [name] GetDeviceCategoryRequest name - */ - - /** - * Constructs a new GetDeviceCategoryRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetDeviceCategoryRequest. - * @implements IGetDeviceCategoryRequest - * @constructor - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest=} [properties] Properties to set */ - function GetDeviceCategoryRequest(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]]; - } + ListCmsMetadataKeysResponse.prototype.nextPageToken = ""; /** - * GetDeviceCategoryRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * ListCmsMetadataKeysResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @instance */ - GetDeviceCategoryRequest.prototype.name = ""; + ListCmsMetadataKeysResponse.prototype.totalSize = 0; /** - * Creates a new GetDeviceCategoryRequest instance using the specified properties. + * Creates a new ListCmsMetadataKeysResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest instance + * @param {google.ads.admanager.v1.IListCmsMetadataKeysResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysResponse} ListCmsMetadataKeysResponse instance */ - GetDeviceCategoryRequest.create = function create(properties) { - return new GetDeviceCategoryRequest(properties); + ListCmsMetadataKeysResponse.create = function create(properties) { + return new ListCmsMetadataKeysResponse(properties); }; /** - * Encodes the specified GetDeviceCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} message GetDeviceCategoryRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataKeysResponse} message ListCmsMetadataKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceCategoryRequest.encode = function encode(message, writer) { + ListCmsMetadataKeysResponse.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.cmsMetadataKeys != null && message.cmsMetadataKeys.length) + for (var i = 0; i < message.cmsMetadataKeys.length; ++i) + $root.google.ads.admanager.v1.CmsMetadataKey.encode(message.cmsMetadataKeys[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified GetDeviceCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataKeysResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static - * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} message GetDeviceCategoryRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataKeysResponse} message ListCmsMetadataKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeviceCategoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCmsMetadataKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataKeysResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysResponse} ListCmsMetadataKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceCategoryRequest.decode = function decode(reader, length, error) { + ListCmsMetadataKeysResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetDeviceCategoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCmsMetadataKeysResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.cmsMetadataKeys && message.cmsMetadataKeys.length)) + message.cmsMetadataKeys = []; + message.cmsMetadataKeys.push($root.google.ads.admanager.v1.CmsMetadataKey.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -19235,127 +18286,156 @@ }; /** - * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataKeysResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysResponse} ListCmsMetadataKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeviceCategoryRequest.decodeDelimited = function decodeDelimited(reader) { + ListCmsMetadataKeysResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeviceCategoryRequest message. + * Verifies a ListCmsMetadataKeysResponse message. * @function verify - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeviceCategoryRequest.verify = function verify(message) { + ListCmsMetadataKeysResponse.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.cmsMetadataKeys != null && message.hasOwnProperty("cmsMetadataKeys")) { + if (!Array.isArray(message.cmsMetadataKeys)) + return "cmsMetadataKeys: array expected"; + for (var i = 0; i < message.cmsMetadataKeys.length; ++i) { + var error = $root.google.ads.admanager.v1.CmsMetadataKey.verify(message.cmsMetadataKeys[i]); + if (error) + return "cmsMetadataKeys." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a GetDeviceCategoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataKeysResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataKeysResponse} ListCmsMetadataKeysResponse */ - GetDeviceCategoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetDeviceCategoryRequest) + ListCmsMetadataKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCmsMetadataKeysResponse) return object; - var message = new $root.google.ads.admanager.v1.GetDeviceCategoryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.ListCmsMetadataKeysResponse(); + if (object.cmsMetadataKeys) { + if (!Array.isArray(object.cmsMetadataKeys)) + throw TypeError(".google.ads.admanager.v1.ListCmsMetadataKeysResponse.cmsMetadataKeys: array expected"); + message.cmsMetadataKeys = []; + for (var i = 0; i < object.cmsMetadataKeys.length; ++i) { + if (typeof object.cmsMetadataKeys[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCmsMetadataKeysResponse.cmsMetadataKeys: object expected"); + message.cmsMetadataKeys[i] = $root.google.ads.admanager.v1.CmsMetadataKey.fromObject(object.cmsMetadataKeys[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a GetDeviceCategoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCmsMetadataKeysResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static - * @param {google.ads.admanager.v1.GetDeviceCategoryRequest} message GetDeviceCategoryRequest + * @param {google.ads.admanager.v1.ListCmsMetadataKeysResponse} message ListCmsMetadataKeysResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeviceCategoryRequest.toObject = function toObject(message, options) { + ListCmsMetadataKeysResponse.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.arrays || options.defaults) + object.cmsMetadataKeys = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.cmsMetadataKeys && message.cmsMetadataKeys.length) { + object.cmsMetadataKeys = []; + for (var j = 0; j < message.cmsMetadataKeys.length; ++j) + object.cmsMetadataKeys[j] = $root.google.ads.admanager.v1.CmsMetadataKey.toObject(message.cmsMetadataKeys[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this GetDeviceCategoryRequest to JSON. + * Converts this ListCmsMetadataKeysResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @instance * @returns {Object.} JSON object */ - GetDeviceCategoryRequest.prototype.toJSON = function toJSON() { + ListCmsMetadataKeysResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDeviceCategoryRequest + * Gets the default type url for ListCmsMetadataKeysResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataKeysResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDeviceCategoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCmsMetadataKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetDeviceCategoryRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCmsMetadataKeysResponse"; }; - return GetDeviceCategoryRequest; + return ListCmsMetadataKeysResponse; })(); - v1.ListDeviceCategoriesRequest = (function() { + v1.CmsMetadataValueStatusEnum = (function() { /** - * Properties of a ListDeviceCategoriesRequest. + * Properties of a CmsMetadataValueStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IListDeviceCategoriesRequest - * @property {string|null} [parent] ListDeviceCategoriesRequest parent - * @property {number|null} [pageSize] ListDeviceCategoriesRequest pageSize - * @property {string|null} [pageToken] ListDeviceCategoriesRequest pageToken - * @property {string|null} [filter] ListDeviceCategoriesRequest filter - * @property {string|null} [orderBy] ListDeviceCategoriesRequest orderBy - * @property {number|null} [skip] ListDeviceCategoriesRequest skip + * @interface ICmsMetadataValueStatusEnum */ /** - * Constructs a new ListDeviceCategoriesRequest. + * Constructs a new CmsMetadataValueStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListDeviceCategoriesRequest. - * @implements IListDeviceCategoriesRequest + * @classdesc Represents a CmsMetadataValueStatusEnum. + * @implements ICmsMetadataValueStatusEnum * @constructor - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICmsMetadataValueStatusEnum=} [properties] Properties to set */ - function ListDeviceCategoriesRequest(properties) { + function CmsMetadataValueStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19363,149 +18443,65 @@ } /** - * ListDeviceCategoriesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance + * Creates a new CmsMetadataValueStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum + * @static + * @param {google.ads.admanager.v1.ICmsMetadataValueStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CmsMetadataValueStatusEnum} CmsMetadataValueStatusEnum instance */ - ListDeviceCategoriesRequest.prototype.parent = ""; + CmsMetadataValueStatusEnum.create = function create(properties) { + return new CmsMetadataValueStatusEnum(properties); + }; /** - * ListDeviceCategoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance - */ - ListDeviceCategoriesRequest.prototype.pageSize = 0; - - /** - * ListDeviceCategoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance - */ - ListDeviceCategoriesRequest.prototype.pageToken = ""; - - /** - * ListDeviceCategoriesRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance - */ - ListDeviceCategoriesRequest.prototype.filter = ""; - - /** - * ListDeviceCategoriesRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance - */ - ListDeviceCategoriesRequest.prototype.orderBy = ""; - - /** - * ListDeviceCategoriesRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @instance - */ - ListDeviceCategoriesRequest.prototype.skip = 0; - - /** - * Creates a new ListDeviceCategoriesRequest instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest - * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest instance - */ - ListDeviceCategoriesRequest.create = function create(properties) { - return new ListDeviceCategoriesRequest(properties); - }; - - /** - * Encodes the specified ListDeviceCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * Encodes the specified CmsMetadataValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValueStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} message ListDeviceCategoriesRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataValueStatusEnum} message CmsMetadataValueStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceCategoriesRequest.encode = function encode(message, writer) { + CmsMetadataValueStatusEnum.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified ListDeviceCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * Encodes the specified CmsMetadataValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValueStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} message ListDeviceCategoriesRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataValueStatusEnum} message CmsMetadataValueStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceCategoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CmsMetadataValueStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer. + * Decodes a CmsMetadataValueStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + * @returns {google.ads.admanager.v1.CmsMetadataValueStatusEnum} CmsMetadataValueStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceCategoriesRequest.decode = function decode(reader, length, error) { + CmsMetadataValueStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCategoriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CmsMetadataValueStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; - } - case 6: { - message.skip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -19515,166 +18511,130 @@ }; /** - * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataValueStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + * @returns {google.ads.admanager.v1.CmsMetadataValueStatusEnum} CmsMetadataValueStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceCategoriesRequest.decodeDelimited = function decodeDelimited(reader) { + CmsMetadataValueStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceCategoriesRequest message. + * Verifies a CmsMetadataValueStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceCategoriesRequest.verify = function verify(message) { + CmsMetadataValueStatusEnum.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; return null; }; /** - * Creates a ListDeviceCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataValueStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + * @returns {google.ads.admanager.v1.CmsMetadataValueStatusEnum} CmsMetadataValueStatusEnum */ - ListDeviceCategoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListDeviceCategoriesRequest) + CmsMetadataValueStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CmsMetadataValueStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.ListDeviceCategoriesRequest(); - 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.skip != null) - message.skip = object.skip | 0; - return message; + return new $root.google.ads.admanager.v1.CmsMetadataValueStatusEnum(); }; /** - * Creates a plain object from a ListDeviceCategoriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CmsMetadataValueStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static - * @param {google.ads.admanager.v1.ListDeviceCategoriesRequest} message ListDeviceCategoriesRequest + * @param {google.ads.admanager.v1.CmsMetadataValueStatusEnum} message CmsMetadataValueStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceCategoriesRequest.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.skip = 0; - } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; - return object; + CmsMetadataValueStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this ListDeviceCategoriesRequest to JSON. + * Converts this CmsMetadataValueStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @instance * @returns {Object.} JSON object */ - ListDeviceCategoriesRequest.prototype.toJSON = function toJSON() { + CmsMetadataValueStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeviceCategoriesRequest + * Gets the default type url for CmsMetadataValueStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @memberof google.ads.admanager.v1.CmsMetadataValueStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeviceCategoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CmsMetadataValueStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCategoriesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CmsMetadataValueStatusEnum"; }; - return ListDeviceCategoriesRequest; + /** + * CmsMetadataValueStatus enum. + * @name google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus + * @enum {number} + * @property {number} CMS_METADATA_VALUE_STATUS_UNSPECIFIED=0 CMS_METADATA_VALUE_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} ARCHIVED=2 ARCHIVED value + * @property {number} INACTIVE=3 INACTIVE value + */ + CmsMetadataValueStatusEnum.CmsMetadataValueStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CMS_METADATA_VALUE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "ARCHIVED"] = 2; + values[valuesById[3] = "INACTIVE"] = 3; + return values; + })(); + + return CmsMetadataValueStatusEnum; })(); - v1.ListDeviceCategoriesResponse = (function() { + v1.CmsMetadataValue = (function() { /** - * Properties of a ListDeviceCategoriesResponse. + * Properties of a CmsMetadataValue. * @memberof google.ads.admanager.v1 - * @interface IListDeviceCategoriesResponse - * @property {Array.|null} [deviceCategories] ListDeviceCategoriesResponse deviceCategories - * @property {string|null} [nextPageToken] ListDeviceCategoriesResponse nextPageToken - * @property {number|null} [totalSize] ListDeviceCategoriesResponse totalSize + * @interface ICmsMetadataValue + * @property {string|null} [name] CmsMetadataValue name + * @property {string|null} [displayName] CmsMetadataValue displayName + * @property {string|null} [key] CmsMetadataValue key + * @property {google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus|null} [status] CmsMetadataValue status */ /** - * Constructs a new ListDeviceCategoriesResponse. + * Constructs a new CmsMetadataValue. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListDeviceCategoriesResponse. - * @implements IListDeviceCategoriesResponse + * @classdesc Represents a CmsMetadataValue. + * @implements ICmsMetadataValue * @constructor - * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICmsMetadataValue=} [properties] Properties to set */ - function ListDeviceCategoriesResponse(properties) { - this.deviceCategories = []; + function CmsMetadataValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19682,108 +18642,119 @@ } /** - * ListDeviceCategoriesResponse deviceCategories. - * @member {Array.} deviceCategories - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * CmsMetadataValue name. + * @member {string} name + * @memberof google.ads.admanager.v1.CmsMetadataValue * @instance */ - ListDeviceCategoriesResponse.prototype.deviceCategories = $util.emptyArray; + CmsMetadataValue.prototype.name = ""; /** - * ListDeviceCategoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * CmsMetadataValue displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.CmsMetadataValue * @instance */ - ListDeviceCategoriesResponse.prototype.nextPageToken = ""; + CmsMetadataValue.prototype.displayName = ""; /** - * ListDeviceCategoriesResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * CmsMetadataValue key. + * @member {string} key + * @memberof google.ads.admanager.v1.CmsMetadataValue * @instance */ - ListDeviceCategoriesResponse.prototype.totalSize = 0; + CmsMetadataValue.prototype.key = ""; /** - * Creates a new ListDeviceCategoriesResponse instance using the specified properties. + * CmsMetadataValue status. + * @member {google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus} status + * @memberof google.ads.admanager.v1.CmsMetadataValue + * @instance + */ + CmsMetadataValue.prototype.status = 0; + + /** + * Creates a new CmsMetadataValue instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse instance + * @param {google.ads.admanager.v1.ICmsMetadataValue=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CmsMetadataValue} CmsMetadataValue instance */ - ListDeviceCategoriesResponse.create = function create(properties) { - return new ListDeviceCategoriesResponse(properties); + CmsMetadataValue.create = function create(properties) { + return new CmsMetadataValue(properties); }; /** - * Encodes the specified ListDeviceCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * Encodes the specified CmsMetadataValue message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValue.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse} message ListDeviceCategoriesResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataValue} message CmsMetadataValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceCategoriesResponse.encode = function encode(message, writer) { + CmsMetadataValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceCategories != null && message.deviceCategories.length) - for (var i = 0; i < message.deviceCategories.length; ++i) - $root.google.ads.admanager.v1.DeviceCategory.encode(message.deviceCategories[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.key); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); return writer; }; /** - * Encodes the specified ListDeviceCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * Encodes the specified CmsMetadataValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static - * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse} message ListDeviceCategoriesResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICmsMetadataValue} message CmsMetadataValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeviceCategoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CmsMetadataValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer. + * Decodes a CmsMetadataValue message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + * @returns {google.ads.admanager.v1.CmsMetadataValue} CmsMetadataValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceCategoriesResponse.decode = function decode(reader, length, error) { + CmsMetadataValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCategoriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CmsMetadataValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.deviceCategories && message.deviceCategories.length)) - message.deviceCategories = []; - message.deviceCategories.push($root.google.ads.admanager.v1.DeviceCategory.decode(reader, reader.uint32())); + message.name = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.displayName = reader.string(); break; } - case 3: { - message.totalSize = reader.int32(); + case 5: { + message.key = reader.string(); + break; + } + case 6: { + message.status = reader.int32(); break; } default: @@ -19795,344 +18766,357 @@ }; /** - * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a CmsMetadataValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + * @returns {google.ads.admanager.v1.CmsMetadataValue} CmsMetadataValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeviceCategoriesResponse.decodeDelimited = function decodeDelimited(reader) { + CmsMetadataValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeviceCategoriesResponse message. + * Verifies a CmsMetadataValue message. * @function verify - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeviceCategoriesResponse.verify = function verify(message) { + CmsMetadataValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceCategories != null && message.hasOwnProperty("deviceCategories")) { - if (!Array.isArray(message.deviceCategories)) - return "deviceCategories: array expected"; - for (var i = 0; i < message.deviceCategories.length; ++i) { - var error = $root.google.ads.admanager.v1.DeviceCategory.verify(message.deviceCategories[i]); - if (error) - return "deviceCategories." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListDeviceCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CmsMetadataValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + * @returns {google.ads.admanager.v1.CmsMetadataValue} CmsMetadataValue */ - ListDeviceCategoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListDeviceCategoriesResponse) + CmsMetadataValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CmsMetadataValue) return object; - var message = new $root.google.ads.admanager.v1.ListDeviceCategoriesResponse(); - if (object.deviceCategories) { - if (!Array.isArray(object.deviceCategories)) - throw TypeError(".google.ads.admanager.v1.ListDeviceCategoriesResponse.deviceCategories: array expected"); - message.deviceCategories = []; - for (var i = 0; i < object.deviceCategories.length; ++i) { - if (typeof object.deviceCategories[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListDeviceCategoriesResponse.deviceCategories: object expected"); - message.deviceCategories[i] = $root.google.ads.admanager.v1.DeviceCategory.fromObject(object.deviceCategories[i]); + var message = new $root.google.ads.admanager.v1.CmsMetadataValue(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.key != null) + message.key = String(object.key); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; } + break; + case "CMS_METADATA_VALUE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "ARCHIVED": + case 2: + message.status = 2; + break; + case "INACTIVE": + case 3: + message.status = 3; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListDeviceCategoriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CmsMetadataValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static - * @param {google.ads.admanager.v1.ListDeviceCategoriesResponse} message ListDeviceCategoriesResponse + * @param {google.ads.admanager.v1.CmsMetadataValue} message CmsMetadataValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeviceCategoriesResponse.toObject = function toObject(message, options) { + CmsMetadataValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deviceCategories = []; if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.deviceCategories && message.deviceCategories.length) { - object.deviceCategories = []; - for (var j = 0; j < message.deviceCategories.length; ++j) - object.deviceCategories[j] = $root.google.ads.admanager.v1.DeviceCategory.toObject(message.deviceCategories[j], options); + object.name = ""; + object.displayName = ""; + object.key = ""; + object.status = options.enums === String ? "CMS_METADATA_VALUE_STATUS_UNSPECIFIED" : 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus[message.status] : message.status; return object; }; /** - * Converts this ListDeviceCategoriesResponse to JSON. + * Converts this CmsMetadataValue to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @instance * @returns {Object.} JSON object */ - ListDeviceCategoriesResponse.prototype.toJSON = function toJSON() { + CmsMetadataValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeviceCategoriesResponse + * Gets the default type url for CmsMetadataValue * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @memberof google.ads.admanager.v1.CmsMetadataValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeviceCategoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CmsMetadataValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCategoriesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.CmsMetadataValue"; }; - return ListDeviceCategoriesResponse; + return CmsMetadataValue; })(); - v1.EntitySignalsMapping = (function() { + v1.CmsMetadataValueService = (function() { /** - * Properties of an EntitySignalsMapping. + * Constructs a new CmsMetadataValueService service. * @memberof google.ads.admanager.v1 - * @interface IEntitySignalsMapping - * @property {number|Long|null} [audienceSegmentId] EntitySignalsMapping audienceSegmentId - * @property {number|Long|null} [contentBundleId] EntitySignalsMapping contentBundleId - * @property {number|Long|null} [customTargetingValueId] EntitySignalsMapping customTargetingValueId - * @property {string|null} [name] EntitySignalsMapping name - * @property {number|Long|null} [entitySignalsMappingId] EntitySignalsMapping entitySignalsMappingId - * @property {Array.|null} [taxonomyCategoryIds] EntitySignalsMapping taxonomyCategoryIds + * @classdesc Represents a CmsMetadataValueService + * @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 CmsMetadataValueService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CmsMetadataValueService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CmsMetadataValueService; /** - * Constructs a new EntitySignalsMapping. - * @memberof google.ads.admanager.v1 - * @classdesc Represents an EntitySignalsMapping. - * @implements IEntitySignalsMapping - * @constructor - * @param {google.ads.admanager.v1.IEntitySignalsMapping=} [properties] Properties to set + * Creates new CmsMetadataValueService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CmsMetadataValueService + * @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 {CmsMetadataValueService} RPC service. Useful where requests and/or responses are streamed. */ - function EntitySignalsMapping(properties) { - this.taxonomyCategoryIds = []; - 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]]; - } + CmsMetadataValueService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * EntitySignalsMapping audienceSegmentId. - * @member {number|Long|null|undefined} audienceSegmentId - * @memberof google.ads.admanager.v1.EntitySignalsMapping - * @instance + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataValueService|getCmsMetadataValue}. + * @memberof google.ads.admanager.v1.CmsMetadataValueService + * @typedef GetCmsMetadataValueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CmsMetadataValue} [response] CmsMetadataValue */ - EntitySignalsMapping.prototype.audienceSegmentId = null; /** - * EntitySignalsMapping contentBundleId. - * @member {number|Long|null|undefined} contentBundleId - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * Calls GetCmsMetadataValue. + * @function getCmsMetadataValue + * @memberof google.ads.admanager.v1.CmsMetadataValueService * @instance + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest} request GetCmsMetadataValueRequest message or plain object + * @param {google.ads.admanager.v1.CmsMetadataValueService.GetCmsMetadataValueCallback} callback Node-style callback called with the error, if any, and CmsMetadataValue + * @returns {undefined} + * @variation 1 */ - EntitySignalsMapping.prototype.contentBundleId = null; + Object.defineProperty(CmsMetadataValueService.prototype.getCmsMetadataValue = function getCmsMetadataValue(request, callback) { + return this.rpcCall(getCmsMetadataValue, $root.google.ads.admanager.v1.GetCmsMetadataValueRequest, $root.google.ads.admanager.v1.CmsMetadataValue, request, callback); + }, "name", { value: "GetCmsMetadataValue" }); /** - * EntitySignalsMapping customTargetingValueId. - * @member {number|Long|null|undefined} customTargetingValueId - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * Calls GetCmsMetadataValue. + * @function getCmsMetadataValue + * @memberof google.ads.admanager.v1.CmsMetadataValueService * @instance + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest} request GetCmsMetadataValueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EntitySignalsMapping.prototype.customTargetingValueId = null; /** - * EntitySignalsMapping name. - * @member {string} name - * @memberof google.ads.admanager.v1.EntitySignalsMapping - * @instance + * Callback as used by {@link google.ads.admanager.v1.CmsMetadataValueService|listCmsMetadataValues}. + * @memberof google.ads.admanager.v1.CmsMetadataValueService + * @typedef ListCmsMetadataValuesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCmsMetadataValuesResponse} [response] ListCmsMetadataValuesResponse */ - EntitySignalsMapping.prototype.name = ""; /** - * EntitySignalsMapping entitySignalsMappingId. - * @member {number|Long|null|undefined} entitySignalsMappingId - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * Calls ListCmsMetadataValues. + * @function listCmsMetadataValues + * @memberof google.ads.admanager.v1.CmsMetadataValueService * @instance + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest} request ListCmsMetadataValuesRequest message or plain object + * @param {google.ads.admanager.v1.CmsMetadataValueService.ListCmsMetadataValuesCallback} callback Node-style callback called with the error, if any, and ListCmsMetadataValuesResponse + * @returns {undefined} + * @variation 1 */ - EntitySignalsMapping.prototype.entitySignalsMappingId = null; + Object.defineProperty(CmsMetadataValueService.prototype.listCmsMetadataValues = function listCmsMetadataValues(request, callback) { + return this.rpcCall(listCmsMetadataValues, $root.google.ads.admanager.v1.ListCmsMetadataValuesRequest, $root.google.ads.admanager.v1.ListCmsMetadataValuesResponse, request, callback); + }, "name", { value: "ListCmsMetadataValues" }); /** - * EntitySignalsMapping taxonomyCategoryIds. - * @member {Array.} taxonomyCategoryIds - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * Calls ListCmsMetadataValues. + * @function listCmsMetadataValues + * @memberof google.ads.admanager.v1.CmsMetadataValueService * @instance + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest} request ListCmsMetadataValuesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EntitySignalsMapping.prototype.taxonomyCategoryIds = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return CmsMetadataValueService; + })(); + + v1.GetCmsMetadataValueRequest = (function() { /** - * EntitySignalsMapping entity. - * @member {"audienceSegmentId"|"contentBundleId"|"customTargetingValueId"|undefined} entity - * @memberof google.ads.admanager.v1.EntitySignalsMapping - * @instance + * Properties of a GetCmsMetadataValueRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetCmsMetadataValueRequest + * @property {string|null} [name] GetCmsMetadataValueRequest name */ - Object.defineProperty(EntitySignalsMapping.prototype, "entity", { - get: $util.oneOfGetter($oneOfFields = ["audienceSegmentId", "contentBundleId", "customTargetingValueId"]), - set: $util.oneOfSetter($oneOfFields) - }); - // Virtual OneOf for proto3 optional field - Object.defineProperty(EntitySignalsMapping.prototype, "_entitySignalsMappingId", { - get: $util.oneOfGetter($oneOfFields = ["entitySignalsMappingId"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new GetCmsMetadataValueRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCmsMetadataValueRequest. + * @implements IGetCmsMetadataValueRequest + * @constructor + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest=} [properties] Properties to set + */ + function GetCmsMetadataValueRequest(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 EntitySignalsMapping instance using the specified properties. + * GetCmsMetadataValueRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest + * @instance + */ + GetCmsMetadataValueRequest.prototype.name = ""; + + /** + * Creates a new GetCmsMetadataValueRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static - * @param {google.ads.admanager.v1.IEntitySignalsMapping=} [properties] Properties to set - * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping instance + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCmsMetadataValueRequest} GetCmsMetadataValueRequest instance */ - EntitySignalsMapping.create = function create(properties) { - return new EntitySignalsMapping(properties); + GetCmsMetadataValueRequest.create = function create(properties) { + return new GetCmsMetadataValueRequest(properties); }; /** - * Encodes the specified EntitySignalsMapping message. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * Encodes the specified GetCmsMetadataValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataValueRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static - * @param {google.ads.admanager.v1.IEntitySignalsMapping} message EntitySignalsMapping message or plain object to encode + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest} message GetCmsMetadataValueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntitySignalsMapping.encode = function encode(message, writer) { + GetCmsMetadataValueRequest.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.entitySignalsMappingId != null && Object.hasOwnProperty.call(message, "entitySignalsMappingId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.entitySignalsMappingId); - if (message.audienceSegmentId != null && Object.hasOwnProperty.call(message, "audienceSegmentId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.audienceSegmentId); - if (message.contentBundleId != null && Object.hasOwnProperty.call(message, "contentBundleId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.contentBundleId); - if (message.customTargetingValueId != null && Object.hasOwnProperty.call(message, "customTargetingValueId")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.customTargetingValueId); - if (message.taxonomyCategoryIds != null && message.taxonomyCategoryIds.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.taxonomyCategoryIds.length; ++i) - writer.int64(message.taxonomyCategoryIds[i]); - writer.ldelim(); - } return writer; }; /** - * Encodes the specified EntitySignalsMapping message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * Encodes the specified GetCmsMetadataValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCmsMetadataValueRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static - * @param {google.ads.admanager.v1.IEntitySignalsMapping} message EntitySignalsMapping message or plain object to encode + * @param {google.ads.admanager.v1.IGetCmsMetadataValueRequest} message GetCmsMetadataValueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntitySignalsMapping.encodeDelimited = function encodeDelimited(message, writer) { + GetCmsMetadataValueRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntitySignalsMapping message from the specified reader or buffer. + * Decodes a GetCmsMetadataValueRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + * @returns {google.ads.admanager.v1.GetCmsMetadataValueRequest} GetCmsMetadataValueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntitySignalsMapping.decode = function decode(reader, length, error) { + GetCmsMetadataValueRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.EntitySignalsMapping(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCmsMetadataValueRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.audienceSegmentId = reader.int64(); - break; - } - case 4: { - message.contentBundleId = reader.int64(); - break; - } - case 5: { - message.customTargetingValueId = reader.int64(); - break; - } case 1: { message.name = reader.string(); break; } - case 2: { - message.entitySignalsMappingId = reader.int64(); - break; - } - case 6: { - if (!(message.taxonomyCategoryIds && message.taxonomyCategoryIds.length)) - message.taxonomyCategoryIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.taxonomyCategoryIds.push(reader.int64()); - } else - message.taxonomyCategoryIds.push(reader.int64()); - break; - } default: reader.skipType(tag & 7); break; @@ -20142,557 +19126,275 @@ }; /** - * Decodes an EntitySignalsMapping message from the specified reader or buffer, length delimited. + * Decodes a GetCmsMetadataValueRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + * @returns {google.ads.admanager.v1.GetCmsMetadataValueRequest} GetCmsMetadataValueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntitySignalsMapping.decodeDelimited = function decodeDelimited(reader) { + GetCmsMetadataValueRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntitySignalsMapping message. + * Verifies a GetCmsMetadataValueRequest message. * @function verify - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntitySignalsMapping.verify = function verify(message) { + GetCmsMetadataValueRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.audienceSegmentId != null && message.hasOwnProperty("audienceSegmentId")) { - properties.entity = 1; - if (!$util.isInteger(message.audienceSegmentId) && !(message.audienceSegmentId && $util.isInteger(message.audienceSegmentId.low) && $util.isInteger(message.audienceSegmentId.high))) - return "audienceSegmentId: integer|Long expected"; - } - if (message.contentBundleId != null && message.hasOwnProperty("contentBundleId")) { - if (properties.entity === 1) - return "entity: multiple values"; - properties.entity = 1; - if (!$util.isInteger(message.contentBundleId) && !(message.contentBundleId && $util.isInteger(message.contentBundleId.low) && $util.isInteger(message.contentBundleId.high))) - return "contentBundleId: integer|Long expected"; - } - if (message.customTargetingValueId != null && message.hasOwnProperty("customTargetingValueId")) { - if (properties.entity === 1) - return "entity: multiple values"; - properties.entity = 1; - if (!$util.isInteger(message.customTargetingValueId) && !(message.customTargetingValueId && $util.isInteger(message.customTargetingValueId.low) && $util.isInteger(message.customTargetingValueId.high))) - return "customTargetingValueId: integer|Long expected"; - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.entitySignalsMappingId != null && message.hasOwnProperty("entitySignalsMappingId")) { - properties._entitySignalsMappingId = 1; - if (!$util.isInteger(message.entitySignalsMappingId) && !(message.entitySignalsMappingId && $util.isInteger(message.entitySignalsMappingId.low) && $util.isInteger(message.entitySignalsMappingId.high))) - return "entitySignalsMappingId: integer|Long expected"; - } - if (message.taxonomyCategoryIds != null && message.hasOwnProperty("taxonomyCategoryIds")) { - if (!Array.isArray(message.taxonomyCategoryIds)) - return "taxonomyCategoryIds: array expected"; - for (var i = 0; i < message.taxonomyCategoryIds.length; ++i) - if (!$util.isInteger(message.taxonomyCategoryIds[i]) && !(message.taxonomyCategoryIds[i] && $util.isInteger(message.taxonomyCategoryIds[i].low) && $util.isInteger(message.taxonomyCategoryIds[i].high))) - return "taxonomyCategoryIds: integer|Long[] expected"; - } return null; }; /** - * Creates an EntitySignalsMapping message from a plain object. Also converts values to their respective internal types. + * Creates a GetCmsMetadataValueRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + * @returns {google.ads.admanager.v1.GetCmsMetadataValueRequest} GetCmsMetadataValueRequest */ - EntitySignalsMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.EntitySignalsMapping) + GetCmsMetadataValueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCmsMetadataValueRequest) return object; - var message = new $root.google.ads.admanager.v1.EntitySignalsMapping(); - if (object.audienceSegmentId != null) - if ($util.Long) - (message.audienceSegmentId = $util.Long.fromValue(object.audienceSegmentId)).unsigned = false; - else if (typeof object.audienceSegmentId === "string") - message.audienceSegmentId = parseInt(object.audienceSegmentId, 10); - else if (typeof object.audienceSegmentId === "number") - message.audienceSegmentId = object.audienceSegmentId; - else if (typeof object.audienceSegmentId === "object") - message.audienceSegmentId = new $util.LongBits(object.audienceSegmentId.low >>> 0, object.audienceSegmentId.high >>> 0).toNumber(); - if (object.contentBundleId != null) - if ($util.Long) - (message.contentBundleId = $util.Long.fromValue(object.contentBundleId)).unsigned = false; - else if (typeof object.contentBundleId === "string") - message.contentBundleId = parseInt(object.contentBundleId, 10); - else if (typeof object.contentBundleId === "number") - message.contentBundleId = object.contentBundleId; - else if (typeof object.contentBundleId === "object") - message.contentBundleId = new $util.LongBits(object.contentBundleId.low >>> 0, object.contentBundleId.high >>> 0).toNumber(); - if (object.customTargetingValueId != null) - if ($util.Long) - (message.customTargetingValueId = $util.Long.fromValue(object.customTargetingValueId)).unsigned = false; - else if (typeof object.customTargetingValueId === "string") - message.customTargetingValueId = parseInt(object.customTargetingValueId, 10); - else if (typeof object.customTargetingValueId === "number") - message.customTargetingValueId = object.customTargetingValueId; - else if (typeof object.customTargetingValueId === "object") - message.customTargetingValueId = new $util.LongBits(object.customTargetingValueId.low >>> 0, object.customTargetingValueId.high >>> 0).toNumber(); + var message = new $root.google.ads.admanager.v1.GetCmsMetadataValueRequest(); if (object.name != null) message.name = String(object.name); - if (object.entitySignalsMappingId != null) - if ($util.Long) - (message.entitySignalsMappingId = $util.Long.fromValue(object.entitySignalsMappingId)).unsigned = false; - else if (typeof object.entitySignalsMappingId === "string") - message.entitySignalsMappingId = parseInt(object.entitySignalsMappingId, 10); - else if (typeof object.entitySignalsMappingId === "number") - message.entitySignalsMappingId = object.entitySignalsMappingId; - else if (typeof object.entitySignalsMappingId === "object") - message.entitySignalsMappingId = new $util.LongBits(object.entitySignalsMappingId.low >>> 0, object.entitySignalsMappingId.high >>> 0).toNumber(); - if (object.taxonomyCategoryIds) { - if (!Array.isArray(object.taxonomyCategoryIds)) - throw TypeError(".google.ads.admanager.v1.EntitySignalsMapping.taxonomyCategoryIds: array expected"); - message.taxonomyCategoryIds = []; - for (var i = 0; i < object.taxonomyCategoryIds.length; ++i) - if ($util.Long) - (message.taxonomyCategoryIds[i] = $util.Long.fromValue(object.taxonomyCategoryIds[i])).unsigned = false; - else if (typeof object.taxonomyCategoryIds[i] === "string") - message.taxonomyCategoryIds[i] = parseInt(object.taxonomyCategoryIds[i], 10); - else if (typeof object.taxonomyCategoryIds[i] === "number") - message.taxonomyCategoryIds[i] = object.taxonomyCategoryIds[i]; - else if (typeof object.taxonomyCategoryIds[i] === "object") - message.taxonomyCategoryIds[i] = new $util.LongBits(object.taxonomyCategoryIds[i].low >>> 0, object.taxonomyCategoryIds[i].high >>> 0).toNumber(); - } return message; }; /** - * Creates a plain object from an EntitySignalsMapping message. Also converts values to other types if specified. + * Creates a plain object from a GetCmsMetadataValueRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static - * @param {google.ads.admanager.v1.EntitySignalsMapping} message EntitySignalsMapping + * @param {google.ads.admanager.v1.GetCmsMetadataValueRequest} message GetCmsMetadataValueRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntitySignalsMapping.toObject = function toObject(message, options) { + GetCmsMetadataValueRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.taxonomyCategoryIds = []; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.entitySignalsMappingId != null && message.hasOwnProperty("entitySignalsMappingId")) { - if (typeof message.entitySignalsMappingId === "number") - object.entitySignalsMappingId = options.longs === String ? String(message.entitySignalsMappingId) : message.entitySignalsMappingId; - else - object.entitySignalsMappingId = options.longs === String ? $util.Long.prototype.toString.call(message.entitySignalsMappingId) : options.longs === Number ? new $util.LongBits(message.entitySignalsMappingId.low >>> 0, message.entitySignalsMappingId.high >>> 0).toNumber() : message.entitySignalsMappingId; - if (options.oneofs) - object._entitySignalsMappingId = "entitySignalsMappingId"; - } - if (message.audienceSegmentId != null && message.hasOwnProperty("audienceSegmentId")) { - if (typeof message.audienceSegmentId === "number") - object.audienceSegmentId = options.longs === String ? String(message.audienceSegmentId) : message.audienceSegmentId; - else - object.audienceSegmentId = options.longs === String ? $util.Long.prototype.toString.call(message.audienceSegmentId) : options.longs === Number ? new $util.LongBits(message.audienceSegmentId.low >>> 0, message.audienceSegmentId.high >>> 0).toNumber() : message.audienceSegmentId; - if (options.oneofs) - object.entity = "audienceSegmentId"; - } - if (message.contentBundleId != null && message.hasOwnProperty("contentBundleId")) { - if (typeof message.contentBundleId === "number") - object.contentBundleId = options.longs === String ? String(message.contentBundleId) : message.contentBundleId; - else - object.contentBundleId = options.longs === String ? $util.Long.prototype.toString.call(message.contentBundleId) : options.longs === Number ? new $util.LongBits(message.contentBundleId.low >>> 0, message.contentBundleId.high >>> 0).toNumber() : message.contentBundleId; - if (options.oneofs) - object.entity = "contentBundleId"; - } - if (message.customTargetingValueId != null && message.hasOwnProperty("customTargetingValueId")) { - if (typeof message.customTargetingValueId === "number") - object.customTargetingValueId = options.longs === String ? String(message.customTargetingValueId) : message.customTargetingValueId; - else - object.customTargetingValueId = options.longs === String ? $util.Long.prototype.toString.call(message.customTargetingValueId) : options.longs === Number ? new $util.LongBits(message.customTargetingValueId.low >>> 0, message.customTargetingValueId.high >>> 0).toNumber() : message.customTargetingValueId; - if (options.oneofs) - object.entity = "customTargetingValueId"; - } - if (message.taxonomyCategoryIds && message.taxonomyCategoryIds.length) { - object.taxonomyCategoryIds = []; - for (var j = 0; j < message.taxonomyCategoryIds.length; ++j) - if (typeof message.taxonomyCategoryIds[j] === "number") - object.taxonomyCategoryIds[j] = options.longs === String ? String(message.taxonomyCategoryIds[j]) : message.taxonomyCategoryIds[j]; - else - object.taxonomyCategoryIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.taxonomyCategoryIds[j]) : options.longs === Number ? new $util.LongBits(message.taxonomyCategoryIds[j].low >>> 0, message.taxonomyCategoryIds[j].high >>> 0).toNumber() : message.taxonomyCategoryIds[j]; - } return object; }; /** - * Converts this EntitySignalsMapping to JSON. + * Converts this GetCmsMetadataValueRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @instance * @returns {Object.} JSON object */ - EntitySignalsMapping.prototype.toJSON = function toJSON() { + GetCmsMetadataValueRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EntitySignalsMapping + * Gets the default type url for GetCmsMetadataValueRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @memberof google.ads.admanager.v1.GetCmsMetadataValueRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntitySignalsMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCmsMetadataValueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.EntitySignalsMapping"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCmsMetadataValueRequest"; }; - return EntitySignalsMapping; + return GetCmsMetadataValueRequest; })(); - v1.EntitySignalsMappingService = (function() { + v1.ListCmsMetadataValuesRequest = (function() { /** - * Constructs a new EntitySignalsMappingService service. + * Properties of a ListCmsMetadataValuesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an EntitySignalsMappingService - * @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 EntitySignalsMappingService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (EntitySignalsMappingService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntitySignalsMappingService; - - /** - * Creates new EntitySignalsMappingService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @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 {EntitySignalsMappingService} RPC service. Useful where requests and/or responses are streamed. - */ - EntitySignalsMappingService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|getEntitySignalsMapping}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef GetEntitySignalsMappingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping - */ - - /** - * Calls GetEntitySignalsMapping. - * @function getEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} request GetEntitySignalsMappingRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntitySignalsMappingService.prototype.getEntitySignalsMapping = function getEntitySignalsMapping(request, callback) { - return this.rpcCall(getEntitySignalsMapping, $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); - }, "name", { value: "GetEntitySignalsMapping" }); - - /** - * Calls GetEntitySignalsMapping. - * @function getEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} request GetEntitySignalsMappingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|listEntitySignalsMappings}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef ListEntitySignalsMappingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} [response] ListEntitySignalsMappingsResponse - */ - - /** - * Calls ListEntitySignalsMappings. - * @function listEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} request ListEntitySignalsMappingsRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and ListEntitySignalsMappingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntitySignalsMappingService.prototype.listEntitySignalsMappings = function listEntitySignalsMappings(request, callback) { - return this.rpcCall(listEntitySignalsMappings, $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse, request, callback); - }, "name", { value: "ListEntitySignalsMappings" }); - - /** - * Calls ListEntitySignalsMappings. - * @function listEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} request ListEntitySignalsMappingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|createEntitySignalsMapping}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef CreateEntitySignalsMappingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping - */ - - /** - * Calls CreateEntitySignalsMapping. - * @function createEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} request CreateEntitySignalsMappingRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntitySignalsMappingService.prototype.createEntitySignalsMapping = function createEntitySignalsMapping(request, callback) { - return this.rpcCall(createEntitySignalsMapping, $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); - }, "name", { value: "CreateEntitySignalsMapping" }); - - /** - * Calls CreateEntitySignalsMapping. - * @function createEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} request CreateEntitySignalsMappingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|updateEntitySignalsMapping}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef UpdateEntitySignalsMappingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping + * @interface IListCmsMetadataValuesRequest + * @property {string|null} [parent] ListCmsMetadataValuesRequest parent + * @property {number|null} [pageSize] ListCmsMetadataValuesRequest pageSize + * @property {string|null} [pageToken] ListCmsMetadataValuesRequest pageToken + * @property {string|null} [filter] ListCmsMetadataValuesRequest filter + * @property {string|null} [orderBy] ListCmsMetadataValuesRequest orderBy + * @property {number|null} [skip] ListCmsMetadataValuesRequest skip */ /** - * Calls UpdateEntitySignalsMapping. - * @function updateEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @instance - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} request UpdateEntitySignalsMappingRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping - * @returns {undefined} - * @variation 1 + * Constructs a new ListCmsMetadataValuesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListCmsMetadataValuesRequest. + * @implements IListCmsMetadataValuesRequest + * @constructor + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest=} [properties] Properties to set */ - Object.defineProperty(EntitySignalsMappingService.prototype.updateEntitySignalsMapping = function updateEntitySignalsMapping(request, callback) { - return this.rpcCall(updateEntitySignalsMapping, $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); - }, "name", { value: "UpdateEntitySignalsMapping" }); + function ListCmsMetadataValuesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateEntitySignalsMapping. - * @function updateEntitySignalsMapping - * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * ListCmsMetadataValuesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} request UpdateEntitySignalsMappingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchCreateEntitySignalsMappings}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef BatchCreateEntitySignalsMappingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} [response] BatchCreateEntitySignalsMappingsResponse */ + ListCmsMetadataValuesRequest.prototype.parent = ""; /** - * Calls BatchCreateEntitySignalsMappings. - * @function batchCreateEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * ListCmsMetadataValuesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} request BatchCreateEntitySignalsMappingsRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and BatchCreateEntitySignalsMappingsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(EntitySignalsMappingService.prototype.batchCreateEntitySignalsMappings = function batchCreateEntitySignalsMappings(request, callback) { - return this.rpcCall(batchCreateEntitySignalsMappings, $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse, request, callback); - }, "name", { value: "BatchCreateEntitySignalsMappings" }); + ListCmsMetadataValuesRequest.prototype.pageSize = 0; /** - * Calls BatchCreateEntitySignalsMappings. - * @function batchCreateEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * ListCmsMetadataValuesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} request BatchCreateEntitySignalsMappingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchUpdateEntitySignalsMappings}. - * @memberof google.ads.admanager.v1.EntitySignalsMappingService - * @typedef BatchUpdateEntitySignalsMappingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} [response] BatchUpdateEntitySignalsMappingsResponse */ + ListCmsMetadataValuesRequest.prototype.pageToken = ""; /** - * Calls BatchUpdateEntitySignalsMappings. - * @function batchUpdateEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * ListCmsMetadataValuesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} request BatchUpdateEntitySignalsMappingsRequest message or plain object - * @param {google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and BatchUpdateEntitySignalsMappingsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(EntitySignalsMappingService.prototype.batchUpdateEntitySignalsMappings = function batchUpdateEntitySignalsMappings(request, callback) { - return this.rpcCall(batchUpdateEntitySignalsMappings, $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse, request, callback); - }, "name", { value: "BatchUpdateEntitySignalsMappings" }); + ListCmsMetadataValuesRequest.prototype.filter = ""; /** - * Calls BatchUpdateEntitySignalsMappings. - * @function batchUpdateEntitySignalsMappings - * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * ListCmsMetadataValuesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} request BatchUpdateEntitySignalsMappingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return EntitySignalsMappingService; - })(); - - v1.GetEntitySignalsMappingRequest = (function() { - - /** - * Properties of a GetEntitySignalsMappingRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetEntitySignalsMappingRequest - * @property {string|null} [name] GetEntitySignalsMappingRequest name - */ - - /** - * Constructs a new GetEntitySignalsMappingRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetEntitySignalsMappingRequest. - * @implements IGetEntitySignalsMappingRequest - * @constructor - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest=} [properties] Properties to set */ - function GetEntitySignalsMappingRequest(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]]; - } + ListCmsMetadataValuesRequest.prototype.orderBy = ""; /** - * GetEntitySignalsMappingRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * ListCmsMetadataValuesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance */ - GetEntitySignalsMappingRequest.prototype.name = ""; + ListCmsMetadataValuesRequest.prototype.skip = 0; /** - * Creates a new GetEntitySignalsMappingRequest instance using the specified properties. + * Creates a new ListCmsMetadataValuesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest instance + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesRequest} ListCmsMetadataValuesRequest instance */ - GetEntitySignalsMappingRequest.create = function create(properties) { - return new GetEntitySignalsMappingRequest(properties); + ListCmsMetadataValuesRequest.create = function create(properties) { + return new ListCmsMetadataValuesRequest(properties); }; /** - * Encodes the specified GetEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest} message ListCmsMetadataValuesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntitySignalsMappingRequest.encode = function encode(message, writer) { + ListCmsMetadataValuesRequest.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); + if (message.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified GetEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static - * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataValuesRequest} message ListCmsMetadataValuesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCmsMetadataValuesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataValuesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesRequest} ListCmsMetadataValuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + ListCmsMetadataValuesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCmsMetadataValuesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -20704,127 +19406,166 @@ }; /** - * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataValuesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesRequest} ListCmsMetadataValuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + ListCmsMetadataValuesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntitySignalsMappingRequest message. + * Verifies a ListCmsMetadataValuesRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntitySignalsMappingRequest.verify = function verify(message) { + ListCmsMetadataValuesRequest.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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a GetEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataValuesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesRequest} ListCmsMetadataValuesRequest */ - GetEntitySignalsMappingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest) + ListCmsMetadataValuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCmsMetadataValuesRequest) return object; - var message = new $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.ListCmsMetadataValuesRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a GetEntitySignalsMappingRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCmsMetadataValuesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static - * @param {google.ads.admanager.v1.GetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest + * @param {google.ads.admanager.v1.ListCmsMetadataValuesRequest} message ListCmsMetadataValuesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntitySignalsMappingRequest.toObject = function toObject(message, options) { + ListCmsMetadataValuesRequest.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 = ""; + object.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this GetEntitySignalsMappingRequest to JSON. + * Converts this ListCmsMetadataValuesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @instance * @returns {Object.} JSON object */ - GetEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + ListCmsMetadataValuesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEntitySignalsMappingRequest + * Gets the default type url for ListCmsMetadataValuesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCmsMetadataValuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetEntitySignalsMappingRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCmsMetadataValuesRequest"; }; - return GetEntitySignalsMappingRequest; + return ListCmsMetadataValuesRequest; })(); - v1.ListEntitySignalsMappingsRequest = (function() { + v1.ListCmsMetadataValuesResponse = (function() { /** - * Properties of a ListEntitySignalsMappingsRequest. + * Properties of a ListCmsMetadataValuesResponse. * @memberof google.ads.admanager.v1 - * @interface IListEntitySignalsMappingsRequest - * @property {string|null} [parent] ListEntitySignalsMappingsRequest parent - * @property {number|null} [pageSize] ListEntitySignalsMappingsRequest pageSize - * @property {string|null} [pageToken] ListEntitySignalsMappingsRequest pageToken - * @property {string|null} [filter] ListEntitySignalsMappingsRequest filter - * @property {string|null} [orderBy] ListEntitySignalsMappingsRequest orderBy - * @property {number|null} [skip] ListEntitySignalsMappingsRequest skip + * @interface IListCmsMetadataValuesResponse + * @property {Array.|null} [cmsMetadataValues] ListCmsMetadataValuesResponse cmsMetadataValues + * @property {string|null} [nextPageToken] ListCmsMetadataValuesResponse nextPageToken + * @property {number|null} [totalSize] ListCmsMetadataValuesResponse totalSize */ /** - * Constructs a new ListEntitySignalsMappingsRequest. + * Constructs a new ListCmsMetadataValuesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListEntitySignalsMappingsRequest. - * @implements IListEntitySignalsMappingsRequest + * @classdesc Represents a ListCmsMetadataValuesResponse. + * @implements IListCmsMetadataValuesResponse * @constructor - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCmsMetadataValuesResponse=} [properties] Properties to set */ - function ListEntitySignalsMappingsRequest(properties) { + function ListCmsMetadataValuesResponse(properties) { + this.cmsMetadataValues = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20832,147 +19573,108 @@ } /** - * ListEntitySignalsMappingsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest - * @instance - */ - ListEntitySignalsMappingsRequest.prototype.parent = ""; - - /** - * ListEntitySignalsMappingsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest - * @instance - */ - ListEntitySignalsMappingsRequest.prototype.pageSize = 0; - - /** - * ListEntitySignalsMappingsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest - * @instance - */ - ListEntitySignalsMappingsRequest.prototype.pageToken = ""; - - /** - * ListEntitySignalsMappingsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * ListCmsMetadataValuesResponse cmsMetadataValues. + * @member {Array.} cmsMetadataValues + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @instance */ - ListEntitySignalsMappingsRequest.prototype.filter = ""; + ListCmsMetadataValuesResponse.prototype.cmsMetadataValues = $util.emptyArray; /** - * ListEntitySignalsMappingsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * ListCmsMetadataValuesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @instance */ - ListEntitySignalsMappingsRequest.prototype.orderBy = ""; + ListCmsMetadataValuesResponse.prototype.nextPageToken = ""; /** - * ListEntitySignalsMappingsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * ListCmsMetadataValuesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @instance */ - ListEntitySignalsMappingsRequest.prototype.skip = 0; + ListCmsMetadataValuesResponse.prototype.totalSize = 0; /** - * Creates a new ListEntitySignalsMappingsRequest instance using the specified properties. + * Creates a new ListCmsMetadataValuesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest instance + * @param {google.ads.admanager.v1.IListCmsMetadataValuesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesResponse} ListCmsMetadataValuesResponse instance */ - ListEntitySignalsMappingsRequest.create = function create(properties) { - return new ListEntitySignalsMappingsRequest(properties); + ListCmsMetadataValuesResponse.create = function create(properties) { + return new ListCmsMetadataValuesResponse(properties); }; /** - * Encodes the specified ListEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataValuesResponse} message ListCmsMetadataValuesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitySignalsMappingsRequest.encode = function encode(message, writer) { + ListCmsMetadataValuesResponse.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.cmsMetadataValues != null && message.cmsMetadataValues.length) + for (var i = 0; i < message.cmsMetadataValues.length; ++i) + $root.google.ads.admanager.v1.CmsMetadataValue.encode(message.cmsMetadataValues[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified ListCmsMetadataValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCmsMetadataValuesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCmsMetadataValuesResponse} message ListCmsMetadataValuesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCmsMetadataValuesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a ListCmsMetadataValuesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesResponse} ListCmsMetadataValuesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + ListCmsMetadataValuesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCmsMetadataValuesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.cmsMetadataValues && message.cmsMetadataValues.length)) + message.cmsMetadataValues = []; + message.cmsMetadataValues.push($root.google.ads.admanager.v1.CmsMetadataValue.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.skip = reader.int32(); + message.totalSize = reader.int32(); break; } default: @@ -20984,164 +19686,156 @@ }; /** - * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCmsMetadataValuesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesResponse} ListCmsMetadataValuesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListCmsMetadataValuesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntitySignalsMappingsRequest message. + * Verifies a ListCmsMetadataValuesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntitySignalsMappingsRequest.verify = function verify(message) { + ListCmsMetadataValuesResponse.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + if (message.cmsMetadataValues != null && message.hasOwnProperty("cmsMetadataValues")) { + if (!Array.isArray(message.cmsMetadataValues)) + return "cmsMetadataValues: array expected"; + for (var i = 0; i < message.cmsMetadataValues.length; ++i) { + var error = $root.google.ads.admanager.v1.CmsMetadataValue.verify(message.cmsMetadataValues[i]); + if (error) + return "cmsMetadataValues." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a ListEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCmsMetadataValuesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCmsMetadataValuesResponse} ListCmsMetadataValuesResponse */ - ListEntitySignalsMappingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest) + ListCmsMetadataValuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCmsMetadataValuesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.ListCmsMetadataValuesResponse(); + if (object.cmsMetadataValues) { + if (!Array.isArray(object.cmsMetadataValues)) + throw TypeError(".google.ads.admanager.v1.ListCmsMetadataValuesResponse.cmsMetadataValues: array expected"); + message.cmsMetadataValues = []; + for (var i = 0; i < object.cmsMetadataValues.length; ++i) { + if (typeof object.cmsMetadataValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCmsMetadataValuesResponse.cmsMetadataValues: object expected"); + message.cmsMetadataValues[i] = $root.google.ads.admanager.v1.CmsMetadataValue.fromObject(object.cmsMetadataValues[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCmsMetadataValuesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static - * @param {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest + * @param {google.ads.admanager.v1.ListCmsMetadataValuesResponse} message ListCmsMetadataValuesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntitySignalsMappingsRequest.toObject = function toObject(message, options) { + ListCmsMetadataValuesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.cmsMetadataValues = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.skip = 0; + object.nextPageToken = ""; + object.totalSize = 0; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; + if (message.cmsMetadataValues && message.cmsMetadataValues.length) { + object.cmsMetadataValues = []; + for (var j = 0; j < message.cmsMetadataValues.length; ++j) + object.cmsMetadataValues[j] = $root.google.ads.admanager.v1.CmsMetadataValue.toObject(message.cmsMetadataValues[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this ListEntitySignalsMappingsRequest to JSON. + * Converts this ListCmsMetadataValuesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @instance * @returns {Object.} JSON object */ - ListEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + ListCmsMetadataValuesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntitySignalsMappingsRequest + * Gets the default type url for ListCmsMetadataValuesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCmsMetadataValuesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCmsMetadataValuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListEntitySignalsMappingsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCmsMetadataValuesResponse"; }; - return ListEntitySignalsMappingsRequest; + return ListCmsMetadataValuesResponse; })(); - v1.CreateEntitySignalsMappingRequest = (function() { + v1.CompanyTypeEnum = (function() { /** - * Properties of a CreateEntitySignalsMappingRequest. + * Properties of a CompanyTypeEnum. * @memberof google.ads.admanager.v1 - * @interface ICreateEntitySignalsMappingRequest - * @property {string|null} [parent] CreateEntitySignalsMappingRequest parent - * @property {google.ads.admanager.v1.IEntitySignalsMapping|null} [entitySignalsMapping] CreateEntitySignalsMappingRequest entitySignalsMapping + * @interface ICompanyTypeEnum */ /** - * Constructs a new CreateEntitySignalsMappingRequest. + * Constructs a new CompanyTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CreateEntitySignalsMappingRequest. - * @implements ICreateEntitySignalsMappingRequest + * @classdesc Represents a CompanyTypeEnum. + * @implements ICompanyTypeEnum * @constructor - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICompanyTypeEnum=} [properties] Properties to set */ - function CreateEntitySignalsMappingRequest(properties) { + function CompanyTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21149,93 +19843,65 @@ } /** - * CreateEntitySignalsMappingRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest - * @instance - */ - CreateEntitySignalsMappingRequest.prototype.parent = ""; - - /** - * CreateEntitySignalsMappingRequest entitySignalsMapping. - * @member {google.ads.admanager.v1.IEntitySignalsMapping|null|undefined} entitySignalsMapping - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest - * @instance - */ - CreateEntitySignalsMappingRequest.prototype.entitySignalsMapping = null; - - /** - * Creates a new CreateEntitySignalsMappingRequest instance using the specified properties. + * Creates a new CompanyTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest instance + * @param {google.ads.admanager.v1.ICompanyTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum instance */ - CreateEntitySignalsMappingRequest.create = function create(properties) { - return new CreateEntitySignalsMappingRequest(properties); + CompanyTypeEnum.create = function create(properties) { + return new CompanyTypeEnum(properties); }; /** - * Encodes the specified CreateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified CompanyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICompanyTypeEnum} message CompanyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntitySignalsMappingRequest.encode = function encode(message, writer) { + CompanyTypeEnum.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.entitySignalsMapping != null && Object.hasOwnProperty.call(message, "entitySignalsMapping")) - $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMapping, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified CompanyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static - * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICompanyTypeEnum} message CompanyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + CompanyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a CompanyTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + CompanyTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CompanyTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -21245,137 +19911,130 @@ }; /** - * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a CompanyTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + CompanyTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntitySignalsMappingRequest message. + * Verifies a CompanyTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntitySignalsMappingRequest.verify = function verify(message) { + CompanyTypeEnum.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.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) { - var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMapping); - if (error) - return "entitySignalsMapping." + error; - } return null; }; /** - * Creates a CreateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompanyTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyTypeEnum} CompanyTypeEnum */ - CreateEntitySignalsMappingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest) + CompanyTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CompanyTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entitySignalsMapping != null) { - if (typeof object.entitySignalsMapping !== "object") - throw TypeError(".google.ads.admanager.v1.CreateEntitySignalsMappingRequest.entitySignalsMapping: object expected"); - message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMapping); - } - return message; + return new $root.google.ads.admanager.v1.CompanyTypeEnum(); }; /** - * Creates a plain object from a CreateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * Creates a plain object from a CompanyTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static - * @param {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest + * @param {google.ads.admanager.v1.CompanyTypeEnum} message CompanyTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntitySignalsMappingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entitySignalsMapping = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) - object.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMapping, options); - return object; + CompanyTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this CreateEntitySignalsMappingRequest to JSON. + * Converts this CompanyTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @instance * @returns {Object.} JSON object */ - CreateEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + CompanyTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEntitySignalsMappingRequest + * Gets the default type url for CompanyTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompanyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CreateEntitySignalsMappingRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CompanyTypeEnum"; }; - return CreateEntitySignalsMappingRequest; + /** + * CompanyType enum. + * @name google.ads.admanager.v1.CompanyTypeEnum.CompanyType + * @enum {number} + * @property {number} COMPANY_TYPE_UNSPECIFIED=0 COMPANY_TYPE_UNSPECIFIED value + * @property {number} ADVERTISER=1 ADVERTISER value + * @property {number} HOUSE_ADVERTISER=2 HOUSE_ADVERTISER value + * @property {number} AGENCY=3 AGENCY value + * @property {number} HOUSE_AGENCY=4 HOUSE_AGENCY value + * @property {number} AD_NETWORK=5 AD_NETWORK value + */ + CompanyTypeEnum.CompanyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPANY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADVERTISER"] = 1; + values[valuesById[2] = "HOUSE_ADVERTISER"] = 2; + values[valuesById[3] = "AGENCY"] = 3; + values[valuesById[4] = "HOUSE_AGENCY"] = 4; + values[valuesById[5] = "AD_NETWORK"] = 5; + return values; + })(); + + return CompanyTypeEnum; })(); - v1.UpdateEntitySignalsMappingRequest = (function() { + v1.CompanyCreditStatusEnum = (function() { /** - * Properties of an UpdateEntitySignalsMappingRequest. + * Properties of a CompanyCreditStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IUpdateEntitySignalsMappingRequest - * @property {google.ads.admanager.v1.IEntitySignalsMapping|null} [entitySignalsMapping] UpdateEntitySignalsMappingRequest entitySignalsMapping - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntitySignalsMappingRequest updateMask + * @interface ICompanyCreditStatusEnum */ /** - * Constructs a new UpdateEntitySignalsMappingRequest. + * Constructs a new CompanyCreditStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents an UpdateEntitySignalsMappingRequest. - * @implements IUpdateEntitySignalsMappingRequest + * @classdesc Represents a CompanyCreditStatusEnum. + * @implements ICompanyCreditStatusEnum * @constructor - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum=} [properties] Properties to set */ - function UpdateEntitySignalsMappingRequest(properties) { + function CompanyCreditStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21383,93 +20042,65 @@ } /** - * UpdateEntitySignalsMappingRequest entitySignalsMapping. - * @member {google.ads.admanager.v1.IEntitySignalsMapping|null|undefined} entitySignalsMapping - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest - * @instance - */ - UpdateEntitySignalsMappingRequest.prototype.entitySignalsMapping = null; - - /** - * UpdateEntitySignalsMappingRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest - * @instance - */ - UpdateEntitySignalsMappingRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEntitySignalsMappingRequest instance using the specified properties. + * Creates a new CompanyCreditStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest instance + * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum instance */ - UpdateEntitySignalsMappingRequest.create = function create(properties) { - return new UpdateEntitySignalsMappingRequest(properties); + CompanyCreditStatusEnum.create = function create(properties) { + return new CompanyCreditStatusEnum(properties); }; /** - * Encodes the specified UpdateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified CompanyCreditStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum} message CompanyCreditStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntitySignalsMappingRequest.encode = function encode(message, writer) { + CompanyCreditStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entitySignalsMapping != null && Object.hasOwnProperty.call(message, "entitySignalsMapping")) - $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMapping, 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 UpdateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * Encodes the specified CompanyCreditStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CompanyCreditStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static - * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICompanyCreditStatusEnum} message CompanyCreditStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + CompanyCreditStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer. + * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + CompanyCreditStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CompanyCreditStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -21479,144 +20110,148 @@ }; /** - * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * Decodes a CompanyCreditStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + CompanyCreditStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntitySignalsMappingRequest message. + * Verifies a CompanyCreditStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEntitySignalsMappingRequest.verify = function verify(message) { + CompanyCreditStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) { - var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMapping); - if (error) - return "entitySignalsMapping." + 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 an UpdateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompanyCreditStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + * @returns {google.ads.admanager.v1.CompanyCreditStatusEnum} CompanyCreditStatusEnum */ - UpdateEntitySignalsMappingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest) + CompanyCreditStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CompanyCreditStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest(); - if (object.entitySignalsMapping != null) { - if (typeof object.entitySignalsMapping !== "object") - throw TypeError(".google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.entitySignalsMapping: object expected"); - message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMapping); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; + return new $root.google.ads.admanager.v1.CompanyCreditStatusEnum(); }; /** - * Creates a plain object from an UpdateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * Creates a plain object from a CompanyCreditStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static - * @param {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest + * @param {google.ads.admanager.v1.CompanyCreditStatusEnum} message CompanyCreditStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntitySignalsMappingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entitySignalsMapping = null; - object.updateMask = null; - } - if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) - object.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMapping, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; + CompanyCreditStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this UpdateEntitySignalsMappingRequest to JSON. + * Converts this CompanyCreditStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @instance * @returns {Object.} JSON object */ - UpdateEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + CompanyCreditStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEntitySignalsMappingRequest + * Gets the default type url for CompanyCreditStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @memberof google.ads.admanager.v1.CompanyCreditStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompanyCreditStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.UpdateEntitySignalsMappingRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CompanyCreditStatusEnum"; }; - return UpdateEntitySignalsMappingRequest; + /** + * CompanyCreditStatus enum. + * @name google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus + * @enum {number} + * @property {number} COMPANY_CREDIT_STATUS_UNSPECIFIED=0 COMPANY_CREDIT_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} ON_HOLD=3 ON_HOLD value + * @property {number} STOP=4 STOP value + * @property {number} BLOCKED=5 BLOCKED value + */ + CompanyCreditStatusEnum.CompanyCreditStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPANY_CREDIT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "ON_HOLD"] = 3; + values[valuesById[4] = "STOP"] = 4; + values[valuesById[5] = "BLOCKED"] = 5; + return values; + })(); + + return CompanyCreditStatusEnum; })(); - v1.ListEntitySignalsMappingsResponse = (function() { + v1.Company = (function() { /** - * Properties of a ListEntitySignalsMappingsResponse. + * Properties of a Company. * @memberof google.ads.admanager.v1 - * @interface IListEntitySignalsMappingsResponse - * @property {Array.|null} [entitySignalsMappings] ListEntitySignalsMappingsResponse entitySignalsMappings - * @property {string|null} [nextPageToken] ListEntitySignalsMappingsResponse nextPageToken - * @property {number|null} [totalSize] ListEntitySignalsMappingsResponse totalSize + * @interface ICompany + * @property {string|null} [name] Company name + * @property {number|Long|null} [companyId] Company companyId + * @property {string|null} [displayName] Company displayName + * @property {google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null} [type] Company type + * @property {string|null} [address] Company address + * @property {string|null} [email] Company email + * @property {string|null} [fax] Company fax + * @property {string|null} [phone] Company phone + * @property {string|null} [externalId] Company externalId + * @property {string|null} [comment] Company comment + * @property {google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null} [creditStatus] Company creditStatus + * @property {Array.|null} [appliedLabels] Company appliedLabels + * @property {string|null} [primaryContact] Company primaryContact + * @property {Array.|null} [appliedTeams] Company appliedTeams + * @property {number|Long|null} [thirdPartyCompanyId] Company thirdPartyCompanyId + * @property {google.protobuf.ITimestamp|null} [updateTime] Company updateTime */ /** - * Constructs a new ListEntitySignalsMappingsResponse. + * Constructs a new Company. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListEntitySignalsMappingsResponse. - * @implements IListEntitySignalsMappingsResponse + * @classdesc Represents a Company. + * @implements ICompany * @constructor - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICompany=} [properties] Properties to set */ - function ListEntitySignalsMappingsResponse(properties) { - this.entitySignalsMappings = []; + function Company(properties) { + this.appliedLabels = []; + this.appliedTeams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21624,108 +20259,374 @@ } /** - * ListEntitySignalsMappingsResponse entitySignalsMappings. - * @member {Array.} entitySignalsMappings - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * Company name. + * @member {string} name + * @memberof google.ads.admanager.v1.Company * @instance */ - ListEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; + Company.prototype.name = ""; /** - * ListEntitySignalsMappingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * Company companyId. + * @member {number|Long|null|undefined} companyId + * @memberof google.ads.admanager.v1.Company * @instance */ - ListEntitySignalsMappingsResponse.prototype.nextPageToken = ""; + Company.prototype.companyId = null; /** - * ListEntitySignalsMappingsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * Company displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Company * @instance */ - ListEntitySignalsMappingsResponse.prototype.totalSize = 0; + Company.prototype.displayName = null; /** - * Creates a new ListEntitySignalsMappingsResponse instance using the specified properties. + * Company type. + * @member {google.ads.admanager.v1.CompanyTypeEnum.CompanyType|null|undefined} type + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.type = null; + + /** + * Company address. + * @member {string|null|undefined} address + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.address = null; + + /** + * Company email. + * @member {string|null|undefined} email + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.email = null; + + /** + * Company fax. + * @member {string|null|undefined} fax + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.fax = null; + + /** + * Company phone. + * @member {string|null|undefined} phone + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.phone = null; + + /** + * Company externalId. + * @member {string|null|undefined} externalId + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.externalId = null; + + /** + * Company comment. + * @member {string|null|undefined} comment + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.comment = null; + + /** + * Company creditStatus. + * @member {google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus|null|undefined} creditStatus + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.creditStatus = null; + + /** + * Company appliedLabels. + * @member {Array.} appliedLabels + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.appliedLabels = $util.emptyArray; + + /** + * Company primaryContact. + * @member {string|null|undefined} primaryContact + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.primaryContact = null; + + /** + * Company appliedTeams. + * @member {Array.} appliedTeams + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.appliedTeams = $util.emptyArray; + + /** + * Company thirdPartyCompanyId. + * @member {number|Long|null|undefined} thirdPartyCompanyId + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.thirdPartyCompanyId = null; + + /** + * Company updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.Company + * @instance + */ + Company.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_companyId", { + get: $util.oneOfGetter($oneOfFields = ["companyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_fax", { + get: $util.oneOfGetter($oneOfFields = ["fax"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_phone", { + get: $util.oneOfGetter($oneOfFields = ["phone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_externalId", { + get: $util.oneOfGetter($oneOfFields = ["externalId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_comment", { + get: $util.oneOfGetter($oneOfFields = ["comment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_creditStatus", { + get: $util.oneOfGetter($oneOfFields = ["creditStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_primaryContact", { + get: $util.oneOfGetter($oneOfFields = ["primaryContact"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_thirdPartyCompanyId", { + get: $util.oneOfGetter($oneOfFields = ["thirdPartyCompanyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Company.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Company instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse instance + * @param {google.ads.admanager.v1.ICompany=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Company} Company instance */ - ListEntitySignalsMappingsResponse.create = function create(properties) { - return new ListEntitySignalsMappingsResponse(properties); + Company.create = function create(properties) { + return new Company(properties); }; /** - * Encodes the specified ListEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified Company message. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICompany} message Company message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitySignalsMappingsResponse.encode = function encode(message, writer) { + Company.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) - for (var i = 0; i < message.entitySignalsMappings.length; ++i) - $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.companyId != null && Object.hasOwnProperty.call(message, "companyId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.companyId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.address); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.email); + if (message.fax != null && Object.hasOwnProperty.call(message, "fax")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.fax); + if (message.phone != null && Object.hasOwnProperty.call(message, "phone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.phone); + if (message.externalId != null && Object.hasOwnProperty.call(message, "externalId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.externalId); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.comment); + if (message.creditStatus != null && Object.hasOwnProperty.call(message, "creditStatus")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.creditStatus); + if (message.appliedLabels != null && message.appliedLabels.length) + for (var i = 0; i < message.appliedLabels.length; ++i) + $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.primaryContact != null && Object.hasOwnProperty.call(message, "primaryContact")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.primaryContact); + if (message.appliedTeams != null && message.appliedTeams.length) + for (var i = 0; i < message.appliedTeams.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.appliedTeams[i]); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.thirdPartyCompanyId != null && Object.hasOwnProperty.call(message, "thirdPartyCompanyId")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.thirdPartyCompanyId); return writer; }; /** - * Encodes the specified ListEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified Company message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Company.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static - * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ICompany} message Company message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + Company.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a Company message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.Company} Company * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + Company.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Company(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) - message.entitySignalsMappings = []; - message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.companyId = reader.int64(); break; } case 3: { - message.totalSize = reader.int32(); + message.displayName = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + case 5: { + message.address = reader.string(); + break; + } + case 6: { + message.email = reader.string(); + break; + } + case 7: { + message.fax = reader.string(); + break; + } + case 8: { + message.phone = reader.string(); + break; + } + case 9: { + message.externalId = reader.string(); + break; + } + case 10: { + message.comment = reader.string(); + break; + } + case 11: { + message.creditStatus = reader.int32(); + break; + } + case 12: { + if (!(message.appliedLabels && message.appliedLabels.length)) + message.appliedLabels = []; + message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); + break; + } + case 13: { + message.primaryContact = reader.string(); + break; + } + case 14: { + if (!(message.appliedTeams && message.appliedTeams.length)) + message.appliedTeams = []; + message.appliedTeams.push(reader.string()); + break; + } + case 16: { + message.thirdPartyCompanyId = reader.int64(); + break; + } + case 15: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -21737,159 +20638,531 @@ }; /** - * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a Company message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.Company} Company * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + Company.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntitySignalsMappingsResponse message. + * Verifies a Company message. * @function verify - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntitySignalsMappingsResponse.verify = function verify(message) { + Company.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { - if (!Array.isArray(message.entitySignalsMappings)) - return "entitySignalsMappings: array expected"; - for (var i = 0; i < message.entitySignalsMappings.length; ++i) { - var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); - if (error) - return "entitySignalsMappings." + error; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.companyId != null && message.hasOwnProperty("companyId")) { + properties._companyId = 1; + if (!$util.isInteger(message.companyId) && !(message.companyId && $util.isInteger(message.companyId.low) && $util.isInteger(message.companyId.high))) + return "companyId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if (!$util.isString(message.address)) + return "address: string expected"; + } + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.fax != null && message.hasOwnProperty("fax")) { + properties._fax = 1; + if (!$util.isString(message.fax)) + return "fax: string expected"; + } + if (message.phone != null && message.hasOwnProperty("phone")) { + properties._phone = 1; + if (!$util.isString(message.phone)) + return "phone: string expected"; + } + if (message.externalId != null && message.hasOwnProperty("externalId")) { + properties._externalId = 1; + if (!$util.isString(message.externalId)) + return "externalId: string expected"; + } + if (message.comment != null && message.hasOwnProperty("comment")) { + properties._comment = 1; + if (!$util.isString(message.comment)) + return "comment: string expected"; + } + if (message.creditStatus != null && message.hasOwnProperty("creditStatus")) { + properties._creditStatus = 1; + switch (message.creditStatus) { + default: + return "creditStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { + if (!Array.isArray(message.appliedLabels)) + return "appliedLabels: array expected"; + for (var i = 0; i < message.appliedLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); + if (error) + return "appliedLabels." + error; + } + } + if (message.primaryContact != null && message.hasOwnProperty("primaryContact")) { + properties._primaryContact = 1; + if (!$util.isString(message.primaryContact)) + return "primaryContact: string expected"; + } + if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { + if (!Array.isArray(message.appliedTeams)) + return "appliedTeams: array expected"; + for (var i = 0; i < message.appliedTeams.length; ++i) + if (!$util.isString(message.appliedTeams[i])) + return "appliedTeams: string[] expected"; + } + if (message.thirdPartyCompanyId != null && message.hasOwnProperty("thirdPartyCompanyId")) { + properties._thirdPartyCompanyId = 1; + if (!$util.isInteger(message.thirdPartyCompanyId) && !(message.thirdPartyCompanyId && $util.isInteger(message.thirdPartyCompanyId.low) && $util.isInteger(message.thirdPartyCompanyId.high))) + return "thirdPartyCompanyId: integer|Long expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Company message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.Company} Company */ - ListEntitySignalsMappingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse) + Company.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Company) return object; - var message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse(); - if (object.entitySignalsMappings) { - if (!Array.isArray(object.entitySignalsMappings)) - throw TypeError(".google.ads.admanager.v1.ListEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); - message.entitySignalsMappings = []; - for (var i = 0; i < object.entitySignalsMappings.length; ++i) { - if (typeof object.entitySignalsMappings[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); - message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); + var message = new $root.google.ads.admanager.v1.Company(); + if (object.name != null) + message.name = String(object.name); + if (object.companyId != null) + if ($util.Long) + (message.companyId = $util.Long.fromValue(object.companyId)).unsigned = false; + else if (typeof object.companyId === "string") + message.companyId = parseInt(object.companyId, 10); + else if (typeof object.companyId === "number") + message.companyId = object.companyId; + else if (typeof object.companyId === "object") + message.companyId = new $util.LongBits(object.companyId.low >>> 0, object.companyId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "COMPANY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ADVERTISER": + case 1: + message.type = 1; + break; + case "HOUSE_ADVERTISER": + case 2: + message.type = 2; + break; + case "AGENCY": + case 3: + message.type = 3; + break; + case "HOUSE_AGENCY": + case 4: + message.type = 4; + break; + case "AD_NETWORK": + case 5: + message.type = 5; + break; + } + if (object.address != null) + message.address = String(object.address); + if (object.email != null) + message.email = String(object.email); + if (object.fax != null) + message.fax = String(object.fax); + if (object.phone != null) + message.phone = String(object.phone); + if (object.externalId != null) + message.externalId = String(object.externalId); + if (object.comment != null) + message.comment = String(object.comment); + switch (object.creditStatus) { + default: + if (typeof object.creditStatus === "number") { + message.creditStatus = object.creditStatus; + break; + } + break; + case "COMPANY_CREDIT_STATUS_UNSPECIFIED": + case 0: + message.creditStatus = 0; + break; + case "ACTIVE": + case 1: + message.creditStatus = 1; + break; + case "INACTIVE": + case 2: + message.creditStatus = 2; + break; + case "ON_HOLD": + case 3: + message.creditStatus = 3; + break; + case "STOP": + case 4: + message.creditStatus = 4; + break; + case "BLOCKED": + case 5: + message.creditStatus = 5; + break; + } + if (object.appliedLabels) { + if (!Array.isArray(object.appliedLabels)) + throw TypeError(".google.ads.admanager.v1.Company.appliedLabels: array expected"); + message.appliedLabels = []; + for (var i = 0; i < object.appliedLabels.length; ++i) { + if (typeof object.appliedLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.Company.appliedLabels: object expected"); + message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + if (object.primaryContact != null) + message.primaryContact = String(object.primaryContact); + if (object.appliedTeams) { + if (!Array.isArray(object.appliedTeams)) + throw TypeError(".google.ads.admanager.v1.Company.appliedTeams: array expected"); + message.appliedTeams = []; + for (var i = 0; i < object.appliedTeams.length; ++i) + message.appliedTeams[i] = String(object.appliedTeams[i]); + } + if (object.thirdPartyCompanyId != null) + if ($util.Long) + (message.thirdPartyCompanyId = $util.Long.fromValue(object.thirdPartyCompanyId)).unsigned = false; + else if (typeof object.thirdPartyCompanyId === "string") + message.thirdPartyCompanyId = parseInt(object.thirdPartyCompanyId, 10); + else if (typeof object.thirdPartyCompanyId === "number") + message.thirdPartyCompanyId = object.thirdPartyCompanyId; + else if (typeof object.thirdPartyCompanyId === "object") + message.thirdPartyCompanyId = new $util.LongBits(object.thirdPartyCompanyId.low >>> 0, object.thirdPartyCompanyId.high >>> 0).toNumber(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.Company.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ListEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a Company message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static - * @param {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse + * @param {google.ads.admanager.v1.Company} message Company * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntitySignalsMappingsResponse.toObject = function toObject(message, options) { + Company.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entitySignalsMappings = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; + if (options.arrays || options.defaults) { + object.appliedLabels = []; + object.appliedTeams = []; } - if (message.entitySignalsMappings && message.entitySignalsMappings.length) { - object.entitySignalsMappings = []; - for (var j = 0; j < message.entitySignalsMappings.length; ++j) - object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.companyId != null && message.hasOwnProperty("companyId")) { + if (typeof message.companyId === "number") + object.companyId = options.longs === String ? String(message.companyId) : message.companyId; + else + object.companyId = options.longs === String ? $util.Long.prototype.toString.call(message.companyId) : options.longs === Number ? new $util.LongBits(message.companyId.low >>> 0, message.companyId.high >>> 0).toNumber() : message.companyId; + if (options.oneofs) + object._companyId = "companyId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.ads.admanager.v1.CompanyTypeEnum.CompanyType[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.CompanyTypeEnum.CompanyType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.address != null && message.hasOwnProperty("address")) { + object.address = message.address; + if (options.oneofs) + object._address = "address"; + } + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.fax != null && message.hasOwnProperty("fax")) { + object.fax = message.fax; + if (options.oneofs) + object._fax = "fax"; + } + if (message.phone != null && message.hasOwnProperty("phone")) { + object.phone = message.phone; + if (options.oneofs) + object._phone = "phone"; + } + if (message.externalId != null && message.hasOwnProperty("externalId")) { + object.externalId = message.externalId; + if (options.oneofs) + object._externalId = "externalId"; + } + if (message.comment != null && message.hasOwnProperty("comment")) { + object.comment = message.comment; + if (options.oneofs) + object._comment = "comment"; + } + if (message.creditStatus != null && message.hasOwnProperty("creditStatus")) { + object.creditStatus = options.enums === String ? $root.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus[message.creditStatus] === undefined ? message.creditStatus : $root.google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus[message.creditStatus] : message.creditStatus; + if (options.oneofs) + object._creditStatus = "creditStatus"; + } + if (message.appliedLabels && message.appliedLabels.length) { + object.appliedLabels = []; + for (var j = 0; j < message.appliedLabels.length; ++j) + object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); + } + if (message.primaryContact != null && message.hasOwnProperty("primaryContact")) { + object.primaryContact = message.primaryContact; + if (options.oneofs) + object._primaryContact = "primaryContact"; + } + if (message.appliedTeams && message.appliedTeams.length) { + object.appliedTeams = []; + for (var j = 0; j < message.appliedTeams.length; ++j) + object.appliedTeams[j] = message.appliedTeams[j]; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.thirdPartyCompanyId != null && message.hasOwnProperty("thirdPartyCompanyId")) { + if (typeof message.thirdPartyCompanyId === "number") + object.thirdPartyCompanyId = options.longs === String ? String(message.thirdPartyCompanyId) : message.thirdPartyCompanyId; + else + object.thirdPartyCompanyId = options.longs === String ? $util.Long.prototype.toString.call(message.thirdPartyCompanyId) : options.longs === Number ? new $util.LongBits(message.thirdPartyCompanyId.low >>> 0, message.thirdPartyCompanyId.high >>> 0).toNumber() : message.thirdPartyCompanyId; + if (options.oneofs) + object._thirdPartyCompanyId = "thirdPartyCompanyId"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; return object; }; /** - * Converts this ListEntitySignalsMappingsResponse to JSON. + * Converts this Company to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @instance * @returns {Object.} JSON object */ - ListEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + Company.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntitySignalsMappingsResponse + * Gets the default type url for Company * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.Company * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Company.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListEntitySignalsMappingsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.Company"; }; - return ListEntitySignalsMappingsResponse; + return Company; })(); - v1.BatchCreateEntitySignalsMappingsRequest = (function() { + v1.CompanyService = (function() { /** - * Properties of a BatchCreateEntitySignalsMappingsRequest. + * Constructs a new CompanyService service. * @memberof google.ads.admanager.v1 - * @interface IBatchCreateEntitySignalsMappingsRequest - * @property {string|null} [parent] BatchCreateEntitySignalsMappingsRequest parent - * @property {Array.|null} [requests] BatchCreateEntitySignalsMappingsRequest requests + * @classdesc Represents a CompanyService + * @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 CompanyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CompanyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompanyService; /** - * Constructs a new BatchCreateEntitySignalsMappingsRequest. + * Creates new CompanyService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CompanyService + * @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 {CompanyService} RPC service. Useful where requests and/or responses are streamed. + */ + CompanyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.CompanyService|getCompany}. + * @memberof google.ads.admanager.v1.CompanyService + * @typedef GetCompanyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Company} [response] Company + */ + + /** + * Calls GetCompany. + * @function getCompany + * @memberof google.ads.admanager.v1.CompanyService + * @instance + * @param {google.ads.admanager.v1.IGetCompanyRequest} request GetCompanyRequest message or plain object + * @param {google.ads.admanager.v1.CompanyService.GetCompanyCallback} callback Node-style callback called with the error, if any, and Company + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompanyService.prototype.getCompany = function getCompany(request, callback) { + return this.rpcCall(getCompany, $root.google.ads.admanager.v1.GetCompanyRequest, $root.google.ads.admanager.v1.Company, request, callback); + }, "name", { value: "GetCompany" }); + + /** + * Calls GetCompany. + * @function getCompany + * @memberof google.ads.admanager.v1.CompanyService + * @instance + * @param {google.ads.admanager.v1.IGetCompanyRequest} request GetCompanyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CompanyService|listCompanies}. + * @memberof google.ads.admanager.v1.CompanyService + * @typedef ListCompaniesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCompaniesResponse} [response] ListCompaniesResponse + */ + + /** + * Calls ListCompanies. + * @function listCompanies + * @memberof google.ads.admanager.v1.CompanyService + * @instance + * @param {google.ads.admanager.v1.IListCompaniesRequest} request ListCompaniesRequest message or plain object + * @param {google.ads.admanager.v1.CompanyService.ListCompaniesCallback} callback Node-style callback called with the error, if any, and ListCompaniesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompanyService.prototype.listCompanies = function listCompanies(request, callback) { + return this.rpcCall(listCompanies, $root.google.ads.admanager.v1.ListCompaniesRequest, $root.google.ads.admanager.v1.ListCompaniesResponse, request, callback); + }, "name", { value: "ListCompanies" }); + + /** + * Calls ListCompanies. + * @function listCompanies + * @memberof google.ads.admanager.v1.CompanyService + * @instance + * @param {google.ads.admanager.v1.IListCompaniesRequest} request ListCompaniesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CompanyService; + })(); + + v1.GetCompanyRequest = (function() { + + /** + * Properties of a GetCompanyRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BatchCreateEntitySignalsMappingsRequest. - * @implements IBatchCreateEntitySignalsMappingsRequest + * @interface IGetCompanyRequest + * @property {string|null} [name] GetCompanyRequest name + */ + + /** + * Constructs a new GetCompanyRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCompanyRequest. + * @implements IGetCompanyRequest * @constructor - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetCompanyRequest=} [properties] Properties to set */ - function BatchCreateEntitySignalsMappingsRequest(properties) { - this.requests = []; + function GetCompanyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21897,94 +21170,77 @@ } /** - * BatchCreateEntitySignalsMappingsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest - * @instance - */ - BatchCreateEntitySignalsMappingsRequest.prototype.parent = ""; - - /** - * BatchCreateEntitySignalsMappingsRequest requests. - * @member {Array.} requests - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * GetCompanyRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCompanyRequest * @instance */ - BatchCreateEntitySignalsMappingsRequest.prototype.requests = $util.emptyArray; + GetCompanyRequest.prototype.name = ""; /** - * Creates a new BatchCreateEntitySignalsMappingsRequest instance using the specified properties. + * Creates a new GetCompanyRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest instance + * @param {google.ads.admanager.v1.IGetCompanyRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest instance */ - BatchCreateEntitySignalsMappingsRequest.create = function create(properties) { - return new BatchCreateEntitySignalsMappingsRequest(properties); + GetCompanyRequest.create = function create(properties) { + return new GetCompanyRequest(properties); }; /** - * Encodes the specified BatchCreateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified GetCompanyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetCompanyRequest} message GetCompanyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateEntitySignalsMappingsRequest.encode = function encode(message, writer) { + GetCompanyRequest.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.requests != null && message.requests.length) - for (var i = 0; i < message.requests.length; ++i) - $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.encode(message.requests[i], 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 BatchCreateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified GetCompanyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCompanyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetCompanyRequest} message GetCompanyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCompanyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a GetCompanyRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + GetCompanyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCompanyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - if (!(message.requests && message.requests.length)) - message.requests = []; - message.requests.push($root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -21996,149 +21252,127 @@ }; /** - * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCompanyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + GetCompanyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateEntitySignalsMappingsRequest message. + * Verifies a GetCompanyRequest message. * @function verify - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateEntitySignalsMappingsRequest.verify = function verify(message) { + GetCompanyRequest.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.requests != null && message.hasOwnProperty("requests")) { - if (!Array.isArray(message.requests)) - return "requests: array expected"; - for (var i = 0; i < message.requests.length; ++i) { - var error = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify(message.requests[i]); - if (error) - return "requests." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a BatchCreateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCompanyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.GetCompanyRequest} GetCompanyRequest */ - BatchCreateEntitySignalsMappingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest) + GetCompanyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCompanyRequest) return object; - var message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.requests) { - if (!Array.isArray(object.requests)) - throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.requests: array expected"); - message.requests = []; - for (var i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") - throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.requests: object expected"); - message.requests[i] = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.fromObject(object.requests[i]); - } - } + var message = new $root.google.ads.admanager.v1.GetCompanyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a BatchCreateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCompanyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static - * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest + * @param {google.ads.admanager.v1.GetCompanyRequest} message GetCompanyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateEntitySignalsMappingsRequest.toObject = function toObject(message, options) { + GetCompanyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.requests = []; if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.requests && message.requests.length) { - object.requests = []; - for (var j = 0; j < message.requests.length; ++j) - object.requests[j] = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.toObject(message.requests[j], options); - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this BatchCreateEntitySignalsMappingsRequest to JSON. + * Converts this GetCompanyRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @instance * @returns {Object.} JSON object */ - BatchCreateEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + GetCompanyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchCreateEntitySignalsMappingsRequest + * Gets the default type url for GetCompanyRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.GetCompanyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchCreateEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCompanyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCompanyRequest"; }; - return BatchCreateEntitySignalsMappingsRequest; + return GetCompanyRequest; })(); - v1.BatchCreateEntitySignalsMappingsResponse = (function() { + v1.ListCompaniesRequest = (function() { /** - * Properties of a BatchCreateEntitySignalsMappingsResponse. + * Properties of a ListCompaniesRequest. * @memberof google.ads.admanager.v1 - * @interface IBatchCreateEntitySignalsMappingsResponse - * @property {Array.|null} [entitySignalsMappings] BatchCreateEntitySignalsMappingsResponse entitySignalsMappings + * @interface IListCompaniesRequest + * @property {string|null} [parent] ListCompaniesRequest parent + * @property {number|null} [pageSize] ListCompaniesRequest pageSize + * @property {string|null} [pageToken] ListCompaniesRequest pageToken + * @property {string|null} [filter] ListCompaniesRequest filter + * @property {string|null} [orderBy] ListCompaniesRequest orderBy + * @property {number|null} [skip] ListCompaniesRequest skip */ /** - * Constructs a new BatchCreateEntitySignalsMappingsResponse. + * Constructs a new ListCompaniesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BatchCreateEntitySignalsMappingsResponse. - * @implements IBatchCreateEntitySignalsMappingsResponse + * @classdesc Represents a ListCompaniesRequest. + * @implements IListCompaniesRequest * @constructor - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCompaniesRequest=} [properties] Properties to set */ - function BatchCreateEntitySignalsMappingsResponse(properties) { - this.entitySignalsMappings = []; + function ListCompaniesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22146,80 +21380,147 @@ } /** - * BatchCreateEntitySignalsMappingsResponse entitySignalsMappings. - * @member {Array.} entitySignalsMappings - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * ListCompaniesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @instance */ - BatchCreateEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; + ListCompaniesRequest.prototype.parent = ""; /** - * Creates a new BatchCreateEntitySignalsMappingsResponse instance using the specified properties. + * ListCompaniesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @instance + */ + ListCompaniesRequest.prototype.pageSize = 0; + + /** + * ListCompaniesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @instance + */ + ListCompaniesRequest.prototype.pageToken = ""; + + /** + * ListCompaniesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @instance + */ + ListCompaniesRequest.prototype.filter = ""; + + /** + * ListCompaniesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @instance + */ + ListCompaniesRequest.prototype.orderBy = ""; + + /** + * ListCompaniesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCompaniesRequest + * @instance + */ + ListCompaniesRequest.prototype.skip = 0; + + /** + * Creates a new ListCompaniesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse instance + * @param {google.ads.admanager.v1.IListCompaniesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest instance */ - BatchCreateEntitySignalsMappingsResponse.create = function create(properties) { - return new BatchCreateEntitySignalsMappingsResponse(properties); + ListCompaniesRequest.create = function create(properties) { + return new ListCompaniesRequest(properties); }; /** - * Encodes the specified BatchCreateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified ListCompaniesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListCompaniesRequest} message ListCompaniesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateEntitySignalsMappingsResponse.encode = function encode(message, writer) { + ListCompaniesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) - for (var i = 0; i < message.entitySignalsMappings.length; ++i) - $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[i], writer.uint32(/* id 1, wireType 2 =*/10).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); + if (message.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified BatchCreateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified ListCompaniesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static - * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListCompaniesRequest} message ListCompaniesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListCompaniesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a ListCompaniesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + ListCompaniesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCompaniesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) - message.entitySignalsMappings = []; - message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); + 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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -22231,141 +21532,166 @@ }; /** - * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCompaniesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + ListCompaniesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateEntitySignalsMappingsResponse message. + * Verifies a ListCompaniesRequest message. * @function verify - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateEntitySignalsMappingsResponse.verify = function verify(message) { + ListCompaniesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { - if (!Array.isArray(message.entitySignalsMappings)) - return "entitySignalsMappings: array expected"; - for (var i = 0; i < message.entitySignalsMappings.length; ++i) { - var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); - if (error) - return "entitySignalsMappings." + 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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a BatchCreateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCompaniesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ListCompaniesRequest} ListCompaniesRequest */ - BatchCreateEntitySignalsMappingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse) + ListCompaniesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCompaniesRequest) return object; - var message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse(); - if (object.entitySignalsMappings) { - if (!Array.isArray(object.entitySignalsMappings)) - throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); - message.entitySignalsMappings = []; - for (var i = 0; i < object.entitySignalsMappings.length; ++i) { - if (typeof object.entitySignalsMappings[i] !== "object") - throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); - message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); - } - } + var message = new $root.google.ads.admanager.v1.ListCompaniesRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a BatchCreateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListCompaniesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static - * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse + * @param {google.ads.admanager.v1.ListCompaniesRequest} message ListCompaniesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateEntitySignalsMappingsResponse.toObject = function toObject(message, options) { + ListCompaniesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entitySignalsMappings = []; - if (message.entitySignalsMappings && message.entitySignalsMappings.length) { - object.entitySignalsMappings = []; - for (var j = 0; j < message.entitySignalsMappings.length; ++j) - object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this BatchCreateEntitySignalsMappingsResponse to JSON. + * Converts this ListCompaniesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @instance * @returns {Object.} JSON object */ - BatchCreateEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + ListCompaniesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchCreateEntitySignalsMappingsResponse + * Gets the default type url for ListCompaniesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ListCompaniesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchCreateEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCompaniesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCompaniesRequest"; }; - return BatchCreateEntitySignalsMappingsResponse; + return ListCompaniesRequest; })(); - v1.BatchUpdateEntitySignalsMappingsRequest = (function() { + v1.ListCompaniesResponse = (function() { /** - * Properties of a BatchUpdateEntitySignalsMappingsRequest. + * Properties of a ListCompaniesResponse. * @memberof google.ads.admanager.v1 - * @interface IBatchUpdateEntitySignalsMappingsRequest - * @property {string|null} [parent] BatchUpdateEntitySignalsMappingsRequest parent - * @property {Array.|null} [requests] BatchUpdateEntitySignalsMappingsRequest requests + * @interface IListCompaniesResponse + * @property {Array.|null} [companies] ListCompaniesResponse companies + * @property {string|null} [nextPageToken] ListCompaniesResponse nextPageToken + * @property {number|null} [totalSize] ListCompaniesResponse totalSize */ /** - * Constructs a new BatchUpdateEntitySignalsMappingsRequest. + * Constructs a new ListCompaniesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BatchUpdateEntitySignalsMappingsRequest. - * @implements IBatchUpdateEntitySignalsMappingsRequest + * @classdesc Represents a ListCompaniesResponse. + * @implements IListCompaniesResponse * @constructor - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCompaniesResponse=} [properties] Properties to set */ - function BatchUpdateEntitySignalsMappingsRequest(properties) { - this.requests = []; + function ListCompaniesResponse(properties) { + this.companies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22373,94 +21699,108 @@ } /** - * BatchUpdateEntitySignalsMappingsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * ListCompaniesResponse companies. + * @member {Array.} companies + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @instance */ - BatchUpdateEntitySignalsMappingsRequest.prototype.parent = ""; + ListCompaniesResponse.prototype.companies = $util.emptyArray; /** - * BatchUpdateEntitySignalsMappingsRequest requests. - * @member {Array.} requests - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * ListCompaniesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @instance */ - BatchUpdateEntitySignalsMappingsRequest.prototype.requests = $util.emptyArray; + ListCompaniesResponse.prototype.nextPageToken = ""; /** - * Creates a new BatchUpdateEntitySignalsMappingsRequest instance using the specified properties. + * ListCompaniesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCompaniesResponse + * @instance + */ + ListCompaniesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListCompaniesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest instance + * @param {google.ads.admanager.v1.IListCompaniesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse instance */ - BatchUpdateEntitySignalsMappingsRequest.create = function create(properties) { - return new BatchUpdateEntitySignalsMappingsRequest(properties); + ListCompaniesResponse.create = function create(properties) { + return new ListCompaniesResponse(properties); }; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified ListCompaniesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCompaniesResponse} message ListCompaniesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntitySignalsMappingsRequest.encode = function encode(message, writer) { + ListCompaniesResponse.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.requests != null && message.requests.length) - for (var i = 0; i < message.requests.length; ++i) - $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.companies != null && message.companies.length) + for (var i = 0; i < message.companies.length; ++i) + $root.google.ads.admanager.v1.Company.encode(message.companies[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * Encodes the specified ListCompaniesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCompaniesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCompaniesResponse} message ListCompaniesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCompaniesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer. + * Decodes a ListCompaniesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + ListCompaniesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCompaniesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.companies && message.companies.length)) + message.companies = []; + message.companies.push($root.google.ads.admanager.v1.Company.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.requests && message.requests.length)) - message.requests = []; - message.requests.push($root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -22472,149 +21812,156 @@ }; /** - * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCompaniesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListCompaniesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchUpdateEntitySignalsMappingsRequest message. + * Verifies a ListCompaniesResponse message. * @function verify - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchUpdateEntitySignalsMappingsRequest.verify = function verify(message) { + ListCompaniesResponse.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.requests != null && message.hasOwnProperty("requests")) { - if (!Array.isArray(message.requests)) - return "requests: array expected"; - for (var i = 0; i < message.requests.length; ++i) { - var error = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify(message.requests[i]); + if (message.companies != null && message.hasOwnProperty("companies")) { + if (!Array.isArray(message.companies)) + return "companies: array expected"; + for (var i = 0; i < message.companies.length; ++i) { + var error = $root.google.ads.admanager.v1.Company.verify(message.companies[i]); if (error) - return "requests." + error; + return "companies." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a BatchUpdateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCompaniesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + * @returns {google.ads.admanager.v1.ListCompaniesResponse} ListCompaniesResponse */ - BatchUpdateEntitySignalsMappingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest) + ListCompaniesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCompaniesResponse) return object; - var message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.requests) { - if (!Array.isArray(object.requests)) - throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.requests: array expected"); - message.requests = []; - for (var i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") - throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.requests: object expected"); - message.requests[i] = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.fromObject(object.requests[i]); + var message = new $root.google.ads.admanager.v1.ListCompaniesResponse(); + if (object.companies) { + if (!Array.isArray(object.companies)) + throw TypeError(".google.ads.admanager.v1.ListCompaniesResponse.companies: array expected"); + message.companies = []; + for (var i = 0; i < object.companies.length; ++i) { + if (typeof object.companies[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCompaniesResponse.companies: object expected"); + message.companies[i] = $root.google.ads.admanager.v1.Company.fromObject(object.companies[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a BatchUpdateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCompaniesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static - * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest + * @param {google.ads.admanager.v1.ListCompaniesResponse} message ListCompaniesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchUpdateEntitySignalsMappingsRequest.toObject = function toObject(message, options) { + ListCompaniesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.requests = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.requests && message.requests.length) { - object.requests = []; - for (var j = 0; j < message.requests.length; ++j) - object.requests[j] = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.toObject(message.requests[j], options); + object.companies = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.companies && message.companies.length) { + object.companies = []; + for (var j = 0; j < message.companies.length; ++j) + object.companies[j] = $root.google.ads.admanager.v1.Company.toObject(message.companies[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this BatchUpdateEntitySignalsMappingsRequest to JSON. + * Converts this ListCompaniesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @instance * @returns {Object.} JSON object */ - BatchUpdateEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + ListCompaniesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchUpdateEntitySignalsMappingsRequest + * Gets the default type url for ListCompaniesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @memberof google.ads.admanager.v1.ListCompaniesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchUpdateEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCompaniesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCompaniesResponse"; }; - return BatchUpdateEntitySignalsMappingsRequest; + return ListCompaniesResponse; })(); - v1.BatchUpdateEntitySignalsMappingsResponse = (function() { + v1.ContactStatusEnum = (function() { /** - * Properties of a BatchUpdateEntitySignalsMappingsResponse. + * Properties of a ContactStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IBatchUpdateEntitySignalsMappingsResponse - * @property {Array.|null} [entitySignalsMappings] BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings + * @interface IContactStatusEnum */ /** - * Constructs a new BatchUpdateEntitySignalsMappingsResponse. + * Constructs a new ContactStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BatchUpdateEntitySignalsMappingsResponse. - * @implements IBatchUpdateEntitySignalsMappingsResponse + * @classdesc Represents a ContactStatusEnum. + * @implements IContactStatusEnum * @constructor - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IContactStatusEnum=} [properties] Properties to set */ - function BatchUpdateEntitySignalsMappingsResponse(properties) { - this.entitySignalsMappings = []; + function ContactStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22622,82 +21969,65 @@ } /** - * BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings. - * @member {Array.} entitySignalsMappings - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse - * @instance - */ - BatchUpdateEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; - - /** - * Creates a new BatchUpdateEntitySignalsMappingsResponse instance using the specified properties. + * Creates a new ContactStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse instance + * @param {google.ads.admanager.v1.IContactStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ContactStatusEnum} ContactStatusEnum instance */ - BatchUpdateEntitySignalsMappingsResponse.create = function create(properties) { - return new BatchUpdateEntitySignalsMappingsResponse(properties); + ContactStatusEnum.create = function create(properties) { + return new ContactStatusEnum(properties); }; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified ContactStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.ContactStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IContactStatusEnum} message ContactStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntitySignalsMappingsResponse.encode = function encode(message, writer) { + ContactStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) - for (var i = 0; i < message.entitySignalsMappings.length; ++i) - $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * Encodes the specified ContactStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContactStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static - * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IContactStatusEnum} message ContactStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ContactStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer. + * Decodes a ContactStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ContactStatusEnum} ContactStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + ContactStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ContactStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) - message.entitySignalsMappings = []; - message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -22707,146 +22037,143 @@ }; /** - * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ContactStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ContactStatusEnum} ContactStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + ContactStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchUpdateEntitySignalsMappingsResponse message. + * Verifies a ContactStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchUpdateEntitySignalsMappingsResponse.verify = function verify(message) { + ContactStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { - if (!Array.isArray(message.entitySignalsMappings)) - return "entitySignalsMappings: array expected"; - for (var i = 0; i < message.entitySignalsMappings.length; ++i) { - var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); - if (error) - return "entitySignalsMappings." + error; - } - } return null; }; /** - * Creates a BatchUpdateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContactStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + * @returns {google.ads.admanager.v1.ContactStatusEnum} ContactStatusEnum */ - BatchUpdateEntitySignalsMappingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse) + ContactStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ContactStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse(); - if (object.entitySignalsMappings) { - if (!Array.isArray(object.entitySignalsMappings)) - throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); - message.entitySignalsMappings = []; - for (var i = 0; i < object.entitySignalsMappings.length; ++i) { - if (typeof object.entitySignalsMappings[i] !== "object") - throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); - message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); - } - } - return message; + return new $root.google.ads.admanager.v1.ContactStatusEnum(); }; /** - * Creates a plain object from a BatchUpdateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ContactStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static - * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse + * @param {google.ads.admanager.v1.ContactStatusEnum} message ContactStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchUpdateEntitySignalsMappingsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entitySignalsMappings = []; - if (message.entitySignalsMappings && message.entitySignalsMappings.length) { - object.entitySignalsMappings = []; - for (var j = 0; j < message.entitySignalsMappings.length; ++j) - object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); - } - return object; + ContactStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this BatchUpdateEntitySignalsMappingsResponse to JSON. + * Converts this ContactStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @instance * @returns {Object.} JSON object */ - BatchUpdateEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + ContactStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchUpdateEntitySignalsMappingsResponse + * Gets the default type url for ContactStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @memberof google.ads.admanager.v1.ContactStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchUpdateEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContactStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ContactStatusEnum"; }; - return BatchUpdateEntitySignalsMappingsResponse; + /** + * ContactStatus enum. + * @name google.ads.admanager.v1.ContactStatusEnum.ContactStatus + * @enum {number} + * @property {number} CONTACT_STATUS_UNSPECIFIED=0 CONTACT_STATUS_UNSPECIFIED value + * @property {number} INVITE_CANCELED=1 INVITE_CANCELED value + * @property {number} INVITE_EXPIRED=2 INVITE_EXPIRED value + * @property {number} INVITE_PENDING=3 INVITE_PENDING value + * @property {number} UNINVITED=4 UNINVITED value + * @property {number} USER_ACTIVE=5 USER_ACTIVE value + * @property {number} USER_DISABLED=6 USER_DISABLED value + */ + ContactStatusEnum.ContactStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTACT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVITE_CANCELED"] = 1; + values[valuesById[2] = "INVITE_EXPIRED"] = 2; + values[valuesById[3] = "INVITE_PENDING"] = 3; + values[valuesById[4] = "UNINVITED"] = 4; + values[valuesById[5] = "USER_ACTIVE"] = 5; + values[valuesById[6] = "USER_DISABLED"] = 6; + return values; + })(); + + return ContactStatusEnum; })(); - v1.GeoTarget = (function() { + v1.Contact = (function() { /** - * Properties of a GeoTarget. + * Properties of a Contact. * @memberof google.ads.admanager.v1 - * @interface IGeoTarget - * @property {string|null} [name] GeoTarget name - * @property {string|null} [displayName] GeoTarget displayName - * @property {string|null} [canonicalParent] GeoTarget canonicalParent - * @property {Array.|null} [parentNames] GeoTarget parentNames - * @property {string|null} [regionCode] GeoTarget regionCode - * @property {string|null} [type] GeoTarget type - * @property {boolean|null} [targetable] GeoTarget targetable + * @interface IContact + * @property {string|null} [name] Contact name + * @property {string|null} [displayName] Contact displayName + * @property {string|null} [company] Contact company + * @property {google.ads.admanager.v1.ContactStatusEnum.ContactStatus|null} [status] Contact status + * @property {string|null} [address] Contact address + * @property {string|null} [cellPhone] Contact cellPhone + * @property {string|null} [comment] Contact comment + * @property {string|null} [email] Contact email + * @property {string|null} [fax] Contact fax + * @property {string|null} [title] Contact title + * @property {string|null} [workPhone] Contact workPhone */ /** - * Constructs a new GeoTarget. + * Constructs a new Contact. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GeoTarget. - * @implements IGeoTarget + * @classdesc Represents a Contact. + * @implements IContact * @constructor - * @param {google.ads.admanager.v1.IGeoTarget=} [properties] Properties to set + * @param {google.ads.admanager.v1.IContact=} [properties] Properties to set */ - function GeoTarget(properties) { - this.parentNames = []; + function Contact(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22854,164 +22181,233 @@ } /** - * GeoTarget name. + * Contact name. * @member {string} name - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.name = ""; + Contact.prototype.name = ""; /** - * GeoTarget displayName. + * Contact displayName. * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.displayName = null; + Contact.prototype.displayName = null; /** - * GeoTarget canonicalParent. - * @member {string|null|undefined} canonicalParent - * @memberof google.ads.admanager.v1.GeoTarget + * Contact company. + * @member {string|null|undefined} company + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.canonicalParent = null; + Contact.prototype.company = null; /** - * GeoTarget parentNames. - * @member {Array.} parentNames - * @memberof google.ads.admanager.v1.GeoTarget + * Contact status. + * @member {google.ads.admanager.v1.ContactStatusEnum.ContactStatus|null|undefined} status + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.parentNames = $util.emptyArray; + Contact.prototype.status = null; /** - * GeoTarget regionCode. - * @member {string|null|undefined} regionCode - * @memberof google.ads.admanager.v1.GeoTarget + * Contact address. + * @member {string|null|undefined} address + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.regionCode = null; + Contact.prototype.address = null; /** - * GeoTarget type. - * @member {string|null|undefined} type - * @memberof google.ads.admanager.v1.GeoTarget + * Contact cellPhone. + * @member {string|null|undefined} cellPhone + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.type = null; + Contact.prototype.cellPhone = null; /** - * GeoTarget targetable. - * @member {boolean|null|undefined} targetable - * @memberof google.ads.admanager.v1.GeoTarget + * Contact comment. + * @member {string|null|undefined} comment + * @memberof google.ads.admanager.v1.Contact * @instance */ - GeoTarget.prototype.targetable = null; + Contact.prototype.comment = null; + + /** + * Contact email. + * @member {string|null|undefined} email + * @memberof google.ads.admanager.v1.Contact + * @instance + */ + Contact.prototype.email = null; + + /** + * Contact fax. + * @member {string|null|undefined} fax + * @memberof google.ads.admanager.v1.Contact + * @instance + */ + Contact.prototype.fax = null; + + /** + * Contact title. + * @member {string|null|undefined} title + * @memberof google.ads.admanager.v1.Contact + * @instance + */ + Contact.prototype.title = null; + + /** + * Contact workPhone. + * @member {string|null|undefined} workPhone + * @memberof google.ads.admanager.v1.Contact + * @instance + */ + Contact.prototype.workPhone = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; // Virtual OneOf for proto3 optional field - Object.defineProperty(GeoTarget.prototype, "_displayName", { + Object.defineProperty(Contact.prototype, "_displayName", { get: $util.oneOfGetter($oneOfFields = ["displayName"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(GeoTarget.prototype, "_canonicalParent", { - get: $util.oneOfGetter($oneOfFields = ["canonicalParent"]), + Object.defineProperty(Contact.prototype, "_company", { + get: $util.oneOfGetter($oneOfFields = ["company"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(GeoTarget.prototype, "_regionCode", { - get: $util.oneOfGetter($oneOfFields = ["regionCode"]), + Object.defineProperty(Contact.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(GeoTarget.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), + Object.defineProperty(Contact.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(GeoTarget.prototype, "_targetable", { - get: $util.oneOfGetter($oneOfFields = ["targetable"]), + Object.defineProperty(Contact.prototype, "_cellPhone", { + get: $util.oneOfGetter($oneOfFields = ["cellPhone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Contact.prototype, "_comment", { + get: $util.oneOfGetter($oneOfFields = ["comment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Contact.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Contact.prototype, "_fax", { + get: $util.oneOfGetter($oneOfFields = ["fax"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Contact.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Contact.prototype, "_workPhone", { + get: $util.oneOfGetter($oneOfFields = ["workPhone"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GeoTarget instance using the specified properties. + * Creates a new Contact instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static - * @param {google.ads.admanager.v1.IGeoTarget=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget instance + * @param {google.ads.admanager.v1.IContact=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Contact} Contact instance */ - GeoTarget.create = function create(properties) { - return new GeoTarget(properties); + Contact.create = function create(properties) { + return new Contact(properties); }; /** - * Encodes the specified GeoTarget message. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * Encodes the specified Contact message. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static - * @param {google.ads.admanager.v1.IGeoTarget} message GeoTarget message or plain object to encode + * @param {google.ads.admanager.v1.IContact} message Contact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeoTarget.encode = function encode(message, writer) { + Contact.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.canonicalParent != null && Object.hasOwnProperty.call(message, "canonicalParent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalParent); - if (message.parentNames != null && message.parentNames.length) - for (var i = 0; i < message.parentNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentNames[i]); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); - if (message.targetable != null && Object.hasOwnProperty.call(message, "targetable")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.targetable); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.company != null && Object.hasOwnProperty.call(message, "company")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.company); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.address); + if (message.cellPhone != null && Object.hasOwnProperty.call(message, "cellPhone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cellPhone); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.comment); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.email); + if (message.fax != null && Object.hasOwnProperty.call(message, "fax")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.fax); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.title); + if (message.workPhone != null && Object.hasOwnProperty.call(message, "workPhone")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.workPhone); return writer; }; /** - * Encodes the specified GeoTarget message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Contact.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static - * @param {google.ads.admanager.v1.IGeoTarget} message GeoTarget message or plain object to encode + * @param {google.ads.admanager.v1.IContact} message Contact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeoTarget.encodeDelimited = function encodeDelimited(message, writer) { + Contact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeoTarget message from the specified reader or buffer. + * Decodes a Contact message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + * @returns {google.ads.admanager.v1.Contact} Contact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeoTarget.decode = function decode(reader, length, error) { + Contact.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GeoTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Contact(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -23021,30 +22417,44 @@ message.name = reader.string(); break; } - case 2: { + case 3: { message.displayName = reader.string(); break; } - case 3: { - message.canonicalParent = reader.string(); + case 5: { + message.company = reader.string(); break; } - case 4: { - if (!(message.parentNames && message.parentNames.length)) - message.parentNames = []; - message.parentNames.push(reader.string()); + case 6: { + message.status = reader.int32(); break; } - case 5: { - message.regionCode = reader.string(); + case 7: { + message.address = reader.string(); break; } - case 6: { - message.type = reader.string(); + case 8: { + message.cellPhone = reader.string(); break; } - case 7: { - message.targetable = reader.bool(); + case 9: { + message.comment = reader.string(); + break; + } + case 10: { + message.email = reader.string(); + break; + } + case 11: { + message.fax = reader.string(); + break; + } + case 12: { + message.title = reader.string(); + break; + } + case 13: { + message.workPhone = reader.string(); break; } default: @@ -23056,30 +22466,30 @@ }; /** - * Decodes a GeoTarget message from the specified reader or buffer, length delimited. + * Decodes a Contact message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + * @returns {google.ads.admanager.v1.Contact} Contact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeoTarget.decodeDelimited = function decodeDelimited(reader) { + Contact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeoTarget message. + * Verifies a Contact message. * @function verify - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeoTarget.verify = function verify(message) { + Contact.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; @@ -23091,85 +22501,148 @@ if (!$util.isString(message.displayName)) return "displayName: string expected"; } - if (message.canonicalParent != null && message.hasOwnProperty("canonicalParent")) { - properties._canonicalParent = 1; - if (!$util.isString(message.canonicalParent)) - return "canonicalParent: string expected"; + if (message.company != null && message.hasOwnProperty("company")) { + properties._company = 1; + if (!$util.isString(message.company)) + return "company: string expected"; } - if (message.parentNames != null && message.hasOwnProperty("parentNames")) { - if (!Array.isArray(message.parentNames)) - return "parentNames: array expected"; - for (var i = 0; i < message.parentNames.length; ++i) - if (!$util.isString(message.parentNames[i])) - return "parentNames: string[] expected"; + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } } - if (message.regionCode != null && message.hasOwnProperty("regionCode")) { - properties._regionCode = 1; - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if (!$util.isString(message.address)) + return "address: string expected"; } - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.cellPhone != null && message.hasOwnProperty("cellPhone")) { + properties._cellPhone = 1; + if (!$util.isString(message.cellPhone)) + return "cellPhone: string expected"; } - if (message.targetable != null && message.hasOwnProperty("targetable")) { - properties._targetable = 1; - if (typeof message.targetable !== "boolean") - return "targetable: boolean expected"; + if (message.comment != null && message.hasOwnProperty("comment")) { + properties._comment = 1; + if (!$util.isString(message.comment)) + return "comment: string expected"; + } + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.fax != null && message.hasOwnProperty("fax")) { + properties._fax = 1; + if (!$util.isString(message.fax)) + return "fax: string expected"; + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.workPhone != null && message.hasOwnProperty("workPhone")) { + properties._workPhone = 1; + if (!$util.isString(message.workPhone)) + return "workPhone: string expected"; } return null; }; /** - * Creates a GeoTarget message from a plain object. Also converts values to their respective internal types. + * Creates a Contact message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + * @returns {google.ads.admanager.v1.Contact} Contact */ - GeoTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GeoTarget) + Contact.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Contact) return object; - var message = new $root.google.ads.admanager.v1.GeoTarget(); + var message = new $root.google.ads.admanager.v1.Contact(); if (object.name != null) message.name = String(object.name); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.canonicalParent != null) - message.canonicalParent = String(object.canonicalParent); - if (object.parentNames) { - if (!Array.isArray(object.parentNames)) - throw TypeError(".google.ads.admanager.v1.GeoTarget.parentNames: array expected"); - message.parentNames = []; - for (var i = 0; i < object.parentNames.length; ++i) - message.parentNames[i] = String(object.parentNames[i]); + if (object.company != null) + message.company = String(object.company); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "CONTACT_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "INVITE_CANCELED": + case 1: + message.status = 1; + break; + case "INVITE_EXPIRED": + case 2: + message.status = 2; + break; + case "INVITE_PENDING": + case 3: + message.status = 3; + break; + case "UNINVITED": + case 4: + message.status = 4; + break; + case "USER_ACTIVE": + case 5: + message.status = 5; + break; + case "USER_DISABLED": + case 6: + message.status = 6; + break; } - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.type != null) - message.type = String(object.type); - if (object.targetable != null) - message.targetable = Boolean(object.targetable); - return message; - }; - + if (object.address != null) + message.address = String(object.address); + if (object.cellPhone != null) + message.cellPhone = String(object.cellPhone); + if (object.comment != null) + message.comment = String(object.comment); + if (object.email != null) + message.email = String(object.email); + if (object.fax != null) + message.fax = String(object.fax); + if (object.title != null) + message.title = String(object.title); + if (object.workPhone != null) + message.workPhone = String(object.workPhone); + return message; + }; + /** - * Creates a plain object from a GeoTarget message. Also converts values to other types if specified. + * Creates a plain object from a Contact message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static - * @param {google.ads.admanager.v1.GeoTarget} message GeoTarget + * @param {google.ads.admanager.v1.Contact} message Contact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeoTarget.toObject = function toObject(message, options) { + Contact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parentNames = []; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) @@ -23179,182 +22652,334 @@ if (options.oneofs) object._displayName = "displayName"; } - if (message.canonicalParent != null && message.hasOwnProperty("canonicalParent")) { - object.canonicalParent = message.canonicalParent; + if (message.company != null && message.hasOwnProperty("company")) { + object.company = message.company; if (options.oneofs) - object._canonicalParent = "canonicalParent"; + object._company = "company"; } - if (message.parentNames && message.parentNames.length) { - object.parentNames = []; - for (var j = 0; j < message.parentNames.length; ++j) - object.parentNames[j] = message.parentNames[j]; + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.ContactStatusEnum.ContactStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.ContactStatusEnum.ContactStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; } - if (message.regionCode != null && message.hasOwnProperty("regionCode")) { - object.regionCode = message.regionCode; + if (message.address != null && message.hasOwnProperty("address")) { + object.address = message.address; if (options.oneofs) - object._regionCode = "regionCode"; + object._address = "address"; } - if (message.type != null && message.hasOwnProperty("type")) { - object.type = message.type; + if (message.cellPhone != null && message.hasOwnProperty("cellPhone")) { + object.cellPhone = message.cellPhone; if (options.oneofs) - object._type = "type"; + object._cellPhone = "cellPhone"; } - if (message.targetable != null && message.hasOwnProperty("targetable")) { - object.targetable = message.targetable; + if (message.comment != null && message.hasOwnProperty("comment")) { + object.comment = message.comment; if (options.oneofs) - object._targetable = "targetable"; + object._comment = "comment"; + } + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.fax != null && message.hasOwnProperty("fax")) { + object.fax = message.fax; + if (options.oneofs) + object._fax = "fax"; + } + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.workPhone != null && message.hasOwnProperty("workPhone")) { + object.workPhone = message.workPhone; + if (options.oneofs) + object._workPhone = "workPhone"; } return object; }; /** - * Converts this GeoTarget to JSON. + * Converts this Contact to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @instance * @returns {Object.} JSON object */ - GeoTarget.prototype.toJSON = function toJSON() { + Contact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeoTarget + * Gets the default type url for Contact * @function getTypeUrl - * @memberof google.ads.admanager.v1.GeoTarget + * @memberof google.ads.admanager.v1.Contact * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeoTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GeoTarget"; + return typeUrlPrefix + "/google.ads.admanager.v1.Contact"; }; - return GeoTarget; + return Contact; })(); - v1.GeoTargetService = (function() { + v1.ContactService = (function() { /** - * Constructs a new GeoTargetService service. + * Constructs a new ContactService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GeoTargetService + * @classdesc Represents a ContactService * @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 GeoTargetService(rpcImpl, requestDelimited, responseDelimited) { + function ContactService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (GeoTargetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GeoTargetService; + (ContactService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContactService; /** - * Creates new GeoTargetService service using the specified rpc implementation. + * Creates new ContactService service using the specified rpc implementation. * @function create - * @memberof google.ads.admanager.v1.GeoTargetService + * @memberof google.ads.admanager.v1.ContactService * @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 {GeoTargetService} RPC service. Useful where requests and/or responses are streamed. + * @returns {ContactService} RPC service. Useful where requests and/or responses are streamed. */ - GeoTargetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + ContactService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|getGeoTarget}. - * @memberof google.ads.admanager.v1.GeoTargetService - * @typedef GetGeoTargetCallback + * Callback as used by {@link google.ads.admanager.v1.ContactService|getContact}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef GetContactCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.GeoTarget} [response] GeoTarget + * @param {google.ads.admanager.v1.Contact} [response] Contact */ /** - * Calls GetGeoTarget. - * @function getGeoTarget - * @memberof google.ads.admanager.v1.GeoTargetService + * Calls GetContact. + * @function getContact + * @memberof google.ads.admanager.v1.ContactService * @instance - * @param {google.ads.admanager.v1.IGetGeoTargetRequest} request GetGeoTargetRequest message or plain object - * @param {google.ads.admanager.v1.GeoTargetService.GetGeoTargetCallback} callback Node-style callback called with the error, if any, and GeoTarget + * @param {google.ads.admanager.v1.IGetContactRequest} request GetContactRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.GetContactCallback} callback Node-style callback called with the error, if any, and Contact * @returns {undefined} * @variation 1 */ - Object.defineProperty(GeoTargetService.prototype.getGeoTarget = function getGeoTarget(request, callback) { - return this.rpcCall(getGeoTarget, $root.google.ads.admanager.v1.GetGeoTargetRequest, $root.google.ads.admanager.v1.GeoTarget, request, callback); - }, "name", { value: "GetGeoTarget" }); + Object.defineProperty(ContactService.prototype.getContact = function getContact(request, callback) { + return this.rpcCall(getContact, $root.google.ads.admanager.v1.GetContactRequest, $root.google.ads.admanager.v1.Contact, request, callback); + }, "name", { value: "GetContact" }); /** - * Calls GetGeoTarget. - * @function getGeoTarget - * @memberof google.ads.admanager.v1.GeoTargetService + * Calls GetContact. + * @function getContact + * @memberof google.ads.admanager.v1.ContactService * @instance - * @param {google.ads.admanager.v1.IGetGeoTargetRequest} request GetGeoTargetRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IGetContactRequest} request GetContactRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|listGeoTargets}. - * @memberof google.ads.admanager.v1.GeoTargetService - * @typedef ListGeoTargetsCallback + * Callback as used by {@link google.ads.admanager.v1.ContactService|listContacts}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef ListContactsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListGeoTargetsResponse} [response] ListGeoTargetsResponse + * @param {google.ads.admanager.v1.ListContactsResponse} [response] ListContactsResponse */ /** - * Calls ListGeoTargets. - * @function listGeoTargets - * @memberof google.ads.admanager.v1.GeoTargetService + * Calls ListContacts. + * @function listContacts + * @memberof google.ads.admanager.v1.ContactService * @instance - * @param {google.ads.admanager.v1.IListGeoTargetsRequest} request ListGeoTargetsRequest message or plain object - * @param {google.ads.admanager.v1.GeoTargetService.ListGeoTargetsCallback} callback Node-style callback called with the error, if any, and ListGeoTargetsResponse + * @param {google.ads.admanager.v1.IListContactsRequest} request ListContactsRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.ListContactsCallback} callback Node-style callback called with the error, if any, and ListContactsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(GeoTargetService.prototype.listGeoTargets = function listGeoTargets(request, callback) { - return this.rpcCall(listGeoTargets, $root.google.ads.admanager.v1.ListGeoTargetsRequest, $root.google.ads.admanager.v1.ListGeoTargetsResponse, request, callback); - }, "name", { value: "ListGeoTargets" }); + Object.defineProperty(ContactService.prototype.listContacts = function listContacts(request, callback) { + return this.rpcCall(listContacts, $root.google.ads.admanager.v1.ListContactsRequest, $root.google.ads.admanager.v1.ListContactsResponse, request, callback); + }, "name", { value: "ListContacts" }); /** - * Calls ListGeoTargets. - * @function listGeoTargets - * @memberof google.ads.admanager.v1.GeoTargetService + * Calls ListContacts. + * @function listContacts + * @memberof google.ads.admanager.v1.ContactService * @instance - * @param {google.ads.admanager.v1.IListGeoTargetsRequest} request ListGeoTargetsRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IListContactsRequest} request ListContactsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return GeoTargetService; + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|createContact}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef CreateContactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Contact} [response] Contact + */ + + /** + * Calls CreateContact. + * @function createContact + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.ICreateContactRequest} request CreateContactRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.CreateContactCallback} callback Node-style callback called with the error, if any, and Contact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactService.prototype.createContact = function createContact(request, callback) { + return this.rpcCall(createContact, $root.google.ads.admanager.v1.CreateContactRequest, $root.google.ads.admanager.v1.Contact, request, callback); + }, "name", { value: "CreateContact" }); + + /** + * Calls CreateContact. + * @function createContact + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.ICreateContactRequest} request CreateContactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|batchCreateContacts}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef BatchCreateContactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreateContactsResponse} [response] BatchCreateContactsResponse + */ + + /** + * Calls BatchCreateContacts. + * @function batchCreateContacts + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest} request BatchCreateContactsRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.BatchCreateContactsCallback} callback Node-style callback called with the error, if any, and BatchCreateContactsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactService.prototype.batchCreateContacts = function batchCreateContacts(request, callback) { + return this.rpcCall(batchCreateContacts, $root.google.ads.admanager.v1.BatchCreateContactsRequest, $root.google.ads.admanager.v1.BatchCreateContactsResponse, request, callback); + }, "name", { value: "BatchCreateContacts" }); + + /** + * Calls BatchCreateContacts. + * @function batchCreateContacts + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest} request BatchCreateContactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|updateContact}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef UpdateContactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Contact} [response] Contact + */ + + /** + * Calls UpdateContact. + * @function updateContact + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IUpdateContactRequest} request UpdateContactRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.UpdateContactCallback} callback Node-style callback called with the error, if any, and Contact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactService.prototype.updateContact = function updateContact(request, callback) { + return this.rpcCall(updateContact, $root.google.ads.admanager.v1.UpdateContactRequest, $root.google.ads.admanager.v1.Contact, request, callback); + }, "name", { value: "UpdateContact" }); + + /** + * Calls UpdateContact. + * @function updateContact + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IUpdateContactRequest} request UpdateContactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ContactService|batchUpdateContacts}. + * @memberof google.ads.admanager.v1.ContactService + * @typedef BatchUpdateContactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdateContactsResponse} [response] BatchUpdateContactsResponse + */ + + /** + * Calls BatchUpdateContacts. + * @function batchUpdateContacts + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest} request BatchUpdateContactsRequest message or plain object + * @param {google.ads.admanager.v1.ContactService.BatchUpdateContactsCallback} callback Node-style callback called with the error, if any, and BatchUpdateContactsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactService.prototype.batchUpdateContacts = function batchUpdateContacts(request, callback) { + return this.rpcCall(batchUpdateContacts, $root.google.ads.admanager.v1.BatchUpdateContactsRequest, $root.google.ads.admanager.v1.BatchUpdateContactsResponse, request, callback); + }, "name", { value: "BatchUpdateContacts" }); + + /** + * Calls BatchUpdateContacts. + * @function batchUpdateContacts + * @memberof google.ads.admanager.v1.ContactService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest} request BatchUpdateContactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ContactService; })(); - v1.GetGeoTargetRequest = (function() { + v1.GetContactRequest = (function() { /** - * Properties of a GetGeoTargetRequest. + * Properties of a GetContactRequest. * @memberof google.ads.admanager.v1 - * @interface IGetGeoTargetRequest - * @property {string|null} [name] GetGeoTargetRequest name + * @interface IGetContactRequest + * @property {string|null} [name] GetContactRequest name */ /** - * Constructs a new GetGeoTargetRequest. + * Constructs a new GetContactRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetGeoTargetRequest. - * @implements IGetGeoTargetRequest + * @classdesc Represents a GetContactRequest. + * @implements IGetContactRequest * @constructor - * @param {google.ads.admanager.v1.IGetGeoTargetRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetContactRequest=} [properties] Properties to set */ - function GetGeoTargetRequest(properties) { + function GetContactRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23362,35 +22987,35 @@ } /** - * GetGeoTargetRequest name. + * GetContactRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @instance */ - GetGeoTargetRequest.prototype.name = ""; + GetContactRequest.prototype.name = ""; /** - * Creates a new GetGeoTargetRequest instance using the specified properties. + * Creates a new GetContactRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static - * @param {google.ads.admanager.v1.IGetGeoTargetRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest instance + * @param {google.ads.admanager.v1.IGetContactRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetContactRequest} GetContactRequest instance */ - GetGeoTargetRequest.create = function create(properties) { - return new GetGeoTargetRequest(properties); + GetContactRequest.create = function create(properties) { + return new GetContactRequest(properties); }; /** - * Encodes the specified GetGeoTargetRequest message. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * Encodes the specified GetContactRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContactRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static - * @param {google.ads.admanager.v1.IGetGeoTargetRequest} message GetGeoTargetRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetContactRequest} message GetContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGeoTargetRequest.encode = function encode(message, writer) { + GetContactRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -23399,33 +23024,33 @@ }; /** - * Encodes the specified GetGeoTargetRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * Encodes the specified GetContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContactRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static - * @param {google.ads.admanager.v1.IGetGeoTargetRequest} message GetGeoTargetRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetContactRequest} message GetContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGeoTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetContactRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetGeoTargetRequest message from the specified reader or buffer. + * Decodes a GetContactRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + * @returns {google.ads.admanager.v1.GetContactRequest} GetContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGeoTargetRequest.decode = function decode(reader, length, error) { + GetContactRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetGeoTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetContactRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -23444,30 +23069,30 @@ }; /** - * Decodes a GetGeoTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContactRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + * @returns {google.ads.admanager.v1.GetContactRequest} GetContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGeoTargetRequest.decodeDelimited = function decodeDelimited(reader) { + GetContactRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetGeoTargetRequest message. + * Verifies a GetContactRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetGeoTargetRequest.verify = function verify(message) { + GetContactRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -23477,32 +23102,32 @@ }; /** - * Creates a GetGeoTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContactRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + * @returns {google.ads.admanager.v1.GetContactRequest} GetContactRequest */ - GetGeoTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetGeoTargetRequest) + GetContactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetContactRequest) return object; - var message = new $root.google.ads.admanager.v1.GetGeoTargetRequest(); + var message = new $root.google.ads.admanager.v1.GetContactRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetGeoTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetContactRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static - * @param {google.ads.admanager.v1.GetGeoTargetRequest} message GetGeoTargetRequest + * @param {google.ads.admanager.v1.GetContactRequest} message GetContactRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetGeoTargetRequest.toObject = function toObject(message, options) { + GetContactRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -23514,57 +23139,57 @@ }; /** - * Converts this GetGeoTargetRequest to JSON. + * Converts this GetContactRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @instance * @returns {Object.} JSON object */ - GetGeoTargetRequest.prototype.toJSON = function toJSON() { + GetContactRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetGeoTargetRequest + * Gets the default type url for GetContactRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @memberof google.ads.admanager.v1.GetContactRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetGeoTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetGeoTargetRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetContactRequest"; }; - return GetGeoTargetRequest; + return GetContactRequest; })(); - v1.ListGeoTargetsRequest = (function() { + v1.ListContactsRequest = (function() { /** - * Properties of a ListGeoTargetsRequest. + * Properties of a ListContactsRequest. * @memberof google.ads.admanager.v1 - * @interface IListGeoTargetsRequest - * @property {string|null} [parent] ListGeoTargetsRequest parent - * @property {number|null} [pageSize] ListGeoTargetsRequest pageSize - * @property {string|null} [pageToken] ListGeoTargetsRequest pageToken - * @property {string|null} [filter] ListGeoTargetsRequest filter - * @property {string|null} [orderBy] ListGeoTargetsRequest orderBy - * @property {number|null} [skip] ListGeoTargetsRequest skip + * @interface IListContactsRequest + * @property {string|null} [parent] ListContactsRequest parent + * @property {number|null} [pageSize] ListContactsRequest pageSize + * @property {string|null} [pageToken] ListContactsRequest pageToken + * @property {string|null} [filter] ListContactsRequest filter + * @property {string|null} [orderBy] ListContactsRequest orderBy + * @property {number|null} [skip] ListContactsRequest skip */ /** - * Constructs a new ListGeoTargetsRequest. + * Constructs a new ListContactsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListGeoTargetsRequest. - * @implements IListGeoTargetsRequest + * @classdesc Represents a ListContactsRequest. + * @implements IListContactsRequest * @constructor - * @param {google.ads.admanager.v1.IListGeoTargetsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContactsRequest=} [properties] Properties to set */ - function ListGeoTargetsRequest(properties) { + function ListContactsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23572,75 +23197,75 @@ } /** - * ListGeoTargetsRequest parent. + * ListContactsRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.parent = ""; + ListContactsRequest.prototype.parent = ""; /** - * ListGeoTargetsRequest pageSize. + * ListContactsRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.pageSize = 0; + ListContactsRequest.prototype.pageSize = 0; /** - * ListGeoTargetsRequest pageToken. + * ListContactsRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.pageToken = ""; + ListContactsRequest.prototype.pageToken = ""; /** - * ListGeoTargetsRequest filter. + * ListContactsRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.filter = ""; + ListContactsRequest.prototype.filter = ""; /** - * ListGeoTargetsRequest orderBy. + * ListContactsRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.orderBy = ""; + ListContactsRequest.prototype.orderBy = ""; /** - * ListGeoTargetsRequest skip. + * ListContactsRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance */ - ListGeoTargetsRequest.prototype.skip = 0; + ListContactsRequest.prototype.skip = 0; /** - * Creates a new ListGeoTargetsRequest instance using the specified properties. + * Creates a new ListContactsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static - * @param {google.ads.admanager.v1.IListGeoTargetsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest instance + * @param {google.ads.admanager.v1.IListContactsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContactsRequest} ListContactsRequest instance */ - ListGeoTargetsRequest.create = function create(properties) { - return new ListGeoTargetsRequest(properties); + ListContactsRequest.create = function create(properties) { + return new ListContactsRequest(properties); }; /** - * Encodes the specified ListGeoTargetsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * Encodes the specified ListContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContactsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static - * @param {google.ads.admanager.v1.IListGeoTargetsRequest} message ListGeoTargetsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContactsRequest} message ListContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGeoTargetsRequest.encode = function encode(message, writer) { + ListContactsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -23659,33 +23284,33 @@ }; /** - * Encodes the specified ListGeoTargetsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * Encodes the specified ListContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContactsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static - * @param {google.ads.admanager.v1.IListGeoTargetsRequest} message ListGeoTargetsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContactsRequest} message ListContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGeoTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListContactsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGeoTargetsRequest message from the specified reader or buffer. + * Decodes a ListContactsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + * @returns {google.ads.admanager.v1.ListContactsRequest} ListContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGeoTargetsRequest.decode = function decode(reader, length, error) { + ListContactsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListGeoTargetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContactsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -23724,30 +23349,30 @@ }; /** - * Decodes a ListGeoTargetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContactsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + * @returns {google.ads.admanager.v1.ListContactsRequest} ListContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGeoTargetsRequest.decodeDelimited = function decodeDelimited(reader) { + ListContactsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGeoTargetsRequest message. + * Verifies a ListContactsRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGeoTargetsRequest.verify = function verify(message) { + ListContactsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -23772,17 +23397,17 @@ }; /** - * Creates a ListGeoTargetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContactsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + * @returns {google.ads.admanager.v1.ListContactsRequest} ListContactsRequest */ - ListGeoTargetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListGeoTargetsRequest) + ListContactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContactsRequest) return object; - var message = new $root.google.ads.admanager.v1.ListGeoTargetsRequest(); + var message = new $root.google.ads.admanager.v1.ListContactsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -23799,15 +23424,15 @@ }; /** - * Creates a plain object from a ListGeoTargetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListContactsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static - * @param {google.ads.admanager.v1.ListGeoTargetsRequest} message ListGeoTargetsRequest + * @param {google.ads.admanager.v1.ListContactsRequest} message ListContactsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGeoTargetsRequest.toObject = function toObject(message, options) { + ListContactsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -23835,55 +23460,55 @@ }; /** - * Converts this ListGeoTargetsRequest to JSON. + * Converts this ListContactsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @instance * @returns {Object.} JSON object */ - ListGeoTargetsRequest.prototype.toJSON = function toJSON() { + ListContactsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListGeoTargetsRequest + * Gets the default type url for ListContactsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @memberof google.ads.admanager.v1.ListContactsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListGeoTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListGeoTargetsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContactsRequest"; }; - return ListGeoTargetsRequest; + return ListContactsRequest; })(); - v1.ListGeoTargetsResponse = (function() { + v1.ListContactsResponse = (function() { /** - * Properties of a ListGeoTargetsResponse. + * Properties of a ListContactsResponse. * @memberof google.ads.admanager.v1 - * @interface IListGeoTargetsResponse - * @property {Array.|null} [geoTargets] ListGeoTargetsResponse geoTargets - * @property {string|null} [nextPageToken] ListGeoTargetsResponse nextPageToken - * @property {number|null} [totalSize] ListGeoTargetsResponse totalSize + * @interface IListContactsResponse + * @property {Array.|null} [contacts] ListContactsResponse contacts + * @property {string|null} [nextPageToken] ListContactsResponse nextPageToken + * @property {number|null} [totalSize] ListContactsResponse totalSize */ /** - * Constructs a new ListGeoTargetsResponse. + * Constructs a new ListContactsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListGeoTargetsResponse. - * @implements IListGeoTargetsResponse + * @classdesc Represents a ListContactsResponse. + * @implements IListContactsResponse * @constructor - * @param {google.ads.admanager.v1.IListGeoTargetsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContactsResponse=} [properties] Properties to set */ - function ListGeoTargetsResponse(properties) { - this.geoTargets = []; + function ListContactsResponse(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23891,56 +23516,56 @@ } /** - * ListGeoTargetsResponse geoTargets. - * @member {Array.} geoTargets - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * ListContactsResponse contacts. + * @member {Array.} contacts + * @memberof google.ads.admanager.v1.ListContactsResponse * @instance */ - ListGeoTargetsResponse.prototype.geoTargets = $util.emptyArray; + ListContactsResponse.prototype.contacts = $util.emptyArray; /** - * ListGeoTargetsResponse nextPageToken. + * ListContactsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @instance */ - ListGeoTargetsResponse.prototype.nextPageToken = ""; + ListContactsResponse.prototype.nextPageToken = ""; /** - * ListGeoTargetsResponse totalSize. + * ListContactsResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @instance */ - ListGeoTargetsResponse.prototype.totalSize = 0; + ListContactsResponse.prototype.totalSize = 0; /** - * Creates a new ListGeoTargetsResponse instance using the specified properties. + * Creates a new ListContactsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static - * @param {google.ads.admanager.v1.IListGeoTargetsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse instance + * @param {google.ads.admanager.v1.IListContactsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContactsResponse} ListContactsResponse instance */ - ListGeoTargetsResponse.create = function create(properties) { - return new ListGeoTargetsResponse(properties); + ListContactsResponse.create = function create(properties) { + return new ListContactsResponse(properties); }; /** - * Encodes the specified ListGeoTargetsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * Encodes the specified ListContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContactsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static - * @param {google.ads.admanager.v1.IListGeoTargetsResponse} message ListGeoTargetsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContactsResponse} message ListContactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGeoTargetsResponse.encode = function encode(message, writer) { + ListContactsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.geoTargets != null && message.geoTargets.length) - for (var i = 0; i < message.geoTargets.length; ++i) - $root.google.ads.admanager.v1.GeoTarget.encode(message.geoTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.google.ads.admanager.v1.Contact.encode(message.contacts[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -23949,42 +23574,42 @@ }; /** - * Encodes the specified ListGeoTargetsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * Encodes the specified ListContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContactsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static - * @param {google.ads.admanager.v1.IListGeoTargetsResponse} message ListGeoTargetsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContactsResponse} message ListContactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGeoTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListContactsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGeoTargetsResponse message from the specified reader or buffer. + * Decodes a ListContactsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + * @returns {google.ads.admanager.v1.ListContactsResponse} ListContactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGeoTargetsResponse.decode = function decode(reader, length, error) { + ListContactsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListGeoTargetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContactsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.geoTargets && message.geoTargets.length)) - message.geoTargets = []; - message.geoTargets.push($root.google.ads.admanager.v1.GeoTarget.decode(reader, reader.uint32())); + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.google.ads.admanager.v1.Contact.decode(reader, reader.uint32())); break; } case 2: { @@ -24004,39 +23629,39 @@ }; /** - * Decodes a ListGeoTargetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContactsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + * @returns {google.ads.admanager.v1.ListContactsResponse} ListContactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGeoTargetsResponse.decodeDelimited = function decodeDelimited(reader) { + ListContactsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGeoTargetsResponse message. + * Verifies a ListContactsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGeoTargetsResponse.verify = function verify(message) { + ListContactsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.geoTargets != null && message.hasOwnProperty("geoTargets")) { - if (!Array.isArray(message.geoTargets)) - return "geoTargets: array expected"; - for (var i = 0; i < message.geoTargets.length; ++i) { - var error = $root.google.ads.admanager.v1.GeoTarget.verify(message.geoTargets[i]); + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.google.ads.admanager.v1.Contact.verify(message.contacts[i]); if (error) - return "geoTargets." + error; + return "contacts." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -24049,25 +23674,25 @@ }; /** - * Creates a ListGeoTargetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContactsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + * @returns {google.ads.admanager.v1.ListContactsResponse} ListContactsResponse */ - ListGeoTargetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListGeoTargetsResponse) + ListContactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContactsResponse) return object; - var message = new $root.google.ads.admanager.v1.ListGeoTargetsResponse(); - if (object.geoTargets) { - if (!Array.isArray(object.geoTargets)) - throw TypeError(".google.ads.admanager.v1.ListGeoTargetsResponse.geoTargets: array expected"); - message.geoTargets = []; - for (var i = 0; i < object.geoTargets.length; ++i) { - if (typeof object.geoTargets[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListGeoTargetsResponse.geoTargets: object expected"); - message.geoTargets[i] = $root.google.ads.admanager.v1.GeoTarget.fromObject(object.geoTargets[i]); + var message = new $root.google.ads.admanager.v1.ListContactsResponse(); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".google.ads.admanager.v1.ListContactsResponse.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListContactsResponse.contacts: object expected"); + message.contacts[i] = $root.google.ads.admanager.v1.Contact.fromObject(object.contacts[i]); } } if (object.nextPageToken != null) @@ -24078,28 +23703,28 @@ }; /** - * Creates a plain object from a ListGeoTargetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListContactsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static - * @param {google.ads.admanager.v1.ListGeoTargetsResponse} message ListGeoTargetsResponse + * @param {google.ads.admanager.v1.ListContactsResponse} message ListContactsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGeoTargetsResponse.toObject = function toObject(message, options) { + ListContactsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.geoTargets = []; + object.contacts = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.geoTargets && message.geoTargets.length) { - object.geoTargets = []; - for (var j = 0; j < message.geoTargets.length; ++j) - object.geoTargets[j] = $root.google.ads.admanager.v1.GeoTarget.toObject(message.geoTargets[j], options); + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.google.ads.admanager.v1.Contact.toObject(message.contacts[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -24109,52 +23734,53 @@ }; /** - * Converts this ListGeoTargetsResponse to JSON. + * Converts this ListContactsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @instance * @returns {Object.} JSON object */ - ListGeoTargetsResponse.prototype.toJSON = function toJSON() { + ListContactsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListGeoTargetsResponse + * Gets the default type url for ListContactsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @memberof google.ads.admanager.v1.ListContactsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListGeoTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListGeoTargetsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContactsResponse"; }; - return ListGeoTargetsResponse; + return ListContactsResponse; })(); - v1.Label = (function() { + v1.CreateContactRequest = (function() { /** - * Properties of a Label. + * Properties of a CreateContactRequest. * @memberof google.ads.admanager.v1 - * @interface ILabel - * @property {string|null} [name] Label name + * @interface ICreateContactRequest + * @property {string|null} [parent] CreateContactRequest parent + * @property {google.ads.admanager.v1.IContact|null} [contact] CreateContactRequest contact */ /** - * Constructs a new Label. + * Constructs a new CreateContactRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Label. - * @implements ILabel + * @classdesc Represents a CreateContactRequest. + * @implements ICreateContactRequest * @constructor - * @param {google.ads.admanager.v1.ILabel=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICreateContactRequest=} [properties] Properties to set */ - function Label(properties) { + function CreateContactRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24162,77 +23788,91 @@ } /** - * Label name. - * @member {string} name - * @memberof google.ads.admanager.v1.Label + * CreateContactRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateContactRequest * @instance */ - Label.prototype.name = ""; + CreateContactRequest.prototype.parent = ""; /** - * Creates a new Label instance using the specified properties. + * CreateContactRequest contact. + * @member {google.ads.admanager.v1.IContact|null|undefined} contact + * @memberof google.ads.admanager.v1.CreateContactRequest + * @instance + */ + CreateContactRequest.prototype.contact = null; + + /** + * Creates a new CreateContactRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static - * @param {google.ads.admanager.v1.ILabel=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Label} Label instance + * @param {google.ads.admanager.v1.ICreateContactRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateContactRequest} CreateContactRequest instance */ - Label.create = function create(properties) { - return new Label(properties); + CreateContactRequest.create = function create(properties) { + return new CreateContactRequest(properties); }; /** - * Encodes the specified Label message. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * Encodes the specified CreateContactRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateContactRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static - * @param {google.ads.admanager.v1.ILabel} message Label message or plain object to encode + * @param {google.ads.admanager.v1.ICreateContactRequest} message CreateContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encode = function encode(message, writer) { + CreateContactRequest.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.contact != null && Object.hasOwnProperty.call(message, "contact")) + $root.google.ads.admanager.v1.Contact.encode(message.contact, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * Encodes the specified CreateContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateContactRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static - * @param {google.ads.admanager.v1.ILabel} message Label message or plain object to encode + * @param {google.ads.admanager.v1.ICreateContactRequest} message CreateContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encodeDelimited = function encodeDelimited(message, writer) { + CreateContactRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a CreateContactRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Label} Label + * @returns {google.ads.admanager.v1.CreateContactRequest} CreateContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decode = function decode(reader, length, error) { + CreateContactRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Label(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateContactRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.contact = $root.google.ads.admanager.v1.Contact.decode(reader, reader.uint32()); break; } default: @@ -24244,122 +23884,138 @@ }; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a CreateContactRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Label} Label + * @returns {google.ads.admanager.v1.CreateContactRequest} CreateContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decodeDelimited = function decodeDelimited(reader) { + CreateContactRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Label message. + * Verifies a CreateContactRequest message. * @function verify - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Label.verify = function verify(message) { + CreateContactRequest.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.contact != null && message.hasOwnProperty("contact")) { + var error = $root.google.ads.admanager.v1.Contact.verify(message.contact); + if (error) + return "contact." + error; + } return null; }; /** - * Creates a Label message from a plain object. Also converts values to their respective internal types. + * Creates a CreateContactRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Label} Label + * @returns {google.ads.admanager.v1.CreateContactRequest} CreateContactRequest */ - Label.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Label) + CreateContactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateContactRequest) return object; - var message = new $root.google.ads.admanager.v1.Label(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.CreateContactRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.contact != null) { + if (typeof object.contact !== "object") + throw TypeError(".google.ads.admanager.v1.CreateContactRequest.contact: object expected"); + message.contact = $root.google.ads.admanager.v1.Contact.fromObject(object.contact); + } return message; }; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. + * Creates a plain object from a CreateContactRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static - * @param {google.ads.admanager.v1.Label} message Label + * @param {google.ads.admanager.v1.CreateContactRequest} message CreateContactRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Label.toObject = function toObject(message, options) { + CreateContactRequest.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.contact = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.contact != null && message.hasOwnProperty("contact")) + object.contact = $root.google.ads.admanager.v1.Contact.toObject(message.contact, options); return object; }; /** - * Converts this Label to JSON. + * Converts this CreateContactRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @instance * @returns {Object.} JSON object */ - Label.prototype.toJSON = function toJSON() { + CreateContactRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Label + * Gets the default type url for CreateContactRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.Label + * @memberof google.ads.admanager.v1.CreateContactRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateContactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Label"; + return typeUrlPrefix + "/google.ads.admanager.v1.CreateContactRequest"; }; - return Label; + return CreateContactRequest; })(); - v1.LiveStreamEvent = (function() { + v1.BatchCreateContactsRequest = (function() { /** - * Properties of a LiveStreamEvent. + * Properties of a BatchCreateContactsRequest. * @memberof google.ads.admanager.v1 - * @interface ILiveStreamEvent - * @property {string|null} [name] LiveStreamEvent name + * @interface IBatchCreateContactsRequest + * @property {string|null} [parent] BatchCreateContactsRequest parent + * @property {Array.|null} [requests] BatchCreateContactsRequest requests */ /** - * Constructs a new LiveStreamEvent. + * Constructs a new BatchCreateContactsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a LiveStreamEvent. - * @implements ILiveStreamEvent + * @classdesc Represents a BatchCreateContactsRequest. + * @implements IBatchCreateContactsRequest * @constructor - * @param {google.ads.admanager.v1.ILiveStreamEvent=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest=} [properties] Properties to set */ - function LiveStreamEvent(properties) { + function BatchCreateContactsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24367,77 +24023,94 @@ } /** - * LiveStreamEvent name. - * @member {string} name - * @memberof google.ads.admanager.v1.LiveStreamEvent + * BatchCreateContactsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @instance */ - LiveStreamEvent.prototype.name = ""; + BatchCreateContactsRequest.prototype.parent = ""; /** - * Creates a new LiveStreamEvent instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.LiveStreamEvent + * BatchCreateContactsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest + * @instance + */ + BatchCreateContactsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateContactsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static - * @param {google.ads.admanager.v1.ILiveStreamEvent=} [properties] Properties to set - * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent instance + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateContactsRequest} BatchCreateContactsRequest instance */ - LiveStreamEvent.create = function create(properties) { - return new LiveStreamEvent(properties); + BatchCreateContactsRequest.create = function create(properties) { + return new BatchCreateContactsRequest(properties); }; /** - * Encodes the specified LiveStreamEvent message. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * Encodes the specified BatchCreateContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static - * @param {google.ads.admanager.v1.ILiveStreamEvent} message LiveStreamEvent message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest} message BatchCreateContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveStreamEvent.encode = function encode(message, writer) { + BatchCreateContactsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreateContactRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LiveStreamEvent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * Encodes the specified BatchCreateContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static - * @param {google.ads.admanager.v1.ILiveStreamEvent} message LiveStreamEvent message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateContactsRequest} message BatchCreateContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveStreamEvent.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateContactsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LiveStreamEvent message from the specified reader or buffer. + * Decodes a BatchCreateContactsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + * @returns {google.ads.admanager.v1.BatchCreateContactsRequest} BatchCreateContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveStreamEvent.decode = function decode(reader, length, error) { + BatchCreateContactsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.LiveStreamEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateContactsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreateContactRequest.decode(reader, reader.uint32())); break; } default: @@ -24449,132 +24122,149 @@ }; /** - * Decodes a LiveStreamEvent message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateContactsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + * @returns {google.ads.admanager.v1.BatchCreateContactsRequest} BatchCreateContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveStreamEvent.decodeDelimited = function decodeDelimited(reader) { + BatchCreateContactsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LiveStreamEvent message. + * Verifies a BatchCreateContactsRequest message. * @function verify - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LiveStreamEvent.verify = function verify(message) { + BatchCreateContactsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreateContactRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } return null; }; /** - * Creates a LiveStreamEvent message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateContactsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + * @returns {google.ads.admanager.v1.BatchCreateContactsRequest} BatchCreateContactsRequest */ - LiveStreamEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.LiveStreamEvent) + BatchCreateContactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateContactsRequest) return object; - var message = new $root.google.ads.admanager.v1.LiveStreamEvent(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.BatchCreateContactsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreateContactsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateContactsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreateContactRequest.fromObject(object.requests[i]); + } + } return message; }; /** - * Creates a plain object from a LiveStreamEvent message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateContactsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static - * @param {google.ads.admanager.v1.LiveStreamEvent} message LiveStreamEvent + * @param {google.ads.admanager.v1.BatchCreateContactsRequest} message BatchCreateContactsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LiveStreamEvent.toObject = function toObject(message, options) { + BatchCreateContactsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.requests = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreateContactRequest.toObject(message.requests[j], options); + } return object; }; /** - * Converts this LiveStreamEvent to JSON. + * Converts this BatchCreateContactsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @instance * @returns {Object.} JSON object */ - LiveStreamEvent.prototype.toJSON = function toJSON() { + BatchCreateContactsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LiveStreamEvent + * Gets the default type url for BatchCreateContactsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.LiveStreamEvent + * @memberof google.ads.admanager.v1.BatchCreateContactsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LiveStreamEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateContactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.LiveStreamEvent"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateContactsRequest"; }; - return LiveStreamEvent; + return BatchCreateContactsRequest; })(); - v1.Network = (function() { + v1.BatchCreateContactsResponse = (function() { /** - * Properties of a Network. + * Properties of a BatchCreateContactsResponse. * @memberof google.ads.admanager.v1 - * @interface INetwork - * @property {string|null} [name] Network name - * @property {string|null} [displayName] Network displayName - * @property {string|null} [networkCode] Network networkCode - * @property {string|null} [propertyCode] Network propertyCode - * @property {string|null} [timeZone] Network timeZone - * @property {string|null} [currencyCode] Network currencyCode - * @property {Array.|null} [secondaryCurrencyCodes] Network secondaryCurrencyCodes - * @property {string|null} [effectiveRootAdUnit] Network effectiveRootAdUnit - * @property {boolean|null} [testNetwork] Network testNetwork - * @property {number|Long|null} [networkId] Network networkId + * @interface IBatchCreateContactsResponse + * @property {Array.|null} [contacts] BatchCreateContactsResponse contacts */ /** - * Constructs a new Network. + * Constructs a new BatchCreateContactsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Network. - * @implements INetwork + * @classdesc Represents a BatchCreateContactsResponse. + * @implements IBatchCreateContactsResponse * @constructor - * @param {google.ads.admanager.v1.INetwork=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateContactsResponse=} [properties] Properties to set */ - function Network(properties) { - this.secondaryCurrencyCodes = []; + function BatchCreateContactsResponse(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24582,206 +24272,317 @@ } /** - * Network name. - * @member {string} name - * @memberof google.ads.admanager.v1.Network + * BatchCreateContactsResponse contacts. + * @member {Array.} contacts + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse * @instance */ - Network.prototype.name = ""; + BatchCreateContactsResponse.prototype.contacts = $util.emptyArray; /** - * Network displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.Network - * @instance + * Creates a new BatchCreateContactsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateContactsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateContactsResponse} BatchCreateContactsResponse instance */ - Network.prototype.displayName = ""; + BatchCreateContactsResponse.create = function create(properties) { + return new BatchCreateContactsResponse(properties); + }; /** - * Network networkCode. - * @member {string} networkCode - * @memberof google.ads.admanager.v1.Network - * @instance + * Encodes the specified BatchCreateContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateContactsResponse} message BatchCreateContactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Network.prototype.networkCode = ""; + BatchCreateContactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.google.ads.admanager.v1.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Network propertyCode. - * @member {string} propertyCode - * @memberof google.ads.admanager.v1.Network - * @instance + * Encodes the specified BatchCreateContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateContactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateContactsResponse} message BatchCreateContactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Network.prototype.propertyCode = ""; + BatchCreateContactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Network timeZone. - * @member {string} timeZone - * @memberof google.ads.admanager.v1.Network - * @instance + * Decodes a BatchCreateContactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreateContactsResponse} BatchCreateContactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.prototype.timeZone = ""; + BatchCreateContactsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateContactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.google.ads.admanager.v1.Contact.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Network currencyCode. - * @member {string} currencyCode - * @memberof google.ads.admanager.v1.Network - * @instance + * Decodes a BatchCreateContactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreateContactsResponse} BatchCreateContactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.prototype.currencyCode = ""; + BatchCreateContactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Network secondaryCurrencyCodes. - * @member {Array.} secondaryCurrencyCodes - * @memberof google.ads.admanager.v1.Network - * @instance + * Verifies a BatchCreateContactsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Network.prototype.secondaryCurrencyCodes = $util.emptyArray; + BatchCreateContactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.google.ads.admanager.v1.Contact.verify(message.contacts[i]); + if (error) + return "contacts." + error; + } + } + return null; + }; /** - * Network effectiveRootAdUnit. - * @member {string} effectiveRootAdUnit - * @memberof google.ads.admanager.v1.Network + * Creates a BatchCreateContactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreateContactsResponse} BatchCreateContactsResponse + */ + BatchCreateContactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateContactsResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreateContactsResponse(); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".google.ads.admanager.v1.BatchCreateContactsResponse.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateContactsResponse.contacts: object expected"); + message.contacts[i] = $root.google.ads.admanager.v1.Contact.fromObject(object.contacts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateContactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {google.ads.admanager.v1.BatchCreateContactsResponse} message BatchCreateContactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateContactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contacts = []; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.google.ads.admanager.v1.Contact.toObject(message.contacts[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateContactsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse * @instance + * @returns {Object.} JSON object */ - Network.prototype.effectiveRootAdUnit = ""; + BatchCreateContactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Network testNetwork. - * @member {boolean} testNetwork - * @memberof google.ads.admanager.v1.Network + * Gets the default type url for BatchCreateContactsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreateContactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateContactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateContactsResponse"; + }; + + return BatchCreateContactsResponse; + })(); + + v1.UpdateContactRequest = (function() { + + /** + * Properties of an UpdateContactRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdateContactRequest + * @property {google.ads.admanager.v1.IContact|null} [contact] UpdateContactRequest contact + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContactRequest updateMask + */ + + /** + * Constructs a new UpdateContactRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdateContactRequest. + * @implements IUpdateContactRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdateContactRequest=} [properties] Properties to set + */ + function UpdateContactRequest(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]]; + } + + /** + * UpdateContactRequest contact. + * @member {google.ads.admanager.v1.IContact|null|undefined} contact + * @memberof google.ads.admanager.v1.UpdateContactRequest * @instance */ - Network.prototype.testNetwork = false; + UpdateContactRequest.prototype.contact = null; /** - * Network networkId. - * @member {number|Long} networkId - * @memberof google.ads.admanager.v1.Network + * UpdateContactRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateContactRequest * @instance */ - Network.prototype.networkId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UpdateContactRequest.prototype.updateMask = null; /** - * Creates a new Network instance using the specified properties. + * Creates a new UpdateContactRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static - * @param {google.ads.admanager.v1.INetwork=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Network} Network instance + * @param {google.ads.admanager.v1.IUpdateContactRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateContactRequest} UpdateContactRequest instance */ - Network.create = function create(properties) { - return new Network(properties); + UpdateContactRequest.create = function create(properties) { + return new UpdateContactRequest(properties); }; /** - * Encodes the specified Network message. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * Encodes the specified UpdateContactRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateContactRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static - * @param {google.ads.admanager.v1.INetwork} message Network message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateContactRequest} message UpdateContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Network.encode = function encode(message, writer) { + UpdateContactRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.networkCode != null && Object.hasOwnProperty.call(message, "networkCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkCode); - if (message.propertyCode != null && Object.hasOwnProperty.call(message, "propertyCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.propertyCode); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.currencyCode); - if (message.secondaryCurrencyCodes != null && message.secondaryCurrencyCodes.length) - for (var i = 0; i < message.secondaryCurrencyCodes.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.secondaryCurrencyCodes[i]); - if (message.effectiveRootAdUnit != null && Object.hasOwnProperty.call(message, "effectiveRootAdUnit")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.effectiveRootAdUnit); - if (message.testNetwork != null && Object.hasOwnProperty.call(message, "testNetwork")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.testNetwork); - if (message.networkId != null && Object.hasOwnProperty.call(message, "networkId")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.networkId); + if (message.contact != null && Object.hasOwnProperty.call(message, "contact")) + $root.google.ads.admanager.v1.Contact.encode(message.contact, 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 Network message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * Encodes the specified UpdateContactRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateContactRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static - * @param {google.ads.admanager.v1.INetwork} message Network message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateContactRequest} message UpdateContactRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Network.encodeDelimited = function encodeDelimited(message, writer) { + UpdateContactRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Network message from the specified reader or buffer. + * Decodes an UpdateContactRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Network} Network + * @returns {google.ads.admanager.v1.UpdateContactRequest} UpdateContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.decode = function decode(reader, length, error) { + UpdateContactRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Network(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateContactRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.contact = $root.google.ads.admanager.v1.Contact.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.networkCode = reader.string(); - break; - } - case 4: { - message.propertyCode = reader.string(); - break; - } - case 5: { - message.timeZone = reader.string(); - break; - } - case 6: { - message.currencyCode = reader.string(); - break; - } - case 7: { - if (!(message.secondaryCurrencyCodes && message.secondaryCurrencyCodes.length)) - message.secondaryCurrencyCodes = []; - message.secondaryCurrencyCodes.push(reader.string()); - break; - } - case 8: { - message.effectiveRootAdUnit = reader.string(); - break; - } - case 10: { - message.testNetwork = reader.bool(); - break; - } - case 11: { - message.networkId = reader.int64(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -24793,323 +24594,143 @@ }; /** - * Decodes a Network message from the specified reader or buffer, length delimited. + * Decodes an UpdateContactRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Network} Network + * @returns {google.ads.admanager.v1.UpdateContactRequest} UpdateContactRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.decodeDelimited = function decodeDelimited(reader) { + UpdateContactRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Network message. + * Verifies an UpdateContactRequest message. * @function verify - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Network.verify = function verify(message) { + UpdateContactRequest.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.networkCode != null && message.hasOwnProperty("networkCode")) - if (!$util.isString(message.networkCode)) - return "networkCode: string expected"; - if (message.propertyCode != null && message.hasOwnProperty("propertyCode")) - if (!$util.isString(message.propertyCode)) - return "propertyCode: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.secondaryCurrencyCodes != null && message.hasOwnProperty("secondaryCurrencyCodes")) { - if (!Array.isArray(message.secondaryCurrencyCodes)) - return "secondaryCurrencyCodes: array expected"; - for (var i = 0; i < message.secondaryCurrencyCodes.length; ++i) - if (!$util.isString(message.secondaryCurrencyCodes[i])) - return "secondaryCurrencyCodes: string[] expected"; + if (message.contact != null && message.hasOwnProperty("contact")) { + var error = $root.google.ads.admanager.v1.Contact.verify(message.contact); + if (error) + return "contact." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.effectiveRootAdUnit != null && message.hasOwnProperty("effectiveRootAdUnit")) - if (!$util.isString(message.effectiveRootAdUnit)) - return "effectiveRootAdUnit: string expected"; - if (message.testNetwork != null && message.hasOwnProperty("testNetwork")) - if (typeof message.testNetwork !== "boolean") - return "testNetwork: boolean expected"; - if (message.networkId != null && message.hasOwnProperty("networkId")) - if (!$util.isInteger(message.networkId) && !(message.networkId && $util.isInteger(message.networkId.low) && $util.isInteger(message.networkId.high))) - return "networkId: integer|Long expected"; return null; }; /** - * Creates a Network message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateContactRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Network} Network + * @returns {google.ads.admanager.v1.UpdateContactRequest} UpdateContactRequest */ - Network.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Network) + UpdateContactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateContactRequest) return object; - var message = new $root.google.ads.admanager.v1.Network(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.networkCode != null) - message.networkCode = String(object.networkCode); - if (object.propertyCode != null) - message.propertyCode = String(object.propertyCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.secondaryCurrencyCodes) { - if (!Array.isArray(object.secondaryCurrencyCodes)) - throw TypeError(".google.ads.admanager.v1.Network.secondaryCurrencyCodes: array expected"); - message.secondaryCurrencyCodes = []; - for (var i = 0; i < object.secondaryCurrencyCodes.length; ++i) - message.secondaryCurrencyCodes[i] = String(object.secondaryCurrencyCodes[i]); + var message = new $root.google.ads.admanager.v1.UpdateContactRequest(); + if (object.contact != null) { + if (typeof object.contact !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateContactRequest.contact: object expected"); + message.contact = $root.google.ads.admanager.v1.Contact.fromObject(object.contact); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateContactRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.effectiveRootAdUnit != null) - message.effectiveRootAdUnit = String(object.effectiveRootAdUnit); - if (object.testNetwork != null) - message.testNetwork = Boolean(object.testNetwork); - if (object.networkId != null) - if ($util.Long) - (message.networkId = $util.Long.fromValue(object.networkId)).unsigned = false; - else if (typeof object.networkId === "string") - message.networkId = parseInt(object.networkId, 10); - else if (typeof object.networkId === "number") - message.networkId = object.networkId; - else if (typeof object.networkId === "object") - message.networkId = new $util.LongBits(object.networkId.low >>> 0, object.networkId.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Network message. Also converts values to other types if specified. + * Creates a plain object from an UpdateContactRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static - * @param {google.ads.admanager.v1.Network} message Network + * @param {google.ads.admanager.v1.UpdateContactRequest} message UpdateContactRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Network.toObject = function toObject(message, options) { + UpdateContactRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.secondaryCurrencyCodes = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.networkCode = ""; - object.propertyCode = ""; - object.timeZone = ""; - object.currencyCode = ""; - object.effectiveRootAdUnit = ""; - object.testNetwork = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.networkId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.networkId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.networkCode != null && message.hasOwnProperty("networkCode")) - object.networkCode = message.networkCode; - if (message.propertyCode != null && message.hasOwnProperty("propertyCode")) - object.propertyCode = message.propertyCode; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.secondaryCurrencyCodes && message.secondaryCurrencyCodes.length) { - object.secondaryCurrencyCodes = []; - for (var j = 0; j < message.secondaryCurrencyCodes.length; ++j) - object.secondaryCurrencyCodes[j] = message.secondaryCurrencyCodes[j]; + object.contact = null; + object.updateMask = null; } - if (message.effectiveRootAdUnit != null && message.hasOwnProperty("effectiveRootAdUnit")) - object.effectiveRootAdUnit = message.effectiveRootAdUnit; - if (message.testNetwork != null && message.hasOwnProperty("testNetwork")) - object.testNetwork = message.testNetwork; - if (message.networkId != null && message.hasOwnProperty("networkId")) - if (typeof message.networkId === "number") - object.networkId = options.longs === String ? String(message.networkId) : message.networkId; - else - object.networkId = options.longs === String ? $util.Long.prototype.toString.call(message.networkId) : options.longs === Number ? new $util.LongBits(message.networkId.low >>> 0, message.networkId.high >>> 0).toNumber() : message.networkId; + if (message.contact != null && message.hasOwnProperty("contact")) + object.contact = $root.google.ads.admanager.v1.Contact.toObject(message.contact, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this Network to JSON. + * Converts this UpdateContactRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @instance * @returns {Object.} JSON object */ - Network.prototype.toJSON = function toJSON() { + UpdateContactRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Network + * Gets the default type url for UpdateContactRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.Network + * @memberof google.ads.admanager.v1.UpdateContactRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Network.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateContactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Network"; + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateContactRequest"; }; - return Network; + return UpdateContactRequest; })(); - v1.NetworkService = (function() { + v1.BatchUpdateContactsRequest = (function() { /** - * Constructs a new NetworkService service. + * Properties of a BatchUpdateContactsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a NetworkService - * @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 IBatchUpdateContactsRequest + * @property {string|null} [parent] BatchUpdateContactsRequest parent + * @property {Array.|null} [requests] BatchUpdateContactsRequest requests */ - function NetworkService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (NetworkService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetworkService; - - /** - * Creates new NetworkService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.NetworkService - * @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 {NetworkService} RPC service. Useful where requests and/or responses are streamed. - */ - NetworkService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.NetworkService|getNetwork}. - * @memberof google.ads.admanager.v1.NetworkService - * @typedef GetNetworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Network} [response] Network - */ - - /** - * Calls GetNetwork. - * @function getNetwork - * @memberof google.ads.admanager.v1.NetworkService - * @instance - * @param {google.ads.admanager.v1.IGetNetworkRequest} request GetNetworkRequest message or plain object - * @param {google.ads.admanager.v1.NetworkService.GetNetworkCallback} callback Node-style callback called with the error, if any, and Network - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetworkService.prototype.getNetwork = function getNetwork(request, callback) { - return this.rpcCall(getNetwork, $root.google.ads.admanager.v1.GetNetworkRequest, $root.google.ads.admanager.v1.Network, request, callback); - }, "name", { value: "GetNetwork" }); - - /** - * Calls GetNetwork. - * @function getNetwork - * @memberof google.ads.admanager.v1.NetworkService - * @instance - * @param {google.ads.admanager.v1.IGetNetworkRequest} request GetNetworkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.NetworkService|listNetworks}. - * @memberof google.ads.admanager.v1.NetworkService - * @typedef ListNetworksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListNetworksResponse} [response] ListNetworksResponse - */ - - /** - * Calls ListNetworks. - * @function listNetworks - * @memberof google.ads.admanager.v1.NetworkService - * @instance - * @param {google.ads.admanager.v1.IListNetworksRequest} request ListNetworksRequest message or plain object - * @param {google.ads.admanager.v1.NetworkService.ListNetworksCallback} callback Node-style callback called with the error, if any, and ListNetworksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetworkService.prototype.listNetworks = function listNetworks(request, callback) { - return this.rpcCall(listNetworks, $root.google.ads.admanager.v1.ListNetworksRequest, $root.google.ads.admanager.v1.ListNetworksResponse, request, callback); - }, "name", { value: "ListNetworks" }); - - /** - * Calls ListNetworks. - * @function listNetworks - * @memberof google.ads.admanager.v1.NetworkService - * @instance - * @param {google.ads.admanager.v1.IListNetworksRequest} request ListNetworksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return NetworkService; - })(); - - v1.GetNetworkRequest = (function() { /** - * Properties of a GetNetworkRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetNetworkRequest - * @property {string|null} [name] GetNetworkRequest name - */ - - /** - * Constructs a new GetNetworkRequest. + * Constructs a new BatchUpdateContactsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetNetworkRequest. - * @implements IGetNetworkRequest + * @classdesc Represents a BatchUpdateContactsRequest. + * @implements IBatchUpdateContactsRequest * @constructor - * @param {google.ads.admanager.v1.IGetNetworkRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest=} [properties] Properties to set */ - function GetNetworkRequest(properties) { + function BatchUpdateContactsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25117,77 +24738,94 @@ } /** - * GetNetworkRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetNetworkRequest + * BatchUpdateContactsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @instance */ - GetNetworkRequest.prototype.name = ""; + BatchUpdateContactsRequest.prototype.parent = ""; /** - * Creates a new GetNetworkRequest instance using the specified properties. + * BatchUpdateContactsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest + * @instance + */ + BatchUpdateContactsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdateContactsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static - * @param {google.ads.admanager.v1.IGetNetworkRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest instance + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateContactsRequest} BatchUpdateContactsRequest instance */ - GetNetworkRequest.create = function create(properties) { - return new GetNetworkRequest(properties); + BatchUpdateContactsRequest.create = function create(properties) { + return new BatchUpdateContactsRequest(properties); }; /** - * Encodes the specified GetNetworkRequest message. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * Encodes the specified BatchUpdateContactsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static - * @param {google.ads.admanager.v1.IGetNetworkRequest} message GetNetworkRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest} message BatchUpdateContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNetworkRequest.encode = function encode(message, writer) { + BatchUpdateContactsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdateContactRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetNetworkRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * Encodes the specified BatchUpdateContactsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static - * @param {google.ads.admanager.v1.IGetNetworkRequest} message GetNetworkRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateContactsRequest} message BatchUpdateContactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNetworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateContactsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNetworkRequest message from the specified reader or buffer. + * Decodes a BatchUpdateContactsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsRequest} BatchUpdateContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNetworkRequest.decode = function decode(reader, length, error) { + BatchUpdateContactsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetNetworkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateContactsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdateContactRequest.decode(reader, reader.uint32())); break; } default: @@ -25199,121 +24837,149 @@ }; /** - * Decodes a GetNetworkRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateContactsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsRequest} BatchUpdateContactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNetworkRequest.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateContactsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNetworkRequest message. + * Verifies a BatchUpdateContactsRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNetworkRequest.verify = function verify(message) { + BatchUpdateContactsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdateContactRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } return null; }; /** - * Creates a GetNetworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateContactsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsRequest} BatchUpdateContactsRequest */ - GetNetworkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetNetworkRequest) + BatchUpdateContactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateContactsRequest) return object; - var message = new $root.google.ads.admanager.v1.GetNetworkRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.BatchUpdateContactsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateContactsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateContactsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdateContactRequest.fromObject(object.requests[i]); + } + } return message; }; /** - * Creates a plain object from a GetNetworkRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateContactsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static - * @param {google.ads.admanager.v1.GetNetworkRequest} message GetNetworkRequest + * @param {google.ads.admanager.v1.BatchUpdateContactsRequest} message BatchUpdateContactsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNetworkRequest.toObject = function toObject(message, options) { + BatchUpdateContactsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.requests = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdateContactRequest.toObject(message.requests[j], options); + } return object; }; /** - * Converts this GetNetworkRequest to JSON. + * Converts this BatchUpdateContactsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @instance * @returns {Object.} JSON object */ - GetNetworkRequest.prototype.toJSON = function toJSON() { + BatchUpdateContactsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetNetworkRequest + * Gets the default type url for BatchUpdateContactsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetNetworkRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetNetworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateContactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetNetworkRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateContactsRequest"; }; - return GetNetworkRequest; + return BatchUpdateContactsRequest; })(); - v1.ListNetworksRequest = (function() { + v1.BatchUpdateContactsResponse = (function() { /** - * Properties of a ListNetworksRequest. + * Properties of a BatchUpdateContactsResponse. * @memberof google.ads.admanager.v1 - * @interface IListNetworksRequest + * @interface IBatchUpdateContactsResponse + * @property {Array.|null} [contacts] BatchUpdateContactsResponse contacts */ /** - * Constructs a new ListNetworksRequest. + * Constructs a new BatchUpdateContactsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListNetworksRequest. - * @implements IListNetworksRequest + * @classdesc Represents a BatchUpdateContactsResponse. + * @implements IBatchUpdateContactsResponse * @constructor - * @param {google.ads.admanager.v1.IListNetworksRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateContactsResponse=} [properties] Properties to set */ - function ListNetworksRequest(properties) { + function BatchUpdateContactsResponse(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25321,65 +24987,82 @@ } /** - * Creates a new ListNetworksRequest instance using the specified properties. + * BatchUpdateContactsResponse contacts. + * @member {Array.} contacts + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse + * @instance + */ + BatchUpdateContactsResponse.prototype.contacts = $util.emptyArray; + + /** + * Creates a new BatchUpdateContactsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static - * @param {google.ads.admanager.v1.IListNetworksRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest instance + * @param {google.ads.admanager.v1.IBatchUpdateContactsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateContactsResponse} BatchUpdateContactsResponse instance */ - ListNetworksRequest.create = function create(properties) { - return new ListNetworksRequest(properties); + BatchUpdateContactsResponse.create = function create(properties) { + return new BatchUpdateContactsResponse(properties); }; /** - * Encodes the specified ListNetworksRequest message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * Encodes the specified BatchUpdateContactsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static - * @param {google.ads.admanager.v1.IListNetworksRequest} message ListNetworksRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateContactsResponse} message BatchUpdateContactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNetworksRequest.encode = function encode(message, writer) { + BatchUpdateContactsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.google.ads.admanager.v1.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNetworksRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * Encodes the specified BatchUpdateContactsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateContactsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static - * @param {google.ads.admanager.v1.IListNetworksRequest} message ListNetworksRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateContactsResponse} message BatchUpdateContactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateContactsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNetworksRequest message from the specified reader or buffer. + * Decodes a BatchUpdateContactsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsResponse} BatchUpdateContactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNetworksRequest.decode = function decode(reader, length, error) { + BatchUpdateContactsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListNetworksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateContactsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.google.ads.admanager.v1.Contact.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -25389,110 +25072,140 @@ }; /** - * Decodes a ListNetworksRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateContactsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsResponse} BatchUpdateContactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNetworksRequest.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateContactsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNetworksRequest message. + * Verifies a BatchUpdateContactsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNetworksRequest.verify = function verify(message) { + BatchUpdateContactsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.google.ads.admanager.v1.Contact.verify(message.contacts[i]); + if (error) + return "contacts." + error; + } + } return null; }; /** - * Creates a ListNetworksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateContactsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + * @returns {google.ads.admanager.v1.BatchUpdateContactsResponse} BatchUpdateContactsResponse */ - ListNetworksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListNetworksRequest) + BatchUpdateContactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateContactsResponse) return object; - return new $root.google.ads.admanager.v1.ListNetworksRequest(); + var message = new $root.google.ads.admanager.v1.BatchUpdateContactsResponse(); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateContactsResponse.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateContactsResponse.contacts: object expected"); + message.contacts[i] = $root.google.ads.admanager.v1.Contact.fromObject(object.contacts[i]); + } + } + return message; }; /** - * Creates a plain object from a ListNetworksRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateContactsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static - * @param {google.ads.admanager.v1.ListNetworksRequest} message ListNetworksRequest + * @param {google.ads.admanager.v1.BatchUpdateContactsResponse} message BatchUpdateContactsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNetworksRequest.toObject = function toObject() { - return {}; + BatchUpdateContactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contacts = []; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.google.ads.admanager.v1.Contact.toObject(message.contacts[j], options); + } + return object; }; /** - * Converts this ListNetworksRequest to JSON. + * Converts this BatchUpdateContactsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @instance * @returns {Object.} JSON object */ - ListNetworksRequest.prototype.toJSON = function toJSON() { + BatchUpdateContactsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListNetworksRequest + * Gets the default type url for BatchUpdateContactsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListNetworksRequest + * @memberof google.ads.admanager.v1.BatchUpdateContactsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListNetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateContactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListNetworksRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateContactsResponse"; }; - return ListNetworksRequest; + return BatchUpdateContactsResponse; })(); - v1.ListNetworksResponse = (function() { + v1.ContentBundle = (function() { /** - * Properties of a ListNetworksResponse. + * Properties of a ContentBundle. * @memberof google.ads.admanager.v1 - * @interface IListNetworksResponse - * @property {Array.|null} [networks] ListNetworksResponse networks + * @interface IContentBundle + * @property {string|null} [name] ContentBundle name + * @property {string|null} [displayName] ContentBundle displayName */ /** - * Constructs a new ListNetworksResponse. + * Constructs a new ContentBundle. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListNetworksResponse. - * @implements IListNetworksResponse + * @classdesc Represents a ContentBundle. + * @implements IContentBundle * @constructor - * @param {google.ads.admanager.v1.IListNetworksResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IContentBundle=} [properties] Properties to set */ - function ListNetworksResponse(properties) { - this.networks = []; + function ContentBundle(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25500,80 +25213,91 @@ } /** - * ListNetworksResponse networks. - * @member {Array.} networks - * @memberof google.ads.admanager.v1.ListNetworksResponse + * ContentBundle name. + * @member {string} name + * @memberof google.ads.admanager.v1.ContentBundle * @instance */ - ListNetworksResponse.prototype.networks = $util.emptyArray; + ContentBundle.prototype.name = ""; /** - * Creates a new ListNetworksResponse instance using the specified properties. + * ContentBundle displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.ContentBundle + * @instance + */ + ContentBundle.prototype.displayName = ""; + + /** + * Creates a new ContentBundle instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static - * @param {google.ads.admanager.v1.IListNetworksResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse instance + * @param {google.ads.admanager.v1.IContentBundle=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ContentBundle} ContentBundle instance */ - ListNetworksResponse.create = function create(properties) { - return new ListNetworksResponse(properties); + ContentBundle.create = function create(properties) { + return new ContentBundle(properties); }; /** - * Encodes the specified ListNetworksResponse message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * Encodes the specified ContentBundle message. Does not implicitly {@link google.ads.admanager.v1.ContentBundle.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static - * @param {google.ads.admanager.v1.IListNetworksResponse} message ListNetworksResponse message or plain object to encode + * @param {google.ads.admanager.v1.IContentBundle} message ContentBundle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNetworksResponse.encode = function encode(message, writer) { + ContentBundle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.networks != null && message.networks.length) - for (var i = 0; i < message.networks.length; ++i) - $root.google.ads.admanager.v1.Network.encode(message.networks[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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); return writer; }; /** - * Encodes the specified ListNetworksResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * Encodes the specified ContentBundle message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentBundle.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static - * @param {google.ads.admanager.v1.IListNetworksResponse} message ListNetworksResponse message or plain object to encode + * @param {google.ads.admanager.v1.IContentBundle} message ContentBundle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { + ContentBundle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNetworksResponse message from the specified reader or buffer. + * Decodes a ContentBundle message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + * @returns {google.ads.admanager.v1.ContentBundle} ContentBundle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNetworksResponse.decode = function decode(reader, length, error) { + ContentBundle.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListNetworksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ContentBundle(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.networks && message.networks.length)) - message.networks = []; - message.networks.push($root.google.ads.admanager.v1.Network.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); break; } default: @@ -25585,140 +25309,232 @@ }; /** - * Decodes a ListNetworksResponse message from the specified reader or buffer, length delimited. + * Decodes a ContentBundle message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + * @returns {google.ads.admanager.v1.ContentBundle} ContentBundle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNetworksResponse.decodeDelimited = function decodeDelimited(reader) { + ContentBundle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNetworksResponse message. + * Verifies a ContentBundle message. * @function verify - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNetworksResponse.verify = function verify(message) { + ContentBundle.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.networks != null && message.hasOwnProperty("networks")) { - if (!Array.isArray(message.networks)) - return "networks: array expected"; - for (var i = 0; i < message.networks.length; ++i) { - var error = $root.google.ads.admanager.v1.Network.verify(message.networks[i]); - if (error) - return "networks." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a ListNetworksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContentBundle message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + * @returns {google.ads.admanager.v1.ContentBundle} ContentBundle */ - ListNetworksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListNetworksResponse) + ContentBundle.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ContentBundle) return object; - var message = new $root.google.ads.admanager.v1.ListNetworksResponse(); - if (object.networks) { - if (!Array.isArray(object.networks)) - throw TypeError(".google.ads.admanager.v1.ListNetworksResponse.networks: array expected"); - message.networks = []; - for (var i = 0; i < object.networks.length; ++i) { - if (typeof object.networks[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListNetworksResponse.networks: object expected"); - message.networks[i] = $root.google.ads.admanager.v1.Network.fromObject(object.networks[i]); - } - } + var message = new $root.google.ads.admanager.v1.ContentBundle(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a ListNetworksResponse message. Also converts values to other types if specified. + * Creates a plain object from a ContentBundle message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static - * @param {google.ads.admanager.v1.ListNetworksResponse} message ListNetworksResponse + * @param {google.ads.admanager.v1.ContentBundle} message ContentBundle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNetworksResponse.toObject = function toObject(message, options) { + ContentBundle.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.networks = []; - if (message.networks && message.networks.length) { - object.networks = []; - for (var j = 0; j < message.networks.length; ++j) - object.networks[j] = $root.google.ads.admanager.v1.Network.toObject(message.networks[j], options); + if (options.defaults) { + object.name = ""; + object.displayName = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this ListNetworksResponse to JSON. + * Converts this ContentBundle to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @instance * @returns {Object.} JSON object */ - ListNetworksResponse.prototype.toJSON = function toJSON() { + ContentBundle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListNetworksResponse + * Gets the default type url for ContentBundle * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListNetworksResponse + * @memberof google.ads.admanager.v1.ContentBundle * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListNetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContentBundle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListNetworksResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ContentBundle"; }; - return ListNetworksResponse; + return ContentBundle; })(); - v1.OperatingSystem = (function() { + v1.ContentBundleService = (function() { /** - * Properties of an OperatingSystem. + * Constructs a new ContentBundleService service. * @memberof google.ads.admanager.v1 - * @interface IOperatingSystem - * @property {string|null} [name] OperatingSystem name - * @property {string|null} [displayName] OperatingSystem displayName + * @classdesc Represents a ContentBundleService + * @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 ContentBundleService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ContentBundleService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentBundleService; /** - * Constructs a new OperatingSystem. + * Creates new ContentBundleService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.ContentBundleService + * @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 {ContentBundleService} RPC service. Useful where requests and/or responses are streamed. + */ + ContentBundleService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.ContentBundleService|getContentBundle}. + * @memberof google.ads.admanager.v1.ContentBundleService + * @typedef GetContentBundleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ContentBundle} [response] ContentBundle + */ + + /** + * Calls GetContentBundle. + * @function getContentBundle + * @memberof google.ads.admanager.v1.ContentBundleService + * @instance + * @param {google.ads.admanager.v1.IGetContentBundleRequest} request GetContentBundleRequest message or plain object + * @param {google.ads.admanager.v1.ContentBundleService.GetContentBundleCallback} callback Node-style callback called with the error, if any, and ContentBundle + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentBundleService.prototype.getContentBundle = function getContentBundle(request, callback) { + return this.rpcCall(getContentBundle, $root.google.ads.admanager.v1.GetContentBundleRequest, $root.google.ads.admanager.v1.ContentBundle, request, callback); + }, "name", { value: "GetContentBundle" }); + + /** + * Calls GetContentBundle. + * @function getContentBundle + * @memberof google.ads.admanager.v1.ContentBundleService + * @instance + * @param {google.ads.admanager.v1.IGetContentBundleRequest} request GetContentBundleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ContentBundleService|listContentBundles}. + * @memberof google.ads.admanager.v1.ContentBundleService + * @typedef ListContentBundlesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListContentBundlesResponse} [response] ListContentBundlesResponse + */ + + /** + * Calls ListContentBundles. + * @function listContentBundles + * @memberof google.ads.admanager.v1.ContentBundleService + * @instance + * @param {google.ads.admanager.v1.IListContentBundlesRequest} request ListContentBundlesRequest message or plain object + * @param {google.ads.admanager.v1.ContentBundleService.ListContentBundlesCallback} callback Node-style callback called with the error, if any, and ListContentBundlesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentBundleService.prototype.listContentBundles = function listContentBundles(request, callback) { + return this.rpcCall(listContentBundles, $root.google.ads.admanager.v1.ListContentBundlesRequest, $root.google.ads.admanager.v1.ListContentBundlesResponse, request, callback); + }, "name", { value: "ListContentBundles" }); + + /** + * Calls ListContentBundles. + * @function listContentBundles + * @memberof google.ads.admanager.v1.ContentBundleService + * @instance + * @param {google.ads.admanager.v1.IListContentBundlesRequest} request ListContentBundlesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ContentBundleService; + })(); + + v1.GetContentBundleRequest = (function() { + + /** + * Properties of a GetContentBundleRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OperatingSystem. - * @implements IOperatingSystem + * @interface IGetContentBundleRequest + * @property {string|null} [name] GetContentBundleRequest name + */ + + /** + * Constructs a new GetContentBundleRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetContentBundleRequest. + * @implements IGetContentBundleRequest * @constructor - * @param {google.ads.admanager.v1.IOperatingSystem=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetContentBundleRequest=} [properties] Properties to set */ - function OperatingSystem(properties) { + function GetContentBundleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25726,89 +25542,70 @@ } /** - * OperatingSystem name. + * GetContentBundleRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.OperatingSystem - * @instance - */ - OperatingSystem.prototype.name = ""; - - /** - * OperatingSystem displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @instance */ - OperatingSystem.prototype.displayName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(OperatingSystem.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetContentBundleRequest.prototype.name = ""; /** - * Creates a new OperatingSystem instance using the specified properties. + * Creates a new GetContentBundleRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static - * @param {google.ads.admanager.v1.IOperatingSystem=} [properties] Properties to set - * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem instance + * @param {google.ads.admanager.v1.IGetContentBundleRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetContentBundleRequest} GetContentBundleRequest instance */ - OperatingSystem.create = function create(properties) { - return new OperatingSystem(properties); + GetContentBundleRequest.create = function create(properties) { + return new GetContentBundleRequest(properties); }; /** - * Encodes the specified OperatingSystem message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * Encodes the specified GetContentBundleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentBundleRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static - * @param {google.ads.admanager.v1.IOperatingSystem} message OperatingSystem message or plain object to encode + * @param {google.ads.admanager.v1.IGetContentBundleRequest} message GetContentBundleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystem.encode = function encode(message, writer) { + GetContentBundleRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified OperatingSystem message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * Encodes the specified GetContentBundleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentBundleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static - * @param {google.ads.admanager.v1.IOperatingSystem} message OperatingSystem message or plain object to encode + * @param {google.ads.admanager.v1.IGetContentBundleRequest} message GetContentBundleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystem.encodeDelimited = function encodeDelimited(message, writer) { + GetContentBundleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperatingSystem message from the specified reader or buffer. + * Decodes a GetContentBundleRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem + * @returns {google.ads.admanager.v1.GetContentBundleRequest} GetContentBundleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystem.decode = function decode(reader, length, error) { + GetContentBundleRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystem(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetContentBundleRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -25818,10 +25615,6 @@ message.name = reader.string(); break; } - case 2: { - message.displayName = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -25831,349 +25624,30 @@ }; /** - * Decodes an OperatingSystem message from the specified reader or buffer, length delimited. + * Decodes a GetContentBundleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystem + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem + * @returns {google.ads.admanager.v1.GetContentBundleRequest} GetContentBundleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperatingSystem message. - * @function verify - * @memberof google.ads.admanager.v1.OperatingSystem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperatingSystem.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.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - return null; - }; - - /** - * Creates an OperatingSystem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.OperatingSystem - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem - */ - OperatingSystem.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.OperatingSystem) - return object; - var message = new $root.google.ads.admanager.v1.OperatingSystem(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an OperatingSystem message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.OperatingSystem - * @static - * @param {google.ads.admanager.v1.OperatingSystem} message OperatingSystem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperatingSystem.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 (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - return object; - }; - - /** - * Converts this OperatingSystem to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.OperatingSystem - * @instance - * @returns {Object.} JSON object - */ - OperatingSystem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperatingSystem - * @function getTypeUrl - * @memberof google.ads.admanager.v1.OperatingSystem - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperatingSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystem"; - }; - - return OperatingSystem; - })(); - - v1.OperatingSystemService = (function() { - - /** - * Constructs a new OperatingSystemService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents an OperatingSystemService - * @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 OperatingSystemService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (OperatingSystemService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OperatingSystemService; - - /** - * Creates new OperatingSystemService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.OperatingSystemService - * @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 {OperatingSystemService} RPC service. Useful where requests and/or responses are streamed. - */ - OperatingSystemService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|getOperatingSystem}. - * @memberof google.ads.admanager.v1.OperatingSystemService - * @typedef GetOperatingSystemCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.OperatingSystem} [response] OperatingSystem - */ - - /** - * Calls GetOperatingSystem. - * @function getOperatingSystem - * @memberof google.ads.admanager.v1.OperatingSystemService - * @instance - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} request GetOperatingSystemRequest message or plain object - * @param {google.ads.admanager.v1.OperatingSystemService.GetOperatingSystemCallback} callback Node-style callback called with the error, if any, and OperatingSystem - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OperatingSystemService.prototype.getOperatingSystem = function getOperatingSystem(request, callback) { - return this.rpcCall(getOperatingSystem, $root.google.ads.admanager.v1.GetOperatingSystemRequest, $root.google.ads.admanager.v1.OperatingSystem, request, callback); - }, "name", { value: "GetOperatingSystem" }); - - /** - * Calls GetOperatingSystem. - * @function getOperatingSystem - * @memberof google.ads.admanager.v1.OperatingSystemService - * @instance - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} request GetOperatingSystemRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|listOperatingSystems}. - * @memberof google.ads.admanager.v1.OperatingSystemService - * @typedef ListOperatingSystemsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListOperatingSystemsResponse} [response] ListOperatingSystemsResponse - */ - - /** - * Calls ListOperatingSystems. - * @function listOperatingSystems - * @memberof google.ads.admanager.v1.OperatingSystemService - * @instance - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} request ListOperatingSystemsRequest message or plain object - * @param {google.ads.admanager.v1.OperatingSystemService.ListOperatingSystemsCallback} callback Node-style callback called with the error, if any, and ListOperatingSystemsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OperatingSystemService.prototype.listOperatingSystems = function listOperatingSystems(request, callback) { - return this.rpcCall(listOperatingSystems, $root.google.ads.admanager.v1.ListOperatingSystemsRequest, $root.google.ads.admanager.v1.ListOperatingSystemsResponse, request, callback); - }, "name", { value: "ListOperatingSystems" }); - - /** - * Calls ListOperatingSystems. - * @function listOperatingSystems - * @memberof google.ads.admanager.v1.OperatingSystemService - * @instance - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} request ListOperatingSystemsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return OperatingSystemService; - })(); - - v1.GetOperatingSystemRequest = (function() { - - /** - * Properties of a GetOperatingSystemRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetOperatingSystemRequest - * @property {string|null} [name] GetOperatingSystemRequest name - */ - - /** - * Constructs a new GetOperatingSystemRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetOperatingSystemRequest. - * @implements IGetOperatingSystemRequest - * @constructor - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest=} [properties] Properties to set - */ - function GetOperatingSystemRequest(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]]; - } - - /** - * GetOperatingSystemRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @instance - */ - GetOperatingSystemRequest.prototype.name = ""; - - /** - * Creates a new GetOperatingSystemRequest instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest instance - */ - GetOperatingSystemRequest.create = function create(properties) { - return new GetOperatingSystemRequest(properties); - }; - - /** - * Encodes the specified GetOperatingSystemRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} message GetOperatingSystemRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperatingSystemRequest.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 GetOperatingSystemRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} message GetOperatingSystemRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperatingSystemRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperatingSystemRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperatingSystemRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOperatingSystemRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperatingSystemRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperatingSystemRequest.decodeDelimited = function decodeDelimited(reader) { + GetContentBundleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOperatingSystemRequest message. + * Verifies a GetContentBundleRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOperatingSystemRequest.verify = function verify(message) { + GetContentBundleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -26183,32 +25657,32 @@ }; /** - * Creates a GetOperatingSystemRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentBundleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest + * @returns {google.ads.admanager.v1.GetContentBundleRequest} GetContentBundleRequest */ - GetOperatingSystemRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetOperatingSystemRequest) + GetContentBundleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetContentBundleRequest) return object; - var message = new $root.google.ads.admanager.v1.GetOperatingSystemRequest(); + var message = new $root.google.ads.admanager.v1.GetContentBundleRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetOperatingSystemRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetContentBundleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static - * @param {google.ads.admanager.v1.GetOperatingSystemRequest} message GetOperatingSystemRequest + * @param {google.ads.admanager.v1.GetContentBundleRequest} message GetContentBundleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperatingSystemRequest.toObject = function toObject(message, options) { + GetContentBundleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -26220,57 +25694,57 @@ }; /** - * Converts this GetOperatingSystemRequest to JSON. + * Converts this GetContentBundleRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @instance * @returns {Object.} JSON object */ - GetOperatingSystemRequest.prototype.toJSON = function toJSON() { + GetContentBundleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOperatingSystemRequest + * Gets the default type url for GetContentBundleRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @memberof google.ads.admanager.v1.GetContentBundleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOperatingSystemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContentBundleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetOperatingSystemRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetContentBundleRequest"; }; - return GetOperatingSystemRequest; + return GetContentBundleRequest; })(); - v1.ListOperatingSystemsRequest = (function() { + v1.ListContentBundlesRequest = (function() { /** - * Properties of a ListOperatingSystemsRequest. + * Properties of a ListContentBundlesRequest. * @memberof google.ads.admanager.v1 - * @interface IListOperatingSystemsRequest - * @property {string|null} [parent] ListOperatingSystemsRequest parent - * @property {number|null} [pageSize] ListOperatingSystemsRequest pageSize - * @property {string|null} [pageToken] ListOperatingSystemsRequest pageToken - * @property {string|null} [filter] ListOperatingSystemsRequest filter - * @property {string|null} [orderBy] ListOperatingSystemsRequest orderBy - * @property {number|null} [skip] ListOperatingSystemsRequest skip + * @interface IListContentBundlesRequest + * @property {string|null} [parent] ListContentBundlesRequest parent + * @property {number|null} [pageSize] ListContentBundlesRequest pageSize + * @property {string|null} [pageToken] ListContentBundlesRequest pageToken + * @property {string|null} [filter] ListContentBundlesRequest filter + * @property {string|null} [orderBy] ListContentBundlesRequest orderBy + * @property {number|null} [skip] ListContentBundlesRequest skip */ /** - * Constructs a new ListOperatingSystemsRequest. + * Constructs a new ListContentBundlesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOperatingSystemsRequest. - * @implements IListOperatingSystemsRequest + * @classdesc Represents a ListContentBundlesRequest. + * @implements IListContentBundlesRequest * @constructor - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContentBundlesRequest=} [properties] Properties to set */ - function ListOperatingSystemsRequest(properties) { + function ListContentBundlesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26278,75 +25752,75 @@ } /** - * ListOperatingSystemsRequest parent. + * ListContentBundlesRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.parent = ""; + ListContentBundlesRequest.prototype.parent = ""; /** - * ListOperatingSystemsRequest pageSize. + * ListContentBundlesRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.pageSize = 0; + ListContentBundlesRequest.prototype.pageSize = 0; /** - * ListOperatingSystemsRequest pageToken. + * ListContentBundlesRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.pageToken = ""; + ListContentBundlesRequest.prototype.pageToken = ""; /** - * ListOperatingSystemsRequest filter. + * ListContentBundlesRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.filter = ""; + ListContentBundlesRequest.prototype.filter = ""; /** - * ListOperatingSystemsRequest orderBy. + * ListContentBundlesRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.orderBy = ""; + ListContentBundlesRequest.prototype.orderBy = ""; /** - * ListOperatingSystemsRequest skip. + * ListContentBundlesRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance */ - ListOperatingSystemsRequest.prototype.skip = 0; + ListContentBundlesRequest.prototype.skip = 0; /** - * Creates a new ListOperatingSystemsRequest instance using the specified properties. + * Creates a new ListContentBundlesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest instance + * @param {google.ads.admanager.v1.IListContentBundlesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentBundlesRequest} ListContentBundlesRequest instance */ - ListOperatingSystemsRequest.create = function create(properties) { - return new ListOperatingSystemsRequest(properties); + ListContentBundlesRequest.create = function create(properties) { + return new ListContentBundlesRequest(properties); }; /** - * Encodes the specified ListOperatingSystemsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * Encodes the specified ListContentBundlesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} message ListOperatingSystemsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContentBundlesRequest} message ListContentBundlesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemsRequest.encode = function encode(message, writer) { + ListContentBundlesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -26365,33 +25839,33 @@ }; /** - * Encodes the specified ListOperatingSystemsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * Encodes the specified ListContentBundlesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} message ListOperatingSystemsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContentBundlesRequest} message ListContentBundlesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListContentBundlesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer. + * Decodes a ListContentBundlesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + * @returns {google.ads.admanager.v1.ListContentBundlesRequest} ListContentBundlesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemsRequest.decode = function decode(reader, length, error) { + ListContentBundlesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentBundlesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -26430,30 +25904,30 @@ }; /** - * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentBundlesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + * @returns {google.ads.admanager.v1.ListContentBundlesRequest} ListContentBundlesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemsRequest.decodeDelimited = function decodeDelimited(reader) { + ListContentBundlesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOperatingSystemsRequest message. + * Verifies a ListContentBundlesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOperatingSystemsRequest.verify = function verify(message) { + ListContentBundlesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -26478,17 +25952,17 @@ }; /** - * Creates a ListOperatingSystemsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentBundlesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + * @returns {google.ads.admanager.v1.ListContentBundlesRequest} ListContentBundlesRequest */ - ListOperatingSystemsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemsRequest) + ListContentBundlesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentBundlesRequest) return object; - var message = new $root.google.ads.admanager.v1.ListOperatingSystemsRequest(); + var message = new $root.google.ads.admanager.v1.ListContentBundlesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -26505,15 +25979,15 @@ }; /** - * Creates a plain object from a ListOperatingSystemsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListContentBundlesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static - * @param {google.ads.admanager.v1.ListOperatingSystemsRequest} message ListOperatingSystemsRequest + * @param {google.ads.admanager.v1.ListContentBundlesRequest} message ListContentBundlesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperatingSystemsRequest.toObject = function toObject(message, options) { + ListContentBundlesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -26541,55 +26015,55 @@ }; /** - * Converts this ListOperatingSystemsRequest to JSON. + * Converts this ListContentBundlesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @instance * @returns {Object.} JSON object */ - ListOperatingSystemsRequest.prototype.toJSON = function toJSON() { + ListContentBundlesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperatingSystemsRequest + * Gets the default type url for ListContentBundlesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @memberof google.ads.admanager.v1.ListContentBundlesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperatingSystemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContentBundlesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentBundlesRequest"; }; - return ListOperatingSystemsRequest; + return ListContentBundlesRequest; })(); - v1.ListOperatingSystemsResponse = (function() { + v1.ListContentBundlesResponse = (function() { /** - * Properties of a ListOperatingSystemsResponse. + * Properties of a ListContentBundlesResponse. * @memberof google.ads.admanager.v1 - * @interface IListOperatingSystemsResponse - * @property {Array.|null} [operatingSystems] ListOperatingSystemsResponse operatingSystems - * @property {string|null} [nextPageToken] ListOperatingSystemsResponse nextPageToken - * @property {number|null} [totalSize] ListOperatingSystemsResponse totalSize + * @interface IListContentBundlesResponse + * @property {Array.|null} [contentBundles] ListContentBundlesResponse contentBundles + * @property {string|null} [nextPageToken] ListContentBundlesResponse nextPageToken + * @property {number|null} [totalSize] ListContentBundlesResponse totalSize */ /** - * Constructs a new ListOperatingSystemsResponse. + * Constructs a new ListContentBundlesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOperatingSystemsResponse. - * @implements IListOperatingSystemsResponse + * @classdesc Represents a ListContentBundlesResponse. + * @implements IListContentBundlesResponse * @constructor - * @param {google.ads.admanager.v1.IListOperatingSystemsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContentBundlesResponse=} [properties] Properties to set */ - function ListOperatingSystemsResponse(properties) { - this.operatingSystems = []; + function ListContentBundlesResponse(properties) { + this.contentBundles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26597,56 +26071,56 @@ } /** - * ListOperatingSystemsResponse operatingSystems. - * @member {Array.} operatingSystems - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * ListContentBundlesResponse contentBundles. + * @member {Array.} contentBundles + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @instance */ - ListOperatingSystemsResponse.prototype.operatingSystems = $util.emptyArray; + ListContentBundlesResponse.prototype.contentBundles = $util.emptyArray; /** - * ListOperatingSystemsResponse nextPageToken. + * ListContentBundlesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @instance */ - ListOperatingSystemsResponse.prototype.nextPageToken = ""; + ListContentBundlesResponse.prototype.nextPageToken = ""; /** - * ListOperatingSystemsResponse totalSize. + * ListContentBundlesResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @instance */ - ListOperatingSystemsResponse.prototype.totalSize = 0; + ListContentBundlesResponse.prototype.totalSize = 0; /** - * Creates a new ListOperatingSystemsResponse instance using the specified properties. + * Creates a new ListContentBundlesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse instance + * @param {google.ads.admanager.v1.IListContentBundlesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentBundlesResponse} ListContentBundlesResponse instance */ - ListOperatingSystemsResponse.create = function create(properties) { - return new ListOperatingSystemsResponse(properties); + ListContentBundlesResponse.create = function create(properties) { + return new ListContentBundlesResponse(properties); }; /** - * Encodes the specified ListOperatingSystemsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * Encodes the specified ListContentBundlesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsResponse} message ListOperatingSystemsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContentBundlesResponse} message ListContentBundlesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemsResponse.encode = function encode(message, writer) { + ListContentBundlesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.operatingSystems != null && message.operatingSystems.length) - for (var i = 0; i < message.operatingSystems.length; ++i) - $root.google.ads.admanager.v1.OperatingSystem.encode(message.operatingSystems[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contentBundles != null && message.contentBundles.length) + for (var i = 0; i < message.contentBundles.length; ++i) + $root.google.ads.admanager.v1.ContentBundle.encode(message.contentBundles[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -26655,42 +26129,42 @@ }; /** - * Encodes the specified ListOperatingSystemsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * Encodes the specified ListContentBundlesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentBundlesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemsResponse} message ListOperatingSystemsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContentBundlesResponse} message ListContentBundlesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListContentBundlesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer. + * Decodes a ListContentBundlesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + * @returns {google.ads.admanager.v1.ListContentBundlesResponse} ListContentBundlesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemsResponse.decode = function decode(reader, length, error) { + ListContentBundlesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentBundlesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.operatingSystems && message.operatingSystems.length)) - message.operatingSystems = []; - message.operatingSystems.push($root.google.ads.admanager.v1.OperatingSystem.decode(reader, reader.uint32())); + if (!(message.contentBundles && message.contentBundles.length)) + message.contentBundles = []; + message.contentBundles.push($root.google.ads.admanager.v1.ContentBundle.decode(reader, reader.uint32())); break; } case 2: { @@ -26710,39 +26184,39 @@ }; /** - * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContentBundlesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + * @returns {google.ads.admanager.v1.ListContentBundlesResponse} ListContentBundlesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemsResponse.decodeDelimited = function decodeDelimited(reader) { + ListContentBundlesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOperatingSystemsResponse message. + * Verifies a ListContentBundlesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOperatingSystemsResponse.verify = function verify(message) { + ListContentBundlesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operatingSystems != null && message.hasOwnProperty("operatingSystems")) { - if (!Array.isArray(message.operatingSystems)) - return "operatingSystems: array expected"; - for (var i = 0; i < message.operatingSystems.length; ++i) { - var error = $root.google.ads.admanager.v1.OperatingSystem.verify(message.operatingSystems[i]); + if (message.contentBundles != null && message.hasOwnProperty("contentBundles")) { + if (!Array.isArray(message.contentBundles)) + return "contentBundles: array expected"; + for (var i = 0; i < message.contentBundles.length; ++i) { + var error = $root.google.ads.admanager.v1.ContentBundle.verify(message.contentBundles[i]); if (error) - return "operatingSystems." + error; + return "contentBundles." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -26755,25 +26229,25 @@ }; /** - * Creates a ListOperatingSystemsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentBundlesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + * @returns {google.ads.admanager.v1.ListContentBundlesResponse} ListContentBundlesResponse */ - ListOperatingSystemsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemsResponse) + ListContentBundlesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentBundlesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListOperatingSystemsResponse(); - if (object.operatingSystems) { - if (!Array.isArray(object.operatingSystems)) - throw TypeError(".google.ads.admanager.v1.ListOperatingSystemsResponse.operatingSystems: array expected"); - message.operatingSystems = []; - for (var i = 0; i < object.operatingSystems.length; ++i) { - if (typeof object.operatingSystems[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListOperatingSystemsResponse.operatingSystems: object expected"); - message.operatingSystems[i] = $root.google.ads.admanager.v1.OperatingSystem.fromObject(object.operatingSystems[i]); + var message = new $root.google.ads.admanager.v1.ListContentBundlesResponse(); + if (object.contentBundles) { + if (!Array.isArray(object.contentBundles)) + throw TypeError(".google.ads.admanager.v1.ListContentBundlesResponse.contentBundles: array expected"); + message.contentBundles = []; + for (var i = 0; i < object.contentBundles.length; ++i) { + if (typeof object.contentBundles[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListContentBundlesResponse.contentBundles: object expected"); + message.contentBundles[i] = $root.google.ads.admanager.v1.ContentBundle.fromObject(object.contentBundles[i]); } } if (object.nextPageToken != null) @@ -26784,28 +26258,28 @@ }; /** - * Creates a plain object from a ListOperatingSystemsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListContentBundlesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static - * @param {google.ads.admanager.v1.ListOperatingSystemsResponse} message ListOperatingSystemsResponse + * @param {google.ads.admanager.v1.ListContentBundlesResponse} message ListContentBundlesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperatingSystemsResponse.toObject = function toObject(message, options) { + ListContentBundlesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.operatingSystems = []; + object.contentBundles = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.operatingSystems && message.operatingSystems.length) { - object.operatingSystems = []; - for (var j = 0; j < message.operatingSystems.length; ++j) - object.operatingSystems[j] = $root.google.ads.admanager.v1.OperatingSystem.toObject(message.operatingSystems[j], options); + if (message.contentBundles && message.contentBundles.length) { + object.contentBundles = []; + for (var j = 0; j < message.contentBundles.length; ++j) + object.contentBundles[j] = $root.google.ads.admanager.v1.ContentBundle.toObject(message.contentBundles[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -26815,55 +26289,53 @@ }; /** - * Converts this ListOperatingSystemsResponse to JSON. + * Converts this ListContentBundlesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @instance * @returns {Object.} JSON object */ - ListOperatingSystemsResponse.prototype.toJSON = function toJSON() { + ListContentBundlesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperatingSystemsResponse + * Gets the default type url for ListContentBundlesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @memberof google.ads.admanager.v1.ListContentBundlesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperatingSystemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContentBundlesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentBundlesResponse"; }; - return ListOperatingSystemsResponse; + return ListContentBundlesResponse; })(); - v1.OperatingSystemVersion = (function() { + v1.ContentLabel = (function() { /** - * Properties of an OperatingSystemVersion. + * Properties of a ContentLabel. * @memberof google.ads.admanager.v1 - * @interface IOperatingSystemVersion - * @property {string|null} [name] OperatingSystemVersion name - * @property {number|null} [majorVersion] OperatingSystemVersion majorVersion - * @property {number|null} [minorVersion] OperatingSystemVersion minorVersion - * @property {number|null} [microVersion] OperatingSystemVersion microVersion + * @interface IContentLabel + * @property {string|null} [name] ContentLabel name + * @property {string|null} [displayName] ContentLabel displayName */ /** - * Constructs a new OperatingSystemVersion. + * Constructs a new ContentLabel. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OperatingSystemVersion. - * @implements IOperatingSystemVersion + * @classdesc Represents a ContentLabel. + * @implements IContentLabel * @constructor - * @param {google.ads.admanager.v1.IOperatingSystemVersion=} [properties] Properties to set + * @param {google.ads.admanager.v1.IContentLabel=} [properties] Properties to set */ - function OperatingSystemVersion(properties) { + function ContentLabel(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26871,121 +26343,80 @@ } /** - * OperatingSystemVersion name. + * ContentLabel name. * @member {string} name - * @memberof google.ads.admanager.v1.OperatingSystemVersion - * @instance - */ - OperatingSystemVersion.prototype.name = ""; - - /** - * OperatingSystemVersion majorVersion. - * @member {number|null|undefined} majorVersion - * @memberof google.ads.admanager.v1.OperatingSystemVersion - * @instance - */ - OperatingSystemVersion.prototype.majorVersion = null; - - /** - * OperatingSystemVersion minorVersion. - * @member {number|null|undefined} minorVersion - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @instance */ - OperatingSystemVersion.prototype.minorVersion = null; + ContentLabel.prototype.name = ""; /** - * OperatingSystemVersion microVersion. - * @member {number|null|undefined} microVersion - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * ContentLabel displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.ContentLabel * @instance */ - OperatingSystemVersion.prototype.microVersion = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(OperatingSystemVersion.prototype, "_majorVersion", { - get: $util.oneOfGetter($oneOfFields = ["majorVersion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(OperatingSystemVersion.prototype, "_minorVersion", { - get: $util.oneOfGetter($oneOfFields = ["minorVersion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(OperatingSystemVersion.prototype, "_microVersion", { - get: $util.oneOfGetter($oneOfFields = ["microVersion"]), - set: $util.oneOfSetter($oneOfFields) - }); + ContentLabel.prototype.displayName = ""; /** - * Creates a new OperatingSystemVersion instance using the specified properties. + * Creates a new ContentLabel instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static - * @param {google.ads.admanager.v1.IOperatingSystemVersion=} [properties] Properties to set - * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion instance + * @param {google.ads.admanager.v1.IContentLabel=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ContentLabel} ContentLabel instance */ - OperatingSystemVersion.create = function create(properties) { - return new OperatingSystemVersion(properties); + ContentLabel.create = function create(properties) { + return new ContentLabel(properties); }; /** - * Encodes the specified OperatingSystemVersion message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * Encodes the specified ContentLabel message. Does not implicitly {@link google.ads.admanager.v1.ContentLabel.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static - * @param {google.ads.admanager.v1.IOperatingSystemVersion} message OperatingSystemVersion message or plain object to encode + * @param {google.ads.admanager.v1.IContentLabel} message ContentLabel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystemVersion.encode = function encode(message, writer) { + ContentLabel.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.majorVersion != null && Object.hasOwnProperty.call(message, "majorVersion")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.majorVersion); - if (message.minorVersion != null && Object.hasOwnProperty.call(message, "minorVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minorVersion); - if (message.microVersion != null && Object.hasOwnProperty.call(message, "microVersion")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.microVersion); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified OperatingSystemVersion message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * Encodes the specified ContentLabel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentLabel.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static - * @param {google.ads.admanager.v1.IOperatingSystemVersion} message OperatingSystemVersion message or plain object to encode + * @param {google.ads.admanager.v1.IContentLabel} message ContentLabel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystemVersion.encodeDelimited = function encodeDelimited(message, writer) { + ContentLabel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperatingSystemVersion message from the specified reader or buffer. + * Decodes a ContentLabel message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + * @returns {google.ads.admanager.v1.ContentLabel} ContentLabel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystemVersion.decode = function decode(reader, length, error) { + ContentLabel.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystemVersion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ContentLabel(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -26996,15 +26427,7 @@ break; } case 2: { - message.majorVersion = reader.int32(); - break; - } - case 3: { - message.minorVersion = reader.int32(); - break; - } - case 4: { - message.microVersion = reader.int32(); + message.displayName = reader.string(); break; } default: @@ -27016,260 +26439,232 @@ }; /** - * Decodes an OperatingSystemVersion message from the specified reader or buffer, length delimited. + * Decodes a ContentLabel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + * @returns {google.ads.admanager.v1.ContentLabel} ContentLabel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystemVersion.decodeDelimited = function decodeDelimited(reader) { + ContentLabel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperatingSystemVersion message. + * Verifies a ContentLabel message. * @function verify - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperatingSystemVersion.verify = function verify(message) { + ContentLabel.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.majorVersion != null && message.hasOwnProperty("majorVersion")) { - properties._majorVersion = 1; - if (!$util.isInteger(message.majorVersion)) - return "majorVersion: integer expected"; - } - if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { - properties._minorVersion = 1; - if (!$util.isInteger(message.minorVersion)) - return "minorVersion: integer expected"; - } - if (message.microVersion != null && message.hasOwnProperty("microVersion")) { - properties._microVersion = 1; - if (!$util.isInteger(message.microVersion)) - return "microVersion: integer expected"; - } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates an OperatingSystemVersion message from a plain object. Also converts values to their respective internal types. + * Creates a ContentLabel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + * @returns {google.ads.admanager.v1.ContentLabel} ContentLabel */ - OperatingSystemVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.OperatingSystemVersion) + ContentLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ContentLabel) return object; - var message = new $root.google.ads.admanager.v1.OperatingSystemVersion(); + var message = new $root.google.ads.admanager.v1.ContentLabel(); if (object.name != null) message.name = String(object.name); - if (object.majorVersion != null) - message.majorVersion = object.majorVersion | 0; - if (object.minorVersion != null) - message.minorVersion = object.minorVersion | 0; - if (object.microVersion != null) - message.microVersion = object.microVersion | 0; + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an OperatingSystemVersion message. Also converts values to other types if specified. + * Creates a plain object from a ContentLabel message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static - * @param {google.ads.admanager.v1.OperatingSystemVersion} message OperatingSystemVersion + * @param {google.ads.admanager.v1.ContentLabel} message ContentLabel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperatingSystemVersion.toObject = function toObject(message, options) { + ContentLabel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.displayName = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.majorVersion != null && message.hasOwnProperty("majorVersion")) { - object.majorVersion = message.majorVersion; - if (options.oneofs) - object._majorVersion = "majorVersion"; - } - if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { - object.minorVersion = message.minorVersion; - if (options.oneofs) - object._minorVersion = "minorVersion"; - } - if (message.microVersion != null && message.hasOwnProperty("microVersion")) { - object.microVersion = message.microVersion; - if (options.oneofs) - object._microVersion = "microVersion"; - } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this OperatingSystemVersion to JSON. + * Converts this ContentLabel to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @instance * @returns {Object.} JSON object */ - OperatingSystemVersion.prototype.toJSON = function toJSON() { + ContentLabel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperatingSystemVersion + * Gets the default type url for ContentLabel * @function getTypeUrl - * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @memberof google.ads.admanager.v1.ContentLabel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperatingSystemVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContentLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystemVersion"; + return typeUrlPrefix + "/google.ads.admanager.v1.ContentLabel"; }; - return OperatingSystemVersion; + return ContentLabel; })(); - v1.OperatingSystemVersionService = (function() { + v1.ContentLabelService = (function() { /** - * Constructs a new OperatingSystemVersionService service. + * Constructs a new ContentLabelService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OperatingSystemVersionService + * @classdesc Represents a ContentLabelService * @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 OperatingSystemVersionService(rpcImpl, requestDelimited, responseDelimited) { + function ContentLabelService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (OperatingSystemVersionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OperatingSystemVersionService; + (ContentLabelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentLabelService; /** - * Creates new OperatingSystemVersionService service using the specified rpc implementation. + * Creates new ContentLabelService service using the specified rpc implementation. * @function create - * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @memberof google.ads.admanager.v1.ContentLabelService * @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 {OperatingSystemVersionService} RPC service. Useful where requests and/or responses are streamed. + * @returns {ContentLabelService} RPC service. Useful where requests and/or responses are streamed. */ - OperatingSystemVersionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + ContentLabelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|getOperatingSystemVersion}. - * @memberof google.ads.admanager.v1.OperatingSystemVersionService - * @typedef GetOperatingSystemVersionCallback + * Callback as used by {@link google.ads.admanager.v1.ContentLabelService|getContentLabel}. + * @memberof google.ads.admanager.v1.ContentLabelService + * @typedef GetContentLabelCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.OperatingSystemVersion} [response] OperatingSystemVersion + * @param {google.ads.admanager.v1.ContentLabel} [response] ContentLabel */ /** - * Calls GetOperatingSystemVersion. - * @function getOperatingSystemVersion - * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * Calls GetContentLabel. + * @function getContentLabel + * @memberof google.ads.admanager.v1.ContentLabelService * @instance - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} request GetOperatingSystemVersionRequest message or plain object - * @param {google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersionCallback} callback Node-style callback called with the error, if any, and OperatingSystemVersion + * @param {google.ads.admanager.v1.IGetContentLabelRequest} request GetContentLabelRequest message or plain object + * @param {google.ads.admanager.v1.ContentLabelService.GetContentLabelCallback} callback Node-style callback called with the error, if any, and ContentLabel * @returns {undefined} * @variation 1 */ - Object.defineProperty(OperatingSystemVersionService.prototype.getOperatingSystemVersion = function getOperatingSystemVersion(request, callback) { - return this.rpcCall(getOperatingSystemVersion, $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest, $root.google.ads.admanager.v1.OperatingSystemVersion, request, callback); - }, "name", { value: "GetOperatingSystemVersion" }); + Object.defineProperty(ContentLabelService.prototype.getContentLabel = function getContentLabel(request, callback) { + return this.rpcCall(getContentLabel, $root.google.ads.admanager.v1.GetContentLabelRequest, $root.google.ads.admanager.v1.ContentLabel, request, callback); + }, "name", { value: "GetContentLabel" }); /** - * Calls GetOperatingSystemVersion. - * @function getOperatingSystemVersion - * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * Calls GetContentLabel. + * @function getContentLabel + * @memberof google.ads.admanager.v1.ContentLabelService * @instance - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} request GetOperatingSystemVersionRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IGetContentLabelRequest} request GetContentLabelRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|listOperatingSystemVersions}. - * @memberof google.ads.admanager.v1.OperatingSystemVersionService - * @typedef ListOperatingSystemVersionsCallback + * Callback as used by {@link google.ads.admanager.v1.ContentLabelService|listContentLabels}. + * @memberof google.ads.admanager.v1.ContentLabelService + * @typedef ListContentLabelsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} [response] ListOperatingSystemVersionsResponse + * @param {google.ads.admanager.v1.ListContentLabelsResponse} [response] ListContentLabelsResponse */ /** - * Calls ListOperatingSystemVersions. - * @function listOperatingSystemVersions - * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * Calls ListContentLabels. + * @function listContentLabels + * @memberof google.ads.admanager.v1.ContentLabelService * @instance - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} request ListOperatingSystemVersionsRequest message or plain object - * @param {google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersionsCallback} callback Node-style callback called with the error, if any, and ListOperatingSystemVersionsResponse + * @param {google.ads.admanager.v1.IListContentLabelsRequest} request ListContentLabelsRequest message or plain object + * @param {google.ads.admanager.v1.ContentLabelService.ListContentLabelsCallback} callback Node-style callback called with the error, if any, and ListContentLabelsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(OperatingSystemVersionService.prototype.listOperatingSystemVersions = function listOperatingSystemVersions(request, callback) { - return this.rpcCall(listOperatingSystemVersions, $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest, $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse, request, callback); - }, "name", { value: "ListOperatingSystemVersions" }); + Object.defineProperty(ContentLabelService.prototype.listContentLabels = function listContentLabels(request, callback) { + return this.rpcCall(listContentLabels, $root.google.ads.admanager.v1.ListContentLabelsRequest, $root.google.ads.admanager.v1.ListContentLabelsResponse, request, callback); + }, "name", { value: "ListContentLabels" }); /** - * Calls ListOperatingSystemVersions. - * @function listOperatingSystemVersions - * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * Calls ListContentLabels. + * @function listContentLabels + * @memberof google.ads.admanager.v1.ContentLabelService * @instance - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} request ListOperatingSystemVersionsRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IListContentLabelsRequest} request ListContentLabelsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return OperatingSystemVersionService; + return ContentLabelService; })(); - v1.GetOperatingSystemVersionRequest = (function() { + v1.GetContentLabelRequest = (function() { /** - * Properties of a GetOperatingSystemVersionRequest. + * Properties of a GetContentLabelRequest. * @memberof google.ads.admanager.v1 - * @interface IGetOperatingSystemVersionRequest - * @property {string|null} [name] GetOperatingSystemVersionRequest name + * @interface IGetContentLabelRequest + * @property {string|null} [name] GetContentLabelRequest name */ /** - * Constructs a new GetOperatingSystemVersionRequest. + * Constructs a new GetContentLabelRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetOperatingSystemVersionRequest. - * @implements IGetOperatingSystemVersionRequest + * @classdesc Represents a GetContentLabelRequest. + * @implements IGetContentLabelRequest * @constructor - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetContentLabelRequest=} [properties] Properties to set */ - function GetOperatingSystemVersionRequest(properties) { + function GetContentLabelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27277,35 +26672,35 @@ } /** - * GetOperatingSystemVersionRequest name. + * GetContentLabelRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @instance */ - GetOperatingSystemVersionRequest.prototype.name = ""; + GetContentLabelRequest.prototype.name = ""; /** - * Creates a new GetOperatingSystemVersionRequest instance using the specified properties. + * Creates a new GetContentLabelRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest instance + * @param {google.ads.admanager.v1.IGetContentLabelRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetContentLabelRequest} GetContentLabelRequest instance */ - GetOperatingSystemVersionRequest.create = function create(properties) { - return new GetOperatingSystemVersionRequest(properties); + GetContentLabelRequest.create = function create(properties) { + return new GetContentLabelRequest(properties); }; /** - * Encodes the specified GetOperatingSystemVersionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * Encodes the specified GetContentLabelRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentLabelRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetContentLabelRequest} message GetContentLabelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOperatingSystemVersionRequest.encode = function encode(message, writer) { + GetContentLabelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -27314,33 +26709,33 @@ }; /** - * Encodes the specified GetOperatingSystemVersionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * Encodes the specified GetContentLabelRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentLabelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static - * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetContentLabelRequest} message GetContentLabelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOperatingSystemVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetContentLabelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer. + * Decodes a GetContentLabelRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + * @returns {google.ads.admanager.v1.GetContentLabelRequest} GetContentLabelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOperatingSystemVersionRequest.decode = function decode(reader, length, error) { + GetContentLabelRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetContentLabelRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -27359,30 +26754,30 @@ }; /** - * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentLabelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + * @returns {google.ads.admanager.v1.GetContentLabelRequest} GetContentLabelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOperatingSystemVersionRequest.decodeDelimited = function decodeDelimited(reader) { + GetContentLabelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOperatingSystemVersionRequest message. + * Verifies a GetContentLabelRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOperatingSystemVersionRequest.verify = function verify(message) { + GetContentLabelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -27392,32 +26787,32 @@ }; /** - * Creates a GetOperatingSystemVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentLabelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + * @returns {google.ads.admanager.v1.GetContentLabelRequest} GetContentLabelRequest */ - GetOperatingSystemVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest) + GetContentLabelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetContentLabelRequest) return object; - var message = new $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest(); + var message = new $root.google.ads.admanager.v1.GetContentLabelRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetOperatingSystemVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetContentLabelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static - * @param {google.ads.admanager.v1.GetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest + * @param {google.ads.admanager.v1.GetContentLabelRequest} message GetContentLabelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperatingSystemVersionRequest.toObject = function toObject(message, options) { + GetContentLabelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -27429,57 +26824,57 @@ }; /** - * Converts this GetOperatingSystemVersionRequest to JSON. + * Converts this GetContentLabelRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @instance * @returns {Object.} JSON object */ - GetOperatingSystemVersionRequest.prototype.toJSON = function toJSON() { + GetContentLabelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOperatingSystemVersionRequest + * Gets the default type url for GetContentLabelRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @memberof google.ads.admanager.v1.GetContentLabelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOperatingSystemVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContentLabelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetOperatingSystemVersionRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetContentLabelRequest"; }; - return GetOperatingSystemVersionRequest; + return GetContentLabelRequest; })(); - v1.ListOperatingSystemVersionsRequest = (function() { + v1.ListContentLabelsRequest = (function() { /** - * Properties of a ListOperatingSystemVersionsRequest. + * Properties of a ListContentLabelsRequest. * @memberof google.ads.admanager.v1 - * @interface IListOperatingSystemVersionsRequest - * @property {string|null} [parent] ListOperatingSystemVersionsRequest parent - * @property {number|null} [pageSize] ListOperatingSystemVersionsRequest pageSize - * @property {string|null} [pageToken] ListOperatingSystemVersionsRequest pageToken - * @property {string|null} [filter] ListOperatingSystemVersionsRequest filter - * @property {string|null} [orderBy] ListOperatingSystemVersionsRequest orderBy - * @property {number|null} [skip] ListOperatingSystemVersionsRequest skip + * @interface IListContentLabelsRequest + * @property {string|null} [parent] ListContentLabelsRequest parent + * @property {number|null} [pageSize] ListContentLabelsRequest pageSize + * @property {string|null} [pageToken] ListContentLabelsRequest pageToken + * @property {string|null} [filter] ListContentLabelsRequest filter + * @property {string|null} [orderBy] ListContentLabelsRequest orderBy + * @property {number|null} [skip] ListContentLabelsRequest skip */ /** - * Constructs a new ListOperatingSystemVersionsRequest. + * Constructs a new ListContentLabelsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOperatingSystemVersionsRequest. - * @implements IListOperatingSystemVersionsRequest + * @classdesc Represents a ListContentLabelsRequest. + * @implements IListContentLabelsRequest * @constructor - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContentLabelsRequest=} [properties] Properties to set */ - function ListOperatingSystemVersionsRequest(properties) { + function ListContentLabelsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27487,75 +26882,75 @@ } /** - * ListOperatingSystemVersionsRequest parent. + * ListContentLabelsRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.parent = ""; + ListContentLabelsRequest.prototype.parent = ""; /** - * ListOperatingSystemVersionsRequest pageSize. + * ListContentLabelsRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.pageSize = 0; + ListContentLabelsRequest.prototype.pageSize = 0; /** - * ListOperatingSystemVersionsRequest pageToken. + * ListContentLabelsRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.pageToken = ""; + ListContentLabelsRequest.prototype.pageToken = ""; /** - * ListOperatingSystemVersionsRequest filter. + * ListContentLabelsRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.filter = ""; + ListContentLabelsRequest.prototype.filter = ""; /** - * ListOperatingSystemVersionsRequest orderBy. + * ListContentLabelsRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.orderBy = ""; + ListContentLabelsRequest.prototype.orderBy = ""; /** - * ListOperatingSystemVersionsRequest skip. + * ListContentLabelsRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance */ - ListOperatingSystemVersionsRequest.prototype.skip = 0; + ListContentLabelsRequest.prototype.skip = 0; /** - * Creates a new ListOperatingSystemVersionsRequest instance using the specified properties. + * Creates a new ListContentLabelsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest instance + * @param {google.ads.admanager.v1.IListContentLabelsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentLabelsRequest} ListContentLabelsRequest instance */ - ListOperatingSystemVersionsRequest.create = function create(properties) { - return new ListOperatingSystemVersionsRequest(properties); + ListContentLabelsRequest.create = function create(properties) { + return new ListContentLabelsRequest(properties); }; /** - * Encodes the specified ListOperatingSystemVersionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * Encodes the specified ListContentLabelsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContentLabelsRequest} message ListContentLabelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemVersionsRequest.encode = function encode(message, writer) { + ListContentLabelsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -27574,33 +26969,33 @@ }; /** - * Encodes the specified ListOperatingSystemVersionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * Encodes the specified ListContentLabelsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListContentLabelsRequest} message ListContentLabelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListContentLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer. + * Decodes a ListContentLabelsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + * @returns {google.ads.admanager.v1.ListContentLabelsRequest} ListContentLabelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemVersionsRequest.decode = function decode(reader, length, error) { + ListContentLabelsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentLabelsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -27639,30 +27034,30 @@ }; /** - * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentLabelsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + * @returns {google.ads.admanager.v1.ListContentLabelsRequest} ListContentLabelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListContentLabelsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOperatingSystemVersionsRequest message. + * Verifies a ListContentLabelsRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOperatingSystemVersionsRequest.verify = function verify(message) { + ListContentLabelsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -27687,17 +27082,17 @@ }; /** - * Creates a ListOperatingSystemVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentLabelsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + * @returns {google.ads.admanager.v1.ListContentLabelsRequest} ListContentLabelsRequest */ - ListOperatingSystemVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest) + ListContentLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentLabelsRequest) return object; - var message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest(); + var message = new $root.google.ads.admanager.v1.ListContentLabelsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -27714,15 +27109,15 @@ }; /** - * Creates a plain object from a ListOperatingSystemVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListContentLabelsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static - * @param {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest + * @param {google.ads.admanager.v1.ListContentLabelsRequest} message ListContentLabelsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperatingSystemVersionsRequest.toObject = function toObject(message, options) { + ListContentLabelsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -27750,55 +27145,55 @@ }; /** - * Converts this ListOperatingSystemVersionsRequest to JSON. + * Converts this ListContentLabelsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @instance * @returns {Object.} JSON object */ - ListOperatingSystemVersionsRequest.prototype.toJSON = function toJSON() { + ListContentLabelsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperatingSystemVersionsRequest + * Gets the default type url for ListContentLabelsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @memberof google.ads.admanager.v1.ListContentLabelsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperatingSystemVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContentLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemVersionsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentLabelsRequest"; }; - return ListOperatingSystemVersionsRequest; + return ListContentLabelsRequest; })(); - v1.ListOperatingSystemVersionsResponse = (function() { + v1.ListContentLabelsResponse = (function() { /** - * Properties of a ListOperatingSystemVersionsResponse. + * Properties of a ListContentLabelsResponse. * @memberof google.ads.admanager.v1 - * @interface IListOperatingSystemVersionsResponse - * @property {Array.|null} [operatingSystemVersions] ListOperatingSystemVersionsResponse operatingSystemVersions - * @property {string|null} [nextPageToken] ListOperatingSystemVersionsResponse nextPageToken - * @property {number|null} [totalSize] ListOperatingSystemVersionsResponse totalSize + * @interface IListContentLabelsResponse + * @property {Array.|null} [contentLabels] ListContentLabelsResponse contentLabels + * @property {string|null} [nextPageToken] ListContentLabelsResponse nextPageToken + * @property {number|null} [totalSize] ListContentLabelsResponse totalSize */ /** - * Constructs a new ListOperatingSystemVersionsResponse. + * Constructs a new ListContentLabelsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOperatingSystemVersionsResponse. - * @implements IListOperatingSystemVersionsResponse + * @classdesc Represents a ListContentLabelsResponse. + * @implements IListContentLabelsResponse * @constructor - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListContentLabelsResponse=} [properties] Properties to set */ - function ListOperatingSystemVersionsResponse(properties) { - this.operatingSystemVersions = []; + function ListContentLabelsResponse(properties) { + this.contentLabels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27806,56 +27201,56 @@ } /** - * ListOperatingSystemVersionsResponse operatingSystemVersions. - * @member {Array.} operatingSystemVersions - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * ListContentLabelsResponse contentLabels. + * @member {Array.} contentLabels + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @instance */ - ListOperatingSystemVersionsResponse.prototype.operatingSystemVersions = $util.emptyArray; + ListContentLabelsResponse.prototype.contentLabels = $util.emptyArray; /** - * ListOperatingSystemVersionsResponse nextPageToken. + * ListContentLabelsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @instance */ - ListOperatingSystemVersionsResponse.prototype.nextPageToken = ""; + ListContentLabelsResponse.prototype.nextPageToken = ""; /** - * ListOperatingSystemVersionsResponse totalSize. + * ListContentLabelsResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @instance */ - ListOperatingSystemVersionsResponse.prototype.totalSize = 0; + ListContentLabelsResponse.prototype.totalSize = 0; /** - * Creates a new ListOperatingSystemVersionsResponse instance using the specified properties. + * Creates a new ListContentLabelsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse instance + * @param {google.ads.admanager.v1.IListContentLabelsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentLabelsResponse} ListContentLabelsResponse instance */ - ListOperatingSystemVersionsResponse.create = function create(properties) { - return new ListOperatingSystemVersionsResponse(properties); + ListContentLabelsResponse.create = function create(properties) { + return new ListContentLabelsResponse(properties); }; /** - * Encodes the specified ListOperatingSystemVersionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * Encodes the specified ListContentLabelsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContentLabelsResponse} message ListContentLabelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemVersionsResponse.encode = function encode(message, writer) { + ListContentLabelsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.operatingSystemVersions != null && message.operatingSystemVersions.length) - for (var i = 0; i < message.operatingSystemVersions.length; ++i) - $root.google.ads.admanager.v1.OperatingSystemVersion.encode(message.operatingSystemVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contentLabels != null && message.contentLabels.length) + for (var i = 0; i < message.contentLabels.length; ++i) + $root.google.ads.admanager.v1.ContentLabel.encode(message.contentLabels[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -27864,42 +27259,42 @@ }; /** - * Encodes the specified ListOperatingSystemVersionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * Encodes the specified ListContentLabelsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentLabelsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static - * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListContentLabelsResponse} message ListContentLabelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperatingSystemVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListContentLabelsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer. + * Decodes a ListContentLabelsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + * @returns {google.ads.admanager.v1.ListContentLabelsResponse} ListContentLabelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemVersionsResponse.decode = function decode(reader, length, error) { + ListContentLabelsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentLabelsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.operatingSystemVersions && message.operatingSystemVersions.length)) - message.operatingSystemVersions = []; - message.operatingSystemVersions.push($root.google.ads.admanager.v1.OperatingSystemVersion.decode(reader, reader.uint32())); + if (!(message.contentLabels && message.contentLabels.length)) + message.contentLabels = []; + message.contentLabels.push($root.google.ads.admanager.v1.ContentLabel.decode(reader, reader.uint32())); break; } case 2: { @@ -27919,39 +27314,39 @@ }; /** - * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContentLabelsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + * @returns {google.ads.admanager.v1.ListContentLabelsResponse} ListContentLabelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOperatingSystemVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + ListContentLabelsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOperatingSystemVersionsResponse message. + * Verifies a ListContentLabelsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOperatingSystemVersionsResponse.verify = function verify(message) { + ListContentLabelsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operatingSystemVersions != null && message.hasOwnProperty("operatingSystemVersions")) { - if (!Array.isArray(message.operatingSystemVersions)) - return "operatingSystemVersions: array expected"; - for (var i = 0; i < message.operatingSystemVersions.length; ++i) { - var error = $root.google.ads.admanager.v1.OperatingSystemVersion.verify(message.operatingSystemVersions[i]); + if (message.contentLabels != null && message.hasOwnProperty("contentLabels")) { + if (!Array.isArray(message.contentLabels)) + return "contentLabels: array expected"; + for (var i = 0; i < message.contentLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.ContentLabel.verify(message.contentLabels[i]); if (error) - return "operatingSystemVersions." + error; + return "contentLabels." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -27964,25 +27359,25 @@ }; /** - * Creates a ListOperatingSystemVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentLabelsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + * @returns {google.ads.admanager.v1.ListContentLabelsResponse} ListContentLabelsResponse */ - ListOperatingSystemVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse) + ListContentLabelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentLabelsResponse) return object; - var message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse(); - if (object.operatingSystemVersions) { - if (!Array.isArray(object.operatingSystemVersions)) - throw TypeError(".google.ads.admanager.v1.ListOperatingSystemVersionsResponse.operatingSystemVersions: array expected"); - message.operatingSystemVersions = []; - for (var i = 0; i < object.operatingSystemVersions.length; ++i) { - if (typeof object.operatingSystemVersions[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListOperatingSystemVersionsResponse.operatingSystemVersions: object expected"); - message.operatingSystemVersions[i] = $root.google.ads.admanager.v1.OperatingSystemVersion.fromObject(object.operatingSystemVersions[i]); + var message = new $root.google.ads.admanager.v1.ListContentLabelsResponse(); + if (object.contentLabels) { + if (!Array.isArray(object.contentLabels)) + throw TypeError(".google.ads.admanager.v1.ListContentLabelsResponse.contentLabels: array expected"); + message.contentLabels = []; + for (var i = 0; i < object.contentLabels.length; ++i) { + if (typeof object.contentLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListContentLabelsResponse.contentLabels: object expected"); + message.contentLabels[i] = $root.google.ads.admanager.v1.ContentLabel.fromObject(object.contentLabels[i]); } } if (object.nextPageToken != null) @@ -27993,28 +27388,28 @@ }; /** - * Creates a plain object from a ListOperatingSystemVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListContentLabelsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static - * @param {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse + * @param {google.ads.admanager.v1.ListContentLabelsResponse} message ListContentLabelsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperatingSystemVersionsResponse.toObject = function toObject(message, options) { + ListContentLabelsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.operatingSystemVersions = []; + object.contentLabels = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.operatingSystemVersions && message.operatingSystemVersions.length) { - object.operatingSystemVersions = []; - for (var j = 0; j < message.operatingSystemVersions.length; ++j) - object.operatingSystemVersions[j] = $root.google.ads.admanager.v1.OperatingSystemVersion.toObject(message.operatingSystemVersions[j], options); + if (message.contentLabels && message.contentLabels.length) { + object.contentLabels = []; + for (var j = 0; j < message.contentLabels.length; ++j) + object.contentLabels[j] = $root.google.ads.admanager.v1.ContentLabel.toObject(message.contentLabels[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -28024,51 +27419,53 @@ }; /** - * Converts this ListOperatingSystemVersionsResponse to JSON. + * Converts this ListContentLabelsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @instance * @returns {Object.} JSON object */ - ListOperatingSystemVersionsResponse.prototype.toJSON = function toJSON() { + ListContentLabelsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperatingSystemVersionsResponse + * Gets the default type url for ListContentLabelsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @memberof google.ads.admanager.v1.ListContentLabelsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperatingSystemVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContentLabelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemVersionsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentLabelsResponse"; }; - return ListOperatingSystemVersionsResponse; + return ListContentLabelsResponse; })(); - v1.OrderStatusEnum = (function() { + v1.Content = (function() { /** - * Properties of an OrderStatusEnum. + * Properties of a Content. * @memberof google.ads.admanager.v1 - * @interface IOrderStatusEnum + * @interface IContent + * @property {string|null} [name] Content name + * @property {string|null} [displayName] Content displayName */ /** - * Constructs a new OrderStatusEnum. + * Constructs a new Content. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OrderStatusEnum. - * @implements IOrderStatusEnum + * @classdesc Represents a Content. + * @implements IContent * @constructor - * @param {google.ads.admanager.v1.IOrderStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IContent=} [properties] Properties to set */ - function OrderStatusEnum(properties) { + function Content(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28076,65 +27473,102 @@ } /** - * Creates a new OrderStatusEnum instance using the specified properties. + * Content name. + * @member {string} name + * @memberof google.ads.admanager.v1.Content + * @instance + */ + Content.prototype.name = ""; + + /** + * Content displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Content + * @instance + */ + Content.prototype.displayName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Content.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static - * @param {google.ads.admanager.v1.IOrderStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum instance + * @param {google.ads.admanager.v1.IContent=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Content} Content instance */ - OrderStatusEnum.create = function create(properties) { - return new OrderStatusEnum(properties); + Content.create = function create(properties) { + return new Content(properties); }; /** - * Encodes the specified OrderStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * Encodes the specified Content message. Does not implicitly {@link google.ads.admanager.v1.Content.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static - * @param {google.ads.admanager.v1.IOrderStatusEnum} message OrderStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IContent} message Content message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderStatusEnum.encode = function encode(message, writer) { + Content.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified OrderStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Content.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static - * @param {google.ads.admanager.v1.IOrderStatusEnum} message OrderStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IContent} message Content message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + Content.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OrderStatusEnum message from the specified reader or buffer. + * Decodes a Content message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + * @returns {google.ads.admanager.v1.Content} Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrderStatusEnum.decode = function decode(reader, length, error) { + Content.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OrderStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Content(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28144,786 +27578,874 @@ }; /** - * Decodes an OrderStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a Content message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + * @returns {google.ads.admanager.v1.Content} Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrderStatusEnum.decodeDelimited = function decodeDelimited(reader) { + Content.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrderStatusEnum message. + * Verifies a Content message. * @function verify - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrderStatusEnum.verify = function verify(message) { + Content.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } return null; }; /** - * Creates an OrderStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a Content message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + * @returns {google.ads.admanager.v1.Content} Content */ - OrderStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.OrderStatusEnum) + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Content) return object; - return new $root.google.ads.admanager.v1.OrderStatusEnum(); - }; - - /** - * Creates a plain object from an OrderStatusEnum message. Also converts values to other types if specified. + var message = new $root.google.ads.admanager.v1.Content(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static - * @param {google.ads.admanager.v1.OrderStatusEnum} message OrderStatusEnum + * @param {google.ads.admanager.v1.Content} message Content * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrderStatusEnum.toObject = function toObject() { - return {}; + Content.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + return object; }; /** - * Converts this OrderStatusEnum to JSON. + * Converts this Content to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @instance * @returns {Object.} JSON object */ - OrderStatusEnum.prototype.toJSON = function toJSON() { + Content.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OrderStatusEnum + * Gets the default type url for Content * @function getTypeUrl - * @memberof google.ads.admanager.v1.OrderStatusEnum + * @memberof google.ads.admanager.v1.Content * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OrderStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.OrderStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.Content"; }; - /** - * OrderStatus enum. - * @name google.ads.admanager.v1.OrderStatusEnum.OrderStatus - * @enum {number} - * @property {number} ORDER_STATUS_UNSPECIFIED=0 ORDER_STATUS_UNSPECIFIED value - * @property {number} DRAFT=2 DRAFT value - * @property {number} PENDING_APPROVAL=3 PENDING_APPROVAL value - * @property {number} APPROVED=4 APPROVED value - * @property {number} DISAPPROVED=5 DISAPPROVED value - * @property {number} PAUSED=6 PAUSED value - * @property {number} CANCELED=7 CANCELED value - * @property {number} DELETED=8 DELETED value - */ - OrderStatusEnum.OrderStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_STATUS_UNSPECIFIED"] = 0; - values[valuesById[2] = "DRAFT"] = 2; - values[valuesById[3] = "PENDING_APPROVAL"] = 3; - values[valuesById[4] = "APPROVED"] = 4; - values[valuesById[5] = "DISAPPROVED"] = 5; - values[valuesById[6] = "PAUSED"] = 6; - values[valuesById[7] = "CANCELED"] = 7; - values[valuesById[8] = "DELETED"] = 8; - return values; - })(); - - return OrderStatusEnum; + return Content; })(); - v1.Order = (function() { - - /** - * Properties of an Order. - * @memberof google.ads.admanager.v1 - * @interface IOrder - * @property {string|null} [name] Order name - * @property {number|Long|null} [orderId] Order orderId - * @property {string|null} [displayName] Order displayName - * @property {boolean|null} [programmatic] Order programmatic - * @property {string|null} [trafficker] Order trafficker - * @property {Array.|null} [advertiserContacts] Order advertiserContacts - * @property {string|null} [advertiser] Order advertiser - * @property {Array.|null} [agencyContacts] Order agencyContacts - * @property {string|null} [agency] Order agency - * @property {Array.|null} [appliedTeams] Order appliedTeams - * @property {Array.|null} [effectiveTeams] Order effectiveTeams - * @property {string|null} [creator] Order creator - * @property {string|null} [currencyCode] Order currencyCode - * @property {google.protobuf.ITimestamp|null} [startTime] Order startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Order endTime - * @property {boolean|null} [unlimitedEndTime] Order unlimitedEndTime - * @property {number|null} [externalOrderId] Order externalOrderId - * @property {boolean|null} [archived] Order archived - * @property {string|null} [lastModifiedByApp] Order lastModifiedByApp - * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime - * @property {string|null} [notes] Order notes - * @property {string|null} [poNumber] Order poNumber - * @property {google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null} [status] Order status - * @property {string|null} [salesperson] Order salesperson - * @property {Array.|null} [secondarySalespeople] Order secondarySalespeople - * @property {Array.|null} [secondaryTraffickers] Order secondaryTraffickers - * @property {Array.|null} [appliedLabels] Order appliedLabels - * @property {Array.|null} [effectiveAppliedLabels] Order effectiveAppliedLabels - * @property {Array.|null} [customFieldValues] Order customFieldValues - */ + v1.ContentService = (function() { /** - * Constructs a new Order. + * Constructs a new ContentService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents an Order. - * @implements IOrder + * @classdesc Represents a ContentService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.ads.admanager.v1.IOrder=} [properties] Properties to set + * @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 Order(properties) { - this.advertiserContacts = []; - this.agencyContacts = []; - this.appliedTeams = []; - this.effectiveTeams = []; - this.secondarySalespeople = []; - this.secondaryTraffickers = []; - this.appliedLabels = []; - this.effectiveAppliedLabels = []; - this.customFieldValues = []; - 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]]; + function ContentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; + /** - * Order name. - * @member {string} name - * @memberof google.ads.admanager.v1.Order - * @instance + * Creates new ContentService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.ContentService + * @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 {ContentService} RPC service. Useful where requests and/or responses are streamed. */ - Order.prototype.name = ""; + ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Order orderId. - * @member {number|Long|null|undefined} orderId - * @memberof google.ads.admanager.v1.Order - * @instance + * Callback as used by {@link google.ads.admanager.v1.ContentService|getContent}. + * @memberof google.ads.admanager.v1.ContentService + * @typedef GetContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Content} [response] Content */ - Order.prototype.orderId = null; /** - * Order displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.Order + * Calls GetContent. + * @function getContent + * @memberof google.ads.admanager.v1.ContentService * @instance + * @param {google.ads.admanager.v1.IGetContentRequest} request GetContentRequest message or plain object + * @param {google.ads.admanager.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 */ - Order.prototype.displayName = null; + Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { + return this.rpcCall(getContent, $root.google.ads.admanager.v1.GetContentRequest, $root.google.ads.admanager.v1.Content, request, callback); + }, "name", { value: "GetContent" }); /** - * Order programmatic. - * @member {boolean|null|undefined} programmatic - * @memberof google.ads.admanager.v1.Order + * Calls GetContent. + * @function getContent + * @memberof google.ads.admanager.v1.ContentService * @instance + * @param {google.ads.admanager.v1.IGetContentRequest} request GetContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Order.prototype.programmatic = null; /** - * Order trafficker. - * @member {string|null|undefined} trafficker - * @memberof google.ads.admanager.v1.Order - * @instance + * Callback as used by {@link google.ads.admanager.v1.ContentService|listContent}. + * @memberof google.ads.admanager.v1.ContentService + * @typedef ListContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListContentResponse} [response] ListContentResponse */ - Order.prototype.trafficker = null; /** - * Order advertiserContacts. - * @member {Array.} advertiserContacts - * @memberof google.ads.admanager.v1.Order + * Calls ListContent. + * @function listContent + * @memberof google.ads.admanager.v1.ContentService * @instance + * @param {google.ads.admanager.v1.IListContentRequest} request ListContentRequest message or plain object + * @param {google.ads.admanager.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse + * @returns {undefined} + * @variation 1 */ - Order.prototype.advertiserContacts = $util.emptyArray; + Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { + return this.rpcCall(listContent, $root.google.ads.admanager.v1.ListContentRequest, $root.google.ads.admanager.v1.ListContentResponse, request, callback); + }, "name", { value: "ListContent" }); /** - * Order advertiser. - * @member {string|null|undefined} advertiser - * @memberof google.ads.admanager.v1.Order + * Calls ListContent. + * @function listContent + * @memberof google.ads.admanager.v1.ContentService * @instance + * @param {google.ads.admanager.v1.IListContentRequest} request ListContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Order.prototype.advertiser = null; + + return ContentService; + })(); + + v1.GetContentRequest = (function() { /** - * Order agencyContacts. - * @member {Array.} agencyContacts - * @memberof google.ads.admanager.v1.Order - * @instance + * Properties of a GetContentRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetContentRequest + * @property {string|null} [name] GetContentRequest name */ - Order.prototype.agencyContacts = $util.emptyArray; /** - * Order agency. - * @member {string|null|undefined} agency - * @memberof google.ads.admanager.v1.Order - * @instance + * Constructs a new GetContentRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetContentRequest. + * @implements IGetContentRequest + * @constructor + * @param {google.ads.admanager.v1.IGetContentRequest=} [properties] Properties to set */ - Order.prototype.agency = null; + function GetContentRequest(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]]; + } /** - * Order appliedTeams. - * @member {Array.} appliedTeams - * @memberof google.ads.admanager.v1.Order + * GetContentRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetContentRequest * @instance */ - Order.prototype.appliedTeams = $util.emptyArray; + GetContentRequest.prototype.name = ""; /** - * Order effectiveTeams. - * @member {Array.} effectiveTeams - * @memberof google.ads.admanager.v1.Order - * @instance + * Creates a new GetContentRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {google.ads.admanager.v1.IGetContentRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetContentRequest} GetContentRequest instance */ - Order.prototype.effectiveTeams = $util.emptyArray; + GetContentRequest.create = function create(properties) { + return new GetContentRequest(properties); + }; /** - * Order creator. - * @member {string|null|undefined} creator - * @memberof google.ads.admanager.v1.Order - * @instance + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.ads.admanager.v1.GetContentRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {google.ads.admanager.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Order.prototype.creator = null; + GetContentRequest.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; + }; /** - * Order currencyCode. - * @member {string|null|undefined} currencyCode - * @memberof google.ads.admanager.v1.Order - * @instance + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {google.ads.admanager.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Order.prototype.currencyCode = null; + GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Order startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.ads.admanager.v1.Order - * @instance + * Decodes a GetContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.prototype.startTime = null; + GetContentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Order endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.ads.admanager.v1.Order - * @instance + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.prototype.endTime = null; + GetContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Order unlimitedEndTime. - * @member {boolean|null|undefined} unlimitedEndTime - * @memberof google.ads.admanager.v1.Order - * @instance + * Verifies a GetContentRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Order.prototype.unlimitedEndTime = null; + GetContentRequest.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; + }; /** - * Order externalOrderId. - * @member {number|null|undefined} externalOrderId - * @memberof google.ads.admanager.v1.Order - * @instance + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetContentRequest} GetContentRequest */ - Order.prototype.externalOrderId = null; + GetContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetContentRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetContentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Order archived. - * @member {boolean|null|undefined} archived - * @memberof google.ads.admanager.v1.Order - * @instance + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {google.ads.admanager.v1.GetContentRequest} message GetContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Order.prototype.archived = null; + GetContentRequest.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; + }; /** - * Order lastModifiedByApp. - * @member {string|null|undefined} lastModifiedByApp - * @memberof google.ads.admanager.v1.Order + * Converts this GetContentRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetContentRequest * @instance + * @returns {Object.} JSON object */ - Order.prototype.lastModifiedByApp = null; + GetContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Order updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.Order - * @instance + * Gets the default type url for GetContentRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Order.prototype.updateTime = null; + GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetContentRequest"; + }; + + return GetContentRequest; + })(); + + v1.ListContentRequest = (function() { /** - * Order notes. - * @member {string|null|undefined} notes - * @memberof google.ads.admanager.v1.Order - * @instance + * Properties of a ListContentRequest. + * @memberof google.ads.admanager.v1 + * @interface IListContentRequest + * @property {string|null} [parent] ListContentRequest parent + * @property {number|null} [pageSize] ListContentRequest pageSize + * @property {string|null} [pageToken] ListContentRequest pageToken + * @property {string|null} [filter] ListContentRequest filter + * @property {string|null} [orderBy] ListContentRequest orderBy + * @property {number|null} [skip] ListContentRequest skip */ - Order.prototype.notes = null; /** - * Order poNumber. - * @member {string|null|undefined} poNumber - * @memberof google.ads.admanager.v1.Order - * @instance + * Constructs a new ListContentRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListContentRequest. + * @implements IListContentRequest + * @constructor + * @param {google.ads.admanager.v1.IListContentRequest=} [properties] Properties to set */ - Order.prototype.poNumber = null; + function ListContentRequest(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]]; + } /** - * Order status. - * @member {google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null|undefined} status - * @memberof google.ads.admanager.v1.Order + * ListContentRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.status = null; + ListContentRequest.prototype.parent = ""; /** - * Order salesperson. - * @member {string|null|undefined} salesperson - * @memberof google.ads.admanager.v1.Order + * ListContentRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.salesperson = null; + ListContentRequest.prototype.pageSize = 0; /** - * Order secondarySalespeople. - * @member {Array.} secondarySalespeople - * @memberof google.ads.admanager.v1.Order + * ListContentRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.secondarySalespeople = $util.emptyArray; + ListContentRequest.prototype.pageToken = ""; /** - * Order secondaryTraffickers. - * @member {Array.} secondaryTraffickers - * @memberof google.ads.admanager.v1.Order + * ListContentRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.secondaryTraffickers = $util.emptyArray; + ListContentRequest.prototype.filter = ""; /** - * Order appliedLabels. - * @member {Array.} appliedLabels - * @memberof google.ads.admanager.v1.Order + * ListContentRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.appliedLabels = $util.emptyArray; + ListContentRequest.prototype.orderBy = ""; /** - * Order effectiveAppliedLabels. - * @member {Array.} effectiveAppliedLabels - * @memberof google.ads.admanager.v1.Order + * ListContentRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListContentRequest * @instance */ - Order.prototype.effectiveAppliedLabels = $util.emptyArray; + ListContentRequest.prototype.skip = 0; /** - * Order customFieldValues. - * @member {Array.} customFieldValues - * @memberof google.ads.admanager.v1.Order - * @instance + * Creates a new ListContentRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {google.ads.admanager.v1.IListContentRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentRequest} ListContentRequest instance */ - Order.prototype.customFieldValues = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListContentRequest.create = function create(properties) { + return new ListContentRequest(properties); + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_orderId", { - get: $util.oneOfGetter($oneOfFields = ["orderId"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.ads.admanager.v1.ListContentRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {google.ads.admanager.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {google.ads.admanager.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_programmatic", { - get: $util.oneOfGetter($oneOfFields = ["programmatic"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a ListContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_trafficker", { - get: $util.oneOfGetter($oneOfFields = ["trafficker"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_advertiser", { - get: $util.oneOfGetter($oneOfFields = ["advertiser"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_agency", { - get: $util.oneOfGetter($oneOfFields = ["agency"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_creator", { - get: $util.oneOfGetter($oneOfFields = ["creator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_currencyCode", { - get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a ListContentRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContentRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_startTime", { - get: $util.oneOfGetter($oneOfFields = ["startTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListContentRequest} ListContentRequest + */ + ListContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListContentRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_endTime", { - get: $util.oneOfGetter($oneOfFields = ["endTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {google.ads.admanager.v1.ListContentRequest} message ListContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_unlimitedEndTime", { - get: $util.oneOfGetter($oneOfFields = ["unlimitedEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this ListContentRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListContentRequest + * @instance + * @returns {Object.} JSON object + */ + ListContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_externalOrderId", { - get: $util.oneOfGetter($oneOfFields = ["externalOrderId"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Gets the default type url for ListContentRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentRequest"; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_archived", { - get: $util.oneOfGetter($oneOfFields = ["archived"]), - set: $util.oneOfSetter($oneOfFields) - }); + return ListContentRequest; + })(); - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_lastModifiedByApp", { - get: $util.oneOfGetter($oneOfFields = ["lastModifiedByApp"]), - set: $util.oneOfSetter($oneOfFields) - }); + v1.ListContentResponse = (function() { - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a ListContentResponse. + * @memberof google.ads.admanager.v1 + * @interface IListContentResponse + * @property {Array.|null} [content] ListContentResponse content + * @property {string|null} [nextPageToken] ListContentResponse nextPageToken + * @property {number|null} [totalSize] ListContentResponse totalSize + */ - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_notes", { - get: $util.oneOfGetter($oneOfFields = ["notes"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ListContentResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListContentResponse. + * @implements IListContentResponse + * @constructor + * @param {google.ads.admanager.v1.IListContentResponse=} [properties] Properties to set + */ + function ListContentResponse(properties) { + this.content = []; + 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]]; + } - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_poNumber", { - get: $util.oneOfGetter($oneOfFields = ["poNumber"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListContentResponse content. + * @member {Array.} content + * @memberof google.ads.admanager.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.content = $util.emptyArray; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListContentResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.nextPageToken = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Order.prototype, "_salesperson", { - get: $util.oneOfGetter($oneOfFields = ["salesperson"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListContentResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.totalSize = 0; /** - * Creates a new Order instance using the specified properties. + * Creates a new ListContentResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static - * @param {google.ads.admanager.v1.IOrder=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Order} Order instance + * @param {google.ads.admanager.v1.IListContentResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListContentResponse} ListContentResponse instance */ - Order.create = function create(properties) { - return new Order(properties); + ListContentResponse.create = function create(properties) { + return new ListContentResponse(properties); }; /** - * Encodes the specified Order message. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.ads.admanager.v1.ListContentResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static - * @param {google.ads.admanager.v1.IOrder} message Order message or plain object to encode + * @param {google.ads.admanager.v1.IListContentResponse} message ListContentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encode = function encode(message, writer) { + ListContentResponse.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.programmatic != null && Object.hasOwnProperty.call(message, "programmatic")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.programmatic); - if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.orderId); - if (message.advertiserContacts != null && message.advertiserContacts.length) - for (var i = 0; i < message.advertiserContacts.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.advertiserContacts[i]); - if (message.advertiser != null && Object.hasOwnProperty.call(message, "advertiser")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.advertiser); - if (message.agencyContacts != null && message.agencyContacts.length) - for (var i = 0; i < message.agencyContacts.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.agencyContacts[i]); - if (message.agency != null && Object.hasOwnProperty.call(message, "agency")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.agency); - if (message.appliedTeams != null && message.appliedTeams.length) - for (var i = 0; i < message.appliedTeams.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.appliedTeams[i]); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.creator); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.externalOrderId != null && Object.hasOwnProperty.call(message, "externalOrderId")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.externalOrderId); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.archived); - if (message.lastModifiedByApp != null && Object.hasOwnProperty.call(message, "lastModifiedByApp")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.lastModifiedByApp); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.notes); - if (message.poNumber != null && Object.hasOwnProperty.call(message, "poNumber")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.poNumber); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.status); - if (message.salesperson != null && Object.hasOwnProperty.call(message, "salesperson")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.salesperson); - if (message.secondarySalespeople != null && message.secondarySalespeople.length) - for (var i = 0; i < message.secondarySalespeople.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.secondarySalespeople[i]); - if (message.trafficker != null && Object.hasOwnProperty.call(message, "trafficker")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.trafficker); - if (message.secondaryTraffickers != null && message.secondaryTraffickers.length) - for (var i = 0; i < message.secondaryTraffickers.length; ++i) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.secondaryTraffickers[i]); - if (message.appliedLabels != null && message.appliedLabels.length) - for (var i = 0; i < message.appliedLabels.length; ++i) - $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.effectiveAppliedLabels != null && message.effectiveAppliedLabels.length) - for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) - $root.google.ads.admanager.v1.AppliedLabel.encode(message.effectiveAppliedLabels[i], writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.effectiveTeams != null && message.effectiveTeams.length) - for (var i = 0; i < message.effectiveTeams.length; ++i) - writer.uint32(/* id 28, wireType 2 =*/226).string(message.effectiveTeams[i]); - if (message.customFieldValues != null && message.customFieldValues.length) - for (var i = 0; i < message.customFieldValues.length; ++i) - $root.google.ads.admanager.v1.CustomFieldValue.encode(message.customFieldValues[i], writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.unlimitedEndTime != null && Object.hasOwnProperty.call(message, "unlimitedEndTime")) - writer.uint32(/* id 45, wireType 0 =*/360).bool(message.unlimitedEndTime); + if (message.content != null && message.content.length) + for (var i = 0; i < message.content.length; ++i) + $root.google.ads.admanager.v1.Content.encode(message.content[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListContentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static - * @param {google.ads.admanager.v1.IOrder} message Order message or plain object to encode + * @param {google.ads.admanager.v1.IListContentResponse} message ListContentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encodeDelimited = function encodeDelimited(message, writer) { + ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Order message from the specified reader or buffer. + * Decodes a ListContentResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Order} Order + * @returns {google.ads.admanager.v1.ListContentResponse} ListContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decode = function decode(reader, length, error) { + ListContentResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Order(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListContentResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 4: { - message.orderId = reader.int64(); + if (!(message.content && message.content.length)) + message.content = []; + message.content.push($root.google.ads.admanager.v1.Content.decode(reader, reader.uint32())); break; } case 2: { - message.displayName = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.programmatic = reader.bool(); - break; - } - case 23: { - message.trafficker = reader.string(); - break; - } - case 5: { - if (!(message.advertiserContacts && message.advertiserContacts.length)) - message.advertiserContacts = []; - message.advertiserContacts.push(reader.string()); - break; - } - case 6: { - message.advertiser = reader.string(); - break; - } - case 7: { - if (!(message.agencyContacts && message.agencyContacts.length)) - message.agencyContacts = []; - message.agencyContacts.push(reader.string()); - break; - } - case 8: { - message.agency = reader.string(); - break; - } - case 9: { - if (!(message.appliedTeams && message.appliedTeams.length)) - message.appliedTeams = []; - message.appliedTeams.push(reader.string()); - break; - } - case 28: { - if (!(message.effectiveTeams && message.effectiveTeams.length)) - message.effectiveTeams = []; - message.effectiveTeams.push(reader.string()); - break; - } - case 10: { - message.creator = reader.string(); - break; - } - case 11: { - message.currencyCode = reader.string(); - break; - } - case 19: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 45: { - message.unlimitedEndTime = reader.bool(); - break; - } - case 13: { - message.externalOrderId = reader.int32(); - break; - } - case 14: { - message.archived = reader.bool(); - break; - } - case 15: { - message.lastModifiedByApp = reader.string(); - break; - } - case 16: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.notes = reader.string(); - break; - } - case 18: { - message.poNumber = reader.string(); - break; - } - case 20: { - message.status = reader.int32(); - break; - } - case 21: { - message.salesperson = reader.string(); - break; - } - case 22: { - if (!(message.secondarySalespeople && message.secondarySalespeople.length)) - message.secondarySalespeople = []; - message.secondarySalespeople.push(reader.string()); - break; - } - case 24: { - if (!(message.secondaryTraffickers && message.secondaryTraffickers.length)) - message.secondaryTraffickers = []; - message.secondaryTraffickers.push(reader.string()); - break; - } - case 25: { - if (!(message.appliedLabels && message.appliedLabels.length)) - message.appliedLabels = []; - message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); - break; - } - case 26: { - if (!(message.effectiveAppliedLabels && message.effectiveAppliedLabels.length)) - message.effectiveAppliedLabels = []; - message.effectiveAppliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); - break; - } - case 38: { - if (!(message.customFieldValues && message.customFieldValues.length)) - message.customFieldValues = []; - message.customFieldValues.push($root.google.ads.admanager.v1.CustomFieldValue.decode(reader, reader.uint32())); + message.totalSize = reader.int32(); break; } default: @@ -28935,797 +28457,785 @@ }; /** - * Decodes an Order message from the specified reader or buffer, length delimited. + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Order} Order + * @returns {google.ads.admanager.v1.ListContentResponse} ListContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decodeDelimited = function decodeDelimited(reader) { + ListContentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Order message. + * Verifies a ListContentResponse message. * @function verify - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.ListContentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Order.verify = function verify(message) { + ListContentResponse.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.orderId != null && message.hasOwnProperty("orderId")) { - properties._orderId = 1; - if (!$util.isInteger(message.orderId) && !(message.orderId && $util.isInteger(message.orderId.low) && $util.isInteger(message.orderId.high))) - return "orderId: integer|Long expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + if (!Array.isArray(message.content)) + return "content: array expected"; + for (var i = 0; i < message.content.length; ++i) { + var error = $root.google.ads.admanager.v1.Content.verify(message.content[i]); + if (error) + return "content." + error; + } } - if (message.programmatic != null && message.hasOwnProperty("programmatic")) { - properties._programmatic = 1; - if (typeof message.programmatic !== "boolean") - return "programmatic: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListContentResponse} ListContentResponse + */ + ListContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListContentResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListContentResponse(); + if (object.content) { + if (!Array.isArray(object.content)) + throw TypeError(".google.ads.admanager.v1.ListContentResponse.content: array expected"); + message.content = []; + for (var i = 0; i < object.content.length; ++i) { + if (typeof object.content[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListContentResponse.content: object expected"); + message.content[i] = $root.google.ads.admanager.v1.Content.fromObject(object.content[i]); + } } - if (message.trafficker != null && message.hasOwnProperty("trafficker")) { - properties._trafficker = 1; - if (!$util.isString(message.trafficker)) - return "trafficker: string expected"; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListContentResponse + * @static + * @param {google.ads.admanager.v1.ListContentResponse} message ListContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.content = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.advertiserContacts != null && message.hasOwnProperty("advertiserContacts")) { - if (!Array.isArray(message.advertiserContacts)) - return "advertiserContacts: array expected"; - for (var i = 0; i < message.advertiserContacts.length; ++i) - if (!$util.isString(message.advertiserContacts[i])) - return "advertiserContacts: string[] expected"; + if (message.content && message.content.length) { + object.content = []; + for (var j = 0; j < message.content.length; ++j) + object.content[j] = $root.google.ads.admanager.v1.Content.toObject(message.content[j], options); } - if (message.advertiser != null && message.hasOwnProperty("advertiser")) { - properties._advertiser = 1; - if (!$util.isString(message.advertiser)) - return "advertiser: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListContentResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListContentResponse + * @instance + * @returns {Object.} JSON object + */ + ListContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListContentResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.agencyContacts != null && message.hasOwnProperty("agencyContacts")) { - if (!Array.isArray(message.agencyContacts)) - return "agencyContacts: array expected"; - for (var i = 0; i < message.agencyContacts.length; ++i) - if (!$util.isString(message.agencyContacts[i])) - return "agencyContacts: string[] expected"; - } - if (message.agency != null && message.hasOwnProperty("agency")) { - properties._agency = 1; - if (!$util.isString(message.agency)) - return "agency: string expected"; - } - if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { - if (!Array.isArray(message.appliedTeams)) - return "appliedTeams: array expected"; - for (var i = 0; i < message.appliedTeams.length; ++i) - if (!$util.isString(message.appliedTeams[i])) - return "appliedTeams: string[] expected"; - } - if (message.effectiveTeams != null && message.hasOwnProperty("effectiveTeams")) { - if (!Array.isArray(message.effectiveTeams)) - return "effectiveTeams: array expected"; - for (var i = 0; i < message.effectiveTeams.length; ++i) - if (!$util.isString(message.effectiveTeams[i])) - return "effectiveTeams: string[] expected"; - } - if (message.creator != null && message.hasOwnProperty("creator")) { - properties._creator = 1; - if (!$util.isString(message.creator)) - return "creator: string expected"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - properties._currencyCode = 1; - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - properties._startTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - properties._endTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - } - if (message.unlimitedEndTime != null && message.hasOwnProperty("unlimitedEndTime")) { - properties._unlimitedEndTime = 1; - if (typeof message.unlimitedEndTime !== "boolean") - return "unlimitedEndTime: boolean expected"; - } - if (message.externalOrderId != null && message.hasOwnProperty("externalOrderId")) { - properties._externalOrderId = 1; - if (!$util.isInteger(message.externalOrderId)) - return "externalOrderId: integer expected"; - } - if (message.archived != null && message.hasOwnProperty("archived")) { - properties._archived = 1; - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - } - if (message.lastModifiedByApp != null && message.hasOwnProperty("lastModifiedByApp")) { - properties._lastModifiedByApp = 1; - if (!$util.isString(message.lastModifiedByApp)) - return "lastModifiedByApp: string expected"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.notes != null && message.hasOwnProperty("notes")) { - properties._notes = 1; - if (!$util.isString(message.notes)) - return "notes: string expected"; - } - if (message.poNumber != null && message.hasOwnProperty("poNumber")) { - properties._poNumber = 1; - if (!$util.isString(message.poNumber)) - return "poNumber: string expected"; - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; - switch (message.status) { + return typeUrlPrefix + "/google.ads.admanager.v1.ListContentResponse"; + }; + + return ListContentResponse; + })(); + + v1.CreativeTemplateTypeEnum = (function() { + + /** + * Properties of a CreativeTemplateTypeEnum. + * @memberof google.ads.admanager.v1 + * @interface ICreativeTemplateTypeEnum + */ + + /** + * Constructs a new CreativeTemplateTypeEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreativeTemplateTypeEnum. + * @implements ICreativeTemplateTypeEnum + * @constructor + * @param {google.ads.admanager.v1.ICreativeTemplateTypeEnum=} [properties] Properties to set + */ + function CreativeTemplateTypeEnum(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 CreativeTemplateTypeEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateTypeEnum} CreativeTemplateTypeEnum instance + */ + CreativeTemplateTypeEnum.create = function create(properties) { + return new CreativeTemplateTypeEnum(properties); + }; + + /** + * Encodes the specified CreativeTemplateTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateTypeEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateTypeEnum} message CreativeTemplateTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateTypeEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreativeTemplateTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateTypeEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateTypeEnum} message CreativeTemplateTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreativeTemplateTypeEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateTypeEnum} CreativeTemplateTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreativeTemplateTypeEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateTypeEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { default: - return "status: enum value expected"; - case 0: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: + reader.skipType(tag & 7); break; } } - if (message.salesperson != null && message.hasOwnProperty("salesperson")) { - properties._salesperson = 1; - if (!$util.isString(message.salesperson)) - return "salesperson: string expected"; - } - if (message.secondarySalespeople != null && message.hasOwnProperty("secondarySalespeople")) { - if (!Array.isArray(message.secondarySalespeople)) - return "secondarySalespeople: array expected"; - for (var i = 0; i < message.secondarySalespeople.length; ++i) - if (!$util.isString(message.secondarySalespeople[i])) - return "secondarySalespeople: string[] expected"; - } - if (message.secondaryTraffickers != null && message.hasOwnProperty("secondaryTraffickers")) { - if (!Array.isArray(message.secondaryTraffickers)) - return "secondaryTraffickers: array expected"; - for (var i = 0; i < message.secondaryTraffickers.length; ++i) - if (!$util.isString(message.secondaryTraffickers[i])) - return "secondaryTraffickers: string[] expected"; - } - if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { - if (!Array.isArray(message.appliedLabels)) - return "appliedLabels: array expected"; - for (var i = 0; i < message.appliedLabels.length; ++i) { - var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); - if (error) - return "appliedLabels." + error; - } - } - if (message.effectiveAppliedLabels != null && message.hasOwnProperty("effectiveAppliedLabels")) { - if (!Array.isArray(message.effectiveAppliedLabels)) - return "effectiveAppliedLabels: array expected"; - for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) { - var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.effectiveAppliedLabels[i]); - if (error) - return "effectiveAppliedLabels." + error; - } - } - if (message.customFieldValues != null && message.hasOwnProperty("customFieldValues")) { - if (!Array.isArray(message.customFieldValues)) - return "customFieldValues: array expected"; - for (var i = 0; i < message.customFieldValues.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomFieldValue.verify(message.customFieldValues[i]); - if (error) - return "customFieldValues." + error; - } - } + return message; + }; + + /** + * Decodes a CreativeTemplateTypeEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateTypeEnum} CreativeTemplateTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreativeTemplateTypeEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreativeTemplateTypeEnum message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreativeTemplateTypeEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates an Order message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Order} Order + * @returns {google.ads.admanager.v1.CreativeTemplateTypeEnum} CreativeTemplateTypeEnum */ - Order.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Order) + CreativeTemplateTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.Order(); - if (object.name != null) - message.name = String(object.name); - if (object.orderId != null) - if ($util.Long) - (message.orderId = $util.Long.fromValue(object.orderId)).unsigned = false; - else if (typeof object.orderId === "string") - message.orderId = parseInt(object.orderId, 10); - else if (typeof object.orderId === "number") - message.orderId = object.orderId; - else if (typeof object.orderId === "object") - message.orderId = new $util.LongBits(object.orderId.low >>> 0, object.orderId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.programmatic != null) - message.programmatic = Boolean(object.programmatic); - if (object.trafficker != null) - message.trafficker = String(object.trafficker); - if (object.advertiserContacts) { - if (!Array.isArray(object.advertiserContacts)) - throw TypeError(".google.ads.admanager.v1.Order.advertiserContacts: array expected"); - message.advertiserContacts = []; - for (var i = 0; i < object.advertiserContacts.length; ++i) - message.advertiserContacts[i] = String(object.advertiserContacts[i]); - } - if (object.advertiser != null) - message.advertiser = String(object.advertiser); - if (object.agencyContacts) { - if (!Array.isArray(object.agencyContacts)) - throw TypeError(".google.ads.admanager.v1.Order.agencyContacts: array expected"); - message.agencyContacts = []; - for (var i = 0; i < object.agencyContacts.length; ++i) - message.agencyContacts[i] = String(object.agencyContacts[i]); - } - if (object.agency != null) - message.agency = String(object.agency); - if (object.appliedTeams) { - if (!Array.isArray(object.appliedTeams)) - throw TypeError(".google.ads.admanager.v1.Order.appliedTeams: array expected"); - message.appliedTeams = []; - for (var i = 0; i < object.appliedTeams.length; ++i) - message.appliedTeams[i] = String(object.appliedTeams[i]); - } - if (object.effectiveTeams) { - if (!Array.isArray(object.effectiveTeams)) - throw TypeError(".google.ads.admanager.v1.Order.effectiveTeams: array expected"); - message.effectiveTeams = []; - for (var i = 0; i < object.effectiveTeams.length; ++i) - message.effectiveTeams[i] = String(object.effectiveTeams[i]); - } - if (object.creator != null) - message.creator = String(object.creator); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.ads.admanager.v1.Order.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.ads.admanager.v1.Order.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.unlimitedEndTime != null) - message.unlimitedEndTime = Boolean(object.unlimitedEndTime); - if (object.externalOrderId != null) - message.externalOrderId = object.externalOrderId | 0; - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.lastModifiedByApp != null) - message.lastModifiedByApp = String(object.lastModifiedByApp); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.Order.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + return new $root.google.ads.admanager.v1.CreativeTemplateTypeEnum(); + }; + + /** + * Creates a plain object from a CreativeTemplateTypeEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {google.ads.admanager.v1.CreativeTemplateTypeEnum} message CreativeTemplateTypeEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreativeTemplateTypeEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreativeTemplateTypeEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @instance + * @returns {Object.} JSON object + */ + CreativeTemplateTypeEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreativeTemplateTypeEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateTypeEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreativeTemplateTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.notes != null) - message.notes = String(object.notes); - if (object.poNumber != null) - message.poNumber = String(object.poNumber); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateTypeEnum"; + }; + + /** + * CreativeTemplateType enum. + * @name google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType + * @enum {number} + * @property {number} CREATIVE_TEMPLATE_TYPE_UNSPECIFIED=0 CREATIVE_TEMPLATE_TYPE_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} CUSTOM=2 CUSTOM value + */ + CreativeTemplateTypeEnum.CreativeTemplateType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CREATIVE_TEMPLATE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "CUSTOM"] = 2; + return values; + })(); + + return CreativeTemplateTypeEnum; + })(); + + v1.CreativeTemplateStatusEnum = (function() { + + /** + * Properties of a CreativeTemplateStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface ICreativeTemplateStatusEnum + */ + + /** + * Constructs a new CreativeTemplateStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreativeTemplateStatusEnum. + * @implements ICreativeTemplateStatusEnum + * @constructor + * @param {google.ads.admanager.v1.ICreativeTemplateStatusEnum=} [properties] Properties to set + */ + function CreativeTemplateStatusEnum(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 CreativeTemplateStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateStatusEnum} CreativeTemplateStatusEnum instance + */ + CreativeTemplateStatusEnum.create = function create(properties) { + return new CreativeTemplateStatusEnum(properties); + }; + + /** + * Encodes the specified CreativeTemplateStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateStatusEnum} message CreativeTemplateStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreativeTemplateStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateStatusEnum} message CreativeTemplateStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreativeTemplateStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateStatusEnum} CreativeTemplateStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreativeTemplateStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - } - break; - case "ORDER_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "DRAFT": - case 2: - message.status = 2; - break; - case "PENDING_APPROVAL": - case 3: - message.status = 3; - break; - case "APPROVED": - case 4: - message.status = 4; - break; - case "DISAPPROVED": - case 5: - message.status = 5; - break; - case "PAUSED": - case 6: - message.status = 6; - break; - case "CANCELED": - case 7: - message.status = 7; - break; - case "DELETED": - case 8: - message.status = 8; - break; - } - if (object.salesperson != null) - message.salesperson = String(object.salesperson); - if (object.secondarySalespeople) { - if (!Array.isArray(object.secondarySalespeople)) - throw TypeError(".google.ads.admanager.v1.Order.secondarySalespeople: array expected"); - message.secondarySalespeople = []; - for (var i = 0; i < object.secondarySalespeople.length; ++i) - message.secondarySalespeople[i] = String(object.secondarySalespeople[i]); - } - if (object.secondaryTraffickers) { - if (!Array.isArray(object.secondaryTraffickers)) - throw TypeError(".google.ads.admanager.v1.Order.secondaryTraffickers: array expected"); - message.secondaryTraffickers = []; - for (var i = 0; i < object.secondaryTraffickers.length; ++i) - message.secondaryTraffickers[i] = String(object.secondaryTraffickers[i]); - } - if (object.appliedLabels) { - if (!Array.isArray(object.appliedLabels)) - throw TypeError(".google.ads.admanager.v1.Order.appliedLabels: array expected"); - message.appliedLabels = []; - for (var i = 0; i < object.appliedLabels.length; ++i) { - if (typeof object.appliedLabels[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Order.appliedLabels: object expected"); - message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); - } - } - if (object.effectiveAppliedLabels) { - if (!Array.isArray(object.effectiveAppliedLabels)) - throw TypeError(".google.ads.admanager.v1.Order.effectiveAppliedLabels: array expected"); - message.effectiveAppliedLabels = []; - for (var i = 0; i < object.effectiveAppliedLabels.length; ++i) { - if (typeof object.effectiveAppliedLabels[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Order.effectiveAppliedLabels: object expected"); - message.effectiveAppliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.effectiveAppliedLabels[i]); - } - } - if (object.customFieldValues) { - if (!Array.isArray(object.customFieldValues)) - throw TypeError(".google.ads.admanager.v1.Order.customFieldValues: array expected"); - message.customFieldValues = []; - for (var i = 0; i < object.customFieldValues.length; ++i) { - if (typeof object.customFieldValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Order.customFieldValues: object expected"); - message.customFieldValues[i] = $root.google.ads.admanager.v1.CustomFieldValue.fromObject(object.customFieldValues[i]); } } return message; }; /** - * Creates a plain object from an Order message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Order + * Decodes a CreativeTemplateStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum * @static - * @param {google.ads.admanager.v1.Order} message Order - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateStatusEnum} CreativeTemplateStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.advertiserContacts = []; - object.agencyContacts = []; - object.appliedTeams = []; - object.secondarySalespeople = []; - object.secondaryTraffickers = []; - object.appliedLabels = []; - object.effectiveAppliedLabels = []; - object.effectiveTeams = []; - object.customFieldValues = []; - } - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.programmatic != null && message.hasOwnProperty("programmatic")) { - object.programmatic = message.programmatic; - if (options.oneofs) - object._programmatic = "programmatic"; - } - if (message.orderId != null && message.hasOwnProperty("orderId")) { - if (typeof message.orderId === "number") - object.orderId = options.longs === String ? String(message.orderId) : message.orderId; - else - object.orderId = options.longs === String ? $util.Long.prototype.toString.call(message.orderId) : options.longs === Number ? new $util.LongBits(message.orderId.low >>> 0, message.orderId.high >>> 0).toNumber() : message.orderId; - if (options.oneofs) - object._orderId = "orderId"; - } - if (message.advertiserContacts && message.advertiserContacts.length) { - object.advertiserContacts = []; - for (var j = 0; j < message.advertiserContacts.length; ++j) - object.advertiserContacts[j] = message.advertiserContacts[j]; - } - if (message.advertiser != null && message.hasOwnProperty("advertiser")) { - object.advertiser = message.advertiser; - if (options.oneofs) - object._advertiser = "advertiser"; - } - if (message.agencyContacts && message.agencyContacts.length) { - object.agencyContacts = []; - for (var j = 0; j < message.agencyContacts.length; ++j) - object.agencyContacts[j] = message.agencyContacts[j]; - } - if (message.agency != null && message.hasOwnProperty("agency")) { - object.agency = message.agency; - if (options.oneofs) - object._agency = "agency"; - } - if (message.appliedTeams && message.appliedTeams.length) { - object.appliedTeams = []; - for (var j = 0; j < message.appliedTeams.length; ++j) - object.appliedTeams[j] = message.appliedTeams[j]; - } - if (message.creator != null && message.hasOwnProperty("creator")) { - object.creator = message.creator; - if (options.oneofs) - object._creator = "creator"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - object.currencyCode = message.currencyCode; - if (options.oneofs) - object._currencyCode = "currencyCode"; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (options.oneofs) - object._endTime = "endTime"; - } - if (message.externalOrderId != null && message.hasOwnProperty("externalOrderId")) { - object.externalOrderId = message.externalOrderId; - if (options.oneofs) - object._externalOrderId = "externalOrderId"; - } - if (message.archived != null && message.hasOwnProperty("archived")) { - object.archived = message.archived; - if (options.oneofs) - object._archived = "archived"; - } - if (message.lastModifiedByApp != null && message.hasOwnProperty("lastModifiedByApp")) { - object.lastModifiedByApp = message.lastModifiedByApp; - if (options.oneofs) - object._lastModifiedByApp = "lastModifiedByApp"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.notes != null && message.hasOwnProperty("notes")) { - object.notes = message.notes; - if (options.oneofs) - object._notes = "notes"; - } - if (message.poNumber != null && message.hasOwnProperty("poNumber")) { - object.poNumber = message.poNumber; - if (options.oneofs) - object._poNumber = "poNumber"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (options.oneofs) - object._startTime = "startTime"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.OrderStatusEnum.OrderStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.OrderStatusEnum.OrderStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.salesperson != null && message.hasOwnProperty("salesperson")) { - object.salesperson = message.salesperson; - if (options.oneofs) - object._salesperson = "salesperson"; - } - if (message.secondarySalespeople && message.secondarySalespeople.length) { - object.secondarySalespeople = []; - for (var j = 0; j < message.secondarySalespeople.length; ++j) - object.secondarySalespeople[j] = message.secondarySalespeople[j]; - } - if (message.trafficker != null && message.hasOwnProperty("trafficker")) { - object.trafficker = message.trafficker; - if (options.oneofs) - object._trafficker = "trafficker"; - } - if (message.secondaryTraffickers && message.secondaryTraffickers.length) { - object.secondaryTraffickers = []; - for (var j = 0; j < message.secondaryTraffickers.length; ++j) - object.secondaryTraffickers[j] = message.secondaryTraffickers[j]; - } - if (message.appliedLabels && message.appliedLabels.length) { - object.appliedLabels = []; - for (var j = 0; j < message.appliedLabels.length; ++j) - object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); - } - if (message.effectiveAppliedLabels && message.effectiveAppliedLabels.length) { - object.effectiveAppliedLabels = []; - for (var j = 0; j < message.effectiveAppliedLabels.length; ++j) - object.effectiveAppliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.effectiveAppliedLabels[j], options); - } - if (message.effectiveTeams && message.effectiveTeams.length) { - object.effectiveTeams = []; - for (var j = 0; j < message.effectiveTeams.length; ++j) - object.effectiveTeams[j] = message.effectiveTeams[j]; - } - if (message.customFieldValues && message.customFieldValues.length) { - object.customFieldValues = []; - for (var j = 0; j < message.customFieldValues.length; ++j) - object.customFieldValues[j] = $root.google.ads.admanager.v1.CustomFieldValue.toObject(message.customFieldValues[j], options); - } - if (message.unlimitedEndTime != null && message.hasOwnProperty("unlimitedEndTime")) { - object.unlimitedEndTime = message.unlimitedEndTime; - if (options.oneofs) - object._unlimitedEndTime = "unlimitedEndTime"; - } - return object; + CreativeTemplateStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Converts this Order to JSON. + * Verifies a CreativeTemplateStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreativeTemplateStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreativeTemplateStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateStatusEnum} CreativeTemplateStatusEnum + */ + CreativeTemplateStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateStatusEnum) + return object; + return new $root.google.ads.admanager.v1.CreativeTemplateStatusEnum(); + }; + + /** + * Creates a plain object from a CreativeTemplateStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum + * @static + * @param {google.ads.admanager.v1.CreativeTemplateStatusEnum} message CreativeTemplateStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreativeTemplateStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreativeTemplateStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum * @instance * @returns {Object.} JSON object */ - Order.prototype.toJSON = function toJSON() { + CreativeTemplateStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Order + * Gets the default type url for CreativeTemplateStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.Order + * @memberof google.ads.admanager.v1.CreativeTemplateStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreativeTemplateStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Order"; + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateStatusEnum"; }; - return Order; + /** + * CreativeTemplateStatus enum. + * @name google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus + * @enum {number} + * @property {number} CREATIVE_TEMPLATE_STATUS_UNSPECIFIED=0 CREATIVE_TEMPLATE_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DELETED=2 DELETED value + * @property {number} INACTIVE=3 INACTIVE value + */ + CreativeTemplateStatusEnum.CreativeTemplateStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CREATIVE_TEMPLATE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "INACTIVE"] = 3; + return values; + })(); + + return CreativeTemplateStatusEnum; })(); - v1.OrderService = (function() { + v1.CreativeTemplate = (function() { /** - * Constructs a new OrderService service. + * Properties of a CreativeTemplate. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OrderService - * @extends $protobuf.rpc.Service + * @interface ICreativeTemplate + * @property {string|null} [name] CreativeTemplate name + * @property {string|null} [displayName] CreativeTemplate displayName + * @property {string|null} [description] CreativeTemplate description + * @property {string|null} [snippet] CreativeTemplate snippet + * @property {google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|null} [status] CreativeTemplate status + * @property {google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|null} [type] CreativeTemplate type + * @property {boolean|null} [interstitial] CreativeTemplate interstitial + * @property {boolean|null} [nativeEligible] CreativeTemplate nativeEligible + * @property {boolean|null} [nativeVideoEligible] CreativeTemplate nativeVideoEligible + * @property {boolean|null} [safeFrameCompatible] CreativeTemplate safeFrameCompatible + * @property {Array.|null} [variables] CreativeTemplate variables + */ + + /** + * Constructs a new CreativeTemplate. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreativeTemplate. + * @implements ICreativeTemplate * @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 + * @param {google.ads.admanager.v1.ICreativeTemplate=} [properties] Properties to set */ - function OrderService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function CreativeTemplate(properties) { + this.variables = []; + 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]]; } - (OrderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OrderService; - /** - * Creates new OrderService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.OrderService - * @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 {OrderService} RPC service. Useful where requests and/or responses are streamed. + * CreativeTemplate name. + * @member {string} name + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance */ - OrderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + CreativeTemplate.prototype.name = ""; /** - * Callback as used by {@link google.ads.admanager.v1.OrderService|getOrder}. - * @memberof google.ads.admanager.v1.OrderService - * @typedef GetOrderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Order} [response] Order + * CreativeTemplate displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance */ + CreativeTemplate.prototype.displayName = null; /** - * Calls GetOrder. - * @function getOrder - * @memberof google.ads.admanager.v1.OrderService + * CreativeTemplate description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance - * @param {google.ads.admanager.v1.IGetOrderRequest} request GetOrderRequest message or plain object - * @param {google.ads.admanager.v1.OrderService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(OrderService.prototype.getOrder = function getOrder(request, callback) { - return this.rpcCall(getOrder, $root.google.ads.admanager.v1.GetOrderRequest, $root.google.ads.admanager.v1.Order, request, callback); - }, "name", { value: "GetOrder" }); + CreativeTemplate.prototype.description = null; /** - * Calls GetOrder. - * @function getOrder - * @memberof google.ads.admanager.v1.OrderService + * CreativeTemplate snippet. + * @member {string|null|undefined} snippet + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance - * @param {google.ads.admanager.v1.IGetOrderRequest} request GetOrderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreativeTemplate.prototype.snippet = null; /** - * Callback as used by {@link google.ads.admanager.v1.OrderService|listOrders}. - * @memberof google.ads.admanager.v1.OrderService - * @typedef ListOrdersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListOrdersResponse} [response] ListOrdersResponse + * CreativeTemplate status. + * @member {google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus|null|undefined} status + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance */ + CreativeTemplate.prototype.status = null; /** - * Calls ListOrders. - * @function listOrders - * @memberof google.ads.admanager.v1.OrderService + * CreativeTemplate type. + * @member {google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType|null|undefined} type + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance - * @param {google.ads.admanager.v1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @param {google.ads.admanager.v1.OrderService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(OrderService.prototype.listOrders = function listOrders(request, callback) { - return this.rpcCall(listOrders, $root.google.ads.admanager.v1.ListOrdersRequest, $root.google.ads.admanager.v1.ListOrdersResponse, request, callback); - }, "name", { value: "ListOrders" }); + CreativeTemplate.prototype.type = null; /** - * Calls ListOrders. - * @function listOrders - * @memberof google.ads.admanager.v1.OrderService + * CreativeTemplate interstitial. + * @member {boolean|null|undefined} interstitial + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance - * @param {google.ads.admanager.v1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreativeTemplate.prototype.interstitial = null; - return OrderService; - })(); - - v1.GetOrderRequest = (function() { + /** + * CreativeTemplate nativeEligible. + * @member {boolean|null|undefined} nativeEligible + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance + */ + CreativeTemplate.prototype.nativeEligible = null; /** - * Properties of a GetOrderRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetOrderRequest - * @property {string|null} [name] GetOrderRequest name + * CreativeTemplate nativeVideoEligible. + * @member {boolean|null|undefined} nativeVideoEligible + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance */ + CreativeTemplate.prototype.nativeVideoEligible = null; /** - * Constructs a new GetOrderRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetOrderRequest. - * @implements IGetOrderRequest - * @constructor - * @param {google.ads.admanager.v1.IGetOrderRequest=} [properties] Properties to set + * CreativeTemplate safeFrameCompatible. + * @member {boolean|null|undefined} safeFrameCompatible + * @memberof google.ads.admanager.v1.CreativeTemplate + * @instance */ - function GetOrderRequest(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]]; - } + CreativeTemplate.prototype.safeFrameCompatible = null; /** - * GetOrderRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetOrderRequest + * CreativeTemplate variables. + * @member {Array.} variables + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance */ - GetOrderRequest.prototype.name = ""; + CreativeTemplate.prototype.variables = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_snippet", { + get: $util.oneOfGetter($oneOfFields = ["snippet"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_interstitial", { + get: $util.oneOfGetter($oneOfFields = ["interstitial"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_nativeEligible", { + get: $util.oneOfGetter($oneOfFields = ["nativeEligible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_nativeVideoEligible", { + get: $util.oneOfGetter($oneOfFields = ["nativeVideoEligible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplate.prototype, "_safeFrameCompatible", { + get: $util.oneOfGetter($oneOfFields = ["safeFrameCompatible"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GetOrderRequest instance using the specified properties. + * Creates a new CreativeTemplate instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static - * @param {google.ads.admanager.v1.IGetOrderRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest instance + * @param {google.ads.admanager.v1.ICreativeTemplate=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplate} CreativeTemplate instance */ - GetOrderRequest.create = function create(properties) { - return new GetOrderRequest(properties); + CreativeTemplate.create = function create(properties) { + return new CreativeTemplate(properties); }; /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * Encodes the specified CreativeTemplate message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplate.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static - * @param {google.ads.admanager.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICreativeTemplate} message CreativeTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrderRequest.encode = function encode(message, writer) { + CreativeTemplate.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.snippet != null && Object.hasOwnProperty.call(message, "snippet")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.snippet); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.interstitial != null && Object.hasOwnProperty.call(message, "interstitial")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.interstitial); + if (message.nativeEligible != null && Object.hasOwnProperty.call(message, "nativeEligible")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.nativeEligible); + if (message.nativeVideoEligible != null && Object.hasOwnProperty.call(message, "nativeVideoEligible")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.nativeVideoEligible); + if (message.safeFrameCompatible != null && Object.hasOwnProperty.call(message, "safeFrameCompatible")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.safeFrameCompatible); + if (message.variables != null && message.variables.length) + for (var i = 0; i < message.variables.length; ++i) + $root.google.ads.admanager.v1.CreativeTemplateVariable.encode(message.variables[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * Encodes the specified CreativeTemplate message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplate.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static - * @param {google.ads.admanager.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICreativeTemplate} message CreativeTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreativeTemplate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOrderRequest message from the specified reader or buffer. + * Decodes a CreativeTemplate message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + * @returns {google.ads.admanager.v1.CreativeTemplate} CreativeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrderRequest.decode = function decode(reader, length, error) { + CreativeTemplate.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOrderRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplate(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -29735,6 +29245,48 @@ message.name = reader.string(); break; } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.snippet = reader.string(); + break; + } + case 6: { + message.status = reader.int32(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.interstitial = reader.bool(); + break; + } + case 9: { + message.nativeEligible = reader.bool(); + break; + } + case 10: { + message.nativeVideoEligible = reader.bool(); + break; + } + case 12: { + message.safeFrameCompatible = reader.bool(); + break; + } + case 14: { + if (!(message.variables && message.variables.length)) + message.variables = []; + message.variables.push($root.google.ads.admanager.v1.CreativeTemplateVariable.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -29744,127 +29296,318 @@ }; /** - * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + * @returns {google.ads.admanager.v1.CreativeTemplate} CreativeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { + CreativeTemplate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOrderRequest message. + * Verifies a CreativeTemplate message. * @function verify - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOrderRequest.verify = function verify(message) { + CreativeTemplate.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.snippet != null && message.hasOwnProperty("snippet")) { + properties._snippet = 1; + if (!$util.isString(message.snippet)) + return "snippet: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.interstitial != null && message.hasOwnProperty("interstitial")) { + properties._interstitial = 1; + if (typeof message.interstitial !== "boolean") + return "interstitial: boolean expected"; + } + if (message.nativeEligible != null && message.hasOwnProperty("nativeEligible")) { + properties._nativeEligible = 1; + if (typeof message.nativeEligible !== "boolean") + return "nativeEligible: boolean expected"; + } + if (message.nativeVideoEligible != null && message.hasOwnProperty("nativeVideoEligible")) { + properties._nativeVideoEligible = 1; + if (typeof message.nativeVideoEligible !== "boolean") + return "nativeVideoEligible: boolean expected"; + } + if (message.safeFrameCompatible != null && message.hasOwnProperty("safeFrameCompatible")) { + properties._safeFrameCompatible = 1; + if (typeof message.safeFrameCompatible !== "boolean") + return "safeFrameCompatible: boolean expected"; + } + if (message.variables != null && message.hasOwnProperty("variables")) { + if (!Array.isArray(message.variables)) + return "variables: array expected"; + for (var i = 0; i < message.variables.length; ++i) { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.verify(message.variables[i]); + if (error) + return "variables." + error; + } + } return null; }; /** - * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + * @returns {google.ads.admanager.v1.CreativeTemplate} CreativeTemplate */ - GetOrderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetOrderRequest) + CreativeTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplate) return object; - var message = new $root.google.ads.admanager.v1.GetOrderRequest(); + var message = new $root.google.ads.admanager.v1.CreativeTemplate(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.snippet != null) + message.snippet = String(object.snippet); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "CREATIVE_TEMPLATE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "DELETED": + case 2: + message.status = 2; + break; + case "INACTIVE": + case 3: + message.status = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "CREATIVE_TEMPLATE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STANDARD": + case 1: + message.type = 1; + break; + case "CUSTOM": + case 2: + message.type = 2; + break; + } + if (object.interstitial != null) + message.interstitial = Boolean(object.interstitial); + if (object.nativeEligible != null) + message.nativeEligible = Boolean(object.nativeEligible); + if (object.nativeVideoEligible != null) + message.nativeVideoEligible = Boolean(object.nativeVideoEligible); + if (object.safeFrameCompatible != null) + message.safeFrameCompatible = Boolean(object.safeFrameCompatible); + if (object.variables) { + if (!Array.isArray(object.variables)) + throw TypeError(".google.ads.admanager.v1.CreativeTemplate.variables: array expected"); + message.variables = []; + for (var i = 0; i < object.variables.length; ++i) { + if (typeof object.variables[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplate.variables: object expected"); + message.variables[i] = $root.google.ads.admanager.v1.CreativeTemplateVariable.fromObject(object.variables[i]); + } + } return message; }; /** - * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreativeTemplate message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static - * @param {google.ads.admanager.v1.GetOrderRequest} message GetOrderRequest + * @param {google.ads.admanager.v1.CreativeTemplate} message CreativeTemplate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOrderRequest.toObject = function toObject(message, options) { + CreativeTemplate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.variables = []; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.snippet != null && message.hasOwnProperty("snippet")) { + object.snippet = message.snippet; + if (options.oneofs) + object._snippet = "snippet"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.interstitial != null && message.hasOwnProperty("interstitial")) { + object.interstitial = message.interstitial; + if (options.oneofs) + object._interstitial = "interstitial"; + } + if (message.nativeEligible != null && message.hasOwnProperty("nativeEligible")) { + object.nativeEligible = message.nativeEligible; + if (options.oneofs) + object._nativeEligible = "nativeEligible"; + } + if (message.nativeVideoEligible != null && message.hasOwnProperty("nativeVideoEligible")) { + object.nativeVideoEligible = message.nativeVideoEligible; + if (options.oneofs) + object._nativeVideoEligible = "nativeVideoEligible"; + } + if (message.safeFrameCompatible != null && message.hasOwnProperty("safeFrameCompatible")) { + object.safeFrameCompatible = message.safeFrameCompatible; + if (options.oneofs) + object._safeFrameCompatible = "safeFrameCompatible"; + } + if (message.variables && message.variables.length) { + object.variables = []; + for (var j = 0; j < message.variables.length; ++j) + object.variables[j] = $root.google.ads.admanager.v1.CreativeTemplateVariable.toObject(message.variables[j], options); + } return object; }; /** - * Converts this GetOrderRequest to JSON. + * Converts this CreativeTemplate to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @instance * @returns {Object.} JSON object */ - GetOrderRequest.prototype.toJSON = function toJSON() { + CreativeTemplate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOrderRequest + * Gets the default type url for CreativeTemplate * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetOrderRequest + * @memberof google.ads.admanager.v1.CreativeTemplate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreativeTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetOrderRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplate"; }; - return GetOrderRequest; + return CreativeTemplate; })(); - v1.ListOrdersRequest = (function() { + v1.CreativeTemplateVariable = (function() { /** - * Properties of a ListOrdersRequest. + * Properties of a CreativeTemplateVariable. * @memberof google.ads.admanager.v1 - * @interface IListOrdersRequest - * @property {string|null} [parent] ListOrdersRequest parent - * @property {number|null} [pageSize] ListOrdersRequest pageSize - * @property {string|null} [pageToken] ListOrdersRequest pageToken - * @property {string|null} [filter] ListOrdersRequest filter - * @property {string|null} [orderBy] ListOrdersRequest orderBy - * @property {number|null} [skip] ListOrdersRequest skip + * @interface ICreativeTemplateVariable + * @property {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable|null} [assetVariable] CreativeTemplateVariable assetVariable + * @property {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable|null} [listStringVariable] CreativeTemplateVariable listStringVariable + * @property {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable|null} [longVariable] CreativeTemplateVariable longVariable + * @property {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable|null} [stringVariable] CreativeTemplateVariable stringVariable + * @property {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable|null} [urlVariable] CreativeTemplateVariable urlVariable + * @property {string|null} [label] CreativeTemplateVariable label + * @property {string|null} [uniqueDisplayName] CreativeTemplateVariable uniqueDisplayName + * @property {string|null} [description] CreativeTemplateVariable description + * @property {boolean|null} [required] CreativeTemplateVariable required */ /** - * Constructs a new ListOrdersRequest. + * Constructs a new CreativeTemplateVariable. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOrdersRequest. - * @implements IListOrdersRequest + * @classdesc Represents a CreativeTemplateVariable. + * @implements ICreativeTemplateVariable * @constructor - * @param {google.ads.admanager.v1.IListOrdersRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICreativeTemplateVariable=} [properties] Properties to set */ - function ListOrdersRequest(properties) { + function CreativeTemplateVariable(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29872,147 +29615,227 @@ } /** - * ListOrdersRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable assetVariable. + * @member {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable|null|undefined} assetVariable + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.parent = ""; + CreativeTemplateVariable.prototype.assetVariable = null; /** - * ListOrdersRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable listStringVariable. + * @member {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable|null|undefined} listStringVariable + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.pageSize = 0; + CreativeTemplateVariable.prototype.listStringVariable = null; /** - * ListOrdersRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable longVariable. + * @member {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable|null|undefined} longVariable + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.pageToken = ""; + CreativeTemplateVariable.prototype.longVariable = null; /** - * ListOrdersRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable stringVariable. + * @member {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable|null|undefined} stringVariable + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.filter = ""; + CreativeTemplateVariable.prototype.stringVariable = null; /** - * ListOrdersRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable urlVariable. + * @member {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable|null|undefined} urlVariable + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.orderBy = ""; + CreativeTemplateVariable.prototype.urlVariable = null; /** - * ListOrdersRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListOrdersRequest + * CreativeTemplateVariable label. + * @member {string|null|undefined} label + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance */ - ListOrdersRequest.prototype.skip = 0; + CreativeTemplateVariable.prototype.label = null; /** - * Creates a new ListOrdersRequest instance using the specified properties. + * CreativeTemplateVariable uniqueDisplayName. + * @member {string|null|undefined} uniqueDisplayName + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @instance + */ + CreativeTemplateVariable.prototype.uniqueDisplayName = null; + + /** + * CreativeTemplateVariable description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @instance + */ + CreativeTemplateVariable.prototype.description = null; + + /** + * CreativeTemplateVariable required. + * @member {boolean|null|undefined} required + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @instance + */ + CreativeTemplateVariable.prototype.required = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreativeTemplateVariable SubType. + * @member {"assetVariable"|"listStringVariable"|"longVariable"|"stringVariable"|"urlVariable"|undefined} SubType + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @instance + */ + Object.defineProperty(CreativeTemplateVariable.prototype, "SubType", { + get: $util.oneOfGetter($oneOfFields = ["assetVariable", "listStringVariable", "longVariable", "stringVariable", "urlVariable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplateVariable.prototype, "_label", { + get: $util.oneOfGetter($oneOfFields = ["label"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplateVariable.prototype, "_uniqueDisplayName", { + get: $util.oneOfGetter($oneOfFields = ["uniqueDisplayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplateVariable.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreativeTemplateVariable.prototype, "_required", { + get: $util.oneOfGetter($oneOfFields = ["required"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreativeTemplateVariable instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static - * @param {google.ads.admanager.v1.IListOrdersRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest instance + * @param {google.ads.admanager.v1.ICreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable} CreativeTemplateVariable instance */ - ListOrdersRequest.create = function create(properties) { - return new ListOrdersRequest(properties); + CreativeTemplateVariable.create = function create(properties) { + return new CreativeTemplateVariable(properties); }; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified CreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static - * @param {google.ads.admanager.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICreativeTemplateVariable} message CreativeTemplateVariable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersRequest.encode = function encode(message, writer) { + CreativeTemplateVariable.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.uniqueDisplayName != null && Object.hasOwnProperty.call(message, "uniqueDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uniqueDisplayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.required); + if (message.assetVariable != null && Object.hasOwnProperty.call(message, "assetVariable")) + $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.encode(message.assetVariable, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listStringVariable != null && Object.hasOwnProperty.call(message, "listStringVariable")) + $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.encode(message.listStringVariable, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.longVariable != null && Object.hasOwnProperty.call(message, "longVariable")) + $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.encode(message.longVariable, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.stringVariable != null && Object.hasOwnProperty.call(message, "stringVariable")) + $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.encode(message.stringVariable, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.urlVariable != null && Object.hasOwnProperty.call(message, "urlVariable")) + $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.encode(message.urlVariable, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified CreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static - * @param {google.ads.admanager.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICreativeTemplateVariable} message CreativeTemplateVariable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer. + * Decodes a CreativeTemplateVariable message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.ads.admanager.v1.CreativeTemplateVariable} CreativeTemplateVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersRequest.decode = function decode(reader, length, error) { + CreativeTemplateVariable.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOrdersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 5: { + message.assetVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.decode(reader, reader.uint32()); break; } - case 2: { - message.pageSize = reader.int32(); + case 7: { + message.listStringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.decode(reader, reader.uint32()); break; } - case 3: { - message.pageToken = reader.string(); + case 8: { + message.longVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.decode(reader, reader.uint32()); break; } - case 4: { - message.filter = reader.string(); + case 9: { + message.stringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.decode(reader, reader.uint32()); break; } - case 5: { - message.orderBy = reader.string(); + case 10: { + message.urlVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.decode(reader, reader.uint32()); break; } - case 6: { - message.skip = reader.int32(); + case 1: { + message.label = reader.string(); + break; + } + case 2: { + message.uniqueDisplayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.required = reader.bool(); break; } default: @@ -30024,1256 +29847,2290 @@ }; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * Decodes a CreativeTemplateVariable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.ads.admanager.v1.CreativeTemplateVariable} CreativeTemplateVariable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersRequest.decodeDelimited = function decodeDelimited(reader) { + CreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOrdersRequest message. + * Verifies a CreativeTemplateVariable message. * @function verify - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOrdersRequest.verify = function verify(message) { + CreativeTemplateVariable.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + var properties = {}; + if (message.assetVariable != null && message.hasOwnProperty("assetVariable")) { + properties.SubType = 1; + { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.verify(message.assetVariable); + if (error) + return "assetVariable." + error; + } + } + if (message.listStringVariable != null && message.hasOwnProperty("listStringVariable")) { + if (properties.SubType === 1) + return "SubType: multiple values"; + properties.SubType = 1; + { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.verify(message.listStringVariable); + if (error) + return "listStringVariable." + error; + } + } + if (message.longVariable != null && message.hasOwnProperty("longVariable")) { + if (properties.SubType === 1) + return "SubType: multiple values"; + properties.SubType = 1; + { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.verify(message.longVariable); + if (error) + return "longVariable." + error; + } + } + if (message.stringVariable != null && message.hasOwnProperty("stringVariable")) { + if (properties.SubType === 1) + return "SubType: multiple values"; + properties.SubType = 1; + { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.verify(message.stringVariable); + if (error) + return "stringVariable." + error; + } + } + if (message.urlVariable != null && message.hasOwnProperty("urlVariable")) { + if (properties.SubType === 1) + return "SubType: multiple values"; + properties.SubType = 1; + { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.verify(message.urlVariable); + if (error) + return "urlVariable." + error; + } + } + if (message.label != null && message.hasOwnProperty("label")) { + properties._label = 1; + if (!$util.isString(message.label)) + return "label: string expected"; + } + if (message.uniqueDisplayName != null && message.hasOwnProperty("uniqueDisplayName")) { + properties._uniqueDisplayName = 1; + if (!$util.isString(message.uniqueDisplayName)) + return "uniqueDisplayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.required != null && message.hasOwnProperty("required")) { + properties._required = 1; + if (typeof message.required !== "boolean") + return "required: boolean expected"; + } return null; }; /** - * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.ads.admanager.v1.CreativeTemplateVariable} CreativeTemplateVariable */ - ListOrdersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOrdersRequest) + CreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable) return object; - var message = new $root.google.ads.admanager.v1.ListOrdersRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable(); + if (object.assetVariable != null) { + if (typeof object.assetVariable !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.assetVariable: object expected"); + message.assetVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.fromObject(object.assetVariable); + } + if (object.listStringVariable != null) { + if (typeof object.listStringVariable !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.listStringVariable: object expected"); + message.listStringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.fromObject(object.listStringVariable); + } + if (object.longVariable != null) { + if (typeof object.longVariable !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.longVariable: object expected"); + message.longVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.fromObject(object.longVariable); + } + if (object.stringVariable != null) { + if (typeof object.stringVariable !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.stringVariable: object expected"); + message.stringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.fromObject(object.stringVariable); + } + if (object.urlVariable != null) { + if (typeof object.urlVariable !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.urlVariable: object expected"); + message.urlVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.fromObject(object.urlVariable); + } + if (object.label != null) + message.label = String(object.label); + if (object.uniqueDisplayName != null) + message.uniqueDisplayName = String(object.uniqueDisplayName); + if (object.description != null) + message.description = String(object.description); + if (object.required != null) + message.required = Boolean(object.required); return message; }; /** - * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreativeTemplateVariable message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static - * @param {google.ads.admanager.v1.ListOrdersRequest} message ListOrdersRequest + * @param {google.ads.admanager.v1.CreativeTemplateVariable} message CreativeTemplateVariable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOrdersRequest.toObject = function toObject(message, options) { + CreativeTemplateVariable.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.skip = 0; + if (message.label != null && message.hasOwnProperty("label")) { + object.label = message.label; + if (options.oneofs) + object._label = "label"; + } + if (message.uniqueDisplayName != null && message.hasOwnProperty("uniqueDisplayName")) { + object.uniqueDisplayName = message.uniqueDisplayName; + if (options.oneofs) + object._uniqueDisplayName = "uniqueDisplayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.required != null && message.hasOwnProperty("required")) { + object.required = message.required; + if (options.oneofs) + object._required = "required"; + } + if (message.assetVariable != null && message.hasOwnProperty("assetVariable")) { + object.assetVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.toObject(message.assetVariable, options); + if (options.oneofs) + object.SubType = "assetVariable"; + } + if (message.listStringVariable != null && message.hasOwnProperty("listStringVariable")) { + object.listStringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.toObject(message.listStringVariable, options); + if (options.oneofs) + object.SubType = "listStringVariable"; + } + if (message.longVariable != null && message.hasOwnProperty("longVariable")) { + object.longVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.toObject(message.longVariable, options); + if (options.oneofs) + object.SubType = "longVariable"; + } + if (message.stringVariable != null && message.hasOwnProperty("stringVariable")) { + object.stringVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.toObject(message.stringVariable, options); + if (options.oneofs) + object.SubType = "stringVariable"; + } + if (message.urlVariable != null && message.hasOwnProperty("urlVariable")) { + object.urlVariable = $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.toObject(message.urlVariable, options); + if (options.oneofs) + object.SubType = "urlVariable"; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListOrdersRequest to JSON. + * Converts this CreativeTemplateVariable to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @instance * @returns {Object.} JSON object */ - ListOrdersRequest.prototype.toJSON = function toJSON() { + CreativeTemplateVariable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOrdersRequest + * Gets the default type url for CreativeTemplateVariable * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOrdersRequest + * @memberof google.ads.admanager.v1.CreativeTemplateVariable * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOrdersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOrdersRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable"; }; - return ListOrdersRequest; - })(); - - v1.ListOrdersResponse = (function() { - - /** - * Properties of a ListOrdersResponse. - * @memberof google.ads.admanager.v1 - * @interface IListOrdersResponse - * @property {Array.|null} [orders] ListOrdersResponse orders - * @property {string|null} [nextPageToken] ListOrdersResponse nextPageToken - * @property {number|null} [totalSize] ListOrdersResponse totalSize - */ - - /** - * Constructs a new ListOrdersResponse. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListOrdersResponse. - * @implements IListOrdersResponse - * @constructor - * @param {google.ads.admanager.v1.IListOrdersResponse=} [properties] Properties to set - */ - function ListOrdersResponse(properties) { - this.orders = []; - 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]]; - } + CreativeTemplateVariable.AssetCreativeTemplateVariable = (function() { - /** - * ListOrdersResponse orders. - * @member {Array.} orders - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @instance - */ - ListOrdersResponse.prototype.orders = $util.emptyArray; + /** + * Properties of an AssetCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @interface IAssetCreativeTemplateVariable + * @property {Array.|null} [mimeTypes] AssetCreativeTemplateVariable mimeTypes + */ - /** - * ListOrdersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @instance - */ - ListOrdersResponse.prototype.nextPageToken = ""; + /** + * Constructs a new AssetCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @classdesc Represents an AssetCreativeTemplateVariable. + * @implements IAssetCreativeTemplateVariable + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable=} [properties] Properties to set + */ + function AssetCreativeTemplateVariable(properties) { + this.mimeTypes = []; + 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]]; + } - /** - * ListOrdersResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @instance - */ - ListOrdersResponse.prototype.totalSize = 0; + /** + * AssetCreativeTemplateVariable mimeTypes. + * @member {Array.} mimeTypes + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @instance + */ + AssetCreativeTemplateVariable.prototype.mimeTypes = $util.emptyArray; - /** - * Creates a new ListOrdersResponse instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {google.ads.admanager.v1.IListOrdersResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse instance - */ - ListOrdersResponse.create = function create(properties) { - return new ListOrdersResponse(properties); - }; + /** + * Creates a new AssetCreativeTemplateVariable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable} AssetCreativeTemplateVariable instance + */ + AssetCreativeTemplateVariable.create = function create(properties) { + return new AssetCreativeTemplateVariable(properties); + }; - /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {google.ads.admanager.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOrdersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.orders != null && message.orders.length) - for (var i = 0; i < message.orders.length; ++i) - $root.google.ads.admanager.v1.Order.encode(message.orders[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); - return writer; - }; + /** + * Encodes the specified AssetCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable} message AssetCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetCreativeTemplateVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeTypes != null && message.mimeTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.mimeTypes.length; ++i) + writer.int32(message.mimeTypes[i]); + writer.ldelim(); + } + return writer; + }; - /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {google.ads.admanager.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOrdersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AssetCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IAssetCreativeTemplateVariable} message AssetCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetCreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListOrdersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOrdersResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOrdersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.orders && message.orders.length)) - message.orders = []; - message.orders.push($root.google.ads.admanager.v1.Order.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + /** + * Decodes an AssetCreativeTemplateVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable} AssetCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetCreativeTemplateVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 3: { - message.totalSize = reader.int32(); + switch (tag >>> 3) { + case 1: { + if (!(message.mimeTypes && message.mimeTypes.length)) + message.mimeTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.mimeTypes.push(reader.int32()); + } else + message.mimeTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOrdersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AssetCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable} AssetCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetCreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListOrdersResponse message. - * @function verify - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOrdersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.orders != null && message.hasOwnProperty("orders")) { - if (!Array.isArray(message.orders)) - return "orders: array expected"; - for (var i = 0; i < message.orders.length; ++i) { - var error = $root.google.ads.admanager.v1.Order.verify(message.orders[i]); - if (error) - return "orders." + error; + /** + * Verifies an AssetCreativeTemplateVariable message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetCreativeTemplateVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeTypes != null && message.hasOwnProperty("mimeTypes")) { + if (!Array.isArray(message.mimeTypes)) + return "mimeTypes: array expected"; + for (var i = 0; i < message.mimeTypes.length; ++i) + switch (message.mimeTypes[i]) { + default: + return "mimeTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; - return null; - }; + return null; + }; - /** - * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse - */ - ListOrdersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListOrdersResponse) - return object; - var message = new $root.google.ads.admanager.v1.ListOrdersResponse(); - if (object.orders) { - if (!Array.isArray(object.orders)) - throw TypeError(".google.ads.admanager.v1.ListOrdersResponse.orders: array expected"); - message.orders = []; - for (var i = 0; i < object.orders.length; ++i) { - if (typeof object.orders[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListOrdersResponse.orders: object expected"); - message.orders[i] = $root.google.ads.admanager.v1.Order.fromObject(object.orders[i]); + /** + * Creates an AssetCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable} AssetCreativeTemplateVariable + */ + AssetCreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable(); + if (object.mimeTypes) { + if (!Array.isArray(object.mimeTypes)) + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.mimeTypes: array expected"); + message.mimeTypes = []; + for (var i = 0; i < object.mimeTypes.length; ++i) + switch (object.mimeTypes[i]) { + default: + if (typeof object.mimeTypes[i] === "number") { + message.mimeTypes[i] = object.mimeTypes[i]; + break; + } + case "MIME_TYPE_UNSPECIFIED": + case 0: + message.mimeTypes[i] = 0; + break; + case "JPG": + case 1: + message.mimeTypes[i] = 1; + break; + case "PNG": + case 2: + message.mimeTypes[i] = 2; + break; + case "GIF": + case 3: + message.mimeTypes[i] = 3; + break; + } } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; - return message; - }; - - /** - * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {google.ads.admanager.v1.ListOrdersResponse} message ListOrdersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOrdersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.orders = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.orders && message.orders.length) { - object.orders = []; - for (var j = 0; j < message.orders.length; ++j) - object.orders[j] = $root.google.ads.admanager.v1.Order.toObject(message.orders[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; - }; - - /** - * Converts this ListOrdersResponse to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @instance - * @returns {Object.} JSON object - */ - ListOrdersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOrdersResponse - * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListOrdersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOrdersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.ListOrdersResponse"; - }; + return message; + }; - return ListOrdersResponse; - })(); + /** + * Creates a plain object from an AssetCreativeTemplateVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable} message AssetCreativeTemplateVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetCreativeTemplateVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mimeTypes = []; + if (message.mimeTypes && message.mimeTypes.length) { + object.mimeTypes = []; + for (var j = 0; j < message.mimeTypes.length; ++j) + object.mimeTypes[j] = options.enums === String ? $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType[message.mimeTypes[j]] === undefined ? message.mimeTypes[j] : $root.google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType[message.mimeTypes[j]] : message.mimeTypes[j]; + } + return object; + }; - v1.PlacementStatusEnum = (function() { + /** + * Converts this AssetCreativeTemplateVariable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @instance + * @returns {Object.} JSON object + */ + AssetCreativeTemplateVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a PlacementStatusEnum. - * @memberof google.ads.admanager.v1 - * @interface IPlacementStatusEnum - */ + /** + * Gets the default type url for AssetCreativeTemplateVariable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssetCreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable"; + }; - /** - * Constructs a new PlacementStatusEnum. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a PlacementStatusEnum. - * @implements IPlacementStatusEnum - * @constructor - * @param {google.ads.admanager.v1.IPlacementStatusEnum=} [properties] Properties to set - */ - function PlacementStatusEnum(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]]; - } + /** + * MimeType enum. + * @name google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType + * @enum {number} + * @property {number} MIME_TYPE_UNSPECIFIED=0 MIME_TYPE_UNSPECIFIED value + * @property {number} JPG=1 JPG value + * @property {number} PNG=2 PNG value + * @property {number} GIF=3 GIF value + */ + AssetCreativeTemplateVariable.MimeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIME_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "JPG"] = 1; + values[valuesById[2] = "PNG"] = 2; + values[valuesById[3] = "GIF"] = 3; + return values; + })(); - /** - * Creates a new PlacementStatusEnum instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {google.ads.admanager.v1.IPlacementStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum instance - */ - PlacementStatusEnum.create = function create(properties) { - return new PlacementStatusEnum(properties); - }; + return AssetCreativeTemplateVariable; + })(); - /** - * Encodes the specified PlacementStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {google.ads.admanager.v1.IPlacementStatusEnum} message PlacementStatusEnum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementStatusEnum.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + CreativeTemplateVariable.ListStringCreativeTemplateVariable = (function() { - /** - * Encodes the specified PlacementStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {google.ads.admanager.v1.IPlacementStatusEnum} message PlacementStatusEnum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListStringCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @interface IListStringCreativeTemplateVariable + * @property {string|null} [defaultValue] ListStringCreativeTemplateVariable defaultValue + * @property {string|null} [sampleValue] ListStringCreativeTemplateVariable sampleValue + * @property {Array.|null} [choices] ListStringCreativeTemplateVariable choices + * @property {boolean|null} [allowOtherChoice] ListStringCreativeTemplateVariable allowOtherChoice + */ - /** - * Decodes a PlacementStatusEnum message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementStatusEnum.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PlacementStatusEnum(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new ListStringCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @classdesc Represents a ListStringCreativeTemplateVariable. + * @implements IListStringCreativeTemplateVariable + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable=} [properties] Properties to set + */ + function ListStringCreativeTemplateVariable(properties) { + this.choices = []; + 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 message; - }; - /** - * Decodes a PlacementStatusEnum message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementStatusEnum.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListStringCreativeTemplateVariable defaultValue. + * @member {string|null|undefined} defaultValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @instance + */ + ListStringCreativeTemplateVariable.prototype.defaultValue = null; - /** - * Verifies a PlacementStatusEnum message. - * @function verify - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlacementStatusEnum.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * ListStringCreativeTemplateVariable sampleValue. + * @member {string|null|undefined} sampleValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @instance + */ + ListStringCreativeTemplateVariable.prototype.sampleValue = null; - /** - * Creates a PlacementStatusEnum message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum - */ - PlacementStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.PlacementStatusEnum) - return object; - return new $root.google.ads.admanager.v1.PlacementStatusEnum(); - }; + /** + * ListStringCreativeTemplateVariable choices. + * @member {Array.} choices + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @instance + */ + ListStringCreativeTemplateVariable.prototype.choices = $util.emptyArray; - /** - * Creates a plain object from a PlacementStatusEnum message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {google.ads.admanager.v1.PlacementStatusEnum} message PlacementStatusEnum - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlacementStatusEnum.toObject = function toObject() { - return {}; - }; + /** + * ListStringCreativeTemplateVariable allowOtherChoice. + * @member {boolean|null|undefined} allowOtherChoice + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @instance + */ + ListStringCreativeTemplateVariable.prototype.allowOtherChoice = null; - /** - * Converts this PlacementStatusEnum to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @instance - * @returns {Object.} JSON object - */ - PlacementStatusEnum.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Gets the default type url for PlacementStatusEnum - * @function getTypeUrl - * @memberof google.ads.admanager.v1.PlacementStatusEnum - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlacementStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.PlacementStatusEnum"; - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListStringCreativeTemplateVariable.prototype, "_defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["defaultValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * PlacementStatus enum. - * @name google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus - * @enum {number} - * @property {number} PLACEMENT_STATUS_UNSPECIFIED=0 PLACEMENT_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - * @property {number} ARCHIVED=3 ARCHIVED value - */ - PlacementStatusEnum.PlacementStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLACEMENT_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - values[valuesById[3] = "ARCHIVED"] = 3; - return values; - })(); + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListStringCreativeTemplateVariable.prototype, "_sampleValue", { + get: $util.oneOfGetter($oneOfFields = ["sampleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - return PlacementStatusEnum; - })(); + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListStringCreativeTemplateVariable.prototype, "_allowOtherChoice", { + get: $util.oneOfGetter($oneOfFields = ["allowOtherChoice"]), + set: $util.oneOfSetter($oneOfFields) + }); - v1.Placement = (function() { + /** + * Creates a new ListStringCreativeTemplateVariable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable} ListStringCreativeTemplateVariable instance + */ + ListStringCreativeTemplateVariable.create = function create(properties) { + return new ListStringCreativeTemplateVariable(properties); + }; - /** - * Properties of a Placement. - * @memberof google.ads.admanager.v1 - * @interface IPlacement - * @property {string|null} [name] Placement name - * @property {number|Long|null} [placementId] Placement placementId - * @property {string|null} [displayName] Placement displayName - * @property {string|null} [description] Placement description - * @property {string|null} [placementCode] Placement placementCode - * @property {google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null} [status] Placement status - * @property {Array.|null} [targetedAdUnits] Placement targetedAdUnits - * @property {google.protobuf.ITimestamp|null} [updateTime] Placement updateTime - */ + /** + * Encodes the specified ListStringCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable} message ListStringCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStringCreativeTemplateVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultValue); + if (message.sampleValue != null && Object.hasOwnProperty.call(message, "sampleValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sampleValue); + if (message.choices != null && message.choices.length) + for (var i = 0; i < message.choices.length; ++i) + $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.encode(message.choices[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.allowOtherChoice != null && Object.hasOwnProperty.call(message, "allowOtherChoice")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowOtherChoice); + return writer; + }; - /** - * Constructs a new Placement. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a Placement. - * @implements IPlacement - * @constructor - * @param {google.ads.admanager.v1.IPlacement=} [properties] Properties to set - */ - function Placement(properties) { - this.targetedAdUnits = []; - 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 ListStringCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IListStringCreativeTemplateVariable} message ListStringCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStringCreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Placement name. - * @member {string} name - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.name = ""; + /** + * Decodes a ListStringCreativeTemplateVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable} ListStringCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStringCreativeTemplateVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.defaultValue = reader.string(); + break; + } + case 2: { + message.sampleValue = reader.string(); + break; + } + case 3: { + if (!(message.choices && message.choices.length)) + message.choices = []; + message.choices.push($root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.decode(reader, reader.uint32())); + break; + } + case 4: { + message.allowOtherChoice = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Placement placementId. - * @member {number|Long} placementId - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.placementId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Decodes a ListStringCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable} ListStringCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStringCreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Placement displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.displayName = null; + /** + * Verifies a ListStringCreativeTemplateVariable message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStringCreativeTemplateVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + properties._defaultValue = 1; + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + properties._sampleValue = 1; + if (!$util.isString(message.sampleValue)) + return "sampleValue: string expected"; + } + if (message.choices != null && message.hasOwnProperty("choices")) { + if (!Array.isArray(message.choices)) + return "choices: array expected"; + for (var i = 0; i < message.choices.length; ++i) { + var error = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.verify(message.choices[i]); + if (error) + return "choices." + error; + } + } + if (message.allowOtherChoice != null && message.hasOwnProperty("allowOtherChoice")) { + properties._allowOtherChoice = 1; + if (typeof message.allowOtherChoice !== "boolean") + return "allowOtherChoice: boolean expected"; + } + return null; + }; - /** - * Placement description. - * @member {string|null|undefined} description - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.description = null; + /** + * Creates a ListStringCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable} ListStringCreativeTemplateVariable + */ + ListStringCreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable(); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.sampleValue != null) + message.sampleValue = String(object.sampleValue); + if (object.choices) { + if (!Array.isArray(object.choices)) + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.choices: array expected"); + message.choices = []; + for (var i = 0; i < object.choices.length; ++i) { + if (typeof object.choices[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.choices: object expected"); + message.choices[i] = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.fromObject(object.choices[i]); + } + } + if (object.allowOtherChoice != null) + message.allowOtherChoice = Boolean(object.allowOtherChoice); + return message; + }; - /** - * Placement placementCode. - * @member {string|null|undefined} placementCode - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.placementCode = null; + /** + * Creates a plain object from a ListStringCreativeTemplateVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable} message ListStringCreativeTemplateVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStringCreativeTemplateVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.choices = []; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + object.defaultValue = message.defaultValue; + if (options.oneofs) + object._defaultValue = "defaultValue"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + object.sampleValue = message.sampleValue; + if (options.oneofs) + object._sampleValue = "sampleValue"; + } + if (message.choices && message.choices.length) { + object.choices = []; + for (var j = 0; j < message.choices.length; ++j) + object.choices[j] = $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.toObject(message.choices[j], options); + } + if (message.allowOtherChoice != null && message.hasOwnProperty("allowOtherChoice")) { + object.allowOtherChoice = message.allowOtherChoice; + if (options.oneofs) + object._allowOtherChoice = "allowOtherChoice"; + } + return object; + }; - /** - * Placement status. - * @member {google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null|undefined} status - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.status = null; + /** + * Converts this ListStringCreativeTemplateVariable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @instance + * @returns {Object.} JSON object + */ + ListStringCreativeTemplateVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Placement targetedAdUnits. - * @member {Array.} targetedAdUnits - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.targetedAdUnits = $util.emptyArray; + /** + * Gets the default type url for ListStringCreativeTemplateVariable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStringCreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable"; + }; - /** - * Placement updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.Placement - * @instance - */ - Placement.prototype.updateTime = null; + ListStringCreativeTemplateVariable.VariableChoice = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a VariableChoice. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @interface IVariableChoice + * @property {string|null} [label] VariableChoice label + * @property {string|null} [value] VariableChoice value + */ - // Virtual OneOf for proto3 optional field - Object.defineProperty(Placement.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new VariableChoice. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + * @classdesc Represents a VariableChoice. + * @implements IVariableChoice + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice=} [properties] Properties to set + */ + function VariableChoice(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]]; + } - // Virtual OneOf for proto3 optional field - Object.defineProperty(Placement.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * VariableChoice label. + * @member {string|null|undefined} label + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @instance + */ + VariableChoice.prototype.label = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Placement.prototype, "_placementCode", { - get: $util.oneOfGetter($oneOfFields = ["placementCode"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * VariableChoice value. + * @member {string|null|undefined} value + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @instance + */ + VariableChoice.prototype.value = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Placement.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Placement.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(VariableChoice.prototype, "_label", { + get: $util.oneOfGetter($oneOfFields = ["label"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new Placement instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {google.ads.admanager.v1.IPlacement=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Placement} Placement instance - */ - Placement.create = function create(properties) { - return new Placement(properties); - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(VariableChoice.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified Placement message. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {google.ads.admanager.v1.IPlacement} message Placement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Placement.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.placementId != null && Object.hasOwnProperty.call(message, "placementId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.placementId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.placementCode != null && Object.hasOwnProperty.call(message, "placementCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.placementCode); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); - if (message.targetedAdUnits != null && message.targetedAdUnits.length) - for (var i = 0; i < message.targetedAdUnits.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedAdUnits[i]); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Creates a new VariableChoice instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice} VariableChoice instance + */ + VariableChoice.create = function create(properties) { + return new VariableChoice(properties); + }; - /** - * Encodes the specified Placement message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {google.ads.admanager.v1.IPlacement} message Placement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Placement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified VariableChoice message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice} message VariableChoice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariableChoice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; - /** - * Decodes a Placement message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Placement} Placement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Placement.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Placement(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; + /** + * Encodes the specified VariableChoice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.IVariableChoice} message VariableChoice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariableChoice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VariableChoice message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice} VariableChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariableChoice.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.label = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - case 2: { - message.placementId = reader.int64(); - break; + return message; + }; + + /** + * Decodes a VariableChoice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice} VariableChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariableChoice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VariableChoice message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VariableChoice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.label != null && message.hasOwnProperty("label")) { + properties._label = 1; + if (!$util.isString(message.label)) + return "label: string expected"; } - case 3: { - message.displayName = reader.string(); - break; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; } - case 4: { - message.description = reader.string(); - break; + return null; + }; + + /** + * Creates a VariableChoice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice} VariableChoice + */ + VariableChoice.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a VariableChoice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice} message VariableChoice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VariableChoice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.label != null && message.hasOwnProperty("label")) { + object.label = message.label; + if (options.oneofs) + object._label = "label"; } - case 5: { - message.placementCode = reader.string(); - break; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; } - case 6: { - message.status = reader.int32(); - break; + return object; + }; + + /** + * Converts this VariableChoice to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @instance + * @returns {Object.} JSON object + */ + VariableChoice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VariableChoice + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VariableChoice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - case 7: { - if (!(message.targetedAdUnits && message.targetedAdUnits.length)) - message.targetedAdUnits = []; - message.targetedAdUnits.push(reader.string()); + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice"; + }; + + return VariableChoice; + })(); + + return ListStringCreativeTemplateVariable; + })(); + + CreativeTemplateVariable.LongCreativeTemplateVariable = (function() { + + /** + * Properties of a LongCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @interface ILongCreativeTemplateVariable + * @property {number|Long|null} [defaultValue] LongCreativeTemplateVariable defaultValue + * @property {number|Long|null} [sampleValue] LongCreativeTemplateVariable sampleValue + */ + + /** + * Constructs a new LongCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @classdesc Represents a LongCreativeTemplateVariable. + * @implements ILongCreativeTemplateVariable + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable=} [properties] Properties to set + */ + function LongCreativeTemplateVariable(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]]; + } + + /** + * LongCreativeTemplateVariable defaultValue. + * @member {number|Long|null|undefined} defaultValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @instance + */ + LongCreativeTemplateVariable.prototype.defaultValue = null; + + /** + * LongCreativeTemplateVariable sampleValue. + * @member {number|Long|null|undefined} sampleValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @instance + */ + LongCreativeTemplateVariable.prototype.sampleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LongCreativeTemplateVariable.prototype, "_defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["defaultValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LongCreativeTemplateVariable.prototype, "_sampleValue", { + get: $util.oneOfGetter($oneOfFields = ["sampleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LongCreativeTemplateVariable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable} LongCreativeTemplateVariable instance + */ + LongCreativeTemplateVariable.create = function create(properties) { + return new LongCreativeTemplateVariable(properties); + }; + + /** + * Encodes the specified LongCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable} message LongCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongCreativeTemplateVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.defaultValue); + if (message.sampleValue != null && Object.hasOwnProperty.call(message, "sampleValue")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sampleValue); + return writer; + }; + + /** + * Encodes the specified LongCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.ILongCreativeTemplateVariable} message LongCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongCreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongCreativeTemplateVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable} LongCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongCreativeTemplateVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.defaultValue = reader.int64(); + break; + } + case 2: { + message.sampleValue = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Placement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Placement} Placement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Placement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LongCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable} LongCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongCreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Placement message. - * @function verify - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Placement.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.placementId != null && message.hasOwnProperty("placementId")) - if (!$util.isInteger(message.placementId) && !(message.placementId && $util.isInteger(message.placementId.low) && $util.isInteger(message.placementId.high))) - return "placementId: integer|Long expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.placementCode != null && message.hasOwnProperty("placementCode")) { - properties._placementCode = 1; - if (!$util.isString(message.placementCode)) - return "placementCode: string expected"; - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + /** + * Verifies a LongCreativeTemplateVariable message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongCreativeTemplateVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + properties._defaultValue = 1; + if (!$util.isInteger(message.defaultValue) && !(message.defaultValue && $util.isInteger(message.defaultValue.low) && $util.isInteger(message.defaultValue.high))) + return "defaultValue: integer|Long expected"; } - } - if (message.targetedAdUnits != null && message.hasOwnProperty("targetedAdUnits")) { - if (!Array.isArray(message.targetedAdUnits)) - return "targetedAdUnits: array expected"; - for (var i = 0; i < message.targetedAdUnits.length; ++i) - if (!$util.isString(message.targetedAdUnits[i])) - return "targetedAdUnits: string[] expected"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + properties._sampleValue = 1; + if (!$util.isInteger(message.sampleValue) && !(message.sampleValue && $util.isInteger(message.sampleValue.low) && $util.isInteger(message.sampleValue.high))) + return "sampleValue: integer|Long expected"; } - } - return null; - }; + return null; + }; - /** - * Creates a Placement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Placement} Placement - */ - Placement.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Placement) + /** + * Creates a LongCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable} LongCreativeTemplateVariable + */ + LongCreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable(); + if (object.defaultValue != null) + if ($util.Long) + (message.defaultValue = $util.Long.fromValue(object.defaultValue)).unsigned = false; + else if (typeof object.defaultValue === "string") + message.defaultValue = parseInt(object.defaultValue, 10); + else if (typeof object.defaultValue === "number") + message.defaultValue = object.defaultValue; + else if (typeof object.defaultValue === "object") + message.defaultValue = new $util.LongBits(object.defaultValue.low >>> 0, object.defaultValue.high >>> 0).toNumber(); + if (object.sampleValue != null) + if ($util.Long) + (message.sampleValue = $util.Long.fromValue(object.sampleValue)).unsigned = false; + else if (typeof object.sampleValue === "string") + message.sampleValue = parseInt(object.sampleValue, 10); + else if (typeof object.sampleValue === "number") + message.sampleValue = object.sampleValue; + else if (typeof object.sampleValue === "object") + message.sampleValue = new $util.LongBits(object.sampleValue.low >>> 0, object.sampleValue.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LongCreativeTemplateVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable} message LongCreativeTemplateVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongCreativeTemplateVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + if (typeof message.defaultValue === "number") + object.defaultValue = options.longs === String ? String(message.defaultValue) : message.defaultValue; + else + object.defaultValue = options.longs === String ? $util.Long.prototype.toString.call(message.defaultValue) : options.longs === Number ? new $util.LongBits(message.defaultValue.low >>> 0, message.defaultValue.high >>> 0).toNumber() : message.defaultValue; + if (options.oneofs) + object._defaultValue = "defaultValue"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + if (typeof message.sampleValue === "number") + object.sampleValue = options.longs === String ? String(message.sampleValue) : message.sampleValue; + else + object.sampleValue = options.longs === String ? $util.Long.prototype.toString.call(message.sampleValue) : options.longs === Number ? new $util.LongBits(message.sampleValue.low >>> 0, message.sampleValue.high >>> 0).toNumber() : message.sampleValue; + if (options.oneofs) + object._sampleValue = "sampleValue"; + } return object; - var message = new $root.google.ads.admanager.v1.Placement(); - if (object.name != null) - message.name = String(object.name); - if (object.placementId != null) - if ($util.Long) - (message.placementId = $util.Long.fromValue(object.placementId)).unsigned = false; - else if (typeof object.placementId === "string") - message.placementId = parseInt(object.placementId, 10); - else if (typeof object.placementId === "number") - message.placementId = object.placementId; - else if (typeof object.placementId === "object") - message.placementId = new $util.LongBits(object.placementId.low >>> 0, object.placementId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.placementCode != null) - message.placementCode = String(object.placementCode); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; + }; + + /** + * Converts this LongCreativeTemplateVariable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @instance + * @returns {Object.} JSON object + */ + LongCreativeTemplateVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongCreativeTemplateVariable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongCreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - break; - case "PLACEMENT_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "ACTIVE": - case 1: - message.status = 1; - break; - case "INACTIVE": - case 2: - message.status = 2; - break; - case "ARCHIVED": - case 3: - message.status = 3; - break; - } - if (object.targetedAdUnits) { - if (!Array.isArray(object.targetedAdUnits)) - throw TypeError(".google.ads.admanager.v1.Placement.targetedAdUnits: array expected"); - message.targetedAdUnits = []; - for (var i = 0; i < object.targetedAdUnits.length; ++i) - message.targetedAdUnits[i] = String(object.targetedAdUnits[i]); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.Placement.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable"; + }; - /** - * Creates a plain object from a Placement message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {google.ads.admanager.v1.Placement} message Placement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Placement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.targetedAdUnits = []; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.placementId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.placementId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.placementId != null && message.hasOwnProperty("placementId")) - if (typeof message.placementId === "number") - object.placementId = options.longs === String ? String(message.placementId) : message.placementId; - else - object.placementId = options.longs === String ? $util.Long.prototype.toString.call(message.placementId) : options.longs === Number ? new $util.LongBits(message.placementId.low >>> 0, message.placementId.high >>> 0).toNumber() : message.placementId; - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.placementCode != null && message.hasOwnProperty("placementCode")) { - object.placementCode = message.placementCode; - if (options.oneofs) - object._placementCode = "placementCode"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.targetedAdUnits && message.targetedAdUnits.length) { - object.targetedAdUnits = []; - for (var j = 0; j < message.targetedAdUnits.length; ++j) - object.targetedAdUnits[j] = message.targetedAdUnits[j]; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - return object; - }; + return LongCreativeTemplateVariable; + })(); - /** - * Converts this Placement to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Placement - * @instance - * @returns {Object.} JSON object - */ - Placement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + CreativeTemplateVariable.StringCreativeTemplateVariable = (function() { - /** - * Gets the default type url for Placement - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Placement - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Placement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Properties of a StringCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @interface IStringCreativeTemplateVariable + * @property {string|null} [defaultValue] StringCreativeTemplateVariable defaultValue + * @property {string|null} [sampleValue] StringCreativeTemplateVariable sampleValue + */ + + /** + * Constructs a new StringCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @classdesc Represents a StringCreativeTemplateVariable. + * @implements IStringCreativeTemplateVariable + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable=} [properties] Properties to set + */ + function StringCreativeTemplateVariable(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.ads.admanager.v1.Placement"; - }; - return Placement; - })(); + /** + * StringCreativeTemplateVariable defaultValue. + * @member {string|null|undefined} defaultValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @instance + */ + StringCreativeTemplateVariable.prototype.defaultValue = null; - v1.PlacementService = (function() { + /** + * StringCreativeTemplateVariable sampleValue. + * @member {string|null|undefined} sampleValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @instance + */ + StringCreativeTemplateVariable.prototype.sampleValue = null; - /** - * Constructs a new PlacementService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a PlacementService - * @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 PlacementService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - (PlacementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PlacementService; + // Virtual OneOf for proto3 optional field + Object.defineProperty(StringCreativeTemplateVariable.prototype, "_defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["defaultValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates new PlacementService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.PlacementService - * @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 {PlacementService} RPC service. Useful where requests and/or responses are streamed. - */ - PlacementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(StringCreativeTemplateVariable.prototype, "_sampleValue", { + get: $util.oneOfGetter($oneOfFields = ["sampleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Callback as used by {@link google.ads.admanager.v1.PlacementService|getPlacement}. - * @memberof google.ads.admanager.v1.PlacementService - * @typedef GetPlacementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Placement} [response] Placement - */ + /** + * Creates a new StringCreativeTemplateVariable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable} StringCreativeTemplateVariable instance + */ + StringCreativeTemplateVariable.create = function create(properties) { + return new StringCreativeTemplateVariable(properties); + }; - /** - * Calls GetPlacement. - * @function getPlacement - * @memberof google.ads.admanager.v1.PlacementService - * @instance - * @param {google.ads.admanager.v1.IGetPlacementRequest} request GetPlacementRequest message or plain object - * @param {google.ads.admanager.v1.PlacementService.GetPlacementCallback} callback Node-style callback called with the error, if any, and Placement - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PlacementService.prototype.getPlacement = function getPlacement(request, callback) { - return this.rpcCall(getPlacement, $root.google.ads.admanager.v1.GetPlacementRequest, $root.google.ads.admanager.v1.Placement, request, callback); - }, "name", { value: "GetPlacement" }); + /** + * Encodes the specified StringCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable} message StringCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringCreativeTemplateVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultValue); + if (message.sampleValue != null && Object.hasOwnProperty.call(message, "sampleValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sampleValue); + return writer; + }; - /** - * Calls GetPlacement. - * @function getPlacement - * @memberof google.ads.admanager.v1.PlacementService - * @instance - * @param {google.ads.admanager.v1.IGetPlacementRequest} request GetPlacementRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified StringCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IStringCreativeTemplateVariable} message StringCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringCreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.ads.admanager.v1.PlacementService|listPlacements}. - * @memberof google.ads.admanager.v1.PlacementService - * @typedef ListPlacementsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListPlacementsResponse} [response] ListPlacementsResponse - */ + /** + * Decodes a StringCreativeTemplateVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable} StringCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringCreativeTemplateVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.defaultValue = reader.string(); + break; + } + case 2: { + message.sampleValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls ListPlacements. - * @function listPlacements - * @memberof google.ads.admanager.v1.PlacementService - * @instance - * @param {google.ads.admanager.v1.IListPlacementsRequest} request ListPlacementsRequest message or plain object - * @param {google.ads.admanager.v1.PlacementService.ListPlacementsCallback} callback Node-style callback called with the error, if any, and ListPlacementsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PlacementService.prototype.listPlacements = function listPlacements(request, callback) { - return this.rpcCall(listPlacements, $root.google.ads.admanager.v1.ListPlacementsRequest, $root.google.ads.admanager.v1.ListPlacementsResponse, request, callback); - }, "name", { value: "ListPlacements" }); + /** + * Decodes a StringCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable} StringCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringCreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls ListPlacements. - * @function listPlacements - * @memberof google.ads.admanager.v1.PlacementService - * @instance - * @param {google.ads.admanager.v1.IListPlacementsRequest} request ListPlacementsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a StringCreativeTemplateVariable message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringCreativeTemplateVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + properties._defaultValue = 1; + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + properties._sampleValue = 1; + if (!$util.isString(message.sampleValue)) + return "sampleValue: string expected"; + } + return null; + }; - return PlacementService; - })(); + /** + * Creates a StringCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable} StringCreativeTemplateVariable + */ + StringCreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable(); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.sampleValue != null) + message.sampleValue = String(object.sampleValue); + return message; + }; - v1.GetPlacementRequest = (function() { + /** + * Creates a plain object from a StringCreativeTemplateVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable} message StringCreativeTemplateVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringCreativeTemplateVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + object.defaultValue = message.defaultValue; + if (options.oneofs) + object._defaultValue = "defaultValue"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + object.sampleValue = message.sampleValue; + if (options.oneofs) + object._sampleValue = "sampleValue"; + } + return object; + }; - /** - * Properties of a GetPlacementRequest. - * @memberof google.ads.admanager.v1 - * @interface IGetPlacementRequest - * @property {string|null} [name] GetPlacementRequest name - */ + /** + * Converts this StringCreativeTemplateVariable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @instance + * @returns {Object.} JSON object + */ + StringCreativeTemplateVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new GetPlacementRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetPlacementRequest. - * @implements IGetPlacementRequest - * @constructor - * @param {google.ads.admanager.v1.IGetPlacementRequest=} [properties] Properties to set - */ - function GetPlacementRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Gets the default type url for StringCreativeTemplateVariable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringCreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable"; + }; - /** - * GetPlacementRequest name. + return StringCreativeTemplateVariable; + })(); + + CreativeTemplateVariable.UrlCreativeTemplateVariable = (function() { + + /** + * Properties of an UrlCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @interface IUrlCreativeTemplateVariable + * @property {string|null} [defaultValue] UrlCreativeTemplateVariable defaultValue + * @property {string|null} [sampleValue] UrlCreativeTemplateVariable sampleValue + * @property {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|null} [urlType] UrlCreativeTemplateVariable urlType + */ + + /** + * Constructs a new UrlCreativeTemplateVariable. + * @memberof google.ads.admanager.v1.CreativeTemplateVariable + * @classdesc Represents an UrlCreativeTemplateVariable. + * @implements IUrlCreativeTemplateVariable + * @constructor + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable=} [properties] Properties to set + */ + function UrlCreativeTemplateVariable(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]]; + } + + /** + * UrlCreativeTemplateVariable defaultValue. + * @member {string|null|undefined} defaultValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @instance + */ + UrlCreativeTemplateVariable.prototype.defaultValue = null; + + /** + * UrlCreativeTemplateVariable sampleValue. + * @member {string|null|undefined} sampleValue + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @instance + */ + UrlCreativeTemplateVariable.prototype.sampleValue = null; + + /** + * UrlCreativeTemplateVariable urlType. + * @member {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType|null|undefined} urlType + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @instance + */ + UrlCreativeTemplateVariable.prototype.urlType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlCreativeTemplateVariable.prototype, "_defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["defaultValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlCreativeTemplateVariable.prototype, "_sampleValue", { + get: $util.oneOfGetter($oneOfFields = ["sampleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlCreativeTemplateVariable.prototype, "_urlType", { + get: $util.oneOfGetter($oneOfFields = ["urlType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UrlCreativeTemplateVariable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable} UrlCreativeTemplateVariable instance + */ + UrlCreativeTemplateVariable.create = function create(properties) { + return new UrlCreativeTemplateVariable(properties); + }; + + /** + * Encodes the specified UrlCreativeTemplateVariable message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable} message UrlCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlCreativeTemplateVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultValue); + if (message.sampleValue != null && Object.hasOwnProperty.call(message, "sampleValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sampleValue); + if (message.urlType != null && Object.hasOwnProperty.call(message, "urlType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.urlType); + return writer; + }; + + /** + * Encodes the specified UrlCreativeTemplateVariable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.IUrlCreativeTemplateVariable} message UrlCreativeTemplateVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlCreativeTemplateVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UrlCreativeTemplateVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable} UrlCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlCreativeTemplateVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.defaultValue = reader.string(); + break; + } + case 2: { + message.sampleValue = reader.string(); + break; + } + case 4: { + message.urlType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UrlCreativeTemplateVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable} UrlCreativeTemplateVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlCreativeTemplateVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UrlCreativeTemplateVariable message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UrlCreativeTemplateVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + properties._defaultValue = 1; + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + properties._sampleValue = 1; + if (!$util.isString(message.sampleValue)) + return "sampleValue: string expected"; + } + if (message.urlType != null && message.hasOwnProperty("urlType")) { + properties._urlType = 1; + switch (message.urlType) { + default: + return "urlType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates an UrlCreativeTemplateVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable} UrlCreativeTemplateVariable + */ + UrlCreativeTemplateVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable) + return object; + var message = new $root.google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable(); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.sampleValue != null) + message.sampleValue = String(object.sampleValue); + switch (object.urlType) { + default: + if (typeof object.urlType === "number") { + message.urlType = object.urlType; + break; + } + break; + case "CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED": + case 0: + message.urlType = 0; + break; + case "CLICK_TRACKER": + case 1: + message.urlType = 1; + break; + case "DEEPLINK": + case 2: + message.urlType = 2; + break; + case "IMPRESSION_TRACKER": + case 3: + message.urlType = 3; + break; + case "STANDARD_HTTP": + case 4: + message.urlType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UrlCreativeTemplateVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable} message UrlCreativeTemplateVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UrlCreativeTemplateVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + object.defaultValue = message.defaultValue; + if (options.oneofs) + object._defaultValue = "defaultValue"; + } + if (message.sampleValue != null && message.hasOwnProperty("sampleValue")) { + object.sampleValue = message.sampleValue; + if (options.oneofs) + object._sampleValue = "sampleValue"; + } + if (message.urlType != null && message.hasOwnProperty("urlType")) { + object.urlType = options.enums === String ? $root.google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType[message.urlType] === undefined ? message.urlType : $root.google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType[message.urlType] : message.urlType; + if (options.oneofs) + object._urlType = "urlType"; + } + return object; + }; + + /** + * Converts this UrlCreativeTemplateVariable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @instance + * @returns {Object.} JSON object + */ + UrlCreativeTemplateVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UrlCreativeTemplateVariable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UrlCreativeTemplateVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable"; + }; + + return UrlCreativeTemplateVariable; + })(); + + return CreativeTemplateVariable; + })(); + + v1.CreativeTemplateVariableUrlTypeEnum = (function() { + + /** + * Properties of a CreativeTemplateVariableUrlTypeEnum. + * @memberof google.ads.admanager.v1 + * @interface ICreativeTemplateVariableUrlTypeEnum + */ + + /** + * Constructs a new CreativeTemplateVariableUrlTypeEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreativeTemplateVariableUrlTypeEnum. + * @implements ICreativeTemplateVariableUrlTypeEnum + * @constructor + * @param {google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum=} [properties] Properties to set + */ + function CreativeTemplateVariableUrlTypeEnum(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 CreativeTemplateVariableUrlTypeEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum} CreativeTemplateVariableUrlTypeEnum instance + */ + CreativeTemplateVariableUrlTypeEnum.create = function create(properties) { + return new CreativeTemplateVariableUrlTypeEnum(properties); + }; + + /** + * Encodes the specified CreativeTemplateVariableUrlTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum} message CreativeTemplateVariableUrlTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateVariableUrlTypeEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreativeTemplateVariableUrlTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {google.ads.admanager.v1.ICreativeTemplateVariableUrlTypeEnum} message CreativeTemplateVariableUrlTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreativeTemplateVariableUrlTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreativeTemplateVariableUrlTypeEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum} CreativeTemplateVariableUrlTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreativeTemplateVariableUrlTypeEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreativeTemplateVariableUrlTypeEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum} CreativeTemplateVariableUrlTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreativeTemplateVariableUrlTypeEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreativeTemplateVariableUrlTypeEnum message. + * @function verify + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreativeTemplateVariableUrlTypeEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreativeTemplateVariableUrlTypeEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum} CreativeTemplateVariableUrlTypeEnum + */ + CreativeTemplateVariableUrlTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum) + return object; + return new $root.google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum(); + }; + + /** + * Creates a plain object from a CreativeTemplateVariableUrlTypeEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum} message CreativeTemplateVariableUrlTypeEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreativeTemplateVariableUrlTypeEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreativeTemplateVariableUrlTypeEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @instance + * @returns {Object.} JSON object + */ + CreativeTemplateVariableUrlTypeEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreativeTemplateVariableUrlTypeEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreativeTemplateVariableUrlTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum"; + }; + + /** + * CreativeTemplateVariableUrlType enum. + * @name google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType + * @enum {number} + * @property {number} CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED=0 CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED value + * @property {number} CLICK_TRACKER=1 CLICK_TRACKER value + * @property {number} DEEPLINK=2 DEEPLINK value + * @property {number} IMPRESSION_TRACKER=3 IMPRESSION_TRACKER value + * @property {number} STANDARD_HTTP=4 STANDARD_HTTP value + */ + CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLICK_TRACKER"] = 1; + values[valuesById[2] = "DEEPLINK"] = 2; + values[valuesById[3] = "IMPRESSION_TRACKER"] = 3; + values[valuesById[4] = "STANDARD_HTTP"] = 4; + return values; + })(); + + return CreativeTemplateVariableUrlTypeEnum; + })(); + + v1.CreativeTemplateService = (function() { + + /** + * Constructs a new CreativeTemplateService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreativeTemplateService + * @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 CreativeTemplateService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CreativeTemplateService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CreativeTemplateService; + + /** + * Creates new CreativeTemplateService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @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 {CreativeTemplateService} RPC service. Useful where requests and/or responses are streamed. + */ + CreativeTemplateService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.CreativeTemplateService|getCreativeTemplate}. + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @typedef GetCreativeTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CreativeTemplate} [response] CreativeTemplate + */ + + /** + * Calls GetCreativeTemplate. + * @function getCreativeTemplate + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @instance + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest} request GetCreativeTemplateRequest message or plain object + * @param {google.ads.admanager.v1.CreativeTemplateService.GetCreativeTemplateCallback} callback Node-style callback called with the error, if any, and CreativeTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CreativeTemplateService.prototype.getCreativeTemplate = function getCreativeTemplate(request, callback) { + return this.rpcCall(getCreativeTemplate, $root.google.ads.admanager.v1.GetCreativeTemplateRequest, $root.google.ads.admanager.v1.CreativeTemplate, request, callback); + }, "name", { value: "GetCreativeTemplate" }); + + /** + * Calls GetCreativeTemplate. + * @function getCreativeTemplate + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @instance + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest} request GetCreativeTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CreativeTemplateService|listCreativeTemplates}. + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @typedef ListCreativeTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCreativeTemplatesResponse} [response] ListCreativeTemplatesResponse + */ + + /** + * Calls ListCreativeTemplates. + * @function listCreativeTemplates + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @instance + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest} request ListCreativeTemplatesRequest message or plain object + * @param {google.ads.admanager.v1.CreativeTemplateService.ListCreativeTemplatesCallback} callback Node-style callback called with the error, if any, and ListCreativeTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CreativeTemplateService.prototype.listCreativeTemplates = function listCreativeTemplates(request, callback) { + return this.rpcCall(listCreativeTemplates, $root.google.ads.admanager.v1.ListCreativeTemplatesRequest, $root.google.ads.admanager.v1.ListCreativeTemplatesResponse, request, callback); + }, "name", { value: "ListCreativeTemplates" }); + + /** + * Calls ListCreativeTemplates. + * @function listCreativeTemplates + * @memberof google.ads.admanager.v1.CreativeTemplateService + * @instance + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest} request ListCreativeTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CreativeTemplateService; + })(); + + v1.GetCreativeTemplateRequest = (function() { + + /** + * Properties of a GetCreativeTemplateRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetCreativeTemplateRequest + * @property {string|null} [name] GetCreativeTemplateRequest name + */ + + /** + * Constructs a new GetCreativeTemplateRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCreativeTemplateRequest. + * @implements IGetCreativeTemplateRequest + * @constructor + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest=} [properties] Properties to set + */ + function GetCreativeTemplateRequest(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]]; + } + + /** + * GetCreativeTemplateRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @instance */ - GetPlacementRequest.prototype.name = ""; + GetCreativeTemplateRequest.prototype.name = ""; /** - * Creates a new GetPlacementRequest instance using the specified properties. + * Creates a new GetCreativeTemplateRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static - * @param {google.ads.admanager.v1.IGetPlacementRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest instance + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCreativeTemplateRequest} GetCreativeTemplateRequest instance */ - GetPlacementRequest.create = function create(properties) { - return new GetPlacementRequest(properties); + GetCreativeTemplateRequest.create = function create(properties) { + return new GetCreativeTemplateRequest(properties); }; /** - * Encodes the specified GetPlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * Encodes the specified GetCreativeTemplateRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCreativeTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static - * @param {google.ads.admanager.v1.IGetPlacementRequest} message GetPlacementRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest} message GetCreativeTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPlacementRequest.encode = function encode(message, writer) { + GetCreativeTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -31282,33 +32139,33 @@ }; /** - * Encodes the specified GetPlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * Encodes the specified GetCreativeTemplateRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCreativeTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static - * @param {google.ads.admanager.v1.IGetPlacementRequest} message GetPlacementRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetCreativeTemplateRequest} message GetCreativeTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPlacementRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCreativeTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPlacementRequest message from the specified reader or buffer. + * Decodes a GetCreativeTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + * @returns {google.ads.admanager.v1.GetCreativeTemplateRequest} GetCreativeTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPlacementRequest.decode = function decode(reader, length, error) { + GetCreativeTemplateRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPlacementRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCreativeTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -31327,30 +32184,30 @@ }; /** - * Decodes a GetPlacementRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCreativeTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + * @returns {google.ads.admanager.v1.GetCreativeTemplateRequest} GetCreativeTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPlacementRequest.decodeDelimited = function decodeDelimited(reader) { + GetCreativeTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPlacementRequest message. + * Verifies a GetCreativeTemplateRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPlacementRequest.verify = function verify(message) { + GetCreativeTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -31360,32 +32217,32 @@ }; /** - * Creates a GetPlacementRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCreativeTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + * @returns {google.ads.admanager.v1.GetCreativeTemplateRequest} GetCreativeTemplateRequest */ - GetPlacementRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetPlacementRequest) + GetCreativeTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCreativeTemplateRequest) return object; - var message = new $root.google.ads.admanager.v1.GetPlacementRequest(); + var message = new $root.google.ads.admanager.v1.GetCreativeTemplateRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetPlacementRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCreativeTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static - * @param {google.ads.admanager.v1.GetPlacementRequest} message GetPlacementRequest + * @param {google.ads.admanager.v1.GetCreativeTemplateRequest} message GetCreativeTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPlacementRequest.toObject = function toObject(message, options) { + GetCreativeTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -31397,57 +32254,57 @@ }; /** - * Converts this GetPlacementRequest to JSON. + * Converts this GetCreativeTemplateRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @instance * @returns {Object.} JSON object */ - GetPlacementRequest.prototype.toJSON = function toJSON() { + GetCreativeTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPlacementRequest + * Gets the default type url for GetCreativeTemplateRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetPlacementRequest + * @memberof google.ads.admanager.v1.GetCreativeTemplateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPlacementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCreativeTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetPlacementRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCreativeTemplateRequest"; }; - return GetPlacementRequest; + return GetCreativeTemplateRequest; })(); - v1.ListPlacementsRequest = (function() { + v1.ListCreativeTemplatesRequest = (function() { /** - * Properties of a ListPlacementsRequest. + * Properties of a ListCreativeTemplatesRequest. * @memberof google.ads.admanager.v1 - * @interface IListPlacementsRequest - * @property {string|null} [parent] ListPlacementsRequest parent - * @property {number|null} [pageSize] ListPlacementsRequest pageSize - * @property {string|null} [pageToken] ListPlacementsRequest pageToken - * @property {string|null} [filter] ListPlacementsRequest filter - * @property {string|null} [orderBy] ListPlacementsRequest orderBy - * @property {number|null} [skip] ListPlacementsRequest skip + * @interface IListCreativeTemplatesRequest + * @property {string|null} [parent] ListCreativeTemplatesRequest parent + * @property {number|null} [pageSize] ListCreativeTemplatesRequest pageSize + * @property {string|null} [pageToken] ListCreativeTemplatesRequest pageToken + * @property {string|null} [filter] ListCreativeTemplatesRequest filter + * @property {string|null} [orderBy] ListCreativeTemplatesRequest orderBy + * @property {number|null} [skip] ListCreativeTemplatesRequest skip */ /** - * Constructs a new ListPlacementsRequest. + * Constructs a new ListCreativeTemplatesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPlacementsRequest. - * @implements IListPlacementsRequest + * @classdesc Represents a ListCreativeTemplatesRequest. + * @implements IListCreativeTemplatesRequest * @constructor - * @param {google.ads.admanager.v1.IListPlacementsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest=} [properties] Properties to set */ - function ListPlacementsRequest(properties) { + function ListCreativeTemplatesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31455,75 +32312,75 @@ } /** - * ListPlacementsRequest parent. + * ListCreativeTemplatesRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.parent = ""; + ListCreativeTemplatesRequest.prototype.parent = ""; /** - * ListPlacementsRequest pageSize. + * ListCreativeTemplatesRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.pageSize = 0; + ListCreativeTemplatesRequest.prototype.pageSize = 0; /** - * ListPlacementsRequest pageToken. + * ListCreativeTemplatesRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.pageToken = ""; + ListCreativeTemplatesRequest.prototype.pageToken = ""; /** - * ListPlacementsRequest filter. + * ListCreativeTemplatesRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.filter = ""; + ListCreativeTemplatesRequest.prototype.filter = ""; /** - * ListPlacementsRequest orderBy. + * ListCreativeTemplatesRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.orderBy = ""; + ListCreativeTemplatesRequest.prototype.orderBy = ""; /** - * ListPlacementsRequest skip. + * ListCreativeTemplatesRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance */ - ListPlacementsRequest.prototype.skip = 0; + ListCreativeTemplatesRequest.prototype.skip = 0; /** - * Creates a new ListPlacementsRequest instance using the specified properties. + * Creates a new ListCreativeTemplatesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static - * @param {google.ads.admanager.v1.IListPlacementsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest instance + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCreativeTemplatesRequest} ListCreativeTemplatesRequest instance */ - ListPlacementsRequest.create = function create(properties) { - return new ListPlacementsRequest(properties); + ListCreativeTemplatesRequest.create = function create(properties) { + return new ListCreativeTemplatesRequest(properties); }; /** - * Encodes the specified ListPlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * Encodes the specified ListCreativeTemplatesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static - * @param {google.ads.admanager.v1.IListPlacementsRequest} message ListPlacementsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest} message ListCreativeTemplatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPlacementsRequest.encode = function encode(message, writer) { + ListCreativeTemplatesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -31542,33 +32399,33 @@ }; /** - * Encodes the specified ListPlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * Encodes the specified ListCreativeTemplatesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static - * @param {google.ads.admanager.v1.IListPlacementsRequest} message ListPlacementsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCreativeTemplatesRequest} message ListCreativeTemplatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCreativeTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPlacementsRequest message from the specified reader or buffer. + * Decodes a ListCreativeTemplatesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + * @returns {google.ads.admanager.v1.ListCreativeTemplatesRequest} ListCreativeTemplatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPlacementsRequest.decode = function decode(reader, length, error) { + ListCreativeTemplatesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPlacementsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCreativeTemplatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -31607,30 +32464,30 @@ }; /** - * Decodes a ListPlacementsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCreativeTemplatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + * @returns {google.ads.admanager.v1.ListCreativeTemplatesRequest} ListCreativeTemplatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + ListCreativeTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPlacementsRequest message. + * Verifies a ListCreativeTemplatesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPlacementsRequest.verify = function verify(message) { + ListCreativeTemplatesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -31655,17 +32512,17 @@ }; /** - * Creates a ListPlacementsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCreativeTemplatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + * @returns {google.ads.admanager.v1.ListCreativeTemplatesRequest} ListCreativeTemplatesRequest */ - ListPlacementsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPlacementsRequest) + ListCreativeTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCreativeTemplatesRequest) return object; - var message = new $root.google.ads.admanager.v1.ListPlacementsRequest(); + var message = new $root.google.ads.admanager.v1.ListCreativeTemplatesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -31682,15 +32539,15 @@ }; /** - * Creates a plain object from a ListPlacementsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCreativeTemplatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static - * @param {google.ads.admanager.v1.ListPlacementsRequest} message ListPlacementsRequest + * @param {google.ads.admanager.v1.ListCreativeTemplatesRequest} message ListCreativeTemplatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPlacementsRequest.toObject = function toObject(message, options) { + ListCreativeTemplatesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -31718,55 +32575,55 @@ }; /** - * Converts this ListPlacementsRequest to JSON. + * Converts this ListCreativeTemplatesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @instance * @returns {Object.} JSON object */ - ListPlacementsRequest.prototype.toJSON = function toJSON() { + ListCreativeTemplatesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPlacementsRequest + * Gets the default type url for ListCreativeTemplatesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @memberof google.ads.admanager.v1.ListCreativeTemplatesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCreativeTemplatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPlacementsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCreativeTemplatesRequest"; }; - return ListPlacementsRequest; + return ListCreativeTemplatesRequest; })(); - v1.ListPlacementsResponse = (function() { + v1.ListCreativeTemplatesResponse = (function() { /** - * Properties of a ListPlacementsResponse. + * Properties of a ListCreativeTemplatesResponse. * @memberof google.ads.admanager.v1 - * @interface IListPlacementsResponse - * @property {Array.|null} [placements] ListPlacementsResponse placements - * @property {string|null} [nextPageToken] ListPlacementsResponse nextPageToken - * @property {number|null} [totalSize] ListPlacementsResponse totalSize + * @interface IListCreativeTemplatesResponse + * @property {Array.|null} [creativeTemplates] ListCreativeTemplatesResponse creativeTemplates + * @property {string|null} [nextPageToken] ListCreativeTemplatesResponse nextPageToken + * @property {number|null} [totalSize] ListCreativeTemplatesResponse totalSize */ /** - * Constructs a new ListPlacementsResponse. + * Constructs a new ListCreativeTemplatesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPlacementsResponse. - * @implements IListPlacementsResponse + * @classdesc Represents a ListCreativeTemplatesResponse. + * @implements IListCreativeTemplatesResponse * @constructor - * @param {google.ads.admanager.v1.IListPlacementsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCreativeTemplatesResponse=} [properties] Properties to set */ - function ListPlacementsResponse(properties) { - this.placements = []; + function ListCreativeTemplatesResponse(properties) { + this.creativeTemplates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31774,56 +32631,56 @@ } /** - * ListPlacementsResponse placements. - * @member {Array.} placements - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * ListCreativeTemplatesResponse creativeTemplates. + * @member {Array.} creativeTemplates + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @instance */ - ListPlacementsResponse.prototype.placements = $util.emptyArray; + ListCreativeTemplatesResponse.prototype.creativeTemplates = $util.emptyArray; /** - * ListPlacementsResponse nextPageToken. + * ListCreativeTemplatesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @instance */ - ListPlacementsResponse.prototype.nextPageToken = ""; + ListCreativeTemplatesResponse.prototype.nextPageToken = ""; /** - * ListPlacementsResponse totalSize. + * ListCreativeTemplatesResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @instance */ - ListPlacementsResponse.prototype.totalSize = 0; + ListCreativeTemplatesResponse.prototype.totalSize = 0; /** - * Creates a new ListPlacementsResponse instance using the specified properties. + * Creates a new ListCreativeTemplatesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static - * @param {google.ads.admanager.v1.IListPlacementsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse instance + * @param {google.ads.admanager.v1.IListCreativeTemplatesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCreativeTemplatesResponse} ListCreativeTemplatesResponse instance */ - ListPlacementsResponse.create = function create(properties) { - return new ListPlacementsResponse(properties); + ListCreativeTemplatesResponse.create = function create(properties) { + return new ListCreativeTemplatesResponse(properties); }; /** - * Encodes the specified ListPlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * Encodes the specified ListCreativeTemplatesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static - * @param {google.ads.admanager.v1.IListPlacementsResponse} message ListPlacementsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListCreativeTemplatesResponse} message ListCreativeTemplatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPlacementsResponse.encode = function encode(message, writer) { + ListCreativeTemplatesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.placements != null && message.placements.length) - for (var i = 0; i < message.placements.length; ++i) - $root.google.ads.admanager.v1.Placement.encode(message.placements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.creativeTemplates != null && message.creativeTemplates.length) + for (var i = 0; i < message.creativeTemplates.length; ++i) + $root.google.ads.admanager.v1.CreativeTemplate.encode(message.creativeTemplates[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -31832,42 +32689,42 @@ }; /** - * Encodes the specified ListPlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * Encodes the specified ListCreativeTemplatesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCreativeTemplatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static - * @param {google.ads.admanager.v1.IListPlacementsResponse} message ListPlacementsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListCreativeTemplatesResponse} message ListCreativeTemplatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListCreativeTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPlacementsResponse message from the specified reader or buffer. + * Decodes a ListCreativeTemplatesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + * @returns {google.ads.admanager.v1.ListCreativeTemplatesResponse} ListCreativeTemplatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPlacementsResponse.decode = function decode(reader, length, error) { + ListCreativeTemplatesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPlacementsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCreativeTemplatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.placements && message.placements.length)) - message.placements = []; - message.placements.push($root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32())); + if (!(message.creativeTemplates && message.creativeTemplates.length)) + message.creativeTemplates = []; + message.creativeTemplates.push($root.google.ads.admanager.v1.CreativeTemplate.decode(reader, reader.uint32())); break; } case 2: { @@ -31887,39 +32744,39 @@ }; /** - * Decodes a ListPlacementsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListCreativeTemplatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + * @returns {google.ads.admanager.v1.ListCreativeTemplatesResponse} ListCreativeTemplatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + ListCreativeTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPlacementsResponse message. + * Verifies a ListCreativeTemplatesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPlacementsResponse.verify = function verify(message) { + ListCreativeTemplatesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.placements != null && message.hasOwnProperty("placements")) { - if (!Array.isArray(message.placements)) - return "placements: array expected"; - for (var i = 0; i < message.placements.length; ++i) { - var error = $root.google.ads.admanager.v1.Placement.verify(message.placements[i]); + if (message.creativeTemplates != null && message.hasOwnProperty("creativeTemplates")) { + if (!Array.isArray(message.creativeTemplates)) + return "creativeTemplates: array expected"; + for (var i = 0; i < message.creativeTemplates.length; ++i) { + var error = $root.google.ads.admanager.v1.CreativeTemplate.verify(message.creativeTemplates[i]); if (error) - return "placements." + error; + return "creativeTemplates." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -31932,25 +32789,25 @@ }; /** - * Creates a ListPlacementsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListCreativeTemplatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + * @returns {google.ads.admanager.v1.ListCreativeTemplatesResponse} ListCreativeTemplatesResponse */ - ListPlacementsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPlacementsResponse) + ListCreativeTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCreativeTemplatesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListPlacementsResponse(); - if (object.placements) { - if (!Array.isArray(object.placements)) - throw TypeError(".google.ads.admanager.v1.ListPlacementsResponse.placements: array expected"); - message.placements = []; - for (var i = 0; i < object.placements.length; ++i) { - if (typeof object.placements[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListPlacementsResponse.placements: object expected"); - message.placements[i] = $root.google.ads.admanager.v1.Placement.fromObject(object.placements[i]); + var message = new $root.google.ads.admanager.v1.ListCreativeTemplatesResponse(); + if (object.creativeTemplates) { + if (!Array.isArray(object.creativeTemplates)) + throw TypeError(".google.ads.admanager.v1.ListCreativeTemplatesResponse.creativeTemplates: array expected"); + message.creativeTemplates = []; + for (var i = 0; i < object.creativeTemplates.length; ++i) { + if (typeof object.creativeTemplates[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCreativeTemplatesResponse.creativeTemplates: object expected"); + message.creativeTemplates[i] = $root.google.ads.admanager.v1.CreativeTemplate.fromObject(object.creativeTemplates[i]); } } if (object.nextPageToken != null) @@ -31961,28 +32818,28 @@ }; /** - * Creates a plain object from a ListPlacementsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListCreativeTemplatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static - * @param {google.ads.admanager.v1.ListPlacementsResponse} message ListPlacementsResponse + * @param {google.ads.admanager.v1.ListCreativeTemplatesResponse} message ListCreativeTemplatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPlacementsResponse.toObject = function toObject(message, options) { + ListCreativeTemplatesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.placements = []; + object.creativeTemplates = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.placements && message.placements.length) { - object.placements = []; - for (var j = 0; j < message.placements.length; ++j) - object.placements[j] = $root.google.ads.admanager.v1.Placement.toObject(message.placements[j], options); + if (message.creativeTemplates && message.creativeTemplates.length) { + object.creativeTemplates = []; + for (var j = 0; j < message.creativeTemplates.length; ++j) + object.creativeTemplates[j] = $root.google.ads.admanager.v1.CreativeTemplate.toObject(message.creativeTemplates[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -31992,69 +32849,51 @@ }; /** - * Converts this ListPlacementsResponse to JSON. + * Converts this ListCreativeTemplatesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @instance * @returns {Object.} JSON object */ - ListPlacementsResponse.prototype.toJSON = function toJSON() { + ListCreativeTemplatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPlacementsResponse + * Gets the default type url for ListCreativeTemplatesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @memberof google.ads.admanager.v1.ListCreativeTemplatesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCreativeTemplatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPlacementsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCreativeTemplatesResponse"; }; - return ListPlacementsResponse; + return ListCreativeTemplatesResponse; })(); - v1.PrivateAuctionDeal = (function() { + v1.CustomFieldDataTypeEnum = (function() { /** - * Properties of a PrivateAuctionDeal. + * Properties of a CustomFieldDataTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IPrivateAuctionDeal - * @property {string|null} [name] PrivateAuctionDeal name - * @property {number|Long|null} [privateAuctionDealId] PrivateAuctionDeal privateAuctionDealId - * @property {number|Long|null} [privateAuctionId] PrivateAuctionDeal privateAuctionId - * @property {string|null} [privateAuctionDisplayName] PrivateAuctionDeal privateAuctionDisplayName - * @property {number|Long|null} [buyerAccountId] PrivateAuctionDeal buyerAccountId - * @property {number|Long|null} [externalDealId] PrivateAuctionDeal externalDealId - * @property {google.ads.admanager.v1.ITargeting|null} [targeting] PrivateAuctionDeal targeting - * @property {google.protobuf.ITimestamp|null} [endTime] PrivateAuctionDeal endTime - * @property {google.type.IMoney|null} [floorPrice] PrivateAuctionDeal floorPrice - * @property {Array.|null} [creativeSizes] PrivateAuctionDeal creativeSizes - * @property {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null} [status] PrivateAuctionDeal status - * @property {boolean|null} [auctionPriorityEnabled] PrivateAuctionDeal auctionPriorityEnabled - * @property {boolean|null} [blockOverrideEnabled] PrivateAuctionDeal blockOverrideEnabled - * @property {google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null} [buyerPermissionType] PrivateAuctionDeal buyerPermissionType - * @property {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null} [buyerData] PrivateAuctionDeal buyerData - * @property {google.protobuf.ITimestamp|null} [createTime] PrivateAuctionDeal createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateAuctionDeal updateTime + * @interface ICustomFieldDataTypeEnum */ /** - * Constructs a new PrivateAuctionDeal. + * Constructs a new CustomFieldDataTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a PrivateAuctionDeal. - * @implements IPrivateAuctionDeal + * @classdesc Represents a CustomFieldDataTypeEnum. + * @implements ICustomFieldDataTypeEnum * @constructor - * @param {google.ads.admanager.v1.IPrivateAuctionDeal=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum=} [properties] Properties to set */ - function PrivateAuctionDeal(properties) { - this.creativeSizes = []; + function CustomFieldDataTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32062,399 +32901,262 @@ } /** - * PrivateAuctionDeal name. - * @member {string} name - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance - */ - PrivateAuctionDeal.prototype.name = ""; - - /** - * PrivateAuctionDeal privateAuctionDealId. - * @member {number|Long|null|undefined} privateAuctionDealId - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance - */ - PrivateAuctionDeal.prototype.privateAuctionDealId = null; - - /** - * PrivateAuctionDeal privateAuctionId. - * @member {number|Long|null|undefined} privateAuctionId - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Creates a new CustomFieldDataTypeEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum instance */ - PrivateAuctionDeal.prototype.privateAuctionId = null; + CustomFieldDataTypeEnum.create = function create(properties) { + return new CustomFieldDataTypeEnum(properties); + }; /** - * PrivateAuctionDeal privateAuctionDisplayName. - * @member {string|null|undefined} privateAuctionDisplayName - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Encodes the specified CustomFieldDataTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum} message CustomFieldDataTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PrivateAuctionDeal.prototype.privateAuctionDisplayName = null; + CustomFieldDataTypeEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * PrivateAuctionDeal buyerAccountId. - * @member {number|Long|null|undefined} buyerAccountId - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Encodes the specified CustomFieldDataTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldDataTypeEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {google.ads.admanager.v1.ICustomFieldDataTypeEnum} message CustomFieldDataTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PrivateAuctionDeal.prototype.buyerAccountId = null; + CustomFieldDataTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * PrivateAuctionDeal externalDealId. - * @member {number|Long|null|undefined} externalDealId - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuctionDeal.prototype.externalDealId = null; + CustomFieldDataTypeEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldDataTypeEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * PrivateAuctionDeal targeting. - * @member {google.ads.admanager.v1.ITargeting|null|undefined} targeting - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Decodes a CustomFieldDataTypeEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuctionDeal.prototype.targeting = null; + CustomFieldDataTypeEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * PrivateAuctionDeal endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Verifies a CustomFieldDataTypeEnum message. + * @function verify + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateAuctionDeal.prototype.endTime = null; + CustomFieldDataTypeEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * PrivateAuctionDeal floorPrice. - * @member {google.type.IMoney|null|undefined} floorPrice - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Creates a CustomFieldDataTypeEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CustomFieldDataTypeEnum} CustomFieldDataTypeEnum */ - PrivateAuctionDeal.prototype.floorPrice = null; + CustomFieldDataTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldDataTypeEnum) + return object; + return new $root.google.ads.admanager.v1.CustomFieldDataTypeEnum(); + }; /** - * PrivateAuctionDeal creativeSizes. - * @member {Array.} creativeSizes - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Creates a plain object from a CustomFieldDataTypeEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {google.ads.admanager.v1.CustomFieldDataTypeEnum} message CustomFieldDataTypeEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - PrivateAuctionDeal.prototype.creativeSizes = $util.emptyArray; + CustomFieldDataTypeEnum.toObject = function toObject() { + return {}; + }; /** - * PrivateAuctionDeal status. - * @member {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null|undefined} status - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * Converts this CustomFieldDataTypeEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum * @instance + * @returns {Object.} JSON object */ - PrivateAuctionDeal.prototype.status = null; + CustomFieldDataTypeEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * PrivateAuctionDeal auctionPriorityEnabled. - * @member {boolean|null|undefined} auctionPriorityEnabled - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Gets the default type url for CustomFieldDataTypeEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CustomFieldDataTypeEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - PrivateAuctionDeal.prototype.auctionPriorityEnabled = null; + CustomFieldDataTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldDataTypeEnum"; + }; /** - * PrivateAuctionDeal blockOverrideEnabled. - * @member {boolean|null|undefined} blockOverrideEnabled - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * CustomFieldDataType enum. + * @name google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType + * @enum {number} + * @property {number} CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED=0 CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} NUMBER=2 NUMBER value + * @property {number} TOGGLE=3 TOGGLE value + * @property {number} DROP_DOWN=4 DROP_DOWN value */ - PrivateAuctionDeal.prototype.blockOverrideEnabled = null; + CustomFieldDataTypeEnum.CustomFieldDataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "NUMBER"] = 2; + values[valuesById[3] = "TOGGLE"] = 3; + values[valuesById[4] = "DROP_DOWN"] = 4; + return values; + })(); - /** - * PrivateAuctionDeal buyerPermissionType. - * @member {google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null|undefined} buyerPermissionType - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance - */ - PrivateAuctionDeal.prototype.buyerPermissionType = null; + return CustomFieldDataTypeEnum; + })(); - /** - * PrivateAuctionDeal buyerData. - * @member {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null|undefined} buyerData - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance - */ - PrivateAuctionDeal.prototype.buyerData = null; + v1.CustomFieldEntityTypeEnum = (function() { /** - * PrivateAuctionDeal createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Properties of a CustomFieldEntityTypeEnum. + * @memberof google.ads.admanager.v1 + * @interface ICustomFieldEntityTypeEnum */ - PrivateAuctionDeal.prototype.createTime = null; /** - * PrivateAuctionDeal updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @instance + * Constructs a new CustomFieldEntityTypeEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CustomFieldEntityTypeEnum. + * @implements ICustomFieldEntityTypeEnum + * @constructor + * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum=} [properties] Properties to set */ - PrivateAuctionDeal.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionDealId", { - get: $util.oneOfGetter($oneOfFields = ["privateAuctionDealId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionId", { - get: $util.oneOfGetter($oneOfFields = ["privateAuctionId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionDisplayName", { - get: $util.oneOfGetter($oneOfFields = ["privateAuctionDisplayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerAccountId", { - get: $util.oneOfGetter($oneOfFields = ["buyerAccountId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_externalDealId", { - get: $util.oneOfGetter($oneOfFields = ["externalDealId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_targeting", { - get: $util.oneOfGetter($oneOfFields = ["targeting"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_endTime", { - get: $util.oneOfGetter($oneOfFields = ["endTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_floorPrice", { - get: $util.oneOfGetter($oneOfFields = ["floorPrice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_auctionPriorityEnabled", { - get: $util.oneOfGetter($oneOfFields = ["auctionPriorityEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_blockOverrideEnabled", { - get: $util.oneOfGetter($oneOfFields = ["blockOverrideEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerPermissionType", { - get: $util.oneOfGetter($oneOfFields = ["buyerPermissionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerData", { - get: $util.oneOfGetter($oneOfFields = ["buyerData"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuctionDeal.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + function CustomFieldEntityTypeEnum(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 PrivateAuctionDeal instance using the specified properties. + * Creates a new CustomFieldEntityTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuctionDeal=} [properties] Properties to set - * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal instance + * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum instance */ - PrivateAuctionDeal.create = function create(properties) { - return new PrivateAuctionDeal(properties); + CustomFieldEntityTypeEnum.create = function create(properties) { + return new CustomFieldEntityTypeEnum(properties); }; /** - * Encodes the specified PrivateAuctionDeal message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * Encodes the specified CustomFieldEntityTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuctionDeal} message PrivateAuctionDeal message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateAuctionDeal.encode = function encode(message, writer) { + CustomFieldEntityTypeEnum.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.privateAuctionDealId != null && Object.hasOwnProperty.call(message, "privateAuctionDealId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.privateAuctionDealId); - if (message.privateAuctionId != null && Object.hasOwnProperty.call(message, "privateAuctionId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.privateAuctionId); - if (message.buyerAccountId != null && Object.hasOwnProperty.call(message, "buyerAccountId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.buyerAccountId); - if (message.externalDealId != null && Object.hasOwnProperty.call(message, "externalDealId")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.externalDealId); - if (message.targeting != null && Object.hasOwnProperty.call(message, "targeting")) - $root.google.ads.admanager.v1.Targeting.encode(message.targeting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.floorPrice != null && Object.hasOwnProperty.call(message, "floorPrice")) - $root.google.type.Money.encode(message.floorPrice, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); - if (message.auctionPriorityEnabled != null && Object.hasOwnProperty.call(message, "auctionPriorityEnabled")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.auctionPriorityEnabled); - if (message.blockOverrideEnabled != null && Object.hasOwnProperty.call(message, "blockOverrideEnabled")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.blockOverrideEnabled); - if (message.buyerPermissionType != null && Object.hasOwnProperty.call(message, "buyerPermissionType")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.buyerPermissionType); - if (message.buyerData != null && Object.hasOwnProperty.call(message, "buyerData")) - $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.encode(message.buyerData, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.creativeSizes != null && message.creativeSizes.length) - for (var i = 0; i < message.creativeSizes.length; ++i) - $root.google.ads.admanager.v1.Size.encode(message.creativeSizes[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.privateAuctionDisplayName != null && Object.hasOwnProperty.call(message, "privateAuctionDisplayName")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.privateAuctionDisplayName); return writer; }; /** - * Encodes the specified PrivateAuctionDeal message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * Encodes the specified CustomFieldEntityTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldEntityTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuctionDeal} message PrivateAuctionDeal message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateAuctionDeal.encodeDelimited = function encodeDelimited(message, writer) { + CustomFieldEntityTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivateAuctionDeal message from the specified reader or buffer. + * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuctionDeal.decode = function decode(reader, length, error) { + CustomFieldEntityTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuctionDeal(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.privateAuctionDealId = reader.int64(); - break; - } - case 3: { - message.privateAuctionId = reader.int64(); - break; - } - case 20: { - message.privateAuctionDisplayName = reader.string(); - break; - } - case 4: { - message.buyerAccountId = reader.int64(); - break; - } - case 5: { - message.externalDealId = reader.int64(); - break; - } - case 6: { - message.targeting = $root.google.ads.admanager.v1.Targeting.decode(reader, reader.uint32()); - break; - } - case 8: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.floorPrice = $root.google.type.Money.decode(reader, reader.uint32()); - break; - } - case 18: { - if (!(message.creativeSizes && message.creativeSizes.length)) - message.creativeSizes = []; - message.creativeSizes.push($root.google.ads.admanager.v1.Size.decode(reader, reader.uint32())); - break; - } - case 10: { - message.status = reader.int32(); - break; - } - case 11: { - message.auctionPriorityEnabled = reader.bool(); - break; - } - case 12: { - message.blockOverrideEnabled = reader.bool(); - break; - } - case 13: { - message.buyerPermissionType = reader.int32(); - break; - } - case 14: { - message.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.decode(reader, reader.uint32()); - break; - } - case 15: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 16: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -32464,688 +33166,130 @@ }; /** - * Decodes a PrivateAuctionDeal message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldEntityTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuctionDeal.decodeDelimited = function decodeDelimited(reader) { + CustomFieldEntityTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivateAuctionDeal message. + * Verifies a CustomFieldEntityTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateAuctionDeal.verify = function verify(message) { + CustomFieldEntityTypeEnum.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.privateAuctionDealId != null && message.hasOwnProperty("privateAuctionDealId")) { - properties._privateAuctionDealId = 1; - if (!$util.isInteger(message.privateAuctionDealId) && !(message.privateAuctionDealId && $util.isInteger(message.privateAuctionDealId.low) && $util.isInteger(message.privateAuctionDealId.high))) - return "privateAuctionDealId: integer|Long expected"; - } - if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { - properties._privateAuctionId = 1; - if (!$util.isInteger(message.privateAuctionId) && !(message.privateAuctionId && $util.isInteger(message.privateAuctionId.low) && $util.isInteger(message.privateAuctionId.high))) - return "privateAuctionId: integer|Long expected"; - } - if (message.privateAuctionDisplayName != null && message.hasOwnProperty("privateAuctionDisplayName")) { - properties._privateAuctionDisplayName = 1; - if (!$util.isString(message.privateAuctionDisplayName)) - return "privateAuctionDisplayName: string expected"; - } - if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { - properties._buyerAccountId = 1; - if (!$util.isInteger(message.buyerAccountId) && !(message.buyerAccountId && $util.isInteger(message.buyerAccountId.low) && $util.isInteger(message.buyerAccountId.high))) - return "buyerAccountId: integer|Long expected"; - } - if (message.externalDealId != null && message.hasOwnProperty("externalDealId")) { - properties._externalDealId = 1; - if (!$util.isInteger(message.externalDealId) && !(message.externalDealId && $util.isInteger(message.externalDealId.low) && $util.isInteger(message.externalDealId.high))) - return "externalDealId: integer|Long expected"; - } - if (message.targeting != null && message.hasOwnProperty("targeting")) { - properties._targeting = 1; - { - var error = $root.google.ads.admanager.v1.Targeting.verify(message.targeting); - if (error) - return "targeting." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - properties._endTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - } - if (message.floorPrice != null && message.hasOwnProperty("floorPrice")) { - properties._floorPrice = 1; - { - var error = $root.google.type.Money.verify(message.floorPrice); - if (error) - return "floorPrice." + error; - } - } - if (message.creativeSizes != null && message.hasOwnProperty("creativeSizes")) { - if (!Array.isArray(message.creativeSizes)) - return "creativeSizes: array expected"; - for (var i = 0; i < message.creativeSizes.length; ++i) { - var error = $root.google.ads.admanager.v1.Size.verify(message.creativeSizes[i]); - if (error) - return "creativeSizes." + error; - } - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.auctionPriorityEnabled != null && message.hasOwnProperty("auctionPriorityEnabled")) { - properties._auctionPriorityEnabled = 1; - if (typeof message.auctionPriorityEnabled !== "boolean") - return "auctionPriorityEnabled: boolean expected"; - } - if (message.blockOverrideEnabled != null && message.hasOwnProperty("blockOverrideEnabled")) { - properties._blockOverrideEnabled = 1; - if (typeof message.blockOverrideEnabled !== "boolean") - return "blockOverrideEnabled: boolean expected"; - } - if (message.buyerPermissionType != null && message.hasOwnProperty("buyerPermissionType")) { - properties._buyerPermissionType = 1; - switch (message.buyerPermissionType) { - default: - return "buyerPermissionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.buyerData != null && message.hasOwnProperty("buyerData")) { - properties._buyerData = 1; - { - var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify(message.buyerData); - if (error) - return "buyerData." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } return null; }; /** - * Creates a PrivateAuctionDeal message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldEntityTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + * @returns {google.ads.admanager.v1.CustomFieldEntityTypeEnum} CustomFieldEntityTypeEnum */ - PrivateAuctionDeal.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.PrivateAuctionDeal) + CustomFieldEntityTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.PrivateAuctionDeal(); - if (object.name != null) - message.name = String(object.name); - if (object.privateAuctionDealId != null) - if ($util.Long) - (message.privateAuctionDealId = $util.Long.fromValue(object.privateAuctionDealId)).unsigned = false; - else if (typeof object.privateAuctionDealId === "string") - message.privateAuctionDealId = parseInt(object.privateAuctionDealId, 10); - else if (typeof object.privateAuctionDealId === "number") - message.privateAuctionDealId = object.privateAuctionDealId; - else if (typeof object.privateAuctionDealId === "object") - message.privateAuctionDealId = new $util.LongBits(object.privateAuctionDealId.low >>> 0, object.privateAuctionDealId.high >>> 0).toNumber(); - if (object.privateAuctionId != null) - if ($util.Long) - (message.privateAuctionId = $util.Long.fromValue(object.privateAuctionId)).unsigned = false; - else if (typeof object.privateAuctionId === "string") - message.privateAuctionId = parseInt(object.privateAuctionId, 10); - else if (typeof object.privateAuctionId === "number") - message.privateAuctionId = object.privateAuctionId; - else if (typeof object.privateAuctionId === "object") - message.privateAuctionId = new $util.LongBits(object.privateAuctionId.low >>> 0, object.privateAuctionId.high >>> 0).toNumber(); - if (object.privateAuctionDisplayName != null) - message.privateAuctionDisplayName = String(object.privateAuctionDisplayName); - if (object.buyerAccountId != null) - if ($util.Long) - (message.buyerAccountId = $util.Long.fromValue(object.buyerAccountId)).unsigned = false; - else if (typeof object.buyerAccountId === "string") - message.buyerAccountId = parseInt(object.buyerAccountId, 10); - else if (typeof object.buyerAccountId === "number") - message.buyerAccountId = object.buyerAccountId; - else if (typeof object.buyerAccountId === "object") - message.buyerAccountId = new $util.LongBits(object.buyerAccountId.low >>> 0, object.buyerAccountId.high >>> 0).toNumber(); - if (object.externalDealId != null) - if ($util.Long) - (message.externalDealId = $util.Long.fromValue(object.externalDealId)).unsigned = false; - else if (typeof object.externalDealId === "string") - message.externalDealId = parseInt(object.externalDealId, 10); - else if (typeof object.externalDealId === "number") - message.externalDealId = object.externalDealId; - else if (typeof object.externalDealId === "object") - message.externalDealId = new $util.LongBits(object.externalDealId.low >>> 0, object.externalDealId.high >>> 0).toNumber(); - if (object.targeting != null) { - if (typeof object.targeting !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.targeting: object expected"); - message.targeting = $root.google.ads.admanager.v1.Targeting.fromObject(object.targeting); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.floorPrice != null) { - if (typeof object.floorPrice !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.floorPrice: object expected"); - message.floorPrice = $root.google.type.Money.fromObject(object.floorPrice); - } - if (object.creativeSizes) { - if (!Array.isArray(object.creativeSizes)) - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.creativeSizes: array expected"); - message.creativeSizes = []; - for (var i = 0; i < object.creativeSizes.length; ++i) { - if (typeof object.creativeSizes[i] !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.creativeSizes: object expected"); - message.creativeSizes[i] = $root.google.ads.admanager.v1.Size.fromObject(object.creativeSizes[i]); - } - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "ACTIVE": - case 2: - message.status = 2; - break; - case "CANCELED": - case 3: - message.status = 3; - break; - case "SELLER_PAUSED": - case 4: - message.status = 4; - break; - case "BUYER_PAUSED": - case 5: - message.status = 5; - break; - } - if (object.auctionPriorityEnabled != null) - message.auctionPriorityEnabled = Boolean(object.auctionPriorityEnabled); - if (object.blockOverrideEnabled != null) - message.blockOverrideEnabled = Boolean(object.blockOverrideEnabled); - switch (object.buyerPermissionType) { - default: - if (typeof object.buyerPermissionType === "number") { - message.buyerPermissionType = object.buyerPermissionType; - break; - } - break; - case "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED": - case 0: - message.buyerPermissionType = 0; - break; - case "NEGOTIATOR_ONLY": - case 1: - message.buyerPermissionType = 1; - break; - case "BIDDER": - case 2: - message.buyerPermissionType = 2; - break; - } - if (object.buyerData != null) { - if (typeof object.buyerData !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.buyerData: object expected"); - message.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.fromObject(object.buyerData); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; + return new $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum(); }; /** - * Creates a plain object from a PrivateAuctionDeal message. Also converts values to other types if specified. + * Creates a plain object from a CustomFieldEntityTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static - * @param {google.ads.admanager.v1.PrivateAuctionDeal} message PrivateAuctionDeal + * @param {google.ads.admanager.v1.CustomFieldEntityTypeEnum} message CustomFieldEntityTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivateAuctionDeal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.creativeSizes = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.privateAuctionDealId != null && message.hasOwnProperty("privateAuctionDealId")) { - if (typeof message.privateAuctionDealId === "number") - object.privateAuctionDealId = options.longs === String ? String(message.privateAuctionDealId) : message.privateAuctionDealId; - else - object.privateAuctionDealId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionDealId) : options.longs === Number ? new $util.LongBits(message.privateAuctionDealId.low >>> 0, message.privateAuctionDealId.high >>> 0).toNumber() : message.privateAuctionDealId; - if (options.oneofs) - object._privateAuctionDealId = "privateAuctionDealId"; - } - if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { - if (typeof message.privateAuctionId === "number") - object.privateAuctionId = options.longs === String ? String(message.privateAuctionId) : message.privateAuctionId; - else - object.privateAuctionId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionId) : options.longs === Number ? new $util.LongBits(message.privateAuctionId.low >>> 0, message.privateAuctionId.high >>> 0).toNumber() : message.privateAuctionId; - if (options.oneofs) - object._privateAuctionId = "privateAuctionId"; - } - if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { - if (typeof message.buyerAccountId === "number") - object.buyerAccountId = options.longs === String ? String(message.buyerAccountId) : message.buyerAccountId; - else - object.buyerAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.buyerAccountId) : options.longs === Number ? new $util.LongBits(message.buyerAccountId.low >>> 0, message.buyerAccountId.high >>> 0).toNumber() : message.buyerAccountId; - if (options.oneofs) - object._buyerAccountId = "buyerAccountId"; - } - if (message.externalDealId != null && message.hasOwnProperty("externalDealId")) { - if (typeof message.externalDealId === "number") - object.externalDealId = options.longs === String ? String(message.externalDealId) : message.externalDealId; - else - object.externalDealId = options.longs === String ? $util.Long.prototype.toString.call(message.externalDealId) : options.longs === Number ? new $util.LongBits(message.externalDealId.low >>> 0, message.externalDealId.high >>> 0).toNumber() : message.externalDealId; - if (options.oneofs) - object._externalDealId = "externalDealId"; - } - if (message.targeting != null && message.hasOwnProperty("targeting")) { - object.targeting = $root.google.ads.admanager.v1.Targeting.toObject(message.targeting, options); - if (options.oneofs) - object._targeting = "targeting"; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (options.oneofs) - object._endTime = "endTime"; - } - if (message.floorPrice != null && message.hasOwnProperty("floorPrice")) { - object.floorPrice = $root.google.type.Money.toObject(message.floorPrice, options); - if (options.oneofs) - object._floorPrice = "floorPrice"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.auctionPriorityEnabled != null && message.hasOwnProperty("auctionPriorityEnabled")) { - object.auctionPriorityEnabled = message.auctionPriorityEnabled; - if (options.oneofs) - object._auctionPriorityEnabled = "auctionPriorityEnabled"; - } - if (message.blockOverrideEnabled != null && message.hasOwnProperty("blockOverrideEnabled")) { - object.blockOverrideEnabled = message.blockOverrideEnabled; - if (options.oneofs) - object._blockOverrideEnabled = "blockOverrideEnabled"; - } - if (message.buyerPermissionType != null && message.hasOwnProperty("buyerPermissionType")) { - object.buyerPermissionType = options.enums === String ? $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType[message.buyerPermissionType] === undefined ? message.buyerPermissionType : $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType[message.buyerPermissionType] : message.buyerPermissionType; - if (options.oneofs) - object._buyerPermissionType = "buyerPermissionType"; - } - if (message.buyerData != null && message.hasOwnProperty("buyerData")) { - object.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.toObject(message.buyerData, options); - if (options.oneofs) - object._buyerData = "buyerData"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.creativeSizes && message.creativeSizes.length) { - object.creativeSizes = []; - for (var j = 0; j < message.creativeSizes.length; ++j) - object.creativeSizes[j] = $root.google.ads.admanager.v1.Size.toObject(message.creativeSizes[j], options); - } - if (message.privateAuctionDisplayName != null && message.hasOwnProperty("privateAuctionDisplayName")) { - object.privateAuctionDisplayName = message.privateAuctionDisplayName; - if (options.oneofs) - object._privateAuctionDisplayName = "privateAuctionDisplayName"; - } - return object; + CustomFieldEntityTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this PrivateAuctionDeal to JSON. + * Converts this CustomFieldEntityTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @instance * @returns {Object.} JSON object */ - PrivateAuctionDeal.prototype.toJSON = function toJSON() { + CustomFieldEntityTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivateAuctionDeal + * Gets the default type url for CustomFieldEntityTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @memberof google.ads.admanager.v1.CustomFieldEntityTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivateAuctionDeal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomFieldEntityTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuctionDeal"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldEntityTypeEnum"; }; - PrivateAuctionDeal.BuyerData = (function() { - - /** - * Properties of a BuyerData. - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @interface IBuyerData - * @property {Array.|null} [buyerEmails] BuyerData buyerEmails - */ - - /** - * Constructs a new BuyerData. - * @memberof google.ads.admanager.v1.PrivateAuctionDeal - * @classdesc Represents a BuyerData. - * @implements IBuyerData - * @constructor - * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData=} [properties] Properties to set - */ - function BuyerData(properties) { - this.buyerEmails = []; - 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]]; - } - - /** - * BuyerData buyerEmails. - * @member {Array.} buyerEmails - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @instance - */ - BuyerData.prototype.buyerEmails = $util.emptyArray; - - /** - * Creates a new BuyerData instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData=} [properties] Properties to set - * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData instance - */ - BuyerData.create = function create(properties) { - return new BuyerData(properties); - }; - - /** - * Encodes the specified BuyerData message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData} message BuyerData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BuyerData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buyerEmails != null && message.buyerEmails.length) - for (var i = 0; i < message.buyerEmails.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buyerEmails[i]); - return writer; - }; - - /** - * Encodes the specified BuyerData message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData} message BuyerData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BuyerData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BuyerData message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BuyerData.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.buyerEmails && message.buyerEmails.length)) - message.buyerEmails = []; - message.buyerEmails.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BuyerData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BuyerData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BuyerData message. - * @function verify - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BuyerData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buyerEmails != null && message.hasOwnProperty("buyerEmails")) { - if (!Array.isArray(message.buyerEmails)) - return "buyerEmails: array expected"; - for (var i = 0; i < message.buyerEmails.length; ++i) - if (!$util.isString(message.buyerEmails[i])) - return "buyerEmails: string[] expected"; - } - return null; - }; - - /** - * Creates a BuyerData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData - */ - BuyerData.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData) - return object; - var message = new $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData(); - if (object.buyerEmails) { - if (!Array.isArray(object.buyerEmails)) - throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.buyerEmails: array expected"); - message.buyerEmails = []; - for (var i = 0; i < object.buyerEmails.length; ++i) - message.buyerEmails[i] = String(object.buyerEmails[i]); - } - return message; - }; - - /** - * Creates a plain object from a BuyerData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} message BuyerData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BuyerData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buyerEmails = []; - if (message.buyerEmails && message.buyerEmails.length) { - object.buyerEmails = []; - for (var j = 0; j < message.buyerEmails.length; ++j) - object.buyerEmails[j] = message.buyerEmails[j]; - } - return object; - }; - - /** - * Converts this BuyerData to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @instance - * @returns {Object.} JSON object - */ - BuyerData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BuyerData - * @function getTypeUrl - * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BuyerData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuctionDeal.BuyerData"; - }; - - return BuyerData; + /** + * CustomFieldEntityType enum. + * @name google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType + * @enum {number} + * @property {number} CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED=0 CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED value + * @property {number} LINE_ITEM=1 LINE_ITEM value + * @property {number} ORDER=2 ORDER value + * @property {number} CREATIVE=3 CREATIVE value + * @property {number} PROPOSAL=4 PROPOSAL value + * @property {number} PROPOSAL_LINE_ITEM=5 PROPOSAL_LINE_ITEM value + */ + CustomFieldEntityTypeEnum.CustomFieldEntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM"] = 1; + values[valuesById[2] = "ORDER"] = 2; + values[valuesById[3] = "CREATIVE"] = 3; + values[valuesById[4] = "PROPOSAL"] = 4; + values[valuesById[5] = "PROPOSAL_LINE_ITEM"] = 5; + return values; })(); - return PrivateAuctionDeal; + return CustomFieldEntityTypeEnum; })(); - v1.PrivateMarketplaceDealStatusEnum = (function() { + v1.CustomFieldStatusEnum = (function() { /** - * Properties of a PrivateMarketplaceDealStatusEnum. + * Properties of a CustomFieldStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IPrivateMarketplaceDealStatusEnum + * @interface ICustomFieldStatusEnum */ /** - * Constructs a new PrivateMarketplaceDealStatusEnum. + * Constructs a new CustomFieldStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a PrivateMarketplaceDealStatusEnum. - * @implements IPrivateMarketplaceDealStatusEnum + * @classdesc Represents a CustomFieldStatusEnum. + * @implements ICustomFieldStatusEnum * @constructor - * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomFieldStatusEnum=} [properties] Properties to set */ - function PrivateMarketplaceDealStatusEnum(properties) { + function CustomFieldStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33153,60 +33297,60 @@ } /** - * Creates a new PrivateMarketplaceDealStatusEnum instance using the specified properties. + * Creates a new CustomFieldStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum instance + * @param {google.ads.admanager.v1.ICustomFieldStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum instance */ - PrivateMarketplaceDealStatusEnum.create = function create(properties) { - return new PrivateMarketplaceDealStatusEnum(properties); + CustomFieldStatusEnum.create = function create(properties) { + return new CustomFieldStatusEnum(properties); }; /** - * Encodes the specified PrivateMarketplaceDealStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * Encodes the specified CustomFieldStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldStatusEnum} message CustomFieldStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateMarketplaceDealStatusEnum.encode = function encode(message, writer) { + CustomFieldStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified PrivateMarketplaceDealStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * Encodes the specified CustomFieldStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldStatusEnum} message CustomFieldStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateMarketplaceDealStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + CustomFieldStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer. + * Decodes a CustomFieldStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateMarketplaceDealStatusEnum.decode = function decode(reader, length, error) { + CustomFieldStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -33221,138 +33365,124 @@ }; /** - * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateMarketplaceDealStatusEnum.decodeDelimited = function decodeDelimited(reader) { + CustomFieldStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivateMarketplaceDealStatusEnum message. + * Verifies a CustomFieldStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateMarketplaceDealStatusEnum.verify = function verify(message) { + CustomFieldStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a PrivateMarketplaceDealStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + * @returns {google.ads.admanager.v1.CustomFieldStatusEnum} CustomFieldStatusEnum */ - PrivateMarketplaceDealStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum) + CustomFieldStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldStatusEnum) return object; - return new $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum(); + return new $root.google.ads.admanager.v1.CustomFieldStatusEnum(); }; /** - * Creates a plain object from a PrivateMarketplaceDealStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a CustomFieldStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static - * @param {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum + * @param {google.ads.admanager.v1.CustomFieldStatusEnum} message CustomFieldStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivateMarketplaceDealStatusEnum.toObject = function toObject() { + CustomFieldStatusEnum.toObject = function toObject() { return {}; }; /** - * Converts this PrivateMarketplaceDealStatusEnum to JSON. + * Converts this CustomFieldStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @instance * @returns {Object.} JSON object */ - PrivateMarketplaceDealStatusEnum.prototype.toJSON = function toJSON() { + CustomFieldStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivateMarketplaceDealStatusEnum + * Gets the default type url for CustomFieldStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @memberof google.ads.admanager.v1.CustomFieldStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivateMarketplaceDealStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomFieldStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldStatusEnum"; }; /** - * PrivateMarketplaceDealStatus enum. - * @name google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus + * CustomFieldStatus enum. + * @name google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus * @enum {number} - * @property {number} PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED=0 PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} CANCELED=3 CANCELED value - * @property {number} SELLER_PAUSED=4 SELLER_PAUSED value - * @property {number} BUYER_PAUSED=5 BUYER_PAUSED value + * @property {number} CUSTOM_FIELD_STATUS_UNSPECIFIED=0 CUSTOM_FIELD_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value */ - PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus = (function() { + CustomFieldStatusEnum.CustomFieldStatus = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "CANCELED"] = 3; - values[valuesById[4] = "SELLER_PAUSED"] = 4; - values[valuesById[5] = "BUYER_PAUSED"] = 5; + values[valuesById[0] = "CUSTOM_FIELD_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; return values; })(); - return PrivateMarketplaceDealStatusEnum; + return CustomFieldStatusEnum; })(); - v1.Targeting = (function() { + v1.CustomFieldVisibilityEnum = (function() { /** - * Properties of a Targeting. + * Properties of a CustomFieldVisibilityEnum. * @memberof google.ads.admanager.v1 - * @interface ITargeting - * @property {google.ads.admanager.v1.IGeoTargeting|null} [geoTargeting] Targeting geoTargeting - * @property {google.ads.admanager.v1.ITechnologyTargeting|null} [technologyTargeting] Targeting technologyTargeting - * @property {google.ads.admanager.v1.IInventoryTargeting|null} [inventoryTargeting] Targeting inventoryTargeting - * @property {google.ads.admanager.v1.IRequestPlatformTargeting|null} [requestPlatformTargeting] Targeting requestPlatformTargeting - * @property {google.ads.admanager.v1.ICustomTargeting|null} [customTargeting] Targeting customTargeting - * @property {google.ads.admanager.v1.IUserDomainTargeting|null} [userDomainTargeting] Targeting userDomainTargeting - * @property {google.ads.admanager.v1.IVideoPositionTargeting|null} [videoPositionTargeting] Targeting videoPositionTargeting - * @property {google.ads.admanager.v1.IDataSegmentTargeting|null} [dataSegmentTargeting] Targeting dataSegmentTargeting + * @interface ICustomFieldVisibilityEnum */ /** - * Constructs a new Targeting. + * Constructs a new CustomFieldVisibilityEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Targeting. - * @implements ITargeting + * @classdesc Represents a CustomFieldVisibilityEnum. + * @implements ICustomFieldVisibilityEnum * @constructor - * @param {google.ads.admanager.v1.ITargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum=} [properties] Properties to set */ - function Targeting(properties) { + function CustomFieldVisibilityEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33360,177 +33490,65 @@ } /** - * Targeting geoTargeting. - * @member {google.ads.admanager.v1.IGeoTargeting|null|undefined} geoTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.geoTargeting = null; - - /** - * Targeting technologyTargeting. - * @member {google.ads.admanager.v1.ITechnologyTargeting|null|undefined} technologyTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.technologyTargeting = null; - - /** - * Targeting inventoryTargeting. - * @member {google.ads.admanager.v1.IInventoryTargeting|null|undefined} inventoryTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.inventoryTargeting = null; - - /** - * Targeting requestPlatformTargeting. - * @member {google.ads.admanager.v1.IRequestPlatformTargeting|null|undefined} requestPlatformTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.requestPlatformTargeting = null; - - /** - * Targeting customTargeting. - * @member {google.ads.admanager.v1.ICustomTargeting|null|undefined} customTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.customTargeting = null; - - /** - * Targeting userDomainTargeting. - * @member {google.ads.admanager.v1.IUserDomainTargeting|null|undefined} userDomainTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.userDomainTargeting = null; - - /** - * Targeting videoPositionTargeting. - * @member {google.ads.admanager.v1.IVideoPositionTargeting|null|undefined} videoPositionTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.videoPositionTargeting = null; - - /** - * Targeting dataSegmentTargeting. - * @member {google.ads.admanager.v1.IDataSegmentTargeting|null|undefined} dataSegmentTargeting - * @memberof google.ads.admanager.v1.Targeting - * @instance - */ - Targeting.prototype.dataSegmentTargeting = null; - - /** - * Creates a new Targeting instance using the specified properties. + * Creates a new CustomFieldVisibilityEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static - * @param {google.ads.admanager.v1.ITargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Targeting} Targeting instance + * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum instance */ - Targeting.create = function create(properties) { - return new Targeting(properties); + CustomFieldVisibilityEnum.create = function create(properties) { + return new CustomFieldVisibilityEnum(properties); }; /** - * Encodes the specified Targeting message. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * Encodes the specified CustomFieldVisibilityEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static - * @param {google.ads.admanager.v1.ITargeting} message Targeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum} message CustomFieldVisibilityEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Targeting.encode = function encode(message, writer) { + CustomFieldVisibilityEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.geoTargeting != null && Object.hasOwnProperty.call(message, "geoTargeting")) - $root.google.ads.admanager.v1.GeoTargeting.encode(message.geoTargeting, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.technologyTargeting != null && Object.hasOwnProperty.call(message, "technologyTargeting")) - $root.google.ads.admanager.v1.TechnologyTargeting.encode(message.technologyTargeting, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.inventoryTargeting != null && Object.hasOwnProperty.call(message, "inventoryTargeting")) - $root.google.ads.admanager.v1.InventoryTargeting.encode(message.inventoryTargeting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.requestPlatformTargeting != null && Object.hasOwnProperty.call(message, "requestPlatformTargeting")) - $root.google.ads.admanager.v1.RequestPlatformTargeting.encode(message.requestPlatformTargeting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.customTargeting != null && Object.hasOwnProperty.call(message, "customTargeting")) - $root.google.ads.admanager.v1.CustomTargeting.encode(message.customTargeting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.userDomainTargeting != null && Object.hasOwnProperty.call(message, "userDomainTargeting")) - $root.google.ads.admanager.v1.UserDomainTargeting.encode(message.userDomainTargeting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.videoPositionTargeting != null && Object.hasOwnProperty.call(message, "videoPositionTargeting")) - $root.google.ads.admanager.v1.VideoPositionTargeting.encode(message.videoPositionTargeting, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.dataSegmentTargeting != null && Object.hasOwnProperty.call(message, "dataSegmentTargeting")) - $root.google.ads.admanager.v1.DataSegmentTargeting.encode(message.dataSegmentTargeting, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified Targeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * Encodes the specified CustomFieldVisibilityEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldVisibilityEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static - * @param {google.ads.admanager.v1.ITargeting} message Targeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldVisibilityEnum} message CustomFieldVisibilityEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Targeting.encodeDelimited = function encodeDelimited(message, writer) { + CustomFieldVisibilityEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Targeting message from the specified reader or buffer. + * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Targeting} Targeting + * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Targeting.decode = function decode(reader, length, error) { + CustomFieldVisibilityEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Targeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldVisibilityEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.decode(reader, reader.uint32()); - break; - } - case 3: { - message.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.decode(reader, reader.uint32()); - break; - } - case 6: { - message.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.decode(reader, reader.uint32()); - break; - } - case 7: { - message.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.decode(reader, reader.uint32()); - break; - } - case 10: { - message.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.decode(reader, reader.uint32()); - break; - } - case 12: { - message.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.decode(reader, reader.uint32()); - break; - } - case 13: { - message.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -33540,222 +33558,136 @@ }; /** - * Decodes a Targeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldVisibilityEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Targeting} Targeting + * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Targeting.decodeDelimited = function decodeDelimited(reader) { + CustomFieldVisibilityEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Targeting message. + * Verifies a CustomFieldVisibilityEnum message. * @function verify - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Targeting.verify = function verify(message) { + CustomFieldVisibilityEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.geoTargeting != null && message.hasOwnProperty("geoTargeting")) { - var error = $root.google.ads.admanager.v1.GeoTargeting.verify(message.geoTargeting); - if (error) - return "geoTargeting." + error; - } - if (message.technologyTargeting != null && message.hasOwnProperty("technologyTargeting")) { - var error = $root.google.ads.admanager.v1.TechnologyTargeting.verify(message.technologyTargeting); - if (error) - return "technologyTargeting." + error; - } - if (message.inventoryTargeting != null && message.hasOwnProperty("inventoryTargeting")) { - var error = $root.google.ads.admanager.v1.InventoryTargeting.verify(message.inventoryTargeting); - if (error) - return "inventoryTargeting." + error; - } - if (message.requestPlatformTargeting != null && message.hasOwnProperty("requestPlatformTargeting")) { - var error = $root.google.ads.admanager.v1.RequestPlatformTargeting.verify(message.requestPlatformTargeting); - if (error) - return "requestPlatformTargeting." + error; - } - if (message.customTargeting != null && message.hasOwnProperty("customTargeting")) { - var error = $root.google.ads.admanager.v1.CustomTargeting.verify(message.customTargeting); - if (error) - return "customTargeting." + error; - } - if (message.userDomainTargeting != null && message.hasOwnProperty("userDomainTargeting")) { - var error = $root.google.ads.admanager.v1.UserDomainTargeting.verify(message.userDomainTargeting); - if (error) - return "userDomainTargeting." + error; - } - if (message.videoPositionTargeting != null && message.hasOwnProperty("videoPositionTargeting")) { - var error = $root.google.ads.admanager.v1.VideoPositionTargeting.verify(message.videoPositionTargeting); - if (error) - return "videoPositionTargeting." + error; - } - if (message.dataSegmentTargeting != null && message.hasOwnProperty("dataSegmentTargeting")) { - var error = $root.google.ads.admanager.v1.DataSegmentTargeting.verify(message.dataSegmentTargeting); - if (error) - return "dataSegmentTargeting." + error; - } return null; }; /** - * Creates a Targeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldVisibilityEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Targeting} Targeting + * @returns {google.ads.admanager.v1.CustomFieldVisibilityEnum} CustomFieldVisibilityEnum */ - Targeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Targeting) + CustomFieldVisibilityEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldVisibilityEnum) return object; - var message = new $root.google.ads.admanager.v1.Targeting(); - if (object.geoTargeting != null) { - if (typeof object.geoTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.geoTargeting: object expected"); - message.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.fromObject(object.geoTargeting); - } - if (object.technologyTargeting != null) { - if (typeof object.technologyTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.technologyTargeting: object expected"); - message.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.fromObject(object.technologyTargeting); - } - if (object.inventoryTargeting != null) { - if (typeof object.inventoryTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.inventoryTargeting: object expected"); - message.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.fromObject(object.inventoryTargeting); - } - if (object.requestPlatformTargeting != null) { - if (typeof object.requestPlatformTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.requestPlatformTargeting: object expected"); - message.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.fromObject(object.requestPlatformTargeting); - } - if (object.customTargeting != null) { - if (typeof object.customTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.customTargeting: object expected"); - message.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.fromObject(object.customTargeting); - } - if (object.userDomainTargeting != null) { - if (typeof object.userDomainTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.userDomainTargeting: object expected"); - message.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.fromObject(object.userDomainTargeting); - } - if (object.videoPositionTargeting != null) { - if (typeof object.videoPositionTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.videoPositionTargeting: object expected"); - message.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.fromObject(object.videoPositionTargeting); - } - if (object.dataSegmentTargeting != null) { - if (typeof object.dataSegmentTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.Targeting.dataSegmentTargeting: object expected"); - message.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.fromObject(object.dataSegmentTargeting); - } - return message; + return new $root.google.ads.admanager.v1.CustomFieldVisibilityEnum(); }; /** - * Creates a plain object from a Targeting message. Also converts values to other types if specified. + * Creates a plain object from a CustomFieldVisibilityEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static - * @param {google.ads.admanager.v1.Targeting} message Targeting + * @param {google.ads.admanager.v1.CustomFieldVisibilityEnum} message CustomFieldVisibilityEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Targeting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.geoTargeting = null; - object.technologyTargeting = null; - object.inventoryTargeting = null; - object.requestPlatformTargeting = null; - object.customTargeting = null; - object.userDomainTargeting = null; - object.videoPositionTargeting = null; - object.dataSegmentTargeting = null; - } - if (message.geoTargeting != null && message.hasOwnProperty("geoTargeting")) - object.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.toObject(message.geoTargeting, options); - if (message.technologyTargeting != null && message.hasOwnProperty("technologyTargeting")) - object.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.toObject(message.technologyTargeting, options); - if (message.inventoryTargeting != null && message.hasOwnProperty("inventoryTargeting")) - object.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.toObject(message.inventoryTargeting, options); - if (message.requestPlatformTargeting != null && message.hasOwnProperty("requestPlatformTargeting")) - object.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.toObject(message.requestPlatformTargeting, options); - if (message.customTargeting != null && message.hasOwnProperty("customTargeting")) - object.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.toObject(message.customTargeting, options); - if (message.userDomainTargeting != null && message.hasOwnProperty("userDomainTargeting")) - object.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.toObject(message.userDomainTargeting, options); - if (message.videoPositionTargeting != null && message.hasOwnProperty("videoPositionTargeting")) - object.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.toObject(message.videoPositionTargeting, options); - if (message.dataSegmentTargeting != null && message.hasOwnProperty("dataSegmentTargeting")) - object.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.toObject(message.dataSegmentTargeting, options); - return object; + CustomFieldVisibilityEnum.toObject = function toObject() { + return {}; }; /** - * Converts this Targeting to JSON. + * Converts this CustomFieldVisibilityEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @instance * @returns {Object.} JSON object */ - Targeting.prototype.toJSON = function toJSON() { + CustomFieldVisibilityEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Targeting + * Gets the default type url for CustomFieldVisibilityEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.Targeting + * @memberof google.ads.admanager.v1.CustomFieldVisibilityEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Targeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomFieldVisibilityEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Targeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldVisibilityEnum"; }; - return Targeting; + /** + * CustomFieldVisibility enum. + * @name google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility + * @enum {number} + * @property {number} CUSTOM_FIELD_VISIBILITY_UNSPECIFIED=0 CUSTOM_FIELD_VISIBILITY_UNSPECIFIED value + * @property {number} HIDDEN=1 HIDDEN value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} EDITABLE=3 EDITABLE value + */ + CustomFieldVisibilityEnum.CustomFieldVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIDDEN"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "EDITABLE"] = 3; + return values; + })(); + + return CustomFieldVisibilityEnum; })(); - v1.GeoTargeting = (function() { + v1.CustomField = (function() { /** - * Properties of a GeoTargeting. + * Properties of a CustomField. * @memberof google.ads.admanager.v1 - * @interface IGeoTargeting - * @property {Array.|null} [targetedGeos] GeoTargeting targetedGeos - * @property {Array.|null} [excludedGeos] GeoTargeting excludedGeos + * @interface ICustomField + * @property {string|null} [name] CustomField name + * @property {number|Long|null} [customFieldId] CustomField customFieldId + * @property {string|null} [displayName] CustomField displayName + * @property {string|null} [description] CustomField description + * @property {google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null} [status] CustomField status + * @property {google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null} [entityType] CustomField entityType + * @property {google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null} [dataType] CustomField dataType + * @property {google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null} [visibility] CustomField visibility + * @property {Array.|null} [options] CustomField options */ /** - * Constructs a new GeoTargeting. + * Constructs a new CustomField. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GeoTargeting. - * @implements IGeoTargeting + * @classdesc Represents a CustomField. + * @implements ICustomField * @constructor - * @param {google.ads.admanager.v1.IGeoTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomField=} [properties] Properties to set */ - function GeoTargeting(properties) { - this.targetedGeos = []; - this.excludedGeos = []; + function CustomField(properties) { + this.options = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33763,97 +33695,237 @@ } /** - * GeoTargeting targetedGeos. - * @member {Array.} targetedGeos - * @memberof google.ads.admanager.v1.GeoTargeting + * CustomField name. + * @member {string} name + * @memberof google.ads.admanager.v1.CustomField * @instance */ - GeoTargeting.prototype.targetedGeos = $util.emptyArray; + CustomField.prototype.name = ""; /** - * GeoTargeting excludedGeos. - * @member {Array.} excludedGeos - * @memberof google.ads.admanager.v1.GeoTargeting + * CustomField customFieldId. + * @member {number|Long|null|undefined} customFieldId + * @memberof google.ads.admanager.v1.CustomField * @instance */ - GeoTargeting.prototype.excludedGeos = $util.emptyArray; + CustomField.prototype.customFieldId = null; /** - * Creates a new GeoTargeting instance using the specified properties. + * CustomField displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.displayName = null; + + /** + * CustomField description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.description = null; + + /** + * CustomField status. + * @member {google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus|null|undefined} status + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.status = null; + + /** + * CustomField entityType. + * @member {google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType|null|undefined} entityType + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.entityType = null; + + /** + * CustomField dataType. + * @member {google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType|null|undefined} dataType + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.dataType = null; + + /** + * CustomField visibility. + * @member {google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility|null|undefined} visibility + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.visibility = null; + + /** + * CustomField options. + * @member {Array.} options + * @memberof google.ads.admanager.v1.CustomField + * @instance + */ + CustomField.prototype.options = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_customFieldId", { + get: $util.oneOfGetter($oneOfFields = ["customFieldId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_entityType", { + get: $util.oneOfGetter($oneOfFields = ["entityType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_dataType", { + get: $util.oneOfGetter($oneOfFields = ["dataType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomField.prototype, "_visibility", { + get: $util.oneOfGetter($oneOfFields = ["visibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomField instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static - * @param {google.ads.admanager.v1.IGeoTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting instance + * @param {google.ads.admanager.v1.ICustomField=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomField} CustomField instance */ - GeoTargeting.create = function create(properties) { - return new GeoTargeting(properties); + CustomField.create = function create(properties) { + return new CustomField(properties); }; /** - * Encodes the specified GeoTargeting message. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * Encodes the specified CustomField message. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static - * @param {google.ads.admanager.v1.IGeoTargeting} message GeoTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomField} message CustomField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeoTargeting.encode = function encode(message, writer) { + CustomField.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedGeos != null && message.targetedGeos.length) - for (var i = 0; i < message.targetedGeos.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedGeos[i]); - if (message.excludedGeos != null && message.excludedGeos.length) - for (var i = 0; i < message.excludedGeos.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedGeos[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.customFieldId != null && Object.hasOwnProperty.call(message, "customFieldId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.customFieldId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.entityType); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.dataType); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.visibility); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.ads.admanager.v1.CustomFieldOption.encode(message.options[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified GeoTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * Encodes the specified CustomField message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomField.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static - * @param {google.ads.admanager.v1.IGeoTargeting} message GeoTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomField} message CustomField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeoTargeting.encodeDelimited = function encodeDelimited(message, writer) { + CustomField.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeoTargeting message from the specified reader or buffer. + * Decodes a CustomField message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + * @returns {google.ads.admanager.v1.CustomField} CustomField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeoTargeting.decode = function decode(reader, length, error) { + CustomField.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GeoTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomField(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.customFieldId = reader.int64(); + break; + } case 3: { - if (!(message.targetedGeos && message.targetedGeos.length)) - message.targetedGeos = []; - message.targetedGeos.push(reader.string()); + message.displayName = reader.string(); break; } case 4: { - if (!(message.excludedGeos && message.excludedGeos.length)) - message.excludedGeos = []; - message.excludedGeos.push(reader.string()); + message.description = reader.string(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 7: { + message.entityType = reader.int32(); + break; + } + case 8: { + message.dataType = reader.int32(); + break; + } + case 9: { + message.visibility = reader.int32(); + break; + } + case 10: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.ads.admanager.v1.CustomFieldOption.decode(reader, reader.uint32())); break; } default: @@ -33865,157 +33937,370 @@ }; /** - * Decodes a GeoTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomField message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + * @returns {google.ads.admanager.v1.CustomField} CustomField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeoTargeting.decodeDelimited = function decodeDelimited(reader) { + CustomField.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeoTargeting message. + * Verifies a CustomField message. * @function verify - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeoTargeting.verify = function verify(message) { + CustomField.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedGeos != null && message.hasOwnProperty("targetedGeos")) { - if (!Array.isArray(message.targetedGeos)) - return "targetedGeos: array expected"; - for (var i = 0; i < message.targetedGeos.length; ++i) - if (!$util.isString(message.targetedGeos[i])) - return "targetedGeos: string[] expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.customFieldId != null && message.hasOwnProperty("customFieldId")) { + properties._customFieldId = 1; + if (!$util.isInteger(message.customFieldId) && !(message.customFieldId && $util.isInteger(message.customFieldId.low) && $util.isInteger(message.customFieldId.high))) + return "customFieldId: integer|Long expected"; } - if (message.excludedGeos != null && message.hasOwnProperty("excludedGeos")) { - if (!Array.isArray(message.excludedGeos)) - return "excludedGeos: array expected"; - for (var i = 0; i < message.excludedGeos.length; ++i) - if (!$util.isString(message.excludedGeos[i])) - return "excludedGeos: string[] expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; } - return null; - }; - - /** - * Creates a GeoTargeting message from a plain object. Also converts values to their respective internal types. + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.entityType != null && message.hasOwnProperty("entityType")) { + properties._entityType = 1; + switch (message.entityType) { + default: + return "entityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.dataType != null && message.hasOwnProperty("dataType")) { + properties._dataType = 1; + switch (message.dataType) { + default: + return "dataType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.visibility != null && message.hasOwnProperty("visibility")) { + properties._visibility = 1; + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomFieldOption.verify(message.options[i]); + if (error) + return "options." + error; + } + } + return null; + }; + + /** + * Creates a CustomField message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + * @returns {google.ads.admanager.v1.CustomField} CustomField */ - GeoTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GeoTargeting) + CustomField.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomField) return object; - var message = new $root.google.ads.admanager.v1.GeoTargeting(); - if (object.targetedGeos) { - if (!Array.isArray(object.targetedGeos)) - throw TypeError(".google.ads.admanager.v1.GeoTargeting.targetedGeos: array expected"); - message.targetedGeos = []; - for (var i = 0; i < object.targetedGeos.length; ++i) - message.targetedGeos[i] = String(object.targetedGeos[i]); + var message = new $root.google.ads.admanager.v1.CustomField(); + if (object.name != null) + message.name = String(object.name); + if (object.customFieldId != null) + if ($util.Long) + (message.customFieldId = $util.Long.fromValue(object.customFieldId)).unsigned = false; + else if (typeof object.customFieldId === "string") + message.customFieldId = parseInt(object.customFieldId, 10); + else if (typeof object.customFieldId === "number") + message.customFieldId = object.customFieldId; + else if (typeof object.customFieldId === "object") + message.customFieldId = new $util.LongBits(object.customFieldId.low >>> 0, object.customFieldId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "CUSTOM_FIELD_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; } - if (object.excludedGeos) { - if (!Array.isArray(object.excludedGeos)) - throw TypeError(".google.ads.admanager.v1.GeoTargeting.excludedGeos: array expected"); - message.excludedGeos = []; - for (var i = 0; i < object.excludedGeos.length; ++i) - message.excludedGeos[i] = String(object.excludedGeos[i]); + switch (object.entityType) { + default: + if (typeof object.entityType === "number") { + message.entityType = object.entityType; + break; + } + break; + case "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED": + case 0: + message.entityType = 0; + break; + case "LINE_ITEM": + case 1: + message.entityType = 1; + break; + case "ORDER": + case 2: + message.entityType = 2; + break; + case "CREATIVE": + case 3: + message.entityType = 3; + break; + case "PROPOSAL": + case 4: + message.entityType = 4; + break; + case "PROPOSAL_LINE_ITEM": + case 5: + message.entityType = 5; + break; + } + switch (object.dataType) { + default: + if (typeof object.dataType === "number") { + message.dataType = object.dataType; + break; + } + break; + case "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED": + case 0: + message.dataType = 0; + break; + case "STRING": + case 1: + message.dataType = 1; + break; + case "NUMBER": + case 2: + message.dataType = 2; + break; + case "TOGGLE": + case 3: + message.dataType = 3; + break; + case "DROP_DOWN": + case 4: + message.dataType = 4; + break; + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED": + case 0: + message.visibility = 0; + break; + case "HIDDEN": + case 1: + message.visibility = 1; + break; + case "READ_ONLY": + case 2: + message.visibility = 2; + break; + case "EDITABLE": + case 3: + message.visibility = 3; + break; + } + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.ads.admanager.v1.CustomField.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CustomField.options: object expected"); + message.options[i] = $root.google.ads.admanager.v1.CustomFieldOption.fromObject(object.options[i]); + } } return message; }; /** - * Creates a plain object from a GeoTargeting message. Also converts values to other types if specified. + * Creates a plain object from a CustomField message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static - * @param {google.ads.admanager.v1.GeoTargeting} message GeoTargeting + * @param {google.ads.admanager.v1.CustomField} message CustomField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeoTargeting.toObject = function toObject(message, options) { + CustomField.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedGeos = []; - object.excludedGeos = []; + if (options.arrays || options.defaults) + object.options = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customFieldId != null && message.hasOwnProperty("customFieldId")) { + if (typeof message.customFieldId === "number") + object.customFieldId = options.longs === String ? String(message.customFieldId) : message.customFieldId; + else + object.customFieldId = options.longs === String ? $util.Long.prototype.toString.call(message.customFieldId) : options.longs === Number ? new $util.LongBits(message.customFieldId.low >>> 0, message.customFieldId.high >>> 0).toNumber() : message.customFieldId; + if (options.oneofs) + object._customFieldId = "customFieldId"; } - if (message.targetedGeos && message.targetedGeos.length) { - object.targetedGeos = []; - for (var j = 0; j < message.targetedGeos.length; ++j) - object.targetedGeos[j] = message.targetedGeos[j]; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; } - if (message.excludedGeos && message.excludedGeos.length) { - object.excludedGeos = []; - for (var j = 0; j < message.excludedGeos.length; ++j) - object.excludedGeos[j] = message.excludedGeos[j]; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.entityType != null && message.hasOwnProperty("entityType")) { + object.entityType = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType[message.entityType] === undefined ? message.entityType : $root.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType[message.entityType] : message.entityType; + if (options.oneofs) + object._entityType = "entityType"; + } + if (message.dataType != null && message.hasOwnProperty("dataType")) { + object.dataType = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType[message.dataType] === undefined ? message.dataType : $root.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType[message.dataType] : message.dataType; + if (options.oneofs) + object._dataType = "dataType"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) { + object.visibility = options.enums === String ? $root.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility[message.visibility] === undefined ? message.visibility : $root.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility[message.visibility] : message.visibility; + if (options.oneofs) + object._visibility = "visibility"; + } + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.ads.admanager.v1.CustomFieldOption.toObject(message.options[j], options); } return object; }; /** - * Converts this GeoTargeting to JSON. + * Converts this CustomField to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @instance * @returns {Object.} JSON object */ - GeoTargeting.prototype.toJSON = function toJSON() { + CustomField.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeoTargeting + * Gets the default type url for CustomField * @function getTypeUrl - * @memberof google.ads.admanager.v1.GeoTargeting + * @memberof google.ads.admanager.v1.CustomField * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeoTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GeoTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomField"; }; - return GeoTargeting; + return CustomField; })(); - v1.TechnologyTargeting = (function() { + v1.CustomFieldOption = (function() { /** - * Properties of a TechnologyTargeting. + * Properties of a CustomFieldOption. * @memberof google.ads.admanager.v1 - * @interface ITechnologyTargeting - * @property {google.ads.admanager.v1.IBandwidthTargeting|null} [bandwidthTargeting] TechnologyTargeting bandwidthTargeting - * @property {google.ads.admanager.v1.IDeviceCategoryTargeting|null} [deviceCategoryTargeting] TechnologyTargeting deviceCategoryTargeting - * @property {google.ads.admanager.v1.IOperatingSystemTargeting|null} [operatingSystemTargeting] TechnologyTargeting operatingSystemTargeting + * @interface ICustomFieldOption + * @property {number|Long|null} [customFieldOptionId] CustomFieldOption customFieldOptionId + * @property {string|null} [displayName] CustomFieldOption displayName */ /** - * Constructs a new TechnologyTargeting. + * Constructs a new CustomFieldOption. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TechnologyTargeting. - * @implements ITechnologyTargeting + * @classdesc Represents a CustomFieldOption. + * @implements ICustomFieldOption * @constructor - * @param {google.ads.admanager.v1.ITechnologyTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomFieldOption=} [properties] Properties to set */ - function TechnologyTargeting(properties) { + function CustomFieldOption(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34023,105 +34308,91 @@ } /** - * TechnologyTargeting bandwidthTargeting. - * @member {google.ads.admanager.v1.IBandwidthTargeting|null|undefined} bandwidthTargeting - * @memberof google.ads.admanager.v1.TechnologyTargeting - * @instance - */ - TechnologyTargeting.prototype.bandwidthTargeting = null; - - /** - * TechnologyTargeting deviceCategoryTargeting. - * @member {google.ads.admanager.v1.IDeviceCategoryTargeting|null|undefined} deviceCategoryTargeting - * @memberof google.ads.admanager.v1.TechnologyTargeting + * CustomFieldOption customFieldOptionId. + * @member {number|Long} customFieldOptionId + * @memberof google.ads.admanager.v1.CustomFieldOption * @instance */ - TechnologyTargeting.prototype.deviceCategoryTargeting = null; + CustomFieldOption.prototype.customFieldOptionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * TechnologyTargeting operatingSystemTargeting. - * @member {google.ads.admanager.v1.IOperatingSystemTargeting|null|undefined} operatingSystemTargeting - * @memberof google.ads.admanager.v1.TechnologyTargeting + * CustomFieldOption displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.CustomFieldOption * @instance */ - TechnologyTargeting.prototype.operatingSystemTargeting = null; + CustomFieldOption.prototype.displayName = ""; /** - * Creates a new TechnologyTargeting instance using the specified properties. + * Creates a new CustomFieldOption instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static - * @param {google.ads.admanager.v1.ITechnologyTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting instance + * @param {google.ads.admanager.v1.ICustomFieldOption=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption instance */ - TechnologyTargeting.create = function create(properties) { - return new TechnologyTargeting(properties); + CustomFieldOption.create = function create(properties) { + return new CustomFieldOption(properties); }; /** - * Encodes the specified TechnologyTargeting message. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * Encodes the specified CustomFieldOption message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static - * @param {google.ads.admanager.v1.ITechnologyTargeting} message TechnologyTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldOption} message CustomFieldOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TechnologyTargeting.encode = function encode(message, writer) { + CustomFieldOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deviceCategoryTargeting != null && Object.hasOwnProperty.call(message, "deviceCategoryTargeting")) - $root.google.ads.admanager.v1.DeviceCategoryTargeting.encode(message.deviceCategoryTargeting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.operatingSystemTargeting != null && Object.hasOwnProperty.call(message, "operatingSystemTargeting")) - $root.google.ads.admanager.v1.OperatingSystemTargeting.encode(message.operatingSystemTargeting, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.bandwidthTargeting != null && Object.hasOwnProperty.call(message, "bandwidthTargeting")) - $root.google.ads.admanager.v1.BandwidthTargeting.encode(message.bandwidthTargeting, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.customFieldOptionId != null && Object.hasOwnProperty.call(message, "customFieldOptionId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.customFieldOptionId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified TechnologyTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * Encodes the specified CustomFieldOption message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static - * @param {google.ads.admanager.v1.ITechnologyTargeting} message TechnologyTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldOption} message CustomFieldOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TechnologyTargeting.encodeDelimited = function encodeDelimited(message, writer) { + CustomFieldOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TechnologyTargeting message from the specified reader or buffer. + * Decodes a CustomFieldOption message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TechnologyTargeting.decode = function decode(reader, length, error) { + CustomFieldOption.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TechnologyTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldOption(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.decode(reader, reader.uint32()); - break; - } case 1: { - message.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.decode(reader, reader.uint32()); + message.customFieldOptionId = reader.int64(); break; } case 2: { - message.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } default: @@ -34133,157 +34404,444 @@ }; /** - * Decodes a TechnologyTargeting message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TechnologyTargeting.decodeDelimited = function decodeDelimited(reader) { + CustomFieldOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TechnologyTargeting message. + * Verifies a CustomFieldOption message. * @function verify - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TechnologyTargeting.verify = function verify(message) { + CustomFieldOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bandwidthTargeting != null && message.hasOwnProperty("bandwidthTargeting")) { - var error = $root.google.ads.admanager.v1.BandwidthTargeting.verify(message.bandwidthTargeting); - if (error) - return "bandwidthTargeting." + error; - } - if (message.deviceCategoryTargeting != null && message.hasOwnProperty("deviceCategoryTargeting")) { - var error = $root.google.ads.admanager.v1.DeviceCategoryTargeting.verify(message.deviceCategoryTargeting); - if (error) - return "deviceCategoryTargeting." + error; - } - if (message.operatingSystemTargeting != null && message.hasOwnProperty("operatingSystemTargeting")) { - var error = $root.google.ads.admanager.v1.OperatingSystemTargeting.verify(message.operatingSystemTargeting); - if (error) - return "operatingSystemTargeting." + error; - } + if (message.customFieldOptionId != null && message.hasOwnProperty("customFieldOptionId")) + if (!$util.isInteger(message.customFieldOptionId) && !(message.customFieldOptionId && $util.isInteger(message.customFieldOptionId.low) && $util.isInteger(message.customFieldOptionId.high))) + return "customFieldOptionId: integer|Long expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a TechnologyTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + * @returns {google.ads.admanager.v1.CustomFieldOption} CustomFieldOption */ - TechnologyTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TechnologyTargeting) + CustomFieldOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldOption) return object; - var message = new $root.google.ads.admanager.v1.TechnologyTargeting(); - if (object.bandwidthTargeting != null) { - if (typeof object.bandwidthTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.bandwidthTargeting: object expected"); - message.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.fromObject(object.bandwidthTargeting); - } - if (object.deviceCategoryTargeting != null) { - if (typeof object.deviceCategoryTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.deviceCategoryTargeting: object expected"); - message.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.fromObject(object.deviceCategoryTargeting); - } - if (object.operatingSystemTargeting != null) { - if (typeof object.operatingSystemTargeting !== "object") - throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.operatingSystemTargeting: object expected"); - message.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.fromObject(object.operatingSystemTargeting); - } + var message = new $root.google.ads.admanager.v1.CustomFieldOption(); + if (object.customFieldOptionId != null) + if ($util.Long) + (message.customFieldOptionId = $util.Long.fromValue(object.customFieldOptionId)).unsigned = false; + else if (typeof object.customFieldOptionId === "string") + message.customFieldOptionId = parseInt(object.customFieldOptionId, 10); + else if (typeof object.customFieldOptionId === "number") + message.customFieldOptionId = object.customFieldOptionId; + else if (typeof object.customFieldOptionId === "object") + message.customFieldOptionId = new $util.LongBits(object.customFieldOptionId.low >>> 0, object.customFieldOptionId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a TechnologyTargeting message. Also converts values to other types if specified. + * Creates a plain object from a CustomFieldOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static - * @param {google.ads.admanager.v1.TechnologyTargeting} message TechnologyTargeting + * @param {google.ads.admanager.v1.CustomFieldOption} message CustomFieldOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TechnologyTargeting.toObject = function toObject(message, options) { + CustomFieldOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.deviceCategoryTargeting = null; - object.operatingSystemTargeting = null; - object.bandwidthTargeting = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.customFieldOptionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.customFieldOptionId = options.longs === String ? "0" : 0; + object.displayName = ""; } - if (message.deviceCategoryTargeting != null && message.hasOwnProperty("deviceCategoryTargeting")) - object.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.toObject(message.deviceCategoryTargeting, options); - if (message.operatingSystemTargeting != null && message.hasOwnProperty("operatingSystemTargeting")) - object.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.toObject(message.operatingSystemTargeting, options); - if (message.bandwidthTargeting != null && message.hasOwnProperty("bandwidthTargeting")) - object.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.toObject(message.bandwidthTargeting, options); + if (message.customFieldOptionId != null && message.hasOwnProperty("customFieldOptionId")) + if (typeof message.customFieldOptionId === "number") + object.customFieldOptionId = options.longs === String ? String(message.customFieldOptionId) : message.customFieldOptionId; + else + object.customFieldOptionId = options.longs === String ? $util.Long.prototype.toString.call(message.customFieldOptionId) : options.longs === Number ? new $util.LongBits(message.customFieldOptionId.low >>> 0, message.customFieldOptionId.high >>> 0).toNumber() : message.customFieldOptionId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this TechnologyTargeting to JSON. + * Converts this CustomFieldOption to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @instance * @returns {Object.} JSON object */ - TechnologyTargeting.prototype.toJSON = function toJSON() { + CustomFieldOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TechnologyTargeting + * Gets the default type url for CustomFieldOption * @function getTypeUrl - * @memberof google.ads.admanager.v1.TechnologyTargeting + * @memberof google.ads.admanager.v1.CustomFieldOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TechnologyTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomFieldOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TechnologyTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldOption"; }; - return TechnologyTargeting; + return CustomFieldOption; })(); - v1.BandwidthTargeting = (function() { + v1.CustomFieldService = (function() { /** - * Properties of a BandwidthTargeting. + * Constructs a new CustomFieldService service. * @memberof google.ads.admanager.v1 - * @interface IBandwidthTargeting - * @property {Array.|null} [targetedBandwidthGroups] BandwidthTargeting targetedBandwidthGroups - * @property {Array.|null} [excludedBandwidthGroups] BandwidthTargeting excludedBandwidthGroups + * @classdesc Represents a CustomFieldService + * @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 CustomFieldService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CustomFieldService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomFieldService; /** - * Constructs a new BandwidthTargeting. + * Creates new CustomFieldService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CustomFieldService + * @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 {CustomFieldService} RPC service. Useful where requests and/or responses are streamed. + */ + CustomFieldService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|getCustomField}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef GetCustomFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CustomField} [response] CustomField + */ + + /** + * Calls GetCustomField. + * @function getCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IGetCustomFieldRequest} request GetCustomFieldRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.GetCustomFieldCallback} callback Node-style callback called with the error, if any, and CustomField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.getCustomField = function getCustomField(request, callback) { + return this.rpcCall(getCustomField, $root.google.ads.admanager.v1.GetCustomFieldRequest, $root.google.ads.admanager.v1.CustomField, request, callback); + }, "name", { value: "GetCustomField" }); + + /** + * Calls GetCustomField. + * @function getCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IGetCustomFieldRequest} request GetCustomFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|listCustomFields}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef ListCustomFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCustomFieldsResponse} [response] ListCustomFieldsResponse + */ + + /** + * Calls ListCustomFields. + * @function listCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IListCustomFieldsRequest} request ListCustomFieldsRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.ListCustomFieldsCallback} callback Node-style callback called with the error, if any, and ListCustomFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.listCustomFields = function listCustomFields(request, callback) { + return this.rpcCall(listCustomFields, $root.google.ads.admanager.v1.ListCustomFieldsRequest, $root.google.ads.admanager.v1.ListCustomFieldsResponse, request, callback); + }, "name", { value: "ListCustomFields" }); + + /** + * Calls ListCustomFields. + * @function listCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IListCustomFieldsRequest} request ListCustomFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|createCustomField}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef CreateCustomFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CustomField} [response] CustomField + */ + + /** + * Calls CreateCustomField. + * @function createCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest} request CreateCustomFieldRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.CreateCustomFieldCallback} callback Node-style callback called with the error, if any, and CustomField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.createCustomField = function createCustomField(request, callback) { + return this.rpcCall(createCustomField, $root.google.ads.admanager.v1.CreateCustomFieldRequest, $root.google.ads.admanager.v1.CustomField, request, callback); + }, "name", { value: "CreateCustomField" }); + + /** + * Calls CreateCustomField. + * @function createCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest} request CreateCustomFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchCreateCustomFields}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef BatchCreateCustomFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} [response] BatchCreateCustomFieldsResponse + */ + + /** + * Calls BatchCreateCustomFields. + * @function batchCreateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest} request BatchCreateCustomFieldsRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.BatchCreateCustomFieldsCallback} callback Node-style callback called with the error, if any, and BatchCreateCustomFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.batchCreateCustomFields = function batchCreateCustomFields(request, callback) { + return this.rpcCall(batchCreateCustomFields, $root.google.ads.admanager.v1.BatchCreateCustomFieldsRequest, $root.google.ads.admanager.v1.BatchCreateCustomFieldsResponse, request, callback); + }, "name", { value: "BatchCreateCustomFields" }); + + /** + * Calls BatchCreateCustomFields. + * @function batchCreateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest} request BatchCreateCustomFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|updateCustomField}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef UpdateCustomFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CustomField} [response] CustomField + */ + + /** + * Calls UpdateCustomField. + * @function updateCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest} request UpdateCustomFieldRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.UpdateCustomFieldCallback} callback Node-style callback called with the error, if any, and CustomField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.updateCustomField = function updateCustomField(request, callback) { + return this.rpcCall(updateCustomField, $root.google.ads.admanager.v1.UpdateCustomFieldRequest, $root.google.ads.admanager.v1.CustomField, request, callback); + }, "name", { value: "UpdateCustomField" }); + + /** + * Calls UpdateCustomField. + * @function updateCustomField + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest} request UpdateCustomFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchUpdateCustomFields}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef BatchUpdateCustomFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} [response] BatchUpdateCustomFieldsResponse + */ + + /** + * Calls BatchUpdateCustomFields. + * @function batchUpdateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest} request BatchUpdateCustomFieldsRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.BatchUpdateCustomFieldsCallback} callback Node-style callback called with the error, if any, and BatchUpdateCustomFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.batchUpdateCustomFields = function batchUpdateCustomFields(request, callback) { + return this.rpcCall(batchUpdateCustomFields, $root.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest, $root.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse, request, callback); + }, "name", { value: "BatchUpdateCustomFields" }); + + /** + * Calls BatchUpdateCustomFields. + * @function batchUpdateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest} request BatchUpdateCustomFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchActivateCustomFields}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef BatchActivateCustomFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} [response] BatchActivateCustomFieldsResponse + */ + + /** + * Calls BatchActivateCustomFields. + * @function batchActivateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest} request BatchActivateCustomFieldsRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.BatchActivateCustomFieldsCallback} callback Node-style callback called with the error, if any, and BatchActivateCustomFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.batchActivateCustomFields = function batchActivateCustomFields(request, callback) { + return this.rpcCall(batchActivateCustomFields, $root.google.ads.admanager.v1.BatchActivateCustomFieldsRequest, $root.google.ads.admanager.v1.BatchActivateCustomFieldsResponse, request, callback); + }, "name", { value: "BatchActivateCustomFields" }); + + /** + * Calls BatchActivateCustomFields. + * @function batchActivateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest} request BatchActivateCustomFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomFieldService|batchDeactivateCustomFields}. + * @memberof google.ads.admanager.v1.CustomFieldService + * @typedef BatchDeactivateCustomFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} [response] BatchDeactivateCustomFieldsResponse + */ + + /** + * Calls BatchDeactivateCustomFields. + * @function batchDeactivateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest} request BatchDeactivateCustomFieldsRequest message or plain object + * @param {google.ads.admanager.v1.CustomFieldService.BatchDeactivateCustomFieldsCallback} callback Node-style callback called with the error, if any, and BatchDeactivateCustomFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomFieldService.prototype.batchDeactivateCustomFields = function batchDeactivateCustomFields(request, callback) { + return this.rpcCall(batchDeactivateCustomFields, $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest, $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse, request, callback); + }, "name", { value: "BatchDeactivateCustomFields" }); + + /** + * Calls BatchDeactivateCustomFields. + * @function batchDeactivateCustomFields + * @memberof google.ads.admanager.v1.CustomFieldService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest} request BatchDeactivateCustomFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CustomFieldService; + })(); + + v1.GetCustomFieldRequest = (function() { + + /** + * Properties of a GetCustomFieldRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a BandwidthTargeting. - * @implements IBandwidthTargeting + * @interface IGetCustomFieldRequest + * @property {string|null} [name] GetCustomFieldRequest name + */ + + /** + * Constructs a new GetCustomFieldRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCustomFieldRequest. + * @implements IGetCustomFieldRequest * @constructor - * @param {google.ads.admanager.v1.IBandwidthTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetCustomFieldRequest=} [properties] Properties to set */ - function BandwidthTargeting(properties) { - this.targetedBandwidthGroups = []; - this.excludedBandwidthGroups = []; + function GetCustomFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34291,97 +34849,77 @@ } /** - * BandwidthTargeting targetedBandwidthGroups. - * @member {Array.} targetedBandwidthGroups - * @memberof google.ads.admanager.v1.BandwidthTargeting - * @instance - */ - BandwidthTargeting.prototype.targetedBandwidthGroups = $util.emptyArray; - - /** - * BandwidthTargeting excludedBandwidthGroups. - * @member {Array.} excludedBandwidthGroups - * @memberof google.ads.admanager.v1.BandwidthTargeting + * GetCustomFieldRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @instance */ - BandwidthTargeting.prototype.excludedBandwidthGroups = $util.emptyArray; + GetCustomFieldRequest.prototype.name = ""; /** - * Creates a new BandwidthTargeting instance using the specified properties. + * Creates a new GetCustomFieldRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IBandwidthTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting instance + * @param {google.ads.admanager.v1.IGetCustomFieldRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest instance */ - BandwidthTargeting.create = function create(properties) { - return new BandwidthTargeting(properties); + GetCustomFieldRequest.create = function create(properties) { + return new GetCustomFieldRequest(properties); }; /** - * Encodes the specified BandwidthTargeting message. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * Encodes the specified GetCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IBandwidthTargeting} message BandwidthTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomFieldRequest} message GetCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BandwidthTargeting.encode = function encode(message, writer) { + GetCustomFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedBandwidthGroups != null && message.targetedBandwidthGroups.length) - for (var i = 0; i < message.targetedBandwidthGroups.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedBandwidthGroups[i]); - if (message.excludedBandwidthGroups != null && message.excludedBandwidthGroups.length) - for (var i = 0; i < message.excludedBandwidthGroups.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedBandwidthGroups[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 BandwidthTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * Encodes the specified GetCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IBandwidthTargeting} message BandwidthTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomFieldRequest} message GetCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BandwidthTargeting.encodeDelimited = function encodeDelimited(message, writer) { + GetCustomFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BandwidthTargeting message from the specified reader or buffer. + * Decodes a GetCustomFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BandwidthTargeting.decode = function decode(reader, length, error) { + GetCustomFieldRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BandwidthTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - if (!(message.targetedBandwidthGroups && message.targetedBandwidthGroups.length)) - message.targetedBandwidthGroups = []; - message.targetedBandwidthGroups.push(reader.string()); - break; - } - case 4: { - if (!(message.excludedBandwidthGroups && message.excludedBandwidthGroups.length)) - message.excludedBandwidthGroups = []; - message.excludedBandwidthGroups.push(reader.string()); + case 1: { + message.name = reader.string(); break; } default: @@ -34393,158 +34931,127 @@ }; /** - * Decodes a BandwidthTargeting message from the specified reader or buffer, length delimited. + * Decodes a GetCustomFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BandwidthTargeting.decodeDelimited = function decodeDelimited(reader) { + GetCustomFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BandwidthTargeting message. + * Verifies a GetCustomFieldRequest message. * @function verify - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BandwidthTargeting.verify = function verify(message) { + GetCustomFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedBandwidthGroups != null && message.hasOwnProperty("targetedBandwidthGroups")) { - if (!Array.isArray(message.targetedBandwidthGroups)) - return "targetedBandwidthGroups: array expected"; - for (var i = 0; i < message.targetedBandwidthGroups.length; ++i) - if (!$util.isString(message.targetedBandwidthGroups[i])) - return "targetedBandwidthGroups: string[] expected"; - } - if (message.excludedBandwidthGroups != null && message.hasOwnProperty("excludedBandwidthGroups")) { - if (!Array.isArray(message.excludedBandwidthGroups)) - return "excludedBandwidthGroups: array expected"; - for (var i = 0; i < message.excludedBandwidthGroups.length; ++i) - if (!$util.isString(message.excludedBandwidthGroups[i])) - return "excludedBandwidthGroups: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a BandwidthTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + * @returns {google.ads.admanager.v1.GetCustomFieldRequest} GetCustomFieldRequest */ - BandwidthTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.BandwidthTargeting) + GetCustomFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCustomFieldRequest) return object; - var message = new $root.google.ads.admanager.v1.BandwidthTargeting(); - if (object.targetedBandwidthGroups) { - if (!Array.isArray(object.targetedBandwidthGroups)) - throw TypeError(".google.ads.admanager.v1.BandwidthTargeting.targetedBandwidthGroups: array expected"); - message.targetedBandwidthGroups = []; - for (var i = 0; i < object.targetedBandwidthGroups.length; ++i) - message.targetedBandwidthGroups[i] = String(object.targetedBandwidthGroups[i]); - } - if (object.excludedBandwidthGroups) { - if (!Array.isArray(object.excludedBandwidthGroups)) - throw TypeError(".google.ads.admanager.v1.BandwidthTargeting.excludedBandwidthGroups: array expected"); - message.excludedBandwidthGroups = []; - for (var i = 0; i < object.excludedBandwidthGroups.length; ++i) - message.excludedBandwidthGroups[i] = String(object.excludedBandwidthGroups[i]); - } + var message = new $root.google.ads.admanager.v1.GetCustomFieldRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a BandwidthTargeting message. Also converts values to other types if specified. + * Creates a plain object from a GetCustomFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static - * @param {google.ads.admanager.v1.BandwidthTargeting} message BandwidthTargeting + * @param {google.ads.admanager.v1.GetCustomFieldRequest} message GetCustomFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BandwidthTargeting.toObject = function toObject(message, options) { + GetCustomFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedBandwidthGroups = []; - object.excludedBandwidthGroups = []; - } - if (message.targetedBandwidthGroups && message.targetedBandwidthGroups.length) { - object.targetedBandwidthGroups = []; - for (var j = 0; j < message.targetedBandwidthGroups.length; ++j) - object.targetedBandwidthGroups[j] = message.targetedBandwidthGroups[j]; - } - if (message.excludedBandwidthGroups && message.excludedBandwidthGroups.length) { - object.excludedBandwidthGroups = []; - for (var j = 0; j < message.excludedBandwidthGroups.length; ++j) - object.excludedBandwidthGroups[j] = message.excludedBandwidthGroups[j]; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this BandwidthTargeting to JSON. + * Converts this GetCustomFieldRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @instance * @returns {Object.} JSON object */ - BandwidthTargeting.prototype.toJSON = function toJSON() { + GetCustomFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BandwidthTargeting + * Gets the default type url for GetCustomFieldRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.BandwidthTargeting + * @memberof google.ads.admanager.v1.GetCustomFieldRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BandwidthTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCustomFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.BandwidthTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomFieldRequest"; }; - return BandwidthTargeting; + return GetCustomFieldRequest; })(); - v1.DeviceCategoryTargeting = (function() { + v1.ListCustomFieldsRequest = (function() { /** - * Properties of a DeviceCategoryTargeting. + * Properties of a ListCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @interface IDeviceCategoryTargeting - * @property {Array.|null} [targetedCategories] DeviceCategoryTargeting targetedCategories - * @property {Array.|null} [excludedCategories] DeviceCategoryTargeting excludedCategories + * @interface IListCustomFieldsRequest + * @property {string|null} [parent] ListCustomFieldsRequest parent + * @property {number|null} [pageSize] ListCustomFieldsRequest pageSize + * @property {string|null} [pageToken] ListCustomFieldsRequest pageToken + * @property {string|null} [filter] ListCustomFieldsRequest filter + * @property {string|null} [orderBy] ListCustomFieldsRequest orderBy + * @property {number|null} [skip] ListCustomFieldsRequest skip */ /** - * Constructs a new DeviceCategoryTargeting. + * Constructs a new ListCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a DeviceCategoryTargeting. - * @implements IDeviceCategoryTargeting + * @classdesc Represents a ListCustomFieldsRequest. + * @implements IListCustomFieldsRequest * @constructor - * @param {google.ads.admanager.v1.IDeviceCategoryTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomFieldsRequest=} [properties] Properties to set */ - function DeviceCategoryTargeting(properties) { - this.targetedCategories = []; - this.excludedCategories = []; + function ListCustomFieldsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34552,97 +35059,147 @@ } /** - * DeviceCategoryTargeting targetedCategories. - * @member {Array.} targetedCategories - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * ListCustomFieldsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @instance */ - DeviceCategoryTargeting.prototype.targetedCategories = $util.emptyArray; + ListCustomFieldsRequest.prototype.parent = ""; /** - * DeviceCategoryTargeting excludedCategories. - * @member {Array.} excludedCategories - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * ListCustomFieldsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @instance */ - DeviceCategoryTargeting.prototype.excludedCategories = $util.emptyArray; + ListCustomFieldsRequest.prototype.pageSize = 0; /** - * Creates a new DeviceCategoryTargeting instance using the specified properties. + * ListCustomFieldsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @instance + */ + ListCustomFieldsRequest.prototype.pageToken = ""; + + /** + * ListCustomFieldsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @instance + */ + ListCustomFieldsRequest.prototype.filter = ""; + + /** + * ListCustomFieldsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @instance + */ + ListCustomFieldsRequest.prototype.orderBy = ""; + + /** + * ListCustomFieldsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest + * @instance + */ + ListCustomFieldsRequest.prototype.skip = 0; + + /** + * Creates a new ListCustomFieldsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategoryTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting instance + * @param {google.ads.admanager.v1.IListCustomFieldsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest instance */ - DeviceCategoryTargeting.create = function create(properties) { - return new DeviceCategoryTargeting(properties); + ListCustomFieldsRequest.create = function create(properties) { + return new ListCustomFieldsRequest(properties); }; /** - * Encodes the specified DeviceCategoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * Encodes the specified ListCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategoryTargeting} message DeviceCategoryTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomFieldsRequest} message ListCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCategoryTargeting.encode = function encode(message, writer) { + ListCustomFieldsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedCategories != null && message.targetedCategories.length) - for (var i = 0; i < message.targetedCategories.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedCategories[i]); - if (message.excludedCategories != null && message.excludedCategories.length) - for (var i = 0; i < message.excludedCategories.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedCategories[i]); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified DeviceCategoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * Encodes the specified ListCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IDeviceCategoryTargeting} message DeviceCategoryTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomFieldsRequest} message ListCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeviceCategoryTargeting.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeviceCategoryTargeting message from the specified reader or buffer. + * Decodes a ListCustomFieldsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCategoryTargeting.decode = function decode(reader, length, error) { + ListCustomFieldsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCategoryTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomFieldsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } case 3: { - if (!(message.targetedCategories && message.targetedCategories.length)) - message.targetedCategories = []; - message.targetedCategories.push(reader.string()); + message.pageToken = reader.string(); break; } case 4: { - if (!(message.excludedCategories && message.excludedCategories.length)) - message.excludedCategories = []; - message.excludedCategories.push(reader.string()); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -34654,162 +35211,166 @@ }; /** - * Decodes a DeviceCategoryTargeting message from the specified reader or buffer, length delimited. + * Decodes a ListCustomFieldsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeviceCategoryTargeting.decodeDelimited = function decodeDelimited(reader) { + ListCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeviceCategoryTargeting message. + * Verifies a ListCustomFieldsRequest message. * @function verify - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeviceCategoryTargeting.verify = function verify(message) { + ListCustomFieldsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedCategories != null && message.hasOwnProperty("targetedCategories")) { - if (!Array.isArray(message.targetedCategories)) - return "targetedCategories: array expected"; - for (var i = 0; i < message.targetedCategories.length; ++i) - if (!$util.isString(message.targetedCategories[i])) - return "targetedCategories: string[] expected"; - } - if (message.excludedCategories != null && message.hasOwnProperty("excludedCategories")) { - if (!Array.isArray(message.excludedCategories)) - return "excludedCategories: array expected"; - for (var i = 0; i < message.excludedCategories.length; ++i) - if (!$util.isString(message.excludedCategories[i])) - return "excludedCategories: 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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a DeviceCategoryTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsRequest} ListCustomFieldsRequest */ - DeviceCategoryTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.DeviceCategoryTargeting) + ListCustomFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomFieldsRequest) return object; - var message = new $root.google.ads.admanager.v1.DeviceCategoryTargeting(); - if (object.targetedCategories) { - if (!Array.isArray(object.targetedCategories)) - throw TypeError(".google.ads.admanager.v1.DeviceCategoryTargeting.targetedCategories: array expected"); - message.targetedCategories = []; - for (var i = 0; i < object.targetedCategories.length; ++i) - message.targetedCategories[i] = String(object.targetedCategories[i]); - } - if (object.excludedCategories) { - if (!Array.isArray(object.excludedCategories)) - throw TypeError(".google.ads.admanager.v1.DeviceCategoryTargeting.excludedCategories: array expected"); - message.excludedCategories = []; - for (var i = 0; i < object.excludedCategories.length; ++i) - message.excludedCategories[i] = String(object.excludedCategories[i]); - } + var message = new $root.google.ads.admanager.v1.ListCustomFieldsRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a DeviceCategoryTargeting message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomFieldsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.DeviceCategoryTargeting} message DeviceCategoryTargeting + * @param {google.ads.admanager.v1.ListCustomFieldsRequest} message ListCustomFieldsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeviceCategoryTargeting.toObject = function toObject(message, options) { + ListCustomFieldsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedCategories = []; - object.excludedCategories = []; - } - if (message.targetedCategories && message.targetedCategories.length) { - object.targetedCategories = []; - for (var j = 0; j < message.targetedCategories.length; ++j) - object.targetedCategories[j] = message.targetedCategories[j]; - } - if (message.excludedCategories && message.excludedCategories.length) { - object.excludedCategories = []; - for (var j = 0; j < message.excludedCategories.length; ++j) - object.excludedCategories[j] = message.excludedCategories[j]; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this DeviceCategoryTargeting to JSON. + * Converts this ListCustomFieldsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @instance * @returns {Object.} JSON object */ - DeviceCategoryTargeting.prototype.toJSON = function toJSON() { + ListCustomFieldsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeviceCategoryTargeting + * Gets the default type url for ListCustomFieldsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeviceCategoryTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCategoryTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomFieldsRequest"; }; - return DeviceCategoryTargeting; + return ListCustomFieldsRequest; })(); - v1.OperatingSystemTargeting = (function() { + v1.ListCustomFieldsResponse = (function() { /** - * Properties of an OperatingSystemTargeting. + * Properties of a ListCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @interface IOperatingSystemTargeting - * @property {Array.|null} [targetedOperatingSystems] OperatingSystemTargeting targetedOperatingSystems - * @property {Array.|null} [excludedOperatingSystems] OperatingSystemTargeting excludedOperatingSystems - * @property {Array.|null} [targetedOperatingSystemVersions] OperatingSystemTargeting targetedOperatingSystemVersions - * @property {Array.|null} [excludedOperatingSystemVersions] OperatingSystemTargeting excludedOperatingSystemVersions + * @interface IListCustomFieldsResponse + * @property {Array.|null} [customFields] ListCustomFieldsResponse customFields + * @property {string|null} [nextPageToken] ListCustomFieldsResponse nextPageToken + * @property {number|null} [totalSize] ListCustomFieldsResponse totalSize */ /** - * Constructs a new OperatingSystemTargeting. + * Constructs a new ListCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents an OperatingSystemTargeting. - * @implements IOperatingSystemTargeting + * @classdesc Represents a ListCustomFieldsResponse. + * @implements IListCustomFieldsResponse * @constructor - * @param {google.ads.admanager.v1.IOperatingSystemTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomFieldsResponse=} [properties] Properties to set */ - function OperatingSystemTargeting(properties) { - this.targetedOperatingSystems = []; - this.excludedOperatingSystems = []; - this.targetedOperatingSystemVersions = []; - this.excludedOperatingSystemVersions = []; + function ListCustomFieldsResponse(properties) { + this.customFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34817,131 +35378,108 @@ } /** - * OperatingSystemTargeting targetedOperatingSystems. - * @member {Array.} targetedOperatingSystems - * @memberof google.ads.admanager.v1.OperatingSystemTargeting - * @instance - */ - OperatingSystemTargeting.prototype.targetedOperatingSystems = $util.emptyArray; - - /** - * OperatingSystemTargeting excludedOperatingSystems. - * @member {Array.} excludedOperatingSystems - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * ListCustomFieldsResponse customFields. + * @member {Array.} customFields + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @instance */ - OperatingSystemTargeting.prototype.excludedOperatingSystems = $util.emptyArray; + ListCustomFieldsResponse.prototype.customFields = $util.emptyArray; /** - * OperatingSystemTargeting targetedOperatingSystemVersions. - * @member {Array.} targetedOperatingSystemVersions - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * ListCustomFieldsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @instance */ - OperatingSystemTargeting.prototype.targetedOperatingSystemVersions = $util.emptyArray; + ListCustomFieldsResponse.prototype.nextPageToken = ""; /** - * OperatingSystemTargeting excludedOperatingSystemVersions. - * @member {Array.} excludedOperatingSystemVersions - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * ListCustomFieldsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @instance */ - OperatingSystemTargeting.prototype.excludedOperatingSystemVersions = $util.emptyArray; + ListCustomFieldsResponse.prototype.totalSize = 0; /** - * Creates a new OperatingSystemTargeting instance using the specified properties. + * Creates a new ListCustomFieldsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IOperatingSystemTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting instance + * @param {google.ads.admanager.v1.IListCustomFieldsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse instance */ - OperatingSystemTargeting.create = function create(properties) { - return new OperatingSystemTargeting(properties); + ListCustomFieldsResponse.create = function create(properties) { + return new ListCustomFieldsResponse(properties); }; /** - * Encodes the specified OperatingSystemTargeting message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * Encodes the specified ListCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IOperatingSystemTargeting} message OperatingSystemTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomFieldsResponse} message ListCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystemTargeting.encode = function encode(message, writer) { + ListCustomFieldsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedOperatingSystems != null && message.targetedOperatingSystems.length) - for (var i = 0; i < message.targetedOperatingSystems.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetedOperatingSystems[i]); - if (message.excludedOperatingSystems != null && message.excludedOperatingSystems.length) - for (var i = 0; i < message.excludedOperatingSystems.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedOperatingSystems[i]); - if (message.targetedOperatingSystemVersions != null && message.targetedOperatingSystemVersions.length) - for (var i = 0; i < message.targetedOperatingSystemVersions.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedOperatingSystemVersions[i]); - if (message.excludedOperatingSystemVersions != null && message.excludedOperatingSystemVersions.length) - for (var i = 0; i < message.excludedOperatingSystemVersions.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedOperatingSystemVersions[i]); + if (message.customFields != null && message.customFields.length) + for (var i = 0; i < message.customFields.length; ++i) + $root.google.ads.admanager.v1.CustomField.encode(message.customFields[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified OperatingSystemTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * Encodes the specified ListCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomFieldsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IOperatingSystemTargeting} message OperatingSystemTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomFieldsResponse} message ListCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatingSystemTargeting.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperatingSystemTargeting message from the specified reader or buffer. + * Decodes a ListCustomFieldsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystemTargeting.decode = function decode(reader, length, error) { + ListCustomFieldsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystemTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomFieldsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 5: { - if (!(message.targetedOperatingSystems && message.targetedOperatingSystems.length)) - message.targetedOperatingSystems = []; - message.targetedOperatingSystems.push(reader.string()); - break; - } - case 6: { - if (!(message.excludedOperatingSystems && message.excludedOperatingSystems.length)) - message.excludedOperatingSystems = []; - message.excludedOperatingSystems.push(reader.string()); + case 1: { + if (!(message.customFields && message.customFields.length)) + message.customFields = []; + message.customFields.push($root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32())); break; } - case 7: { - if (!(message.targetedOperatingSystemVersions && message.targetedOperatingSystemVersions.length)) - message.targetedOperatingSystemVersions = []; - message.targetedOperatingSystemVersions.push(reader.string()); + case 2: { + message.nextPageToken = reader.string(); break; } - case 8: { - if (!(message.excludedOperatingSystemVersions && message.excludedOperatingSystemVersions.length)) - message.excludedOperatingSystemVersions = []; - message.excludedOperatingSystemVersions.push(reader.string()); + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -34953,200 +35491,158 @@ }; /** - * Decodes an OperatingSystemTargeting message from the specified reader or buffer, length delimited. + * Decodes a ListCustomFieldsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatingSystemTargeting.decodeDelimited = function decodeDelimited(reader) { + ListCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperatingSystemTargeting message. + * Verifies a ListCustomFieldsResponse message. * @function verify - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperatingSystemTargeting.verify = function verify(message) { + ListCustomFieldsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedOperatingSystems != null && message.hasOwnProperty("targetedOperatingSystems")) { - if (!Array.isArray(message.targetedOperatingSystems)) - return "targetedOperatingSystems: array expected"; - for (var i = 0; i < message.targetedOperatingSystems.length; ++i) - if (!$util.isString(message.targetedOperatingSystems[i])) - return "targetedOperatingSystems: string[] expected"; - } - if (message.excludedOperatingSystems != null && message.hasOwnProperty("excludedOperatingSystems")) { - if (!Array.isArray(message.excludedOperatingSystems)) - return "excludedOperatingSystems: array expected"; - for (var i = 0; i < message.excludedOperatingSystems.length; ++i) - if (!$util.isString(message.excludedOperatingSystems[i])) - return "excludedOperatingSystems: string[] expected"; - } - if (message.targetedOperatingSystemVersions != null && message.hasOwnProperty("targetedOperatingSystemVersions")) { - if (!Array.isArray(message.targetedOperatingSystemVersions)) - return "targetedOperatingSystemVersions: array expected"; - for (var i = 0; i < message.targetedOperatingSystemVersions.length; ++i) - if (!$util.isString(message.targetedOperatingSystemVersions[i])) - return "targetedOperatingSystemVersions: string[] expected"; - } - if (message.excludedOperatingSystemVersions != null && message.hasOwnProperty("excludedOperatingSystemVersions")) { - if (!Array.isArray(message.excludedOperatingSystemVersions)) - return "excludedOperatingSystemVersions: array expected"; - for (var i = 0; i < message.excludedOperatingSystemVersions.length; ++i) - if (!$util.isString(message.excludedOperatingSystemVersions[i])) - return "excludedOperatingSystemVersions: string[] expected"; + if (message.customFields != null && message.hasOwnProperty("customFields")) { + if (!Array.isArray(message.customFields)) + return "customFields: array expected"; + for (var i = 0; i < message.customFields.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomField.verify(message.customFields[i]); + if (error) + return "customFields." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates an OperatingSystemTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + * @returns {google.ads.admanager.v1.ListCustomFieldsResponse} ListCustomFieldsResponse */ - OperatingSystemTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.OperatingSystemTargeting) + ListCustomFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomFieldsResponse) return object; - var message = new $root.google.ads.admanager.v1.OperatingSystemTargeting(); - if (object.targetedOperatingSystems) { - if (!Array.isArray(object.targetedOperatingSystems)) - throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.targetedOperatingSystems: array expected"); - message.targetedOperatingSystems = []; - for (var i = 0; i < object.targetedOperatingSystems.length; ++i) - message.targetedOperatingSystems[i] = String(object.targetedOperatingSystems[i]); - } - if (object.excludedOperatingSystems) { - if (!Array.isArray(object.excludedOperatingSystems)) - throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.excludedOperatingSystems: array expected"); - message.excludedOperatingSystems = []; - for (var i = 0; i < object.excludedOperatingSystems.length; ++i) - message.excludedOperatingSystems[i] = String(object.excludedOperatingSystems[i]); - } - if (object.targetedOperatingSystemVersions) { - if (!Array.isArray(object.targetedOperatingSystemVersions)) - throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.targetedOperatingSystemVersions: array expected"); - message.targetedOperatingSystemVersions = []; - for (var i = 0; i < object.targetedOperatingSystemVersions.length; ++i) - message.targetedOperatingSystemVersions[i] = String(object.targetedOperatingSystemVersions[i]); - } - if (object.excludedOperatingSystemVersions) { - if (!Array.isArray(object.excludedOperatingSystemVersions)) - throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.excludedOperatingSystemVersions: array expected"); - message.excludedOperatingSystemVersions = []; - for (var i = 0; i < object.excludedOperatingSystemVersions.length; ++i) - message.excludedOperatingSystemVersions[i] = String(object.excludedOperatingSystemVersions[i]); + var message = new $root.google.ads.admanager.v1.ListCustomFieldsResponse(); + if (object.customFields) { + if (!Array.isArray(object.customFields)) + throw TypeError(".google.ads.admanager.v1.ListCustomFieldsResponse.customFields: array expected"); + message.customFields = []; + for (var i = 0; i < object.customFields.length; ++i) { + if (typeof object.customFields[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCustomFieldsResponse.customFields: object expected"); + message.customFields[i] = $root.google.ads.admanager.v1.CustomField.fromObject(object.customFields[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from an OperatingSystemTargeting message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomFieldsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.OperatingSystemTargeting} message OperatingSystemTargeting + * @param {google.ads.admanager.v1.ListCustomFieldsResponse} message ListCustomFieldsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperatingSystemTargeting.toObject = function toObject(message, options) { + ListCustomFieldsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedOperatingSystems = []; - object.excludedOperatingSystems = []; - object.targetedOperatingSystemVersions = []; - object.excludedOperatingSystemVersions = []; - } - if (message.targetedOperatingSystems && message.targetedOperatingSystems.length) { - object.targetedOperatingSystems = []; - for (var j = 0; j < message.targetedOperatingSystems.length; ++j) - object.targetedOperatingSystems[j] = message.targetedOperatingSystems[j]; - } - if (message.excludedOperatingSystems && message.excludedOperatingSystems.length) { - object.excludedOperatingSystems = []; - for (var j = 0; j < message.excludedOperatingSystems.length; ++j) - object.excludedOperatingSystems[j] = message.excludedOperatingSystems[j]; - } - if (message.targetedOperatingSystemVersions && message.targetedOperatingSystemVersions.length) { - object.targetedOperatingSystemVersions = []; - for (var j = 0; j < message.targetedOperatingSystemVersions.length; ++j) - object.targetedOperatingSystemVersions[j] = message.targetedOperatingSystemVersions[j]; + if (options.arrays || options.defaults) + object.customFields = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.excludedOperatingSystemVersions && message.excludedOperatingSystemVersions.length) { - object.excludedOperatingSystemVersions = []; - for (var j = 0; j < message.excludedOperatingSystemVersions.length; ++j) - object.excludedOperatingSystemVersions[j] = message.excludedOperatingSystemVersions[j]; + if (message.customFields && message.customFields.length) { + object.customFields = []; + for (var j = 0; j < message.customFields.length; ++j) + object.customFields[j] = $root.google.ads.admanager.v1.CustomField.toObject(message.customFields[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this OperatingSystemTargeting to JSON. + * Converts this ListCustomFieldsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @instance * @returns {Object.} JSON object */ - OperatingSystemTargeting.prototype.toJSON = function toJSON() { + ListCustomFieldsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperatingSystemTargeting + * Gets the default type url for ListCustomFieldsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @memberof google.ads.admanager.v1.ListCustomFieldsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperatingSystemTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystemTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomFieldsResponse"; }; - return OperatingSystemTargeting; + return ListCustomFieldsResponse; })(); - v1.InventoryTargeting = (function() { + v1.CreateCustomFieldRequest = (function() { /** - * Properties of an InventoryTargeting. + * Properties of a CreateCustomFieldRequest. * @memberof google.ads.admanager.v1 - * @interface IInventoryTargeting - * @property {Array.|null} [targetedAdUnits] InventoryTargeting targetedAdUnits - * @property {Array.|null} [excludedAdUnits] InventoryTargeting excludedAdUnits - * @property {Array.|null} [targetedPlacements] InventoryTargeting targetedPlacements + * @interface ICreateCustomFieldRequest + * @property {string|null} [parent] CreateCustomFieldRequest parent + * @property {google.ads.admanager.v1.ICustomField|null} [customField] CreateCustomFieldRequest customField */ /** - * Constructs a new InventoryTargeting. + * Constructs a new CreateCustomFieldRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an InventoryTargeting. - * @implements IInventoryTargeting + * @classdesc Represents a CreateCustomFieldRequest. + * @implements ICreateCustomFieldRequest * @constructor - * @param {google.ads.admanager.v1.IInventoryTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest=} [properties] Properties to set */ - function InventoryTargeting(properties) { - this.targetedAdUnits = []; - this.excludedAdUnits = []; - this.targetedPlacements = []; + function CreateCustomFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35154,114 +35650,91 @@ } /** - * InventoryTargeting targetedAdUnits. - * @member {Array.} targetedAdUnits - * @memberof google.ads.admanager.v1.InventoryTargeting - * @instance - */ - InventoryTargeting.prototype.targetedAdUnits = $util.emptyArray; - - /** - * InventoryTargeting excludedAdUnits. - * @member {Array.} excludedAdUnits - * @memberof google.ads.admanager.v1.InventoryTargeting + * CreateCustomFieldRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @instance */ - InventoryTargeting.prototype.excludedAdUnits = $util.emptyArray; + CreateCustomFieldRequest.prototype.parent = ""; /** - * InventoryTargeting targetedPlacements. - * @member {Array.} targetedPlacements - * @memberof google.ads.admanager.v1.InventoryTargeting + * CreateCustomFieldRequest customField. + * @member {google.ads.admanager.v1.ICustomField|null|undefined} customField + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @instance */ - InventoryTargeting.prototype.targetedPlacements = $util.emptyArray; + CreateCustomFieldRequest.prototype.customField = null; /** - * Creates a new InventoryTargeting instance using the specified properties. + * Creates a new CreateCustomFieldRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IInventoryTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting instance + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateCustomFieldRequest} CreateCustomFieldRequest instance */ - InventoryTargeting.create = function create(properties) { - return new InventoryTargeting(properties); + CreateCustomFieldRequest.create = function create(properties) { + return new CreateCustomFieldRequest(properties); }; /** - * Encodes the specified InventoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * Encodes the specified CreateCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateCustomFieldRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IInventoryTargeting} message InventoryTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest} message CreateCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InventoryTargeting.encode = function encode(message, writer) { + CreateCustomFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedAdUnits != null && message.targetedAdUnits.length) - for (var i = 0; i < message.targetedAdUnits.length; ++i) - $root.google.ads.admanager.v1.AdUnitTargeting.encode(message.targetedAdUnits[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludedAdUnits != null && message.excludedAdUnits.length) - for (var i = 0; i < message.excludedAdUnits.length; ++i) - $root.google.ads.admanager.v1.AdUnitTargeting.encode(message.excludedAdUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.targetedPlacements != null && message.targetedPlacements.length) - for (var i = 0; i < message.targetedPlacements.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetedPlacements[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.customField != null && Object.hasOwnProperty.call(message, "customField")) + $root.google.ads.admanager.v1.CustomField.encode(message.customField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified InventoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * Encodes the specified CreateCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateCustomFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.IInventoryTargeting} message InventoryTargeting message or plain object to encode + * @param {google.ads.admanager.v1.ICreateCustomFieldRequest} message CreateCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InventoryTargeting.encodeDelimited = function encodeDelimited(message, writer) { + CreateCustomFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InventoryTargeting message from the specified reader or buffer. + * Decodes a CreateCustomFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + * @returns {google.ads.admanager.v1.CreateCustomFieldRequest} CreateCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InventoryTargeting.decode = function decode(reader, length, error) { + CreateCustomFieldRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.InventoryTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateCustomFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.targetedAdUnits && message.targetedAdUnits.length)) - message.targetedAdUnits = []; - message.targetedAdUnits.push($root.google.ads.admanager.v1.AdUnitTargeting.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - if (!(message.excludedAdUnits && message.excludedAdUnits.length)) - message.excludedAdUnits = []; - message.excludedAdUnits.push($root.google.ads.admanager.v1.AdUnitTargeting.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.targetedPlacements && message.targetedPlacements.length)) - message.targetedPlacements = []; - message.targetedPlacements.push(reader.string()); + message.customField = $root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32()); break; } default: @@ -35273,186 +35746,138 @@ }; /** - * Decodes an InventoryTargeting message from the specified reader or buffer, length delimited. + * Decodes a CreateCustomFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + * @returns {google.ads.admanager.v1.CreateCustomFieldRequest} CreateCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InventoryTargeting.decodeDelimited = function decodeDelimited(reader) { + CreateCustomFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InventoryTargeting message. + * Verifies a CreateCustomFieldRequest message. * @function verify - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InventoryTargeting.verify = function verify(message) { + CreateCustomFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedAdUnits != null && message.hasOwnProperty("targetedAdUnits")) { - if (!Array.isArray(message.targetedAdUnits)) - return "targetedAdUnits: array expected"; - for (var i = 0; i < message.targetedAdUnits.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnitTargeting.verify(message.targetedAdUnits[i]); - if (error) - return "targetedAdUnits." + error; - } - } - if (message.excludedAdUnits != null && message.hasOwnProperty("excludedAdUnits")) { - if (!Array.isArray(message.excludedAdUnits)) - return "excludedAdUnits: array expected"; - for (var i = 0; i < message.excludedAdUnits.length; ++i) { - var error = $root.google.ads.admanager.v1.AdUnitTargeting.verify(message.excludedAdUnits[i]); - if (error) - return "excludedAdUnits." + error; - } - } - if (message.targetedPlacements != null && message.hasOwnProperty("targetedPlacements")) { - if (!Array.isArray(message.targetedPlacements)) - return "targetedPlacements: array expected"; - for (var i = 0; i < message.targetedPlacements.length; ++i) - if (!$util.isString(message.targetedPlacements[i])) - return "targetedPlacements: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.customField != null && message.hasOwnProperty("customField")) { + var error = $root.google.ads.admanager.v1.CustomField.verify(message.customField); + if (error) + return "customField." + error; } return null; }; /** - * Creates an InventoryTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a CreateCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + * @returns {google.ads.admanager.v1.CreateCustomFieldRequest} CreateCustomFieldRequest */ - InventoryTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.InventoryTargeting) + CreateCustomFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateCustomFieldRequest) return object; - var message = new $root.google.ads.admanager.v1.InventoryTargeting(); - if (object.targetedAdUnits) { - if (!Array.isArray(object.targetedAdUnits)) - throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedAdUnits: array expected"); - message.targetedAdUnits = []; - for (var i = 0; i < object.targetedAdUnits.length; ++i) { - if (typeof object.targetedAdUnits[i] !== "object") - throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedAdUnits: object expected"); - message.targetedAdUnits[i] = $root.google.ads.admanager.v1.AdUnitTargeting.fromObject(object.targetedAdUnits[i]); - } - } - if (object.excludedAdUnits) { - if (!Array.isArray(object.excludedAdUnits)) - throw TypeError(".google.ads.admanager.v1.InventoryTargeting.excludedAdUnits: array expected"); - message.excludedAdUnits = []; - for (var i = 0; i < object.excludedAdUnits.length; ++i) { - if (typeof object.excludedAdUnits[i] !== "object") - throw TypeError(".google.ads.admanager.v1.InventoryTargeting.excludedAdUnits: object expected"); - message.excludedAdUnits[i] = $root.google.ads.admanager.v1.AdUnitTargeting.fromObject(object.excludedAdUnits[i]); - } - } - if (object.targetedPlacements) { - if (!Array.isArray(object.targetedPlacements)) - throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedPlacements: array expected"); - message.targetedPlacements = []; - for (var i = 0; i < object.targetedPlacements.length; ++i) - message.targetedPlacements[i] = String(object.targetedPlacements[i]); + var message = new $root.google.ads.admanager.v1.CreateCustomFieldRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customField != null) { + if (typeof object.customField !== "object") + throw TypeError(".google.ads.admanager.v1.CreateCustomFieldRequest.customField: object expected"); + message.customField = $root.google.ads.admanager.v1.CustomField.fromObject(object.customField); } return message; }; /** - * Creates a plain object from an InventoryTargeting message. Also converts values to other types if specified. + * Creates a plain object from a CreateCustomFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.InventoryTargeting} message InventoryTargeting + * @param {google.ads.admanager.v1.CreateCustomFieldRequest} message CreateCustomFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InventoryTargeting.toObject = function toObject(message, options) { + CreateCustomFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedAdUnits = []; - object.excludedAdUnits = []; - object.targetedPlacements = []; - } - if (message.targetedAdUnits && message.targetedAdUnits.length) { - object.targetedAdUnits = []; - for (var j = 0; j < message.targetedAdUnits.length; ++j) - object.targetedAdUnits[j] = $root.google.ads.admanager.v1.AdUnitTargeting.toObject(message.targetedAdUnits[j], options); - } - if (message.excludedAdUnits && message.excludedAdUnits.length) { - object.excludedAdUnits = []; - for (var j = 0; j < message.excludedAdUnits.length; ++j) - object.excludedAdUnits[j] = $root.google.ads.admanager.v1.AdUnitTargeting.toObject(message.excludedAdUnits[j], options); - } - if (message.targetedPlacements && message.targetedPlacements.length) { - object.targetedPlacements = []; - for (var j = 0; j < message.targetedPlacements.length; ++j) - object.targetedPlacements[j] = message.targetedPlacements[j]; + if (options.defaults) { + object.parent = ""; + object.customField = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customField != null && message.hasOwnProperty("customField")) + object.customField = $root.google.ads.admanager.v1.CustomField.toObject(message.customField, options); return object; }; /** - * Converts this InventoryTargeting to JSON. + * Converts this CreateCustomFieldRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @instance * @returns {Object.} JSON object */ - InventoryTargeting.prototype.toJSON = function toJSON() { + CreateCustomFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InventoryTargeting + * Gets the default type url for CreateCustomFieldRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.InventoryTargeting + * @memberof google.ads.admanager.v1.CreateCustomFieldRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InventoryTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateCustomFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.InventoryTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.CreateCustomFieldRequest"; }; - return InventoryTargeting; + return CreateCustomFieldRequest; })(); - v1.AdUnitTargeting = (function() { + v1.BatchCreateCustomFieldsRequest = (function() { /** - * Properties of an AdUnitTargeting. + * Properties of a BatchCreateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @interface IAdUnitTargeting - * @property {boolean|null} [includeDescendants] AdUnitTargeting includeDescendants - * @property {string|null} [adUnit] AdUnitTargeting adUnit + * @interface IBatchCreateCustomFieldsRequest + * @property {string|null} [parent] BatchCreateCustomFieldsRequest parent + * @property {Array.|null} [requests] BatchCreateCustomFieldsRequest requests */ /** - * Constructs a new AdUnitTargeting. + * Constructs a new BatchCreateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents an AdUnitTargeting. - * @implements IAdUnitTargeting + * @classdesc Represents a BatchCreateCustomFieldsRequest. + * @implements IBatchCreateCustomFieldsRequest * @constructor - * @param {google.ads.admanager.v1.IAdUnitTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest=} [properties] Properties to set */ - function AdUnitTargeting(properties) { + function BatchCreateCustomFieldsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35460,106 +35885,94 @@ } /** - * AdUnitTargeting includeDescendants. - * @member {boolean|null|undefined} includeDescendants - * @memberof google.ads.admanager.v1.AdUnitTargeting + * BatchCreateCustomFieldsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @instance */ - AdUnitTargeting.prototype.includeDescendants = null; + BatchCreateCustomFieldsRequest.prototype.parent = ""; /** - * AdUnitTargeting adUnit. - * @member {string|null|undefined} adUnit - * @memberof google.ads.admanager.v1.AdUnitTargeting + * BatchCreateCustomFieldsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @instance */ - AdUnitTargeting.prototype.adUnit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnitTargeting.prototype, "_includeDescendants", { - get: $util.oneOfGetter($oneOfFields = ["includeDescendants"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AdUnitTargeting.prototype, "_adUnit", { - get: $util.oneOfGetter($oneOfFields = ["adUnit"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchCreateCustomFieldsRequest.prototype.requests = $util.emptyArray; /** - * Creates a new AdUnitTargeting instance using the specified properties. + * Creates a new BatchCreateCustomFieldsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting instance + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsRequest} BatchCreateCustomFieldsRequest instance */ - AdUnitTargeting.create = function create(properties) { - return new AdUnitTargeting(properties); + BatchCreateCustomFieldsRequest.create = function create(properties) { + return new BatchCreateCustomFieldsRequest(properties); }; /** - * Encodes the specified AdUnitTargeting message. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * Encodes the specified BatchCreateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitTargeting} message AdUnitTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest} message BatchCreateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitTargeting.encode = function encode(message, writer) { + BatchCreateCustomFieldsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeDescendants != null && Object.hasOwnProperty.call(message, "includeDescendants")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeDescendants); - if (message.adUnit != null && Object.hasOwnProperty.call(message, "adUnit")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.adUnit); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreateCustomFieldRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AdUnitTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * Encodes the specified BatchCreateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IAdUnitTargeting} message AdUnitTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsRequest} message BatchCreateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdUnitTargeting.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdUnitTargeting message from the specified reader or buffer. + * Decodes a BatchCreateCustomFieldsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsRequest} BatchCreateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitTargeting.decode = function decode(reader, length, error) { + BatchCreateCustomFieldsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateCustomFieldsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.includeDescendants = reader.bool(); + message.parent = reader.string(); break; } - case 3: { - message.adUnit = reader.string(); + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreateCustomFieldRequest.decode(reader, reader.uint32())); break; } default: @@ -35571,139 +35984,149 @@ }; /** - * Decodes an AdUnitTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsRequest} BatchCreateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdUnitTargeting.decodeDelimited = function decodeDelimited(reader) { + BatchCreateCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdUnitTargeting message. + * Verifies a BatchCreateCustomFieldsRequest message. * @function verify - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdUnitTargeting.verify = function verify(message) { + BatchCreateCustomFieldsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.includeDescendants != null && message.hasOwnProperty("includeDescendants")) { - properties._includeDescendants = 1; - if (typeof message.includeDescendants !== "boolean") - return "includeDescendants: boolean expected"; - } - if (message.adUnit != null && message.hasOwnProperty("adUnit")) { - properties._adUnit = 1; - if (!$util.isString(message.adUnit)) - return "adUnit: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreateCustomFieldRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } } return null; }; /** - * Creates an AdUnitTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsRequest} BatchCreateCustomFieldsRequest */ - AdUnitTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.AdUnitTargeting) + BatchCreateCustomFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateCustomFieldsRequest) return object; - var message = new $root.google.ads.admanager.v1.AdUnitTargeting(); - if (object.includeDescendants != null) - message.includeDescendants = Boolean(object.includeDescendants); - if (object.adUnit != null) - message.adUnit = String(object.adUnit); + var message = new $root.google.ads.admanager.v1.BatchCreateCustomFieldsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreateCustomFieldsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateCustomFieldsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreateCustomFieldRequest.fromObject(object.requests[i]); + } + } return message; }; /** - * Creates a plain object from an AdUnitTargeting message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateCustomFieldsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.AdUnitTargeting} message AdUnitTargeting + * @param {google.ads.admanager.v1.BatchCreateCustomFieldsRequest} message BatchCreateCustomFieldsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdUnitTargeting.toObject = function toObject(message, options) { + BatchCreateCustomFieldsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.includeDescendants != null && message.hasOwnProperty("includeDescendants")) { - object.includeDescendants = message.includeDescendants; - if (options.oneofs) - object._includeDescendants = "includeDescendants"; - } - if (message.adUnit != null && message.hasOwnProperty("adUnit")) { - object.adUnit = message.adUnit; - if (options.oneofs) - object._adUnit = "adUnit"; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreateCustomFieldRequest.toObject(message.requests[j], options); } return object; }; /** - * Converts this AdUnitTargeting to JSON. + * Converts this BatchCreateCustomFieldsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @instance * @returns {Object.} JSON object */ - AdUnitTargeting.prototype.toJSON = function toJSON() { + BatchCreateCustomFieldsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdUnitTargeting + * Gets the default type url for BatchCreateCustomFieldsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.AdUnitTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdUnitTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateCustomFieldsRequest"; }; - return AdUnitTargeting; + return BatchCreateCustomFieldsRequest; })(); - v1.RequestPlatformTargeting = (function() { + v1.BatchCreateCustomFieldsResponse = (function() { /** - * Properties of a RequestPlatformTargeting. + * Properties of a BatchCreateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @interface IRequestPlatformTargeting - * @property {Array.|null} [requestPlatforms] RequestPlatformTargeting requestPlatforms + * @interface IBatchCreateCustomFieldsResponse + * @property {Array.|null} [customFields] BatchCreateCustomFieldsResponse customFields */ /** - * Constructs a new RequestPlatformTargeting. + * Constructs a new BatchCreateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RequestPlatformTargeting. - * @implements IRequestPlatformTargeting + * @classdesc Represents a BatchCreateCustomFieldsResponse. + * @implements IBatchCreateCustomFieldsResponse * @constructor - * @param {google.ads.admanager.v1.IRequestPlatformTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsResponse=} [properties] Properties to set */ - function RequestPlatformTargeting(properties) { - this.requestPlatforms = []; + function BatchCreateCustomFieldsResponse(properties) { + this.customFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35711,88 +36134,80 @@ } /** - * RequestPlatformTargeting requestPlatforms. - * @member {Array.} requestPlatforms - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * BatchCreateCustomFieldsResponse customFields. + * @member {Array.} customFields + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @instance */ - RequestPlatformTargeting.prototype.requestPlatforms = $util.emptyArray; + BatchCreateCustomFieldsResponse.prototype.customFields = $util.emptyArray; /** - * Creates a new RequestPlatformTargeting instance using the specified properties. + * Creates a new BatchCreateCustomFieldsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IRequestPlatformTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting instance + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} BatchCreateCustomFieldsResponse instance */ - RequestPlatformTargeting.create = function create(properties) { - return new RequestPlatformTargeting(properties); + BatchCreateCustomFieldsResponse.create = function create(properties) { + return new BatchCreateCustomFieldsResponse(properties); }; /** - * Encodes the specified RequestPlatformTargeting message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * Encodes the specified BatchCreateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IRequestPlatformTargeting} message RequestPlatformTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsResponse} message BatchCreateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPlatformTargeting.encode = function encode(message, writer) { + BatchCreateCustomFieldsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestPlatforms != null && message.requestPlatforms.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.requestPlatforms.length; ++i) - writer.int32(message.requestPlatforms[i]); - writer.ldelim(); - } + if (message.customFields != null && message.customFields.length) + for (var i = 0; i < message.customFields.length; ++i) + $root.google.ads.admanager.v1.CustomField.encode(message.customFields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified RequestPlatformTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * Encodes the specified BatchCreateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateCustomFieldsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IRequestPlatformTargeting} message RequestPlatformTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateCustomFieldsResponse} message BatchCreateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPlatformTargeting.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestPlatformTargeting message from the specified reader or buffer. + * Decodes a BatchCreateCustomFieldsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} BatchCreateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPlatformTargeting.decode = function decode(reader, length, error) { + BatchCreateCustomFieldsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RequestPlatformTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateCustomFieldsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.requestPlatforms && message.requestPlatforms.length)) - message.requestPlatforms = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.requestPlatforms.push(reader.int32()); - } else - message.requestPlatforms.push(reader.int32()); + if (!(message.customFields && message.customFields.length)) + message.customFields = []; + message.customFields.push($root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32())); break; } default: @@ -35804,164 +36219,140 @@ }; /** - * Decodes a RequestPlatformTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} BatchCreateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPlatformTargeting.decodeDelimited = function decodeDelimited(reader) { + BatchCreateCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RequestPlatformTargeting message. + * Verifies a BatchCreateCustomFieldsResponse message. * @function verify - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestPlatformTargeting.verify = function verify(message) { + BatchCreateCustomFieldsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.requestPlatforms != null && message.hasOwnProperty("requestPlatforms")) { - if (!Array.isArray(message.requestPlatforms)) - return "requestPlatforms: array expected"; - for (var i = 0; i < message.requestPlatforms.length; ++i) - switch (message.requestPlatforms[i]) { - default: - return "requestPlatforms: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.customFields != null && message.hasOwnProperty("customFields")) { + if (!Array.isArray(message.customFields)) + return "customFields: array expected"; + for (var i = 0; i < message.customFields.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomField.verify(message.customFields[i]); + if (error) + return "customFields." + error; + } } return null; }; /** - * Creates a RequestPlatformTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + * @returns {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} BatchCreateCustomFieldsResponse */ - RequestPlatformTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RequestPlatformTargeting) + BatchCreateCustomFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateCustomFieldsResponse) return object; - var message = new $root.google.ads.admanager.v1.RequestPlatformTargeting(); - if (object.requestPlatforms) { - if (!Array.isArray(object.requestPlatforms)) - throw TypeError(".google.ads.admanager.v1.RequestPlatformTargeting.requestPlatforms: array expected"); - message.requestPlatforms = []; - for (var i = 0; i < object.requestPlatforms.length; ++i) - switch (object.requestPlatforms[i]) { - default: - if (typeof object.requestPlatforms[i] === "number") { - message.requestPlatforms[i] = object.requestPlatforms[i]; - break; - } - case "REQUEST_PLATFORM_UNSPECIFIED": - case 0: - message.requestPlatforms[i] = 0; - break; - case "BROWSER": - case 1: - message.requestPlatforms[i] = 1; - break; - case "MOBILE_APP": - case 2: - message.requestPlatforms[i] = 2; - break; - case "VIDEO_PLAYER": - case 3: - message.requestPlatforms[i] = 3; - break; - } + var message = new $root.google.ads.admanager.v1.BatchCreateCustomFieldsResponse(); + if (object.customFields) { + if (!Array.isArray(object.customFields)) + throw TypeError(".google.ads.admanager.v1.BatchCreateCustomFieldsResponse.customFields: array expected"); + message.customFields = []; + for (var i = 0; i < object.customFields.length; ++i) { + if (typeof object.customFields[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateCustomFieldsResponse.customFields: object expected"); + message.customFields[i] = $root.google.ads.admanager.v1.CustomField.fromObject(object.customFields[i]); + } } return message; }; /** - * Creates a plain object from a RequestPlatformTargeting message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateCustomFieldsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.RequestPlatformTargeting} message RequestPlatformTargeting + * @param {google.ads.admanager.v1.BatchCreateCustomFieldsResponse} message BatchCreateCustomFieldsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestPlatformTargeting.toObject = function toObject(message, options) { + BatchCreateCustomFieldsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.requestPlatforms = []; - if (message.requestPlatforms && message.requestPlatforms.length) { - object.requestPlatforms = []; - for (var j = 0; j < message.requestPlatforms.length; ++j) - object.requestPlatforms[j] = options.enums === String ? $root.google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[message.requestPlatforms[j]] === undefined ? message.requestPlatforms[j] : $root.google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[message.requestPlatforms[j]] : message.requestPlatforms[j]; + object.customFields = []; + if (message.customFields && message.customFields.length) { + object.customFields = []; + for (var j = 0; j < message.customFields.length; ++j) + object.customFields[j] = $root.google.ads.admanager.v1.CustomField.toObject(message.customFields[j], options); } return object; }; /** - * Converts this RequestPlatformTargeting to JSON. + * Converts this BatchCreateCustomFieldsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @instance * @returns {Object.} JSON object */ - RequestPlatformTargeting.prototype.toJSON = function toJSON() { + BatchCreateCustomFieldsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RequestPlatformTargeting + * Gets the default type url for BatchCreateCustomFieldsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @memberof google.ads.admanager.v1.BatchCreateCustomFieldsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RequestPlatformTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RequestPlatformTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateCustomFieldsResponse"; }; - return RequestPlatformTargeting; + return BatchCreateCustomFieldsResponse; })(); - v1.CustomTargeting = (function() { + v1.UpdateCustomFieldRequest = (function() { /** - * Properties of a CustomTargeting. + * Properties of an UpdateCustomFieldRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomTargeting - * @property {Array.|null} [customTargetingClauses] CustomTargeting customTargetingClauses + * @interface IUpdateCustomFieldRequest + * @property {google.ads.admanager.v1.ICustomField|null} [customField] UpdateCustomFieldRequest customField + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCustomFieldRequest updateMask */ /** - * Constructs a new CustomTargeting. + * Constructs a new UpdateCustomFieldRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargeting. - * @implements ICustomTargeting + * @classdesc Represents an UpdateCustomFieldRequest. + * @implements IUpdateCustomFieldRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest=} [properties] Properties to set */ - function CustomTargeting(properties) { - this.customTargetingClauses = []; + function UpdateCustomFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35969,80 +36360,91 @@ } /** - * CustomTargeting customTargetingClauses. - * @member {Array.} customTargetingClauses - * @memberof google.ads.admanager.v1.CustomTargeting + * UpdateCustomFieldRequest customField. + * @member {google.ads.admanager.v1.ICustomField|null|undefined} customField + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @instance */ - CustomTargeting.prototype.customTargetingClauses = $util.emptyArray; + UpdateCustomFieldRequest.prototype.customField = null; /** - * Creates a new CustomTargeting instance using the specified properties. + * UpdateCustomFieldRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest + * @instance + */ + UpdateCustomFieldRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCustomFieldRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.ICustomTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting instance + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateCustomFieldRequest} UpdateCustomFieldRequest instance */ - CustomTargeting.create = function create(properties) { - return new CustomTargeting(properties); + UpdateCustomFieldRequest.create = function create(properties) { + return new UpdateCustomFieldRequest(properties); }; /** - * Encodes the specified CustomTargeting message. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * Encodes the specified UpdateCustomFieldRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateCustomFieldRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.ICustomTargeting} message CustomTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest} message UpdateCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargeting.encode = function encode(message, writer) { + UpdateCustomFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customTargetingClauses != null && message.customTargetingClauses.length) - for (var i = 0; i < message.customTargetingClauses.length; ++i) - $root.google.ads.admanager.v1.CustomTargetingClause.encode(message.customTargetingClauses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customField != null && Object.hasOwnProperty.call(message, "customField")) + $root.google.ads.admanager.v1.CustomField.encode(message.customField, 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 CustomTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * Encodes the specified UpdateCustomFieldRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateCustomFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.ICustomTargeting} message CustomTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateCustomFieldRequest} message UpdateCustomFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargeting.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCustomFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargeting message from the specified reader or buffer. + * Decodes an UpdateCustomFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + * @returns {google.ads.admanager.v1.UpdateCustomFieldRequest} UpdateCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargeting.decode = function decode(reader, length, error) { + UpdateCustomFieldRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateCustomFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.customTargetingClauses && message.customTargetingClauses.length)) - message.customTargetingClauses = []; - message.customTargetingClauses.push($root.google.ads.admanager.v1.CustomTargetingClause.decode(reader, reader.uint32())); + message.customField = $root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -36054,140 +36456,143 @@ }; /** - * Decodes a CustomTargeting message from the specified reader or buffer, length delimited. + * Decodes an UpdateCustomFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + * @returns {google.ads.admanager.v1.UpdateCustomFieldRequest} UpdateCustomFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargeting.decodeDelimited = function decodeDelimited(reader) { + UpdateCustomFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargeting message. + * Verifies an UpdateCustomFieldRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargeting.verify = function verify(message) { + UpdateCustomFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.customTargetingClauses != null && message.hasOwnProperty("customTargetingClauses")) { - if (!Array.isArray(message.customTargetingClauses)) - return "customTargetingClauses: array expected"; - for (var i = 0; i < message.customTargetingClauses.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomTargetingClause.verify(message.customTargetingClauses[i]); - if (error) - return "customTargetingClauses." + error; - } + if (message.customField != null && message.hasOwnProperty("customField")) { + var error = $root.google.ads.admanager.v1.CustomField.verify(message.customField); + if (error) + return "customField." + 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 CustomTargeting message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCustomFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + * @returns {google.ads.admanager.v1.UpdateCustomFieldRequest} UpdateCustomFieldRequest */ - CustomTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargeting) + UpdateCustomFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateCustomFieldRequest) return object; - var message = new $root.google.ads.admanager.v1.CustomTargeting(); - if (object.customTargetingClauses) { - if (!Array.isArray(object.customTargetingClauses)) - throw TypeError(".google.ads.admanager.v1.CustomTargeting.customTargetingClauses: array expected"); - message.customTargetingClauses = []; - for (var i = 0; i < object.customTargetingClauses.length; ++i) { - if (typeof object.customTargetingClauses[i] !== "object") - throw TypeError(".google.ads.admanager.v1.CustomTargeting.customTargetingClauses: object expected"); - message.customTargetingClauses[i] = $root.google.ads.admanager.v1.CustomTargetingClause.fromObject(object.customTargetingClauses[i]); - } + var message = new $root.google.ads.admanager.v1.UpdateCustomFieldRequest(); + if (object.customField != null) { + if (typeof object.customField !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateCustomFieldRequest.customField: object expected"); + message.customField = $root.google.ads.admanager.v1.CustomField.fromObject(object.customField); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateCustomFieldRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a CustomTargeting message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCustomFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static - * @param {google.ads.admanager.v1.CustomTargeting} message CustomTargeting + * @param {google.ads.admanager.v1.UpdateCustomFieldRequest} message UpdateCustomFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargeting.toObject = function toObject(message, options) { + UpdateCustomFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.customTargetingClauses = []; - if (message.customTargetingClauses && message.customTargetingClauses.length) { - object.customTargetingClauses = []; - for (var j = 0; j < message.customTargetingClauses.length; ++j) - object.customTargetingClauses[j] = $root.google.ads.admanager.v1.CustomTargetingClause.toObject(message.customTargetingClauses[j], options); + if (options.defaults) { + object.customField = null; + object.updateMask = null; } + if (message.customField != null && message.hasOwnProperty("customField")) + object.customField = $root.google.ads.admanager.v1.CustomField.toObject(message.customField, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this CustomTargeting to JSON. + * Converts this UpdateCustomFieldRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @instance * @returns {Object.} JSON object */ - CustomTargeting.prototype.toJSON = function toJSON() { + UpdateCustomFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargeting + * Gets the default type url for UpdateCustomFieldRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargeting + * @memberof google.ads.admanager.v1.UpdateCustomFieldRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateCustomFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateCustomFieldRequest"; }; - return CustomTargeting; + return UpdateCustomFieldRequest; })(); - v1.CustomTargetingClause = (function() { + v1.BatchUpdateCustomFieldsRequest = (function() { /** - * Properties of a CustomTargetingClause. + * Properties of a BatchUpdateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingClause - * @property {Array.|null} [customTargetingLiterals] CustomTargetingClause customTargetingLiterals + * @interface IBatchUpdateCustomFieldsRequest + * @property {string|null} [parent] BatchUpdateCustomFieldsRequest parent + * @property {Array.|null} [requests] BatchUpdateCustomFieldsRequest requests */ /** - * Constructs a new CustomTargetingClause. + * Constructs a new BatchUpdateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingClause. - * @implements ICustomTargetingClause + * @classdesc Represents a BatchUpdateCustomFieldsRequest. + * @implements IBatchUpdateCustomFieldsRequest * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingClause=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest=} [properties] Properties to set */ - function CustomTargetingClause(properties) { - this.customTargetingLiterals = []; + function BatchUpdateCustomFieldsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36195,80 +36600,94 @@ } /** - * CustomTargetingClause customTargetingLiterals. - * @member {Array.} customTargetingLiterals - * @memberof google.ads.admanager.v1.CustomTargetingClause + * BatchUpdateCustomFieldsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @instance */ - CustomTargetingClause.prototype.customTargetingLiterals = $util.emptyArray; + BatchUpdateCustomFieldsRequest.prototype.parent = ""; /** - * Creates a new CustomTargetingClause instance using the specified properties. + * BatchUpdateCustomFieldsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest + * @instance + */ + BatchUpdateCustomFieldsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdateCustomFieldsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingClause=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause instance + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsRequest} BatchUpdateCustomFieldsRequest instance */ - CustomTargetingClause.create = function create(properties) { - return new CustomTargetingClause(properties); + BatchUpdateCustomFieldsRequest.create = function create(properties) { + return new BatchUpdateCustomFieldsRequest(properties); }; /** - * Encodes the specified CustomTargetingClause message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * Encodes the specified BatchUpdateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingClause} message CustomTargetingClause message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest} message BatchUpdateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingClause.encode = function encode(message, writer) { + BatchUpdateCustomFieldsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.customTargetingLiterals != null && message.customTargetingLiterals.length) - for (var i = 0; i < message.customTargetingLiterals.length; ++i) - $root.google.ads.admanager.v1.CustomTargetingLiteral.encode(message.customTargetingLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdateCustomFieldRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomTargetingClause message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * Encodes the specified BatchUpdateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.ICustomTargetingClause} message CustomTargetingClause message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest} message BatchUpdateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingClause.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingClause message from the specified reader or buffer. + * Decodes a BatchUpdateCustomFieldsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsRequest} BatchUpdateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingClause.decode = function decode(reader, length, error) { + BatchUpdateCustomFieldsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingClause(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.customTargetingLiterals && message.customTargetingLiterals.length)) - message.customTargetingLiterals = []; - message.customTargetingLiterals.push($root.google.ads.admanager.v1.CustomTargetingLiteral.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdateCustomFieldRequest.decode(reader, reader.uint32())); break; } default: @@ -36280,142 +36699,149 @@ }; /** - * Decodes a CustomTargetingClause message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsRequest} BatchUpdateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingClause.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingClause message. + * Verifies a BatchUpdateCustomFieldsRequest message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingClause.verify = function verify(message) { + BatchUpdateCustomFieldsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.customTargetingLiterals != null && message.hasOwnProperty("customTargetingLiterals")) { - if (!Array.isArray(message.customTargetingLiterals)) - return "customTargetingLiterals: array expected"; - for (var i = 0; i < message.customTargetingLiterals.length; ++i) { - var error = $root.google.ads.admanager.v1.CustomTargetingLiteral.verify(message.customTargetingLiterals[i]); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdateCustomFieldRequest.verify(message.requests[i]); if (error) - return "customTargetingLiterals." + error; + return "requests." + error; } } return null; }; /** - * Creates a CustomTargetingClause message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsRequest} BatchUpdateCustomFieldsRequest */ - CustomTargetingClause.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingClause) + BatchUpdateCustomFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest) return object; - var message = new $root.google.ads.admanager.v1.CustomTargetingClause(); - if (object.customTargetingLiterals) { - if (!Array.isArray(object.customTargetingLiterals)) - throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.customTargetingLiterals: array expected"); - message.customTargetingLiterals = []; - for (var i = 0; i < object.customTargetingLiterals.length; ++i) { - if (typeof object.customTargetingLiterals[i] !== "object") - throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.customTargetingLiterals: object expected"); - message.customTargetingLiterals[i] = $root.google.ads.admanager.v1.CustomTargetingLiteral.fromObject(object.customTargetingLiterals[i]); + var message = new $root.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateCustomFieldsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdateCustomFieldRequest.fromObject(object.requests[i]); } } return message; }; /** - * Creates a plain object from a CustomTargetingClause message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateCustomFieldsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.CustomTargetingClause} message CustomTargetingClause + * @param {google.ads.admanager.v1.BatchUpdateCustomFieldsRequest} message BatchUpdateCustomFieldsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingClause.toObject = function toObject(message, options) { + BatchUpdateCustomFieldsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.customTargetingLiterals = []; - if (message.customTargetingLiterals && message.customTargetingLiterals.length) { - object.customTargetingLiterals = []; - for (var j = 0; j < message.customTargetingLiterals.length; ++j) - object.customTargetingLiterals[j] = $root.google.ads.admanager.v1.CustomTargetingLiteral.toObject(message.customTargetingLiterals[j], options); + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdateCustomFieldRequest.toObject(message.requests[j], options); } return object; }; /** - * Converts this CustomTargetingClause to JSON. + * Converts this BatchUpdateCustomFieldsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @instance * @returns {Object.} JSON object */ - CustomTargetingClause.prototype.toJSON = function toJSON() { + BatchUpdateCustomFieldsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingClause + * Gets the default type url for BatchUpdateCustomFieldsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingClause + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingClause"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateCustomFieldsRequest"; }; - return CustomTargetingClause; + return BatchUpdateCustomFieldsRequest; })(); - v1.CustomTargetingLiteral = (function() { + v1.BatchUpdateCustomFieldsResponse = (function() { /** - * Properties of a CustomTargetingLiteral. + * Properties of a BatchUpdateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @interface ICustomTargetingLiteral - * @property {boolean|null} [negative] CustomTargetingLiteral negative - * @property {string|null} [customTargetingKey] CustomTargetingLiteral customTargetingKey - * @property {Array.|null} [customTargetingValues] CustomTargetingLiteral customTargetingValues + * @interface IBatchUpdateCustomFieldsResponse + * @property {Array.|null} [customFields] BatchUpdateCustomFieldsResponse customFields */ /** - * Constructs a new CustomTargetingLiteral. + * Constructs a new BatchUpdateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CustomTargetingLiteral. - * @implements ICustomTargetingLiteral + * @classdesc Represents a BatchUpdateCustomFieldsResponse. + * @implements IBatchUpdateCustomFieldsResponse * @constructor - * @param {google.ads.admanager.v1.ICustomTargetingLiteral=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse=} [properties] Properties to set */ - function CustomTargetingLiteral(properties) { - this.customTargetingValues = []; + function BatchUpdateCustomFieldsResponse(properties) { + this.customFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36423,123 +36849,80 @@ } /** - * CustomTargetingLiteral negative. - * @member {boolean|null|undefined} negative - * @memberof google.ads.admanager.v1.CustomTargetingLiteral - * @instance - */ - CustomTargetingLiteral.prototype.negative = null; - - /** - * CustomTargetingLiteral customTargetingKey. - * @member {string|null|undefined} customTargetingKey - * @memberof google.ads.admanager.v1.CustomTargetingLiteral - * @instance - */ - CustomTargetingLiteral.prototype.customTargetingKey = null; - - /** - * CustomTargetingLiteral customTargetingValues. - * @member {Array.} customTargetingValues - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * BatchUpdateCustomFieldsResponse customFields. + * @member {Array.} customFields + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @instance */ - CustomTargetingLiteral.prototype.customTargetingValues = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomTargetingLiteral.prototype, "_negative", { - get: $util.oneOfGetter($oneOfFields = ["negative"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CustomTargetingLiteral.prototype, "_customTargetingKey", { - get: $util.oneOfGetter($oneOfFields = ["customTargetingKey"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchUpdateCustomFieldsResponse.prototype.customFields = $util.emptyArray; /** - * Creates a new CustomTargetingLiteral instance using the specified properties. + * Creates a new BatchUpdateCustomFieldsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingLiteral=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral instance + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} BatchUpdateCustomFieldsResponse instance */ - CustomTargetingLiteral.create = function create(properties) { - return new CustomTargetingLiteral(properties); + BatchUpdateCustomFieldsResponse.create = function create(properties) { + return new BatchUpdateCustomFieldsResponse(properties); }; /** - * Encodes the specified CustomTargetingLiteral message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * Encodes the specified BatchUpdateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingLiteral} message CustomTargetingLiteral message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse} message BatchUpdateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingLiteral.encode = function encode(message, writer) { + BatchUpdateCustomFieldsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.negative); - if (message.customTargetingKey != null && Object.hasOwnProperty.call(message, "customTargetingKey")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.customTargetingKey); - if (message.customTargetingValues != null && message.customTargetingValues.length) - for (var i = 0; i < message.customTargetingValues.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.customTargetingValues[i]); + if (message.customFields != null && message.customFields.length) + for (var i = 0; i < message.customFields.length; ++i) + $root.google.ads.admanager.v1.CustomField.encode(message.customFields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomTargetingLiteral message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * Encodes the specified BatchUpdateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.ICustomTargetingLiteral} message CustomTargetingLiteral message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse} message BatchUpdateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomTargetingLiteral.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomTargetingLiteral message from the specified reader or buffer. + * Decodes a BatchUpdateCustomFieldsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} BatchUpdateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingLiteral.decode = function decode(reader, length, error) { + BatchUpdateCustomFieldsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingLiteral(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.negative = reader.bool(); - break; - } - case 4: { - message.customTargetingKey = reader.string(); - break; - } - case 5: { - if (!(message.customTargetingValues && message.customTargetingValues.length)) - message.customTargetingValues = []; - message.customTargetingValues.push(reader.string()); + if (!(message.customFields && message.customFields.length)) + message.customFields = []; + message.customFields.push($root.google.ads.admanager.v1.CustomField.decode(reader, reader.uint32())); break; } default: @@ -36551,162 +36934,141 @@ }; /** - * Decodes a CustomTargetingLiteral message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} BatchUpdateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomTargetingLiteral.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomTargetingLiteral message. + * Verifies a BatchUpdateCustomFieldsResponse message. * @function verify - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomTargetingLiteral.verify = function verify(message) { + BatchUpdateCustomFieldsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.negative != null && message.hasOwnProperty("negative")) { - properties._negative = 1; - if (typeof message.negative !== "boolean") - return "negative: boolean expected"; - } - if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { - properties._customTargetingKey = 1; - if (!$util.isString(message.customTargetingKey)) - return "customTargetingKey: string expected"; - } - if (message.customTargetingValues != null && message.hasOwnProperty("customTargetingValues")) { - if (!Array.isArray(message.customTargetingValues)) - return "customTargetingValues: array expected"; - for (var i = 0; i < message.customTargetingValues.length; ++i) - if (!$util.isString(message.customTargetingValues[i])) - return "customTargetingValues: string[] expected"; + if (message.customFields != null && message.hasOwnProperty("customFields")) { + if (!Array.isArray(message.customFields)) + return "customFields: array expected"; + for (var i = 0; i < message.customFields.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomField.verify(message.customFields[i]); + if (error) + return "customFields." + error; + } } return null; }; /** - * Creates a CustomTargetingLiteral message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + * @returns {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} BatchUpdateCustomFieldsResponse */ - CustomTargetingLiteral.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CustomTargetingLiteral) + BatchUpdateCustomFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse) return object; - var message = new $root.google.ads.admanager.v1.CustomTargetingLiteral(); - if (object.negative != null) - message.negative = Boolean(object.negative); - if (object.customTargetingKey != null) - message.customTargetingKey = String(object.customTargetingKey); - if (object.customTargetingValues) { - if (!Array.isArray(object.customTargetingValues)) - throw TypeError(".google.ads.admanager.v1.CustomTargetingLiteral.customTargetingValues: array expected"); - message.customTargetingValues = []; - for (var i = 0; i < object.customTargetingValues.length; ++i) - message.customTargetingValues[i] = String(object.customTargetingValues[i]); + var message = new $root.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse(); + if (object.customFields) { + if (!Array.isArray(object.customFields)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.customFields: array expected"); + message.customFields = []; + for (var i = 0; i < object.customFields.length; ++i) { + if (typeof object.customFields[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateCustomFieldsResponse.customFields: object expected"); + message.customFields[i] = $root.google.ads.admanager.v1.CustomField.fromObject(object.customFields[i]); + } } return message; }; /** - * Creates a plain object from a CustomTargetingLiteral message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateCustomFieldsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.CustomTargetingLiteral} message CustomTargetingLiteral + * @param {google.ads.admanager.v1.BatchUpdateCustomFieldsResponse} message BatchUpdateCustomFieldsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomTargetingLiteral.toObject = function toObject(message, options) { + BatchUpdateCustomFieldsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.customTargetingValues = []; - if (message.negative != null && message.hasOwnProperty("negative")) { - object.negative = message.negative; - if (options.oneofs) - object._negative = "negative"; - } - if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { - object.customTargetingKey = message.customTargetingKey; - if (options.oneofs) - object._customTargetingKey = "customTargetingKey"; - } - if (message.customTargetingValues && message.customTargetingValues.length) { - object.customTargetingValues = []; - for (var j = 0; j < message.customTargetingValues.length; ++j) - object.customTargetingValues[j] = message.customTargetingValues[j]; + object.customFields = []; + if (message.customFields && message.customFields.length) { + object.customFields = []; + for (var j = 0; j < message.customFields.length; ++j) + object.customFields[j] = $root.google.ads.admanager.v1.CustomField.toObject(message.customFields[j], options); } return object; }; /** - * Converts this CustomTargetingLiteral to JSON. + * Converts this BatchUpdateCustomFieldsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @instance * @returns {Object.} JSON object */ - CustomTargetingLiteral.prototype.toJSON = function toJSON() { + BatchUpdateCustomFieldsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomTargetingLiteral + * Gets the default type url for BatchUpdateCustomFieldsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @memberof google.ads.admanager.v1.BatchUpdateCustomFieldsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomTargetingLiteral.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingLiteral"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateCustomFieldsResponse"; }; - return CustomTargetingLiteral; + return BatchUpdateCustomFieldsResponse; })(); - v1.UserDomainTargeting = (function() { + v1.BatchActivateCustomFieldsRequest = (function() { /** - * Properties of a UserDomainTargeting. + * Properties of a BatchActivateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @interface IUserDomainTargeting - * @property {Array.|null} [targetedUserDomains] UserDomainTargeting targetedUserDomains - * @property {Array.|null} [excludedUserDomains] UserDomainTargeting excludedUserDomains + * @interface IBatchActivateCustomFieldsRequest + * @property {string|null} [parent] BatchActivateCustomFieldsRequest parent + * @property {Array.|null} [names] BatchActivateCustomFieldsRequest names */ /** - * Constructs a new UserDomainTargeting. + * Constructs a new BatchActivateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a UserDomainTargeting. - * @implements IUserDomainTargeting + * @classdesc Represents a BatchActivateCustomFieldsRequest. + * @implements IBatchActivateCustomFieldsRequest * @constructor - * @param {google.ads.admanager.v1.IUserDomainTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest=} [properties] Properties to set */ - function UserDomainTargeting(properties) { - this.targetedUserDomains = []; - this.excludedUserDomains = []; + function BatchActivateCustomFieldsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36714,97 +37076,94 @@ } /** - * UserDomainTargeting targetedUserDomains. - * @member {Array.} targetedUserDomains - * @memberof google.ads.admanager.v1.UserDomainTargeting + * BatchActivateCustomFieldsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @instance */ - UserDomainTargeting.prototype.targetedUserDomains = $util.emptyArray; + BatchActivateCustomFieldsRequest.prototype.parent = ""; /** - * UserDomainTargeting excludedUserDomains. - * @member {Array.} excludedUserDomains - * @memberof google.ads.admanager.v1.UserDomainTargeting + * BatchActivateCustomFieldsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @instance */ - UserDomainTargeting.prototype.excludedUserDomains = $util.emptyArray; + BatchActivateCustomFieldsRequest.prototype.names = $util.emptyArray; /** - * Creates a new UserDomainTargeting instance using the specified properties. + * Creates a new BatchActivateCustomFieldsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IUserDomainTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting instance + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsRequest} BatchActivateCustomFieldsRequest instance */ - UserDomainTargeting.create = function create(properties) { - return new UserDomainTargeting(properties); + BatchActivateCustomFieldsRequest.create = function create(properties) { + return new BatchActivateCustomFieldsRequest(properties); }; /** - * Encodes the specified UserDomainTargeting message. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * Encodes the specified BatchActivateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IUserDomainTargeting} message UserDomainTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest} message BatchActivateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserDomainTargeting.encode = function encode(message, writer) { + BatchActivateCustomFieldsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetedUserDomains != null && message.targetedUserDomains.length) - for (var i = 0; i < message.targetedUserDomains.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetedUserDomains[i]); - if (message.excludedUserDomains != null && message.excludedUserDomains.length) - for (var i = 0; i < message.excludedUserDomains.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludedUserDomains[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); return writer; }; /** - * Encodes the specified UserDomainTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * Encodes the specified BatchActivateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IUserDomainTargeting} message UserDomainTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsRequest} message BatchActivateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserDomainTargeting.encodeDelimited = function encodeDelimited(message, writer) { + BatchActivateCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserDomainTargeting message from the specified reader or buffer. + * Decodes a BatchActivateCustomFieldsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsRequest} BatchActivateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserDomainTargeting.decode = function decode(reader, length, error) { + BatchActivateCustomFieldsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UserDomainTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivateCustomFieldsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.targetedUserDomains && message.targetedUserDomains.length)) - message.targetedUserDomains = []; - message.targetedUserDomains.push(reader.string()); + message.parent = reader.string(); break; } - case 2: { - if (!(message.excludedUserDomains && message.excludedUserDomains.length)) - message.excludedUserDomains = []; - message.excludedUserDomains.push(reader.string()); + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -36816,156 +37175,142 @@ }; /** - * Decodes a UserDomainTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsRequest} BatchActivateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserDomainTargeting.decodeDelimited = function decodeDelimited(reader) { + BatchActivateCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserDomainTargeting message. + * Verifies a BatchActivateCustomFieldsRequest message. * @function verify - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserDomainTargeting.verify = function verify(message) { + BatchActivateCustomFieldsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetedUserDomains != null && message.hasOwnProperty("targetedUserDomains")) { - if (!Array.isArray(message.targetedUserDomains)) - return "targetedUserDomains: array expected"; - for (var i = 0; i < message.targetedUserDomains.length; ++i) - if (!$util.isString(message.targetedUserDomains[i])) - return "targetedUserDomains: string[] expected"; - } - if (message.excludedUserDomains != null && message.hasOwnProperty("excludedUserDomains")) { - if (!Array.isArray(message.excludedUserDomains)) - return "excludedUserDomains: array expected"; - for (var i = 0; i < message.excludedUserDomains.length; ++i) - if (!$util.isString(message.excludedUserDomains[i])) - return "excludedUserDomains: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a UserDomainTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsRequest} BatchActivateCustomFieldsRequest */ - UserDomainTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.UserDomainTargeting) + BatchActivateCustomFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivateCustomFieldsRequest) return object; - var message = new $root.google.ads.admanager.v1.UserDomainTargeting(); - if (object.targetedUserDomains) { - if (!Array.isArray(object.targetedUserDomains)) - throw TypeError(".google.ads.admanager.v1.UserDomainTargeting.targetedUserDomains: array expected"); - message.targetedUserDomains = []; - for (var i = 0; i < object.targetedUserDomains.length; ++i) - message.targetedUserDomains[i] = String(object.targetedUserDomains[i]); - } - if (object.excludedUserDomains) { - if (!Array.isArray(object.excludedUserDomains)) - throw TypeError(".google.ads.admanager.v1.UserDomainTargeting.excludedUserDomains: array expected"); - message.excludedUserDomains = []; - for (var i = 0; i < object.excludedUserDomains.length; ++i) - message.excludedUserDomains[i] = String(object.excludedUserDomains[i]); + var message = new $root.google.ads.admanager.v1.BatchActivateCustomFieldsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchActivateCustomFieldsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a UserDomainTargeting message. Also converts values to other types if specified. + * Creates a plain object from a BatchActivateCustomFieldsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.UserDomainTargeting} message UserDomainTargeting + * @param {google.ads.admanager.v1.BatchActivateCustomFieldsRequest} message BatchActivateCustomFieldsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserDomainTargeting.toObject = function toObject(message, options) { + BatchActivateCustomFieldsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targetedUserDomains = []; - object.excludedUserDomains = []; - } - if (message.targetedUserDomains && message.targetedUserDomains.length) { - object.targetedUserDomains = []; - for (var j = 0; j < message.targetedUserDomains.length; ++j) - object.targetedUserDomains[j] = message.targetedUserDomains[j]; - } - if (message.excludedUserDomains && message.excludedUserDomains.length) { - object.excludedUserDomains = []; - for (var j = 0; j < message.excludedUserDomains.length; ++j) - object.excludedUserDomains[j] = message.excludedUserDomains[j]; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } return object; }; /** - * Converts this UserDomainTargeting to JSON. + * Converts this BatchActivateCustomFieldsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @instance * @returns {Object.} JSON object */ - UserDomainTargeting.prototype.toJSON = function toJSON() { + BatchActivateCustomFieldsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserDomainTargeting + * Gets the default type url for BatchActivateCustomFieldsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.UserDomainTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserDomainTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchActivateCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.UserDomainTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivateCustomFieldsRequest"; }; - return UserDomainTargeting; + return BatchActivateCustomFieldsRequest; })(); - v1.VideoPositionTargeting = (function() { + v1.BatchActivateCustomFieldsResponse = (function() { /** - * Properties of a VideoPositionTargeting. + * Properties of a BatchActivateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @interface IVideoPositionTargeting - * @property {Array.|null} [videoPositions] VideoPositionTargeting videoPositions + * @interface IBatchActivateCustomFieldsResponse */ /** - * Constructs a new VideoPositionTargeting. + * Constructs a new BatchActivateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a VideoPositionTargeting. - * @implements IVideoPositionTargeting + * @classdesc Represents a BatchActivateCustomFieldsResponse. + * @implements IBatchActivateCustomFieldsResponse * @constructor - * @param {google.ads.admanager.v1.IVideoPositionTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsResponse=} [properties] Properties to set */ - function VideoPositionTargeting(properties) { - this.videoPositions = []; + function BatchActivateCustomFieldsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36973,82 +37318,65 @@ } /** - * VideoPositionTargeting videoPositions. - * @member {Array.} videoPositions - * @memberof google.ads.admanager.v1.VideoPositionTargeting - * @instance - */ - VideoPositionTargeting.prototype.videoPositions = $util.emptyArray; - - /** - * Creates a new VideoPositionTargeting instance using the specified properties. + * Creates a new BatchActivateCustomFieldsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IVideoPositionTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting instance + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} BatchActivateCustomFieldsResponse instance */ - VideoPositionTargeting.create = function create(properties) { - return new VideoPositionTargeting(properties); + BatchActivateCustomFieldsResponse.create = function create(properties) { + return new BatchActivateCustomFieldsResponse(properties); }; /** - * Encodes the specified VideoPositionTargeting message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * Encodes the specified BatchActivateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IVideoPositionTargeting} message VideoPositionTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsResponse} message BatchActivateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPositionTargeting.encode = function encode(message, writer) { + BatchActivateCustomFieldsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.videoPositions != null && message.videoPositions.length) - for (var i = 0; i < message.videoPositions.length; ++i) - $root.google.ads.admanager.v1.VideoPosition.encode(message.videoPositions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoPositionTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * Encodes the specified BatchActivateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateCustomFieldsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IVideoPositionTargeting} message VideoPositionTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateCustomFieldsResponse} message BatchActivateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPositionTargeting.encodeDelimited = function encodeDelimited(message, writer) { + BatchActivateCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoPositionTargeting message from the specified reader or buffer. + * Decodes a BatchActivateCustomFieldsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} BatchActivateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPositionTargeting.decode = function decode(reader, length, error) { + BatchActivateCustomFieldsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPositionTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivateCustomFieldsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.videoPositions && message.videoPositions.length)) - message.videoPositions = []; - message.videoPositions.push($root.google.ads.admanager.v1.VideoPosition.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -37058,143 +37386,111 @@ }; /** - * Decodes a VideoPositionTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} BatchActivateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPositionTargeting.decodeDelimited = function decodeDelimited(reader) { + BatchActivateCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoPositionTargeting message. + * Verifies a BatchActivateCustomFieldsResponse message. * @function verify - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoPositionTargeting.verify = function verify(message) { + BatchActivateCustomFieldsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.videoPositions != null && message.hasOwnProperty("videoPositions")) { - if (!Array.isArray(message.videoPositions)) - return "videoPositions: array expected"; - for (var i = 0; i < message.videoPositions.length; ++i) { - var error = $root.google.ads.admanager.v1.VideoPosition.verify(message.videoPositions[i]); - if (error) - return "videoPositions." + error; - } - } return null; }; /** - * Creates a VideoPositionTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + * @returns {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} BatchActivateCustomFieldsResponse */ - VideoPositionTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.VideoPositionTargeting) + BatchActivateCustomFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivateCustomFieldsResponse) return object; - var message = new $root.google.ads.admanager.v1.VideoPositionTargeting(); - if (object.videoPositions) { - if (!Array.isArray(object.videoPositions)) - throw TypeError(".google.ads.admanager.v1.VideoPositionTargeting.videoPositions: array expected"); - message.videoPositions = []; - for (var i = 0; i < object.videoPositions.length; ++i) { - if (typeof object.videoPositions[i] !== "object") - throw TypeError(".google.ads.admanager.v1.VideoPositionTargeting.videoPositions: object expected"); - message.videoPositions[i] = $root.google.ads.admanager.v1.VideoPosition.fromObject(object.videoPositions[i]); - } - } - return message; + return new $root.google.ads.admanager.v1.BatchActivateCustomFieldsResponse(); }; /** - * Creates a plain object from a VideoPositionTargeting message. Also converts values to other types if specified. + * Creates a plain object from a BatchActivateCustomFieldsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.VideoPositionTargeting} message VideoPositionTargeting + * @param {google.ads.admanager.v1.BatchActivateCustomFieldsResponse} message BatchActivateCustomFieldsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoPositionTargeting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.videoPositions = []; - if (message.videoPositions && message.videoPositions.length) { - object.videoPositions = []; - for (var j = 0; j < message.videoPositions.length; ++j) - object.videoPositions[j] = $root.google.ads.admanager.v1.VideoPosition.toObject(message.videoPositions[j], options); - } - return object; + BatchActivateCustomFieldsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this VideoPositionTargeting to JSON. + * Converts this BatchActivateCustomFieldsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @instance * @returns {Object.} JSON object */ - VideoPositionTargeting.prototype.toJSON = function toJSON() { + BatchActivateCustomFieldsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VideoPositionTargeting + * Gets the default type url for BatchActivateCustomFieldsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @memberof google.ads.admanager.v1.BatchActivateCustomFieldsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VideoPositionTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchActivateCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.VideoPositionTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivateCustomFieldsResponse"; }; - return VideoPositionTargeting; + return BatchActivateCustomFieldsResponse; })(); - v1.VideoPosition = (function() { + v1.BatchDeactivateCustomFieldsRequest = (function() { /** - * Properties of a VideoPosition. + * Properties of a BatchDeactivateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @interface IVideoPosition - * @property {number|Long|null} [midrollIndex] VideoPosition midrollIndex - * @property {number|Long|null} [reverseMidrollIndex] VideoPosition reverseMidrollIndex - * @property {number|Long|null} [podPosition] VideoPosition podPosition - * @property {google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null} [positionType] VideoPosition positionType - * @property {google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null} [bumperType] VideoPosition bumperType + * @interface IBatchDeactivateCustomFieldsRequest + * @property {string|null} [parent] BatchDeactivateCustomFieldsRequest parent + * @property {Array.|null} [names] BatchDeactivateCustomFieldsRequest names */ /** - * Constructs a new VideoPosition. + * Constructs a new BatchDeactivateCustomFieldsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a VideoPosition. - * @implements IVideoPosition + * @classdesc Represents a BatchDeactivateCustomFieldsRequest. + * @implements IBatchDeactivateCustomFieldsRequest * @constructor - * @param {google.ads.admanager.v1.IVideoPosition=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest=} [properties] Properties to set */ - function VideoPosition(properties) { + function BatchDeactivateCustomFieldsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37202,166 +37498,94 @@ } /** - * VideoPosition midrollIndex. - * @member {number|Long|null|undefined} midrollIndex - * @memberof google.ads.admanager.v1.VideoPosition - * @instance - */ - VideoPosition.prototype.midrollIndex = null; - - /** - * VideoPosition reverseMidrollIndex. - * @member {number|Long|null|undefined} reverseMidrollIndex - * @memberof google.ads.admanager.v1.VideoPosition - * @instance - */ - VideoPosition.prototype.reverseMidrollIndex = null; - - /** - * VideoPosition podPosition. - * @member {number|Long|null|undefined} podPosition - * @memberof google.ads.admanager.v1.VideoPosition - * @instance - */ - VideoPosition.prototype.podPosition = null; - - /** - * VideoPosition positionType. - * @member {google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null|undefined} positionType - * @memberof google.ads.admanager.v1.VideoPosition + * BatchDeactivateCustomFieldsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @instance */ - VideoPosition.prototype.positionType = null; + BatchDeactivateCustomFieldsRequest.prototype.parent = ""; /** - * VideoPosition bumperType. - * @member {google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null|undefined} bumperType - * @memberof google.ads.admanager.v1.VideoPosition + * BatchDeactivateCustomFieldsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @instance */ - VideoPosition.prototype.bumperType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(VideoPosition.prototype, "_midrollIndex", { - get: $util.oneOfGetter($oneOfFields = ["midrollIndex"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(VideoPosition.prototype, "_reverseMidrollIndex", { - get: $util.oneOfGetter($oneOfFields = ["reverseMidrollIndex"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(VideoPosition.prototype, "_podPosition", { - get: $util.oneOfGetter($oneOfFields = ["podPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(VideoPosition.prototype, "_positionType", { - get: $util.oneOfGetter($oneOfFields = ["positionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(VideoPosition.prototype, "_bumperType", { - get: $util.oneOfGetter($oneOfFields = ["bumperType"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchDeactivateCustomFieldsRequest.prototype.names = $util.emptyArray; /** - * Creates a new VideoPosition instance using the specified properties. + * Creates a new BatchDeactivateCustomFieldsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IVideoPosition=} [properties] Properties to set - * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition instance + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest} BatchDeactivateCustomFieldsRequest instance */ - VideoPosition.create = function create(properties) { - return new VideoPosition(properties); + BatchDeactivateCustomFieldsRequest.create = function create(properties) { + return new BatchDeactivateCustomFieldsRequest(properties); }; /** - * Encodes the specified VideoPosition message. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * Encodes the specified BatchDeactivateCustomFieldsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IVideoPosition} message VideoPosition message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest} message BatchDeactivateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPosition.encode = function encode(message, writer) { + BatchDeactivateCustomFieldsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.midrollIndex != null && Object.hasOwnProperty.call(message, "midrollIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.midrollIndex); - if (message.reverseMidrollIndex != null && Object.hasOwnProperty.call(message, "reverseMidrollIndex")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.reverseMidrollIndex); - if (message.podPosition != null && Object.hasOwnProperty.call(message, "podPosition")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.podPosition); - if (message.positionType != null && Object.hasOwnProperty.call(message, "positionType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.positionType); - if (message.bumperType != null && Object.hasOwnProperty.call(message, "bumperType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.bumperType); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); return writer; }; /** - * Encodes the specified VideoPosition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * Encodes the specified BatchDeactivateCustomFieldsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.IVideoPosition} message VideoPosition message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest} message BatchDeactivateCustomFieldsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPosition.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeactivateCustomFieldsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoPosition message from the specified reader or buffer. + * Decodes a BatchDeactivateCustomFieldsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest} BatchDeactivateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPosition.decode = function decode(reader, length, error) { + BatchDeactivateCustomFieldsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPosition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.midrollIndex = reader.int64(); - break; - } - case 2: { - message.reverseMidrollIndex = reader.int64(); + message.parent = reader.string(); break; } case 3: { - message.podPosition = reader.int64(); - break; - } - case 5: { - message.positionType = reader.int32(); - break; - } - case 6: { - message.bumperType = reader.int32(); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -37373,262 +37597,142 @@ }; /** - * Decodes a VideoPosition message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateCustomFieldsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest} BatchDeactivateCustomFieldsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPosition.decodeDelimited = function decodeDelimited(reader) { + BatchDeactivateCustomFieldsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoPosition message. + * Verifies a BatchDeactivateCustomFieldsRequest message. * @function verify - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoPosition.verify = function verify(message) { + BatchDeactivateCustomFieldsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.midrollIndex != null && message.hasOwnProperty("midrollIndex")) { - properties._midrollIndex = 1; - if (!$util.isInteger(message.midrollIndex) && !(message.midrollIndex && $util.isInteger(message.midrollIndex.low) && $util.isInteger(message.midrollIndex.high))) - return "midrollIndex: integer|Long expected"; - } - if (message.reverseMidrollIndex != null && message.hasOwnProperty("reverseMidrollIndex")) { - properties._reverseMidrollIndex = 1; - if (!$util.isInteger(message.reverseMidrollIndex) && !(message.reverseMidrollIndex && $util.isInteger(message.reverseMidrollIndex.low) && $util.isInteger(message.reverseMidrollIndex.high))) - return "reverseMidrollIndex: integer|Long expected"; - } - if (message.podPosition != null && message.hasOwnProperty("podPosition")) { - properties._podPosition = 1; - if (!$util.isInteger(message.podPosition) && !(message.podPosition && $util.isInteger(message.podPosition.low) && $util.isInteger(message.podPosition.high))) - return "podPosition: integer|Long expected"; - } - if (message.positionType != null && message.hasOwnProperty("positionType")) { - properties._positionType = 1; - switch (message.positionType) { - default: - return "positionType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.bumperType != null && message.hasOwnProperty("bumperType")) { - properties._bumperType = 1; - switch (message.bumperType) { - default: - return "bumperType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a VideoPosition message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateCustomFieldsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest} BatchDeactivateCustomFieldsRequest */ - VideoPosition.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.VideoPosition) + BatchDeactivateCustomFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest) return object; - var message = new $root.google.ads.admanager.v1.VideoPosition(); - if (object.midrollIndex != null) - if ($util.Long) - (message.midrollIndex = $util.Long.fromValue(object.midrollIndex)).unsigned = false; - else if (typeof object.midrollIndex === "string") - message.midrollIndex = parseInt(object.midrollIndex, 10); - else if (typeof object.midrollIndex === "number") - message.midrollIndex = object.midrollIndex; - else if (typeof object.midrollIndex === "object") - message.midrollIndex = new $util.LongBits(object.midrollIndex.low >>> 0, object.midrollIndex.high >>> 0).toNumber(); - if (object.reverseMidrollIndex != null) - if ($util.Long) - (message.reverseMidrollIndex = $util.Long.fromValue(object.reverseMidrollIndex)).unsigned = false; - else if (typeof object.reverseMidrollIndex === "string") - message.reverseMidrollIndex = parseInt(object.reverseMidrollIndex, 10); - else if (typeof object.reverseMidrollIndex === "number") - message.reverseMidrollIndex = object.reverseMidrollIndex; - else if (typeof object.reverseMidrollIndex === "object") - message.reverseMidrollIndex = new $util.LongBits(object.reverseMidrollIndex.low >>> 0, object.reverseMidrollIndex.high >>> 0).toNumber(); - if (object.podPosition != null) - if ($util.Long) - (message.podPosition = $util.Long.fromValue(object.podPosition)).unsigned = false; - else if (typeof object.podPosition === "string") - message.podPosition = parseInt(object.podPosition, 10); - else if (typeof object.podPosition === "number") - message.podPosition = object.podPosition; - else if (typeof object.podPosition === "object") - message.podPosition = new $util.LongBits(object.podPosition.low >>> 0, object.podPosition.high >>> 0).toNumber(); - switch (object.positionType) { - default: - if (typeof object.positionType === "number") { - message.positionType = object.positionType; - break; - } - break; - case "VIDEO_POSITION_UNSPECIFIED": - case 0: - message.positionType = 0; - break; - case "ALL": - case 1: - message.positionType = 1; - break; - case "MIDROLL": - case 2: - message.positionType = 2; - break; - case "POSTROLL": - case 3: - message.positionType = 3; - break; - case "PREROLL": - case 4: - message.positionType = 4; - break; - } - switch (object.bumperType) { - default: - if (typeof object.bumperType === "number") { - message.bumperType = object.bumperType; - break; - } - break; - case "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED": - case 0: - message.bumperType = 0; - break; - case "AFTER": - case 1: - message.bumperType = 1; - break; - case "BEFORE": - case 2: - message.bumperType = 2; - break; + var message = new $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a VideoPosition message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeactivateCustomFieldsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static - * @param {google.ads.admanager.v1.VideoPosition} message VideoPosition + * @param {google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest} message BatchDeactivateCustomFieldsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoPosition.toObject = function toObject(message, options) { + BatchDeactivateCustomFieldsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.midrollIndex != null && message.hasOwnProperty("midrollIndex")) { - if (typeof message.midrollIndex === "number") - object.midrollIndex = options.longs === String ? String(message.midrollIndex) : message.midrollIndex; - else - object.midrollIndex = options.longs === String ? $util.Long.prototype.toString.call(message.midrollIndex) : options.longs === Number ? new $util.LongBits(message.midrollIndex.low >>> 0, message.midrollIndex.high >>> 0).toNumber() : message.midrollIndex; - if (options.oneofs) - object._midrollIndex = "midrollIndex"; - } - if (message.reverseMidrollIndex != null && message.hasOwnProperty("reverseMidrollIndex")) { - if (typeof message.reverseMidrollIndex === "number") - object.reverseMidrollIndex = options.longs === String ? String(message.reverseMidrollIndex) : message.reverseMidrollIndex; - else - object.reverseMidrollIndex = options.longs === String ? $util.Long.prototype.toString.call(message.reverseMidrollIndex) : options.longs === Number ? new $util.LongBits(message.reverseMidrollIndex.low >>> 0, message.reverseMidrollIndex.high >>> 0).toNumber() : message.reverseMidrollIndex; - if (options.oneofs) - object._reverseMidrollIndex = "reverseMidrollIndex"; - } - if (message.podPosition != null && message.hasOwnProperty("podPosition")) { - if (typeof message.podPosition === "number") - object.podPosition = options.longs === String ? String(message.podPosition) : message.podPosition; - else - object.podPosition = options.longs === String ? $util.Long.prototype.toString.call(message.podPosition) : options.longs === Number ? new $util.LongBits(message.podPosition.low >>> 0, message.podPosition.high >>> 0).toNumber() : message.podPosition; - if (options.oneofs) - object._podPosition = "podPosition"; - } - if (message.positionType != null && message.hasOwnProperty("positionType")) { - object.positionType = options.enums === String ? $root.google.ads.admanager.v1.VideoPositionEnum.VideoPosition[message.positionType] === undefined ? message.positionType : $root.google.ads.admanager.v1.VideoPositionEnum.VideoPosition[message.positionType] : message.positionType; - if (options.oneofs) - object._positionType = "positionType"; - } - if (message.bumperType != null && message.hasOwnProperty("bumperType")) { - object.bumperType = options.enums === String ? $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType[message.bumperType] === undefined ? message.bumperType : $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType[message.bumperType] : message.bumperType; - if (options.oneofs) - object._bumperType = "bumperType"; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } return object; }; /** - * Converts this VideoPosition to JSON. + * Converts this BatchDeactivateCustomFieldsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @instance * @returns {Object.} JSON object */ - VideoPosition.prototype.toJSON = function toJSON() { + BatchDeactivateCustomFieldsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VideoPosition + * Gets the default type url for BatchDeactivateCustomFieldsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.VideoPosition + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VideoPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeactivateCustomFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.VideoPosition"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest"; }; - return VideoPosition; + return BatchDeactivateCustomFieldsRequest; })(); - v1.DataSegmentTargeting = (function() { + v1.BatchDeactivateCustomFieldsResponse = (function() { /** - * Properties of a DataSegmentTargeting. + * Properties of a BatchDeactivateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @interface IDataSegmentTargeting - * @property {boolean|null} [hasDataSegmentTargeting] DataSegmentTargeting hasDataSegmentTargeting + * @interface IBatchDeactivateCustomFieldsResponse */ /** - * Constructs a new DataSegmentTargeting. + * Constructs a new BatchDeactivateCustomFieldsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a DataSegmentTargeting. - * @implements IDataSegmentTargeting + * @classdesc Represents a BatchDeactivateCustomFieldsResponse. + * @implements IBatchDeactivateCustomFieldsResponse * @constructor - * @param {google.ads.admanager.v1.IDataSegmentTargeting=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse=} [properties] Properties to set */ - function DataSegmentTargeting(properties) { + function BatchDeactivateCustomFieldsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37636,79 +37740,65 @@ } /** - * DataSegmentTargeting hasDataSegmentTargeting. - * @member {boolean} hasDataSegmentTargeting - * @memberof google.ads.admanager.v1.DataSegmentTargeting - * @instance - */ - DataSegmentTargeting.prototype.hasDataSegmentTargeting = false; - - /** - * Creates a new DataSegmentTargeting instance using the specified properties. + * Creates a new BatchDeactivateCustomFieldsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IDataSegmentTargeting=} [properties] Properties to set - * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting instance + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} BatchDeactivateCustomFieldsResponse instance */ - DataSegmentTargeting.create = function create(properties) { - return new DataSegmentTargeting(properties); + BatchDeactivateCustomFieldsResponse.create = function create(properties) { + return new BatchDeactivateCustomFieldsResponse(properties); }; /** - * Encodes the specified DataSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * Encodes the specified BatchDeactivateCustomFieldsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IDataSegmentTargeting} message DataSegmentTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse} message BatchDeactivateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSegmentTargeting.encode = function encode(message, writer) { + BatchDeactivateCustomFieldsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hasDataSegmentTargeting != null && Object.hasOwnProperty.call(message, "hasDataSegmentTargeting")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.hasDataSegmentTargeting); return writer; }; /** - * Encodes the specified DataSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * Encodes the specified BatchDeactivateCustomFieldsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.IDataSegmentTargeting} message DataSegmentTargeting message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse} message BatchDeactivateCustomFieldsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSegmentTargeting.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeactivateCustomFieldsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataSegmentTargeting message from the specified reader or buffer. + * Decodes a BatchDeactivateCustomFieldsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} BatchDeactivateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSegmentTargeting.decode = function decode(reader, length, error) { + BatchDeactivateCustomFieldsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DataSegmentTargeting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.hasDataSegmentTargeting = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -37718,121 +37808,110 @@ }; /** - * Decodes a DataSegmentTargeting message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateCustomFieldsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} BatchDeactivateCustomFieldsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSegmentTargeting.decodeDelimited = function decodeDelimited(reader) { + BatchDeactivateCustomFieldsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataSegmentTargeting message. + * Verifies a BatchDeactivateCustomFieldsResponse message. * @function verify - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataSegmentTargeting.verify = function verify(message) { + BatchDeactivateCustomFieldsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hasDataSegmentTargeting != null && message.hasOwnProperty("hasDataSegmentTargeting")) - if (typeof message.hasDataSegmentTargeting !== "boolean") - return "hasDataSegmentTargeting: boolean expected"; return null; }; /** - * Creates a DataSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateCustomFieldsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + * @returns {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} BatchDeactivateCustomFieldsResponse */ - DataSegmentTargeting.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.DataSegmentTargeting) + BatchDeactivateCustomFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse) return object; - var message = new $root.google.ads.admanager.v1.DataSegmentTargeting(); - if (object.hasDataSegmentTargeting != null) - message.hasDataSegmentTargeting = Boolean(object.hasDataSegmentTargeting); - return message; + return new $root.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse(); }; /** - * Creates a plain object from a DataSegmentTargeting message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeactivateCustomFieldsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static - * @param {google.ads.admanager.v1.DataSegmentTargeting} message DataSegmentTargeting + * @param {google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse} message BatchDeactivateCustomFieldsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataSegmentTargeting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hasDataSegmentTargeting = false; - if (message.hasDataSegmentTargeting != null && message.hasOwnProperty("hasDataSegmentTargeting")) - object.hasDataSegmentTargeting = message.hasDataSegmentTargeting; - return object; + BatchDeactivateCustomFieldsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DataSegmentTargeting to JSON. + * Converts this BatchDeactivateCustomFieldsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @instance * @returns {Object.} JSON object */ - DataSegmentTargeting.prototype.toJSON = function toJSON() { + BatchDeactivateCustomFieldsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataSegmentTargeting + * Gets the default type url for BatchDeactivateCustomFieldsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @memberof google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataSegmentTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeactivateCustomFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.DataSegmentTargeting"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse"; }; - return DataSegmentTargeting; + return BatchDeactivateCustomFieldsResponse; })(); - v1.RequestPlatformEnum = (function() { + v1.CustomFieldValue = (function() { /** - * Properties of a RequestPlatformEnum. + * Properties of a CustomFieldValue. * @memberof google.ads.admanager.v1 - * @interface IRequestPlatformEnum + * @interface ICustomFieldValue + * @property {string|null} [customField] CustomFieldValue customField + * @property {google.ads.admanager.v1.CustomFieldValue.IValue|null} [value] CustomFieldValue value */ /** - * Constructs a new RequestPlatformEnum. + * Constructs a new CustomFieldValue. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RequestPlatformEnum. - * @implements IRequestPlatformEnum + * @classdesc Represents a CustomFieldValue. + * @implements ICustomFieldValue * @constructor - * @param {google.ads.admanager.v1.IRequestPlatformEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomFieldValue=} [properties] Properties to set */ - function RequestPlatformEnum(properties) { + function CustomFieldValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37840,65 +37919,102 @@ } /** - * Creates a new RequestPlatformEnum instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.RequestPlatformEnum - * @static - * @param {google.ads.admanager.v1.IRequestPlatformEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum instance + * CustomFieldValue customField. + * @member {string} customField + * @memberof google.ads.admanager.v1.CustomFieldValue + * @instance */ - RequestPlatformEnum.create = function create(properties) { - return new RequestPlatformEnum(properties); + CustomFieldValue.prototype.customField = ""; + + /** + * CustomFieldValue value. + * @member {google.ads.admanager.v1.CustomFieldValue.IValue|null|undefined} value + * @memberof google.ads.admanager.v1.CustomFieldValue + * @instance + */ + CustomFieldValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomFieldValue.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomFieldValue instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomFieldValue + * @static + * @param {google.ads.admanager.v1.ICustomFieldValue=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue instance + */ + CustomFieldValue.create = function create(properties) { + return new CustomFieldValue(properties); }; /** - * Encodes the specified RequestPlatformEnum message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * Encodes the specified CustomFieldValue message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static - * @param {google.ads.admanager.v1.IRequestPlatformEnum} message RequestPlatformEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldValue} message CustomFieldValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPlatformEnum.encode = function encode(message, writer) { + CustomFieldValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.customField != null && Object.hasOwnProperty.call(message, "customField")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.customField); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.ads.admanager.v1.CustomFieldValue.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RequestPlatformEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * Encodes the specified CustomFieldValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static - * @param {google.ads.admanager.v1.IRequestPlatformEnum} message RequestPlatformEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomFieldValue} message CustomFieldValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPlatformEnum.encodeDelimited = function encodeDelimited(message, writer) { + CustomFieldValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestPlatformEnum message from the specified reader or buffer. + * Decodes a CustomFieldValue message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPlatformEnum.decode = function decode(reader, length, error) { + CustomFieldValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RequestPlatformEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.customField = reader.string(); + break; + } + case 2: { + message.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -37908,126 +38024,460 @@ }; /** - * Decodes a RequestPlatformEnum message from the specified reader or buffer, length delimited. + * Decodes a CustomFieldValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPlatformEnum.decodeDelimited = function decodeDelimited(reader) { + CustomFieldValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RequestPlatformEnum message. + * Verifies a CustomFieldValue message. * @function verify - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestPlatformEnum.verify = function verify(message) { + CustomFieldValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.customField != null && message.hasOwnProperty("customField")) + if (!$util.isString(message.customField)) + return "customField: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.google.ads.admanager.v1.CustomFieldValue.Value.verify(message.value); + if (error) + return "value." + error; + } + } return null; }; /** - * Creates a RequestPlatformEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CustomFieldValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + * @returns {google.ads.admanager.v1.CustomFieldValue} CustomFieldValue */ - RequestPlatformEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RequestPlatformEnum) + CustomFieldValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldValue) return object; - return new $root.google.ads.admanager.v1.RequestPlatformEnum(); + var message = new $root.google.ads.admanager.v1.CustomFieldValue(); + if (object.customField != null) + message.customField = String(object.customField); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.ads.admanager.v1.CustomFieldValue.value: object expected"); + message.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.fromObject(object.value); + } + return message; }; /** - * Creates a plain object from a RequestPlatformEnum message. Also converts values to other types if specified. + * Creates a plain object from a CustomFieldValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static - * @param {google.ads.admanager.v1.RequestPlatformEnum} message RequestPlatformEnum + * @param {google.ads.admanager.v1.CustomFieldValue} message CustomFieldValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestPlatformEnum.toObject = function toObject() { - return {}; + CustomFieldValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.customField = ""; + if (message.customField != null && message.hasOwnProperty("customField")) + object.customField = message.customField; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.google.ads.admanager.v1.CustomFieldValue.Value.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; }; /** - * Converts this RequestPlatformEnum to JSON. + * Converts this CustomFieldValue to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @instance * @returns {Object.} JSON object */ - RequestPlatformEnum.prototype.toJSON = function toJSON() { + CustomFieldValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RequestPlatformEnum + * Gets the default type url for CustomFieldValue * @function getTypeUrl - * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @memberof google.ads.admanager.v1.CustomFieldValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RequestPlatformEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomFieldValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RequestPlatformEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldValue"; }; - /** - * RequestPlatform enum. - * @name google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform - * @enum {number} - * @property {number} REQUEST_PLATFORM_UNSPECIFIED=0 REQUEST_PLATFORM_UNSPECIFIED value - * @property {number} BROWSER=1 BROWSER value - * @property {number} MOBILE_APP=2 MOBILE_APP value - * @property {number} VIDEO_PLAYER=3 VIDEO_PLAYER value - */ - RequestPlatformEnum.RequestPlatform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REQUEST_PLATFORM_UNSPECIFIED"] = 0; - values[valuesById[1] = "BROWSER"] = 1; - values[valuesById[2] = "MOBILE_APP"] = 2; - values[valuesById[3] = "VIDEO_PLAYER"] = 3; - return values; + CustomFieldValue.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.ads.admanager.v1.CustomFieldValue + * @interface IValue + * @property {number|Long|null} [dropdownValue] Value dropdownValue + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [numberValue] Value numberValue + * @property {boolean|null} [toggleValue] Value toggleValue + */ + + /** + * Constructs a new Value. + * @memberof google.ads.admanager.v1.CustomFieldValue + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.ads.admanager.v1.CustomFieldValue.IValue=} [properties] Properties to set + */ + function Value(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 dropdownValue. + * @member {number|Long|null|undefined} dropdownValue + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + */ + Value.prototype.dropdownValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value toggleValue. + * @member {boolean|null|undefined} toggleValue + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + */ + Value.prototype.toggleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value value. + * @member {"dropdownValue"|"stringValue"|"numberValue"|"toggleValue"|undefined} value + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + */ + Object.defineProperty(Value.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["dropdownValue", "stringValue", "numberValue", "toggleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {google.ads.admanager.v1.CustomFieldValue.IValue=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.Value.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {google.ads.admanager.v1.CustomFieldValue.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dropdownValue != null && Object.hasOwnProperty.call(message, "dropdownValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dropdownValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.numberValue); + if (message.toggleValue != null && Object.hasOwnProperty.call(message, "toggleValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.toggleValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomFieldValue.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {google.ads.admanager.v1.CustomFieldValue.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomFieldValue.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dropdownValue = reader.int64(); + break; + } + case 2: { + message.stringValue = reader.string(); + break; + } + case 3: { + message.numberValue = reader.double(); + break; + } + case 4: { + message.toggleValue = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dropdownValue != null && message.hasOwnProperty("dropdownValue")) { + properties.value = 1; + if (!$util.isInteger(message.dropdownValue) && !(message.dropdownValue && $util.isInteger(message.dropdownValue.low) && $util.isInteger(message.dropdownValue.high))) + return "dropdownValue: integer|Long expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.toggleValue != null && message.hasOwnProperty("toggleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.toggleValue !== "boolean") + return "toggleValue: boolean expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CustomFieldValue.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomFieldValue.Value) + return object; + var message = new $root.google.ads.admanager.v1.CustomFieldValue.Value(); + if (object.dropdownValue != null) + if ($util.Long) + (message.dropdownValue = $util.Long.fromValue(object.dropdownValue)).unsigned = false; + else if (typeof object.dropdownValue === "string") + message.dropdownValue = parseInt(object.dropdownValue, 10); + else if (typeof object.dropdownValue === "number") + message.dropdownValue = object.dropdownValue; + else if (typeof object.dropdownValue === "object") + message.dropdownValue = new $util.LongBits(object.dropdownValue.low >>> 0, object.dropdownValue.high >>> 0).toNumber(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.toggleValue != null) + message.toggleValue = Boolean(object.toggleValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {google.ads.admanager.v1.CustomFieldValue.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dropdownValue != null && message.hasOwnProperty("dropdownValue")) { + if (typeof message.dropdownValue === "number") + object.dropdownValue = options.longs === String ? String(message.dropdownValue) : message.dropdownValue; + else + object.dropdownValue = options.longs === String ? $util.Long.prototype.toString.call(message.dropdownValue) : options.longs === Number ? new $util.LongBits(message.dropdownValue.low >>> 0, message.dropdownValue.high >>> 0).toNumber() : message.dropdownValue; + if (options.oneofs) + object.value = "dropdownValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.value = "numberValue"; + } + if (message.toggleValue != null && message.hasOwnProperty("toggleValue")) { + object.toggleValue = message.toggleValue; + if (options.oneofs) + object.value = "toggleValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CustomFieldValue.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CustomFieldValue.Value"; + }; + + return Value; })(); - return RequestPlatformEnum; + return CustomFieldValue; })(); - v1.TargetedVideoBumperTypeEnum = (function() { + v1.CustomTargetingKeyStatusEnum = (function() { /** - * Properties of a TargetedVideoBumperTypeEnum. + * Properties of a CustomTargetingKeyStatusEnum. * @memberof google.ads.admanager.v1 - * @interface ITargetedVideoBumperTypeEnum + * @interface ICustomTargetingKeyStatusEnum */ /** - * Constructs a new TargetedVideoBumperTypeEnum. + * Constructs a new CustomTargetingKeyStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TargetedVideoBumperTypeEnum. - * @implements ITargetedVideoBumperTypeEnum + * @classdesc Represents a CustomTargetingKeyStatusEnum. + * @implements ICustomTargetingKeyStatusEnum * @constructor - * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum=} [properties] Properties to set */ - function TargetedVideoBumperTypeEnum(properties) { + function CustomTargetingKeyStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38035,60 +38485,60 @@ } /** - * Creates a new TargetedVideoBumperTypeEnum instance using the specified properties. + * Creates a new CustomTargetingKeyStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static - * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum instance + * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum instance */ - TargetedVideoBumperTypeEnum.create = function create(properties) { - return new TargetedVideoBumperTypeEnum(properties); + CustomTargetingKeyStatusEnum.create = function create(properties) { + return new CustomTargetingKeyStatusEnum(properties); }; /** - * Encodes the specified TargetedVideoBumperTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * Encodes the specified CustomTargetingKeyStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static - * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetedVideoBumperTypeEnum.encode = function encode(message, writer) { + CustomTargetingKeyStatusEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified TargetedVideoBumperTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * Encodes the specified CustomTargetingKeyStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static - * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetedVideoBumperTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingKeyStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer. + * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetedVideoBumperTypeEnum.decode = function decode(reader, length, error) { + CustomTargetingKeyStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -38103,124 +38553,124 @@ }; /** - * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKeyStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetedVideoBumperTypeEnum.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingKeyStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetedVideoBumperTypeEnum message. + * Verifies a CustomTargetingKeyStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetedVideoBumperTypeEnum.verify = function verify(message) { + CustomTargetingKeyStatusEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a TargetedVideoBumperTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKeyStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} CustomTargetingKeyStatusEnum */ - TargetedVideoBumperTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum) + CustomTargetingKeyStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum) return object; - return new $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum(); + return new $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum(); }; /** - * Creates a plain object from a TargetedVideoBumperTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingKeyStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static - * @param {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum + * @param {google.ads.admanager.v1.CustomTargetingKeyStatusEnum} message CustomTargetingKeyStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetedVideoBumperTypeEnum.toObject = function toObject() { + CustomTargetingKeyStatusEnum.toObject = function toObject() { return {}; }; /** - * Converts this TargetedVideoBumperTypeEnum to JSON. + * Converts this CustomTargetingKeyStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @instance * @returns {Object.} JSON object */ - TargetedVideoBumperTypeEnum.prototype.toJSON = function toJSON() { + CustomTargetingKeyStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetedVideoBumperTypeEnum + * Gets the default type url for CustomTargetingKeyStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetedVideoBumperTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingKeyStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TargetedVideoBumperTypeEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyStatusEnum"; }; /** - * TargetedVideoBumperType enum. - * @name google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType + * CustomTargetingKeyStatus enum. + * @name google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus * @enum {number} - * @property {number} TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED=0 TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED value - * @property {number} AFTER=1 AFTER value - * @property {number} BEFORE=2 BEFORE value + * @property {number} CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value */ - TargetedVideoBumperTypeEnum.TargetedVideoBumperType = (function() { + CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AFTER"] = 1; - values[valuesById[2] = "BEFORE"] = 2; + values[valuesById[0] = "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; return values; })(); - return TargetedVideoBumperTypeEnum; + return CustomTargetingKeyStatusEnum; })(); - v1.VideoPositionEnum = (function() { + v1.CustomTargetingKeyTypeEnum = (function() { /** - * Properties of a VideoPositionEnum. + * Properties of a CustomTargetingKeyTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IVideoPositionEnum + * @interface ICustomTargetingKeyTypeEnum */ /** - * Constructs a new VideoPositionEnum. + * Constructs a new CustomTargetingKeyTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a VideoPositionEnum. - * @implements IVideoPositionEnum + * @classdesc Represents a CustomTargetingKeyTypeEnum. + * @implements ICustomTargetingKeyTypeEnum * @constructor - * @param {google.ads.admanager.v1.IVideoPositionEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum=} [properties] Properties to set */ - function VideoPositionEnum(properties) { + function CustomTargetingKeyTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38228,60 +38678,60 @@ } /** - * Creates a new VideoPositionEnum instance using the specified properties. + * Creates a new CustomTargetingKeyTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static - * @param {google.ads.admanager.v1.IVideoPositionEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum instance + * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum instance */ - VideoPositionEnum.create = function create(properties) { - return new VideoPositionEnum(properties); + CustomTargetingKeyTypeEnum.create = function create(properties) { + return new CustomTargetingKeyTypeEnum(properties); }; /** - * Encodes the specified VideoPositionEnum message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * Encodes the specified CustomTargetingKeyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static - * @param {google.ads.admanager.v1.IVideoPositionEnum} message VideoPositionEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPositionEnum.encode = function encode(message, writer) { + CustomTargetingKeyTypeEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified VideoPositionEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * Encodes the specified CustomTargetingKeyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static - * @param {google.ads.admanager.v1.IVideoPositionEnum} message VideoPositionEnum message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPositionEnum.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingKeyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoPositionEnum message from the specified reader or buffer. + * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPositionEnum.decode = function decode(reader, length, error) { + CustomTargetingKeyTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPositionEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -38296,296 +38746,124 @@ }; /** - * Decodes a VideoPositionEnum message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKeyTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPositionEnum.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingKeyTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoPositionEnum message. + * Verifies a CustomTargetingKeyTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoPositionEnum.verify = function verify(message) { + CustomTargetingKeyTypeEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a VideoPositionEnum message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKeyTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + * @returns {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} CustomTargetingKeyTypeEnum */ - VideoPositionEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.VideoPositionEnum) + CustomTargetingKeyTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum) return object; - return new $root.google.ads.admanager.v1.VideoPositionEnum(); + return new $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum(); }; /** - * Creates a plain object from a VideoPositionEnum message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingKeyTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static - * @param {google.ads.admanager.v1.VideoPositionEnum} message VideoPositionEnum + * @param {google.ads.admanager.v1.CustomTargetingKeyTypeEnum} message CustomTargetingKeyTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoPositionEnum.toObject = function toObject() { + CustomTargetingKeyTypeEnum.toObject = function toObject() { return {}; }; /** - * Converts this VideoPositionEnum to JSON. + * Converts this CustomTargetingKeyTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @instance * @returns {Object.} JSON object */ - VideoPositionEnum.prototype.toJSON = function toJSON() { + CustomTargetingKeyTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VideoPositionEnum + * Gets the default type url for CustomTargetingKeyTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.VideoPositionEnum + * @memberof google.ads.admanager.v1.CustomTargetingKeyTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VideoPositionEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingKeyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.VideoPositionEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyTypeEnum"; }; /** - * VideoPosition enum. - * @name google.ads.admanager.v1.VideoPositionEnum.VideoPosition + * CustomTargetingKeyType enum. + * @name google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType * @enum {number} - * @property {number} VIDEO_POSITION_UNSPECIFIED=0 VIDEO_POSITION_UNSPECIFIED value - * @property {number} ALL=1 ALL value - * @property {number} MIDROLL=2 MIDROLL value - * @property {number} POSTROLL=3 POSTROLL value - * @property {number} PREROLL=4 PREROLL value + * @property {number} CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED value + * @property {number} PREDEFINED=1 PREDEFINED value + * @property {number} FREEFORM=2 FREEFORM value */ - VideoPositionEnum.VideoPosition = (function() { + CustomTargetingKeyTypeEnum.CustomTargetingKeyType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VIDEO_POSITION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL"] = 1; - values[valuesById[2] = "MIDROLL"] = 2; - values[valuesById[3] = "POSTROLL"] = 3; - values[valuesById[4] = "PREROLL"] = 4; + values[valuesById[0] = "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREDEFINED"] = 1; + values[valuesById[2] = "FREEFORM"] = 2; return values; })(); - return VideoPositionEnum; - })(); - - v1.PrivateAuctionDealService = (function() { - - /** - * Constructs a new PrivateAuctionDealService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a PrivateAuctionDealService - * @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 PrivateAuctionDealService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PrivateAuctionDealService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PrivateAuctionDealService; - - /** - * Creates new PrivateAuctionDealService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @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 {PrivateAuctionDealService} RPC service. Useful where requests and/or responses are streamed. - */ - PrivateAuctionDealService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|getPrivateAuctionDeal}. - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @typedef GetPrivateAuctionDealCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal - */ - - /** - * Calls GetPrivateAuctionDeal. - * @function getPrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} request GetPrivateAuctionDealRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionDealService.prototype.getPrivateAuctionDeal = function getPrivateAuctionDeal(request, callback) { - return this.rpcCall(getPrivateAuctionDeal, $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); - }, "name", { value: "GetPrivateAuctionDeal" }); - - /** - * Calls GetPrivateAuctionDeal. - * @function getPrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} request GetPrivateAuctionDealRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|listPrivateAuctionDeals}. - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @typedef ListPrivateAuctionDealsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} [response] ListPrivateAuctionDealsResponse - */ - - /** - * Calls ListPrivateAuctionDeals. - * @function listPrivateAuctionDeals - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} request ListPrivateAuctionDealsRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDealsCallback} callback Node-style callback called with the error, if any, and ListPrivateAuctionDealsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionDealService.prototype.listPrivateAuctionDeals = function listPrivateAuctionDeals(request, callback) { - return this.rpcCall(listPrivateAuctionDeals, $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest, $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse, request, callback); - }, "name", { value: "ListPrivateAuctionDeals" }); - - /** - * Calls ListPrivateAuctionDeals. - * @function listPrivateAuctionDeals - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} request ListPrivateAuctionDealsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|createPrivateAuctionDeal}. - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @typedef CreatePrivateAuctionDealCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal - */ - - /** - * Calls CreatePrivateAuctionDeal. - * @function createPrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} request CreatePrivateAuctionDealRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionDealService.prototype.createPrivateAuctionDeal = function createPrivateAuctionDeal(request, callback) { - return this.rpcCall(createPrivateAuctionDeal, $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); - }, "name", { value: "CreatePrivateAuctionDeal" }); - - /** - * Calls CreatePrivateAuctionDeal. - * @function createPrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} request CreatePrivateAuctionDealRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|updatePrivateAuctionDeal}. - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @typedef UpdatePrivateAuctionDealCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal - */ - - /** - * Calls UpdatePrivateAuctionDeal. - * @function updatePrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} request UpdatePrivateAuctionDealRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionDealService.prototype.updatePrivateAuctionDeal = function updatePrivateAuctionDeal(request, callback) { - return this.rpcCall(updatePrivateAuctionDeal, $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); - }, "name", { value: "UpdatePrivateAuctionDeal" }); - - /** - * Calls UpdatePrivateAuctionDeal. - * @function updatePrivateAuctionDeal - * @memberof google.ads.admanager.v1.PrivateAuctionDealService - * @instance - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} request UpdatePrivateAuctionDealRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PrivateAuctionDealService; + return CustomTargetingKeyTypeEnum; })(); - v1.GetPrivateAuctionDealRequest = (function() { + v1.CustomTargetingKeyReportableTypeEnum = (function() { /** - * Properties of a GetPrivateAuctionDealRequest. + * Properties of a CustomTargetingKeyReportableTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IGetPrivateAuctionDealRequest - * @property {string|null} [name] GetPrivateAuctionDealRequest name + * @interface ICustomTargetingKeyReportableTypeEnum */ /** - * Constructs a new GetPrivateAuctionDealRequest. + * Constructs a new CustomTargetingKeyReportableTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetPrivateAuctionDealRequest. - * @implements IGetPrivateAuctionDealRequest + * @classdesc Represents a CustomTargetingKeyReportableTypeEnum. + * @implements ICustomTargetingKeyReportableTypeEnum * @constructor - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum=} [properties] Properties to set */ - function GetPrivateAuctionDealRequest(properties) { + function CustomTargetingKeyReportableTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38593,79 +38871,65 @@ } /** - * GetPrivateAuctionDealRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest - * @instance - */ - GetPrivateAuctionDealRequest.prototype.name = ""; - - /** - * Creates a new GetPrivateAuctionDealRequest instance using the specified properties. + * Creates a new CustomTargetingKeyReportableTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest instance + * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum instance */ - GetPrivateAuctionDealRequest.create = function create(properties) { - return new GetPrivateAuctionDealRequest(properties); + CustomTargetingKeyReportableTypeEnum.create = function create(properties) { + return new CustomTargetingKeyReportableTypeEnum(properties); }; /** - * Encodes the specified GetPrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified CustomTargetingKeyReportableTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPrivateAuctionDealRequest.encode = function encode(message, writer) { + CustomTargetingKeyReportableTypeEnum.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 GetPrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified CustomTargetingKeyReportableTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingKeyReportableTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPrivateAuctionDealRequest.decode = function decode(reader, length, error) { + CustomTargetingKeyReportableTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -38675,127 +38939,133 @@ }; /** - * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKeyReportableTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingKeyReportableTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPrivateAuctionDealRequest message. + * Verifies a CustomTargetingKeyReportableTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPrivateAuctionDealRequest.verify = function verify(message) { + CustomTargetingKeyReportableTypeEnum.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 GetPrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKeyReportableTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} CustomTargetingKeyReportableTypeEnum */ - GetPrivateAuctionDealRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest) + CustomTargetingKeyReportableTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum(); }; /** - * Creates a plain object from a GetPrivateAuctionDealRequest message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingKeyReportableTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static - * @param {google.ads.admanager.v1.GetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest + * @param {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum} message CustomTargetingKeyReportableTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPrivateAuctionDealRequest.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; + CustomTargetingKeyReportableTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this GetPrivateAuctionDealRequest to JSON. + * Converts this CustomTargetingKeyReportableTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @instance * @returns {Object.} JSON object */ - GetPrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + CustomTargetingKeyReportableTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPrivateAuctionDealRequest + * Gets the default type url for CustomTargetingKeyReportableTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingKeyReportableTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetPrivateAuctionDealRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum"; }; - return GetPrivateAuctionDealRequest; + /** + * CustomTargetingKeyReportableType enum. + * @name google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType + * @enum {number} + * @property {number} CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED value + * @property {number} OFF=1 OFF value + * @property {number} ON=2 ON value + * @property {number} CUSTOM_DIMENSION=3 CUSTOM_DIMENSION value + */ + CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OFF"] = 1; + values[valuesById[2] = "ON"] = 2; + values[valuesById[3] = "CUSTOM_DIMENSION"] = 3; + return values; + })(); + + return CustomTargetingKeyReportableTypeEnum; })(); - v1.ListPrivateAuctionDealsRequest = (function() { + v1.CustomTargetingKey = (function() { /** - * Properties of a ListPrivateAuctionDealsRequest. + * Properties of a CustomTargetingKey. * @memberof google.ads.admanager.v1 - * @interface IListPrivateAuctionDealsRequest - * @property {string|null} [parent] ListPrivateAuctionDealsRequest parent - * @property {number|null} [pageSize] ListPrivateAuctionDealsRequest pageSize - * @property {string|null} [pageToken] ListPrivateAuctionDealsRequest pageToken - * @property {string|null} [filter] ListPrivateAuctionDealsRequest filter - * @property {string|null} [orderBy] ListPrivateAuctionDealsRequest orderBy - * @property {number|null} [skip] ListPrivateAuctionDealsRequest skip + * @interface ICustomTargetingKey + * @property {string|null} [name] CustomTargetingKey name + * @property {number|Long|null} [customTargetingKeyId] CustomTargetingKey customTargetingKeyId + * @property {string|null} [adTagName] CustomTargetingKey adTagName + * @property {string|null} [displayName] CustomTargetingKey displayName + * @property {google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null} [type] CustomTargetingKey type + * @property {google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null} [status] CustomTargetingKey status + * @property {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null} [reportableType] CustomTargetingKey reportableType */ /** - * Constructs a new ListPrivateAuctionDealsRequest. + * Constructs a new CustomTargetingKey. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPrivateAuctionDealsRequest. - * @implements IListPrivateAuctionDealsRequest + * @classdesc Represents a CustomTargetingKey. + * @implements ICustomTargetingKey * @constructor - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingKey=} [properties] Properties to set */ - function ListPrivateAuctionDealsRequest(properties) { + function CustomTargetingKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38803,147 +39073,200 @@ } /** - * ListPrivateAuctionDealsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey name. + * @member {string} name + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.parent = ""; + CustomTargetingKey.prototype.name = ""; /** - * ListPrivateAuctionDealsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey customTargetingKeyId. + * @member {number|Long|null|undefined} customTargetingKeyId + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.pageSize = 0; + CustomTargetingKey.prototype.customTargetingKeyId = null; /** - * ListPrivateAuctionDealsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey adTagName. + * @member {string|null|undefined} adTagName + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.pageToken = ""; + CustomTargetingKey.prototype.adTagName = null; /** - * ListPrivateAuctionDealsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.filter = ""; + CustomTargetingKey.prototype.displayName = null; /** - * ListPrivateAuctionDealsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey type. + * @member {google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType|null|undefined} type + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.orderBy = ""; + CustomTargetingKey.prototype.type = null; /** - * ListPrivateAuctionDealsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * CustomTargetingKey status. + * @member {google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus|null|undefined} status + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance */ - ListPrivateAuctionDealsRequest.prototype.skip = 0; + CustomTargetingKey.prototype.status = null; /** - * Creates a new ListPrivateAuctionDealsRequest instance using the specified properties. + * CustomTargetingKey reportableType. + * @member {google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType|null|undefined} reportableType + * @memberof google.ads.admanager.v1.CustomTargetingKey + * @instance + */ + CustomTargetingKey.prototype.reportableType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_customTargetingKeyId", { + get: $util.oneOfGetter($oneOfFields = ["customTargetingKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_adTagName", { + get: $util.oneOfGetter($oneOfFields = ["adTagName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingKey.prototype, "_reportableType", { + get: $util.oneOfGetter($oneOfFields = ["reportableType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomTargetingKey instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest instance + * @param {google.ads.admanager.v1.ICustomTargetingKey=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey instance */ - ListPrivateAuctionDealsRequest.create = function create(properties) { - return new ListPrivateAuctionDealsRequest(properties); + CustomTargetingKey.create = function create(properties) { + return new CustomTargetingKey(properties); }; /** - * Encodes the specified ListPrivateAuctionDealsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * Encodes the specified CustomTargetingKey message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKey} message CustomTargetingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionDealsRequest.encode = function encode(message, writer) { + CustomTargetingKey.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.customTargetingKeyId != null && Object.hasOwnProperty.call(message, "customTargetingKeyId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.customTargetingKeyId); + if (message.adTagName != null && Object.hasOwnProperty.call(message, "adTagName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.adTagName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + if (message.reportableType != null && Object.hasOwnProperty.call(message, "reportableType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.reportableType); return writer; }; /** - * Encodes the specified ListPrivateAuctionDealsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * Encodes the specified CustomTargetingKey message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingKey.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingKey} message CustomTargetingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionDealsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer. + * Decodes a CustomTargetingKey message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionDealsRequest.decode = function decode(reader, length, error) { + CustomTargetingKey.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingKey(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.customTargetingKeyId = reader.int64(); break; } case 3: { - message.pageToken = reader.string(); + message.adTagName = reader.string(); break; } case 4: { - message.filter = reader.string(); + message.displayName = reader.string(); break; } case 5: { - message.orderBy = reader.string(); + message.type = reader.int32(); break; } case 6: { - message.skip = reader.int32(); + message.status = reader.int32(); + break; + } + case 7: { + message.reportableType = reader.int32(); break; } default: @@ -38955,275 +39278,461 @@ }; /** - * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingKey message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionDealsRequest.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPrivateAuctionDealsRequest message. + * Verifies a CustomTargetingKey message. * @function verify - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPrivateAuctionDealsRequest.verify = function verify(message) { + CustomTargetingKey.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.customTargetingKeyId != null && message.hasOwnProperty("customTargetingKeyId")) { + properties._customTargetingKeyId = 1; + if (!$util.isInteger(message.customTargetingKeyId) && !(message.customTargetingKeyId && $util.isInteger(message.customTargetingKeyId.low) && $util.isInteger(message.customTargetingKeyId.high))) + return "customTargetingKeyId: integer|Long expected"; + } + if (message.adTagName != null && message.hasOwnProperty("adTagName")) { + properties._adTagName = 1; + if (!$util.isString(message.adTagName)) + return "adTagName: string expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.reportableType != null && message.hasOwnProperty("reportableType")) { + properties._reportableType = 1; + switch (message.reportableType) { + default: + return "reportableType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } return null; }; /** - * Creates a ListPrivateAuctionDealsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingKey message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + * @returns {google.ads.admanager.v1.CustomTargetingKey} CustomTargetingKey */ - ListPrivateAuctionDealsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest) + CustomTargetingKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingKey) return object; - var message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.CustomTargetingKey(); + if (object.name != null) + message.name = String(object.name); + if (object.customTargetingKeyId != null) + if ($util.Long) + (message.customTargetingKeyId = $util.Long.fromValue(object.customTargetingKeyId)).unsigned = false; + else if (typeof object.customTargetingKeyId === "string") + message.customTargetingKeyId = parseInt(object.customTargetingKeyId, 10); + else if (typeof object.customTargetingKeyId === "number") + message.customTargetingKeyId = object.customTargetingKeyId; + else if (typeof object.customTargetingKeyId === "object") + message.customTargetingKeyId = new $util.LongBits(object.customTargetingKeyId.low >>> 0, object.customTargetingKeyId.high >>> 0).toNumber(); + if (object.adTagName != null) + message.adTagName = String(object.adTagName); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PREDEFINED": + case 1: + message.type = 1; + break; + case "FREEFORM": + case 2: + message.type = 2; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + } + switch (object.reportableType) { + default: + if (typeof object.reportableType === "number") { + message.reportableType = object.reportableType; + break; + } + break; + case "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED": + case 0: + message.reportableType = 0; + break; + case "OFF": + case 1: + message.reportableType = 1; + break; + case "ON": + case 2: + message.reportableType = 2; + break; + case "CUSTOM_DIMENSION": + case 3: + message.reportableType = 3; + break; + } return message; }; /** - * Creates a plain object from a ListPrivateAuctionDealsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingKey message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static - * @param {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest + * @param {google.ads.admanager.v1.CustomTargetingKey} message CustomTargetingKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPrivateAuctionDealsRequest.toObject = function toObject(message, options) { + CustomTargetingKey.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.skip = 0; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customTargetingKeyId != null && message.hasOwnProperty("customTargetingKeyId")) { + if (typeof message.customTargetingKeyId === "number") + object.customTargetingKeyId = options.longs === String ? String(message.customTargetingKeyId) : message.customTargetingKeyId; + else + object.customTargetingKeyId = options.longs === String ? $util.Long.prototype.toString.call(message.customTargetingKeyId) : options.longs === Number ? new $util.LongBits(message.customTargetingKeyId.low >>> 0, message.customTargetingKeyId.high >>> 0).toNumber() : message.customTargetingKeyId; + if (options.oneofs) + object._customTargetingKeyId = "customTargetingKeyId"; + } + if (message.adTagName != null && message.hasOwnProperty("adTagName")) { + object.adTagName = message.adTagName; + if (options.oneofs) + object._adTagName = "adTagName"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.reportableType != null && message.hasOwnProperty("reportableType")) { + object.reportableType = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType[message.reportableType] === undefined ? message.reportableType : $root.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType[message.reportableType] : message.reportableType; + if (options.oneofs) + object._reportableType = "reportableType"; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListPrivateAuctionDealsRequest to JSON. + * Converts this CustomTargetingKey to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @instance * @returns {Object.} JSON object */ - ListPrivateAuctionDealsRequest.prototype.toJSON = function toJSON() { + CustomTargetingKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPrivateAuctionDealsRequest + * Gets the default type url for CustomTargetingKey * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @memberof google.ads.admanager.v1.CustomTargetingKey * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPrivateAuctionDealsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionDealsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingKey"; }; - return ListPrivateAuctionDealsRequest; + return CustomTargetingKey; })(); - v1.ListPrivateAuctionDealsResponse = (function() { - - /** - * Properties of a ListPrivateAuctionDealsResponse. - * @memberof google.ads.admanager.v1 - * @interface IListPrivateAuctionDealsResponse - * @property {Array.|null} [privateAuctionDeals] ListPrivateAuctionDealsResponse privateAuctionDeals - * @property {string|null} [nextPageToken] ListPrivateAuctionDealsResponse nextPageToken - * @property {number|null} [totalSize] ListPrivateAuctionDealsResponse totalSize - */ + v1.CustomTargetingKeyService = (function() { /** - * Constructs a new ListPrivateAuctionDealsResponse. + * Constructs a new CustomTargetingKeyService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPrivateAuctionDealsResponse. - * @implements IListPrivateAuctionDealsResponse + * @classdesc Represents a CustomTargetingKeyService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse=} [properties] Properties to set + * @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 ListPrivateAuctionDealsResponse(properties) { - this.privateAuctionDeals = []; - 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]]; + function CustomTargetingKeyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * ListPrivateAuctionDealsResponse privateAuctionDeals. - * @member {Array.} privateAuctionDeals - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse - * @instance - */ - ListPrivateAuctionDealsResponse.prototype.privateAuctionDeals = $util.emptyArray; + (CustomTargetingKeyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomTargetingKeyService; /** - * ListPrivateAuctionDealsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * Creates new CustomTargetingKeyService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @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 {CustomTargetingKeyService} RPC service. Useful where requests and/or responses are streamed. + */ + CustomTargetingKeyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|getCustomTargetingKey}. + * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @typedef GetCustomTargetingKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CustomTargetingKey} [response] CustomTargetingKey + */ + + /** + * Calls GetCustomTargetingKey. + * @function getCustomTargetingKey + * @memberof google.ads.admanager.v1.CustomTargetingKeyService * @instance + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} request GetCustomTargetingKeyRequest message or plain object + * @param {google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKeyCallback} callback Node-style callback called with the error, if any, and CustomTargetingKey + * @returns {undefined} + * @variation 1 */ - ListPrivateAuctionDealsResponse.prototype.nextPageToken = ""; + Object.defineProperty(CustomTargetingKeyService.prototype.getCustomTargetingKey = function getCustomTargetingKey(request, callback) { + return this.rpcCall(getCustomTargetingKey, $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest, $root.google.ads.admanager.v1.CustomTargetingKey, request, callback); + }, "name", { value: "GetCustomTargetingKey" }); /** - * ListPrivateAuctionDealsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * Calls GetCustomTargetingKey. + * @function getCustomTargetingKey + * @memberof google.ads.admanager.v1.CustomTargetingKeyService * @instance + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} request GetCustomTargetingKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPrivateAuctionDealsResponse.prototype.totalSize = 0; /** - * Creates a new ListPrivateAuctionDealsResponse instance using the specified properties. + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingKeyService|listCustomTargetingKeys}. + * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @typedef ListCustomTargetingKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCustomTargetingKeysResponse} [response] ListCustomTargetingKeysResponse + */ + + /** + * Calls ListCustomTargetingKeys. + * @function listCustomTargetingKeys + * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @instance + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} request ListCustomTargetingKeysRequest message or plain object + * @param {google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeysCallback} callback Node-style callback called with the error, if any, and ListCustomTargetingKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CustomTargetingKeyService.prototype.listCustomTargetingKeys = function listCustomTargetingKeys(request, callback) { + return this.rpcCall(listCustomTargetingKeys, $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest, $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse, request, callback); + }, "name", { value: "ListCustomTargetingKeys" }); + + /** + * Calls ListCustomTargetingKeys. + * @function listCustomTargetingKeys + * @memberof google.ads.admanager.v1.CustomTargetingKeyService + * @instance + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} request ListCustomTargetingKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CustomTargetingKeyService; + })(); + + v1.GetCustomTargetingKeyRequest = (function() { + + /** + * Properties of a GetCustomTargetingKeyRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetCustomTargetingKeyRequest + * @property {string|null} [name] GetCustomTargetingKeyRequest name + */ + + /** + * Constructs a new GetCustomTargetingKeyRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCustomTargetingKeyRequest. + * @implements IGetCustomTargetingKeyRequest + * @constructor + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest=} [properties] Properties to set + */ + function GetCustomTargetingKeyRequest(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]]; + } + + /** + * GetCustomTargetingKeyRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest + * @instance + */ + GetCustomTargetingKeyRequest.prototype.name = ""; + + /** + * Creates a new GetCustomTargetingKeyRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse instance + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest instance */ - ListPrivateAuctionDealsResponse.create = function create(properties) { - return new ListPrivateAuctionDealsResponse(properties); + GetCustomTargetingKeyRequest.create = function create(properties) { + return new GetCustomTargetingKeyRequest(properties); }; /** - * Encodes the specified ListPrivateAuctionDealsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * Encodes the specified GetCustomTargetingKeyRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionDealsResponse.encode = function encode(message, writer) { + GetCustomTargetingKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.privateAuctionDeals != null && message.privateAuctionDeals.length) - for (var i = 0; i < message.privateAuctionDeals.length; ++i) - $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeals[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListPrivateAuctionDealsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * Encodes the specified GetCustomTargetingKeyRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionDealsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCustomTargetingKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer. + * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionDealsResponse.decode = function decode(reader, length, error) { + GetCustomTargetingKeyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.privateAuctionDeals && message.privateAuctionDeals.length)) - message.privateAuctionDeals = []; - message.privateAuctionDeals.push($root.google.ads.admanager.v1.PrivateAuctionDeal.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); + message.name = reader.string(); break; } default: @@ -39235,158 +39744,127 @@ }; /** - * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCustomTargetingKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionDealsResponse.decodeDelimited = function decodeDelimited(reader) { + GetCustomTargetingKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPrivateAuctionDealsResponse message. + * Verifies a GetCustomTargetingKeyRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPrivateAuctionDealsResponse.verify = function verify(message) { + GetCustomTargetingKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.privateAuctionDeals != null && message.hasOwnProperty("privateAuctionDeals")) { - if (!Array.isArray(message.privateAuctionDeals)) - return "privateAuctionDeals: array expected"; - for (var i = 0; i < message.privateAuctionDeals.length; ++i) { - var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeals[i]); - if (error) - return "privateAuctionDeals." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListPrivateAuctionDealsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomTargetingKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingKeyRequest} GetCustomTargetingKeyRequest */ - ListPrivateAuctionDealsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse) + GetCustomTargetingKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest) return object; - var message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse(); - if (object.privateAuctionDeals) { - if (!Array.isArray(object.privateAuctionDeals)) - throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionDealsResponse.privateAuctionDeals: array expected"); - message.privateAuctionDeals = []; - for (var i = 0; i < object.privateAuctionDeals.length; ++i) { - if (typeof object.privateAuctionDeals[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionDealsResponse.privateAuctionDeals: object expected"); - message.privateAuctionDeals[i] = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeals[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.ads.admanager.v1.GetCustomTargetingKeyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListPrivateAuctionDealsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCustomTargetingKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static - * @param {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse + * @param {google.ads.admanager.v1.GetCustomTargetingKeyRequest} message GetCustomTargetingKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPrivateAuctionDealsResponse.toObject = function toObject(message, options) { + GetCustomTargetingKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.privateAuctionDeals = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.privateAuctionDeals && message.privateAuctionDeals.length) { - object.privateAuctionDeals = []; - for (var j = 0; j < message.privateAuctionDeals.length; ++j) - object.privateAuctionDeals[j] = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeals[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListPrivateAuctionDealsResponse to JSON. + * Converts this GetCustomTargetingKeyRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @instance * @returns {Object.} JSON object */ - ListPrivateAuctionDealsResponse.prototype.toJSON = function toJSON() { + GetCustomTargetingKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPrivateAuctionDealsResponse + * Gets the default type url for GetCustomTargetingKeyRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPrivateAuctionDealsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCustomTargetingKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionDealsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomTargetingKeyRequest"; }; - return ListPrivateAuctionDealsResponse; + return GetCustomTargetingKeyRequest; })(); - v1.CreatePrivateAuctionDealRequest = (function() { + v1.ListCustomTargetingKeysRequest = (function() { /** - * Properties of a CreatePrivateAuctionDealRequest. + * Properties of a ListCustomTargetingKeysRequest. * @memberof google.ads.admanager.v1 - * @interface ICreatePrivateAuctionDealRequest - * @property {string|null} [parent] CreatePrivateAuctionDealRequest parent - * @property {google.ads.admanager.v1.IPrivateAuctionDeal|null} [privateAuctionDeal] CreatePrivateAuctionDealRequest privateAuctionDeal + * @interface IListCustomTargetingKeysRequest + * @property {string|null} [parent] ListCustomTargetingKeysRequest parent + * @property {number|null} [pageSize] ListCustomTargetingKeysRequest pageSize + * @property {string|null} [pageToken] ListCustomTargetingKeysRequest pageToken + * @property {string|null} [filter] ListCustomTargetingKeysRequest filter + * @property {string|null} [orderBy] ListCustomTargetingKeysRequest orderBy + * @property {number|null} [skip] ListCustomTargetingKeysRequest skip */ /** - * Constructs a new CreatePrivateAuctionDealRequest. + * Constructs a new ListCustomTargetingKeysRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CreatePrivateAuctionDealRequest. - * @implements ICreatePrivateAuctionDealRequest + * @classdesc Represents a ListCustomTargetingKeysRequest. + * @implements IListCustomTargetingKeysRequest * @constructor - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest=} [properties] Properties to set */ - function CreatePrivateAuctionDealRequest(properties) { + function ListCustomTargetingKeysRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39394,80 +39872,120 @@ } /** - * CreatePrivateAuctionDealRequest parent. + * ListCustomTargetingKeysRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @instance */ - CreatePrivateAuctionDealRequest.prototype.parent = ""; + ListCustomTargetingKeysRequest.prototype.parent = ""; /** - * CreatePrivateAuctionDealRequest privateAuctionDeal. - * @member {google.ads.admanager.v1.IPrivateAuctionDeal|null|undefined} privateAuctionDeal - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * ListCustomTargetingKeysRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @instance */ - CreatePrivateAuctionDealRequest.prototype.privateAuctionDeal = null; + ListCustomTargetingKeysRequest.prototype.pageSize = 0; /** - * Creates a new CreatePrivateAuctionDealRequest instance using the specified properties. + * ListCustomTargetingKeysRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @instance + */ + ListCustomTargetingKeysRequest.prototype.pageToken = ""; + + /** + * ListCustomTargetingKeysRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @instance + */ + ListCustomTargetingKeysRequest.prototype.filter = ""; + + /** + * ListCustomTargetingKeysRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @instance + */ + ListCustomTargetingKeysRequest.prototype.orderBy = ""; + + /** + * ListCustomTargetingKeysRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest + * @instance + */ + ListCustomTargetingKeysRequest.prototype.skip = 0; + + /** + * Creates a new ListCustomTargetingKeysRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest instance + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest instance */ - CreatePrivateAuctionDealRequest.create = function create(properties) { - return new CreatePrivateAuctionDealRequest(properties); + ListCustomTargetingKeysRequest.create = function create(properties) { + return new ListCustomTargetingKeysRequest(properties); }; /** - * Encodes the specified CreatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingKeysRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePrivateAuctionDealRequest.encode = function encode(message, writer) { + ListCustomTargetingKeysRequest.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.privateAuctionDeal != null && Object.hasOwnProperty.call(message, "privateAuctionDeal")) - $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeal, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified CreatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingKeysRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomTargetingKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePrivateAuctionDealRequest.decode = function decode(reader, length, error) { + ListCustomTargetingKeysRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -39478,7 +39996,23 @@ break; } case 2: { - message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -39490,137 +40024,166 @@ }; /** - * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingKeysRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + ListCustomTargetingKeysRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePrivateAuctionDealRequest message. + * Verifies a ListCustomTargetingKeysRequest message. * @function verify - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePrivateAuctionDealRequest.verify = function verify(message) { + ListCustomTargetingKeysRequest.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.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) { - var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeal); - if (error) - return "privateAuctionDeal." + error; - } + 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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a CreatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingKeysRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysRequest} ListCustomTargetingKeysRequest */ - CreatePrivateAuctionDealRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest) + ListCustomTargetingKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest) return object; - var message = new $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest(); + var message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.privateAuctionDeal != null) { - if (typeof object.privateAuctionDeal !== "object") - throw TypeError(".google.ads.admanager.v1.CreatePrivateAuctionDealRequest.privateAuctionDeal: object expected"); - message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeal); - } + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a CreatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomTargetingKeysRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static - * @param {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest + * @param {google.ads.admanager.v1.ListCustomTargetingKeysRequest} message ListCustomTargetingKeysRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePrivateAuctionDealRequest.toObject = function toObject(message, options) { + ListCustomTargetingKeysRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.privateAuctionDeal = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) - object.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeal, options); + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this CreatePrivateAuctionDealRequest to JSON. + * Converts this ListCustomTargetingKeysRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @instance * @returns {Object.} JSON object */ - CreatePrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + ListCustomTargetingKeysRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePrivateAuctionDealRequest + * Gets the default type url for ListCustomTargetingKeysRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomTargetingKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CreatePrivateAuctionDealRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingKeysRequest"; }; - return CreatePrivateAuctionDealRequest; + return ListCustomTargetingKeysRequest; })(); - v1.UpdatePrivateAuctionDealRequest = (function() { + v1.ListCustomTargetingKeysResponse = (function() { /** - * Properties of an UpdatePrivateAuctionDealRequest. + * Properties of a ListCustomTargetingKeysResponse. * @memberof google.ads.admanager.v1 - * @interface IUpdatePrivateAuctionDealRequest - * @property {google.ads.admanager.v1.IPrivateAuctionDeal|null} [privateAuctionDeal] UpdatePrivateAuctionDealRequest privateAuctionDeal - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePrivateAuctionDealRequest updateMask + * @interface IListCustomTargetingKeysResponse + * @property {Array.|null} [customTargetingKeys] ListCustomTargetingKeysResponse customTargetingKeys + * @property {string|null} [nextPageToken] ListCustomTargetingKeysResponse nextPageToken + * @property {number|null} [totalSize] ListCustomTargetingKeysResponse totalSize */ /** - * Constructs a new UpdatePrivateAuctionDealRequest. + * Constructs a new ListCustomTargetingKeysResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents an UpdatePrivateAuctionDealRequest. - * @implements IUpdatePrivateAuctionDealRequest + * @classdesc Represents a ListCustomTargetingKeysResponse. + * @implements IListCustomTargetingKeysResponse * @constructor - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse=} [properties] Properties to set */ - function UpdatePrivateAuctionDealRequest(properties) { + function ListCustomTargetingKeysResponse(properties) { + this.customTargetingKeys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39628,91 +40191,108 @@ } /** - * UpdatePrivateAuctionDealRequest privateAuctionDeal. - * @member {google.ads.admanager.v1.IPrivateAuctionDeal|null|undefined} privateAuctionDeal - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * ListCustomTargetingKeysResponse customTargetingKeys. + * @member {Array.} customTargetingKeys + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @instance */ - UpdatePrivateAuctionDealRequest.prototype.privateAuctionDeal = null; + ListCustomTargetingKeysResponse.prototype.customTargetingKeys = $util.emptyArray; /** - * UpdatePrivateAuctionDealRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * ListCustomTargetingKeysResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @instance */ - UpdatePrivateAuctionDealRequest.prototype.updateMask = null; + ListCustomTargetingKeysResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdatePrivateAuctionDealRequest instance using the specified properties. + * ListCustomTargetingKeysResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse + * @instance + */ + ListCustomTargetingKeysResponse.prototype.totalSize = 0; + + /** + * Creates a new ListCustomTargetingKeysResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest instance + * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse instance */ - UpdatePrivateAuctionDealRequest.create = function create(properties) { - return new UpdatePrivateAuctionDealRequest(properties); + ListCustomTargetingKeysResponse.create = function create(properties) { + return new ListCustomTargetingKeysResponse(properties); }; /** - * Encodes the specified UpdatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingKeysResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePrivateAuctionDealRequest.encode = function encode(message, writer) { + ListCustomTargetingKeysResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.privateAuctionDeal != null && Object.hasOwnProperty.call(message, "privateAuctionDeal")) - $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeal, 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.customTargetingKeys != null && message.customTargetingKeys.length) + for (var i = 0; i < message.customTargetingKeys.length; ++i) + $root.google.ads.admanager.v1.CustomTargetingKey.encode(message.customTargetingKeys[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified UpdatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingKeysResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingKeysResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomTargetingKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePrivateAuctionDealRequest.decode = function decode(reader, length, error) { + ListCustomTargetingKeysResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.decode(reader, reader.uint32()); + if (!(message.customTargetingKeys && message.customTargetingKeys.length)) + message.customTargetingKeys = []; + message.customTargetingKeys.push($root.google.ads.admanager.v1.CustomTargetingKey.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -39724,149 +40304,156 @@ }; /** - * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingKeysResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + ListCustomTargetingKeysResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePrivateAuctionDealRequest message. + * Verifies a ListCustomTargetingKeysResponse message. * @function verify - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePrivateAuctionDealRequest.verify = function verify(message) { + ListCustomTargetingKeysResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) { - var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeal); - if (error) - return "privateAuctionDeal." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.customTargetingKeys != null && message.hasOwnProperty("customTargetingKeys")) { + if (!Array.isArray(message.customTargetingKeys)) + return "customTargetingKeys: array expected"; + for (var i = 0; i < message.customTargetingKeys.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomTargetingKey.verify(message.customTargetingKeys[i]); + if (error) + return "customTargetingKeys." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates an UpdatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingKeysResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingKeysResponse} ListCustomTargetingKeysResponse */ - UpdatePrivateAuctionDealRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest) + ListCustomTargetingKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse) return object; - var message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest(); - if (object.privateAuctionDeal != null) { - if (typeof object.privateAuctionDeal !== "object") - throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.privateAuctionDeal: object expected"); - message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeal); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.ads.admanager.v1.ListCustomTargetingKeysResponse(); + if (object.customTargetingKeys) { + if (!Array.isArray(object.customTargetingKeys)) + throw TypeError(".google.ads.admanager.v1.ListCustomTargetingKeysResponse.customTargetingKeys: array expected"); + message.customTargetingKeys = []; + for (var i = 0; i < object.customTargetingKeys.length; ++i) { + if (typeof object.customTargetingKeys[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCustomTargetingKeysResponse.customTargetingKeys: object expected"); + message.customTargetingKeys[i] = $root.google.ads.admanager.v1.CustomTargetingKey.fromObject(object.customTargetingKeys[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from an UpdatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomTargetingKeysResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static - * @param {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest + * @param {google.ads.admanager.v1.ListCustomTargetingKeysResponse} message ListCustomTargetingKeysResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePrivateAuctionDealRequest.toObject = function toObject(message, options) { + ListCustomTargetingKeysResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.customTargetingKeys = []; if (options.defaults) { - object.privateAuctionDeal = null; - object.updateMask = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) - object.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeal, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.customTargetingKeys && message.customTargetingKeys.length) { + object.customTargetingKeys = []; + for (var j = 0; j < message.customTargetingKeys.length; ++j) + object.customTargetingKeys[j] = $root.google.ads.admanager.v1.CustomTargetingKey.toObject(message.customTargetingKeys[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this UpdatePrivateAuctionDealRequest to JSON. + * Converts this ListCustomTargetingKeysResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @instance * @returns {Object.} JSON object */ - UpdatePrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + ListCustomTargetingKeysResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePrivateAuctionDealRequest + * Gets the default type url for ListCustomTargetingKeysResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingKeysResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomTargetingKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.UpdatePrivateAuctionDealRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingKeysResponse"; }; - return UpdatePrivateAuctionDealRequest; + return ListCustomTargetingKeysResponse; })(); - v1.PrivateAuction = (function() { + v1.CustomTargetingValueStatusEnum = (function() { /** - * Properties of a PrivateAuction. + * Properties of a CustomTargetingValueStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IPrivateAuction - * @property {string|null} [name] PrivateAuction name - * @property {number|Long|null} [privateAuctionId] PrivateAuction privateAuctionId - * @property {string|null} [displayName] PrivateAuction displayName - * @property {string|null} [description] PrivateAuction description - * @property {Array.|null} [sellerContactUsers] PrivateAuction sellerContactUsers - * @property {boolean|null} [archived] PrivateAuction archived - * @property {google.protobuf.ITimestamp|null} [createTime] PrivateAuction createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateAuction updateTime + * @interface ICustomTargetingValueStatusEnum */ /** - * Constructs a new PrivateAuction. + * Constructs a new CustomTargetingValueStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a PrivateAuction. - * @implements IPrivateAuction + * @classdesc Represents a CustomTargetingValueStatusEnum. + * @implements ICustomTargetingValueStatusEnum * @constructor - * @param {google.ads.admanager.v1.IPrivateAuction=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum=} [properties] Properties to set */ - function PrivateAuction(properties) { - this.sellerContactUsers = []; + function CustomTargetingValueStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39874,219 +40461,65 @@ } /** - * PrivateAuction name. - * @member {string} name - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.name = ""; - - /** - * PrivateAuction privateAuctionId. - * @member {number|Long|null|undefined} privateAuctionId - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.privateAuctionId = null; - - /** - * PrivateAuction displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.displayName = null; - - /** - * PrivateAuction description. - * @member {string|null|undefined} description - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.description = null; - - /** - * PrivateAuction sellerContactUsers. - * @member {Array.} sellerContactUsers - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.sellerContactUsers = $util.emptyArray; - - /** - * PrivateAuction archived. - * @member {boolean|null|undefined} archived - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.archived = null; - - /** - * PrivateAuction createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.createTime = null; - - /** - * PrivateAuction updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.PrivateAuction - * @instance - */ - PrivateAuction.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_privateAuctionId", { - get: $util.oneOfGetter($oneOfFields = ["privateAuctionId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_archived", { - get: $util.oneOfGetter($oneOfFields = ["archived"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PrivateAuction.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PrivateAuction instance using the specified properties. + * Creates a new CustomTargetingValueStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuction=} [properties] Properties to set - * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction instance + * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum instance */ - PrivateAuction.create = function create(properties) { - return new PrivateAuction(properties); + CustomTargetingValueStatusEnum.create = function create(properties) { + return new CustomTargetingValueStatusEnum(properties); }; /** - * Encodes the specified PrivateAuction message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * Encodes the specified CustomTargetingValueStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuction} message PrivateAuction message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateAuction.encode = function encode(message, writer) { + CustomTargetingValueStatusEnum.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.privateAuctionId != null && Object.hasOwnProperty.call(message, "privateAuctionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.privateAuctionId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.archived); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sellerContactUsers != null && message.sellerContactUsers.length) - for (var i = 0; i < message.sellerContactUsers.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.sellerContactUsers[i]); return writer; }; /** - * Encodes the specified PrivateAuction message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * Encodes the specified CustomTargetingValueStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static - * @param {google.ads.admanager.v1.IPrivateAuction} message PrivateAuction message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateAuction.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingValueStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivateAuction message from the specified reader or buffer. + * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuction.decode = function decode(reader, length, error) { + CustomTargetingValueStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.privateAuctionId = reader.int64(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 9: { - if (!(message.sellerContactUsers && message.sellerContactUsers.length)) - message.sellerContactUsers = []; - message.sellerContactUsers.push(reader.string()); - break; - } - case 6: { - message.archived = reader.bool(); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -40096,405 +40529,124 @@ }; /** - * Decodes a PrivateAuction message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValueStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateAuction.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingValueStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivateAuction message. + * Verifies a CustomTargetingValueStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateAuction.verify = function verify(message) { + CustomTargetingValueStatusEnum.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.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { - properties._privateAuctionId = 1; - if (!$util.isInteger(message.privateAuctionId) && !(message.privateAuctionId && $util.isInteger(message.privateAuctionId.low) && $util.isInteger(message.privateAuctionId.high))) - return "privateAuctionId: integer|Long expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.sellerContactUsers != null && message.hasOwnProperty("sellerContactUsers")) { - if (!Array.isArray(message.sellerContactUsers)) - return "sellerContactUsers: array expected"; - for (var i = 0; i < message.sellerContactUsers.length; ++i) - if (!$util.isString(message.sellerContactUsers[i])) - return "sellerContactUsers: string[] expected"; - } - if (message.archived != null && message.hasOwnProperty("archived")) { - properties._archived = 1; - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } return null; }; /** - * Creates a PrivateAuction message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValueStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + * @returns {google.ads.admanager.v1.CustomTargetingValueStatusEnum} CustomTargetingValueStatusEnum */ - PrivateAuction.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.PrivateAuction) + CustomTargetingValueStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.PrivateAuction(); - if (object.name != null) - message.name = String(object.name); - if (object.privateAuctionId != null) - if ($util.Long) - (message.privateAuctionId = $util.Long.fromValue(object.privateAuctionId)).unsigned = false; - else if (typeof object.privateAuctionId === "string") - message.privateAuctionId = parseInt(object.privateAuctionId, 10); - else if (typeof object.privateAuctionId === "number") - message.privateAuctionId = object.privateAuctionId; - else if (typeof object.privateAuctionId === "object") - message.privateAuctionId = new $util.LongBits(object.privateAuctionId.low >>> 0, object.privateAuctionId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.sellerContactUsers) { - if (!Array.isArray(object.sellerContactUsers)) - throw TypeError(".google.ads.admanager.v1.PrivateAuction.sellerContactUsers: array expected"); - message.sellerContactUsers = []; - for (var i = 0; i < object.sellerContactUsers.length; ++i) - message.sellerContactUsers[i] = String(object.sellerContactUsers[i]); - } - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuction.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.PrivateAuction.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; + return new $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum(); }; /** - * Creates a plain object from a PrivateAuction message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingValueStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static - * @param {google.ads.admanager.v1.PrivateAuction} message PrivateAuction + * @param {google.ads.admanager.v1.CustomTargetingValueStatusEnum} message CustomTargetingValueStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivateAuction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sellerContactUsers = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { - if (typeof message.privateAuctionId === "number") - object.privateAuctionId = options.longs === String ? String(message.privateAuctionId) : message.privateAuctionId; - else - object.privateAuctionId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionId) : options.longs === Number ? new $util.LongBits(message.privateAuctionId.low >>> 0, message.privateAuctionId.high >>> 0).toNumber() : message.privateAuctionId; - if (options.oneofs) - object._privateAuctionId = "privateAuctionId"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.archived != null && message.hasOwnProperty("archived")) { - object.archived = message.archived; - if (options.oneofs) - object._archived = "archived"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.sellerContactUsers && message.sellerContactUsers.length) { - object.sellerContactUsers = []; - for (var j = 0; j < message.sellerContactUsers.length; ++j) - object.sellerContactUsers[j] = message.sellerContactUsers[j]; - } - return object; + CustomTargetingValueStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this PrivateAuction to JSON. + * Converts this CustomTargetingValueStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @instance * @returns {Object.} JSON object */ - PrivateAuction.prototype.toJSON = function toJSON() { + CustomTargetingValueStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivateAuction + * Gets the default type url for CustomTargetingValueStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.PrivateAuction + * @memberof google.ads.admanager.v1.CustomTargetingValueStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivateAuction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingValueStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuction"; - }; - - return PrivateAuction; - })(); - - v1.PrivateAuctionService = (function() { - - /** - * Constructs a new PrivateAuctionService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a PrivateAuctionService - * @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 PrivateAuctionService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PrivateAuctionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PrivateAuctionService; - - /** - * Creates new PrivateAuctionService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @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 {PrivateAuctionService} RPC service. Useful where requests and/or responses are streamed. - */ - PrivateAuctionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValueStatusEnum"; }; /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|getPrivateAuction}. - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @typedef GetPrivateAuctionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction - */ - - /** - * Calls GetPrivateAuction. - * @function getPrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} request GetPrivateAuctionRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionService.prototype.getPrivateAuction = function getPrivateAuction(request, callback) { - return this.rpcCall(getPrivateAuction, $root.google.ads.admanager.v1.GetPrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); - }, "name", { value: "GetPrivateAuction" }); - - /** - * Calls GetPrivateAuction. - * @function getPrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} request GetPrivateAuctionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|listPrivateAuctions}. - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @typedef ListPrivateAuctionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListPrivateAuctionsResponse} [response] ListPrivateAuctionsResponse - */ - - /** - * Calls ListPrivateAuctions. - * @function listPrivateAuctions - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} request ListPrivateAuctionsRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctionsCallback} callback Node-style callback called with the error, if any, and ListPrivateAuctionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionService.prototype.listPrivateAuctions = function listPrivateAuctions(request, callback) { - return this.rpcCall(listPrivateAuctions, $root.google.ads.admanager.v1.ListPrivateAuctionsRequest, $root.google.ads.admanager.v1.ListPrivateAuctionsResponse, request, callback); - }, "name", { value: "ListPrivateAuctions" }); - - /** - * Calls ListPrivateAuctions. - * @function listPrivateAuctions - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} request ListPrivateAuctionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|createPrivateAuction}. - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @typedef CreatePrivateAuctionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction - */ - - /** - * Calls CreatePrivateAuction. - * @function createPrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} request CreatePrivateAuctionRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionService.prototype.createPrivateAuction = function createPrivateAuction(request, callback) { - return this.rpcCall(createPrivateAuction, $root.google.ads.admanager.v1.CreatePrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); - }, "name", { value: "CreatePrivateAuction" }); - - /** - * Calls CreatePrivateAuction. - * @function createPrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} request CreatePrivateAuctionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|updatePrivateAuction}. - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @typedef UpdatePrivateAuctionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction - */ - - /** - * Calls UpdatePrivateAuction. - * @function updatePrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} request UpdatePrivateAuctionRequest message or plain object - * @param {google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PrivateAuctionService.prototype.updatePrivateAuction = function updatePrivateAuction(request, callback) { - return this.rpcCall(updatePrivateAuction, $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); - }, "name", { value: "UpdatePrivateAuction" }); - - /** - * Calls UpdatePrivateAuction. - * @function updatePrivateAuction - * @memberof google.ads.admanager.v1.PrivateAuctionService - * @instance - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} request UpdatePrivateAuctionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * CustomTargetingValueStatus enum. + * @name google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus + * @enum {number} + * @property {number} CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED=0 CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value */ + CustomTargetingValueStatusEnum.CustomTargetingValueStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); - return PrivateAuctionService; + return CustomTargetingValueStatusEnum; })(); - v1.GetPrivateAuctionRequest = (function() { + v1.CustomTargetingValueMatchTypeEnum = (function() { /** - * Properties of a GetPrivateAuctionRequest. + * Properties of a CustomTargetingValueMatchTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IGetPrivateAuctionRequest - * @property {string|null} [name] GetPrivateAuctionRequest name + * @interface ICustomTargetingValueMatchTypeEnum */ /** - * Constructs a new GetPrivateAuctionRequest. + * Constructs a new CustomTargetingValueMatchTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetPrivateAuctionRequest. - * @implements IGetPrivateAuctionRequest + * @classdesc Represents a CustomTargetingValueMatchTypeEnum. + * @implements ICustomTargetingValueMatchTypeEnum * @constructor - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum=} [properties] Properties to set */ - function GetPrivateAuctionRequest(properties) { + function CustomTargetingValueMatchTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40502,79 +40654,65 @@ } /** - * GetPrivateAuctionRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest - * @instance - */ - GetPrivateAuctionRequest.prototype.name = ""; - - /** - * Creates a new GetPrivateAuctionRequest instance using the specified properties. + * Creates a new CustomTargetingValueMatchTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest instance + * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum instance */ - GetPrivateAuctionRequest.create = function create(properties) { - return new GetPrivateAuctionRequest(properties); + CustomTargetingValueMatchTypeEnum.create = function create(properties) { + return new CustomTargetingValueMatchTypeEnum(properties); }; /** - * Encodes the specified GetPrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * Encodes the specified CustomTargetingValueMatchTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} message GetPrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPrivateAuctionRequest.encode = function encode(message, writer) { + CustomTargetingValueMatchTypeEnum.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 GetPrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * Encodes the specified CustomTargetingValueMatchTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static - * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} message GetPrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingValueMatchTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer. + * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPrivateAuctionRequest.decode = function decode(reader, length, error) { + CustomTargetingValueMatchTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPrivateAuctionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -40584,127 +40722,138 @@ }; /** - * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValueMatchTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingValueMatchTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPrivateAuctionRequest message. + * Verifies a CustomTargetingValueMatchTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPrivateAuctionRequest.verify = function verify(message) { + CustomTargetingValueMatchTypeEnum.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 GetPrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValueMatchTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + * @returns {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} CustomTargetingValueMatchTypeEnum */ - GetPrivateAuctionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetPrivateAuctionRequest) + CustomTargetingValueMatchTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.GetPrivateAuctionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum(); }; /** - * Creates a plain object from a GetPrivateAuctionRequest message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingValueMatchTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static - * @param {google.ads.admanager.v1.GetPrivateAuctionRequest} message GetPrivateAuctionRequest + * @param {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum} message CustomTargetingValueMatchTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPrivateAuctionRequest.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; + CustomTargetingValueMatchTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this GetPrivateAuctionRequest to JSON. + * Converts this CustomTargetingValueMatchTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @instance * @returns {Object.} JSON object */ - GetPrivateAuctionRequest.prototype.toJSON = function toJSON() { + CustomTargetingValueMatchTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPrivateAuctionRequest + * Gets the default type url for CustomTargetingValueMatchTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @memberof google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingValueMatchTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetPrivateAuctionRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum"; }; - return GetPrivateAuctionRequest; + /** + * CustomTargetingValueMatchType enum. + * @name google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType + * @enum {number} + * @property {number} CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED=0 CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BROAD=2 BROAD value + * @property {number} PREFIX=3 PREFIX value + * @property {number} BROAD_PREFIX=4 BROAD_PREFIX value + * @property {number} SUFFIX=5 SUFFIX value + * @property {number} CONTAINS=6 CONTAINS value + */ + CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BROAD"] = 2; + values[valuesById[3] = "PREFIX"] = 3; + values[valuesById[4] = "BROAD_PREFIX"] = 4; + values[valuesById[5] = "SUFFIX"] = 5; + values[valuesById[6] = "CONTAINS"] = 6; + return values; + })(); + + return CustomTargetingValueMatchTypeEnum; })(); - v1.ListPrivateAuctionsRequest = (function() { + v1.CustomTargetingValue = (function() { /** - * Properties of a ListPrivateAuctionsRequest. + * Properties of a CustomTargetingValue. * @memberof google.ads.admanager.v1 - * @interface IListPrivateAuctionsRequest - * @property {string|null} [parent] ListPrivateAuctionsRequest parent - * @property {number|null} [pageSize] ListPrivateAuctionsRequest pageSize - * @property {string|null} [pageToken] ListPrivateAuctionsRequest pageToken - * @property {string|null} [filter] ListPrivateAuctionsRequest filter - * @property {string|null} [orderBy] ListPrivateAuctionsRequest orderBy - * @property {number|null} [skip] ListPrivateAuctionsRequest skip + * @interface ICustomTargetingValue + * @property {string|null} [name] CustomTargetingValue name + * @property {string|null} [customTargetingKey] CustomTargetingValue customTargetingKey + * @property {string|null} [adTagName] CustomTargetingValue adTagName + * @property {string|null} [displayName] CustomTargetingValue displayName + * @property {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null} [matchType] CustomTargetingValue matchType + * @property {google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null} [status] CustomTargetingValue status */ /** - * Constructs a new ListPrivateAuctionsRequest. + * Constructs a new CustomTargetingValue. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPrivateAuctionsRequest. - * @implements IListPrivateAuctionsRequest + * @classdesc Represents a CustomTargetingValue. + * @implements ICustomTargetingValue * @constructor - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICustomTargetingValue=} [properties] Properties to set */ - function ListPrivateAuctionsRequest(properties) { + function CustomTargetingValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40712,147 +40861,180 @@ } /** - * ListPrivateAuctionsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue name. + * @member {string} name + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.parent = ""; + CustomTargetingValue.prototype.name = ""; /** - * ListPrivateAuctionsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue customTargetingKey. + * @member {string|null|undefined} customTargetingKey + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.pageSize = 0; + CustomTargetingValue.prototype.customTargetingKey = null; /** - * ListPrivateAuctionsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue adTagName. + * @member {string|null|undefined} adTagName + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.pageToken = ""; + CustomTargetingValue.prototype.adTagName = null; /** - * ListPrivateAuctionsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.filter = ""; + CustomTargetingValue.prototype.displayName = null; /** - * ListPrivateAuctionsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue matchType. + * @member {google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType|null|undefined} matchType + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.orderBy = ""; + CustomTargetingValue.prototype.matchType = null; /** - * ListPrivateAuctionsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * CustomTargetingValue status. + * @member {google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus|null|undefined} status + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance */ - ListPrivateAuctionsRequest.prototype.skip = 0; + CustomTargetingValue.prototype.status = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingValue.prototype, "_customTargetingKey", { + get: $util.oneOfGetter($oneOfFields = ["customTargetingKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingValue.prototype, "_adTagName", { + get: $util.oneOfGetter($oneOfFields = ["adTagName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingValue.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingValue.prototype, "_matchType", { + get: $util.oneOfGetter($oneOfFields = ["matchType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingValue.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListPrivateAuctionsRequest instance using the specified properties. + * Creates a new CustomTargetingValue instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest instance + * @param {google.ads.admanager.v1.ICustomTargetingValue=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue instance */ - ListPrivateAuctionsRequest.create = function create(properties) { - return new ListPrivateAuctionsRequest(properties); + CustomTargetingValue.create = function create(properties) { + return new CustomTargetingValue(properties); }; /** - * Encodes the specified ListPrivateAuctionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * Encodes the specified CustomTargetingValue message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} message ListPrivateAuctionsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValue} message CustomTargetingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionsRequest.encode = function encode(message, writer) { + CustomTargetingValue.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.adTagName != null && Object.hasOwnProperty.call(message, "adTagName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.adTagName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.matchType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.status); + if (message.customTargetingKey != null && Object.hasOwnProperty.call(message, "customTargetingKey")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.customTargetingKey); return writer; }; /** - * Encodes the specified ListPrivateAuctionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * Encodes the specified CustomTargetingValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} message ListPrivateAuctionsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ICustomTargetingValue} message CustomTargetingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CustomTargetingValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer. + * Decodes a CustomTargetingValue message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionsRequest.decode = function decode(reader, length, error) { + CustomTargetingValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); + message.name = reader.string(); break; } - case 3: { - message.pageToken = reader.string(); + case 8: { + message.customTargetingKey = reader.string(); break; } case 4: { - message.filter = reader.string(); + message.adTagName = reader.string(); break; } case 5: { - message.orderBy = reader.string(); + message.displayName = reader.string(); break; } case 6: { - message.skip = reader.int32(); + message.matchType = reader.int32(); + break; + } + case 7: { + message.status = reader.int32(); break; } default: @@ -40864,275 +41046,430 @@ }; /** - * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer, length delimited. + * Decodes a CustomTargetingValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionsRequest.decodeDelimited = function decodeDelimited(reader) { + CustomTargetingValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPrivateAuctionsRequest message. + * Verifies a CustomTargetingValue message. * @function verify - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPrivateAuctionsRequest.verify = function verify(message) { + CustomTargetingValue.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { + properties._customTargetingKey = 1; + if (!$util.isString(message.customTargetingKey)) + return "customTargetingKey: string expected"; + } + if (message.adTagName != null && message.hasOwnProperty("adTagName")) { + properties._adTagName = 1; + if (!$util.isString(message.adTagName)) + return "adTagName: string expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) { + properties._matchType = 1; + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } return null; }; /** - * Creates a ListPrivateAuctionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CustomTargetingValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + * @returns {google.ads.admanager.v1.CustomTargetingValue} CustomTargetingValue */ - ListPrivateAuctionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionsRequest) + CustomTargetingValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingValue) return object; - var message = new $root.google.ads.admanager.v1.ListPrivateAuctionsRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.CustomTargetingValue(); + if (object.name != null) + message.name = String(object.name); + if (object.customTargetingKey != null) + message.customTargetingKey = String(object.customTargetingKey); + if (object.adTagName != null) + message.adTagName = String(object.adTagName); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BROAD": + case 2: + message.matchType = 2; + break; + case "PREFIX": + case 3: + message.matchType = 3; + break; + case "BROAD_PREFIX": + case 4: + message.matchType = 4; + break; + case "SUFFIX": + case 5: + message.matchType = 5; + break; + case "CONTAINS": + case 6: + message.matchType = 6; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + } return message; }; /** - * Creates a plain object from a ListPrivateAuctionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CustomTargetingValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static - * @param {google.ads.admanager.v1.ListPrivateAuctionsRequest} message ListPrivateAuctionsRequest + * @param {google.ads.admanager.v1.CustomTargetingValue} message CustomTargetingValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPrivateAuctionsRequest.toObject = function toObject(message, options) { + CustomTargetingValue.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.skip = 0; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adTagName != null && message.hasOwnProperty("adTagName")) { + object.adTagName = message.adTagName; + if (options.oneofs) + object._adTagName = "adTagName"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) { + object.matchType = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType[message.matchType] === undefined ? message.matchType : $root.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType[message.matchType] : message.matchType; + if (options.oneofs) + object._matchType = "matchType"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { + object.customTargetingKey = message.customTargetingKey; + if (options.oneofs) + object._customTargetingKey = "customTargetingKey"; } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListPrivateAuctionsRequest to JSON. + * Converts this CustomTargetingValue to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @instance * @returns {Object.} JSON object */ - ListPrivateAuctionsRequest.prototype.toJSON = function toJSON() { + CustomTargetingValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPrivateAuctionsRequest + * Gets the default type url for CustomTargetingValue * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @memberof google.ads.admanager.v1.CustomTargetingValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPrivateAuctionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomTargetingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingValue"; }; - return ListPrivateAuctionsRequest; + return CustomTargetingValue; })(); - v1.ListPrivateAuctionsResponse = (function() { + v1.CustomTargetingValueService = (function() { /** - * Properties of a ListPrivateAuctionsResponse. + * Constructs a new CustomTargetingValueService service. * @memberof google.ads.admanager.v1 - * @interface IListPrivateAuctionsResponse - * @property {Array.|null} [privateAuctions] ListPrivateAuctionsResponse privateAuctions - * @property {string|null} [nextPageToken] ListPrivateAuctionsResponse nextPageToken - * @property {number|null} [totalSize] ListPrivateAuctionsResponse totalSize + * @classdesc Represents a CustomTargetingValueService + * @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 CustomTargetingValueService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CustomTargetingValueService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CustomTargetingValueService; /** - * Constructs a new ListPrivateAuctionsResponse. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListPrivateAuctionsResponse. - * @implements IListPrivateAuctionsResponse - * @constructor - * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse=} [properties] Properties to set + * Creates new CustomTargetingValueService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.CustomTargetingValueService + * @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 {CustomTargetingValueService} RPC service. Useful where requests and/or responses are streamed. */ - function ListPrivateAuctionsResponse(properties) { - this.privateAuctions = []; - 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]]; - } + CustomTargetingValueService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListPrivateAuctionsResponse privateAuctions. - * @member {Array.} privateAuctions - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|getCustomTargetingValue}. + * @memberof google.ads.admanager.v1.CustomTargetingValueService + * @typedef GetCustomTargetingValueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.CustomTargetingValue} [response] CustomTargetingValue + */ + + /** + * Calls GetCustomTargetingValue. + * @function getCustomTargetingValue + * @memberof google.ads.admanager.v1.CustomTargetingValueService * @instance + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} request GetCustomTargetingValueRequest message or plain object + * @param {google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValueCallback} callback Node-style callback called with the error, if any, and CustomTargetingValue + * @returns {undefined} + * @variation 1 */ - ListPrivateAuctionsResponse.prototype.privateAuctions = $util.emptyArray; + Object.defineProperty(CustomTargetingValueService.prototype.getCustomTargetingValue = function getCustomTargetingValue(request, callback) { + return this.rpcCall(getCustomTargetingValue, $root.google.ads.admanager.v1.GetCustomTargetingValueRequest, $root.google.ads.admanager.v1.CustomTargetingValue, request, callback); + }, "name", { value: "GetCustomTargetingValue" }); /** - * ListPrivateAuctionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * Calls GetCustomTargetingValue. + * @function getCustomTargetingValue + * @memberof google.ads.admanager.v1.CustomTargetingValueService * @instance + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} request GetCustomTargetingValueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPrivateAuctionsResponse.prototype.nextPageToken = ""; /** - * ListPrivateAuctionsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * Callback as used by {@link google.ads.admanager.v1.CustomTargetingValueService|listCustomTargetingValues}. + * @memberof google.ads.admanager.v1.CustomTargetingValueService + * @typedef ListCustomTargetingValuesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListCustomTargetingValuesResponse} [response] ListCustomTargetingValuesResponse + */ + + /** + * Calls ListCustomTargetingValues. + * @function listCustomTargetingValues + * @memberof google.ads.admanager.v1.CustomTargetingValueService * @instance + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} request ListCustomTargetingValuesRequest message or plain object + * @param {google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValuesCallback} callback Node-style callback called with the error, if any, and ListCustomTargetingValuesResponse + * @returns {undefined} + * @variation 1 */ - ListPrivateAuctionsResponse.prototype.totalSize = 0; + Object.defineProperty(CustomTargetingValueService.prototype.listCustomTargetingValues = function listCustomTargetingValues(request, callback) { + return this.rpcCall(listCustomTargetingValues, $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest, $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse, request, callback); + }, "name", { value: "ListCustomTargetingValues" }); /** - * Creates a new ListPrivateAuctionsResponse instance using the specified properties. + * Calls ListCustomTargetingValues. + * @function listCustomTargetingValues + * @memberof google.ads.admanager.v1.CustomTargetingValueService + * @instance + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} request ListCustomTargetingValuesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CustomTargetingValueService; + })(); + + v1.GetCustomTargetingValueRequest = (function() { + + /** + * Properties of a GetCustomTargetingValueRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetCustomTargetingValueRequest + * @property {string|null} [name] GetCustomTargetingValueRequest name + */ + + /** + * Constructs a new GetCustomTargetingValueRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetCustomTargetingValueRequest. + * @implements IGetCustomTargetingValueRequest + * @constructor + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest=} [properties] Properties to set + */ + function GetCustomTargetingValueRequest(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]]; + } + + /** + * GetCustomTargetingValueRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest + * @instance + */ + GetCustomTargetingValueRequest.prototype.name = ""; + + /** + * Creates a new GetCustomTargetingValueRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse instance + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest instance */ - ListPrivateAuctionsResponse.create = function create(properties) { - return new ListPrivateAuctionsResponse(properties); + GetCustomTargetingValueRequest.create = function create(properties) { + return new GetCustomTargetingValueRequest(properties); }; /** - * Encodes the specified ListPrivateAuctionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * Encodes the specified GetCustomTargetingValueRequest message. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse} message ListPrivateAuctionsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} message GetCustomTargetingValueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionsResponse.encode = function encode(message, writer) { + GetCustomTargetingValueRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.privateAuctions != null && message.privateAuctions.length) - for (var i = 0; i < message.privateAuctions.length; ++i) - $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuctions[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListPrivateAuctionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * Encodes the specified GetCustomTargetingValueRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetCustomTargetingValueRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static - * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse} message ListPrivateAuctionsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IGetCustomTargetingValueRequest} message GetCustomTargetingValueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPrivateAuctionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetCustomTargetingValueRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer. + * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionsResponse.decode = function decode(reader, length, error) { + GetCustomTargetingValueRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetCustomTargetingValueRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.privateAuctions && message.privateAuctions.length)) - message.privateAuctions = []; - message.privateAuctions.push($root.google.ads.admanager.v1.PrivateAuction.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); + message.name = reader.string(); break; } default: @@ -41144,158 +41481,127 @@ }; /** - * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetCustomTargetingValueRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPrivateAuctionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetCustomTargetingValueRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPrivateAuctionsResponse message. + * Verifies a GetCustomTargetingValueRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPrivateAuctionsResponse.verify = function verify(message) { + GetCustomTargetingValueRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.privateAuctions != null && message.hasOwnProperty("privateAuctions")) { - if (!Array.isArray(message.privateAuctions)) - return "privateAuctions: array expected"; - for (var i = 0; i < message.privateAuctions.length; ++i) { - var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuctions[i]); - if (error) - return "privateAuctions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListPrivateAuctionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetCustomTargetingValueRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + * @returns {google.ads.admanager.v1.GetCustomTargetingValueRequest} GetCustomTargetingValueRequest */ - ListPrivateAuctionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionsResponse) + GetCustomTargetingValueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetCustomTargetingValueRequest) return object; - var message = new $root.google.ads.admanager.v1.ListPrivateAuctionsResponse(); - if (object.privateAuctions) { - if (!Array.isArray(object.privateAuctions)) - throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionsResponse.privateAuctions: array expected"); - message.privateAuctions = []; - for (var i = 0; i < object.privateAuctions.length; ++i) { - if (typeof object.privateAuctions[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionsResponse.privateAuctions: object expected"); - message.privateAuctions[i] = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuctions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.ads.admanager.v1.GetCustomTargetingValueRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListPrivateAuctionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetCustomTargetingValueRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static - * @param {google.ads.admanager.v1.ListPrivateAuctionsResponse} message ListPrivateAuctionsResponse + * @param {google.ads.admanager.v1.GetCustomTargetingValueRequest} message GetCustomTargetingValueRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPrivateAuctionsResponse.toObject = function toObject(message, options) { + GetCustomTargetingValueRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.privateAuctions = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.privateAuctions && message.privateAuctions.length) { - object.privateAuctions = []; - for (var j = 0; j < message.privateAuctions.length; ++j) - object.privateAuctions[j] = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuctions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListPrivateAuctionsResponse to JSON. + * Converts this GetCustomTargetingValueRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @instance * @returns {Object.} JSON object */ - ListPrivateAuctionsResponse.prototype.toJSON = function toJSON() { + GetCustomTargetingValueRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPrivateAuctionsResponse + * Gets the default type url for GetCustomTargetingValueRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @memberof google.ads.admanager.v1.GetCustomTargetingValueRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPrivateAuctionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCustomTargetingValueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetCustomTargetingValueRequest"; }; - return ListPrivateAuctionsResponse; + return GetCustomTargetingValueRequest; })(); - v1.CreatePrivateAuctionRequest = (function() { + v1.ListCustomTargetingValuesRequest = (function() { /** - * Properties of a CreatePrivateAuctionRequest. + * Properties of a ListCustomTargetingValuesRequest. * @memberof google.ads.admanager.v1 - * @interface ICreatePrivateAuctionRequest - * @property {string|null} [parent] CreatePrivateAuctionRequest parent - * @property {google.ads.admanager.v1.IPrivateAuction|null} [privateAuction] CreatePrivateAuctionRequest privateAuction + * @interface IListCustomTargetingValuesRequest + * @property {string|null} [parent] ListCustomTargetingValuesRequest parent + * @property {number|null} [pageSize] ListCustomTargetingValuesRequest pageSize + * @property {string|null} [pageToken] ListCustomTargetingValuesRequest pageToken + * @property {string|null} [filter] ListCustomTargetingValuesRequest filter + * @property {string|null} [orderBy] ListCustomTargetingValuesRequest orderBy + * @property {number|null} [skip] ListCustomTargetingValuesRequest skip */ /** - * Constructs a new CreatePrivateAuctionRequest. + * Constructs a new ListCustomTargetingValuesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CreatePrivateAuctionRequest. - * @implements ICreatePrivateAuctionRequest + * @classdesc Represents a ListCustomTargetingValuesRequest. + * @implements IListCustomTargetingValuesRequest * @constructor - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest=} [properties] Properties to set */ - function CreatePrivateAuctionRequest(properties) { + function ListCustomTargetingValuesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41303,80 +41609,120 @@ } /** - * CreatePrivateAuctionRequest parent. + * ListCustomTargetingValuesRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @instance */ - CreatePrivateAuctionRequest.prototype.parent = ""; + ListCustomTargetingValuesRequest.prototype.parent = ""; /** - * CreatePrivateAuctionRequest privateAuction. - * @member {google.ads.admanager.v1.IPrivateAuction|null|undefined} privateAuction - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * ListCustomTargetingValuesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @instance */ - CreatePrivateAuctionRequest.prototype.privateAuction = null; + ListCustomTargetingValuesRequest.prototype.pageSize = 0; /** - * Creates a new CreatePrivateAuctionRequest instance using the specified properties. + * ListCustomTargetingValuesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @instance + */ + ListCustomTargetingValuesRequest.prototype.pageToken = ""; + + /** + * ListCustomTargetingValuesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @instance + */ + ListCustomTargetingValuesRequest.prototype.filter = ""; + + /** + * ListCustomTargetingValuesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @instance + */ + ListCustomTargetingValuesRequest.prototype.orderBy = ""; + + /** + * ListCustomTargetingValuesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest + * @instance + */ + ListCustomTargetingValuesRequest.prototype.skip = 0; + + /** + * Creates a new ListCustomTargetingValuesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest instance + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest instance */ - CreatePrivateAuctionRequest.create = function create(properties) { - return new CreatePrivateAuctionRequest(properties); + ListCustomTargetingValuesRequest.create = function create(properties) { + return new ListCustomTargetingValuesRequest(properties); }; /** - * Encodes the specified CreatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingValuesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} message CreatePrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePrivateAuctionRequest.encode = function encode(message, writer) { + ListCustomTargetingValuesRequest.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.privateAuction != null && Object.hasOwnProperty.call(message, "privateAuction")) - $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified CreatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingValuesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static - * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} message CreatePrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomTargetingValuesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePrivateAuctionRequest.decode = function decode(reader, length, error) { + ListCustomTargetingValuesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreatePrivateAuctionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -41387,7 +41733,23 @@ break; } case 2: { - message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -41399,137 +41761,166 @@ }; /** - * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingValuesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + ListCustomTargetingValuesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePrivateAuctionRequest message. + * Verifies a ListCustomTargetingValuesRequest message. * @function verify - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePrivateAuctionRequest.verify = function verify(message) { + ListCustomTargetingValuesRequest.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.privateAuction != null && message.hasOwnProperty("privateAuction")) { - var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuction); - if (error) - return "privateAuction." + error; - } + 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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a CreatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCustomTargetingValuesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesRequest} ListCustomTargetingValuesRequest */ - CreatePrivateAuctionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CreatePrivateAuctionRequest) + ListCustomTargetingValuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest) return object; - var message = new $root.google.ads.admanager.v1.CreatePrivateAuctionRequest(); + var message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.privateAuction != null) { - if (typeof object.privateAuction !== "object") - throw TypeError(".google.ads.admanager.v1.CreatePrivateAuctionRequest.privateAuction: object expected"); - message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuction); - } + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a CreatePrivateAuctionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomTargetingValuesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static - * @param {google.ads.admanager.v1.CreatePrivateAuctionRequest} message CreatePrivateAuctionRequest + * @param {google.ads.admanager.v1.ListCustomTargetingValuesRequest} message ListCustomTargetingValuesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePrivateAuctionRequest.toObject = function toObject(message, options) { + ListCustomTargetingValuesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.privateAuction = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) - object.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuction, options); + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this CreatePrivateAuctionRequest to JSON. + * Converts this ListCustomTargetingValuesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @instance * @returns {Object.} JSON object */ - CreatePrivateAuctionRequest.prototype.toJSON = function toJSON() { + ListCustomTargetingValuesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePrivateAuctionRequest + * Gets the default type url for ListCustomTargetingValuesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomTargetingValuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CreatePrivateAuctionRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingValuesRequest"; }; - return CreatePrivateAuctionRequest; + return ListCustomTargetingValuesRequest; })(); - v1.UpdatePrivateAuctionRequest = (function() { + v1.ListCustomTargetingValuesResponse = (function() { /** - * Properties of an UpdatePrivateAuctionRequest. + * Properties of a ListCustomTargetingValuesResponse. * @memberof google.ads.admanager.v1 - * @interface IUpdatePrivateAuctionRequest - * @property {google.ads.admanager.v1.IPrivateAuction|null} [privateAuction] UpdatePrivateAuctionRequest privateAuction - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePrivateAuctionRequest updateMask + * @interface IListCustomTargetingValuesResponse + * @property {Array.|null} [customTargetingValues] ListCustomTargetingValuesResponse customTargetingValues + * @property {string|null} [nextPageToken] ListCustomTargetingValuesResponse nextPageToken + * @property {number|null} [totalSize] ListCustomTargetingValuesResponse totalSize */ /** - * Constructs a new UpdatePrivateAuctionRequest. + * Constructs a new ListCustomTargetingValuesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents an UpdatePrivateAuctionRequest. - * @implements IUpdatePrivateAuctionRequest + * @classdesc Represents a ListCustomTargetingValuesResponse. + * @implements IListCustomTargetingValuesResponse * @constructor - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse=} [properties] Properties to set */ - function UpdatePrivateAuctionRequest(properties) { + function ListCustomTargetingValuesResponse(properties) { + this.customTargetingValues = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41537,91 +41928,108 @@ } /** - * UpdatePrivateAuctionRequest privateAuction. - * @member {google.ads.admanager.v1.IPrivateAuction|null|undefined} privateAuction - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * ListCustomTargetingValuesResponse customTargetingValues. + * @member {Array.} customTargetingValues + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @instance */ - UpdatePrivateAuctionRequest.prototype.privateAuction = null; + ListCustomTargetingValuesResponse.prototype.customTargetingValues = $util.emptyArray; /** - * UpdatePrivateAuctionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * ListCustomTargetingValuesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @instance */ - UpdatePrivateAuctionRequest.prototype.updateMask = null; + ListCustomTargetingValuesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdatePrivateAuctionRequest instance using the specified properties. + * ListCustomTargetingValuesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse + * @instance + */ + ListCustomTargetingValuesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListCustomTargetingValuesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest instance + * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse instance */ - UpdatePrivateAuctionRequest.create = function create(properties) { - return new UpdatePrivateAuctionRequest(properties); + ListCustomTargetingValuesResponse.create = function create(properties) { + return new ListCustomTargetingValuesResponse(properties); }; /** - * Encodes the specified UpdatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingValuesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePrivateAuctionRequest.encode = function encode(message, writer) { + ListCustomTargetingValuesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.privateAuction != null && Object.hasOwnProperty.call(message, "privateAuction")) - $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuction, 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.customTargetingValues != null && message.customTargetingValues.length) + for (var i = 0; i < message.customTargetingValues.length; ++i) + $root.google.ads.admanager.v1.CustomTargetingValue.encode(message.customTargetingValues[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified UpdatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * Encodes the specified ListCustomTargetingValuesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListCustomTargetingValuesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static - * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCustomTargetingValuesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer. + * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePrivateAuctionRequest.decode = function decode(reader, length, error) { + ListCustomTargetingValuesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.decode(reader, reader.uint32()); + if (!(message.customTargetingValues && message.customTargetingValues.length)) + message.customTargetingValues = []; + message.customTargetingValues.push($root.google.ads.admanager.v1.CustomTargetingValue.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -41633,148 +42041,156 @@ }; /** - * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCustomTargetingValuesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + ListCustomTargetingValuesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePrivateAuctionRequest message. + * Verifies a ListCustomTargetingValuesResponse message. * @function verify - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePrivateAuctionRequest.verify = function verify(message) { + ListCustomTargetingValuesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) { - var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuction); - if (error) - return "privateAuction." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.customTargetingValues != null && message.hasOwnProperty("customTargetingValues")) { + if (!Array.isArray(message.customTargetingValues)) + return "customTargetingValues: array expected"; + for (var i = 0; i < message.customTargetingValues.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomTargetingValue.verify(message.customTargetingValues[i]); + if (error) + return "customTargetingValues." + error; + } } - return null; - }; - - /** - * Creates an UpdatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListCustomTargetingValuesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + * @returns {google.ads.admanager.v1.ListCustomTargetingValuesResponse} ListCustomTargetingValuesResponse */ - UpdatePrivateAuctionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest) + ListCustomTargetingValuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse) return object; - var message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest(); - if (object.privateAuction != null) { - if (typeof object.privateAuction !== "object") - throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionRequest.privateAuction: object expected"); - message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuction); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.ads.admanager.v1.ListCustomTargetingValuesResponse(); + if (object.customTargetingValues) { + if (!Array.isArray(object.customTargetingValues)) + throw TypeError(".google.ads.admanager.v1.ListCustomTargetingValuesResponse.customTargetingValues: array expected"); + message.customTargetingValues = []; + for (var i = 0; i < object.customTargetingValues.length; ++i) { + if (typeof object.customTargetingValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListCustomTargetingValuesResponse.customTargetingValues: object expected"); + message.customTargetingValues[i] = $root.google.ads.admanager.v1.CustomTargetingValue.fromObject(object.customTargetingValues[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from an UpdatePrivateAuctionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCustomTargetingValuesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static - * @param {google.ads.admanager.v1.UpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest + * @param {google.ads.admanager.v1.ListCustomTargetingValuesResponse} message ListCustomTargetingValuesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePrivateAuctionRequest.toObject = function toObject(message, options) { + ListCustomTargetingValuesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.customTargetingValues = []; if (options.defaults) { - object.privateAuction = null; - object.updateMask = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) - object.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuction, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.customTargetingValues && message.customTargetingValues.length) { + object.customTargetingValues = []; + for (var j = 0; j < message.customTargetingValues.length; ++j) + object.customTargetingValues[j] = $root.google.ads.admanager.v1.CustomTargetingValue.toObject(message.customTargetingValues[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this UpdatePrivateAuctionRequest to JSON. + * Converts this ListCustomTargetingValuesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @instance * @returns {Object.} JSON object */ - UpdatePrivateAuctionRequest.prototype.toJSON = function toJSON() { + ListCustomTargetingValuesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePrivateAuctionRequest + * Gets the default type url for ListCustomTargetingValuesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @memberof google.ads.admanager.v1.ListCustomTargetingValuesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCustomTargetingValuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.UpdatePrivateAuctionRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListCustomTargetingValuesResponse"; }; - return UpdatePrivateAuctionRequest; + return ListCustomTargetingValuesResponse; })(); - v1.ProgrammaticBuyer = (function() { + v1.DealBuyerPermissionTypeEnum = (function() { /** - * Properties of a ProgrammaticBuyer. + * Properties of a DealBuyerPermissionTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IProgrammaticBuyer - * @property {string|null} [name] ProgrammaticBuyer name - * @property {number|Long|null} [buyerAccountId] ProgrammaticBuyer buyerAccountId - * @property {string|null} [displayName] ProgrammaticBuyer displayName - * @property {number|Long|null} [parentAccountId] ProgrammaticBuyer parentAccountId - * @property {string|null} [partnerClientId] ProgrammaticBuyer partnerClientId - * @property {boolean|null} [agency] ProgrammaticBuyer agency - * @property {boolean|null} [preferredDealsEnabled] ProgrammaticBuyer preferredDealsEnabled - * @property {boolean|null} [programmaticGuaranteedEnabled] ProgrammaticBuyer programmaticGuaranteedEnabled + * @interface IDealBuyerPermissionTypeEnum */ /** - * Constructs a new ProgrammaticBuyer. + * Constructs a new DealBuyerPermissionTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ProgrammaticBuyer. - * @implements IProgrammaticBuyer + * @classdesc Represents a DealBuyerPermissionTypeEnum. + * @implements IDealBuyerPermissionTypeEnum * @constructor - * @param {google.ads.admanager.v1.IProgrammaticBuyer=} [properties] Properties to set + * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum=} [properties] Properties to set */ - function ProgrammaticBuyer(properties) { + function DealBuyerPermissionTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41782,185 +42198,284 @@ } /** - * ProgrammaticBuyer name. - * @member {string} name - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Creates a new DealBuyerPermissionTypeEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum instance */ - ProgrammaticBuyer.prototype.name = ""; + DealBuyerPermissionTypeEnum.create = function create(properties) { + return new DealBuyerPermissionTypeEnum(properties); + }; /** - * ProgrammaticBuyer buyerAccountId. - * @member {number|Long|null|undefined} buyerAccountId - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Encodes the specified DealBuyerPermissionTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ProgrammaticBuyer.prototype.buyerAccountId = null; + DealBuyerPermissionTypeEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * ProgrammaticBuyer displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Encodes the specified DealBuyerPermissionTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DealBuyerPermissionTypeEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {google.ads.admanager.v1.IDealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ProgrammaticBuyer.prototype.displayName = null; + DealBuyerPermissionTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ProgrammaticBuyer parentAccountId. - * @member {number|Long|null|undefined} parentAccountId - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ProgrammaticBuyer.prototype.parentAccountId = null; + DealBuyerPermissionTypeEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ProgrammaticBuyer partnerClientId. - * @member {string|null|undefined} partnerClientId - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Decodes a DealBuyerPermissionTypeEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ProgrammaticBuyer.prototype.partnerClientId = null; + DealBuyerPermissionTypeEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ProgrammaticBuyer agency. - * @member {boolean|null|undefined} agency - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Verifies a DealBuyerPermissionTypeEnum message. + * @function verify + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ProgrammaticBuyer.prototype.agency = null; + DealBuyerPermissionTypeEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * ProgrammaticBuyer preferredDealsEnabled. - * @member {boolean|null|undefined} preferredDealsEnabled - * @memberof google.ads.admanager.v1.ProgrammaticBuyer - * @instance + * Creates a DealBuyerPermissionTypeEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} DealBuyerPermissionTypeEnum */ - ProgrammaticBuyer.prototype.preferredDealsEnabled = null; + DealBuyerPermissionTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum) + return object; + return new $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum(); + }; /** - * ProgrammaticBuyer programmaticGuaranteedEnabled. - * @member {boolean|null|undefined} programmaticGuaranteedEnabled - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * Creates a plain object from a DealBuyerPermissionTypeEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {google.ads.admanager.v1.DealBuyerPermissionTypeEnum} message DealBuyerPermissionTypeEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DealBuyerPermissionTypeEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DealBuyerPermissionTypeEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum * @instance + * @returns {Object.} JSON object */ - ProgrammaticBuyer.prototype.programmaticGuaranteedEnabled = null; + DealBuyerPermissionTypeEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for DealBuyerPermissionTypeEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DealBuyerPermissionTypeEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DealBuyerPermissionTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DealBuyerPermissionTypeEnum"; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_buyerAccountId", { - get: $util.oneOfGetter($oneOfFields = ["buyerAccountId"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DealBuyerPermissionType enum. + * @name google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType + * @enum {number} + * @property {number} DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED=0 DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED value + * @property {number} NEGOTIATOR_ONLY=1 NEGOTIATOR_ONLY value + * @property {number} BIDDER=2 BIDDER value + */ + DealBuyerPermissionTypeEnum.DealBuyerPermissionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEGOTIATOR_ONLY"] = 1; + values[valuesById[2] = "BIDDER"] = 2; + return values; + })(); - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); + return DealBuyerPermissionTypeEnum; + })(); - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_parentAccountId", { - get: $util.oneOfGetter($oneOfFields = ["parentAccountId"]), - set: $util.oneOfSetter($oneOfFields) - }); + v1.DeviceCapability = (function() { - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_partnerClientId", { - get: $util.oneOfGetter($oneOfFields = ["partnerClientId"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a DeviceCapability. + * @memberof google.ads.admanager.v1 + * @interface IDeviceCapability + * @property {string|null} [name] DeviceCapability name + * @property {string|null} [displayName] DeviceCapability displayName + */ - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_agency", { - get: $util.oneOfGetter($oneOfFields = ["agency"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new DeviceCapability. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceCapability. + * @implements IDeviceCapability + * @constructor + * @param {google.ads.admanager.v1.IDeviceCapability=} [properties] Properties to set + */ + function DeviceCapability(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]]; + } - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_preferredDealsEnabled", { - get: $util.oneOfGetter($oneOfFields = ["preferredDealsEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DeviceCapability name. + * @member {string} name + * @memberof google.ads.admanager.v1.DeviceCapability + * @instance + */ + DeviceCapability.prototype.name = ""; + + /** + * DeviceCapability displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.DeviceCapability + * @instance + */ + DeviceCapability.prototype.displayName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; // Virtual OneOf for proto3 optional field - Object.defineProperty(ProgrammaticBuyer.prototype, "_programmaticGuaranteedEnabled", { - get: $util.oneOfGetter($oneOfFields = ["programmaticGuaranteedEnabled"]), + Object.defineProperty(DeviceCapability.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ProgrammaticBuyer instance using the specified properties. + * Creates a new DeviceCapability instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static - * @param {google.ads.admanager.v1.IProgrammaticBuyer=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer instance + * @param {google.ads.admanager.v1.IDeviceCapability=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceCapability} DeviceCapability instance */ - ProgrammaticBuyer.create = function create(properties) { - return new ProgrammaticBuyer(properties); + DeviceCapability.create = function create(properties) { + return new DeviceCapability(properties); }; /** - * Encodes the specified ProgrammaticBuyer message. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * Encodes the specified DeviceCapability message. Does not implicitly {@link google.ads.admanager.v1.DeviceCapability.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static - * @param {google.ads.admanager.v1.IProgrammaticBuyer} message ProgrammaticBuyer message or plain object to encode + * @param {google.ads.admanager.v1.IDeviceCapability} message DeviceCapability message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProgrammaticBuyer.encode = function encode(message, writer) { + DeviceCapability.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.buyerAccountId != null && Object.hasOwnProperty.call(message, "buyerAccountId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.buyerAccountId); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.parentAccountId != null && Object.hasOwnProperty.call(message, "parentAccountId")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.parentAccountId); - if (message.partnerClientId != null && Object.hasOwnProperty.call(message, "partnerClientId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.partnerClientId); - if (message.agency != null && Object.hasOwnProperty.call(message, "agency")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.agency); - if (message.preferredDealsEnabled != null && Object.hasOwnProperty.call(message, "preferredDealsEnabled")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.preferredDealsEnabled); - if (message.programmaticGuaranteedEnabled != null && Object.hasOwnProperty.call(message, "programmaticGuaranteedEnabled")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.programmaticGuaranteedEnabled); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified ProgrammaticBuyer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * Encodes the specified DeviceCapability message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCapability.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static - * @param {google.ads.admanager.v1.IProgrammaticBuyer} message ProgrammaticBuyer message or plain object to encode + * @param {google.ads.admanager.v1.IDeviceCapability} message DeviceCapability message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProgrammaticBuyer.encodeDelimited = function encodeDelimited(message, writer) { + DeviceCapability.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ProgrammaticBuyer message from the specified reader or buffer. + * Decodes a DeviceCapability message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + * @returns {google.ads.admanager.v1.DeviceCapability} DeviceCapability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ProgrammaticBuyer.decode = function decode(reader, length, error) { + DeviceCapability.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ProgrammaticBuyer(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCapability(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -41971,33 +42486,9 @@ break; } case 2: { - message.buyerAccountId = reader.int64(); - break; - } - case 5: { message.displayName = reader.string(); break; } - case 6: { - message.parentAccountId = reader.int64(); - break; - } - case 7: { - message.partnerClientId = reader.string(); - break; - } - case 9: { - message.agency = reader.bool(); - break; - } - case 12: { - message.preferredDealsEnabled = reader.bool(); - break; - } - case 13: { - message.programmaticGuaranteedEnabled = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -42007,129 +42498,73 @@ }; /** - * Decodes a ProgrammaticBuyer message from the specified reader or buffer, length delimited. + * Decodes a DeviceCapability message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + * @returns {google.ads.admanager.v1.DeviceCapability} DeviceCapability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ProgrammaticBuyer.decodeDelimited = function decodeDelimited(reader) { + DeviceCapability.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ProgrammaticBuyer message. + * Verifies a DeviceCapability message. * @function verify - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ProgrammaticBuyer.verify = function verify(message) { + DeviceCapability.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.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { - properties._buyerAccountId = 1; - if (!$util.isInteger(message.buyerAccountId) && !(message.buyerAccountId && $util.isInteger(message.buyerAccountId.low) && $util.isInteger(message.buyerAccountId.high))) - return "buyerAccountId: integer|Long expected"; - } if (message.displayName != null && message.hasOwnProperty("displayName")) { properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; } - if (message.parentAccountId != null && message.hasOwnProperty("parentAccountId")) { - properties._parentAccountId = 1; - if (!$util.isInteger(message.parentAccountId) && !(message.parentAccountId && $util.isInteger(message.parentAccountId.low) && $util.isInteger(message.parentAccountId.high))) - return "parentAccountId: integer|Long expected"; - } - if (message.partnerClientId != null && message.hasOwnProperty("partnerClientId")) { - properties._partnerClientId = 1; - if (!$util.isString(message.partnerClientId)) - return "partnerClientId: string expected"; - } - if (message.agency != null && message.hasOwnProperty("agency")) { - properties._agency = 1; - if (typeof message.agency !== "boolean") - return "agency: boolean expected"; - } - if (message.preferredDealsEnabled != null && message.hasOwnProperty("preferredDealsEnabled")) { - properties._preferredDealsEnabled = 1; - if (typeof message.preferredDealsEnabled !== "boolean") - return "preferredDealsEnabled: boolean expected"; - } - if (message.programmaticGuaranteedEnabled != null && message.hasOwnProperty("programmaticGuaranteedEnabled")) { - properties._programmaticGuaranteedEnabled = 1; - if (typeof message.programmaticGuaranteedEnabled !== "boolean") - return "programmaticGuaranteedEnabled: boolean expected"; - } return null; }; /** - * Creates a ProgrammaticBuyer message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCapability message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + * @returns {google.ads.admanager.v1.DeviceCapability} DeviceCapability */ - ProgrammaticBuyer.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ProgrammaticBuyer) + DeviceCapability.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceCapability) return object; - var message = new $root.google.ads.admanager.v1.ProgrammaticBuyer(); + var message = new $root.google.ads.admanager.v1.DeviceCapability(); if (object.name != null) message.name = String(object.name); - if (object.buyerAccountId != null) - if ($util.Long) - (message.buyerAccountId = $util.Long.fromValue(object.buyerAccountId)).unsigned = false; - else if (typeof object.buyerAccountId === "string") - message.buyerAccountId = parseInt(object.buyerAccountId, 10); - else if (typeof object.buyerAccountId === "number") - message.buyerAccountId = object.buyerAccountId; - else if (typeof object.buyerAccountId === "object") - message.buyerAccountId = new $util.LongBits(object.buyerAccountId.low >>> 0, object.buyerAccountId.high >>> 0).toNumber(); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.parentAccountId != null) - if ($util.Long) - (message.parentAccountId = $util.Long.fromValue(object.parentAccountId)).unsigned = false; - else if (typeof object.parentAccountId === "string") - message.parentAccountId = parseInt(object.parentAccountId, 10); - else if (typeof object.parentAccountId === "number") - message.parentAccountId = object.parentAccountId; - else if (typeof object.parentAccountId === "object") - message.parentAccountId = new $util.LongBits(object.parentAccountId.low >>> 0, object.parentAccountId.high >>> 0).toNumber(); - if (object.partnerClientId != null) - message.partnerClientId = String(object.partnerClientId); - if (object.agency != null) - message.agency = Boolean(object.agency); - if (object.preferredDealsEnabled != null) - message.preferredDealsEnabled = Boolean(object.preferredDealsEnabled); - if (object.programmaticGuaranteedEnabled != null) - message.programmaticGuaranteedEnabled = Boolean(object.programmaticGuaranteedEnabled); return message; }; /** - * Creates a plain object from a ProgrammaticBuyer message. Also converts values to other types if specified. + * Creates a plain object from a DeviceCapability message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static - * @param {google.ads.admanager.v1.ProgrammaticBuyer} message ProgrammaticBuyer + * @param {google.ads.admanager.v1.DeviceCapability} message DeviceCapability * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ProgrammaticBuyer.toObject = function toObject(message, options) { + DeviceCapability.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -42137,198 +42572,162 @@ object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { - if (typeof message.buyerAccountId === "number") - object.buyerAccountId = options.longs === String ? String(message.buyerAccountId) : message.buyerAccountId; - else - object.buyerAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.buyerAccountId) : options.longs === Number ? new $util.LongBits(message.buyerAccountId.low >>> 0, message.buyerAccountId.high >>> 0).toNumber() : message.buyerAccountId; - if (options.oneofs) - object._buyerAccountId = "buyerAccountId"; - } if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; if (options.oneofs) object._displayName = "displayName"; } - if (message.parentAccountId != null && message.hasOwnProperty("parentAccountId")) { - if (typeof message.parentAccountId === "number") - object.parentAccountId = options.longs === String ? String(message.parentAccountId) : message.parentAccountId; - else - object.parentAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.parentAccountId) : options.longs === Number ? new $util.LongBits(message.parentAccountId.low >>> 0, message.parentAccountId.high >>> 0).toNumber() : message.parentAccountId; - if (options.oneofs) - object._parentAccountId = "parentAccountId"; - } - if (message.partnerClientId != null && message.hasOwnProperty("partnerClientId")) { - object.partnerClientId = message.partnerClientId; - if (options.oneofs) - object._partnerClientId = "partnerClientId"; - } - if (message.agency != null && message.hasOwnProperty("agency")) { - object.agency = message.agency; - if (options.oneofs) - object._agency = "agency"; - } - if (message.preferredDealsEnabled != null && message.hasOwnProperty("preferredDealsEnabled")) { - object.preferredDealsEnabled = message.preferredDealsEnabled; - if (options.oneofs) - object._preferredDealsEnabled = "preferredDealsEnabled"; - } - if (message.programmaticGuaranteedEnabled != null && message.hasOwnProperty("programmaticGuaranteedEnabled")) { - object.programmaticGuaranteedEnabled = message.programmaticGuaranteedEnabled; - if (options.oneofs) - object._programmaticGuaranteedEnabled = "programmaticGuaranteedEnabled"; - } return object; }; /** - * Converts this ProgrammaticBuyer to JSON. + * Converts this DeviceCapability to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @instance * @returns {Object.} JSON object */ - ProgrammaticBuyer.prototype.toJSON = function toJSON() { + DeviceCapability.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ProgrammaticBuyer + * Gets the default type url for DeviceCapability * @function getTypeUrl - * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @memberof google.ads.admanager.v1.DeviceCapability * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ProgrammaticBuyer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeviceCapability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ProgrammaticBuyer"; + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCapability"; }; - return ProgrammaticBuyer; + return DeviceCapability; })(); - v1.ProgrammaticBuyerService = (function() { + v1.DeviceCapabilityService = (function() { /** - * Constructs a new ProgrammaticBuyerService service. + * Constructs a new DeviceCapabilityService service. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ProgrammaticBuyerService + * @classdesc Represents a DeviceCapabilityService * @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 ProgrammaticBuyerService(rpcImpl, requestDelimited, responseDelimited) { + function DeviceCapabilityService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (ProgrammaticBuyerService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ProgrammaticBuyerService; + (DeviceCapabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceCapabilityService; /** - * Creates new ProgrammaticBuyerService service using the specified rpc implementation. + * Creates new DeviceCapabilityService service using the specified rpc implementation. * @function create - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @memberof google.ads.admanager.v1.DeviceCapabilityService * @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 {ProgrammaticBuyerService} RPC service. Useful where requests and/or responses are streamed. + * @returns {DeviceCapabilityService} RPC service. Useful where requests and/or responses are streamed. */ - ProgrammaticBuyerService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + DeviceCapabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|getProgrammaticBuyer}. - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService - * @typedef GetProgrammaticBuyerCallback + * Callback as used by {@link google.ads.admanager.v1.DeviceCapabilityService|getDeviceCapability}. + * @memberof google.ads.admanager.v1.DeviceCapabilityService + * @typedef GetDeviceCapabilityCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ProgrammaticBuyer} [response] ProgrammaticBuyer + * @param {google.ads.admanager.v1.DeviceCapability} [response] DeviceCapability */ /** - * Calls GetProgrammaticBuyer. - * @function getProgrammaticBuyer - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * Calls GetDeviceCapability. + * @function getDeviceCapability + * @memberof google.ads.admanager.v1.DeviceCapabilityService * @instance - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} request GetProgrammaticBuyerRequest message or plain object - * @param {google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyerCallback} callback Node-style callback called with the error, if any, and ProgrammaticBuyer + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest} request GetDeviceCapabilityRequest message or plain object + * @param {google.ads.admanager.v1.DeviceCapabilityService.GetDeviceCapabilityCallback} callback Node-style callback called with the error, if any, and DeviceCapability * @returns {undefined} * @variation 1 */ - Object.defineProperty(ProgrammaticBuyerService.prototype.getProgrammaticBuyer = function getProgrammaticBuyer(request, callback) { - return this.rpcCall(getProgrammaticBuyer, $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest, $root.google.ads.admanager.v1.ProgrammaticBuyer, request, callback); - }, "name", { value: "GetProgrammaticBuyer" }); + Object.defineProperty(DeviceCapabilityService.prototype.getDeviceCapability = function getDeviceCapability(request, callback) { + return this.rpcCall(getDeviceCapability, $root.google.ads.admanager.v1.GetDeviceCapabilityRequest, $root.google.ads.admanager.v1.DeviceCapability, request, callback); + }, "name", { value: "GetDeviceCapability" }); /** - * Calls GetProgrammaticBuyer. - * @function getProgrammaticBuyer - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * Calls GetDeviceCapability. + * @function getDeviceCapability + * @memberof google.ads.admanager.v1.DeviceCapabilityService * @instance - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} request GetProgrammaticBuyerRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest} request GetDeviceCapabilityRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|listProgrammaticBuyers}. - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService - * @typedef ListProgrammaticBuyersCallback + * Callback as used by {@link google.ads.admanager.v1.DeviceCapabilityService|listDeviceCapabilities}. + * @memberof google.ads.admanager.v1.DeviceCapabilityService + * @typedef ListDeviceCapabilitiesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListProgrammaticBuyersResponse} [response] ListProgrammaticBuyersResponse + * @param {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} [response] ListDeviceCapabilitiesResponse */ /** - * Calls ListProgrammaticBuyers. - * @function listProgrammaticBuyers - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * Calls ListDeviceCapabilities. + * @function listDeviceCapabilities + * @memberof google.ads.admanager.v1.DeviceCapabilityService * @instance - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} request ListProgrammaticBuyersRequest message or plain object - * @param {google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyersCallback} callback Node-style callback called with the error, if any, and ListProgrammaticBuyersResponse + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest} request ListDeviceCapabilitiesRequest message or plain object + * @param {google.ads.admanager.v1.DeviceCapabilityService.ListDeviceCapabilitiesCallback} callback Node-style callback called with the error, if any, and ListDeviceCapabilitiesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ProgrammaticBuyerService.prototype.listProgrammaticBuyers = function listProgrammaticBuyers(request, callback) { - return this.rpcCall(listProgrammaticBuyers, $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest, $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse, request, callback); - }, "name", { value: "ListProgrammaticBuyers" }); + Object.defineProperty(DeviceCapabilityService.prototype.listDeviceCapabilities = function listDeviceCapabilities(request, callback) { + return this.rpcCall(listDeviceCapabilities, $root.google.ads.admanager.v1.ListDeviceCapabilitiesRequest, $root.google.ads.admanager.v1.ListDeviceCapabilitiesResponse, request, callback); + }, "name", { value: "ListDeviceCapabilities" }); /** - * Calls ListProgrammaticBuyers. - * @function listProgrammaticBuyers - * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * Calls ListDeviceCapabilities. + * @function listDeviceCapabilities + * @memberof google.ads.admanager.v1.DeviceCapabilityService * @instance - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} request ListProgrammaticBuyersRequest message or plain object - * @returns {Promise} Promise + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest} request ListDeviceCapabilitiesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return ProgrammaticBuyerService; + return DeviceCapabilityService; })(); - v1.GetProgrammaticBuyerRequest = (function() { + v1.GetDeviceCapabilityRequest = (function() { /** - * Properties of a GetProgrammaticBuyerRequest. + * Properties of a GetDeviceCapabilityRequest. * @memberof google.ads.admanager.v1 - * @interface IGetProgrammaticBuyerRequest - * @property {string|null} [name] GetProgrammaticBuyerRequest name + * @interface IGetDeviceCapabilityRequest + * @property {string|null} [name] GetDeviceCapabilityRequest name */ /** - * Constructs a new GetProgrammaticBuyerRequest. + * Constructs a new GetDeviceCapabilityRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetProgrammaticBuyerRequest. - * @implements IGetProgrammaticBuyerRequest + * @classdesc Represents a GetDeviceCapabilityRequest. + * @implements IGetDeviceCapabilityRequest * @constructor - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest=} [properties] Properties to set */ - function GetProgrammaticBuyerRequest(properties) { + function GetDeviceCapabilityRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42336,35 +42735,35 @@ } /** - * GetProgrammaticBuyerRequest name. + * GetDeviceCapabilityRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @instance */ - GetProgrammaticBuyerRequest.prototype.name = ""; + GetDeviceCapabilityRequest.prototype.name = ""; /** - * Creates a new GetProgrammaticBuyerRequest instance using the specified properties. + * Creates a new GetDeviceCapabilityRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest instance + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetDeviceCapabilityRequest} GetDeviceCapabilityRequest instance */ - GetProgrammaticBuyerRequest.create = function create(properties) { - return new GetProgrammaticBuyerRequest(properties); + GetDeviceCapabilityRequest.create = function create(properties) { + return new GetDeviceCapabilityRequest(properties); }; /** - * Encodes the specified GetProgrammaticBuyerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * Encodes the specified GetDeviceCapabilityRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCapabilityRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest} message GetDeviceCapabilityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetProgrammaticBuyerRequest.encode = function encode(message, writer) { + GetDeviceCapabilityRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -42373,33 +42772,33 @@ }; /** - * Encodes the specified GetProgrammaticBuyerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * Encodes the specified GetDeviceCapabilityRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCapabilityRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static - * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetDeviceCapabilityRequest} message GetDeviceCapabilityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetProgrammaticBuyerRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDeviceCapabilityRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer. + * Decodes a GetDeviceCapabilityRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + * @returns {google.ads.admanager.v1.GetDeviceCapabilityRequest} GetDeviceCapabilityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetProgrammaticBuyerRequest.decode = function decode(reader, length, error) { + GetDeviceCapabilityRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetDeviceCapabilityRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -42418,30 +42817,30 @@ }; /** - * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDeviceCapabilityRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + * @returns {google.ads.admanager.v1.GetDeviceCapabilityRequest} GetDeviceCapabilityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetProgrammaticBuyerRequest.decodeDelimited = function decodeDelimited(reader) { + GetDeviceCapabilityRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetProgrammaticBuyerRequest message. + * Verifies a GetDeviceCapabilityRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetProgrammaticBuyerRequest.verify = function verify(message) { + GetDeviceCapabilityRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -42451,32 +42850,32 @@ }; /** - * Creates a GetProgrammaticBuyerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeviceCapabilityRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + * @returns {google.ads.admanager.v1.GetDeviceCapabilityRequest} GetDeviceCapabilityRequest */ - GetProgrammaticBuyerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest) + GetDeviceCapabilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetDeviceCapabilityRequest) return object; - var message = new $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest(); + var message = new $root.google.ads.admanager.v1.GetDeviceCapabilityRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetProgrammaticBuyerRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDeviceCapabilityRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static - * @param {google.ads.admanager.v1.GetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest + * @param {google.ads.admanager.v1.GetDeviceCapabilityRequest} message GetDeviceCapabilityRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetProgrammaticBuyerRequest.toObject = function toObject(message, options) { + GetDeviceCapabilityRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -42488,57 +42887,57 @@ }; /** - * Converts this GetProgrammaticBuyerRequest to JSON. + * Converts this GetDeviceCapabilityRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @instance * @returns {Object.} JSON object */ - GetProgrammaticBuyerRequest.prototype.toJSON = function toJSON() { + GetDeviceCapabilityRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetProgrammaticBuyerRequest + * Gets the default type url for GetDeviceCapabilityRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @memberof google.ads.admanager.v1.GetDeviceCapabilityRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetProgrammaticBuyerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDeviceCapabilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetProgrammaticBuyerRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetDeviceCapabilityRequest"; }; - return GetProgrammaticBuyerRequest; + return GetDeviceCapabilityRequest; })(); - v1.ListProgrammaticBuyersRequest = (function() { + v1.ListDeviceCapabilitiesRequest = (function() { /** - * Properties of a ListProgrammaticBuyersRequest. + * Properties of a ListDeviceCapabilitiesRequest. * @memberof google.ads.admanager.v1 - * @interface IListProgrammaticBuyersRequest - * @property {string|null} [parent] ListProgrammaticBuyersRequest parent - * @property {number|null} [pageSize] ListProgrammaticBuyersRequest pageSize - * @property {string|null} [pageToken] ListProgrammaticBuyersRequest pageToken - * @property {string|null} [filter] ListProgrammaticBuyersRequest filter - * @property {string|null} [orderBy] ListProgrammaticBuyersRequest orderBy - * @property {number|null} [skip] ListProgrammaticBuyersRequest skip + * @interface IListDeviceCapabilitiesRequest + * @property {string|null} [parent] ListDeviceCapabilitiesRequest parent + * @property {number|null} [pageSize] ListDeviceCapabilitiesRequest pageSize + * @property {string|null} [pageToken] ListDeviceCapabilitiesRequest pageToken + * @property {string|null} [filter] ListDeviceCapabilitiesRequest filter + * @property {string|null} [orderBy] ListDeviceCapabilitiesRequest orderBy + * @property {number|null} [skip] ListDeviceCapabilitiesRequest skip */ /** - * Constructs a new ListProgrammaticBuyersRequest. + * Constructs a new ListDeviceCapabilitiesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListProgrammaticBuyersRequest. - * @implements IListProgrammaticBuyersRequest + * @classdesc Represents a ListDeviceCapabilitiesRequest. + * @implements IListDeviceCapabilitiesRequest * @constructor - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest=} [properties] Properties to set */ - function ListProgrammaticBuyersRequest(properties) { + function ListDeviceCapabilitiesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42546,75 +42945,75 @@ } /** - * ListProgrammaticBuyersRequest parent. + * ListDeviceCapabilitiesRequest parent. * @member {string} parent - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.parent = ""; + ListDeviceCapabilitiesRequest.prototype.parent = ""; /** - * ListProgrammaticBuyersRequest pageSize. + * ListDeviceCapabilitiesRequest pageSize. * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.pageSize = 0; + ListDeviceCapabilitiesRequest.prototype.pageSize = 0; /** - * ListProgrammaticBuyersRequest pageToken. + * ListDeviceCapabilitiesRequest pageToken. * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.pageToken = ""; + ListDeviceCapabilitiesRequest.prototype.pageToken = ""; /** - * ListProgrammaticBuyersRequest filter. + * ListDeviceCapabilitiesRequest filter. * @member {string} filter - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.filter = ""; + ListDeviceCapabilitiesRequest.prototype.filter = ""; /** - * ListProgrammaticBuyersRequest orderBy. + * ListDeviceCapabilitiesRequest orderBy. * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.orderBy = ""; + ListDeviceCapabilitiesRequest.prototype.orderBy = ""; /** - * ListProgrammaticBuyersRequest skip. + * ListDeviceCapabilitiesRequest skip. * @member {number} skip - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance */ - ListProgrammaticBuyersRequest.prototype.skip = 0; + ListDeviceCapabilitiesRequest.prototype.skip = 0; /** - * Creates a new ListProgrammaticBuyersRequest instance using the specified properties. + * Creates a new ListDeviceCapabilitiesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest instance + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesRequest} ListDeviceCapabilitiesRequest instance */ - ListProgrammaticBuyersRequest.create = function create(properties) { - return new ListProgrammaticBuyersRequest(properties); + ListDeviceCapabilitiesRequest.create = function create(properties) { + return new ListDeviceCapabilitiesRequest(properties); }; /** - * Encodes the specified ListProgrammaticBuyersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * Encodes the specified ListDeviceCapabilitiesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest} message ListDeviceCapabilitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProgrammaticBuyersRequest.encode = function encode(message, writer) { + ListDeviceCapabilitiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -42633,33 +43032,33 @@ }; /** - * Encodes the specified ListProgrammaticBuyersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * Encodes the specified ListDeviceCapabilitiesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesRequest} message ListDeviceCapabilitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProgrammaticBuyersRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceCapabilitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer. + * Decodes a ListDeviceCapabilitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesRequest} ListDeviceCapabilitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProgrammaticBuyersRequest.decode = function decode(reader, length, error) { + ListDeviceCapabilitiesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCapabilitiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -42698,30 +43097,30 @@ }; /** - * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceCapabilitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesRequest} ListDeviceCapabilitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProgrammaticBuyersRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeviceCapabilitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListProgrammaticBuyersRequest message. + * Verifies a ListDeviceCapabilitiesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListProgrammaticBuyersRequest.verify = function verify(message) { + ListDeviceCapabilitiesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -42746,17 +43145,17 @@ }; /** - * Creates a ListProgrammaticBuyersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceCapabilitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesRequest} ListDeviceCapabilitiesRequest */ - ListProgrammaticBuyersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest) + ListDeviceCapabilitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceCapabilitiesRequest) return object; - var message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest(); + var message = new $root.google.ads.admanager.v1.ListDeviceCapabilitiesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -42773,15 +43172,15 @@ }; /** - * Creates a plain object from a ListProgrammaticBuyersRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceCapabilitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static - * @param {google.ads.admanager.v1.ListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest + * @param {google.ads.admanager.v1.ListDeviceCapabilitiesRequest} message ListDeviceCapabilitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListProgrammaticBuyersRequest.toObject = function toObject(message, options) { + ListDeviceCapabilitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -42809,55 +43208,55 @@ }; /** - * Converts this ListProgrammaticBuyersRequest to JSON. + * Converts this ListDeviceCapabilitiesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @instance * @returns {Object.} JSON object */ - ListProgrammaticBuyersRequest.prototype.toJSON = function toJSON() { + ListDeviceCapabilitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListProgrammaticBuyersRequest + * Gets the default type url for ListDeviceCapabilitiesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListProgrammaticBuyersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeviceCapabilitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListProgrammaticBuyersRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCapabilitiesRequest"; }; - return ListProgrammaticBuyersRequest; + return ListDeviceCapabilitiesRequest; })(); - v1.ListProgrammaticBuyersResponse = (function() { + v1.ListDeviceCapabilitiesResponse = (function() { /** - * Properties of a ListProgrammaticBuyersResponse. + * Properties of a ListDeviceCapabilitiesResponse. * @memberof google.ads.admanager.v1 - * @interface IListProgrammaticBuyersResponse - * @property {Array.|null} [programmaticBuyers] ListProgrammaticBuyersResponse programmaticBuyers - * @property {string|null} [nextPageToken] ListProgrammaticBuyersResponse nextPageToken - * @property {number|null} [totalSize] ListProgrammaticBuyersResponse totalSize + * @interface IListDeviceCapabilitiesResponse + * @property {Array.|null} [deviceCapabilities] ListDeviceCapabilitiesResponse deviceCapabilities + * @property {string|null} [nextPageToken] ListDeviceCapabilitiesResponse nextPageToken + * @property {number|null} [totalSize] ListDeviceCapabilitiesResponse totalSize */ /** - * Constructs a new ListProgrammaticBuyersResponse. + * Constructs a new ListDeviceCapabilitiesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListProgrammaticBuyersResponse. - * @implements IListProgrammaticBuyersResponse + * @classdesc Represents a ListDeviceCapabilitiesResponse. + * @implements IListDeviceCapabilitiesResponse * @constructor - * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesResponse=} [properties] Properties to set */ - function ListProgrammaticBuyersResponse(properties) { - this.programmaticBuyers = []; + function ListDeviceCapabilitiesResponse(properties) { + this.deviceCapabilities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42865,56 +43264,56 @@ } /** - * ListProgrammaticBuyersResponse programmaticBuyers. - * @member {Array.} programmaticBuyers - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * ListDeviceCapabilitiesResponse deviceCapabilities. + * @member {Array.} deviceCapabilities + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @instance */ - ListProgrammaticBuyersResponse.prototype.programmaticBuyers = $util.emptyArray; + ListDeviceCapabilitiesResponse.prototype.deviceCapabilities = $util.emptyArray; /** - * ListProgrammaticBuyersResponse nextPageToken. + * ListDeviceCapabilitiesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @instance */ - ListProgrammaticBuyersResponse.prototype.nextPageToken = ""; + ListDeviceCapabilitiesResponse.prototype.nextPageToken = ""; /** - * ListProgrammaticBuyersResponse totalSize. + * ListDeviceCapabilitiesResponse totalSize. * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @instance */ - ListProgrammaticBuyersResponse.prototype.totalSize = 0; + ListDeviceCapabilitiesResponse.prototype.totalSize = 0; /** - * Creates a new ListProgrammaticBuyersResponse instance using the specified properties. + * Creates a new ListDeviceCapabilitiesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse instance + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} ListDeviceCapabilitiesResponse instance */ - ListProgrammaticBuyersResponse.create = function create(properties) { - return new ListProgrammaticBuyersResponse(properties); + ListDeviceCapabilitiesResponse.create = function create(properties) { + return new ListDeviceCapabilitiesResponse(properties); }; /** - * Encodes the specified ListProgrammaticBuyersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * Encodes the specified ListDeviceCapabilitiesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesResponse} message ListDeviceCapabilitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProgrammaticBuyersResponse.encode = function encode(message, writer) { + ListDeviceCapabilitiesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.programmaticBuyers != null && message.programmaticBuyers.length) - for (var i = 0; i < message.programmaticBuyers.length; ++i) - $root.google.ads.admanager.v1.ProgrammaticBuyer.encode(message.programmaticBuyers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceCapabilities != null && message.deviceCapabilities.length) + for (var i = 0; i < message.deviceCapabilities.length; ++i) + $root.google.ads.admanager.v1.DeviceCapability.encode(message.deviceCapabilities[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) @@ -42923,42 +43322,42 @@ }; /** - * Encodes the specified ListProgrammaticBuyersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * Encodes the specified ListDeviceCapabilitiesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCapabilitiesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static - * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListDeviceCapabilitiesResponse} message ListDeviceCapabilitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProgrammaticBuyersResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListDeviceCapabilitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer. + * Decodes a ListDeviceCapabilitiesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} ListDeviceCapabilitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProgrammaticBuyersResponse.decode = function decode(reader, length, error) { + ListDeviceCapabilitiesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCapabilitiesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.programmaticBuyers && message.programmaticBuyers.length)) - message.programmaticBuyers = []; - message.programmaticBuyers.push($root.google.ads.admanager.v1.ProgrammaticBuyer.decode(reader, reader.uint32())); + if (!(message.deviceCapabilities && message.deviceCapabilities.length)) + message.deviceCapabilities = []; + message.deviceCapabilities.push($root.google.ads.admanager.v1.DeviceCapability.decode(reader, reader.uint32())); break; } case 2: { @@ -42978,39 +43377,39 @@ }; /** - * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeviceCapabilitiesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} ListDeviceCapabilitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProgrammaticBuyersResponse.decodeDelimited = function decodeDelimited(reader) { + ListDeviceCapabilitiesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListProgrammaticBuyersResponse message. + * Verifies a ListDeviceCapabilitiesResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListProgrammaticBuyersResponse.verify = function verify(message) { + ListDeviceCapabilitiesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.programmaticBuyers != null && message.hasOwnProperty("programmaticBuyers")) { - if (!Array.isArray(message.programmaticBuyers)) - return "programmaticBuyers: array expected"; - for (var i = 0; i < message.programmaticBuyers.length; ++i) { - var error = $root.google.ads.admanager.v1.ProgrammaticBuyer.verify(message.programmaticBuyers[i]); + if (message.deviceCapabilities != null && message.hasOwnProperty("deviceCapabilities")) { + if (!Array.isArray(message.deviceCapabilities)) + return "deviceCapabilities: array expected"; + for (var i = 0; i < message.deviceCapabilities.length; ++i) { + var error = $root.google.ads.admanager.v1.DeviceCapability.verify(message.deviceCapabilities[i]); if (error) - return "programmaticBuyers." + error; + return "deviceCapabilities." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -43023,25 +43422,25 @@ }; /** - * Creates a ListProgrammaticBuyersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeviceCapabilitiesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + * @returns {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} ListDeviceCapabilitiesResponse */ - ListProgrammaticBuyersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse) + ListDeviceCapabilitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceCapabilitiesResponse) return object; - var message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse(); - if (object.programmaticBuyers) { - if (!Array.isArray(object.programmaticBuyers)) - throw TypeError(".google.ads.admanager.v1.ListProgrammaticBuyersResponse.programmaticBuyers: array expected"); - message.programmaticBuyers = []; - for (var i = 0; i < object.programmaticBuyers.length; ++i) { - if (typeof object.programmaticBuyers[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListProgrammaticBuyersResponse.programmaticBuyers: object expected"); - message.programmaticBuyers[i] = $root.google.ads.admanager.v1.ProgrammaticBuyer.fromObject(object.programmaticBuyers[i]); + var message = new $root.google.ads.admanager.v1.ListDeviceCapabilitiesResponse(); + if (object.deviceCapabilities) { + if (!Array.isArray(object.deviceCapabilities)) + throw TypeError(".google.ads.admanager.v1.ListDeviceCapabilitiesResponse.deviceCapabilities: array expected"); + message.deviceCapabilities = []; + for (var i = 0; i < object.deviceCapabilities.length; ++i) { + if (typeof object.deviceCapabilities[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListDeviceCapabilitiesResponse.deviceCapabilities: object expected"); + message.deviceCapabilities[i] = $root.google.ads.admanager.v1.DeviceCapability.fromObject(object.deviceCapabilities[i]); } } if (object.nextPageToken != null) @@ -43052,28 +43451,28 @@ }; /** - * Creates a plain object from a ListProgrammaticBuyersResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListDeviceCapabilitiesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static - * @param {google.ads.admanager.v1.ListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse + * @param {google.ads.admanager.v1.ListDeviceCapabilitiesResponse} message ListDeviceCapabilitiesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListProgrammaticBuyersResponse.toObject = function toObject(message, options) { + ListDeviceCapabilitiesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.programmaticBuyers = []; + object.deviceCapabilities = []; if (options.defaults) { object.nextPageToken = ""; object.totalSize = 0; } - if (message.programmaticBuyers && message.programmaticBuyers.length) { - object.programmaticBuyers = []; - for (var j = 0; j < message.programmaticBuyers.length; ++j) - object.programmaticBuyers[j] = $root.google.ads.admanager.v1.ProgrammaticBuyer.toObject(message.programmaticBuyers[j], options); + if (message.deviceCapabilities && message.deviceCapabilities.length) { + object.deviceCapabilities = []; + for (var j = 0; j < message.deviceCapabilities.length; ++j) + object.deviceCapabilities[j] = $root.google.ads.admanager.v1.DeviceCapability.toObject(message.deviceCapabilities[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -43083,60 +43482,53 @@ }; /** - * Converts this ListProgrammaticBuyersResponse to JSON. + * Converts this ListDeviceCapabilitiesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @instance * @returns {Object.} JSON object */ - ListProgrammaticBuyersResponse.prototype.toJSON = function toJSON() { + ListDeviceCapabilitiesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListProgrammaticBuyersResponse + * Gets the default type url for ListDeviceCapabilitiesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @memberof google.ads.admanager.v1.ListDeviceCapabilitiesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListProgrammaticBuyersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeviceCapabilitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListProgrammaticBuyersResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCapabilitiesResponse"; }; - return ListProgrammaticBuyersResponse; + return ListDeviceCapabilitiesResponse; })(); - v1.Report = (function() { + v1.DeviceCategory = (function() { /** - * Properties of a Report. + * Properties of a DeviceCategory. * @memberof google.ads.admanager.v1 - * @interface IReport - * @property {string|null} [name] Report name - * @property {number|Long|null} [reportId] Report reportId - * @property {google.ads.admanager.v1.Report.Visibility|null} [visibility] Report visibility - * @property {google.ads.admanager.v1.IReportDefinition|null} [reportDefinition] Report reportDefinition - * @property {string|null} [displayName] Report displayName - * @property {google.protobuf.ITimestamp|null} [updateTime] Report updateTime - * @property {google.protobuf.ITimestamp|null} [createTime] Report createTime - * @property {string|null} [locale] Report locale - * @property {google.ads.admanager.v1.IScheduleOptions|null} [scheduleOptions] Report scheduleOptions + * @interface IDeviceCategory + * @property {string|null} [name] DeviceCategory name + * @property {string|null} [displayName] DeviceCategory displayName */ /** - * Constructs a new Report. + * Constructs a new DeviceCategory. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Report. - * @implements IReport + * @classdesc Represents a DeviceCategory. + * @implements IDeviceCategory * @constructor - * @param {google.ads.admanager.v1.IReport=} [properties] Properties to set + * @param {google.ads.admanager.v1.IDeviceCategory=} [properties] Properties to set */ - function Report(properties) { + function DeviceCategory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43144,150 +43536,89 @@ } /** - * Report name. + * DeviceCategory name. * @member {string} name - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.name = ""; - - /** - * Report reportId. - * @member {number|Long} reportId - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.reportId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Report visibility. - * @member {google.ads.admanager.v1.Report.Visibility} visibility - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.visibility = 0; - - /** - * Report reportDefinition. - * @member {google.ads.admanager.v1.IReportDefinition|null|undefined} reportDefinition - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.reportDefinition = null; - - /** - * Report displayName. - * @member {string} displayName - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.displayName = ""; - - /** - * Report updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @instance */ - Report.prototype.updateTime = null; + DeviceCategory.prototype.name = ""; /** - * Report createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.ads.admanager.v1.Report + * DeviceCategory displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.DeviceCategory * @instance */ - Report.prototype.createTime = null; + DeviceCategory.prototype.displayName = null; - /** - * Report locale. - * @member {string} locale - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.locale = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Report scheduleOptions. - * @member {google.ads.admanager.v1.IScheduleOptions|null|undefined} scheduleOptions - * @memberof google.ads.admanager.v1.Report - * @instance - */ - Report.prototype.scheduleOptions = null; + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCategory.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Report instance using the specified properties. + * Creates a new DeviceCategory instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static - * @param {google.ads.admanager.v1.IReport=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report} Report instance + * @param {google.ads.admanager.v1.IDeviceCategory=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory instance */ - Report.create = function create(properties) { - return new Report(properties); + DeviceCategory.create = function create(properties) { + return new DeviceCategory(properties); }; /** - * Encodes the specified Report message. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * Encodes the specified DeviceCategory message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static - * @param {google.ads.admanager.v1.IReport} message Report message or plain object to encode + * @param {google.ads.admanager.v1.IDeviceCategory} message DeviceCategory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Report.encode = function encode(message, writer) { + DeviceCategory.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.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.visibility); - if (message.reportId != null && Object.hasOwnProperty.call(message, "reportId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reportId); - if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) - $root.google.ads.admanager.v1.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.locale); - if (message.scheduleOptions != null && Object.hasOwnProperty.call(message, "scheduleOptions")) - $root.google.ads.admanager.v1.ScheduleOptions.encode(message.scheduleOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified Report message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * Encodes the specified DeviceCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategory.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static - * @param {google.ads.admanager.v1.IReport} message Report message or plain object to encode + * @param {google.ads.admanager.v1.IDeviceCategory} message DeviceCategory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Report.encodeDelimited = function encodeDelimited(message, writer) { + DeviceCategory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Report message from the specified reader or buffer. + * Decodes a DeviceCategory message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report} Report + * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Report.decode = function decode(reader, length, error) { + DeviceCategory.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCategory(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -43297,38 +43628,10 @@ message.name = reader.string(); break; } - case 3: { - message.reportId = reader.int64(); - break; - } case 2: { - message.visibility = reader.int32(); - break; - } - case 4: { - message.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.decode(reader, reader.uint32()); - break; - } - case 5: { message.displayName = reader.string(); break; } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.locale = reader.string(); - break; - } - case 9: { - message.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -43338,17506 +43641,67668 @@ }; /** - * Decodes a Report message from the specified reader or buffer, length delimited. + * Decodes a DeviceCategory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report} Report + * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Report.decodeDelimited = function decodeDelimited(reader) { + DeviceCategory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Report message. + * Verifies a DeviceCategory message. * @function verify - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Report.verify = function verify(message) { + DeviceCategory.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.reportId != null && message.hasOwnProperty("reportId")) - if (!$util.isInteger(message.reportId) && !(message.reportId && $util.isInteger(message.reportId.low) && $util.isInteger(message.reportId.high))) - return "reportId: integer|Long expected"; - if (message.visibility != null && message.hasOwnProperty("visibility")) - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { - var error = $root.google.ads.admanager.v1.ReportDefinition.verify(message.reportDefinition); - if (error) - return "reportDefinition." + error; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.locale != null && message.hasOwnProperty("locale")) - if (!$util.isString(message.locale)) - return "locale: string expected"; - if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) { - var error = $root.google.ads.admanager.v1.ScheduleOptions.verify(message.scheduleOptions); - if (error) - return "scheduleOptions." + error; } return null; }; /** - * Creates a Report message from a plain object. Also converts values to their respective internal types. + * Creates a DeviceCategory message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report} Report + * @returns {google.ads.admanager.v1.DeviceCategory} DeviceCategory */ - Report.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report) + DeviceCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceCategory) return object; - var message = new $root.google.ads.admanager.v1.Report(); + var message = new $root.google.ads.admanager.v1.DeviceCategory(); if (object.name != null) message.name = String(object.name); - if (object.reportId != null) - if ($util.Long) - (message.reportId = $util.Long.fromValue(object.reportId)).unsigned = false; - else if (typeof object.reportId === "string") - message.reportId = parseInt(object.reportId, 10); - else if (typeof object.reportId === "number") - message.reportId = object.reportId; - else if (typeof object.reportId === "object") - message.reportId = new $util.LongBits(object.reportId.low >>> 0, object.reportId.high >>> 0).toNumber(); - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "HIDDEN": - case 0: - message.visibility = 0; - break; - case "DRAFT": - case 1: - message.visibility = 1; - break; - case "SAVED": - case 2: - message.visibility = 2; - break; - } - if (object.reportDefinition != null) { - if (typeof object.reportDefinition !== "object") - throw TypeError(".google.ads.admanager.v1.Report.reportDefinition: object expected"); - message.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.fromObject(object.reportDefinition); - } if (object.displayName != null) message.displayName = String(object.displayName); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.ads.admanager.v1.Report.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.ads.admanager.v1.Report.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.locale != null) - message.locale = String(object.locale); - if (object.scheduleOptions != null) { - if (typeof object.scheduleOptions !== "object") - throw TypeError(".google.ads.admanager.v1.Report.scheduleOptions: object expected"); - message.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.fromObject(object.scheduleOptions); - } return message; }; /** - * Creates a plain object from a Report message. Also converts values to other types if specified. + * Creates a plain object from a DeviceCategory message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static - * @param {google.ads.admanager.v1.Report} message Report + * @param {google.ads.admanager.v1.DeviceCategory} message DeviceCategory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Report.toObject = function toObject(message, options) { + DeviceCategory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.visibility = options.enums === String ? "HIDDEN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reportId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reportId = options.longs === String ? "0" : 0; - object.reportDefinition = null; - object.displayName = ""; - object.updateTime = null; - object.createTime = null; - object.locale = ""; - object.scheduleOptions = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.visibility != null && message.hasOwnProperty("visibility")) - object.visibility = options.enums === String ? $root.google.ads.admanager.v1.Report.Visibility[message.visibility] === undefined ? message.visibility : $root.google.ads.admanager.v1.Report.Visibility[message.visibility] : message.visibility; - if (message.reportId != null && message.hasOwnProperty("reportId")) - if (typeof message.reportId === "number") - object.reportId = options.longs === String ? String(message.reportId) : message.reportId; - else - object.reportId = options.longs === String ? $util.Long.prototype.toString.call(message.reportId) : options.longs === Number ? new $util.LongBits(message.reportId.low >>> 0, message.reportId.high >>> 0).toNumber() : message.reportId; - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) - object.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.toObject(message.reportDefinition, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.locale != null && message.hasOwnProperty("locale")) - object.locale = message.locale; - if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) - object.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.toObject(message.scheduleOptions, options); + if (options.oneofs) + object._displayName = "displayName"; + } return object; }; /** - * Converts this Report to JSON. + * Converts this DeviceCategory to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @instance * @returns {Object.} JSON object */ - Report.prototype.toJSON = function toJSON() { + DeviceCategory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Report + * Gets the default type url for DeviceCategory * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report + * @memberof google.ads.admanager.v1.DeviceCategory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Report.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeviceCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Report"; + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCategory"; }; - Report.Value = (function() { + return DeviceCategory; + })(); - /** - * Properties of a Value. - * @memberof google.ads.admanager.v1.Report - * @interface IValue - * @property {number|Long|null} [intValue] Value intValue - * @property {number|null} [doubleValue] Value doubleValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.ads.admanager.v1.Report.Value.IIntList|null} [intListValue] Value intListValue - * @property {google.ads.admanager.v1.Report.Value.IStringList|null} [stringListValue] Value stringListValue - * @property {Uint8Array|null} [bytesValue] Value bytesValue - */ + v1.DeviceCategoryService = (function() { - /** - * Constructs a new Value. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.ads.admanager.v1.Report.IValue=} [properties] Properties to set - */ - function Value(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 DeviceCategoryService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceCategoryService + * @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 DeviceCategoryService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Value intValue. - * @member {number|Long|null|undefined} intValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.intValue = null; + (DeviceCategoryService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceCategoryService; - /** - * Value doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.doubleValue = null; + /** + * Creates new DeviceCategoryService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @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 {DeviceCategoryService} RPC service. Useful where requests and/or responses are streamed. + */ + DeviceCategoryService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.stringValue = null; + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|getDeviceCategory}. + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @typedef GetDeviceCategoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.DeviceCategory} [response] DeviceCategory + */ - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.boolValue = null; + /** + * Calls GetDeviceCategory. + * @function getDeviceCategory + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @instance + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} request GetDeviceCategoryRequest message or plain object + * @param {google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategoryCallback} callback Node-style callback called with the error, if any, and DeviceCategory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceCategoryService.prototype.getDeviceCategory = function getDeviceCategory(request, callback) { + return this.rpcCall(getDeviceCategory, $root.google.ads.admanager.v1.GetDeviceCategoryRequest, $root.google.ads.admanager.v1.DeviceCategory, request, callback); + }, "name", { value: "GetDeviceCategory" }); - /** - * Value intListValue. - * @member {google.ads.admanager.v1.Report.Value.IIntList|null|undefined} intListValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.intListValue = null; + /** + * Calls GetDeviceCategory. + * @function getDeviceCategory + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @instance + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} request GetDeviceCategoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Value stringListValue. - * @member {google.ads.admanager.v1.Report.Value.IStringList|null|undefined} stringListValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.stringListValue = null; + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceCategoryService|listDeviceCategories}. + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @typedef ListDeviceCategoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListDeviceCategoriesResponse} [response] ListDeviceCategoriesResponse + */ - /** - * Value bytesValue. - * @member {Uint8Array|null|undefined} bytesValue - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Value.prototype.bytesValue = null; + /** + * Calls ListDeviceCategories. + * @function listDeviceCategories + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @instance + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} request ListDeviceCategoriesRequest message or plain object + * @param {google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategoriesCallback} callback Node-style callback called with the error, if any, and ListDeviceCategoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceCategoryService.prototype.listDeviceCategories = function listDeviceCategories(request, callback) { + return this.rpcCall(listDeviceCategories, $root.google.ads.admanager.v1.ListDeviceCategoriesRequest, $root.google.ads.admanager.v1.ListDeviceCategoriesResponse, request, callback); + }, "name", { value: "ListDeviceCategories" }); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Calls ListDeviceCategories. + * @function listDeviceCategories + * @memberof google.ads.admanager.v1.DeviceCategoryService + * @instance + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} request ListDeviceCategoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Value value. - * @member {"intValue"|"doubleValue"|"stringValue"|"boolValue"|"intListValue"|"stringListValue"|"bytesValue"|undefined} value - * @memberof google.ads.admanager.v1.Report.Value - * @instance - */ - Object.defineProperty(Value.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue", "boolValue", "intListValue", "stringListValue", "bytesValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + return DeviceCategoryService; + })(); - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {google.ads.admanager.v1.Report.IValue=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + v1.GetDeviceCategoryRequest = (function() { - /** - * Encodes the specified Value message. Does not implicitly {@link google.ads.admanager.v1.Report.Value.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {google.ads.admanager.v1.Report.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.intValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - 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.intListValue != null && Object.hasOwnProperty.call(message, "intListValue")) - $root.google.ads.admanager.v1.Report.Value.IntList.encode(message.intListValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.stringListValue != null && Object.hasOwnProperty.call(message, "stringListValue")) - $root.google.ads.admanager.v1.Report.Value.StringList.encode(message.stringListValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.bytesValue); - return writer; - }; + /** + * Properties of a GetDeviceCategoryRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetDeviceCategoryRequest + * @property {string|null} [name] GetDeviceCategoryRequest name + */ - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {google.ads.admanager.v1.Report.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new GetDeviceCategoryRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetDeviceCategoryRequest. + * @implements IGetDeviceCategoryRequest + * @constructor + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest=} [properties] Properties to set + */ + function GetDeviceCategoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Value} Value - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.intValue = reader.int64(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 6: { - message.intListValue = $root.google.ads.admanager.v1.Report.Value.IntList.decode(reader, reader.uint32()); - break; - } - case 7: { - message.stringListValue = $root.google.ads.admanager.v1.Report.Value.StringList.decode(reader, reader.uint32()); - break; - } - case 8: { - message.bytesValue = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GetDeviceCategoryRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @instance + */ + GetDeviceCategoryRequest.prototype.name = ""; - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Value} Value - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new GetDeviceCategoryRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest instance + */ + GetDeviceCategoryRequest.create = function create(properties) { + return new GetDeviceCategoryRequest(properties); + }; - /** - * Verifies a Value message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Value - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.intListValue != null && message.hasOwnProperty("intListValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.ads.admanager.v1.Report.Value.IntList.verify(message.intListValue); - if (error) - return "intListValue." + error; - } - } - if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.ads.admanager.v1.Report.Value.StringList.verify(message.stringListValue); - if (error) - return "stringListValue." + error; + /** + * Encodes the specified GetDeviceCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} message GetDeviceCategoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceCategoryRequest.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 GetDeviceCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceCategoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceCategoryRequest} message GetDeviceCategoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceCategoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceCategoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetDeviceCategoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) - return "bytesValue: buffer expected"; - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Value) - return object; - var message = new $root.google.ads.admanager.v1.Report.Value(); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.intListValue != null) { - if (typeof object.intListValue !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Value.intListValue: object expected"); - message.intListValue = $root.google.ads.admanager.v1.Report.Value.IntList.fromObject(object.intListValue); - } - if (object.stringListValue != null) { - if (typeof object.stringListValue !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Value.stringListValue: object expected"); - message.stringListValue = $root.google.ads.admanager.v1.Report.Value.StringList.fromObject(object.stringListValue); - } - if (object.bytesValue != null) - if (typeof object.bytesValue === "string") - $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length >= 0) - message.bytesValue = object.bytesValue; - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {google.ads.admanager.v1.Report.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.intListValue != null && message.hasOwnProperty("intListValue")) { - object.intListValue = $root.google.ads.admanager.v1.Report.Value.IntList.toObject(message.intListValue, options); - if (options.oneofs) - object.value = "intListValue"; - } - if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { - object.stringListValue = $root.google.ads.admanager.v1.Report.Value.StringList.toObject(message.stringListValue, options); - if (options.oneofs) - object.value = "stringListValue"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; - if (options.oneofs) - object.value = "bytesValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a GetDeviceCategoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceCategoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Value"; - }; + /** + * Verifies a GetDeviceCategoryRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeviceCategoryRequest.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; + }; - Value.IntList = (function() { + /** + * Creates a GetDeviceCategoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetDeviceCategoryRequest} GetDeviceCategoryRequest + */ + GetDeviceCategoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetDeviceCategoryRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetDeviceCategoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of an IntList. - * @memberof google.ads.admanager.v1.Report.Value - * @interface IIntList - * @property {Array.|null} [values] IntList values - */ + /** + * Creates a plain object from a GetDeviceCategoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {google.ads.admanager.v1.GetDeviceCategoryRequest} message GetDeviceCategoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeviceCategoryRequest.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; + }; - /** - * Constructs a new IntList. - * @memberof google.ads.admanager.v1.Report.Value - * @classdesc Represents an IntList. - * @implements IIntList - * @constructor - * @param {google.ads.admanager.v1.Report.Value.IIntList=} [properties] Properties to set - */ - function IntList(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]]; - } + /** + * Converts this GetDeviceCategoryRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeviceCategoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * IntList values. - * @member {Array.} values - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @instance - */ - IntList.prototype.values = $util.emptyArray; + /** + * Gets the default type url for GetDeviceCategoryRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetDeviceCategoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeviceCategoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetDeviceCategoryRequest"; + }; - /** - * Creates a new IntList instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {google.ads.admanager.v1.Report.Value.IIntList=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Value.IntList} IntList instance - */ - IntList.create = function create(properties) { - return new IntList(properties); - }; + return GetDeviceCategoryRequest; + })(); - /** - * Encodes the specified IntList message. Does not implicitly {@link google.ads.admanager.v1.Report.Value.IntList.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {google.ads.admanager.v1.Report.Value.IIntList} message IntList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.values.length; ++i) - writer.int64(message.values[i]); - writer.ldelim(); - } - return writer; - }; + v1.ListDeviceCategoriesRequest = (function() { - /** - * Encodes the specified IntList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Value.IntList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {google.ads.admanager.v1.Report.Value.IIntList} message IntList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListDeviceCategoriesRequest. + * @memberof google.ads.admanager.v1 + * @interface IListDeviceCategoriesRequest + * @property {string|null} [parent] ListDeviceCategoriesRequest parent + * @property {number|null} [pageSize] ListDeviceCategoriesRequest pageSize + * @property {string|null} [pageToken] ListDeviceCategoriesRequest pageToken + * @property {string|null} [filter] ListDeviceCategoriesRequest filter + * @property {string|null} [orderBy] ListDeviceCategoriesRequest orderBy + * @property {number|null} [skip] ListDeviceCategoriesRequest skip + */ - /** - * Decodes an IntList message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Value.IntList} IntList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Value.IntList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.values.push(reader.int64()); - } else - message.values.push(reader.int64()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new ListDeviceCategoriesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListDeviceCategoriesRequest. + * @implements IListDeviceCategoriesRequest + * @constructor + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest=} [properties] Properties to set + */ + function ListDeviceCategoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an IntList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Value.IntList} IntList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListDeviceCategoriesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.parent = ""; - /** - * Verifies an IntList message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntList.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) - if (!$util.isInteger(message.values[i]) && !(message.values[i] && $util.isInteger(message.values[i].low) && $util.isInteger(message.values[i].high))) - return "values: integer|Long[] expected"; - } - return null; - }; + /** + * ListDeviceCategoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.pageSize = 0; - /** - * Creates an IntList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Value.IntList} IntList - */ - IntList.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Value.IntList) - return object; - var message = new $root.google.ads.admanager.v1.Report.Value.IntList(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.ads.admanager.v1.Report.Value.IntList.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - if ($util.Long) - (message.values[i] = $util.Long.fromValue(object.values[i])).unsigned = false; - else if (typeof object.values[i] === "string") - message.values[i] = parseInt(object.values[i], 10); - else if (typeof object.values[i] === "number") - message.values[i] = object.values[i]; - else if (typeof object.values[i] === "object") - message.values[i] = new $util.LongBits(object.values[i].low >>> 0, object.values[i].high >>> 0).toNumber(); - } - return message; - }; + /** + * ListDeviceCategoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.pageToken = ""; - /** - * Creates a plain object from an IntList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {google.ads.admanager.v1.Report.Value.IntList} message IntList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntList.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) - if (typeof message.values[j] === "number") - object.values[j] = options.longs === String ? String(message.values[j]) : message.values[j]; - else - object.values[j] = options.longs === String ? $util.Long.prototype.toString.call(message.values[j]) : options.longs === Number ? new $util.LongBits(message.values[j].low >>> 0, message.values[j].high >>> 0).toNumber() : message.values[j]; - } - return object; - }; + /** + * ListDeviceCategoriesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.filter = ""; - /** - * Converts this IntList to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @instance - * @returns {Object.} JSON object - */ - IntList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListDeviceCategoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.orderBy = ""; - /** - * Gets the default type url for IntList - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Value.IntList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Value.IntList"; - }; + /** + * ListDeviceCategoriesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + */ + ListDeviceCategoriesRequest.prototype.skip = 0; - return IntList; - })(); + /** + * Creates a new ListDeviceCategoriesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest instance + */ + ListDeviceCategoriesRequest.create = function create(properties) { + return new ListDeviceCategoriesRequest(properties); + }; - Value.StringList = (function() { + /** + * Encodes the specified ListDeviceCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} message ListDeviceCategoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceCategoriesRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; - /** - * Properties of a StringList. - * @memberof google.ads.admanager.v1.Report.Value - * @interface IStringList - * @property {Array.|null} [values] StringList values - */ + /** + * Encodes the specified ListDeviceCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesRequest} message ListDeviceCategoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceCategoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new StringList. - * @memberof google.ads.admanager.v1.Report.Value - * @classdesc Represents a StringList. - * @implements IStringList - * @constructor - * @param {google.ads.admanager.v1.Report.Value.IStringList=} [properties] Properties to set - */ - function StringList(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]]; + /** + * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceCategoriesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCategoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * StringList values. - * @member {Array.} values - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @instance - */ - StringList.prototype.values = $util.emptyArray; - - /** - * Creates a new StringList instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {google.ads.admanager.v1.Report.Value.IStringList=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Value.StringList} StringList instance - */ - StringList.create = function create(properties) { - return new StringList(properties); - }; - - /** - * Encodes the specified StringList message. Does not implicitly {@link google.ads.admanager.v1.Report.Value.StringList.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {google.ads.admanager.v1.Report.Value.IStringList} message StringList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringList.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - return writer; - }; + /** + * Decodes a ListDeviceCategoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceCategoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Value.StringList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {google.ads.admanager.v1.Report.Value.IStringList} message StringList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringList message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Value.StringList} StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Value.StringList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Value.StringList} StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringList message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringList.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) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a StringList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Value.StringList} StringList - */ - StringList.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Value.StringList) - return object; - var message = new $root.google.ads.admanager.v1.Report.Value.StringList(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.ads.admanager.v1.Report.Value.StringList.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a StringList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {google.ads.admanager.v1.Report.Value.StringList} message StringList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringList.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] = message.values[j]; - } - return object; - }; - - /** - * Converts this StringList to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @instance - * @returns {Object.} JSON object - */ - StringList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringList - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Value.StringList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Value.StringList"; - }; - - return StringList; - })(); - - return Value; - })(); - - Report.Sort = (function() { + /** + * Verifies a ListDeviceCategoriesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceCategoriesRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; - /** - * Properties of a Sort. - * @memberof google.ads.admanager.v1.Report - * @interface ISort - * @property {google.ads.admanager.v1.Report.IField|null} [field] Sort field - * @property {boolean|null} [descending] Sort descending - * @property {google.ads.admanager.v1.Report.ISlice|null} [slice] Sort slice - * @property {number|null} [timePeriodIndex] Sort timePeriodIndex - * @property {google.ads.admanager.v1.Report.MetricValueType|null} [metricValueType] Sort metricValueType - */ + /** + * Creates a ListDeviceCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListDeviceCategoriesRequest} ListDeviceCategoriesRequest + */ + ListDeviceCategoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceCategoriesRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListDeviceCategoriesRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; - /** - * Constructs a new Sort. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Sort. - * @implements ISort - * @constructor - * @param {google.ads.admanager.v1.Report.ISort=} [properties] Properties to set - */ - function Sort(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 plain object from a ListDeviceCategoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {google.ads.admanager.v1.ListDeviceCategoriesRequest} message ListDeviceCategoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceCategoriesRequest.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.skip = 0; } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; - /** - * Sort field. - * @member {google.ads.admanager.v1.Report.IField|null|undefined} field - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - */ - Sort.prototype.field = null; + /** + * Converts this ListDeviceCategoriesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeviceCategoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Sort descending. - * @member {boolean} descending - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - */ - Sort.prototype.descending = false; + /** + * Gets the default type url for ListDeviceCategoriesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListDeviceCategoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceCategoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCategoriesRequest"; + }; - /** - * Sort slice. - * @member {google.ads.admanager.v1.Report.ISlice|null|undefined} slice - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - */ - Sort.prototype.slice = null; + return ListDeviceCategoriesRequest; + })(); - /** - * Sort timePeriodIndex. - * @member {number|null|undefined} timePeriodIndex - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - */ - Sort.prototype.timePeriodIndex = null; + v1.ListDeviceCategoriesResponse = (function() { - /** - * Sort metricValueType. - * @member {google.ads.admanager.v1.Report.MetricValueType|null|undefined} metricValueType - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - */ - Sort.prototype.metricValueType = null; + /** + * Properties of a ListDeviceCategoriesResponse. + * @memberof google.ads.admanager.v1 + * @interface IListDeviceCategoriesResponse + * @property {Array.|null} [deviceCategories] ListDeviceCategoriesResponse deviceCategories + * @property {string|null} [nextPageToken] ListDeviceCategoriesResponse nextPageToken + * @property {number|null} [totalSize] ListDeviceCategoriesResponse totalSize + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new ListDeviceCategoriesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListDeviceCategoriesResponse. + * @implements IListDeviceCategoriesResponse + * @constructor + * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse=} [properties] Properties to set + */ + function ListDeviceCategoriesResponse(properties) { + this.deviceCategories = []; + 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]]; + } - // Virtual OneOf for proto3 optional field - Object.defineProperty(Sort.prototype, "_slice", { - get: $util.oneOfGetter($oneOfFields = ["slice"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListDeviceCategoriesResponse deviceCategories. + * @member {Array.} deviceCategories + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @instance + */ + ListDeviceCategoriesResponse.prototype.deviceCategories = $util.emptyArray; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Sort.prototype, "_timePeriodIndex", { - get: $util.oneOfGetter($oneOfFields = ["timePeriodIndex"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListDeviceCategoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @instance + */ + ListDeviceCategoriesResponse.prototype.nextPageToken = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Sort.prototype, "_metricValueType", { - get: $util.oneOfGetter($oneOfFields = ["metricValueType"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListDeviceCategoriesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @instance + */ + ListDeviceCategoriesResponse.prototype.totalSize = 0; - /** - * Creates a new Sort instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {google.ads.admanager.v1.Report.ISort=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Sort} Sort instance - */ - Sort.create = function create(properties) { - return new Sort(properties); - }; + /** + * Creates a new ListDeviceCategoriesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse instance + */ + ListDeviceCategoriesResponse.create = function create(properties) { + return new ListDeviceCategoriesResponse(properties); + }; - /** - * Encodes the specified Sort message. Does not implicitly {@link google.ads.admanager.v1.Report.Sort.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {google.ads.admanager.v1.Report.ISort} message Sort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sort.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - $root.google.ads.admanager.v1.Report.Field.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.descending != null && Object.hasOwnProperty.call(message, "descending")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.descending); - if (message.slice != null && Object.hasOwnProperty.call(message, "slice")) - $root.google.ads.admanager.v1.Report.Slice.encode(message.slice, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timePeriodIndex != null && Object.hasOwnProperty.call(message, "timePeriodIndex")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.timePeriodIndex); - if (message.metricValueType != null && Object.hasOwnProperty.call(message, "metricValueType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.metricValueType); - return writer; - }; + /** + * Encodes the specified ListDeviceCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse} message ListDeviceCategoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceCategoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceCategories != null && message.deviceCategories.length) + for (var i = 0; i < message.deviceCategories.length; ++i) + $root.google.ads.admanager.v1.DeviceCategory.encode(message.deviceCategories[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; - /** - * Encodes the specified Sort message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Sort.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {google.ads.admanager.v1.Report.ISort} message Sort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sort.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListDeviceCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceCategoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceCategoriesResponse} message ListDeviceCategoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceCategoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Sort message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Sort} Sort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sort.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Sort(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceCategoriesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceCategoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.deviceCategories && message.deviceCategories.length)) + message.deviceCategories = []; + message.deviceCategories.push($root.google.ads.admanager.v1.DeviceCategory.decode(reader, reader.uint32())); break; - switch (tag >>> 3) { - case 1: { - message.field = $root.google.ads.admanager.v1.Report.Field.decode(reader, reader.uint32()); - break; - } - case 2: { - message.descending = reader.bool(); - break; - } - case 3: { - message.slice = $root.google.ads.admanager.v1.Report.Slice.decode(reader, reader.uint32()); - break; - } - case 4: { - message.timePeriodIndex = reader.int32(); - break; - } - case 5: { - message.metricValueType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Sort message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Sort} Sort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sort.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Sort message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Sort.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.field != null && message.hasOwnProperty("field")) { - var error = $root.google.ads.admanager.v1.Report.Field.verify(message.field); - if (error) - return "field." + error; - } - if (message.descending != null && message.hasOwnProperty("descending")) - if (typeof message.descending !== "boolean") - return "descending: boolean expected"; - if (message.slice != null && message.hasOwnProperty("slice")) { - properties._slice = 1; - { - var error = $root.google.ads.admanager.v1.Report.Slice.verify(message.slice); - if (error) - return "slice." + error; - } - } - if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { - properties._timePeriodIndex = 1; - if (!$util.isInteger(message.timePeriodIndex)) - return "timePeriodIndex: integer expected"; - } - if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { - properties._metricValueType = 1; - switch (message.metricValueType) { - default: - return "metricValueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - return null; - }; + /** + * Decodes a ListDeviceCategoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceCategoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Sort message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Sort} Sort - */ - Sort.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Sort) - return object; - var message = new $root.google.ads.admanager.v1.Report.Sort(); - if (object.field != null) { - if (typeof object.field !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Sort.field: object expected"); - message.field = $root.google.ads.admanager.v1.Report.Field.fromObject(object.field); - } - if (object.descending != null) - message.descending = Boolean(object.descending); - if (object.slice != null) { - if (typeof object.slice !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Sort.slice: object expected"); - message.slice = $root.google.ads.admanager.v1.Report.Slice.fromObject(object.slice); - } - if (object.timePeriodIndex != null) - message.timePeriodIndex = object.timePeriodIndex | 0; - switch (object.metricValueType) { - default: - if (typeof object.metricValueType === "number") { - message.metricValueType = object.metricValueType; - break; - } - break; - case "PRIMARY": - case 0: - message.metricValueType = 0; - break; - case "PRIMARY_PERCENT_OF_TOTAL": - case 1: - message.metricValueType = 1; - break; - case "COMPARISON": - case 2: - message.metricValueType = 2; - break; - case "COMPARISON_PERCENT_OF_TOTAL": - case 3: - message.metricValueType = 3; - break; - case "ABSOLUTE_CHANGE": - case 4: - message.metricValueType = 4; - break; - case "RELATIVE_CHANGE": - case 5: - message.metricValueType = 5; - break; + /** + * Verifies a ListDeviceCategoriesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceCategoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceCategories != null && message.hasOwnProperty("deviceCategories")) { + if (!Array.isArray(message.deviceCategories)) + return "deviceCategories: array expected"; + for (var i = 0; i < message.deviceCategories.length; ++i) { + var error = $root.google.ads.admanager.v1.DeviceCategory.verify(message.deviceCategories[i]); + if (error) + return "deviceCategories." + error; } - return message; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; - /** - * Creates a plain object from a Sort message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {google.ads.admanager.v1.Report.Sort} message Sort - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Sort.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = null; - object.descending = false; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = $root.google.ads.admanager.v1.Report.Field.toObject(message.field, options); - if (message.descending != null && message.hasOwnProperty("descending")) - object.descending = message.descending; - if (message.slice != null && message.hasOwnProperty("slice")) { - object.slice = $root.google.ads.admanager.v1.Report.Slice.toObject(message.slice, options); - if (options.oneofs) - object._slice = "slice"; - } - if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { - object.timePeriodIndex = message.timePeriodIndex; - if (options.oneofs) - object._timePeriodIndex = "timePeriodIndex"; - } - if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { - object.metricValueType = options.enums === String ? $root.google.ads.admanager.v1.Report.MetricValueType[message.metricValueType] === undefined ? message.metricValueType : $root.google.ads.admanager.v1.Report.MetricValueType[message.metricValueType] : message.metricValueType; - if (options.oneofs) - object._metricValueType = "metricValueType"; - } + /** + * Creates a ListDeviceCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListDeviceCategoriesResponse} ListDeviceCategoriesResponse + */ + ListDeviceCategoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceCategoriesResponse) return object; - }; - - /** - * Converts this Sort to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Sort - * @instance - * @returns {Object.} JSON object - */ - Sort.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Sort - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Sort - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Sort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.ads.admanager.v1.ListDeviceCategoriesResponse(); + if (object.deviceCategories) { + if (!Array.isArray(object.deviceCategories)) + throw TypeError(".google.ads.admanager.v1.ListDeviceCategoriesResponse.deviceCategories: array expected"); + message.deviceCategories = []; + for (var i = 0; i < object.deviceCategories.length; ++i) { + if (typeof object.deviceCategories[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListDeviceCategoriesResponse.deviceCategories: object expected"); + message.deviceCategories[i] = $root.google.ads.admanager.v1.DeviceCategory.fromObject(object.deviceCategories[i]); } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Sort"; - }; - - return Sort; - })(); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; - Report.DataTable = (function() { + /** + * Creates a plain object from a ListDeviceCategoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {google.ads.admanager.v1.ListDeviceCategoriesResponse} message ListDeviceCategoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceCategoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceCategories = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.deviceCategories && message.deviceCategories.length) { + object.deviceCategories = []; + for (var j = 0; j < message.deviceCategories.length; ++j) + object.deviceCategories[j] = $root.google.ads.admanager.v1.DeviceCategory.toObject(message.deviceCategories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; - /** - * Properties of a DataTable. - * @memberof google.ads.admanager.v1.Report - * @interface IDataTable - */ + /** + * Converts this ListDeviceCategoriesResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeviceCategoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new DataTable. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a DataTable. - * @implements IDataTable - * @constructor - * @param {google.ads.admanager.v1.Report.IDataTable=} [properties] Properties to set - */ - function DataTable(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ListDeviceCategoriesResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListDeviceCategoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceCategoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceCategoriesResponse"; + }; - /** - * Creates a new DataTable instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {google.ads.admanager.v1.Report.IDataTable=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.DataTable} DataTable instance - */ - DataTable.create = function create(properties) { - return new DataTable(properties); - }; - - /** - * Encodes the specified DataTable message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {google.ads.admanager.v1.Report.IDataTable} message DataTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + return ListDeviceCategoriesResponse; + })(); - /** - * Encodes the specified DataTable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {google.ads.admanager.v1.Report.IDataTable} message DataTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.DeviceManufacturer = (function() { - /** - * Decodes a DataTable message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.DataTable} DataTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataTable.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.DataTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a DeviceManufacturer. + * @memberof google.ads.admanager.v1 + * @interface IDeviceManufacturer + * @property {string|null} [name] DeviceManufacturer name + * @property {string|null} [displayName] DeviceManufacturer displayName + */ - /** - * Decodes a DataTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.DataTable} DataTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new DeviceManufacturer. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceManufacturer. + * @implements IDeviceManufacturer + * @constructor + * @param {google.ads.admanager.v1.IDeviceManufacturer=} [properties] Properties to set + */ + function DeviceManufacturer(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]]; + } - /** - * Verifies a DataTable message. - * @function verify - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * DeviceManufacturer name. + * @member {string} name + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @instance + */ + DeviceManufacturer.prototype.name = ""; - /** - * Creates a DataTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.DataTable} DataTable - */ - DataTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.DataTable) - return object; - return new $root.google.ads.admanager.v1.Report.DataTable(); - }; + /** + * DeviceManufacturer displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @instance + */ + DeviceManufacturer.prototype.displayName = null; - /** - * Creates a plain object from a DataTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {google.ads.admanager.v1.Report.DataTable} message DataTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataTable.toObject = function toObject() { - return {}; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Converts this DataTable to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.DataTable - * @instance - * @returns {Object.} JSON object - */ - DataTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceManufacturer.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Gets the default type url for DataTable - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.DataTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.DataTable"; - }; + /** + * Creates a new DeviceManufacturer instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturer=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceManufacturer} DeviceManufacturer instance + */ + DeviceManufacturer.create = function create(properties) { + return new DeviceManufacturer(properties); + }; - DataTable.Row = (function() { + /** + * Encodes the specified DeviceManufacturer message. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturer.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturer} message DeviceManufacturer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceManufacturer.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; - /** - * Properties of a Row. - * @memberof google.ads.admanager.v1.Report.DataTable - * @interface IRow - * @property {Array.|null} [dimensionValues] Row dimensionValues - * @property {Array.|null} [metricValueGroups] Row metricValueGroups - */ + /** + * Encodes the specified DeviceManufacturer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturer} message DeviceManufacturer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceManufacturer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Row. - * @memberof google.ads.admanager.v1.Report.DataTable - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.ads.admanager.v1.Report.DataTable.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.dimensionValues = []; - this.metricValueGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a DeviceManufacturer message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DeviceManufacturer} DeviceManufacturer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceManufacturer.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceManufacturer(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Row dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @instance - */ - Row.prototype.dimensionValues = $util.emptyArray; - - /** - * Row metricValueGroups. - * @member {Array.} metricValueGroups - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @instance - */ - Row.prototype.metricValueGroups = $util.emptyArray; + /** + * Decodes a DeviceManufacturer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DeviceManufacturer} DeviceManufacturer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceManufacturer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IRow=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.DataTable.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; + /** + * Verifies a DeviceManufacturer message. + * @function verify + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceManufacturer.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + return null; + }; - /** - * Encodes the specified Row message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.Row.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricValueGroups != null && message.metricValueGroups.length) - for (var i = 0; i < message.metricValueGroups.length; ++i) - $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup.encode(message.metricValueGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a DeviceManufacturer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DeviceManufacturer} DeviceManufacturer + */ + DeviceManufacturer.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceManufacturer) + return object; + var message = new $root.google.ads.admanager.v1.DeviceManufacturer(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a DeviceManufacturer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {google.ads.admanager.v1.DeviceManufacturer} message DeviceManufacturer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceManufacturer.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + return object; + }; - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.DataTable.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.DataTable.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricValueGroups && message.metricValueGroups.length)) - message.metricValueGroups = []; - message.metricValueGroups.push($root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this DeviceManufacturer to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @instance + * @returns {Object.} JSON object + */ + DeviceManufacturer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.DataTable.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Gets the default type url for DeviceManufacturer + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DeviceManufacturer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceManufacturer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceManufacturer"; + }; - /** - * Verifies a Row message. - * @function verify - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - if (message.metricValueGroups != null && message.hasOwnProperty("metricValueGroups")) { - if (!Array.isArray(message.metricValueGroups)) - return "metricValueGroups: array expected"; - for (var i = 0; i < message.metricValueGroups.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup.verify(message.metricValueGroups[i]); - if (error) - return "metricValueGroups." + error; - } - } - return null; - }; + return DeviceManufacturer; + })(); - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.DataTable.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.DataTable.Row) - return object; - var message = new $root.google.ads.admanager.v1.Report.DataTable.Row(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.Row.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.Row.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.dimensionValues[i]); - } - } - if (object.metricValueGroups) { - if (!Array.isArray(object.metricValueGroups)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.Row.metricValueGroups: array expected"); - message.metricValueGroups = []; - for (var i = 0; i < object.metricValueGroups.length; ++i) { - if (typeof object.metricValueGroups[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.Row.metricValueGroups: object expected"); - message.metricValueGroups[i] = $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup.fromObject(object.metricValueGroups[i]); - } - } - return message; - }; + v1.DeviceManufacturerService = (function() { - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {google.ads.admanager.v1.Report.DataTable.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionValues = []; - object.metricValueGroups = []; - } - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.dimensionValues[j], options); - } - if (message.metricValueGroups && message.metricValueGroups.length) { - object.metricValueGroups = []; - for (var j = 0; j < message.metricValueGroups.length; ++j) - object.metricValueGroups[j] = $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup.toObject(message.metricValueGroups[j], options); - } - return object; - }; + /** + * Constructs a new DeviceManufacturerService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceManufacturerService + * @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 DeviceManufacturerService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + (DeviceManufacturerService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DeviceManufacturerService; - /** - * Gets the default type url for Row - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.DataTable.Row - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.DataTable.Row"; - }; + /** + * Creates new DeviceManufacturerService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @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 {DeviceManufacturerService} RPC service. Useful where requests and/or responses are streamed. + */ + DeviceManufacturerService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - return Row; - })(); + /** + * Callback as used by {@link google.ads.admanager.v1.DeviceManufacturerService|getDeviceManufacturer}. + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @typedef GetDeviceManufacturerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.DeviceManufacturer} [response] DeviceManufacturer + */ - DataTable.MetricValueGroup = (function() { + /** + * Calls GetDeviceManufacturer. + * @function getDeviceManufacturer + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @instance + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest} request GetDeviceManufacturerRequest message or plain object + * @param {google.ads.admanager.v1.DeviceManufacturerService.GetDeviceManufacturerCallback} callback Node-style callback called with the error, if any, and DeviceManufacturer + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManufacturerService.prototype.getDeviceManufacturer = function getDeviceManufacturer(request, callback) { + return this.rpcCall(getDeviceManufacturer, $root.google.ads.admanager.v1.GetDeviceManufacturerRequest, $root.google.ads.admanager.v1.DeviceManufacturer, request, callback); + }, "name", { value: "GetDeviceManufacturer" }); - /** - * Properties of a MetricValueGroup. - * @memberof google.ads.admanager.v1.Report.DataTable - * @interface IMetricValueGroup - * @property {Array.|null} [primaryValues] MetricValueGroup primaryValues - * @property {Array.|null} [primaryPercentOfTotalValues] MetricValueGroup primaryPercentOfTotalValues - * @property {Array.|null} [comparisonValues] MetricValueGroup comparisonValues - * @property {Array.|null} [comparisonPercentOfTotalValues] MetricValueGroup comparisonPercentOfTotalValues - * @property {Array.|null} [absoluteChangeValues] MetricValueGroup absoluteChangeValues - * @property {Array.|null} [relativeChangeValues] MetricValueGroup relativeChangeValues - * @property {Array.|null} [flagValues] MetricValueGroup flagValues - */ + /** + * Calls GetDeviceManufacturer. + * @function getDeviceManufacturer + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @instance + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest} request GetDeviceManufacturerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new MetricValueGroup. - * @memberof google.ads.admanager.v1.Report.DataTable - * @classdesc Represents a MetricValueGroup. - * @implements IMetricValueGroup - * @constructor - * @param {google.ads.admanager.v1.Report.DataTable.IMetricValueGroup=} [properties] Properties to set - */ - function MetricValueGroup(properties) { - this.primaryValues = []; - this.primaryPercentOfTotalValues = []; - this.comparisonValues = []; - this.comparisonPercentOfTotalValues = []; - this.absoluteChangeValues = []; - this.relativeChangeValues = []; - this.flagValues = []; - 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.ads.admanager.v1.DeviceManufacturerService|listDeviceManufacturers}. + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @typedef ListDeviceManufacturersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListDeviceManufacturersResponse} [response] ListDeviceManufacturersResponse + */ - /** - * MetricValueGroup primaryValues. - * @member {Array.} primaryValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.primaryValues = $util.emptyArray; + /** + * Calls ListDeviceManufacturers. + * @function listDeviceManufacturers + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @instance + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest} request ListDeviceManufacturersRequest message or plain object + * @param {google.ads.admanager.v1.DeviceManufacturerService.ListDeviceManufacturersCallback} callback Node-style callback called with the error, if any, and ListDeviceManufacturersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeviceManufacturerService.prototype.listDeviceManufacturers = function listDeviceManufacturers(request, callback) { + return this.rpcCall(listDeviceManufacturers, $root.google.ads.admanager.v1.ListDeviceManufacturersRequest, $root.google.ads.admanager.v1.ListDeviceManufacturersResponse, request, callback); + }, "name", { value: "ListDeviceManufacturers" }); - /** - * MetricValueGroup primaryPercentOfTotalValues. - * @member {Array.} primaryPercentOfTotalValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.primaryPercentOfTotalValues = $util.emptyArray; + /** + * Calls ListDeviceManufacturers. + * @function listDeviceManufacturers + * @memberof google.ads.admanager.v1.DeviceManufacturerService + * @instance + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest} request ListDeviceManufacturersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * MetricValueGroup comparisonValues. - * @member {Array.} comparisonValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.comparisonValues = $util.emptyArray; + return DeviceManufacturerService; + })(); - /** - * MetricValueGroup comparisonPercentOfTotalValues. - * @member {Array.} comparisonPercentOfTotalValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.comparisonPercentOfTotalValues = $util.emptyArray; + v1.GetDeviceManufacturerRequest = (function() { - /** - * MetricValueGroup absoluteChangeValues. - * @member {Array.} absoluteChangeValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.absoluteChangeValues = $util.emptyArray; + /** + * Properties of a GetDeviceManufacturerRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetDeviceManufacturerRequest + * @property {string|null} [name] GetDeviceManufacturerRequest name + */ - /** - * MetricValueGroup relativeChangeValues. - * @member {Array.} relativeChangeValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.relativeChangeValues = $util.emptyArray; + /** + * Constructs a new GetDeviceManufacturerRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetDeviceManufacturerRequest. + * @implements IGetDeviceManufacturerRequest + * @constructor + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest=} [properties] Properties to set + */ + function GetDeviceManufacturerRequest(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]]; + } - /** - * MetricValueGroup flagValues. - * @member {Array.} flagValues - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - */ - MetricValueGroup.prototype.flagValues = $util.emptyArray; + /** + * GetDeviceManufacturerRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @instance + */ + GetDeviceManufacturerRequest.prototype.name = ""; - /** - * Creates a new MetricValueGroup instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IMetricValueGroup=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.DataTable.MetricValueGroup} MetricValueGroup instance - */ - MetricValueGroup.create = function create(properties) { - return new MetricValueGroup(properties); - }; + /** + * Creates a new GetDeviceManufacturerRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetDeviceManufacturerRequest} GetDeviceManufacturerRequest instance + */ + GetDeviceManufacturerRequest.create = function create(properties) { + return new GetDeviceManufacturerRequest(properties); + }; - /** - * Encodes the specified MetricValueGroup message. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.MetricValueGroup.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IMetricValueGroup} message MetricValueGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValueGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primaryValues != null && message.primaryValues.length) - for (var i = 0; i < message.primaryValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.primaryValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.primaryPercentOfTotalValues != null && message.primaryPercentOfTotalValues.length) - for (var i = 0; i < message.primaryPercentOfTotalValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.primaryPercentOfTotalValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.comparisonValues != null && message.comparisonValues.length) - for (var i = 0; i < message.comparisonValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.comparisonValues[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.comparisonPercentOfTotalValues != null && message.comparisonPercentOfTotalValues.length) - for (var i = 0; i < message.comparisonPercentOfTotalValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.comparisonPercentOfTotalValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.absoluteChangeValues != null && message.absoluteChangeValues.length) - for (var i = 0; i < message.absoluteChangeValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.absoluteChangeValues[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.relativeChangeValues != null && message.relativeChangeValues.length) - for (var i = 0; i < message.relativeChangeValues.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.relativeChangeValues[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.flagValues != null && message.flagValues.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.flagValues.length; ++i) - writer.bool(message.flagValues[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Encodes the specified GetDeviceManufacturerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetDeviceManufacturerRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest} message GetDeviceManufacturerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceManufacturerRequest.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 MetricValueGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DataTable.MetricValueGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {google.ads.admanager.v1.Report.DataTable.IMetricValueGroup} message MetricValueGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValueGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetDeviceManufacturerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetDeviceManufacturerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {google.ads.admanager.v1.IGetDeviceManufacturerRequest} message GetDeviceManufacturerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeviceManufacturerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MetricValueGroup message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.DataTable.MetricValueGroup} MetricValueGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValueGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.primaryValues && message.primaryValues.length)) - message.primaryValues = []; - message.primaryValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.primaryPercentOfTotalValues && message.primaryPercentOfTotalValues.length)) - message.primaryPercentOfTotalValues = []; - message.primaryPercentOfTotalValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.comparisonValues && message.comparisonValues.length)) - message.comparisonValues = []; - message.comparisonValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.comparisonPercentOfTotalValues && message.comparisonPercentOfTotalValues.length)) - message.comparisonPercentOfTotalValues = []; - message.comparisonPercentOfTotalValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.absoluteChangeValues && message.absoluteChangeValues.length)) - message.absoluteChangeValues = []; - message.absoluteChangeValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.relativeChangeValues && message.relativeChangeValues.length)) - message.relativeChangeValues = []; - message.relativeChangeValues.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.flagValues && message.flagValues.length)) - message.flagValues = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.flagValues.push(reader.bool()); - } else - message.flagValues.push(reader.bool()); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a GetDeviceManufacturerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetDeviceManufacturerRequest} GetDeviceManufacturerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceManufacturerRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetDeviceManufacturerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return message; - }; - - /** - * Decodes a MetricValueGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.DataTable.MetricValueGroup} MetricValueGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValueGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a MetricValueGroup message. - * @function verify - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricValueGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primaryValues != null && message.hasOwnProperty("primaryValues")) { - if (!Array.isArray(message.primaryValues)) - return "primaryValues: array expected"; - for (var i = 0; i < message.primaryValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.primaryValues[i]); - if (error) - return "primaryValues." + error; - } - } - if (message.primaryPercentOfTotalValues != null && message.hasOwnProperty("primaryPercentOfTotalValues")) { - if (!Array.isArray(message.primaryPercentOfTotalValues)) - return "primaryPercentOfTotalValues: array expected"; - for (var i = 0; i < message.primaryPercentOfTotalValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.primaryPercentOfTotalValues[i]); - if (error) - return "primaryPercentOfTotalValues." + error; - } - } - if (message.comparisonValues != null && message.hasOwnProperty("comparisonValues")) { - if (!Array.isArray(message.comparisonValues)) - return "comparisonValues: array expected"; - for (var i = 0; i < message.comparisonValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.comparisonValues[i]); - if (error) - return "comparisonValues." + error; - } - } - if (message.comparisonPercentOfTotalValues != null && message.hasOwnProperty("comparisonPercentOfTotalValues")) { - if (!Array.isArray(message.comparisonPercentOfTotalValues)) - return "comparisonPercentOfTotalValues: array expected"; - for (var i = 0; i < message.comparisonPercentOfTotalValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.comparisonPercentOfTotalValues[i]); - if (error) - return "comparisonPercentOfTotalValues." + error; - } - } - if (message.absoluteChangeValues != null && message.hasOwnProperty("absoluteChangeValues")) { - if (!Array.isArray(message.absoluteChangeValues)) - return "absoluteChangeValues: array expected"; - for (var i = 0; i < message.absoluteChangeValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.absoluteChangeValues[i]); - if (error) - return "absoluteChangeValues." + error; - } - } - if (message.relativeChangeValues != null && message.hasOwnProperty("relativeChangeValues")) { - if (!Array.isArray(message.relativeChangeValues)) - return "relativeChangeValues: array expected"; - for (var i = 0; i < message.relativeChangeValues.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.relativeChangeValues[i]); - if (error) - return "relativeChangeValues." + error; - } - } - if (message.flagValues != null && message.hasOwnProperty("flagValues")) { - if (!Array.isArray(message.flagValues)) - return "flagValues: array expected"; - for (var i = 0; i < message.flagValues.length; ++i) - if (typeof message.flagValues[i] !== "boolean") - return "flagValues: boolean[] expected"; - } - return null; - }; + /** + * Decodes a GetDeviceManufacturerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetDeviceManufacturerRequest} GetDeviceManufacturerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeviceManufacturerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a MetricValueGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.DataTable.MetricValueGroup} MetricValueGroup - */ - MetricValueGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup) - return object; - var message = new $root.google.ads.admanager.v1.Report.DataTable.MetricValueGroup(); - if (object.primaryValues) { - if (!Array.isArray(object.primaryValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.primaryValues: array expected"); - message.primaryValues = []; - for (var i = 0; i < object.primaryValues.length; ++i) { - if (typeof object.primaryValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.primaryValues: object expected"); - message.primaryValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.primaryValues[i]); - } - } - if (object.primaryPercentOfTotalValues) { - if (!Array.isArray(object.primaryPercentOfTotalValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.primaryPercentOfTotalValues: array expected"); - message.primaryPercentOfTotalValues = []; - for (var i = 0; i < object.primaryPercentOfTotalValues.length; ++i) { - if (typeof object.primaryPercentOfTotalValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.primaryPercentOfTotalValues: object expected"); - message.primaryPercentOfTotalValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.primaryPercentOfTotalValues[i]); - } - } - if (object.comparisonValues) { - if (!Array.isArray(object.comparisonValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.comparisonValues: array expected"); - message.comparisonValues = []; - for (var i = 0; i < object.comparisonValues.length; ++i) { - if (typeof object.comparisonValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.comparisonValues: object expected"); - message.comparisonValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.comparisonValues[i]); - } - } - if (object.comparisonPercentOfTotalValues) { - if (!Array.isArray(object.comparisonPercentOfTotalValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.comparisonPercentOfTotalValues: array expected"); - message.comparisonPercentOfTotalValues = []; - for (var i = 0; i < object.comparisonPercentOfTotalValues.length; ++i) { - if (typeof object.comparisonPercentOfTotalValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.comparisonPercentOfTotalValues: object expected"); - message.comparisonPercentOfTotalValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.comparisonPercentOfTotalValues[i]); - } - } - if (object.absoluteChangeValues) { - if (!Array.isArray(object.absoluteChangeValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.absoluteChangeValues: array expected"); - message.absoluteChangeValues = []; - for (var i = 0; i < object.absoluteChangeValues.length; ++i) { - if (typeof object.absoluteChangeValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.absoluteChangeValues: object expected"); - message.absoluteChangeValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.absoluteChangeValues[i]); - } - } - if (object.relativeChangeValues) { - if (!Array.isArray(object.relativeChangeValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.relativeChangeValues: array expected"); - message.relativeChangeValues = []; - for (var i = 0; i < object.relativeChangeValues.length; ++i) { - if (typeof object.relativeChangeValues[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.relativeChangeValues: object expected"); - message.relativeChangeValues[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.relativeChangeValues[i]); - } - } - if (object.flagValues) { - if (!Array.isArray(object.flagValues)) - throw TypeError(".google.ads.admanager.v1.Report.DataTable.MetricValueGroup.flagValues: array expected"); - message.flagValues = []; - for (var i = 0; i < object.flagValues.length; ++i) - message.flagValues[i] = Boolean(object.flagValues[i]); - } - return message; - }; + /** + * Verifies a GetDeviceManufacturerRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeviceManufacturerRequest.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 plain object from a MetricValueGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {google.ads.admanager.v1.Report.DataTable.MetricValueGroup} message MetricValueGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricValueGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.primaryValues = []; - object.primaryPercentOfTotalValues = []; - object.comparisonValues = []; - object.comparisonPercentOfTotalValues = []; - object.absoluteChangeValues = []; - object.relativeChangeValues = []; - object.flagValues = []; - } - if (message.primaryValues && message.primaryValues.length) { - object.primaryValues = []; - for (var j = 0; j < message.primaryValues.length; ++j) - object.primaryValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.primaryValues[j], options); - } - if (message.primaryPercentOfTotalValues && message.primaryPercentOfTotalValues.length) { - object.primaryPercentOfTotalValues = []; - for (var j = 0; j < message.primaryPercentOfTotalValues.length; ++j) - object.primaryPercentOfTotalValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.primaryPercentOfTotalValues[j], options); - } - if (message.comparisonValues && message.comparisonValues.length) { - object.comparisonValues = []; - for (var j = 0; j < message.comparisonValues.length; ++j) - object.comparisonValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.comparisonValues[j], options); - } - if (message.comparisonPercentOfTotalValues && message.comparisonPercentOfTotalValues.length) { - object.comparisonPercentOfTotalValues = []; - for (var j = 0; j < message.comparisonPercentOfTotalValues.length; ++j) - object.comparisonPercentOfTotalValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.comparisonPercentOfTotalValues[j], options); - } - if (message.absoluteChangeValues && message.absoluteChangeValues.length) { - object.absoluteChangeValues = []; - for (var j = 0; j < message.absoluteChangeValues.length; ++j) - object.absoluteChangeValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.absoluteChangeValues[j], options); - } - if (message.relativeChangeValues && message.relativeChangeValues.length) { - object.relativeChangeValues = []; - for (var j = 0; j < message.relativeChangeValues.length; ++j) - object.relativeChangeValues[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.relativeChangeValues[j], options); - } - if (message.flagValues && message.flagValues.length) { - object.flagValues = []; - for (var j = 0; j < message.flagValues.length; ++j) - object.flagValues[j] = message.flagValues[j]; - } - return object; - }; + /** + * Creates a GetDeviceManufacturerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetDeviceManufacturerRequest} GetDeviceManufacturerRequest + */ + GetDeviceManufacturerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetDeviceManufacturerRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetDeviceManufacturerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this MetricValueGroup to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @instance - * @returns {Object.} JSON object - */ - MetricValueGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetDeviceManufacturerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {google.ads.admanager.v1.GetDeviceManufacturerRequest} message GetDeviceManufacturerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeviceManufacturerRequest.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; + }; - /** - * Gets the default type url for MetricValueGroup - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.DataTable.MetricValueGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricValueGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Converts this GetDeviceManufacturerRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeviceManufacturerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDeviceManufacturerRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetDeviceManufacturerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeviceManufacturerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetDeviceManufacturerRequest"; + }; + + return GetDeviceManufacturerRequest; + })(); + + v1.ListDeviceManufacturersRequest = (function() { + + /** + * Properties of a ListDeviceManufacturersRequest. + * @memberof google.ads.admanager.v1 + * @interface IListDeviceManufacturersRequest + * @property {string|null} [parent] ListDeviceManufacturersRequest parent + * @property {number|null} [pageSize] ListDeviceManufacturersRequest pageSize + * @property {string|null} [pageToken] ListDeviceManufacturersRequest pageToken + * @property {string|null} [filter] ListDeviceManufacturersRequest filter + * @property {string|null} [orderBy] ListDeviceManufacturersRequest orderBy + * @property {number|null} [skip] ListDeviceManufacturersRequest skip + */ + + /** + * Constructs a new ListDeviceManufacturersRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListDeviceManufacturersRequest. + * @implements IListDeviceManufacturersRequest + * @constructor + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest=} [properties] Properties to set + */ + function ListDeviceManufacturersRequest(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]]; + } + + /** + * ListDeviceManufacturersRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.parent = ""; + + /** + * ListDeviceManufacturersRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.pageSize = 0; + + /** + * ListDeviceManufacturersRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.pageToken = ""; + + /** + * ListDeviceManufacturersRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.filter = ""; + + /** + * ListDeviceManufacturersRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.orderBy = ""; + + /** + * ListDeviceManufacturersRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + */ + ListDeviceManufacturersRequest.prototype.skip = 0; + + /** + * Creates a new ListDeviceManufacturersRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceManufacturersRequest} ListDeviceManufacturersRequest instance + */ + ListDeviceManufacturersRequest.create = function create(properties) { + return new ListDeviceManufacturersRequest(properties); + }; + + /** + * Encodes the specified ListDeviceManufacturersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest} message ListDeviceManufacturersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceManufacturersRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListDeviceManufacturersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersRequest} message ListDeviceManufacturersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceManufacturersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceManufacturersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListDeviceManufacturersRequest} ListDeviceManufacturersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceManufacturersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceManufacturersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.DataTable.MetricValueGroup"; - }; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return MetricValueGroup; - })(); + /** + * Decodes a ListDeviceManufacturersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListDeviceManufacturersRequest} ListDeviceManufacturersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceManufacturersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return DataTable; - })(); + /** + * Verifies a ListDeviceManufacturersRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceManufacturersRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; - Report.Field = (function() { + /** + * Creates a ListDeviceManufacturersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListDeviceManufacturersRequest} ListDeviceManufacturersRequest + */ + ListDeviceManufacturersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceManufacturersRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListDeviceManufacturersRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; - /** - * Properties of a Field. - * @memberof google.ads.admanager.v1.Report - * @interface IField - * @property {google.ads.admanager.v1.Report.Dimension|null} [dimension] Field dimension - * @property {google.ads.admanager.v1.Report.Metric|null} [metric] Field metric - */ + /** + * Creates a plain object from a ListDeviceManufacturersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {google.ads.admanager.v1.ListDeviceManufacturersRequest} message ListDeviceManufacturersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceManufacturersRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; - /** - * Constructs a new Field. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Field. - * @implements IField - * @constructor - * @param {google.ads.admanager.v1.Report.IField=} [properties] Properties to set - */ - function Field(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]]; + /** + * Converts this ListDeviceManufacturersRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeviceManufacturersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeviceManufacturersRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListDeviceManufacturersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceManufacturersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceManufacturersRequest"; + }; - /** - * Field dimension. - * @member {google.ads.admanager.v1.Report.Dimension|null|undefined} dimension - * @memberof google.ads.admanager.v1.Report.Field - * @instance - */ - Field.prototype.dimension = null; + return ListDeviceManufacturersRequest; + })(); - /** - * Field metric. - * @member {google.ads.admanager.v1.Report.Metric|null|undefined} metric - * @memberof google.ads.admanager.v1.Report.Field - * @instance - */ - Field.prototype.metric = null; + v1.ListDeviceManufacturersResponse = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a ListDeviceManufacturersResponse. + * @memberof google.ads.admanager.v1 + * @interface IListDeviceManufacturersResponse + * @property {Array.|null} [deviceManufacturers] ListDeviceManufacturersResponse deviceManufacturers + * @property {string|null} [nextPageToken] ListDeviceManufacturersResponse nextPageToken + * @property {number|null} [totalSize] ListDeviceManufacturersResponse totalSize + */ - /** - * Field field. - * @member {"dimension"|"metric"|undefined} field - * @memberof google.ads.admanager.v1.Report.Field - * @instance - */ - Object.defineProperty(Field.prototype, "field", { - get: $util.oneOfGetter($oneOfFields = ["dimension", "metric"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ListDeviceManufacturersResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListDeviceManufacturersResponse. + * @implements IListDeviceManufacturersResponse + * @constructor + * @param {google.ads.admanager.v1.IListDeviceManufacturersResponse=} [properties] Properties to set + */ + function ListDeviceManufacturersResponse(properties) { + this.deviceManufacturers = []; + 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 Field instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {google.ads.admanager.v1.Report.IField=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Field} Field instance - */ - Field.create = function create(properties) { - return new Field(properties); - }; + /** + * ListDeviceManufacturersResponse deviceManufacturers. + * @member {Array.} deviceManufacturers + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @instance + */ + ListDeviceManufacturersResponse.prototype.deviceManufacturers = $util.emptyArray; - /** - * Encodes the specified Field message. Does not implicitly {@link google.ads.admanager.v1.Report.Field.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {google.ads.admanager.v1.Report.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dimension); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.metric); - return writer; - }; + /** + * ListDeviceManufacturersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @instance + */ + ListDeviceManufacturersResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Field.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {google.ads.admanager.v1.Report.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListDeviceManufacturersResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @instance + */ + ListDeviceManufacturersResponse.prototype.totalSize = 0; - /** - * Decodes a Field message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Field(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Creates a new ListDeviceManufacturersResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListDeviceManufacturersResponse} ListDeviceManufacturersResponse instance + */ + ListDeviceManufacturersResponse.create = function create(properties) { + return new ListDeviceManufacturersResponse(properties); + }; + + /** + * Encodes the specified ListDeviceManufacturersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersResponse} message ListDeviceManufacturersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceManufacturersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceManufacturers != null && message.deviceManufacturers.length) + for (var i = 0; i < message.deviceManufacturers.length; ++i) + $root.google.ads.admanager.v1.DeviceManufacturer.encode(message.deviceManufacturers[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListDeviceManufacturersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListDeviceManufacturersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {google.ads.admanager.v1.IListDeviceManufacturersResponse} message ListDeviceManufacturersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeviceManufacturersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeviceManufacturersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListDeviceManufacturersResponse} ListDeviceManufacturersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceManufacturersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListDeviceManufacturersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.deviceManufacturers && message.deviceManufacturers.length)) + message.deviceManufacturers = []; + message.deviceManufacturers.push($root.google.ads.admanager.v1.DeviceManufacturer.decode(reader, reader.uint32())); break; - switch (tag >>> 3) { - case 1: { - message.dimension = reader.int32(); - break; - } - case 2: { - message.metric = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListDeviceManufacturersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListDeviceManufacturersResponse} ListDeviceManufacturersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeviceManufacturersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Field message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Field.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimension != null && message.hasOwnProperty("dimension")) { - properties.field = 1; - switch (message.dimension) { - default: - return "dimension: enum value expected"; - case 0: - case 242: - case 228: - case 131: - case 230: - case 229: - case 132: - case 227: - case 390: - case 391: - case 64: - case 65: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 101: - case 25: - case 27: - case 30: - case 48: - case 50: - case 52: - case 54: - case 56: - case 58: - case 60: - case 32: - case 34: - case 36: - case 38: - case 40: - case 42: - case 44: - case 46: - case 142: - case 26: - case 29: - case 31: - case 49: - case 51: - case 53: - case 55: - case 57: - case 59: - case 61: - case 33: - case 35: - case 37: - case 39: - case 41: - case 43: - case 45: - case 47: - case 143: - case 63: - case 62: - case 206: - case 207: - case 392: - case 349: - case 346: - case 351: - case 350: - case 347: - case 348: - case 378: - case 379: - case 376: - case 370: - case 371: - case 377: - case 374: - case 375: - case 278: - case 258: - case 259: - case 296: - case 297: - case 280: - case 272: - case 264: - case 265: - case 381: - case 290: - case 291: - case 380: - case 288: - case 274: - case 292: - case 293: - case 294: - case 295: - case 267: - case 269: - case 302: - case 257: - case 285: - case 273: - case 303: - case 298: - case 289: - case 283: - case 282: - case 284: - case 276: - case 299: - case 286: - case 277: - case 262: - case 263: - case 260: - case 261: - case 266: - case 306: - case 307: - case 268: - case 270: - case 300: - case 301: - case 271: - case 275: - case 287: - case 372: - case 373: - case 313: - case 314: - case 315: - case 316: - case 340: - case 341: - case 317: - case 319: - case 320: - case 338: - case 334: - case 335: - case 322: - case 323: - case 339: - case 324: - case 321: - case 325: - case 329: - case 328: - case 331: - case 330: - case 332: - case 333: - case 326: - case 327: - case 318: - case 336: - case 337: - case 383: - case 384: - case 119: - case 120: - case 235: - case 236: - case 369: - case 368: - case 133: - case 134: - case 243: - case 244: - case 246: - case 247: - case 11: - case 12: - case 366: - case 367: - case 174: - case 138: - case 139: - case 148: - case 149: - case 361: - case 344: - case 345: - case 3: - case 4: - case 9: - case 10: - case 22: - case 23: - case 226: - case 15: - case 16: - case 225: - case 185: - case 186: - case 248: - case 249: - case 100: - case 223: - case 224: - case 17: - case 18: - case 19: - case 20: - case 382: - case 401: - case 214: - case 215: - case 188: - case 204: - case 205: - case 250: - case 251: - case 92: - case 85: - case 212: - case 213: - case 176: - case 189: - case 190: - case 175: - case 180: - case 87: - case 191: - case 192: - case 195: - case 196: - case 81: - case 83: - case 201: - case 202: - case 97: - case 86: - case 256: - case 1: - case 181: - case 95: - case 94: - case 96: - case 89: - case 2: - case 98: - case 90: - case 210: - case 211: - case 93: - case 396: - case 208: - case 209: - case 24: - case 304: - case 305: - case 82: - case 84: - case 193: - case 194: - case 187: - case 88: - case 179: - case 140: - case 141: - case 128: - case 129: - case 123: - case 127: - case 311: - case 312: - case 125: - case 245: - case 99: - case 21: - case 130: - case 6: - case 255: - case 254: - case 253: - case 252: - case 117: - case 118: - case 238: - case 237: - case 150: - case 151: - case 152: - case 153: - case 231: - case 239: - case 154: - case 155: - case 156: - case 7: - case 170: - case 171: - case 158: - case 159: - case 8: - case 160: - case 157: - case 161: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 162: - case 163: - case 203: - case 113: - case 144: - case 114: - case 145: - case 362: - case 363: - case 364: - case 365: - case 240: - case 241: - case 13: - case 14: - case 343: - case 352: - case 146: - case 147: - case 597: - case 387: - case 232: - case 233: - case 385: - case 386: - case 388: - case 389: - case 393: - case 394: - case 172: - case 173: - case 5: - case 184: - case 182: - case 183: - case 10000: - case 10001: - case 10002: - case 10003: - case 10004: - case 10005: - case 10006: - case 10007: - case 10008: - case 10009: - case 10010: - case 10011: - case 10012: - case 10013: - case 10014: - case 11000: - case 11001: - case 11002: - case 11003: - case 11004: - case 11005: - case 11006: - case 11007: - case 11008: - case 11009: - case 11010: - case 11011: - case 11012: - case 11013: - case 11014: - case 12000: - case 12001: - case 12002: - case 12003: - case 12004: - case 12005: - case 12006: - case 12007: - case 12008: - case 12009: - case 12010: - case 12011: - case 12012: - case 12013: - case 12014: - case 13000: - case 13001: - case 13002: - case 13003: - case 13004: - case 13005: - case 13006: - case 13007: - case 13008: - case 13009: - case 13010: - case 13011: - case 13012: - case 13013: - case 13014: - case 14000: - case 14001: - case 14002: - case 14003: - case 14004: - case 14005: - case 14006: - case 14007: - case 14008: - case 14009: - case 14010: - case 14011: - case 14012: - case 14013: - case 14014: - case 15000: - case 15001: - case 15002: - case 15003: - case 15004: - case 15005: - case 15006: - case 15007: - case 15008: - case 15009: - case 15010: - case 15011: - case 15012: - case 15013: - case 15014: - case 16000: - case 16001: - case 16002: - case 16003: - case 16004: - case 16005: - case 16006: - case 16007: - case 16008: - case 16009: - case 16010: - case 16011: - case 16012: - case 16013: - case 16014: - case 17000: - case 17001: - case 17002: - case 17003: - case 17004: - case 17005: - case 17006: - case 17007: - case 17008: - case 17009: - case 17010: - case 17011: - case 17012: - case 17013: - case 17014: - case 18000: - case 18001: - case 18002: - case 18003: - case 18004: - case 18005: - case 18006: - case 18007: - case 18008: - case 18009: - case 18010: - case 18011: - case 18012: - case 18013: - case 18014: - case 19000: - case 19001: - case 19002: - case 19003: - case 19004: - case 19005: - case 19006: - case 19007: - case 19008: - case 19009: - case 19010: - case 19011: - case 19012: - case 19013: - case 19014: - case 20000: - case 20001: - case 20002: - case 20003: - case 20004: - case 20005: - case 20006: - case 20007: - case 20008: - case 20009: - case 20010: - case 20011: - case 20012: - case 20013: - case 20014: - case 21000: - case 21001: - case 21002: - case 21003: - case 21004: - case 21005: - case 21006: - case 21007: - case 21008: - case 21009: - case 21010: - case 21011: - case 21012: - case 21013: - case 21014: - case 100000: - case 100001: - case 100002: - case 100003: - case 100004: - case 100005: - case 100006: - case 100007: - case 100008: - case 100009: - case 101000: - case 101001: - case 101002: - case 101003: - case 101004: - case 101005: - case 101006: - case 101007: - case 101008: - case 101009: - break; - } + /** + * Verifies a ListDeviceManufacturersResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeviceManufacturersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deviceManufacturers != null && message.hasOwnProperty("deviceManufacturers")) { + if (!Array.isArray(message.deviceManufacturers)) + return "deviceManufacturers: array expected"; + for (var i = 0; i < message.deviceManufacturers.length; ++i) { + var error = $root.google.ads.admanager.v1.DeviceManufacturer.verify(message.deviceManufacturers[i]); + if (error) + return "deviceManufacturers." + error; } - if (message.metric != null && message.hasOwnProperty("metric")) { - if (properties.field === 1) - return "field: multiple values"; - properties.field = 1; - switch (message.metric) { - default: - return "metric: enum value expected"; - case 0: - case 61: - case 58: - case 57: - case 60: - case 56: - case 59: - case 73: - case 70: - case 69: - case 72: - case 68: - case 71: - case 26: - case 23: - case 24: - case 22: - case 28: - case 27: - case 29: - case 30: - case 41: - case 25: - case 79: - case 76: - case 75: - case 78: - case 74: - case 77: - case 18: - case 15: - case 16: - case 14: - case 20: - case 19: - case 21: - case 31: - case 42: - case 17: - case 38: - case 67: - case 64: - case 63: - case 66: - case 62: - case 65: - case 34: - case 10: - case 262: - case 7: - case 32: - case 8: - case 6: - case 12: - case 11: - case 35: - case 13: - case 40: - case 33: - case 9: - case 264: - case 261: - case 259: - case 260: - case 263: - case 37: - case 5: - case 2: - case 44: - case 3: - case 129: - case 128: - case 131: - case 130: - case 127: - case 126: - case 1: - case 135: - case 136: - case 137: - case 132: - case 133: - case 134: - case 125: - case 124: - case 123: - case 177: - case 178: - case 176: - case 39: - case 36: - case 4: - case 434: - case 435: - case 436: - case 437: - case 438: - case 439: - case 45: - case 43: - case 121: - case 122: - case 92: - case 93: - case 95: - case 96: - case 97: - case 98: - case 99: - case 100: - case 101: - case 102: - case 139: - case 143: - case 144: - case 145: - case 146: - case 147: - case 148: - case 149: - case 150: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 161: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 138: - case 140: - case 175: - case 142: - case 141: - case 103: - case 104: - case 105: - case 106: - case 107: - case 108: - case 109: - case 110: - case 111: - case 112: - case 113: - case 114: - case 115: - case 94: - case 116: - case 117: - case 80: - case 81: - case 82: - case 83: - case 88: - case 87: - case 85: - case 89: - case 86: - case 118: - case 90: - case 84: - break; - } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListDeviceManufacturersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListDeviceManufacturersResponse} ListDeviceManufacturersResponse + */ + ListDeviceManufacturersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListDeviceManufacturersResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListDeviceManufacturersResponse(); + if (object.deviceManufacturers) { + if (!Array.isArray(object.deviceManufacturers)) + throw TypeError(".google.ads.admanager.v1.ListDeviceManufacturersResponse.deviceManufacturers: array expected"); + message.deviceManufacturers = []; + for (var i = 0; i < object.deviceManufacturers.length; ++i) { + if (typeof object.deviceManufacturers[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListDeviceManufacturersResponse.deviceManufacturers: object expected"); + message.deviceManufacturers[i] = $root.google.ads.admanager.v1.DeviceManufacturer.fromObject(object.deviceManufacturers[i]); } - return null; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Field} Field - */ - Field.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Field) - return object; - var message = new $root.google.ads.admanager.v1.Report.Field(); - switch (object.dimension) { - default: - if (typeof object.dimension === "number") { - message.dimension = object.dimension; + /** + * Creates a plain object from a ListDeviceManufacturersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {google.ads.admanager.v1.ListDeviceManufacturersResponse} message ListDeviceManufacturersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeviceManufacturersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceManufacturers = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.deviceManufacturers && message.deviceManufacturers.length) { + object.deviceManufacturers = []; + for (var j = 0; j < message.deviceManufacturers.length; ++j) + object.deviceManufacturers[j] = $root.google.ads.admanager.v1.DeviceManufacturer.toObject(message.deviceManufacturers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListDeviceManufacturersResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeviceManufacturersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeviceManufacturersResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListDeviceManufacturersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeviceManufacturersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListDeviceManufacturersResponse"; + }; + + return ListDeviceManufacturersResponse; + })(); + + v1.EntitySignalsMapping = (function() { + + /** + * Properties of an EntitySignalsMapping. + * @memberof google.ads.admanager.v1 + * @interface IEntitySignalsMapping + * @property {number|Long|null} [audienceSegmentId] EntitySignalsMapping audienceSegmentId + * @property {number|Long|null} [contentBundleId] EntitySignalsMapping contentBundleId + * @property {number|Long|null} [customTargetingValueId] EntitySignalsMapping customTargetingValueId + * @property {string|null} [name] EntitySignalsMapping name + * @property {number|Long|null} [entitySignalsMappingId] EntitySignalsMapping entitySignalsMappingId + * @property {Array.|null} [taxonomyCategoryIds] EntitySignalsMapping taxonomyCategoryIds + */ + + /** + * Constructs a new EntitySignalsMapping. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an EntitySignalsMapping. + * @implements IEntitySignalsMapping + * @constructor + * @param {google.ads.admanager.v1.IEntitySignalsMapping=} [properties] Properties to set + */ + function EntitySignalsMapping(properties) { + this.taxonomyCategoryIds = []; + 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]]; + } + + /** + * EntitySignalsMapping audienceSegmentId. + * @member {number|Long|null|undefined} audienceSegmentId + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.audienceSegmentId = null; + + /** + * EntitySignalsMapping contentBundleId. + * @member {number|Long|null|undefined} contentBundleId + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.contentBundleId = null; + + /** + * EntitySignalsMapping customTargetingValueId. + * @member {number|Long|null|undefined} customTargetingValueId + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.customTargetingValueId = null; + + /** + * EntitySignalsMapping name. + * @member {string} name + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.name = ""; + + /** + * EntitySignalsMapping entitySignalsMappingId. + * @member {number|Long|null|undefined} entitySignalsMappingId + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.entitySignalsMappingId = null; + + /** + * EntitySignalsMapping taxonomyCategoryIds. + * @member {Array.} taxonomyCategoryIds + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + EntitySignalsMapping.prototype.taxonomyCategoryIds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EntitySignalsMapping entity. + * @member {"audienceSegmentId"|"contentBundleId"|"customTargetingValueId"|undefined} entity + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + */ + Object.defineProperty(EntitySignalsMapping.prototype, "entity", { + get: $util.oneOfGetter($oneOfFields = ["audienceSegmentId", "contentBundleId", "customTargetingValueId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EntitySignalsMapping.prototype, "_entitySignalsMappingId", { + get: $util.oneOfGetter($oneOfFields = ["entitySignalsMappingId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EntitySignalsMapping instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {google.ads.admanager.v1.IEntitySignalsMapping=} [properties] Properties to set + * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping instance + */ + EntitySignalsMapping.create = function create(properties) { + return new EntitySignalsMapping(properties); + }; + + /** + * Encodes the specified EntitySignalsMapping message. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {google.ads.admanager.v1.IEntitySignalsMapping} message EntitySignalsMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntitySignalsMapping.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.entitySignalsMappingId != null && Object.hasOwnProperty.call(message, "entitySignalsMappingId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.entitySignalsMappingId); + if (message.audienceSegmentId != null && Object.hasOwnProperty.call(message, "audienceSegmentId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.audienceSegmentId); + if (message.contentBundleId != null && Object.hasOwnProperty.call(message, "contentBundleId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.contentBundleId); + if (message.customTargetingValueId != null && Object.hasOwnProperty.call(message, "customTargetingValueId")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.customTargetingValueId); + if (message.taxonomyCategoryIds != null && message.taxonomyCategoryIds.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.taxonomyCategoryIds.length; ++i) + writer.int64(message.taxonomyCategoryIds[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified EntitySignalsMapping message, length delimited. Does not implicitly {@link google.ads.admanager.v1.EntitySignalsMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {google.ads.admanager.v1.IEntitySignalsMapping} message EntitySignalsMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntitySignalsMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntitySignalsMapping message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntitySignalsMapping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.EntitySignalsMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.audienceSegmentId = reader.int64(); break; } + case 4: { + message.contentBundleId = reader.int64(); + break; + } + case 5: { + message.customTargetingValueId = reader.int64(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.entitySignalsMappingId = reader.int64(); + break; + } + case 6: { + if (!(message.taxonomyCategoryIds && message.taxonomyCategoryIds.length)) + message.taxonomyCategoryIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.taxonomyCategoryIds.push(reader.int64()); + } else + message.taxonomyCategoryIds.push(reader.int64()); + break; + } + default: + reader.skipType(tag & 7); break; - case "DIMENSION_UNSPECIFIED": - case 0: - message.dimension = 0; - break; - case "ADVERTISER_DOMAIN_NAME": - case 242: - message.dimension = 242; - break; - case "ADVERTISER_EXTERNAL_ID": - case 228: - message.dimension = 228; - break; - case "ADVERTISER_ID": - case 131: - message.dimension = 131; - break; - case "ADVERTISER_LABELS": - case 230: - message.dimension = 230; - break; - case "ADVERTISER_LABEL_IDS": - case 229: - message.dimension = 229; - break; - case "ADVERTISER_NAME": - case 132: - message.dimension = 132; - break; - case "ADVERTISER_PRIMARY_CONTACT": - case 227: - message.dimension = 227; - break; - case "AD_LOCATION": - case 390: - message.dimension = 390; - break; - case "AD_LOCATION_NAME": - case 391: - message.dimension = 391; - break; - case "AD_UNIT_CODE": - case 64: - message.dimension = 64; - break; - case "AD_UNIT_CODE_LEVEL_1": - case 65: - message.dimension = 65; - break; - case "AD_UNIT_CODE_LEVEL_10": - case 74: - message.dimension = 74; - break; - case "AD_UNIT_CODE_LEVEL_11": - case 75: - message.dimension = 75; - break; - case "AD_UNIT_CODE_LEVEL_12": - case 76: - message.dimension = 76; - break; - case "AD_UNIT_CODE_LEVEL_13": - case 77: - message.dimension = 77; - break; - case "AD_UNIT_CODE_LEVEL_14": - case 78: - message.dimension = 78; - break; - case "AD_UNIT_CODE_LEVEL_15": - case 79: - message.dimension = 79; - break; - case "AD_UNIT_CODE_LEVEL_16": - case 80: - message.dimension = 80; - break; - case "AD_UNIT_CODE_LEVEL_2": - case 66: - message.dimension = 66; - break; - case "AD_UNIT_CODE_LEVEL_3": - case 67: - message.dimension = 67; - break; - case "AD_UNIT_CODE_LEVEL_4": - case 68: - message.dimension = 68; - break; - case "AD_UNIT_CODE_LEVEL_5": - case 69: - message.dimension = 69; - break; - case "AD_UNIT_CODE_LEVEL_6": - case 70: - message.dimension = 70; - break; - case "AD_UNIT_CODE_LEVEL_7": - case 71: - message.dimension = 71; - break; - case "AD_UNIT_CODE_LEVEL_8": - case 72: - message.dimension = 72; - break; - case "AD_UNIT_CODE_LEVEL_9": - case 73: - message.dimension = 73; - break; - case "AD_UNIT_DEPTH": - case 101: - message.dimension = 101; - break; - case "AD_UNIT_ID": - case 25: - message.dimension = 25; - break; - case "AD_UNIT_ID_ALL_LEVEL": - case 27: - message.dimension = 27; - break; - case "AD_UNIT_ID_LEVEL_1": - case 30: - message.dimension = 30; - break; - case "AD_UNIT_ID_LEVEL_10": - case 48: - message.dimension = 48; - break; - case "AD_UNIT_ID_LEVEL_11": - case 50: - message.dimension = 50; - break; - case "AD_UNIT_ID_LEVEL_12": - case 52: - message.dimension = 52; - break; - case "AD_UNIT_ID_LEVEL_13": - case 54: - message.dimension = 54; - break; - case "AD_UNIT_ID_LEVEL_14": - case 56: - message.dimension = 56; - break; - case "AD_UNIT_ID_LEVEL_15": - case 58: - message.dimension = 58; - break; - case "AD_UNIT_ID_LEVEL_16": - case 60: - message.dimension = 60; - break; - case "AD_UNIT_ID_LEVEL_2": - case 32: - message.dimension = 32; - break; - case "AD_UNIT_ID_LEVEL_3": - case 34: - message.dimension = 34; - break; - case "AD_UNIT_ID_LEVEL_4": - case 36: - message.dimension = 36; - break; - case "AD_UNIT_ID_LEVEL_5": - case 38: - message.dimension = 38; - break; - case "AD_UNIT_ID_LEVEL_6": - case 40: - message.dimension = 40; - break; - case "AD_UNIT_ID_LEVEL_7": - case 42: - message.dimension = 42; - break; - case "AD_UNIT_ID_LEVEL_8": - case 44: - message.dimension = 44; - break; - case "AD_UNIT_ID_LEVEL_9": - case 46: - message.dimension = 46; - break; - case "AD_UNIT_ID_TOP_LEVEL": - case 142: - message.dimension = 142; - break; - case "AD_UNIT_NAME": - case 26: - message.dimension = 26; - break; - case "AD_UNIT_NAME_ALL_LEVEL": - case 29: - message.dimension = 29; - break; - case "AD_UNIT_NAME_LEVEL_1": - case 31: - message.dimension = 31; - break; - case "AD_UNIT_NAME_LEVEL_10": - case 49: - message.dimension = 49; - break; - case "AD_UNIT_NAME_LEVEL_11": - case 51: - message.dimension = 51; - break; - case "AD_UNIT_NAME_LEVEL_12": - case 53: - message.dimension = 53; - break; - case "AD_UNIT_NAME_LEVEL_13": - case 55: - message.dimension = 55; - break; - case "AD_UNIT_NAME_LEVEL_14": - case 57: - message.dimension = 57; - break; - case "AD_UNIT_NAME_LEVEL_15": - case 59: - message.dimension = 59; - break; - case "AD_UNIT_NAME_LEVEL_16": - case 61: - message.dimension = 61; - break; - case "AD_UNIT_NAME_LEVEL_2": - case 33: - message.dimension = 33; - break; - case "AD_UNIT_NAME_LEVEL_3": - case 35: - message.dimension = 35; - break; - case "AD_UNIT_NAME_LEVEL_4": - case 37: - message.dimension = 37; - break; - case "AD_UNIT_NAME_LEVEL_5": - case 39: - message.dimension = 39; - break; - case "AD_UNIT_NAME_LEVEL_6": - case 41: - message.dimension = 41; - break; - case "AD_UNIT_NAME_LEVEL_7": - case 43: - message.dimension = 43; - break; - case "AD_UNIT_NAME_LEVEL_8": - case 45: - message.dimension = 45; - break; - case "AD_UNIT_NAME_LEVEL_9": - case 47: - message.dimension = 47; - break; - case "AD_UNIT_NAME_TOP_LEVEL": - case 143: - message.dimension = 143; - break; - case "AD_UNIT_REWARD_AMOUNT": - case 63: - message.dimension = 63; - break; - case "AD_UNIT_REWARD_TYPE": - case 62: - message.dimension = 62; - break; - case "AD_UNIT_STATUS": - case 206: - message.dimension = 206; - break; - case "AD_UNIT_STATUS_NAME": - case 207: - message.dimension = 207; - break; - case "APP_VERSION": - case 392: - message.dimension = 392; - break; - case "BACKFILL_ADVERTISER_EXTERNAL_ID": - case 349: - message.dimension = 349; - break; - case "BACKFILL_ADVERTISER_ID": - case 346: - message.dimension = 346; - break; - case "BACKFILL_ADVERTISER_LABELS": - case 351: - message.dimension = 351; - break; - case "BACKFILL_ADVERTISER_LABEL_IDS": - case 350: - message.dimension = 350; - break; - case "BACKFILL_ADVERTISER_NAME": - case 347: - message.dimension = 347; - break; - case "BACKFILL_ADVERTISER_PRIMARY_CONTACT": - case 348: - message.dimension = 348; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE": - case 378: - message.dimension = 378; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE_NAME": - case 379: - message.dimension = 379; - break; - case "BACKFILL_CREATIVE_CLICK_THROUGH_URL": - case 376: - message.dimension = 376; - break; - case "BACKFILL_CREATIVE_ID": - case 370: - message.dimension = 370; - break; - case "BACKFILL_CREATIVE_NAME": - case 371: - message.dimension = 371; - break; - case "BACKFILL_CREATIVE_THIRD_PARTY_VENDOR": - case 377: - message.dimension = 377; - break; - case "BACKFILL_CREATIVE_TYPE": - case 374: - message.dimension = 374; - break; - case "BACKFILL_CREATIVE_TYPE_NAME": - case 375: - message.dimension = 375; - break; - case "BACKFILL_LINE_ITEM_ARCHIVED": - case 278: - message.dimension = 278; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION": - case 258: - message.dimension = 258; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": - case 259: - message.dimension = 259; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS": - case 296: - message.dimension = 296; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME": - case 297: - message.dimension = 297; - break; - case "BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY": - case 280: - message.dimension = 280; - break; - case "BACKFILL_LINE_ITEM_COST_PER_UNIT": - case 272: - message.dimension = 272; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE": - case 264: - message.dimension = 264; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE_NAME": - case 265: - message.dimension = 265; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_END_DATE": - case 381: - message.dimension = 381; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE": - case 290: - message.dimension = 290; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": - case 291: - message.dimension = 291; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_START_DATE": - case 380: - message.dimension = 380; - break; - case "BACKFILL_LINE_ITEM_CURRENCY_CODE": - case 288: - message.dimension = 288; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_INDICATOR": - case 274: - message.dimension = 274; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE": - case 292: - message.dimension = 292; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME": - case 293: - message.dimension = 293; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE": - case 294: - message.dimension = 294; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE": - case 295: - message.dimension = 295; - break; - case "BACKFILL_LINE_ITEM_END_DATE": - case 267: - message.dimension = 267; - break; - case "BACKFILL_LINE_ITEM_END_DATE_TIME": - case 269: - message.dimension = 269; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE": - case 302: - message.dimension = 302; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME": - case 257: - message.dimension = 257; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID": - case 285: - message.dimension = 285; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_ID": - case 273: - message.dimension = 273; - break; - case "BACKFILL_LINE_ITEM_FREQUENCY_CAP": - case 303: - message.dimension = 303; - break; - case "BACKFILL_LINE_ITEM_ID": - case 298: - message.dimension = 298; - break; - case "BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP": - case 289: - message.dimension = 289; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_CLICKS": - case 283: - message.dimension = 283; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS": - case 282: - message.dimension = 282; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": - case 284: - message.dimension = 284; - break; - case "BACKFILL_LINE_ITEM_MAKEGOOD": - case 276: - message.dimension = 276; - break; - case "BACKFILL_LINE_ITEM_NAME": - case 299: - message.dimension = 299; - break; - case "BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE": - case 286: - message.dimension = 286; - break; - case "BACKFILL_LINE_ITEM_OPTIMIZABLE": - case 277: - message.dimension = 277; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE": - case 262: - message.dimension = 262; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": - case 263: - message.dimension = 263; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": - case 260: - message.dimension = 260; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": - case 261: - message.dimension = 261; - break; - case "BACKFILL_LINE_ITEM_PRIORITY": - case 266: - message.dimension = 266; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS": - case 306: - message.dimension = 306; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME": - case 307: - message.dimension = 307; - break; - case "BACKFILL_LINE_ITEM_START_DATE": - case 268: - message.dimension = 268; - break; - case "BACKFILL_LINE_ITEM_START_DATE_TIME": - case 270: - message.dimension = 270; - break; - case "BACKFILL_LINE_ITEM_TYPE": - case 300: - message.dimension = 300; - break; - case "BACKFILL_LINE_ITEM_TYPE_NAME": - case 301: - message.dimension = 301; - break; - case "BACKFILL_LINE_ITEM_UNLIMITED_END": - case 271: - message.dimension = 271; - break; - case "BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT": - case 275: - message.dimension = 275; - break; - case "BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE": - case 287: - message.dimension = 287; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_ID": - case 372: - message.dimension = 372; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_NAME": - case 373: - message.dimension = 373; - break; - case "BACKFILL_ORDER_AGENCY": - case 313: - message.dimension = 313; - break; - case "BACKFILL_ORDER_AGENCY_ID": - case 314: - message.dimension = 314; - break; - case "BACKFILL_ORDER_BOOKED_CPC": - case 315: - message.dimension = 315; - break; - case "BACKFILL_ORDER_BOOKED_CPM": - case 316: - message.dimension = 316; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS": - case 340: - message.dimension = 340; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS_NAME": - case 341: - message.dimension = 341; - break; - case "BACKFILL_ORDER_END_DATE": - case 317: - message.dimension = 317; - break; - case "BACKFILL_ORDER_END_DATE_TIME": - case 319: - message.dimension = 319; - break; - case "BACKFILL_ORDER_EXTERNAL_ID": - case 320: - message.dimension = 320; - break; - case "BACKFILL_ORDER_ID": - case 338: - message.dimension = 338; - break; - case "BACKFILL_ORDER_LABELS": - case 334: - message.dimension = 334; - break; - case "BACKFILL_ORDER_LABEL_IDS": - case 335: - message.dimension = 335; - break; - case "BACKFILL_ORDER_LIFETIME_CLICKS": - case 322: - message.dimension = 322; - break; - case "BACKFILL_ORDER_LIFETIME_IMPRESSIONS": - case 323: - message.dimension = 323; - break; - case "BACKFILL_ORDER_NAME": - case 339: - message.dimension = 339; - break; - case "BACKFILL_ORDER_PO_NUMBER": - case 324: - message.dimension = 324; - break; - case "BACKFILL_ORDER_PROGRAMMATIC": - case 321: - message.dimension = 321; - break; - case "BACKFILL_ORDER_SALESPERSON": - case 325: - message.dimension = 325; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE": - case 329: - message.dimension = 329; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID": - case 328: - message.dimension = 328; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS": - case 331: - message.dimension = 331; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID": - case 330: - message.dimension = 330; - break; - case "BACKFILL_ORDER_START_DATE": - case 332: - message.dimension = 332; - break; - case "BACKFILL_ORDER_START_DATE_TIME": - case 333: - message.dimension = 333; - break; - case "BACKFILL_ORDER_TRAFFICKER": - case 326: - message.dimension = 326; - break; - case "BACKFILL_ORDER_TRAFFICKER_ID": - case 327: - message.dimension = 327; - break; - case "BACKFILL_ORDER_UNLIMITED_END": - case 318: - message.dimension = 318; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_ID": - case 336: - message.dimension = 336; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_NAME": - case 337: - message.dimension = 337; - break; - case "BRANDING_TYPE": - case 383: - message.dimension = 383; - break; - case "BRANDING_TYPE_NAME": - case 384: - message.dimension = 384; - break; - case "BROWSER_CATEGORY": - case 119: - message.dimension = 119; - break; - case "BROWSER_CATEGORY_NAME": - case 120: - message.dimension = 120; - break; - case "BROWSER_ID": - case 235: - message.dimension = 235; - break; - case "BROWSER_NAME": - case 236: - message.dimension = 236; - break; - case "CARRIER_ID": - case 369: - message.dimension = 369; - break; - case "CARRIER_NAME": - case 368: - message.dimension = 368; - break; - case "CLASSIFIED_ADVERTISER_ID": - case 133: - message.dimension = 133; - break; - case "CLASSIFIED_ADVERTISER_NAME": - case 134: - message.dimension = 134; - break; - case "CLASSIFIED_BRAND_ID": - case 243: - message.dimension = 243; - break; - case "CLASSIFIED_BRAND_NAME": - case 244: - message.dimension = 244; - break; - case "CONTENT_ID": - case 246: - message.dimension = 246; - break; - case "CONTENT_NAME": - case 247: - message.dimension = 247; - break; - case "COUNTRY_ID": - case 11: - message.dimension = 11; - break; - case "COUNTRY_NAME": - case 12: - message.dimension = 12; - break; - case "CREATIVE_BILLING_TYPE": - case 366: - message.dimension = 366; - break; - case "CREATIVE_BILLING_TYPE_NAME": - case 367: - message.dimension = 367; - break; - case "CREATIVE_CLICK_THROUGH_URL": - case 174: - message.dimension = 174; - break; - case "CREATIVE_ID": - case 138: - message.dimension = 138; - break; - case "CREATIVE_NAME": - case 139: - message.dimension = 139; - break; - case "CREATIVE_TECHNOLOGY": - case 148: - message.dimension = 148; - break; - case "CREATIVE_TECHNOLOGY_NAME": - case 149: - message.dimension = 149; - break; - case "CREATIVE_THIRD_PARTY_VENDOR": - case 361: - message.dimension = 361; - break; - case "CREATIVE_TYPE": - case 344: - message.dimension = 344; - break; - case "CREATIVE_TYPE_NAME": - case 345: - message.dimension = 345; - break; - case "DATE": - case 3: - message.dimension = 3; - break; - case "DAY_OF_WEEK": - case 4: - message.dimension = 4; - break; - case "DEMAND_CHANNEL": - case 9: - message.dimension = 9; - break; - case "DEMAND_CHANNEL_NAME": - case 10: - message.dimension = 10; - break; - case "DEMAND_SUBCHANNEL": - case 22: - message.dimension = 22; - break; - case "DEMAND_SUBCHANNEL_NAME": - case 23: - message.dimension = 23; - break; - case "DEVICE": - case 226: - message.dimension = 226; - break; - case "DEVICE_CATEGORY": - case 15: - message.dimension = 15; - break; - case "DEVICE_CATEGORY_NAME": - case 16: - message.dimension = 16; - break; - case "DEVICE_NAME": - case 225: - message.dimension = 225; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_ID": - case 185: - message.dimension = 185; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": - case 186: - message.dimension = 186; - break; - case "FIRST_LOOK_PRICING_RULE_ID": - case 248: - message.dimension = 248; - break; - case "FIRST_LOOK_PRICING_RULE_NAME": - case 249: - message.dimension = 249; - break; - case "HOUR": - case 100: - message.dimension = 100; - break; - case "INTERACTION_TYPE": - case 223: - message.dimension = 223; - break; - case "INTERACTION_TYPE_NAME": - case 224: - message.dimension = 224; - break; - case "INVENTORY_FORMAT": - case 17: - message.dimension = 17; - break; - case "INVENTORY_FORMAT_NAME": - case 18: - message.dimension = 18; - break; - case "INVENTORY_TYPE": - case 19: - message.dimension = 19; - break; - case "INVENTORY_TYPE_NAME": - case 20: - message.dimension = 20; - break; - case "IS_ADX_DIRECT": - case 382: - message.dimension = 382; - break; - case "IS_FIRST_LOOK_DEAL": - case 401: - message.dimension = 401; - break; - case "KEY_VALUES_ID": - case 214: - message.dimension = 214; - break; - case "KEY_VALUES_NAME": - case 215: - message.dimension = 215; - break; - case "LINE_ITEM_ARCHIVED": - case 188: - message.dimension = 188; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION": - case 204: - message.dimension = 204; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": - case 205: - message.dimension = 205; - break; - case "LINE_ITEM_COMPUTED_STATUS": - case 250: - message.dimension = 250; - break; - case "LINE_ITEM_COMPUTED_STATUS_NAME": - case 251: - message.dimension = 251; - break; - case "LINE_ITEM_CONTRACTED_QUANTITY": - case 92: - message.dimension = 92; - break; - case "LINE_ITEM_COST_PER_UNIT": - case 85: - message.dimension = 85; - break; - case "LINE_ITEM_COST_TYPE": - case 212: - message.dimension = 212; - break; - case "LINE_ITEM_COST_TYPE_NAME": - case 213: - message.dimension = 213; - break; - case "LINE_ITEM_CREATIVE_END_DATE": - case 176: - message.dimension = 176; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE": - case 189: - message.dimension = 189; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": - case 190: - message.dimension = 190; - break; - case "LINE_ITEM_CREATIVE_START_DATE": - case 175: - message.dimension = 175; - break; - case "LINE_ITEM_CURRENCY_CODE": - case 180: - message.dimension = 180; - break; - case "LINE_ITEM_DELIVERY_INDICATOR": - case 87: - message.dimension = 87; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE": - case 191: - message.dimension = 191; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": - case 192: - message.dimension = 192; - break; - case "LINE_ITEM_DISCOUNT_ABSOLUTE": - case 195: - message.dimension = 195; - break; - case "LINE_ITEM_DISCOUNT_PERCENTAGE": - case 196: - message.dimension = 196; - break; - case "LINE_ITEM_END_DATE": - case 81: - message.dimension = 81; - break; - case "LINE_ITEM_END_DATE_TIME": - case 83: - message.dimension = 83; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE": - case 201: - message.dimension = 201; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": - case 202: - message.dimension = 202; - break; - case "LINE_ITEM_EXTERNAL_DEAL_ID": - case 97: - message.dimension = 97; - break; - case "LINE_ITEM_EXTERNAL_ID": - case 86: - message.dimension = 86; - break; - case "LINE_ITEM_FREQUENCY_CAP": - case 256: - message.dimension = 256; - break; - case "LINE_ITEM_ID": - case 1: - message.dimension = 1; - break; - case "LINE_ITEM_LAST_MODIFIED_BY_APP": - case 181: - message.dimension = 181; - break; - case "LINE_ITEM_LIFETIME_CLICKS": - case 95: - message.dimension = 95; - break; - case "LINE_ITEM_LIFETIME_IMPRESSIONS": - case 94: - message.dimension = 94; - break; - case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": - case 96: - message.dimension = 96; - break; - case "LINE_ITEM_MAKEGOOD": - case 89: - message.dimension = 89; - break; - case "LINE_ITEM_NAME": - case 2: - message.dimension = 2; - break; - case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": - case 98: - message.dimension = 98; - break; - case "LINE_ITEM_OPTIMIZABLE": - case 90: - message.dimension = 90; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE": - case 210: - message.dimension = 210; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": - case 211: - message.dimension = 211; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": - case 93: - message.dimension = 93; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": - case 396: - message.dimension = 396; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": - case 208: - message.dimension = 208; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": - case 209: - message.dimension = 209; - break; - case "LINE_ITEM_PRIORITY": - case 24: - message.dimension = 24; - break; - case "LINE_ITEM_RESERVATION_STATUS": - case 304: - message.dimension = 304; - break; - case "LINE_ITEM_RESERVATION_STATUS_NAME": - case 305: - message.dimension = 305; - break; - case "LINE_ITEM_START_DATE": - case 82: - message.dimension = 82; - break; - case "LINE_ITEM_START_DATE_TIME": - case 84: - message.dimension = 84; - break; - case "LINE_ITEM_TYPE": - case 193: - message.dimension = 193; - break; - case "LINE_ITEM_TYPE_NAME": - case 194: - message.dimension = 194; - break; - case "LINE_ITEM_UNLIMITED_END": - case 187: - message.dimension = 187; - break; - case "LINE_ITEM_VALUE_COST_PER_UNIT": - case 88: - message.dimension = 88; - break; - case "LINE_ITEM_WEB_PROPERTY_CODE": - case 179: - message.dimension = 179; - break; - case "MASTER_COMPANION_CREATIVE_ID": - case 140: - message.dimension = 140; - break; - case "MASTER_COMPANION_CREATIVE_NAME": - case 141: - message.dimension = 141; - break; - case "MOBILE_APP_FREE": - case 128: - message.dimension = 128; - break; - case "MOBILE_APP_ICON_URL": - case 129: - message.dimension = 129; - break; - case "MOBILE_APP_ID": - case 123: - message.dimension = 123; - break; - case "MOBILE_APP_NAME": - case 127: - message.dimension = 127; - break; - case "MOBILE_APP_OWNERSHIP_STATUS": - case 311: - message.dimension = 311; - break; - case "MOBILE_APP_OWNERSHIP_STATUS_NAME": - case 312: - message.dimension = 312; - break; - case "MOBILE_APP_STORE": - case 125: - message.dimension = 125; - break; - case "MOBILE_APP_STORE_NAME": - case 245: - message.dimension = 245; - break; - case "MOBILE_INVENTORY_TYPE": - case 99: - message.dimension = 99; - break; - case "MOBILE_INVENTORY_TYPE_NAME": - case 21: - message.dimension = 21; - break; - case "MOBILE_SDK_VERSION_NAME": - case 130: - message.dimension = 130; - break; - case "MONTH_YEAR": - case 6: - message.dimension = 6; - break; - case "NATIVE_AD_FORMAT_ID": - case 255: - message.dimension = 255; - break; - case "NATIVE_AD_FORMAT_NAME": - case 254: - message.dimension = 254; - break; - case "NATIVE_STYLE_ID": - case 253: - message.dimension = 253; - break; - case "NATIVE_STYLE_NAME": - case 252: - message.dimension = 252; - break; - case "OPERATING_SYSTEM_CATEGORY": - case 117: - message.dimension = 117; - break; - case "OPERATING_SYSTEM_CATEGORY_NAME": - case 118: - message.dimension = 118; - break; - case "OPERATING_SYSTEM_VERSION_ID": - case 238: - message.dimension = 238; - break; - case "OPERATING_SYSTEM_VERSION_NAME": - case 237: - message.dimension = 237; - break; - case "ORDER_AGENCY": - case 150: - message.dimension = 150; - break; - case "ORDER_AGENCY_ID": - case 151: - message.dimension = 151; - break; - case "ORDER_BOOKED_CPC": - case 152: - message.dimension = 152; - break; - case "ORDER_BOOKED_CPM": - case 153: - message.dimension = 153; - break; - case "ORDER_DELIVERY_STATUS": - case 231: - message.dimension = 231; - break; - case "ORDER_DELIVERY_STATUS_NAME": - case 239: - message.dimension = 239; - break; - case "ORDER_END_DATE": - case 154: - message.dimension = 154; - break; - case "ORDER_END_DATE_TIME": - case 155: - message.dimension = 155; - break; - case "ORDER_EXTERNAL_ID": - case 156: - message.dimension = 156; - break; - case "ORDER_ID": - case 7: - message.dimension = 7; - break; - case "ORDER_LABELS": - case 170: - message.dimension = 170; - break; - case "ORDER_LABEL_IDS": - case 171: - message.dimension = 171; - break; - case "ORDER_LIFETIME_CLICKS": - case 158: - message.dimension = 158; - break; - case "ORDER_LIFETIME_IMPRESSIONS": - case 159: - message.dimension = 159; - break; - case "ORDER_NAME": - case 8: - message.dimension = 8; - break; - case "ORDER_PO_NUMBER": - case 160: - message.dimension = 160; - break; - case "ORDER_PROGRAMMATIC": - case 157: - message.dimension = 157; - break; - case "ORDER_SALESPERSON": - case 161: - message.dimension = 161; - break; - case "ORDER_SECONDARY_SALESPEOPLE": - case 164: - message.dimension = 164; - break; - case "ORDER_SECONDARY_SALESPEOPLE_ID": - case 165: - message.dimension = 165; - break; - case "ORDER_SECONDARY_TRAFFICKERS": - case 166: - message.dimension = 166; - break; - case "ORDER_SECONDARY_TRAFFICKERS_ID": - case 167: - message.dimension = 167; - break; - case "ORDER_START_DATE": - case 168: - message.dimension = 168; - break; - case "ORDER_START_DATE_TIME": - case 169: - message.dimension = 169; - break; - case "ORDER_TRAFFICKER": - case 162: - message.dimension = 162; - break; - case "ORDER_TRAFFICKER_ID": - case 163: - message.dimension = 163; - break; - case "ORDER_UNLIMITED_END": - case 203: - message.dimension = 203; - break; - case "PLACEMENT_ID": - case 113: - message.dimension = 113; - break; - case "PLACEMENT_ID_ALL": - case 144: - message.dimension = 144; - break; - case "PLACEMENT_NAME": - case 114: - message.dimension = 114; - break; - case "PLACEMENT_NAME_ALL": - case 145: - message.dimension = 145; - break; - case "PLACEMENT_STATUS": - case 362: - message.dimension = 362; - break; - case "PLACEMENT_STATUS_ALL": - case 363: - message.dimension = 363; - break; - case "PLACEMENT_STATUS_NAME": - case 364: - message.dimension = 364; - break; - case "PLACEMENT_STATUS_NAME_ALL": - case 365: - message.dimension = 365; - break; - case "PROGRAMMATIC_BUYER_ID": - case 240: - message.dimension = 240; - break; - case "PROGRAMMATIC_BUYER_NAME": - case 241: - message.dimension = 241; - break; - case "PROGRAMMATIC_CHANNEL": - case 13: - message.dimension = 13; - break; - case "PROGRAMMATIC_CHANNEL_NAME": - case 14: - message.dimension = 14; - break; - case "RENDERED_CREATIVE_SIZE": - case 343: - message.dimension = 343; - break; - case "REQUESTED_AD_SIZES": - case 352: - message.dimension = 352; - break; - case "REQUEST_TYPE": - case 146: - message.dimension = 146; - break; - case "REQUEST_TYPE_NAME": - case 147: - message.dimension = 147; - break; - case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": - case 597: - message.dimension = 597; - break; - case "SITE": - case 387: - message.dimension = 387; - break; - case "TARGETING_ID": - case 232: - message.dimension = 232; - break; - case "TARGETING_NAME": - case 233: - message.dimension = 233; - break; - case "TARGETING_TYPE": - case 385: - message.dimension = 385; - break; - case "TARGETING_TYPE_NAME": - case 386: - message.dimension = 386; - break; - case "TRAFFIC_SOURCE": - case 388: - message.dimension = 388; - break; - case "TRAFFIC_SOURCE_NAME": - case 389: - message.dimension = 389; - break; - case "UNIFIED_PRICING_RULE_ID": - case 393: - message.dimension = 393; - break; - case "UNIFIED_PRICING_RULE_NAME": - case 394: - message.dimension = 394; - break; - case "VIDEO_PLCMT": - case 172: - message.dimension = 172; - break; - case "VIDEO_PLCMT_NAME": - case 173: - message.dimension = 173; - break; - case "WEEK": - case 5: - message.dimension = 5; - break; - case "YIELD_GROUP_BUYER_NAME": - case 184: - message.dimension = 184; - break; - case "YIELD_GROUP_ID": - case 182: - message.dimension = 182; - break; - case "YIELD_GROUP_NAME": - case 183: - message.dimension = 183; - break; - case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": - case 10000: - message.dimension = 10000; - break; - case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": - case 10001: - message.dimension = 10001; - break; - case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": - case 10002: - message.dimension = 10002; - break; - case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": - case 10003: - message.dimension = 10003; - break; - case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": - case 10004: - message.dimension = 10004; - break; - case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": - case 10005: - message.dimension = 10005; - break; - case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": - case 10006: - message.dimension = 10006; - break; - case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": - case 10007: - message.dimension = 10007; - break; - case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": - case 10008: - message.dimension = 10008; - break; - case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": - case 10009: - message.dimension = 10009; - break; - case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": - case 10010: - message.dimension = 10010; - break; - case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": - case 10011: - message.dimension = 10011; - break; - case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": - case 10012: - message.dimension = 10012; - break; - case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": - case 10013: - message.dimension = 10013; - break; - case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": - case 10014: - message.dimension = 10014; - break; - case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": - case 11000: - message.dimension = 11000; - break; - case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": - case 11001: - message.dimension = 11001; - break; - case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": - case 11002: - message.dimension = 11002; - break; - case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": - case 11003: - message.dimension = 11003; - break; - case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": - case 11004: - message.dimension = 11004; - break; - case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": - case 11005: - message.dimension = 11005; - break; - case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": - case 11006: - message.dimension = 11006; - break; - case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": - case 11007: - message.dimension = 11007; - break; - case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": - case 11008: - message.dimension = 11008; - break; - case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": - case 11009: - message.dimension = 11009; - break; - case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": - case 11010: - message.dimension = 11010; - break; - case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": - case 11011: - message.dimension = 11011; - break; - case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": - case 11012: - message.dimension = 11012; - break; - case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": - case 11013: - message.dimension = 11013; - break; - case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": - case 11014: - message.dimension = 11014; - break; - case "ORDER_CUSTOM_FIELD_0_OPTION_ID": - case 12000: - message.dimension = 12000; - break; - case "ORDER_CUSTOM_FIELD_1_OPTION_ID": - case 12001: - message.dimension = 12001; - break; - case "ORDER_CUSTOM_FIELD_2_OPTION_ID": - case 12002: - message.dimension = 12002; - break; - case "ORDER_CUSTOM_FIELD_3_OPTION_ID": - case 12003: - message.dimension = 12003; - break; - case "ORDER_CUSTOM_FIELD_4_OPTION_ID": - case 12004: - message.dimension = 12004; - break; - case "ORDER_CUSTOM_FIELD_5_OPTION_ID": - case 12005: - message.dimension = 12005; - break; - case "ORDER_CUSTOM_FIELD_6_OPTION_ID": - case 12006: - message.dimension = 12006; - break; - case "ORDER_CUSTOM_FIELD_7_OPTION_ID": - case 12007: - message.dimension = 12007; - break; - case "ORDER_CUSTOM_FIELD_8_OPTION_ID": - case 12008: - message.dimension = 12008; - break; - case "ORDER_CUSTOM_FIELD_9_OPTION_ID": - case 12009: - message.dimension = 12009; - break; - case "ORDER_CUSTOM_FIELD_10_OPTION_ID": - case 12010: - message.dimension = 12010; - break; - case "ORDER_CUSTOM_FIELD_11_OPTION_ID": - case 12011: - message.dimension = 12011; - break; - case "ORDER_CUSTOM_FIELD_12_OPTION_ID": - case 12012: - message.dimension = 12012; - break; - case "ORDER_CUSTOM_FIELD_13_OPTION_ID": - case 12013: - message.dimension = 12013; - break; - case "ORDER_CUSTOM_FIELD_14_OPTION_ID": - case 12014: - message.dimension = 12014; - break; - case "ORDER_CUSTOM_FIELD_0_VALUE": - case 13000: - message.dimension = 13000; - break; - case "ORDER_CUSTOM_FIELD_1_VALUE": - case 13001: - message.dimension = 13001; - break; - case "ORDER_CUSTOM_FIELD_2_VALUE": - case 13002: - message.dimension = 13002; - break; - case "ORDER_CUSTOM_FIELD_3_VALUE": - case 13003: - message.dimension = 13003; - break; - case "ORDER_CUSTOM_FIELD_4_VALUE": - case 13004: - message.dimension = 13004; - break; - case "ORDER_CUSTOM_FIELD_5_VALUE": - case 13005: - message.dimension = 13005; - break; - case "ORDER_CUSTOM_FIELD_6_VALUE": - case 13006: - message.dimension = 13006; - break; - case "ORDER_CUSTOM_FIELD_7_VALUE": - case 13007: - message.dimension = 13007; - break; - case "ORDER_CUSTOM_FIELD_8_VALUE": - case 13008: - message.dimension = 13008; - break; - case "ORDER_CUSTOM_FIELD_9_VALUE": - case 13009: - message.dimension = 13009; - break; - case "ORDER_CUSTOM_FIELD_10_VALUE": - case 13010: - message.dimension = 13010; - break; - case "ORDER_CUSTOM_FIELD_11_VALUE": - case 13011: - message.dimension = 13011; - break; - case "ORDER_CUSTOM_FIELD_12_VALUE": - case 13012: - message.dimension = 13012; - break; - case "ORDER_CUSTOM_FIELD_13_VALUE": - case 13013: - message.dimension = 13013; - break; - case "ORDER_CUSTOM_FIELD_14_VALUE": - case 13014: - message.dimension = 13014; - break; - case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": - case 14000: - message.dimension = 14000; - break; - case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": - case 14001: - message.dimension = 14001; - break; - case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": - case 14002: - message.dimension = 14002; - break; - case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": - case 14003: - message.dimension = 14003; - break; - case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": - case 14004: - message.dimension = 14004; - break; - case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": - case 14005: - message.dimension = 14005; - break; - case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": - case 14006: - message.dimension = 14006; - break; - case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": - case 14007: - message.dimension = 14007; - break; - case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": - case 14008: - message.dimension = 14008; - break; - case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": - case 14009: - message.dimension = 14009; - break; - case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": - case 14010: - message.dimension = 14010; - break; - case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": - case 14011: - message.dimension = 14011; - break; - case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": - case 14012: - message.dimension = 14012; - break; - case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": - case 14013: - message.dimension = 14013; - break; - case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": - case 14014: - message.dimension = 14014; - break; - case "CREATIVE_CUSTOM_FIELD_0_VALUE": - case 15000: - message.dimension = 15000; - break; - case "CREATIVE_CUSTOM_FIELD_1_VALUE": - case 15001: - message.dimension = 15001; - break; - case "CREATIVE_CUSTOM_FIELD_2_VALUE": - case 15002: - message.dimension = 15002; - break; - case "CREATIVE_CUSTOM_FIELD_3_VALUE": - case 15003: - message.dimension = 15003; - break; - case "CREATIVE_CUSTOM_FIELD_4_VALUE": - case 15004: - message.dimension = 15004; - break; - case "CREATIVE_CUSTOM_FIELD_5_VALUE": - case 15005: - message.dimension = 15005; - break; - case "CREATIVE_CUSTOM_FIELD_6_VALUE": - case 15006: - message.dimension = 15006; - break; - case "CREATIVE_CUSTOM_FIELD_7_VALUE": - case 15007: - message.dimension = 15007; - break; - case "CREATIVE_CUSTOM_FIELD_8_VALUE": - case 15008: - message.dimension = 15008; - break; - case "CREATIVE_CUSTOM_FIELD_9_VALUE": - case 15009: - message.dimension = 15009; - break; - case "CREATIVE_CUSTOM_FIELD_10_VALUE": - case 15010: - message.dimension = 15010; - break; - case "CREATIVE_CUSTOM_FIELD_11_VALUE": - case 15011: - message.dimension = 15011; - break; - case "CREATIVE_CUSTOM_FIELD_12_VALUE": - case 15012: - message.dimension = 15012; - break; - case "CREATIVE_CUSTOM_FIELD_13_VALUE": - case 15013: - message.dimension = 15013; - break; - case "CREATIVE_CUSTOM_FIELD_14_VALUE": - case 15014: - message.dimension = 15014; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": - case 16000: - message.dimension = 16000; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": - case 16001: - message.dimension = 16001; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": - case 16002: - message.dimension = 16002; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": - case 16003: - message.dimension = 16003; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": - case 16004: - message.dimension = 16004; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": - case 16005: - message.dimension = 16005; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": - case 16006: - message.dimension = 16006; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": - case 16007: - message.dimension = 16007; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": - case 16008: - message.dimension = 16008; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": - case 16009: - message.dimension = 16009; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": - case 16010: - message.dimension = 16010; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": - case 16011: - message.dimension = 16011; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": - case 16012: - message.dimension = 16012; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": - case 16013: - message.dimension = 16013; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": - case 16014: - message.dimension = 16014; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": - case 17000: - message.dimension = 17000; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": - case 17001: - message.dimension = 17001; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": - case 17002: - message.dimension = 17002; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": - case 17003: - message.dimension = 17003; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": - case 17004: - message.dimension = 17004; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": - case 17005: - message.dimension = 17005; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": - case 17006: - message.dimension = 17006; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": - case 17007: - message.dimension = 17007; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": - case 17008: - message.dimension = 17008; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": - case 17009: - message.dimension = 17009; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": - case 17010: - message.dimension = 17010; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": - case 17011: - message.dimension = 17011; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": - case 17012: - message.dimension = 17012; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": - case 17013: - message.dimension = 17013; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": - case 17014: - message.dimension = 17014; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": - case 18000: - message.dimension = 18000; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": - case 18001: - message.dimension = 18001; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": - case 18002: - message.dimension = 18002; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": - case 18003: - message.dimension = 18003; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": - case 18004: - message.dimension = 18004; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": - case 18005: - message.dimension = 18005; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": - case 18006: - message.dimension = 18006; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": - case 18007: - message.dimension = 18007; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": - case 18008: - message.dimension = 18008; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": - case 18009: - message.dimension = 18009; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": - case 18010: - message.dimension = 18010; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": - case 18011: - message.dimension = 18011; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": - case 18012: - message.dimension = 18012; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": - case 18013: - message.dimension = 18013; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": - case 18014: - message.dimension = 18014; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": - case 19000: - message.dimension = 19000; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": - case 19001: - message.dimension = 19001; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": - case 19002: - message.dimension = 19002; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": - case 19003: - message.dimension = 19003; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": - case 19004: - message.dimension = 19004; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": - case 19005: - message.dimension = 19005; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": - case 19006: - message.dimension = 19006; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": - case 19007: - message.dimension = 19007; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": - case 19008: - message.dimension = 19008; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": - case 19009: - message.dimension = 19009; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": - case 19010: - message.dimension = 19010; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": - case 19011: - message.dimension = 19011; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": - case 19012: - message.dimension = 19012; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": - case 19013: - message.dimension = 19013; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": - case 19014: - message.dimension = 19014; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": - case 20000: - message.dimension = 20000; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": - case 20001: - message.dimension = 20001; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": - case 20002: - message.dimension = 20002; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": - case 20003: - message.dimension = 20003; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": - case 20004: - message.dimension = 20004; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": - case 20005: - message.dimension = 20005; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": - case 20006: - message.dimension = 20006; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": - case 20007: - message.dimension = 20007; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": - case 20008: - message.dimension = 20008; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": - case 20009: - message.dimension = 20009; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": - case 20010: - message.dimension = 20010; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": - case 20011: - message.dimension = 20011; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": - case 20012: - message.dimension = 20012; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": - case 20013: - message.dimension = 20013; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": - case 20014: - message.dimension = 20014; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": - case 21000: - message.dimension = 21000; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": - case 21001: - message.dimension = 21001; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": - case 21002: - message.dimension = 21002; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": - case 21003: - message.dimension = 21003; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": - case 21004: - message.dimension = 21004; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": - case 21005: - message.dimension = 21005; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": - case 21006: - message.dimension = 21006; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": - case 21007: - message.dimension = 21007; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": - case 21008: - message.dimension = 21008; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": - case 21009: - message.dimension = 21009; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": - case 21010: - message.dimension = 21010; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": - case 21011: - message.dimension = 21011; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": - case 21012: - message.dimension = 21012; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": - case 21013: - message.dimension = 21013; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": - case 21014: - message.dimension = 21014; - break; - case "CUSTOM_DIMENSION_0_VALUE_ID": - case 100000: - message.dimension = 100000; - break; - case "CUSTOM_DIMENSION_1_VALUE_ID": - case 100001: - message.dimension = 100001; - break; - case "CUSTOM_DIMENSION_2_VALUE_ID": - case 100002: - message.dimension = 100002; - break; - case "CUSTOM_DIMENSION_3_VALUE_ID": - case 100003: - message.dimension = 100003; - break; - case "CUSTOM_DIMENSION_4_VALUE_ID": - case 100004: - message.dimension = 100004; - break; - case "CUSTOM_DIMENSION_5_VALUE_ID": - case 100005: - message.dimension = 100005; - break; - case "CUSTOM_DIMENSION_6_VALUE_ID": - case 100006: - message.dimension = 100006; - break; - case "CUSTOM_DIMENSION_7_VALUE_ID": - case 100007: - message.dimension = 100007; - break; - case "CUSTOM_DIMENSION_8_VALUE_ID": - case 100008: - message.dimension = 100008; - break; - case "CUSTOM_DIMENSION_9_VALUE_ID": - case 100009: - message.dimension = 100009; - break; - case "CUSTOM_DIMENSION_0_VALUE": - case 101000: - message.dimension = 101000; - break; - case "CUSTOM_DIMENSION_1_VALUE": - case 101001: - message.dimension = 101001; - break; - case "CUSTOM_DIMENSION_2_VALUE": - case 101002: - message.dimension = 101002; - break; - case "CUSTOM_DIMENSION_3_VALUE": - case 101003: - message.dimension = 101003; - break; - case "CUSTOM_DIMENSION_4_VALUE": - case 101004: - message.dimension = 101004; - break; - case "CUSTOM_DIMENSION_5_VALUE": - case 101005: - message.dimension = 101005; - break; - case "CUSTOM_DIMENSION_6_VALUE": - case 101006: - message.dimension = 101006; - break; - case "CUSTOM_DIMENSION_7_VALUE": - case 101007: - message.dimension = 101007; - break; - case "CUSTOM_DIMENSION_8_VALUE": - case 101008: - message.dimension = 101008; - break; - case "CUSTOM_DIMENSION_9_VALUE": - case 101009: - message.dimension = 101009; - break; - } - switch (object.metric) { - default: - if (typeof object.metric === "number") { - message.metric = object.metric; - break; - } - break; - case "METRIC_UNSPECIFIED": - case 0: - message.metric = 0; - break; - case "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 61: - message.metric = 61; - break; - case "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 58: - message.metric = 58; - break; - case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 57: - message.metric = 57; - break; - case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 60: - message.metric = 60; - break; - case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 56: - message.metric = 56; - break; - case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 59: - message.metric = 59; - break; - case "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 73: - message.metric = 73; - break; - case "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 70: - message.metric = 70; - break; - case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 69: - message.metric = 69; - break; - case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 72: - message.metric = 72; - break; - case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 68: - message.metric = 68; - break; - case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 71: - message.metric = 71; - break; - case "ADSENSE_AVERAGE_ECPM": - case 26: - message.metric = 26; - break; - case "ADSENSE_CLICKS": - case 23: - message.metric = 23; - break; - case "ADSENSE_CTR": - case 24: - message.metric = 24; - break; - case "ADSENSE_IMPRESSIONS": - case 22: - message.metric = 22; - break; - case "ADSENSE_PERCENT_CLICKS": - case 28: - message.metric = 28; - break; - case "ADSENSE_PERCENT_IMPRESSIONS": - case 27: - message.metric = 27; - break; - case "ADSENSE_PERCENT_REVENUE": - case 29: - message.metric = 29; - break; - case "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": - case 30: - message.metric = 30; - break; - case "ADSENSE_RESPONSES_SERVED": - case 41: - message.metric = 41; - break; - case "ADSENSE_REVENUE": - case 25: - message.metric = 25; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 79: - message.metric = 79; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 76: - message.metric = 76; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 75: - message.metric = 75; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 78: - message.metric = 78; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 74: - message.metric = 74; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 77: - message.metric = 77; - break; - case "AD_EXCHANGE_AVERAGE_ECPM": - case 18: - message.metric = 18; - break; - case "AD_EXCHANGE_CLICKS": - case 15: - message.metric = 15; - break; - case "AD_EXCHANGE_CTR": - case 16: - message.metric = 16; - break; - case "AD_EXCHANGE_IMPRESSIONS": - case 14: - message.metric = 14; - break; - case "AD_EXCHANGE_PERCENT_CLICKS": - case 20: - message.metric = 20; - break; - case "AD_EXCHANGE_PERCENT_IMPRESSIONS": - case 19: - message.metric = 19; - break; - case "AD_EXCHANGE_PERCENT_REVENUE": - case 21: - message.metric = 21; - break; - case "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": - case 31: - message.metric = 31; - break; - case "AD_EXCHANGE_RESPONSES_SERVED": - case 42: - message.metric = 42; - break; - case "AD_EXCHANGE_REVENUE": - case 17: - message.metric = 17; - break; - case "AD_REQUESTS": - case 38: - message.metric = 38; - break; - case "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 67: - message.metric = 67; - break; - case "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 64: - message.metric = 64; - break; - case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 63: - message.metric = 63; - break; - case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 66: - message.metric = 66; - break; - case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 62: - message.metric = 62; - break; - case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 65: - message.metric = 65; - break; - case "AD_SERVER_AVERAGE_ECPM": - case 34: - message.metric = 34; - break; - case "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": - case 10: - message.metric = 10; - break; - case "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": - case 262: - message.metric = 262; - break; - case "AD_SERVER_CLICKS": - case 7: - message.metric = 7; - break; - case "AD_SERVER_CPD_REVENUE": - case 32: - message.metric = 32; - break; - case "AD_SERVER_CTR": - case 8: - message.metric = 8; - break; - case "AD_SERVER_IMPRESSIONS": - case 6: - message.metric = 6; - break; - case "AD_SERVER_PERCENT_CLICKS": - case 12: - message.metric = 12; - break; - case "AD_SERVER_PERCENT_IMPRESSIONS": - case 11: - message.metric = 11; - break; - case "AD_SERVER_PERCENT_REVENUE": - case 35: - message.metric = 35; - break; - case "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": - case 13: - message.metric = 13; - break; - case "AD_SERVER_RESPONSES_SERVED": - case 40: - message.metric = 40; - break; - case "AD_SERVER_REVENUE": - case 33: - message.metric = 33; - break; - case "AD_SERVER_REVENUE_WITHOUT_CPD": - case 9: - message.metric = 9; - break; - case "AD_SERVER_TRACKED_ADS": - case 264: - message.metric = 264; - break; - case "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": - case 261: - message.metric = 261; - break; - case "AD_SERVER_UNFILTERED_CLICKS": - case 259: - message.metric = 259; - break; - case "AD_SERVER_UNFILTERED_IMPRESSIONS": - case 260: - message.metric = 260; - break; - case "AD_SERVER_UNFILTERED_TRACKED_ADS": - case 263: - message.metric = 263; - break; - case "AVERAGE_ECPM": - case 37: - message.metric = 37; - break; - case "AVERAGE_ECPM_WITHOUT_CPD": - case 5: - message.metric = 5; - break; - case "CLICKS": - case 2: - message.metric = 2; - break; - case "CODE_SERVED_COUNT": - case 44: - message.metric = 44; - break; - case "CTR": - case 3: - message.metric = 3; - break; - case "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": - case 129: - message.metric = 129; - break; - case "GOOGLE_SOLD_AUCTION_IMPRESSIONS": - case 128: - message.metric = 128; - break; - case "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": - case 131: - message.metric = 131; - break; - case "GOOGLE_SOLD_IMPRESSIONS": - case 130: - message.metric = 130; - break; - case "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": - case 127: - message.metric = 127; - break; - case "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": - case 126: - message.metric = 126; - break; - case "IMPRESSIONS": - case 1: - message.metric = 1; - break; - case "PARTNER_SALES_FILLED_POD_REQUESTS": - case 135: - message.metric = 135; - break; - case "PARTNER_SALES_FILL_RATE": - case 136: - message.metric = 136; - break; - case "PARTNER_SALES_PARTNER_MATCH_RATE": - case 137: - message.metric = 137; - break; - case "PARTNER_SALES_QUERIES": - case 132: - message.metric = 132; - break; - case "PARTNER_SALES_UNFILLED_IMPRESSIONS": - case 133: - message.metric = 133; - break; - case "PARTNER_SALES_UNMATCHED_QUERIES": - case 134: - message.metric = 134; - break; - case "PARTNER_SOLD_CODE_SERVED": - case 125: - message.metric = 125; - break; - case "PARTNER_SOLD_COVIEWED_IMPRESSIONS": - case 124: - message.metric = 124; - break; - case "PARTNER_SOLD_IMPRESSIONS": - case 123: - message.metric = 123; - break; - case "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": - case 177: - message.metric = 177; - break; - case "PROGRAMMATIC_MATCH_RATE": - case 178: - message.metric = 178; - break; - case "PROGRAMMATIC_RESPONSES_SERVED": - case 176: - message.metric = 176; - break; - case "RESPONSES_SERVED": - case 39: - message.metric = 39; - break; - case "REVENUE": - case 36: - message.metric = 36; - break; - case "REVENUE_WITHOUT_CPD": - case 4: - message.metric = 4; - break; - case "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": - case 434: - message.metric = 434; - break; - case "SERVER_SIDE_UNWRAPPING_CALLOUTS": - case 435: - message.metric = 435; - break; - case "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": - case 436: - message.metric = 436; - break; - case "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": - case 437: - message.metric = 437; - break; - case "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": - case 438: - message.metric = 438; - break; - case "SERVER_SIDE_UNWRAPPING_TIMEOUTS": - case 439: - message.metric = 439; - break; - case "UNFILLED_IMPRESSIONS": - case 45: - message.metric = 45; - break; - case "UNMATCHED_AD_REQUESTS": - case 43: - message.metric = 43; - break; - case "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": - case 121: - message.metric = 121; - break; - case "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": - case 122: - message.metric = 122; - break; - case "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": - case 92: - message.metric = 92; - break; - case "VIDEO_INTERACTION_COLLAPSES": - case 93: - message.metric = 93; - break; - case "VIDEO_INTERACTION_EXPANDS": - case 95: - message.metric = 95; - break; - case "VIDEO_INTERACTION_FULL_SCREENS": - case 96: - message.metric = 96; - break; - case "VIDEO_INTERACTION_MUTES": - case 97: - message.metric = 97; - break; - case "VIDEO_INTERACTION_PAUSES": - case 98: - message.metric = 98; - break; - case "VIDEO_INTERACTION_RESUMES": - case 99: - message.metric = 99; - break; - case "VIDEO_INTERACTION_REWINDS": - case 100: - message.metric = 100; - break; - case "VIDEO_INTERACTION_UNMUTES": - case 101: - message.metric = 101; - break; - case "VIDEO_INTERACTION_VIDEO_SKIPS": - case 102: - message.metric = 102; - break; - case "VIDEO_REAL_TIME_CREATIVE_SERVES": - case 139: - message.metric = 139; - break; - case "VIDEO_REAL_TIME_ERROR_100_COUNT": - case 143: - message.metric = 143; - break; - case "VIDEO_REAL_TIME_ERROR_101_COUNT": - case 144: - message.metric = 144; - break; - case "VIDEO_REAL_TIME_ERROR_102_COUNT": - case 145: - message.metric = 145; - break; - case "VIDEO_REAL_TIME_ERROR_200_COUNT": - case 146: - message.metric = 146; - break; - case "VIDEO_REAL_TIME_ERROR_201_COUNT": - case 147: - message.metric = 147; - break; - case "VIDEO_REAL_TIME_ERROR_202_COUNT": - case 148: - message.metric = 148; - break; - case "VIDEO_REAL_TIME_ERROR_203_COUNT": - case 149: - message.metric = 149; - break; - case "VIDEO_REAL_TIME_ERROR_300_COUNT": - case 150: - message.metric = 150; - break; - case "VIDEO_REAL_TIME_ERROR_301_COUNT": - case 151: - message.metric = 151; - break; - case "VIDEO_REAL_TIME_ERROR_302_COUNT": - case 152: - message.metric = 152; - break; - case "VIDEO_REAL_TIME_ERROR_303_COUNT": - case 153: - message.metric = 153; - break; - case "VIDEO_REAL_TIME_ERROR_400_COUNT": - case 154: - message.metric = 154; - break; - case "VIDEO_REAL_TIME_ERROR_401_COUNT": - case 155: - message.metric = 155; - break; - case "VIDEO_REAL_TIME_ERROR_402_COUNT": - case 156: - message.metric = 156; - break; - case "VIDEO_REAL_TIME_ERROR_403_COUNT": - case 157: - message.metric = 157; - break; - case "VIDEO_REAL_TIME_ERROR_405_COUNT": - case 158: - message.metric = 158; - break; - case "VIDEO_REAL_TIME_ERROR_406_COUNT": - case 159: - message.metric = 159; - break; - case "VIDEO_REAL_TIME_ERROR_407_COUNT": - case 160: - message.metric = 160; - break; - case "VIDEO_REAL_TIME_ERROR_408_COUNT": - case 161: - message.metric = 161; - break; - case "VIDEO_REAL_TIME_ERROR_409_COUNT": - case 162: - message.metric = 162; - break; - case "VIDEO_REAL_TIME_ERROR_410_COUNT": - case 163: - message.metric = 163; - break; - case "VIDEO_REAL_TIME_ERROR_500_COUNT": - case 164: - message.metric = 164; - break; - case "VIDEO_REAL_TIME_ERROR_501_COUNT": - case 165: - message.metric = 165; - break; - case "VIDEO_REAL_TIME_ERROR_502_COUNT": - case 166: - message.metric = 166; - break; - case "VIDEO_REAL_TIME_ERROR_503_COUNT": - case 167: - message.metric = 167; - break; - case "VIDEO_REAL_TIME_ERROR_600_COUNT": - case 168: - message.metric = 168; - break; - case "VIDEO_REAL_TIME_ERROR_601_COUNT": - case 169: - message.metric = 169; - break; - case "VIDEO_REAL_TIME_ERROR_602_COUNT": - case 170: - message.metric = 170; - break; - case "VIDEO_REAL_TIME_ERROR_603_COUNT": - case 171: - message.metric = 171; - break; - case "VIDEO_REAL_TIME_ERROR_604_COUNT": - case 172: - message.metric = 172; - break; - case "VIDEO_REAL_TIME_ERROR_900_COUNT": - case 173: - message.metric = 173; - break; - case "VIDEO_REAL_TIME_ERROR_901_COUNT": - case 174: - message.metric = 174; - break; - case "VIDEO_REAL_TIME_IMPRESSIONS": - case 138: - message.metric = 138; - break; - case "VIDEO_REAL_TIME_MATCHED_QUERIES": - case 140: - message.metric = 140; - break; - case "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": - case 175: - message.metric = 175; - break; - case "VIDEO_REAL_TIME_TOTAL_QUERIES": - case 142: - message.metric = 142; - break; - case "VIDEO_REAL_TIME_UNMATCHED_QUERIES": - case 141: - message.metric = 141; - break; - case "VIDEO_VIEWERSHIP_AUTO_PLAYS": - case 103: - message.metric = 103; - break; - case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": - case 104: - message.metric = 104; - break; - case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": - case 105: - message.metric = 105; - break; - case "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": - case 106: - message.metric = 106; - break; - case "VIDEO_VIEWERSHIP_COMPLETES": - case 107: - message.metric = 107; - break; - case "VIDEO_VIEWERSHIP_COMPLETION_RATE": - case 108: - message.metric = 108; - break; - case "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": - case 109: - message.metric = 109; - break; - case "VIDEO_VIEWERSHIP_FIRST_QUARTILES": - case 110: - message.metric = 110; - break; - case "VIDEO_VIEWERSHIP_MIDPOINTS": - case 111: - message.metric = 111; - break; - case "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": - case 112: - message.metric = 112; - break; - case "VIDEO_VIEWERSHIP_STARTS": - case 113: - message.metric = 113; - break; - case "VIDEO_VIEWERSHIP_THIRD_QUARTILES": - case 114: - message.metric = 114; - break; - case "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": - case 115: - message.metric = 115; - break; - case "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": - case 94: - message.metric = 94; - break; - case "VIDEO_VIEWERSHIP_VIDEO_LENGTH": - case 116: - message.metric = 116; - break; - case "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": - case 117: - message.metric = 117; - break; - case "YIELD_GROUP_AUCTIONS_WON": - case 80: - message.metric = 80; - break; - case "YIELD_GROUP_BIDS": - case 81: - message.metric = 81; - break; - case "YIELD_GROUP_BIDS_IN_AUCTION": - case 82: - message.metric = 82; - break; - case "YIELD_GROUP_CALLOUTS": - case 83: - message.metric = 83; - break; - case "YIELD_GROUP_ESTIMATED_CPM": - case 88: - message.metric = 88; - break; - case "YIELD_GROUP_ESTIMATED_REVENUE": - case 87: - message.metric = 87; - break; - case "YIELD_GROUP_IMPRESSIONS": - case 85: - message.metric = 85; - break; - case "YIELD_GROUP_MEDIATION_FILL_RATE": - case 89: - message.metric = 89; - break; - case "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": - case 86: - message.metric = 86; - break; - case "YIELD_GROUP_MEDIATION_PASSBACKS": - case 118: - message.metric = 118; - break; - case "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": - case 90: - message.metric = 90; - break; - case "YIELD_GROUP_SUCCESSFUL_RESPONSES": - case 84: - message.metric = 84; - break; - } - return message; - }; - - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {google.ads.admanager.v1.Report.Field} message Field - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Field.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dimension != null && message.hasOwnProperty("dimension")) { - object.dimension = options.enums === String ? $root.google.ads.admanager.v1.Report.Dimension[message.dimension] === undefined ? message.dimension : $root.google.ads.admanager.v1.Report.Dimension[message.dimension] : message.dimension; - if (options.oneofs) - object.field = "dimension"; - } - if (message.metric != null && message.hasOwnProperty("metric")) { - object.metric = options.enums === String ? $root.google.ads.admanager.v1.Report.Metric[message.metric] === undefined ? message.metric : $root.google.ads.admanager.v1.Report.Metric[message.metric] : message.metric; - if (options.oneofs) - object.field = "metric"; - } - return object; - }; - - /** - * Converts this Field to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Field - * @instance - * @returns {Object.} JSON object - */ - Field.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Field - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Field - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Field"; - }; - - return Field; - })(); - - Report.Slice = (function() { - - /** - * Properties of a Slice. - * @memberof google.ads.admanager.v1.Report - * @interface ISlice - * @property {google.ads.admanager.v1.Report.Dimension|null} [dimension] Slice dimension - * @property {google.ads.admanager.v1.Report.IValue|null} [value] Slice value - */ - - /** - * Constructs a new Slice. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Slice. - * @implements ISlice - * @constructor - * @param {google.ads.admanager.v1.Report.ISlice=} [properties] Properties to set - */ - function Slice(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]]; - } - - /** - * Slice dimension. - * @member {google.ads.admanager.v1.Report.Dimension} dimension - * @memberof google.ads.admanager.v1.Report.Slice - * @instance - */ - Slice.prototype.dimension = 0; - - /** - * Slice value. - * @member {google.ads.admanager.v1.Report.IValue|null|undefined} value - * @memberof google.ads.admanager.v1.Report.Slice - * @instance - */ - Slice.prototype.value = null; - - /** - * Creates a new Slice instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {google.ads.admanager.v1.Report.ISlice=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Slice} Slice instance - */ - Slice.create = function create(properties) { - return new Slice(properties); - }; - - /** - * Encodes the specified Slice message. Does not implicitly {@link google.ads.admanager.v1.Report.Slice.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {google.ads.admanager.v1.Report.ISlice} message Slice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Slice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dimension); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.ads.admanager.v1.Report.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Slice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {google.ads.admanager.v1.Report.ISlice} message Slice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Slice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Slice message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Slice} Slice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Slice.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Slice(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimension = reader.int32(); - break; - } - case 2: { - message.value = $root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Slice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Slice} Slice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Slice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Slice message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Slice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - switch (message.dimension) { - default: - return "dimension: enum value expected"; - case 0: - case 242: - case 228: - case 131: - case 230: - case 229: - case 132: - case 227: - case 390: - case 391: - case 64: - case 65: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 101: - case 25: - case 27: - case 30: - case 48: - case 50: - case 52: - case 54: - case 56: - case 58: - case 60: - case 32: - case 34: - case 36: - case 38: - case 40: - case 42: - case 44: - case 46: - case 142: - case 26: - case 29: - case 31: - case 49: - case 51: - case 53: - case 55: - case 57: - case 59: - case 61: - case 33: - case 35: - case 37: - case 39: - case 41: - case 43: - case 45: - case 47: - case 143: - case 63: - case 62: - case 206: - case 207: - case 392: - case 349: - case 346: - case 351: - case 350: - case 347: - case 348: - case 378: - case 379: - case 376: - case 370: - case 371: - case 377: - case 374: - case 375: - case 278: - case 258: - case 259: - case 296: - case 297: - case 280: - case 272: - case 264: - case 265: - case 381: - case 290: - case 291: - case 380: - case 288: - case 274: - case 292: - case 293: - case 294: - case 295: - case 267: - case 269: - case 302: - case 257: - case 285: - case 273: - case 303: - case 298: - case 289: - case 283: - case 282: - case 284: - case 276: - case 299: - case 286: - case 277: - case 262: - case 263: - case 260: - case 261: - case 266: - case 306: - case 307: - case 268: - case 270: - case 300: - case 301: - case 271: - case 275: - case 287: - case 372: - case 373: - case 313: - case 314: - case 315: - case 316: - case 340: - case 341: - case 317: - case 319: - case 320: - case 338: - case 334: - case 335: - case 322: - case 323: - case 339: - case 324: - case 321: - case 325: - case 329: - case 328: - case 331: - case 330: - case 332: - case 333: - case 326: - case 327: - case 318: - case 336: - case 337: - case 383: - case 384: - case 119: - case 120: - case 235: - case 236: - case 369: - case 368: - case 133: - case 134: - case 243: - case 244: - case 246: - case 247: - case 11: - case 12: - case 366: - case 367: - case 174: - case 138: - case 139: - case 148: - case 149: - case 361: - case 344: - case 345: - case 3: - case 4: - case 9: - case 10: - case 22: - case 23: - case 226: - case 15: - case 16: - case 225: - case 185: - case 186: - case 248: - case 249: - case 100: - case 223: - case 224: - case 17: - case 18: - case 19: - case 20: - case 382: - case 401: - case 214: - case 215: - case 188: - case 204: - case 205: - case 250: - case 251: - case 92: - case 85: - case 212: - case 213: - case 176: - case 189: - case 190: - case 175: - case 180: - case 87: - case 191: - case 192: - case 195: - case 196: - case 81: - case 83: - case 201: - case 202: - case 97: - case 86: - case 256: - case 1: - case 181: - case 95: - case 94: - case 96: - case 89: - case 2: - case 98: - case 90: - case 210: - case 211: - case 93: - case 396: - case 208: - case 209: - case 24: - case 304: - case 305: - case 82: - case 84: - case 193: - case 194: - case 187: - case 88: - case 179: - case 140: - case 141: - case 128: - case 129: - case 123: - case 127: - case 311: - case 312: - case 125: - case 245: - case 99: - case 21: - case 130: - case 6: - case 255: - case 254: - case 253: - case 252: - case 117: - case 118: - case 238: - case 237: - case 150: - case 151: - case 152: - case 153: - case 231: - case 239: - case 154: - case 155: - case 156: - case 7: - case 170: - case 171: - case 158: - case 159: - case 8: - case 160: - case 157: - case 161: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 162: - case 163: - case 203: - case 113: - case 144: - case 114: - case 145: - case 362: - case 363: - case 364: - case 365: - case 240: - case 241: - case 13: - case 14: - case 343: - case 352: - case 146: - case 147: - case 597: - case 387: - case 232: - case 233: - case 385: - case 386: - case 388: - case 389: - case 393: - case 394: - case 172: - case 173: - case 5: - case 184: - case 182: - case 183: - case 10000: - case 10001: - case 10002: - case 10003: - case 10004: - case 10005: - case 10006: - case 10007: - case 10008: - case 10009: - case 10010: - case 10011: - case 10012: - case 10013: - case 10014: - case 11000: - case 11001: - case 11002: - case 11003: - case 11004: - case 11005: - case 11006: - case 11007: - case 11008: - case 11009: - case 11010: - case 11011: - case 11012: - case 11013: - case 11014: - case 12000: - case 12001: - case 12002: - case 12003: - case 12004: - case 12005: - case 12006: - case 12007: - case 12008: - case 12009: - case 12010: - case 12011: - case 12012: - case 12013: - case 12014: - case 13000: - case 13001: - case 13002: - case 13003: - case 13004: - case 13005: - case 13006: - case 13007: - case 13008: - case 13009: - case 13010: - case 13011: - case 13012: - case 13013: - case 13014: - case 14000: - case 14001: - case 14002: - case 14003: - case 14004: - case 14005: - case 14006: - case 14007: - case 14008: - case 14009: - case 14010: - case 14011: - case 14012: - case 14013: - case 14014: - case 15000: - case 15001: - case 15002: - case 15003: - case 15004: - case 15005: - case 15006: - case 15007: - case 15008: - case 15009: - case 15010: - case 15011: - case 15012: - case 15013: - case 15014: - case 16000: - case 16001: - case 16002: - case 16003: - case 16004: - case 16005: - case 16006: - case 16007: - case 16008: - case 16009: - case 16010: - case 16011: - case 16012: - case 16013: - case 16014: - case 17000: - case 17001: - case 17002: - case 17003: - case 17004: - case 17005: - case 17006: - case 17007: - case 17008: - case 17009: - case 17010: - case 17011: - case 17012: - case 17013: - case 17014: - case 18000: - case 18001: - case 18002: - case 18003: - case 18004: - case 18005: - case 18006: - case 18007: - case 18008: - case 18009: - case 18010: - case 18011: - case 18012: - case 18013: - case 18014: - case 19000: - case 19001: - case 19002: - case 19003: - case 19004: - case 19005: - case 19006: - case 19007: - case 19008: - case 19009: - case 19010: - case 19011: - case 19012: - case 19013: - case 19014: - case 20000: - case 20001: - case 20002: - case 20003: - case 20004: - case 20005: - case 20006: - case 20007: - case 20008: - case 20009: - case 20010: - case 20011: - case 20012: - case 20013: - case 20014: - case 21000: - case 21001: - case 21002: - case 21003: - case 21004: - case 21005: - case 21006: - case 21007: - case 21008: - case 21009: - case 21010: - case 21011: - case 21012: - case 21013: - case 21014: - case 100000: - case 100001: - case 100002: - case 100003: - case 100004: - case 100005: - case 100006: - case 100007: - case 100008: - case 100009: - case 101000: - case 101001: - case 101002: - case 101003: - case 101004: - case 101005: - case 101006: - case 101007: - case 101008: - case 101009: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.ads.admanager.v1.Report.Value.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a Slice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Slice} Slice - */ - Slice.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Slice) - return object; - var message = new $root.google.ads.admanager.v1.Report.Slice(); - switch (object.dimension) { - default: - if (typeof object.dimension === "number") { - message.dimension = object.dimension; - break; - } - break; - case "DIMENSION_UNSPECIFIED": - case 0: - message.dimension = 0; - break; - case "ADVERTISER_DOMAIN_NAME": - case 242: - message.dimension = 242; - break; - case "ADVERTISER_EXTERNAL_ID": - case 228: - message.dimension = 228; - break; - case "ADVERTISER_ID": - case 131: - message.dimension = 131; - break; - case "ADVERTISER_LABELS": - case 230: - message.dimension = 230; - break; - case "ADVERTISER_LABEL_IDS": - case 229: - message.dimension = 229; - break; - case "ADVERTISER_NAME": - case 132: - message.dimension = 132; - break; - case "ADVERTISER_PRIMARY_CONTACT": - case 227: - message.dimension = 227; - break; - case "AD_LOCATION": - case 390: - message.dimension = 390; - break; - case "AD_LOCATION_NAME": - case 391: - message.dimension = 391; - break; - case "AD_UNIT_CODE": - case 64: - message.dimension = 64; - break; - case "AD_UNIT_CODE_LEVEL_1": - case 65: - message.dimension = 65; - break; - case "AD_UNIT_CODE_LEVEL_10": - case 74: - message.dimension = 74; - break; - case "AD_UNIT_CODE_LEVEL_11": - case 75: - message.dimension = 75; - break; - case "AD_UNIT_CODE_LEVEL_12": - case 76: - message.dimension = 76; - break; - case "AD_UNIT_CODE_LEVEL_13": - case 77: - message.dimension = 77; - break; - case "AD_UNIT_CODE_LEVEL_14": - case 78: - message.dimension = 78; - break; - case "AD_UNIT_CODE_LEVEL_15": - case 79: - message.dimension = 79; - break; - case "AD_UNIT_CODE_LEVEL_16": - case 80: - message.dimension = 80; - break; - case "AD_UNIT_CODE_LEVEL_2": - case 66: - message.dimension = 66; - break; - case "AD_UNIT_CODE_LEVEL_3": - case 67: - message.dimension = 67; - break; - case "AD_UNIT_CODE_LEVEL_4": - case 68: - message.dimension = 68; - break; - case "AD_UNIT_CODE_LEVEL_5": - case 69: - message.dimension = 69; - break; - case "AD_UNIT_CODE_LEVEL_6": - case 70: - message.dimension = 70; - break; - case "AD_UNIT_CODE_LEVEL_7": - case 71: - message.dimension = 71; - break; - case "AD_UNIT_CODE_LEVEL_8": - case 72: - message.dimension = 72; - break; - case "AD_UNIT_CODE_LEVEL_9": - case 73: - message.dimension = 73; - break; - case "AD_UNIT_DEPTH": - case 101: - message.dimension = 101; - break; - case "AD_UNIT_ID": - case 25: - message.dimension = 25; - break; - case "AD_UNIT_ID_ALL_LEVEL": - case 27: - message.dimension = 27; - break; - case "AD_UNIT_ID_LEVEL_1": - case 30: - message.dimension = 30; - break; - case "AD_UNIT_ID_LEVEL_10": - case 48: - message.dimension = 48; - break; - case "AD_UNIT_ID_LEVEL_11": - case 50: - message.dimension = 50; - break; - case "AD_UNIT_ID_LEVEL_12": - case 52: - message.dimension = 52; - break; - case "AD_UNIT_ID_LEVEL_13": - case 54: - message.dimension = 54; - break; - case "AD_UNIT_ID_LEVEL_14": - case 56: - message.dimension = 56; - break; - case "AD_UNIT_ID_LEVEL_15": - case 58: - message.dimension = 58; - break; - case "AD_UNIT_ID_LEVEL_16": - case 60: - message.dimension = 60; - break; - case "AD_UNIT_ID_LEVEL_2": - case 32: - message.dimension = 32; - break; - case "AD_UNIT_ID_LEVEL_3": - case 34: - message.dimension = 34; - break; - case "AD_UNIT_ID_LEVEL_4": - case 36: - message.dimension = 36; - break; - case "AD_UNIT_ID_LEVEL_5": - case 38: - message.dimension = 38; - break; - case "AD_UNIT_ID_LEVEL_6": - case 40: - message.dimension = 40; - break; - case "AD_UNIT_ID_LEVEL_7": - case 42: - message.dimension = 42; - break; - case "AD_UNIT_ID_LEVEL_8": - case 44: - message.dimension = 44; - break; - case "AD_UNIT_ID_LEVEL_9": - case 46: - message.dimension = 46; - break; - case "AD_UNIT_ID_TOP_LEVEL": - case 142: - message.dimension = 142; - break; - case "AD_UNIT_NAME": - case 26: - message.dimension = 26; - break; - case "AD_UNIT_NAME_ALL_LEVEL": - case 29: - message.dimension = 29; - break; - case "AD_UNIT_NAME_LEVEL_1": - case 31: - message.dimension = 31; - break; - case "AD_UNIT_NAME_LEVEL_10": - case 49: - message.dimension = 49; - break; - case "AD_UNIT_NAME_LEVEL_11": - case 51: - message.dimension = 51; - break; - case "AD_UNIT_NAME_LEVEL_12": - case 53: - message.dimension = 53; - break; - case "AD_UNIT_NAME_LEVEL_13": - case 55: - message.dimension = 55; - break; - case "AD_UNIT_NAME_LEVEL_14": - case 57: - message.dimension = 57; - break; - case "AD_UNIT_NAME_LEVEL_15": - case 59: - message.dimension = 59; - break; - case "AD_UNIT_NAME_LEVEL_16": - case 61: - message.dimension = 61; - break; - case "AD_UNIT_NAME_LEVEL_2": - case 33: - message.dimension = 33; - break; - case "AD_UNIT_NAME_LEVEL_3": - case 35: - message.dimension = 35; - break; - case "AD_UNIT_NAME_LEVEL_4": - case 37: - message.dimension = 37; - break; - case "AD_UNIT_NAME_LEVEL_5": - case 39: - message.dimension = 39; - break; - case "AD_UNIT_NAME_LEVEL_6": - case 41: - message.dimension = 41; - break; - case "AD_UNIT_NAME_LEVEL_7": - case 43: - message.dimension = 43; - break; - case "AD_UNIT_NAME_LEVEL_8": - case 45: - message.dimension = 45; - break; - case "AD_UNIT_NAME_LEVEL_9": - case 47: - message.dimension = 47; - break; - case "AD_UNIT_NAME_TOP_LEVEL": - case 143: - message.dimension = 143; - break; - case "AD_UNIT_REWARD_AMOUNT": - case 63: - message.dimension = 63; - break; - case "AD_UNIT_REWARD_TYPE": - case 62: - message.dimension = 62; - break; - case "AD_UNIT_STATUS": - case 206: - message.dimension = 206; - break; - case "AD_UNIT_STATUS_NAME": - case 207: - message.dimension = 207; - break; - case "APP_VERSION": - case 392: - message.dimension = 392; - break; - case "BACKFILL_ADVERTISER_EXTERNAL_ID": - case 349: - message.dimension = 349; - break; - case "BACKFILL_ADVERTISER_ID": - case 346: - message.dimension = 346; - break; - case "BACKFILL_ADVERTISER_LABELS": - case 351: - message.dimension = 351; - break; - case "BACKFILL_ADVERTISER_LABEL_IDS": - case 350: - message.dimension = 350; - break; - case "BACKFILL_ADVERTISER_NAME": - case 347: - message.dimension = 347; - break; - case "BACKFILL_ADVERTISER_PRIMARY_CONTACT": - case 348: - message.dimension = 348; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE": - case 378: - message.dimension = 378; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE_NAME": - case 379: - message.dimension = 379; - break; - case "BACKFILL_CREATIVE_CLICK_THROUGH_URL": - case 376: - message.dimension = 376; - break; - case "BACKFILL_CREATIVE_ID": - case 370: - message.dimension = 370; - break; - case "BACKFILL_CREATIVE_NAME": - case 371: - message.dimension = 371; - break; - case "BACKFILL_CREATIVE_THIRD_PARTY_VENDOR": - case 377: - message.dimension = 377; - break; - case "BACKFILL_CREATIVE_TYPE": - case 374: - message.dimension = 374; - break; - case "BACKFILL_CREATIVE_TYPE_NAME": - case 375: - message.dimension = 375; - break; - case "BACKFILL_LINE_ITEM_ARCHIVED": - case 278: - message.dimension = 278; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION": - case 258: - message.dimension = 258; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": - case 259: - message.dimension = 259; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS": - case 296: - message.dimension = 296; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME": - case 297: - message.dimension = 297; - break; - case "BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY": - case 280: - message.dimension = 280; - break; - case "BACKFILL_LINE_ITEM_COST_PER_UNIT": - case 272: - message.dimension = 272; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE": - case 264: - message.dimension = 264; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE_NAME": - case 265: - message.dimension = 265; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_END_DATE": - case 381: - message.dimension = 381; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE": - case 290: - message.dimension = 290; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": - case 291: - message.dimension = 291; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_START_DATE": - case 380: - message.dimension = 380; - break; - case "BACKFILL_LINE_ITEM_CURRENCY_CODE": - case 288: - message.dimension = 288; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_INDICATOR": - case 274: - message.dimension = 274; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE": - case 292: - message.dimension = 292; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME": - case 293: - message.dimension = 293; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE": - case 294: - message.dimension = 294; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE": - case 295: - message.dimension = 295; - break; - case "BACKFILL_LINE_ITEM_END_DATE": - case 267: - message.dimension = 267; - break; - case "BACKFILL_LINE_ITEM_END_DATE_TIME": - case 269: - message.dimension = 269; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE": - case 302: - message.dimension = 302; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME": - case 257: - message.dimension = 257; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID": - case 285: - message.dimension = 285; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_ID": - case 273: - message.dimension = 273; - break; - case "BACKFILL_LINE_ITEM_FREQUENCY_CAP": - case 303: - message.dimension = 303; - break; - case "BACKFILL_LINE_ITEM_ID": - case 298: - message.dimension = 298; - break; - case "BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP": - case 289: - message.dimension = 289; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_CLICKS": - case 283: - message.dimension = 283; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS": - case 282: - message.dimension = 282; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": - case 284: - message.dimension = 284; - break; - case "BACKFILL_LINE_ITEM_MAKEGOOD": - case 276: - message.dimension = 276; - break; - case "BACKFILL_LINE_ITEM_NAME": - case 299: - message.dimension = 299; - break; - case "BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE": - case 286: - message.dimension = 286; - break; - case "BACKFILL_LINE_ITEM_OPTIMIZABLE": - case 277: - message.dimension = 277; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE": - case 262: - message.dimension = 262; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": - case 263: - message.dimension = 263; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": - case 260: - message.dimension = 260; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": - case 261: - message.dimension = 261; - break; - case "BACKFILL_LINE_ITEM_PRIORITY": - case 266: - message.dimension = 266; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS": - case 306: - message.dimension = 306; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME": - case 307: - message.dimension = 307; - break; - case "BACKFILL_LINE_ITEM_START_DATE": - case 268: - message.dimension = 268; - break; - case "BACKFILL_LINE_ITEM_START_DATE_TIME": - case 270: - message.dimension = 270; - break; - case "BACKFILL_LINE_ITEM_TYPE": - case 300: - message.dimension = 300; - break; - case "BACKFILL_LINE_ITEM_TYPE_NAME": - case 301: - message.dimension = 301; - break; - case "BACKFILL_LINE_ITEM_UNLIMITED_END": - case 271: - message.dimension = 271; - break; - case "BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT": - case 275: - message.dimension = 275; - break; - case "BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE": - case 287: - message.dimension = 287; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_ID": - case 372: - message.dimension = 372; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_NAME": - case 373: - message.dimension = 373; - break; - case "BACKFILL_ORDER_AGENCY": - case 313: - message.dimension = 313; - break; - case "BACKFILL_ORDER_AGENCY_ID": - case 314: - message.dimension = 314; - break; - case "BACKFILL_ORDER_BOOKED_CPC": - case 315: - message.dimension = 315; - break; - case "BACKFILL_ORDER_BOOKED_CPM": - case 316: - message.dimension = 316; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS": - case 340: - message.dimension = 340; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS_NAME": - case 341: - message.dimension = 341; - break; - case "BACKFILL_ORDER_END_DATE": - case 317: - message.dimension = 317; - break; - case "BACKFILL_ORDER_END_DATE_TIME": - case 319: - message.dimension = 319; - break; - case "BACKFILL_ORDER_EXTERNAL_ID": - case 320: - message.dimension = 320; - break; - case "BACKFILL_ORDER_ID": - case 338: - message.dimension = 338; - break; - case "BACKFILL_ORDER_LABELS": - case 334: - message.dimension = 334; - break; - case "BACKFILL_ORDER_LABEL_IDS": - case 335: - message.dimension = 335; - break; - case "BACKFILL_ORDER_LIFETIME_CLICKS": - case 322: - message.dimension = 322; - break; - case "BACKFILL_ORDER_LIFETIME_IMPRESSIONS": - case 323: - message.dimension = 323; - break; - case "BACKFILL_ORDER_NAME": - case 339: - message.dimension = 339; - break; - case "BACKFILL_ORDER_PO_NUMBER": - case 324: - message.dimension = 324; - break; - case "BACKFILL_ORDER_PROGRAMMATIC": - case 321: - message.dimension = 321; - break; - case "BACKFILL_ORDER_SALESPERSON": - case 325: - message.dimension = 325; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE": - case 329: - message.dimension = 329; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID": - case 328: - message.dimension = 328; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS": - case 331: - message.dimension = 331; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID": - case 330: - message.dimension = 330; - break; - case "BACKFILL_ORDER_START_DATE": - case 332: - message.dimension = 332; - break; - case "BACKFILL_ORDER_START_DATE_TIME": - case 333: - message.dimension = 333; - break; - case "BACKFILL_ORDER_TRAFFICKER": - case 326: - message.dimension = 326; - break; - case "BACKFILL_ORDER_TRAFFICKER_ID": - case 327: - message.dimension = 327; - break; - case "BACKFILL_ORDER_UNLIMITED_END": - case 318: - message.dimension = 318; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_ID": - case 336: - message.dimension = 336; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_NAME": - case 337: - message.dimension = 337; - break; - case "BRANDING_TYPE": - case 383: - message.dimension = 383; - break; - case "BRANDING_TYPE_NAME": - case 384: - message.dimension = 384; - break; - case "BROWSER_CATEGORY": - case 119: - message.dimension = 119; - break; - case "BROWSER_CATEGORY_NAME": - case 120: - message.dimension = 120; - break; - case "BROWSER_ID": - case 235: - message.dimension = 235; - break; - case "BROWSER_NAME": - case 236: - message.dimension = 236; - break; - case "CARRIER_ID": - case 369: - message.dimension = 369; - break; - case "CARRIER_NAME": - case 368: - message.dimension = 368; - break; - case "CLASSIFIED_ADVERTISER_ID": - case 133: - message.dimension = 133; - break; - case "CLASSIFIED_ADVERTISER_NAME": - case 134: - message.dimension = 134; - break; - case "CLASSIFIED_BRAND_ID": - case 243: - message.dimension = 243; - break; - case "CLASSIFIED_BRAND_NAME": - case 244: - message.dimension = 244; - break; - case "CONTENT_ID": - case 246: - message.dimension = 246; - break; - case "CONTENT_NAME": - case 247: - message.dimension = 247; - break; - case "COUNTRY_ID": - case 11: - message.dimension = 11; - break; - case "COUNTRY_NAME": - case 12: - message.dimension = 12; - break; - case "CREATIVE_BILLING_TYPE": - case 366: - message.dimension = 366; - break; - case "CREATIVE_BILLING_TYPE_NAME": - case 367: - message.dimension = 367; - break; - case "CREATIVE_CLICK_THROUGH_URL": - case 174: - message.dimension = 174; - break; - case "CREATIVE_ID": - case 138: - message.dimension = 138; - break; - case "CREATIVE_NAME": - case 139: - message.dimension = 139; - break; - case "CREATIVE_TECHNOLOGY": - case 148: - message.dimension = 148; - break; - case "CREATIVE_TECHNOLOGY_NAME": - case 149: - message.dimension = 149; - break; - case "CREATIVE_THIRD_PARTY_VENDOR": - case 361: - message.dimension = 361; - break; - case "CREATIVE_TYPE": - case 344: - message.dimension = 344; - break; - case "CREATIVE_TYPE_NAME": - case 345: - message.dimension = 345; - break; - case "DATE": - case 3: - message.dimension = 3; - break; - case "DAY_OF_WEEK": - case 4: - message.dimension = 4; - break; - case "DEMAND_CHANNEL": - case 9: - message.dimension = 9; - break; - case "DEMAND_CHANNEL_NAME": - case 10: - message.dimension = 10; - break; - case "DEMAND_SUBCHANNEL": - case 22: - message.dimension = 22; - break; - case "DEMAND_SUBCHANNEL_NAME": - case 23: - message.dimension = 23; - break; - case "DEVICE": - case 226: - message.dimension = 226; - break; - case "DEVICE_CATEGORY": - case 15: - message.dimension = 15; - break; - case "DEVICE_CATEGORY_NAME": - case 16: - message.dimension = 16; - break; - case "DEVICE_NAME": - case 225: - message.dimension = 225; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_ID": - case 185: - message.dimension = 185; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": - case 186: - message.dimension = 186; - break; - case "FIRST_LOOK_PRICING_RULE_ID": - case 248: - message.dimension = 248; - break; - case "FIRST_LOOK_PRICING_RULE_NAME": - case 249: - message.dimension = 249; - break; - case "HOUR": - case 100: - message.dimension = 100; - break; - case "INTERACTION_TYPE": - case 223: - message.dimension = 223; - break; - case "INTERACTION_TYPE_NAME": - case 224: - message.dimension = 224; - break; - case "INVENTORY_FORMAT": - case 17: - message.dimension = 17; - break; - case "INVENTORY_FORMAT_NAME": - case 18: - message.dimension = 18; - break; - case "INVENTORY_TYPE": - case 19: - message.dimension = 19; - break; - case "INVENTORY_TYPE_NAME": - case 20: - message.dimension = 20; - break; - case "IS_ADX_DIRECT": - case 382: - message.dimension = 382; - break; - case "IS_FIRST_LOOK_DEAL": - case 401: - message.dimension = 401; - break; - case "KEY_VALUES_ID": - case 214: - message.dimension = 214; - break; - case "KEY_VALUES_NAME": - case 215: - message.dimension = 215; - break; - case "LINE_ITEM_ARCHIVED": - case 188: - message.dimension = 188; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION": - case 204: - message.dimension = 204; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": - case 205: - message.dimension = 205; - break; - case "LINE_ITEM_COMPUTED_STATUS": - case 250: - message.dimension = 250; - break; - case "LINE_ITEM_COMPUTED_STATUS_NAME": - case 251: - message.dimension = 251; - break; - case "LINE_ITEM_CONTRACTED_QUANTITY": - case 92: - message.dimension = 92; - break; - case "LINE_ITEM_COST_PER_UNIT": - case 85: - message.dimension = 85; - break; - case "LINE_ITEM_COST_TYPE": - case 212: - message.dimension = 212; - break; - case "LINE_ITEM_COST_TYPE_NAME": - case 213: - message.dimension = 213; - break; - case "LINE_ITEM_CREATIVE_END_DATE": - case 176: - message.dimension = 176; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE": - case 189: - message.dimension = 189; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": - case 190: - message.dimension = 190; - break; - case "LINE_ITEM_CREATIVE_START_DATE": - case 175: - message.dimension = 175; - break; - case "LINE_ITEM_CURRENCY_CODE": - case 180: - message.dimension = 180; - break; - case "LINE_ITEM_DELIVERY_INDICATOR": - case 87: - message.dimension = 87; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE": - case 191: - message.dimension = 191; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": - case 192: - message.dimension = 192; - break; - case "LINE_ITEM_DISCOUNT_ABSOLUTE": - case 195: - message.dimension = 195; - break; - case "LINE_ITEM_DISCOUNT_PERCENTAGE": - case 196: - message.dimension = 196; - break; - case "LINE_ITEM_END_DATE": - case 81: - message.dimension = 81; - break; - case "LINE_ITEM_END_DATE_TIME": - case 83: - message.dimension = 83; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE": - case 201: - message.dimension = 201; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": - case 202: - message.dimension = 202; - break; - case "LINE_ITEM_EXTERNAL_DEAL_ID": - case 97: - message.dimension = 97; - break; - case "LINE_ITEM_EXTERNAL_ID": - case 86: - message.dimension = 86; - break; - case "LINE_ITEM_FREQUENCY_CAP": - case 256: - message.dimension = 256; - break; - case "LINE_ITEM_ID": - case 1: - message.dimension = 1; - break; - case "LINE_ITEM_LAST_MODIFIED_BY_APP": - case 181: - message.dimension = 181; - break; - case "LINE_ITEM_LIFETIME_CLICKS": - case 95: - message.dimension = 95; - break; - case "LINE_ITEM_LIFETIME_IMPRESSIONS": - case 94: - message.dimension = 94; - break; - case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": - case 96: - message.dimension = 96; - break; - case "LINE_ITEM_MAKEGOOD": - case 89: - message.dimension = 89; - break; - case "LINE_ITEM_NAME": - case 2: - message.dimension = 2; - break; - case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": - case 98: - message.dimension = 98; - break; - case "LINE_ITEM_OPTIMIZABLE": - case 90: - message.dimension = 90; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE": - case 210: - message.dimension = 210; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": - case 211: - message.dimension = 211; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": - case 93: - message.dimension = 93; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": - case 396: - message.dimension = 396; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": - case 208: - message.dimension = 208; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": - case 209: - message.dimension = 209; - break; - case "LINE_ITEM_PRIORITY": - case 24: - message.dimension = 24; - break; - case "LINE_ITEM_RESERVATION_STATUS": - case 304: - message.dimension = 304; - break; - case "LINE_ITEM_RESERVATION_STATUS_NAME": - case 305: - message.dimension = 305; - break; - case "LINE_ITEM_START_DATE": - case 82: - message.dimension = 82; - break; - case "LINE_ITEM_START_DATE_TIME": - case 84: - message.dimension = 84; - break; - case "LINE_ITEM_TYPE": - case 193: - message.dimension = 193; - break; - case "LINE_ITEM_TYPE_NAME": - case 194: - message.dimension = 194; - break; - case "LINE_ITEM_UNLIMITED_END": - case 187: - message.dimension = 187; - break; - case "LINE_ITEM_VALUE_COST_PER_UNIT": - case 88: - message.dimension = 88; - break; - case "LINE_ITEM_WEB_PROPERTY_CODE": - case 179: - message.dimension = 179; - break; - case "MASTER_COMPANION_CREATIVE_ID": - case 140: - message.dimension = 140; - break; - case "MASTER_COMPANION_CREATIVE_NAME": - case 141: - message.dimension = 141; - break; - case "MOBILE_APP_FREE": - case 128: - message.dimension = 128; - break; - case "MOBILE_APP_ICON_URL": - case 129: - message.dimension = 129; - break; - case "MOBILE_APP_ID": - case 123: - message.dimension = 123; - break; - case "MOBILE_APP_NAME": - case 127: - message.dimension = 127; - break; - case "MOBILE_APP_OWNERSHIP_STATUS": - case 311: - message.dimension = 311; - break; - case "MOBILE_APP_OWNERSHIP_STATUS_NAME": - case 312: - message.dimension = 312; - break; - case "MOBILE_APP_STORE": - case 125: - message.dimension = 125; - break; - case "MOBILE_APP_STORE_NAME": - case 245: - message.dimension = 245; - break; - case "MOBILE_INVENTORY_TYPE": - case 99: - message.dimension = 99; - break; - case "MOBILE_INVENTORY_TYPE_NAME": - case 21: - message.dimension = 21; - break; - case "MOBILE_SDK_VERSION_NAME": - case 130: - message.dimension = 130; - break; - case "MONTH_YEAR": - case 6: - message.dimension = 6; - break; - case "NATIVE_AD_FORMAT_ID": - case 255: - message.dimension = 255; - break; - case "NATIVE_AD_FORMAT_NAME": - case 254: - message.dimension = 254; - break; - case "NATIVE_STYLE_ID": - case 253: - message.dimension = 253; - break; - case "NATIVE_STYLE_NAME": - case 252: - message.dimension = 252; - break; - case "OPERATING_SYSTEM_CATEGORY": - case 117: - message.dimension = 117; - break; - case "OPERATING_SYSTEM_CATEGORY_NAME": - case 118: - message.dimension = 118; - break; - case "OPERATING_SYSTEM_VERSION_ID": - case 238: - message.dimension = 238; - break; - case "OPERATING_SYSTEM_VERSION_NAME": - case 237: - message.dimension = 237; - break; - case "ORDER_AGENCY": - case 150: - message.dimension = 150; - break; - case "ORDER_AGENCY_ID": - case 151: - message.dimension = 151; - break; - case "ORDER_BOOKED_CPC": - case 152: - message.dimension = 152; - break; - case "ORDER_BOOKED_CPM": - case 153: - message.dimension = 153; - break; - case "ORDER_DELIVERY_STATUS": - case 231: - message.dimension = 231; - break; - case "ORDER_DELIVERY_STATUS_NAME": - case 239: - message.dimension = 239; - break; - case "ORDER_END_DATE": - case 154: - message.dimension = 154; - break; - case "ORDER_END_DATE_TIME": - case 155: - message.dimension = 155; - break; - case "ORDER_EXTERNAL_ID": - case 156: - message.dimension = 156; - break; - case "ORDER_ID": - case 7: - message.dimension = 7; - break; - case "ORDER_LABELS": - case 170: - message.dimension = 170; - break; - case "ORDER_LABEL_IDS": - case 171: - message.dimension = 171; - break; - case "ORDER_LIFETIME_CLICKS": - case 158: - message.dimension = 158; - break; - case "ORDER_LIFETIME_IMPRESSIONS": - case 159: - message.dimension = 159; - break; - case "ORDER_NAME": - case 8: - message.dimension = 8; - break; - case "ORDER_PO_NUMBER": - case 160: - message.dimension = 160; - break; - case "ORDER_PROGRAMMATIC": - case 157: - message.dimension = 157; - break; - case "ORDER_SALESPERSON": - case 161: - message.dimension = 161; - break; - case "ORDER_SECONDARY_SALESPEOPLE": - case 164: - message.dimension = 164; - break; - case "ORDER_SECONDARY_SALESPEOPLE_ID": - case 165: - message.dimension = 165; - break; - case "ORDER_SECONDARY_TRAFFICKERS": - case 166: - message.dimension = 166; - break; - case "ORDER_SECONDARY_TRAFFICKERS_ID": - case 167: - message.dimension = 167; - break; - case "ORDER_START_DATE": - case 168: - message.dimension = 168; - break; - case "ORDER_START_DATE_TIME": - case 169: - message.dimension = 169; - break; - case "ORDER_TRAFFICKER": - case 162: - message.dimension = 162; - break; - case "ORDER_TRAFFICKER_ID": - case 163: - message.dimension = 163; - break; - case "ORDER_UNLIMITED_END": - case 203: - message.dimension = 203; - break; - case "PLACEMENT_ID": - case 113: - message.dimension = 113; - break; - case "PLACEMENT_ID_ALL": - case 144: - message.dimension = 144; - break; - case "PLACEMENT_NAME": - case 114: - message.dimension = 114; - break; - case "PLACEMENT_NAME_ALL": - case 145: - message.dimension = 145; - break; - case "PLACEMENT_STATUS": - case 362: - message.dimension = 362; - break; - case "PLACEMENT_STATUS_ALL": - case 363: - message.dimension = 363; - break; - case "PLACEMENT_STATUS_NAME": - case 364: - message.dimension = 364; - break; - case "PLACEMENT_STATUS_NAME_ALL": - case 365: - message.dimension = 365; - break; - case "PROGRAMMATIC_BUYER_ID": - case 240: - message.dimension = 240; - break; - case "PROGRAMMATIC_BUYER_NAME": - case 241: - message.dimension = 241; - break; - case "PROGRAMMATIC_CHANNEL": - case 13: - message.dimension = 13; - break; - case "PROGRAMMATIC_CHANNEL_NAME": - case 14: - message.dimension = 14; - break; - case "RENDERED_CREATIVE_SIZE": - case 343: - message.dimension = 343; - break; - case "REQUESTED_AD_SIZES": - case 352: - message.dimension = 352; - break; - case "REQUEST_TYPE": - case 146: - message.dimension = 146; - break; - case "REQUEST_TYPE_NAME": - case 147: - message.dimension = 147; - break; - case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": - case 597: - message.dimension = 597; - break; - case "SITE": - case 387: - message.dimension = 387; - break; - case "TARGETING_ID": - case 232: - message.dimension = 232; - break; - case "TARGETING_NAME": - case 233: - message.dimension = 233; + } + } + return message; + }; + + /** + * Decodes an EntitySignalsMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntitySignalsMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntitySignalsMapping message. + * @function verify + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntitySignalsMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceSegmentId != null && message.hasOwnProperty("audienceSegmentId")) { + properties.entity = 1; + if (!$util.isInteger(message.audienceSegmentId) && !(message.audienceSegmentId && $util.isInteger(message.audienceSegmentId.low) && $util.isInteger(message.audienceSegmentId.high))) + return "audienceSegmentId: integer|Long expected"; + } + if (message.contentBundleId != null && message.hasOwnProperty("contentBundleId")) { + if (properties.entity === 1) + return "entity: multiple values"; + properties.entity = 1; + if (!$util.isInteger(message.contentBundleId) && !(message.contentBundleId && $util.isInteger(message.contentBundleId.low) && $util.isInteger(message.contentBundleId.high))) + return "contentBundleId: integer|Long expected"; + } + if (message.customTargetingValueId != null && message.hasOwnProperty("customTargetingValueId")) { + if (properties.entity === 1) + return "entity: multiple values"; + properties.entity = 1; + if (!$util.isInteger(message.customTargetingValueId) && !(message.customTargetingValueId && $util.isInteger(message.customTargetingValueId.low) && $util.isInteger(message.customTargetingValueId.high))) + return "customTargetingValueId: integer|Long expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.entitySignalsMappingId != null && message.hasOwnProperty("entitySignalsMappingId")) { + properties._entitySignalsMappingId = 1; + if (!$util.isInteger(message.entitySignalsMappingId) && !(message.entitySignalsMappingId && $util.isInteger(message.entitySignalsMappingId.low) && $util.isInteger(message.entitySignalsMappingId.high))) + return "entitySignalsMappingId: integer|Long expected"; + } + if (message.taxonomyCategoryIds != null && message.hasOwnProperty("taxonomyCategoryIds")) { + if (!Array.isArray(message.taxonomyCategoryIds)) + return "taxonomyCategoryIds: array expected"; + for (var i = 0; i < message.taxonomyCategoryIds.length; ++i) + if (!$util.isInteger(message.taxonomyCategoryIds[i]) && !(message.taxonomyCategoryIds[i] && $util.isInteger(message.taxonomyCategoryIds[i].low) && $util.isInteger(message.taxonomyCategoryIds[i].high))) + return "taxonomyCategoryIds: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates an EntitySignalsMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.EntitySignalsMapping} EntitySignalsMapping + */ + EntitySignalsMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.EntitySignalsMapping) + return object; + var message = new $root.google.ads.admanager.v1.EntitySignalsMapping(); + if (object.audienceSegmentId != null) + if ($util.Long) + (message.audienceSegmentId = $util.Long.fromValue(object.audienceSegmentId)).unsigned = false; + else if (typeof object.audienceSegmentId === "string") + message.audienceSegmentId = parseInt(object.audienceSegmentId, 10); + else if (typeof object.audienceSegmentId === "number") + message.audienceSegmentId = object.audienceSegmentId; + else if (typeof object.audienceSegmentId === "object") + message.audienceSegmentId = new $util.LongBits(object.audienceSegmentId.low >>> 0, object.audienceSegmentId.high >>> 0).toNumber(); + if (object.contentBundleId != null) + if ($util.Long) + (message.contentBundleId = $util.Long.fromValue(object.contentBundleId)).unsigned = false; + else if (typeof object.contentBundleId === "string") + message.contentBundleId = parseInt(object.contentBundleId, 10); + else if (typeof object.contentBundleId === "number") + message.contentBundleId = object.contentBundleId; + else if (typeof object.contentBundleId === "object") + message.contentBundleId = new $util.LongBits(object.contentBundleId.low >>> 0, object.contentBundleId.high >>> 0).toNumber(); + if (object.customTargetingValueId != null) + if ($util.Long) + (message.customTargetingValueId = $util.Long.fromValue(object.customTargetingValueId)).unsigned = false; + else if (typeof object.customTargetingValueId === "string") + message.customTargetingValueId = parseInt(object.customTargetingValueId, 10); + else if (typeof object.customTargetingValueId === "number") + message.customTargetingValueId = object.customTargetingValueId; + else if (typeof object.customTargetingValueId === "object") + message.customTargetingValueId = new $util.LongBits(object.customTargetingValueId.low >>> 0, object.customTargetingValueId.high >>> 0).toNumber(); + if (object.name != null) + message.name = String(object.name); + if (object.entitySignalsMappingId != null) + if ($util.Long) + (message.entitySignalsMappingId = $util.Long.fromValue(object.entitySignalsMappingId)).unsigned = false; + else if (typeof object.entitySignalsMappingId === "string") + message.entitySignalsMappingId = parseInt(object.entitySignalsMappingId, 10); + else if (typeof object.entitySignalsMappingId === "number") + message.entitySignalsMappingId = object.entitySignalsMappingId; + else if (typeof object.entitySignalsMappingId === "object") + message.entitySignalsMappingId = new $util.LongBits(object.entitySignalsMappingId.low >>> 0, object.entitySignalsMappingId.high >>> 0).toNumber(); + if (object.taxonomyCategoryIds) { + if (!Array.isArray(object.taxonomyCategoryIds)) + throw TypeError(".google.ads.admanager.v1.EntitySignalsMapping.taxonomyCategoryIds: array expected"); + message.taxonomyCategoryIds = []; + for (var i = 0; i < object.taxonomyCategoryIds.length; ++i) + if ($util.Long) + (message.taxonomyCategoryIds[i] = $util.Long.fromValue(object.taxonomyCategoryIds[i])).unsigned = false; + else if (typeof object.taxonomyCategoryIds[i] === "string") + message.taxonomyCategoryIds[i] = parseInt(object.taxonomyCategoryIds[i], 10); + else if (typeof object.taxonomyCategoryIds[i] === "number") + message.taxonomyCategoryIds[i] = object.taxonomyCategoryIds[i]; + else if (typeof object.taxonomyCategoryIds[i] === "object") + message.taxonomyCategoryIds[i] = new $util.LongBits(object.taxonomyCategoryIds[i].low >>> 0, object.taxonomyCategoryIds[i].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from an EntitySignalsMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {google.ads.admanager.v1.EntitySignalsMapping} message EntitySignalsMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntitySignalsMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.taxonomyCategoryIds = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.entitySignalsMappingId != null && message.hasOwnProperty("entitySignalsMappingId")) { + if (typeof message.entitySignalsMappingId === "number") + object.entitySignalsMappingId = options.longs === String ? String(message.entitySignalsMappingId) : message.entitySignalsMappingId; + else + object.entitySignalsMappingId = options.longs === String ? $util.Long.prototype.toString.call(message.entitySignalsMappingId) : options.longs === Number ? new $util.LongBits(message.entitySignalsMappingId.low >>> 0, message.entitySignalsMappingId.high >>> 0).toNumber() : message.entitySignalsMappingId; + if (options.oneofs) + object._entitySignalsMappingId = "entitySignalsMappingId"; + } + if (message.audienceSegmentId != null && message.hasOwnProperty("audienceSegmentId")) { + if (typeof message.audienceSegmentId === "number") + object.audienceSegmentId = options.longs === String ? String(message.audienceSegmentId) : message.audienceSegmentId; + else + object.audienceSegmentId = options.longs === String ? $util.Long.prototype.toString.call(message.audienceSegmentId) : options.longs === Number ? new $util.LongBits(message.audienceSegmentId.low >>> 0, message.audienceSegmentId.high >>> 0).toNumber() : message.audienceSegmentId; + if (options.oneofs) + object.entity = "audienceSegmentId"; + } + if (message.contentBundleId != null && message.hasOwnProperty("contentBundleId")) { + if (typeof message.contentBundleId === "number") + object.contentBundleId = options.longs === String ? String(message.contentBundleId) : message.contentBundleId; + else + object.contentBundleId = options.longs === String ? $util.Long.prototype.toString.call(message.contentBundleId) : options.longs === Number ? new $util.LongBits(message.contentBundleId.low >>> 0, message.contentBundleId.high >>> 0).toNumber() : message.contentBundleId; + if (options.oneofs) + object.entity = "contentBundleId"; + } + if (message.customTargetingValueId != null && message.hasOwnProperty("customTargetingValueId")) { + if (typeof message.customTargetingValueId === "number") + object.customTargetingValueId = options.longs === String ? String(message.customTargetingValueId) : message.customTargetingValueId; + else + object.customTargetingValueId = options.longs === String ? $util.Long.prototype.toString.call(message.customTargetingValueId) : options.longs === Number ? new $util.LongBits(message.customTargetingValueId.low >>> 0, message.customTargetingValueId.high >>> 0).toNumber() : message.customTargetingValueId; + if (options.oneofs) + object.entity = "customTargetingValueId"; + } + if (message.taxonomyCategoryIds && message.taxonomyCategoryIds.length) { + object.taxonomyCategoryIds = []; + for (var j = 0; j < message.taxonomyCategoryIds.length; ++j) + if (typeof message.taxonomyCategoryIds[j] === "number") + object.taxonomyCategoryIds[j] = options.longs === String ? String(message.taxonomyCategoryIds[j]) : message.taxonomyCategoryIds[j]; + else + object.taxonomyCategoryIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.taxonomyCategoryIds[j]) : options.longs === Number ? new $util.LongBits(message.taxonomyCategoryIds[j].low >>> 0, message.taxonomyCategoryIds[j].high >>> 0).toNumber() : message.taxonomyCategoryIds[j]; + } + return object; + }; + + /** + * Converts this EntitySignalsMapping to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @instance + * @returns {Object.} JSON object + */ + EntitySignalsMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntitySignalsMapping + * @function getTypeUrl + * @memberof google.ads.admanager.v1.EntitySignalsMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntitySignalsMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.EntitySignalsMapping"; + }; + + return EntitySignalsMapping; + })(); + + v1.EntitySignalsMappingService = (function() { + + /** + * Constructs a new EntitySignalsMappingService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an EntitySignalsMappingService + * @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 EntitySignalsMappingService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (EntitySignalsMappingService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntitySignalsMappingService; + + /** + * Creates new EntitySignalsMappingService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @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 {EntitySignalsMappingService} RPC service. Useful where requests and/or responses are streamed. + */ + EntitySignalsMappingService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|getEntitySignalsMapping}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef GetEntitySignalsMappingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping + */ + + /** + * Calls GetEntitySignalsMapping. + * @function getEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} request GetEntitySignalsMappingRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.getEntitySignalsMapping = function getEntitySignalsMapping(request, callback) { + return this.rpcCall(getEntitySignalsMapping, $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); + }, "name", { value: "GetEntitySignalsMapping" }); + + /** + * Calls GetEntitySignalsMapping. + * @function getEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} request GetEntitySignalsMappingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|listEntitySignalsMappings}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef ListEntitySignalsMappingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} [response] ListEntitySignalsMappingsResponse + */ + + /** + * Calls ListEntitySignalsMappings. + * @function listEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} request ListEntitySignalsMappingsRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and ListEntitySignalsMappingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.listEntitySignalsMappings = function listEntitySignalsMappings(request, callback) { + return this.rpcCall(listEntitySignalsMappings, $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse, request, callback); + }, "name", { value: "ListEntitySignalsMappings" }); + + /** + * Calls ListEntitySignalsMappings. + * @function listEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} request ListEntitySignalsMappingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|createEntitySignalsMapping}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef CreateEntitySignalsMappingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping + */ + + /** + * Calls CreateEntitySignalsMapping. + * @function createEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} request CreateEntitySignalsMappingRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.createEntitySignalsMapping = function createEntitySignalsMapping(request, callback) { + return this.rpcCall(createEntitySignalsMapping, $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); + }, "name", { value: "CreateEntitySignalsMapping" }); + + /** + * Calls CreateEntitySignalsMapping. + * @function createEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} request CreateEntitySignalsMappingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|updateEntitySignalsMapping}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef UpdateEntitySignalsMappingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.EntitySignalsMapping} [response] EntitySignalsMapping + */ + + /** + * Calls UpdateEntitySignalsMapping. + * @function updateEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} request UpdateEntitySignalsMappingRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMappingCallback} callback Node-style callback called with the error, if any, and EntitySignalsMapping + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.updateEntitySignalsMapping = function updateEntitySignalsMapping(request, callback) { + return this.rpcCall(updateEntitySignalsMapping, $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest, $root.google.ads.admanager.v1.EntitySignalsMapping, request, callback); + }, "name", { value: "UpdateEntitySignalsMapping" }); + + /** + * Calls UpdateEntitySignalsMapping. + * @function updateEntitySignalsMapping + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} request UpdateEntitySignalsMappingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchCreateEntitySignalsMappings}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef BatchCreateEntitySignalsMappingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} [response] BatchCreateEntitySignalsMappingsResponse + */ + + /** + * Calls BatchCreateEntitySignalsMappings. + * @function batchCreateEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} request BatchCreateEntitySignalsMappingsRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and BatchCreateEntitySignalsMappingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.batchCreateEntitySignalsMappings = function batchCreateEntitySignalsMappings(request, callback) { + return this.rpcCall(batchCreateEntitySignalsMappings, $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse, request, callback); + }, "name", { value: "BatchCreateEntitySignalsMappings" }); + + /** + * Calls BatchCreateEntitySignalsMappings. + * @function batchCreateEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} request BatchCreateEntitySignalsMappingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.EntitySignalsMappingService|batchUpdateEntitySignalsMappings}. + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @typedef BatchUpdateEntitySignalsMappingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} [response] BatchUpdateEntitySignalsMappingsResponse + */ + + /** + * Calls BatchUpdateEntitySignalsMappings. + * @function batchUpdateEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} request BatchUpdateEntitySignalsMappingsRequest message or plain object + * @param {google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappingsCallback} callback Node-style callback called with the error, if any, and BatchUpdateEntitySignalsMappingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntitySignalsMappingService.prototype.batchUpdateEntitySignalsMappings = function batchUpdateEntitySignalsMappings(request, callback) { + return this.rpcCall(batchUpdateEntitySignalsMappings, $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest, $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse, request, callback); + }, "name", { value: "BatchUpdateEntitySignalsMappings" }); + + /** + * Calls BatchUpdateEntitySignalsMappings. + * @function batchUpdateEntitySignalsMappings + * @memberof google.ads.admanager.v1.EntitySignalsMappingService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} request BatchUpdateEntitySignalsMappingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return EntitySignalsMappingService; + })(); + + v1.GetEntitySignalsMappingRequest = (function() { + + /** + * Properties of a GetEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetEntitySignalsMappingRequest + * @property {string|null} [name] GetEntitySignalsMappingRequest name + */ + + /** + * Constructs a new GetEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetEntitySignalsMappingRequest. + * @implements IGetEntitySignalsMappingRequest + * @constructor + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest=} [properties] Properties to set + */ + function GetEntitySignalsMappingRequest(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]]; + } + + /** + * GetEntitySignalsMappingRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @instance + */ + GetEntitySignalsMappingRequest.prototype.name = ""; + + /** + * Creates a new GetEntitySignalsMappingRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest instance + */ + GetEntitySignalsMappingRequest.create = function create(properties) { + return new GetEntitySignalsMappingRequest(properties); + }; + + /** + * Encodes the specified GetEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntitySignalsMappingRequest.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 GetEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetEntitySignalsMappingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IGetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "TARGETING_TYPE": - case 385: - message.dimension = 385; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "TARGETING_TYPE_NAME": - case 386: - message.dimension = 386; + } + } + return message; + }; + + /** + * Decodes a GetEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntitySignalsMappingRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntitySignalsMappingRequest.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 GetEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetEntitySignalsMappingRequest} GetEntitySignalsMappingRequest + */ + GetEntitySignalsMappingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetEntitySignalsMappingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.GetEntitySignalsMappingRequest} message GetEntitySignalsMappingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntitySignalsMappingRequest.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 GetEntitySignalsMappingRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEntitySignalsMappingRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetEntitySignalsMappingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetEntitySignalsMappingRequest"; + }; + + return GetEntitySignalsMappingRequest; + })(); + + v1.ListEntitySignalsMappingsRequest = (function() { + + /** + * Properties of a ListEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListEntitySignalsMappingsRequest + * @property {string|null} [parent] ListEntitySignalsMappingsRequest parent + * @property {number|null} [pageSize] ListEntitySignalsMappingsRequest pageSize + * @property {string|null} [pageToken] ListEntitySignalsMappingsRequest pageToken + * @property {string|null} [filter] ListEntitySignalsMappingsRequest filter + * @property {string|null} [orderBy] ListEntitySignalsMappingsRequest orderBy + * @property {number|null} [skip] ListEntitySignalsMappingsRequest skip + */ + + /** + * Constructs a new ListEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListEntitySignalsMappingsRequest. + * @implements IListEntitySignalsMappingsRequest + * @constructor + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest=} [properties] Properties to set + */ + function ListEntitySignalsMappingsRequest(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]]; + } + + /** + * ListEntitySignalsMappingsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.parent = ""; + + /** + * ListEntitySignalsMappingsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.pageSize = 0; + + /** + * ListEntitySignalsMappingsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.pageToken = ""; + + /** + * ListEntitySignalsMappingsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.filter = ""; + + /** + * ListEntitySignalsMappingsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.orderBy = ""; + + /** + * ListEntitySignalsMappingsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + */ + ListEntitySignalsMappingsRequest.prototype.skip = 0; + + /** + * Creates a new ListEntitySignalsMappingsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest instance + */ + ListEntitySignalsMappingsRequest.create = function create(properties) { + return new ListEntitySignalsMappingsRequest(properties); + }; + + /** + * Encodes the specified ListEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitySignalsMappingsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "TRAFFIC_SOURCE": - case 388: - message.dimension = 388; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "TRAFFIC_SOURCE_NAME": - case 389: - message.dimension = 389; + } + } + return message; + }; + + /** + * Decodes a ListEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitySignalsMappingsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitySignalsMappingsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} ListEntitySignalsMappingsRequest + */ + ListEntitySignalsMappingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.ListEntitySignalsMappingsRequest} message ListEntitySignalsMappingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitySignalsMappingsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListEntitySignalsMappingsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntitySignalsMappingsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListEntitySignalsMappingsRequest"; + }; + + return ListEntitySignalsMappingsRequest; + })(); + + v1.CreateEntitySignalsMappingRequest = (function() { + + /** + * Properties of a CreateEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreateEntitySignalsMappingRequest + * @property {string|null} [parent] CreateEntitySignalsMappingRequest parent + * @property {google.ads.admanager.v1.IEntitySignalsMapping|null} [entitySignalsMapping] CreateEntitySignalsMappingRequest entitySignalsMapping + */ + + /** + * Constructs a new CreateEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreateEntitySignalsMappingRequest. + * @implements ICreateEntitySignalsMappingRequest + * @constructor + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest=} [properties] Properties to set + */ + function CreateEntitySignalsMappingRequest(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]]; + } + + /** + * CreateEntitySignalsMappingRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @instance + */ + CreateEntitySignalsMappingRequest.prototype.parent = ""; + + /** + * CreateEntitySignalsMappingRequest entitySignalsMapping. + * @member {google.ads.admanager.v1.IEntitySignalsMapping|null|undefined} entitySignalsMapping + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @instance + */ + CreateEntitySignalsMappingRequest.prototype.entitySignalsMapping = null; + + /** + * Creates a new CreateEntitySignalsMappingRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest instance + */ + CreateEntitySignalsMappingRequest.create = function create(properties) { + return new CreateEntitySignalsMappingRequest(properties); + }; + + /** + * Encodes the specified CreateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntitySignalsMappingRequest.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.entitySignalsMapping != null && Object.hasOwnProperty.call(message, "entitySignalsMapping")) + $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMapping, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.ICreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "UNIFIED_PRICING_RULE_ID": - case 393: - message.dimension = 393; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "UNIFIED_PRICING_RULE_NAME": - case 394: - message.dimension = 394; + } + } + return message; + }; + + /** + * Decodes a CreateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntitySignalsMappingRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntitySignalsMappingRequest.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.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) { + var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMapping); + if (error) + return "entitySignalsMapping." + error; + } + return null; + }; + + /** + * Creates a CreateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} CreateEntitySignalsMappingRequest + */ + CreateEntitySignalsMappingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entitySignalsMapping != null) { + if (typeof object.entitySignalsMapping !== "object") + throw TypeError(".google.ads.admanager.v1.CreateEntitySignalsMappingRequest.entitySignalsMapping: object expected"); + message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMapping); + } + return message; + }; + + /** + * Creates a plain object from a CreateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.CreateEntitySignalsMappingRequest} message CreateEntitySignalsMappingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntitySignalsMappingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entitySignalsMapping = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) + object.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMapping, options); + return object; + }; + + /** + * Converts this CreateEntitySignalsMappingRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEntitySignalsMappingRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreateEntitySignalsMappingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreateEntitySignalsMappingRequest"; + }; + + return CreateEntitySignalsMappingRequest; + })(); + + v1.UpdateEntitySignalsMappingRequest = (function() { + + /** + * Properties of an UpdateEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdateEntitySignalsMappingRequest + * @property {google.ads.admanager.v1.IEntitySignalsMapping|null} [entitySignalsMapping] UpdateEntitySignalsMappingRequest entitySignalsMapping + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntitySignalsMappingRequest updateMask + */ + + /** + * Constructs a new UpdateEntitySignalsMappingRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdateEntitySignalsMappingRequest. + * @implements IUpdateEntitySignalsMappingRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest=} [properties] Properties to set + */ + function UpdateEntitySignalsMappingRequest(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]]; + } + + /** + * UpdateEntitySignalsMappingRequest entitySignalsMapping. + * @member {google.ads.admanager.v1.IEntitySignalsMapping|null|undefined} entitySignalsMapping + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @instance + */ + UpdateEntitySignalsMappingRequest.prototype.entitySignalsMapping = null; + + /** + * UpdateEntitySignalsMappingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @instance + */ + UpdateEntitySignalsMappingRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEntitySignalsMappingRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest instance + */ + UpdateEntitySignalsMappingRequest.create = function create(properties) { + return new UpdateEntitySignalsMappingRequest(properties); + }; + + /** + * Encodes the specified UpdateEntitySignalsMappingRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntitySignalsMappingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entitySignalsMapping != null && Object.hasOwnProperty.call(message, "entitySignalsMapping")) + $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMapping, 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 UpdateEntitySignalsMappingRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.IUpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntitySignalsMappingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntitySignalsMappingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "VIDEO_PLCMT": - case 172: - message.dimension = 172; + switch (tag >>> 3) { + case 1: { + message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "VIDEO_PLCMT_NAME": - case 173: - message.dimension = 173; + } + } + return message; + }; + + /** + * Decodes an UpdateEntitySignalsMappingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntitySignalsMappingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEntitySignalsMappingRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEntitySignalsMappingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) { + var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMapping); + if (error) + return "entitySignalsMapping." + 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 an UpdateEntitySignalsMappingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} UpdateEntitySignalsMappingRequest + */ + UpdateEntitySignalsMappingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest) + return object; + var message = new $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest(); + if (object.entitySignalsMapping != null) { + if (typeof object.entitySignalsMapping !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.entitySignalsMapping: object expected"); + message.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMapping); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEntitySignalsMappingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {google.ads.admanager.v1.UpdateEntitySignalsMappingRequest} message UpdateEntitySignalsMappingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEntitySignalsMappingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entitySignalsMapping = null; + object.updateMask = null; + } + if (message.entitySignalsMapping != null && message.hasOwnProperty("entitySignalsMapping")) + object.entitySignalsMapping = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMapping, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEntitySignalsMappingRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEntitySignalsMappingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEntitySignalsMappingRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEntitySignalsMappingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateEntitySignalsMappingRequest"; + }; + + return UpdateEntitySignalsMappingRequest; + })(); + + v1.ListEntitySignalsMappingsResponse = (function() { + + /** + * Properties of a ListEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListEntitySignalsMappingsResponse + * @property {Array.|null} [entitySignalsMappings] ListEntitySignalsMappingsResponse entitySignalsMappings + * @property {string|null} [nextPageToken] ListEntitySignalsMappingsResponse nextPageToken + * @property {number|null} [totalSize] ListEntitySignalsMappingsResponse totalSize + */ + + /** + * Constructs a new ListEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListEntitySignalsMappingsResponse. + * @implements IListEntitySignalsMappingsResponse + * @constructor + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse=} [properties] Properties to set + */ + function ListEntitySignalsMappingsResponse(properties) { + this.entitySignalsMappings = []; + 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]]; + } + + /** + * ListEntitySignalsMappingsResponse entitySignalsMappings. + * @member {Array.} entitySignalsMappings + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @instance + */ + ListEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; + + /** + * ListEntitySignalsMappingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @instance + */ + ListEntitySignalsMappingsResponse.prototype.nextPageToken = ""; + + /** + * ListEntitySignalsMappingsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @instance + */ + ListEntitySignalsMappingsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListEntitySignalsMappingsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse instance + */ + ListEntitySignalsMappingsResponse.create = function create(properties) { + return new ListEntitySignalsMappingsResponse(properties); + }; + + /** + * Encodes the specified ListEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitySignalsMappingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) + for (var i = 0; i < message.entitySignalsMappings.length; ++i) + $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListEntitySignalsMappingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "WEEK": - case 5: - message.dimension = 5; + switch (tag >>> 3) { + case 1: { + if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) + message.entitySignalsMappings = []; + message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "YIELD_GROUP_BUYER_NAME": - case 184: - message.dimension = 184; + } + } + return message; + }; + + /** + * Decodes a ListEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitySignalsMappingsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitySignalsMappingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { + if (!Array.isArray(message.entitySignalsMappings)) + return "entitySignalsMappings: array expected"; + for (var i = 0; i < message.entitySignalsMappings.length; ++i) { + var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); + if (error) + return "entitySignalsMappings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} ListEntitySignalsMappingsResponse + */ + ListEntitySignalsMappingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListEntitySignalsMappingsResponse(); + if (object.entitySignalsMappings) { + if (!Array.isArray(object.entitySignalsMappings)) + throw TypeError(".google.ads.admanager.v1.ListEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); + message.entitySignalsMappings = []; + for (var i = 0; i < object.entitySignalsMappings.length; ++i) { + if (typeof object.entitySignalsMappings[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); + message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.ListEntitySignalsMappingsResponse} message ListEntitySignalsMappingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitySignalsMappingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entitySignalsMappings = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.entitySignalsMappings && message.entitySignalsMappings.length) { + object.entitySignalsMappings = []; + for (var j = 0; j < message.entitySignalsMappings.length; ++j) + object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListEntitySignalsMappingsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntitySignalsMappingsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListEntitySignalsMappingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListEntitySignalsMappingsResponse"; + }; + + return ListEntitySignalsMappingsResponse; + })(); + + v1.BatchCreateEntitySignalsMappingsRequest = (function() { + + /** + * Properties of a BatchCreateEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreateEntitySignalsMappingsRequest + * @property {string|null} [parent] BatchCreateEntitySignalsMappingsRequest parent + * @property {Array.|null} [requests] BatchCreateEntitySignalsMappingsRequest requests + */ + + /** + * Constructs a new BatchCreateEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreateEntitySignalsMappingsRequest. + * @implements IBatchCreateEntitySignalsMappingsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest=} [properties] Properties to set + */ + function BatchCreateEntitySignalsMappingsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchCreateEntitySignalsMappingsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @instance + */ + BatchCreateEntitySignalsMappingsRequest.prototype.parent = ""; + + /** + * BatchCreateEntitySignalsMappingsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @instance + */ + BatchCreateEntitySignalsMappingsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateEntitySignalsMappingsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest instance + */ + BatchCreateEntitySignalsMappingsRequest.create = function create(properties) { + return new BatchCreateEntitySignalsMappingsRequest(properties); + }; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateEntitySignalsMappingsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "YIELD_GROUP_ID": - case 182: - message.dimension = 182; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "YIELD_GROUP_NAME": - case 183: - message.dimension = 183; + } + } + return message; + }; + + /** + * Decodes a BatchCreateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateEntitySignalsMappingsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateEntitySignalsMappingsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} BatchCreateEntitySignalsMappingsRequest + */ + BatchCreateEntitySignalsMappingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest} message BatchCreateEntitySignalsMappingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateEntitySignalsMappingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreateEntitySignalsMappingRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateEntitySignalsMappingsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchCreateEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateEntitySignalsMappingsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest"; + }; + + return BatchCreateEntitySignalsMappingsRequest; + })(); + + v1.BatchCreateEntitySignalsMappingsResponse = (function() { + + /** + * Properties of a BatchCreateEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreateEntitySignalsMappingsResponse + * @property {Array.|null} [entitySignalsMappings] BatchCreateEntitySignalsMappingsResponse entitySignalsMappings + */ + + /** + * Constructs a new BatchCreateEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreateEntitySignalsMappingsResponse. + * @implements IBatchCreateEntitySignalsMappingsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse=} [properties] Properties to set + */ + function BatchCreateEntitySignalsMappingsResponse(properties) { + this.entitySignalsMappings = []; + 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]]; + } + + /** + * BatchCreateEntitySignalsMappingsResponse entitySignalsMappings. + * @member {Array.} entitySignalsMappings + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @instance + */ + BatchCreateEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; + + /** + * Creates a new BatchCreateEntitySignalsMappingsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse instance + */ + BatchCreateEntitySignalsMappingsResponse.create = function create(properties) { + return new BatchCreateEntitySignalsMappingsResponse(properties); + }; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateEntitySignalsMappingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) + for (var i = 0; i < message.entitySignalsMappings.length; ++i) + $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": - case 10000: - message.dimension = 10000; + switch (tag >>> 3) { + case 1: { + if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) + message.entitySignalsMappings = []; + message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": - case 10001: - message.dimension = 10001; + } + } + return message; + }; + + /** + * Decodes a BatchCreateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateEntitySignalsMappingsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateEntitySignalsMappingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { + if (!Array.isArray(message.entitySignalsMappings)) + return "entitySignalsMappings: array expected"; + for (var i = 0; i < message.entitySignalsMappings.length; ++i) { + var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); + if (error) + return "entitySignalsMappings." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} BatchCreateEntitySignalsMappingsResponse + */ + BatchCreateEntitySignalsMappingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse(); + if (object.entitySignalsMappings) { + if (!Array.isArray(object.entitySignalsMappings)) + throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); + message.entitySignalsMappings = []; + for (var i = 0; i < object.entitySignalsMappings.length; ++i) { + if (typeof object.entitySignalsMappings[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); + message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse} message BatchCreateEntitySignalsMappingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateEntitySignalsMappingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entitySignalsMappings = []; + if (message.entitySignalsMappings && message.entitySignalsMappings.length) { + object.entitySignalsMappings = []; + for (var j = 0; j < message.entitySignalsMappings.length; ++j) + object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateEntitySignalsMappingsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateEntitySignalsMappingsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse"; + }; + + return BatchCreateEntitySignalsMappingsResponse; + })(); + + v1.BatchUpdateEntitySignalsMappingsRequest = (function() { + + /** + * Properties of a BatchUpdateEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdateEntitySignalsMappingsRequest + * @property {string|null} [parent] BatchUpdateEntitySignalsMappingsRequest parent + * @property {Array.|null} [requests] BatchUpdateEntitySignalsMappingsRequest requests + */ + + /** + * Constructs a new BatchUpdateEntitySignalsMappingsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdateEntitySignalsMappingsRequest. + * @implements IBatchUpdateEntitySignalsMappingsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest=} [properties] Properties to set + */ + function BatchUpdateEntitySignalsMappingsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchUpdateEntitySignalsMappingsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @instance + */ + BatchUpdateEntitySignalsMappingsRequest.prototype.parent = ""; + + /** + * BatchUpdateEntitySignalsMappingsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @instance + */ + BatchUpdateEntitySignalsMappingsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdateEntitySignalsMappingsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest instance + */ + BatchUpdateEntitySignalsMappingsRequest.create = function create(properties) { + return new BatchUpdateEntitySignalsMappingsRequest(properties); + }; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateEntitySignalsMappingsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateEntitySignalsMappingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateEntitySignalsMappingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": - case 10002: - message.dimension = 10002; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": - case 10003: - message.dimension = 10003; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateEntitySignalsMappingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateEntitySignalsMappingsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateEntitySignalsMappingsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateEntitySignalsMappingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} BatchUpdateEntitySignalsMappingsRequest + */ + BatchUpdateEntitySignalsMappingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdateEntitySignalsMappingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest} message BatchUpdateEntitySignalsMappingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateEntitySignalsMappingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdateEntitySignalsMappingsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateEntitySignalsMappingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdateEntitySignalsMappingsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateEntitySignalsMappingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest"; + }; + + return BatchUpdateEntitySignalsMappingsRequest; + })(); + + v1.BatchUpdateEntitySignalsMappingsResponse = (function() { + + /** + * Properties of a BatchUpdateEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdateEntitySignalsMappingsResponse + * @property {Array.|null} [entitySignalsMappings] BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings + */ + + /** + * Constructs a new BatchUpdateEntitySignalsMappingsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdateEntitySignalsMappingsResponse. + * @implements IBatchUpdateEntitySignalsMappingsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse=} [properties] Properties to set + */ + function BatchUpdateEntitySignalsMappingsResponse(properties) { + this.entitySignalsMappings = []; + 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]]; + } + + /** + * BatchUpdateEntitySignalsMappingsResponse entitySignalsMappings. + * @member {Array.} entitySignalsMappings + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @instance + */ + BatchUpdateEntitySignalsMappingsResponse.prototype.entitySignalsMappings = $util.emptyArray; + + /** + * Creates a new BatchUpdateEntitySignalsMappingsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse instance + */ + BatchUpdateEntitySignalsMappingsResponse.create = function create(properties) { + return new BatchUpdateEntitySignalsMappingsResponse(properties); + }; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateEntitySignalsMappingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entitySignalsMappings != null && message.entitySignalsMappings.length) + for (var i = 0; i < message.entitySignalsMappings.length; ++i) + $root.google.ads.admanager.v1.EntitySignalsMapping.encode(message.entitySignalsMappings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateEntitySignalsMappingsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateEntitySignalsMappingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateEntitySignalsMappingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": - case 10004: - message.dimension = 10004; + switch (tag >>> 3) { + case 1: { + if (!(message.entitySignalsMappings && message.entitySignalsMappings.length)) + message.entitySignalsMappings = []; + message.entitySignalsMappings.push($root.google.ads.admanager.v1.EntitySignalsMapping.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": - case 10005: - message.dimension = 10005; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateEntitySignalsMappingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateEntitySignalsMappingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateEntitySignalsMappingsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateEntitySignalsMappingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entitySignalsMappings != null && message.hasOwnProperty("entitySignalsMappings")) { + if (!Array.isArray(message.entitySignalsMappings)) + return "entitySignalsMappings: array expected"; + for (var i = 0; i < message.entitySignalsMappings.length; ++i) { + var error = $root.google.ads.admanager.v1.EntitySignalsMapping.verify(message.entitySignalsMappings[i]); + if (error) + return "entitySignalsMappings." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateEntitySignalsMappingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} BatchUpdateEntitySignalsMappingsResponse + */ + BatchUpdateEntitySignalsMappingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse(); + if (object.entitySignalsMappings) { + if (!Array.isArray(object.entitySignalsMappings)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.entitySignalsMappings: array expected"); + message.entitySignalsMappings = []; + for (var i = 0; i < object.entitySignalsMappings.length; ++i) { + if (typeof object.entitySignalsMappings[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse.entitySignalsMappings: object expected"); + message.entitySignalsMappings[i] = $root.google.ads.admanager.v1.EntitySignalsMapping.fromObject(object.entitySignalsMappings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdateEntitySignalsMappingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse} message BatchUpdateEntitySignalsMappingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateEntitySignalsMappingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entitySignalsMappings = []; + if (message.entitySignalsMappings && message.entitySignalsMappings.length) { + object.entitySignalsMappings = []; + for (var j = 0; j < message.entitySignalsMappings.length; ++j) + object.entitySignalsMappings[j] = $root.google.ads.admanager.v1.EntitySignalsMapping.toObject(message.entitySignalsMappings[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdateEntitySignalsMappingsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateEntitySignalsMappingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdateEntitySignalsMappingsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateEntitySignalsMappingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse"; + }; + + return BatchUpdateEntitySignalsMappingsResponse; + })(); + + v1.GeoTarget = (function() { + + /** + * Properties of a GeoTarget. + * @memberof google.ads.admanager.v1 + * @interface IGeoTarget + * @property {string|null} [name] GeoTarget name + * @property {string|null} [displayName] GeoTarget displayName + * @property {string|null} [canonicalParent] GeoTarget canonicalParent + * @property {Array.|null} [parentNames] GeoTarget parentNames + * @property {string|null} [regionCode] GeoTarget regionCode + * @property {string|null} [type] GeoTarget type + * @property {boolean|null} [targetable] GeoTarget targetable + */ + + /** + * Constructs a new GeoTarget. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GeoTarget. + * @implements IGeoTarget + * @constructor + * @param {google.ads.admanager.v1.IGeoTarget=} [properties] Properties to set + */ + function GeoTarget(properties) { + this.parentNames = []; + 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]]; + } + + /** + * GeoTarget name. + * @member {string} name + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.name = ""; + + /** + * GeoTarget displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.displayName = null; + + /** + * GeoTarget canonicalParent. + * @member {string|null|undefined} canonicalParent + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.canonicalParent = null; + + /** + * GeoTarget parentNames. + * @member {Array.} parentNames + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.parentNames = $util.emptyArray; + + /** + * GeoTarget regionCode. + * @member {string|null|undefined} regionCode + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.regionCode = null; + + /** + * GeoTarget type. + * @member {string|null|undefined} type + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.type = null; + + /** + * GeoTarget targetable. + * @member {boolean|null|undefined} targetable + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + */ + GeoTarget.prototype.targetable = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GeoTarget.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GeoTarget.prototype, "_canonicalParent", { + get: $util.oneOfGetter($oneOfFields = ["canonicalParent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GeoTarget.prototype, "_regionCode", { + get: $util.oneOfGetter($oneOfFields = ["regionCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GeoTarget.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GeoTarget.prototype, "_targetable", { + get: $util.oneOfGetter($oneOfFields = ["targetable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GeoTarget instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {google.ads.admanager.v1.IGeoTarget=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget instance + */ + GeoTarget.create = function create(properties) { + return new GeoTarget(properties); + }; + + /** + * Encodes the specified GeoTarget message. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {google.ads.admanager.v1.IGeoTarget} message GeoTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeoTarget.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.canonicalParent != null && Object.hasOwnProperty.call(message, "canonicalParent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalParent); + if (message.parentNames != null && message.parentNames.length) + for (var i = 0; i < message.parentNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentNames[i]); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); + if (message.targetable != null && Object.hasOwnProperty.call(message, "targetable")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.targetable); + return writer; + }; + + /** + * Encodes the specified GeoTarget message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {google.ads.admanager.v1.IGeoTarget} message GeoTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeoTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeoTarget message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeoTarget.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GeoTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": - case 10006: - message.dimension = 10006; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.canonicalParent = reader.string(); + break; + } + case 4: { + if (!(message.parentNames && message.parentNames.length)) + message.parentNames = []; + message.parentNames.push(reader.string()); + break; + } + case 5: { + message.regionCode = reader.string(); + break; + } + case 6: { + message.type = reader.string(); + break; + } + case 7: { + message.targetable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": - case 10007: - message.dimension = 10007; + } + } + return message; + }; + + /** + * Decodes a GeoTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeoTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeoTarget message. + * @function verify + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeoTarget.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.canonicalParent != null && message.hasOwnProperty("canonicalParent")) { + properties._canonicalParent = 1; + if (!$util.isString(message.canonicalParent)) + return "canonicalParent: string expected"; + } + if (message.parentNames != null && message.hasOwnProperty("parentNames")) { + if (!Array.isArray(message.parentNames)) + return "parentNames: array expected"; + for (var i = 0; i < message.parentNames.length; ++i) + if (!$util.isString(message.parentNames[i])) + return "parentNames: string[] expected"; + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) { + properties._regionCode = 1; + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + if (!$util.isString(message.type)) + return "type: string expected"; + } + if (message.targetable != null && message.hasOwnProperty("targetable")) { + properties._targetable = 1; + if (typeof message.targetable !== "boolean") + return "targetable: boolean expected"; + } + return null; + }; + + /** + * Creates a GeoTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GeoTarget} GeoTarget + */ + GeoTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GeoTarget) + return object; + var message = new $root.google.ads.admanager.v1.GeoTarget(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.canonicalParent != null) + message.canonicalParent = String(object.canonicalParent); + if (object.parentNames) { + if (!Array.isArray(object.parentNames)) + throw TypeError(".google.ads.admanager.v1.GeoTarget.parentNames: array expected"); + message.parentNames = []; + for (var i = 0; i < object.parentNames.length; ++i) + message.parentNames[i] = String(object.parentNames[i]); + } + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.type != null) + message.type = String(object.type); + if (object.targetable != null) + message.targetable = Boolean(object.targetable); + return message; + }; + + /** + * Creates a plain object from a GeoTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {google.ads.admanager.v1.GeoTarget} message GeoTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeoTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parentNames = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.canonicalParent != null && message.hasOwnProperty("canonicalParent")) { + object.canonicalParent = message.canonicalParent; + if (options.oneofs) + object._canonicalParent = "canonicalParent"; + } + if (message.parentNames && message.parentNames.length) { + object.parentNames = []; + for (var j = 0; j < message.parentNames.length; ++j) + object.parentNames[j] = message.parentNames[j]; + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) { + object.regionCode = message.regionCode; + if (options.oneofs) + object._regionCode = "regionCode"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.targetable != null && message.hasOwnProperty("targetable")) { + object.targetable = message.targetable; + if (options.oneofs) + object._targetable = "targetable"; + } + return object; + }; + + /** + * Converts this GeoTarget to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GeoTarget + * @instance + * @returns {Object.} JSON object + */ + GeoTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeoTarget + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GeoTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeoTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GeoTarget"; + }; + + return GeoTarget; + })(); + + v1.GeoTargetService = (function() { + + /** + * Constructs a new GeoTargetService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GeoTargetService + * @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 GeoTargetService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (GeoTargetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GeoTargetService; + + /** + * Creates new GeoTargetService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.GeoTargetService + * @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 {GeoTargetService} RPC service. Useful where requests and/or responses are streamed. + */ + GeoTargetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|getGeoTarget}. + * @memberof google.ads.admanager.v1.GeoTargetService + * @typedef GetGeoTargetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.GeoTarget} [response] GeoTarget + */ + + /** + * Calls GetGeoTarget. + * @function getGeoTarget + * @memberof google.ads.admanager.v1.GeoTargetService + * @instance + * @param {google.ads.admanager.v1.IGetGeoTargetRequest} request GetGeoTargetRequest message or plain object + * @param {google.ads.admanager.v1.GeoTargetService.GetGeoTargetCallback} callback Node-style callback called with the error, if any, and GeoTarget + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GeoTargetService.prototype.getGeoTarget = function getGeoTarget(request, callback) { + return this.rpcCall(getGeoTarget, $root.google.ads.admanager.v1.GetGeoTargetRequest, $root.google.ads.admanager.v1.GeoTarget, request, callback); + }, "name", { value: "GetGeoTarget" }); + + /** + * Calls GetGeoTarget. + * @function getGeoTarget + * @memberof google.ads.admanager.v1.GeoTargetService + * @instance + * @param {google.ads.admanager.v1.IGetGeoTargetRequest} request GetGeoTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.GeoTargetService|listGeoTargets}. + * @memberof google.ads.admanager.v1.GeoTargetService + * @typedef ListGeoTargetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListGeoTargetsResponse} [response] ListGeoTargetsResponse + */ + + /** + * Calls ListGeoTargets. + * @function listGeoTargets + * @memberof google.ads.admanager.v1.GeoTargetService + * @instance + * @param {google.ads.admanager.v1.IListGeoTargetsRequest} request ListGeoTargetsRequest message or plain object + * @param {google.ads.admanager.v1.GeoTargetService.ListGeoTargetsCallback} callback Node-style callback called with the error, if any, and ListGeoTargetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GeoTargetService.prototype.listGeoTargets = function listGeoTargets(request, callback) { + return this.rpcCall(listGeoTargets, $root.google.ads.admanager.v1.ListGeoTargetsRequest, $root.google.ads.admanager.v1.ListGeoTargetsResponse, request, callback); + }, "name", { value: "ListGeoTargets" }); + + /** + * Calls ListGeoTargets. + * @function listGeoTargets + * @memberof google.ads.admanager.v1.GeoTargetService + * @instance + * @param {google.ads.admanager.v1.IListGeoTargetsRequest} request ListGeoTargetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return GeoTargetService; + })(); + + v1.GetGeoTargetRequest = (function() { + + /** + * Properties of a GetGeoTargetRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetGeoTargetRequest + * @property {string|null} [name] GetGeoTargetRequest name + */ + + /** + * Constructs a new GetGeoTargetRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetGeoTargetRequest. + * @implements IGetGeoTargetRequest + * @constructor + * @param {google.ads.admanager.v1.IGetGeoTargetRequest=} [properties] Properties to set + */ + function GetGeoTargetRequest(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]]; + } + + /** + * GetGeoTargetRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @instance + */ + GetGeoTargetRequest.prototype.name = ""; + + /** + * Creates a new GetGeoTargetRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {google.ads.admanager.v1.IGetGeoTargetRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest instance + */ + GetGeoTargetRequest.create = function create(properties) { + return new GetGeoTargetRequest(properties); + }; + + /** + * Encodes the specified GetGeoTargetRequest message. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {google.ads.admanager.v1.IGetGeoTargetRequest} message GetGeoTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGeoTargetRequest.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 GetGeoTargetRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetGeoTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {google.ads.admanager.v1.IGetGeoTargetRequest} message GetGeoTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGeoTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGeoTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGeoTargetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetGeoTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": - case 10008: - message.dimension = 10008; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": - case 10009: - message.dimension = 10009; + } + } + return message; + }; + + /** + * Decodes a GetGeoTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGeoTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGeoTargetRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGeoTargetRequest.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 GetGeoTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetGeoTargetRequest} GetGeoTargetRequest + */ + GetGeoTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetGeoTargetRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetGeoTargetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetGeoTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {google.ads.admanager.v1.GetGeoTargetRequest} message GetGeoTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGeoTargetRequest.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 GetGeoTargetRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @instance + * @returns {Object.} JSON object + */ + GetGeoTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetGeoTargetRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetGeoTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGeoTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetGeoTargetRequest"; + }; + + return GetGeoTargetRequest; + })(); + + v1.ListGeoTargetsRequest = (function() { + + /** + * Properties of a ListGeoTargetsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListGeoTargetsRequest + * @property {string|null} [parent] ListGeoTargetsRequest parent + * @property {number|null} [pageSize] ListGeoTargetsRequest pageSize + * @property {string|null} [pageToken] ListGeoTargetsRequest pageToken + * @property {string|null} [filter] ListGeoTargetsRequest filter + * @property {string|null} [orderBy] ListGeoTargetsRequest orderBy + * @property {number|null} [skip] ListGeoTargetsRequest skip + */ + + /** + * Constructs a new ListGeoTargetsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListGeoTargetsRequest. + * @implements IListGeoTargetsRequest + * @constructor + * @param {google.ads.admanager.v1.IListGeoTargetsRequest=} [properties] Properties to set + */ + function ListGeoTargetsRequest(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]]; + } + + /** + * ListGeoTargetsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.parent = ""; + + /** + * ListGeoTargetsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.pageSize = 0; + + /** + * ListGeoTargetsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.pageToken = ""; + + /** + * ListGeoTargetsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.filter = ""; + + /** + * ListGeoTargetsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.orderBy = ""; + + /** + * ListGeoTargetsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + */ + ListGeoTargetsRequest.prototype.skip = 0; + + /** + * Creates a new ListGeoTargetsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest instance + */ + ListGeoTargetsRequest.create = function create(properties) { + return new ListGeoTargetsRequest(properties); + }; + + /** + * Encodes the specified ListGeoTargetsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsRequest} message ListGeoTargetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeoTargetsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListGeoTargetsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsRequest} message ListGeoTargetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeoTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGeoTargetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeoTargetsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListGeoTargetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": - case 10010: - message.dimension = 10010; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": - case 10011: - message.dimension = 10011; + } + } + return message; + }; + + /** + * Decodes a ListGeoTargetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeoTargetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGeoTargetsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGeoTargetsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListGeoTargetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListGeoTargetsRequest} ListGeoTargetsRequest + */ + ListGeoTargetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListGeoTargetsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListGeoTargetsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListGeoTargetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {google.ads.admanager.v1.ListGeoTargetsRequest} message ListGeoTargetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGeoTargetsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListGeoTargetsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListGeoTargetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGeoTargetsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListGeoTargetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGeoTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListGeoTargetsRequest"; + }; + + return ListGeoTargetsRequest; + })(); + + v1.ListGeoTargetsResponse = (function() { + + /** + * Properties of a ListGeoTargetsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListGeoTargetsResponse + * @property {Array.|null} [geoTargets] ListGeoTargetsResponse geoTargets + * @property {string|null} [nextPageToken] ListGeoTargetsResponse nextPageToken + * @property {number|null} [totalSize] ListGeoTargetsResponse totalSize + */ + + /** + * Constructs a new ListGeoTargetsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListGeoTargetsResponse. + * @implements IListGeoTargetsResponse + * @constructor + * @param {google.ads.admanager.v1.IListGeoTargetsResponse=} [properties] Properties to set + */ + function ListGeoTargetsResponse(properties) { + this.geoTargets = []; + 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]]; + } + + /** + * ListGeoTargetsResponse geoTargets. + * @member {Array.} geoTargets + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @instance + */ + ListGeoTargetsResponse.prototype.geoTargets = $util.emptyArray; + + /** + * ListGeoTargetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @instance + */ + ListGeoTargetsResponse.prototype.nextPageToken = ""; + + /** + * ListGeoTargetsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @instance + */ + ListGeoTargetsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListGeoTargetsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse instance + */ + ListGeoTargetsResponse.create = function create(properties) { + return new ListGeoTargetsResponse(properties); + }; + + /** + * Encodes the specified ListGeoTargetsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsResponse} message ListGeoTargetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeoTargetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.geoTargets != null && message.geoTargets.length) + for (var i = 0; i < message.geoTargets.length; ++i) + $root.google.ads.admanager.v1.GeoTarget.encode(message.geoTargets[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListGeoTargetsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListGeoTargetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {google.ads.admanager.v1.IListGeoTargetsResponse} message ListGeoTargetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeoTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGeoTargetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeoTargetsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListGeoTargetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": - case 10012: - message.dimension = 10012; + switch (tag >>> 3) { + case 1: { + if (!(message.geoTargets && message.geoTargets.length)) + message.geoTargets = []; + message.geoTargets.push($root.google.ads.admanager.v1.GeoTarget.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": - case 10013: - message.dimension = 10013; + } + } + return message; + }; + + /** + * Decodes a ListGeoTargetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeoTargetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGeoTargetsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGeoTargetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.geoTargets != null && message.hasOwnProperty("geoTargets")) { + if (!Array.isArray(message.geoTargets)) + return "geoTargets: array expected"; + for (var i = 0; i < message.geoTargets.length; ++i) { + var error = $root.google.ads.admanager.v1.GeoTarget.verify(message.geoTargets[i]); + if (error) + return "geoTargets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListGeoTargetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListGeoTargetsResponse} ListGeoTargetsResponse + */ + ListGeoTargetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListGeoTargetsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListGeoTargetsResponse(); + if (object.geoTargets) { + if (!Array.isArray(object.geoTargets)) + throw TypeError(".google.ads.admanager.v1.ListGeoTargetsResponse.geoTargets: array expected"); + message.geoTargets = []; + for (var i = 0; i < object.geoTargets.length; ++i) { + if (typeof object.geoTargets[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListGeoTargetsResponse.geoTargets: object expected"); + message.geoTargets[i] = $root.google.ads.admanager.v1.GeoTarget.fromObject(object.geoTargets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListGeoTargetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {google.ads.admanager.v1.ListGeoTargetsResponse} message ListGeoTargetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGeoTargetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.geoTargets = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.geoTargets && message.geoTargets.length) { + object.geoTargets = []; + for (var j = 0; j < message.geoTargets.length; ++j) + object.geoTargets[j] = $root.google.ads.admanager.v1.GeoTarget.toObject(message.geoTargets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListGeoTargetsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListGeoTargetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGeoTargetsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListGeoTargetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGeoTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListGeoTargetsResponse"; + }; + + return ListGeoTargetsResponse; + })(); + + v1.Label = (function() { + + /** + * Properties of a Label. + * @memberof google.ads.admanager.v1 + * @interface ILabel + * @property {string|null} [name] Label name + */ + + /** + * Constructs a new Label. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Label. + * @implements ILabel + * @constructor + * @param {google.ads.admanager.v1.ILabel=} [properties] Properties to set + */ + function Label(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]]; + } + + /** + * Label name. + * @member {string} name + * @memberof google.ads.admanager.v1.Label + * @instance + */ + Label.prototype.name = ""; + + /** + * Creates a new Label instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Label + * @static + * @param {google.ads.admanager.v1.ILabel=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Label} Label instance + */ + Label.create = function create(properties) { + return new Label(properties); + }; + + /** + * Encodes the specified Label message. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Label + * @static + * @param {google.ads.admanager.v1.ILabel} message Label message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Label.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 Label message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Label.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Label + * @static + * @param {google.ads.admanager.v1.ILabel} message Label message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Label.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Label message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Label + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Label} Label + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Label.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Label(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": - case 10014: - message.dimension = 10014; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": - case 11000: - message.dimension = 11000; + } + } + return message; + }; + + /** + * Decodes a Label message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Label + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Label} Label + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Label.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Label message. + * @function verify + * @memberof google.ads.admanager.v1.Label + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Label.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 Label message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Label + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Label} Label + */ + Label.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Label) + return object; + var message = new $root.google.ads.admanager.v1.Label(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Label message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Label + * @static + * @param {google.ads.admanager.v1.Label} message Label + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Label.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 Label to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Label + * @instance + * @returns {Object.} JSON object + */ + Label.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Label + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Label + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Label"; + }; + + return Label; + })(); + + v1.LiveStreamEvent = (function() { + + /** + * Properties of a LiveStreamEvent. + * @memberof google.ads.admanager.v1 + * @interface ILiveStreamEvent + * @property {string|null} [name] LiveStreamEvent name + */ + + /** + * Constructs a new LiveStreamEvent. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a LiveStreamEvent. + * @implements ILiveStreamEvent + * @constructor + * @param {google.ads.admanager.v1.ILiveStreamEvent=} [properties] Properties to set + */ + function LiveStreamEvent(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]]; + } + + /** + * LiveStreamEvent name. + * @member {string} name + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @instance + */ + LiveStreamEvent.prototype.name = ""; + + /** + * Creates a new LiveStreamEvent instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {google.ads.admanager.v1.ILiveStreamEvent=} [properties] Properties to set + * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent instance + */ + LiveStreamEvent.create = function create(properties) { + return new LiveStreamEvent(properties); + }; + + /** + * Encodes the specified LiveStreamEvent message. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {google.ads.admanager.v1.ILiveStreamEvent} message LiveStreamEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveStreamEvent.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 LiveStreamEvent message, length delimited. Does not implicitly {@link google.ads.admanager.v1.LiveStreamEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {google.ads.admanager.v1.ILiveStreamEvent} message LiveStreamEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveStreamEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveStreamEvent message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveStreamEvent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.LiveStreamEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": - case 11001: - message.dimension = 11001; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": - case 11002: - message.dimension = 11002; + } + } + return message; + }; + + /** + * Decodes a LiveStreamEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveStreamEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveStreamEvent message. + * @function verify + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveStreamEvent.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 LiveStreamEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.LiveStreamEvent} LiveStreamEvent + */ + LiveStreamEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.LiveStreamEvent) + return object; + var message = new $root.google.ads.admanager.v1.LiveStreamEvent(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LiveStreamEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {google.ads.admanager.v1.LiveStreamEvent} message LiveStreamEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveStreamEvent.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 LiveStreamEvent to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @instance + * @returns {Object.} JSON object + */ + LiveStreamEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LiveStreamEvent + * @function getTypeUrl + * @memberof google.ads.admanager.v1.LiveStreamEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveStreamEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.LiveStreamEvent"; + }; + + return LiveStreamEvent; + })(); + + v1.MobileCarrier = (function() { + + /** + * Properties of a MobileCarrier. + * @memberof google.ads.admanager.v1 + * @interface IMobileCarrier + * @property {string|null} [name] MobileCarrier name + * @property {string|null} [displayName] MobileCarrier displayName + * @property {string|null} [regionCode] MobileCarrier regionCode + */ + + /** + * Constructs a new MobileCarrier. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileCarrier. + * @implements IMobileCarrier + * @constructor + * @param {google.ads.admanager.v1.IMobileCarrier=} [properties] Properties to set + */ + function MobileCarrier(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]]; + } + + /** + * MobileCarrier name. + * @member {string} name + * @memberof google.ads.admanager.v1.MobileCarrier + * @instance + */ + MobileCarrier.prototype.name = ""; + + /** + * MobileCarrier displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.MobileCarrier + * @instance + */ + MobileCarrier.prototype.displayName = null; + + /** + * MobileCarrier regionCode. + * @member {string|null|undefined} regionCode + * @memberof google.ads.admanager.v1.MobileCarrier + * @instance + */ + MobileCarrier.prototype.regionCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileCarrier.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileCarrier.prototype, "_regionCode", { + get: $util.oneOfGetter($oneOfFields = ["regionCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileCarrier instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {google.ads.admanager.v1.IMobileCarrier=} [properties] Properties to set + * @returns {google.ads.admanager.v1.MobileCarrier} MobileCarrier instance + */ + MobileCarrier.create = function create(properties) { + return new MobileCarrier(properties); + }; + + /** + * Encodes the specified MobileCarrier message. Does not implicitly {@link google.ads.admanager.v1.MobileCarrier.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {google.ads.admanager.v1.IMobileCarrier} message MobileCarrier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileCarrier.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.regionCode); + return writer; + }; + + /** + * Encodes the specified MobileCarrier message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileCarrier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {google.ads.admanager.v1.IMobileCarrier} message MobileCarrier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileCarrier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileCarrier message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.MobileCarrier} MobileCarrier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileCarrier.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.MobileCarrier(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": - case 11003: - message.dimension = 11003; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 4: { + message.regionCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": - case 11004: - message.dimension = 11004; + } + } + return message; + }; + + /** + * Decodes a MobileCarrier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.MobileCarrier} MobileCarrier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileCarrier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileCarrier message. + * @function verify + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileCarrier.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) { + properties._regionCode = 1; + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + } + return null; + }; + + /** + * Creates a MobileCarrier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.MobileCarrier} MobileCarrier + */ + MobileCarrier.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.MobileCarrier) + return object; + var message = new $root.google.ads.admanager.v1.MobileCarrier(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + return message; + }; + + /** + * Creates a plain object from a MobileCarrier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {google.ads.admanager.v1.MobileCarrier} message MobileCarrier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileCarrier.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) { + object.regionCode = message.regionCode; + if (options.oneofs) + object._regionCode = "regionCode"; + } + return object; + }; + + /** + * Converts this MobileCarrier to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.MobileCarrier + * @instance + * @returns {Object.} JSON object + */ + MobileCarrier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileCarrier + * @function getTypeUrl + * @memberof google.ads.admanager.v1.MobileCarrier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileCarrier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.MobileCarrier"; + }; + + return MobileCarrier; + })(); + + v1.MobileCarrierService = (function() { + + /** + * Constructs a new MobileCarrierService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileCarrierService + * @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 MobileCarrierService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MobileCarrierService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MobileCarrierService; + + /** + * Creates new MobileCarrierService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.MobileCarrierService + * @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 {MobileCarrierService} RPC service. Useful where requests and/or responses are streamed. + */ + MobileCarrierService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileCarrierService|getMobileCarrier}. + * @memberof google.ads.admanager.v1.MobileCarrierService + * @typedef GetMobileCarrierCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.MobileCarrier} [response] MobileCarrier + */ + + /** + * Calls GetMobileCarrier. + * @function getMobileCarrier + * @memberof google.ads.admanager.v1.MobileCarrierService + * @instance + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest} request GetMobileCarrierRequest message or plain object + * @param {google.ads.admanager.v1.MobileCarrierService.GetMobileCarrierCallback} callback Node-style callback called with the error, if any, and MobileCarrier + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileCarrierService.prototype.getMobileCarrier = function getMobileCarrier(request, callback) { + return this.rpcCall(getMobileCarrier, $root.google.ads.admanager.v1.GetMobileCarrierRequest, $root.google.ads.admanager.v1.MobileCarrier, request, callback); + }, "name", { value: "GetMobileCarrier" }); + + /** + * Calls GetMobileCarrier. + * @function getMobileCarrier + * @memberof google.ads.admanager.v1.MobileCarrierService + * @instance + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest} request GetMobileCarrierRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileCarrierService|listMobileCarriers}. + * @memberof google.ads.admanager.v1.MobileCarrierService + * @typedef ListMobileCarriersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListMobileCarriersResponse} [response] ListMobileCarriersResponse + */ + + /** + * Calls ListMobileCarriers. + * @function listMobileCarriers + * @memberof google.ads.admanager.v1.MobileCarrierService + * @instance + * @param {google.ads.admanager.v1.IListMobileCarriersRequest} request ListMobileCarriersRequest message or plain object + * @param {google.ads.admanager.v1.MobileCarrierService.ListMobileCarriersCallback} callback Node-style callback called with the error, if any, and ListMobileCarriersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileCarrierService.prototype.listMobileCarriers = function listMobileCarriers(request, callback) { + return this.rpcCall(listMobileCarriers, $root.google.ads.admanager.v1.ListMobileCarriersRequest, $root.google.ads.admanager.v1.ListMobileCarriersResponse, request, callback); + }, "name", { value: "ListMobileCarriers" }); + + /** + * Calls ListMobileCarriers. + * @function listMobileCarriers + * @memberof google.ads.admanager.v1.MobileCarrierService + * @instance + * @param {google.ads.admanager.v1.IListMobileCarriersRequest} request ListMobileCarriersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MobileCarrierService; + })(); + + v1.GetMobileCarrierRequest = (function() { + + /** + * Properties of a GetMobileCarrierRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetMobileCarrierRequest + * @property {string|null} [name] GetMobileCarrierRequest name + */ + + /** + * Constructs a new GetMobileCarrierRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetMobileCarrierRequest. + * @implements IGetMobileCarrierRequest + * @constructor + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest=} [properties] Properties to set + */ + function GetMobileCarrierRequest(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]]; + } + + /** + * GetMobileCarrierRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @instance + */ + GetMobileCarrierRequest.prototype.name = ""; + + /** + * Creates a new GetMobileCarrierRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetMobileCarrierRequest} GetMobileCarrierRequest instance + */ + GetMobileCarrierRequest.create = function create(properties) { + return new GetMobileCarrierRequest(properties); + }; + + /** + * Encodes the specified GetMobileCarrierRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileCarrierRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest} message GetMobileCarrierRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileCarrierRequest.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 GetMobileCarrierRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileCarrierRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileCarrierRequest} message GetMobileCarrierRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileCarrierRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMobileCarrierRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetMobileCarrierRequest} GetMobileCarrierRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileCarrierRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetMobileCarrierRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": - case 11005: - message.dimension = 11005; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": - case 11006: - message.dimension = 11006; + } + } + return message; + }; + + /** + * Decodes a GetMobileCarrierRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetMobileCarrierRequest} GetMobileCarrierRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileCarrierRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMobileCarrierRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMobileCarrierRequest.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 GetMobileCarrierRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetMobileCarrierRequest} GetMobileCarrierRequest + */ + GetMobileCarrierRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetMobileCarrierRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetMobileCarrierRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMobileCarrierRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {google.ads.admanager.v1.GetMobileCarrierRequest} message GetMobileCarrierRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMobileCarrierRequest.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 GetMobileCarrierRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @instance + * @returns {Object.} JSON object + */ + GetMobileCarrierRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMobileCarrierRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetMobileCarrierRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMobileCarrierRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetMobileCarrierRequest"; + }; + + return GetMobileCarrierRequest; + })(); + + v1.ListMobileCarriersRequest = (function() { + + /** + * Properties of a ListMobileCarriersRequest. + * @memberof google.ads.admanager.v1 + * @interface IListMobileCarriersRequest + * @property {string|null} [parent] ListMobileCarriersRequest parent + * @property {number|null} [pageSize] ListMobileCarriersRequest pageSize + * @property {string|null} [pageToken] ListMobileCarriersRequest pageToken + * @property {string|null} [filter] ListMobileCarriersRequest filter + * @property {string|null} [orderBy] ListMobileCarriersRequest orderBy + * @property {number|null} [skip] ListMobileCarriersRequest skip + */ + + /** + * Constructs a new ListMobileCarriersRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileCarriersRequest. + * @implements IListMobileCarriersRequest + * @constructor + * @param {google.ads.admanager.v1.IListMobileCarriersRequest=} [properties] Properties to set + */ + function ListMobileCarriersRequest(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]]; + } + + /** + * ListMobileCarriersRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.parent = ""; + + /** + * ListMobileCarriersRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.pageSize = 0; + + /** + * ListMobileCarriersRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.pageToken = ""; + + /** + * ListMobileCarriersRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.filter = ""; + + /** + * ListMobileCarriersRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.orderBy = ""; + + /** + * ListMobileCarriersRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + */ + ListMobileCarriersRequest.prototype.skip = 0; + + /** + * Creates a new ListMobileCarriersRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileCarriersRequest} ListMobileCarriersRequest instance + */ + ListMobileCarriersRequest.create = function create(properties) { + return new ListMobileCarriersRequest(properties); + }; + + /** + * Encodes the specified ListMobileCarriersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersRequest} message ListMobileCarriersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileCarriersRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListMobileCarriersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersRequest} message ListMobileCarriersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileCarriersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileCarriersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileCarriersRequest} ListMobileCarriersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileCarriersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileCarriersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": - case 11007: - message.dimension = 11007; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": - case 11008: - message.dimension = 11008; + } + } + return message; + }; + + /** + * Decodes a ListMobileCarriersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileCarriersRequest} ListMobileCarriersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileCarriersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileCarriersRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileCarriersRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListMobileCarriersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileCarriersRequest} ListMobileCarriersRequest + */ + ListMobileCarriersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileCarriersRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileCarriersRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileCarriersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {google.ads.admanager.v1.ListMobileCarriersRequest} message ListMobileCarriersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileCarriersRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListMobileCarriersRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @instance + * @returns {Object.} JSON object + */ + ListMobileCarriersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileCarriersRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileCarriersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileCarriersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileCarriersRequest"; + }; + + return ListMobileCarriersRequest; + })(); + + v1.ListMobileCarriersResponse = (function() { + + /** + * Properties of a ListMobileCarriersResponse. + * @memberof google.ads.admanager.v1 + * @interface IListMobileCarriersResponse + * @property {Array.|null} [mobileCarriers] ListMobileCarriersResponse mobileCarriers + * @property {string|null} [nextPageToken] ListMobileCarriersResponse nextPageToken + * @property {number|null} [totalSize] ListMobileCarriersResponse totalSize + */ + + /** + * Constructs a new ListMobileCarriersResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileCarriersResponse. + * @implements IListMobileCarriersResponse + * @constructor + * @param {google.ads.admanager.v1.IListMobileCarriersResponse=} [properties] Properties to set + */ + function ListMobileCarriersResponse(properties) { + this.mobileCarriers = []; + 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]]; + } + + /** + * ListMobileCarriersResponse mobileCarriers. + * @member {Array.} mobileCarriers + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @instance + */ + ListMobileCarriersResponse.prototype.mobileCarriers = $util.emptyArray; + + /** + * ListMobileCarriersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @instance + */ + ListMobileCarriersResponse.prototype.nextPageToken = ""; + + /** + * ListMobileCarriersResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @instance + */ + ListMobileCarriersResponse.prototype.totalSize = 0; + + /** + * Creates a new ListMobileCarriersResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileCarriersResponse} ListMobileCarriersResponse instance + */ + ListMobileCarriersResponse.create = function create(properties) { + return new ListMobileCarriersResponse(properties); + }; + + /** + * Encodes the specified ListMobileCarriersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersResponse} message ListMobileCarriersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileCarriersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mobileCarriers != null && message.mobileCarriers.length) + for (var i = 0; i < message.mobileCarriers.length; ++i) + $root.google.ads.admanager.v1.MobileCarrier.encode(message.mobileCarriers[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListMobileCarriersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileCarriersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {google.ads.admanager.v1.IListMobileCarriersResponse} message ListMobileCarriersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileCarriersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileCarriersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileCarriersResponse} ListMobileCarriersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileCarriersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileCarriersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": - case 11009: - message.dimension = 11009; + switch (tag >>> 3) { + case 1: { + if (!(message.mobileCarriers && message.mobileCarriers.length)) + message.mobileCarriers = []; + message.mobileCarriers.push($root.google.ads.admanager.v1.MobileCarrier.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": - case 11010: - message.dimension = 11010; + } + } + return message; + }; + + /** + * Decodes a ListMobileCarriersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileCarriersResponse} ListMobileCarriersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileCarriersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileCarriersResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileCarriersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mobileCarriers != null && message.hasOwnProperty("mobileCarriers")) { + if (!Array.isArray(message.mobileCarriers)) + return "mobileCarriers: array expected"; + for (var i = 0; i < message.mobileCarriers.length; ++i) { + var error = $root.google.ads.admanager.v1.MobileCarrier.verify(message.mobileCarriers[i]); + if (error) + return "mobileCarriers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListMobileCarriersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileCarriersResponse} ListMobileCarriersResponse + */ + ListMobileCarriersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileCarriersResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileCarriersResponse(); + if (object.mobileCarriers) { + if (!Array.isArray(object.mobileCarriers)) + throw TypeError(".google.ads.admanager.v1.ListMobileCarriersResponse.mobileCarriers: array expected"); + message.mobileCarriers = []; + for (var i = 0; i < object.mobileCarriers.length; ++i) { + if (typeof object.mobileCarriers[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListMobileCarriersResponse.mobileCarriers: object expected"); + message.mobileCarriers[i] = $root.google.ads.admanager.v1.MobileCarrier.fromObject(object.mobileCarriers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileCarriersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {google.ads.admanager.v1.ListMobileCarriersResponse} message ListMobileCarriersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileCarriersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mobileCarriers = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.mobileCarriers && message.mobileCarriers.length) { + object.mobileCarriers = []; + for (var j = 0; j < message.mobileCarriers.length; ++j) + object.mobileCarriers[j] = $root.google.ads.admanager.v1.MobileCarrier.toObject(message.mobileCarriers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListMobileCarriersResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @instance + * @returns {Object.} JSON object + */ + ListMobileCarriersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileCarriersResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileCarriersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileCarriersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileCarriersResponse"; + }; + + return ListMobileCarriersResponse; + })(); + + v1.MobileDevice = (function() { + + /** + * Properties of a MobileDevice. + * @memberof google.ads.admanager.v1 + * @interface IMobileDevice + * @property {string|null} [name] MobileDevice name + * @property {string|null} [displayName] MobileDevice displayName + * @property {string|null} [manufacturer] MobileDevice manufacturer + */ + + /** + * Constructs a new MobileDevice. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileDevice. + * @implements IMobileDevice + * @constructor + * @param {google.ads.admanager.v1.IMobileDevice=} [properties] Properties to set + */ + function MobileDevice(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]]; + } + + /** + * MobileDevice name. + * @member {string} name + * @memberof google.ads.admanager.v1.MobileDevice + * @instance + */ + MobileDevice.prototype.name = ""; + + /** + * MobileDevice displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.MobileDevice + * @instance + */ + MobileDevice.prototype.displayName = null; + + /** + * MobileDevice manufacturer. + * @member {string|null|undefined} manufacturer + * @memberof google.ads.admanager.v1.MobileDevice + * @instance + */ + MobileDevice.prototype.manufacturer = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileDevice.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileDevice.prototype, "_manufacturer", { + get: $util.oneOfGetter($oneOfFields = ["manufacturer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileDevice instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {google.ads.admanager.v1.IMobileDevice=} [properties] Properties to set + * @returns {google.ads.admanager.v1.MobileDevice} MobileDevice instance + */ + MobileDevice.create = function create(properties) { + return new MobileDevice(properties); + }; + + /** + * Encodes the specified MobileDevice message. Does not implicitly {@link google.ads.admanager.v1.MobileDevice.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {google.ads.admanager.v1.IMobileDevice} message MobileDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileDevice.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.manufacturer); + return writer; + }; + + /** + * Encodes the specified MobileDevice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {google.ads.admanager.v1.IMobileDevice} message MobileDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileDevice message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.MobileDevice} MobileDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileDevice.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.MobileDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": - case 11011: - message.dimension = 11011; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.manufacturer = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": - case 11012: - message.dimension = 11012; + } + } + return message; + }; + + /** + * Decodes a MobileDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.MobileDevice} MobileDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileDevice message. + * @function verify + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileDevice.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) { + properties._manufacturer = 1; + if (!$util.isString(message.manufacturer)) + return "manufacturer: string expected"; + } + return null; + }; + + /** + * Creates a MobileDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.MobileDevice} MobileDevice + */ + MobileDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.MobileDevice) + return object; + var message = new $root.google.ads.admanager.v1.MobileDevice(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.manufacturer != null) + message.manufacturer = String(object.manufacturer); + return message; + }; + + /** + * Creates a plain object from a MobileDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {google.ads.admanager.v1.MobileDevice} message MobileDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileDevice.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) { + object.manufacturer = message.manufacturer; + if (options.oneofs) + object._manufacturer = "manufacturer"; + } + return object; + }; + + /** + * Converts this MobileDevice to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.MobileDevice + * @instance + * @returns {Object.} JSON object + */ + MobileDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileDevice + * @function getTypeUrl + * @memberof google.ads.admanager.v1.MobileDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.MobileDevice"; + }; + + return MobileDevice; + })(); + + v1.MobileDeviceService = (function() { + + /** + * Constructs a new MobileDeviceService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileDeviceService + * @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 MobileDeviceService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MobileDeviceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MobileDeviceService; + + /** + * Creates new MobileDeviceService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.MobileDeviceService + * @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 {MobileDeviceService} RPC service. Useful where requests and/or responses are streamed. + */ + MobileDeviceService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceService|getMobileDevice}. + * @memberof google.ads.admanager.v1.MobileDeviceService + * @typedef GetMobileDeviceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.MobileDevice} [response] MobileDevice + */ + + /** + * Calls GetMobileDevice. + * @function getMobileDevice + * @memberof google.ads.admanager.v1.MobileDeviceService + * @instance + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest} request GetMobileDeviceRequest message or plain object + * @param {google.ads.admanager.v1.MobileDeviceService.GetMobileDeviceCallback} callback Node-style callback called with the error, if any, and MobileDevice + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileDeviceService.prototype.getMobileDevice = function getMobileDevice(request, callback) { + return this.rpcCall(getMobileDevice, $root.google.ads.admanager.v1.GetMobileDeviceRequest, $root.google.ads.admanager.v1.MobileDevice, request, callback); + }, "name", { value: "GetMobileDevice" }); + + /** + * Calls GetMobileDevice. + * @function getMobileDevice + * @memberof google.ads.admanager.v1.MobileDeviceService + * @instance + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest} request GetMobileDeviceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceService|listMobileDevices}. + * @memberof google.ads.admanager.v1.MobileDeviceService + * @typedef ListMobileDevicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListMobileDevicesResponse} [response] ListMobileDevicesResponse + */ + + /** + * Calls ListMobileDevices. + * @function listMobileDevices + * @memberof google.ads.admanager.v1.MobileDeviceService + * @instance + * @param {google.ads.admanager.v1.IListMobileDevicesRequest} request ListMobileDevicesRequest message or plain object + * @param {google.ads.admanager.v1.MobileDeviceService.ListMobileDevicesCallback} callback Node-style callback called with the error, if any, and ListMobileDevicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileDeviceService.prototype.listMobileDevices = function listMobileDevices(request, callback) { + return this.rpcCall(listMobileDevices, $root.google.ads.admanager.v1.ListMobileDevicesRequest, $root.google.ads.admanager.v1.ListMobileDevicesResponse, request, callback); + }, "name", { value: "ListMobileDevices" }); + + /** + * Calls ListMobileDevices. + * @function listMobileDevices + * @memberof google.ads.admanager.v1.MobileDeviceService + * @instance + * @param {google.ads.admanager.v1.IListMobileDevicesRequest} request ListMobileDevicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MobileDeviceService; + })(); + + v1.GetMobileDeviceRequest = (function() { + + /** + * Properties of a GetMobileDeviceRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetMobileDeviceRequest + * @property {string|null} [name] GetMobileDeviceRequest name + */ + + /** + * Constructs a new GetMobileDeviceRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetMobileDeviceRequest. + * @implements IGetMobileDeviceRequest + * @constructor + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest=} [properties] Properties to set + */ + function GetMobileDeviceRequest(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]]; + } + + /** + * GetMobileDeviceRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @instance + */ + GetMobileDeviceRequest.prototype.name = ""; + + /** + * Creates a new GetMobileDeviceRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetMobileDeviceRequest} GetMobileDeviceRequest instance + */ + GetMobileDeviceRequest.create = function create(properties) { + return new GetMobileDeviceRequest(properties); + }; + + /** + * Encodes the specified GetMobileDeviceRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest} message GetMobileDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileDeviceRequest.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 GetMobileDeviceRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceRequest} message GetMobileDeviceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMobileDeviceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetMobileDeviceRequest} GetMobileDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileDeviceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetMobileDeviceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": - case 11013: - message.dimension = 11013; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": - case 11014: - message.dimension = 11014; + } + } + return message; + }; + + /** + * Decodes a GetMobileDeviceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetMobileDeviceRequest} GetMobileDeviceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileDeviceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMobileDeviceRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMobileDeviceRequest.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 GetMobileDeviceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetMobileDeviceRequest} GetMobileDeviceRequest + */ + GetMobileDeviceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetMobileDeviceRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetMobileDeviceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMobileDeviceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {google.ads.admanager.v1.GetMobileDeviceRequest} message GetMobileDeviceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMobileDeviceRequest.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 GetMobileDeviceRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @instance + * @returns {Object.} JSON object + */ + GetMobileDeviceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMobileDeviceRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetMobileDeviceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMobileDeviceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetMobileDeviceRequest"; + }; + + return GetMobileDeviceRequest; + })(); + + v1.ListMobileDevicesRequest = (function() { + + /** + * Properties of a ListMobileDevicesRequest. + * @memberof google.ads.admanager.v1 + * @interface IListMobileDevicesRequest + * @property {string|null} [parent] ListMobileDevicesRequest parent + * @property {number|null} [pageSize] ListMobileDevicesRequest pageSize + * @property {string|null} [pageToken] ListMobileDevicesRequest pageToken + * @property {string|null} [filter] ListMobileDevicesRequest filter + * @property {string|null} [orderBy] ListMobileDevicesRequest orderBy + * @property {number|null} [skip] ListMobileDevicesRequest skip + */ + + /** + * Constructs a new ListMobileDevicesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileDevicesRequest. + * @implements IListMobileDevicesRequest + * @constructor + * @param {google.ads.admanager.v1.IListMobileDevicesRequest=} [properties] Properties to set + */ + function ListMobileDevicesRequest(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]]; + } + + /** + * ListMobileDevicesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.parent = ""; + + /** + * ListMobileDevicesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.pageSize = 0; + + /** + * ListMobileDevicesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.pageToken = ""; + + /** + * ListMobileDevicesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.filter = ""; + + /** + * ListMobileDevicesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.orderBy = ""; + + /** + * ListMobileDevicesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + */ + ListMobileDevicesRequest.prototype.skip = 0; + + /** + * Creates a new ListMobileDevicesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileDevicesRequest} ListMobileDevicesRequest instance + */ + ListMobileDevicesRequest.create = function create(properties) { + return new ListMobileDevicesRequest(properties); + }; + + /** + * Encodes the specified ListMobileDevicesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesRequest} message ListMobileDevicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDevicesRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListMobileDevicesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesRequest} message ListMobileDevicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileDevicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileDevicesRequest} ListMobileDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDevicesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileDevicesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_0_OPTION_ID": - case 12000: - message.dimension = 12000; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_1_OPTION_ID": - case 12001: - message.dimension = 12001; + } + } + return message; + }; + + /** + * Decodes a ListMobileDevicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileDevicesRequest} ListMobileDevicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDevicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileDevicesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileDevicesRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListMobileDevicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileDevicesRequest} ListMobileDevicesRequest + */ + ListMobileDevicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileDevicesRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileDevicesRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileDevicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {google.ads.admanager.v1.ListMobileDevicesRequest} message ListMobileDevicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileDevicesRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListMobileDevicesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListMobileDevicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileDevicesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileDevicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileDevicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileDevicesRequest"; + }; + + return ListMobileDevicesRequest; + })(); + + v1.ListMobileDevicesResponse = (function() { + + /** + * Properties of a ListMobileDevicesResponse. + * @memberof google.ads.admanager.v1 + * @interface IListMobileDevicesResponse + * @property {Array.|null} [mobileDevices] ListMobileDevicesResponse mobileDevices + * @property {string|null} [nextPageToken] ListMobileDevicesResponse nextPageToken + * @property {number|null} [totalSize] ListMobileDevicesResponse totalSize + */ + + /** + * Constructs a new ListMobileDevicesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileDevicesResponse. + * @implements IListMobileDevicesResponse + * @constructor + * @param {google.ads.admanager.v1.IListMobileDevicesResponse=} [properties] Properties to set + */ + function ListMobileDevicesResponse(properties) { + this.mobileDevices = []; + 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]]; + } + + /** + * ListMobileDevicesResponse mobileDevices. + * @member {Array.} mobileDevices + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @instance + */ + ListMobileDevicesResponse.prototype.mobileDevices = $util.emptyArray; + + /** + * ListMobileDevicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @instance + */ + ListMobileDevicesResponse.prototype.nextPageToken = ""; + + /** + * ListMobileDevicesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @instance + */ + ListMobileDevicesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListMobileDevicesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileDevicesResponse} ListMobileDevicesResponse instance + */ + ListMobileDevicesResponse.create = function create(properties) { + return new ListMobileDevicesResponse(properties); + }; + + /** + * Encodes the specified ListMobileDevicesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesResponse} message ListMobileDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDevicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mobileDevices != null && message.mobileDevices.length) + for (var i = 0; i < message.mobileDevices.length; ++i) + $root.google.ads.admanager.v1.MobileDevice.encode(message.mobileDevices[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListMobileDevicesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDevicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDevicesResponse} message ListMobileDevicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileDevicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileDevicesResponse} ListMobileDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDevicesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileDevicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_2_OPTION_ID": - case 12002: - message.dimension = 12002; + switch (tag >>> 3) { + case 1: { + if (!(message.mobileDevices && message.mobileDevices.length)) + message.mobileDevices = []; + message.mobileDevices.push($root.google.ads.admanager.v1.MobileDevice.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_3_OPTION_ID": - case 12003: - message.dimension = 12003; + } + } + return message; + }; + + /** + * Decodes a ListMobileDevicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileDevicesResponse} ListMobileDevicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDevicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileDevicesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileDevicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mobileDevices != null && message.hasOwnProperty("mobileDevices")) { + if (!Array.isArray(message.mobileDevices)) + return "mobileDevices: array expected"; + for (var i = 0; i < message.mobileDevices.length; ++i) { + var error = $root.google.ads.admanager.v1.MobileDevice.verify(message.mobileDevices[i]); + if (error) + return "mobileDevices." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListMobileDevicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileDevicesResponse} ListMobileDevicesResponse + */ + ListMobileDevicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileDevicesResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileDevicesResponse(); + if (object.mobileDevices) { + if (!Array.isArray(object.mobileDevices)) + throw TypeError(".google.ads.admanager.v1.ListMobileDevicesResponse.mobileDevices: array expected"); + message.mobileDevices = []; + for (var i = 0; i < object.mobileDevices.length; ++i) { + if (typeof object.mobileDevices[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListMobileDevicesResponse.mobileDevices: object expected"); + message.mobileDevices[i] = $root.google.ads.admanager.v1.MobileDevice.fromObject(object.mobileDevices[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileDevicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {google.ads.admanager.v1.ListMobileDevicesResponse} message ListMobileDevicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileDevicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mobileDevices = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.mobileDevices && message.mobileDevices.length) { + object.mobileDevices = []; + for (var j = 0; j < message.mobileDevices.length; ++j) + object.mobileDevices[j] = $root.google.ads.admanager.v1.MobileDevice.toObject(message.mobileDevices[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListMobileDevicesResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListMobileDevicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileDevicesResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileDevicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileDevicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileDevicesResponse"; + }; + + return ListMobileDevicesResponse; + })(); + + v1.MobileDeviceSubmodel = (function() { + + /** + * Properties of a MobileDeviceSubmodel. + * @memberof google.ads.admanager.v1 + * @interface IMobileDeviceSubmodel + * @property {string|null} [name] MobileDeviceSubmodel name + * @property {string|null} [displayName] MobileDeviceSubmodel displayName + * @property {string|null} [mobileDevice] MobileDeviceSubmodel mobileDevice + */ + + /** + * Constructs a new MobileDeviceSubmodel. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileDeviceSubmodel. + * @implements IMobileDeviceSubmodel + * @constructor + * @param {google.ads.admanager.v1.IMobileDeviceSubmodel=} [properties] Properties to set + */ + function MobileDeviceSubmodel(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]]; + } + + /** + * MobileDeviceSubmodel name. + * @member {string} name + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @instance + */ + MobileDeviceSubmodel.prototype.name = ""; + + /** + * MobileDeviceSubmodel displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @instance + */ + MobileDeviceSubmodel.prototype.displayName = null; + + /** + * MobileDeviceSubmodel mobileDevice. + * @member {string|null|undefined} mobileDevice + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @instance + */ + MobileDeviceSubmodel.prototype.mobileDevice = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileDeviceSubmodel.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileDeviceSubmodel.prototype, "_mobileDevice", { + get: $util.oneOfGetter($oneOfFields = ["mobileDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileDeviceSubmodel instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {google.ads.admanager.v1.IMobileDeviceSubmodel=} [properties] Properties to set + * @returns {google.ads.admanager.v1.MobileDeviceSubmodel} MobileDeviceSubmodel instance + */ + MobileDeviceSubmodel.create = function create(properties) { + return new MobileDeviceSubmodel(properties); + }; + + /** + * Encodes the specified MobileDeviceSubmodel message. Does not implicitly {@link google.ads.admanager.v1.MobileDeviceSubmodel.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {google.ads.admanager.v1.IMobileDeviceSubmodel} message MobileDeviceSubmodel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileDeviceSubmodel.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.mobileDevice != null && Object.hasOwnProperty.call(message, "mobileDevice")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mobileDevice); + return writer; + }; + + /** + * Encodes the specified MobileDeviceSubmodel message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileDeviceSubmodel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {google.ads.admanager.v1.IMobileDeviceSubmodel} message MobileDeviceSubmodel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileDeviceSubmodel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileDeviceSubmodel message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.MobileDeviceSubmodel} MobileDeviceSubmodel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileDeviceSubmodel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.MobileDeviceSubmodel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_4_OPTION_ID": - case 12004: - message.dimension = 12004; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.mobileDevice = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_5_OPTION_ID": - case 12005: - message.dimension = 12005; + } + } + return message; + }; + + /** + * Decodes a MobileDeviceSubmodel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.MobileDeviceSubmodel} MobileDeviceSubmodel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileDeviceSubmodel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileDeviceSubmodel message. + * @function verify + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileDeviceSubmodel.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.mobileDevice != null && message.hasOwnProperty("mobileDevice")) { + properties._mobileDevice = 1; + if (!$util.isString(message.mobileDevice)) + return "mobileDevice: string expected"; + } + return null; + }; + + /** + * Creates a MobileDeviceSubmodel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.MobileDeviceSubmodel} MobileDeviceSubmodel + */ + MobileDeviceSubmodel.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.MobileDeviceSubmodel) + return object; + var message = new $root.google.ads.admanager.v1.MobileDeviceSubmodel(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.mobileDevice != null) + message.mobileDevice = String(object.mobileDevice); + return message; + }; + + /** + * Creates a plain object from a MobileDeviceSubmodel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {google.ads.admanager.v1.MobileDeviceSubmodel} message MobileDeviceSubmodel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileDeviceSubmodel.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.mobileDevice != null && message.hasOwnProperty("mobileDevice")) { + object.mobileDevice = message.mobileDevice; + if (options.oneofs) + object._mobileDevice = "mobileDevice"; + } + return object; + }; + + /** + * Converts this MobileDeviceSubmodel to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @instance + * @returns {Object.} JSON object + */ + MobileDeviceSubmodel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileDeviceSubmodel + * @function getTypeUrl + * @memberof google.ads.admanager.v1.MobileDeviceSubmodel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileDeviceSubmodel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.MobileDeviceSubmodel"; + }; + + return MobileDeviceSubmodel; + })(); + + v1.MobileDeviceSubmodelService = (function() { + + /** + * Constructs a new MobileDeviceSubmodelService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileDeviceSubmodelService + * @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 MobileDeviceSubmodelService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MobileDeviceSubmodelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MobileDeviceSubmodelService; + + /** + * Creates new MobileDeviceSubmodelService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @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 {MobileDeviceSubmodelService} RPC service. Useful where requests and/or responses are streamed. + */ + MobileDeviceSubmodelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceSubmodelService|getMobileDeviceSubmodel}. + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @typedef GetMobileDeviceSubmodelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.MobileDeviceSubmodel} [response] MobileDeviceSubmodel + */ + + /** + * Calls GetMobileDeviceSubmodel. + * @function getMobileDeviceSubmodel + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @instance + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest} request GetMobileDeviceSubmodelRequest message or plain object + * @param {google.ads.admanager.v1.MobileDeviceSubmodelService.GetMobileDeviceSubmodelCallback} callback Node-style callback called with the error, if any, and MobileDeviceSubmodel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileDeviceSubmodelService.prototype.getMobileDeviceSubmodel = function getMobileDeviceSubmodel(request, callback) { + return this.rpcCall(getMobileDeviceSubmodel, $root.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest, $root.google.ads.admanager.v1.MobileDeviceSubmodel, request, callback); + }, "name", { value: "GetMobileDeviceSubmodel" }); + + /** + * Calls GetMobileDeviceSubmodel. + * @function getMobileDeviceSubmodel + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @instance + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest} request GetMobileDeviceSubmodelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.MobileDeviceSubmodelService|listMobileDeviceSubmodels}. + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @typedef ListMobileDeviceSubmodelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} [response] ListMobileDeviceSubmodelsResponse + */ + + /** + * Calls ListMobileDeviceSubmodels. + * @function listMobileDeviceSubmodels + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @instance + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest} request ListMobileDeviceSubmodelsRequest message or plain object + * @param {google.ads.admanager.v1.MobileDeviceSubmodelService.ListMobileDeviceSubmodelsCallback} callback Node-style callback called with the error, if any, and ListMobileDeviceSubmodelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MobileDeviceSubmodelService.prototype.listMobileDeviceSubmodels = function listMobileDeviceSubmodels(request, callback) { + return this.rpcCall(listMobileDeviceSubmodels, $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest, $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse, request, callback); + }, "name", { value: "ListMobileDeviceSubmodels" }); + + /** + * Calls ListMobileDeviceSubmodels. + * @function listMobileDeviceSubmodels + * @memberof google.ads.admanager.v1.MobileDeviceSubmodelService + * @instance + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest} request ListMobileDeviceSubmodelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MobileDeviceSubmodelService; + })(); + + v1.GetMobileDeviceSubmodelRequest = (function() { + + /** + * Properties of a GetMobileDeviceSubmodelRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetMobileDeviceSubmodelRequest + * @property {string|null} [name] GetMobileDeviceSubmodelRequest name + */ + + /** + * Constructs a new GetMobileDeviceSubmodelRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetMobileDeviceSubmodelRequest. + * @implements IGetMobileDeviceSubmodelRequest + * @constructor + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest=} [properties] Properties to set + */ + function GetMobileDeviceSubmodelRequest(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]]; + } + + /** + * GetMobileDeviceSubmodelRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @instance + */ + GetMobileDeviceSubmodelRequest.prototype.name = ""; + + /** + * Creates a new GetMobileDeviceSubmodelRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetMobileDeviceSubmodelRequest} GetMobileDeviceSubmodelRequest instance + */ + GetMobileDeviceSubmodelRequest.create = function create(properties) { + return new GetMobileDeviceSubmodelRequest(properties); + }; + + /** + * Encodes the specified GetMobileDeviceSubmodelRequest message. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceSubmodelRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest} message GetMobileDeviceSubmodelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileDeviceSubmodelRequest.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 GetMobileDeviceSubmodelRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetMobileDeviceSubmodelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest} message GetMobileDeviceSubmodelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMobileDeviceSubmodelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMobileDeviceSubmodelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetMobileDeviceSubmodelRequest} GetMobileDeviceSubmodelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileDeviceSubmodelRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_6_OPTION_ID": - case 12006: - message.dimension = 12006; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_7_OPTION_ID": - case 12007: - message.dimension = 12007; + } + } + return message; + }; + + /** + * Decodes a GetMobileDeviceSubmodelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetMobileDeviceSubmodelRequest} GetMobileDeviceSubmodelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMobileDeviceSubmodelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMobileDeviceSubmodelRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMobileDeviceSubmodelRequest.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 GetMobileDeviceSubmodelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetMobileDeviceSubmodelRequest} GetMobileDeviceSubmodelRequest + */ + GetMobileDeviceSubmodelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMobileDeviceSubmodelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {google.ads.admanager.v1.GetMobileDeviceSubmodelRequest} message GetMobileDeviceSubmodelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMobileDeviceSubmodelRequest.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 GetMobileDeviceSubmodelRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @instance + * @returns {Object.} JSON object + */ + GetMobileDeviceSubmodelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMobileDeviceSubmodelRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMobileDeviceSubmodelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetMobileDeviceSubmodelRequest"; + }; + + return GetMobileDeviceSubmodelRequest; + })(); + + v1.ListMobileDeviceSubmodelsRequest = (function() { + + /** + * Properties of a ListMobileDeviceSubmodelsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListMobileDeviceSubmodelsRequest + * @property {string|null} [parent] ListMobileDeviceSubmodelsRequest parent + * @property {number|null} [pageSize] ListMobileDeviceSubmodelsRequest pageSize + * @property {string|null} [pageToken] ListMobileDeviceSubmodelsRequest pageToken + * @property {string|null} [filter] ListMobileDeviceSubmodelsRequest filter + * @property {string|null} [orderBy] ListMobileDeviceSubmodelsRequest orderBy + * @property {number|null} [skip] ListMobileDeviceSubmodelsRequest skip + */ + + /** + * Constructs a new ListMobileDeviceSubmodelsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileDeviceSubmodelsRequest. + * @implements IListMobileDeviceSubmodelsRequest + * @constructor + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest=} [properties] Properties to set + */ + function ListMobileDeviceSubmodelsRequest(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]]; + } + + /** + * ListMobileDeviceSubmodelsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.parent = ""; + + /** + * ListMobileDeviceSubmodelsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.pageSize = 0; + + /** + * ListMobileDeviceSubmodelsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.pageToken = ""; + + /** + * ListMobileDeviceSubmodelsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.filter = ""; + + /** + * ListMobileDeviceSubmodelsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.orderBy = ""; + + /** + * ListMobileDeviceSubmodelsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + */ + ListMobileDeviceSubmodelsRequest.prototype.skip = 0; + + /** + * Creates a new ListMobileDeviceSubmodelsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest} ListMobileDeviceSubmodelsRequest instance + */ + ListMobileDeviceSubmodelsRequest.create = function create(properties) { + return new ListMobileDeviceSubmodelsRequest(properties); + }; + + /** + * Encodes the specified ListMobileDeviceSubmodelsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest} message ListMobileDeviceSubmodelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDeviceSubmodelsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListMobileDeviceSubmodelsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest} message ListMobileDeviceSubmodelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDeviceSubmodelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileDeviceSubmodelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest} ListMobileDeviceSubmodelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDeviceSubmodelsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_8_OPTION_ID": - case 12008: - message.dimension = 12008; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_9_OPTION_ID": - case 12009: - message.dimension = 12009; + } + } + return message; + }; + + /** + * Decodes a ListMobileDeviceSubmodelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest} ListMobileDeviceSubmodelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDeviceSubmodelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileDeviceSubmodelsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileDeviceSubmodelsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListMobileDeviceSubmodelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest} ListMobileDeviceSubmodelsRequest + */ + ListMobileDeviceSubmodelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileDeviceSubmodelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest} message ListMobileDeviceSubmodelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileDeviceSubmodelsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListMobileDeviceSubmodelsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMobileDeviceSubmodelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileDeviceSubmodelsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileDeviceSubmodelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest"; + }; + + return ListMobileDeviceSubmodelsRequest; + })(); + + v1.ListMobileDeviceSubmodelsResponse = (function() { + + /** + * Properties of a ListMobileDeviceSubmodelsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListMobileDeviceSubmodelsResponse + * @property {Array.|null} [mobileDeviceSubmodels] ListMobileDeviceSubmodelsResponse mobileDeviceSubmodels + * @property {string|null} [nextPageToken] ListMobileDeviceSubmodelsResponse nextPageToken + * @property {number|null} [totalSize] ListMobileDeviceSubmodelsResponse totalSize + */ + + /** + * Constructs a new ListMobileDeviceSubmodelsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListMobileDeviceSubmodelsResponse. + * @implements IListMobileDeviceSubmodelsResponse + * @constructor + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse=} [properties] Properties to set + */ + function ListMobileDeviceSubmodelsResponse(properties) { + this.mobileDeviceSubmodels = []; + 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]]; + } + + /** + * ListMobileDeviceSubmodelsResponse mobileDeviceSubmodels. + * @member {Array.} mobileDeviceSubmodels + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @instance + */ + ListMobileDeviceSubmodelsResponse.prototype.mobileDeviceSubmodels = $util.emptyArray; + + /** + * ListMobileDeviceSubmodelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @instance + */ + ListMobileDeviceSubmodelsResponse.prototype.nextPageToken = ""; + + /** + * ListMobileDeviceSubmodelsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @instance + */ + ListMobileDeviceSubmodelsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListMobileDeviceSubmodelsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} ListMobileDeviceSubmodelsResponse instance + */ + ListMobileDeviceSubmodelsResponse.create = function create(properties) { + return new ListMobileDeviceSubmodelsResponse(properties); + }; + + /** + * Encodes the specified ListMobileDeviceSubmodelsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse} message ListMobileDeviceSubmodelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDeviceSubmodelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mobileDeviceSubmodels != null && message.mobileDeviceSubmodels.length) + for (var i = 0; i < message.mobileDeviceSubmodels.length; ++i) + $root.google.ads.admanager.v1.MobileDeviceSubmodel.encode(message.mobileDeviceSubmodels[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListMobileDeviceSubmodelsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse} message ListMobileDeviceSubmodelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMobileDeviceSubmodelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMobileDeviceSubmodelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} ListMobileDeviceSubmodelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDeviceSubmodelsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_10_OPTION_ID": - case 12010: - message.dimension = 12010; + switch (tag >>> 3) { + case 1: { + if (!(message.mobileDeviceSubmodels && message.mobileDeviceSubmodels.length)) + message.mobileDeviceSubmodels = []; + message.mobileDeviceSubmodels.push($root.google.ads.admanager.v1.MobileDeviceSubmodel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_11_OPTION_ID": - case 12011: - message.dimension = 12011; + } + } + return message; + }; + + /** + * Decodes a ListMobileDeviceSubmodelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} ListMobileDeviceSubmodelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMobileDeviceSubmodelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMobileDeviceSubmodelsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMobileDeviceSubmodelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mobileDeviceSubmodels != null && message.hasOwnProperty("mobileDeviceSubmodels")) { + if (!Array.isArray(message.mobileDeviceSubmodels)) + return "mobileDeviceSubmodels: array expected"; + for (var i = 0; i < message.mobileDeviceSubmodels.length; ++i) { + var error = $root.google.ads.admanager.v1.MobileDeviceSubmodel.verify(message.mobileDeviceSubmodels[i]); + if (error) + return "mobileDeviceSubmodels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListMobileDeviceSubmodelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} ListMobileDeviceSubmodelsResponse + */ + ListMobileDeviceSubmodelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse(); + if (object.mobileDeviceSubmodels) { + if (!Array.isArray(object.mobileDeviceSubmodels)) + throw TypeError(".google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.mobileDeviceSubmodels: array expected"); + message.mobileDeviceSubmodels = []; + for (var i = 0; i < object.mobileDeviceSubmodels.length; ++i) { + if (typeof object.mobileDeviceSubmodels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse.mobileDeviceSubmodels: object expected"); + message.mobileDeviceSubmodels[i] = $root.google.ads.admanager.v1.MobileDeviceSubmodel.fromObject(object.mobileDeviceSubmodels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListMobileDeviceSubmodelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse} message ListMobileDeviceSubmodelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMobileDeviceSubmodelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mobileDeviceSubmodels = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.mobileDeviceSubmodels && message.mobileDeviceSubmodels.length) { + object.mobileDeviceSubmodels = []; + for (var j = 0; j < message.mobileDeviceSubmodels.length; ++j) + object.mobileDeviceSubmodels[j] = $root.google.ads.admanager.v1.MobileDeviceSubmodel.toObject(message.mobileDeviceSubmodels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListMobileDeviceSubmodelsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMobileDeviceSubmodelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMobileDeviceSubmodelsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMobileDeviceSubmodelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse"; + }; + + return ListMobileDeviceSubmodelsResponse; + })(); + + v1.Network = (function() { + + /** + * Properties of a Network. + * @memberof google.ads.admanager.v1 + * @interface INetwork + * @property {string|null} [name] Network name + * @property {string|null} [displayName] Network displayName + * @property {string|null} [networkCode] Network networkCode + * @property {string|null} [propertyCode] Network propertyCode + * @property {string|null} [timeZone] Network timeZone + * @property {string|null} [currencyCode] Network currencyCode + * @property {Array.|null} [secondaryCurrencyCodes] Network secondaryCurrencyCodes + * @property {string|null} [effectiveRootAdUnit] Network effectiveRootAdUnit + * @property {boolean|null} [testNetwork] Network testNetwork + * @property {number|Long|null} [networkId] Network networkId + */ + + /** + * Constructs a new Network. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Network. + * @implements INetwork + * @constructor + * @param {google.ads.admanager.v1.INetwork=} [properties] Properties to set + */ + function Network(properties) { + this.secondaryCurrencyCodes = []; + 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]]; + } + + /** + * Network name. + * @member {string} name + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.name = ""; + + /** + * Network displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.displayName = ""; + + /** + * Network networkCode. + * @member {string} networkCode + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.networkCode = ""; + + /** + * Network propertyCode. + * @member {string} propertyCode + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.propertyCode = ""; + + /** + * Network timeZone. + * @member {string} timeZone + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.timeZone = ""; + + /** + * Network currencyCode. + * @member {string} currencyCode + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.currencyCode = ""; + + /** + * Network secondaryCurrencyCodes. + * @member {Array.} secondaryCurrencyCodes + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.secondaryCurrencyCodes = $util.emptyArray; + + /** + * Network effectiveRootAdUnit. + * @member {string} effectiveRootAdUnit + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.effectiveRootAdUnit = ""; + + /** + * Network testNetwork. + * @member {boolean} testNetwork + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.testNetwork = false; + + /** + * Network networkId. + * @member {number|Long} networkId + * @memberof google.ads.admanager.v1.Network + * @instance + */ + Network.prototype.networkId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Network instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Network + * @static + * @param {google.ads.admanager.v1.INetwork=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Network} Network instance + */ + Network.create = function create(properties) { + return new Network(properties); + }; + + /** + * Encodes the specified Network message. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Network + * @static + * @param {google.ads.admanager.v1.INetwork} message Network message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Network.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.networkCode != null && Object.hasOwnProperty.call(message, "networkCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkCode); + if (message.propertyCode != null && Object.hasOwnProperty.call(message, "propertyCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.propertyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.currencyCode); + if (message.secondaryCurrencyCodes != null && message.secondaryCurrencyCodes.length) + for (var i = 0; i < message.secondaryCurrencyCodes.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.secondaryCurrencyCodes[i]); + if (message.effectiveRootAdUnit != null && Object.hasOwnProperty.call(message, "effectiveRootAdUnit")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.effectiveRootAdUnit); + if (message.testNetwork != null && Object.hasOwnProperty.call(message, "testNetwork")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.testNetwork); + if (message.networkId != null && Object.hasOwnProperty.call(message, "networkId")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.networkId); + return writer; + }; + + /** + * Encodes the specified Network message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Network.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Network + * @static + * @param {google.ads.admanager.v1.INetwork} message Network message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Network.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Network message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Network + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Network} Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Network.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Network(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_12_OPTION_ID": - case 12012: - message.dimension = 12012; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.networkCode = reader.string(); + break; + } + case 4: { + message.propertyCode = reader.string(); + break; + } + case 5: { + message.timeZone = reader.string(); + break; + } + case 6: { + message.currencyCode = reader.string(); + break; + } + case 7: { + if (!(message.secondaryCurrencyCodes && message.secondaryCurrencyCodes.length)) + message.secondaryCurrencyCodes = []; + message.secondaryCurrencyCodes.push(reader.string()); + break; + } + case 8: { + message.effectiveRootAdUnit = reader.string(); + break; + } + case 10: { + message.testNetwork = reader.bool(); + break; + } + case 11: { + message.networkId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_13_OPTION_ID": - case 12013: - message.dimension = 12013; + } + } + return message; + }; + + /** + * Decodes a Network message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Network + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Network} Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Network.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Network message. + * @function verify + * @memberof google.ads.admanager.v1.Network + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Network.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + if (!$util.isString(message.networkCode)) + return "networkCode: string expected"; + if (message.propertyCode != null && message.hasOwnProperty("propertyCode")) + if (!$util.isString(message.propertyCode)) + return "propertyCode: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.secondaryCurrencyCodes != null && message.hasOwnProperty("secondaryCurrencyCodes")) { + if (!Array.isArray(message.secondaryCurrencyCodes)) + return "secondaryCurrencyCodes: array expected"; + for (var i = 0; i < message.secondaryCurrencyCodes.length; ++i) + if (!$util.isString(message.secondaryCurrencyCodes[i])) + return "secondaryCurrencyCodes: string[] expected"; + } + if (message.effectiveRootAdUnit != null && message.hasOwnProperty("effectiveRootAdUnit")) + if (!$util.isString(message.effectiveRootAdUnit)) + return "effectiveRootAdUnit: string expected"; + if (message.testNetwork != null && message.hasOwnProperty("testNetwork")) + if (typeof message.testNetwork !== "boolean") + return "testNetwork: boolean expected"; + if (message.networkId != null && message.hasOwnProperty("networkId")) + if (!$util.isInteger(message.networkId) && !(message.networkId && $util.isInteger(message.networkId.low) && $util.isInteger(message.networkId.high))) + return "networkId: integer|Long expected"; + return null; + }; + + /** + * Creates a Network message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Network + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Network} Network + */ + Network.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Network) + return object; + var message = new $root.google.ads.admanager.v1.Network(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.networkCode != null) + message.networkCode = String(object.networkCode); + if (object.propertyCode != null) + message.propertyCode = String(object.propertyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.secondaryCurrencyCodes) { + if (!Array.isArray(object.secondaryCurrencyCodes)) + throw TypeError(".google.ads.admanager.v1.Network.secondaryCurrencyCodes: array expected"); + message.secondaryCurrencyCodes = []; + for (var i = 0; i < object.secondaryCurrencyCodes.length; ++i) + message.secondaryCurrencyCodes[i] = String(object.secondaryCurrencyCodes[i]); + } + if (object.effectiveRootAdUnit != null) + message.effectiveRootAdUnit = String(object.effectiveRootAdUnit); + if (object.testNetwork != null) + message.testNetwork = Boolean(object.testNetwork); + if (object.networkId != null) + if ($util.Long) + (message.networkId = $util.Long.fromValue(object.networkId)).unsigned = false; + else if (typeof object.networkId === "string") + message.networkId = parseInt(object.networkId, 10); + else if (typeof object.networkId === "number") + message.networkId = object.networkId; + else if (typeof object.networkId === "object") + message.networkId = new $util.LongBits(object.networkId.low >>> 0, object.networkId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Network message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Network + * @static + * @param {google.ads.admanager.v1.Network} message Network + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Network.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.secondaryCurrencyCodes = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.networkCode = ""; + object.propertyCode = ""; + object.timeZone = ""; + object.currencyCode = ""; + object.effectiveRootAdUnit = ""; + object.testNetwork = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.networkId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.networkId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + object.networkCode = message.networkCode; + if (message.propertyCode != null && message.hasOwnProperty("propertyCode")) + object.propertyCode = message.propertyCode; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.secondaryCurrencyCodes && message.secondaryCurrencyCodes.length) { + object.secondaryCurrencyCodes = []; + for (var j = 0; j < message.secondaryCurrencyCodes.length; ++j) + object.secondaryCurrencyCodes[j] = message.secondaryCurrencyCodes[j]; + } + if (message.effectiveRootAdUnit != null && message.hasOwnProperty("effectiveRootAdUnit")) + object.effectiveRootAdUnit = message.effectiveRootAdUnit; + if (message.testNetwork != null && message.hasOwnProperty("testNetwork")) + object.testNetwork = message.testNetwork; + if (message.networkId != null && message.hasOwnProperty("networkId")) + if (typeof message.networkId === "number") + object.networkId = options.longs === String ? String(message.networkId) : message.networkId; + else + object.networkId = options.longs === String ? $util.Long.prototype.toString.call(message.networkId) : options.longs === Number ? new $util.LongBits(message.networkId.low >>> 0, message.networkId.high >>> 0).toNumber() : message.networkId; + return object; + }; + + /** + * Converts this Network to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Network + * @instance + * @returns {Object.} JSON object + */ + Network.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Network + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Network + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Network.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Network"; + }; + + return Network; + })(); + + v1.NetworkService = (function() { + + /** + * Constructs a new NetworkService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a NetworkService + * @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 NetworkService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NetworkService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetworkService; + + /** + * Creates new NetworkService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.NetworkService + * @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 {NetworkService} RPC service. Useful where requests and/or responses are streamed. + */ + NetworkService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.NetworkService|getNetwork}. + * @memberof google.ads.admanager.v1.NetworkService + * @typedef GetNetworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Network} [response] Network + */ + + /** + * Calls GetNetwork. + * @function getNetwork + * @memberof google.ads.admanager.v1.NetworkService + * @instance + * @param {google.ads.admanager.v1.IGetNetworkRequest} request GetNetworkRequest message or plain object + * @param {google.ads.admanager.v1.NetworkService.GetNetworkCallback} callback Node-style callback called with the error, if any, and Network + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkService.prototype.getNetwork = function getNetwork(request, callback) { + return this.rpcCall(getNetwork, $root.google.ads.admanager.v1.GetNetworkRequest, $root.google.ads.admanager.v1.Network, request, callback); + }, "name", { value: "GetNetwork" }); + + /** + * Calls GetNetwork. + * @function getNetwork + * @memberof google.ads.admanager.v1.NetworkService + * @instance + * @param {google.ads.admanager.v1.IGetNetworkRequest} request GetNetworkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.NetworkService|listNetworks}. + * @memberof google.ads.admanager.v1.NetworkService + * @typedef ListNetworksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListNetworksResponse} [response] ListNetworksResponse + */ + + /** + * Calls ListNetworks. + * @function listNetworks + * @memberof google.ads.admanager.v1.NetworkService + * @instance + * @param {google.ads.admanager.v1.IListNetworksRequest} request ListNetworksRequest message or plain object + * @param {google.ads.admanager.v1.NetworkService.ListNetworksCallback} callback Node-style callback called with the error, if any, and ListNetworksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkService.prototype.listNetworks = function listNetworks(request, callback) { + return this.rpcCall(listNetworks, $root.google.ads.admanager.v1.ListNetworksRequest, $root.google.ads.admanager.v1.ListNetworksResponse, request, callback); + }, "name", { value: "ListNetworks" }); + + /** + * Calls ListNetworks. + * @function listNetworks + * @memberof google.ads.admanager.v1.NetworkService + * @instance + * @param {google.ads.admanager.v1.IListNetworksRequest} request ListNetworksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NetworkService; + })(); + + v1.GetNetworkRequest = (function() { + + /** + * Properties of a GetNetworkRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetNetworkRequest + * @property {string|null} [name] GetNetworkRequest name + */ + + /** + * Constructs a new GetNetworkRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetNetworkRequest. + * @implements IGetNetworkRequest + * @constructor + * @param {google.ads.admanager.v1.IGetNetworkRequest=} [properties] Properties to set + */ + function GetNetworkRequest(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]]; + } + + /** + * GetNetworkRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @instance + */ + GetNetworkRequest.prototype.name = ""; + + /** + * Creates a new GetNetworkRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {google.ads.admanager.v1.IGetNetworkRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest instance + */ + GetNetworkRequest.create = function create(properties) { + return new GetNetworkRequest(properties); + }; + + /** + * Encodes the specified GetNetworkRequest message. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {google.ads.admanager.v1.IGetNetworkRequest} message GetNetworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNetworkRequest.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 GetNetworkRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetNetworkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {google.ads.admanager.v1.IGetNetworkRequest} message GetNetworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNetworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNetworkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNetworkRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetNetworkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_14_OPTION_ID": - case 12014: - message.dimension = 12014; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_0_VALUE": - case 13000: - message.dimension = 13000; + } + } + return message; + }; + + /** + * Decodes a GetNetworkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNetworkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNetworkRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNetworkRequest.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 GetNetworkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetNetworkRequest} GetNetworkRequest + */ + GetNetworkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetNetworkRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetNetworkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNetworkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {google.ads.admanager.v1.GetNetworkRequest} message GetNetworkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNetworkRequest.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 GetNetworkRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @instance + * @returns {Object.} JSON object + */ + GetNetworkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNetworkRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetNetworkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNetworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetNetworkRequest"; + }; + + return GetNetworkRequest; + })(); + + v1.ListNetworksRequest = (function() { + + /** + * Properties of a ListNetworksRequest. + * @memberof google.ads.admanager.v1 + * @interface IListNetworksRequest + */ + + /** + * Constructs a new ListNetworksRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListNetworksRequest. + * @implements IListNetworksRequest + * @constructor + * @param {google.ads.admanager.v1.IListNetworksRequest=} [properties] Properties to set + */ + function ListNetworksRequest(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 ListNetworksRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {google.ads.admanager.v1.IListNetworksRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest instance + */ + ListNetworksRequest.create = function create(properties) { + return new ListNetworksRequest(properties); + }; + + /** + * Encodes the specified ListNetworksRequest message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {google.ads.admanager.v1.IListNetworksRequest} message ListNetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNetworksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ListNetworksRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {google.ads.admanager.v1.IListNetworksRequest} message ListNetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNetworksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNetworksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListNetworksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_1_VALUE": - case 13001: - message.dimension = 13001; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_2_VALUE": - case 13002: - message.dimension = 13002; + } + } + return message; + }; + + /** + * Decodes a ListNetworksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNetworksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNetworksRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNetworksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ListNetworksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListNetworksRequest} ListNetworksRequest + */ + ListNetworksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListNetworksRequest) + return object; + return new $root.google.ads.admanager.v1.ListNetworksRequest(); + }; + + /** + * Creates a plain object from a ListNetworksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {google.ads.admanager.v1.ListNetworksRequest} message ListNetworksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNetworksRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ListNetworksRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @instance + * @returns {Object.} JSON object + */ + ListNetworksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNetworksRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListNetworksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListNetworksRequest"; + }; + + return ListNetworksRequest; + })(); + + v1.ListNetworksResponse = (function() { + + /** + * Properties of a ListNetworksResponse. + * @memberof google.ads.admanager.v1 + * @interface IListNetworksResponse + * @property {Array.|null} [networks] ListNetworksResponse networks + */ + + /** + * Constructs a new ListNetworksResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListNetworksResponse. + * @implements IListNetworksResponse + * @constructor + * @param {google.ads.admanager.v1.IListNetworksResponse=} [properties] Properties to set + */ + function ListNetworksResponse(properties) { + this.networks = []; + 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]]; + } + + /** + * ListNetworksResponse networks. + * @member {Array.} networks + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @instance + */ + ListNetworksResponse.prototype.networks = $util.emptyArray; + + /** + * Creates a new ListNetworksResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {google.ads.admanager.v1.IListNetworksResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse instance + */ + ListNetworksResponse.create = function create(properties) { + return new ListNetworksResponse(properties); + }; + + /** + * Encodes the specified ListNetworksResponse message. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {google.ads.admanager.v1.IListNetworksResponse} message ListNetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNetworksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networks != null && message.networks.length) + for (var i = 0; i < message.networks.length; ++i) + $root.google.ads.admanager.v1.Network.encode(message.networks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListNetworksResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListNetworksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {google.ads.admanager.v1.IListNetworksResponse} message ListNetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNetworksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNetworksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListNetworksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_3_VALUE": - case 13003: - message.dimension = 13003; + switch (tag >>> 3) { + case 1: { + if (!(message.networks && message.networks.length)) + message.networks = []; + message.networks.push($root.google.ads.admanager.v1.Network.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_4_VALUE": - case 13004: - message.dimension = 13004; + } + } + return message; + }; + + /** + * Decodes a ListNetworksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNetworksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNetworksResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNetworksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networks != null && message.hasOwnProperty("networks")) { + if (!Array.isArray(message.networks)) + return "networks: array expected"; + for (var i = 0; i < message.networks.length; ++i) { + var error = $root.google.ads.admanager.v1.Network.verify(message.networks[i]); + if (error) + return "networks." + error; + } + } + return null; + }; + + /** + * Creates a ListNetworksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListNetworksResponse} ListNetworksResponse + */ + ListNetworksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListNetworksResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListNetworksResponse(); + if (object.networks) { + if (!Array.isArray(object.networks)) + throw TypeError(".google.ads.admanager.v1.ListNetworksResponse.networks: array expected"); + message.networks = []; + for (var i = 0; i < object.networks.length; ++i) { + if (typeof object.networks[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListNetworksResponse.networks: object expected"); + message.networks[i] = $root.google.ads.admanager.v1.Network.fromObject(object.networks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListNetworksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {google.ads.admanager.v1.ListNetworksResponse} message ListNetworksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNetworksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networks = []; + if (message.networks && message.networks.length) { + object.networks = []; + for (var j = 0; j < message.networks.length; ++j) + object.networks[j] = $root.google.ads.admanager.v1.Network.toObject(message.networks[j], options); + } + return object; + }; + + /** + * Converts this ListNetworksResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @instance + * @returns {Object.} JSON object + */ + ListNetworksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNetworksResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListNetworksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListNetworksResponse"; + }; + + return ListNetworksResponse; + })(); + + v1.OperatingSystem = (function() { + + /** + * Properties of an OperatingSystem. + * @memberof google.ads.admanager.v1 + * @interface IOperatingSystem + * @property {string|null} [name] OperatingSystem name + * @property {string|null} [displayName] OperatingSystem displayName + */ + + /** + * Constructs a new OperatingSystem. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OperatingSystem. + * @implements IOperatingSystem + * @constructor + * @param {google.ads.admanager.v1.IOperatingSystem=} [properties] Properties to set + */ + function OperatingSystem(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]]; + } + + /** + * OperatingSystem name. + * @member {string} name + * @memberof google.ads.admanager.v1.OperatingSystem + * @instance + */ + OperatingSystem.prototype.name = ""; + + /** + * OperatingSystem displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.OperatingSystem + * @instance + */ + OperatingSystem.prototype.displayName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OperatingSystem.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OperatingSystem instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {google.ads.admanager.v1.IOperatingSystem=} [properties] Properties to set + * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem instance + */ + OperatingSystem.create = function create(properties) { + return new OperatingSystem(properties); + }; + + /** + * Encodes the specified OperatingSystem message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {google.ads.admanager.v1.IOperatingSystem} message OperatingSystem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystem.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified OperatingSystem message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {google.ads.admanager.v1.IOperatingSystem} message OperatingSystem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperatingSystem message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_5_VALUE": - case 13005: - message.dimension = 13005; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_6_VALUE": - case 13006: - message.dimension = 13006; + } + } + return message; + }; + + /** + * Decodes an OperatingSystem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperatingSystem message. + * @function verify + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperatingSystem.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.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + return null; + }; + + /** + * Creates an OperatingSystem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.OperatingSystem} OperatingSystem + */ + OperatingSystem.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.OperatingSystem) + return object; + var message = new $root.google.ads.admanager.v1.OperatingSystem(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an OperatingSystem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {google.ads.admanager.v1.OperatingSystem} message OperatingSystem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperatingSystem.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 (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + return object; + }; + + /** + * Converts this OperatingSystem to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.OperatingSystem + * @instance + * @returns {Object.} JSON object + */ + OperatingSystem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperatingSystem + * @function getTypeUrl + * @memberof google.ads.admanager.v1.OperatingSystem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperatingSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystem"; + }; + + return OperatingSystem; + })(); + + v1.OperatingSystemService = (function() { + + /** + * Constructs a new OperatingSystemService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OperatingSystemService + * @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 OperatingSystemService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OperatingSystemService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OperatingSystemService; + + /** + * Creates new OperatingSystemService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.OperatingSystemService + * @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 {OperatingSystemService} RPC service. Useful where requests and/or responses are streamed. + */ + OperatingSystemService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|getOperatingSystem}. + * @memberof google.ads.admanager.v1.OperatingSystemService + * @typedef GetOperatingSystemCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.OperatingSystem} [response] OperatingSystem + */ + + /** + * Calls GetOperatingSystem. + * @function getOperatingSystem + * @memberof google.ads.admanager.v1.OperatingSystemService + * @instance + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} request GetOperatingSystemRequest message or plain object + * @param {google.ads.admanager.v1.OperatingSystemService.GetOperatingSystemCallback} callback Node-style callback called with the error, if any, and OperatingSystem + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OperatingSystemService.prototype.getOperatingSystem = function getOperatingSystem(request, callback) { + return this.rpcCall(getOperatingSystem, $root.google.ads.admanager.v1.GetOperatingSystemRequest, $root.google.ads.admanager.v1.OperatingSystem, request, callback); + }, "name", { value: "GetOperatingSystem" }); + + /** + * Calls GetOperatingSystem. + * @function getOperatingSystem + * @memberof google.ads.admanager.v1.OperatingSystemService + * @instance + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} request GetOperatingSystemRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemService|listOperatingSystems}. + * @memberof google.ads.admanager.v1.OperatingSystemService + * @typedef ListOperatingSystemsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListOperatingSystemsResponse} [response] ListOperatingSystemsResponse + */ + + /** + * Calls ListOperatingSystems. + * @function listOperatingSystems + * @memberof google.ads.admanager.v1.OperatingSystemService + * @instance + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} request ListOperatingSystemsRequest message or plain object + * @param {google.ads.admanager.v1.OperatingSystemService.ListOperatingSystemsCallback} callback Node-style callback called with the error, if any, and ListOperatingSystemsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OperatingSystemService.prototype.listOperatingSystems = function listOperatingSystems(request, callback) { + return this.rpcCall(listOperatingSystems, $root.google.ads.admanager.v1.ListOperatingSystemsRequest, $root.google.ads.admanager.v1.ListOperatingSystemsResponse, request, callback); + }, "name", { value: "ListOperatingSystems" }); + + /** + * Calls ListOperatingSystems. + * @function listOperatingSystems + * @memberof google.ads.admanager.v1.OperatingSystemService + * @instance + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} request ListOperatingSystemsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OperatingSystemService; + })(); + + v1.GetOperatingSystemRequest = (function() { + + /** + * Properties of a GetOperatingSystemRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetOperatingSystemRequest + * @property {string|null} [name] GetOperatingSystemRequest name + */ + + /** + * Constructs a new GetOperatingSystemRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetOperatingSystemRequest. + * @implements IGetOperatingSystemRequest + * @constructor + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest=} [properties] Properties to set + */ + function GetOperatingSystemRequest(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]]; + } + + /** + * GetOperatingSystemRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @instance + */ + GetOperatingSystemRequest.prototype.name = ""; + + /** + * Creates a new GetOperatingSystemRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest instance + */ + GetOperatingSystemRequest.create = function create(properties) { + return new GetOperatingSystemRequest(properties); + }; + + /** + * Encodes the specified GetOperatingSystemRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} message GetOperatingSystemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperatingSystemRequest.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 GetOperatingSystemRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemRequest} message GetOperatingSystemRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperatingSystemRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperatingSystemRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperatingSystemRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOperatingSystemRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_7_VALUE": - case 13007: - message.dimension = 13007; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_8_VALUE": - case 13008: - message.dimension = 13008; + } + } + return message; + }; + + /** + * Decodes a GetOperatingSystemRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperatingSystemRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperatingSystemRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperatingSystemRequest.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 GetOperatingSystemRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetOperatingSystemRequest} GetOperatingSystemRequest + */ + GetOperatingSystemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetOperatingSystemRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetOperatingSystemRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperatingSystemRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {google.ads.admanager.v1.GetOperatingSystemRequest} message GetOperatingSystemRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperatingSystemRequest.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 GetOperatingSystemRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperatingSystemRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperatingSystemRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetOperatingSystemRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperatingSystemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetOperatingSystemRequest"; + }; + + return GetOperatingSystemRequest; + })(); + + v1.ListOperatingSystemsRequest = (function() { + + /** + * Properties of a ListOperatingSystemsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListOperatingSystemsRequest + * @property {string|null} [parent] ListOperatingSystemsRequest parent + * @property {number|null} [pageSize] ListOperatingSystemsRequest pageSize + * @property {string|null} [pageToken] ListOperatingSystemsRequest pageToken + * @property {string|null} [filter] ListOperatingSystemsRequest filter + * @property {string|null} [orderBy] ListOperatingSystemsRequest orderBy + * @property {number|null} [skip] ListOperatingSystemsRequest skip + */ + + /** + * Constructs a new ListOperatingSystemsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOperatingSystemsRequest. + * @implements IListOperatingSystemsRequest + * @constructor + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest=} [properties] Properties to set + */ + function ListOperatingSystemsRequest(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]]; + } + + /** + * ListOperatingSystemsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.parent = ""; + + /** + * ListOperatingSystemsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.pageSize = 0; + + /** + * ListOperatingSystemsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.pageToken = ""; + + /** + * ListOperatingSystemsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.filter = ""; + + /** + * ListOperatingSystemsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.orderBy = ""; + + /** + * ListOperatingSystemsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + */ + ListOperatingSystemsRequest.prototype.skip = 0; + + /** + * Creates a new ListOperatingSystemsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest instance + */ + ListOperatingSystemsRequest.create = function create(properties) { + return new ListOperatingSystemsRequest(properties); + }; + + /** + * Encodes the specified ListOperatingSystemsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} message ListOperatingSystemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListOperatingSystemsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsRequest} message ListOperatingSystemsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_9_VALUE": - case 13009: - message.dimension = 13009; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_10_VALUE": - case 13010: - message.dimension = 13010; + } + } + return message; + }; + + /** + * Decodes a ListOperatingSystemsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperatingSystemsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperatingSystemsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListOperatingSystemsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOperatingSystemsRequest} ListOperatingSystemsRequest + */ + ListOperatingSystemsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListOperatingSystemsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListOperatingSystemsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {google.ads.admanager.v1.ListOperatingSystemsRequest} message ListOperatingSystemsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperatingSystemsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListOperatingSystemsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperatingSystemsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperatingSystemsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOperatingSystemsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperatingSystemsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemsRequest"; + }; + + return ListOperatingSystemsRequest; + })(); + + v1.ListOperatingSystemsResponse = (function() { + + /** + * Properties of a ListOperatingSystemsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListOperatingSystemsResponse + * @property {Array.|null} [operatingSystems] ListOperatingSystemsResponse operatingSystems + * @property {string|null} [nextPageToken] ListOperatingSystemsResponse nextPageToken + * @property {number|null} [totalSize] ListOperatingSystemsResponse totalSize + */ + + /** + * Constructs a new ListOperatingSystemsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOperatingSystemsResponse. + * @implements IListOperatingSystemsResponse + * @constructor + * @param {google.ads.admanager.v1.IListOperatingSystemsResponse=} [properties] Properties to set + */ + function ListOperatingSystemsResponse(properties) { + this.operatingSystems = []; + 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]]; + } + + /** + * ListOperatingSystemsResponse operatingSystems. + * @member {Array.} operatingSystems + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @instance + */ + ListOperatingSystemsResponse.prototype.operatingSystems = $util.emptyArray; + + /** + * ListOperatingSystemsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @instance + */ + ListOperatingSystemsResponse.prototype.nextPageToken = ""; + + /** + * ListOperatingSystemsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @instance + */ + ListOperatingSystemsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListOperatingSystemsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse instance + */ + ListOperatingSystemsResponse.create = function create(properties) { + return new ListOperatingSystemsResponse(properties); + }; + + /** + * Encodes the specified ListOperatingSystemsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsResponse} message ListOperatingSystemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatingSystems != null && message.operatingSystems.length) + for (var i = 0; i < message.operatingSystems.length; ++i) + $root.google.ads.admanager.v1.OperatingSystem.encode(message.operatingSystems[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListOperatingSystemsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemsResponse} message ListOperatingSystemsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_11_VALUE": - case 13011: - message.dimension = 13011; + switch (tag >>> 3) { + case 1: { + if (!(message.operatingSystems && message.operatingSystems.length)) + message.operatingSystems = []; + message.operatingSystems.push($root.google.ads.admanager.v1.OperatingSystem.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_12_VALUE": - case 13012: - message.dimension = 13012; + } + } + return message; + }; + + /** + * Decodes a ListOperatingSystemsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperatingSystemsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperatingSystemsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatingSystems != null && message.hasOwnProperty("operatingSystems")) { + if (!Array.isArray(message.operatingSystems)) + return "operatingSystems: array expected"; + for (var i = 0; i < message.operatingSystems.length; ++i) { + var error = $root.google.ads.admanager.v1.OperatingSystem.verify(message.operatingSystems[i]); + if (error) + return "operatingSystems." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListOperatingSystemsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOperatingSystemsResponse} ListOperatingSystemsResponse + */ + ListOperatingSystemsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListOperatingSystemsResponse(); + if (object.operatingSystems) { + if (!Array.isArray(object.operatingSystems)) + throw TypeError(".google.ads.admanager.v1.ListOperatingSystemsResponse.operatingSystems: array expected"); + message.operatingSystems = []; + for (var i = 0; i < object.operatingSystems.length; ++i) { + if (typeof object.operatingSystems[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListOperatingSystemsResponse.operatingSystems: object expected"); + message.operatingSystems[i] = $root.google.ads.admanager.v1.OperatingSystem.fromObject(object.operatingSystems[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListOperatingSystemsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {google.ads.admanager.v1.ListOperatingSystemsResponse} message ListOperatingSystemsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperatingSystemsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operatingSystems = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.operatingSystems && message.operatingSystems.length) { + object.operatingSystems = []; + for (var j = 0; j < message.operatingSystems.length; ++j) + object.operatingSystems[j] = $root.google.ads.admanager.v1.OperatingSystem.toObject(message.operatingSystems[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListOperatingSystemsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperatingSystemsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperatingSystemsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOperatingSystemsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperatingSystemsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemsResponse"; + }; + + return ListOperatingSystemsResponse; + })(); + + v1.OperatingSystemVersion = (function() { + + /** + * Properties of an OperatingSystemVersion. + * @memberof google.ads.admanager.v1 + * @interface IOperatingSystemVersion + * @property {string|null} [name] OperatingSystemVersion name + * @property {number|null} [majorVersion] OperatingSystemVersion majorVersion + * @property {number|null} [minorVersion] OperatingSystemVersion minorVersion + * @property {number|null} [microVersion] OperatingSystemVersion microVersion + */ + + /** + * Constructs a new OperatingSystemVersion. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OperatingSystemVersion. + * @implements IOperatingSystemVersion + * @constructor + * @param {google.ads.admanager.v1.IOperatingSystemVersion=} [properties] Properties to set + */ + function OperatingSystemVersion(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]]; + } + + /** + * OperatingSystemVersion name. + * @member {string} name + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @instance + */ + OperatingSystemVersion.prototype.name = ""; + + /** + * OperatingSystemVersion majorVersion. + * @member {number|null|undefined} majorVersion + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @instance + */ + OperatingSystemVersion.prototype.majorVersion = null; + + /** + * OperatingSystemVersion minorVersion. + * @member {number|null|undefined} minorVersion + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @instance + */ + OperatingSystemVersion.prototype.minorVersion = null; + + /** + * OperatingSystemVersion microVersion. + * @member {number|null|undefined} microVersion + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @instance + */ + OperatingSystemVersion.prototype.microVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OperatingSystemVersion.prototype, "_majorVersion", { + get: $util.oneOfGetter($oneOfFields = ["majorVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OperatingSystemVersion.prototype, "_minorVersion", { + get: $util.oneOfGetter($oneOfFields = ["minorVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OperatingSystemVersion.prototype, "_microVersion", { + get: $util.oneOfGetter($oneOfFields = ["microVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OperatingSystemVersion instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {google.ads.admanager.v1.IOperatingSystemVersion=} [properties] Properties to set + * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion instance + */ + OperatingSystemVersion.create = function create(properties) { + return new OperatingSystemVersion(properties); + }; + + /** + * Encodes the specified OperatingSystemVersion message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {google.ads.admanager.v1.IOperatingSystemVersion} message OperatingSystemVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystemVersion.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.majorVersion != null && Object.hasOwnProperty.call(message, "majorVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.majorVersion); + if (message.minorVersion != null && Object.hasOwnProperty.call(message, "minorVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minorVersion); + if (message.microVersion != null && Object.hasOwnProperty.call(message, "microVersion")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.microVersion); + return writer; + }; + + /** + * Encodes the specified OperatingSystemVersion message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {google.ads.admanager.v1.IOperatingSystemVersion} message OperatingSystemVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystemVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperatingSystemVersion message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystemVersion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystemVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "ORDER_CUSTOM_FIELD_13_VALUE": - case 13013: - message.dimension = 13013; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorVersion = reader.int32(); + break; + } + case 3: { + message.minorVersion = reader.int32(); + break; + } + case 4: { + message.microVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "ORDER_CUSTOM_FIELD_14_VALUE": - case 13014: - message.dimension = 13014; + } + } + return message; + }; + + /** + * Decodes an OperatingSystemVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystemVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperatingSystemVersion message. + * @function verify + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperatingSystemVersion.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.majorVersion != null && message.hasOwnProperty("majorVersion")) { + properties._majorVersion = 1; + if (!$util.isInteger(message.majorVersion)) + return "majorVersion: integer expected"; + } + if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { + properties._minorVersion = 1; + if (!$util.isInteger(message.minorVersion)) + return "minorVersion: integer expected"; + } + if (message.microVersion != null && message.hasOwnProperty("microVersion")) { + properties._microVersion = 1; + if (!$util.isInteger(message.microVersion)) + return "microVersion: integer expected"; + } + return null; + }; + + /** + * Creates an OperatingSystemVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.OperatingSystemVersion} OperatingSystemVersion + */ + OperatingSystemVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.OperatingSystemVersion) + return object; + var message = new $root.google.ads.admanager.v1.OperatingSystemVersion(); + if (object.name != null) + message.name = String(object.name); + if (object.majorVersion != null) + message.majorVersion = object.majorVersion | 0; + if (object.minorVersion != null) + message.minorVersion = object.minorVersion | 0; + if (object.microVersion != null) + message.microVersion = object.microVersion | 0; + return message; + }; + + /** + * Creates a plain object from an OperatingSystemVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {google.ads.admanager.v1.OperatingSystemVersion} message OperatingSystemVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperatingSystemVersion.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 (message.majorVersion != null && message.hasOwnProperty("majorVersion")) { + object.majorVersion = message.majorVersion; + if (options.oneofs) + object._majorVersion = "majorVersion"; + } + if (message.minorVersion != null && message.hasOwnProperty("minorVersion")) { + object.minorVersion = message.minorVersion; + if (options.oneofs) + object._minorVersion = "minorVersion"; + } + if (message.microVersion != null && message.hasOwnProperty("microVersion")) { + object.microVersion = message.microVersion; + if (options.oneofs) + object._microVersion = "microVersion"; + } + return object; + }; + + /** + * Converts this OperatingSystemVersion to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @instance + * @returns {Object.} JSON object + */ + OperatingSystemVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperatingSystemVersion + * @function getTypeUrl + * @memberof google.ads.admanager.v1.OperatingSystemVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperatingSystemVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystemVersion"; + }; + + return OperatingSystemVersion; + })(); + + v1.OperatingSystemVersionService = (function() { + + /** + * Constructs a new OperatingSystemVersionService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OperatingSystemVersionService + * @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 OperatingSystemVersionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OperatingSystemVersionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OperatingSystemVersionService; + + /** + * Creates new OperatingSystemVersionService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @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 {OperatingSystemVersionService} RPC service. Useful where requests and/or responses are streamed. + */ + OperatingSystemVersionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|getOperatingSystemVersion}. + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @typedef GetOperatingSystemVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.OperatingSystemVersion} [response] OperatingSystemVersion + */ + + /** + * Calls GetOperatingSystemVersion. + * @function getOperatingSystemVersion + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @instance + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} request GetOperatingSystemVersionRequest message or plain object + * @param {google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersionCallback} callback Node-style callback called with the error, if any, and OperatingSystemVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OperatingSystemVersionService.prototype.getOperatingSystemVersion = function getOperatingSystemVersion(request, callback) { + return this.rpcCall(getOperatingSystemVersion, $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest, $root.google.ads.admanager.v1.OperatingSystemVersion, request, callback); + }, "name", { value: "GetOperatingSystemVersion" }); + + /** + * Calls GetOperatingSystemVersion. + * @function getOperatingSystemVersion + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @instance + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} request GetOperatingSystemVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.OperatingSystemVersionService|listOperatingSystemVersions}. + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @typedef ListOperatingSystemVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} [response] ListOperatingSystemVersionsResponse + */ + + /** + * Calls ListOperatingSystemVersions. + * @function listOperatingSystemVersions + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @instance + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} request ListOperatingSystemVersionsRequest message or plain object + * @param {google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersionsCallback} callback Node-style callback called with the error, if any, and ListOperatingSystemVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OperatingSystemVersionService.prototype.listOperatingSystemVersions = function listOperatingSystemVersions(request, callback) { + return this.rpcCall(listOperatingSystemVersions, $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest, $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse, request, callback); + }, "name", { value: "ListOperatingSystemVersions" }); + + /** + * Calls ListOperatingSystemVersions. + * @function listOperatingSystemVersions + * @memberof google.ads.admanager.v1.OperatingSystemVersionService + * @instance + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} request ListOperatingSystemVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OperatingSystemVersionService; + })(); + + v1.GetOperatingSystemVersionRequest = (function() { + + /** + * Properties of a GetOperatingSystemVersionRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetOperatingSystemVersionRequest + * @property {string|null} [name] GetOperatingSystemVersionRequest name + */ + + /** + * Constructs a new GetOperatingSystemVersionRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetOperatingSystemVersionRequest. + * @implements IGetOperatingSystemVersionRequest + * @constructor + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest=} [properties] Properties to set + */ + function GetOperatingSystemVersionRequest(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]]; + } + + /** + * GetOperatingSystemVersionRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @instance + */ + GetOperatingSystemVersionRequest.prototype.name = ""; + + /** + * Creates a new GetOperatingSystemVersionRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest instance + */ + GetOperatingSystemVersionRequest.create = function create(properties) { + return new GetOperatingSystemVersionRequest(properties); + }; + + /** + * Encodes the specified GetOperatingSystemVersionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperatingSystemVersionRequest.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 GetOperatingSystemVersionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOperatingSystemVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {google.ads.admanager.v1.IGetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperatingSystemVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperatingSystemVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": - case 14000: - message.dimension = 14000; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": - case 14001: - message.dimension = 14001; + } + } + return message; + }; + + /** + * Decodes a GetOperatingSystemVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperatingSystemVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperatingSystemVersionRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperatingSystemVersionRequest.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 GetOperatingSystemVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetOperatingSystemVersionRequest} GetOperatingSystemVersionRequest + */ + GetOperatingSystemVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetOperatingSystemVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperatingSystemVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {google.ads.admanager.v1.GetOperatingSystemVersionRequest} message GetOperatingSystemVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperatingSystemVersionRequest.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 GetOperatingSystemVersionRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperatingSystemVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperatingSystemVersionRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetOperatingSystemVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperatingSystemVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetOperatingSystemVersionRequest"; + }; + + return GetOperatingSystemVersionRequest; + })(); + + v1.ListOperatingSystemVersionsRequest = (function() { + + /** + * Properties of a ListOperatingSystemVersionsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListOperatingSystemVersionsRequest + * @property {string|null} [parent] ListOperatingSystemVersionsRequest parent + * @property {number|null} [pageSize] ListOperatingSystemVersionsRequest pageSize + * @property {string|null} [pageToken] ListOperatingSystemVersionsRequest pageToken + * @property {string|null} [filter] ListOperatingSystemVersionsRequest filter + * @property {string|null} [orderBy] ListOperatingSystemVersionsRequest orderBy + * @property {number|null} [skip] ListOperatingSystemVersionsRequest skip + */ + + /** + * Constructs a new ListOperatingSystemVersionsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOperatingSystemVersionsRequest. + * @implements IListOperatingSystemVersionsRequest + * @constructor + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest=} [properties] Properties to set + */ + function ListOperatingSystemVersionsRequest(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]]; + } + + /** + * ListOperatingSystemVersionsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.parent = ""; + + /** + * ListOperatingSystemVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.pageSize = 0; + + /** + * ListOperatingSystemVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.pageToken = ""; + + /** + * ListOperatingSystemVersionsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.filter = ""; + + /** + * ListOperatingSystemVersionsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.orderBy = ""; + + /** + * ListOperatingSystemVersionsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + */ + ListOperatingSystemVersionsRequest.prototype.skip = 0; + + /** + * Creates a new ListOperatingSystemVersionsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest instance + */ + ListOperatingSystemVersionsRequest.create = function create(properties) { + return new ListOperatingSystemVersionsRequest(properties); + }; + + /** + * Encodes the specified ListOperatingSystemVersionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemVersionsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListOperatingSystemVersionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": - case 14002: - message.dimension = 14002; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": - case 14003: - message.dimension = 14003; + } + } + return message; + }; + + /** + * Decodes a ListOperatingSystemVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperatingSystemVersionsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperatingSystemVersionsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListOperatingSystemVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} ListOperatingSystemVersionsRequest + */ + ListOperatingSystemVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListOperatingSystemVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {google.ads.admanager.v1.ListOperatingSystemVersionsRequest} message ListOperatingSystemVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperatingSystemVersionsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListOperatingSystemVersionsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperatingSystemVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperatingSystemVersionsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperatingSystemVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemVersionsRequest"; + }; + + return ListOperatingSystemVersionsRequest; + })(); + + v1.ListOperatingSystemVersionsResponse = (function() { + + /** + * Properties of a ListOperatingSystemVersionsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListOperatingSystemVersionsResponse + * @property {Array.|null} [operatingSystemVersions] ListOperatingSystemVersionsResponse operatingSystemVersions + * @property {string|null} [nextPageToken] ListOperatingSystemVersionsResponse nextPageToken + * @property {number|null} [totalSize] ListOperatingSystemVersionsResponse totalSize + */ + + /** + * Constructs a new ListOperatingSystemVersionsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOperatingSystemVersionsResponse. + * @implements IListOperatingSystemVersionsResponse + * @constructor + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse=} [properties] Properties to set + */ + function ListOperatingSystemVersionsResponse(properties) { + this.operatingSystemVersions = []; + 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]]; + } + + /** + * ListOperatingSystemVersionsResponse operatingSystemVersions. + * @member {Array.} operatingSystemVersions + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @instance + */ + ListOperatingSystemVersionsResponse.prototype.operatingSystemVersions = $util.emptyArray; + + /** + * ListOperatingSystemVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @instance + */ + ListOperatingSystemVersionsResponse.prototype.nextPageToken = ""; + + /** + * ListOperatingSystemVersionsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @instance + */ + ListOperatingSystemVersionsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListOperatingSystemVersionsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse instance + */ + ListOperatingSystemVersionsResponse.create = function create(properties) { + return new ListOperatingSystemVersionsResponse(properties); + }; + + /** + * Encodes the specified ListOperatingSystemVersionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatingSystemVersions != null && message.operatingSystemVersions.length) + for (var i = 0; i < message.operatingSystemVersions.length; ++i) + $root.google.ads.admanager.v1.OperatingSystemVersion.encode(message.operatingSystemVersions[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListOperatingSystemVersionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOperatingSystemVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {google.ads.admanager.v1.IListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperatingSystemVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemVersionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": - case 14004: - message.dimension = 14004; + switch (tag >>> 3) { + case 1: { + if (!(message.operatingSystemVersions && message.operatingSystemVersions.length)) + message.operatingSystemVersions = []; + message.operatingSystemVersions.push($root.google.ads.admanager.v1.OperatingSystemVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": - case 14005: - message.dimension = 14005; + } + } + return message; + }; + + /** + * Decodes a ListOperatingSystemVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperatingSystemVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperatingSystemVersionsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperatingSystemVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatingSystemVersions != null && message.hasOwnProperty("operatingSystemVersions")) { + if (!Array.isArray(message.operatingSystemVersions)) + return "operatingSystemVersions: array expected"; + for (var i = 0; i < message.operatingSystemVersions.length; ++i) { + var error = $root.google.ads.admanager.v1.OperatingSystemVersion.verify(message.operatingSystemVersions[i]); + if (error) + return "operatingSystemVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListOperatingSystemVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} ListOperatingSystemVersionsResponse + */ + ListOperatingSystemVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListOperatingSystemVersionsResponse(); + if (object.operatingSystemVersions) { + if (!Array.isArray(object.operatingSystemVersions)) + throw TypeError(".google.ads.admanager.v1.ListOperatingSystemVersionsResponse.operatingSystemVersions: array expected"); + message.operatingSystemVersions = []; + for (var i = 0; i < object.operatingSystemVersions.length; ++i) { + if (typeof object.operatingSystemVersions[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListOperatingSystemVersionsResponse.operatingSystemVersions: object expected"); + message.operatingSystemVersions[i] = $root.google.ads.admanager.v1.OperatingSystemVersion.fromObject(object.operatingSystemVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListOperatingSystemVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {google.ads.admanager.v1.ListOperatingSystemVersionsResponse} message ListOperatingSystemVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperatingSystemVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operatingSystemVersions = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.operatingSystemVersions && message.operatingSystemVersions.length) { + object.operatingSystemVersions = []; + for (var j = 0; j < message.operatingSystemVersions.length; ++j) + object.operatingSystemVersions[j] = $root.google.ads.admanager.v1.OperatingSystemVersion.toObject(message.operatingSystemVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListOperatingSystemVersionsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperatingSystemVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperatingSystemVersionsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOperatingSystemVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperatingSystemVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOperatingSystemVersionsResponse"; + }; + + return ListOperatingSystemVersionsResponse; + })(); + + v1.OrderStatusEnum = (function() { + + /** + * Properties of an OrderStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface IOrderStatusEnum + */ + + /** + * Constructs a new OrderStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OrderStatusEnum. + * @implements IOrderStatusEnum + * @constructor + * @param {google.ads.admanager.v1.IOrderStatusEnum=} [properties] Properties to set + */ + function OrderStatusEnum(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 OrderStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {google.ads.admanager.v1.IOrderStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum instance + */ + OrderStatusEnum.create = function create(properties) { + return new OrderStatusEnum(properties); + }; + + /** + * Encodes the specified OrderStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {google.ads.admanager.v1.IOrderStatusEnum} message OrderStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OrderStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OrderStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {google.ads.admanager.v1.IOrderStatusEnum} message OrderStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OrderStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": - case 14006: - message.dimension = 14006; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": - case 14007: - message.dimension = 14007; + } + } + return message; + }; + + /** + * Decodes an OrderStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OrderStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.OrderStatusEnum} OrderStatusEnum + */ + OrderStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.OrderStatusEnum) + return object; + return new $root.google.ads.admanager.v1.OrderStatusEnum(); + }; + + /** + * Creates a plain object from an OrderStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {google.ads.admanager.v1.OrderStatusEnum} message OrderStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OrderStatusEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @instance + * @returns {Object.} JSON object + */ + OrderStatusEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderStatusEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.OrderStatusEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.OrderStatusEnum"; + }; + + /** + * OrderStatus enum. + * @name google.ads.admanager.v1.OrderStatusEnum.OrderStatus + * @enum {number} + * @property {number} ORDER_STATUS_UNSPECIFIED=0 ORDER_STATUS_UNSPECIFIED value + * @property {number} DRAFT=2 DRAFT value + * @property {number} PENDING_APPROVAL=3 PENDING_APPROVAL value + * @property {number} APPROVED=4 APPROVED value + * @property {number} DISAPPROVED=5 DISAPPROVED value + * @property {number} PAUSED=6 PAUSED value + * @property {number} CANCELED=7 CANCELED value + * @property {number} DELETED=8 DELETED value + */ + OrderStatusEnum.OrderStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_STATUS_UNSPECIFIED"] = 0; + values[valuesById[2] = "DRAFT"] = 2; + values[valuesById[3] = "PENDING_APPROVAL"] = 3; + values[valuesById[4] = "APPROVED"] = 4; + values[valuesById[5] = "DISAPPROVED"] = 5; + values[valuesById[6] = "PAUSED"] = 6; + values[valuesById[7] = "CANCELED"] = 7; + values[valuesById[8] = "DELETED"] = 8; + return values; + })(); + + return OrderStatusEnum; + })(); + + v1.Order = (function() { + + /** + * Properties of an Order. + * @memberof google.ads.admanager.v1 + * @interface IOrder + * @property {string|null} [name] Order name + * @property {number|Long|null} [orderId] Order orderId + * @property {string|null} [displayName] Order displayName + * @property {boolean|null} [programmatic] Order programmatic + * @property {string|null} [trafficker] Order trafficker + * @property {Array.|null} [advertiserContacts] Order advertiserContacts + * @property {string|null} [advertiser] Order advertiser + * @property {Array.|null} [agencyContacts] Order agencyContacts + * @property {string|null} [agency] Order agency + * @property {Array.|null} [appliedTeams] Order appliedTeams + * @property {Array.|null} [effectiveTeams] Order effectiveTeams + * @property {string|null} [creator] Order creator + * @property {string|null} [currencyCode] Order currencyCode + * @property {google.protobuf.ITimestamp|null} [startTime] Order startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Order endTime + * @property {boolean|null} [unlimitedEndTime] Order unlimitedEndTime + * @property {number|null} [externalOrderId] Order externalOrderId + * @property {boolean|null} [archived] Order archived + * @property {string|null} [lastModifiedByApp] Order lastModifiedByApp + * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime + * @property {string|null} [notes] Order notes + * @property {string|null} [poNumber] Order poNumber + * @property {google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null} [status] Order status + * @property {string|null} [salesperson] Order salesperson + * @property {Array.|null} [secondarySalespeople] Order secondarySalespeople + * @property {Array.|null} [secondaryTraffickers] Order secondaryTraffickers + * @property {Array.|null} [appliedLabels] Order appliedLabels + * @property {Array.|null} [effectiveAppliedLabels] Order effectiveAppliedLabels + * @property {Array.|null} [customFieldValues] Order customFieldValues + */ + + /** + * Constructs a new Order. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an Order. + * @implements IOrder + * @constructor + * @param {google.ads.admanager.v1.IOrder=} [properties] Properties to set + */ + function Order(properties) { + this.advertiserContacts = []; + this.agencyContacts = []; + this.appliedTeams = []; + this.effectiveTeams = []; + this.secondarySalespeople = []; + this.secondaryTraffickers = []; + this.appliedLabels = []; + this.effectiveAppliedLabels = []; + this.customFieldValues = []; + 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]]; + } + + /** + * Order name. + * @member {string} name + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.name = ""; + + /** + * Order orderId. + * @member {number|Long|null|undefined} orderId + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.orderId = null; + + /** + * Order displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.displayName = null; + + /** + * Order programmatic. + * @member {boolean|null|undefined} programmatic + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.programmatic = null; + + /** + * Order trafficker. + * @member {string|null|undefined} trafficker + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.trafficker = null; + + /** + * Order advertiserContacts. + * @member {Array.} advertiserContacts + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.advertiserContacts = $util.emptyArray; + + /** + * Order advertiser. + * @member {string|null|undefined} advertiser + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.advertiser = null; + + /** + * Order agencyContacts. + * @member {Array.} agencyContacts + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.agencyContacts = $util.emptyArray; + + /** + * Order agency. + * @member {string|null|undefined} agency + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.agency = null; + + /** + * Order appliedTeams. + * @member {Array.} appliedTeams + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.appliedTeams = $util.emptyArray; + + /** + * Order effectiveTeams. + * @member {Array.} effectiveTeams + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.effectiveTeams = $util.emptyArray; + + /** + * Order creator. + * @member {string|null|undefined} creator + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.creator = null; + + /** + * Order currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.currencyCode = null; + + /** + * Order startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.startTime = null; + + /** + * Order endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.endTime = null; + + /** + * Order unlimitedEndTime. + * @member {boolean|null|undefined} unlimitedEndTime + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.unlimitedEndTime = null; + + /** + * Order externalOrderId. + * @member {number|null|undefined} externalOrderId + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.externalOrderId = null; + + /** + * Order archived. + * @member {boolean|null|undefined} archived + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.archived = null; + + /** + * Order lastModifiedByApp. + * @member {string|null|undefined} lastModifiedByApp + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.lastModifiedByApp = null; + + /** + * Order updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.updateTime = null; + + /** + * Order notes. + * @member {string|null|undefined} notes + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.notes = null; + + /** + * Order poNumber. + * @member {string|null|undefined} poNumber + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.poNumber = null; + + /** + * Order status. + * @member {google.ads.admanager.v1.OrderStatusEnum.OrderStatus|null|undefined} status + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.status = null; + + /** + * Order salesperson. + * @member {string|null|undefined} salesperson + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.salesperson = null; + + /** + * Order secondarySalespeople. + * @member {Array.} secondarySalespeople + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.secondarySalespeople = $util.emptyArray; + + /** + * Order secondaryTraffickers. + * @member {Array.} secondaryTraffickers + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.secondaryTraffickers = $util.emptyArray; + + /** + * Order appliedLabels. + * @member {Array.} appliedLabels + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.appliedLabels = $util.emptyArray; + + /** + * Order effectiveAppliedLabels. + * @member {Array.} effectiveAppliedLabels + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.effectiveAppliedLabels = $util.emptyArray; + + /** + * Order customFieldValues. + * @member {Array.} customFieldValues + * @memberof google.ads.admanager.v1.Order + * @instance + */ + Order.prototype.customFieldValues = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_orderId", { + get: $util.oneOfGetter($oneOfFields = ["orderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_programmatic", { + get: $util.oneOfGetter($oneOfFields = ["programmatic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_trafficker", { + get: $util.oneOfGetter($oneOfFields = ["trafficker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_advertiser", { + get: $util.oneOfGetter($oneOfFields = ["advertiser"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_agency", { + get: $util.oneOfGetter($oneOfFields = ["agency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_creator", { + get: $util.oneOfGetter($oneOfFields = ["creator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_startTime", { + get: $util.oneOfGetter($oneOfFields = ["startTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_endTime", { + get: $util.oneOfGetter($oneOfFields = ["endTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_unlimitedEndTime", { + get: $util.oneOfGetter($oneOfFields = ["unlimitedEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_externalOrderId", { + get: $util.oneOfGetter($oneOfFields = ["externalOrderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_archived", { + get: $util.oneOfGetter($oneOfFields = ["archived"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_lastModifiedByApp", { + get: $util.oneOfGetter($oneOfFields = ["lastModifiedByApp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_notes", { + get: $util.oneOfGetter($oneOfFields = ["notes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_poNumber", { + get: $util.oneOfGetter($oneOfFields = ["poNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Order.prototype, "_salesperson", { + get: $util.oneOfGetter($oneOfFields = ["salesperson"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Order instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Order + * @static + * @param {google.ads.admanager.v1.IOrder=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Order} Order instance + */ + Order.create = function create(properties) { + return new Order(properties); + }; + + /** + * Encodes the specified Order message. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Order + * @static + * @param {google.ads.admanager.v1.IOrder} message Order message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Order.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.programmatic != null && Object.hasOwnProperty.call(message, "programmatic")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.programmatic); + if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.orderId); + if (message.advertiserContacts != null && message.advertiserContacts.length) + for (var i = 0; i < message.advertiserContacts.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.advertiserContacts[i]); + if (message.advertiser != null && Object.hasOwnProperty.call(message, "advertiser")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.advertiser); + if (message.agencyContacts != null && message.agencyContacts.length) + for (var i = 0; i < message.agencyContacts.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.agencyContacts[i]); + if (message.agency != null && Object.hasOwnProperty.call(message, "agency")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.agency); + if (message.appliedTeams != null && message.appliedTeams.length) + for (var i = 0; i < message.appliedTeams.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.appliedTeams[i]); + if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.creator); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.externalOrderId != null && Object.hasOwnProperty.call(message, "externalOrderId")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.externalOrderId); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.archived); + if (message.lastModifiedByApp != null && Object.hasOwnProperty.call(message, "lastModifiedByApp")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.lastModifiedByApp); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.notes); + if (message.poNumber != null && Object.hasOwnProperty.call(message, "poNumber")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.poNumber); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.status); + if (message.salesperson != null && Object.hasOwnProperty.call(message, "salesperson")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.salesperson); + if (message.secondarySalespeople != null && message.secondarySalespeople.length) + for (var i = 0; i < message.secondarySalespeople.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.secondarySalespeople[i]); + if (message.trafficker != null && Object.hasOwnProperty.call(message, "trafficker")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.trafficker); + if (message.secondaryTraffickers != null && message.secondaryTraffickers.length) + for (var i = 0; i < message.secondaryTraffickers.length; ++i) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.secondaryTraffickers[i]); + if (message.appliedLabels != null && message.appliedLabels.length) + for (var i = 0; i < message.appliedLabels.length; ++i) + $root.google.ads.admanager.v1.AppliedLabel.encode(message.appliedLabels[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.effectiveAppliedLabels != null && message.effectiveAppliedLabels.length) + for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) + $root.google.ads.admanager.v1.AppliedLabel.encode(message.effectiveAppliedLabels[i], writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.effectiveTeams != null && message.effectiveTeams.length) + for (var i = 0; i < message.effectiveTeams.length; ++i) + writer.uint32(/* id 28, wireType 2 =*/226).string(message.effectiveTeams[i]); + if (message.customFieldValues != null && message.customFieldValues.length) + for (var i = 0; i < message.customFieldValues.length; ++i) + $root.google.ads.admanager.v1.CustomFieldValue.encode(message.customFieldValues[i], writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.unlimitedEndTime != null && Object.hasOwnProperty.call(message, "unlimitedEndTime")) + writer.uint32(/* id 45, wireType 0 =*/360).bool(message.unlimitedEndTime); + return writer; + }; + + /** + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Order.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Order + * @static + * @param {google.ads.admanager.v1.IOrder} message Order message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Order.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Order message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Order + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Order} Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Order.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Order(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": - case 14008: - message.dimension = 14008; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.orderId = reader.int64(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.programmatic = reader.bool(); + break; + } + case 23: { + message.trafficker = reader.string(); + break; + } + case 5: { + if (!(message.advertiserContacts && message.advertiserContacts.length)) + message.advertiserContacts = []; + message.advertiserContacts.push(reader.string()); + break; + } + case 6: { + message.advertiser = reader.string(); + break; + } + case 7: { + if (!(message.agencyContacts && message.agencyContacts.length)) + message.agencyContacts = []; + message.agencyContacts.push(reader.string()); + break; + } + case 8: { + message.agency = reader.string(); + break; + } + case 9: { + if (!(message.appliedTeams && message.appliedTeams.length)) + message.appliedTeams = []; + message.appliedTeams.push(reader.string()); + break; + } + case 28: { + if (!(message.effectiveTeams && message.effectiveTeams.length)) + message.effectiveTeams = []; + message.effectiveTeams.push(reader.string()); + break; + } + case 10: { + message.creator = reader.string(); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 19: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 45: { + message.unlimitedEndTime = reader.bool(); + break; + } + case 13: { + message.externalOrderId = reader.int32(); + break; + } + case 14: { + message.archived = reader.bool(); + break; + } + case 15: { + message.lastModifiedByApp = reader.string(); + break; + } + case 16: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.notes = reader.string(); + break; + } + case 18: { + message.poNumber = reader.string(); + break; + } + case 20: { + message.status = reader.int32(); + break; + } + case 21: { + message.salesperson = reader.string(); + break; + } + case 22: { + if (!(message.secondarySalespeople && message.secondarySalespeople.length)) + message.secondarySalespeople = []; + message.secondarySalespeople.push(reader.string()); + break; + } + case 24: { + if (!(message.secondaryTraffickers && message.secondaryTraffickers.length)) + message.secondaryTraffickers = []; + message.secondaryTraffickers.push(reader.string()); + break; + } + case 25: { + if (!(message.appliedLabels && message.appliedLabels.length)) + message.appliedLabels = []; + message.appliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); + break; + } + case 26: { + if (!(message.effectiveAppliedLabels && message.effectiveAppliedLabels.length)) + message.effectiveAppliedLabels = []; + message.effectiveAppliedLabels.push($root.google.ads.admanager.v1.AppliedLabel.decode(reader, reader.uint32())); + break; + } + case 38: { + if (!(message.customFieldValues && message.customFieldValues.length)) + message.customFieldValues = []; + message.customFieldValues.push($root.google.ads.admanager.v1.CustomFieldValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": - case 14009: - message.dimension = 14009; + } + } + return message; + }; + + /** + * Decodes an Order message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Order + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Order} Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Order.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Order message. + * @function verify + * @memberof google.ads.admanager.v1.Order + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Order.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.orderId != null && message.hasOwnProperty("orderId")) { + properties._orderId = 1; + if (!$util.isInteger(message.orderId) && !(message.orderId && $util.isInteger(message.orderId.low) && $util.isInteger(message.orderId.high))) + return "orderId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.programmatic != null && message.hasOwnProperty("programmatic")) { + properties._programmatic = 1; + if (typeof message.programmatic !== "boolean") + return "programmatic: boolean expected"; + } + if (message.trafficker != null && message.hasOwnProperty("trafficker")) { + properties._trafficker = 1; + if (!$util.isString(message.trafficker)) + return "trafficker: string expected"; + } + if (message.advertiserContacts != null && message.hasOwnProperty("advertiserContacts")) { + if (!Array.isArray(message.advertiserContacts)) + return "advertiserContacts: array expected"; + for (var i = 0; i < message.advertiserContacts.length; ++i) + if (!$util.isString(message.advertiserContacts[i])) + return "advertiserContacts: string[] expected"; + } + if (message.advertiser != null && message.hasOwnProperty("advertiser")) { + properties._advertiser = 1; + if (!$util.isString(message.advertiser)) + return "advertiser: string expected"; + } + if (message.agencyContacts != null && message.hasOwnProperty("agencyContacts")) { + if (!Array.isArray(message.agencyContacts)) + return "agencyContacts: array expected"; + for (var i = 0; i < message.agencyContacts.length; ++i) + if (!$util.isString(message.agencyContacts[i])) + return "agencyContacts: string[] expected"; + } + if (message.agency != null && message.hasOwnProperty("agency")) { + properties._agency = 1; + if (!$util.isString(message.agency)) + return "agency: string expected"; + } + if (message.appliedTeams != null && message.hasOwnProperty("appliedTeams")) { + if (!Array.isArray(message.appliedTeams)) + return "appliedTeams: array expected"; + for (var i = 0; i < message.appliedTeams.length; ++i) + if (!$util.isString(message.appliedTeams[i])) + return "appliedTeams: string[] expected"; + } + if (message.effectiveTeams != null && message.hasOwnProperty("effectiveTeams")) { + if (!Array.isArray(message.effectiveTeams)) + return "effectiveTeams: array expected"; + for (var i = 0; i < message.effectiveTeams.length; ++i) + if (!$util.isString(message.effectiveTeams[i])) + return "effectiveTeams: string[] expected"; + } + if (message.creator != null && message.hasOwnProperty("creator")) { + properties._creator = 1; + if (!$util.isString(message.creator)) + return "creator: string expected"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + properties._startTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + properties._endTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + } + if (message.unlimitedEndTime != null && message.hasOwnProperty("unlimitedEndTime")) { + properties._unlimitedEndTime = 1; + if (typeof message.unlimitedEndTime !== "boolean") + return "unlimitedEndTime: boolean expected"; + } + if (message.externalOrderId != null && message.hasOwnProperty("externalOrderId")) { + properties._externalOrderId = 1; + if (!$util.isInteger(message.externalOrderId)) + return "externalOrderId: integer expected"; + } + if (message.archived != null && message.hasOwnProperty("archived")) { + properties._archived = 1; + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; + } + if (message.lastModifiedByApp != null && message.hasOwnProperty("lastModifiedByApp")) { + properties._lastModifiedByApp = 1; + if (!$util.isString(message.lastModifiedByApp)) + return "lastModifiedByApp: string expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.notes != null && message.hasOwnProperty("notes")) { + properties._notes = 1; + if (!$util.isString(message.notes)) + return "notes: string expected"; + } + if (message.poNumber != null && message.hasOwnProperty("poNumber")) { + properties._poNumber = 1; + if (!$util.isString(message.poNumber)) + return "poNumber: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: break; - case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": - case 14010: - message.dimension = 14010; + } + } + if (message.salesperson != null && message.hasOwnProperty("salesperson")) { + properties._salesperson = 1; + if (!$util.isString(message.salesperson)) + return "salesperson: string expected"; + } + if (message.secondarySalespeople != null && message.hasOwnProperty("secondarySalespeople")) { + if (!Array.isArray(message.secondarySalespeople)) + return "secondarySalespeople: array expected"; + for (var i = 0; i < message.secondarySalespeople.length; ++i) + if (!$util.isString(message.secondarySalespeople[i])) + return "secondarySalespeople: string[] expected"; + } + if (message.secondaryTraffickers != null && message.hasOwnProperty("secondaryTraffickers")) { + if (!Array.isArray(message.secondaryTraffickers)) + return "secondaryTraffickers: array expected"; + for (var i = 0; i < message.secondaryTraffickers.length; ++i) + if (!$util.isString(message.secondaryTraffickers[i])) + return "secondaryTraffickers: string[] expected"; + } + if (message.appliedLabels != null && message.hasOwnProperty("appliedLabels")) { + if (!Array.isArray(message.appliedLabels)) + return "appliedLabels: array expected"; + for (var i = 0; i < message.appliedLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.appliedLabels[i]); + if (error) + return "appliedLabels." + error; + } + } + if (message.effectiveAppliedLabels != null && message.hasOwnProperty("effectiveAppliedLabels")) { + if (!Array.isArray(message.effectiveAppliedLabels)) + return "effectiveAppliedLabels: array expected"; + for (var i = 0; i < message.effectiveAppliedLabels.length; ++i) { + var error = $root.google.ads.admanager.v1.AppliedLabel.verify(message.effectiveAppliedLabels[i]); + if (error) + return "effectiveAppliedLabels." + error; + } + } + if (message.customFieldValues != null && message.hasOwnProperty("customFieldValues")) { + if (!Array.isArray(message.customFieldValues)) + return "customFieldValues: array expected"; + for (var i = 0; i < message.customFieldValues.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomFieldValue.verify(message.customFieldValues[i]); + if (error) + return "customFieldValues." + error; + } + } + return null; + }; + + /** + * Creates an Order message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Order + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Order} Order + */ + Order.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Order) + return object; + var message = new $root.google.ads.admanager.v1.Order(); + if (object.name != null) + message.name = String(object.name); + if (object.orderId != null) + if ($util.Long) + (message.orderId = $util.Long.fromValue(object.orderId)).unsigned = false; + else if (typeof object.orderId === "string") + message.orderId = parseInt(object.orderId, 10); + else if (typeof object.orderId === "number") + message.orderId = object.orderId; + else if (typeof object.orderId === "object") + message.orderId = new $util.LongBits(object.orderId.low >>> 0, object.orderId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.programmatic != null) + message.programmatic = Boolean(object.programmatic); + if (object.trafficker != null) + message.trafficker = String(object.trafficker); + if (object.advertiserContacts) { + if (!Array.isArray(object.advertiserContacts)) + throw TypeError(".google.ads.admanager.v1.Order.advertiserContacts: array expected"); + message.advertiserContacts = []; + for (var i = 0; i < object.advertiserContacts.length; ++i) + message.advertiserContacts[i] = String(object.advertiserContacts[i]); + } + if (object.advertiser != null) + message.advertiser = String(object.advertiser); + if (object.agencyContacts) { + if (!Array.isArray(object.agencyContacts)) + throw TypeError(".google.ads.admanager.v1.Order.agencyContacts: array expected"); + message.agencyContacts = []; + for (var i = 0; i < object.agencyContacts.length; ++i) + message.agencyContacts[i] = String(object.agencyContacts[i]); + } + if (object.agency != null) + message.agency = String(object.agency); + if (object.appliedTeams) { + if (!Array.isArray(object.appliedTeams)) + throw TypeError(".google.ads.admanager.v1.Order.appliedTeams: array expected"); + message.appliedTeams = []; + for (var i = 0; i < object.appliedTeams.length; ++i) + message.appliedTeams[i] = String(object.appliedTeams[i]); + } + if (object.effectiveTeams) { + if (!Array.isArray(object.effectiveTeams)) + throw TypeError(".google.ads.admanager.v1.Order.effectiveTeams: array expected"); + message.effectiveTeams = []; + for (var i = 0; i < object.effectiveTeams.length; ++i) + message.effectiveTeams[i] = String(object.effectiveTeams[i]); + } + if (object.creator != null) + message.creator = String(object.creator); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.ads.admanager.v1.Order.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.ads.admanager.v1.Order.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.unlimitedEndTime != null) + message.unlimitedEndTime = Boolean(object.unlimitedEndTime); + if (object.externalOrderId != null) + message.externalOrderId = object.externalOrderId | 0; + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.lastModifiedByApp != null) + message.lastModifiedByApp = String(object.lastModifiedByApp); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.Order.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.notes != null) + message.notes = String(object.notes); + if (object.poNumber != null) + message.poNumber = String(object.poNumber); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; break; - case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": - case 14011: - message.dimension = 14011; + } + break; + case "ORDER_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "DRAFT": + case 2: + message.status = 2; + break; + case "PENDING_APPROVAL": + case 3: + message.status = 3; + break; + case "APPROVED": + case 4: + message.status = 4; + break; + case "DISAPPROVED": + case 5: + message.status = 5; + break; + case "PAUSED": + case 6: + message.status = 6; + break; + case "CANCELED": + case 7: + message.status = 7; + break; + case "DELETED": + case 8: + message.status = 8; + break; + } + if (object.salesperson != null) + message.salesperson = String(object.salesperson); + if (object.secondarySalespeople) { + if (!Array.isArray(object.secondarySalespeople)) + throw TypeError(".google.ads.admanager.v1.Order.secondarySalespeople: array expected"); + message.secondarySalespeople = []; + for (var i = 0; i < object.secondarySalespeople.length; ++i) + message.secondarySalespeople[i] = String(object.secondarySalespeople[i]); + } + if (object.secondaryTraffickers) { + if (!Array.isArray(object.secondaryTraffickers)) + throw TypeError(".google.ads.admanager.v1.Order.secondaryTraffickers: array expected"); + message.secondaryTraffickers = []; + for (var i = 0; i < object.secondaryTraffickers.length; ++i) + message.secondaryTraffickers[i] = String(object.secondaryTraffickers[i]); + } + if (object.appliedLabels) { + if (!Array.isArray(object.appliedLabels)) + throw TypeError(".google.ads.admanager.v1.Order.appliedLabels: array expected"); + message.appliedLabels = []; + for (var i = 0; i < object.appliedLabels.length; ++i) { + if (typeof object.appliedLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.Order.appliedLabels: object expected"); + message.appliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.appliedLabels[i]); + } + } + if (object.effectiveAppliedLabels) { + if (!Array.isArray(object.effectiveAppliedLabels)) + throw TypeError(".google.ads.admanager.v1.Order.effectiveAppliedLabels: array expected"); + message.effectiveAppliedLabels = []; + for (var i = 0; i < object.effectiveAppliedLabels.length; ++i) { + if (typeof object.effectiveAppliedLabels[i] !== "object") + throw TypeError(".google.ads.admanager.v1.Order.effectiveAppliedLabels: object expected"); + message.effectiveAppliedLabels[i] = $root.google.ads.admanager.v1.AppliedLabel.fromObject(object.effectiveAppliedLabels[i]); + } + } + if (object.customFieldValues) { + if (!Array.isArray(object.customFieldValues)) + throw TypeError(".google.ads.admanager.v1.Order.customFieldValues: array expected"); + message.customFieldValues = []; + for (var i = 0; i < object.customFieldValues.length; ++i) { + if (typeof object.customFieldValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.Order.customFieldValues: object expected"); + message.customFieldValues[i] = $root.google.ads.admanager.v1.CustomFieldValue.fromObject(object.customFieldValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Order message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Order + * @static + * @param {google.ads.admanager.v1.Order} message Order + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Order.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.advertiserContacts = []; + object.agencyContacts = []; + object.appliedTeams = []; + object.secondarySalespeople = []; + object.secondaryTraffickers = []; + object.appliedLabels = []; + object.effectiveAppliedLabels = []; + object.effectiveTeams = []; + object.customFieldValues = []; + } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.programmatic != null && message.hasOwnProperty("programmatic")) { + object.programmatic = message.programmatic; + if (options.oneofs) + object._programmatic = "programmatic"; + } + if (message.orderId != null && message.hasOwnProperty("orderId")) { + if (typeof message.orderId === "number") + object.orderId = options.longs === String ? String(message.orderId) : message.orderId; + else + object.orderId = options.longs === String ? $util.Long.prototype.toString.call(message.orderId) : options.longs === Number ? new $util.LongBits(message.orderId.low >>> 0, message.orderId.high >>> 0).toNumber() : message.orderId; + if (options.oneofs) + object._orderId = "orderId"; + } + if (message.advertiserContacts && message.advertiserContacts.length) { + object.advertiserContacts = []; + for (var j = 0; j < message.advertiserContacts.length; ++j) + object.advertiserContacts[j] = message.advertiserContacts[j]; + } + if (message.advertiser != null && message.hasOwnProperty("advertiser")) { + object.advertiser = message.advertiser; + if (options.oneofs) + object._advertiser = "advertiser"; + } + if (message.agencyContacts && message.agencyContacts.length) { + object.agencyContacts = []; + for (var j = 0; j < message.agencyContacts.length; ++j) + object.agencyContacts[j] = message.agencyContacts[j]; + } + if (message.agency != null && message.hasOwnProperty("agency")) { + object.agency = message.agency; + if (options.oneofs) + object._agency = "agency"; + } + if (message.appliedTeams && message.appliedTeams.length) { + object.appliedTeams = []; + for (var j = 0; j < message.appliedTeams.length; ++j) + object.appliedTeams[j] = message.appliedTeams[j]; + } + if (message.creator != null && message.hasOwnProperty("creator")) { + object.creator = message.creator; + if (options.oneofs) + object._creator = "creator"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (options.oneofs) + object._endTime = "endTime"; + } + if (message.externalOrderId != null && message.hasOwnProperty("externalOrderId")) { + object.externalOrderId = message.externalOrderId; + if (options.oneofs) + object._externalOrderId = "externalOrderId"; + } + if (message.archived != null && message.hasOwnProperty("archived")) { + object.archived = message.archived; + if (options.oneofs) + object._archived = "archived"; + } + if (message.lastModifiedByApp != null && message.hasOwnProperty("lastModifiedByApp")) { + object.lastModifiedByApp = message.lastModifiedByApp; + if (options.oneofs) + object._lastModifiedByApp = "lastModifiedByApp"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.notes != null && message.hasOwnProperty("notes")) { + object.notes = message.notes; + if (options.oneofs) + object._notes = "notes"; + } + if (message.poNumber != null && message.hasOwnProperty("poNumber")) { + object.poNumber = message.poNumber; + if (options.oneofs) + object._poNumber = "poNumber"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (options.oneofs) + object._startTime = "startTime"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.OrderStatusEnum.OrderStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.OrderStatusEnum.OrderStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.salesperson != null && message.hasOwnProperty("salesperson")) { + object.salesperson = message.salesperson; + if (options.oneofs) + object._salesperson = "salesperson"; + } + if (message.secondarySalespeople && message.secondarySalespeople.length) { + object.secondarySalespeople = []; + for (var j = 0; j < message.secondarySalespeople.length; ++j) + object.secondarySalespeople[j] = message.secondarySalespeople[j]; + } + if (message.trafficker != null && message.hasOwnProperty("trafficker")) { + object.trafficker = message.trafficker; + if (options.oneofs) + object._trafficker = "trafficker"; + } + if (message.secondaryTraffickers && message.secondaryTraffickers.length) { + object.secondaryTraffickers = []; + for (var j = 0; j < message.secondaryTraffickers.length; ++j) + object.secondaryTraffickers[j] = message.secondaryTraffickers[j]; + } + if (message.appliedLabels && message.appliedLabels.length) { + object.appliedLabels = []; + for (var j = 0; j < message.appliedLabels.length; ++j) + object.appliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.appliedLabels[j], options); + } + if (message.effectiveAppliedLabels && message.effectiveAppliedLabels.length) { + object.effectiveAppliedLabels = []; + for (var j = 0; j < message.effectiveAppliedLabels.length; ++j) + object.effectiveAppliedLabels[j] = $root.google.ads.admanager.v1.AppliedLabel.toObject(message.effectiveAppliedLabels[j], options); + } + if (message.effectiveTeams && message.effectiveTeams.length) { + object.effectiveTeams = []; + for (var j = 0; j < message.effectiveTeams.length; ++j) + object.effectiveTeams[j] = message.effectiveTeams[j]; + } + if (message.customFieldValues && message.customFieldValues.length) { + object.customFieldValues = []; + for (var j = 0; j < message.customFieldValues.length; ++j) + object.customFieldValues[j] = $root.google.ads.admanager.v1.CustomFieldValue.toObject(message.customFieldValues[j], options); + } + if (message.unlimitedEndTime != null && message.hasOwnProperty("unlimitedEndTime")) { + object.unlimitedEndTime = message.unlimitedEndTime; + if (options.oneofs) + object._unlimitedEndTime = "unlimitedEndTime"; + } + return object; + }; + + /** + * Converts this Order to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Order + * @instance + * @returns {Object.} JSON object + */ + Order.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Order + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Order + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Order"; + }; + + return Order; + })(); + + v1.OrderService = (function() { + + /** + * Constructs a new OrderService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OrderService + * @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 OrderService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OrderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OrderService; + + /** + * Creates new OrderService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.OrderService + * @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 {OrderService} RPC service. Useful where requests and/or responses are streamed. + */ + OrderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.OrderService|getOrder}. + * @memberof google.ads.admanager.v1.OrderService + * @typedef GetOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Order} [response] Order + */ + + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.ads.admanager.v1.OrderService + * @instance + * @param {google.ads.admanager.v1.IGetOrderRequest} request GetOrderRequest message or plain object + * @param {google.ads.admanager.v1.OrderService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OrderService.prototype.getOrder = function getOrder(request, callback) { + return this.rpcCall(getOrder, $root.google.ads.admanager.v1.GetOrderRequest, $root.google.ads.admanager.v1.Order, request, callback); + }, "name", { value: "GetOrder" }); + + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.ads.admanager.v1.OrderService + * @instance + * @param {google.ads.admanager.v1.IGetOrderRequest} request GetOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.OrderService|listOrders}. + * @memberof google.ads.admanager.v1.OrderService + * @typedef ListOrdersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListOrdersResponse} [response] ListOrdersResponse + */ + + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.ads.admanager.v1.OrderService + * @instance + * @param {google.ads.admanager.v1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @param {google.ads.admanager.v1.OrderService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OrderService.prototype.listOrders = function listOrders(request, callback) { + return this.rpcCall(listOrders, $root.google.ads.admanager.v1.ListOrdersRequest, $root.google.ads.admanager.v1.ListOrdersResponse, request, callback); + }, "name", { value: "ListOrders" }); + + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.ads.admanager.v1.OrderService + * @instance + * @param {google.ads.admanager.v1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OrderService; + })(); + + v1.GetOrderRequest = (function() { + + /** + * Properties of a GetOrderRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetOrderRequest + * @property {string|null} [name] GetOrderRequest name + */ + + /** + * Constructs a new GetOrderRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetOrderRequest. + * @implements IGetOrderRequest + * @constructor + * @param {google.ads.admanager.v1.IGetOrderRequest=} [properties] Properties to set + */ + function GetOrderRequest(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]]; + } + + /** + * GetOrderRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetOrderRequest + * @instance + */ + GetOrderRequest.prototype.name = ""; + + /** + * Creates a new GetOrderRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {google.ads.admanager.v1.IGetOrderRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest instance + */ + GetOrderRequest.create = function create(properties) { + return new GetOrderRequest(properties); + }; + + /** + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {google.ads.admanager.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrderRequest.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 GetOrderRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetOrderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {google.ads.admanager.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrderRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetOrderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": - case 14012: - message.dimension = 14012; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": - case 14013: - message.dimension = 14013; + } + } + return message; + }; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOrderRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOrderRequest.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 GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetOrderRequest} GetOrderRequest + */ + GetOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetOrderRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetOrderRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {google.ads.admanager.v1.GetOrderRequest} message GetOrderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOrderRequest.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 GetOrderRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetOrderRequest + * @instance + * @returns {Object.} JSON object + */ + GetOrderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOrderRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetOrderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetOrderRequest"; + }; + + return GetOrderRequest; + })(); + + v1.ListOrdersRequest = (function() { + + /** + * Properties of a ListOrdersRequest. + * @memberof google.ads.admanager.v1 + * @interface IListOrdersRequest + * @property {string|null} [parent] ListOrdersRequest parent + * @property {number|null} [pageSize] ListOrdersRequest pageSize + * @property {string|null} [pageToken] ListOrdersRequest pageToken + * @property {string|null} [filter] ListOrdersRequest filter + * @property {string|null} [orderBy] ListOrdersRequest orderBy + * @property {number|null} [skip] ListOrdersRequest skip + */ + + /** + * Constructs a new ListOrdersRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOrdersRequest. + * @implements IListOrdersRequest + * @constructor + * @param {google.ads.admanager.v1.IListOrdersRequest=} [properties] Properties to set + */ + function ListOrdersRequest(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]]; + } + + /** + * ListOrdersRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.parent = ""; + + /** + * ListOrdersRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.pageSize = 0; + + /** + * ListOrdersRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.pageToken = ""; + + /** + * ListOrdersRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.filter = ""; + + /** + * ListOrdersRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.orderBy = ""; + + /** + * ListOrdersRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.skip = 0; + + /** + * Creates a new ListOrdersRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {google.ads.admanager.v1.IListOrdersRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest instance + */ + ListOrdersRequest.create = function create(properties) { + return new ListOrdersRequest(properties); + }; + + /** + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {google.ads.admanager.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {google.ads.admanager.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOrdersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": - case 14014: - message.dimension = 14014; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_0_VALUE": - case 15000: - message.dimension = 15000; + } + } + return message; + }; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOrdersRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOrdersRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOrdersRequest} ListOrdersRequest + */ + ListOrdersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOrdersRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListOrdersRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {google.ads.admanager.v1.ListOrdersRequest} message ListOrdersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOrdersRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListOrdersRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @instance + * @returns {Object.} JSON object + */ + ListOrdersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOrdersRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOrdersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOrdersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOrdersRequest"; + }; + + return ListOrdersRequest; + })(); + + v1.ListOrdersResponse = (function() { + + /** + * Properties of a ListOrdersResponse. + * @memberof google.ads.admanager.v1 + * @interface IListOrdersResponse + * @property {Array.|null} [orders] ListOrdersResponse orders + * @property {string|null} [nextPageToken] ListOrdersResponse nextPageToken + * @property {number|null} [totalSize] ListOrdersResponse totalSize + */ + + /** + * Constructs a new ListOrdersResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListOrdersResponse. + * @implements IListOrdersResponse + * @constructor + * @param {google.ads.admanager.v1.IListOrdersResponse=} [properties] Properties to set + */ + function ListOrdersResponse(properties) { + this.orders = []; + 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]]; + } + + /** + * ListOrdersResponse orders. + * @member {Array.} orders + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @instance + */ + ListOrdersResponse.prototype.orders = $util.emptyArray; + + /** + * ListOrdersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @instance + */ + ListOrdersResponse.prototype.nextPageToken = ""; + + /** + * ListOrdersResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @instance + */ + ListOrdersResponse.prototype.totalSize = 0; + + /** + * Creates a new ListOrdersResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {google.ads.admanager.v1.IListOrdersResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse instance + */ + ListOrdersResponse.create = function create(properties) { + return new ListOrdersResponse(properties); + }; + + /** + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {google.ads.admanager.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.orders != null && message.orders.length) + for (var i = 0; i < message.orders.length; ++i) + $root.google.ads.admanager.v1.Order.encode(message.orders[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListOrdersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {google.ads.admanager.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListOrdersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_1_VALUE": - case 15001: - message.dimension = 15001; + switch (tag >>> 3) { + case 1: { + if (!(message.orders && message.orders.length)) + message.orders = []; + message.orders.push($root.google.ads.admanager.v1.Order.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_2_VALUE": - case 15002: - message.dimension = 15002; + } + } + return message; + }; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOrdersResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOrdersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.orders != null && message.hasOwnProperty("orders")) { + if (!Array.isArray(message.orders)) + return "orders: array expected"; + for (var i = 0; i < message.orders.length; ++i) { + var error = $root.google.ads.admanager.v1.Order.verify(message.orders[i]); + if (error) + return "orders." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListOrdersResponse} ListOrdersResponse + */ + ListOrdersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListOrdersResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListOrdersResponse(); + if (object.orders) { + if (!Array.isArray(object.orders)) + throw TypeError(".google.ads.admanager.v1.ListOrdersResponse.orders: array expected"); + message.orders = []; + for (var i = 0; i < object.orders.length; ++i) { + if (typeof object.orders[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListOrdersResponse.orders: object expected"); + message.orders[i] = $root.google.ads.admanager.v1.Order.fromObject(object.orders[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {google.ads.admanager.v1.ListOrdersResponse} message ListOrdersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOrdersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.orders = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.orders && message.orders.length) { + object.orders = []; + for (var j = 0; j < message.orders.length; ++j) + object.orders[j] = $root.google.ads.admanager.v1.Order.toObject(message.orders[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListOrdersResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @instance + * @returns {Object.} JSON object + */ + ListOrdersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOrdersResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListOrdersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOrdersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListOrdersResponse"; + }; + + return ListOrdersResponse; + })(); + + v1.PlacementStatusEnum = (function() { + + /** + * Properties of a PlacementStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface IPlacementStatusEnum + */ + + /** + * Constructs a new PlacementStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PlacementStatusEnum. + * @implements IPlacementStatusEnum + * @constructor + * @param {google.ads.admanager.v1.IPlacementStatusEnum=} [properties] Properties to set + */ + function PlacementStatusEnum(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 PlacementStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {google.ads.admanager.v1.IPlacementStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum instance + */ + PlacementStatusEnum.create = function create(properties) { + return new PlacementStatusEnum(properties); + }; + + /** + * Encodes the specified PlacementStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {google.ads.admanager.v1.IPlacementStatusEnum} message PlacementStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PlacementStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PlacementStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {google.ads.admanager.v1.IPlacementStatusEnum} message PlacementStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacementStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PlacementStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_3_VALUE": - case 15003: - message.dimension = 15003; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacementStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacementStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacementStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PlacementStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.PlacementStatusEnum} PlacementStatusEnum + */ + PlacementStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.PlacementStatusEnum) + return object; + return new $root.google.ads.admanager.v1.PlacementStatusEnum(); + }; + + /** + * Creates a plain object from a PlacementStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {google.ads.admanager.v1.PlacementStatusEnum} message PlacementStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacementStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PlacementStatusEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @instance + * @returns {Object.} JSON object + */ + PlacementStatusEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacementStatusEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.PlacementStatusEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacementStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.PlacementStatusEnum"; + }; + + /** + * PlacementStatus enum. + * @name google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus + * @enum {number} + * @property {number} PLACEMENT_STATUS_UNSPECIFIED=0 PLACEMENT_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} ARCHIVED=3 ARCHIVED value + */ + PlacementStatusEnum.PlacementStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLACEMENT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "ARCHIVED"] = 3; + return values; + })(); + + return PlacementStatusEnum; + })(); + + v1.Placement = (function() { + + /** + * Properties of a Placement. + * @memberof google.ads.admanager.v1 + * @interface IPlacement + * @property {string|null} [name] Placement name + * @property {number|Long|null} [placementId] Placement placementId + * @property {string|null} [displayName] Placement displayName + * @property {string|null} [description] Placement description + * @property {string|null} [placementCode] Placement placementCode + * @property {google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null} [status] Placement status + * @property {Array.|null} [targetedAdUnits] Placement targetedAdUnits + * @property {google.protobuf.ITimestamp|null} [updateTime] Placement updateTime + */ + + /** + * Constructs a new Placement. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Placement. + * @implements IPlacement + * @constructor + * @param {google.ads.admanager.v1.IPlacement=} [properties] Properties to set + */ + function Placement(properties) { + this.targetedAdUnits = []; + 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]]; + } + + /** + * Placement name. + * @member {string} name + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.name = ""; + + /** + * Placement placementId. + * @member {number|Long} placementId + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.placementId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Placement displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.displayName = null; + + /** + * Placement description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.description = null; + + /** + * Placement placementCode. + * @member {string|null|undefined} placementCode + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.placementCode = null; + + /** + * Placement status. + * @member {google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus|null|undefined} status + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.status = null; + + /** + * Placement targetedAdUnits. + * @member {Array.} targetedAdUnits + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.targetedAdUnits = $util.emptyArray; + + /** + * Placement updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.Placement + * @instance + */ + Placement.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Placement.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Placement.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Placement.prototype, "_placementCode", { + get: $util.oneOfGetter($oneOfFields = ["placementCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Placement.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Placement.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Placement instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {google.ads.admanager.v1.IPlacement=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Placement} Placement instance + */ + Placement.create = function create(properties) { + return new Placement(properties); + }; + + /** + * Encodes the specified Placement message. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {google.ads.admanager.v1.IPlacement} message Placement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placement.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.placementId != null && Object.hasOwnProperty.call(message, "placementId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.placementId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.placementCode != null && Object.hasOwnProperty.call(message, "placementCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.placementCode); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + if (message.targetedAdUnits != null && message.targetedAdUnits.length) + for (var i = 0; i < message.targetedAdUnits.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedAdUnits[i]); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Placement message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Placement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {google.ads.admanager.v1.IPlacement} message Placement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Placement message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Placement} Placement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placement.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Placement(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_4_VALUE": - case 15004: - message.dimension = 15004; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.placementId = reader.int64(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.placementCode = reader.string(); + break; + } + case 6: { + message.status = reader.int32(); + break; + } + case 7: { + if (!(message.targetedAdUnits && message.targetedAdUnits.length)) + message.targetedAdUnits = []; + message.targetedAdUnits.push(reader.string()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_5_VALUE": - case 15005: - message.dimension = 15005; + } + } + return message; + }; + + /** + * Decodes a Placement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Placement} Placement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Placement message. + * @function verify + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Placement.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.placementId != null && message.hasOwnProperty("placementId")) + if (!$util.isInteger(message.placementId) && !(message.placementId && $util.isInteger(message.placementId.low) && $util.isInteger(message.placementId.high))) + return "placementId: integer|Long expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.placementCode != null && message.hasOwnProperty("placementCode")) { + properties._placementCode = 1; + if (!$util.isString(message.placementCode)) + return "placementCode: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; - case "CREATIVE_CUSTOM_FIELD_6_VALUE": - case 15006: - message.dimension = 15006; + } + } + if (message.targetedAdUnits != null && message.hasOwnProperty("targetedAdUnits")) { + if (!Array.isArray(message.targetedAdUnits)) + return "targetedAdUnits: array expected"; + for (var i = 0; i < message.targetedAdUnits.length; ++i) + if (!$util.isString(message.targetedAdUnits[i])) + return "targetedAdUnits: string[] expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + return null; + }; + + /** + * Creates a Placement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Placement} Placement + */ + Placement.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Placement) + return object; + var message = new $root.google.ads.admanager.v1.Placement(); + if (object.name != null) + message.name = String(object.name); + if (object.placementId != null) + if ($util.Long) + (message.placementId = $util.Long.fromValue(object.placementId)).unsigned = false; + else if (typeof object.placementId === "string") + message.placementId = parseInt(object.placementId, 10); + else if (typeof object.placementId === "number") + message.placementId = object.placementId; + else if (typeof object.placementId === "object") + message.placementId = new $util.LongBits(object.placementId.low >>> 0, object.placementId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.placementCode != null) + message.placementCode = String(object.placementCode); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; break; - case "CREATIVE_CUSTOM_FIELD_7_VALUE": - case 15007: - message.dimension = 15007; + } + break; + case "PLACEMENT_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + case "ARCHIVED": + case 3: + message.status = 3; + break; + } + if (object.targetedAdUnits) { + if (!Array.isArray(object.targetedAdUnits)) + throw TypeError(".google.ads.admanager.v1.Placement.targetedAdUnits: array expected"); + message.targetedAdUnits = []; + for (var i = 0; i < object.targetedAdUnits.length; ++i) + message.targetedAdUnits[i] = String(object.targetedAdUnits[i]); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.Placement.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Placement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {google.ads.admanager.v1.Placement} message Placement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Placement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.targetedAdUnits = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.placementId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.placementId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.placementId != null && message.hasOwnProperty("placementId")) + if (typeof message.placementId === "number") + object.placementId = options.longs === String ? String(message.placementId) : message.placementId; + else + object.placementId = options.longs === String ? $util.Long.prototype.toString.call(message.placementId) : options.longs === Number ? new $util.LongBits(message.placementId.low >>> 0, message.placementId.high >>> 0).toNumber() : message.placementId; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.placementCode != null && message.hasOwnProperty("placementCode")) { + object.placementCode = message.placementCode; + if (options.oneofs) + object._placementCode = "placementCode"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.targetedAdUnits && message.targetedAdUnits.length) { + object.targetedAdUnits = []; + for (var j = 0; j < message.targetedAdUnits.length; ++j) + object.targetedAdUnits[j] = message.targetedAdUnits[j]; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + return object; + }; + + /** + * Converts this Placement to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Placement + * @instance + * @returns {Object.} JSON object + */ + Placement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Placement + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Placement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Placement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Placement"; + }; + + return Placement; + })(); + + v1.PlacementService = (function() { + + /** + * Constructs a new PlacementService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PlacementService + * @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 PlacementService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PlacementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PlacementService; + + /** + * Creates new PlacementService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.PlacementService + * @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 {PlacementService} RPC service. Useful where requests and/or responses are streamed. + */ + PlacementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|getPlacement}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef GetPlacementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Placement} [response] Placement + */ + + /** + * Calls GetPlacement. + * @function getPlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IGetPlacementRequest} request GetPlacementRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.GetPlacementCallback} callback Node-style callback called with the error, if any, and Placement + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.getPlacement = function getPlacement(request, callback) { + return this.rpcCall(getPlacement, $root.google.ads.admanager.v1.GetPlacementRequest, $root.google.ads.admanager.v1.Placement, request, callback); + }, "name", { value: "GetPlacement" }); + + /** + * Calls GetPlacement. + * @function getPlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IGetPlacementRequest} request GetPlacementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|listPlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef ListPlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListPlacementsResponse} [response] ListPlacementsResponse + */ + + /** + * Calls ListPlacements. + * @function listPlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IListPlacementsRequest} request ListPlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.ListPlacementsCallback} callback Node-style callback called with the error, if any, and ListPlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.listPlacements = function listPlacements(request, callback) { + return this.rpcCall(listPlacements, $root.google.ads.admanager.v1.ListPlacementsRequest, $root.google.ads.admanager.v1.ListPlacementsResponse, request, callback); + }, "name", { value: "ListPlacements" }); + + /** + * Calls ListPlacements. + * @function listPlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IListPlacementsRequest} request ListPlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|createPlacement}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef CreatePlacementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Placement} [response] Placement + */ + + /** + * Calls CreatePlacement. + * @function createPlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.ICreatePlacementRequest} request CreatePlacementRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.CreatePlacementCallback} callback Node-style callback called with the error, if any, and Placement + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.createPlacement = function createPlacement(request, callback) { + return this.rpcCall(createPlacement, $root.google.ads.admanager.v1.CreatePlacementRequest, $root.google.ads.admanager.v1.Placement, request, callback); + }, "name", { value: "CreatePlacement" }); + + /** + * Calls CreatePlacement. + * @function createPlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.ICreatePlacementRequest} request CreatePlacementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|updatePlacement}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef UpdatePlacementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Placement} [response] Placement + */ + + /** + * Calls UpdatePlacement. + * @function updatePlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IUpdatePlacementRequest} request UpdatePlacementRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.UpdatePlacementCallback} callback Node-style callback called with the error, if any, and Placement + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.updatePlacement = function updatePlacement(request, callback) { + return this.rpcCall(updatePlacement, $root.google.ads.admanager.v1.UpdatePlacementRequest, $root.google.ads.admanager.v1.Placement, request, callback); + }, "name", { value: "UpdatePlacement" }); + + /** + * Calls UpdatePlacement. + * @function updatePlacement + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IUpdatePlacementRequest} request UpdatePlacementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchCreatePlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef BatchCreatePlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreatePlacementsResponse} [response] BatchCreatePlacementsResponse + */ + + /** + * Calls BatchCreatePlacements. + * @function batchCreatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest} request BatchCreatePlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.BatchCreatePlacementsCallback} callback Node-style callback called with the error, if any, and BatchCreatePlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.batchCreatePlacements = function batchCreatePlacements(request, callback) { + return this.rpcCall(batchCreatePlacements, $root.google.ads.admanager.v1.BatchCreatePlacementsRequest, $root.google.ads.admanager.v1.BatchCreatePlacementsResponse, request, callback); + }, "name", { value: "BatchCreatePlacements" }); + + /** + * Calls BatchCreatePlacements. + * @function batchCreatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest} request BatchCreatePlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchUpdatePlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef BatchUpdatePlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdatePlacementsResponse} [response] BatchUpdatePlacementsResponse + */ + + /** + * Calls BatchUpdatePlacements. + * @function batchUpdatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest} request BatchUpdatePlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.BatchUpdatePlacementsCallback} callback Node-style callback called with the error, if any, and BatchUpdatePlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.batchUpdatePlacements = function batchUpdatePlacements(request, callback) { + return this.rpcCall(batchUpdatePlacements, $root.google.ads.admanager.v1.BatchUpdatePlacementsRequest, $root.google.ads.admanager.v1.BatchUpdatePlacementsResponse, request, callback); + }, "name", { value: "BatchUpdatePlacements" }); + + /** + * Calls BatchUpdatePlacements. + * @function batchUpdatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest} request BatchUpdatePlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchActivatePlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef BatchActivatePlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchActivatePlacementsResponse} [response] BatchActivatePlacementsResponse + */ + + /** + * Calls BatchActivatePlacements. + * @function batchActivatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest} request BatchActivatePlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.BatchActivatePlacementsCallback} callback Node-style callback called with the error, if any, and BatchActivatePlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.batchActivatePlacements = function batchActivatePlacements(request, callback) { + return this.rpcCall(batchActivatePlacements, $root.google.ads.admanager.v1.BatchActivatePlacementsRequest, $root.google.ads.admanager.v1.BatchActivatePlacementsResponse, request, callback); + }, "name", { value: "BatchActivatePlacements" }); + + /** + * Calls BatchActivatePlacements. + * @function batchActivatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest} request BatchActivatePlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchDeactivatePlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef BatchDeactivatePlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} [response] BatchDeactivatePlacementsResponse + */ + + /** + * Calls BatchDeactivatePlacements. + * @function batchDeactivatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest} request BatchDeactivatePlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.BatchDeactivatePlacementsCallback} callback Node-style callback called with the error, if any, and BatchDeactivatePlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.batchDeactivatePlacements = function batchDeactivatePlacements(request, callback) { + return this.rpcCall(batchDeactivatePlacements, $root.google.ads.admanager.v1.BatchDeactivatePlacementsRequest, $root.google.ads.admanager.v1.BatchDeactivatePlacementsResponse, request, callback); + }, "name", { value: "BatchDeactivatePlacements" }); + + /** + * Calls BatchDeactivatePlacements. + * @function batchDeactivatePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest} request BatchDeactivatePlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PlacementService|batchArchivePlacements}. + * @memberof google.ads.admanager.v1.PlacementService + * @typedef BatchArchivePlacementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchArchivePlacementsResponse} [response] BatchArchivePlacementsResponse + */ + + /** + * Calls BatchArchivePlacements. + * @function batchArchivePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest} request BatchArchivePlacementsRequest message or plain object + * @param {google.ads.admanager.v1.PlacementService.BatchArchivePlacementsCallback} callback Node-style callback called with the error, if any, and BatchArchivePlacementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PlacementService.prototype.batchArchivePlacements = function batchArchivePlacements(request, callback) { + return this.rpcCall(batchArchivePlacements, $root.google.ads.admanager.v1.BatchArchivePlacementsRequest, $root.google.ads.admanager.v1.BatchArchivePlacementsResponse, request, callback); + }, "name", { value: "BatchArchivePlacements" }); + + /** + * Calls BatchArchivePlacements. + * @function batchArchivePlacements + * @memberof google.ads.admanager.v1.PlacementService + * @instance + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest} request BatchArchivePlacementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PlacementService; + })(); + + v1.GetPlacementRequest = (function() { + + /** + * Properties of a GetPlacementRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetPlacementRequest + * @property {string|null} [name] GetPlacementRequest name + */ + + /** + * Constructs a new GetPlacementRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetPlacementRequest. + * @implements IGetPlacementRequest + * @constructor + * @param {google.ads.admanager.v1.IGetPlacementRequest=} [properties] Properties to set + */ + function GetPlacementRequest(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]]; + } + + /** + * GetPlacementRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @instance + */ + GetPlacementRequest.prototype.name = ""; + + /** + * Creates a new GetPlacementRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {google.ads.admanager.v1.IGetPlacementRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest instance + */ + GetPlacementRequest.create = function create(properties) { + return new GetPlacementRequest(properties); + }; + + /** + * Encodes the specified GetPlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {google.ads.admanager.v1.IGetPlacementRequest} message GetPlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlacementRequest.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 GetPlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPlacementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {google.ads.admanager.v1.IGetPlacementRequest} message GetPlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlacementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPlacementRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlacementRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPlacementRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_8_VALUE": - case 15008: - message.dimension = 15008; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_9_VALUE": - case 15009: - message.dimension = 15009; + } + } + return message; + }; + + /** + * Decodes a GetPlacementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlacementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPlacementRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPlacementRequest.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 GetPlacementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetPlacementRequest} GetPlacementRequest + */ + GetPlacementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetPlacementRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetPlacementRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPlacementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {google.ads.admanager.v1.GetPlacementRequest} message GetPlacementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPlacementRequest.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 GetPlacementRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @instance + * @returns {Object.} JSON object + */ + GetPlacementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPlacementRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetPlacementRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPlacementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetPlacementRequest"; + }; + + return GetPlacementRequest; + })(); + + v1.ListPlacementsRequest = (function() { + + /** + * Properties of a ListPlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListPlacementsRequest + * @property {string|null} [parent] ListPlacementsRequest parent + * @property {number|null} [pageSize] ListPlacementsRequest pageSize + * @property {string|null} [pageToken] ListPlacementsRequest pageToken + * @property {string|null} [filter] ListPlacementsRequest filter + * @property {string|null} [orderBy] ListPlacementsRequest orderBy + * @property {number|null} [skip] ListPlacementsRequest skip + */ + + /** + * Constructs a new ListPlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPlacementsRequest. + * @implements IListPlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IListPlacementsRequest=} [properties] Properties to set + */ + function ListPlacementsRequest(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]]; + } + + /** + * ListPlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.parent = ""; + + /** + * ListPlacementsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.pageSize = 0; + + /** + * ListPlacementsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.pageToken = ""; + + /** + * ListPlacementsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.filter = ""; + + /** + * ListPlacementsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.orderBy = ""; + + /** + * ListPlacementsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + */ + ListPlacementsRequest.prototype.skip = 0; + + /** + * Creates a new ListPlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {google.ads.admanager.v1.IListPlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest instance + */ + ListPlacementsRequest.create = function create(properties) { + return new ListPlacementsRequest(properties); + }; + + /** + * Encodes the specified ListPlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {google.ads.admanager.v1.IListPlacementsRequest} message ListPlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlacementsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListPlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {google.ads.admanager.v1.IListPlacementsRequest} message ListPlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_10_VALUE": - case 15010: - message.dimension = 15010; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_11_VALUE": - case 15011: - message.dimension = 15011; + } + } + return message; + }; + + /** + * Decodes a ListPlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPlacementsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListPlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPlacementsRequest} ListPlacementsRequest + */ + ListPlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListPlacementsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListPlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {google.ads.admanager.v1.ListPlacementsRequest} message ListPlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPlacementsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListPlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPlacementsRequest"; + }; + + return ListPlacementsRequest; + })(); + + v1.ListPlacementsResponse = (function() { + + /** + * Properties of a ListPlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListPlacementsResponse + * @property {Array.|null} [placements] ListPlacementsResponse placements + * @property {string|null} [nextPageToken] ListPlacementsResponse nextPageToken + * @property {number|null} [totalSize] ListPlacementsResponse totalSize + */ + + /** + * Constructs a new ListPlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPlacementsResponse. + * @implements IListPlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IListPlacementsResponse=} [properties] Properties to set + */ + function ListPlacementsResponse(properties) { + this.placements = []; + 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]]; + } + + /** + * ListPlacementsResponse placements. + * @member {Array.} placements + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @instance + */ + ListPlacementsResponse.prototype.placements = $util.emptyArray; + + /** + * ListPlacementsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @instance + */ + ListPlacementsResponse.prototype.nextPageToken = ""; + + /** + * ListPlacementsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @instance + */ + ListPlacementsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListPlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {google.ads.admanager.v1.IListPlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse instance + */ + ListPlacementsResponse.create = function create(properties) { + return new ListPlacementsResponse(properties); + }; + + /** + * Encodes the specified ListPlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {google.ads.admanager.v1.IListPlacementsResponse} message ListPlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placements != null && message.placements.length) + for (var i = 0; i < message.placements.length; ++i) + $root.google.ads.admanager.v1.Placement.encode(message.placements[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListPlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {google.ads.admanager.v1.IListPlacementsResponse} message ListPlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_12_VALUE": - case 15012: - message.dimension = 15012; + switch (tag >>> 3) { + case 1: { + if (!(message.placements && message.placements.length)) + message.placements = []; + message.placements.push($root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CREATIVE_CUSTOM_FIELD_13_VALUE": - case 15013: - message.dimension = 15013; + } + } + return message; + }; + + /** + * Decodes a ListPlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.placements != null && message.hasOwnProperty("placements")) { + if (!Array.isArray(message.placements)) + return "placements: array expected"; + for (var i = 0; i < message.placements.length; ++i) { + var error = $root.google.ads.admanager.v1.Placement.verify(message.placements[i]); + if (error) + return "placements." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListPlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPlacementsResponse} ListPlacementsResponse + */ + ListPlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPlacementsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListPlacementsResponse(); + if (object.placements) { + if (!Array.isArray(object.placements)) + throw TypeError(".google.ads.admanager.v1.ListPlacementsResponse.placements: array expected"); + message.placements = []; + for (var i = 0; i < object.placements.length; ++i) { + if (typeof object.placements[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListPlacementsResponse.placements: object expected"); + message.placements[i] = $root.google.ads.admanager.v1.Placement.fromObject(object.placements[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListPlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {google.ads.admanager.v1.ListPlacementsResponse} message ListPlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPlacementsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.placements = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.placements && message.placements.length) { + object.placements = []; + for (var j = 0; j < message.placements.length; ++j) + object.placements[j] = $root.google.ads.admanager.v1.Placement.toObject(message.placements[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListPlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPlacementsResponse"; + }; + + return ListPlacementsResponse; + })(); + + v1.CreatePlacementRequest = (function() { + + /** + * Properties of a CreatePlacementRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreatePlacementRequest + * @property {string|null} [parent] CreatePlacementRequest parent + * @property {google.ads.admanager.v1.IPlacement|null} [placement] CreatePlacementRequest placement + */ + + /** + * Constructs a new CreatePlacementRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreatePlacementRequest. + * @implements ICreatePlacementRequest + * @constructor + * @param {google.ads.admanager.v1.ICreatePlacementRequest=} [properties] Properties to set + */ + function CreatePlacementRequest(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]]; + } + + /** + * CreatePlacementRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @instance + */ + CreatePlacementRequest.prototype.parent = ""; + + /** + * CreatePlacementRequest placement. + * @member {google.ads.admanager.v1.IPlacement|null|undefined} placement + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @instance + */ + CreatePlacementRequest.prototype.placement = null; + + /** + * Creates a new CreatePlacementRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {google.ads.admanager.v1.ICreatePlacementRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreatePlacementRequest} CreatePlacementRequest instance + */ + CreatePlacementRequest.create = function create(properties) { + return new CreatePlacementRequest(properties); + }; + + /** + * Encodes the specified CreatePlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePlacementRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {google.ads.admanager.v1.ICreatePlacementRequest} message CreatePlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePlacementRequest.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.placement != null && Object.hasOwnProperty.call(message, "placement")) + $root.google.ads.admanager.v1.Placement.encode(message.placement, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePlacementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {google.ads.admanager.v1.ICreatePlacementRequest} message CreatePlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePlacementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePlacementRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreatePlacementRequest} CreatePlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePlacementRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreatePlacementRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CREATIVE_CUSTOM_FIELD_14_VALUE": - case 15014: - message.dimension = 15014; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.placement = $root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": - case 16000: - message.dimension = 16000; + } + } + return message; + }; + + /** + * Decodes a CreatePlacementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreatePlacementRequest} CreatePlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePlacementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePlacementRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePlacementRequest.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.placement != null && message.hasOwnProperty("placement")) { + var error = $root.google.ads.admanager.v1.Placement.verify(message.placement); + if (error) + return "placement." + error; + } + return null; + }; + + /** + * Creates a CreatePlacementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreatePlacementRequest} CreatePlacementRequest + */ + CreatePlacementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreatePlacementRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreatePlacementRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.placement != null) { + if (typeof object.placement !== "object") + throw TypeError(".google.ads.admanager.v1.CreatePlacementRequest.placement: object expected"); + message.placement = $root.google.ads.admanager.v1.Placement.fromObject(object.placement); + } + return message; + }; + + /** + * Creates a plain object from a CreatePlacementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {google.ads.admanager.v1.CreatePlacementRequest} message CreatePlacementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePlacementRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.placement = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.placement != null && message.hasOwnProperty("placement")) + object.placement = $root.google.ads.admanager.v1.Placement.toObject(message.placement, options); + return object; + }; + + /** + * Converts this CreatePlacementRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePlacementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePlacementRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreatePlacementRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePlacementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreatePlacementRequest"; + }; + + return CreatePlacementRequest; + })(); + + v1.BatchCreatePlacementsRequest = (function() { + + /** + * Properties of a BatchCreatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreatePlacementsRequest + * @property {string|null} [parent] BatchCreatePlacementsRequest parent + * @property {Array.|null} [requests] BatchCreatePlacementsRequest requests + */ + + /** + * Constructs a new BatchCreatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreatePlacementsRequest. + * @implements IBatchCreatePlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest=} [properties] Properties to set + */ + function BatchCreatePlacementsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchCreatePlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @instance + */ + BatchCreatePlacementsRequest.prototype.parent = ""; + + /** + * BatchCreatePlacementsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @instance + */ + BatchCreatePlacementsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreatePlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreatePlacementsRequest} BatchCreatePlacementsRequest instance + */ + BatchCreatePlacementsRequest.create = function create(properties) { + return new BatchCreatePlacementsRequest(properties); + }; + + /** + * Encodes the specified BatchCreatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest} message BatchCreatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreatePlacementsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreatePlacementRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsRequest} message BatchCreatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreatePlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreatePlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreatePlacementsRequest} BatchCreatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreatePlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreatePlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": - case 16001: - message.dimension = 16001; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreatePlacementRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": - case 16002: - message.dimension = 16002; + } + } + return message; + }; + + /** + * Decodes a BatchCreatePlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreatePlacementsRequest} BatchCreatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreatePlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreatePlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreatePlacementsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreatePlacementRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreatePlacementsRequest} BatchCreatePlacementsRequest + */ + BatchCreatePlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreatePlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreatePlacementsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreatePlacementsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreatePlacementsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreatePlacementRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreatePlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.BatchCreatePlacementsRequest} message BatchCreatePlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreatePlacementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreatePlacementRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchCreatePlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchCreatePlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreatePlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreatePlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreatePlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreatePlacementsRequest"; + }; + + return BatchCreatePlacementsRequest; + })(); + + v1.BatchCreatePlacementsResponse = (function() { + + /** + * Properties of a BatchCreatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreatePlacementsResponse + * @property {Array.|null} [placements] BatchCreatePlacementsResponse placements + */ + + /** + * Constructs a new BatchCreatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreatePlacementsResponse. + * @implements IBatchCreatePlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchCreatePlacementsResponse=} [properties] Properties to set + */ + function BatchCreatePlacementsResponse(properties) { + this.placements = []; + 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]]; + } + + /** + * BatchCreatePlacementsResponse placements. + * @member {Array.} placements + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @instance + */ + BatchCreatePlacementsResponse.prototype.placements = $util.emptyArray; + + /** + * Creates a new BatchCreatePlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreatePlacementsResponse} BatchCreatePlacementsResponse instance + */ + BatchCreatePlacementsResponse.create = function create(properties) { + return new BatchCreatePlacementsResponse(properties); + }; + + /** + * Encodes the specified BatchCreatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsResponse} message BatchCreatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreatePlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placements != null && message.placements.length) + for (var i = 0; i < message.placements.length; ++i) + $root.google.ads.admanager.v1.Placement.encode(message.placements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreatePlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreatePlacementsResponse} message BatchCreatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreatePlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreatePlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreatePlacementsResponse} BatchCreatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreatePlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreatePlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": - case 16003: - message.dimension = 16003; + switch (tag >>> 3) { + case 1: { + if (!(message.placements && message.placements.length)) + message.placements = []; + message.placements.push($root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": - case 16004: - message.dimension = 16004; + } + } + return message; + }; + + /** + * Decodes a BatchCreatePlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreatePlacementsResponse} BatchCreatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreatePlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreatePlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreatePlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.placements != null && message.hasOwnProperty("placements")) { + if (!Array.isArray(message.placements)) + return "placements: array expected"; + for (var i = 0; i < message.placements.length; ++i) { + var error = $root.google.ads.admanager.v1.Placement.verify(message.placements[i]); + if (error) + return "placements." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreatePlacementsResponse} BatchCreatePlacementsResponse + */ + BatchCreatePlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreatePlacementsResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreatePlacementsResponse(); + if (object.placements) { + if (!Array.isArray(object.placements)) + throw TypeError(".google.ads.admanager.v1.BatchCreatePlacementsResponse.placements: array expected"); + message.placements = []; + for (var i = 0; i < object.placements.length; ++i) { + if (typeof object.placements[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreatePlacementsResponse.placements: object expected"); + message.placements[i] = $root.google.ads.admanager.v1.Placement.fromObject(object.placements[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreatePlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.BatchCreatePlacementsResponse} message BatchCreatePlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreatePlacementsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.placements = []; + if (message.placements && message.placements.length) { + object.placements = []; + for (var j = 0; j < message.placements.length; ++j) + object.placements[j] = $root.google.ads.admanager.v1.Placement.toObject(message.placements[j], options); + } + return object; + }; + + /** + * Converts this BatchCreatePlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreatePlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreatePlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreatePlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreatePlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreatePlacementsResponse"; + }; + + return BatchCreatePlacementsResponse; + })(); + + v1.UpdatePlacementRequest = (function() { + + /** + * Properties of an UpdatePlacementRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdatePlacementRequest + * @property {google.ads.admanager.v1.IPlacement|null} [placement] UpdatePlacementRequest placement + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePlacementRequest updateMask + */ + + /** + * Constructs a new UpdatePlacementRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdatePlacementRequest. + * @implements IUpdatePlacementRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdatePlacementRequest=} [properties] Properties to set + */ + function UpdatePlacementRequest(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]]; + } + + /** + * UpdatePlacementRequest placement. + * @member {google.ads.admanager.v1.IPlacement|null|undefined} placement + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @instance + */ + UpdatePlacementRequest.prototype.placement = null; + + /** + * UpdatePlacementRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @instance + */ + UpdatePlacementRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePlacementRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePlacementRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdatePlacementRequest} UpdatePlacementRequest instance + */ + UpdatePlacementRequest.create = function create(properties) { + return new UpdatePlacementRequest(properties); + }; + + /** + * Encodes the specified UpdatePlacementRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePlacementRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePlacementRequest} message UpdatePlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePlacementRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placement != null && Object.hasOwnProperty.call(message, "placement")) + $root.google.ads.admanager.v1.Placement.encode(message.placement, 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 UpdatePlacementRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePlacementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePlacementRequest} message UpdatePlacementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePlacementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePlacementRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdatePlacementRequest} UpdatePlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePlacementRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdatePlacementRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": - case 16005: - message.dimension = 16005; + switch (tag >>> 3) { + case 1: { + message.placement = $root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": - case 16006: - message.dimension = 16006; + } + } + return message; + }; + + /** + * Decodes an UpdatePlacementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdatePlacementRequest} UpdatePlacementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePlacementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePlacementRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePlacementRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.placement != null && message.hasOwnProperty("placement")) { + var error = $root.google.ads.admanager.v1.Placement.verify(message.placement); + if (error) + return "placement." + 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 an UpdatePlacementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdatePlacementRequest} UpdatePlacementRequest + */ + UpdatePlacementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdatePlacementRequest) + return object; + var message = new $root.google.ads.admanager.v1.UpdatePlacementRequest(); + if (object.placement != null) { + if (typeof object.placement !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePlacementRequest.placement: object expected"); + message.placement = $root.google.ads.admanager.v1.Placement.fromObject(object.placement); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePlacementRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePlacementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {google.ads.admanager.v1.UpdatePlacementRequest} message UpdatePlacementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePlacementRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.placement = null; + object.updateMask = null; + } + if (message.placement != null && message.hasOwnProperty("placement")) + object.placement = $root.google.ads.admanager.v1.Placement.toObject(message.placement, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePlacementRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePlacementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePlacementRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdatePlacementRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePlacementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdatePlacementRequest"; + }; + + return UpdatePlacementRequest; + })(); + + v1.BatchUpdatePlacementsRequest = (function() { + + /** + * Properties of a BatchUpdatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdatePlacementsRequest + * @property {string|null} [parent] BatchUpdatePlacementsRequest parent + * @property {Array.|null} [requests] BatchUpdatePlacementsRequest requests + */ + + /** + * Constructs a new BatchUpdatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdatePlacementsRequest. + * @implements IBatchUpdatePlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest=} [properties] Properties to set + */ + function BatchUpdatePlacementsRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchUpdatePlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @instance + */ + BatchUpdatePlacementsRequest.prototype.parent = ""; + + /** + * BatchUpdatePlacementsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @instance + */ + BatchUpdatePlacementsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdatePlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsRequest} BatchUpdatePlacementsRequest instance + */ + BatchUpdatePlacementsRequest.create = function create(properties) { + return new BatchUpdatePlacementsRequest(properties); + }; + + /** + * Encodes the specified BatchUpdatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest} message BatchUpdatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdatePlacementsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdatePlacementRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsRequest} message BatchUpdatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdatePlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdatePlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsRequest} BatchUpdatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdatePlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdatePlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": - case 16007: - message.dimension = 16007; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdatePlacementRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": - case 16008: - message.dimension = 16008; + } + } + return message; + }; + + /** + * Decodes a BatchUpdatePlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsRequest} BatchUpdatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdatePlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdatePlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdatePlacementsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdatePlacementRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsRequest} BatchUpdatePlacementsRequest + */ + BatchUpdatePlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdatePlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdatePlacementsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdatePlacementsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdatePlacementsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdatePlacementRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdatePlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.BatchUpdatePlacementsRequest} message BatchUpdatePlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdatePlacementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdatePlacementRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdatePlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdatePlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdatePlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdatePlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdatePlacementsRequest"; + }; + + return BatchUpdatePlacementsRequest; + })(); + + v1.BatchUpdatePlacementsResponse = (function() { + + /** + * Properties of a BatchUpdatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdatePlacementsResponse + * @property {Array.|null} [placements] BatchUpdatePlacementsResponse placements + */ + + /** + * Constructs a new BatchUpdatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdatePlacementsResponse. + * @implements IBatchUpdatePlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsResponse=} [properties] Properties to set + */ + function BatchUpdatePlacementsResponse(properties) { + this.placements = []; + 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]]; + } + + /** + * BatchUpdatePlacementsResponse placements. + * @member {Array.} placements + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @instance + */ + BatchUpdatePlacementsResponse.prototype.placements = $util.emptyArray; + + /** + * Creates a new BatchUpdatePlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsResponse} BatchUpdatePlacementsResponse instance + */ + BatchUpdatePlacementsResponse.create = function create(properties) { + return new BatchUpdatePlacementsResponse(properties); + }; + + /** + * Encodes the specified BatchUpdatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsResponse} message BatchUpdatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdatePlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placements != null && message.placements.length) + for (var i = 0; i < message.placements.length; ++i) + $root.google.ads.admanager.v1.Placement.encode(message.placements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdatePlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdatePlacementsResponse} message BatchUpdatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdatePlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdatePlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsResponse} BatchUpdatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdatePlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdatePlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": - case 16009: - message.dimension = 16009; + switch (tag >>> 3) { + case 1: { + if (!(message.placements && message.placements.length)) + message.placements = []; + message.placements.push($root.google.ads.admanager.v1.Placement.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": - case 16010: - message.dimension = 16010; + } + } + return message; + }; + + /** + * Decodes a BatchUpdatePlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsResponse} BatchUpdatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdatePlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdatePlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdatePlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.placements != null && message.hasOwnProperty("placements")) { + if (!Array.isArray(message.placements)) + return "placements: array expected"; + for (var i = 0; i < message.placements.length; ++i) { + var error = $root.google.ads.admanager.v1.Placement.verify(message.placements[i]); + if (error) + return "placements." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdatePlacementsResponse} BatchUpdatePlacementsResponse + */ + BatchUpdatePlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdatePlacementsResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdatePlacementsResponse(); + if (object.placements) { + if (!Array.isArray(object.placements)) + throw TypeError(".google.ads.admanager.v1.BatchUpdatePlacementsResponse.placements: array expected"); + message.placements = []; + for (var i = 0; i < object.placements.length; ++i) { + if (typeof object.placements[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdatePlacementsResponse.placements: object expected"); + message.placements[i] = $root.google.ads.admanager.v1.Placement.fromObject(object.placements[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdatePlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.BatchUpdatePlacementsResponse} message BatchUpdatePlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdatePlacementsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.placements = []; + if (message.placements && message.placements.length) { + object.placements = []; + for (var j = 0; j < message.placements.length; ++j) + object.placements[j] = $root.google.ads.admanager.v1.Placement.toObject(message.placements[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdatePlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchUpdatePlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdatePlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchUpdatePlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdatePlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdatePlacementsResponse"; + }; + + return BatchUpdatePlacementsResponse; + })(); + + v1.BatchActivatePlacementsRequest = (function() { + + /** + * Properties of a BatchActivatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchActivatePlacementsRequest + * @property {string|null} [parent] BatchActivatePlacementsRequest parent + * @property {Array.|null} [names] BatchActivatePlacementsRequest names + */ + + /** + * Constructs a new BatchActivatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchActivatePlacementsRequest. + * @implements IBatchActivatePlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest=} [properties] Properties to set + */ + function BatchActivatePlacementsRequest(properties) { + this.names = []; + 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]]; + } + + /** + * BatchActivatePlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @instance + */ + BatchActivatePlacementsRequest.prototype.parent = ""; + + /** + * BatchActivatePlacementsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @instance + */ + BatchActivatePlacementsRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchActivatePlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivatePlacementsRequest} BatchActivatePlacementsRequest instance + */ + BatchActivatePlacementsRequest.create = function create(properties) { + return new BatchActivatePlacementsRequest(properties); + }; + + /** + * Encodes the specified BatchActivatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest} message BatchActivatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchActivatePlacementsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified BatchActivatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsRequest} message BatchActivatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchActivatePlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchActivatePlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchActivatePlacementsRequest} BatchActivatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchActivatePlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivatePlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": - case 16011: - message.dimension = 16011; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": - case 16012: - message.dimension = 16012; + } + } + return message; + }; + + /** + * Decodes a BatchActivatePlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchActivatePlacementsRequest} BatchActivatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchActivatePlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchActivatePlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchActivatePlacementsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a BatchActivatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchActivatePlacementsRequest} BatchActivatePlacementsRequest + */ + BatchActivatePlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivatePlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchActivatePlacementsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchActivatePlacementsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a BatchActivatePlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.BatchActivatePlacementsRequest} message BatchActivatePlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchActivatePlacementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this BatchActivatePlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchActivatePlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchActivatePlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchActivatePlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchActivatePlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivatePlacementsRequest"; + }; + + return BatchActivatePlacementsRequest; + })(); + + v1.BatchActivatePlacementsResponse = (function() { + + /** + * Properties of a BatchActivatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchActivatePlacementsResponse + */ + + /** + * Constructs a new BatchActivatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchActivatePlacementsResponse. + * @implements IBatchActivatePlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchActivatePlacementsResponse=} [properties] Properties to set + */ + function BatchActivatePlacementsResponse(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 BatchActivatePlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivatePlacementsResponse} BatchActivatePlacementsResponse instance + */ + BatchActivatePlacementsResponse.create = function create(properties) { + return new BatchActivatePlacementsResponse(properties); + }; + + /** + * Encodes the specified BatchActivatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsResponse} message BatchActivatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchActivatePlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BatchActivatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivatePlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchActivatePlacementsResponse} message BatchActivatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchActivatePlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchActivatePlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchActivatePlacementsResponse} BatchActivatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchActivatePlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivatePlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": - case 16013: - message.dimension = 16013; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": - case 16014: - message.dimension = 16014; + } + } + return message; + }; + + /** + * Decodes a BatchActivatePlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchActivatePlacementsResponse} BatchActivatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchActivatePlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchActivatePlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchActivatePlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BatchActivatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchActivatePlacementsResponse} BatchActivatePlacementsResponse + */ + BatchActivatePlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivatePlacementsResponse) + return object; + return new $root.google.ads.admanager.v1.BatchActivatePlacementsResponse(); + }; + + /** + * Creates a plain object from a BatchActivatePlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.BatchActivatePlacementsResponse} message BatchActivatePlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchActivatePlacementsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BatchActivatePlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchActivatePlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchActivatePlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchActivatePlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchActivatePlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivatePlacementsResponse"; + }; + + return BatchActivatePlacementsResponse; + })(); + + v1.BatchDeactivatePlacementsRequest = (function() { + + /** + * Properties of a BatchDeactivatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchDeactivatePlacementsRequest + * @property {string|null} [parent] BatchDeactivatePlacementsRequest parent + * @property {Array.|null} [names] BatchDeactivatePlacementsRequest names + */ + + /** + * Constructs a new BatchDeactivatePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchDeactivatePlacementsRequest. + * @implements IBatchDeactivatePlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest=} [properties] Properties to set + */ + function BatchDeactivatePlacementsRequest(properties) { + this.names = []; + 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]]; + } + + /** + * BatchDeactivatePlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @instance + */ + BatchDeactivatePlacementsRequest.prototype.parent = ""; + + /** + * BatchDeactivatePlacementsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @instance + */ + BatchDeactivatePlacementsRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchDeactivatePlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsRequest} BatchDeactivatePlacementsRequest instance + */ + BatchDeactivatePlacementsRequest.create = function create(properties) { + return new BatchDeactivatePlacementsRequest(properties); + }; + + /** + * Encodes the specified BatchDeactivatePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest} message BatchDeactivatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivatePlacementsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified BatchDeactivatePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsRequest} message BatchDeactivatePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivatePlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeactivatePlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsRequest} BatchDeactivatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivatePlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivatePlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": - case 17000: - message.dimension = 17000; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": - case 17001: - message.dimension = 17001; + } + } + return message; + }; + + /** + * Decodes a BatchDeactivatePlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsRequest} BatchDeactivatePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivatePlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeactivatePlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeactivatePlacementsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a BatchDeactivatePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsRequest} BatchDeactivatePlacementsRequest + */ + BatchDeactivatePlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivatePlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchDeactivatePlacementsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchDeactivatePlacementsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a BatchDeactivatePlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {google.ads.admanager.v1.BatchDeactivatePlacementsRequest} message BatchDeactivatePlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeactivatePlacementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this BatchDeactivatePlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchDeactivatePlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeactivatePlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeactivatePlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivatePlacementsRequest"; + }; + + return BatchDeactivatePlacementsRequest; + })(); + + v1.BatchDeactivatePlacementsResponse = (function() { + + /** + * Properties of a BatchDeactivatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchDeactivatePlacementsResponse + */ + + /** + * Constructs a new BatchDeactivatePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchDeactivatePlacementsResponse. + * @implements IBatchDeactivatePlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsResponse=} [properties] Properties to set + */ + function BatchDeactivatePlacementsResponse(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 BatchDeactivatePlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} BatchDeactivatePlacementsResponse instance + */ + BatchDeactivatePlacementsResponse.create = function create(properties) { + return new BatchDeactivatePlacementsResponse(properties); + }; + + /** + * Encodes the specified BatchDeactivatePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsResponse} message BatchDeactivatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivatePlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BatchDeactivatePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivatePlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivatePlacementsResponse} message BatchDeactivatePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivatePlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeactivatePlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} BatchDeactivatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivatePlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivatePlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": - case 17002: - message.dimension = 17002; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": - case 17003: - message.dimension = 17003; + } + } + return message; + }; + + /** + * Decodes a BatchDeactivatePlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} BatchDeactivatePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivatePlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeactivatePlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeactivatePlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BatchDeactivatePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} BatchDeactivatePlacementsResponse + */ + BatchDeactivatePlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivatePlacementsResponse) + return object; + return new $root.google.ads.admanager.v1.BatchDeactivatePlacementsResponse(); + }; + + /** + * Creates a plain object from a BatchDeactivatePlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {google.ads.admanager.v1.BatchDeactivatePlacementsResponse} message BatchDeactivatePlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeactivatePlacementsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BatchDeactivatePlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchDeactivatePlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeactivatePlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchDeactivatePlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeactivatePlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivatePlacementsResponse"; + }; + + return BatchDeactivatePlacementsResponse; + })(); + + v1.BatchArchivePlacementsRequest = (function() { + + /** + * Properties of a BatchArchivePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchArchivePlacementsRequest + * @property {string|null} [parent] BatchArchivePlacementsRequest parent + * @property {Array.|null} [names] BatchArchivePlacementsRequest names + */ + + /** + * Constructs a new BatchArchivePlacementsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchArchivePlacementsRequest. + * @implements IBatchArchivePlacementsRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest=} [properties] Properties to set + */ + function BatchArchivePlacementsRequest(properties) { + this.names = []; + 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]]; + } + + /** + * BatchArchivePlacementsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @instance + */ + BatchArchivePlacementsRequest.prototype.parent = ""; + + /** + * BatchArchivePlacementsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @instance + */ + BatchArchivePlacementsRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchArchivePlacementsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchArchivePlacementsRequest} BatchArchivePlacementsRequest instance + */ + BatchArchivePlacementsRequest.create = function create(properties) { + return new BatchArchivePlacementsRequest(properties); + }; + + /** + * Encodes the specified BatchArchivePlacementsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest} message BatchArchivePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchArchivePlacementsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified BatchArchivePlacementsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsRequest} message BatchArchivePlacementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchArchivePlacementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchArchivePlacementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchArchivePlacementsRequest} BatchArchivePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchArchivePlacementsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchArchivePlacementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": - case 17004: - message.dimension = 17004; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": - case 17005: - message.dimension = 17005; + } + } + return message; + }; + + /** + * Decodes a BatchArchivePlacementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchArchivePlacementsRequest} BatchArchivePlacementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchArchivePlacementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchArchivePlacementsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchArchivePlacementsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a BatchArchivePlacementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchArchivePlacementsRequest} BatchArchivePlacementsRequest + */ + BatchArchivePlacementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchArchivePlacementsRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchArchivePlacementsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchArchivePlacementsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a BatchArchivePlacementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {google.ads.admanager.v1.BatchArchivePlacementsRequest} message BatchArchivePlacementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchArchivePlacementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this BatchArchivePlacementsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchArchivePlacementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchArchivePlacementsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchArchivePlacementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchArchivePlacementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchArchivePlacementsRequest"; + }; + + return BatchArchivePlacementsRequest; + })(); + + v1.BatchArchivePlacementsResponse = (function() { + + /** + * Properties of a BatchArchivePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchArchivePlacementsResponse + */ + + /** + * Constructs a new BatchArchivePlacementsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchArchivePlacementsResponse. + * @implements IBatchArchivePlacementsResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchArchivePlacementsResponse=} [properties] Properties to set + */ + function BatchArchivePlacementsResponse(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 BatchArchivePlacementsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchArchivePlacementsResponse} BatchArchivePlacementsResponse instance + */ + BatchArchivePlacementsResponse.create = function create(properties) { + return new BatchArchivePlacementsResponse(properties); + }; + + /** + * Encodes the specified BatchArchivePlacementsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsResponse} message BatchArchivePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchArchivePlacementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BatchArchivePlacementsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchArchivePlacementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {google.ads.admanager.v1.IBatchArchivePlacementsResponse} message BatchArchivePlacementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchArchivePlacementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchArchivePlacementsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchArchivePlacementsResponse} BatchArchivePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchArchivePlacementsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchArchivePlacementsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": - case 17006: - message.dimension = 17006; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": - case 17007: - message.dimension = 17007; + } + } + return message; + }; + + /** + * Decodes a BatchArchivePlacementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchArchivePlacementsResponse} BatchArchivePlacementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchArchivePlacementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchArchivePlacementsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchArchivePlacementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BatchArchivePlacementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchArchivePlacementsResponse} BatchArchivePlacementsResponse + */ + BatchArchivePlacementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchArchivePlacementsResponse) + return object; + return new $root.google.ads.admanager.v1.BatchArchivePlacementsResponse(); + }; + + /** + * Creates a plain object from a BatchArchivePlacementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {google.ads.admanager.v1.BatchArchivePlacementsResponse} message BatchArchivePlacementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchArchivePlacementsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BatchArchivePlacementsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchArchivePlacementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchArchivePlacementsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchArchivePlacementsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchArchivePlacementsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchArchivePlacementsResponse"; + }; + + return BatchArchivePlacementsResponse; + })(); + + v1.PrivateAuctionDeal = (function() { + + /** + * Properties of a PrivateAuctionDeal. + * @memberof google.ads.admanager.v1 + * @interface IPrivateAuctionDeal + * @property {string|null} [name] PrivateAuctionDeal name + * @property {number|Long|null} [privateAuctionDealId] PrivateAuctionDeal privateAuctionDealId + * @property {number|Long|null} [privateAuctionId] PrivateAuctionDeal privateAuctionId + * @property {string|null} [privateAuctionDisplayName] PrivateAuctionDeal privateAuctionDisplayName + * @property {number|Long|null} [buyerAccountId] PrivateAuctionDeal buyerAccountId + * @property {number|Long|null} [externalDealId] PrivateAuctionDeal externalDealId + * @property {google.ads.admanager.v1.ITargeting|null} [targeting] PrivateAuctionDeal targeting + * @property {google.protobuf.ITimestamp|null} [endTime] PrivateAuctionDeal endTime + * @property {google.type.IMoney|null} [floorPrice] PrivateAuctionDeal floorPrice + * @property {Array.|null} [creativeSizes] PrivateAuctionDeal creativeSizes + * @property {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null} [status] PrivateAuctionDeal status + * @property {boolean|null} [auctionPriorityEnabled] PrivateAuctionDeal auctionPriorityEnabled + * @property {boolean|null} [blockOverrideEnabled] PrivateAuctionDeal blockOverrideEnabled + * @property {google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null} [buyerPermissionType] PrivateAuctionDeal buyerPermissionType + * @property {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null} [buyerData] PrivateAuctionDeal buyerData + * @property {google.protobuf.ITimestamp|null} [createTime] PrivateAuctionDeal createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateAuctionDeal updateTime + */ + + /** + * Constructs a new PrivateAuctionDeal. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PrivateAuctionDeal. + * @implements IPrivateAuctionDeal + * @constructor + * @param {google.ads.admanager.v1.IPrivateAuctionDeal=} [properties] Properties to set + */ + function PrivateAuctionDeal(properties) { + this.creativeSizes = []; + 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]]; + } + + /** + * PrivateAuctionDeal name. + * @member {string} name + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.name = ""; + + /** + * PrivateAuctionDeal privateAuctionDealId. + * @member {number|Long|null|undefined} privateAuctionDealId + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.privateAuctionDealId = null; + + /** + * PrivateAuctionDeal privateAuctionId. + * @member {number|Long|null|undefined} privateAuctionId + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.privateAuctionId = null; + + /** + * PrivateAuctionDeal privateAuctionDisplayName. + * @member {string|null|undefined} privateAuctionDisplayName + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.privateAuctionDisplayName = null; + + /** + * PrivateAuctionDeal buyerAccountId. + * @member {number|Long|null|undefined} buyerAccountId + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.buyerAccountId = null; + + /** + * PrivateAuctionDeal externalDealId. + * @member {number|Long|null|undefined} externalDealId + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.externalDealId = null; + + /** + * PrivateAuctionDeal targeting. + * @member {google.ads.admanager.v1.ITargeting|null|undefined} targeting + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.targeting = null; + + /** + * PrivateAuctionDeal endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.endTime = null; + + /** + * PrivateAuctionDeal floorPrice. + * @member {google.type.IMoney|null|undefined} floorPrice + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.floorPrice = null; + + /** + * PrivateAuctionDeal creativeSizes. + * @member {Array.} creativeSizes + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.creativeSizes = $util.emptyArray; + + /** + * PrivateAuctionDeal status. + * @member {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus|null|undefined} status + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.status = null; + + /** + * PrivateAuctionDeal auctionPriorityEnabled. + * @member {boolean|null|undefined} auctionPriorityEnabled + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.auctionPriorityEnabled = null; + + /** + * PrivateAuctionDeal blockOverrideEnabled. + * @member {boolean|null|undefined} blockOverrideEnabled + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.blockOverrideEnabled = null; + + /** + * PrivateAuctionDeal buyerPermissionType. + * @member {google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType|null|undefined} buyerPermissionType + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.buyerPermissionType = null; + + /** + * PrivateAuctionDeal buyerData. + * @member {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData|null|undefined} buyerData + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.buyerData = null; + + /** + * PrivateAuctionDeal createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.createTime = null; + + /** + * PrivateAuctionDeal updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + */ + PrivateAuctionDeal.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionDealId", { + get: $util.oneOfGetter($oneOfFields = ["privateAuctionDealId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionId", { + get: $util.oneOfGetter($oneOfFields = ["privateAuctionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_privateAuctionDisplayName", { + get: $util.oneOfGetter($oneOfFields = ["privateAuctionDisplayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerAccountId", { + get: $util.oneOfGetter($oneOfFields = ["buyerAccountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_externalDealId", { + get: $util.oneOfGetter($oneOfFields = ["externalDealId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_targeting", { + get: $util.oneOfGetter($oneOfFields = ["targeting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_endTime", { + get: $util.oneOfGetter($oneOfFields = ["endTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_floorPrice", { + get: $util.oneOfGetter($oneOfFields = ["floorPrice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_auctionPriorityEnabled", { + get: $util.oneOfGetter($oneOfFields = ["auctionPriorityEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_blockOverrideEnabled", { + get: $util.oneOfGetter($oneOfFields = ["blockOverrideEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerPermissionType", { + get: $util.oneOfGetter($oneOfFields = ["buyerPermissionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_buyerData", { + get: $util.oneOfGetter($oneOfFields = ["buyerData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuctionDeal.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrivateAuctionDeal instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {google.ads.admanager.v1.IPrivateAuctionDeal=} [properties] Properties to set + * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal instance + */ + PrivateAuctionDeal.create = function create(properties) { + return new PrivateAuctionDeal(properties); + }; + + /** + * Encodes the specified PrivateAuctionDeal message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {google.ads.admanager.v1.IPrivateAuctionDeal} message PrivateAuctionDeal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateAuctionDeal.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.privateAuctionDealId != null && Object.hasOwnProperty.call(message, "privateAuctionDealId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.privateAuctionDealId); + if (message.privateAuctionId != null && Object.hasOwnProperty.call(message, "privateAuctionId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.privateAuctionId); + if (message.buyerAccountId != null && Object.hasOwnProperty.call(message, "buyerAccountId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.buyerAccountId); + if (message.externalDealId != null && Object.hasOwnProperty.call(message, "externalDealId")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.externalDealId); + if (message.targeting != null && Object.hasOwnProperty.call(message, "targeting")) + $root.google.ads.admanager.v1.Targeting.encode(message.targeting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.floorPrice != null && Object.hasOwnProperty.call(message, "floorPrice")) + $root.google.type.Money.encode(message.floorPrice, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); + if (message.auctionPriorityEnabled != null && Object.hasOwnProperty.call(message, "auctionPriorityEnabled")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.auctionPriorityEnabled); + if (message.blockOverrideEnabled != null && Object.hasOwnProperty.call(message, "blockOverrideEnabled")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.blockOverrideEnabled); + if (message.buyerPermissionType != null && Object.hasOwnProperty.call(message, "buyerPermissionType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.buyerPermissionType); + if (message.buyerData != null && Object.hasOwnProperty.call(message, "buyerData")) + $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.encode(message.buyerData, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.creativeSizes != null && message.creativeSizes.length) + for (var i = 0; i < message.creativeSizes.length; ++i) + $root.google.ads.admanager.v1.Size.encode(message.creativeSizes[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.privateAuctionDisplayName != null && Object.hasOwnProperty.call(message, "privateAuctionDisplayName")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.privateAuctionDisplayName); + return writer; + }; + + /** + * Encodes the specified PrivateAuctionDeal message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {google.ads.admanager.v1.IPrivateAuctionDeal} message PrivateAuctionDeal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateAuctionDeal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateAuctionDeal message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateAuctionDeal.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuctionDeal(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": - case 17008: - message.dimension = 17008; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.privateAuctionDealId = reader.int64(); + break; + } + case 3: { + message.privateAuctionId = reader.int64(); + break; + } + case 20: { + message.privateAuctionDisplayName = reader.string(); + break; + } + case 4: { + message.buyerAccountId = reader.int64(); + break; + } + case 5: { + message.externalDealId = reader.int64(); + break; + } + case 6: { + message.targeting = $root.google.ads.admanager.v1.Targeting.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.floorPrice = $root.google.type.Money.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.creativeSizes && message.creativeSizes.length)) + message.creativeSizes = []; + message.creativeSizes.push($root.google.ads.admanager.v1.Size.decode(reader, reader.uint32())); + break; + } + case 10: { + message.status = reader.int32(); + break; + } + case 11: { + message.auctionPriorityEnabled = reader.bool(); + break; + } + case 12: { + message.blockOverrideEnabled = reader.bool(); + break; + } + case 13: { + message.buyerPermissionType = reader.int32(); + break; + } + case 14: { + message.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.decode(reader, reader.uint32()); + break; + } + case 15: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": - case 17009: - message.dimension = 17009; + } + } + return message; + }; + + /** + * Decodes a PrivateAuctionDeal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateAuctionDeal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateAuctionDeal message. + * @function verify + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateAuctionDeal.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.privateAuctionDealId != null && message.hasOwnProperty("privateAuctionDealId")) { + properties._privateAuctionDealId = 1; + if (!$util.isInteger(message.privateAuctionDealId) && !(message.privateAuctionDealId && $util.isInteger(message.privateAuctionDealId.low) && $util.isInteger(message.privateAuctionDealId.high))) + return "privateAuctionDealId: integer|Long expected"; + } + if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { + properties._privateAuctionId = 1; + if (!$util.isInteger(message.privateAuctionId) && !(message.privateAuctionId && $util.isInteger(message.privateAuctionId.low) && $util.isInteger(message.privateAuctionId.high))) + return "privateAuctionId: integer|Long expected"; + } + if (message.privateAuctionDisplayName != null && message.hasOwnProperty("privateAuctionDisplayName")) { + properties._privateAuctionDisplayName = 1; + if (!$util.isString(message.privateAuctionDisplayName)) + return "privateAuctionDisplayName: string expected"; + } + if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { + properties._buyerAccountId = 1; + if (!$util.isInteger(message.buyerAccountId) && !(message.buyerAccountId && $util.isInteger(message.buyerAccountId.low) && $util.isInteger(message.buyerAccountId.high))) + return "buyerAccountId: integer|Long expected"; + } + if (message.externalDealId != null && message.hasOwnProperty("externalDealId")) { + properties._externalDealId = 1; + if (!$util.isInteger(message.externalDealId) && !(message.externalDealId && $util.isInteger(message.externalDealId.low) && $util.isInteger(message.externalDealId.high))) + return "externalDealId: integer|Long expected"; + } + if (message.targeting != null && message.hasOwnProperty("targeting")) { + properties._targeting = 1; + { + var error = $root.google.ads.admanager.v1.Targeting.verify(message.targeting); + if (error) + return "targeting." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + properties._endTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + } + if (message.floorPrice != null && message.hasOwnProperty("floorPrice")) { + properties._floorPrice = 1; + { + var error = $root.google.type.Money.verify(message.floorPrice); + if (error) + return "floorPrice." + error; + } + } + if (message.creativeSizes != null && message.hasOwnProperty("creativeSizes")) { + if (!Array.isArray(message.creativeSizes)) + return "creativeSizes: array expected"; + for (var i = 0; i < message.creativeSizes.length; ++i) { + var error = $root.google.ads.admanager.v1.Size.verify(message.creativeSizes[i]); + if (error) + return "creativeSizes." + error; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": - case 17010: - message.dimension = 17010; + } + } + if (message.auctionPriorityEnabled != null && message.hasOwnProperty("auctionPriorityEnabled")) { + properties._auctionPriorityEnabled = 1; + if (typeof message.auctionPriorityEnabled !== "boolean") + return "auctionPriorityEnabled: boolean expected"; + } + if (message.blockOverrideEnabled != null && message.hasOwnProperty("blockOverrideEnabled")) { + properties._blockOverrideEnabled = 1; + if (typeof message.blockOverrideEnabled !== "boolean") + return "blockOverrideEnabled: boolean expected"; + } + if (message.buyerPermissionType != null && message.hasOwnProperty("buyerPermissionType")) { + properties._buyerPermissionType = 1; + switch (message.buyerPermissionType) { + default: + return "buyerPermissionType: enum value expected"; + case 0: + case 1: + case 2: break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": - case 17011: - message.dimension = 17011; + } + } + if (message.buyerData != null && message.hasOwnProperty("buyerData")) { + properties._buyerData = 1; + { + var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify(message.buyerData); + if (error) + return "buyerData." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + return null; + }; + + /** + * Creates a PrivateAuctionDeal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.PrivateAuctionDeal} PrivateAuctionDeal + */ + PrivateAuctionDeal.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.PrivateAuctionDeal) + return object; + var message = new $root.google.ads.admanager.v1.PrivateAuctionDeal(); + if (object.name != null) + message.name = String(object.name); + if (object.privateAuctionDealId != null) + if ($util.Long) + (message.privateAuctionDealId = $util.Long.fromValue(object.privateAuctionDealId)).unsigned = false; + else if (typeof object.privateAuctionDealId === "string") + message.privateAuctionDealId = parseInt(object.privateAuctionDealId, 10); + else if (typeof object.privateAuctionDealId === "number") + message.privateAuctionDealId = object.privateAuctionDealId; + else if (typeof object.privateAuctionDealId === "object") + message.privateAuctionDealId = new $util.LongBits(object.privateAuctionDealId.low >>> 0, object.privateAuctionDealId.high >>> 0).toNumber(); + if (object.privateAuctionId != null) + if ($util.Long) + (message.privateAuctionId = $util.Long.fromValue(object.privateAuctionId)).unsigned = false; + else if (typeof object.privateAuctionId === "string") + message.privateAuctionId = parseInt(object.privateAuctionId, 10); + else if (typeof object.privateAuctionId === "number") + message.privateAuctionId = object.privateAuctionId; + else if (typeof object.privateAuctionId === "object") + message.privateAuctionId = new $util.LongBits(object.privateAuctionId.low >>> 0, object.privateAuctionId.high >>> 0).toNumber(); + if (object.privateAuctionDisplayName != null) + message.privateAuctionDisplayName = String(object.privateAuctionDisplayName); + if (object.buyerAccountId != null) + if ($util.Long) + (message.buyerAccountId = $util.Long.fromValue(object.buyerAccountId)).unsigned = false; + else if (typeof object.buyerAccountId === "string") + message.buyerAccountId = parseInt(object.buyerAccountId, 10); + else if (typeof object.buyerAccountId === "number") + message.buyerAccountId = object.buyerAccountId; + else if (typeof object.buyerAccountId === "object") + message.buyerAccountId = new $util.LongBits(object.buyerAccountId.low >>> 0, object.buyerAccountId.high >>> 0).toNumber(); + if (object.externalDealId != null) + if ($util.Long) + (message.externalDealId = $util.Long.fromValue(object.externalDealId)).unsigned = false; + else if (typeof object.externalDealId === "string") + message.externalDealId = parseInt(object.externalDealId, 10); + else if (typeof object.externalDealId === "number") + message.externalDealId = object.externalDealId; + else if (typeof object.externalDealId === "object") + message.externalDealId = new $util.LongBits(object.externalDealId.low >>> 0, object.externalDealId.high >>> 0).toNumber(); + if (object.targeting != null) { + if (typeof object.targeting !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.targeting: object expected"); + message.targeting = $root.google.ads.admanager.v1.Targeting.fromObject(object.targeting); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.floorPrice != null) { + if (typeof object.floorPrice !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.floorPrice: object expected"); + message.floorPrice = $root.google.type.Money.fromObject(object.floorPrice); + } + if (object.creativeSizes) { + if (!Array.isArray(object.creativeSizes)) + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.creativeSizes: array expected"); + message.creativeSizes = []; + for (var i = 0; i < object.creativeSizes.length; ++i) { + if (typeof object.creativeSizes[i] !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.creativeSizes: object expected"); + message.creativeSizes[i] = $root.google.ads.admanager.v1.Size.fromObject(object.creativeSizes[i]); + } + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": - case 17012: - message.dimension = 17012; + } + break; + case "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "ACTIVE": + case 2: + message.status = 2; + break; + case "CANCELED": + case 3: + message.status = 3; + break; + case "SELLER_PAUSED": + case 4: + message.status = 4; + break; + case "BUYER_PAUSED": + case 5: + message.status = 5; + break; + } + if (object.auctionPriorityEnabled != null) + message.auctionPriorityEnabled = Boolean(object.auctionPriorityEnabled); + if (object.blockOverrideEnabled != null) + message.blockOverrideEnabled = Boolean(object.blockOverrideEnabled); + switch (object.buyerPermissionType) { + default: + if (typeof object.buyerPermissionType === "number") { + message.buyerPermissionType = object.buyerPermissionType; break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": - case 17013: - message.dimension = 17013; + } + break; + case "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED": + case 0: + message.buyerPermissionType = 0; + break; + case "NEGOTIATOR_ONLY": + case 1: + message.buyerPermissionType = 1; + break; + case "BIDDER": + case 2: + message.buyerPermissionType = 2; + break; + } + if (object.buyerData != null) { + if (typeof object.buyerData !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.buyerData: object expected"); + message.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.fromObject(object.buyerData); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a PrivateAuctionDeal message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {google.ads.admanager.v1.PrivateAuctionDeal} message PrivateAuctionDeal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateAuctionDeal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.creativeSizes = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.privateAuctionDealId != null && message.hasOwnProperty("privateAuctionDealId")) { + if (typeof message.privateAuctionDealId === "number") + object.privateAuctionDealId = options.longs === String ? String(message.privateAuctionDealId) : message.privateAuctionDealId; + else + object.privateAuctionDealId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionDealId) : options.longs === Number ? new $util.LongBits(message.privateAuctionDealId.low >>> 0, message.privateAuctionDealId.high >>> 0).toNumber() : message.privateAuctionDealId; + if (options.oneofs) + object._privateAuctionDealId = "privateAuctionDealId"; + } + if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { + if (typeof message.privateAuctionId === "number") + object.privateAuctionId = options.longs === String ? String(message.privateAuctionId) : message.privateAuctionId; + else + object.privateAuctionId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionId) : options.longs === Number ? new $util.LongBits(message.privateAuctionId.low >>> 0, message.privateAuctionId.high >>> 0).toNumber() : message.privateAuctionId; + if (options.oneofs) + object._privateAuctionId = "privateAuctionId"; + } + if (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { + if (typeof message.buyerAccountId === "number") + object.buyerAccountId = options.longs === String ? String(message.buyerAccountId) : message.buyerAccountId; + else + object.buyerAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.buyerAccountId) : options.longs === Number ? new $util.LongBits(message.buyerAccountId.low >>> 0, message.buyerAccountId.high >>> 0).toNumber() : message.buyerAccountId; + if (options.oneofs) + object._buyerAccountId = "buyerAccountId"; + } + if (message.externalDealId != null && message.hasOwnProperty("externalDealId")) { + if (typeof message.externalDealId === "number") + object.externalDealId = options.longs === String ? String(message.externalDealId) : message.externalDealId; + else + object.externalDealId = options.longs === String ? $util.Long.prototype.toString.call(message.externalDealId) : options.longs === Number ? new $util.LongBits(message.externalDealId.low >>> 0, message.externalDealId.high >>> 0).toNumber() : message.externalDealId; + if (options.oneofs) + object._externalDealId = "externalDealId"; + } + if (message.targeting != null && message.hasOwnProperty("targeting")) { + object.targeting = $root.google.ads.admanager.v1.Targeting.toObject(message.targeting, options); + if (options.oneofs) + object._targeting = "targeting"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (options.oneofs) + object._endTime = "endTime"; + } + if (message.floorPrice != null && message.hasOwnProperty("floorPrice")) { + object.floorPrice = $root.google.type.Money.toObject(message.floorPrice, options); + if (options.oneofs) + object._floorPrice = "floorPrice"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.auctionPriorityEnabled != null && message.hasOwnProperty("auctionPriorityEnabled")) { + object.auctionPriorityEnabled = message.auctionPriorityEnabled; + if (options.oneofs) + object._auctionPriorityEnabled = "auctionPriorityEnabled"; + } + if (message.blockOverrideEnabled != null && message.hasOwnProperty("blockOverrideEnabled")) { + object.blockOverrideEnabled = message.blockOverrideEnabled; + if (options.oneofs) + object._blockOverrideEnabled = "blockOverrideEnabled"; + } + if (message.buyerPermissionType != null && message.hasOwnProperty("buyerPermissionType")) { + object.buyerPermissionType = options.enums === String ? $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType[message.buyerPermissionType] === undefined ? message.buyerPermissionType : $root.google.ads.admanager.v1.DealBuyerPermissionTypeEnum.DealBuyerPermissionType[message.buyerPermissionType] : message.buyerPermissionType; + if (options.oneofs) + object._buyerPermissionType = "buyerPermissionType"; + } + if (message.buyerData != null && message.hasOwnProperty("buyerData")) { + object.buyerData = $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.toObject(message.buyerData, options); + if (options.oneofs) + object._buyerData = "buyerData"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.creativeSizes && message.creativeSizes.length) { + object.creativeSizes = []; + for (var j = 0; j < message.creativeSizes.length; ++j) + object.creativeSizes[j] = $root.google.ads.admanager.v1.Size.toObject(message.creativeSizes[j], options); + } + if (message.privateAuctionDisplayName != null && message.hasOwnProperty("privateAuctionDisplayName")) { + object.privateAuctionDisplayName = message.privateAuctionDisplayName; + if (options.oneofs) + object._privateAuctionDisplayName = "privateAuctionDisplayName"; + } + return object; + }; + + /** + * Converts this PrivateAuctionDeal to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @instance + * @returns {Object.} JSON object + */ + PrivateAuctionDeal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateAuctionDeal + * @function getTypeUrl + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateAuctionDeal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuctionDeal"; + }; + + PrivateAuctionDeal.BuyerData = (function() { + + /** + * Properties of a BuyerData. + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @interface IBuyerData + * @property {Array.|null} [buyerEmails] BuyerData buyerEmails + */ + + /** + * Constructs a new BuyerData. + * @memberof google.ads.admanager.v1.PrivateAuctionDeal + * @classdesc Represents a BuyerData. + * @implements IBuyerData + * @constructor + * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData=} [properties] Properties to set + */ + function BuyerData(properties) { + this.buyerEmails = []; + 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]]; + } + + /** + * BuyerData buyerEmails. + * @member {Array.} buyerEmails + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @instance + */ + BuyerData.prototype.buyerEmails = $util.emptyArray; + + /** + * Creates a new BuyerData instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData=} [properties] Properties to set + * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData instance + */ + BuyerData.create = function create(properties) { + return new BuyerData(properties); + }; + + /** + * Encodes the specified BuyerData message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData} message BuyerData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuyerData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buyerEmails != null && message.buyerEmails.length) + for (var i = 0; i < message.buyerEmails.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buyerEmails[i]); + return writer; + }; + + /** + * Encodes the specified BuyerData message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {google.ads.admanager.v1.PrivateAuctionDeal.IBuyerData} message BuyerData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuyerData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuyerData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuyerData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.buyerEmails && message.buyerEmails.length)) + message.buyerEmails = []; + message.buyerEmails.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuyerData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuyerData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuyerData message. + * @function verify + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuyerData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buyerEmails != null && message.hasOwnProperty("buyerEmails")) { + if (!Array.isArray(message.buyerEmails)) + return "buyerEmails: array expected"; + for (var i = 0; i < message.buyerEmails.length; ++i) + if (!$util.isString(message.buyerEmails[i])) + return "buyerEmails: string[] expected"; + } + return null; + }; + + /** + * Creates a BuyerData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} BuyerData + */ + BuyerData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData) + return object; + var message = new $root.google.ads.admanager.v1.PrivateAuctionDeal.BuyerData(); + if (object.buyerEmails) { + if (!Array.isArray(object.buyerEmails)) + throw TypeError(".google.ads.admanager.v1.PrivateAuctionDeal.BuyerData.buyerEmails: array expected"); + message.buyerEmails = []; + for (var i = 0; i < object.buyerEmails.length; ++i) + message.buyerEmails[i] = String(object.buyerEmails[i]); + } + return message; + }; + + /** + * Creates a plain object from a BuyerData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {google.ads.admanager.v1.PrivateAuctionDeal.BuyerData} message BuyerData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuyerData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buyerEmails = []; + if (message.buyerEmails && message.buyerEmails.length) { + object.buyerEmails = []; + for (var j = 0; j < message.buyerEmails.length; ++j) + object.buyerEmails[j] = message.buyerEmails[j]; + } + return object; + }; + + /** + * Converts this BuyerData to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @instance + * @returns {Object.} JSON object + */ + BuyerData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BuyerData + * @function getTypeUrl + * @memberof google.ads.admanager.v1.PrivateAuctionDeal.BuyerData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuyerData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuctionDeal.BuyerData"; + }; + + return BuyerData; + })(); + + return PrivateAuctionDeal; + })(); + + v1.PrivateMarketplaceDealStatusEnum = (function() { + + /** + * Properties of a PrivateMarketplaceDealStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface IPrivateMarketplaceDealStatusEnum + */ + + /** + * Constructs a new PrivateMarketplaceDealStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PrivateMarketplaceDealStatusEnum. + * @implements IPrivateMarketplaceDealStatusEnum + * @constructor + * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum=} [properties] Properties to set + */ + function PrivateMarketplaceDealStatusEnum(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 PrivateMarketplaceDealStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum instance + */ + PrivateMarketplaceDealStatusEnum.create = function create(properties) { + return new PrivateMarketplaceDealStatusEnum(properties); + }; + + /** + * Encodes the specified PrivateMarketplaceDealStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateMarketplaceDealStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PrivateMarketplaceDealStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {google.ads.admanager.v1.IPrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateMarketplaceDealStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateMarketplaceDealStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": - case 17014: - message.dimension = 17014; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": - case 18000: - message.dimension = 18000; + } + } + return message; + }; + + /** + * Decodes a PrivateMarketplaceDealStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateMarketplaceDealStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateMarketplaceDealStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateMarketplaceDealStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PrivateMarketplaceDealStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} PrivateMarketplaceDealStatusEnum + */ + PrivateMarketplaceDealStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum) + return object; + return new $root.google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum(); + }; + + /** + * Creates a plain object from a PrivateMarketplaceDealStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum} message PrivateMarketplaceDealStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateMarketplaceDealStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PrivateMarketplaceDealStatusEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @instance + * @returns {Object.} JSON object + */ + PrivateMarketplaceDealStatusEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateMarketplaceDealStatusEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateMarketplaceDealStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum"; + }; + + /** + * PrivateMarketplaceDealStatus enum. + * @name google.ads.admanager.v1.PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus + * @enum {number} + * @property {number} PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED=0 PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} CANCELED=3 CANCELED value + * @property {number} SELLER_PAUSED=4 SELLER_PAUSED value + * @property {number} BUYER_PAUSED=5 BUYER_PAUSED value + */ + PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "CANCELED"] = 3; + values[valuesById[4] = "SELLER_PAUSED"] = 4; + values[valuesById[5] = "BUYER_PAUSED"] = 5; + return values; + })(); + + return PrivateMarketplaceDealStatusEnum; + })(); + + v1.Targeting = (function() { + + /** + * Properties of a Targeting. + * @memberof google.ads.admanager.v1 + * @interface ITargeting + * @property {google.ads.admanager.v1.IGeoTargeting|null} [geoTargeting] Targeting geoTargeting + * @property {google.ads.admanager.v1.ITechnologyTargeting|null} [technologyTargeting] Targeting technologyTargeting + * @property {google.ads.admanager.v1.IInventoryTargeting|null} [inventoryTargeting] Targeting inventoryTargeting + * @property {google.ads.admanager.v1.IRequestPlatformTargeting|null} [requestPlatformTargeting] Targeting requestPlatformTargeting + * @property {google.ads.admanager.v1.ICustomTargeting|null} [customTargeting] Targeting customTargeting + * @property {google.ads.admanager.v1.IUserDomainTargeting|null} [userDomainTargeting] Targeting userDomainTargeting + * @property {google.ads.admanager.v1.IVideoPositionTargeting|null} [videoPositionTargeting] Targeting videoPositionTargeting + * @property {google.ads.admanager.v1.IDataSegmentTargeting|null} [dataSegmentTargeting] Targeting dataSegmentTargeting + * @property {google.ads.admanager.v1.IContentTargeting|null} [contentTargeting] Targeting contentTargeting + * @property {google.ads.admanager.v1.IMobileApplicationTargeting|null} [mobileApplicationTargeting] Targeting mobileApplicationTargeting + */ + + /** + * Constructs a new Targeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Targeting. + * @implements ITargeting + * @constructor + * @param {google.ads.admanager.v1.ITargeting=} [properties] Properties to set + */ + function Targeting(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]]; + } + + /** + * Targeting geoTargeting. + * @member {google.ads.admanager.v1.IGeoTargeting|null|undefined} geoTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.geoTargeting = null; + + /** + * Targeting technologyTargeting. + * @member {google.ads.admanager.v1.ITechnologyTargeting|null|undefined} technologyTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.technologyTargeting = null; + + /** + * Targeting inventoryTargeting. + * @member {google.ads.admanager.v1.IInventoryTargeting|null|undefined} inventoryTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.inventoryTargeting = null; + + /** + * Targeting requestPlatformTargeting. + * @member {google.ads.admanager.v1.IRequestPlatformTargeting|null|undefined} requestPlatformTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.requestPlatformTargeting = null; + + /** + * Targeting customTargeting. + * @member {google.ads.admanager.v1.ICustomTargeting|null|undefined} customTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.customTargeting = null; + + /** + * Targeting userDomainTargeting. + * @member {google.ads.admanager.v1.IUserDomainTargeting|null|undefined} userDomainTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.userDomainTargeting = null; + + /** + * Targeting videoPositionTargeting. + * @member {google.ads.admanager.v1.IVideoPositionTargeting|null|undefined} videoPositionTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.videoPositionTargeting = null; + + /** + * Targeting dataSegmentTargeting. + * @member {google.ads.admanager.v1.IDataSegmentTargeting|null|undefined} dataSegmentTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.dataSegmentTargeting = null; + + /** + * Targeting contentTargeting. + * @member {google.ads.admanager.v1.IContentTargeting|null|undefined} contentTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.contentTargeting = null; + + /** + * Targeting mobileApplicationTargeting. + * @member {google.ads.admanager.v1.IMobileApplicationTargeting|null|undefined} mobileApplicationTargeting + * @memberof google.ads.admanager.v1.Targeting + * @instance + */ + Targeting.prototype.mobileApplicationTargeting = null; + + /** + * Creates a new Targeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {google.ads.admanager.v1.ITargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Targeting} Targeting instance + */ + Targeting.create = function create(properties) { + return new Targeting(properties); + }; + + /** + * Encodes the specified Targeting message. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {google.ads.admanager.v1.ITargeting} message Targeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Targeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.geoTargeting != null && Object.hasOwnProperty.call(message, "geoTargeting")) + $root.google.ads.admanager.v1.GeoTargeting.encode(message.geoTargeting, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.technologyTargeting != null && Object.hasOwnProperty.call(message, "technologyTargeting")) + $root.google.ads.admanager.v1.TechnologyTargeting.encode(message.technologyTargeting, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inventoryTargeting != null && Object.hasOwnProperty.call(message, "inventoryTargeting")) + $root.google.ads.admanager.v1.InventoryTargeting.encode(message.inventoryTargeting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.requestPlatformTargeting != null && Object.hasOwnProperty.call(message, "requestPlatformTargeting")) + $root.google.ads.admanager.v1.RequestPlatformTargeting.encode(message.requestPlatformTargeting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.customTargeting != null && Object.hasOwnProperty.call(message, "customTargeting")) + $root.google.ads.admanager.v1.CustomTargeting.encode(message.customTargeting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.userDomainTargeting != null && Object.hasOwnProperty.call(message, "userDomainTargeting")) + $root.google.ads.admanager.v1.UserDomainTargeting.encode(message.userDomainTargeting, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.videoPositionTargeting != null && Object.hasOwnProperty.call(message, "videoPositionTargeting")) + $root.google.ads.admanager.v1.VideoPositionTargeting.encode(message.videoPositionTargeting, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dataSegmentTargeting != null && Object.hasOwnProperty.call(message, "dataSegmentTargeting")) + $root.google.ads.admanager.v1.DataSegmentTargeting.encode(message.dataSegmentTargeting, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.contentTargeting != null && Object.hasOwnProperty.call(message, "contentTargeting")) + $root.google.ads.admanager.v1.ContentTargeting.encode(message.contentTargeting, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.mobileApplicationTargeting != null && Object.hasOwnProperty.call(message, "mobileApplicationTargeting")) + $root.google.ads.admanager.v1.MobileApplicationTargeting.encode(message.mobileApplicationTargeting, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Targeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Targeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {google.ads.admanager.v1.ITargeting} message Targeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Targeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Targeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Targeting} Targeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Targeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Targeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": - case 18001: - message.dimension = 18001; + switch (tag >>> 3) { + case 2: { + message.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.decode(reader, reader.uint32()); + break; + } + case 3: { + message.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.decode(reader, reader.uint32()); + break; + } + case 6: { + message.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.decode(reader, reader.uint32()); + break; + } + case 7: { + message.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.decode(reader, reader.uint32()); + break; + } + case 10: { + message.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.decode(reader, reader.uint32()); + break; + } + case 12: { + message.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.decode(reader, reader.uint32()); + break; + } + case 13: { + message.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.decode(reader, reader.uint32()); + break; + } + case 15: { + message.contentTargeting = $root.google.ads.admanager.v1.ContentTargeting.decode(reader, reader.uint32()); + break; + } + case 18: { + message.mobileApplicationTargeting = $root.google.ads.admanager.v1.MobileApplicationTargeting.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": - case 18002: - message.dimension = 18002; + } + } + return message; + }; + + /** + * Decodes a Targeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Targeting} Targeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Targeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Targeting message. + * @function verify + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Targeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.geoTargeting != null && message.hasOwnProperty("geoTargeting")) { + var error = $root.google.ads.admanager.v1.GeoTargeting.verify(message.geoTargeting); + if (error) + return "geoTargeting." + error; + } + if (message.technologyTargeting != null && message.hasOwnProperty("technologyTargeting")) { + var error = $root.google.ads.admanager.v1.TechnologyTargeting.verify(message.technologyTargeting); + if (error) + return "technologyTargeting." + error; + } + if (message.inventoryTargeting != null && message.hasOwnProperty("inventoryTargeting")) { + var error = $root.google.ads.admanager.v1.InventoryTargeting.verify(message.inventoryTargeting); + if (error) + return "inventoryTargeting." + error; + } + if (message.requestPlatformTargeting != null && message.hasOwnProperty("requestPlatformTargeting")) { + var error = $root.google.ads.admanager.v1.RequestPlatformTargeting.verify(message.requestPlatformTargeting); + if (error) + return "requestPlatformTargeting." + error; + } + if (message.customTargeting != null && message.hasOwnProperty("customTargeting")) { + var error = $root.google.ads.admanager.v1.CustomTargeting.verify(message.customTargeting); + if (error) + return "customTargeting." + error; + } + if (message.userDomainTargeting != null && message.hasOwnProperty("userDomainTargeting")) { + var error = $root.google.ads.admanager.v1.UserDomainTargeting.verify(message.userDomainTargeting); + if (error) + return "userDomainTargeting." + error; + } + if (message.videoPositionTargeting != null && message.hasOwnProperty("videoPositionTargeting")) { + var error = $root.google.ads.admanager.v1.VideoPositionTargeting.verify(message.videoPositionTargeting); + if (error) + return "videoPositionTargeting." + error; + } + if (message.dataSegmentTargeting != null && message.hasOwnProperty("dataSegmentTargeting")) { + var error = $root.google.ads.admanager.v1.DataSegmentTargeting.verify(message.dataSegmentTargeting); + if (error) + return "dataSegmentTargeting." + error; + } + if (message.contentTargeting != null && message.hasOwnProperty("contentTargeting")) { + var error = $root.google.ads.admanager.v1.ContentTargeting.verify(message.contentTargeting); + if (error) + return "contentTargeting." + error; + } + if (message.mobileApplicationTargeting != null && message.hasOwnProperty("mobileApplicationTargeting")) { + var error = $root.google.ads.admanager.v1.MobileApplicationTargeting.verify(message.mobileApplicationTargeting); + if (error) + return "mobileApplicationTargeting." + error; + } + return null; + }; + + /** + * Creates a Targeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Targeting} Targeting + */ + Targeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Targeting) + return object; + var message = new $root.google.ads.admanager.v1.Targeting(); + if (object.geoTargeting != null) { + if (typeof object.geoTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.geoTargeting: object expected"); + message.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.fromObject(object.geoTargeting); + } + if (object.technologyTargeting != null) { + if (typeof object.technologyTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.technologyTargeting: object expected"); + message.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.fromObject(object.technologyTargeting); + } + if (object.inventoryTargeting != null) { + if (typeof object.inventoryTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.inventoryTargeting: object expected"); + message.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.fromObject(object.inventoryTargeting); + } + if (object.requestPlatformTargeting != null) { + if (typeof object.requestPlatformTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.requestPlatformTargeting: object expected"); + message.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.fromObject(object.requestPlatformTargeting); + } + if (object.customTargeting != null) { + if (typeof object.customTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.customTargeting: object expected"); + message.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.fromObject(object.customTargeting); + } + if (object.userDomainTargeting != null) { + if (typeof object.userDomainTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.userDomainTargeting: object expected"); + message.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.fromObject(object.userDomainTargeting); + } + if (object.videoPositionTargeting != null) { + if (typeof object.videoPositionTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.videoPositionTargeting: object expected"); + message.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.fromObject(object.videoPositionTargeting); + } + if (object.dataSegmentTargeting != null) { + if (typeof object.dataSegmentTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.dataSegmentTargeting: object expected"); + message.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.fromObject(object.dataSegmentTargeting); + } + if (object.contentTargeting != null) { + if (typeof object.contentTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.contentTargeting: object expected"); + message.contentTargeting = $root.google.ads.admanager.v1.ContentTargeting.fromObject(object.contentTargeting); + } + if (object.mobileApplicationTargeting != null) { + if (typeof object.mobileApplicationTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.Targeting.mobileApplicationTargeting: object expected"); + message.mobileApplicationTargeting = $root.google.ads.admanager.v1.MobileApplicationTargeting.fromObject(object.mobileApplicationTargeting); + } + return message; + }; + + /** + * Creates a plain object from a Targeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {google.ads.admanager.v1.Targeting} message Targeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Targeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.geoTargeting = null; + object.technologyTargeting = null; + object.inventoryTargeting = null; + object.requestPlatformTargeting = null; + object.customTargeting = null; + object.userDomainTargeting = null; + object.videoPositionTargeting = null; + object.dataSegmentTargeting = null; + object.contentTargeting = null; + object.mobileApplicationTargeting = null; + } + if (message.geoTargeting != null && message.hasOwnProperty("geoTargeting")) + object.geoTargeting = $root.google.ads.admanager.v1.GeoTargeting.toObject(message.geoTargeting, options); + if (message.technologyTargeting != null && message.hasOwnProperty("technologyTargeting")) + object.technologyTargeting = $root.google.ads.admanager.v1.TechnologyTargeting.toObject(message.technologyTargeting, options); + if (message.inventoryTargeting != null && message.hasOwnProperty("inventoryTargeting")) + object.inventoryTargeting = $root.google.ads.admanager.v1.InventoryTargeting.toObject(message.inventoryTargeting, options); + if (message.requestPlatformTargeting != null && message.hasOwnProperty("requestPlatformTargeting")) + object.requestPlatformTargeting = $root.google.ads.admanager.v1.RequestPlatformTargeting.toObject(message.requestPlatformTargeting, options); + if (message.customTargeting != null && message.hasOwnProperty("customTargeting")) + object.customTargeting = $root.google.ads.admanager.v1.CustomTargeting.toObject(message.customTargeting, options); + if (message.userDomainTargeting != null && message.hasOwnProperty("userDomainTargeting")) + object.userDomainTargeting = $root.google.ads.admanager.v1.UserDomainTargeting.toObject(message.userDomainTargeting, options); + if (message.videoPositionTargeting != null && message.hasOwnProperty("videoPositionTargeting")) + object.videoPositionTargeting = $root.google.ads.admanager.v1.VideoPositionTargeting.toObject(message.videoPositionTargeting, options); + if (message.dataSegmentTargeting != null && message.hasOwnProperty("dataSegmentTargeting")) + object.dataSegmentTargeting = $root.google.ads.admanager.v1.DataSegmentTargeting.toObject(message.dataSegmentTargeting, options); + if (message.contentTargeting != null && message.hasOwnProperty("contentTargeting")) + object.contentTargeting = $root.google.ads.admanager.v1.ContentTargeting.toObject(message.contentTargeting, options); + if (message.mobileApplicationTargeting != null && message.hasOwnProperty("mobileApplicationTargeting")) + object.mobileApplicationTargeting = $root.google.ads.admanager.v1.MobileApplicationTargeting.toObject(message.mobileApplicationTargeting, options); + return object; + }; + + /** + * Converts this Targeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Targeting + * @instance + * @returns {Object.} JSON object + */ + Targeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Targeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Targeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Targeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Targeting"; + }; + + return Targeting; + })(); + + v1.GeoTargeting = (function() { + + /** + * Properties of a GeoTargeting. + * @memberof google.ads.admanager.v1 + * @interface IGeoTargeting + * @property {Array.|null} [targetedGeos] GeoTargeting targetedGeos + * @property {Array.|null} [excludedGeos] GeoTargeting excludedGeos + */ + + /** + * Constructs a new GeoTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GeoTargeting. + * @implements IGeoTargeting + * @constructor + * @param {google.ads.admanager.v1.IGeoTargeting=} [properties] Properties to set + */ + function GeoTargeting(properties) { + this.targetedGeos = []; + this.excludedGeos = []; + 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]]; + } + + /** + * GeoTargeting targetedGeos. + * @member {Array.} targetedGeos + * @memberof google.ads.admanager.v1.GeoTargeting + * @instance + */ + GeoTargeting.prototype.targetedGeos = $util.emptyArray; + + /** + * GeoTargeting excludedGeos. + * @member {Array.} excludedGeos + * @memberof google.ads.admanager.v1.GeoTargeting + * @instance + */ + GeoTargeting.prototype.excludedGeos = $util.emptyArray; + + /** + * Creates a new GeoTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {google.ads.admanager.v1.IGeoTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting instance + */ + GeoTargeting.create = function create(properties) { + return new GeoTargeting(properties); + }; + + /** + * Encodes the specified GeoTargeting message. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {google.ads.admanager.v1.IGeoTargeting} message GeoTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeoTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedGeos != null && message.targetedGeos.length) + for (var i = 0; i < message.targetedGeos.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedGeos[i]); + if (message.excludedGeos != null && message.excludedGeos.length) + for (var i = 0; i < message.excludedGeos.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedGeos[i]); + return writer; + }; + + /** + * Encodes the specified GeoTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GeoTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {google.ads.admanager.v1.IGeoTargeting} message GeoTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeoTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeoTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeoTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GeoTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": - case 18003: - message.dimension = 18003; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedGeos && message.targetedGeos.length)) + message.targetedGeos = []; + message.targetedGeos.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedGeos && message.excludedGeos.length)) + message.excludedGeos = []; + message.excludedGeos.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": - case 18004: - message.dimension = 18004; + } + } + return message; + }; + + /** + * Decodes a GeoTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeoTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeoTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeoTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedGeos != null && message.hasOwnProperty("targetedGeos")) { + if (!Array.isArray(message.targetedGeos)) + return "targetedGeos: array expected"; + for (var i = 0; i < message.targetedGeos.length; ++i) + if (!$util.isString(message.targetedGeos[i])) + return "targetedGeos: string[] expected"; + } + if (message.excludedGeos != null && message.hasOwnProperty("excludedGeos")) { + if (!Array.isArray(message.excludedGeos)) + return "excludedGeos: array expected"; + for (var i = 0; i < message.excludedGeos.length; ++i) + if (!$util.isString(message.excludedGeos[i])) + return "excludedGeos: string[] expected"; + } + return null; + }; + + /** + * Creates a GeoTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GeoTargeting} GeoTargeting + */ + GeoTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GeoTargeting) + return object; + var message = new $root.google.ads.admanager.v1.GeoTargeting(); + if (object.targetedGeos) { + if (!Array.isArray(object.targetedGeos)) + throw TypeError(".google.ads.admanager.v1.GeoTargeting.targetedGeos: array expected"); + message.targetedGeos = []; + for (var i = 0; i < object.targetedGeos.length; ++i) + message.targetedGeos[i] = String(object.targetedGeos[i]); + } + if (object.excludedGeos) { + if (!Array.isArray(object.excludedGeos)) + throw TypeError(".google.ads.admanager.v1.GeoTargeting.excludedGeos: array expected"); + message.excludedGeos = []; + for (var i = 0; i < object.excludedGeos.length; ++i) + message.excludedGeos[i] = String(object.excludedGeos[i]); + } + return message; + }; + + /** + * Creates a plain object from a GeoTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {google.ads.admanager.v1.GeoTargeting} message GeoTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeoTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedGeos = []; + object.excludedGeos = []; + } + if (message.targetedGeos && message.targetedGeos.length) { + object.targetedGeos = []; + for (var j = 0; j < message.targetedGeos.length; ++j) + object.targetedGeos[j] = message.targetedGeos[j]; + } + if (message.excludedGeos && message.excludedGeos.length) { + object.excludedGeos = []; + for (var j = 0; j < message.excludedGeos.length; ++j) + object.excludedGeos[j] = message.excludedGeos[j]; + } + return object; + }; + + /** + * Converts this GeoTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GeoTargeting + * @instance + * @returns {Object.} JSON object + */ + GeoTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeoTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GeoTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeoTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GeoTargeting"; + }; + + return GeoTargeting; + })(); + + v1.TechnologyTargeting = (function() { + + /** + * Properties of a TechnologyTargeting. + * @memberof google.ads.admanager.v1 + * @interface ITechnologyTargeting + * @property {google.ads.admanager.v1.IBandwidthTargeting|null} [bandwidthTargeting] TechnologyTargeting bandwidthTargeting + * @property {google.ads.admanager.v1.IBrowserTargeting|null} [browserTargeting] TechnologyTargeting browserTargeting + * @property {google.ads.admanager.v1.IBrowserLanguageTargeting|null} [browserLanguageTargeting] TechnologyTargeting browserLanguageTargeting + * @property {google.ads.admanager.v1.IDeviceCapabilityTargeting|null} [deviceCapabilityTargeting] TechnologyTargeting deviceCapabilityTargeting + * @property {google.ads.admanager.v1.IDeviceCategoryTargeting|null} [deviceCategoryTargeting] TechnologyTargeting deviceCategoryTargeting + * @property {google.ads.admanager.v1.IDeviceManufacturerTargeting|null} [deviceManufacturerTargeting] TechnologyTargeting deviceManufacturerTargeting + * @property {google.ads.admanager.v1.IMobileCarrierTargeting|null} [mobileCarrierTargeting] TechnologyTargeting mobileCarrierTargeting + * @property {google.ads.admanager.v1.IOperatingSystemTargeting|null} [operatingSystemTargeting] TechnologyTargeting operatingSystemTargeting + */ + + /** + * Constructs a new TechnologyTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a TechnologyTargeting. + * @implements ITechnologyTargeting + * @constructor + * @param {google.ads.admanager.v1.ITechnologyTargeting=} [properties] Properties to set + */ + function TechnologyTargeting(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]]; + } + + /** + * TechnologyTargeting bandwidthTargeting. + * @member {google.ads.admanager.v1.IBandwidthTargeting|null|undefined} bandwidthTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.bandwidthTargeting = null; + + /** + * TechnologyTargeting browserTargeting. + * @member {google.ads.admanager.v1.IBrowserTargeting|null|undefined} browserTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.browserTargeting = null; + + /** + * TechnologyTargeting browserLanguageTargeting. + * @member {google.ads.admanager.v1.IBrowserLanguageTargeting|null|undefined} browserLanguageTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.browserLanguageTargeting = null; + + /** + * TechnologyTargeting deviceCapabilityTargeting. + * @member {google.ads.admanager.v1.IDeviceCapabilityTargeting|null|undefined} deviceCapabilityTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.deviceCapabilityTargeting = null; + + /** + * TechnologyTargeting deviceCategoryTargeting. + * @member {google.ads.admanager.v1.IDeviceCategoryTargeting|null|undefined} deviceCategoryTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.deviceCategoryTargeting = null; + + /** + * TechnologyTargeting deviceManufacturerTargeting. + * @member {google.ads.admanager.v1.IDeviceManufacturerTargeting|null|undefined} deviceManufacturerTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.deviceManufacturerTargeting = null; + + /** + * TechnologyTargeting mobileCarrierTargeting. + * @member {google.ads.admanager.v1.IMobileCarrierTargeting|null|undefined} mobileCarrierTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.mobileCarrierTargeting = null; + + /** + * TechnologyTargeting operatingSystemTargeting. + * @member {google.ads.admanager.v1.IOperatingSystemTargeting|null|undefined} operatingSystemTargeting + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + */ + TechnologyTargeting.prototype.operatingSystemTargeting = null; + + /** + * Creates a new TechnologyTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {google.ads.admanager.v1.ITechnologyTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting instance + */ + TechnologyTargeting.create = function create(properties) { + return new TechnologyTargeting(properties); + }; + + /** + * Encodes the specified TechnologyTargeting message. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {google.ads.admanager.v1.ITechnologyTargeting} message TechnologyTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TechnologyTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deviceCategoryTargeting != null && Object.hasOwnProperty.call(message, "deviceCategoryTargeting")) + $root.google.ads.admanager.v1.DeviceCategoryTargeting.encode(message.deviceCategoryTargeting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operatingSystemTargeting != null && Object.hasOwnProperty.call(message, "operatingSystemTargeting")) + $root.google.ads.admanager.v1.OperatingSystemTargeting.encode(message.operatingSystemTargeting, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bandwidthTargeting != null && Object.hasOwnProperty.call(message, "bandwidthTargeting")) + $root.google.ads.admanager.v1.BandwidthTargeting.encode(message.bandwidthTargeting, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.browserTargeting != null && Object.hasOwnProperty.call(message, "browserTargeting")) + $root.google.ads.admanager.v1.BrowserTargeting.encode(message.browserTargeting, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.browserLanguageTargeting != null && Object.hasOwnProperty.call(message, "browserLanguageTargeting")) + $root.google.ads.admanager.v1.BrowserLanguageTargeting.encode(message.browserLanguageTargeting, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deviceCapabilityTargeting != null && Object.hasOwnProperty.call(message, "deviceCapabilityTargeting")) + $root.google.ads.admanager.v1.DeviceCapabilityTargeting.encode(message.deviceCapabilityTargeting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deviceManufacturerTargeting != null && Object.hasOwnProperty.call(message, "deviceManufacturerTargeting")) + $root.google.ads.admanager.v1.DeviceManufacturerTargeting.encode(message.deviceManufacturerTargeting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.mobileCarrierTargeting != null && Object.hasOwnProperty.call(message, "mobileCarrierTargeting")) + $root.google.ads.admanager.v1.MobileCarrierTargeting.encode(message.mobileCarrierTargeting, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TechnologyTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TechnologyTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {google.ads.admanager.v1.ITechnologyTargeting} message TechnologyTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TechnologyTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TechnologyTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TechnologyTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TechnologyTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": - case 18005: - message.dimension = 18005; + switch (tag >>> 3) { + case 3: { + message.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.decode(reader, reader.uint32()); + break; + } + case 4: { + message.browserTargeting = $root.google.ads.admanager.v1.BrowserTargeting.decode(reader, reader.uint32()); + break; + } + case 5: { + message.browserLanguageTargeting = $root.google.ads.admanager.v1.BrowserLanguageTargeting.decode(reader, reader.uint32()); + break; + } + case 6: { + message.deviceCapabilityTargeting = $root.google.ads.admanager.v1.DeviceCapabilityTargeting.decode(reader, reader.uint32()); + break; + } + case 1: { + message.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.decode(reader, reader.uint32()); + break; + } + case 7: { + message.deviceManufacturerTargeting = $root.google.ads.admanager.v1.DeviceManufacturerTargeting.decode(reader, reader.uint32()); + break; + } + case 8: { + message.mobileCarrierTargeting = $root.google.ads.admanager.v1.MobileCarrierTargeting.decode(reader, reader.uint32()); + break; + } + case 2: { + message.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": - case 18006: - message.dimension = 18006; + } + } + return message; + }; + + /** + * Decodes a TechnologyTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TechnologyTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TechnologyTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TechnologyTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bandwidthTargeting != null && message.hasOwnProperty("bandwidthTargeting")) { + var error = $root.google.ads.admanager.v1.BandwidthTargeting.verify(message.bandwidthTargeting); + if (error) + return "bandwidthTargeting." + error; + } + if (message.browserTargeting != null && message.hasOwnProperty("browserTargeting")) { + var error = $root.google.ads.admanager.v1.BrowserTargeting.verify(message.browserTargeting); + if (error) + return "browserTargeting." + error; + } + if (message.browserLanguageTargeting != null && message.hasOwnProperty("browserLanguageTargeting")) { + var error = $root.google.ads.admanager.v1.BrowserLanguageTargeting.verify(message.browserLanguageTargeting); + if (error) + return "browserLanguageTargeting." + error; + } + if (message.deviceCapabilityTargeting != null && message.hasOwnProperty("deviceCapabilityTargeting")) { + var error = $root.google.ads.admanager.v1.DeviceCapabilityTargeting.verify(message.deviceCapabilityTargeting); + if (error) + return "deviceCapabilityTargeting." + error; + } + if (message.deviceCategoryTargeting != null && message.hasOwnProperty("deviceCategoryTargeting")) { + var error = $root.google.ads.admanager.v1.DeviceCategoryTargeting.verify(message.deviceCategoryTargeting); + if (error) + return "deviceCategoryTargeting." + error; + } + if (message.deviceManufacturerTargeting != null && message.hasOwnProperty("deviceManufacturerTargeting")) { + var error = $root.google.ads.admanager.v1.DeviceManufacturerTargeting.verify(message.deviceManufacturerTargeting); + if (error) + return "deviceManufacturerTargeting." + error; + } + if (message.mobileCarrierTargeting != null && message.hasOwnProperty("mobileCarrierTargeting")) { + var error = $root.google.ads.admanager.v1.MobileCarrierTargeting.verify(message.mobileCarrierTargeting); + if (error) + return "mobileCarrierTargeting." + error; + } + if (message.operatingSystemTargeting != null && message.hasOwnProperty("operatingSystemTargeting")) { + var error = $root.google.ads.admanager.v1.OperatingSystemTargeting.verify(message.operatingSystemTargeting); + if (error) + return "operatingSystemTargeting." + error; + } + return null; + }; + + /** + * Creates a TechnologyTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.TechnologyTargeting} TechnologyTargeting + */ + TechnologyTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TechnologyTargeting) + return object; + var message = new $root.google.ads.admanager.v1.TechnologyTargeting(); + if (object.bandwidthTargeting != null) { + if (typeof object.bandwidthTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.bandwidthTargeting: object expected"); + message.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.fromObject(object.bandwidthTargeting); + } + if (object.browserTargeting != null) { + if (typeof object.browserTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.browserTargeting: object expected"); + message.browserTargeting = $root.google.ads.admanager.v1.BrowserTargeting.fromObject(object.browserTargeting); + } + if (object.browserLanguageTargeting != null) { + if (typeof object.browserLanguageTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.browserLanguageTargeting: object expected"); + message.browserLanguageTargeting = $root.google.ads.admanager.v1.BrowserLanguageTargeting.fromObject(object.browserLanguageTargeting); + } + if (object.deviceCapabilityTargeting != null) { + if (typeof object.deviceCapabilityTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.deviceCapabilityTargeting: object expected"); + message.deviceCapabilityTargeting = $root.google.ads.admanager.v1.DeviceCapabilityTargeting.fromObject(object.deviceCapabilityTargeting); + } + if (object.deviceCategoryTargeting != null) { + if (typeof object.deviceCategoryTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.deviceCategoryTargeting: object expected"); + message.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.fromObject(object.deviceCategoryTargeting); + } + if (object.deviceManufacturerTargeting != null) { + if (typeof object.deviceManufacturerTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.deviceManufacturerTargeting: object expected"); + message.deviceManufacturerTargeting = $root.google.ads.admanager.v1.DeviceManufacturerTargeting.fromObject(object.deviceManufacturerTargeting); + } + if (object.mobileCarrierTargeting != null) { + if (typeof object.mobileCarrierTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.mobileCarrierTargeting: object expected"); + message.mobileCarrierTargeting = $root.google.ads.admanager.v1.MobileCarrierTargeting.fromObject(object.mobileCarrierTargeting); + } + if (object.operatingSystemTargeting != null) { + if (typeof object.operatingSystemTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.TechnologyTargeting.operatingSystemTargeting: object expected"); + message.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.fromObject(object.operatingSystemTargeting); + } + return message; + }; + + /** + * Creates a plain object from a TechnologyTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {google.ads.admanager.v1.TechnologyTargeting} message TechnologyTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TechnologyTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deviceCategoryTargeting = null; + object.operatingSystemTargeting = null; + object.bandwidthTargeting = null; + object.browserTargeting = null; + object.browserLanguageTargeting = null; + object.deviceCapabilityTargeting = null; + object.deviceManufacturerTargeting = null; + object.mobileCarrierTargeting = null; + } + if (message.deviceCategoryTargeting != null && message.hasOwnProperty("deviceCategoryTargeting")) + object.deviceCategoryTargeting = $root.google.ads.admanager.v1.DeviceCategoryTargeting.toObject(message.deviceCategoryTargeting, options); + if (message.operatingSystemTargeting != null && message.hasOwnProperty("operatingSystemTargeting")) + object.operatingSystemTargeting = $root.google.ads.admanager.v1.OperatingSystemTargeting.toObject(message.operatingSystemTargeting, options); + if (message.bandwidthTargeting != null && message.hasOwnProperty("bandwidthTargeting")) + object.bandwidthTargeting = $root.google.ads.admanager.v1.BandwidthTargeting.toObject(message.bandwidthTargeting, options); + if (message.browserTargeting != null && message.hasOwnProperty("browserTargeting")) + object.browserTargeting = $root.google.ads.admanager.v1.BrowserTargeting.toObject(message.browserTargeting, options); + if (message.browserLanguageTargeting != null && message.hasOwnProperty("browserLanguageTargeting")) + object.browserLanguageTargeting = $root.google.ads.admanager.v1.BrowserLanguageTargeting.toObject(message.browserLanguageTargeting, options); + if (message.deviceCapabilityTargeting != null && message.hasOwnProperty("deviceCapabilityTargeting")) + object.deviceCapabilityTargeting = $root.google.ads.admanager.v1.DeviceCapabilityTargeting.toObject(message.deviceCapabilityTargeting, options); + if (message.deviceManufacturerTargeting != null && message.hasOwnProperty("deviceManufacturerTargeting")) + object.deviceManufacturerTargeting = $root.google.ads.admanager.v1.DeviceManufacturerTargeting.toObject(message.deviceManufacturerTargeting, options); + if (message.mobileCarrierTargeting != null && message.hasOwnProperty("mobileCarrierTargeting")) + object.mobileCarrierTargeting = $root.google.ads.admanager.v1.MobileCarrierTargeting.toObject(message.mobileCarrierTargeting, options); + return object; + }; + + /** + * Converts this TechnologyTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @instance + * @returns {Object.} JSON object + */ + TechnologyTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TechnologyTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.TechnologyTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TechnologyTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.TechnologyTargeting"; + }; + + return TechnologyTargeting; + })(); + + v1.BandwidthTargeting = (function() { + + /** + * Properties of a BandwidthTargeting. + * @memberof google.ads.admanager.v1 + * @interface IBandwidthTargeting + * @property {Array.|null} [targetedBandwidthGroups] BandwidthTargeting targetedBandwidthGroups + * @property {Array.|null} [excludedBandwidthGroups] BandwidthTargeting excludedBandwidthGroups + */ + + /** + * Constructs a new BandwidthTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BandwidthTargeting. + * @implements IBandwidthTargeting + * @constructor + * @param {google.ads.admanager.v1.IBandwidthTargeting=} [properties] Properties to set + */ + function BandwidthTargeting(properties) { + this.targetedBandwidthGroups = []; + this.excludedBandwidthGroups = []; + 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]]; + } + + /** + * BandwidthTargeting targetedBandwidthGroups. + * @member {Array.} targetedBandwidthGroups + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @instance + */ + BandwidthTargeting.prototype.targetedBandwidthGroups = $util.emptyArray; + + /** + * BandwidthTargeting excludedBandwidthGroups. + * @member {Array.} excludedBandwidthGroups + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @instance + */ + BandwidthTargeting.prototype.excludedBandwidthGroups = $util.emptyArray; + + /** + * Creates a new BandwidthTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {google.ads.admanager.v1.IBandwidthTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting instance + */ + BandwidthTargeting.create = function create(properties) { + return new BandwidthTargeting(properties); + }; + + /** + * Encodes the specified BandwidthTargeting message. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {google.ads.admanager.v1.IBandwidthTargeting} message BandwidthTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BandwidthTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedBandwidthGroups != null && message.targetedBandwidthGroups.length) + for (var i = 0; i < message.targetedBandwidthGroups.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedBandwidthGroups[i]); + if (message.excludedBandwidthGroups != null && message.excludedBandwidthGroups.length) + for (var i = 0; i < message.excludedBandwidthGroups.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedBandwidthGroups[i]); + return writer; + }; + + /** + * Encodes the specified BandwidthTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BandwidthTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {google.ads.admanager.v1.IBandwidthTargeting} message BandwidthTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BandwidthTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BandwidthTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BandwidthTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BandwidthTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": - case 18007: - message.dimension = 18007; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedBandwidthGroups && message.targetedBandwidthGroups.length)) + message.targetedBandwidthGroups = []; + message.targetedBandwidthGroups.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedBandwidthGroups && message.excludedBandwidthGroups.length)) + message.excludedBandwidthGroups = []; + message.excludedBandwidthGroups.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": - case 18008: - message.dimension = 18008; + } + } + return message; + }; + + /** + * Decodes a BandwidthTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BandwidthTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BandwidthTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BandwidthTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedBandwidthGroups != null && message.hasOwnProperty("targetedBandwidthGroups")) { + if (!Array.isArray(message.targetedBandwidthGroups)) + return "targetedBandwidthGroups: array expected"; + for (var i = 0; i < message.targetedBandwidthGroups.length; ++i) + if (!$util.isString(message.targetedBandwidthGroups[i])) + return "targetedBandwidthGroups: string[] expected"; + } + if (message.excludedBandwidthGroups != null && message.hasOwnProperty("excludedBandwidthGroups")) { + if (!Array.isArray(message.excludedBandwidthGroups)) + return "excludedBandwidthGroups: array expected"; + for (var i = 0; i < message.excludedBandwidthGroups.length; ++i) + if (!$util.isString(message.excludedBandwidthGroups[i])) + return "excludedBandwidthGroups: string[] expected"; + } + return null; + }; + + /** + * Creates a BandwidthTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BandwidthTargeting} BandwidthTargeting + */ + BandwidthTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BandwidthTargeting) + return object; + var message = new $root.google.ads.admanager.v1.BandwidthTargeting(); + if (object.targetedBandwidthGroups) { + if (!Array.isArray(object.targetedBandwidthGroups)) + throw TypeError(".google.ads.admanager.v1.BandwidthTargeting.targetedBandwidthGroups: array expected"); + message.targetedBandwidthGroups = []; + for (var i = 0; i < object.targetedBandwidthGroups.length; ++i) + message.targetedBandwidthGroups[i] = String(object.targetedBandwidthGroups[i]); + } + if (object.excludedBandwidthGroups) { + if (!Array.isArray(object.excludedBandwidthGroups)) + throw TypeError(".google.ads.admanager.v1.BandwidthTargeting.excludedBandwidthGroups: array expected"); + message.excludedBandwidthGroups = []; + for (var i = 0; i < object.excludedBandwidthGroups.length; ++i) + message.excludedBandwidthGroups[i] = String(object.excludedBandwidthGroups[i]); + } + return message; + }; + + /** + * Creates a plain object from a BandwidthTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {google.ads.admanager.v1.BandwidthTargeting} message BandwidthTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BandwidthTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedBandwidthGroups = []; + object.excludedBandwidthGroups = []; + } + if (message.targetedBandwidthGroups && message.targetedBandwidthGroups.length) { + object.targetedBandwidthGroups = []; + for (var j = 0; j < message.targetedBandwidthGroups.length; ++j) + object.targetedBandwidthGroups[j] = message.targetedBandwidthGroups[j]; + } + if (message.excludedBandwidthGroups && message.excludedBandwidthGroups.length) { + object.excludedBandwidthGroups = []; + for (var j = 0; j < message.excludedBandwidthGroups.length; ++j) + object.excludedBandwidthGroups[j] = message.excludedBandwidthGroups[j]; + } + return object; + }; + + /** + * Converts this BandwidthTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @instance + * @returns {Object.} JSON object + */ + BandwidthTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BandwidthTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BandwidthTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BandwidthTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BandwidthTargeting"; + }; + + return BandwidthTargeting; + })(); + + v1.BrowserTargeting = (function() { + + /** + * Properties of a BrowserTargeting. + * @memberof google.ads.admanager.v1 + * @interface IBrowserTargeting + * @property {Array.|null} [targetedBrowsers] BrowserTargeting targetedBrowsers + * @property {Array.|null} [excludedBrowsers] BrowserTargeting excludedBrowsers + */ + + /** + * Constructs a new BrowserTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BrowserTargeting. + * @implements IBrowserTargeting + * @constructor + * @param {google.ads.admanager.v1.IBrowserTargeting=} [properties] Properties to set + */ + function BrowserTargeting(properties) { + this.targetedBrowsers = []; + this.excludedBrowsers = []; + 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]]; + } + + /** + * BrowserTargeting targetedBrowsers. + * @member {Array.} targetedBrowsers + * @memberof google.ads.admanager.v1.BrowserTargeting + * @instance + */ + BrowserTargeting.prototype.targetedBrowsers = $util.emptyArray; + + /** + * BrowserTargeting excludedBrowsers. + * @member {Array.} excludedBrowsers + * @memberof google.ads.admanager.v1.BrowserTargeting + * @instance + */ + BrowserTargeting.prototype.excludedBrowsers = $util.emptyArray; + + /** + * Creates a new BrowserTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BrowserTargeting} BrowserTargeting instance + */ + BrowserTargeting.create = function create(properties) { + return new BrowserTargeting(properties); + }; + + /** + * Encodes the specified BrowserTargeting message. Does not implicitly {@link google.ads.admanager.v1.BrowserTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserTargeting} message BrowserTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BrowserTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedBrowsers != null && message.targetedBrowsers.length) + for (var i = 0; i < message.targetedBrowsers.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedBrowsers[i]); + if (message.excludedBrowsers != null && message.excludedBrowsers.length) + for (var i = 0; i < message.excludedBrowsers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedBrowsers[i]); + return writer; + }; + + /** + * Encodes the specified BrowserTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserTargeting} message BrowserTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BrowserTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BrowserTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BrowserTargeting} BrowserTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BrowserTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BrowserTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": - case 18009: - message.dimension = 18009; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedBrowsers && message.targetedBrowsers.length)) + message.targetedBrowsers = []; + message.targetedBrowsers.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedBrowsers && message.excludedBrowsers.length)) + message.excludedBrowsers = []; + message.excludedBrowsers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": - case 18010: - message.dimension = 18010; + } + } + return message; + }; + + /** + * Decodes a BrowserTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BrowserTargeting} BrowserTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BrowserTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BrowserTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BrowserTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedBrowsers != null && message.hasOwnProperty("targetedBrowsers")) { + if (!Array.isArray(message.targetedBrowsers)) + return "targetedBrowsers: array expected"; + for (var i = 0; i < message.targetedBrowsers.length; ++i) + if (!$util.isString(message.targetedBrowsers[i])) + return "targetedBrowsers: string[] expected"; + } + if (message.excludedBrowsers != null && message.hasOwnProperty("excludedBrowsers")) { + if (!Array.isArray(message.excludedBrowsers)) + return "excludedBrowsers: array expected"; + for (var i = 0; i < message.excludedBrowsers.length; ++i) + if (!$util.isString(message.excludedBrowsers[i])) + return "excludedBrowsers: string[] expected"; + } + return null; + }; + + /** + * Creates a BrowserTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BrowserTargeting} BrowserTargeting + */ + BrowserTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BrowserTargeting) + return object; + var message = new $root.google.ads.admanager.v1.BrowserTargeting(); + if (object.targetedBrowsers) { + if (!Array.isArray(object.targetedBrowsers)) + throw TypeError(".google.ads.admanager.v1.BrowserTargeting.targetedBrowsers: array expected"); + message.targetedBrowsers = []; + for (var i = 0; i < object.targetedBrowsers.length; ++i) + message.targetedBrowsers[i] = String(object.targetedBrowsers[i]); + } + if (object.excludedBrowsers) { + if (!Array.isArray(object.excludedBrowsers)) + throw TypeError(".google.ads.admanager.v1.BrowserTargeting.excludedBrowsers: array expected"); + message.excludedBrowsers = []; + for (var i = 0; i < object.excludedBrowsers.length; ++i) + message.excludedBrowsers[i] = String(object.excludedBrowsers[i]); + } + return message; + }; + + /** + * Creates a plain object from a BrowserTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {google.ads.admanager.v1.BrowserTargeting} message BrowserTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BrowserTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedBrowsers = []; + object.excludedBrowsers = []; + } + if (message.targetedBrowsers && message.targetedBrowsers.length) { + object.targetedBrowsers = []; + for (var j = 0; j < message.targetedBrowsers.length; ++j) + object.targetedBrowsers[j] = message.targetedBrowsers[j]; + } + if (message.excludedBrowsers && message.excludedBrowsers.length) { + object.excludedBrowsers = []; + for (var j = 0; j < message.excludedBrowsers.length; ++j) + object.excludedBrowsers[j] = message.excludedBrowsers[j]; + } + return object; + }; + + /** + * Converts this BrowserTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BrowserTargeting + * @instance + * @returns {Object.} JSON object + */ + BrowserTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BrowserTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BrowserTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BrowserTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BrowserTargeting"; + }; + + return BrowserTargeting; + })(); + + v1.BrowserLanguageTargeting = (function() { + + /** + * Properties of a BrowserLanguageTargeting. + * @memberof google.ads.admanager.v1 + * @interface IBrowserLanguageTargeting + * @property {Array.|null} [targetedBrowserLanguages] BrowserLanguageTargeting targetedBrowserLanguages + * @property {Array.|null} [excludedBrowserLanguages] BrowserLanguageTargeting excludedBrowserLanguages + */ + + /** + * Constructs a new BrowserLanguageTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BrowserLanguageTargeting. + * @implements IBrowserLanguageTargeting + * @constructor + * @param {google.ads.admanager.v1.IBrowserLanguageTargeting=} [properties] Properties to set + */ + function BrowserLanguageTargeting(properties) { + this.targetedBrowserLanguages = []; + this.excludedBrowserLanguages = []; + 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]]; + } + + /** + * BrowserLanguageTargeting targetedBrowserLanguages. + * @member {Array.} targetedBrowserLanguages + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @instance + */ + BrowserLanguageTargeting.prototype.targetedBrowserLanguages = $util.emptyArray; + + /** + * BrowserLanguageTargeting excludedBrowserLanguages. + * @member {Array.} excludedBrowserLanguages + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @instance + */ + BrowserLanguageTargeting.prototype.excludedBrowserLanguages = $util.emptyArray; + + /** + * Creates a new BrowserLanguageTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserLanguageTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BrowserLanguageTargeting} BrowserLanguageTargeting instance + */ + BrowserLanguageTargeting.create = function create(properties) { + return new BrowserLanguageTargeting(properties); + }; + + /** + * Encodes the specified BrowserLanguageTargeting message. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguageTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserLanguageTargeting} message BrowserLanguageTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BrowserLanguageTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedBrowserLanguages != null && message.targetedBrowserLanguages.length) + for (var i = 0; i < message.targetedBrowserLanguages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedBrowserLanguages[i]); + if (message.excludedBrowserLanguages != null && message.excludedBrowserLanguages.length) + for (var i = 0; i < message.excludedBrowserLanguages.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedBrowserLanguages[i]); + return writer; + }; + + /** + * Encodes the specified BrowserLanguageTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BrowserLanguageTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {google.ads.admanager.v1.IBrowserLanguageTargeting} message BrowserLanguageTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BrowserLanguageTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BrowserLanguageTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BrowserLanguageTargeting} BrowserLanguageTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BrowserLanguageTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BrowserLanguageTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": - case 18011: - message.dimension = 18011; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedBrowserLanguages && message.targetedBrowserLanguages.length)) + message.targetedBrowserLanguages = []; + message.targetedBrowserLanguages.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedBrowserLanguages && message.excludedBrowserLanguages.length)) + message.excludedBrowserLanguages = []; + message.excludedBrowserLanguages.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": - case 18012: - message.dimension = 18012; + } + } + return message; + }; + + /** + * Decodes a BrowserLanguageTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BrowserLanguageTargeting} BrowserLanguageTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BrowserLanguageTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BrowserLanguageTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BrowserLanguageTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedBrowserLanguages != null && message.hasOwnProperty("targetedBrowserLanguages")) { + if (!Array.isArray(message.targetedBrowserLanguages)) + return "targetedBrowserLanguages: array expected"; + for (var i = 0; i < message.targetedBrowserLanguages.length; ++i) + if (!$util.isString(message.targetedBrowserLanguages[i])) + return "targetedBrowserLanguages: string[] expected"; + } + if (message.excludedBrowserLanguages != null && message.hasOwnProperty("excludedBrowserLanguages")) { + if (!Array.isArray(message.excludedBrowserLanguages)) + return "excludedBrowserLanguages: array expected"; + for (var i = 0; i < message.excludedBrowserLanguages.length; ++i) + if (!$util.isString(message.excludedBrowserLanguages[i])) + return "excludedBrowserLanguages: string[] expected"; + } + return null; + }; + + /** + * Creates a BrowserLanguageTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BrowserLanguageTargeting} BrowserLanguageTargeting + */ + BrowserLanguageTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BrowserLanguageTargeting) + return object; + var message = new $root.google.ads.admanager.v1.BrowserLanguageTargeting(); + if (object.targetedBrowserLanguages) { + if (!Array.isArray(object.targetedBrowserLanguages)) + throw TypeError(".google.ads.admanager.v1.BrowserLanguageTargeting.targetedBrowserLanguages: array expected"); + message.targetedBrowserLanguages = []; + for (var i = 0; i < object.targetedBrowserLanguages.length; ++i) + message.targetedBrowserLanguages[i] = String(object.targetedBrowserLanguages[i]); + } + if (object.excludedBrowserLanguages) { + if (!Array.isArray(object.excludedBrowserLanguages)) + throw TypeError(".google.ads.admanager.v1.BrowserLanguageTargeting.excludedBrowserLanguages: array expected"); + message.excludedBrowserLanguages = []; + for (var i = 0; i < object.excludedBrowserLanguages.length; ++i) + message.excludedBrowserLanguages[i] = String(object.excludedBrowserLanguages[i]); + } + return message; + }; + + /** + * Creates a plain object from a BrowserLanguageTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {google.ads.admanager.v1.BrowserLanguageTargeting} message BrowserLanguageTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BrowserLanguageTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedBrowserLanguages = []; + object.excludedBrowserLanguages = []; + } + if (message.targetedBrowserLanguages && message.targetedBrowserLanguages.length) { + object.targetedBrowserLanguages = []; + for (var j = 0; j < message.targetedBrowserLanguages.length; ++j) + object.targetedBrowserLanguages[j] = message.targetedBrowserLanguages[j]; + } + if (message.excludedBrowserLanguages && message.excludedBrowserLanguages.length) { + object.excludedBrowserLanguages = []; + for (var j = 0; j < message.excludedBrowserLanguages.length; ++j) + object.excludedBrowserLanguages[j] = message.excludedBrowserLanguages[j]; + } + return object; + }; + + /** + * Converts this BrowserLanguageTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @instance + * @returns {Object.} JSON object + */ + BrowserLanguageTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BrowserLanguageTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BrowserLanguageTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BrowserLanguageTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BrowserLanguageTargeting"; + }; + + return BrowserLanguageTargeting; + })(); + + v1.DeviceCategoryTargeting = (function() { + + /** + * Properties of a DeviceCategoryTargeting. + * @memberof google.ads.admanager.v1 + * @interface IDeviceCategoryTargeting + * @property {Array.|null} [targetedCategories] DeviceCategoryTargeting targetedCategories + * @property {Array.|null} [excludedCategories] DeviceCategoryTargeting excludedCategories + */ + + /** + * Constructs a new DeviceCategoryTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceCategoryTargeting. + * @implements IDeviceCategoryTargeting + * @constructor + * @param {google.ads.admanager.v1.IDeviceCategoryTargeting=} [properties] Properties to set + */ + function DeviceCategoryTargeting(properties) { + this.targetedCategories = []; + this.excludedCategories = []; + 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]]; + } + + /** + * DeviceCategoryTargeting targetedCategories. + * @member {Array.} targetedCategories + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @instance + */ + DeviceCategoryTargeting.prototype.targetedCategories = $util.emptyArray; + + /** + * DeviceCategoryTargeting excludedCategories. + * @member {Array.} excludedCategories + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @instance + */ + DeviceCategoryTargeting.prototype.excludedCategories = $util.emptyArray; + + /** + * Creates a new DeviceCategoryTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCategoryTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting instance + */ + DeviceCategoryTargeting.create = function create(properties) { + return new DeviceCategoryTargeting(properties); + }; + + /** + * Encodes the specified DeviceCategoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCategoryTargeting} message DeviceCategoryTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCategoryTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedCategories != null && message.targetedCategories.length) + for (var i = 0; i < message.targetedCategories.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedCategories[i]); + if (message.excludedCategories != null && message.excludedCategories.length) + for (var i = 0; i < message.excludedCategories.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedCategories[i]); + return writer; + }; + + /** + * Encodes the specified DeviceCategoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCategoryTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCategoryTargeting} message DeviceCategoryTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCategoryTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceCategoryTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCategoryTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCategoryTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": - case 18013: - message.dimension = 18013; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedCategories && message.targetedCategories.length)) + message.targetedCategories = []; + message.targetedCategories.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedCategories && message.excludedCategories.length)) + message.excludedCategories = []; + message.excludedCategories.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": - case 18014: - message.dimension = 18014; + } + } + return message; + }; + + /** + * Decodes a DeviceCategoryTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCategoryTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceCategoryTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceCategoryTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedCategories != null && message.hasOwnProperty("targetedCategories")) { + if (!Array.isArray(message.targetedCategories)) + return "targetedCategories: array expected"; + for (var i = 0; i < message.targetedCategories.length; ++i) + if (!$util.isString(message.targetedCategories[i])) + return "targetedCategories: string[] expected"; + } + if (message.excludedCategories != null && message.hasOwnProperty("excludedCategories")) { + if (!Array.isArray(message.excludedCategories)) + return "excludedCategories: array expected"; + for (var i = 0; i < message.excludedCategories.length; ++i) + if (!$util.isString(message.excludedCategories[i])) + return "excludedCategories: string[] expected"; + } + return null; + }; + + /** + * Creates a DeviceCategoryTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DeviceCategoryTargeting} DeviceCategoryTargeting + */ + DeviceCategoryTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceCategoryTargeting) + return object; + var message = new $root.google.ads.admanager.v1.DeviceCategoryTargeting(); + if (object.targetedCategories) { + if (!Array.isArray(object.targetedCategories)) + throw TypeError(".google.ads.admanager.v1.DeviceCategoryTargeting.targetedCategories: array expected"); + message.targetedCategories = []; + for (var i = 0; i < object.targetedCategories.length; ++i) + message.targetedCategories[i] = String(object.targetedCategories[i]); + } + if (object.excludedCategories) { + if (!Array.isArray(object.excludedCategories)) + throw TypeError(".google.ads.admanager.v1.DeviceCategoryTargeting.excludedCategories: array expected"); + message.excludedCategories = []; + for (var i = 0; i < object.excludedCategories.length; ++i) + message.excludedCategories[i] = String(object.excludedCategories[i]); + } + return message; + }; + + /** + * Creates a plain object from a DeviceCategoryTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {google.ads.admanager.v1.DeviceCategoryTargeting} message DeviceCategoryTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceCategoryTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedCategories = []; + object.excludedCategories = []; + } + if (message.targetedCategories && message.targetedCategories.length) { + object.targetedCategories = []; + for (var j = 0; j < message.targetedCategories.length; ++j) + object.targetedCategories[j] = message.targetedCategories[j]; + } + if (message.excludedCategories && message.excludedCategories.length) { + object.excludedCategories = []; + for (var j = 0; j < message.excludedCategories.length; ++j) + object.excludedCategories[j] = message.excludedCategories[j]; + } + return object; + }; + + /** + * Converts this DeviceCategoryTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @instance + * @returns {Object.} JSON object + */ + DeviceCategoryTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeviceCategoryTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DeviceCategoryTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceCategoryTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCategoryTargeting"; + }; + + return DeviceCategoryTargeting; + })(); + + v1.DeviceCapabilityTargeting = (function() { + + /** + * Properties of a DeviceCapabilityTargeting. + * @memberof google.ads.admanager.v1 + * @interface IDeviceCapabilityTargeting + * @property {Array.|null} [targetedCapabilities] DeviceCapabilityTargeting targetedCapabilities + * @property {Array.|null} [excludedCapabilities] DeviceCapabilityTargeting excludedCapabilities + */ + + /** + * Constructs a new DeviceCapabilityTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceCapabilityTargeting. + * @implements IDeviceCapabilityTargeting + * @constructor + * @param {google.ads.admanager.v1.IDeviceCapabilityTargeting=} [properties] Properties to set + */ + function DeviceCapabilityTargeting(properties) { + this.targetedCapabilities = []; + this.excludedCapabilities = []; + 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]]; + } + + /** + * DeviceCapabilityTargeting targetedCapabilities. + * @member {Array.} targetedCapabilities + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @instance + */ + DeviceCapabilityTargeting.prototype.targetedCapabilities = $util.emptyArray; + + /** + * DeviceCapabilityTargeting excludedCapabilities. + * @member {Array.} excludedCapabilities + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @instance + */ + DeviceCapabilityTargeting.prototype.excludedCapabilities = $util.emptyArray; + + /** + * Creates a new DeviceCapabilityTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCapabilityTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceCapabilityTargeting} DeviceCapabilityTargeting instance + */ + DeviceCapabilityTargeting.create = function create(properties) { + return new DeviceCapabilityTargeting(properties); + }; + + /** + * Encodes the specified DeviceCapabilityTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceCapabilityTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCapabilityTargeting} message DeviceCapabilityTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCapabilityTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedCapabilities != null && message.targetedCapabilities.length) + for (var i = 0; i < message.targetedCapabilities.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedCapabilities[i]); + if (message.excludedCapabilities != null && message.excludedCapabilities.length) + for (var i = 0; i < message.excludedCapabilities.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedCapabilities[i]); + return writer; + }; + + /** + * Encodes the specified DeviceCapabilityTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceCapabilityTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceCapabilityTargeting} message DeviceCapabilityTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCapabilityTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceCapabilityTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DeviceCapabilityTargeting} DeviceCapabilityTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCapabilityTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceCapabilityTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": - case 19000: - message.dimension = 19000; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedCapabilities && message.targetedCapabilities.length)) + message.targetedCapabilities = []; + message.targetedCapabilities.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedCapabilities && message.excludedCapabilities.length)) + message.excludedCapabilities = []; + message.excludedCapabilities.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": - case 19001: - message.dimension = 19001; + } + } + return message; + }; + + /** + * Decodes a DeviceCapabilityTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DeviceCapabilityTargeting} DeviceCapabilityTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCapabilityTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceCapabilityTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceCapabilityTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedCapabilities != null && message.hasOwnProperty("targetedCapabilities")) { + if (!Array.isArray(message.targetedCapabilities)) + return "targetedCapabilities: array expected"; + for (var i = 0; i < message.targetedCapabilities.length; ++i) + if (!$util.isString(message.targetedCapabilities[i])) + return "targetedCapabilities: string[] expected"; + } + if (message.excludedCapabilities != null && message.hasOwnProperty("excludedCapabilities")) { + if (!Array.isArray(message.excludedCapabilities)) + return "excludedCapabilities: array expected"; + for (var i = 0; i < message.excludedCapabilities.length; ++i) + if (!$util.isString(message.excludedCapabilities[i])) + return "excludedCapabilities: string[] expected"; + } + return null; + }; + + /** + * Creates a DeviceCapabilityTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DeviceCapabilityTargeting} DeviceCapabilityTargeting + */ + DeviceCapabilityTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceCapabilityTargeting) + return object; + var message = new $root.google.ads.admanager.v1.DeviceCapabilityTargeting(); + if (object.targetedCapabilities) { + if (!Array.isArray(object.targetedCapabilities)) + throw TypeError(".google.ads.admanager.v1.DeviceCapabilityTargeting.targetedCapabilities: array expected"); + message.targetedCapabilities = []; + for (var i = 0; i < object.targetedCapabilities.length; ++i) + message.targetedCapabilities[i] = String(object.targetedCapabilities[i]); + } + if (object.excludedCapabilities) { + if (!Array.isArray(object.excludedCapabilities)) + throw TypeError(".google.ads.admanager.v1.DeviceCapabilityTargeting.excludedCapabilities: array expected"); + message.excludedCapabilities = []; + for (var i = 0; i < object.excludedCapabilities.length; ++i) + message.excludedCapabilities[i] = String(object.excludedCapabilities[i]); + } + return message; + }; + + /** + * Creates a plain object from a DeviceCapabilityTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {google.ads.admanager.v1.DeviceCapabilityTargeting} message DeviceCapabilityTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceCapabilityTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedCapabilities = []; + object.excludedCapabilities = []; + } + if (message.targetedCapabilities && message.targetedCapabilities.length) { + object.targetedCapabilities = []; + for (var j = 0; j < message.targetedCapabilities.length; ++j) + object.targetedCapabilities[j] = message.targetedCapabilities[j]; + } + if (message.excludedCapabilities && message.excludedCapabilities.length) { + object.excludedCapabilities = []; + for (var j = 0; j < message.excludedCapabilities.length; ++j) + object.excludedCapabilities[j] = message.excludedCapabilities[j]; + } + return object; + }; + + /** + * Converts this DeviceCapabilityTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @instance + * @returns {Object.} JSON object + */ + DeviceCapabilityTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeviceCapabilityTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DeviceCapabilityTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceCapabilityTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceCapabilityTargeting"; + }; + + return DeviceCapabilityTargeting; + })(); + + v1.DeviceManufacturerTargeting = (function() { + + /** + * Properties of a DeviceManufacturerTargeting. + * @memberof google.ads.admanager.v1 + * @interface IDeviceManufacturerTargeting + * @property {Array.|null} [targetedDeviceManufacturers] DeviceManufacturerTargeting targetedDeviceManufacturers + * @property {Array.|null} [excludedDeviceManufacturers] DeviceManufacturerTargeting excludedDeviceManufacturers + * @property {Array.|null} [targetedMobileDevices] DeviceManufacturerTargeting targetedMobileDevices + * @property {Array.|null} [excludedMobileDevices] DeviceManufacturerTargeting excludedMobileDevices + * @property {Array.|null} [targetedMobileDeviceSubmodels] DeviceManufacturerTargeting targetedMobileDeviceSubmodels + * @property {Array.|null} [excludedMobileDeviceSubmodels] DeviceManufacturerTargeting excludedMobileDeviceSubmodels + */ + + /** + * Constructs a new DeviceManufacturerTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DeviceManufacturerTargeting. + * @implements IDeviceManufacturerTargeting + * @constructor + * @param {google.ads.admanager.v1.IDeviceManufacturerTargeting=} [properties] Properties to set + */ + function DeviceManufacturerTargeting(properties) { + this.targetedDeviceManufacturers = []; + this.excludedDeviceManufacturers = []; + this.targetedMobileDevices = []; + this.excludedMobileDevices = []; + this.targetedMobileDeviceSubmodels = []; + this.excludedMobileDeviceSubmodels = []; + 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]]; + } + + /** + * DeviceManufacturerTargeting targetedDeviceManufacturers. + * @member {Array.} targetedDeviceManufacturers + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.targetedDeviceManufacturers = $util.emptyArray; + + /** + * DeviceManufacturerTargeting excludedDeviceManufacturers. + * @member {Array.} excludedDeviceManufacturers + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.excludedDeviceManufacturers = $util.emptyArray; + + /** + * DeviceManufacturerTargeting targetedMobileDevices. + * @member {Array.} targetedMobileDevices + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.targetedMobileDevices = $util.emptyArray; + + /** + * DeviceManufacturerTargeting excludedMobileDevices. + * @member {Array.} excludedMobileDevices + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.excludedMobileDevices = $util.emptyArray; + + /** + * DeviceManufacturerTargeting targetedMobileDeviceSubmodels. + * @member {Array.} targetedMobileDeviceSubmodels + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.targetedMobileDeviceSubmodels = $util.emptyArray; + + /** + * DeviceManufacturerTargeting excludedMobileDeviceSubmodels. + * @member {Array.} excludedMobileDeviceSubmodels + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + */ + DeviceManufacturerTargeting.prototype.excludedMobileDeviceSubmodels = $util.emptyArray; + + /** + * Creates a new DeviceManufacturerTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturerTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DeviceManufacturerTargeting} DeviceManufacturerTargeting instance + */ + DeviceManufacturerTargeting.create = function create(properties) { + return new DeviceManufacturerTargeting(properties); + }; + + /** + * Encodes the specified DeviceManufacturerTargeting message. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturerTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturerTargeting} message DeviceManufacturerTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceManufacturerTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedDeviceManufacturers != null && message.targetedDeviceManufacturers.length) + for (var i = 0; i < message.targetedDeviceManufacturers.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedDeviceManufacturers[i]); + if (message.excludedDeviceManufacturers != null && message.excludedDeviceManufacturers.length) + for (var i = 0; i < message.excludedDeviceManufacturers.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedDeviceManufacturers[i]); + if (message.targetedMobileDevices != null && message.targetedMobileDevices.length) + for (var i = 0; i < message.targetedMobileDevices.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.targetedMobileDevices[i]); + if (message.excludedMobileDevices != null && message.excludedMobileDevices.length) + for (var i = 0; i < message.excludedMobileDevices.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.excludedMobileDevices[i]); + if (message.targetedMobileDeviceSubmodels != null && message.targetedMobileDeviceSubmodels.length) + for (var i = 0; i < message.targetedMobileDeviceSubmodels.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.targetedMobileDeviceSubmodels[i]); + if (message.excludedMobileDeviceSubmodels != null && message.excludedMobileDeviceSubmodels.length) + for (var i = 0; i < message.excludedMobileDeviceSubmodels.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.excludedMobileDeviceSubmodels[i]); + return writer; + }; + + /** + * Encodes the specified DeviceManufacturerTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DeviceManufacturerTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {google.ads.admanager.v1.IDeviceManufacturerTargeting} message DeviceManufacturerTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceManufacturerTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceManufacturerTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DeviceManufacturerTargeting} DeviceManufacturerTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceManufacturerTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DeviceManufacturerTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": - case 19002: - message.dimension = 19002; + switch (tag >>> 3) { + case 7: { + if (!(message.targetedDeviceManufacturers && message.targetedDeviceManufacturers.length)) + message.targetedDeviceManufacturers = []; + message.targetedDeviceManufacturers.push(reader.string()); + break; + } + case 8: { + if (!(message.excludedDeviceManufacturers && message.excludedDeviceManufacturers.length)) + message.excludedDeviceManufacturers = []; + message.excludedDeviceManufacturers.push(reader.string()); + break; + } + case 9: { + if (!(message.targetedMobileDevices && message.targetedMobileDevices.length)) + message.targetedMobileDevices = []; + message.targetedMobileDevices.push(reader.string()); + break; + } + case 10: { + if (!(message.excludedMobileDevices && message.excludedMobileDevices.length)) + message.excludedMobileDevices = []; + message.excludedMobileDevices.push(reader.string()); + break; + } + case 11: { + if (!(message.targetedMobileDeviceSubmodels && message.targetedMobileDeviceSubmodels.length)) + message.targetedMobileDeviceSubmodels = []; + message.targetedMobileDeviceSubmodels.push(reader.string()); + break; + } + case 12: { + if (!(message.excludedMobileDeviceSubmodels && message.excludedMobileDeviceSubmodels.length)) + message.excludedMobileDeviceSubmodels = []; + message.excludedMobileDeviceSubmodels.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": - case 19003: - message.dimension = 19003; + } + } + return message; + }; + + /** + * Decodes a DeviceManufacturerTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DeviceManufacturerTargeting} DeviceManufacturerTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceManufacturerTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceManufacturerTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceManufacturerTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedDeviceManufacturers != null && message.hasOwnProperty("targetedDeviceManufacturers")) { + if (!Array.isArray(message.targetedDeviceManufacturers)) + return "targetedDeviceManufacturers: array expected"; + for (var i = 0; i < message.targetedDeviceManufacturers.length; ++i) + if (!$util.isString(message.targetedDeviceManufacturers[i])) + return "targetedDeviceManufacturers: string[] expected"; + } + if (message.excludedDeviceManufacturers != null && message.hasOwnProperty("excludedDeviceManufacturers")) { + if (!Array.isArray(message.excludedDeviceManufacturers)) + return "excludedDeviceManufacturers: array expected"; + for (var i = 0; i < message.excludedDeviceManufacturers.length; ++i) + if (!$util.isString(message.excludedDeviceManufacturers[i])) + return "excludedDeviceManufacturers: string[] expected"; + } + if (message.targetedMobileDevices != null && message.hasOwnProperty("targetedMobileDevices")) { + if (!Array.isArray(message.targetedMobileDevices)) + return "targetedMobileDevices: array expected"; + for (var i = 0; i < message.targetedMobileDevices.length; ++i) + if (!$util.isString(message.targetedMobileDevices[i])) + return "targetedMobileDevices: string[] expected"; + } + if (message.excludedMobileDevices != null && message.hasOwnProperty("excludedMobileDevices")) { + if (!Array.isArray(message.excludedMobileDevices)) + return "excludedMobileDevices: array expected"; + for (var i = 0; i < message.excludedMobileDevices.length; ++i) + if (!$util.isString(message.excludedMobileDevices[i])) + return "excludedMobileDevices: string[] expected"; + } + if (message.targetedMobileDeviceSubmodels != null && message.hasOwnProperty("targetedMobileDeviceSubmodels")) { + if (!Array.isArray(message.targetedMobileDeviceSubmodels)) + return "targetedMobileDeviceSubmodels: array expected"; + for (var i = 0; i < message.targetedMobileDeviceSubmodels.length; ++i) + if (!$util.isString(message.targetedMobileDeviceSubmodels[i])) + return "targetedMobileDeviceSubmodels: string[] expected"; + } + if (message.excludedMobileDeviceSubmodels != null && message.hasOwnProperty("excludedMobileDeviceSubmodels")) { + if (!Array.isArray(message.excludedMobileDeviceSubmodels)) + return "excludedMobileDeviceSubmodels: array expected"; + for (var i = 0; i < message.excludedMobileDeviceSubmodels.length; ++i) + if (!$util.isString(message.excludedMobileDeviceSubmodels[i])) + return "excludedMobileDeviceSubmodels: string[] expected"; + } + return null; + }; + + /** + * Creates a DeviceManufacturerTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DeviceManufacturerTargeting} DeviceManufacturerTargeting + */ + DeviceManufacturerTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DeviceManufacturerTargeting) + return object; + var message = new $root.google.ads.admanager.v1.DeviceManufacturerTargeting(); + if (object.targetedDeviceManufacturers) { + if (!Array.isArray(object.targetedDeviceManufacturers)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.targetedDeviceManufacturers: array expected"); + message.targetedDeviceManufacturers = []; + for (var i = 0; i < object.targetedDeviceManufacturers.length; ++i) + message.targetedDeviceManufacturers[i] = String(object.targetedDeviceManufacturers[i]); + } + if (object.excludedDeviceManufacturers) { + if (!Array.isArray(object.excludedDeviceManufacturers)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.excludedDeviceManufacturers: array expected"); + message.excludedDeviceManufacturers = []; + for (var i = 0; i < object.excludedDeviceManufacturers.length; ++i) + message.excludedDeviceManufacturers[i] = String(object.excludedDeviceManufacturers[i]); + } + if (object.targetedMobileDevices) { + if (!Array.isArray(object.targetedMobileDevices)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.targetedMobileDevices: array expected"); + message.targetedMobileDevices = []; + for (var i = 0; i < object.targetedMobileDevices.length; ++i) + message.targetedMobileDevices[i] = String(object.targetedMobileDevices[i]); + } + if (object.excludedMobileDevices) { + if (!Array.isArray(object.excludedMobileDevices)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.excludedMobileDevices: array expected"); + message.excludedMobileDevices = []; + for (var i = 0; i < object.excludedMobileDevices.length; ++i) + message.excludedMobileDevices[i] = String(object.excludedMobileDevices[i]); + } + if (object.targetedMobileDeviceSubmodels) { + if (!Array.isArray(object.targetedMobileDeviceSubmodels)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.targetedMobileDeviceSubmodels: array expected"); + message.targetedMobileDeviceSubmodels = []; + for (var i = 0; i < object.targetedMobileDeviceSubmodels.length; ++i) + message.targetedMobileDeviceSubmodels[i] = String(object.targetedMobileDeviceSubmodels[i]); + } + if (object.excludedMobileDeviceSubmodels) { + if (!Array.isArray(object.excludedMobileDeviceSubmodels)) + throw TypeError(".google.ads.admanager.v1.DeviceManufacturerTargeting.excludedMobileDeviceSubmodels: array expected"); + message.excludedMobileDeviceSubmodels = []; + for (var i = 0; i < object.excludedMobileDeviceSubmodels.length; ++i) + message.excludedMobileDeviceSubmodels[i] = String(object.excludedMobileDeviceSubmodels[i]); + } + return message; + }; + + /** + * Creates a plain object from a DeviceManufacturerTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {google.ads.admanager.v1.DeviceManufacturerTargeting} message DeviceManufacturerTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceManufacturerTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedDeviceManufacturers = []; + object.excludedDeviceManufacturers = []; + object.targetedMobileDevices = []; + object.excludedMobileDevices = []; + object.targetedMobileDeviceSubmodels = []; + object.excludedMobileDeviceSubmodels = []; + } + if (message.targetedDeviceManufacturers && message.targetedDeviceManufacturers.length) { + object.targetedDeviceManufacturers = []; + for (var j = 0; j < message.targetedDeviceManufacturers.length; ++j) + object.targetedDeviceManufacturers[j] = message.targetedDeviceManufacturers[j]; + } + if (message.excludedDeviceManufacturers && message.excludedDeviceManufacturers.length) { + object.excludedDeviceManufacturers = []; + for (var j = 0; j < message.excludedDeviceManufacturers.length; ++j) + object.excludedDeviceManufacturers[j] = message.excludedDeviceManufacturers[j]; + } + if (message.targetedMobileDevices && message.targetedMobileDevices.length) { + object.targetedMobileDevices = []; + for (var j = 0; j < message.targetedMobileDevices.length; ++j) + object.targetedMobileDevices[j] = message.targetedMobileDevices[j]; + } + if (message.excludedMobileDevices && message.excludedMobileDevices.length) { + object.excludedMobileDevices = []; + for (var j = 0; j < message.excludedMobileDevices.length; ++j) + object.excludedMobileDevices[j] = message.excludedMobileDevices[j]; + } + if (message.targetedMobileDeviceSubmodels && message.targetedMobileDeviceSubmodels.length) { + object.targetedMobileDeviceSubmodels = []; + for (var j = 0; j < message.targetedMobileDeviceSubmodels.length; ++j) + object.targetedMobileDeviceSubmodels[j] = message.targetedMobileDeviceSubmodels[j]; + } + if (message.excludedMobileDeviceSubmodels && message.excludedMobileDeviceSubmodels.length) { + object.excludedMobileDeviceSubmodels = []; + for (var j = 0; j < message.excludedMobileDeviceSubmodels.length; ++j) + object.excludedMobileDeviceSubmodels[j] = message.excludedMobileDeviceSubmodels[j]; + } + return object; + }; + + /** + * Converts this DeviceManufacturerTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @instance + * @returns {Object.} JSON object + */ + DeviceManufacturerTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeviceManufacturerTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DeviceManufacturerTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceManufacturerTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DeviceManufacturerTargeting"; + }; + + return DeviceManufacturerTargeting; + })(); + + v1.MobileCarrierTargeting = (function() { + + /** + * Properties of a MobileCarrierTargeting. + * @memberof google.ads.admanager.v1 + * @interface IMobileCarrierTargeting + * @property {Array.|null} [targetedMobileCarriers] MobileCarrierTargeting targetedMobileCarriers + * @property {Array.|null} [excludedMobileCarriers] MobileCarrierTargeting excludedMobileCarriers + */ + + /** + * Constructs a new MobileCarrierTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileCarrierTargeting. + * @implements IMobileCarrierTargeting + * @constructor + * @param {google.ads.admanager.v1.IMobileCarrierTargeting=} [properties] Properties to set + */ + function MobileCarrierTargeting(properties) { + this.targetedMobileCarriers = []; + this.excludedMobileCarriers = []; + 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]]; + } + + /** + * MobileCarrierTargeting targetedMobileCarriers. + * @member {Array.} targetedMobileCarriers + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @instance + */ + MobileCarrierTargeting.prototype.targetedMobileCarriers = $util.emptyArray; + + /** + * MobileCarrierTargeting excludedMobileCarriers. + * @member {Array.} excludedMobileCarriers + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @instance + */ + MobileCarrierTargeting.prototype.excludedMobileCarriers = $util.emptyArray; + + /** + * Creates a new MobileCarrierTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {google.ads.admanager.v1.IMobileCarrierTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.MobileCarrierTargeting} MobileCarrierTargeting instance + */ + MobileCarrierTargeting.create = function create(properties) { + return new MobileCarrierTargeting(properties); + }; + + /** + * Encodes the specified MobileCarrierTargeting message. Does not implicitly {@link google.ads.admanager.v1.MobileCarrierTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {google.ads.admanager.v1.IMobileCarrierTargeting} message MobileCarrierTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileCarrierTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedMobileCarriers != null && message.targetedMobileCarriers.length) + for (var i = 0; i < message.targetedMobileCarriers.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedMobileCarriers[i]); + if (message.excludedMobileCarriers != null && message.excludedMobileCarriers.length) + for (var i = 0; i < message.excludedMobileCarriers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedMobileCarriers[i]); + return writer; + }; + + /** + * Encodes the specified MobileCarrierTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileCarrierTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {google.ads.admanager.v1.IMobileCarrierTargeting} message MobileCarrierTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileCarrierTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileCarrierTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.MobileCarrierTargeting} MobileCarrierTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileCarrierTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.MobileCarrierTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": - case 19004: - message.dimension = 19004; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedMobileCarriers && message.targetedMobileCarriers.length)) + message.targetedMobileCarriers = []; + message.targetedMobileCarriers.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedMobileCarriers && message.excludedMobileCarriers.length)) + message.excludedMobileCarriers = []; + message.excludedMobileCarriers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": - case 19005: - message.dimension = 19005; + } + } + return message; + }; + + /** + * Decodes a MobileCarrierTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.MobileCarrierTargeting} MobileCarrierTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileCarrierTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileCarrierTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileCarrierTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedMobileCarriers != null && message.hasOwnProperty("targetedMobileCarriers")) { + if (!Array.isArray(message.targetedMobileCarriers)) + return "targetedMobileCarriers: array expected"; + for (var i = 0; i < message.targetedMobileCarriers.length; ++i) + if (!$util.isString(message.targetedMobileCarriers[i])) + return "targetedMobileCarriers: string[] expected"; + } + if (message.excludedMobileCarriers != null && message.hasOwnProperty("excludedMobileCarriers")) { + if (!Array.isArray(message.excludedMobileCarriers)) + return "excludedMobileCarriers: array expected"; + for (var i = 0; i < message.excludedMobileCarriers.length; ++i) + if (!$util.isString(message.excludedMobileCarriers[i])) + return "excludedMobileCarriers: string[] expected"; + } + return null; + }; + + /** + * Creates a MobileCarrierTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.MobileCarrierTargeting} MobileCarrierTargeting + */ + MobileCarrierTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.MobileCarrierTargeting) + return object; + var message = new $root.google.ads.admanager.v1.MobileCarrierTargeting(); + if (object.targetedMobileCarriers) { + if (!Array.isArray(object.targetedMobileCarriers)) + throw TypeError(".google.ads.admanager.v1.MobileCarrierTargeting.targetedMobileCarriers: array expected"); + message.targetedMobileCarriers = []; + for (var i = 0; i < object.targetedMobileCarriers.length; ++i) + message.targetedMobileCarriers[i] = String(object.targetedMobileCarriers[i]); + } + if (object.excludedMobileCarriers) { + if (!Array.isArray(object.excludedMobileCarriers)) + throw TypeError(".google.ads.admanager.v1.MobileCarrierTargeting.excludedMobileCarriers: array expected"); + message.excludedMobileCarriers = []; + for (var i = 0; i < object.excludedMobileCarriers.length; ++i) + message.excludedMobileCarriers[i] = String(object.excludedMobileCarriers[i]); + } + return message; + }; + + /** + * Creates a plain object from a MobileCarrierTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {google.ads.admanager.v1.MobileCarrierTargeting} message MobileCarrierTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileCarrierTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedMobileCarriers = []; + object.excludedMobileCarriers = []; + } + if (message.targetedMobileCarriers && message.targetedMobileCarriers.length) { + object.targetedMobileCarriers = []; + for (var j = 0; j < message.targetedMobileCarriers.length; ++j) + object.targetedMobileCarriers[j] = message.targetedMobileCarriers[j]; + } + if (message.excludedMobileCarriers && message.excludedMobileCarriers.length) { + object.excludedMobileCarriers = []; + for (var j = 0; j < message.excludedMobileCarriers.length; ++j) + object.excludedMobileCarriers[j] = message.excludedMobileCarriers[j]; + } + return object; + }; + + /** + * Converts this MobileCarrierTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @instance + * @returns {Object.} JSON object + */ + MobileCarrierTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileCarrierTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.MobileCarrierTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileCarrierTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.MobileCarrierTargeting"; + }; + + return MobileCarrierTargeting; + })(); + + v1.OperatingSystemTargeting = (function() { + + /** + * Properties of an OperatingSystemTargeting. + * @memberof google.ads.admanager.v1 + * @interface IOperatingSystemTargeting + * @property {Array.|null} [targetedOperatingSystems] OperatingSystemTargeting targetedOperatingSystems + * @property {Array.|null} [excludedOperatingSystems] OperatingSystemTargeting excludedOperatingSystems + * @property {Array.|null} [targetedOperatingSystemVersions] OperatingSystemTargeting targetedOperatingSystemVersions + * @property {Array.|null} [excludedOperatingSystemVersions] OperatingSystemTargeting excludedOperatingSystemVersions + */ + + /** + * Constructs a new OperatingSystemTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an OperatingSystemTargeting. + * @implements IOperatingSystemTargeting + * @constructor + * @param {google.ads.admanager.v1.IOperatingSystemTargeting=} [properties] Properties to set + */ + function OperatingSystemTargeting(properties) { + this.targetedOperatingSystems = []; + this.excludedOperatingSystems = []; + this.targetedOperatingSystemVersions = []; + this.excludedOperatingSystemVersions = []; + 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]]; + } + + /** + * OperatingSystemTargeting targetedOperatingSystems. + * @member {Array.} targetedOperatingSystems + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @instance + */ + OperatingSystemTargeting.prototype.targetedOperatingSystems = $util.emptyArray; + + /** + * OperatingSystemTargeting excludedOperatingSystems. + * @member {Array.} excludedOperatingSystems + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @instance + */ + OperatingSystemTargeting.prototype.excludedOperatingSystems = $util.emptyArray; + + /** + * OperatingSystemTargeting targetedOperatingSystemVersions. + * @member {Array.} targetedOperatingSystemVersions + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @instance + */ + OperatingSystemTargeting.prototype.targetedOperatingSystemVersions = $util.emptyArray; + + /** + * OperatingSystemTargeting excludedOperatingSystemVersions. + * @member {Array.} excludedOperatingSystemVersions + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @instance + */ + OperatingSystemTargeting.prototype.excludedOperatingSystemVersions = $util.emptyArray; + + /** + * Creates a new OperatingSystemTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {google.ads.admanager.v1.IOperatingSystemTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting instance + */ + OperatingSystemTargeting.create = function create(properties) { + return new OperatingSystemTargeting(properties); + }; + + /** + * Encodes the specified OperatingSystemTargeting message. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {google.ads.admanager.v1.IOperatingSystemTargeting} message OperatingSystemTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystemTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedOperatingSystems != null && message.targetedOperatingSystems.length) + for (var i = 0; i < message.targetedOperatingSystems.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetedOperatingSystems[i]); + if (message.excludedOperatingSystems != null && message.excludedOperatingSystems.length) + for (var i = 0; i < message.excludedOperatingSystems.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedOperatingSystems[i]); + if (message.targetedOperatingSystemVersions != null && message.targetedOperatingSystemVersions.length) + for (var i = 0; i < message.targetedOperatingSystemVersions.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedOperatingSystemVersions[i]); + if (message.excludedOperatingSystemVersions != null && message.excludedOperatingSystemVersions.length) + for (var i = 0; i < message.excludedOperatingSystemVersions.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedOperatingSystemVersions[i]); + return writer; + }; + + /** + * Encodes the specified OperatingSystemTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.OperatingSystemTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {google.ads.admanager.v1.IOperatingSystemTargeting} message OperatingSystemTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperatingSystemTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperatingSystemTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystemTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.OperatingSystemTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": - case 19006: - message.dimension = 19006; + switch (tag >>> 3) { + case 5: { + if (!(message.targetedOperatingSystems && message.targetedOperatingSystems.length)) + message.targetedOperatingSystems = []; + message.targetedOperatingSystems.push(reader.string()); + break; + } + case 6: { + if (!(message.excludedOperatingSystems && message.excludedOperatingSystems.length)) + message.excludedOperatingSystems = []; + message.excludedOperatingSystems.push(reader.string()); + break; + } + case 7: { + if (!(message.targetedOperatingSystemVersions && message.targetedOperatingSystemVersions.length)) + message.targetedOperatingSystemVersions = []; + message.targetedOperatingSystemVersions.push(reader.string()); + break; + } + case 8: { + if (!(message.excludedOperatingSystemVersions && message.excludedOperatingSystemVersions.length)) + message.excludedOperatingSystemVersions = []; + message.excludedOperatingSystemVersions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": - case 19007: - message.dimension = 19007; + } + } + return message; + }; + + /** + * Decodes an OperatingSystemTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperatingSystemTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperatingSystemTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperatingSystemTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedOperatingSystems != null && message.hasOwnProperty("targetedOperatingSystems")) { + if (!Array.isArray(message.targetedOperatingSystems)) + return "targetedOperatingSystems: array expected"; + for (var i = 0; i < message.targetedOperatingSystems.length; ++i) + if (!$util.isString(message.targetedOperatingSystems[i])) + return "targetedOperatingSystems: string[] expected"; + } + if (message.excludedOperatingSystems != null && message.hasOwnProperty("excludedOperatingSystems")) { + if (!Array.isArray(message.excludedOperatingSystems)) + return "excludedOperatingSystems: array expected"; + for (var i = 0; i < message.excludedOperatingSystems.length; ++i) + if (!$util.isString(message.excludedOperatingSystems[i])) + return "excludedOperatingSystems: string[] expected"; + } + if (message.targetedOperatingSystemVersions != null && message.hasOwnProperty("targetedOperatingSystemVersions")) { + if (!Array.isArray(message.targetedOperatingSystemVersions)) + return "targetedOperatingSystemVersions: array expected"; + for (var i = 0; i < message.targetedOperatingSystemVersions.length; ++i) + if (!$util.isString(message.targetedOperatingSystemVersions[i])) + return "targetedOperatingSystemVersions: string[] expected"; + } + if (message.excludedOperatingSystemVersions != null && message.hasOwnProperty("excludedOperatingSystemVersions")) { + if (!Array.isArray(message.excludedOperatingSystemVersions)) + return "excludedOperatingSystemVersions: array expected"; + for (var i = 0; i < message.excludedOperatingSystemVersions.length; ++i) + if (!$util.isString(message.excludedOperatingSystemVersions[i])) + return "excludedOperatingSystemVersions: string[] expected"; + } + return null; + }; + + /** + * Creates an OperatingSystemTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.OperatingSystemTargeting} OperatingSystemTargeting + */ + OperatingSystemTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.OperatingSystemTargeting) + return object; + var message = new $root.google.ads.admanager.v1.OperatingSystemTargeting(); + if (object.targetedOperatingSystems) { + if (!Array.isArray(object.targetedOperatingSystems)) + throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.targetedOperatingSystems: array expected"); + message.targetedOperatingSystems = []; + for (var i = 0; i < object.targetedOperatingSystems.length; ++i) + message.targetedOperatingSystems[i] = String(object.targetedOperatingSystems[i]); + } + if (object.excludedOperatingSystems) { + if (!Array.isArray(object.excludedOperatingSystems)) + throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.excludedOperatingSystems: array expected"); + message.excludedOperatingSystems = []; + for (var i = 0; i < object.excludedOperatingSystems.length; ++i) + message.excludedOperatingSystems[i] = String(object.excludedOperatingSystems[i]); + } + if (object.targetedOperatingSystemVersions) { + if (!Array.isArray(object.targetedOperatingSystemVersions)) + throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.targetedOperatingSystemVersions: array expected"); + message.targetedOperatingSystemVersions = []; + for (var i = 0; i < object.targetedOperatingSystemVersions.length; ++i) + message.targetedOperatingSystemVersions[i] = String(object.targetedOperatingSystemVersions[i]); + } + if (object.excludedOperatingSystemVersions) { + if (!Array.isArray(object.excludedOperatingSystemVersions)) + throw TypeError(".google.ads.admanager.v1.OperatingSystemTargeting.excludedOperatingSystemVersions: array expected"); + message.excludedOperatingSystemVersions = []; + for (var i = 0; i < object.excludedOperatingSystemVersions.length; ++i) + message.excludedOperatingSystemVersions[i] = String(object.excludedOperatingSystemVersions[i]); + } + return message; + }; + + /** + * Creates a plain object from an OperatingSystemTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {google.ads.admanager.v1.OperatingSystemTargeting} message OperatingSystemTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperatingSystemTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedOperatingSystems = []; + object.excludedOperatingSystems = []; + object.targetedOperatingSystemVersions = []; + object.excludedOperatingSystemVersions = []; + } + if (message.targetedOperatingSystems && message.targetedOperatingSystems.length) { + object.targetedOperatingSystems = []; + for (var j = 0; j < message.targetedOperatingSystems.length; ++j) + object.targetedOperatingSystems[j] = message.targetedOperatingSystems[j]; + } + if (message.excludedOperatingSystems && message.excludedOperatingSystems.length) { + object.excludedOperatingSystems = []; + for (var j = 0; j < message.excludedOperatingSystems.length; ++j) + object.excludedOperatingSystems[j] = message.excludedOperatingSystems[j]; + } + if (message.targetedOperatingSystemVersions && message.targetedOperatingSystemVersions.length) { + object.targetedOperatingSystemVersions = []; + for (var j = 0; j < message.targetedOperatingSystemVersions.length; ++j) + object.targetedOperatingSystemVersions[j] = message.targetedOperatingSystemVersions[j]; + } + if (message.excludedOperatingSystemVersions && message.excludedOperatingSystemVersions.length) { + object.excludedOperatingSystemVersions = []; + for (var j = 0; j < message.excludedOperatingSystemVersions.length; ++j) + object.excludedOperatingSystemVersions[j] = message.excludedOperatingSystemVersions[j]; + } + return object; + }; + + /** + * Converts this OperatingSystemTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @instance + * @returns {Object.} JSON object + */ + OperatingSystemTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperatingSystemTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.OperatingSystemTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperatingSystemTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.OperatingSystemTargeting"; + }; + + return OperatingSystemTargeting; + })(); + + v1.InventoryTargeting = (function() { + + /** + * Properties of an InventoryTargeting. + * @memberof google.ads.admanager.v1 + * @interface IInventoryTargeting + * @property {Array.|null} [targetedAdUnits] InventoryTargeting targetedAdUnits + * @property {Array.|null} [excludedAdUnits] InventoryTargeting excludedAdUnits + * @property {Array.|null} [targetedPlacements] InventoryTargeting targetedPlacements + */ + + /** + * Constructs a new InventoryTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an InventoryTargeting. + * @implements IInventoryTargeting + * @constructor + * @param {google.ads.admanager.v1.IInventoryTargeting=} [properties] Properties to set + */ + function InventoryTargeting(properties) { + this.targetedAdUnits = []; + this.excludedAdUnits = []; + this.targetedPlacements = []; + 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]]; + } + + /** + * InventoryTargeting targetedAdUnits. + * @member {Array.} targetedAdUnits + * @memberof google.ads.admanager.v1.InventoryTargeting + * @instance + */ + InventoryTargeting.prototype.targetedAdUnits = $util.emptyArray; + + /** + * InventoryTargeting excludedAdUnits. + * @member {Array.} excludedAdUnits + * @memberof google.ads.admanager.v1.InventoryTargeting + * @instance + */ + InventoryTargeting.prototype.excludedAdUnits = $util.emptyArray; + + /** + * InventoryTargeting targetedPlacements. + * @member {Array.} targetedPlacements + * @memberof google.ads.admanager.v1.InventoryTargeting + * @instance + */ + InventoryTargeting.prototype.targetedPlacements = $util.emptyArray; + + /** + * Creates a new InventoryTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {google.ads.admanager.v1.IInventoryTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting instance + */ + InventoryTargeting.create = function create(properties) { + return new InventoryTargeting(properties); + }; + + /** + * Encodes the specified InventoryTargeting message. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {google.ads.admanager.v1.IInventoryTargeting} message InventoryTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedAdUnits != null && message.targetedAdUnits.length) + for (var i = 0; i < message.targetedAdUnits.length; ++i) + $root.google.ads.admanager.v1.AdUnitTargeting.encode(message.targetedAdUnits[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.excludedAdUnits != null && message.excludedAdUnits.length) + for (var i = 0; i < message.excludedAdUnits.length; ++i) + $root.google.ads.admanager.v1.AdUnitTargeting.encode(message.excludedAdUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.targetedPlacements != null && message.targetedPlacements.length) + for (var i = 0; i < message.targetedPlacements.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetedPlacements[i]); + return writer; + }; + + /** + * Encodes the specified InventoryTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.InventoryTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {google.ads.admanager.v1.IInventoryTargeting} message InventoryTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InventoryTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.InventoryTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": - case 19008: - message.dimension = 19008; + switch (tag >>> 3) { + case 1: { + if (!(message.targetedAdUnits && message.targetedAdUnits.length)) + message.targetedAdUnits = []; + message.targetedAdUnits.push($root.google.ads.admanager.v1.AdUnitTargeting.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.excludedAdUnits && message.excludedAdUnits.length)) + message.excludedAdUnits = []; + message.excludedAdUnits.push($root.google.ads.admanager.v1.AdUnitTargeting.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.targetedPlacements && message.targetedPlacements.length)) + message.targetedPlacements = []; + message.targetedPlacements.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": - case 19009: - message.dimension = 19009; + } + } + return message; + }; + + /** + * Decodes an InventoryTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InventoryTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InventoryTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedAdUnits != null && message.hasOwnProperty("targetedAdUnits")) { + if (!Array.isArray(message.targetedAdUnits)) + return "targetedAdUnits: array expected"; + for (var i = 0; i < message.targetedAdUnits.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnitTargeting.verify(message.targetedAdUnits[i]); + if (error) + return "targetedAdUnits." + error; + } + } + if (message.excludedAdUnits != null && message.hasOwnProperty("excludedAdUnits")) { + if (!Array.isArray(message.excludedAdUnits)) + return "excludedAdUnits: array expected"; + for (var i = 0; i < message.excludedAdUnits.length; ++i) { + var error = $root.google.ads.admanager.v1.AdUnitTargeting.verify(message.excludedAdUnits[i]); + if (error) + return "excludedAdUnits." + error; + } + } + if (message.targetedPlacements != null && message.hasOwnProperty("targetedPlacements")) { + if (!Array.isArray(message.targetedPlacements)) + return "targetedPlacements: array expected"; + for (var i = 0; i < message.targetedPlacements.length; ++i) + if (!$util.isString(message.targetedPlacements[i])) + return "targetedPlacements: string[] expected"; + } + return null; + }; + + /** + * Creates an InventoryTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.InventoryTargeting} InventoryTargeting + */ + InventoryTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.InventoryTargeting) + return object; + var message = new $root.google.ads.admanager.v1.InventoryTargeting(); + if (object.targetedAdUnits) { + if (!Array.isArray(object.targetedAdUnits)) + throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedAdUnits: array expected"); + message.targetedAdUnits = []; + for (var i = 0; i < object.targetedAdUnits.length; ++i) { + if (typeof object.targetedAdUnits[i] !== "object") + throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedAdUnits: object expected"); + message.targetedAdUnits[i] = $root.google.ads.admanager.v1.AdUnitTargeting.fromObject(object.targetedAdUnits[i]); + } + } + if (object.excludedAdUnits) { + if (!Array.isArray(object.excludedAdUnits)) + throw TypeError(".google.ads.admanager.v1.InventoryTargeting.excludedAdUnits: array expected"); + message.excludedAdUnits = []; + for (var i = 0; i < object.excludedAdUnits.length; ++i) { + if (typeof object.excludedAdUnits[i] !== "object") + throw TypeError(".google.ads.admanager.v1.InventoryTargeting.excludedAdUnits: object expected"); + message.excludedAdUnits[i] = $root.google.ads.admanager.v1.AdUnitTargeting.fromObject(object.excludedAdUnits[i]); + } + } + if (object.targetedPlacements) { + if (!Array.isArray(object.targetedPlacements)) + throw TypeError(".google.ads.admanager.v1.InventoryTargeting.targetedPlacements: array expected"); + message.targetedPlacements = []; + for (var i = 0; i < object.targetedPlacements.length; ++i) + message.targetedPlacements[i] = String(object.targetedPlacements[i]); + } + return message; + }; + + /** + * Creates a plain object from an InventoryTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {google.ads.admanager.v1.InventoryTargeting} message InventoryTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InventoryTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedAdUnits = []; + object.excludedAdUnits = []; + object.targetedPlacements = []; + } + if (message.targetedAdUnits && message.targetedAdUnits.length) { + object.targetedAdUnits = []; + for (var j = 0; j < message.targetedAdUnits.length; ++j) + object.targetedAdUnits[j] = $root.google.ads.admanager.v1.AdUnitTargeting.toObject(message.targetedAdUnits[j], options); + } + if (message.excludedAdUnits && message.excludedAdUnits.length) { + object.excludedAdUnits = []; + for (var j = 0; j < message.excludedAdUnits.length; ++j) + object.excludedAdUnits[j] = $root.google.ads.admanager.v1.AdUnitTargeting.toObject(message.excludedAdUnits[j], options); + } + if (message.targetedPlacements && message.targetedPlacements.length) { + object.targetedPlacements = []; + for (var j = 0; j < message.targetedPlacements.length; ++j) + object.targetedPlacements[j] = message.targetedPlacements[j]; + } + return object; + }; + + /** + * Converts this InventoryTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.InventoryTargeting + * @instance + * @returns {Object.} JSON object + */ + InventoryTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InventoryTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.InventoryTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InventoryTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.InventoryTargeting"; + }; + + return InventoryTargeting; + })(); + + v1.AdUnitTargeting = (function() { + + /** + * Properties of an AdUnitTargeting. + * @memberof google.ads.admanager.v1 + * @interface IAdUnitTargeting + * @property {boolean|null} [includeDescendants] AdUnitTargeting includeDescendants + * @property {string|null} [adUnit] AdUnitTargeting adUnit + */ + + /** + * Constructs a new AdUnitTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an AdUnitTargeting. + * @implements IAdUnitTargeting + * @constructor + * @param {google.ads.admanager.v1.IAdUnitTargeting=} [properties] Properties to set + */ + function AdUnitTargeting(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]]; + } + + /** + * AdUnitTargeting includeDescendants. + * @member {boolean|null|undefined} includeDescendants + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @instance + */ + AdUnitTargeting.prototype.includeDescendants = null; + + /** + * AdUnitTargeting adUnit. + * @member {string|null|undefined} adUnit + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @instance + */ + AdUnitTargeting.prototype.adUnit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitTargeting.prototype, "_includeDescendants", { + get: $util.oneOfGetter($oneOfFields = ["includeDescendants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdUnitTargeting.prototype, "_adUnit", { + get: $util.oneOfGetter($oneOfFields = ["adUnit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdUnitTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {google.ads.admanager.v1.IAdUnitTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting instance + */ + AdUnitTargeting.create = function create(properties) { + return new AdUnitTargeting(properties); + }; + + /** + * Encodes the specified AdUnitTargeting message. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {google.ads.admanager.v1.IAdUnitTargeting} message AdUnitTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdUnitTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeDescendants != null && Object.hasOwnProperty.call(message, "includeDescendants")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeDescendants); + if (message.adUnit != null && Object.hasOwnProperty.call(message, "adUnit")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.adUnit); + return writer; + }; + + /** + * Encodes the specified AdUnitTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AdUnitTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {google.ads.admanager.v1.IAdUnitTargeting} message AdUnitTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdUnitTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdUnitTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdUnitTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AdUnitTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": - case 19010: - message.dimension = 19010; + switch (tag >>> 3) { + case 1: { + message.includeDescendants = reader.bool(); + break; + } + case 3: { + message.adUnit = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": - case 19011: - message.dimension = 19011; + } + } + return message; + }; + + /** + * Decodes an AdUnitTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdUnitTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdUnitTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdUnitTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.includeDescendants != null && message.hasOwnProperty("includeDescendants")) { + properties._includeDescendants = 1; + if (typeof message.includeDescendants !== "boolean") + return "includeDescendants: boolean expected"; + } + if (message.adUnit != null && message.hasOwnProperty("adUnit")) { + properties._adUnit = 1; + if (!$util.isString(message.adUnit)) + return "adUnit: string expected"; + } + return null; + }; + + /** + * Creates an AdUnitTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.AdUnitTargeting} AdUnitTargeting + */ + AdUnitTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AdUnitTargeting) + return object; + var message = new $root.google.ads.admanager.v1.AdUnitTargeting(); + if (object.includeDescendants != null) + message.includeDescendants = Boolean(object.includeDescendants); + if (object.adUnit != null) + message.adUnit = String(object.adUnit); + return message; + }; + + /** + * Creates a plain object from an AdUnitTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {google.ads.admanager.v1.AdUnitTargeting} message AdUnitTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdUnitTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeDescendants != null && message.hasOwnProperty("includeDescendants")) { + object.includeDescendants = message.includeDescendants; + if (options.oneofs) + object._includeDescendants = "includeDescendants"; + } + if (message.adUnit != null && message.hasOwnProperty("adUnit")) { + object.adUnit = message.adUnit; + if (options.oneofs) + object._adUnit = "adUnit"; + } + return object; + }; + + /** + * Converts this AdUnitTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @instance + * @returns {Object.} JSON object + */ + AdUnitTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdUnitTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.AdUnitTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdUnitTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.AdUnitTargeting"; + }; + + return AdUnitTargeting; + })(); + + v1.RequestPlatformTargeting = (function() { + + /** + * Properties of a RequestPlatformTargeting. + * @memberof google.ads.admanager.v1 + * @interface IRequestPlatformTargeting + * @property {Array.|null} [requestPlatforms] RequestPlatformTargeting requestPlatforms + */ + + /** + * Constructs a new RequestPlatformTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RequestPlatformTargeting. + * @implements IRequestPlatformTargeting + * @constructor + * @param {google.ads.admanager.v1.IRequestPlatformTargeting=} [properties] Properties to set + */ + function RequestPlatformTargeting(properties) { + this.requestPlatforms = []; + 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]]; + } + + /** + * RequestPlatformTargeting requestPlatforms. + * @member {Array.} requestPlatforms + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @instance + */ + RequestPlatformTargeting.prototype.requestPlatforms = $util.emptyArray; + + /** + * Creates a new RequestPlatformTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {google.ads.admanager.v1.IRequestPlatformTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting instance + */ + RequestPlatformTargeting.create = function create(properties) { + return new RequestPlatformTargeting(properties); + }; + + /** + * Encodes the specified RequestPlatformTargeting message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {google.ads.admanager.v1.IRequestPlatformTargeting} message RequestPlatformTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPlatformTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestPlatforms != null && message.requestPlatforms.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.requestPlatforms.length; ++i) + writer.int32(message.requestPlatforms[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified RequestPlatformTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {google.ads.admanager.v1.IRequestPlatformTargeting} message RequestPlatformTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPlatformTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestPlatformTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPlatformTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RequestPlatformTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": - case 19012: - message.dimension = 19012; + switch (tag >>> 3) { + case 1: { + if (!(message.requestPlatforms && message.requestPlatforms.length)) + message.requestPlatforms = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.requestPlatforms.push(reader.int32()); + } else + message.requestPlatforms.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": - case 19013: - message.dimension = 19013; + } + } + return message; + }; + + /** + * Decodes a RequestPlatformTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPlatformTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestPlatformTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestPlatformTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestPlatforms != null && message.hasOwnProperty("requestPlatforms")) { + if (!Array.isArray(message.requestPlatforms)) + return "requestPlatforms: array expected"; + for (var i = 0; i < message.requestPlatforms.length; ++i) + switch (message.requestPlatforms[i]) { + default: + return "requestPlatforms: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a RequestPlatformTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RequestPlatformTargeting} RequestPlatformTargeting + */ + RequestPlatformTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RequestPlatformTargeting) + return object; + var message = new $root.google.ads.admanager.v1.RequestPlatformTargeting(); + if (object.requestPlatforms) { + if (!Array.isArray(object.requestPlatforms)) + throw TypeError(".google.ads.admanager.v1.RequestPlatformTargeting.requestPlatforms: array expected"); + message.requestPlatforms = []; + for (var i = 0; i < object.requestPlatforms.length; ++i) + switch (object.requestPlatforms[i]) { + default: + if (typeof object.requestPlatforms[i] === "number") { + message.requestPlatforms[i] = object.requestPlatforms[i]; + break; + } + case "REQUEST_PLATFORM_UNSPECIFIED": + case 0: + message.requestPlatforms[i] = 0; + break; + case "BROWSER": + case 1: + message.requestPlatforms[i] = 1; + break; + case "MOBILE_APP": + case 2: + message.requestPlatforms[i] = 2; + break; + case "VIDEO_PLAYER": + case 3: + message.requestPlatforms[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a RequestPlatformTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {google.ads.admanager.v1.RequestPlatformTargeting} message RequestPlatformTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestPlatformTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requestPlatforms = []; + if (message.requestPlatforms && message.requestPlatforms.length) { + object.requestPlatforms = []; + for (var j = 0; j < message.requestPlatforms.length; ++j) + object.requestPlatforms[j] = options.enums === String ? $root.google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[message.requestPlatforms[j]] === undefined ? message.requestPlatforms[j] : $root.google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform[message.requestPlatforms[j]] : message.requestPlatforms[j]; + } + return object; + }; + + /** + * Converts this RequestPlatformTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @instance + * @returns {Object.} JSON object + */ + RequestPlatformTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestPlatformTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RequestPlatformTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestPlatformTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RequestPlatformTargeting"; + }; + + return RequestPlatformTargeting; + })(); + + v1.CustomTargeting = (function() { + + /** + * Properties of a CustomTargeting. + * @memberof google.ads.admanager.v1 + * @interface ICustomTargeting + * @property {Array.|null} [customTargetingClauses] CustomTargeting customTargetingClauses + */ + + /** + * Constructs a new CustomTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CustomTargeting. + * @implements ICustomTargeting + * @constructor + * @param {google.ads.admanager.v1.ICustomTargeting=} [properties] Properties to set + */ + function CustomTargeting(properties) { + this.customTargetingClauses = []; + 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]]; + } + + /** + * CustomTargeting customTargetingClauses. + * @member {Array.} customTargetingClauses + * @memberof google.ads.admanager.v1.CustomTargeting + * @instance + */ + CustomTargeting.prototype.customTargetingClauses = $util.emptyArray; + + /** + * Creates a new CustomTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {google.ads.admanager.v1.ICustomTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting instance + */ + CustomTargeting.create = function create(properties) { + return new CustomTargeting(properties); + }; + + /** + * Encodes the specified CustomTargeting message. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {google.ads.admanager.v1.ICustomTargeting} message CustomTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customTargetingClauses != null && message.customTargetingClauses.length) + for (var i = 0; i < message.customTargetingClauses.length; ++i) + $root.google.ads.admanager.v1.CustomTargetingClause.encode(message.customTargetingClauses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {google.ads.admanager.v1.ICustomTargeting} message CustomTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": - case 19014: - message.dimension = 19014; + switch (tag >>> 3) { + case 1: { + if (!(message.customTargetingClauses && message.customTargetingClauses.length)) + message.customTargetingClauses = []; + message.customTargetingClauses.push($root.google.ads.admanager.v1.CustomTargetingClause.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": - case 20000: - message.dimension = 20000; + } + } + return message; + }; + + /** + * Decodes a CustomTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customTargetingClauses != null && message.hasOwnProperty("customTargetingClauses")) { + if (!Array.isArray(message.customTargetingClauses)) + return "customTargetingClauses: array expected"; + for (var i = 0; i < message.customTargetingClauses.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomTargetingClause.verify(message.customTargetingClauses[i]); + if (error) + return "customTargetingClauses." + error; + } + } + return null; + }; + + /** + * Creates a CustomTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CustomTargeting} CustomTargeting + */ + CustomTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargeting) + return object; + var message = new $root.google.ads.admanager.v1.CustomTargeting(); + if (object.customTargetingClauses) { + if (!Array.isArray(object.customTargetingClauses)) + throw TypeError(".google.ads.admanager.v1.CustomTargeting.customTargetingClauses: array expected"); + message.customTargetingClauses = []; + for (var i = 0; i < object.customTargetingClauses.length; ++i) { + if (typeof object.customTargetingClauses[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CustomTargeting.customTargetingClauses: object expected"); + message.customTargetingClauses[i] = $root.google.ads.admanager.v1.CustomTargetingClause.fromObject(object.customTargetingClauses[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {google.ads.admanager.v1.CustomTargeting} message CustomTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customTargetingClauses = []; + if (message.customTargetingClauses && message.customTargetingClauses.length) { + object.customTargetingClauses = []; + for (var j = 0; j < message.customTargetingClauses.length; ++j) + object.customTargetingClauses[j] = $root.google.ads.admanager.v1.CustomTargetingClause.toObject(message.customTargetingClauses[j], options); + } + return object; + }; + + /** + * Converts this CustomTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CustomTargeting + * @instance + * @returns {Object.} JSON object + */ + CustomTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CustomTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargeting"; + }; + + return CustomTargeting; + })(); + + v1.CustomTargetingClause = (function() { + + /** + * Properties of a CustomTargetingClause. + * @memberof google.ads.admanager.v1 + * @interface ICustomTargetingClause + * @property {Array.|null} [customTargetingLiterals] CustomTargetingClause customTargetingLiterals + * @property {Array.|null} [audienceSegmentTargetings] CustomTargetingClause audienceSegmentTargetings + * @property {Array.|null} [cmsMetadataTargetings] CustomTargetingClause cmsMetadataTargetings + */ + + /** + * Constructs a new CustomTargetingClause. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CustomTargetingClause. + * @implements ICustomTargetingClause + * @constructor + * @param {google.ads.admanager.v1.ICustomTargetingClause=} [properties] Properties to set + */ + function CustomTargetingClause(properties) { + this.customTargetingLiterals = []; + this.audienceSegmentTargetings = []; + this.cmsMetadataTargetings = []; + 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]]; + } + + /** + * CustomTargetingClause customTargetingLiterals. + * @member {Array.} customTargetingLiterals + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @instance + */ + CustomTargetingClause.prototype.customTargetingLiterals = $util.emptyArray; + + /** + * CustomTargetingClause audienceSegmentTargetings. + * @member {Array.} audienceSegmentTargetings + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @instance + */ + CustomTargetingClause.prototype.audienceSegmentTargetings = $util.emptyArray; + + /** + * CustomTargetingClause cmsMetadataTargetings. + * @member {Array.} cmsMetadataTargetings + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @instance + */ + CustomTargetingClause.prototype.cmsMetadataTargetings = $util.emptyArray; + + /** + * Creates a new CustomTargetingClause instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {google.ads.admanager.v1.ICustomTargetingClause=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause instance + */ + CustomTargetingClause.create = function create(properties) { + return new CustomTargetingClause(properties); + }; + + /** + * Encodes the specified CustomTargetingClause message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {google.ads.admanager.v1.ICustomTargetingClause} message CustomTargetingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetingClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customTargetingLiterals != null && message.customTargetingLiterals.length) + for (var i = 0; i < message.customTargetingLiterals.length; ++i) + $root.google.ads.admanager.v1.CustomTargetingLiteral.encode(message.customTargetingLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceSegmentTargetings != null && message.audienceSegmentTargetings.length) + for (var i = 0; i < message.audienceSegmentTargetings.length; ++i) + $root.google.ads.admanager.v1.AudienceSegmentTargeting.encode(message.audienceSegmentTargetings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cmsMetadataTargetings != null && message.cmsMetadataTargetings.length) + for (var i = 0; i < message.cmsMetadataTargetings.length; ++i) + $root.google.ads.admanager.v1.CmsMetadataTargeting.encode(message.cmsMetadataTargetings[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomTargetingClause message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingClause.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {google.ads.admanager.v1.ICustomTargetingClause} message CustomTargetingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetingClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomTargetingClause message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetingClause.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": - case 20001: - message.dimension = 20001; + switch (tag >>> 3) { + case 1: { + if (!(message.customTargetingLiterals && message.customTargetingLiterals.length)) + message.customTargetingLiterals = []; + message.customTargetingLiterals.push($root.google.ads.admanager.v1.CustomTargetingLiteral.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.audienceSegmentTargetings && message.audienceSegmentTargetings.length)) + message.audienceSegmentTargetings = []; + message.audienceSegmentTargetings.push($root.google.ads.admanager.v1.AudienceSegmentTargeting.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.cmsMetadataTargetings && message.cmsMetadataTargetings.length)) + message.cmsMetadataTargetings = []; + message.cmsMetadataTargetings.push($root.google.ads.admanager.v1.CmsMetadataTargeting.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": - case 20002: - message.dimension = 20002; + } + } + return message; + }; + + /** + * Decodes a CustomTargetingClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetingClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomTargetingClause message. + * @function verify + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomTargetingClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customTargetingLiterals != null && message.hasOwnProperty("customTargetingLiterals")) { + if (!Array.isArray(message.customTargetingLiterals)) + return "customTargetingLiterals: array expected"; + for (var i = 0; i < message.customTargetingLiterals.length; ++i) { + var error = $root.google.ads.admanager.v1.CustomTargetingLiteral.verify(message.customTargetingLiterals[i]); + if (error) + return "customTargetingLiterals." + error; + } + } + if (message.audienceSegmentTargetings != null && message.hasOwnProperty("audienceSegmentTargetings")) { + if (!Array.isArray(message.audienceSegmentTargetings)) + return "audienceSegmentTargetings: array expected"; + for (var i = 0; i < message.audienceSegmentTargetings.length; ++i) { + var error = $root.google.ads.admanager.v1.AudienceSegmentTargeting.verify(message.audienceSegmentTargetings[i]); + if (error) + return "audienceSegmentTargetings." + error; + } + } + if (message.cmsMetadataTargetings != null && message.hasOwnProperty("cmsMetadataTargetings")) { + if (!Array.isArray(message.cmsMetadataTargetings)) + return "cmsMetadataTargetings: array expected"; + for (var i = 0; i < message.cmsMetadataTargetings.length; ++i) { + var error = $root.google.ads.admanager.v1.CmsMetadataTargeting.verify(message.cmsMetadataTargetings[i]); + if (error) + return "cmsMetadataTargetings." + error; + } + } + return null; + }; + + /** + * Creates a CustomTargetingClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CustomTargetingClause} CustomTargetingClause + */ + CustomTargetingClause.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingClause) + return object; + var message = new $root.google.ads.admanager.v1.CustomTargetingClause(); + if (object.customTargetingLiterals) { + if (!Array.isArray(object.customTargetingLiterals)) + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.customTargetingLiterals: array expected"); + message.customTargetingLiterals = []; + for (var i = 0; i < object.customTargetingLiterals.length; ++i) { + if (typeof object.customTargetingLiterals[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.customTargetingLiterals: object expected"); + message.customTargetingLiterals[i] = $root.google.ads.admanager.v1.CustomTargetingLiteral.fromObject(object.customTargetingLiterals[i]); + } + } + if (object.audienceSegmentTargetings) { + if (!Array.isArray(object.audienceSegmentTargetings)) + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.audienceSegmentTargetings: array expected"); + message.audienceSegmentTargetings = []; + for (var i = 0; i < object.audienceSegmentTargetings.length; ++i) { + if (typeof object.audienceSegmentTargetings[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.audienceSegmentTargetings: object expected"); + message.audienceSegmentTargetings[i] = $root.google.ads.admanager.v1.AudienceSegmentTargeting.fromObject(object.audienceSegmentTargetings[i]); + } + } + if (object.cmsMetadataTargetings) { + if (!Array.isArray(object.cmsMetadataTargetings)) + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.cmsMetadataTargetings: array expected"); + message.cmsMetadataTargetings = []; + for (var i = 0; i < object.cmsMetadataTargetings.length; ++i) { + if (typeof object.cmsMetadataTargetings[i] !== "object") + throw TypeError(".google.ads.admanager.v1.CustomTargetingClause.cmsMetadataTargetings: object expected"); + message.cmsMetadataTargetings[i] = $root.google.ads.admanager.v1.CmsMetadataTargeting.fromObject(object.cmsMetadataTargetings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomTargetingClause message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {google.ads.admanager.v1.CustomTargetingClause} message CustomTargetingClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomTargetingClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.customTargetingLiterals = []; + object.audienceSegmentTargetings = []; + object.cmsMetadataTargetings = []; + } + if (message.customTargetingLiterals && message.customTargetingLiterals.length) { + object.customTargetingLiterals = []; + for (var j = 0; j < message.customTargetingLiterals.length; ++j) + object.customTargetingLiterals[j] = $root.google.ads.admanager.v1.CustomTargetingLiteral.toObject(message.customTargetingLiterals[j], options); + } + if (message.audienceSegmentTargetings && message.audienceSegmentTargetings.length) { + object.audienceSegmentTargetings = []; + for (var j = 0; j < message.audienceSegmentTargetings.length; ++j) + object.audienceSegmentTargetings[j] = $root.google.ads.admanager.v1.AudienceSegmentTargeting.toObject(message.audienceSegmentTargetings[j], options); + } + if (message.cmsMetadataTargetings && message.cmsMetadataTargetings.length) { + object.cmsMetadataTargetings = []; + for (var j = 0; j < message.cmsMetadataTargetings.length; ++j) + object.cmsMetadataTargetings[j] = $root.google.ads.admanager.v1.CmsMetadataTargeting.toObject(message.cmsMetadataTargetings[j], options); + } + return object; + }; + + /** + * Converts this CustomTargetingClause to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @instance + * @returns {Object.} JSON object + */ + CustomTargetingClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomTargetingClause + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CustomTargetingClause + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomTargetingClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingClause"; + }; + + return CustomTargetingClause; + })(); + + v1.CustomTargetingLiteral = (function() { + + /** + * Properties of a CustomTargetingLiteral. + * @memberof google.ads.admanager.v1 + * @interface ICustomTargetingLiteral + * @property {boolean|null} [negative] CustomTargetingLiteral negative + * @property {string|null} [customTargetingKey] CustomTargetingLiteral customTargetingKey + * @property {Array.|null} [customTargetingValues] CustomTargetingLiteral customTargetingValues + */ + + /** + * Constructs a new CustomTargetingLiteral. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CustomTargetingLiteral. + * @implements ICustomTargetingLiteral + * @constructor + * @param {google.ads.admanager.v1.ICustomTargetingLiteral=} [properties] Properties to set + */ + function CustomTargetingLiteral(properties) { + this.customTargetingValues = []; + 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]]; + } + + /** + * CustomTargetingLiteral negative. + * @member {boolean|null|undefined} negative + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @instance + */ + CustomTargetingLiteral.prototype.negative = null; + + /** + * CustomTargetingLiteral customTargetingKey. + * @member {string|null|undefined} customTargetingKey + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @instance + */ + CustomTargetingLiteral.prototype.customTargetingKey = null; + + /** + * CustomTargetingLiteral customTargetingValues. + * @member {Array.} customTargetingValues + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @instance + */ + CustomTargetingLiteral.prototype.customTargetingValues = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingLiteral.prototype, "_negative", { + get: $util.oneOfGetter($oneOfFields = ["negative"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomTargetingLiteral.prototype, "_customTargetingKey", { + get: $util.oneOfGetter($oneOfFields = ["customTargetingKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomTargetingLiteral instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {google.ads.admanager.v1.ICustomTargetingLiteral=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral instance + */ + CustomTargetingLiteral.create = function create(properties) { + return new CustomTargetingLiteral(properties); + }; + + /** + * Encodes the specified CustomTargetingLiteral message. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {google.ads.admanager.v1.ICustomTargetingLiteral} message CustomTargetingLiteral message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetingLiteral.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.negative); + if (message.customTargetingKey != null && Object.hasOwnProperty.call(message, "customTargetingKey")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.customTargetingKey); + if (message.customTargetingValues != null && message.customTargetingValues.length) + for (var i = 0; i < message.customTargetingValues.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.customTargetingValues[i]); + return writer; + }; + + /** + * Encodes the specified CustomTargetingLiteral message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CustomTargetingLiteral.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {google.ads.admanager.v1.ICustomTargetingLiteral} message CustomTargetingLiteral message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomTargetingLiteral.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomTargetingLiteral message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetingLiteral.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CustomTargetingLiteral(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": - case 20003: - message.dimension = 20003; + switch (tag >>> 3) { + case 1: { + message.negative = reader.bool(); + break; + } + case 4: { + message.customTargetingKey = reader.string(); + break; + } + case 5: { + if (!(message.customTargetingValues && message.customTargetingValues.length)) + message.customTargetingValues = []; + message.customTargetingValues.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": - case 20004: - message.dimension = 20004; + } + } + return message; + }; + + /** + * Decodes a CustomTargetingLiteral message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomTargetingLiteral.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomTargetingLiteral message. + * @function verify + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomTargetingLiteral.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.negative != null && message.hasOwnProperty("negative")) { + properties._negative = 1; + if (typeof message.negative !== "boolean") + return "negative: boolean expected"; + } + if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { + properties._customTargetingKey = 1; + if (!$util.isString(message.customTargetingKey)) + return "customTargetingKey: string expected"; + } + if (message.customTargetingValues != null && message.hasOwnProperty("customTargetingValues")) { + if (!Array.isArray(message.customTargetingValues)) + return "customTargetingValues: array expected"; + for (var i = 0; i < message.customTargetingValues.length; ++i) + if (!$util.isString(message.customTargetingValues[i])) + return "customTargetingValues: string[] expected"; + } + return null; + }; + + /** + * Creates a CustomTargetingLiteral message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CustomTargetingLiteral} CustomTargetingLiteral + */ + CustomTargetingLiteral.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CustomTargetingLiteral) + return object; + var message = new $root.google.ads.admanager.v1.CustomTargetingLiteral(); + if (object.negative != null) + message.negative = Boolean(object.negative); + if (object.customTargetingKey != null) + message.customTargetingKey = String(object.customTargetingKey); + if (object.customTargetingValues) { + if (!Array.isArray(object.customTargetingValues)) + throw TypeError(".google.ads.admanager.v1.CustomTargetingLiteral.customTargetingValues: array expected"); + message.customTargetingValues = []; + for (var i = 0; i < object.customTargetingValues.length; ++i) + message.customTargetingValues[i] = String(object.customTargetingValues[i]); + } + return message; + }; + + /** + * Creates a plain object from a CustomTargetingLiteral message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {google.ads.admanager.v1.CustomTargetingLiteral} message CustomTargetingLiteral + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomTargetingLiteral.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customTargetingValues = []; + if (message.negative != null && message.hasOwnProperty("negative")) { + object.negative = message.negative; + if (options.oneofs) + object._negative = "negative"; + } + if (message.customTargetingKey != null && message.hasOwnProperty("customTargetingKey")) { + object.customTargetingKey = message.customTargetingKey; + if (options.oneofs) + object._customTargetingKey = "customTargetingKey"; + } + if (message.customTargetingValues && message.customTargetingValues.length) { + object.customTargetingValues = []; + for (var j = 0; j < message.customTargetingValues.length; ++j) + object.customTargetingValues[j] = message.customTargetingValues[j]; + } + return object; + }; + + /** + * Converts this CustomTargetingLiteral to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @instance + * @returns {Object.} JSON object + */ + CustomTargetingLiteral.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomTargetingLiteral + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CustomTargetingLiteral + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomTargetingLiteral.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CustomTargetingLiteral"; + }; + + return CustomTargetingLiteral; + })(); + + v1.AudienceSegmentTargeting = (function() { + + /** + * Properties of an AudienceSegmentTargeting. + * @memberof google.ads.admanager.v1 + * @interface IAudienceSegmentTargeting + * @property {boolean|null} [negative] AudienceSegmentTargeting negative + * @property {Array.|null} [audienceSegments] AudienceSegmentTargeting audienceSegments + */ + + /** + * Constructs a new AudienceSegmentTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an AudienceSegmentTargeting. + * @implements IAudienceSegmentTargeting + * @constructor + * @param {google.ads.admanager.v1.IAudienceSegmentTargeting=} [properties] Properties to set + */ + function AudienceSegmentTargeting(properties) { + this.audienceSegments = []; + 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]]; + } + + /** + * AudienceSegmentTargeting negative. + * @member {boolean|null|undefined} negative + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @instance + */ + AudienceSegmentTargeting.prototype.negative = null; + + /** + * AudienceSegmentTargeting audienceSegments. + * @member {Array.} audienceSegments + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @instance + */ + AudienceSegmentTargeting.prototype.audienceSegments = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceSegmentTargeting.prototype, "_negative", { + get: $util.oneOfGetter($oneOfFields = ["negative"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceSegmentTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IAudienceSegmentTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.AudienceSegmentTargeting} AudienceSegmentTargeting instance + */ + AudienceSegmentTargeting.create = function create(properties) { + return new AudienceSegmentTargeting(properties); + }; + + /** + * Encodes the specified AudienceSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.AudienceSegmentTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IAudienceSegmentTargeting} message AudienceSegmentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSegmentTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.negative); + if (message.audienceSegments != null && message.audienceSegments.length) + for (var i = 0; i < message.audienceSegments.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceSegments[i]); + return writer; + }; + + /** + * Encodes the specified AudienceSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.AudienceSegmentTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IAudienceSegmentTargeting} message AudienceSegmentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSegmentTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSegmentTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.AudienceSegmentTargeting} AudienceSegmentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSegmentTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.AudienceSegmentTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": - case 20005: - message.dimension = 20005; + switch (tag >>> 3) { + case 1: { + message.negative = reader.bool(); + break; + } + case 3: { + if (!(message.audienceSegments && message.audienceSegments.length)) + message.audienceSegments = []; + message.audienceSegments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": - case 20006: - message.dimension = 20006; + } + } + return message; + }; + + /** + * Decodes an AudienceSegmentTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.AudienceSegmentTargeting} AudienceSegmentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSegmentTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSegmentTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSegmentTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.negative != null && message.hasOwnProperty("negative")) { + properties._negative = 1; + if (typeof message.negative !== "boolean") + return "negative: boolean expected"; + } + if (message.audienceSegments != null && message.hasOwnProperty("audienceSegments")) { + if (!Array.isArray(message.audienceSegments)) + return "audienceSegments: array expected"; + for (var i = 0; i < message.audienceSegments.length; ++i) + if (!$util.isString(message.audienceSegments[i])) + return "audienceSegments: string[] expected"; + } + return null; + }; + + /** + * Creates an AudienceSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.AudienceSegmentTargeting} AudienceSegmentTargeting + */ + AudienceSegmentTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.AudienceSegmentTargeting) + return object; + var message = new $root.google.ads.admanager.v1.AudienceSegmentTargeting(); + if (object.negative != null) + message.negative = Boolean(object.negative); + if (object.audienceSegments) { + if (!Array.isArray(object.audienceSegments)) + throw TypeError(".google.ads.admanager.v1.AudienceSegmentTargeting.audienceSegments: array expected"); + message.audienceSegments = []; + for (var i = 0; i < object.audienceSegments.length; ++i) + message.audienceSegments[i] = String(object.audienceSegments[i]); + } + return message; + }; + + /** + * Creates a plain object from an AudienceSegmentTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {google.ads.admanager.v1.AudienceSegmentTargeting} message AudienceSegmentTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSegmentTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceSegments = []; + if (message.negative != null && message.hasOwnProperty("negative")) { + object.negative = message.negative; + if (options.oneofs) + object._negative = "negative"; + } + if (message.audienceSegments && message.audienceSegments.length) { + object.audienceSegments = []; + for (var j = 0; j < message.audienceSegments.length; ++j) + object.audienceSegments[j] = message.audienceSegments[j]; + } + return object; + }; + + /** + * Converts this AudienceSegmentTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @instance + * @returns {Object.} JSON object + */ + AudienceSegmentTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSegmentTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.AudienceSegmentTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSegmentTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.AudienceSegmentTargeting"; + }; + + return AudienceSegmentTargeting; + })(); + + v1.CmsMetadataTargeting = (function() { + + /** + * Properties of a CmsMetadataTargeting. + * @memberof google.ads.admanager.v1 + * @interface ICmsMetadataTargeting + * @property {boolean|null} [negative] CmsMetadataTargeting negative + * @property {Array.|null} [cmsMetadataValues] CmsMetadataTargeting cmsMetadataValues + */ + + /** + * Constructs a new CmsMetadataTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CmsMetadataTargeting. + * @implements ICmsMetadataTargeting + * @constructor + * @param {google.ads.admanager.v1.ICmsMetadataTargeting=} [properties] Properties to set + */ + function CmsMetadataTargeting(properties) { + this.cmsMetadataValues = []; + 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]]; + } + + /** + * CmsMetadataTargeting negative. + * @member {boolean|null|undefined} negative + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @instance + */ + CmsMetadataTargeting.prototype.negative = null; + + /** + * CmsMetadataTargeting cmsMetadataValues. + * @member {Array.} cmsMetadataValues + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @instance + */ + CmsMetadataTargeting.prototype.cmsMetadataValues = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CmsMetadataTargeting.prototype, "_negative", { + get: $util.oneOfGetter($oneOfFields = ["negative"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CmsMetadataTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {google.ads.admanager.v1.ICmsMetadataTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CmsMetadataTargeting} CmsMetadataTargeting instance + */ + CmsMetadataTargeting.create = function create(properties) { + return new CmsMetadataTargeting(properties); + }; + + /** + * Encodes the specified CmsMetadataTargeting message. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {google.ads.admanager.v1.ICmsMetadataTargeting} message CmsMetadataTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmsMetadataTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.negative); + if (message.cmsMetadataValues != null && message.cmsMetadataValues.length) + for (var i = 0; i < message.cmsMetadataValues.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cmsMetadataValues[i]); + return writer; + }; + + /** + * Encodes the specified CmsMetadataTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CmsMetadataTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {google.ads.admanager.v1.ICmsMetadataTargeting} message CmsMetadataTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmsMetadataTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CmsMetadataTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CmsMetadataTargeting} CmsMetadataTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmsMetadataTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CmsMetadataTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": - case 20007: - message.dimension = 20007; + switch (tag >>> 3) { + case 1: { + message.negative = reader.bool(); + break; + } + case 3: { + if (!(message.cmsMetadataValues && message.cmsMetadataValues.length)) + message.cmsMetadataValues = []; + message.cmsMetadataValues.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": - case 20008: - message.dimension = 20008; + } + } + return message; + }; + + /** + * Decodes a CmsMetadataTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CmsMetadataTargeting} CmsMetadataTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmsMetadataTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CmsMetadataTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmsMetadataTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.negative != null && message.hasOwnProperty("negative")) { + properties._negative = 1; + if (typeof message.negative !== "boolean") + return "negative: boolean expected"; + } + if (message.cmsMetadataValues != null && message.hasOwnProperty("cmsMetadataValues")) { + if (!Array.isArray(message.cmsMetadataValues)) + return "cmsMetadataValues: array expected"; + for (var i = 0; i < message.cmsMetadataValues.length; ++i) + if (!$util.isString(message.cmsMetadataValues[i])) + return "cmsMetadataValues: string[] expected"; + } + return null; + }; + + /** + * Creates a CmsMetadataTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CmsMetadataTargeting} CmsMetadataTargeting + */ + CmsMetadataTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CmsMetadataTargeting) + return object; + var message = new $root.google.ads.admanager.v1.CmsMetadataTargeting(); + if (object.negative != null) + message.negative = Boolean(object.negative); + if (object.cmsMetadataValues) { + if (!Array.isArray(object.cmsMetadataValues)) + throw TypeError(".google.ads.admanager.v1.CmsMetadataTargeting.cmsMetadataValues: array expected"); + message.cmsMetadataValues = []; + for (var i = 0; i < object.cmsMetadataValues.length; ++i) + message.cmsMetadataValues[i] = String(object.cmsMetadataValues[i]); + } + return message; + }; + + /** + * Creates a plain object from a CmsMetadataTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {google.ads.admanager.v1.CmsMetadataTargeting} message CmsMetadataTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmsMetadataTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cmsMetadataValues = []; + if (message.negative != null && message.hasOwnProperty("negative")) { + object.negative = message.negative; + if (options.oneofs) + object._negative = "negative"; + } + if (message.cmsMetadataValues && message.cmsMetadataValues.length) { + object.cmsMetadataValues = []; + for (var j = 0; j < message.cmsMetadataValues.length; ++j) + object.cmsMetadataValues[j] = message.cmsMetadataValues[j]; + } + return object; + }; + + /** + * Converts this CmsMetadataTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @instance + * @returns {Object.} JSON object + */ + CmsMetadataTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CmsMetadataTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CmsMetadataTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmsMetadataTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CmsMetadataTargeting"; + }; + + return CmsMetadataTargeting; + })(); + + v1.UserDomainTargeting = (function() { + + /** + * Properties of a UserDomainTargeting. + * @memberof google.ads.admanager.v1 + * @interface IUserDomainTargeting + * @property {Array.|null} [targetedUserDomains] UserDomainTargeting targetedUserDomains + * @property {Array.|null} [excludedUserDomains] UserDomainTargeting excludedUserDomains + */ + + /** + * Constructs a new UserDomainTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a UserDomainTargeting. + * @implements IUserDomainTargeting + * @constructor + * @param {google.ads.admanager.v1.IUserDomainTargeting=} [properties] Properties to set + */ + function UserDomainTargeting(properties) { + this.targetedUserDomains = []; + this.excludedUserDomains = []; + 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]]; + } + + /** + * UserDomainTargeting targetedUserDomains. + * @member {Array.} targetedUserDomains + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @instance + */ + UserDomainTargeting.prototype.targetedUserDomains = $util.emptyArray; + + /** + * UserDomainTargeting excludedUserDomains. + * @member {Array.} excludedUserDomains + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @instance + */ + UserDomainTargeting.prototype.excludedUserDomains = $util.emptyArray; + + /** + * Creates a new UserDomainTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {google.ads.admanager.v1.IUserDomainTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting instance + */ + UserDomainTargeting.create = function create(properties) { + return new UserDomainTargeting(properties); + }; + + /** + * Encodes the specified UserDomainTargeting message. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {google.ads.admanager.v1.IUserDomainTargeting} message UserDomainTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserDomainTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedUserDomains != null && message.targetedUserDomains.length) + for (var i = 0; i < message.targetedUserDomains.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetedUserDomains[i]); + if (message.excludedUserDomains != null && message.excludedUserDomains.length) + for (var i = 0; i < message.excludedUserDomains.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludedUserDomains[i]); + return writer; + }; + + /** + * Encodes the specified UserDomainTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UserDomainTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {google.ads.admanager.v1.IUserDomainTargeting} message UserDomainTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserDomainTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserDomainTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserDomainTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UserDomainTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": - case 20009: - message.dimension = 20009; + switch (tag >>> 3) { + case 1: { + if (!(message.targetedUserDomains && message.targetedUserDomains.length)) + message.targetedUserDomains = []; + message.targetedUserDomains.push(reader.string()); + break; + } + case 2: { + if (!(message.excludedUserDomains && message.excludedUserDomains.length)) + message.excludedUserDomains = []; + message.excludedUserDomains.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": - case 20010: - message.dimension = 20010; + } + } + return message; + }; + + /** + * Decodes a UserDomainTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserDomainTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserDomainTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserDomainTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedUserDomains != null && message.hasOwnProperty("targetedUserDomains")) { + if (!Array.isArray(message.targetedUserDomains)) + return "targetedUserDomains: array expected"; + for (var i = 0; i < message.targetedUserDomains.length; ++i) + if (!$util.isString(message.targetedUserDomains[i])) + return "targetedUserDomains: string[] expected"; + } + if (message.excludedUserDomains != null && message.hasOwnProperty("excludedUserDomains")) { + if (!Array.isArray(message.excludedUserDomains)) + return "excludedUserDomains: array expected"; + for (var i = 0; i < message.excludedUserDomains.length; ++i) + if (!$util.isString(message.excludedUserDomains[i])) + return "excludedUserDomains: string[] expected"; + } + return null; + }; + + /** + * Creates a UserDomainTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UserDomainTargeting} UserDomainTargeting + */ + UserDomainTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UserDomainTargeting) + return object; + var message = new $root.google.ads.admanager.v1.UserDomainTargeting(); + if (object.targetedUserDomains) { + if (!Array.isArray(object.targetedUserDomains)) + throw TypeError(".google.ads.admanager.v1.UserDomainTargeting.targetedUserDomains: array expected"); + message.targetedUserDomains = []; + for (var i = 0; i < object.targetedUserDomains.length; ++i) + message.targetedUserDomains[i] = String(object.targetedUserDomains[i]); + } + if (object.excludedUserDomains) { + if (!Array.isArray(object.excludedUserDomains)) + throw TypeError(".google.ads.admanager.v1.UserDomainTargeting.excludedUserDomains: array expected"); + message.excludedUserDomains = []; + for (var i = 0; i < object.excludedUserDomains.length; ++i) + message.excludedUserDomains[i] = String(object.excludedUserDomains[i]); + } + return message; + }; + + /** + * Creates a plain object from a UserDomainTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {google.ads.admanager.v1.UserDomainTargeting} message UserDomainTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserDomainTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedUserDomains = []; + object.excludedUserDomains = []; + } + if (message.targetedUserDomains && message.targetedUserDomains.length) { + object.targetedUserDomains = []; + for (var j = 0; j < message.targetedUserDomains.length; ++j) + object.targetedUserDomains[j] = message.targetedUserDomains[j]; + } + if (message.excludedUserDomains && message.excludedUserDomains.length) { + object.excludedUserDomains = []; + for (var j = 0; j < message.excludedUserDomains.length; ++j) + object.excludedUserDomains[j] = message.excludedUserDomains[j]; + } + return object; + }; + + /** + * Converts this UserDomainTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @instance + * @returns {Object.} JSON object + */ + UserDomainTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserDomainTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UserDomainTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserDomainTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UserDomainTargeting"; + }; + + return UserDomainTargeting; + })(); + + v1.VideoPositionTargeting = (function() { + + /** + * Properties of a VideoPositionTargeting. + * @memberof google.ads.admanager.v1 + * @interface IVideoPositionTargeting + * @property {Array.|null} [videoPositions] VideoPositionTargeting videoPositions + */ + + /** + * Constructs a new VideoPositionTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a VideoPositionTargeting. + * @implements IVideoPositionTargeting + * @constructor + * @param {google.ads.admanager.v1.IVideoPositionTargeting=} [properties] Properties to set + */ + function VideoPositionTargeting(properties) { + this.videoPositions = []; + 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]]; + } + + /** + * VideoPositionTargeting videoPositions. + * @member {Array.} videoPositions + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @instance + */ + VideoPositionTargeting.prototype.videoPositions = $util.emptyArray; + + /** + * Creates a new VideoPositionTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {google.ads.admanager.v1.IVideoPositionTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting instance + */ + VideoPositionTargeting.create = function create(properties) { + return new VideoPositionTargeting(properties); + }; + + /** + * Encodes the specified VideoPositionTargeting message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {google.ads.admanager.v1.IVideoPositionTargeting} message VideoPositionTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPositionTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.videoPositions != null && message.videoPositions.length) + for (var i = 0; i < message.videoPositions.length; ++i) + $root.google.ads.admanager.v1.VideoPosition.encode(message.videoPositions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VideoPositionTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {google.ads.admanager.v1.IVideoPositionTargeting} message VideoPositionTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPositionTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoPositionTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPositionTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPositionTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": - case 20011: - message.dimension = 20011; + switch (tag >>> 3) { + case 1: { + if (!(message.videoPositions && message.videoPositions.length)) + message.videoPositions = []; + message.videoPositions.push($root.google.ads.admanager.v1.VideoPosition.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": - case 20012: - message.dimension = 20012; + } + } + return message; + }; + + /** + * Decodes a VideoPositionTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPositionTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoPositionTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoPositionTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.videoPositions != null && message.hasOwnProperty("videoPositions")) { + if (!Array.isArray(message.videoPositions)) + return "videoPositions: array expected"; + for (var i = 0; i < message.videoPositions.length; ++i) { + var error = $root.google.ads.admanager.v1.VideoPosition.verify(message.videoPositions[i]); + if (error) + return "videoPositions." + error; + } + } + return null; + }; + + /** + * Creates a VideoPositionTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.VideoPositionTargeting} VideoPositionTargeting + */ + VideoPositionTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.VideoPositionTargeting) + return object; + var message = new $root.google.ads.admanager.v1.VideoPositionTargeting(); + if (object.videoPositions) { + if (!Array.isArray(object.videoPositions)) + throw TypeError(".google.ads.admanager.v1.VideoPositionTargeting.videoPositions: array expected"); + message.videoPositions = []; + for (var i = 0; i < object.videoPositions.length; ++i) { + if (typeof object.videoPositions[i] !== "object") + throw TypeError(".google.ads.admanager.v1.VideoPositionTargeting.videoPositions: object expected"); + message.videoPositions[i] = $root.google.ads.admanager.v1.VideoPosition.fromObject(object.videoPositions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VideoPositionTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {google.ads.admanager.v1.VideoPositionTargeting} message VideoPositionTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoPositionTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.videoPositions = []; + if (message.videoPositions && message.videoPositions.length) { + object.videoPositions = []; + for (var j = 0; j < message.videoPositions.length; ++j) + object.videoPositions[j] = $root.google.ads.admanager.v1.VideoPosition.toObject(message.videoPositions[j], options); + } + return object; + }; + + /** + * Converts this VideoPositionTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @instance + * @returns {Object.} JSON object + */ + VideoPositionTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VideoPositionTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.VideoPositionTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VideoPositionTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.VideoPositionTargeting"; + }; + + return VideoPositionTargeting; + })(); + + v1.VideoPosition = (function() { + + /** + * Properties of a VideoPosition. + * @memberof google.ads.admanager.v1 + * @interface IVideoPosition + * @property {number|Long|null} [midrollIndex] VideoPosition midrollIndex + * @property {number|Long|null} [reverseMidrollIndex] VideoPosition reverseMidrollIndex + * @property {number|Long|null} [podPosition] VideoPosition podPosition + * @property {google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null} [positionType] VideoPosition positionType + * @property {google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null} [bumperType] VideoPosition bumperType + */ + + /** + * Constructs a new VideoPosition. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a VideoPosition. + * @implements IVideoPosition + * @constructor + * @param {google.ads.admanager.v1.IVideoPosition=} [properties] Properties to set + */ + function VideoPosition(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]]; + } + + /** + * VideoPosition midrollIndex. + * @member {number|Long|null|undefined} midrollIndex + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + */ + VideoPosition.prototype.midrollIndex = null; + + /** + * VideoPosition reverseMidrollIndex. + * @member {number|Long|null|undefined} reverseMidrollIndex + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + */ + VideoPosition.prototype.reverseMidrollIndex = null; + + /** + * VideoPosition podPosition. + * @member {number|Long|null|undefined} podPosition + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + */ + VideoPosition.prototype.podPosition = null; + + /** + * VideoPosition positionType. + * @member {google.ads.admanager.v1.VideoPositionEnum.VideoPosition|null|undefined} positionType + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + */ + VideoPosition.prototype.positionType = null; + + /** + * VideoPosition bumperType. + * @member {google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType|null|undefined} bumperType + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + */ + VideoPosition.prototype.bumperType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoPosition.prototype, "_midrollIndex", { + get: $util.oneOfGetter($oneOfFields = ["midrollIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoPosition.prototype, "_reverseMidrollIndex", { + get: $util.oneOfGetter($oneOfFields = ["reverseMidrollIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoPosition.prototype, "_podPosition", { + get: $util.oneOfGetter($oneOfFields = ["podPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoPosition.prototype, "_positionType", { + get: $util.oneOfGetter($oneOfFields = ["positionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoPosition.prototype, "_bumperType", { + get: $util.oneOfGetter($oneOfFields = ["bumperType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VideoPosition instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {google.ads.admanager.v1.IVideoPosition=} [properties] Properties to set + * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition instance + */ + VideoPosition.create = function create(properties) { + return new VideoPosition(properties); + }; + + /** + * Encodes the specified VideoPosition message. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {google.ads.admanager.v1.IVideoPosition} message VideoPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.midrollIndex != null && Object.hasOwnProperty.call(message, "midrollIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.midrollIndex); + if (message.reverseMidrollIndex != null && Object.hasOwnProperty.call(message, "reverseMidrollIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.reverseMidrollIndex); + if (message.podPosition != null && Object.hasOwnProperty.call(message, "podPosition")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.podPosition); + if (message.positionType != null && Object.hasOwnProperty.call(message, "positionType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.positionType); + if (message.bumperType != null && Object.hasOwnProperty.call(message, "bumperType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.bumperType); + return writer; + }; + + /** + * Encodes the specified VideoPosition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {google.ads.admanager.v1.IVideoPosition} message VideoPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoPosition message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPosition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": - case 20013: - message.dimension = 20013; + switch (tag >>> 3) { + case 1: { + message.midrollIndex = reader.int64(); + break; + } + case 2: { + message.reverseMidrollIndex = reader.int64(); + break; + } + case 3: { + message.podPosition = reader.int64(); + break; + } + case 5: { + message.positionType = reader.int32(); + break; + } + case 6: { + message.bumperType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": - case 20014: - message.dimension = 20014; + } + } + return message; + }; + + /** + * Decodes a VideoPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoPosition message. + * @function verify + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.midrollIndex != null && message.hasOwnProperty("midrollIndex")) { + properties._midrollIndex = 1; + if (!$util.isInteger(message.midrollIndex) && !(message.midrollIndex && $util.isInteger(message.midrollIndex.low) && $util.isInteger(message.midrollIndex.high))) + return "midrollIndex: integer|Long expected"; + } + if (message.reverseMidrollIndex != null && message.hasOwnProperty("reverseMidrollIndex")) { + properties._reverseMidrollIndex = 1; + if (!$util.isInteger(message.reverseMidrollIndex) && !(message.reverseMidrollIndex && $util.isInteger(message.reverseMidrollIndex.low) && $util.isInteger(message.reverseMidrollIndex.high))) + return "reverseMidrollIndex: integer|Long expected"; + } + if (message.podPosition != null && message.hasOwnProperty("podPosition")) { + properties._podPosition = 1; + if (!$util.isInteger(message.podPosition) && !(message.podPosition && $util.isInteger(message.podPosition.low) && $util.isInteger(message.podPosition.high))) + return "podPosition: integer|Long expected"; + } + if (message.positionType != null && message.hasOwnProperty("positionType")) { + properties._positionType = 1; + switch (message.positionType) { + default: + return "positionType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": - case 21000: - message.dimension = 21000; + } + } + if (message.bumperType != null && message.hasOwnProperty("bumperType")) { + properties._bumperType = 1; + switch (message.bumperType) { + default: + return "bumperType: enum value expected"; + case 0: + case 1: + case 2: break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": - case 21001: - message.dimension = 21001; + } + } + return null; + }; + + /** + * Creates a VideoPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.VideoPosition} VideoPosition + */ + VideoPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.VideoPosition) + return object; + var message = new $root.google.ads.admanager.v1.VideoPosition(); + if (object.midrollIndex != null) + if ($util.Long) + (message.midrollIndex = $util.Long.fromValue(object.midrollIndex)).unsigned = false; + else if (typeof object.midrollIndex === "string") + message.midrollIndex = parseInt(object.midrollIndex, 10); + else if (typeof object.midrollIndex === "number") + message.midrollIndex = object.midrollIndex; + else if (typeof object.midrollIndex === "object") + message.midrollIndex = new $util.LongBits(object.midrollIndex.low >>> 0, object.midrollIndex.high >>> 0).toNumber(); + if (object.reverseMidrollIndex != null) + if ($util.Long) + (message.reverseMidrollIndex = $util.Long.fromValue(object.reverseMidrollIndex)).unsigned = false; + else if (typeof object.reverseMidrollIndex === "string") + message.reverseMidrollIndex = parseInt(object.reverseMidrollIndex, 10); + else if (typeof object.reverseMidrollIndex === "number") + message.reverseMidrollIndex = object.reverseMidrollIndex; + else if (typeof object.reverseMidrollIndex === "object") + message.reverseMidrollIndex = new $util.LongBits(object.reverseMidrollIndex.low >>> 0, object.reverseMidrollIndex.high >>> 0).toNumber(); + if (object.podPosition != null) + if ($util.Long) + (message.podPosition = $util.Long.fromValue(object.podPosition)).unsigned = false; + else if (typeof object.podPosition === "string") + message.podPosition = parseInt(object.podPosition, 10); + else if (typeof object.podPosition === "number") + message.podPosition = object.podPosition; + else if (typeof object.podPosition === "object") + message.podPosition = new $util.LongBits(object.podPosition.low >>> 0, object.podPosition.high >>> 0).toNumber(); + switch (object.positionType) { + default: + if (typeof object.positionType === "number") { + message.positionType = object.positionType; break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": - case 21002: - message.dimension = 21002; + } + break; + case "VIDEO_POSITION_UNSPECIFIED": + case 0: + message.positionType = 0; + break; + case "ALL": + case 1: + message.positionType = 1; + break; + case "MIDROLL": + case 2: + message.positionType = 2; + break; + case "POSTROLL": + case 3: + message.positionType = 3; + break; + case "PREROLL": + case 4: + message.positionType = 4; + break; + } + switch (object.bumperType) { + default: + if (typeof object.bumperType === "number") { + message.bumperType = object.bumperType; break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": - case 21003: - message.dimension = 21003; + } + break; + case "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED": + case 0: + message.bumperType = 0; + break; + case "AFTER": + case 1: + message.bumperType = 1; + break; + case "BEFORE": + case 2: + message.bumperType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a VideoPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {google.ads.admanager.v1.VideoPosition} message VideoPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoPosition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.midrollIndex != null && message.hasOwnProperty("midrollIndex")) { + if (typeof message.midrollIndex === "number") + object.midrollIndex = options.longs === String ? String(message.midrollIndex) : message.midrollIndex; + else + object.midrollIndex = options.longs === String ? $util.Long.prototype.toString.call(message.midrollIndex) : options.longs === Number ? new $util.LongBits(message.midrollIndex.low >>> 0, message.midrollIndex.high >>> 0).toNumber() : message.midrollIndex; + if (options.oneofs) + object._midrollIndex = "midrollIndex"; + } + if (message.reverseMidrollIndex != null && message.hasOwnProperty("reverseMidrollIndex")) { + if (typeof message.reverseMidrollIndex === "number") + object.reverseMidrollIndex = options.longs === String ? String(message.reverseMidrollIndex) : message.reverseMidrollIndex; + else + object.reverseMidrollIndex = options.longs === String ? $util.Long.prototype.toString.call(message.reverseMidrollIndex) : options.longs === Number ? new $util.LongBits(message.reverseMidrollIndex.low >>> 0, message.reverseMidrollIndex.high >>> 0).toNumber() : message.reverseMidrollIndex; + if (options.oneofs) + object._reverseMidrollIndex = "reverseMidrollIndex"; + } + if (message.podPosition != null && message.hasOwnProperty("podPosition")) { + if (typeof message.podPosition === "number") + object.podPosition = options.longs === String ? String(message.podPosition) : message.podPosition; + else + object.podPosition = options.longs === String ? $util.Long.prototype.toString.call(message.podPosition) : options.longs === Number ? new $util.LongBits(message.podPosition.low >>> 0, message.podPosition.high >>> 0).toNumber() : message.podPosition; + if (options.oneofs) + object._podPosition = "podPosition"; + } + if (message.positionType != null && message.hasOwnProperty("positionType")) { + object.positionType = options.enums === String ? $root.google.ads.admanager.v1.VideoPositionEnum.VideoPosition[message.positionType] === undefined ? message.positionType : $root.google.ads.admanager.v1.VideoPositionEnum.VideoPosition[message.positionType] : message.positionType; + if (options.oneofs) + object._positionType = "positionType"; + } + if (message.bumperType != null && message.hasOwnProperty("bumperType")) { + object.bumperType = options.enums === String ? $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType[message.bumperType] === undefined ? message.bumperType : $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType[message.bumperType] : message.bumperType; + if (options.oneofs) + object._bumperType = "bumperType"; + } + return object; + }; + + /** + * Converts this VideoPosition to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.VideoPosition + * @instance + * @returns {Object.} JSON object + */ + VideoPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VideoPosition + * @function getTypeUrl + * @memberof google.ads.admanager.v1.VideoPosition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VideoPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.VideoPosition"; + }; + + return VideoPosition; + })(); + + v1.DataSegmentTargeting = (function() { + + /** + * Properties of a DataSegmentTargeting. + * @memberof google.ads.admanager.v1 + * @interface IDataSegmentTargeting + * @property {boolean|null} [hasDataSegmentTargeting] DataSegmentTargeting hasDataSegmentTargeting + */ + + /** + * Constructs a new DataSegmentTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DataSegmentTargeting. + * @implements IDataSegmentTargeting + * @constructor + * @param {google.ads.admanager.v1.IDataSegmentTargeting=} [properties] Properties to set + */ + function DataSegmentTargeting(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]]; + } + + /** + * DataSegmentTargeting hasDataSegmentTargeting. + * @member {boolean} hasDataSegmentTargeting + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @instance + */ + DataSegmentTargeting.prototype.hasDataSegmentTargeting = false; + + /** + * Creates a new DataSegmentTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IDataSegmentTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting instance + */ + DataSegmentTargeting.create = function create(properties) { + return new DataSegmentTargeting(properties); + }; + + /** + * Encodes the specified DataSegmentTargeting message. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IDataSegmentTargeting} message DataSegmentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSegmentTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hasDataSegmentTargeting != null && Object.hasOwnProperty.call(message, "hasDataSegmentTargeting")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.hasDataSegmentTargeting); + return writer; + }; + + /** + * Encodes the specified DataSegmentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DataSegmentTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {google.ads.admanager.v1.IDataSegmentTargeting} message DataSegmentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSegmentTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSegmentTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSegmentTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DataSegmentTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": - case 21004: - message.dimension = 21004; + switch (tag >>> 3) { + case 2: { + message.hasDataSegmentTargeting = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": - case 21005: - message.dimension = 21005; + } + } + return message; + }; + + /** + * Decodes a DataSegmentTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSegmentTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSegmentTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSegmentTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hasDataSegmentTargeting != null && message.hasOwnProperty("hasDataSegmentTargeting")) + if (typeof message.hasDataSegmentTargeting !== "boolean") + return "hasDataSegmentTargeting: boolean expected"; + return null; + }; + + /** + * Creates a DataSegmentTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DataSegmentTargeting} DataSegmentTargeting + */ + DataSegmentTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DataSegmentTargeting) + return object; + var message = new $root.google.ads.admanager.v1.DataSegmentTargeting(); + if (object.hasDataSegmentTargeting != null) + message.hasDataSegmentTargeting = Boolean(object.hasDataSegmentTargeting); + return message; + }; + + /** + * Creates a plain object from a DataSegmentTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {google.ads.admanager.v1.DataSegmentTargeting} message DataSegmentTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSegmentTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.hasDataSegmentTargeting = false; + if (message.hasDataSegmentTargeting != null && message.hasOwnProperty("hasDataSegmentTargeting")) + object.hasDataSegmentTargeting = message.hasDataSegmentTargeting; + return object; + }; + + /** + * Converts this DataSegmentTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @instance + * @returns {Object.} JSON object + */ + DataSegmentTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSegmentTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DataSegmentTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSegmentTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DataSegmentTargeting"; + }; + + return DataSegmentTargeting; + })(); + + v1.ContentTargeting = (function() { + + /** + * Properties of a ContentTargeting. + * @memberof google.ads.admanager.v1 + * @interface IContentTargeting + * @property {Array.|null} [targetedContent] ContentTargeting targetedContent + * @property {Array.|null} [excludedContent] ContentTargeting excludedContent + * @property {Array.|null} [targetedContentBundles] ContentTargeting targetedContentBundles + * @property {Array.|null} [excludedContentBundles] ContentTargeting excludedContentBundles + */ + + /** + * Constructs a new ContentTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ContentTargeting. + * @implements IContentTargeting + * @constructor + * @param {google.ads.admanager.v1.IContentTargeting=} [properties] Properties to set + */ + function ContentTargeting(properties) { + this.targetedContent = []; + this.excludedContent = []; + this.targetedContentBundles = []; + this.excludedContentBundles = []; + 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]]; + } + + /** + * ContentTargeting targetedContent. + * @member {Array.} targetedContent + * @memberof google.ads.admanager.v1.ContentTargeting + * @instance + */ + ContentTargeting.prototype.targetedContent = $util.emptyArray; + + /** + * ContentTargeting excludedContent. + * @member {Array.} excludedContent + * @memberof google.ads.admanager.v1.ContentTargeting + * @instance + */ + ContentTargeting.prototype.excludedContent = $util.emptyArray; + + /** + * ContentTargeting targetedContentBundles. + * @member {Array.} targetedContentBundles + * @memberof google.ads.admanager.v1.ContentTargeting + * @instance + */ + ContentTargeting.prototype.targetedContentBundles = $util.emptyArray; + + /** + * ContentTargeting excludedContentBundles. + * @member {Array.} excludedContentBundles + * @memberof google.ads.admanager.v1.ContentTargeting + * @instance + */ + ContentTargeting.prototype.excludedContentBundles = $util.emptyArray; + + /** + * Creates a new ContentTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {google.ads.admanager.v1.IContentTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ContentTargeting} ContentTargeting instance + */ + ContentTargeting.create = function create(properties) { + return new ContentTargeting(properties); + }; + + /** + * Encodes the specified ContentTargeting message. Does not implicitly {@link google.ads.admanager.v1.ContentTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {google.ads.admanager.v1.IContentTargeting} message ContentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedContent != null && message.targetedContent.length) + for (var i = 0; i < message.targetedContent.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetedContent[i]); + if (message.excludedContent != null && message.excludedContent.length) + for (var i = 0; i < message.excludedContent.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedContent[i]); + if (message.targetedContentBundles != null && message.targetedContentBundles.length) + for (var i = 0; i < message.targetedContentBundles.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetedContentBundles[i]); + if (message.excludedContentBundles != null && message.excludedContentBundles.length) + for (var i = 0; i < message.excludedContentBundles.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedContentBundles[i]); + return writer; + }; + + /** + * Encodes the specified ContentTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ContentTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {google.ads.admanager.v1.IContentTargeting} message ContentTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ContentTargeting} ContentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ContentTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": - case 21006: - message.dimension = 21006; + switch (tag >>> 3) { + case 5: { + if (!(message.targetedContent && message.targetedContent.length)) + message.targetedContent = []; + message.targetedContent.push(reader.string()); + break; + } + case 6: { + if (!(message.excludedContent && message.excludedContent.length)) + message.excludedContent = []; + message.excludedContent.push(reader.string()); + break; + } + case 7: { + if (!(message.targetedContentBundles && message.targetedContentBundles.length)) + message.targetedContentBundles = []; + message.targetedContentBundles.push(reader.string()); + break; + } + case 8: { + if (!(message.excludedContentBundles && message.excludedContentBundles.length)) + message.excludedContentBundles = []; + message.excludedContentBundles.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": - case 21007: - message.dimension = 21007; + } + } + return message; + }; + + /** + * Decodes a ContentTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ContentTargeting} ContentTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedContent != null && message.hasOwnProperty("targetedContent")) { + if (!Array.isArray(message.targetedContent)) + return "targetedContent: array expected"; + for (var i = 0; i < message.targetedContent.length; ++i) + if (!$util.isString(message.targetedContent[i])) + return "targetedContent: string[] expected"; + } + if (message.excludedContent != null && message.hasOwnProperty("excludedContent")) { + if (!Array.isArray(message.excludedContent)) + return "excludedContent: array expected"; + for (var i = 0; i < message.excludedContent.length; ++i) + if (!$util.isString(message.excludedContent[i])) + return "excludedContent: string[] expected"; + } + if (message.targetedContentBundles != null && message.hasOwnProperty("targetedContentBundles")) { + if (!Array.isArray(message.targetedContentBundles)) + return "targetedContentBundles: array expected"; + for (var i = 0; i < message.targetedContentBundles.length; ++i) + if (!$util.isString(message.targetedContentBundles[i])) + return "targetedContentBundles: string[] expected"; + } + if (message.excludedContentBundles != null && message.hasOwnProperty("excludedContentBundles")) { + if (!Array.isArray(message.excludedContentBundles)) + return "excludedContentBundles: array expected"; + for (var i = 0; i < message.excludedContentBundles.length; ++i) + if (!$util.isString(message.excludedContentBundles[i])) + return "excludedContentBundles: string[] expected"; + } + return null; + }; + + /** + * Creates a ContentTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ContentTargeting} ContentTargeting + */ + ContentTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ContentTargeting) + return object; + var message = new $root.google.ads.admanager.v1.ContentTargeting(); + if (object.targetedContent) { + if (!Array.isArray(object.targetedContent)) + throw TypeError(".google.ads.admanager.v1.ContentTargeting.targetedContent: array expected"); + message.targetedContent = []; + for (var i = 0; i < object.targetedContent.length; ++i) + message.targetedContent[i] = String(object.targetedContent[i]); + } + if (object.excludedContent) { + if (!Array.isArray(object.excludedContent)) + throw TypeError(".google.ads.admanager.v1.ContentTargeting.excludedContent: array expected"); + message.excludedContent = []; + for (var i = 0; i < object.excludedContent.length; ++i) + message.excludedContent[i] = String(object.excludedContent[i]); + } + if (object.targetedContentBundles) { + if (!Array.isArray(object.targetedContentBundles)) + throw TypeError(".google.ads.admanager.v1.ContentTargeting.targetedContentBundles: array expected"); + message.targetedContentBundles = []; + for (var i = 0; i < object.targetedContentBundles.length; ++i) + message.targetedContentBundles[i] = String(object.targetedContentBundles[i]); + } + if (object.excludedContentBundles) { + if (!Array.isArray(object.excludedContentBundles)) + throw TypeError(".google.ads.admanager.v1.ContentTargeting.excludedContentBundles: array expected"); + message.excludedContentBundles = []; + for (var i = 0; i < object.excludedContentBundles.length; ++i) + message.excludedContentBundles[i] = String(object.excludedContentBundles[i]); + } + return message; + }; + + /** + * Creates a plain object from a ContentTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {google.ads.admanager.v1.ContentTargeting} message ContentTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedContent = []; + object.excludedContent = []; + object.targetedContentBundles = []; + object.excludedContentBundles = []; + } + if (message.targetedContent && message.targetedContent.length) { + object.targetedContent = []; + for (var j = 0; j < message.targetedContent.length; ++j) + object.targetedContent[j] = message.targetedContent[j]; + } + if (message.excludedContent && message.excludedContent.length) { + object.excludedContent = []; + for (var j = 0; j < message.excludedContent.length; ++j) + object.excludedContent[j] = message.excludedContent[j]; + } + if (message.targetedContentBundles && message.targetedContentBundles.length) { + object.targetedContentBundles = []; + for (var j = 0; j < message.targetedContentBundles.length; ++j) + object.targetedContentBundles[j] = message.targetedContentBundles[j]; + } + if (message.excludedContentBundles && message.excludedContentBundles.length) { + object.excludedContentBundles = []; + for (var j = 0; j < message.excludedContentBundles.length; ++j) + object.excludedContentBundles[j] = message.excludedContentBundles[j]; + } + return object; + }; + + /** + * Converts this ContentTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ContentTargeting + * @instance + * @returns {Object.} JSON object + */ + ContentTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ContentTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ContentTargeting"; + }; + + return ContentTargeting; + })(); + + v1.MobileApplicationTargeting = (function() { + + /** + * Properties of a MobileApplicationTargeting. + * @memberof google.ads.admanager.v1 + * @interface IMobileApplicationTargeting + * @property {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting|null} [firstPartyTargeting] MobileApplicationTargeting firstPartyTargeting + */ + + /** + * Constructs a new MobileApplicationTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a MobileApplicationTargeting. + * @implements IMobileApplicationTargeting + * @constructor + * @param {google.ads.admanager.v1.IMobileApplicationTargeting=} [properties] Properties to set + */ + function MobileApplicationTargeting(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]]; + } + + /** + * MobileApplicationTargeting firstPartyTargeting. + * @member {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting|null|undefined} firstPartyTargeting + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @instance + */ + MobileApplicationTargeting.prototype.firstPartyTargeting = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MobileApplicationTargeting targeting. + * @member {"firstPartyTargeting"|undefined} targeting + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @instance + */ + Object.defineProperty(MobileApplicationTargeting.prototype, "targeting", { + get: $util.oneOfGetter($oneOfFields = ["firstPartyTargeting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileApplicationTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IMobileApplicationTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.MobileApplicationTargeting} MobileApplicationTargeting instance + */ + MobileApplicationTargeting.create = function create(properties) { + return new MobileApplicationTargeting(properties); + }; + + /** + * Encodes the specified MobileApplicationTargeting message. Does not implicitly {@link google.ads.admanager.v1.MobileApplicationTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IMobileApplicationTargeting} message MobileApplicationTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileApplicationTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyTargeting != null && Object.hasOwnProperty.call(message, "firstPartyTargeting")) + $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.encode(message.firstPartyTargeting, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MobileApplicationTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.MobileApplicationTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IMobileApplicationTargeting} message MobileApplicationTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileApplicationTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileApplicationTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.MobileApplicationTargeting} MobileApplicationTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileApplicationTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.MobileApplicationTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": - case 21008: - message.dimension = 21008; + switch (tag >>> 3) { + case 1: { + message.firstPartyTargeting = $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": - case 21009: - message.dimension = 21009; + } + } + return message; + }; + + /** + * Decodes a MobileApplicationTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.MobileApplicationTargeting} MobileApplicationTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileApplicationTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileApplicationTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileApplicationTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.firstPartyTargeting != null && message.hasOwnProperty("firstPartyTargeting")) { + properties.targeting = 1; + { + var error = $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.verify(message.firstPartyTargeting); + if (error) + return "firstPartyTargeting." + error; + } + } + return null; + }; + + /** + * Creates a MobileApplicationTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.MobileApplicationTargeting} MobileApplicationTargeting + */ + MobileApplicationTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.MobileApplicationTargeting) + return object; + var message = new $root.google.ads.admanager.v1.MobileApplicationTargeting(); + if (object.firstPartyTargeting != null) { + if (typeof object.firstPartyTargeting !== "object") + throw TypeError(".google.ads.admanager.v1.MobileApplicationTargeting.firstPartyTargeting: object expected"); + message.firstPartyTargeting = $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.fromObject(object.firstPartyTargeting); + } + return message; + }; + + /** + * Creates a plain object from a MobileApplicationTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.MobileApplicationTargeting} message MobileApplicationTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileApplicationTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.firstPartyTargeting != null && message.hasOwnProperty("firstPartyTargeting")) { + object.firstPartyTargeting = $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.toObject(message.firstPartyTargeting, options); + if (options.oneofs) + object.targeting = "firstPartyTargeting"; + } + return object; + }; + + /** + * Converts this MobileApplicationTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @instance + * @returns {Object.} JSON object + */ + MobileApplicationTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileApplicationTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.MobileApplicationTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileApplicationTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.MobileApplicationTargeting"; + }; + + return MobileApplicationTargeting; + })(); + + v1.FirstPartyMobileApplicationTargeting = (function() { + + /** + * Properties of a FirstPartyMobileApplicationTargeting. + * @memberof google.ads.admanager.v1 + * @interface IFirstPartyMobileApplicationTargeting + * @property {Array.|null} [targetedApplications] FirstPartyMobileApplicationTargeting targetedApplications + * @property {Array.|null} [excludedApplications] FirstPartyMobileApplicationTargeting excludedApplications + */ + + /** + * Constructs a new FirstPartyMobileApplicationTargeting. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a FirstPartyMobileApplicationTargeting. + * @implements IFirstPartyMobileApplicationTargeting + * @constructor + * @param {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting=} [properties] Properties to set + */ + function FirstPartyMobileApplicationTargeting(properties) { + this.targetedApplications = []; + this.excludedApplications = []; + 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]]; + } + + /** + * FirstPartyMobileApplicationTargeting targetedApplications. + * @member {Array.} targetedApplications + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @instance + */ + FirstPartyMobileApplicationTargeting.prototype.targetedApplications = $util.emptyArray; + + /** + * FirstPartyMobileApplicationTargeting excludedApplications. + * @member {Array.} excludedApplications + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @instance + */ + FirstPartyMobileApplicationTargeting.prototype.excludedApplications = $util.emptyArray; + + /** + * Creates a new FirstPartyMobileApplicationTargeting instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting=} [properties] Properties to set + * @returns {google.ads.admanager.v1.FirstPartyMobileApplicationTargeting} FirstPartyMobileApplicationTargeting instance + */ + FirstPartyMobileApplicationTargeting.create = function create(properties) { + return new FirstPartyMobileApplicationTargeting(properties); + }; + + /** + * Encodes the specified FirstPartyMobileApplicationTargeting message. Does not implicitly {@link google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting} message FirstPartyMobileApplicationTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirstPartyMobileApplicationTargeting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetedApplications != null && message.targetedApplications.length) + for (var i = 0; i < message.targetedApplications.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetedApplications[i]); + if (message.excludedApplications != null && message.excludedApplications.length) + for (var i = 0; i < message.excludedApplications.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedApplications[i]); + return writer; + }; + + /** + * Encodes the specified FirstPartyMobileApplicationTargeting message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.IFirstPartyMobileApplicationTargeting} message FirstPartyMobileApplicationTargeting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirstPartyMobileApplicationTargeting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirstPartyMobileApplicationTargeting message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.FirstPartyMobileApplicationTargeting} FirstPartyMobileApplicationTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirstPartyMobileApplicationTargeting.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": - case 21010: - message.dimension = 21010; + switch (tag >>> 3) { + case 3: { + if (!(message.targetedApplications && message.targetedApplications.length)) + message.targetedApplications = []; + message.targetedApplications.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedApplications && message.excludedApplications.length)) + message.excludedApplications = []; + message.excludedApplications.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": - case 21011: - message.dimension = 21011; + } + } + return message; + }; + + /** + * Decodes a FirstPartyMobileApplicationTargeting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.FirstPartyMobileApplicationTargeting} FirstPartyMobileApplicationTargeting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirstPartyMobileApplicationTargeting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirstPartyMobileApplicationTargeting message. + * @function verify + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirstPartyMobileApplicationTargeting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetedApplications != null && message.hasOwnProperty("targetedApplications")) { + if (!Array.isArray(message.targetedApplications)) + return "targetedApplications: array expected"; + for (var i = 0; i < message.targetedApplications.length; ++i) + if (!$util.isString(message.targetedApplications[i])) + return "targetedApplications: string[] expected"; + } + if (message.excludedApplications != null && message.hasOwnProperty("excludedApplications")) { + if (!Array.isArray(message.excludedApplications)) + return "excludedApplications: array expected"; + for (var i = 0; i < message.excludedApplications.length; ++i) + if (!$util.isString(message.excludedApplications[i])) + return "excludedApplications: string[] expected"; + } + return null; + }; + + /** + * Creates a FirstPartyMobileApplicationTargeting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.FirstPartyMobileApplicationTargeting} FirstPartyMobileApplicationTargeting + */ + FirstPartyMobileApplicationTargeting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting) + return object; + var message = new $root.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting(); + if (object.targetedApplications) { + if (!Array.isArray(object.targetedApplications)) + throw TypeError(".google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.targetedApplications: array expected"); + message.targetedApplications = []; + for (var i = 0; i < object.targetedApplications.length; ++i) + message.targetedApplications[i] = String(object.targetedApplications[i]); + } + if (object.excludedApplications) { + if (!Array.isArray(object.excludedApplications)) + throw TypeError(".google.ads.admanager.v1.FirstPartyMobileApplicationTargeting.excludedApplications: array expected"); + message.excludedApplications = []; + for (var i = 0; i < object.excludedApplications.length; ++i) + message.excludedApplications[i] = String(object.excludedApplications[i]); + } + return message; + }; + + /** + * Creates a plain object from a FirstPartyMobileApplicationTargeting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {google.ads.admanager.v1.FirstPartyMobileApplicationTargeting} message FirstPartyMobileApplicationTargeting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirstPartyMobileApplicationTargeting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetedApplications = []; + object.excludedApplications = []; + } + if (message.targetedApplications && message.targetedApplications.length) { + object.targetedApplications = []; + for (var j = 0; j < message.targetedApplications.length; ++j) + object.targetedApplications[j] = message.targetedApplications[j]; + } + if (message.excludedApplications && message.excludedApplications.length) { + object.excludedApplications = []; + for (var j = 0; j < message.excludedApplications.length; ++j) + object.excludedApplications[j] = message.excludedApplications[j]; + } + return object; + }; + + /** + * Converts this FirstPartyMobileApplicationTargeting to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @instance + * @returns {Object.} JSON object + */ + FirstPartyMobileApplicationTargeting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirstPartyMobileApplicationTargeting + * @function getTypeUrl + * @memberof google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirstPartyMobileApplicationTargeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.FirstPartyMobileApplicationTargeting"; + }; + + return FirstPartyMobileApplicationTargeting; + })(); + + v1.RequestPlatformEnum = (function() { + + /** + * Properties of a RequestPlatformEnum. + * @memberof google.ads.admanager.v1 + * @interface IRequestPlatformEnum + */ + + /** + * Constructs a new RequestPlatformEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RequestPlatformEnum. + * @implements IRequestPlatformEnum + * @constructor + * @param {google.ads.admanager.v1.IRequestPlatformEnum=} [properties] Properties to set + */ + function RequestPlatformEnum(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 RequestPlatformEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {google.ads.admanager.v1.IRequestPlatformEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum instance + */ + RequestPlatformEnum.create = function create(properties) { + return new RequestPlatformEnum(properties); + }; + + /** + * Encodes the specified RequestPlatformEnum message. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {google.ads.admanager.v1.IRequestPlatformEnum} message RequestPlatformEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPlatformEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestPlatformEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RequestPlatformEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {google.ads.admanager.v1.IRequestPlatformEnum} message RequestPlatformEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPlatformEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestPlatformEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPlatformEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RequestPlatformEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": - case 21012: - message.dimension = 21012; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": - case 21013: - message.dimension = 21013; + } + } + return message; + }; + + /** + * Decodes a RequestPlatformEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPlatformEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestPlatformEnum message. + * @function verify + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestPlatformEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestPlatformEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RequestPlatformEnum} RequestPlatformEnum + */ + RequestPlatformEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RequestPlatformEnum) + return object; + return new $root.google.ads.admanager.v1.RequestPlatformEnum(); + }; + + /** + * Creates a plain object from a RequestPlatformEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {google.ads.admanager.v1.RequestPlatformEnum} message RequestPlatformEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestPlatformEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestPlatformEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @instance + * @returns {Object.} JSON object + */ + RequestPlatformEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestPlatformEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RequestPlatformEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestPlatformEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RequestPlatformEnum"; + }; + + /** + * RequestPlatform enum. + * @name google.ads.admanager.v1.RequestPlatformEnum.RequestPlatform + * @enum {number} + * @property {number} REQUEST_PLATFORM_UNSPECIFIED=0 REQUEST_PLATFORM_UNSPECIFIED value + * @property {number} BROWSER=1 BROWSER value + * @property {number} MOBILE_APP=2 MOBILE_APP value + * @property {number} VIDEO_PLAYER=3 VIDEO_PLAYER value + */ + RequestPlatformEnum.RequestPlatform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REQUEST_PLATFORM_UNSPECIFIED"] = 0; + values[valuesById[1] = "BROWSER"] = 1; + values[valuesById[2] = "MOBILE_APP"] = 2; + values[valuesById[3] = "VIDEO_PLAYER"] = 3; + return values; + })(); + + return RequestPlatformEnum; + })(); + + v1.TargetedVideoBumperTypeEnum = (function() { + + /** + * Properties of a TargetedVideoBumperTypeEnum. + * @memberof google.ads.admanager.v1 + * @interface ITargetedVideoBumperTypeEnum + */ + + /** + * Constructs a new TargetedVideoBumperTypeEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a TargetedVideoBumperTypeEnum. + * @implements ITargetedVideoBumperTypeEnum + * @constructor + * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum=} [properties] Properties to set + */ + function TargetedVideoBumperTypeEnum(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 TargetedVideoBumperTypeEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum instance + */ + TargetedVideoBumperTypeEnum.create = function create(properties) { + return new TargetedVideoBumperTypeEnum(properties); + }; + + /** + * Encodes the specified TargetedVideoBumperTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetedVideoBumperTypeEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified TargetedVideoBumperTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TargetedVideoBumperTypeEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {google.ads.admanager.v1.ITargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetedVideoBumperTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetedVideoBumperTypeEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": - case 21014: - message.dimension = 21014; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_0_VALUE_ID": - case 100000: - message.dimension = 100000; + } + } + return message; + }; + + /** + * Decodes a TargetedVideoBumperTypeEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetedVideoBumperTypeEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetedVideoBumperTypeEnum message. + * @function verify + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetedVideoBumperTypeEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a TargetedVideoBumperTypeEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} TargetedVideoBumperTypeEnum + */ + TargetedVideoBumperTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum) + return object; + return new $root.google.ads.admanager.v1.TargetedVideoBumperTypeEnum(); + }; + + /** + * Creates a plain object from a TargetedVideoBumperTypeEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {google.ads.admanager.v1.TargetedVideoBumperTypeEnum} message TargetedVideoBumperTypeEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetedVideoBumperTypeEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this TargetedVideoBumperTypeEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @instance + * @returns {Object.} JSON object + */ + TargetedVideoBumperTypeEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetedVideoBumperTypeEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.TargetedVideoBumperTypeEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetedVideoBumperTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.TargetedVideoBumperTypeEnum"; + }; + + /** + * TargetedVideoBumperType enum. + * @name google.ads.admanager.v1.TargetedVideoBumperTypeEnum.TargetedVideoBumperType + * @enum {number} + * @property {number} TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED=0 TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED value + * @property {number} AFTER=1 AFTER value + * @property {number} BEFORE=2 BEFORE value + */ + TargetedVideoBumperTypeEnum.TargetedVideoBumperType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AFTER"] = 1; + values[valuesById[2] = "BEFORE"] = 2; + return values; + })(); + + return TargetedVideoBumperTypeEnum; + })(); + + v1.VideoPositionEnum = (function() { + + /** + * Properties of a VideoPositionEnum. + * @memberof google.ads.admanager.v1 + * @interface IVideoPositionEnum + */ + + /** + * Constructs a new VideoPositionEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a VideoPositionEnum. + * @implements IVideoPositionEnum + * @constructor + * @param {google.ads.admanager.v1.IVideoPositionEnum=} [properties] Properties to set + */ + function VideoPositionEnum(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 VideoPositionEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {google.ads.admanager.v1.IVideoPositionEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum instance + */ + VideoPositionEnum.create = function create(properties) { + return new VideoPositionEnum(properties); + }; + + /** + * Encodes the specified VideoPositionEnum message. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {google.ads.admanager.v1.IVideoPositionEnum} message VideoPositionEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPositionEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VideoPositionEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.VideoPositionEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {google.ads.admanager.v1.IVideoPositionEnum} message VideoPositionEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoPositionEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoPositionEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPositionEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.VideoPositionEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_1_VALUE_ID": - case 100001: - message.dimension = 100001; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_2_VALUE_ID": - case 100002: - message.dimension = 100002; + } + } + return message; + }; + + /** + * Decodes a VideoPositionEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoPositionEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoPositionEnum message. + * @function verify + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoPositionEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VideoPositionEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.VideoPositionEnum} VideoPositionEnum + */ + VideoPositionEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.VideoPositionEnum) + return object; + return new $root.google.ads.admanager.v1.VideoPositionEnum(); + }; + + /** + * Creates a plain object from a VideoPositionEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {google.ads.admanager.v1.VideoPositionEnum} message VideoPositionEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoPositionEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VideoPositionEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @instance + * @returns {Object.} JSON object + */ + VideoPositionEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VideoPositionEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.VideoPositionEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VideoPositionEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.VideoPositionEnum"; + }; + + /** + * VideoPosition enum. + * @name google.ads.admanager.v1.VideoPositionEnum.VideoPosition + * @enum {number} + * @property {number} VIDEO_POSITION_UNSPECIFIED=0 VIDEO_POSITION_UNSPECIFIED value + * @property {number} ALL=1 ALL value + * @property {number} MIDROLL=2 MIDROLL value + * @property {number} POSTROLL=3 POSTROLL value + * @property {number} PREROLL=4 PREROLL value + */ + VideoPositionEnum.VideoPosition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIDEO_POSITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL"] = 1; + values[valuesById[2] = "MIDROLL"] = 2; + values[valuesById[3] = "POSTROLL"] = 3; + values[valuesById[4] = "PREROLL"] = 4; + return values; + })(); + + return VideoPositionEnum; + })(); + + v1.PrivateAuctionDealService = (function() { + + /** + * Constructs a new PrivateAuctionDealService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PrivateAuctionDealService + * @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 PrivateAuctionDealService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PrivateAuctionDealService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PrivateAuctionDealService; + + /** + * Creates new PrivateAuctionDealService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @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 {PrivateAuctionDealService} RPC service. Useful where requests and/or responses are streamed. + */ + PrivateAuctionDealService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|getPrivateAuctionDeal}. + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @typedef GetPrivateAuctionDealCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal + */ + + /** + * Calls GetPrivateAuctionDeal. + * @function getPrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} request GetPrivateAuctionDealRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionDealService.prototype.getPrivateAuctionDeal = function getPrivateAuctionDeal(request, callback) { + return this.rpcCall(getPrivateAuctionDeal, $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); + }, "name", { value: "GetPrivateAuctionDeal" }); + + /** + * Calls GetPrivateAuctionDeal. + * @function getPrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} request GetPrivateAuctionDealRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|listPrivateAuctionDeals}. + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @typedef ListPrivateAuctionDealsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} [response] ListPrivateAuctionDealsResponse + */ + + /** + * Calls ListPrivateAuctionDeals. + * @function listPrivateAuctionDeals + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} request ListPrivateAuctionDealsRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDealsCallback} callback Node-style callback called with the error, if any, and ListPrivateAuctionDealsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionDealService.prototype.listPrivateAuctionDeals = function listPrivateAuctionDeals(request, callback) { + return this.rpcCall(listPrivateAuctionDeals, $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest, $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse, request, callback); + }, "name", { value: "ListPrivateAuctionDeals" }); + + /** + * Calls ListPrivateAuctionDeals. + * @function listPrivateAuctionDeals + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} request ListPrivateAuctionDealsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|createPrivateAuctionDeal}. + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @typedef CreatePrivateAuctionDealCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal + */ + + /** + * Calls CreatePrivateAuctionDeal. + * @function createPrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} request CreatePrivateAuctionDealRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionDealService.prototype.createPrivateAuctionDeal = function createPrivateAuctionDeal(request, callback) { + return this.rpcCall(createPrivateAuctionDeal, $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); + }, "name", { value: "CreatePrivateAuctionDeal" }); + + /** + * Calls CreatePrivateAuctionDeal. + * @function createPrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} request CreatePrivateAuctionDealRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionDealService|updatePrivateAuctionDeal}. + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @typedef UpdatePrivateAuctionDealCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuctionDeal} [response] PrivateAuctionDeal + */ + + /** + * Calls UpdatePrivateAuctionDeal. + * @function updatePrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} request UpdatePrivateAuctionDealRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDealCallback} callback Node-style callback called with the error, if any, and PrivateAuctionDeal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionDealService.prototype.updatePrivateAuctionDeal = function updatePrivateAuctionDeal(request, callback) { + return this.rpcCall(updatePrivateAuctionDeal, $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest, $root.google.ads.admanager.v1.PrivateAuctionDeal, request, callback); + }, "name", { value: "UpdatePrivateAuctionDeal" }); + + /** + * Calls UpdatePrivateAuctionDeal. + * @function updatePrivateAuctionDeal + * @memberof google.ads.admanager.v1.PrivateAuctionDealService + * @instance + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} request UpdatePrivateAuctionDealRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PrivateAuctionDealService; + })(); + + v1.GetPrivateAuctionDealRequest = (function() { + + /** + * Properties of a GetPrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetPrivateAuctionDealRequest + * @property {string|null} [name] GetPrivateAuctionDealRequest name + */ + + /** + * Constructs a new GetPrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetPrivateAuctionDealRequest. + * @implements IGetPrivateAuctionDealRequest + * @constructor + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest=} [properties] Properties to set + */ + function GetPrivateAuctionDealRequest(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]]; + } + + /** + * GetPrivateAuctionDealRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @instance + */ + GetPrivateAuctionDealRequest.prototype.name = ""; + + /** + * Creates a new GetPrivateAuctionDealRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest instance + */ + GetPrivateAuctionDealRequest.create = function create(properties) { + return new GetPrivateAuctionDealRequest(properties); + }; + + /** + * Encodes the specified GetPrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPrivateAuctionDealRequest.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 GetPrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionDealRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPrivateAuctionDealRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_3_VALUE_ID": - case 100003: - message.dimension = 100003; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_4_VALUE_ID": - case 100004: - message.dimension = 100004; + } + } + return message; + }; + + /** + * Decodes a GetPrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPrivateAuctionDealRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPrivateAuctionDealRequest.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 GetPrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetPrivateAuctionDealRequest} GetPrivateAuctionDealRequest + */ + GetPrivateAuctionDealRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetPrivateAuctionDealRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPrivateAuctionDealRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.GetPrivateAuctionDealRequest} message GetPrivateAuctionDealRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPrivateAuctionDealRequest.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 GetPrivateAuctionDealRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @instance + * @returns {Object.} JSON object + */ + GetPrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPrivateAuctionDealRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetPrivateAuctionDealRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetPrivateAuctionDealRequest"; + }; + + return GetPrivateAuctionDealRequest; + })(); + + v1.ListPrivateAuctionDealsRequest = (function() { + + /** + * Properties of a ListPrivateAuctionDealsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListPrivateAuctionDealsRequest + * @property {string|null} [parent] ListPrivateAuctionDealsRequest parent + * @property {number|null} [pageSize] ListPrivateAuctionDealsRequest pageSize + * @property {string|null} [pageToken] ListPrivateAuctionDealsRequest pageToken + * @property {string|null} [filter] ListPrivateAuctionDealsRequest filter + * @property {string|null} [orderBy] ListPrivateAuctionDealsRequest orderBy + * @property {number|null} [skip] ListPrivateAuctionDealsRequest skip + */ + + /** + * Constructs a new ListPrivateAuctionDealsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPrivateAuctionDealsRequest. + * @implements IListPrivateAuctionDealsRequest + * @constructor + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest=} [properties] Properties to set + */ + function ListPrivateAuctionDealsRequest(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]]; + } + + /** + * ListPrivateAuctionDealsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.parent = ""; + + /** + * ListPrivateAuctionDealsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.pageSize = 0; + + /** + * ListPrivateAuctionDealsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.pageToken = ""; + + /** + * ListPrivateAuctionDealsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.filter = ""; + + /** + * ListPrivateAuctionDealsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.orderBy = ""; + + /** + * ListPrivateAuctionDealsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + */ + ListPrivateAuctionDealsRequest.prototype.skip = 0; + + /** + * Creates a new ListPrivateAuctionDealsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest instance + */ + ListPrivateAuctionDealsRequest.create = function create(properties) { + return new ListPrivateAuctionDealsRequest(properties); + }; + + /** + * Encodes the specified ListPrivateAuctionDealsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionDealsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListPrivateAuctionDealsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionDealsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionDealsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_5_VALUE_ID": - case 100005: - message.dimension = 100005; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_6_VALUE_ID": - case 100006: - message.dimension = 100006; + } + } + return message; + }; + + /** + * Decodes a ListPrivateAuctionDealsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionDealsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPrivateAuctionDealsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPrivateAuctionDealsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListPrivateAuctionDealsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} ListPrivateAuctionDealsRequest + */ + ListPrivateAuctionDealsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListPrivateAuctionDealsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {google.ads.admanager.v1.ListPrivateAuctionDealsRequest} message ListPrivateAuctionDealsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPrivateAuctionDealsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListPrivateAuctionDealsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPrivateAuctionDealsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPrivateAuctionDealsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPrivateAuctionDealsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionDealsRequest"; + }; + + return ListPrivateAuctionDealsRequest; + })(); + + v1.ListPrivateAuctionDealsResponse = (function() { + + /** + * Properties of a ListPrivateAuctionDealsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListPrivateAuctionDealsResponse + * @property {Array.|null} [privateAuctionDeals] ListPrivateAuctionDealsResponse privateAuctionDeals + * @property {string|null} [nextPageToken] ListPrivateAuctionDealsResponse nextPageToken + * @property {number|null} [totalSize] ListPrivateAuctionDealsResponse totalSize + */ + + /** + * Constructs a new ListPrivateAuctionDealsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPrivateAuctionDealsResponse. + * @implements IListPrivateAuctionDealsResponse + * @constructor + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse=} [properties] Properties to set + */ + function ListPrivateAuctionDealsResponse(properties) { + this.privateAuctionDeals = []; + 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]]; + } + + /** + * ListPrivateAuctionDealsResponse privateAuctionDeals. + * @member {Array.} privateAuctionDeals + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @instance + */ + ListPrivateAuctionDealsResponse.prototype.privateAuctionDeals = $util.emptyArray; + + /** + * ListPrivateAuctionDealsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @instance + */ + ListPrivateAuctionDealsResponse.prototype.nextPageToken = ""; + + /** + * ListPrivateAuctionDealsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @instance + */ + ListPrivateAuctionDealsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListPrivateAuctionDealsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse instance + */ + ListPrivateAuctionDealsResponse.create = function create(properties) { + return new ListPrivateAuctionDealsResponse(properties); + }; + + /** + * Encodes the specified ListPrivateAuctionDealsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionDealsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateAuctionDeals != null && message.privateAuctionDeals.length) + for (var i = 0; i < message.privateAuctionDeals.length; ++i) + $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeals[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListPrivateAuctionDealsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionDealsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionDealsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionDealsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_7_VALUE_ID": - case 100007: - message.dimension = 100007; + switch (tag >>> 3) { + case 1: { + if (!(message.privateAuctionDeals && message.privateAuctionDeals.length)) + message.privateAuctionDeals = []; + message.privateAuctionDeals.push($root.google.ads.admanager.v1.PrivateAuctionDeal.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_8_VALUE_ID": - case 100008: - message.dimension = 100008; + } + } + return message; + }; + + /** + * Decodes a ListPrivateAuctionDealsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionDealsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPrivateAuctionDealsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPrivateAuctionDealsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateAuctionDeals != null && message.hasOwnProperty("privateAuctionDeals")) { + if (!Array.isArray(message.privateAuctionDeals)) + return "privateAuctionDeals: array expected"; + for (var i = 0; i < message.privateAuctionDeals.length; ++i) { + var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeals[i]); + if (error) + return "privateAuctionDeals." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListPrivateAuctionDealsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} ListPrivateAuctionDealsResponse + */ + ListPrivateAuctionDealsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListPrivateAuctionDealsResponse(); + if (object.privateAuctionDeals) { + if (!Array.isArray(object.privateAuctionDeals)) + throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionDealsResponse.privateAuctionDeals: array expected"); + message.privateAuctionDeals = []; + for (var i = 0; i < object.privateAuctionDeals.length; ++i) { + if (typeof object.privateAuctionDeals[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionDealsResponse.privateAuctionDeals: object expected"); + message.privateAuctionDeals[i] = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeals[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListPrivateAuctionDealsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {google.ads.admanager.v1.ListPrivateAuctionDealsResponse} message ListPrivateAuctionDealsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPrivateAuctionDealsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.privateAuctionDeals = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.privateAuctionDeals && message.privateAuctionDeals.length) { + object.privateAuctionDeals = []; + for (var j = 0; j < message.privateAuctionDeals.length; ++j) + object.privateAuctionDeals[j] = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeals[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListPrivateAuctionDealsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPrivateAuctionDealsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPrivateAuctionDealsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPrivateAuctionDealsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPrivateAuctionDealsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionDealsResponse"; + }; + + return ListPrivateAuctionDealsResponse; + })(); + + v1.CreatePrivateAuctionDealRequest = (function() { + + /** + * Properties of a CreatePrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreatePrivateAuctionDealRequest + * @property {string|null} [parent] CreatePrivateAuctionDealRequest parent + * @property {google.ads.admanager.v1.IPrivateAuctionDeal|null} [privateAuctionDeal] CreatePrivateAuctionDealRequest privateAuctionDeal + */ + + /** + * Constructs a new CreatePrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreatePrivateAuctionDealRequest. + * @implements ICreatePrivateAuctionDealRequest + * @constructor + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest=} [properties] Properties to set + */ + function CreatePrivateAuctionDealRequest(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]]; + } + + /** + * CreatePrivateAuctionDealRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @instance + */ + CreatePrivateAuctionDealRequest.prototype.parent = ""; + + /** + * CreatePrivateAuctionDealRequest privateAuctionDeal. + * @member {google.ads.admanager.v1.IPrivateAuctionDeal|null|undefined} privateAuctionDeal + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @instance + */ + CreatePrivateAuctionDealRequest.prototype.privateAuctionDeal = null; + + /** + * Creates a new CreatePrivateAuctionDealRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest instance + */ + CreatePrivateAuctionDealRequest.create = function create(properties) { + return new CreatePrivateAuctionDealRequest(properties); + }; + + /** + * Encodes the specified CreatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePrivateAuctionDealRequest.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.privateAuctionDeal != null && Object.hasOwnProperty.call(message, "privateAuctionDeal")) + $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeal, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionDealRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePrivateAuctionDealRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_9_VALUE_ID": - case 100009: - message.dimension = 100009; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_0_VALUE": - case 101000: - message.dimension = 101000; + } + } + return message; + }; + + /** + * Decodes a CreatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePrivateAuctionDealRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePrivateAuctionDealRequest.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.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) { + var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeal); + if (error) + return "privateAuctionDeal." + error; + } + return null; + }; + + /** + * Creates a CreatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} CreatePrivateAuctionDealRequest + */ + CreatePrivateAuctionDealRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreatePrivateAuctionDealRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.privateAuctionDeal != null) { + if (typeof object.privateAuctionDeal !== "object") + throw TypeError(".google.ads.admanager.v1.CreatePrivateAuctionDealRequest.privateAuctionDeal: object expected"); + message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeal); + } + return message; + }; + + /** + * Creates a plain object from a CreatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.CreatePrivateAuctionDealRequest} message CreatePrivateAuctionDealRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePrivateAuctionDealRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.privateAuctionDeal = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) + object.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeal, options); + return object; + }; + + /** + * Converts this CreatePrivateAuctionDealRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePrivateAuctionDealRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreatePrivateAuctionDealRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreatePrivateAuctionDealRequest"; + }; + + return CreatePrivateAuctionDealRequest; + })(); + + v1.UpdatePrivateAuctionDealRequest = (function() { + + /** + * Properties of an UpdatePrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdatePrivateAuctionDealRequest + * @property {google.ads.admanager.v1.IPrivateAuctionDeal|null} [privateAuctionDeal] UpdatePrivateAuctionDealRequest privateAuctionDeal + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePrivateAuctionDealRequest updateMask + */ + + /** + * Constructs a new UpdatePrivateAuctionDealRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdatePrivateAuctionDealRequest. + * @implements IUpdatePrivateAuctionDealRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest=} [properties] Properties to set + */ + function UpdatePrivateAuctionDealRequest(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]]; + } + + /** + * UpdatePrivateAuctionDealRequest privateAuctionDeal. + * @member {google.ads.admanager.v1.IPrivateAuctionDeal|null|undefined} privateAuctionDeal + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @instance + */ + UpdatePrivateAuctionDealRequest.prototype.privateAuctionDeal = null; + + /** + * UpdatePrivateAuctionDealRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @instance + */ + UpdatePrivateAuctionDealRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePrivateAuctionDealRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest instance + */ + UpdatePrivateAuctionDealRequest.create = function create(properties) { + return new UpdatePrivateAuctionDealRequest(properties); + }; + + /** + * Encodes the specified UpdatePrivateAuctionDealRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePrivateAuctionDealRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateAuctionDeal != null && Object.hasOwnProperty.call(message, "privateAuctionDeal")) + $root.google.ads.admanager.v1.PrivateAuctionDeal.encode(message.privateAuctionDeal, 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 UpdatePrivateAuctionDealRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePrivateAuctionDealRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePrivateAuctionDealRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_1_VALUE": - case 101001: - message.dimension = 101001; + switch (tag >>> 3) { + case 1: { + message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_2_VALUE": - case 101002: - message.dimension = 101002; + } + } + return message; + }; + + /** + * Decodes an UpdatePrivateAuctionDealRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePrivateAuctionDealRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePrivateAuctionDealRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePrivateAuctionDealRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) { + var error = $root.google.ads.admanager.v1.PrivateAuctionDeal.verify(message.privateAuctionDeal); + if (error) + return "privateAuctionDeal." + 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 an UpdatePrivateAuctionDealRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} UpdatePrivateAuctionDealRequest + */ + UpdatePrivateAuctionDealRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest) + return object; + var message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionDealRequest(); + if (object.privateAuctionDeal != null) { + if (typeof object.privateAuctionDeal !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.privateAuctionDeal: object expected"); + message.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.fromObject(object.privateAuctionDeal); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionDealRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePrivateAuctionDealRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {google.ads.admanager.v1.UpdatePrivateAuctionDealRequest} message UpdatePrivateAuctionDealRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePrivateAuctionDealRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.privateAuctionDeal = null; + object.updateMask = null; + } + if (message.privateAuctionDeal != null && message.hasOwnProperty("privateAuctionDeal")) + object.privateAuctionDeal = $root.google.ads.admanager.v1.PrivateAuctionDeal.toObject(message.privateAuctionDeal, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePrivateAuctionDealRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePrivateAuctionDealRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePrivateAuctionDealRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionDealRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePrivateAuctionDealRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdatePrivateAuctionDealRequest"; + }; + + return UpdatePrivateAuctionDealRequest; + })(); + + v1.PrivateAuction = (function() { + + /** + * Properties of a PrivateAuction. + * @memberof google.ads.admanager.v1 + * @interface IPrivateAuction + * @property {string|null} [name] PrivateAuction name + * @property {number|Long|null} [privateAuctionId] PrivateAuction privateAuctionId + * @property {string|null} [displayName] PrivateAuction displayName + * @property {string|null} [description] PrivateAuction description + * @property {Array.|null} [sellerContactUsers] PrivateAuction sellerContactUsers + * @property {boolean|null} [archived] PrivateAuction archived + * @property {google.protobuf.ITimestamp|null} [createTime] PrivateAuction createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateAuction updateTime + */ + + /** + * Constructs a new PrivateAuction. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PrivateAuction. + * @implements IPrivateAuction + * @constructor + * @param {google.ads.admanager.v1.IPrivateAuction=} [properties] Properties to set + */ + function PrivateAuction(properties) { + this.sellerContactUsers = []; + 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]]; + } + + /** + * PrivateAuction name. + * @member {string} name + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.name = ""; + + /** + * PrivateAuction privateAuctionId. + * @member {number|Long|null|undefined} privateAuctionId + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.privateAuctionId = null; + + /** + * PrivateAuction displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.displayName = null; + + /** + * PrivateAuction description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.description = null; + + /** + * PrivateAuction sellerContactUsers. + * @member {Array.} sellerContactUsers + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.sellerContactUsers = $util.emptyArray; + + /** + * PrivateAuction archived. + * @member {boolean|null|undefined} archived + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.archived = null; + + /** + * PrivateAuction createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.createTime = null; + + /** + * PrivateAuction updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + */ + PrivateAuction.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_privateAuctionId", { + get: $util.oneOfGetter($oneOfFields = ["privateAuctionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_archived", { + get: $util.oneOfGetter($oneOfFields = ["archived"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateAuction.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrivateAuction instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {google.ads.admanager.v1.IPrivateAuction=} [properties] Properties to set + * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction instance + */ + PrivateAuction.create = function create(properties) { + return new PrivateAuction(properties); + }; + + /** + * Encodes the specified PrivateAuction message. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {google.ads.admanager.v1.IPrivateAuction} message PrivateAuction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateAuction.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.privateAuctionId != null && Object.hasOwnProperty.call(message, "privateAuctionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.privateAuctionId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.archived); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sellerContactUsers != null && message.sellerContactUsers.length) + for (var i = 0; i < message.sellerContactUsers.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.sellerContactUsers[i]); + return writer; + }; + + /** + * Encodes the specified PrivateAuction message, length delimited. Does not implicitly {@link google.ads.admanager.v1.PrivateAuction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {google.ads.admanager.v1.IPrivateAuction} message PrivateAuction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateAuction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateAuction message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateAuction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.PrivateAuction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_3_VALUE": - case 101003: - message.dimension = 101003; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.privateAuctionId = reader.int64(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 9: { + if (!(message.sellerContactUsers && message.sellerContactUsers.length)) + message.sellerContactUsers = []; + message.sellerContactUsers.push(reader.string()); + break; + } + case 6: { + message.archived = reader.bool(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_4_VALUE": - case 101004: - message.dimension = 101004; + } + } + return message; + }; + + /** + * Decodes a PrivateAuction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateAuction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateAuction message. + * @function verify + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateAuction.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.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { + properties._privateAuctionId = 1; + if (!$util.isInteger(message.privateAuctionId) && !(message.privateAuctionId && $util.isInteger(message.privateAuctionId.low) && $util.isInteger(message.privateAuctionId.high))) + return "privateAuctionId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.sellerContactUsers != null && message.hasOwnProperty("sellerContactUsers")) { + if (!Array.isArray(message.sellerContactUsers)) + return "sellerContactUsers: array expected"; + for (var i = 0; i < message.sellerContactUsers.length; ++i) + if (!$util.isString(message.sellerContactUsers[i])) + return "sellerContactUsers: string[] expected"; + } + if (message.archived != null && message.hasOwnProperty("archived")) { + properties._archived = 1; + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + return null; + }; + + /** + * Creates a PrivateAuction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.PrivateAuction} PrivateAuction + */ + PrivateAuction.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.PrivateAuction) + return object; + var message = new $root.google.ads.admanager.v1.PrivateAuction(); + if (object.name != null) + message.name = String(object.name); + if (object.privateAuctionId != null) + if ($util.Long) + (message.privateAuctionId = $util.Long.fromValue(object.privateAuctionId)).unsigned = false; + else if (typeof object.privateAuctionId === "string") + message.privateAuctionId = parseInt(object.privateAuctionId, 10); + else if (typeof object.privateAuctionId === "number") + message.privateAuctionId = object.privateAuctionId; + else if (typeof object.privateAuctionId === "object") + message.privateAuctionId = new $util.LongBits(object.privateAuctionId.low >>> 0, object.privateAuctionId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.sellerContactUsers) { + if (!Array.isArray(object.sellerContactUsers)) + throw TypeError(".google.ads.admanager.v1.PrivateAuction.sellerContactUsers: array expected"); + message.sellerContactUsers = []; + for (var i = 0; i < object.sellerContactUsers.length; ++i) + message.sellerContactUsers[i] = String(object.sellerContactUsers[i]); + } + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuction.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.PrivateAuction.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a PrivateAuction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {google.ads.admanager.v1.PrivateAuction} message PrivateAuction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateAuction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sellerContactUsers = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.privateAuctionId != null && message.hasOwnProperty("privateAuctionId")) { + if (typeof message.privateAuctionId === "number") + object.privateAuctionId = options.longs === String ? String(message.privateAuctionId) : message.privateAuctionId; + else + object.privateAuctionId = options.longs === String ? $util.Long.prototype.toString.call(message.privateAuctionId) : options.longs === Number ? new $util.LongBits(message.privateAuctionId.low >>> 0, message.privateAuctionId.high >>> 0).toNumber() : message.privateAuctionId; + if (options.oneofs) + object._privateAuctionId = "privateAuctionId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.archived != null && message.hasOwnProperty("archived")) { + object.archived = message.archived; + if (options.oneofs) + object._archived = "archived"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.sellerContactUsers && message.sellerContactUsers.length) { + object.sellerContactUsers = []; + for (var j = 0; j < message.sellerContactUsers.length; ++j) + object.sellerContactUsers[j] = message.sellerContactUsers[j]; + } + return object; + }; + + /** + * Converts this PrivateAuction to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.PrivateAuction + * @instance + * @returns {Object.} JSON object + */ + PrivateAuction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateAuction + * @function getTypeUrl + * @memberof google.ads.admanager.v1.PrivateAuction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateAuction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.PrivateAuction"; + }; + + return PrivateAuction; + })(); + + v1.PrivateAuctionService = (function() { + + /** + * Constructs a new PrivateAuctionService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a PrivateAuctionService + * @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 PrivateAuctionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PrivateAuctionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PrivateAuctionService; + + /** + * Creates new PrivateAuctionService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @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 {PrivateAuctionService} RPC service. Useful where requests and/or responses are streamed. + */ + PrivateAuctionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|getPrivateAuction}. + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @typedef GetPrivateAuctionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction + */ + + /** + * Calls GetPrivateAuction. + * @function getPrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} request GetPrivateAuctionRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionService.prototype.getPrivateAuction = function getPrivateAuction(request, callback) { + return this.rpcCall(getPrivateAuction, $root.google.ads.admanager.v1.GetPrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); + }, "name", { value: "GetPrivateAuction" }); + + /** + * Calls GetPrivateAuction. + * @function getPrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} request GetPrivateAuctionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|listPrivateAuctions}. + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @typedef ListPrivateAuctionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListPrivateAuctionsResponse} [response] ListPrivateAuctionsResponse + */ + + /** + * Calls ListPrivateAuctions. + * @function listPrivateAuctions + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} request ListPrivateAuctionsRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctionsCallback} callback Node-style callback called with the error, if any, and ListPrivateAuctionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionService.prototype.listPrivateAuctions = function listPrivateAuctions(request, callback) { + return this.rpcCall(listPrivateAuctions, $root.google.ads.admanager.v1.ListPrivateAuctionsRequest, $root.google.ads.admanager.v1.ListPrivateAuctionsResponse, request, callback); + }, "name", { value: "ListPrivateAuctions" }); + + /** + * Calls ListPrivateAuctions. + * @function listPrivateAuctions + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} request ListPrivateAuctionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|createPrivateAuction}. + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @typedef CreatePrivateAuctionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction + */ + + /** + * Calls CreatePrivateAuction. + * @function createPrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} request CreatePrivateAuctionRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionService.prototype.createPrivateAuction = function createPrivateAuction(request, callback) { + return this.rpcCall(createPrivateAuction, $root.google.ads.admanager.v1.CreatePrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); + }, "name", { value: "CreatePrivateAuction" }); + + /** + * Calls CreatePrivateAuction. + * @function createPrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} request CreatePrivateAuctionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.PrivateAuctionService|updatePrivateAuction}. + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @typedef UpdatePrivateAuctionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.PrivateAuction} [response] PrivateAuction + */ + + /** + * Calls UpdatePrivateAuction. + * @function updatePrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} request UpdatePrivateAuctionRequest message or plain object + * @param {google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuctionCallback} callback Node-style callback called with the error, if any, and PrivateAuction + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PrivateAuctionService.prototype.updatePrivateAuction = function updatePrivateAuction(request, callback) { + return this.rpcCall(updatePrivateAuction, $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest, $root.google.ads.admanager.v1.PrivateAuction, request, callback); + }, "name", { value: "UpdatePrivateAuction" }); + + /** + * Calls UpdatePrivateAuction. + * @function updatePrivateAuction + * @memberof google.ads.admanager.v1.PrivateAuctionService + * @instance + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} request UpdatePrivateAuctionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PrivateAuctionService; + })(); + + v1.GetPrivateAuctionRequest = (function() { + + /** + * Properties of a GetPrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetPrivateAuctionRequest + * @property {string|null} [name] GetPrivateAuctionRequest name + */ + + /** + * Constructs a new GetPrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetPrivateAuctionRequest. + * @implements IGetPrivateAuctionRequest + * @constructor + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest=} [properties] Properties to set + */ + function GetPrivateAuctionRequest(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]]; + } + + /** + * GetPrivateAuctionRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @instance + */ + GetPrivateAuctionRequest.prototype.name = ""; + + /** + * Creates a new GetPrivateAuctionRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest instance + */ + GetPrivateAuctionRequest.create = function create(properties) { + return new GetPrivateAuctionRequest(properties); + }; + + /** + * Encodes the specified GetPrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} message GetPrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPrivateAuctionRequest.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 GetPrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetPrivateAuctionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IGetPrivateAuctionRequest} message GetPrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPrivateAuctionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetPrivateAuctionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_5_VALUE": - case 101005: - message.dimension = 101005; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_6_VALUE": - case 101006: - message.dimension = 101006; + } + } + return message; + }; + + /** + * Decodes a GetPrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPrivateAuctionRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPrivateAuctionRequest.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 GetPrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetPrivateAuctionRequest} GetPrivateAuctionRequest + */ + GetPrivateAuctionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetPrivateAuctionRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetPrivateAuctionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPrivateAuctionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.GetPrivateAuctionRequest} message GetPrivateAuctionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPrivateAuctionRequest.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 GetPrivateAuctionRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPrivateAuctionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPrivateAuctionRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetPrivateAuctionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetPrivateAuctionRequest"; + }; + + return GetPrivateAuctionRequest; + })(); + + v1.ListPrivateAuctionsRequest = (function() { + + /** + * Properties of a ListPrivateAuctionsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListPrivateAuctionsRequest + * @property {string|null} [parent] ListPrivateAuctionsRequest parent + * @property {number|null} [pageSize] ListPrivateAuctionsRequest pageSize + * @property {string|null} [pageToken] ListPrivateAuctionsRequest pageToken + * @property {string|null} [filter] ListPrivateAuctionsRequest filter + * @property {string|null} [orderBy] ListPrivateAuctionsRequest orderBy + * @property {number|null} [skip] ListPrivateAuctionsRequest skip + */ + + /** + * Constructs a new ListPrivateAuctionsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPrivateAuctionsRequest. + * @implements IListPrivateAuctionsRequest + * @constructor + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest=} [properties] Properties to set + */ + function ListPrivateAuctionsRequest(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]]; + } + + /** + * ListPrivateAuctionsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.parent = ""; + + /** + * ListPrivateAuctionsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.pageSize = 0; + + /** + * ListPrivateAuctionsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.pageToken = ""; + + /** + * ListPrivateAuctionsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.filter = ""; + + /** + * ListPrivateAuctionsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.orderBy = ""; + + /** + * ListPrivateAuctionsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + */ + ListPrivateAuctionsRequest.prototype.skip = 0; + + /** + * Creates a new ListPrivateAuctionsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest instance + */ + ListPrivateAuctionsRequest.create = function create(properties) { + return new ListPrivateAuctionsRequest(properties); + }; + + /** + * Encodes the specified ListPrivateAuctionsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} message ListPrivateAuctionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListPrivateAuctionsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsRequest} message ListPrivateAuctionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_7_VALUE": - case 101007: - message.dimension = 101007; + 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; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_8_VALUE": - case 101008: - message.dimension = 101008; + } + } + return message; + }; + + /** + * Decodes a ListPrivateAuctionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPrivateAuctionsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPrivateAuctionsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListPrivateAuctionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPrivateAuctionsRequest} ListPrivateAuctionsRequest + */ + ListPrivateAuctionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListPrivateAuctionsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListPrivateAuctionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {google.ads.admanager.v1.ListPrivateAuctionsRequest} message ListPrivateAuctionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPrivateAuctionsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListPrivateAuctionsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPrivateAuctionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPrivateAuctionsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPrivateAuctionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPrivateAuctionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionsRequest"; + }; + + return ListPrivateAuctionsRequest; + })(); + + v1.ListPrivateAuctionsResponse = (function() { + + /** + * Properties of a ListPrivateAuctionsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListPrivateAuctionsResponse + * @property {Array.|null} [privateAuctions] ListPrivateAuctionsResponse privateAuctions + * @property {string|null} [nextPageToken] ListPrivateAuctionsResponse nextPageToken + * @property {number|null} [totalSize] ListPrivateAuctionsResponse totalSize + */ + + /** + * Constructs a new ListPrivateAuctionsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListPrivateAuctionsResponse. + * @implements IListPrivateAuctionsResponse + * @constructor + * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse=} [properties] Properties to set + */ + function ListPrivateAuctionsResponse(properties) { + this.privateAuctions = []; + 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]]; + } + + /** + * ListPrivateAuctionsResponse privateAuctions. + * @member {Array.} privateAuctions + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @instance + */ + ListPrivateAuctionsResponse.prototype.privateAuctions = $util.emptyArray; + + /** + * ListPrivateAuctionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @instance + */ + ListPrivateAuctionsResponse.prototype.nextPageToken = ""; + + /** + * ListPrivateAuctionsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @instance + */ + ListPrivateAuctionsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListPrivateAuctionsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse instance + */ + ListPrivateAuctionsResponse.create = function create(properties) { + return new ListPrivateAuctionsResponse(properties); + }; + + /** + * Encodes the specified ListPrivateAuctionsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse} message ListPrivateAuctionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateAuctions != null && message.privateAuctions.length) + for (var i = 0; i < message.privateAuctions.length; ++i) + $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuctions[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListPrivateAuctionsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListPrivateAuctionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {google.ads.admanager.v1.IListPrivateAuctionsResponse} message ListPrivateAuctionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPrivateAuctionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListPrivateAuctionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_9_VALUE": - case 101009: - message.dimension = 101009; + switch (tag >>> 3) { + case 1: { + if (!(message.privateAuctions && message.privateAuctions.length)) + message.privateAuctions = []; + message.privateAuctions.push($root.google.ads.admanager.v1.PrivateAuction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Slice.value: object expected"); - message.value = $root.google.ads.admanager.v1.Report.Value.fromObject(object.value); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a Slice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {google.ads.admanager.v1.Report.Slice} message Slice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Slice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimension = options.enums === String ? "DIMENSION_UNSPECIFIED" : 0; - object.value = null; + /** + * Decodes a ListPrivateAuctionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPrivateAuctionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPrivateAuctionsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPrivateAuctionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateAuctions != null && message.hasOwnProperty("privateAuctions")) { + if (!Array.isArray(message.privateAuctions)) + return "privateAuctions: array expected"; + for (var i = 0; i < message.privateAuctions.length; ++i) { + var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuctions[i]); + if (error) + return "privateAuctions." + error; } - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = options.enums === String ? $root.google.ads.admanager.v1.Report.Dimension[message.dimension] === undefined ? message.dimension : $root.google.ads.admanager.v1.Report.Dimension[message.dimension] : message.dimension; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.ads.admanager.v1.Report.Value.toObject(message.value, options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListPrivateAuctionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListPrivateAuctionsResponse} ListPrivateAuctionsResponse + */ + ListPrivateAuctionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListPrivateAuctionsResponse) return object; - }; + var message = new $root.google.ads.admanager.v1.ListPrivateAuctionsResponse(); + if (object.privateAuctions) { + if (!Array.isArray(object.privateAuctions)) + throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionsResponse.privateAuctions: array expected"); + message.privateAuctions = []; + for (var i = 0; i < object.privateAuctions.length; ++i) { + if (typeof object.privateAuctions[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListPrivateAuctionsResponse.privateAuctions: object expected"); + message.privateAuctions[i] = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuctions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; - /** - * Converts this Slice to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Slice - * @instance - * @returns {Object.} JSON object - */ - Slice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListPrivateAuctionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {google.ads.admanager.v1.ListPrivateAuctionsResponse} message ListPrivateAuctionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPrivateAuctionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.privateAuctions = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.privateAuctions && message.privateAuctions.length) { + object.privateAuctions = []; + for (var j = 0; j < message.privateAuctions.length; ++j) + object.privateAuctions[j] = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuctions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; - /** - * Gets the default type url for Slice - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Slice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Slice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Converts this ListPrivateAuctionsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPrivateAuctionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPrivateAuctionsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListPrivateAuctionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPrivateAuctionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListPrivateAuctionsResponse"; + }; + + return ListPrivateAuctionsResponse; + })(); + + v1.CreatePrivateAuctionRequest = (function() { + + /** + * Properties of a CreatePrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreatePrivateAuctionRequest + * @property {string|null} [parent] CreatePrivateAuctionRequest parent + * @property {google.ads.admanager.v1.IPrivateAuction|null} [privateAuction] CreatePrivateAuctionRequest privateAuction + */ + + /** + * Constructs a new CreatePrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreatePrivateAuctionRequest. + * @implements ICreatePrivateAuctionRequest + * @constructor + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest=} [properties] Properties to set + */ + function CreatePrivateAuctionRequest(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]]; + } + + /** + * CreatePrivateAuctionRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @instance + */ + CreatePrivateAuctionRequest.prototype.parent = ""; + + /** + * CreatePrivateAuctionRequest privateAuction. + * @member {google.ads.admanager.v1.IPrivateAuction|null|undefined} privateAuction + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @instance + */ + CreatePrivateAuctionRequest.prototype.privateAuction = null; + + /** + * Creates a new CreatePrivateAuctionRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest instance + */ + CreatePrivateAuctionRequest.create = function create(properties) { + return new CreatePrivateAuctionRequest(properties); + }; + + /** + * Encodes the specified CreatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} message CreatePrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePrivateAuctionRequest.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.privateAuction != null && Object.hasOwnProperty.call(message, "privateAuction")) + $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreatePrivateAuctionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.ICreatePrivateAuctionRequest} message CreatePrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePrivateAuctionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreatePrivateAuctionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Slice"; - }; + } + return message; + }; - return Slice; - })(); + /** + * Decodes a CreatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Report.Filter = (function() { + /** + * Verifies a CreatePrivateAuctionRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePrivateAuctionRequest.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.privateAuction != null && message.hasOwnProperty("privateAuction")) { + var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuction); + if (error) + return "privateAuction." + error; + } + return null; + }; - /** - * Properties of a Filter. - * @memberof google.ads.admanager.v1.Report - * @interface IFilter - * @property {google.ads.admanager.v1.Report.Filter.IFieldFilter|null} [fieldFilter] Filter fieldFilter - * @property {google.ads.admanager.v1.Report.IFilter|null} [notFilter] Filter notFilter - * @property {google.ads.admanager.v1.Report.Filter.IFilterList|null} [andFilter] Filter andFilter - * @property {google.ads.admanager.v1.Report.Filter.IFilterList|null} [orFilter] Filter orFilter - */ + /** + * Creates a CreatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreatePrivateAuctionRequest} CreatePrivateAuctionRequest + */ + CreatePrivateAuctionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreatePrivateAuctionRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreatePrivateAuctionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.privateAuction != null) { + if (typeof object.privateAuction !== "object") + throw TypeError(".google.ads.admanager.v1.CreatePrivateAuctionRequest.privateAuction: object expected"); + message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuction); + } + return message; + }; - /** - * Constructs a new Filter. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.ads.admanager.v1.Report.IFilter=} [properties] Properties to set - */ - function Filter(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 plain object from a CreatePrivateAuctionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.CreatePrivateAuctionRequest} message CreatePrivateAuctionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePrivateAuctionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.privateAuction = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) + object.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuction, options); + return object; + }; - /** - * Filter fieldFilter. - * @member {google.ads.admanager.v1.Report.Filter.IFieldFilter|null|undefined} fieldFilter - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - */ - Filter.prototype.fieldFilter = null; + /** + * Converts this CreatePrivateAuctionRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePrivateAuctionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Filter notFilter. - * @member {google.ads.admanager.v1.Report.IFilter|null|undefined} notFilter - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - */ - Filter.prototype.notFilter = null; + /** + * Gets the default type url for CreatePrivateAuctionRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreatePrivateAuctionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreatePrivateAuctionRequest"; + }; - /** - * Filter andFilter. - * @member {google.ads.admanager.v1.Report.Filter.IFilterList|null|undefined} andFilter - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - */ - Filter.prototype.andFilter = null; + return CreatePrivateAuctionRequest; + })(); - /** - * Filter orFilter. - * @member {google.ads.admanager.v1.Report.Filter.IFilterList|null|undefined} orFilter - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - */ - Filter.prototype.orFilter = null; + v1.UpdatePrivateAuctionRequest = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of an UpdatePrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdatePrivateAuctionRequest + * @property {google.ads.admanager.v1.IPrivateAuction|null} [privateAuction] UpdatePrivateAuctionRequest privateAuction + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePrivateAuctionRequest updateMask + */ - /** - * Filter type. - * @member {"fieldFilter"|"notFilter"|"andFilter"|"orFilter"|undefined} type - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - */ - Object.defineProperty(Filter.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["fieldFilter", "notFilter", "andFilter", "orFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new UpdatePrivateAuctionRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdatePrivateAuctionRequest. + * @implements IUpdatePrivateAuctionRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest=} [properties] Properties to set + */ + function UpdatePrivateAuctionRequest(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 Filter instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {google.ads.admanager.v1.Report.IFilter=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; + /** + * UpdatePrivateAuctionRequest privateAuction. + * @member {google.ads.admanager.v1.IPrivateAuction|null|undefined} privateAuction + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @instance + */ + UpdatePrivateAuctionRequest.prototype.privateAuction = null; - /** - * Encodes the specified Filter message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {google.ads.admanager.v1.Report.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldFilter != null && Object.hasOwnProperty.call(message, "fieldFilter")) - $root.google.ads.admanager.v1.Report.Filter.FieldFilter.encode(message.fieldFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.notFilter != null && Object.hasOwnProperty.call(message, "notFilter")) - $root.google.ads.admanager.v1.Report.Filter.encode(message.notFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.andFilter != null && Object.hasOwnProperty.call(message, "andFilter")) - $root.google.ads.admanager.v1.Report.Filter.FilterList.encode(message.andFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.orFilter != null && Object.hasOwnProperty.call(message, "orFilter")) - $root.google.ads.admanager.v1.Report.Filter.FilterList.encode(message.orFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * UpdatePrivateAuctionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @instance + */ + UpdatePrivateAuctionRequest.prototype.updateMask = null; - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {google.ads.admanager.v1.Report.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new UpdatePrivateAuctionRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest instance + */ + UpdatePrivateAuctionRequest.create = function create(properties) { + return new UpdatePrivateAuctionRequest(properties); + }; + + /** + * Encodes the specified UpdatePrivateAuctionRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePrivateAuctionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateAuction != null && Object.hasOwnProperty.call(message, "privateAuction")) + $root.google.ads.admanager.v1.PrivateAuction.encode(message.privateAuction, 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 UpdatePrivateAuctionRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdatePrivateAuctionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.IUpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePrivateAuctionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePrivateAuctionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.decode(reader, reader.uint32()); break; - switch (tag >>> 3) { - case 1: { - message.fieldFilter = $root.google.ads.admanager.v1.Report.Filter.FieldFilter.decode(reader, reader.uint32()); - break; - } - case 2: { - message.notFilter = $root.google.ads.admanager.v1.Report.Filter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.andFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.decode(reader, reader.uint32()); - break; - } - case 4: { - message.orFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Filter message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fieldFilter != null && message.hasOwnProperty("fieldFilter")) { - properties.type = 1; - { - var error = $root.google.ads.admanager.v1.Report.Filter.FieldFilter.verify(message.fieldFilter); - if (error) - return "fieldFilter." + error; - } - } - if (message.notFilter != null && message.hasOwnProperty("notFilter")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.ads.admanager.v1.Report.Filter.verify(message.notFilter); - if (error) - return "notFilter." + error; - } - } - if (message.andFilter != null && message.hasOwnProperty("andFilter")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.ads.admanager.v1.Report.Filter.FilterList.verify(message.andFilter); - if (error) - return "andFilter." + error; - } - } - if (message.orFilter != null && message.hasOwnProperty("orFilter")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.ads.admanager.v1.Report.Filter.FilterList.verify(message.orFilter); - if (error) - return "orFilter." + error; - } - } - return null; - }; + /** + * Decodes an UpdatePrivateAuctionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePrivateAuctionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Filter) - return object; - var message = new $root.google.ads.admanager.v1.Report.Filter(); - if (object.fieldFilter != null) { - if (typeof object.fieldFilter !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.fieldFilter: object expected"); - message.fieldFilter = $root.google.ads.admanager.v1.Report.Filter.FieldFilter.fromObject(object.fieldFilter); - } - if (object.notFilter != null) { - if (typeof object.notFilter !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.notFilter: object expected"); - message.notFilter = $root.google.ads.admanager.v1.Report.Filter.fromObject(object.notFilter); - } - if (object.andFilter != null) { - if (typeof object.andFilter !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.andFilter: object expected"); - message.andFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.fromObject(object.andFilter); - } - if (object.orFilter != null) { - if (typeof object.orFilter !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.orFilter: object expected"); - message.orFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.fromObject(object.orFilter); - } - return message; - }; + /** + * Verifies an UpdatePrivateAuctionRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePrivateAuctionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) { + var error = $root.google.ads.admanager.v1.PrivateAuction.verify(message.privateAuction); + if (error) + return "privateAuction." + 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 plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {google.ads.admanager.v1.Report.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.fieldFilter != null && message.hasOwnProperty("fieldFilter")) { - object.fieldFilter = $root.google.ads.admanager.v1.Report.Filter.FieldFilter.toObject(message.fieldFilter, options); - if (options.oneofs) - object.type = "fieldFilter"; - } - if (message.notFilter != null && message.hasOwnProperty("notFilter")) { - object.notFilter = $root.google.ads.admanager.v1.Report.Filter.toObject(message.notFilter, options); - if (options.oneofs) - object.type = "notFilter"; - } - if (message.andFilter != null && message.hasOwnProperty("andFilter")) { - object.andFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.toObject(message.andFilter, options); - if (options.oneofs) - object.type = "andFilter"; - } - if (message.orFilter != null && message.hasOwnProperty("orFilter")) { - object.orFilter = $root.google.ads.admanager.v1.Report.Filter.FilterList.toObject(message.orFilter, options); - if (options.oneofs) - object.type = "orFilter"; - } + /** + * Creates an UpdatePrivateAuctionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdatePrivateAuctionRequest} UpdatePrivateAuctionRequest + */ + UpdatePrivateAuctionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest) return object; - }; + var message = new $root.google.ads.admanager.v1.UpdatePrivateAuctionRequest(); + if (object.privateAuction != null) { + if (typeof object.privateAuction !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionRequest.privateAuction: object expected"); + message.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.fromObject(object.privateAuction); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdatePrivateAuctionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an UpdatePrivateAuctionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {google.ads.admanager.v1.UpdatePrivateAuctionRequest} message UpdatePrivateAuctionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePrivateAuctionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.privateAuction = null; + object.updateMask = null; + } + if (message.privateAuction != null && message.hasOwnProperty("privateAuction")) + object.privateAuction = $root.google.ads.admanager.v1.PrivateAuction.toObject(message.privateAuction, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Filter"; - }; + /** + * Converts this UpdatePrivateAuctionRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePrivateAuctionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Filter.FieldFilter = (function() { + /** + * Gets the default type url for UpdatePrivateAuctionRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdatePrivateAuctionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePrivateAuctionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdatePrivateAuctionRequest"; + }; - /** - * Properties of a FieldFilter. - * @memberof google.ads.admanager.v1.Report.Filter - * @interface IFieldFilter - * @property {google.ads.admanager.v1.Report.IField|null} [field] FieldFilter field - * @property {google.ads.admanager.v1.Report.Filter.Operation|null} [operation] FieldFilter operation - * @property {Array.|null} [values] FieldFilter values - * @property {google.ads.admanager.v1.Report.ISlice|null} [slice] FieldFilter slice - * @property {number|null} [timePeriodIndex] FieldFilter timePeriodIndex - * @property {google.ads.admanager.v1.Report.MetricValueType|null} [metricValueType] FieldFilter metricValueType - */ + return UpdatePrivateAuctionRequest; + })(); - /** - * Constructs a new FieldFilter. - * @memberof google.ads.admanager.v1.Report.Filter - * @classdesc Represents a FieldFilter. - * @implements IFieldFilter - * @constructor - * @param {google.ads.admanager.v1.Report.Filter.IFieldFilter=} [properties] Properties to set - */ - function FieldFilter(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]]; - } + v1.ProgrammaticBuyer = (function() { - /** - * FieldFilter field. - * @member {google.ads.admanager.v1.Report.IField|null|undefined} field - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.field = null; + /** + * Properties of a ProgrammaticBuyer. + * @memberof google.ads.admanager.v1 + * @interface IProgrammaticBuyer + * @property {string|null} [name] ProgrammaticBuyer name + * @property {number|Long|null} [buyerAccountId] ProgrammaticBuyer buyerAccountId + * @property {string|null} [displayName] ProgrammaticBuyer displayName + * @property {number|Long|null} [parentAccountId] ProgrammaticBuyer parentAccountId + * @property {string|null} [partnerClientId] ProgrammaticBuyer partnerClientId + * @property {boolean|null} [agency] ProgrammaticBuyer agency + * @property {boolean|null} [preferredDealsEnabled] ProgrammaticBuyer preferredDealsEnabled + * @property {boolean|null} [programmaticGuaranteedEnabled] ProgrammaticBuyer programmaticGuaranteedEnabled + */ - /** - * FieldFilter operation. - * @member {google.ads.admanager.v1.Report.Filter.Operation} operation - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.operation = 0; + /** + * Constructs a new ProgrammaticBuyer. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ProgrammaticBuyer. + * @implements IProgrammaticBuyer + * @constructor + * @param {google.ads.admanager.v1.IProgrammaticBuyer=} [properties] Properties to set + */ + function ProgrammaticBuyer(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]]; + } - /** - * FieldFilter values. - * @member {Array.} values - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.values = $util.emptyArray; + /** + * ProgrammaticBuyer name. + * @member {string} name + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.name = ""; - /** - * FieldFilter slice. - * @member {google.ads.admanager.v1.Report.ISlice|null|undefined} slice - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.slice = null; + /** + * ProgrammaticBuyer buyerAccountId. + * @member {number|Long|null|undefined} buyerAccountId + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.buyerAccountId = null; - /** - * FieldFilter timePeriodIndex. - * @member {number|null|undefined} timePeriodIndex - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.timePeriodIndex = null; + /** + * ProgrammaticBuyer displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.displayName = null; - /** - * FieldFilter metricValueType. - * @member {google.ads.admanager.v1.Report.MetricValueType|null|undefined} metricValueType - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - */ - FieldFilter.prototype.metricValueType = null; + /** + * ProgrammaticBuyer parentAccountId. + * @member {number|Long|null|undefined} parentAccountId + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.parentAccountId = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ProgrammaticBuyer partnerClientId. + * @member {string|null|undefined} partnerClientId + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.partnerClientId = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(FieldFilter.prototype, "_slice", { - get: $util.oneOfGetter($oneOfFields = ["slice"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ProgrammaticBuyer agency. + * @member {boolean|null|undefined} agency + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.agency = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(FieldFilter.prototype, "_timePeriodIndex", { - get: $util.oneOfGetter($oneOfFields = ["timePeriodIndex"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ProgrammaticBuyer preferredDealsEnabled. + * @member {boolean|null|undefined} preferredDealsEnabled + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.preferredDealsEnabled = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(FieldFilter.prototype, "_metricValueType", { - get: $util.oneOfGetter($oneOfFields = ["metricValueType"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ProgrammaticBuyer programmaticGuaranteedEnabled. + * @member {boolean|null|undefined} programmaticGuaranteedEnabled + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + */ + ProgrammaticBuyer.prototype.programmaticGuaranteedEnabled = null; - /** - * Creates a new FieldFilter instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFieldFilter=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Filter.FieldFilter} FieldFilter instance - */ - FieldFilter.create = function create(properties) { - return new FieldFilter(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified FieldFilter message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FieldFilter.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFieldFilter} message FieldFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - $root.google.ads.admanager.v1.Report.Field.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operation); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.ads.admanager.v1.Report.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.slice != null && Object.hasOwnProperty.call(message, "slice")) - $root.google.ads.admanager.v1.Report.Slice.encode(message.slice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timePeriodIndex != null && Object.hasOwnProperty.call(message, "timePeriodIndex")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.timePeriodIndex); - if (message.metricValueType != null && Object.hasOwnProperty.call(message, "metricValueType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metricValueType); - return writer; - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_buyerAccountId", { + get: $util.oneOfGetter($oneOfFields = ["buyerAccountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_parentAccountId", { + get: $util.oneOfGetter($oneOfFields = ["parentAccountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_partnerClientId", { + get: $util.oneOfGetter($oneOfFields = ["partnerClientId"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified FieldFilter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FieldFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFieldFilter} message FieldFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_agency", { + get: $util.oneOfGetter($oneOfFields = ["agency"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a FieldFilter message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Filter.FieldFilter} FieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Filter.FieldFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.field = $root.google.ads.admanager.v1.Report.Field.decode(reader, reader.uint32()); - break; - } - case 2: { - message.operation = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.ads.admanager.v1.Report.Value.decode(reader, reader.uint32())); - break; - } - case 4: { - message.slice = $root.google.ads.admanager.v1.Report.Slice.decode(reader, reader.uint32()); - break; - } - case 5: { - message.timePeriodIndex = reader.int32(); - break; - } - case 6: { - message.metricValueType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_preferredDealsEnabled", { + get: $util.oneOfGetter($oneOfFields = ["preferredDealsEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a FieldFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Filter.FieldFilter} FieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProgrammaticBuyer.prototype, "_programmaticGuaranteedEnabled", { + get: $util.oneOfGetter($oneOfFields = ["programmaticGuaranteedEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies a FieldFilter message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.field != null && message.hasOwnProperty("field")) { - var error = $root.google.ads.admanager.v1.Report.Field.verify(message.field); - if (error) - return "field." + error; - } - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - 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.ads.admanager.v1.Report.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - if (message.slice != null && message.hasOwnProperty("slice")) { - properties._slice = 1; - { - var error = $root.google.ads.admanager.v1.Report.Slice.verify(message.slice); - if (error) - return "slice." + error; - } - } - if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { - properties._timePeriodIndex = 1; - if (!$util.isInteger(message.timePeriodIndex)) - return "timePeriodIndex: integer expected"; - } - if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { - properties._metricValueType = 1; - switch (message.metricValueType) { - default: - return "metricValueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - return null; - }; + /** + * Creates a new ProgrammaticBuyer instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {google.ads.admanager.v1.IProgrammaticBuyer=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer instance + */ + ProgrammaticBuyer.create = function create(properties) { + return new ProgrammaticBuyer(properties); + }; - /** - * Creates a FieldFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Filter.FieldFilter} FieldFilter - */ - FieldFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Filter.FieldFilter) - return object; - var message = new $root.google.ads.admanager.v1.Report.Filter.FieldFilter(); - if (object.field != null) { - if (typeof object.field !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.FieldFilter.field: object expected"); - message.field = $root.google.ads.admanager.v1.Report.Field.fromObject(object.field); - } - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; - break; - } - break; - case "IN": - case 0: - message.operation = 0; - break; - case "NOT_IN": - case 1: - message.operation = 1; - break; - case "CONTAINS": - case 2: - message.operation = 2; - break; - case "NOT_CONTAINS": - case 3: - message.operation = 3; - break; - case "LESS_THAN": - case 4: - message.operation = 4; - break; - case "LESS_THAN_EQUALS": - case 5: - message.operation = 5; - break; - case "GREATER_THAN": - case 6: - message.operation = 6; - break; - case "GREATER_THAN_EQUALS": - case 7: - message.operation = 7; - break; - case "BETWEEN": - case 8: - message.operation = 8; - break; - case "MATCHES": - case 9: - message.operation = 9; - break; - case "NOT_MATCHES": - case 10: - message.operation = 10; + /** + * Encodes the specified ProgrammaticBuyer message. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {google.ads.admanager.v1.IProgrammaticBuyer} message ProgrammaticBuyer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgrammaticBuyer.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.buyerAccountId != null && Object.hasOwnProperty.call(message, "buyerAccountId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.buyerAccountId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.parentAccountId != null && Object.hasOwnProperty.call(message, "parentAccountId")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.parentAccountId); + if (message.partnerClientId != null && Object.hasOwnProperty.call(message, "partnerClientId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.partnerClientId); + if (message.agency != null && Object.hasOwnProperty.call(message, "agency")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.agency); + if (message.preferredDealsEnabled != null && Object.hasOwnProperty.call(message, "preferredDealsEnabled")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.preferredDealsEnabled); + if (message.programmaticGuaranteedEnabled != null && Object.hasOwnProperty.call(message, "programmaticGuaranteedEnabled")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.programmaticGuaranteedEnabled); + return writer; + }; + + /** + * Encodes the specified ProgrammaticBuyer message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ProgrammaticBuyer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {google.ads.admanager.v1.IProgrammaticBuyer} message ProgrammaticBuyer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgrammaticBuyer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProgrammaticBuyer message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgrammaticBuyer.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ProgrammaticBuyer(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.ads.admanager.v1.Report.Filter.FieldFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.FieldFilter.values: object expected"); - message.values[i] = $root.google.ads.admanager.v1.Report.Value.fromObject(object.values[i]); - } - } - if (object.slice != null) { - if (typeof object.slice !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.FieldFilter.slice: object expected"); - message.slice = $root.google.ads.admanager.v1.Report.Slice.fromObject(object.slice); - } - if (object.timePeriodIndex != null) - message.timePeriodIndex = object.timePeriodIndex | 0; - switch (object.metricValueType) { - default: - if (typeof object.metricValueType === "number") { - message.metricValueType = object.metricValueType; - break; - } + case 2: { + message.buyerAccountId = reader.int64(); break; - case "PRIMARY": - case 0: - message.metricValueType = 0; + } + case 5: { + message.displayName = reader.string(); break; - case "PRIMARY_PERCENT_OF_TOTAL": - case 1: - message.metricValueType = 1; + } + case 6: { + message.parentAccountId = reader.int64(); break; - case "COMPARISON": - case 2: - message.metricValueType = 2; + } + case 7: { + message.partnerClientId = reader.string(); break; - case "COMPARISON_PERCENT_OF_TOTAL": - case 3: - message.metricValueType = 3; + } + case 9: { + message.agency = reader.bool(); break; - case "ABSOLUTE_CHANGE": - case 4: - message.metricValueType = 4; + } + case 12: { + message.preferredDealsEnabled = reader.bool(); break; - case "RELATIVE_CHANGE": - case 5: - message.metricValueType = 5; + } + case 13: { + message.programmaticGuaranteedEnabled = reader.bool(); break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProgrammaticBuyer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgrammaticBuyer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProgrammaticBuyer message. + * @function verify + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProgrammaticBuyer.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.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { + properties._buyerAccountId = 1; + if (!$util.isInteger(message.buyerAccountId) && !(message.buyerAccountId && $util.isInteger(message.buyerAccountId.low) && $util.isInteger(message.buyerAccountId.high))) + return "buyerAccountId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.parentAccountId != null && message.hasOwnProperty("parentAccountId")) { + properties._parentAccountId = 1; + if (!$util.isInteger(message.parentAccountId) && !(message.parentAccountId && $util.isInteger(message.parentAccountId.low) && $util.isInteger(message.parentAccountId.high))) + return "parentAccountId: integer|Long expected"; + } + if (message.partnerClientId != null && message.hasOwnProperty("partnerClientId")) { + properties._partnerClientId = 1; + if (!$util.isString(message.partnerClientId)) + return "partnerClientId: string expected"; + } + if (message.agency != null && message.hasOwnProperty("agency")) { + properties._agency = 1; + if (typeof message.agency !== "boolean") + return "agency: boolean expected"; + } + if (message.preferredDealsEnabled != null && message.hasOwnProperty("preferredDealsEnabled")) { + properties._preferredDealsEnabled = 1; + if (typeof message.preferredDealsEnabled !== "boolean") + return "preferredDealsEnabled: boolean expected"; + } + if (message.programmaticGuaranteedEnabled != null && message.hasOwnProperty("programmaticGuaranteedEnabled")) { + properties._programmaticGuaranteedEnabled = 1; + if (typeof message.programmaticGuaranteedEnabled !== "boolean") + return "programmaticGuaranteedEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a ProgrammaticBuyer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ProgrammaticBuyer} ProgrammaticBuyer + */ + ProgrammaticBuyer.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ProgrammaticBuyer) + return object; + var message = new $root.google.ads.admanager.v1.ProgrammaticBuyer(); + if (object.name != null) + message.name = String(object.name); + if (object.buyerAccountId != null) + if ($util.Long) + (message.buyerAccountId = $util.Long.fromValue(object.buyerAccountId)).unsigned = false; + else if (typeof object.buyerAccountId === "string") + message.buyerAccountId = parseInt(object.buyerAccountId, 10); + else if (typeof object.buyerAccountId === "number") + message.buyerAccountId = object.buyerAccountId; + else if (typeof object.buyerAccountId === "object") + message.buyerAccountId = new $util.LongBits(object.buyerAccountId.low >>> 0, object.buyerAccountId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.parentAccountId != null) + if ($util.Long) + (message.parentAccountId = $util.Long.fromValue(object.parentAccountId)).unsigned = false; + else if (typeof object.parentAccountId === "string") + message.parentAccountId = parseInt(object.parentAccountId, 10); + else if (typeof object.parentAccountId === "number") + message.parentAccountId = object.parentAccountId; + else if (typeof object.parentAccountId === "object") + message.parentAccountId = new $util.LongBits(object.parentAccountId.low >>> 0, object.parentAccountId.high >>> 0).toNumber(); + if (object.partnerClientId != null) + message.partnerClientId = String(object.partnerClientId); + if (object.agency != null) + message.agency = Boolean(object.agency); + if (object.preferredDealsEnabled != null) + message.preferredDealsEnabled = Boolean(object.preferredDealsEnabled); + if (object.programmaticGuaranteedEnabled != null) + message.programmaticGuaranteedEnabled = Boolean(object.programmaticGuaranteedEnabled); + return message; + }; + + /** + * Creates a plain object from a ProgrammaticBuyer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {google.ads.admanager.v1.ProgrammaticBuyer} message ProgrammaticBuyer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProgrammaticBuyer.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 (message.buyerAccountId != null && message.hasOwnProperty("buyerAccountId")) { + if (typeof message.buyerAccountId === "number") + object.buyerAccountId = options.longs === String ? String(message.buyerAccountId) : message.buyerAccountId; + else + object.buyerAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.buyerAccountId) : options.longs === Number ? new $util.LongBits(message.buyerAccountId.low >>> 0, message.buyerAccountId.high >>> 0).toNumber() : message.buyerAccountId; + if (options.oneofs) + object._buyerAccountId = "buyerAccountId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.parentAccountId != null && message.hasOwnProperty("parentAccountId")) { + if (typeof message.parentAccountId === "number") + object.parentAccountId = options.longs === String ? String(message.parentAccountId) : message.parentAccountId; + else + object.parentAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.parentAccountId) : options.longs === Number ? new $util.LongBits(message.parentAccountId.low >>> 0, message.parentAccountId.high >>> 0).toNumber() : message.parentAccountId; + if (options.oneofs) + object._parentAccountId = "parentAccountId"; + } + if (message.partnerClientId != null && message.hasOwnProperty("partnerClientId")) { + object.partnerClientId = message.partnerClientId; + if (options.oneofs) + object._partnerClientId = "partnerClientId"; + } + if (message.agency != null && message.hasOwnProperty("agency")) { + object.agency = message.agency; + if (options.oneofs) + object._agency = "agency"; + } + if (message.preferredDealsEnabled != null && message.hasOwnProperty("preferredDealsEnabled")) { + object.preferredDealsEnabled = message.preferredDealsEnabled; + if (options.oneofs) + object._preferredDealsEnabled = "preferredDealsEnabled"; + } + if (message.programmaticGuaranteedEnabled != null && message.hasOwnProperty("programmaticGuaranteedEnabled")) { + object.programmaticGuaranteedEnabled = message.programmaticGuaranteedEnabled; + if (options.oneofs) + object._programmaticGuaranteedEnabled = "programmaticGuaranteedEnabled"; + } + return object; + }; - /** - * Creates a plain object from a FieldFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {google.ads.admanager.v1.Report.Filter.FieldFilter} message FieldFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.field = null; - object.operation = options.enums === String ? "IN" : 0; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = $root.google.ads.admanager.v1.Report.Field.toObject(message.field, options); - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.ads.admanager.v1.Report.Filter.Operation[message.operation] === undefined ? message.operation : $root.google.ads.admanager.v1.Report.Filter.Operation[message.operation] : message.operation; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.ads.admanager.v1.Report.Value.toObject(message.values[j], options); - } - if (message.slice != null && message.hasOwnProperty("slice")) { - object.slice = $root.google.ads.admanager.v1.Report.Slice.toObject(message.slice, options); - if (options.oneofs) - object._slice = "slice"; - } - if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { - object.timePeriodIndex = message.timePeriodIndex; - if (options.oneofs) - object._timePeriodIndex = "timePeriodIndex"; - } - if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { - object.metricValueType = options.enums === String ? $root.google.ads.admanager.v1.Report.MetricValueType[message.metricValueType] === undefined ? message.metricValueType : $root.google.ads.admanager.v1.Report.MetricValueType[message.metricValueType] : message.metricValueType; - if (options.oneofs) - object._metricValueType = "metricValueType"; - } - return object; - }; + /** + * Converts this ProgrammaticBuyer to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @instance + * @returns {Object.} JSON object + */ + ProgrammaticBuyer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FieldFilter to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @instance - * @returns {Object.} JSON object - */ - FieldFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ProgrammaticBuyer + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ProgrammaticBuyer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProgrammaticBuyer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ProgrammaticBuyer"; + }; - /** - * Gets the default type url for FieldFilter - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Filter.FieldFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Filter.FieldFilter"; - }; + return ProgrammaticBuyer; + })(); - return FieldFilter; - })(); + v1.ProgrammaticBuyerService = (function() { - Filter.FilterList = (function() { + /** + * Constructs a new ProgrammaticBuyerService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ProgrammaticBuyerService + * @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 ProgrammaticBuyerService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Properties of a FilterList. - * @memberof google.ads.admanager.v1.Report.Filter - * @interface IFilterList - * @property {Array.|null} [filters] FilterList filters - */ + (ProgrammaticBuyerService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ProgrammaticBuyerService; - /** - * Constructs a new FilterList. - * @memberof google.ads.admanager.v1.Report.Filter - * @classdesc Represents a FilterList. - * @implements IFilterList - * @constructor - * @param {google.ads.admanager.v1.Report.Filter.IFilterList=} [properties] Properties to set - */ - function FilterList(properties) { - this.filters = []; - 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 new ProgrammaticBuyerService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @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 {ProgrammaticBuyerService} RPC service. Useful where requests and/or responses are streamed. + */ + ProgrammaticBuyerService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * FilterList filters. - * @member {Array.} filters - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @instance - */ - FilterList.prototype.filters = $util.emptyArray; + /** + * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|getProgrammaticBuyer}. + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @typedef GetProgrammaticBuyerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ProgrammaticBuyer} [response] ProgrammaticBuyer + */ - /** - * Creates a new FilterList instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFilterList=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Filter.FilterList} FilterList instance - */ - FilterList.create = function create(properties) { - return new FilterList(properties); - }; + /** + * Calls GetProgrammaticBuyer. + * @function getProgrammaticBuyer + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @instance + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} request GetProgrammaticBuyerRequest message or plain object + * @param {google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyerCallback} callback Node-style callback called with the error, if any, and ProgrammaticBuyer + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ProgrammaticBuyerService.prototype.getProgrammaticBuyer = function getProgrammaticBuyer(request, callback) { + return this.rpcCall(getProgrammaticBuyer, $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest, $root.google.ads.admanager.v1.ProgrammaticBuyer, request, callback); + }, "name", { value: "GetProgrammaticBuyer" }); - /** - * Encodes the specified FilterList message. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FilterList.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFilterList} message FilterList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filters != null && message.filters.length) - for (var i = 0; i < message.filters.length; ++i) - $root.google.ads.admanager.v1.Report.Filter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Calls GetProgrammaticBuyer. + * @function getProgrammaticBuyer + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @instance + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} request GetProgrammaticBuyerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified FilterList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Filter.FilterList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {google.ads.admanager.v1.Report.Filter.IFilterList} message FilterList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.ads.admanager.v1.ProgrammaticBuyerService|listProgrammaticBuyers}. + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @typedef ListProgrammaticBuyersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListProgrammaticBuyersResponse} [response] ListProgrammaticBuyersResponse + */ - /** - * Decodes a FilterList message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Filter.FilterList} FilterList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Filter.FilterList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.filters && message.filters.length)) - message.filters = []; - message.filters.push($root.google.ads.admanager.v1.Report.Filter.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListProgrammaticBuyers. + * @function listProgrammaticBuyers + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @instance + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} request ListProgrammaticBuyersRequest message or plain object + * @param {google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyersCallback} callback Node-style callback called with the error, if any, and ListProgrammaticBuyersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ProgrammaticBuyerService.prototype.listProgrammaticBuyers = function listProgrammaticBuyers(request, callback) { + return this.rpcCall(listProgrammaticBuyers, $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest, $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse, request, callback); + }, "name", { value: "ListProgrammaticBuyers" }); - /** - * Decodes a FilterList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Filter.FilterList} FilterList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ListProgrammaticBuyers. + * @function listProgrammaticBuyers + * @memberof google.ads.admanager.v1.ProgrammaticBuyerService + * @instance + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} request ListProgrammaticBuyersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a FilterList message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Filter.verify(message.filters[i]); - if (error) - return "filters." + error; - } - } - return null; - }; + return ProgrammaticBuyerService; + })(); - /** - * Creates a FilterList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Filter.FilterList} FilterList - */ - FilterList.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Filter.FilterList) - return object; - var message = new $root.google.ads.admanager.v1.Report.Filter.FilterList(); - if (object.filters) { - if (!Array.isArray(object.filters)) - throw TypeError(".google.ads.admanager.v1.Report.Filter.FilterList.filters: array expected"); - message.filters = []; - for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Filter.FilterList.filters: object expected"); - message.filters[i] = $root.google.ads.admanager.v1.Report.Filter.fromObject(object.filters[i]); - } + v1.GetProgrammaticBuyerRequest = (function() { + + /** + * Properties of a GetProgrammaticBuyerRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetProgrammaticBuyerRequest + * @property {string|null} [name] GetProgrammaticBuyerRequest name + */ + + /** + * Constructs a new GetProgrammaticBuyerRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetProgrammaticBuyerRequest. + * @implements IGetProgrammaticBuyerRequest + * @constructor + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest=} [properties] Properties to set + */ + function GetProgrammaticBuyerRequest(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]]; + } + + /** + * GetProgrammaticBuyerRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @instance + */ + GetProgrammaticBuyerRequest.prototype.name = ""; + + /** + * Creates a new GetProgrammaticBuyerRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest instance + */ + GetProgrammaticBuyerRequest.create = function create(properties) { + return new GetProgrammaticBuyerRequest(properties); + }; + + /** + * Encodes the specified GetProgrammaticBuyerRequest message. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProgrammaticBuyerRequest.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 GetProgrammaticBuyerRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetProgrammaticBuyerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {google.ads.admanager.v1.IGetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProgrammaticBuyerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProgrammaticBuyerRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProgrammaticBuyerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProgrammaticBuyerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProgrammaticBuyerRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProgrammaticBuyerRequest.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 GetProgrammaticBuyerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetProgrammaticBuyerRequest} GetProgrammaticBuyerRequest + */ + GetProgrammaticBuyerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetProgrammaticBuyerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProgrammaticBuyerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {google.ads.admanager.v1.GetProgrammaticBuyerRequest} message GetProgrammaticBuyerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProgrammaticBuyerRequest.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 GetProgrammaticBuyerRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @instance + * @returns {Object.} JSON object + */ + GetProgrammaticBuyerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a FilterList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {google.ads.admanager.v1.Report.Filter.FilterList} message FilterList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filters = []; - if (message.filters && message.filters.length) { - object.filters = []; - for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.google.ads.admanager.v1.Report.Filter.toObject(message.filters[j], options); - } - return object; - }; + /** + * Gets the default type url for GetProgrammaticBuyerRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetProgrammaticBuyerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProgrammaticBuyerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetProgrammaticBuyerRequest"; + }; - /** - * Converts this FilterList to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @instance - * @returns {Object.} JSON object - */ - FilterList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return GetProgrammaticBuyerRequest; + })(); - /** - * Gets the default type url for FilterList - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Filter.FilterList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilterList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Filter.FilterList"; - }; + v1.ListProgrammaticBuyersRequest = (function() { - return FilterList; - })(); + /** + * Properties of a ListProgrammaticBuyersRequest. + * @memberof google.ads.admanager.v1 + * @interface IListProgrammaticBuyersRequest + * @property {string|null} [parent] ListProgrammaticBuyersRequest parent + * @property {number|null} [pageSize] ListProgrammaticBuyersRequest pageSize + * @property {string|null} [pageToken] ListProgrammaticBuyersRequest pageToken + * @property {string|null} [filter] ListProgrammaticBuyersRequest filter + * @property {string|null} [orderBy] ListProgrammaticBuyersRequest orderBy + * @property {number|null} [skip] ListProgrammaticBuyersRequest skip + */ - /** - * Operation enum. - * @name google.ads.admanager.v1.Report.Filter.Operation - * @enum {number} - * @property {number} IN=0 IN value - * @property {number} NOT_IN=1 NOT_IN value - * @property {number} CONTAINS=2 CONTAINS value - * @property {number} NOT_CONTAINS=3 NOT_CONTAINS value - * @property {number} LESS_THAN=4 LESS_THAN value - * @property {number} LESS_THAN_EQUALS=5 LESS_THAN_EQUALS value - * @property {number} GREATER_THAN=6 GREATER_THAN value - * @property {number} GREATER_THAN_EQUALS=7 GREATER_THAN_EQUALS value - * @property {number} BETWEEN=8 BETWEEN value - * @property {number} MATCHES=9 MATCHES value - * @property {number} NOT_MATCHES=10 NOT_MATCHES value - */ - Filter.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IN"] = 0; - values[valuesById[1] = "NOT_IN"] = 1; - values[valuesById[2] = "CONTAINS"] = 2; - values[valuesById[3] = "NOT_CONTAINS"] = 3; - values[valuesById[4] = "LESS_THAN"] = 4; - values[valuesById[5] = "LESS_THAN_EQUALS"] = 5; - values[valuesById[6] = "GREATER_THAN"] = 6; - values[valuesById[7] = "GREATER_THAN_EQUALS"] = 7; - values[valuesById[8] = "BETWEEN"] = 8; - values[valuesById[9] = "MATCHES"] = 9; - values[valuesById[10] = "NOT_MATCHES"] = 10; - return values; - })(); + /** + * Constructs a new ListProgrammaticBuyersRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListProgrammaticBuyersRequest. + * @implements IListProgrammaticBuyersRequest + * @constructor + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest=} [properties] Properties to set + */ + function ListProgrammaticBuyersRequest(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 Filter; - })(); + /** + * ListProgrammaticBuyersRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.parent = ""; - Report.Flag = (function() { + /** + * ListProgrammaticBuyersRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.pageSize = 0; - /** - * Properties of a Flag. - * @memberof google.ads.admanager.v1.Report - * @interface IFlag - * @property {Array.|null} [filters] Flag filters - * @property {string|null} [name] Flag name - */ + /** + * ListProgrammaticBuyersRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.pageToken = ""; - /** - * Constructs a new Flag. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a Flag. - * @implements IFlag - * @constructor - * @param {google.ads.admanager.v1.Report.IFlag=} [properties] Properties to set - */ - function Flag(properties) { - this.filters = []; - 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]]; - } + /** + * ListProgrammaticBuyersRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.filter = ""; - /** - * Flag filters. - * @member {Array.} filters - * @memberof google.ads.admanager.v1.Report.Flag - * @instance - */ - Flag.prototype.filters = $util.emptyArray; + /** + * ListProgrammaticBuyersRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.orderBy = ""; - /** - * Flag name. - * @member {string} name - * @memberof google.ads.admanager.v1.Report.Flag - * @instance - */ - Flag.prototype.name = ""; + /** + * ListProgrammaticBuyersRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + */ + ListProgrammaticBuyersRequest.prototype.skip = 0; - /** - * Creates a new Flag instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {google.ads.admanager.v1.Report.IFlag=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.Flag} Flag instance - */ - Flag.create = function create(properties) { - return new Flag(properties); - }; + /** + * Creates a new ListProgrammaticBuyersRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest instance + */ + ListProgrammaticBuyersRequest.create = function create(properties) { + return new ListProgrammaticBuyersRequest(properties); + }; - /** - * Encodes the specified Flag message. Does not implicitly {@link google.ads.admanager.v1.Report.Flag.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {google.ads.admanager.v1.Report.IFlag} message Flag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Flag.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filters != null && message.filters.length) - for (var i = 0; i < message.filters.length; ++i) - $root.google.ads.admanager.v1.Report.Filter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - return writer; - }; + /** + * Encodes the specified ListProgrammaticBuyersRequest message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProgrammaticBuyersRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; - /** - * Encodes the specified Flag message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.Flag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {google.ads.admanager.v1.Report.IFlag} message Flag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Flag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListProgrammaticBuyersRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProgrammaticBuyersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Flag message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.Flag} Flag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Flag.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.Flag(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProgrammaticBuyersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - switch (tag >>> 3) { - case 1: { - if (!(message.filters && message.filters.length)) - message.filters = []; - message.filters.push($root.google.ads.admanager.v1.Report.Filter.decode(reader, reader.uint32())); - break; - } - case 2: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.pageSize = reader.int32(); break; } - } - return message; - }; - - /** - * Decodes a Flag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.Flag} Flag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Flag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Flag message. - * @function verify - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Flag.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Filter.verify(message.filters[i]); - if (error) - return "filters." + error; + case 3: { + message.pageToken = reader.string(); + break; } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Flag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.Flag} Flag - */ - Flag.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.Flag) - return object; - var message = new $root.google.ads.admanager.v1.Report.Flag(); - if (object.filters) { - if (!Array.isArray(object.filters)) - throw TypeError(".google.ads.admanager.v1.Report.Flag.filters: array expected"); - message.filters = []; - for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") - throw TypeError(".google.ads.admanager.v1.Report.Flag.filters: object expected"); - message.filters[i] = $root.google.ads.admanager.v1.Report.Filter.fromObject(object.filters[i]); + case 4: { + message.filter = reader.string(); + break; } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.skip = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Flag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {google.ads.admanager.v1.Report.Flag} message Flag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Flag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filters = []; - if (options.defaults) - object.name = ""; - if (message.filters && message.filters.length) { - object.filters = []; - for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.google.ads.admanager.v1.Report.Filter.toObject(message.filters[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + } + return message; + }; - /** - * Converts this Flag to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.Flag - * @instance - * @returns {Object.} JSON object - */ - Flag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ListProgrammaticBuyersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProgrammaticBuyersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Flag - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.Flag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Flag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.Flag"; - }; + /** + * Verifies a ListProgrammaticBuyersRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProgrammaticBuyersRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; - return Flag; - })(); + /** + * Creates a ListProgrammaticBuyersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersRequest} ListProgrammaticBuyersRequest + */ + ListProgrammaticBuyersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; - Report.DateRange = (function() { + /** + * Creates a plain object from a ListProgrammaticBuyersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {google.ads.admanager.v1.ListProgrammaticBuyersRequest} message ListProgrammaticBuyersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProgrammaticBuyersRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; - /** - * Properties of a DateRange. - * @memberof google.ads.admanager.v1.Report - * @interface IDateRange - * @property {google.ads.admanager.v1.Report.DateRange.IFixedDateRange|null} [fixed] DateRange fixed - * @property {google.ads.admanager.v1.Report.DateRange.RelativeDateRange|null} [relative] DateRange relative - */ + /** + * Converts this ListProgrammaticBuyersRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @instance + * @returns {Object.} JSON object + */ + ListProgrammaticBuyersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new DateRange. - * @memberof google.ads.admanager.v1.Report - * @classdesc Represents a DateRange. - * @implements IDateRange - * @constructor - * @param {google.ads.admanager.v1.Report.IDateRange=} [properties] Properties to set - */ - function DateRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ListProgrammaticBuyersRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProgrammaticBuyersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.ads.admanager.v1.ListProgrammaticBuyersRequest"; + }; - /** - * DateRange fixed. - * @member {google.ads.admanager.v1.Report.DateRange.IFixedDateRange|null|undefined} fixed - * @memberof google.ads.admanager.v1.Report.DateRange - * @instance - */ - DateRange.prototype.fixed = null; + return ListProgrammaticBuyersRequest; + })(); - /** - * DateRange relative. - * @member {google.ads.admanager.v1.Report.DateRange.RelativeDateRange|null|undefined} relative - * @memberof google.ads.admanager.v1.Report.DateRange - * @instance - */ - DateRange.prototype.relative = null; + v1.ListProgrammaticBuyersResponse = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a ListProgrammaticBuyersResponse. + * @memberof google.ads.admanager.v1 + * @interface IListProgrammaticBuyersResponse + * @property {Array.|null} [programmaticBuyers] ListProgrammaticBuyersResponse programmaticBuyers + * @property {string|null} [nextPageToken] ListProgrammaticBuyersResponse nextPageToken + * @property {number|null} [totalSize] ListProgrammaticBuyersResponse totalSize + */ - /** - * DateRange dateRangeType. - * @member {"fixed"|"relative"|undefined} dateRangeType - * @memberof google.ads.admanager.v1.Report.DateRange - * @instance - */ - Object.defineProperty(DateRange.prototype, "dateRangeType", { - get: $util.oneOfGetter($oneOfFields = ["fixed", "relative"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ListProgrammaticBuyersResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListProgrammaticBuyersResponse. + * @implements IListProgrammaticBuyersResponse + * @constructor + * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse=} [properties] Properties to set + */ + function ListProgrammaticBuyersResponse(properties) { + this.programmaticBuyers = []; + 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 DateRange instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {google.ads.admanager.v1.Report.IDateRange=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.DateRange} DateRange instance - */ - DateRange.create = function create(properties) { - return new DateRange(properties); - }; + /** + * ListProgrammaticBuyersResponse programmaticBuyers. + * @member {Array.} programmaticBuyers + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @instance + */ + ListProgrammaticBuyersResponse.prototype.programmaticBuyers = $util.emptyArray; - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {google.ads.admanager.v1.Report.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) - $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.encode(message.fixed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.relative != null && Object.hasOwnProperty.call(message, "relative")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relative); - return writer; - }; + /** + * ListProgrammaticBuyersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @instance + */ + ListProgrammaticBuyersResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {google.ads.admanager.v1.Report.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListProgrammaticBuyersResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @instance + */ + ListProgrammaticBuyersResponse.prototype.totalSize = 0; - /** - * Decodes a DateRange message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.DateRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fixed = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.decode(reader, reader.uint32()); - break; - } - case 2: { - message.relative = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ListProgrammaticBuyersResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse instance + */ + ListProgrammaticBuyersResponse.create = function create(properties) { + return new ListProgrammaticBuyersResponse(properties); + }; - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListProgrammaticBuyersResponse message. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProgrammaticBuyersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.programmaticBuyers != null && message.programmaticBuyers.length) + for (var i = 0; i < message.programmaticBuyers.length; ++i) + $root.google.ads.admanager.v1.ProgrammaticBuyer.encode(message.programmaticBuyers[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; - /** - * Verifies a DateRange message. - * @function verify - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DateRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - properties.dateRangeType = 1; - { - var error = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify(message.fixed); - if (error) - return "fixed." + error; + /** + * Encodes the specified ListProgrammaticBuyersResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListProgrammaticBuyersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {google.ads.admanager.v1.IListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProgrammaticBuyersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProgrammaticBuyersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.programmaticBuyers && message.programmaticBuyers.length)) + message.programmaticBuyers = []; + message.programmaticBuyers.push($root.google.ads.admanager.v1.ProgrammaticBuyer.decode(reader, reader.uint32())); + break; } - } - if (message.relative != null && message.hasOwnProperty("relative")) { - if (properties.dateRangeType === 1) - return "dateRangeType: multiple values"; - properties.dateRangeType = 1; - switch (message.relative) { - default: - return "relative: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 29: - case 4: - case 26: - case 5: - case 27: - case 6: - case 28: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 24: + case 2: { + message.nextPageToken = reader.string(); break; } - } - return null; - }; - - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.DateRange} DateRange - */ - DateRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.DateRange) - return object; - var message = new $root.google.ads.admanager.v1.Report.DateRange(); - if (object.fixed != null) { - if (typeof object.fixed !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DateRange.fixed: object expected"); - message.fixed = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.fromObject(object.fixed); - } - switch (object.relative) { - default: - if (typeof object.relative === "number") { - message.relative = object.relative; + case 3: { + message.totalSize = reader.int32(); break; } + default: + reader.skipType(tag & 7); break; - case "RELATIVE_DATE_RANGE_UNSPECIFIED": - case 0: - message.relative = 0; - break; - case "TODAY": - case 1: - message.relative = 1; - break; - case "YESTERDAY": - case 2: - message.relative = 2; - break; - case "THIS_WEEK": - case 3: - message.relative = 3; - break; - case "THIS_WEEK_TO_DATE": - case 29: - message.relative = 29; - break; - case "THIS_MONTH": - case 4: - message.relative = 4; - break; - case "THIS_MONTH_TO_DATE": - case 26: - message.relative = 26; - break; - case "THIS_QUARTER": - case 5: - message.relative = 5; - break; - case "THIS_QUARTER_TO_DATE": - case 27: - message.relative = 27; - break; - case "THIS_YEAR": - case 6: - message.relative = 6; - break; - case "THIS_YEAR_TO_DATE": - case 28: - message.relative = 28; - break; - case "LAST_WEEK": - case 7: - message.relative = 7; - break; - case "LAST_MONTH": - case 8: - message.relative = 8; - break; - case "LAST_QUARTER": - case 9: - message.relative = 9; - break; - case "LAST_YEAR": - case 10: - message.relative = 10; - break; - case "LAST_7_DAYS": - case 11: - message.relative = 11; - break; - case "LAST_30_DAYS": - case 12: - message.relative = 12; - break; - case "LAST_60_DAYS": - case 13: - message.relative = 13; - break; - case "LAST_90_DAYS": - case 14: - message.relative = 14; - break; - case "LAST_180_DAYS": - case 15: - message.relative = 15; - break; - case "LAST_360_DAYS": - case 16: - message.relative = 16; - break; - case "LAST_365_DAYS": - case 17: - message.relative = 17; - break; - case "LAST_3_MONTHS": - case 18: - message.relative = 18; - break; - case "LAST_6_MONTHS": - case 19: - message.relative = 19; - break; - case "LAST_12_MONTHS": - case 20: - message.relative = 20; - break; - case "ALL_AVAILABLE": - case 21: - message.relative = 21; - break; - case "PREVIOUS_PERIOD": - case 22: - message.relative = 22; - break; - case "SAME_PERIOD_PREVIOUS_YEAR": - case 24: - message.relative = 24; - break; } - return message; - }; + } + return message; + }; + + /** + * Decodes a ListProgrammaticBuyersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProgrammaticBuyersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProgrammaticBuyersResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProgrammaticBuyersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.programmaticBuyers != null && message.hasOwnProperty("programmaticBuyers")) { + if (!Array.isArray(message.programmaticBuyers)) + return "programmaticBuyers: array expected"; + for (var i = 0; i < message.programmaticBuyers.length; ++i) { + var error = $root.google.ads.admanager.v1.ProgrammaticBuyer.verify(message.programmaticBuyers[i]); + if (error) + return "programmaticBuyers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {google.ads.admanager.v1.Report.DateRange} message DateRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DateRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - object.fixed = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.toObject(message.fixed, options); - if (options.oneofs) - object.dateRangeType = "fixed"; - } - if (message.relative != null && message.hasOwnProperty("relative")) { - object.relative = options.enums === String ? $root.google.ads.admanager.v1.Report.DateRange.RelativeDateRange[message.relative] === undefined ? message.relative : $root.google.ads.admanager.v1.Report.DateRange.RelativeDateRange[message.relative] : message.relative; - if (options.oneofs) - object.dateRangeType = "relative"; - } + /** + * Creates a ListProgrammaticBuyersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListProgrammaticBuyersResponse} ListProgrammaticBuyersResponse + */ + ListProgrammaticBuyersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse) return object; - }; + var message = new $root.google.ads.admanager.v1.ListProgrammaticBuyersResponse(); + if (object.programmaticBuyers) { + if (!Array.isArray(object.programmaticBuyers)) + throw TypeError(".google.ads.admanager.v1.ListProgrammaticBuyersResponse.programmaticBuyers: array expected"); + message.programmaticBuyers = []; + for (var i = 0; i < object.programmaticBuyers.length; ++i) { + if (typeof object.programmaticBuyers[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListProgrammaticBuyersResponse.programmaticBuyers: object expected"); + message.programmaticBuyers[i] = $root.google.ads.admanager.v1.ProgrammaticBuyer.fromObject(object.programmaticBuyers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; - /** - * Converts this DateRange to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.DateRange - * @instance - * @returns {Object.} JSON object - */ - DateRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListProgrammaticBuyersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {google.ads.admanager.v1.ListProgrammaticBuyersResponse} message ListProgrammaticBuyersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProgrammaticBuyersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.programmaticBuyers = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.programmaticBuyers && message.programmaticBuyers.length) { + object.programmaticBuyers = []; + for (var j = 0; j < message.programmaticBuyers.length; ++j) + object.programmaticBuyers[j] = $root.google.ads.admanager.v1.ProgrammaticBuyer.toObject(message.programmaticBuyers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; - /** - * Gets the default type url for DateRange - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.DateRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.DateRange"; - }; + /** + * Converts this ListProgrammaticBuyersResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @instance + * @returns {Object.} JSON object + */ + ListProgrammaticBuyersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - DateRange.FixedDateRange = (function() { + /** + * Gets the default type url for ListProgrammaticBuyersResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListProgrammaticBuyersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProgrammaticBuyersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListProgrammaticBuyersResponse"; + }; - /** - * Properties of a FixedDateRange. - * @memberof google.ads.admanager.v1.Report.DateRange - * @interface IFixedDateRange - * @property {google.type.IDate|null} [startDate] FixedDateRange startDate - * @property {google.type.IDate|null} [endDate] FixedDateRange endDate - */ + return ListProgrammaticBuyersResponse; + })(); - /** - * Constructs a new FixedDateRange. - * @memberof google.ads.admanager.v1.Report.DateRange - * @classdesc Represents a FixedDateRange. - * @implements IFixedDateRange - * @constructor - * @param {google.ads.admanager.v1.Report.DateRange.IFixedDateRange=} [properties] Properties to set - */ - function FixedDateRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.ReportDefinition = (function() { - /** - * FixedDateRange startDate. - * @member {google.type.IDate|null|undefined} startDate - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @instance - */ - FixedDateRange.prototype.startDate = null; + /** + * Properties of a ReportDefinition. + * @memberof google.ads.admanager.v1 + * @interface IReportDefinition + * @property {Array.|null} [dimensions] ReportDefinition dimensions + * @property {Array.|null} [metrics] ReportDefinition metrics + * @property {Array.|null} [filters] ReportDefinition filters + * @property {google.ads.admanager.v1.ReportDefinition.TimeZoneSource|null} [timeZoneSource] ReportDefinition timeZoneSource + * @property {string|null} [timeZone] ReportDefinition timeZone + * @property {string|null} [currencyCode] ReportDefinition currencyCode + * @property {google.ads.admanager.v1.ReportDefinition.IDateRange|null} [dateRange] ReportDefinition dateRange + * @property {google.ads.admanager.v1.ReportDefinition.IDateRange|null} [comparisonDateRange] ReportDefinition comparisonDateRange + * @property {Array.|null} [customDimensionKeyIds] ReportDefinition customDimensionKeyIds + * @property {Array.|null} [lineItemCustomFieldIds] ReportDefinition lineItemCustomFieldIds + * @property {Array.|null} [orderCustomFieldIds] ReportDefinition orderCustomFieldIds + * @property {Array.|null} [creativeCustomFieldIds] ReportDefinition creativeCustomFieldIds + * @property {google.ads.admanager.v1.ReportDefinition.ReportType|null} [reportType] ReportDefinition reportType + * @property {google.ads.admanager.v1.ReportDefinition.TimePeriodColumn|null} [timePeriodColumn] ReportDefinition timePeriodColumn + * @property {Array.|null} [flags] ReportDefinition flags + * @property {Array.|null} [sorts] ReportDefinition sorts + */ - /** - * FixedDateRange endDate. - * @member {google.type.IDate|null|undefined} endDate - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @instance - */ - FixedDateRange.prototype.endDate = null; + /** + * Constructs a new ReportDefinition. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ReportDefinition. + * @implements IReportDefinition + * @constructor + * @param {google.ads.admanager.v1.IReportDefinition=} [properties] Properties to set + */ + function ReportDefinition(properties) { + this.dimensions = []; + this.metrics = []; + this.filters = []; + this.customDimensionKeyIds = []; + this.lineItemCustomFieldIds = []; + this.orderCustomFieldIds = []; + this.creativeCustomFieldIds = []; + this.flags = []; + this.sorts = []; + 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 FixedDateRange instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {google.ads.admanager.v1.Report.DateRange.IFixedDateRange=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Report.DateRange.FixedDateRange} FixedDateRange instance - */ - FixedDateRange.create = function create(properties) { - return new FixedDateRange(properties); - }; + /** + * ReportDefinition dimensions. + * @member {Array.} dimensions + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensions = $util.emptyArray; - /** - * Encodes the specified FixedDateRange message. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {google.ads.admanager.v1.Report.DateRange.IFixedDateRange} message FixedDateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FixedDateRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - $root.google.type.Date.encode(message.startDate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - $root.google.type.Date.encode(message.endDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * ReportDefinition metrics. + * @member {Array.} metrics + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metrics = $util.emptyArray; - /** - * Encodes the specified FixedDateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {google.ads.admanager.v1.Report.DateRange.IFixedDateRange} message FixedDateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FixedDateRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ReportDefinition filters. + * @member {Array.} filters + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.filters = $util.emptyArray; - /** - * Decodes a FixedDateRange message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Report.DateRange.FixedDateRange} FixedDateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FixedDateRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ReportDefinition timeZoneSource. + * @member {google.ads.admanager.v1.ReportDefinition.TimeZoneSource} timeZoneSource + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.timeZoneSource = 0; - /** - * Decodes a FixedDateRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Report.DateRange.FixedDateRange} FixedDateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FixedDateRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ReportDefinition timeZone. + * @member {string} timeZone + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.timeZone = ""; - /** - * Verifies a FixedDateRange message. - * @function verify - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FixedDateRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startDate != null && message.hasOwnProperty("startDate")) { - var error = $root.google.type.Date.verify(message.startDate); - if (error) - return "startDate." + error; - } - if (message.endDate != null && message.hasOwnProperty("endDate")) { - var error = $root.google.type.Date.verify(message.endDate); - if (error) - return "endDate." + error; - } - return null; - }; + /** + * ReportDefinition currencyCode. + * @member {string} currencyCode + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.currencyCode = ""; - /** - * Creates a FixedDateRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Report.DateRange.FixedDateRange} FixedDateRange - */ - FixedDateRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange) - return object; - var message = new $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange(); - if (object.startDate != null) { - if (typeof object.startDate !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DateRange.FixedDateRange.startDate: object expected"); - message.startDate = $root.google.type.Date.fromObject(object.startDate); - } - if (object.endDate != null) { - if (typeof object.endDate !== "object") - throw TypeError(".google.ads.admanager.v1.Report.DateRange.FixedDateRange.endDate: object expected"); - message.endDate = $root.google.type.Date.fromObject(object.endDate); - } - return message; - }; + /** + * ReportDefinition dateRange. + * @member {google.ads.admanager.v1.ReportDefinition.IDateRange|null|undefined} dateRange + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dateRange = null; - /** - * Creates a plain object from a FixedDateRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {google.ads.admanager.v1.Report.DateRange.FixedDateRange} message FixedDateRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FixedDateRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startDate = null; - object.endDate = null; - } - if (message.startDate != null && message.hasOwnProperty("startDate")) - object.startDate = $root.google.type.Date.toObject(message.startDate, options); - if (message.endDate != null && message.hasOwnProperty("endDate")) - object.endDate = $root.google.type.Date.toObject(message.endDate, options); - return object; - }; + /** + * ReportDefinition comparisonDateRange. + * @member {google.ads.admanager.v1.ReportDefinition.IDateRange|null|undefined} comparisonDateRange + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.comparisonDateRange = null; - /** - * Converts this FixedDateRange to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @instance - * @returns {Object.} JSON object - */ - FixedDateRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ReportDefinition customDimensionKeyIds. + * @member {Array.} customDimensionKeyIds + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.customDimensionKeyIds = $util.emptyArray; - /** - * Gets the default type url for FixedDateRange - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Report.DateRange.FixedDateRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FixedDateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Report.DateRange.FixedDateRange"; - }; + /** + * ReportDefinition lineItemCustomFieldIds. + * @member {Array.} lineItemCustomFieldIds + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.lineItemCustomFieldIds = $util.emptyArray; - return FixedDateRange; - })(); + /** + * ReportDefinition orderCustomFieldIds. + * @member {Array.} orderCustomFieldIds + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.orderCustomFieldIds = $util.emptyArray; - /** - * RelativeDateRange enum. - * @name google.ads.admanager.v1.Report.DateRange.RelativeDateRange - * @enum {number} - * @property {number} RELATIVE_DATE_RANGE_UNSPECIFIED=0 RELATIVE_DATE_RANGE_UNSPECIFIED value - * @property {number} TODAY=1 TODAY value - * @property {number} YESTERDAY=2 YESTERDAY value - * @property {number} THIS_WEEK=3 THIS_WEEK value - * @property {number} THIS_WEEK_TO_DATE=29 THIS_WEEK_TO_DATE value - * @property {number} THIS_MONTH=4 THIS_MONTH value - * @property {number} THIS_MONTH_TO_DATE=26 THIS_MONTH_TO_DATE value - * @property {number} THIS_QUARTER=5 THIS_QUARTER value - * @property {number} THIS_QUARTER_TO_DATE=27 THIS_QUARTER_TO_DATE value - * @property {number} THIS_YEAR=6 THIS_YEAR value - * @property {number} THIS_YEAR_TO_DATE=28 THIS_YEAR_TO_DATE value - * @property {number} LAST_WEEK=7 LAST_WEEK value - * @property {number} LAST_MONTH=8 LAST_MONTH value - * @property {number} LAST_QUARTER=9 LAST_QUARTER value - * @property {number} LAST_YEAR=10 LAST_YEAR value - * @property {number} LAST_7_DAYS=11 LAST_7_DAYS value - * @property {number} LAST_30_DAYS=12 LAST_30_DAYS value - * @property {number} LAST_60_DAYS=13 LAST_60_DAYS value - * @property {number} LAST_90_DAYS=14 LAST_90_DAYS value - * @property {number} LAST_180_DAYS=15 LAST_180_DAYS value - * @property {number} LAST_360_DAYS=16 LAST_360_DAYS value - * @property {number} LAST_365_DAYS=17 LAST_365_DAYS value - * @property {number} LAST_3_MONTHS=18 LAST_3_MONTHS value - * @property {number} LAST_6_MONTHS=19 LAST_6_MONTHS value - * @property {number} LAST_12_MONTHS=20 LAST_12_MONTHS value - * @property {number} ALL_AVAILABLE=21 ALL_AVAILABLE value - * @property {number} PREVIOUS_PERIOD=22 PREVIOUS_PERIOD value - * @property {number} SAME_PERIOD_PREVIOUS_YEAR=24 SAME_PERIOD_PREVIOUS_YEAR value - */ - DateRange.RelativeDateRange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELATIVE_DATE_RANGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TODAY"] = 1; - values[valuesById[2] = "YESTERDAY"] = 2; - values[valuesById[3] = "THIS_WEEK"] = 3; - values[valuesById[29] = "THIS_WEEK_TO_DATE"] = 29; - values[valuesById[4] = "THIS_MONTH"] = 4; - values[valuesById[26] = "THIS_MONTH_TO_DATE"] = 26; - values[valuesById[5] = "THIS_QUARTER"] = 5; - values[valuesById[27] = "THIS_QUARTER_TO_DATE"] = 27; - values[valuesById[6] = "THIS_YEAR"] = 6; - values[valuesById[28] = "THIS_YEAR_TO_DATE"] = 28; - values[valuesById[7] = "LAST_WEEK"] = 7; - values[valuesById[8] = "LAST_MONTH"] = 8; - values[valuesById[9] = "LAST_QUARTER"] = 9; - values[valuesById[10] = "LAST_YEAR"] = 10; - values[valuesById[11] = "LAST_7_DAYS"] = 11; - values[valuesById[12] = "LAST_30_DAYS"] = 12; - values[valuesById[13] = "LAST_60_DAYS"] = 13; - values[valuesById[14] = "LAST_90_DAYS"] = 14; - values[valuesById[15] = "LAST_180_DAYS"] = 15; - values[valuesById[16] = "LAST_360_DAYS"] = 16; - values[valuesById[17] = "LAST_365_DAYS"] = 17; - values[valuesById[18] = "LAST_3_MONTHS"] = 18; - values[valuesById[19] = "LAST_6_MONTHS"] = 19; - values[valuesById[20] = "LAST_12_MONTHS"] = 20; - values[valuesById[21] = "ALL_AVAILABLE"] = 21; - values[valuesById[22] = "PREVIOUS_PERIOD"] = 22; - values[valuesById[24] = "SAME_PERIOD_PREVIOUS_YEAR"] = 24; - return values; - })(); + /** + * ReportDefinition creativeCustomFieldIds. + * @member {Array.} creativeCustomFieldIds + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.creativeCustomFieldIds = $util.emptyArray; + + /** + * ReportDefinition reportType. + * @member {google.ads.admanager.v1.ReportDefinition.ReportType} reportType + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.reportType = 0; - return DateRange; - })(); + /** + * ReportDefinition timePeriodColumn. + * @member {google.ads.admanager.v1.ReportDefinition.TimePeriodColumn} timePeriodColumn + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.timePeriodColumn = 0; /** - * TimePeriodColumn enum. - * @name google.ads.admanager.v1.Report.TimePeriodColumn - * @enum {number} - * @property {number} TIME_PERIOD_COLUMN_UNSPECIFIED=0 TIME_PERIOD_COLUMN_UNSPECIFIED value - * @property {number} TIME_PERIOD_COLUMN_DATE=1 TIME_PERIOD_COLUMN_DATE value - * @property {number} TIME_PERIOD_COLUMN_WEEK=2 TIME_PERIOD_COLUMN_WEEK value - * @property {number} TIME_PERIOD_COLUMN_MONTH=3 TIME_PERIOD_COLUMN_MONTH value - * @property {number} TIME_PERIOD_COLUMN_QUARTER=4 TIME_PERIOD_COLUMN_QUARTER value + * ReportDefinition flags. + * @member {Array.} flags + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance */ - Report.TimePeriodColumn = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIME_PERIOD_COLUMN_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIME_PERIOD_COLUMN_DATE"] = 1; - values[valuesById[2] = "TIME_PERIOD_COLUMN_WEEK"] = 2; - values[valuesById[3] = "TIME_PERIOD_COLUMN_MONTH"] = 3; - values[valuesById[4] = "TIME_PERIOD_COLUMN_QUARTER"] = 4; - return values; - })(); + ReportDefinition.prototype.flags = $util.emptyArray; /** - * Dimension enum. - * @name google.ads.admanager.v1.Report.Dimension - * @enum {number} - * @property {number} DIMENSION_UNSPECIFIED=0 DIMENSION_UNSPECIFIED value - * @property {number} ADVERTISER_DOMAIN_NAME=242 ADVERTISER_DOMAIN_NAME value - * @property {number} ADVERTISER_EXTERNAL_ID=228 ADVERTISER_EXTERNAL_ID value - * @property {number} ADVERTISER_ID=131 ADVERTISER_ID value - * @property {number} ADVERTISER_LABELS=230 ADVERTISER_LABELS value - * @property {number} ADVERTISER_LABEL_IDS=229 ADVERTISER_LABEL_IDS value - * @property {number} ADVERTISER_NAME=132 ADVERTISER_NAME value - * @property {number} ADVERTISER_PRIMARY_CONTACT=227 ADVERTISER_PRIMARY_CONTACT value - * @property {number} AD_LOCATION=390 AD_LOCATION value - * @property {number} AD_LOCATION_NAME=391 AD_LOCATION_NAME value - * @property {number} AD_UNIT_CODE=64 AD_UNIT_CODE value - * @property {number} AD_UNIT_CODE_LEVEL_1=65 AD_UNIT_CODE_LEVEL_1 value - * @property {number} AD_UNIT_CODE_LEVEL_10=74 AD_UNIT_CODE_LEVEL_10 value - * @property {number} AD_UNIT_CODE_LEVEL_11=75 AD_UNIT_CODE_LEVEL_11 value - * @property {number} AD_UNIT_CODE_LEVEL_12=76 AD_UNIT_CODE_LEVEL_12 value - * @property {number} AD_UNIT_CODE_LEVEL_13=77 AD_UNIT_CODE_LEVEL_13 value - * @property {number} AD_UNIT_CODE_LEVEL_14=78 AD_UNIT_CODE_LEVEL_14 value - * @property {number} AD_UNIT_CODE_LEVEL_15=79 AD_UNIT_CODE_LEVEL_15 value - * @property {number} AD_UNIT_CODE_LEVEL_16=80 AD_UNIT_CODE_LEVEL_16 value - * @property {number} AD_UNIT_CODE_LEVEL_2=66 AD_UNIT_CODE_LEVEL_2 value - * @property {number} AD_UNIT_CODE_LEVEL_3=67 AD_UNIT_CODE_LEVEL_3 value - * @property {number} AD_UNIT_CODE_LEVEL_4=68 AD_UNIT_CODE_LEVEL_4 value - * @property {number} AD_UNIT_CODE_LEVEL_5=69 AD_UNIT_CODE_LEVEL_5 value - * @property {number} AD_UNIT_CODE_LEVEL_6=70 AD_UNIT_CODE_LEVEL_6 value - * @property {number} AD_UNIT_CODE_LEVEL_7=71 AD_UNIT_CODE_LEVEL_7 value - * @property {number} AD_UNIT_CODE_LEVEL_8=72 AD_UNIT_CODE_LEVEL_8 value - * @property {number} AD_UNIT_CODE_LEVEL_9=73 AD_UNIT_CODE_LEVEL_9 value - * @property {number} AD_UNIT_DEPTH=101 AD_UNIT_DEPTH value - * @property {number} AD_UNIT_ID=25 AD_UNIT_ID value - * @property {number} AD_UNIT_ID_ALL_LEVEL=27 AD_UNIT_ID_ALL_LEVEL value - * @property {number} AD_UNIT_ID_LEVEL_1=30 AD_UNIT_ID_LEVEL_1 value - * @property {number} AD_UNIT_ID_LEVEL_10=48 AD_UNIT_ID_LEVEL_10 value - * @property {number} AD_UNIT_ID_LEVEL_11=50 AD_UNIT_ID_LEVEL_11 value - * @property {number} AD_UNIT_ID_LEVEL_12=52 AD_UNIT_ID_LEVEL_12 value - * @property {number} AD_UNIT_ID_LEVEL_13=54 AD_UNIT_ID_LEVEL_13 value - * @property {number} AD_UNIT_ID_LEVEL_14=56 AD_UNIT_ID_LEVEL_14 value - * @property {number} AD_UNIT_ID_LEVEL_15=58 AD_UNIT_ID_LEVEL_15 value - * @property {number} AD_UNIT_ID_LEVEL_16=60 AD_UNIT_ID_LEVEL_16 value - * @property {number} AD_UNIT_ID_LEVEL_2=32 AD_UNIT_ID_LEVEL_2 value - * @property {number} AD_UNIT_ID_LEVEL_3=34 AD_UNIT_ID_LEVEL_3 value - * @property {number} AD_UNIT_ID_LEVEL_4=36 AD_UNIT_ID_LEVEL_4 value - * @property {number} AD_UNIT_ID_LEVEL_5=38 AD_UNIT_ID_LEVEL_5 value - * @property {number} AD_UNIT_ID_LEVEL_6=40 AD_UNIT_ID_LEVEL_6 value - * @property {number} AD_UNIT_ID_LEVEL_7=42 AD_UNIT_ID_LEVEL_7 value - * @property {number} AD_UNIT_ID_LEVEL_8=44 AD_UNIT_ID_LEVEL_8 value - * @property {number} AD_UNIT_ID_LEVEL_9=46 AD_UNIT_ID_LEVEL_9 value - * @property {number} AD_UNIT_ID_TOP_LEVEL=142 AD_UNIT_ID_TOP_LEVEL value - * @property {number} AD_UNIT_NAME=26 AD_UNIT_NAME value - * @property {number} AD_UNIT_NAME_ALL_LEVEL=29 AD_UNIT_NAME_ALL_LEVEL value - * @property {number} AD_UNIT_NAME_LEVEL_1=31 AD_UNIT_NAME_LEVEL_1 value - * @property {number} AD_UNIT_NAME_LEVEL_10=49 AD_UNIT_NAME_LEVEL_10 value - * @property {number} AD_UNIT_NAME_LEVEL_11=51 AD_UNIT_NAME_LEVEL_11 value - * @property {number} AD_UNIT_NAME_LEVEL_12=53 AD_UNIT_NAME_LEVEL_12 value - * @property {number} AD_UNIT_NAME_LEVEL_13=55 AD_UNIT_NAME_LEVEL_13 value - * @property {number} AD_UNIT_NAME_LEVEL_14=57 AD_UNIT_NAME_LEVEL_14 value - * @property {number} AD_UNIT_NAME_LEVEL_15=59 AD_UNIT_NAME_LEVEL_15 value - * @property {number} AD_UNIT_NAME_LEVEL_16=61 AD_UNIT_NAME_LEVEL_16 value - * @property {number} AD_UNIT_NAME_LEVEL_2=33 AD_UNIT_NAME_LEVEL_2 value - * @property {number} AD_UNIT_NAME_LEVEL_3=35 AD_UNIT_NAME_LEVEL_3 value - * @property {number} AD_UNIT_NAME_LEVEL_4=37 AD_UNIT_NAME_LEVEL_4 value - * @property {number} AD_UNIT_NAME_LEVEL_5=39 AD_UNIT_NAME_LEVEL_5 value - * @property {number} AD_UNIT_NAME_LEVEL_6=41 AD_UNIT_NAME_LEVEL_6 value - * @property {number} AD_UNIT_NAME_LEVEL_7=43 AD_UNIT_NAME_LEVEL_7 value - * @property {number} AD_UNIT_NAME_LEVEL_8=45 AD_UNIT_NAME_LEVEL_8 value - * @property {number} AD_UNIT_NAME_LEVEL_9=47 AD_UNIT_NAME_LEVEL_9 value - * @property {number} AD_UNIT_NAME_TOP_LEVEL=143 AD_UNIT_NAME_TOP_LEVEL value - * @property {number} AD_UNIT_REWARD_AMOUNT=63 AD_UNIT_REWARD_AMOUNT value - * @property {number} AD_UNIT_REWARD_TYPE=62 AD_UNIT_REWARD_TYPE value - * @property {number} AD_UNIT_STATUS=206 AD_UNIT_STATUS value - * @property {number} AD_UNIT_STATUS_NAME=207 AD_UNIT_STATUS_NAME value - * @property {number} APP_VERSION=392 APP_VERSION value - * @property {number} BACKFILL_ADVERTISER_EXTERNAL_ID=349 BACKFILL_ADVERTISER_EXTERNAL_ID value - * @property {number} BACKFILL_ADVERTISER_ID=346 BACKFILL_ADVERTISER_ID value - * @property {number} BACKFILL_ADVERTISER_LABELS=351 BACKFILL_ADVERTISER_LABELS value - * @property {number} BACKFILL_ADVERTISER_LABEL_IDS=350 BACKFILL_ADVERTISER_LABEL_IDS value - * @property {number} BACKFILL_ADVERTISER_NAME=347 BACKFILL_ADVERTISER_NAME value - * @property {number} BACKFILL_ADVERTISER_PRIMARY_CONTACT=348 BACKFILL_ADVERTISER_PRIMARY_CONTACT value - * @property {number} BACKFILL_CREATIVE_BILLING_TYPE=378 BACKFILL_CREATIVE_BILLING_TYPE value - * @property {number} BACKFILL_CREATIVE_BILLING_TYPE_NAME=379 BACKFILL_CREATIVE_BILLING_TYPE_NAME value - * @property {number} BACKFILL_CREATIVE_CLICK_THROUGH_URL=376 BACKFILL_CREATIVE_CLICK_THROUGH_URL value - * @property {number} BACKFILL_CREATIVE_ID=370 BACKFILL_CREATIVE_ID value - * @property {number} BACKFILL_CREATIVE_NAME=371 BACKFILL_CREATIVE_NAME value - * @property {number} BACKFILL_CREATIVE_THIRD_PARTY_VENDOR=377 BACKFILL_CREATIVE_THIRD_PARTY_VENDOR value - * @property {number} BACKFILL_CREATIVE_TYPE=374 BACKFILL_CREATIVE_TYPE value - * @property {number} BACKFILL_CREATIVE_TYPE_NAME=375 BACKFILL_CREATIVE_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_ARCHIVED=278 BACKFILL_LINE_ITEM_ARCHIVED value - * @property {number} BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION=258 BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION value - * @property {number} BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME=259 BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME value - * @property {number} BACKFILL_LINE_ITEM_COMPUTED_STATUS=296 BACKFILL_LINE_ITEM_COMPUTED_STATUS value - * @property {number} BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME=297 BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME value - * @property {number} BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY=280 BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY value - * @property {number} BACKFILL_LINE_ITEM_COST_PER_UNIT=272 BACKFILL_LINE_ITEM_COST_PER_UNIT value - * @property {number} BACKFILL_LINE_ITEM_COST_TYPE=264 BACKFILL_LINE_ITEM_COST_TYPE value - * @property {number} BACKFILL_LINE_ITEM_COST_TYPE_NAME=265 BACKFILL_LINE_ITEM_COST_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_CREATIVE_END_DATE=381 BACKFILL_LINE_ITEM_CREATIVE_END_DATE value - * @property {number} BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE=290 BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE value - * @property {number} BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME=291 BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_CREATIVE_START_DATE=380 BACKFILL_LINE_ITEM_CREATIVE_START_DATE value - * @property {number} BACKFILL_LINE_ITEM_CURRENCY_CODE=288 BACKFILL_LINE_ITEM_CURRENCY_CODE value - * @property {number} BACKFILL_LINE_ITEM_DELIVERY_INDICATOR=274 BACKFILL_LINE_ITEM_DELIVERY_INDICATOR value - * @property {number} BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE=292 BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE value - * @property {number} BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME=293 BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE=294 BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE value - * @property {number} BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE=295 BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE value - * @property {number} BACKFILL_LINE_ITEM_END_DATE=267 BACKFILL_LINE_ITEM_END_DATE value - * @property {number} BACKFILL_LINE_ITEM_END_DATE_TIME=269 BACKFILL_LINE_ITEM_END_DATE_TIME value - * @property {number} BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE=302 BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE value - * @property {number} BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME=257 BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID=285 BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID value - * @property {number} BACKFILL_LINE_ITEM_EXTERNAL_ID=273 BACKFILL_LINE_ITEM_EXTERNAL_ID value - * @property {number} BACKFILL_LINE_ITEM_FREQUENCY_CAP=303 BACKFILL_LINE_ITEM_FREQUENCY_CAP value - * @property {number} BACKFILL_LINE_ITEM_ID=298 BACKFILL_LINE_ITEM_ID value - * @property {number} BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP=289 BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP value - * @property {number} BACKFILL_LINE_ITEM_LIFETIME_CLICKS=283 BACKFILL_LINE_ITEM_LIFETIME_CLICKS value - * @property {number} BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS=282 BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS value - * @property {number} BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS=284 BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS value - * @property {number} BACKFILL_LINE_ITEM_MAKEGOOD=276 BACKFILL_LINE_ITEM_MAKEGOOD value - * @property {number} BACKFILL_LINE_ITEM_NAME=299 BACKFILL_LINE_ITEM_NAME value - * @property {number} BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE=286 BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE value - * @property {number} BACKFILL_LINE_ITEM_OPTIMIZABLE=277 BACKFILL_LINE_ITEM_OPTIMIZABLE value - * @property {number} BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE=262 BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE value - * @property {number} BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME=263 BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE=260 BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE value - * @property {number} BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME=261 BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_PRIORITY=266 BACKFILL_LINE_ITEM_PRIORITY value - * @property {number} BACKFILL_LINE_ITEM_RESERVATION_STATUS=306 BACKFILL_LINE_ITEM_RESERVATION_STATUS value - * @property {number} BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME=307 BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME value - * @property {number} BACKFILL_LINE_ITEM_START_DATE=268 BACKFILL_LINE_ITEM_START_DATE value - * @property {number} BACKFILL_LINE_ITEM_START_DATE_TIME=270 BACKFILL_LINE_ITEM_START_DATE_TIME value - * @property {number} BACKFILL_LINE_ITEM_TYPE=300 BACKFILL_LINE_ITEM_TYPE value - * @property {number} BACKFILL_LINE_ITEM_TYPE_NAME=301 BACKFILL_LINE_ITEM_TYPE_NAME value - * @property {number} BACKFILL_LINE_ITEM_UNLIMITED_END=271 BACKFILL_LINE_ITEM_UNLIMITED_END value - * @property {number} BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT=275 BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT value - * @property {number} BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE=287 BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE value - * @property {number} BACKFILL_MASTER_COMPANION_CREATIVE_ID=372 BACKFILL_MASTER_COMPANION_CREATIVE_ID value - * @property {number} BACKFILL_MASTER_COMPANION_CREATIVE_NAME=373 BACKFILL_MASTER_COMPANION_CREATIVE_NAME value - * @property {number} BACKFILL_ORDER_AGENCY=313 BACKFILL_ORDER_AGENCY value - * @property {number} BACKFILL_ORDER_AGENCY_ID=314 BACKFILL_ORDER_AGENCY_ID value - * @property {number} BACKFILL_ORDER_BOOKED_CPC=315 BACKFILL_ORDER_BOOKED_CPC value - * @property {number} BACKFILL_ORDER_BOOKED_CPM=316 BACKFILL_ORDER_BOOKED_CPM value - * @property {number} BACKFILL_ORDER_DELIVERY_STATUS=340 BACKFILL_ORDER_DELIVERY_STATUS value - * @property {number} BACKFILL_ORDER_DELIVERY_STATUS_NAME=341 BACKFILL_ORDER_DELIVERY_STATUS_NAME value - * @property {number} BACKFILL_ORDER_END_DATE=317 BACKFILL_ORDER_END_DATE value - * @property {number} BACKFILL_ORDER_END_DATE_TIME=319 BACKFILL_ORDER_END_DATE_TIME value - * @property {number} BACKFILL_ORDER_EXTERNAL_ID=320 BACKFILL_ORDER_EXTERNAL_ID value - * @property {number} BACKFILL_ORDER_ID=338 BACKFILL_ORDER_ID value - * @property {number} BACKFILL_ORDER_LABELS=334 BACKFILL_ORDER_LABELS value - * @property {number} BACKFILL_ORDER_LABEL_IDS=335 BACKFILL_ORDER_LABEL_IDS value - * @property {number} BACKFILL_ORDER_LIFETIME_CLICKS=322 BACKFILL_ORDER_LIFETIME_CLICKS value - * @property {number} BACKFILL_ORDER_LIFETIME_IMPRESSIONS=323 BACKFILL_ORDER_LIFETIME_IMPRESSIONS value - * @property {number} BACKFILL_ORDER_NAME=339 BACKFILL_ORDER_NAME value - * @property {number} BACKFILL_ORDER_PO_NUMBER=324 BACKFILL_ORDER_PO_NUMBER value - * @property {number} BACKFILL_ORDER_PROGRAMMATIC=321 BACKFILL_ORDER_PROGRAMMATIC value - * @property {number} BACKFILL_ORDER_SALESPERSON=325 BACKFILL_ORDER_SALESPERSON value - * @property {number} BACKFILL_ORDER_SECONDARY_SALESPEOPLE=329 BACKFILL_ORDER_SECONDARY_SALESPEOPLE value - * @property {number} BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID=328 BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID value - * @property {number} BACKFILL_ORDER_SECONDARY_TRAFFICKERS=331 BACKFILL_ORDER_SECONDARY_TRAFFICKERS value - * @property {number} BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID=330 BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID value - * @property {number} BACKFILL_ORDER_START_DATE=332 BACKFILL_ORDER_START_DATE value - * @property {number} BACKFILL_ORDER_START_DATE_TIME=333 BACKFILL_ORDER_START_DATE_TIME value - * @property {number} BACKFILL_ORDER_TRAFFICKER=326 BACKFILL_ORDER_TRAFFICKER value - * @property {number} BACKFILL_ORDER_TRAFFICKER_ID=327 BACKFILL_ORDER_TRAFFICKER_ID value - * @property {number} BACKFILL_ORDER_UNLIMITED_END=318 BACKFILL_ORDER_UNLIMITED_END value - * @property {number} BACKFILL_PROGRAMMATIC_BUYER_ID=336 BACKFILL_PROGRAMMATIC_BUYER_ID value - * @property {number} BACKFILL_PROGRAMMATIC_BUYER_NAME=337 BACKFILL_PROGRAMMATIC_BUYER_NAME value - * @property {number} BRANDING_TYPE=383 BRANDING_TYPE value - * @property {number} BRANDING_TYPE_NAME=384 BRANDING_TYPE_NAME value - * @property {number} BROWSER_CATEGORY=119 BROWSER_CATEGORY value - * @property {number} BROWSER_CATEGORY_NAME=120 BROWSER_CATEGORY_NAME value - * @property {number} BROWSER_ID=235 BROWSER_ID value - * @property {number} BROWSER_NAME=236 BROWSER_NAME value - * @property {number} CARRIER_ID=369 CARRIER_ID value - * @property {number} CARRIER_NAME=368 CARRIER_NAME value - * @property {number} CLASSIFIED_ADVERTISER_ID=133 CLASSIFIED_ADVERTISER_ID value - * @property {number} CLASSIFIED_ADVERTISER_NAME=134 CLASSIFIED_ADVERTISER_NAME value - * @property {number} CLASSIFIED_BRAND_ID=243 CLASSIFIED_BRAND_ID value - * @property {number} CLASSIFIED_BRAND_NAME=244 CLASSIFIED_BRAND_NAME value - * @property {number} CONTENT_ID=246 CONTENT_ID value - * @property {number} CONTENT_NAME=247 CONTENT_NAME value - * @property {number} COUNTRY_ID=11 COUNTRY_ID value - * @property {number} COUNTRY_NAME=12 COUNTRY_NAME value - * @property {number} CREATIVE_BILLING_TYPE=366 CREATIVE_BILLING_TYPE value - * @property {number} CREATIVE_BILLING_TYPE_NAME=367 CREATIVE_BILLING_TYPE_NAME value - * @property {number} CREATIVE_CLICK_THROUGH_URL=174 CREATIVE_CLICK_THROUGH_URL value - * @property {number} CREATIVE_ID=138 CREATIVE_ID value - * @property {number} CREATIVE_NAME=139 CREATIVE_NAME value - * @property {number} CREATIVE_TECHNOLOGY=148 CREATIVE_TECHNOLOGY value - * @property {number} CREATIVE_TECHNOLOGY_NAME=149 CREATIVE_TECHNOLOGY_NAME value - * @property {number} CREATIVE_THIRD_PARTY_VENDOR=361 CREATIVE_THIRD_PARTY_VENDOR value - * @property {number} CREATIVE_TYPE=344 CREATIVE_TYPE value - * @property {number} CREATIVE_TYPE_NAME=345 CREATIVE_TYPE_NAME value - * @property {number} DATE=3 DATE value - * @property {number} DAY_OF_WEEK=4 DAY_OF_WEEK value - * @property {number} DEMAND_CHANNEL=9 DEMAND_CHANNEL value - * @property {number} DEMAND_CHANNEL_NAME=10 DEMAND_CHANNEL_NAME value - * @property {number} DEMAND_SUBCHANNEL=22 DEMAND_SUBCHANNEL value - * @property {number} DEMAND_SUBCHANNEL_NAME=23 DEMAND_SUBCHANNEL_NAME value - * @property {number} DEVICE=226 DEVICE value - * @property {number} DEVICE_CATEGORY=15 DEVICE_CATEGORY value - * @property {number} DEVICE_CATEGORY_NAME=16 DEVICE_CATEGORY_NAME value - * @property {number} DEVICE_NAME=225 DEVICE_NAME value - * @property {number} EXCHANGE_THIRD_PARTY_COMPANY_ID=185 EXCHANGE_THIRD_PARTY_COMPANY_ID value - * @property {number} EXCHANGE_THIRD_PARTY_COMPANY_NAME=186 EXCHANGE_THIRD_PARTY_COMPANY_NAME value - * @property {number} FIRST_LOOK_PRICING_RULE_ID=248 FIRST_LOOK_PRICING_RULE_ID value - * @property {number} FIRST_LOOK_PRICING_RULE_NAME=249 FIRST_LOOK_PRICING_RULE_NAME value - * @property {number} HOUR=100 HOUR value - * @property {number} INTERACTION_TYPE=223 INTERACTION_TYPE value - * @property {number} INTERACTION_TYPE_NAME=224 INTERACTION_TYPE_NAME value - * @property {number} INVENTORY_FORMAT=17 INVENTORY_FORMAT value - * @property {number} INVENTORY_FORMAT_NAME=18 INVENTORY_FORMAT_NAME value - * @property {number} INVENTORY_TYPE=19 INVENTORY_TYPE value - * @property {number} INVENTORY_TYPE_NAME=20 INVENTORY_TYPE_NAME value - * @property {number} IS_ADX_DIRECT=382 IS_ADX_DIRECT value - * @property {number} IS_FIRST_LOOK_DEAL=401 IS_FIRST_LOOK_DEAL value - * @property {number} KEY_VALUES_ID=214 KEY_VALUES_ID value - * @property {number} KEY_VALUES_NAME=215 KEY_VALUES_NAME value - * @property {number} LINE_ITEM_ARCHIVED=188 LINE_ITEM_ARCHIVED value - * @property {number} LINE_ITEM_COMPANION_DELIVERY_OPTION=204 LINE_ITEM_COMPANION_DELIVERY_OPTION value - * @property {number} LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME=205 LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME value - * @property {number} LINE_ITEM_COMPUTED_STATUS=250 LINE_ITEM_COMPUTED_STATUS value - * @property {number} LINE_ITEM_COMPUTED_STATUS_NAME=251 LINE_ITEM_COMPUTED_STATUS_NAME value - * @property {number} LINE_ITEM_CONTRACTED_QUANTITY=92 LINE_ITEM_CONTRACTED_QUANTITY value - * @property {number} LINE_ITEM_COST_PER_UNIT=85 LINE_ITEM_COST_PER_UNIT value - * @property {number} LINE_ITEM_COST_TYPE=212 LINE_ITEM_COST_TYPE value - * @property {number} LINE_ITEM_COST_TYPE_NAME=213 LINE_ITEM_COST_TYPE_NAME value - * @property {number} LINE_ITEM_CREATIVE_END_DATE=176 LINE_ITEM_CREATIVE_END_DATE value - * @property {number} LINE_ITEM_CREATIVE_ROTATION_TYPE=189 LINE_ITEM_CREATIVE_ROTATION_TYPE value - * @property {number} LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME=190 LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME value - * @property {number} LINE_ITEM_CREATIVE_START_DATE=175 LINE_ITEM_CREATIVE_START_DATE value - * @property {number} LINE_ITEM_CURRENCY_CODE=180 LINE_ITEM_CURRENCY_CODE value - * @property {number} LINE_ITEM_DELIVERY_INDICATOR=87 LINE_ITEM_DELIVERY_INDICATOR value - * @property {number} LINE_ITEM_DELIVERY_RATE_TYPE=191 LINE_ITEM_DELIVERY_RATE_TYPE value - * @property {number} LINE_ITEM_DELIVERY_RATE_TYPE_NAME=192 LINE_ITEM_DELIVERY_RATE_TYPE_NAME value - * @property {number} LINE_ITEM_DISCOUNT_ABSOLUTE=195 LINE_ITEM_DISCOUNT_ABSOLUTE value - * @property {number} LINE_ITEM_DISCOUNT_PERCENTAGE=196 LINE_ITEM_DISCOUNT_PERCENTAGE value - * @property {number} LINE_ITEM_END_DATE=81 LINE_ITEM_END_DATE value - * @property {number} LINE_ITEM_END_DATE_TIME=83 LINE_ITEM_END_DATE_TIME value - * @property {number} LINE_ITEM_ENVIRONMENT_TYPE=201 LINE_ITEM_ENVIRONMENT_TYPE value - * @property {number} LINE_ITEM_ENVIRONMENT_TYPE_NAME=202 LINE_ITEM_ENVIRONMENT_TYPE_NAME value - * @property {number} LINE_ITEM_EXTERNAL_DEAL_ID=97 LINE_ITEM_EXTERNAL_DEAL_ID value - * @property {number} LINE_ITEM_EXTERNAL_ID=86 LINE_ITEM_EXTERNAL_ID value - * @property {number} LINE_ITEM_FREQUENCY_CAP=256 LINE_ITEM_FREQUENCY_CAP value - * @property {number} LINE_ITEM_ID=1 LINE_ITEM_ID value - * @property {number} LINE_ITEM_LAST_MODIFIED_BY_APP=181 LINE_ITEM_LAST_MODIFIED_BY_APP value - * @property {number} LINE_ITEM_LIFETIME_CLICKS=95 LINE_ITEM_LIFETIME_CLICKS value - * @property {number} LINE_ITEM_LIFETIME_IMPRESSIONS=94 LINE_ITEM_LIFETIME_IMPRESSIONS value - * @property {number} LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS=96 LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS value - * @property {number} LINE_ITEM_MAKEGOOD=89 LINE_ITEM_MAKEGOOD value - * @property {number} LINE_ITEM_NAME=2 LINE_ITEM_NAME value - * @property {number} LINE_ITEM_NON_CPD_BOOKED_REVENUE=98 LINE_ITEM_NON_CPD_BOOKED_REVENUE value - * @property {number} LINE_ITEM_OPTIMIZABLE=90 LINE_ITEM_OPTIMIZABLE value - * @property {number} LINE_ITEM_PRIMARY_GOAL_TYPE=210 LINE_ITEM_PRIMARY_GOAL_TYPE value - * @property {number} LINE_ITEM_PRIMARY_GOAL_TYPE_NAME=211 LINE_ITEM_PRIMARY_GOAL_TYPE_NAME value - * @property {number} LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE=93 LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE value - * @property {number} LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE=396 LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE value - * @property {number} LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE=208 LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE value - * @property {number} LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME=209 LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME value - * @property {number} LINE_ITEM_PRIORITY=24 LINE_ITEM_PRIORITY value - * @property {number} LINE_ITEM_RESERVATION_STATUS=304 LINE_ITEM_RESERVATION_STATUS value - * @property {number} LINE_ITEM_RESERVATION_STATUS_NAME=305 LINE_ITEM_RESERVATION_STATUS_NAME value - * @property {number} LINE_ITEM_START_DATE=82 LINE_ITEM_START_DATE value - * @property {number} LINE_ITEM_START_DATE_TIME=84 LINE_ITEM_START_DATE_TIME value - * @property {number} LINE_ITEM_TYPE=193 LINE_ITEM_TYPE value - * @property {number} LINE_ITEM_TYPE_NAME=194 LINE_ITEM_TYPE_NAME value - * @property {number} LINE_ITEM_UNLIMITED_END=187 LINE_ITEM_UNLIMITED_END value - * @property {number} LINE_ITEM_VALUE_COST_PER_UNIT=88 LINE_ITEM_VALUE_COST_PER_UNIT value - * @property {number} LINE_ITEM_WEB_PROPERTY_CODE=179 LINE_ITEM_WEB_PROPERTY_CODE value - * @property {number} MASTER_COMPANION_CREATIVE_ID=140 MASTER_COMPANION_CREATIVE_ID value - * @property {number} MASTER_COMPANION_CREATIVE_NAME=141 MASTER_COMPANION_CREATIVE_NAME value - * @property {number} MOBILE_APP_FREE=128 MOBILE_APP_FREE value - * @property {number} MOBILE_APP_ICON_URL=129 MOBILE_APP_ICON_URL value - * @property {number} MOBILE_APP_ID=123 MOBILE_APP_ID value - * @property {number} MOBILE_APP_NAME=127 MOBILE_APP_NAME value - * @property {number} MOBILE_APP_OWNERSHIP_STATUS=311 MOBILE_APP_OWNERSHIP_STATUS value - * @property {number} MOBILE_APP_OWNERSHIP_STATUS_NAME=312 MOBILE_APP_OWNERSHIP_STATUS_NAME value - * @property {number} MOBILE_APP_STORE=125 MOBILE_APP_STORE value - * @property {number} MOBILE_APP_STORE_NAME=245 MOBILE_APP_STORE_NAME value - * @property {number} MOBILE_INVENTORY_TYPE=99 MOBILE_INVENTORY_TYPE value - * @property {number} MOBILE_INVENTORY_TYPE_NAME=21 MOBILE_INVENTORY_TYPE_NAME value - * @property {number} MOBILE_SDK_VERSION_NAME=130 MOBILE_SDK_VERSION_NAME value - * @property {number} MONTH_YEAR=6 MONTH_YEAR value - * @property {number} NATIVE_AD_FORMAT_ID=255 NATIVE_AD_FORMAT_ID value - * @property {number} NATIVE_AD_FORMAT_NAME=254 NATIVE_AD_FORMAT_NAME value - * @property {number} NATIVE_STYLE_ID=253 NATIVE_STYLE_ID value - * @property {number} NATIVE_STYLE_NAME=252 NATIVE_STYLE_NAME value - * @property {number} OPERATING_SYSTEM_CATEGORY=117 OPERATING_SYSTEM_CATEGORY value - * @property {number} OPERATING_SYSTEM_CATEGORY_NAME=118 OPERATING_SYSTEM_CATEGORY_NAME value - * @property {number} OPERATING_SYSTEM_VERSION_ID=238 OPERATING_SYSTEM_VERSION_ID value - * @property {number} OPERATING_SYSTEM_VERSION_NAME=237 OPERATING_SYSTEM_VERSION_NAME value - * @property {number} ORDER_AGENCY=150 ORDER_AGENCY value - * @property {number} ORDER_AGENCY_ID=151 ORDER_AGENCY_ID value - * @property {number} ORDER_BOOKED_CPC=152 ORDER_BOOKED_CPC value - * @property {number} ORDER_BOOKED_CPM=153 ORDER_BOOKED_CPM value - * @property {number} ORDER_DELIVERY_STATUS=231 ORDER_DELIVERY_STATUS value - * @property {number} ORDER_DELIVERY_STATUS_NAME=239 ORDER_DELIVERY_STATUS_NAME value - * @property {number} ORDER_END_DATE=154 ORDER_END_DATE value - * @property {number} ORDER_END_DATE_TIME=155 ORDER_END_DATE_TIME value - * @property {number} ORDER_EXTERNAL_ID=156 ORDER_EXTERNAL_ID value - * @property {number} ORDER_ID=7 ORDER_ID value - * @property {number} ORDER_LABELS=170 ORDER_LABELS value - * @property {number} ORDER_LABEL_IDS=171 ORDER_LABEL_IDS value - * @property {number} ORDER_LIFETIME_CLICKS=158 ORDER_LIFETIME_CLICKS value - * @property {number} ORDER_LIFETIME_IMPRESSIONS=159 ORDER_LIFETIME_IMPRESSIONS value - * @property {number} ORDER_NAME=8 ORDER_NAME value - * @property {number} ORDER_PO_NUMBER=160 ORDER_PO_NUMBER value - * @property {number} ORDER_PROGRAMMATIC=157 ORDER_PROGRAMMATIC value - * @property {number} ORDER_SALESPERSON=161 ORDER_SALESPERSON value - * @property {number} ORDER_SECONDARY_SALESPEOPLE=164 ORDER_SECONDARY_SALESPEOPLE value - * @property {number} ORDER_SECONDARY_SALESPEOPLE_ID=165 ORDER_SECONDARY_SALESPEOPLE_ID value - * @property {number} ORDER_SECONDARY_TRAFFICKERS=166 ORDER_SECONDARY_TRAFFICKERS value - * @property {number} ORDER_SECONDARY_TRAFFICKERS_ID=167 ORDER_SECONDARY_TRAFFICKERS_ID value - * @property {number} ORDER_START_DATE=168 ORDER_START_DATE value - * @property {number} ORDER_START_DATE_TIME=169 ORDER_START_DATE_TIME value - * @property {number} ORDER_TRAFFICKER=162 ORDER_TRAFFICKER value - * @property {number} ORDER_TRAFFICKER_ID=163 ORDER_TRAFFICKER_ID value - * @property {number} ORDER_UNLIMITED_END=203 ORDER_UNLIMITED_END value - * @property {number} PLACEMENT_ID=113 PLACEMENT_ID value - * @property {number} PLACEMENT_ID_ALL=144 PLACEMENT_ID_ALL value - * @property {number} PLACEMENT_NAME=114 PLACEMENT_NAME value - * @property {number} PLACEMENT_NAME_ALL=145 PLACEMENT_NAME_ALL value - * @property {number} PLACEMENT_STATUS=362 PLACEMENT_STATUS value - * @property {number} PLACEMENT_STATUS_ALL=363 PLACEMENT_STATUS_ALL value - * @property {number} PLACEMENT_STATUS_NAME=364 PLACEMENT_STATUS_NAME value - * @property {number} PLACEMENT_STATUS_NAME_ALL=365 PLACEMENT_STATUS_NAME_ALL value - * @property {number} PROGRAMMATIC_BUYER_ID=240 PROGRAMMATIC_BUYER_ID value - * @property {number} PROGRAMMATIC_BUYER_NAME=241 PROGRAMMATIC_BUYER_NAME value - * @property {number} PROGRAMMATIC_CHANNEL=13 PROGRAMMATIC_CHANNEL value - * @property {number} PROGRAMMATIC_CHANNEL_NAME=14 PROGRAMMATIC_CHANNEL_NAME value - * @property {number} RENDERED_CREATIVE_SIZE=343 RENDERED_CREATIVE_SIZE value - * @property {number} REQUESTED_AD_SIZES=352 REQUESTED_AD_SIZES value - * @property {number} REQUEST_TYPE=146 REQUEST_TYPE value - * @property {number} REQUEST_TYPE_NAME=147 REQUEST_TYPE_NAME value - * @property {number} SERVER_SIDE_UNWRAPPING_ELIGIBLE=597 SERVER_SIDE_UNWRAPPING_ELIGIBLE value - * @property {number} SITE=387 SITE value - * @property {number} TARGETING_ID=232 TARGETING_ID value - * @property {number} TARGETING_NAME=233 TARGETING_NAME value - * @property {number} TARGETING_TYPE=385 TARGETING_TYPE value - * @property {number} TARGETING_TYPE_NAME=386 TARGETING_TYPE_NAME value - * @property {number} TRAFFIC_SOURCE=388 TRAFFIC_SOURCE value - * @property {number} TRAFFIC_SOURCE_NAME=389 TRAFFIC_SOURCE_NAME value - * @property {number} UNIFIED_PRICING_RULE_ID=393 UNIFIED_PRICING_RULE_ID value - * @property {number} UNIFIED_PRICING_RULE_NAME=394 UNIFIED_PRICING_RULE_NAME value - * @property {number} VIDEO_PLCMT=172 VIDEO_PLCMT value - * @property {number} VIDEO_PLCMT_NAME=173 VIDEO_PLCMT_NAME value - * @property {number} WEEK=5 WEEK value - * @property {number} YIELD_GROUP_BUYER_NAME=184 YIELD_GROUP_BUYER_NAME value - * @property {number} YIELD_GROUP_ID=182 YIELD_GROUP_ID value - * @property {number} YIELD_GROUP_NAME=183 YIELD_GROUP_NAME value - * @property {number} LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID=10000 LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID=10001 LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID=10002 LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID=10003 LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID=10004 LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID=10005 LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID=10006 LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID=10007 LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID=10008 LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID=10009 LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID=10010 LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID=10011 LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID=10012 LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID=10013 LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID=10014 LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} LINE_ITEM_CUSTOM_FIELD_0_VALUE=11000 LINE_ITEM_CUSTOM_FIELD_0_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_1_VALUE=11001 LINE_ITEM_CUSTOM_FIELD_1_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_2_VALUE=11002 LINE_ITEM_CUSTOM_FIELD_2_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_3_VALUE=11003 LINE_ITEM_CUSTOM_FIELD_3_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_4_VALUE=11004 LINE_ITEM_CUSTOM_FIELD_4_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_5_VALUE=11005 LINE_ITEM_CUSTOM_FIELD_5_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_6_VALUE=11006 LINE_ITEM_CUSTOM_FIELD_6_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_7_VALUE=11007 LINE_ITEM_CUSTOM_FIELD_7_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_8_VALUE=11008 LINE_ITEM_CUSTOM_FIELD_8_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_9_VALUE=11009 LINE_ITEM_CUSTOM_FIELD_9_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_10_VALUE=11010 LINE_ITEM_CUSTOM_FIELD_10_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_11_VALUE=11011 LINE_ITEM_CUSTOM_FIELD_11_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_12_VALUE=11012 LINE_ITEM_CUSTOM_FIELD_12_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_13_VALUE=11013 LINE_ITEM_CUSTOM_FIELD_13_VALUE value - * @property {number} LINE_ITEM_CUSTOM_FIELD_14_VALUE=11014 LINE_ITEM_CUSTOM_FIELD_14_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_0_OPTION_ID=12000 ORDER_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_1_OPTION_ID=12001 ORDER_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_2_OPTION_ID=12002 ORDER_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_3_OPTION_ID=12003 ORDER_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_4_OPTION_ID=12004 ORDER_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_5_OPTION_ID=12005 ORDER_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_6_OPTION_ID=12006 ORDER_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_7_OPTION_ID=12007 ORDER_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_8_OPTION_ID=12008 ORDER_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_9_OPTION_ID=12009 ORDER_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_10_OPTION_ID=12010 ORDER_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_11_OPTION_ID=12011 ORDER_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_12_OPTION_ID=12012 ORDER_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_13_OPTION_ID=12013 ORDER_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_14_OPTION_ID=12014 ORDER_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} ORDER_CUSTOM_FIELD_0_VALUE=13000 ORDER_CUSTOM_FIELD_0_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_1_VALUE=13001 ORDER_CUSTOM_FIELD_1_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_2_VALUE=13002 ORDER_CUSTOM_FIELD_2_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_3_VALUE=13003 ORDER_CUSTOM_FIELD_3_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_4_VALUE=13004 ORDER_CUSTOM_FIELD_4_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_5_VALUE=13005 ORDER_CUSTOM_FIELD_5_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_6_VALUE=13006 ORDER_CUSTOM_FIELD_6_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_7_VALUE=13007 ORDER_CUSTOM_FIELD_7_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_8_VALUE=13008 ORDER_CUSTOM_FIELD_8_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_9_VALUE=13009 ORDER_CUSTOM_FIELD_9_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_10_VALUE=13010 ORDER_CUSTOM_FIELD_10_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_11_VALUE=13011 ORDER_CUSTOM_FIELD_11_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_12_VALUE=13012 ORDER_CUSTOM_FIELD_12_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_13_VALUE=13013 ORDER_CUSTOM_FIELD_13_VALUE value - * @property {number} ORDER_CUSTOM_FIELD_14_VALUE=13014 ORDER_CUSTOM_FIELD_14_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_0_OPTION_ID=14000 CREATIVE_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_1_OPTION_ID=14001 CREATIVE_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_2_OPTION_ID=14002 CREATIVE_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_3_OPTION_ID=14003 CREATIVE_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_4_OPTION_ID=14004 CREATIVE_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_5_OPTION_ID=14005 CREATIVE_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_6_OPTION_ID=14006 CREATIVE_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_7_OPTION_ID=14007 CREATIVE_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_8_OPTION_ID=14008 CREATIVE_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_9_OPTION_ID=14009 CREATIVE_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_10_OPTION_ID=14010 CREATIVE_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_11_OPTION_ID=14011 CREATIVE_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_12_OPTION_ID=14012 CREATIVE_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_13_OPTION_ID=14013 CREATIVE_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_14_OPTION_ID=14014 CREATIVE_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} CREATIVE_CUSTOM_FIELD_0_VALUE=15000 CREATIVE_CUSTOM_FIELD_0_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_1_VALUE=15001 CREATIVE_CUSTOM_FIELD_1_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_2_VALUE=15002 CREATIVE_CUSTOM_FIELD_2_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_3_VALUE=15003 CREATIVE_CUSTOM_FIELD_3_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_4_VALUE=15004 CREATIVE_CUSTOM_FIELD_4_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_5_VALUE=15005 CREATIVE_CUSTOM_FIELD_5_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_6_VALUE=15006 CREATIVE_CUSTOM_FIELD_6_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_7_VALUE=15007 CREATIVE_CUSTOM_FIELD_7_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_8_VALUE=15008 CREATIVE_CUSTOM_FIELD_8_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_9_VALUE=15009 CREATIVE_CUSTOM_FIELD_9_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_10_VALUE=15010 CREATIVE_CUSTOM_FIELD_10_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_11_VALUE=15011 CREATIVE_CUSTOM_FIELD_11_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_12_VALUE=15012 CREATIVE_CUSTOM_FIELD_12_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_13_VALUE=15013 CREATIVE_CUSTOM_FIELD_13_VALUE value - * @property {number} CREATIVE_CUSTOM_FIELD_14_VALUE=15014 CREATIVE_CUSTOM_FIELD_14_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID=16000 BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID=16001 BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID=16002 BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID=16003 BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID=16004 BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID=16005 BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID=16006 BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID=16007 BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID=16008 BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID=16009 BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID=16010 BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID=16011 BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID=16012 BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID=16013 BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID=16014 BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE=17000 BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE=17001 BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE=17002 BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE=17003 BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE=17004 BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE=17005 BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE=17006 BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE=17007 BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE=17008 BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE=17009 BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE=17010 BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE=17011 BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE=17012 BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE=17013 BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE value - * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE=17014 BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID=18000 BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID=18001 BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID=18002 BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID=18003 BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID=18004 BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID=18005 BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID=18006 BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID=18007 BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID=18008 BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID=18009 BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID=18010 BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID=18011 BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID=18012 BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID=18013 BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID=18014 BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE=19000 BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE=19001 BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE=19002 BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE=19003 BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE=19004 BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE=19005 BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE=19006 BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE=19007 BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE=19008 BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE=19009 BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE=19010 BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE=19011 BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE=19012 BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE=19013 BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE value - * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE=19014 BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID=20000 BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID=20001 BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID=20002 BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID=20003 BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID=20004 BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID=20005 BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID=20006 BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID=20007 BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID=20008 BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID=20009 BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID=20010 BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID=20011 BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID=20012 BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID=20013 BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID=20014 BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE=21000 BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE=21001 BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE=21002 BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE=21003 BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE=21004 BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE=21005 BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE=21006 BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE=21007 BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE=21008 BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE=21009 BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE=21010 BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE=21011 BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE=21012 BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE=21013 BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE value - * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE=21014 BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE value - * @property {number} CUSTOM_DIMENSION_0_VALUE_ID=100000 CUSTOM_DIMENSION_0_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_1_VALUE_ID=100001 CUSTOM_DIMENSION_1_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_2_VALUE_ID=100002 CUSTOM_DIMENSION_2_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_3_VALUE_ID=100003 CUSTOM_DIMENSION_3_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_4_VALUE_ID=100004 CUSTOM_DIMENSION_4_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_5_VALUE_ID=100005 CUSTOM_DIMENSION_5_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_6_VALUE_ID=100006 CUSTOM_DIMENSION_6_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_7_VALUE_ID=100007 CUSTOM_DIMENSION_7_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_8_VALUE_ID=100008 CUSTOM_DIMENSION_8_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_9_VALUE_ID=100009 CUSTOM_DIMENSION_9_VALUE_ID value - * @property {number} CUSTOM_DIMENSION_0_VALUE=101000 CUSTOM_DIMENSION_0_VALUE value - * @property {number} CUSTOM_DIMENSION_1_VALUE=101001 CUSTOM_DIMENSION_1_VALUE value - * @property {number} CUSTOM_DIMENSION_2_VALUE=101002 CUSTOM_DIMENSION_2_VALUE value - * @property {number} CUSTOM_DIMENSION_3_VALUE=101003 CUSTOM_DIMENSION_3_VALUE value - * @property {number} CUSTOM_DIMENSION_4_VALUE=101004 CUSTOM_DIMENSION_4_VALUE value - * @property {number} CUSTOM_DIMENSION_5_VALUE=101005 CUSTOM_DIMENSION_5_VALUE value - * @property {number} CUSTOM_DIMENSION_6_VALUE=101006 CUSTOM_DIMENSION_6_VALUE value - * @property {number} CUSTOM_DIMENSION_7_VALUE=101007 CUSTOM_DIMENSION_7_VALUE value - * @property {number} CUSTOM_DIMENSION_8_VALUE=101008 CUSTOM_DIMENSION_8_VALUE value - * @property {number} CUSTOM_DIMENSION_9_VALUE=101009 CUSTOM_DIMENSION_9_VALUE value + * ReportDefinition sorts. + * @member {Array.} sorts + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + */ + ReportDefinition.prototype.sorts = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportDefinition.prototype, "_comparisonDateRange", { + get: $util.oneOfGetter($oneOfFields = ["comparisonDateRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {google.ads.admanager.v1.IReportDefinition=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition instance + */ + ReportDefinition.create = function create(properties) { + return new ReportDefinition(properties); + }; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {google.ads.admanager.v1.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.dimensions.length; ++i) + writer.int32(message.dimensions[i]); + writer.ldelim(); + } + if (message.metrics != null && message.metrics.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.metrics.length; ++i) + writer.int32(message.metrics[i]); + writer.ldelim(); + } + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Filter.encode(message.filters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.timeZone); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.ads.admanager.v1.ReportDefinition.DateRange.encode(message.dateRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.customDimensionKeyIds != null && message.customDimensionKeyIds.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.customDimensionKeyIds.length; ++i) + writer.int64(message.customDimensionKeyIds[i]); + writer.ldelim(); + } + if (message.reportType != null && Object.hasOwnProperty.call(message, "reportType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.reportType); + if (message.comparisonDateRange != null && Object.hasOwnProperty.call(message, "comparisonDateRange")) + $root.google.ads.admanager.v1.ReportDefinition.DateRange.encode(message.comparisonDateRange, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.timePeriodColumn != null && Object.hasOwnProperty.call(message, "timePeriodColumn")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.timePeriodColumn); + if (message.lineItemCustomFieldIds != null && message.lineItemCustomFieldIds.length) { + writer.uint32(/* id 11, wireType 2 =*/90).fork(); + for (var i = 0; i < message.lineItemCustomFieldIds.length; ++i) + writer.int64(message.lineItemCustomFieldIds[i]); + writer.ldelim(); + } + if (message.orderCustomFieldIds != null && message.orderCustomFieldIds.length) { + writer.uint32(/* id 12, wireType 2 =*/98).fork(); + for (var i = 0; i < message.orderCustomFieldIds.length; ++i) + writer.int64(message.orderCustomFieldIds[i]); + writer.ldelim(); + } + if (message.creativeCustomFieldIds != null && message.creativeCustomFieldIds.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.creativeCustomFieldIds.length; ++i) + writer.int64(message.creativeCustomFieldIds[i]); + writer.ldelim(); + } + if (message.flags != null && message.flags.length) + for (var i = 0; i < message.flags.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Flag.encode(message.flags[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sorts != null && message.sorts.length) + for (var i = 0; i < message.sorts.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Sort.encode(message.sorts[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.timeZoneSource != null && Object.hasOwnProperty.call(message, "timeZoneSource")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.timeZoneSource); + return writer; + }; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {google.ads.admanager.v1.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.dimensions.push(reader.int32()); + } else + message.dimensions.push(reader.int32()); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metrics.push(reader.int32()); + } else + message.metrics.push(reader.int32()); + break; + } + case 3: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.ads.admanager.v1.ReportDefinition.Filter.decode(reader, reader.uint32())); + break; + } + case 20: { + message.timeZoneSource = reader.int32(); + break; + } + case 4: { + message.timeZone = reader.string(); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.dateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.decode(reader, reader.uint32()); + break; + } + case 9: { + message.comparisonDateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.customDimensionKeyIds && message.customDimensionKeyIds.length)) + message.customDimensionKeyIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.customDimensionKeyIds.push(reader.int64()); + } else + message.customDimensionKeyIds.push(reader.int64()); + break; + } + case 11: { + if (!(message.lineItemCustomFieldIds && message.lineItemCustomFieldIds.length)) + message.lineItemCustomFieldIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.lineItemCustomFieldIds.push(reader.int64()); + } else + message.lineItemCustomFieldIds.push(reader.int64()); + break; + } + case 12: { + if (!(message.orderCustomFieldIds && message.orderCustomFieldIds.length)) + message.orderCustomFieldIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.orderCustomFieldIds.push(reader.int64()); + } else + message.orderCustomFieldIds.push(reader.int64()); + break; + } + case 13: { + if (!(message.creativeCustomFieldIds && message.creativeCustomFieldIds.length)) + message.creativeCustomFieldIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.creativeCustomFieldIds.push(reader.int64()); + } else + message.creativeCustomFieldIds.push(reader.int64()); + break; + } + case 8: { + message.reportType = reader.int32(); + break; + } + case 10: { + message.timePeriodColumn = reader.int32(); + break; + } + case 14: { + if (!(message.flags && message.flags.length)) + message.flags = []; + message.flags.push($root.google.ads.admanager.v1.ReportDefinition.Flag.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.sorts && message.sorts.length)) + message.sorts = []; + message.sorts.push($root.google.ads.admanager.v1.ReportDefinition.Sort.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDefinition message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDefinition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) + switch (message.dimensions[i]) { + default: + return "dimensions: enum value[] expected"; + case 0: + case 575: + case 576: + case 475: + case 476: + case 242: + case 228: + case 131: + case 230: + case 229: + case 132: + case 227: + case 471: + case 472: + case 473: + case 474: + case 580: + case 499: + case 500: + case 641: + case 642: + case 390: + case 391: + case 620: + case 621: + case 622: + case 497: + case 498: + case 64: + case 65: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 25: + case 27: + case 30: + case 48: + case 50: + case 52: + case 54: + case 56: + case 58: + case 60: + case 32: + case 34: + case 36: + case 38: + case 40: + case 42: + case 44: + case 46: + case 142: + case 26: + case 29: + case 31: + case 49: + case 51: + case 53: + case 55: + case 57: + case 59: + case 61: + case 33: + case 35: + case 37: + case 39: + case 41: + case 43: + case 45: + case 47: + case 143: + case 63: + case 62: + case 206: + case 207: + case 565: + case 566: + case 567: + case 568: + case 569: + case 570: + case 508: + case 582: + case 442: + case 443: + case 392: + case 579: + case 571: + case 584: + case 585: + case 421: + case 422: + case 493: + case 494: + case 679: + case 599: + case 600: + case 383: + case 384: + case 119: + case 120: + case 235: + case 236: + case 448: + case 449: + case 588: + case 589: + case 369: + case 368: + case 501: + case 542: + case 544: + case 543: + case 459: + case 452: + case 133: + case 134: + case 243: + case 244: + case 643: + case 644: + case 246: + case 731: + case 732: + case 247: + case 469: + case 470: + case 466: + case 11: + case 12: + case 366: + case 367: + case 174: + case 138: + case 139: + case 711: + case 712: + case 704: + case 705: + case 686: + case 687: + case 148: + case 149: + case 361: + case 344: + case 345: + case 706: + case 707: + case 562: + case 572: + case 573: + case 737: + case 735: + case 736: + case 738: + case 423: + case 424: + case 3: + case 4: + case 240: + case 241: + case 436: + case 437: + case 309: + case 310: + case 9: + case 10: + case 592: + case 593: + case 22: + case 23: + case 226: + case 15: + case 16: + case 525: + case 526: + case 527: + case 528: + case 225: + case 564: + case 502: + case 503: + case 623: + case 624: + case 625: + case 626: + case 715: + case 714: + case 723: + case 185: + case 186: + case 248: + case 249: + case 404: + case 405: + case 509: + case 583: + case 519: + case 520: + case 659: + case 660: + case 718: + case 719: + case 100: + case 577: + case 578: + case 223: + case 224: + case 510: + case 17: + case 18: + case 648: + case 649: + case 603: + case 604: + case 652: + case 653: + case 654: + case 650: + case 651: + case 19: + case 20: + case 382: + case 574: + case 464: + case 401: + case 214: + case 215: + case 663: + case 188: + case 204: + case 205: + case 250: + case 251: + case 92: + case 85: + case 212: + case 213: + case 176: + case 189: + case 190: + case 175: + case 180: + case 87: + case 191: + case 192: + case 195: + case 196: + case 81: + case 83: + case 201: + case 202: + case 97: + case 86: + case 256: + case 1: + case 667: + case 665: + case 181: + case 95: + case 94: + case 96: + case 89: + case 2: + case 98: + case 90: + case 669: + case 210: + case 211: + case 93: + case 396: + case 208: + case 209: + case 24: + case 304: + case 305: + case 671: + case 673: + case 675: + case 82: + case 84: + case 677: + case 193: + case 194: + case 187: + case 88: + case 179: + case 140: + case 141: + case 701: + case 754: + case 661: + case 662: + case 453: + case 454: + case 128: + case 129: + case 123: + case 127: + case 311: + case 312: + case 125: + case 245: + case 99: + case 21: + case 646: + case 647: + case 692: + case 693: + case 130: + case 6: + case 255: + case 254: + case 253: + case 252: + case 586: + case 587: + case 117: + case 118: + case 238: + case 237: + case 639: + case 640: + case 150: + case 151: + case 152: + case 153: + case 231: + case 239: + case 154: + case 155: + case 156: + case 7: + case 170: + case 171: + case 158: + case 159: + case 8: + case 160: + case 157: + case 161: + case 629: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 162: + case 163: + case 203: + case 511: + case 512: + case 513: + case 113: + case 144: + case 114: + case 145: + case 362: + case 364: + case 365: + case 455: + case 456: + case 406: + case 407: + case 633: + case 634: + case 495: + case 496: + case 408: + case 409: + case 240: + case 241: + case 13: + case 14: + case 410: + case 546: + case 412: + case 413: + case 414: + case 425: + case 545: + case 427: + case 428: + case 429: + case 415: + case 416: + case 417: + case 418: + case 419: + case 136: + case 137: + case 457: + case 458: + case 590: + case 591: + case 343: + case 352: + case 146: + case 147: + case 597: + case 631: + case 632: + case 387: + case 232: + case 233: + case 385: + case 386: + case 402: + case 403: + case 504: + case 505: + case 444: + case 388: + case 389: + case 393: + case 394: + case 506: + case 507: + case 635: + case 636: + case 637: + case 638: + case 554: + case 555: + case 556: + case 557: + case 450: + case 561: + case 560: + case 558: + case 751: + case 559: + case 438: + case 439: + case 432: + case 433: + case 721: + case 722: + case 530: + case 601: + case 602: + case 172: + case 173: + case 538: + case 539: + case 440: + case 441: + case 752: + case 753: + case 5: + case 184: + case 627: + case 182: + case 183: + case 430: + case 431: + case 399: + case 400: + case 10000: + case 10001: + case 10002: + case 10003: + case 10004: + case 10005: + case 10006: + case 10007: + case 10008: + case 10009: + case 10010: + case 10011: + case 10012: + case 10013: + case 10014: + case 11000: + case 11001: + case 11002: + case 11003: + case 11004: + case 11005: + case 11006: + case 11007: + case 11008: + case 11009: + case 11010: + case 11011: + case 11012: + case 11013: + case 11014: + case 12000: + case 12001: + case 12002: + case 12003: + case 12004: + case 12005: + case 12006: + case 12007: + case 12008: + case 12009: + case 12010: + case 12011: + case 12012: + case 12013: + case 12014: + case 13000: + case 13001: + case 13002: + case 13003: + case 13004: + case 13005: + case 13006: + case 13007: + case 13008: + case 13009: + case 13010: + case 13011: + case 13012: + case 13013: + case 13014: + case 14000: + case 14001: + case 14002: + case 14003: + case 14004: + case 14005: + case 14006: + case 14007: + case 14008: + case 14009: + case 14010: + case 14011: + case 14012: + case 14013: + case 14014: + case 15000: + case 15001: + case 15002: + case 15003: + case 15004: + case 15005: + case 15006: + case 15007: + case 15008: + case 15009: + case 15010: + case 15011: + case 15012: + case 15013: + case 15014: + case 16000: + case 16001: + case 16002: + case 16003: + case 16004: + case 16005: + case 16006: + case 16007: + case 16008: + case 16009: + case 16010: + case 16011: + case 16012: + case 16013: + case 16014: + case 17000: + case 17001: + case 17002: + case 17003: + case 17004: + case 17005: + case 17006: + case 17007: + case 17008: + case 17009: + case 17010: + case 17011: + case 17012: + case 17013: + case 17014: + case 18000: + case 18001: + case 18002: + case 18003: + case 18004: + case 18005: + case 18006: + case 18007: + case 18008: + case 18009: + case 18010: + case 18011: + case 18012: + case 18013: + case 18014: + case 19000: + case 19001: + case 19002: + case 19003: + case 19004: + case 19005: + case 19006: + case 19007: + case 19008: + case 19009: + case 19010: + case 19011: + case 19012: + case 19013: + case 19014: + case 20000: + case 20001: + case 20002: + case 20003: + case 20004: + case 20005: + case 20006: + case 20007: + case 20008: + case 20009: + case 20010: + case 20011: + case 20012: + case 20013: + case 20014: + case 21000: + case 21001: + case 21002: + case 21003: + case 21004: + case 21005: + case 21006: + case 21007: + case 21008: + case 21009: + case 21010: + case 21011: + case 21012: + case 21013: + case 21014: + case 100000: + case 100001: + case 100002: + case 100003: + case 100004: + case 100005: + case 100006: + case 100007: + case 100008: + case 100009: + case 101000: + case 101001: + case 101002: + case 101003: + case 101004: + case 101005: + case 101006: + case 101007: + case 101008: + case 101009: + break; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + switch (message.metrics[i]) { + default: + return "metrics: enum value[] expected"; + case 0: + case 223: + case 445: + case 659: + case 446: + case 447: + case 448: + case 449: + case 660: + case 661: + case 61: + case 58: + case 450: + case 451: + case 452: + case 453: + case 411: + case 57: + case 60: + case 662: + case 663: + case 664: + case 665: + case 454: + case 414: + case 666: + case 56: + case 667: + case 59: + case 73: + case 70: + case 69: + case 72: + case 642: + case 643: + case 644: + case 645: + case 68: + case 646: + case 71: + case 26: + case 23: + case 24: + case 22: + case 28: + case 27: + case 29: + case 30: + case 41: + case 25: + case 79: + case 76: + case 75: + case 78: + case 654: + case 655: + case 656: + case 657: + case 74: + case 658: + case 77: + case 18: + case 15: + case 244: + case 16: + case 245: + case 14: + case 427: + case 428: + case 246: + case 247: + case 248: + case 249: + case 250: + case 251: + case 20: + case 19: + case 21: + case 31: + case 252: + case 253: + case 254: + case 42: + case 17: + case 212: + case 429: + case 255: + case 256: + case 257: + case 241: + case 38: + case 67: + case 64: + case 63: + case 66: + case 332: + case 331: + case 334: + case 335: + case 62: + case 333: + case 65: + case 34: + case 10: + case 262: + case 7: + case 431: + case 554: + case 32: + case 8: + case 483: + case 484: + case 6: + case 222: + case 338: + case 12: + case 11: + case 35: + case 13: + case 40: + case 33: + case 213: + case 9: + case 274: + case 275: + case 264: + case 261: + case 259: + case 260: + case 260: + case 263: + case 242: + case 425: + case 430: + case 342: + case 343: + case 344: + case 345: + case 346: + case 347: + case 348: + case 472: + case 349: + case 350: + case 473: + case 351: + case 476: + case 352: + case 515: + case 353: + case 354: + case 355: + case 356: + case 357: + case 358: + case 474: + case 359: + case 360: + case 361: + case 362: + case 442: + case 363: + case 364: + case 365: + case 475: + case 366: + case 367: + case 368: + case 369: + case 370: + case 371: + case 372: + case 373: + case 374: + case 375: + case 376: + case 377: + case 378: + case 379: + case 380: + case 381: + case 382: + case 383: + case 384: + case 385: + case 387: + case 389: + case 390: + case 37: + case 5: + case 224: + case 225: + case 418: + case 226: + case 227: + case 228: + case 443: + case 444: + case 433: + case 2: + case 44: + case 440: + case 441: + case 324: + case 326: + case 327: + case 328: + case 325: + case 329: + case 3: + case 542: + case 543: + case 544: + case 545: + case 546: + case 521: + case 522: + case 523: + case 524: + case 525: + case 520: + case 526: + case 527: + case 528: + case 529: + case 531: + case 530: + case 415: + case 229: + case 230: + case 426: + case 270: + case 271: + case 272: + case 273: + case 258: + case 231: + case 232: + case 233: + case 234: + case 235: + case 236: + case 237: + case 129: + case 128: + case 131: + case 130: + case 127: + case 126: + case 1: + case 407: + case 547: + case 548: + case 404: + case 405: + case 584: + case 412: + case 409: + case 463: + case 432: + case 135: + case 136: + case 137: + case 132: + case 133: + case 134: + case 125: + case 124: + case 123: + case 177: + case 178: + case 176: + case 416: + case 39: + case 238: + case 36: + case 214: + case 4: + case 413: + case 587: + case 588: + case 589: + case 599: + case 600: + case 590: + case 591: + case 592: + case 593: + case 594: + case 595: + case 596: + case 597: + case 598: + case 503: + case 505: + case 504: + case 506: + case 507: + case 508: + case 509: + case 510: + case 511: + case 512: + case 513: + case 514: + case 477: + case 478: + case 479: + case 480: + case 434: + case 435: + case 436: + case 437: + case 438: + case 439: + case 239: + case 455: + case 457: + case 458: + case 459: + case 456: + case 460: + case 276: + case 277: + case 45: + case 417: + case 408: + case 406: + case 43: + case 550: + case 553: + case 551: + case 552: + case 549: + case 240: + case 486: + case 487: + case 488: + case 489: + case 490: + case 491: + case 492: + case 493: + case 494: + case 495: + case 496: + case 497: + case 498: + case 121: + case 122: + case 499: + case 500: + case 501: + case 502: + case 180: + case 181: + case 182: + case 183: + case 184: + case 185: + case 186: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 202: + case 203: + case 204: + case 205: + case 206: + case 207: + case 208: + case 209: + case 210: + case 211: + case 92: + case 93: + case 95: + case 96: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 601: + case 139: + case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 156: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 163: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + case 172: + case 173: + case 174: + case 138: + case 140: + case 175: + case 142: + case 141: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 94: + case 116: + case 117: + case 80: + case 81: + case 82: + case 83: + case 88: + case 87: + case 85: + case 89: + case 86: + case 118: + case 90: + case 215: + case 84: + break; + } + } + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + if (message.timeZoneSource != null && message.hasOwnProperty("timeZoneSource")) + switch (message.timeZoneSource) { + default: + return "timeZoneSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.ads.admanager.v1.ReportDefinition.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + if (message.comparisonDateRange != null && message.hasOwnProperty("comparisonDateRange")) { + properties._comparisonDateRange = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.DateRange.verify(message.comparisonDateRange); + if (error) + return "comparisonDateRange." + error; + } + } + if (message.customDimensionKeyIds != null && message.hasOwnProperty("customDimensionKeyIds")) { + if (!Array.isArray(message.customDimensionKeyIds)) + return "customDimensionKeyIds: array expected"; + for (var i = 0; i < message.customDimensionKeyIds.length; ++i) + if (!$util.isInteger(message.customDimensionKeyIds[i]) && !(message.customDimensionKeyIds[i] && $util.isInteger(message.customDimensionKeyIds[i].low) && $util.isInteger(message.customDimensionKeyIds[i].high))) + return "customDimensionKeyIds: integer|Long[] expected"; + } + if (message.lineItemCustomFieldIds != null && message.hasOwnProperty("lineItemCustomFieldIds")) { + if (!Array.isArray(message.lineItemCustomFieldIds)) + return "lineItemCustomFieldIds: array expected"; + for (var i = 0; i < message.lineItemCustomFieldIds.length; ++i) + if (!$util.isInteger(message.lineItemCustomFieldIds[i]) && !(message.lineItemCustomFieldIds[i] && $util.isInteger(message.lineItemCustomFieldIds[i].low) && $util.isInteger(message.lineItemCustomFieldIds[i].high))) + return "lineItemCustomFieldIds: integer|Long[] expected"; + } + if (message.orderCustomFieldIds != null && message.hasOwnProperty("orderCustomFieldIds")) { + if (!Array.isArray(message.orderCustomFieldIds)) + return "orderCustomFieldIds: array expected"; + for (var i = 0; i < message.orderCustomFieldIds.length; ++i) + if (!$util.isInteger(message.orderCustomFieldIds[i]) && !(message.orderCustomFieldIds[i] && $util.isInteger(message.orderCustomFieldIds[i].low) && $util.isInteger(message.orderCustomFieldIds[i].high))) + return "orderCustomFieldIds: integer|Long[] expected"; + } + if (message.creativeCustomFieldIds != null && message.hasOwnProperty("creativeCustomFieldIds")) { + if (!Array.isArray(message.creativeCustomFieldIds)) + return "creativeCustomFieldIds: array expected"; + for (var i = 0; i < message.creativeCustomFieldIds.length; ++i) + if (!$util.isInteger(message.creativeCustomFieldIds[i]) && !(message.creativeCustomFieldIds[i] && $util.isInteger(message.creativeCustomFieldIds[i].low) && $util.isInteger(message.creativeCustomFieldIds[i].high))) + return "creativeCustomFieldIds: integer|Long[] expected"; + } + if (message.reportType != null && message.hasOwnProperty("reportType")) + switch (message.reportType) { + default: + return "reportType: enum value expected"; + case 0: + case 1: + case 5: + case 6: + case 13: + break; + } + if (message.timePeriodColumn != null && message.hasOwnProperty("timePeriodColumn")) + switch (message.timePeriodColumn) { + default: + return "timePeriodColumn: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.flags != null && message.hasOwnProperty("flags")) { + if (!Array.isArray(message.flags)) + return "flags: array expected"; + for (var i = 0; i < message.flags.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Flag.verify(message.flags[i]); + if (error) + return "flags." + error; + } + } + if (message.sorts != null && message.hasOwnProperty("sorts")) { + if (!Array.isArray(message.sorts)) + return "sorts: array expected"; + for (var i = 0; i < message.sorts.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Sort.verify(message.sorts[i]); + if (error) + return "sorts." + error; + } + } + return null; + }; + + /** + * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition + */ + ReportDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition(); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) + switch (object.dimensions[i]) { + default: + if (typeof object.dimensions[i] === "number") { + message.dimensions[i] = object.dimensions[i]; + break; + } + case "DIMENSION_UNSPECIFIED": + case 0: + message.dimensions[i] = 0; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE": + case 575: + message.dimensions[i] = 575; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME": + case 576: + message.dimensions[i] = 576; + break; + case "ADVERTISER_CREDIT_STATUS": + case 475: + message.dimensions[i] = 475; + break; + case "ADVERTISER_CREDIT_STATUS_NAME": + case 476: + message.dimensions[i] = 476; + break; + case "ADVERTISER_DOMAIN_NAME": + case 242: + message.dimensions[i] = 242; + break; + case "ADVERTISER_EXTERNAL_ID": + case 228: + message.dimensions[i] = 228; + break; + case "ADVERTISER_ID": + case 131: + message.dimensions[i] = 131; + break; + case "ADVERTISER_LABELS": + case 230: + message.dimensions[i] = 230; + break; + case "ADVERTISER_LABEL_IDS": + case 229: + message.dimensions[i] = 229; + break; + case "ADVERTISER_NAME": + case 132: + message.dimensions[i] = 132; + break; + case "ADVERTISER_PRIMARY_CONTACT": + case 227: + message.dimensions[i] = 227; + break; + case "ADVERTISER_STATUS": + case 471: + message.dimensions[i] = 471; + break; + case "ADVERTISER_STATUS_NAME": + case 472: + message.dimensions[i] = 472; + break; + case "ADVERTISER_TYPE": + case 473: + message.dimensions[i] = 473; + break; + case "ADVERTISER_TYPE_NAME": + case 474: + message.dimensions[i] = 474; + break; + case "ADVERTISER_VERTICAL": + case 580: + message.dimensions[i] = 580; + break; + case "ADX_PRODUCT": + case 499: + message.dimensions[i] = 499; + break; + case "ADX_PRODUCT_NAME": + case 500: + message.dimensions[i] = 500; + break; + case "AD_EXPERIENCES_TYPE": + case 641: + message.dimensions[i] = 641; + break; + case "AD_EXPERIENCES_TYPE_NAME": + case 642: + message.dimensions[i] = 642; + break; + case "AD_LOCATION": + case 390: + message.dimensions[i] = 390; + break; + case "AD_LOCATION_NAME": + case 391: + message.dimensions[i] = 391; + break; + case "AD_TECHNOLOGY_PROVIDER_DOMAIN": + case 620: + message.dimensions[i] = 620; + break; + case "AD_TECHNOLOGY_PROVIDER_ID": + case 621: + message.dimensions[i] = 621; + break; + case "AD_TECHNOLOGY_PROVIDER_NAME": + case 622: + message.dimensions[i] = 622; + break; + case "AD_TYPE": + case 497: + message.dimensions[i] = 497; + break; + case "AD_TYPE_NAME": + case 498: + message.dimensions[i] = 498; + break; + case "AD_UNIT_CODE": + case 64: + message.dimensions[i] = 64; + break; + case "AD_UNIT_CODE_LEVEL_1": + case 65: + message.dimensions[i] = 65; + break; + case "AD_UNIT_CODE_LEVEL_10": + case 74: + message.dimensions[i] = 74; + break; + case "AD_UNIT_CODE_LEVEL_11": + case 75: + message.dimensions[i] = 75; + break; + case "AD_UNIT_CODE_LEVEL_12": + case 76: + message.dimensions[i] = 76; + break; + case "AD_UNIT_CODE_LEVEL_13": + case 77: + message.dimensions[i] = 77; + break; + case "AD_UNIT_CODE_LEVEL_14": + case 78: + message.dimensions[i] = 78; + break; + case "AD_UNIT_CODE_LEVEL_15": + case 79: + message.dimensions[i] = 79; + break; + case "AD_UNIT_CODE_LEVEL_16": + case 80: + message.dimensions[i] = 80; + break; + case "AD_UNIT_CODE_LEVEL_2": + case 66: + message.dimensions[i] = 66; + break; + case "AD_UNIT_CODE_LEVEL_3": + case 67: + message.dimensions[i] = 67; + break; + case "AD_UNIT_CODE_LEVEL_4": + case 68: + message.dimensions[i] = 68; + break; + case "AD_UNIT_CODE_LEVEL_5": + case 69: + message.dimensions[i] = 69; + break; + case "AD_UNIT_CODE_LEVEL_6": + case 70: + message.dimensions[i] = 70; + break; + case "AD_UNIT_CODE_LEVEL_7": + case 71: + message.dimensions[i] = 71; + break; + case "AD_UNIT_CODE_LEVEL_8": + case 72: + message.dimensions[i] = 72; + break; + case "AD_UNIT_CODE_LEVEL_9": + case 73: + message.dimensions[i] = 73; + break; + case "AD_UNIT_ID": + case 25: + message.dimensions[i] = 25; + break; + case "AD_UNIT_ID_ALL_LEVEL": + case 27: + message.dimensions[i] = 27; + break; + case "AD_UNIT_ID_LEVEL_1": + case 30: + message.dimensions[i] = 30; + break; + case "AD_UNIT_ID_LEVEL_10": + case 48: + message.dimensions[i] = 48; + break; + case "AD_UNIT_ID_LEVEL_11": + case 50: + message.dimensions[i] = 50; + break; + case "AD_UNIT_ID_LEVEL_12": + case 52: + message.dimensions[i] = 52; + break; + case "AD_UNIT_ID_LEVEL_13": + case 54: + message.dimensions[i] = 54; + break; + case "AD_UNIT_ID_LEVEL_14": + case 56: + message.dimensions[i] = 56; + break; + case "AD_UNIT_ID_LEVEL_15": + case 58: + message.dimensions[i] = 58; + break; + case "AD_UNIT_ID_LEVEL_16": + case 60: + message.dimensions[i] = 60; + break; + case "AD_UNIT_ID_LEVEL_2": + case 32: + message.dimensions[i] = 32; + break; + case "AD_UNIT_ID_LEVEL_3": + case 34: + message.dimensions[i] = 34; + break; + case "AD_UNIT_ID_LEVEL_4": + case 36: + message.dimensions[i] = 36; + break; + case "AD_UNIT_ID_LEVEL_5": + case 38: + message.dimensions[i] = 38; + break; + case "AD_UNIT_ID_LEVEL_6": + case 40: + message.dimensions[i] = 40; + break; + case "AD_UNIT_ID_LEVEL_7": + case 42: + message.dimensions[i] = 42; + break; + case "AD_UNIT_ID_LEVEL_8": + case 44: + message.dimensions[i] = 44; + break; + case "AD_UNIT_ID_LEVEL_9": + case 46: + message.dimensions[i] = 46; + break; + case "AD_UNIT_ID_TOP_LEVEL": + case 142: + message.dimensions[i] = 142; + break; + case "AD_UNIT_NAME": + case 26: + message.dimensions[i] = 26; + break; + case "AD_UNIT_NAME_ALL_LEVEL": + case 29: + message.dimensions[i] = 29; + break; + case "AD_UNIT_NAME_LEVEL_1": + case 31: + message.dimensions[i] = 31; + break; + case "AD_UNIT_NAME_LEVEL_10": + case 49: + message.dimensions[i] = 49; + break; + case "AD_UNIT_NAME_LEVEL_11": + case 51: + message.dimensions[i] = 51; + break; + case "AD_UNIT_NAME_LEVEL_12": + case 53: + message.dimensions[i] = 53; + break; + case "AD_UNIT_NAME_LEVEL_13": + case 55: + message.dimensions[i] = 55; + break; + case "AD_UNIT_NAME_LEVEL_14": + case 57: + message.dimensions[i] = 57; + break; + case "AD_UNIT_NAME_LEVEL_15": + case 59: + message.dimensions[i] = 59; + break; + case "AD_UNIT_NAME_LEVEL_16": + case 61: + message.dimensions[i] = 61; + break; + case "AD_UNIT_NAME_LEVEL_2": + case 33: + message.dimensions[i] = 33; + break; + case "AD_UNIT_NAME_LEVEL_3": + case 35: + message.dimensions[i] = 35; + break; + case "AD_UNIT_NAME_LEVEL_4": + case 37: + message.dimensions[i] = 37; + break; + case "AD_UNIT_NAME_LEVEL_5": + case 39: + message.dimensions[i] = 39; + break; + case "AD_UNIT_NAME_LEVEL_6": + case 41: + message.dimensions[i] = 41; + break; + case "AD_UNIT_NAME_LEVEL_7": + case 43: + message.dimensions[i] = 43; + break; + case "AD_UNIT_NAME_LEVEL_8": + case 45: + message.dimensions[i] = 45; + break; + case "AD_UNIT_NAME_LEVEL_9": + case 47: + message.dimensions[i] = 47; + break; + case "AD_UNIT_NAME_TOP_LEVEL": + case 143: + message.dimensions[i] = 143; + break; + case "AD_UNIT_REWARD_AMOUNT": + case 63: + message.dimensions[i] = 63; + break; + case "AD_UNIT_REWARD_TYPE": + case 62: + message.dimensions[i] = 62; + break; + case "AD_UNIT_STATUS": + case 206: + message.dimensions[i] = 206; + break; + case "AD_UNIT_STATUS_NAME": + case 207: + message.dimensions[i] = 207; + break; + case "AGENCY_LEVEL_1_ID": + case 565: + message.dimensions[i] = 565; + break; + case "AGENCY_LEVEL_1_NAME": + case 566: + message.dimensions[i] = 566; + break; + case "AGENCY_LEVEL_2_ID": + case 567: + message.dimensions[i] = 567; + break; + case "AGENCY_LEVEL_2_NAME": + case 568: + message.dimensions[i] = 568; + break; + case "AGENCY_LEVEL_3_ID": + case 569: + message.dimensions[i] = 569; + break; + case "AGENCY_LEVEL_3_NAME": + case 570: + message.dimensions[i] = 570; + break; + case "AGE_BRACKET": + case 508: + message.dimensions[i] = 508; + break; + case "AGE_BRACKET_NAME": + case 582: + message.dimensions[i] = 582; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS": + case 442: + message.dimensions[i] = 442; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME": + case 443: + message.dimensions[i] = 443; + break; + case "APP_VERSION": + case 392: + message.dimensions[i] = 392; + break; + case "AUCTION_PACKAGE_DEAL": + case 579: + message.dimensions[i] = 579; + break; + case "AUCTION_PACKAGE_DEAL_ID": + case 571: + message.dimensions[i] = 571; + break; + case "AUDIENCE_SEGMENT_ID_TARGETED": + case 584: + message.dimensions[i] = 584; + break; + case "AUDIENCE_SEGMENT_TARGETED": + case 585: + message.dimensions[i] = 585; + break; + case "AUTO_REFRESHED_TRAFFIC": + case 421: + message.dimensions[i] = 421; + break; + case "AUTO_REFRESHED_TRAFFIC_NAME": + case 422: + message.dimensions[i] = 422; + break; + case "BIDDER_ENCRYPTED_ID": + case 493: + message.dimensions[i] = 493; + break; + case "BIDDER_NAME": + case 494: + message.dimensions[i] = 494; + break; + case "BID_RANGE": + case 679: + message.dimensions[i] = 679; + break; + case "BID_REJECTION_REASON": + case 599: + message.dimensions[i] = 599; + break; + case "BID_REJECTION_REASON_NAME": + case 600: + message.dimensions[i] = 600; + break; + case "BRANDING_TYPE": + case 383: + message.dimensions[i] = 383; + break; + case "BRANDING_TYPE_NAME": + case 384: + message.dimensions[i] = 384; + break; + case "BROWSER_CATEGORY": + case 119: + message.dimensions[i] = 119; + break; + case "BROWSER_CATEGORY_NAME": + case 120: + message.dimensions[i] = 120; + break; + case "BROWSER_ID": + case 235: + message.dimensions[i] = 235; + break; + case "BROWSER_NAME": + case 236: + message.dimensions[i] = 236; + break; + case "BUYER_NETWORK_ID": + case 448: + message.dimensions[i] = 448; + break; + case "BUYER_NETWORK_NAME": + case 449: + message.dimensions[i] = 449; + break; + case "CALLOUT_STATUS_CATEGORY": + case 588: + message.dimensions[i] = 588; + break; + case "CALLOUT_STATUS_CATEGORY_NAME": + case 589: + message.dimensions[i] = 589; + break; + case "CARRIER_ID": + case 369: + message.dimensions[i] = 369; + break; + case "CARRIER_NAME": + case 368: + message.dimensions[i] = 368; + break; + case "CHANNEL": + case 501: + message.dimensions[i] = 501; + break; + case "CHILD_NETWORK_CODE": + case 542: + message.dimensions[i] = 542; + break; + case "CHILD_NETWORK_ID": + case 544: + message.dimensions[i] = 544; + break; + case "CHILD_PARTNER_NAME": + case 543: + message.dimensions[i] = 543; + break; + case "CITY_ID": + case 459: + message.dimensions[i] = 459; + break; + case "CITY_NAME": + case 452: + message.dimensions[i] = 452; + break; + case "CLASSIFIED_ADVERTISER_ID": + case 133: + message.dimensions[i] = 133; + break; + case "CLASSIFIED_ADVERTISER_NAME": + case 134: + message.dimensions[i] = 134; + break; + case "CLASSIFIED_BRAND_ID": + case 243: + message.dimensions[i] = 243; + break; + case "CLASSIFIED_BRAND_NAME": + case 244: + message.dimensions[i] = 244; + break; + case "CONTENT_CMS_NAME": + case 643: + message.dimensions[i] = 643; + break; + case "CONTENT_CMS_VIDEO_ID": + case 644: + message.dimensions[i] = 644; + break; + case "CONTENT_ID": + case 246: + message.dimensions[i] = 246; + break; + case "CONTENT_MAPPING_PRESENCE": + case 731: + message.dimensions[i] = 731; + break; + case "CONTENT_MAPPING_PRESENCE_NAME": + case 732: + message.dimensions[i] = 732; + break; + case "CONTENT_NAME": + case 247: + message.dimensions[i] = 247; + break; + case "CONTINENT": + case 469: + message.dimensions[i] = 469; + break; + case "CONTINENT_NAME": + case 470: + message.dimensions[i] = 470; + break; + case "COUNTRY_CODE": + case 466: + message.dimensions[i] = 466; + break; + case "COUNTRY_ID": + case 11: + message.dimensions[i] = 11; + break; + case "COUNTRY_NAME": + case 12: + message.dimensions[i] = 12; + break; + case "CREATIVE_BILLING_TYPE": + case 366: + message.dimensions[i] = 366; + break; + case "CREATIVE_BILLING_TYPE_NAME": + case 367: + message.dimensions[i] = 367; + break; + case "CREATIVE_CLICK_THROUGH_URL": + case 174: + message.dimensions[i] = 174; + break; + case "CREATIVE_ID": + case 138: + message.dimensions[i] = 138; + break; + case "CREATIVE_NAME": + case 139: + message.dimensions[i] = 139; + break; + case "CREATIVE_POLICIES_FILTERING": + case 711: + message.dimensions[i] = 711; + break; + case "CREATIVE_POLICIES_FILTERING_NAME": + case 712: + message.dimensions[i] = 712; + break; + case "CREATIVE_PROTECTIONS_FILTERING": + case 704: + message.dimensions[i] = 704; + break; + case "CREATIVE_PROTECTIONS_FILTERING_NAME": + case 705: + message.dimensions[i] = 705; + break; + case "CREATIVE_SET_ROLE_TYPE": + case 686: + message.dimensions[i] = 686; + break; + case "CREATIVE_SET_ROLE_TYPE_NAME": + case 687: + message.dimensions[i] = 687; + break; + case "CREATIVE_TECHNOLOGY": + case 148: + message.dimensions[i] = 148; + break; + case "CREATIVE_TECHNOLOGY_NAME": + case 149: + message.dimensions[i] = 149; + break; + case "CREATIVE_THIRD_PARTY_VENDOR": + case 361: + message.dimensions[i] = 361; + break; + case "CREATIVE_TYPE": + case 344: + message.dimensions[i] = 344; + break; + case "CREATIVE_TYPE_NAME": + case 345: + message.dimensions[i] = 345; + break; + case "CREATIVE_VENDOR_ID": + case 706: + message.dimensions[i] = 706; + break; + case "CREATIVE_VENDOR_NAME": + case 707: + message.dimensions[i] = 707; + break; + case "CREATIVE_VIDEO_REDIRECT_THIRD_PARTY": + case 562: + message.dimensions[i] = 562; + break; + case "CURATOR_ID": + case 572: + message.dimensions[i] = 572; + break; + case "CURATOR_NAME": + case 573: + message.dimensions[i] = 573; + break; + case "CUSTOM_EVENT_ID": + case 737: + message.dimensions[i] = 737; + break; + case "CUSTOM_EVENT_NAME": + case 735: + message.dimensions[i] = 735; + break; + case "CUSTOM_EVENT_TYPE": + case 736: + message.dimensions[i] = 736; + break; + case "CUSTOM_EVENT_TYPE_NAME": + case 738: + message.dimensions[i] = 738; + break; + case "CUSTOM_SPOT_ID": + case 423: + message.dimensions[i] = 423; + break; + case "CUSTOM_SPOT_NAME": + case 424: + message.dimensions[i] = 424; + break; + case "DATE": + case 3: + message.dimensions[i] = 3; + break; + case "DAY_OF_WEEK": + case 4: + message.dimensions[i] = 4; + break; + case "DEAL_BUYER_ID": + case 240: + message.dimensions[i] = 240; + break; + case "DEAL_BUYER_NAME": + case 241: + message.dimensions[i] = 241; + break; + case "DEAL_ID": + case 436: + message.dimensions[i] = 436; + break; + case "DEAL_NAME": + case 437: + message.dimensions[i] = 437; + break; + case "DELIVERED_SECURE_SIGNAL_ID": + case 309: + message.dimensions[i] = 309; + break; + case "DELIVERED_SECURE_SIGNAL_NAME": + case 310: + message.dimensions[i] = 310; + break; + case "DEMAND_CHANNEL": + case 9: + message.dimensions[i] = 9; + break; + case "DEMAND_CHANNEL_NAME": + case 10: + message.dimensions[i] = 10; + break; + case "DEMAND_SOURCE": + case 592: + message.dimensions[i] = 592; + break; + case "DEMAND_SOURCE_NAME": + case 593: + message.dimensions[i] = 593; + break; + case "DEMAND_SUBCHANNEL": + case 22: + message.dimensions[i] = 22; + break; + case "DEMAND_SUBCHANNEL_NAME": + case 23: + message.dimensions[i] = 23; + break; + case "DEVICE": + case 226: + message.dimensions[i] = 226; + break; + case "DEVICE_CATEGORY": + case 15: + message.dimensions[i] = 15; + break; + case "DEVICE_CATEGORY_NAME": + case 16: + message.dimensions[i] = 16; + break; + case "DEVICE_MANUFACTURER_ID": + case 525: + message.dimensions[i] = 525; + break; + case "DEVICE_MANUFACTURER_NAME": + case 526: + message.dimensions[i] = 526; + break; + case "DEVICE_MODEL_ID": + case 527: + message.dimensions[i] = 527; + break; + case "DEVICE_MODEL_NAME": + case 528: + message.dimensions[i] = 528; + break; + case "DEVICE_NAME": + case 225: + message.dimensions[i] = 225; + break; + case "DSP_SEAT_ID": + case 564: + message.dimensions[i] = 564; + break; + case "DYNAMIC_ALLOCATION_TYPE": + case 502: + message.dimensions[i] = 502; + break; + case "DYNAMIC_ALLOCATION_TYPE_NAME": + case 503: + message.dimensions[i] = 503; + break; + case "ESP_DELIVERY": + case 623: + message.dimensions[i] = 623; + break; + case "ESP_DELIVERY_NAME": + case 624: + message.dimensions[i] = 624; + break; + case "ESP_PRESENCE": + case 625: + message.dimensions[i] = 625; + break; + case "ESP_PRESENCE_NAME": + case 626: + message.dimensions[i] = 626; + break; + case "EXCHANGE_BIDDING_DEAL_ID": + case 715: + message.dimensions[i] = 715; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE": + case 714: + message.dimensions[i] = 714; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE_NAME": + case 723: + message.dimensions[i] = 723; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_ID": + case 185: + message.dimensions[i] = 185; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": + case 186: + message.dimensions[i] = 186; + break; + case "FIRST_LOOK_PRICING_RULE_ID": + case 248: + message.dimensions[i] = 248; + break; + case "FIRST_LOOK_PRICING_RULE_NAME": + case 249: + message.dimensions[i] = 249; + break; + case "FIRST_PARTY_ID_STATUS": + case 404: + message.dimensions[i] = 404; + break; + case "FIRST_PARTY_ID_STATUS_NAME": + case 405: + message.dimensions[i] = 405; + break; + case "GENDER": + case 509: + message.dimensions[i] = 509; + break; + case "GENDER_NAME": + case 583: + message.dimensions[i] = 583; + break; + case "GOOGLE_ANALYTICS_STREAM_ID": + case 519: + message.dimensions[i] = 519; + break; + case "GOOGLE_ANALYTICS_STREAM_NAME": + case 520: + message.dimensions[i] = 520; + break; + case "HBT_YIELD_PARTNER_ID": + case 659: + message.dimensions[i] = 659; + break; + case "HBT_YIELD_PARTNER_NAME": + case 660: + message.dimensions[i] = 660; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE": + case 718: + message.dimensions[i] = 718; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE_NAME": + case 719: + message.dimensions[i] = 719; + break; + case "HOUR": + case 100: + message.dimensions[i] = 100; + break; + case "IMPRESSION_COUNTING_METHOD": + case 577: + message.dimensions[i] = 577; + break; + case "IMPRESSION_COUNTING_METHOD_NAME": + case 578: + message.dimensions[i] = 578; + break; + case "INTERACTION_TYPE": + case 223: + message.dimensions[i] = 223; + break; + case "INTERACTION_TYPE_NAME": + case 224: + message.dimensions[i] = 224; + break; + case "INTEREST": + case 510: + message.dimensions[i] = 510; + break; + case "INVENTORY_FORMAT": + case 17: + message.dimensions[i] = 17; + break; + case "INVENTORY_FORMAT_NAME": + case 18: + message.dimensions[i] = 18; + break; + case "INVENTORY_SHARE_ASSIGNMENT_ID": + case 648: + message.dimensions[i] = 648; + break; + case "INVENTORY_SHARE_ASSIGNMENT_NAME": + case 649: + message.dimensions[i] = 649; + break; + case "INVENTORY_SHARE_OUTCOME": + case 603: + message.dimensions[i] = 603; + break; + case "INVENTORY_SHARE_OUTCOME_NAME": + case 604: + message.dimensions[i] = 604; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER": + case 652: + message.dimensions[i] = 652; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER_NAME": + case 653: + message.dimensions[i] = 653; + break; + case "INVENTORY_SHARE_TARGET_SHARE_PERCENT": + case 654: + message.dimensions[i] = 654; + break; + case "INVENTORY_SHARE_TYPE": + case 650: + message.dimensions[i] = 650; + break; + case "INVENTORY_SHARE_TYPE_NAME": + case 651: + message.dimensions[i] = 651; + break; + case "INVENTORY_TYPE": + case 19: + message.dimensions[i] = 19; + break; + case "INVENTORY_TYPE_NAME": + case 20: + message.dimensions[i] = 20; + break; + case "IS_ADX_DIRECT": + case 382: + message.dimensions[i] = 382; + break; + case "IS_CURATION_TARGETED": + case 574: + message.dimensions[i] = 574; + break; + case "IS_DROPPED": + case 464: + message.dimensions[i] = 464; + break; + case "IS_FIRST_LOOK_DEAL": + case 401: + message.dimensions[i] = 401; + break; + case "KEY_VALUES_ID": + case 214: + message.dimensions[i] = 214; + break; + case "KEY_VALUES_NAME": + case 215: + message.dimensions[i] = 215; + break; + case "LINE_ITEM_AGENCY": + case 663: + message.dimensions[i] = 663; + break; + case "LINE_ITEM_ARCHIVED": + case 188: + message.dimensions[i] = 188; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION": + case 204: + message.dimensions[i] = 204; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": + case 205: + message.dimensions[i] = 205; + break; + case "LINE_ITEM_COMPUTED_STATUS": + case 250: + message.dimensions[i] = 250; + break; + case "LINE_ITEM_COMPUTED_STATUS_NAME": + case 251: + message.dimensions[i] = 251; + break; + case "LINE_ITEM_CONTRACTED_QUANTITY": + case 92: + message.dimensions[i] = 92; + break; + case "LINE_ITEM_COST_PER_UNIT": + case 85: + message.dimensions[i] = 85; + break; + case "LINE_ITEM_COST_TYPE": + case 212: + message.dimensions[i] = 212; + break; + case "LINE_ITEM_COST_TYPE_NAME": + case 213: + message.dimensions[i] = 213; + break; + case "LINE_ITEM_CREATIVE_END_DATE": + case 176: + message.dimensions[i] = 176; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE": + case 189: + message.dimensions[i] = 189; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": + case 190: + message.dimensions[i] = 190; + break; + case "LINE_ITEM_CREATIVE_START_DATE": + case 175: + message.dimensions[i] = 175; + break; + case "LINE_ITEM_CURRENCY_CODE": + case 180: + message.dimensions[i] = 180; + break; + case "LINE_ITEM_DELIVERY_INDICATOR": + case 87: + message.dimensions[i] = 87; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE": + case 191: + message.dimensions[i] = 191; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": + case 192: + message.dimensions[i] = 192; + break; + case "LINE_ITEM_DISCOUNT_ABSOLUTE": + case 195: + message.dimensions[i] = 195; + break; + case "LINE_ITEM_DISCOUNT_PERCENTAGE": + case 196: + message.dimensions[i] = 196; + break; + case "LINE_ITEM_END_DATE": + case 81: + message.dimensions[i] = 81; + break; + case "LINE_ITEM_END_DATE_TIME": + case 83: + message.dimensions[i] = 83; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE": + case 201: + message.dimensions[i] = 201; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": + case 202: + message.dimensions[i] = 202; + break; + case "LINE_ITEM_EXTERNAL_DEAL_ID": + case 97: + message.dimensions[i] = 97; + break; + case "LINE_ITEM_EXTERNAL_ID": + case 86: + message.dimensions[i] = 86; + break; + case "LINE_ITEM_FREQUENCY_CAP": + case 256: + message.dimensions[i] = 256; + break; + case "LINE_ITEM_ID": + case 1: + message.dimensions[i] = 1; + break; + case "LINE_ITEM_LABELS": + case 667: + message.dimensions[i] = 667; + break; + case "LINE_ITEM_LABEL_IDS": + case 665: + message.dimensions[i] = 665; + break; + case "LINE_ITEM_LAST_MODIFIED_BY_APP": + case 181: + message.dimensions[i] = 181; + break; + case "LINE_ITEM_LIFETIME_CLICKS": + case 95: + message.dimensions[i] = 95; + break; + case "LINE_ITEM_LIFETIME_IMPRESSIONS": + case 94: + message.dimensions[i] = 94; + break; + case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": + case 96: + message.dimensions[i] = 96; + break; + case "LINE_ITEM_MAKEGOOD": + case 89: + message.dimensions[i] = 89; + break; + case "LINE_ITEM_NAME": + case 2: + message.dimensions[i] = 2; + break; + case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": + case 98: + message.dimensions[i] = 98; + break; + case "LINE_ITEM_OPTIMIZABLE": + case 90: + message.dimensions[i] = 90; + break; + case "LINE_ITEM_PO_NUMBER": + case 669: + message.dimensions[i] = 669; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE": + case 210: + message.dimensions[i] = 210; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": + case 211: + message.dimensions[i] = 211; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": + case 93: + message.dimensions[i] = 93; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": + case 396: + message.dimensions[i] = 396; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": + case 208: + message.dimensions[i] = 208; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": + case 209: + message.dimensions[i] = 209; + break; + case "LINE_ITEM_PRIORITY": + case 24: + message.dimensions[i] = 24; + break; + case "LINE_ITEM_RESERVATION_STATUS": + case 304: + message.dimensions[i] = 304; + break; + case "LINE_ITEM_RESERVATION_STATUS_NAME": + case 305: + message.dimensions[i] = 305; + break; + case "LINE_ITEM_SALESPERSON": + case 671: + message.dimensions[i] = 671; + break; + case "LINE_ITEM_SECONDARY_SALESPEOPLE": + case 673: + message.dimensions[i] = 673; + break; + case "LINE_ITEM_SECONDARY_TRAFFICKERS": + case 675: + message.dimensions[i] = 675; + break; + case "LINE_ITEM_START_DATE": + case 82: + message.dimensions[i] = 82; + break; + case "LINE_ITEM_START_DATE_TIME": + case 84: + message.dimensions[i] = 84; + break; + case "LINE_ITEM_TRAFFICKER": + case 677: + message.dimensions[i] = 677; + break; + case "LINE_ITEM_TYPE": + case 193: + message.dimensions[i] = 193; + break; + case "LINE_ITEM_TYPE_NAME": + case 194: + message.dimensions[i] = 194; + break; + case "LINE_ITEM_UNLIMITED_END": + case 187: + message.dimensions[i] = 187; + break; + case "LINE_ITEM_VALUE_COST_PER_UNIT": + case 88: + message.dimensions[i] = 88; + break; + case "LINE_ITEM_WEB_PROPERTY_CODE": + case 179: + message.dimensions[i] = 179; + break; + case "MASTER_COMPANION_CREATIVE_ID": + case 140: + message.dimensions[i] = 140; + break; + case "MASTER_COMPANION_CREATIVE_NAME": + case 141: + message.dimensions[i] = 141; + break; + case "MEDIATION_TYPE": + case 701: + message.dimensions[i] = 701; + break; + case "MEDIATION_TYPE_NAME": + case 754: + message.dimensions[i] = 754; + break; + case "MEDIATION_YIELD_PARTNER_ID": + case 661: + message.dimensions[i] = 661; + break; + case "MEDIATION_YIELD_PARTNER_NAME": + case 662: + message.dimensions[i] = 662; + break; + case "METRO_ID": + case 453: + message.dimensions[i] = 453; + break; + case "METRO_NAME": + case 454: + message.dimensions[i] = 454; + break; + case "MOBILE_APP_FREE": + case 128: + message.dimensions[i] = 128; + break; + case "MOBILE_APP_ICON_URL": + case 129: + message.dimensions[i] = 129; + break; + case "MOBILE_APP_ID": + case 123: + message.dimensions[i] = 123; + break; + case "MOBILE_APP_NAME": + case 127: + message.dimensions[i] = 127; + break; + case "MOBILE_APP_OWNERSHIP_STATUS": + case 311: + message.dimensions[i] = 311; + break; + case "MOBILE_APP_OWNERSHIP_STATUS_NAME": + case 312: + message.dimensions[i] = 312; + break; + case "MOBILE_APP_STORE": + case 125: + message.dimensions[i] = 125; + break; + case "MOBILE_APP_STORE_NAME": + case 245: + message.dimensions[i] = 245; + break; + case "MOBILE_INVENTORY_TYPE": + case 99: + message.dimensions[i] = 99; + break; + case "MOBILE_INVENTORY_TYPE_NAME": + case 21: + message.dimensions[i] = 21; + break; + case "MOBILE_RENDERING_SDK": + case 646: + message.dimensions[i] = 646; + break; + case "MOBILE_RENDERING_SDK_NAME": + case 647: + message.dimensions[i] = 647; + break; + case "MOBILE_SDK_MAJOR_VERSION": + case 692: + message.dimensions[i] = 692; + break; + case "MOBILE_SDK_MINOR_VERSION": + case 693: + message.dimensions[i] = 693; + break; + case "MOBILE_SDK_VERSION_NAME": + case 130: + message.dimensions[i] = 130; + break; + case "MONTH_YEAR": + case 6: + message.dimensions[i] = 6; + break; + case "NATIVE_AD_FORMAT_ID": + case 255: + message.dimensions[i] = 255; + break; + case "NATIVE_AD_FORMAT_NAME": + case 254: + message.dimensions[i] = 254; + break; + case "NATIVE_STYLE_ID": + case 253: + message.dimensions[i] = 253; + break; + case "NATIVE_STYLE_NAME": + case 252: + message.dimensions[i] = 252; + break; + case "NO_FILL_REASON_CATEGORY": + case 586: + message.dimensions[i] = 586; + break; + case "NO_FILL_REASON_CATEGORY_NAME": + case 587: + message.dimensions[i] = 587; + break; + case "OPERATING_SYSTEM_CATEGORY": + case 117: + message.dimensions[i] = 117; + break; + case "OPERATING_SYSTEM_CATEGORY_NAME": + case 118: + message.dimensions[i] = 118; + break; + case "OPERATING_SYSTEM_VERSION_ID": + case 238: + message.dimensions[i] = 238; + break; + case "OPERATING_SYSTEM_VERSION_NAME": + case 237: + message.dimensions[i] = 237; + break; + case "OPTIMIZATION_TYPE": + case 639: + message.dimensions[i] = 639; + break; + case "OPTIMIZATION_TYPE_NAME": + case 640: + message.dimensions[i] = 640; + break; + case "ORDER_AGENCY": + case 150: + message.dimensions[i] = 150; + break; + case "ORDER_AGENCY_ID": + case 151: + message.dimensions[i] = 151; + break; + case "ORDER_BOOKED_CPC": + case 152: + message.dimensions[i] = 152; + break; + case "ORDER_BOOKED_CPM": + case 153: + message.dimensions[i] = 153; + break; + case "ORDER_DELIVERY_STATUS": + case 231: + message.dimensions[i] = 231; + break; + case "ORDER_DELIVERY_STATUS_NAME": + case 239: + message.dimensions[i] = 239; + break; + case "ORDER_END_DATE": + case 154: + message.dimensions[i] = 154; + break; + case "ORDER_END_DATE_TIME": + case 155: + message.dimensions[i] = 155; + break; + case "ORDER_EXTERNAL_ID": + case 156: + message.dimensions[i] = 156; + break; + case "ORDER_ID": + case 7: + message.dimensions[i] = 7; + break; + case "ORDER_LABELS": + case 170: + message.dimensions[i] = 170; + break; + case "ORDER_LABEL_IDS": + case 171: + message.dimensions[i] = 171; + break; + case "ORDER_LIFETIME_CLICKS": + case 158: + message.dimensions[i] = 158; + break; + case "ORDER_LIFETIME_IMPRESSIONS": + case 159: + message.dimensions[i] = 159; + break; + case "ORDER_NAME": + case 8: + message.dimensions[i] = 8; + break; + case "ORDER_PO_NUMBER": + case 160: + message.dimensions[i] = 160; + break; + case "ORDER_PROGRAMMATIC": + case 157: + message.dimensions[i] = 157; + break; + case "ORDER_SALESPERSON": + case 161: + message.dimensions[i] = 161; + break; + case "ORDER_SALESPERSON_ID": + case 629: + message.dimensions[i] = 629; + break; + case "ORDER_SECONDARY_SALESPEOPLE": + case 164: + message.dimensions[i] = 164; + break; + case "ORDER_SECONDARY_SALESPEOPLE_ID": + case 165: + message.dimensions[i] = 165; + break; + case "ORDER_SECONDARY_TRAFFICKERS": + case 166: + message.dimensions[i] = 166; + break; + case "ORDER_SECONDARY_TRAFFICKERS_ID": + case 167: + message.dimensions[i] = 167; + break; + case "ORDER_START_DATE": + case 168: + message.dimensions[i] = 168; + break; + case "ORDER_START_DATE_TIME": + case 169: + message.dimensions[i] = 169; + break; + case "ORDER_TRAFFICKER": + case 162: + message.dimensions[i] = 162; + break; + case "ORDER_TRAFFICKER_ID": + case 163: + message.dimensions[i] = 163; + break; + case "ORDER_UNLIMITED_END": + case 203: + message.dimensions[i] = 203; + break; + case "PAGE_PATH": + case 511: + message.dimensions[i] = 511; + break; + case "PAGE_TITLE_AND_SCREEN_CLASS": + case 512: + message.dimensions[i] = 512; + break; + case "PAGE_TITLE_AND_SCREEN_NAME": + case 513: + message.dimensions[i] = 513; + break; + case "PLACEMENT_ID": + case 113: + message.dimensions[i] = 113; + break; + case "PLACEMENT_ID_ALL": + case 144: + message.dimensions[i] = 144; + break; + case "PLACEMENT_NAME": + case 114: + message.dimensions[i] = 114; + break; + case "PLACEMENT_NAME_ALL": + case 145: + message.dimensions[i] = 145; + break; + case "PLACEMENT_STATUS": + case 362: + message.dimensions[i] = 362; + break; + case "PLACEMENT_STATUS_NAME": + case 364: + message.dimensions[i] = 364; + break; + case "PLACEMENT_STATUS_NAME_ALL": + case 365: + message.dimensions[i] = 365; + break; + case "POSTAL_CODE_ID": + case 455: + message.dimensions[i] = 455; + break; + case "POSTAL_CODE_NAME": + case 456: + message.dimensions[i] = 456; + break; + case "PPID_STATUS": + case 406: + message.dimensions[i] = 406; + break; + case "PPID_STATUS_NAME": + case 407: + message.dimensions[i] = 407; + break; + case "PREDICTED_VIEWABILITY_BUCKET": + case 633: + message.dimensions[i] = 633; + break; + case "PREDICTED_VIEWABILITY_BUCKET_NAME": + case 634: + message.dimensions[i] = 634; + break; + case "PRESENTED_SECURE_SIGNAL_ID": + case 495: + message.dimensions[i] = 495; + break; + case "PRESENTED_SECURE_SIGNAL_NAME": + case 496: + message.dimensions[i] = 496; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE": + case 408: + message.dimensions[i] = 408; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE_NAME": + case 409: + message.dimensions[i] = 409; + break; + case "PROGRAMMATIC_BUYER_ID": + case 240: + message.dimensions[i] = 240; + break; + case "PROGRAMMATIC_BUYER_NAME": + case 241: + message.dimensions[i] = 241; + break; + case "PROGRAMMATIC_CHANNEL": + case 13: + message.dimensions[i] = 13; + break; + case "PROGRAMMATIC_CHANNEL_NAME": + case 14: + message.dimensions[i] = 14; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE": + case 410: + message.dimensions[i] = 410; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS": + case 546: + message.dimensions[i] = 546; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME": + case 412: + message.dimensions[i] = 412; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER": + case 413: + message.dimensions[i] = 413; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE": + case 414: + message.dimensions[i] = 414; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE": + case 425: + message.dimensions[i] = 425; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS": + case 545: + message.dimensions[i] = 545; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME": + case 427: + message.dimensions[i] = 427; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER": + case 428: + message.dimensions[i] = 428; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE": + case 429: + message.dimensions[i] = 429; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE": + case 415: + message.dimensions[i] = 415; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID": + case 416: + message.dimensions[i] = 416; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME": + case 417: + message.dimensions[i] = 417; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER": + case 418: + message.dimensions[i] = 418; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE": + case 419: + message.dimensions[i] = 419; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID": + case 136: + message.dimensions[i] = 136; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME": + case 137: + message.dimensions[i] = 137; + break; + case "REGION_ID": + case 457: + message.dimensions[i] = 457; + break; + case "REGION_NAME": + case 458: + message.dimensions[i] = 458; + break; + case "REJECTION_CLASS_CATEGORY": + case 590: + message.dimensions[i] = 590; + break; + case "REJECTION_CLASS_CATEGORY_NAME": + case 591: + message.dimensions[i] = 591; + break; + case "RENDERED_CREATIVE_SIZE": + case 343: + message.dimensions[i] = 343; + break; + case "REQUESTED_AD_SIZES": + case 352: + message.dimensions[i] = 352; + break; + case "REQUEST_TYPE": + case 146: + message.dimensions[i] = 146; + break; + case "REQUEST_TYPE_NAME": + case 147: + message.dimensions[i] = 147; + break; + case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": + case 597: + message.dimensions[i] = 597; + break; + case "SERVING_RESTRICTION": + case 631: + message.dimensions[i] = 631; + break; + case "SERVING_RESTRICTION_NAME": + case 632: + message.dimensions[i] = 632; + break; + case "SITE": + case 387: + message.dimensions[i] = 387; + break; + case "TARGETING_ID": + case 232: + message.dimensions[i] = 232; + break; + case "TARGETING_NAME": + case 233: + message.dimensions[i] = 233; + break; + case "TARGETING_TYPE": + case 385: + message.dimensions[i] = 385; + break; + case "TARGETING_TYPE_NAME": + case 386: + message.dimensions[i] = 386; + break; + case "THIRD_PARTY_ID_STATUS": + case 402: + message.dimensions[i] = 402; + break; + case "THIRD_PARTY_ID_STATUS_NAME": + case 403: + message.dimensions[i] = 403; + break; + case "TOPICS_STATUS": + case 504: + message.dimensions[i] = 504; + break; + case "TOPICS_STATUS_NAME": + case 505: + message.dimensions[i] = 505; + break; + case "TOP_PRIVATE_DOMAIN": + case 444: + message.dimensions[i] = 444; + break; + case "TRAFFIC_SOURCE": + case 388: + message.dimensions[i] = 388; + break; + case "TRAFFIC_SOURCE_NAME": + case 389: + message.dimensions[i] = 389; + break; + case "UNIFIED_PRICING_RULE_ID": + case 393: + message.dimensions[i] = 393; + break; + case "UNIFIED_PRICING_RULE_NAME": + case 394: + message.dimensions[i] = 394; + break; + case "URL": + case 506: + message.dimensions[i] = 506; + break; + case "URL_ID": + case 507: + message.dimensions[i] = 507; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE": + case 635: + message.dimensions[i] = 635; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE_NAME": + case 636: + message.dimensions[i] = 636; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID": + case 637: + message.dimensions[i] = 637; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME": + case 638: + message.dimensions[i] = 638; + break; + case "VAST_VERSION": + case 554: + message.dimensions[i] = 554; + break; + case "VAST_VERSION_NAME": + case 555: + message.dimensions[i] = 555; + break; + case "VIDEO_AD_BREAK_TYPE": + case 556: + message.dimensions[i] = 556; + break; + case "VIDEO_AD_BREAK_TYPE_NAME": + case 557: + message.dimensions[i] = 557; + break; + case "VIDEO_AD_DURATION": + case 450: + message.dimensions[i] = 450; + break; + case "VIDEO_AD_FORMATS_RULE": + case 561: + message.dimensions[i] = 561; + break; + case "VIDEO_AD_FORMATS_RULE_ID": + case 560: + message.dimensions[i] = 560; + break; + case "VIDEO_AD_REQUEST_DURATION": + case 558: + message.dimensions[i] = 558; + break; + case "VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME": + case 751: + message.dimensions[i] = 751; + break; + case "VIDEO_AD_REQUEST_DURATION_NAME": + case 559: + message.dimensions[i] = 559; + break; + case "VIDEO_AD_REQUEST_SOURCE": + case 438: + message.dimensions[i] = 438; + break; + case "VIDEO_AD_REQUEST_SOURCE_NAME": + case 439: + message.dimensions[i] = 439; + break; + case "VIDEO_AD_TYPE": + case 432: + message.dimensions[i] = 432; + break; + case "VIDEO_AD_TYPE_NAME": + case 433: + message.dimensions[i] = 433; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE": + case 721: + message.dimensions[i] = 721; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE_NAME": + case 722: + message.dimensions[i] = 722; + break; + case "VIDEO_FALLBACK_POSITION": + case 530: + message.dimensions[i] = 530; + break; + case "VIDEO_MEASUREMENT_SOURCE": + case 601: + message.dimensions[i] = 601; + break; + case "VIDEO_MEASUREMENT_SOURCE_NAME": + case 602: + message.dimensions[i] = 602; + break; + case "VIDEO_PLCMT": + case 172: + message.dimensions[i] = 172; + break; + case "VIDEO_PLCMT_NAME": + case 173: + message.dimensions[i] = 173; + break; + case "VIDEO_POSITION_IN_POD": + case 538: + message.dimensions[i] = 538; + break; + case "VIDEO_POSITION_OF_POD": + case 539: + message.dimensions[i] = 539; + break; + case "VIDEO_SDK_VERSION": + case 440: + message.dimensions[i] = 440; + break; + case "VIDEO_SDK_VERSION_NAME": + case 441: + message.dimensions[i] = 441; + break; + case "VIDEO_STITCHER_TYPE": + case 752: + message.dimensions[i] = 752; + break; + case "VIDEO_STITCHER_TYPE_NAME": + case 753: + message.dimensions[i] = 753; + break; + case "WEEK": + case 5: + message.dimensions[i] = 5; + break; + case "YIELD_GROUP_BUYER_NAME": + case 184: + message.dimensions[i] = 184; + break; + case "YIELD_GROUP_BUYER_TAG_NAME": + case 627: + message.dimensions[i] = 627; + break; + case "YIELD_GROUP_ID": + case 182: + message.dimensions[i] = 182; + break; + case "YIELD_GROUP_NAME": + case 183: + message.dimensions[i] = 183; + break; + case "YOUTUBE_AD_DURATION_BUCKET": + case 430: + message.dimensions[i] = 430; + break; + case "YOUTUBE_AD_DURATION_BUCKET_NAME": + case 431: + message.dimensions[i] = 431; + break; + case "YOUTUBE_AD_TYPE": + case 399: + message.dimensions[i] = 399; + break; + case "YOUTUBE_AD_TYPE_NAME": + case 400: + message.dimensions[i] = 400; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 10000: + message.dimensions[i] = 10000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 10001: + message.dimensions[i] = 10001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 10002: + message.dimensions[i] = 10002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 10003: + message.dimensions[i] = 10003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 10004: + message.dimensions[i] = 10004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 10005: + message.dimensions[i] = 10005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 10006: + message.dimensions[i] = 10006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 10007: + message.dimensions[i] = 10007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 10008: + message.dimensions[i] = 10008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 10009: + message.dimensions[i] = 10009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 10010: + message.dimensions[i] = 10010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 10011: + message.dimensions[i] = 10011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 10012: + message.dimensions[i] = 10012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 10013: + message.dimensions[i] = 10013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 10014: + message.dimensions[i] = 10014; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 11000: + message.dimensions[i] = 11000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 11001: + message.dimensions[i] = 11001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 11002: + message.dimensions[i] = 11002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 11003: + message.dimensions[i] = 11003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 11004: + message.dimensions[i] = 11004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 11005: + message.dimensions[i] = 11005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 11006: + message.dimensions[i] = 11006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 11007: + message.dimensions[i] = 11007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 11008: + message.dimensions[i] = 11008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 11009: + message.dimensions[i] = 11009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 11010: + message.dimensions[i] = 11010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 11011: + message.dimensions[i] = 11011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 11012: + message.dimensions[i] = 11012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 11013: + message.dimensions[i] = 11013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 11014: + message.dimensions[i] = 11014; + break; + case "ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 12000: + message.dimensions[i] = 12000; + break; + case "ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 12001: + message.dimensions[i] = 12001; + break; + case "ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 12002: + message.dimensions[i] = 12002; + break; + case "ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 12003: + message.dimensions[i] = 12003; + break; + case "ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 12004: + message.dimensions[i] = 12004; + break; + case "ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 12005: + message.dimensions[i] = 12005; + break; + case "ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 12006: + message.dimensions[i] = 12006; + break; + case "ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 12007: + message.dimensions[i] = 12007; + break; + case "ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 12008: + message.dimensions[i] = 12008; + break; + case "ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 12009: + message.dimensions[i] = 12009; + break; + case "ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 12010: + message.dimensions[i] = 12010; + break; + case "ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 12011: + message.dimensions[i] = 12011; + break; + case "ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 12012: + message.dimensions[i] = 12012; + break; + case "ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 12013: + message.dimensions[i] = 12013; + break; + case "ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 12014: + message.dimensions[i] = 12014; + break; + case "ORDER_CUSTOM_FIELD_0_VALUE": + case 13000: + message.dimensions[i] = 13000; + break; + case "ORDER_CUSTOM_FIELD_1_VALUE": + case 13001: + message.dimensions[i] = 13001; + break; + case "ORDER_CUSTOM_FIELD_2_VALUE": + case 13002: + message.dimensions[i] = 13002; + break; + case "ORDER_CUSTOM_FIELD_3_VALUE": + case 13003: + message.dimensions[i] = 13003; + break; + case "ORDER_CUSTOM_FIELD_4_VALUE": + case 13004: + message.dimensions[i] = 13004; + break; + case "ORDER_CUSTOM_FIELD_5_VALUE": + case 13005: + message.dimensions[i] = 13005; + break; + case "ORDER_CUSTOM_FIELD_6_VALUE": + case 13006: + message.dimensions[i] = 13006; + break; + case "ORDER_CUSTOM_FIELD_7_VALUE": + case 13007: + message.dimensions[i] = 13007; + break; + case "ORDER_CUSTOM_FIELD_8_VALUE": + case 13008: + message.dimensions[i] = 13008; + break; + case "ORDER_CUSTOM_FIELD_9_VALUE": + case 13009: + message.dimensions[i] = 13009; + break; + case "ORDER_CUSTOM_FIELD_10_VALUE": + case 13010: + message.dimensions[i] = 13010; + break; + case "ORDER_CUSTOM_FIELD_11_VALUE": + case 13011: + message.dimensions[i] = 13011; + break; + case "ORDER_CUSTOM_FIELD_12_VALUE": + case 13012: + message.dimensions[i] = 13012; + break; + case "ORDER_CUSTOM_FIELD_13_VALUE": + case 13013: + message.dimensions[i] = 13013; + break; + case "ORDER_CUSTOM_FIELD_14_VALUE": + case 13014: + message.dimensions[i] = 13014; + break; + case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 14000: + message.dimensions[i] = 14000; + break; + case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 14001: + message.dimensions[i] = 14001; + break; + case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 14002: + message.dimensions[i] = 14002; + break; + case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 14003: + message.dimensions[i] = 14003; + break; + case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 14004: + message.dimensions[i] = 14004; + break; + case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 14005: + message.dimensions[i] = 14005; + break; + case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 14006: + message.dimensions[i] = 14006; + break; + case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 14007: + message.dimensions[i] = 14007; + break; + case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 14008: + message.dimensions[i] = 14008; + break; + case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 14009: + message.dimensions[i] = 14009; + break; + case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 14010: + message.dimensions[i] = 14010; + break; + case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 14011: + message.dimensions[i] = 14011; + break; + case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 14012: + message.dimensions[i] = 14012; + break; + case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 14013: + message.dimensions[i] = 14013; + break; + case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 14014: + message.dimensions[i] = 14014; + break; + case "CREATIVE_CUSTOM_FIELD_0_VALUE": + case 15000: + message.dimensions[i] = 15000; + break; + case "CREATIVE_CUSTOM_FIELD_1_VALUE": + case 15001: + message.dimensions[i] = 15001; + break; + case "CREATIVE_CUSTOM_FIELD_2_VALUE": + case 15002: + message.dimensions[i] = 15002; + break; + case "CREATIVE_CUSTOM_FIELD_3_VALUE": + case 15003: + message.dimensions[i] = 15003; + break; + case "CREATIVE_CUSTOM_FIELD_4_VALUE": + case 15004: + message.dimensions[i] = 15004; + break; + case "CREATIVE_CUSTOM_FIELD_5_VALUE": + case 15005: + message.dimensions[i] = 15005; + break; + case "CREATIVE_CUSTOM_FIELD_6_VALUE": + case 15006: + message.dimensions[i] = 15006; + break; + case "CREATIVE_CUSTOM_FIELD_7_VALUE": + case 15007: + message.dimensions[i] = 15007; + break; + case "CREATIVE_CUSTOM_FIELD_8_VALUE": + case 15008: + message.dimensions[i] = 15008; + break; + case "CREATIVE_CUSTOM_FIELD_9_VALUE": + case 15009: + message.dimensions[i] = 15009; + break; + case "CREATIVE_CUSTOM_FIELD_10_VALUE": + case 15010: + message.dimensions[i] = 15010; + break; + case "CREATIVE_CUSTOM_FIELD_11_VALUE": + case 15011: + message.dimensions[i] = 15011; + break; + case "CREATIVE_CUSTOM_FIELD_12_VALUE": + case 15012: + message.dimensions[i] = 15012; + break; + case "CREATIVE_CUSTOM_FIELD_13_VALUE": + case 15013: + message.dimensions[i] = 15013; + break; + case "CREATIVE_CUSTOM_FIELD_14_VALUE": + case 15014: + message.dimensions[i] = 15014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 16000: + message.dimensions[i] = 16000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 16001: + message.dimensions[i] = 16001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 16002: + message.dimensions[i] = 16002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 16003: + message.dimensions[i] = 16003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 16004: + message.dimensions[i] = 16004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 16005: + message.dimensions[i] = 16005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 16006: + message.dimensions[i] = 16006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 16007: + message.dimensions[i] = 16007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 16008: + message.dimensions[i] = 16008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 16009: + message.dimensions[i] = 16009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 16010: + message.dimensions[i] = 16010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 16011: + message.dimensions[i] = 16011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 16012: + message.dimensions[i] = 16012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 16013: + message.dimensions[i] = 16013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 16014: + message.dimensions[i] = 16014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 17000: + message.dimensions[i] = 17000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 17001: + message.dimensions[i] = 17001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 17002: + message.dimensions[i] = 17002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 17003: + message.dimensions[i] = 17003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 17004: + message.dimensions[i] = 17004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 17005: + message.dimensions[i] = 17005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 17006: + message.dimensions[i] = 17006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 17007: + message.dimensions[i] = 17007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 17008: + message.dimensions[i] = 17008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 17009: + message.dimensions[i] = 17009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 17010: + message.dimensions[i] = 17010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 17011: + message.dimensions[i] = 17011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 17012: + message.dimensions[i] = 17012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 17013: + message.dimensions[i] = 17013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 17014: + message.dimensions[i] = 17014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 18000: + message.dimensions[i] = 18000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 18001: + message.dimensions[i] = 18001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 18002: + message.dimensions[i] = 18002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 18003: + message.dimensions[i] = 18003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 18004: + message.dimensions[i] = 18004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 18005: + message.dimensions[i] = 18005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 18006: + message.dimensions[i] = 18006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 18007: + message.dimensions[i] = 18007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 18008: + message.dimensions[i] = 18008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 18009: + message.dimensions[i] = 18009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 18010: + message.dimensions[i] = 18010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 18011: + message.dimensions[i] = 18011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 18012: + message.dimensions[i] = 18012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 18013: + message.dimensions[i] = 18013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 18014: + message.dimensions[i] = 18014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": + case 19000: + message.dimensions[i] = 19000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": + case 19001: + message.dimensions[i] = 19001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": + case 19002: + message.dimensions[i] = 19002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": + case 19003: + message.dimensions[i] = 19003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": + case 19004: + message.dimensions[i] = 19004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": + case 19005: + message.dimensions[i] = 19005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": + case 19006: + message.dimensions[i] = 19006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": + case 19007: + message.dimensions[i] = 19007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": + case 19008: + message.dimensions[i] = 19008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": + case 19009: + message.dimensions[i] = 19009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": + case 19010: + message.dimensions[i] = 19010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": + case 19011: + message.dimensions[i] = 19011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": + case 19012: + message.dimensions[i] = 19012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": + case 19013: + message.dimensions[i] = 19013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": + case 19014: + message.dimensions[i] = 19014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 20000: + message.dimensions[i] = 20000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 20001: + message.dimensions[i] = 20001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 20002: + message.dimensions[i] = 20002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 20003: + message.dimensions[i] = 20003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 20004: + message.dimensions[i] = 20004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 20005: + message.dimensions[i] = 20005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 20006: + message.dimensions[i] = 20006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 20007: + message.dimensions[i] = 20007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 20008: + message.dimensions[i] = 20008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 20009: + message.dimensions[i] = 20009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 20010: + message.dimensions[i] = 20010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 20011: + message.dimensions[i] = 20011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 20012: + message.dimensions[i] = 20012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 20013: + message.dimensions[i] = 20013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 20014: + message.dimensions[i] = 20014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": + case 21000: + message.dimensions[i] = 21000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": + case 21001: + message.dimensions[i] = 21001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": + case 21002: + message.dimensions[i] = 21002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": + case 21003: + message.dimensions[i] = 21003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": + case 21004: + message.dimensions[i] = 21004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": + case 21005: + message.dimensions[i] = 21005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": + case 21006: + message.dimensions[i] = 21006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": + case 21007: + message.dimensions[i] = 21007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": + case 21008: + message.dimensions[i] = 21008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": + case 21009: + message.dimensions[i] = 21009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": + case 21010: + message.dimensions[i] = 21010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": + case 21011: + message.dimensions[i] = 21011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": + case 21012: + message.dimensions[i] = 21012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": + case 21013: + message.dimensions[i] = 21013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": + case 21014: + message.dimensions[i] = 21014; + break; + case "CUSTOM_DIMENSION_0_VALUE_ID": + case 100000: + message.dimensions[i] = 100000; + break; + case "CUSTOM_DIMENSION_1_VALUE_ID": + case 100001: + message.dimensions[i] = 100001; + break; + case "CUSTOM_DIMENSION_2_VALUE_ID": + case 100002: + message.dimensions[i] = 100002; + break; + case "CUSTOM_DIMENSION_3_VALUE_ID": + case 100003: + message.dimensions[i] = 100003; + break; + case "CUSTOM_DIMENSION_4_VALUE_ID": + case 100004: + message.dimensions[i] = 100004; + break; + case "CUSTOM_DIMENSION_5_VALUE_ID": + case 100005: + message.dimensions[i] = 100005; + break; + case "CUSTOM_DIMENSION_6_VALUE_ID": + case 100006: + message.dimensions[i] = 100006; + break; + case "CUSTOM_DIMENSION_7_VALUE_ID": + case 100007: + message.dimensions[i] = 100007; + break; + case "CUSTOM_DIMENSION_8_VALUE_ID": + case 100008: + message.dimensions[i] = 100008; + break; + case "CUSTOM_DIMENSION_9_VALUE_ID": + case 100009: + message.dimensions[i] = 100009; + break; + case "CUSTOM_DIMENSION_0_VALUE": + case 101000: + message.dimensions[i] = 101000; + break; + case "CUSTOM_DIMENSION_1_VALUE": + case 101001: + message.dimensions[i] = 101001; + break; + case "CUSTOM_DIMENSION_2_VALUE": + case 101002: + message.dimensions[i] = 101002; + break; + case "CUSTOM_DIMENSION_3_VALUE": + case 101003: + message.dimensions[i] = 101003; + break; + case "CUSTOM_DIMENSION_4_VALUE": + case 101004: + message.dimensions[i] = 101004; + break; + case "CUSTOM_DIMENSION_5_VALUE": + case 101005: + message.dimensions[i] = 101005; + break; + case "CUSTOM_DIMENSION_6_VALUE": + case 101006: + message.dimensions[i] = 101006; + break; + case "CUSTOM_DIMENSION_7_VALUE": + case 101007: + message.dimensions[i] = 101007; + break; + case "CUSTOM_DIMENSION_8_VALUE": + case 101008: + message.dimensions[i] = 101008; + break; + case "CUSTOM_DIMENSION_9_VALUE": + case 101009: + message.dimensions[i] = 101009; + break; + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + switch (object.metrics[i]) { + default: + if (typeof object.metrics[i] === "number") { + message.metrics[i] = object.metrics[i]; + break; + } + case "METRIC_UNSPECIFIED": + case 0: + message.metrics[i] = 0; + break; + case "ACTIVE_USERS": + case 223: + message.metrics[i] = 223; + break; + case "ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT": + case 445: + message.metrics[i] = 445; + break; + case "ACTIVE_VIEW_AUDIBLE_IMPRESSIONS": + case 659: + message.metrics[i] = 659; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT": + case 446: + message.metrics[i] = 446; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT": + case 447: + message.metrics[i] = 447; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT": + case 448: + message.metrics[i] = 448; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT": + case 449: + message.metrics[i] = 449; + break; + case "ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS": + case 660: + message.metrics[i] = 660; + break; + case "ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS": + case 661: + message.metrics[i] = 661; + break; + case "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 61: + message.metrics[i] = 61; + break; + case "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 58: + message.metrics[i] = 58; + break; + case "ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT": + case 450: + message.metrics[i] = 450; + break; + case "ACTIVE_VIEW_EVER_AUDIBLE_PERCENT": + case 451: + message.metrics[i] = 451; + break; + case "ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT": + case 452: + message.metrics[i] = 452; + break; + case "ACTIVE_VIEW_EVER_MUTED_PERCENT": + case 453: + message.metrics[i] = 453; + break; + case "ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION": + case 411: + message.metrics[i] = 411; + break; + case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 57: + message.metrics[i] = 57; + break; + case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 60: + message.metrics[i] = 60; + break; + case "ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 662: + message.metrics[i] = 662; + break; + case "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 663: + message.metrics[i] = 663; + break; + case "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 664: + message.metrics[i] = 664; + break; + case "ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS": + case 665: + message.metrics[i] = 665; + break; + case "ACTIVE_VIEW_PLUS_MEASURABLE_COUNT": + case 454: + message.metrics[i] = 454; + break; + case "ACTIVE_VIEW_REVENUE": + case 414: + message.metrics[i] = 414; + break; + case "ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 666: + message.metrics[i] = 666; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 56: + message.metrics[i] = 56; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 667: + message.metrics[i] = 667; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 59: + message.metrics[i] = 59; + break; + case "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 73: + message.metrics[i] = 73; + break; + case "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 70: + message.metrics[i] = 70; + break; + case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 69: + message.metrics[i] = 69; + break; + case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 72: + message.metrics[i] = 72; + break; + case "ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 642: + message.metrics[i] = 642; + break; + case "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 643: + message.metrics[i] = 643; + break; + case "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 644: + message.metrics[i] = 644; + break; + case "ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 645: + message.metrics[i] = 645; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 68: + message.metrics[i] = 68; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 646: + message.metrics[i] = 646; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 71: + message.metrics[i] = 71; + break; + case "ADSENSE_AVERAGE_ECPM": + case 26: + message.metrics[i] = 26; + break; + case "ADSENSE_CLICKS": + case 23: + message.metrics[i] = 23; + break; + case "ADSENSE_CTR": + case 24: + message.metrics[i] = 24; + break; + case "ADSENSE_IMPRESSIONS": + case 22: + message.metrics[i] = 22; + break; + case "ADSENSE_PERCENT_CLICKS": + case 28: + message.metrics[i] = 28; + break; + case "ADSENSE_PERCENT_IMPRESSIONS": + case 27: + message.metrics[i] = 27; + break; + case "ADSENSE_PERCENT_REVENUE": + case 29: + message.metrics[i] = 29; + break; + case "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": + case 30: + message.metrics[i] = 30; + break; + case "ADSENSE_RESPONSES_SERVED": + case 41: + message.metrics[i] = 41; + break; + case "ADSENSE_REVENUE": + case 25: + message.metrics[i] = 25; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 79: + message.metrics[i] = 79; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 76: + message.metrics[i] = 76; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 75: + message.metrics[i] = 75; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 78: + message.metrics[i] = 78; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 654: + message.metrics[i] = 654; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 655: + message.metrics[i] = 655; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 656: + message.metrics[i] = 656; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 657: + message.metrics[i] = 657; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 74: + message.metrics[i] = 74; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 658: + message.metrics[i] = 658; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 77: + message.metrics[i] = 77; + break; + case "AD_EXCHANGE_AVERAGE_ECPM": + case 18: + message.metrics[i] = 18; + break; + case "AD_EXCHANGE_CLICKS": + case 15: + message.metrics[i] = 15; + break; + case "AD_EXCHANGE_CPC": + case 244: + message.metrics[i] = 244; + break; + case "AD_EXCHANGE_CTR": + case 16: + message.metrics[i] = 16; + break; + case "AD_EXCHANGE_DELIVERY_RATE": + case 245: + message.metrics[i] = 245; + break; + case "AD_EXCHANGE_IMPRESSIONS": + case 14: + message.metrics[i] = 14; + break; + case "AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER": + case 427: + message.metrics[i] = 427; + break; + case "AD_EXCHANGE_IMPRESSIONS_PER_SESSION": + case 428: + message.metrics[i] = 428; + break; + case "AD_EXCHANGE_LIFT": + case 246: + message.metrics[i] = 246; + break; + case "AD_EXCHANGE_MATCHED_REQUEST_CTR": + case 247: + message.metrics[i] = 247; + break; + case "AD_EXCHANGE_MATCHED_REQUEST_ECPM": + case 248: + message.metrics[i] = 248; + break; + case "AD_EXCHANGE_MATCH_RATE": + case 249: + message.metrics[i] = 249; + break; + case "AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS": + case 250: + message.metrics[i] = 250; + break; + case "AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS": + case 251: + message.metrics[i] = 251; + break; + case "AD_EXCHANGE_PERCENT_CLICKS": + case 20: + message.metrics[i] = 20; + break; + case "AD_EXCHANGE_PERCENT_IMPRESSIONS": + case 19: + message.metrics[i] = 19; + break; + case "AD_EXCHANGE_PERCENT_REVENUE": + case 21: + message.metrics[i] = 21; + break; + case "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": + case 31: + message.metrics[i] = 31; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM": + case 252: + message.metrics[i] = 252; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS": + case 253: + message.metrics[i] = 253; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE": + case 254: + message.metrics[i] = 254; + break; + case "AD_EXCHANGE_RESPONSES_SERVED": + case 42: + message.metrics[i] = 42; + break; + case "AD_EXCHANGE_REVENUE": + case 17: + message.metrics[i] = 17; + break; + case "AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 212: + message.metrics[i] = 212; + break; + case "AD_EXCHANGE_REVENUE_PER_AD_VIEWER": + case 429: + message.metrics[i] = 429; + break; + case "AD_EXCHANGE_TOTAL_REQUESTS": + case 255: + message.metrics[i] = 255; + break; + case "AD_EXCHANGE_TOTAL_REQUEST_CTR": + case 256: + message.metrics[i] = 256; + break; + case "AD_EXCHANGE_TOTAL_REQUEST_ECPM": + case 257: + message.metrics[i] = 257; + break; + case "AD_EXPOSURE_SECONDS": + case 241: + message.metrics[i] = 241; + break; + case "AD_REQUESTS": + case 38: + message.metrics[i] = 38; + break; + case "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 67: + message.metrics[i] = 67; + break; + case "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 64: + message.metrics[i] = 64; + break; + case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 63: + message.metrics[i] = 63; + break; + case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 66: + message.metrics[i] = 66; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 332: + message.metrics[i] = 332; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 331: + message.metrics[i] = 331; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 334: + message.metrics[i] = 334; + break; + case "AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 335: + message.metrics[i] = 335; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 62: + message.metrics[i] = 62; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 333: + message.metrics[i] = 333; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 65: + message.metrics[i] = 65; + break; + case "AD_SERVER_AVERAGE_ECPM": + case 34: + message.metrics[i] = 34; + break; + case "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": + case 10: + message.metrics[i] = 10; + break; + case "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": + case 262: + message.metrics[i] = 262; + break; + case "AD_SERVER_CLICKS": + case 7: + message.metrics[i] = 7; + break; + case "AD_SERVER_COMPLETED_VIEWS": + case 431: + message.metrics[i] = 431; + break; + case "AD_SERVER_COVIEWED_IMPRESSIONS": + case 554: + message.metrics[i] = 554; + break; + case "AD_SERVER_CPD_REVENUE": + case 32: + message.metrics[i] = 32; + break; + case "AD_SERVER_CTR": + case 8: + message.metrics[i] = 8; + break; + case "AD_SERVER_GROSS_REVENUE": + case 483: + message.metrics[i] = 483; + break; + case "AD_SERVER_GROSS_REVENUE_WITHOUT_CPD": + case 484: + message.metrics[i] = 484; + break; + case "AD_SERVER_IMPRESSIONS": + case 6: + message.metrics[i] = 6; + break; + case "AD_SERVER_IMPRESSIONS_WITH_COMPANION": + case 222: + message.metrics[i] = 222; + break; + case "AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": + case 338: + message.metrics[i] = 338; + break; + case "AD_SERVER_PERCENT_CLICKS": + case 12: + message.metrics[i] = 12; + break; + case "AD_SERVER_PERCENT_IMPRESSIONS": + case 11: + message.metrics[i] = 11; + break; + case "AD_SERVER_PERCENT_REVENUE": + case 35: + message.metrics[i] = 35; + break; + case "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": + case 13: + message.metrics[i] = 13; + break; + case "AD_SERVER_RESPONSES_SERVED": + case 40: + message.metrics[i] = 40; + break; + case "AD_SERVER_REVENUE": + case 33: + message.metrics[i] = 33; + break; + case "AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 213: + message.metrics[i] = 213; + break; + case "AD_SERVER_REVENUE_WITHOUT_CPD": + case 9: + message.metrics[i] = 9; + break; + case "AD_SERVER_TARGETED_CLICKS": + case 274: + message.metrics[i] = 274; + break; + case "AD_SERVER_TARGETED_IMPRESSIONS": + case 275: + message.metrics[i] = 275; + break; + case "AD_SERVER_TRACKED_ADS": + case 264: + message.metrics[i] = 264; + break; + case "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": + case 261: + message.metrics[i] = 261; + break; + case "AD_SERVER_UNFILTERED_CLICKS": + case 259: + message.metrics[i] = 259; + break; + case "AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS": + case 260: + message.metrics[i] = 260; + break; + case "AD_SERVER_UNFILTERED_IMPRESSIONS": + case 260: + message.metrics[i] = 260; + break; + case "AD_SERVER_UNFILTERED_TRACKED_ADS": + case 263: + message.metrics[i] = 263; + break; + case "AD_UNIT_EXPOSURE_SECONDS": + case 242: + message.metrics[i] = 242; + break; + case "AD_VIEWERS": + case 425: + message.metrics[i] = 425; + break; + case "ATN_ADS_FAILED_TO_RENDER": + case 430: + message.metrics[i] = 430; + break; + case "ATN_ELIGIBLE_LINE_ITEMS": + case 342: + message.metrics[i] = 342; + break; + case "ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS": + case 343: + message.metrics[i] = 343; + break; + case "ATN_HBT_ALLOWED_AD_REQUESTS": + case 344: + message.metrics[i] = 344; + break; + case "ATN_HBT_BIDS_IN_AUCTION": + case 345: + message.metrics[i] = 345; + break; + case "ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS": + case 346: + message.metrics[i] = 346; + break; + case "ATN_HBT_CANDIDATE_BIDS": + case 347: + message.metrics[i] = 347; + break; + case "ATN_HBT_INVALID_AD_REQUESTS": + case 348: + message.metrics[i] = 348; + break; + case "ATN_HBT_NO_BIDS_AD_REQUESTS": + case 472: + message.metrics[i] = 472; + break; + case "ATN_HBT_REJECTED_BIDS": + case 349: + message.metrics[i] = 349; + break; + case "ATN_HBT_VALID_AD_REQUESTS": + case 350: + message.metrics[i] = 350; + break; + case "ATN_HBT_WITH_BIDS_AD_REQUESTS": + case 473: + message.metrics[i] = 473; + break; + case "ATN_INVALID_AD_REQUESTS": + case 351: + message.metrics[i] = 351; + break; + case "ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED": + case 476: + message.metrics[i] = 476; + break; + case "ATN_LINE_ITEMS_IN_AUCTION": + case 352: + message.metrics[i] = 352; + break; + case "ATN_LINE_ITEMS_NOT_COMPETING": + case 515: + message.metrics[i] = 515; + break; + case "ATN_LINE_ITEMS_NOT_SELECTED": + case 353: + message.metrics[i] = 353; + break; + case "ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS": + case 354: + message.metrics[i] = 354; + break; + case "ATN_LINE_ITEM_TARGETED_AD_REQUESTS": + case 355: + message.metrics[i] = 355; + break; + case "ATN_MEDIATION_ALLOWED_AD_REQUESTS": + case 356: + message.metrics[i] = 356; + break; + case "ATN_MEDIATION_INVALID_AD_REQUESTS": + case 357: + message.metrics[i] = 357; + break; + case "ATN_MEDIATION_LOADED_ADS_FROM_CHAINS": + case 358: + message.metrics[i] = 358; + break; + case "ATN_MEDIATION_NO_PARTNER_AD_REQUESTS": + case 474: + message.metrics[i] = 474; + break; + case "ATN_MEDIATION_PARTNERS_IN_AUCTION": + case 359: + message.metrics[i] = 359; + break; + case "ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS": + case 360: + message.metrics[i] = 360; + break; + case "ATN_MEDIATION_REJECTED_PARTNERS": + case 361: + message.metrics[i] = 361; + break; + case "ATN_MEDIATION_TARGETED_PARTNERS": + case 362: + message.metrics[i] = 362; + break; + case "ATN_MEDIATION_TOTAL_YIELD_PARTNERS": + case 442: + message.metrics[i] = 442; + break; + case "ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS": + case 363: + message.metrics[i] = 363; + break; + case "ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS": + case 364: + message.metrics[i] = 364; + break; + case "ATN_MEDIATION_VALID_AD_REQUESTS": + case 365: + message.metrics[i] = 365; + break; + case "ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS": + case 475: + message.metrics[i] = 475; + break; + case "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS": + case 366: + message.metrics[i] = 366; + break; + case "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT": + case 367: + message.metrics[i] = 367; + break; + case "ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS": + case 368: + message.metrics[i] = 368; + break; + case "ATN_PROGRAMMATIC_BIDS_IN_AUCTION": + case 369: + message.metrics[i] = 369; + break; + case "ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS": + case 370: + message.metrics[i] = 370; + break; + case "ATN_PROGRAMMATIC_BID_REQUESTS_SENT": + case 371: + message.metrics[i] = 371; + break; + case "ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE": + case 372: + message.metrics[i] = 372; + break; + case "ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES": + case 373: + message.metrics[i] = 373; + break; + case "ATN_PROGRAMMATIC_BID_REQUEST_ERRORS": + case 374: + message.metrics[i] = 374; + break; + case "ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS": + case 375: + message.metrics[i] = 375; + break; + case "ATN_PROGRAMMATIC_REJECTED_BIDS": + case 376: + message.metrics[i] = 376; + break; + case "ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS": + case 377: + message.metrics[i] = 377; + break; + case "ATN_PROGRAMMATIC_TOTAL_BIDS": + case 378: + message.metrics[i] = 378; + break; + case "ATN_PROGRAMMATIC_VALID_AD_REQUESTS": + case 379: + message.metrics[i] = 379; + break; + case "ATN_REJECTED_LINE_ITEMS": + case 380: + message.metrics[i] = 380; + break; + case "ATN_SERVED_MEDIATION_CHAINS": + case 381: + message.metrics[i] = 381; + break; + case "ATN_SERVED_SINGLE_ADS": + case 382: + message.metrics[i] = 382; + break; + case "ATN_TARGETED_LINE_ITEMS": + case 383: + message.metrics[i] = 383; + break; + case "ATN_TOTAL_AD_REQUESTS": + case 384: + message.metrics[i] = 384; + break; + case "ATN_TOTAL_COMPETING_ADS_IN_AUCTION": + case 385: + message.metrics[i] = 385; + break; + case "ATN_TOTAL_LOADED_ADS": + case 387: + message.metrics[i] = 387; + break; + case "ATN_VALID_AD_REQUESTS": + case 389: + message.metrics[i] = 389; + break; + case "ATN_YIELD_GROUP_MEDIATION_PASSBACKS": + case 390: + message.metrics[i] = 390; + break; + case "AVERAGE_ECPM": + case 37: + message.metrics[i] = 37; + break; + case "AVERAGE_ECPM_WITHOUT_CPD": + case 5: + message.metrics[i] = 5; + break; + case "AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION": + case 224: + message.metrics[i] = 224; + break; + case "AVERAGE_ENGAGEMENT_SECONDS_PER_USER": + case 225: + message.metrics[i] = 225; + break; + case "AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR": + case 418: + message.metrics[i] = 418; + break; + case "AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER": + case 226: + message.metrics[i] = 226; + break; + case "AVERAGE_REVENUE_PER_USER": + case 227: + message.metrics[i] = 227; + break; + case "AVERAGE_SESSION_SECONDS": + case 228: + message.metrics[i] = 228; + break; + case "BIDS": + case 443: + message.metrics[i] = 443; + break; + case "BID_AVERAGE_CPM": + case 444: + message.metrics[i] = 444; + break; + case "BOUNCE_RATE": + case 433: + message.metrics[i] = 433; + break; + case "CLICKS": + case 2: + message.metrics[i] = 2; + break; + case "CODE_SERVED_COUNT": + case 44: + message.metrics[i] = 44; + break; + case "CPC_REVENUE": + case 440: + message.metrics[i] = 440; + break; + case "CPM_REVENUE": + case 441: + message.metrics[i] = 441; + break; + case "CREATIVE_LOAD_TIME_0_500_PERCENT": + case 324: + message.metrics[i] = 324; + break; + case "CREATIVE_LOAD_TIME_1000_2000_PERCENT": + case 326: + message.metrics[i] = 326; + break; + case "CREATIVE_LOAD_TIME_2000_4000_PERCENT": + case 327: + message.metrics[i] = 327; + break; + case "CREATIVE_LOAD_TIME_4000_8000_PERCENT": + case 328: + message.metrics[i] = 328; + break; + case "CREATIVE_LOAD_TIME_500_1000_PERCENT": + case 325: + message.metrics[i] = 325; + break; + case "CREATIVE_LOAD_TIME_GT_8000_PERCENT": + case 329: + message.metrics[i] = 329; + break; + case "CTR": + case 3: + message.metrics[i] = 3; + break; + case "DEALS_BIDS": + case 542: + message.metrics[i] = 542; + break; + case "DEALS_BID_RATE": + case 543: + message.metrics[i] = 543; + break; + case "DEALS_BID_REQUESTS": + case 544: + message.metrics[i] = 544; + break; + case "DEALS_WINNING_BIDS": + case 545: + message.metrics[i] = 545; + break; + case "DEALS_WIN_RATE": + case 546: + message.metrics[i] = 546; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": + case 521: + message.metrics[i] = 521; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": + case 522: + message.metrics[i] = 522; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": + case 523: + message.metrics[i] = 523; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": + case 524: + message.metrics[i] = 524; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": + case 525: + message.metrics[i] = 525; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": + case 520: + message.metrics[i] = 520; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT": + case 526: + message.metrics[i] = 526; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT": + case 527: + message.metrics[i] = 527; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT": + case 528: + message.metrics[i] = 528; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT": + case 529: + message.metrics[i] = 529; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT": + case 531: + message.metrics[i] = 531; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT": + case 530: + message.metrics[i] = 530; + break; + case "DROPOFF_RATE": + case 415: + message.metrics[i] = 415; + break; + case "ENGAGED_SESSIONS": + case 229: + message.metrics[i] = 229; + break; + case "ENGAGED_SESSIONS_PER_USER": + case 230: + message.metrics[i] = 230; + break; + case "ENGAGEMENT_RATE": + case 426: + message.metrics[i] = 426; + break; + case "EUROPEAN_REGULATIONS_CONSENT_RATE": + case 270: + message.metrics[i] = 270; + break; + case "EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE": + case 271: + message.metrics[i] = 271; + break; + case "EUROPEAN_REGULATIONS_MESSAGES_SHOWN": + case 272: + message.metrics[i] = 272; + break; + case "EUROPEAN_REGULATIONS_NO_CONSENT_RATE": + case 273: + message.metrics[i] = 273; + break; + case "FILL_RATE": + case 258: + message.metrics[i] = 258; + break; + case "GOOGLE_ANALYTICS_CLICKS": + case 231: + message.metrics[i] = 231; + break; + case "GOOGLE_ANALYTICS_CTR": + case 232: + message.metrics[i] = 232; + break; + case "GOOGLE_ANALYTICS_ECPM": + case 233: + message.metrics[i] = 233; + break; + case "GOOGLE_ANALYTICS_IMPRESSIONS": + case 234: + message.metrics[i] = 234; + break; + case "GOOGLE_ANALYTICS_REVENUE": + case 235: + message.metrics[i] = 235; + break; + case "GOOGLE_ANALYTICS_VIEWS": + case 236: + message.metrics[i] = 236; + break; + case "GOOGLE_ANALYTICS_VIEWS_PER_USER": + case 237: + message.metrics[i] = 237; + break; + case "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": + case 129: + message.metrics[i] = 129; + break; + case "GOOGLE_SOLD_AUCTION_IMPRESSIONS": + case 128: + message.metrics[i] = 128; + break; + case "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": + case 131: + message.metrics[i] = 131; + break; + case "GOOGLE_SOLD_IMPRESSIONS": + case 130: + message.metrics[i] = 130; + break; + case "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": + case 127: + message.metrics[i] = 127; + break; + case "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": + case 126: + message.metrics[i] = 126; + break; + case "IMPRESSIONS": + case 1: + message.metrics[i] = 1; + break; + case "INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": + case 407: + message.metrics[i] = 407; + break; + case "INVENTORY_SHARES": + case 547: + message.metrics[i] = 547; + break; + case "INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES": + case 548: + message.metrics[i] = 548; + break; + case "INVOICED_IMPRESSIONS": + case 404: + message.metrics[i] = 404; + break; + case "INVOICED_UNFILLED_IMPRESSIONS": + case 405: + message.metrics[i] = 405; + break; + case "MEDIATION_CHAINS_FILLED": + case 584: + message.metrics[i] = 584; + break; + case "MUTED_IMPRESSIONS": + case 412: + message.metrics[i] = 412; + break; + case "MUTE_ELIGIBLE_IMPRESSIONS": + case 409: + message.metrics[i] = 409; + break; + case "OPPORTUNITIES": + case 463: + message.metrics[i] = 463; + break; + case "OVERDELIVERED_IMPRESSIONS": + case 432: + message.metrics[i] = 432; + break; + case "PARTNER_SALES_FILLED_POD_REQUESTS": + case 135: + message.metrics[i] = 135; + break; + case "PARTNER_SALES_FILL_RATE": + case 136: + message.metrics[i] = 136; + break; + case "PARTNER_SALES_PARTNER_MATCH_RATE": + case 137: + message.metrics[i] = 137; + break; + case "PARTNER_SALES_QUERIES": + case 132: + message.metrics[i] = 132; + break; + case "PARTNER_SALES_UNFILLED_IMPRESSIONS": + case 133: + message.metrics[i] = 133; + break; + case "PARTNER_SALES_UNMATCHED_QUERIES": + case 134: + message.metrics[i] = 134; + break; + case "PARTNER_SOLD_CODE_SERVED": + case 125: + message.metrics[i] = 125; + break; + case "PARTNER_SOLD_COVIEWED_IMPRESSIONS": + case 124: + message.metrics[i] = 124; + break; + case "PARTNER_SOLD_IMPRESSIONS": + case 123: + message.metrics[i] = 123; + break; + case "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": + case 177: + message.metrics[i] = 177; + break; + case "PROGRAMMATIC_MATCH_RATE": + case 178: + message.metrics[i] = 178; + break; + case "PROGRAMMATIC_RESPONSES_SERVED": + case 176: + message.metrics[i] = 176; + break; + case "REACH_IMPRESSIONS": + case 416: + message.metrics[i] = 416; + break; + case "RESPONSES_SERVED": + case 39: + message.metrics[i] = 39; + break; + case "RETENTION": + case 238: + message.metrics[i] = 238; + break; + case "REVENUE": + case 36: + message.metrics[i] = 36; + break; + case "REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 214: + message.metrics[i] = 214; + break; + case "REVENUE_WITHOUT_CPD": + case 4: + message.metrics[i] = 4; + break; + case "REWARDS_GRANTED": + case 413: + message.metrics[i] = 413; + break; + case "RICH_MEDIA_AVERAGE_DISPLAY_TIME": + case 587: + message.metrics[i] = 587; + break; + case "RICH_MEDIA_AVERAGE_INTERACTION_TIME": + case 588: + message.metrics[i] = 588; + break; + case "RICH_MEDIA_BACKUP_IMAGES": + case 589: + message.metrics[i] = 589; + break; + case "RICH_MEDIA_CUSTOM_EVENT_COUNT": + case 599: + message.metrics[i] = 599; + break; + case "RICH_MEDIA_CUSTOM_EVENT_TIME": + case 600: + message.metrics[i] = 600; + break; + case "RICH_MEDIA_DISPLAY_TIME": + case 590: + message.metrics[i] = 590; + break; + case "RICH_MEDIA_EXPANDING_TIME": + case 591: + message.metrics[i] = 591; + break; + case "RICH_MEDIA_EXPANSIONS": + case 592: + message.metrics[i] = 592; + break; + case "RICH_MEDIA_FULL_SCREEN_IMPRESSIONS": + case 593: + message.metrics[i] = 593; + break; + case "RICH_MEDIA_INTERACTION_COUNT": + case 594: + message.metrics[i] = 594; + break; + case "RICH_MEDIA_INTERACTION_RATE": + case 595: + message.metrics[i] = 595; + break; + case "RICH_MEDIA_INTERACTION_TIME": + case 596: + message.metrics[i] = 596; + break; + case "RICH_MEDIA_INTERACTIVE_IMPRESSIONS": + case 597: + message.metrics[i] = 597; + break; + case "RICH_MEDIA_MANUAL_CLOSES": + case 598: + message.metrics[i] = 598; + break; + case "RICH_MEDIA_VIDEO_COMPLETES": + case 503: + message.metrics[i] = 503; + break; + case "RICH_MEDIA_VIDEO_INTERACTIONS": + case 505: + message.metrics[i] = 505; + break; + case "RICH_MEDIA_VIDEO_INTERACTION_RATE": + case 504: + message.metrics[i] = 504; + break; + case "RICH_MEDIA_VIDEO_MIDPOINTS": + case 506: + message.metrics[i] = 506; + break; + case "RICH_MEDIA_VIDEO_MUTES": + case 507: + message.metrics[i] = 507; + break; + case "RICH_MEDIA_VIDEO_PAUSES": + case 508: + message.metrics[i] = 508; + break; + case "RICH_MEDIA_VIDEO_PLAYS": + case 509: + message.metrics[i] = 509; + break; + case "RICH_MEDIA_VIDEO_REPLAYS": + case 510: + message.metrics[i] = 510; + break; + case "RICH_MEDIA_VIDEO_STOPS": + case 511: + message.metrics[i] = 511; + break; + case "RICH_MEDIA_VIDEO_UNMUTES": + case 512: + message.metrics[i] = 512; + break; + case "RICH_MEDIA_VIDEO_VIEW_RATE": + case 513: + message.metrics[i] = 513; + break; + case "RICH_MEDIA_VIDEO_VIEW_TIME": + case 514: + message.metrics[i] = 514; + break; + case "SELL_THROUGH_AVAILABLE_IMPRESSIONS": + case 477: + message.metrics[i] = 477; + break; + case "SELL_THROUGH_FORECASTED_IMPRESSIONS": + case 478: + message.metrics[i] = 478; + break; + case "SELL_THROUGH_RESERVED_IMPRESSIONS": + case 479: + message.metrics[i] = 479; + break; + case "SELL_THROUGH_SELL_THROUGH_RATE": + case 480: + message.metrics[i] = 480; + break; + case "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": + case 434: + message.metrics[i] = 434; + break; + case "SERVER_SIDE_UNWRAPPING_CALLOUTS": + case 435: + message.metrics[i] = 435; + break; + case "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": + case 436: + message.metrics[i] = 436; + break; + case "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": + case 437: + message.metrics[i] = 437; + break; + case "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": + case 438: + message.metrics[i] = 438; + break; + case "SERVER_SIDE_UNWRAPPING_TIMEOUTS": + case 439: + message.metrics[i] = 439; + break; + case "SESSIONS": + case 239: + message.metrics[i] = 239; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": + case 455: + message.metrics[i] = 455; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": + case 457: + message.metrics[i] = 457; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": + case 458: + message.metrics[i] = 458; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": + case 459: + message.metrics[i] = 459; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": + case 456: + message.metrics[i] = 456; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": + case 460: + message.metrics[i] = 460; + break; + case "TARGETED_CLICKS": + case 276: + message.metrics[i] = 276; + break; + case "TARGETED_IMPRESSIONS": + case 277: + message.metrics[i] = 277; + break; + case "UNFILLED_IMPRESSIONS": + case 45: + message.metrics[i] = 45; + break; + case "UNIQUE_VISITORS": + case 417: + message.metrics[i] = 417; + break; + case "UNLOADED_IMPRESSIONS_DUE_TO_CPU": + case 408: + message.metrics[i] = 408; + break; + case "UNLOADED_IMPRESSIONS_DUE_TO_NETWORK": + case 406: + message.metrics[i] = 406; + break; + case "UNMATCHED_AD_REQUESTS": + case 43: + message.metrics[i] = 43; + break; + case "UNVIEWED_REASON_OTHER_PERCENT": + case 550: + message.metrics[i] = 550; + break; + case "UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT": + case 553: + message.metrics[i] = 553; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT": + case 551: + message.metrics[i] = 551; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT": + case 552: + message.metrics[i] = 552; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT": + case 549: + message.metrics[i] = 549; + break; + case "USER_ENGAGEMENT_DURATION_IN_SECONDS": + case 240: + message.metrics[i] = 240; + break; + case "USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE": + case 486: + message.metrics[i] = 486; + break; + case "USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT": + case 487: + message.metrics[i] = 487; + break; + case "USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN": + case 488: + message.metrics[i] = 488; + break; + case "USER_MESSAGES_ALLOW_ADS_PAGEVIEWS": + case 489: + message.metrics[i] = 489; + break; + case "USER_MESSAGES_CCPA_MESSAGES_SHOWN": + case 490: + message.metrics[i] = 490; + break; + case "USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN": + case 491: + message.metrics[i] = 491; + break; + case "USER_MESSAGES_IDFA_ATT_CONSENT": + case 492: + message.metrics[i] = 492; + break; + case "USER_MESSAGES_IDFA_ATT_CONSENT_RATE": + case 493: + message.metrics[i] = 493; + break; + case "USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT": + case 494: + message.metrics[i] = 494; + break; + case "USER_MESSAGES_IDFA_ATT_DECLINE_RATE": + case 495: + message.metrics[i] = 495; + break; + case "USER_MESSAGES_IDFA_EXPLAINERS_SHOWN": + case 496: + message.metrics[i] = 496; + break; + case "USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN": + case 497: + message.metrics[i] = 497; + break; + case "USER_MESSAGES_IDFA_NO_DECISION": + case 498: + message.metrics[i] = 498; + break; + case "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": + case 121: + message.metrics[i] = 121; + break; + case "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": + case 122: + message.metrics[i] = 122; + break; + case "USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS": + case 499: + message.metrics[i] = 499; + break; + case "USER_MESSAGES_TOTAL_ESTIMATED_REVENUE": + case 500: + message.metrics[i] = 500; + break; + case "USER_MESSAGES_UPTC_MESSAGES_SHOWN": + case 501: + message.metrics[i] = 501; + break; + case "USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO": + case 502: + message.metrics[i] = 502; + break; + case "VIDEO_ERROR_100_COUNT": + case 180: + message.metrics[i] = 180; + break; + case "VIDEO_ERROR_101_COUNT": + case 181: + message.metrics[i] = 181; + break; + case "VIDEO_ERROR_102_COUNT": + case 182: + message.metrics[i] = 182; + break; + case "VIDEO_ERROR_200_COUNT": + case 183: + message.metrics[i] = 183; + break; + case "VIDEO_ERROR_201_COUNT": + case 184: + message.metrics[i] = 184; + break; + case "VIDEO_ERROR_202_COUNT": + case 185: + message.metrics[i] = 185; + break; + case "VIDEO_ERROR_203_COUNT": + case 186: + message.metrics[i] = 186; + break; + case "VIDEO_ERROR_300_COUNT": + case 187: + message.metrics[i] = 187; + break; + case "VIDEO_ERROR_301_COUNT": + case 188: + message.metrics[i] = 188; + break; + case "VIDEO_ERROR_302_COUNT": + case 189: + message.metrics[i] = 189; + break; + case "VIDEO_ERROR_303_COUNT": + case 190: + message.metrics[i] = 190; + break; + case "VIDEO_ERROR_400_COUNT": + case 191: + message.metrics[i] = 191; + break; + case "VIDEO_ERROR_401_COUNT": + case 192: + message.metrics[i] = 192; + break; + case "VIDEO_ERROR_402_COUNT": + case 193: + message.metrics[i] = 193; + break; + case "VIDEO_ERROR_403_COUNT": + case 194: + message.metrics[i] = 194; + break; + case "VIDEO_ERROR_405_COUNT": + case 195: + message.metrics[i] = 195; + break; + case "VIDEO_ERROR_406_COUNT": + case 196: + message.metrics[i] = 196; + break; + case "VIDEO_ERROR_407_COUNT": + case 197: + message.metrics[i] = 197; + break; + case "VIDEO_ERROR_408_COUNT": + case 198: + message.metrics[i] = 198; + break; + case "VIDEO_ERROR_409_COUNT": + case 199: + message.metrics[i] = 199; + break; + case "VIDEO_ERROR_410_COUNT": + case 200: + message.metrics[i] = 200; + break; + case "VIDEO_ERROR_500_COUNT": + case 201: + message.metrics[i] = 201; + break; + case "VIDEO_ERROR_501_COUNT": + case 202: + message.metrics[i] = 202; + break; + case "VIDEO_ERROR_502_COUNT": + case 203: + message.metrics[i] = 203; + break; + case "VIDEO_ERROR_503_COUNT": + case 204: + message.metrics[i] = 204; + break; + case "VIDEO_ERROR_600_COUNT": + case 205: + message.metrics[i] = 205; + break; + case "VIDEO_ERROR_601_COUNT": + case 206: + message.metrics[i] = 206; + break; + case "VIDEO_ERROR_602_COUNT": + case 207: + message.metrics[i] = 207; + break; + case "VIDEO_ERROR_603_COUNT": + case 208: + message.metrics[i] = 208; + break; + case "VIDEO_ERROR_604_COUNT": + case 209: + message.metrics[i] = 209; + break; + case "VIDEO_ERROR_900_COUNT": + case 210: + message.metrics[i] = 210; + break; + case "VIDEO_ERROR_901_COUNT": + case 211: + message.metrics[i] = 211; + break; + case "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": + case 92: + message.metrics[i] = 92; + break; + case "VIDEO_INTERACTION_COLLAPSES": + case 93: + message.metrics[i] = 93; + break; + case "VIDEO_INTERACTION_EXPANDS": + case 95: + message.metrics[i] = 95; + break; + case "VIDEO_INTERACTION_FULL_SCREENS": + case 96: + message.metrics[i] = 96; + break; + case "VIDEO_INTERACTION_MUTES": + case 97: + message.metrics[i] = 97; + break; + case "VIDEO_INTERACTION_PAUSES": + case 98: + message.metrics[i] = 98; + break; + case "VIDEO_INTERACTION_RESUMES": + case 99: + message.metrics[i] = 99; + break; + case "VIDEO_INTERACTION_REWINDS": + case 100: + message.metrics[i] = 100; + break; + case "VIDEO_INTERACTION_UNMUTES": + case 101: + message.metrics[i] = 101; + break; + case "VIDEO_INTERACTION_VIDEO_SKIPS": + case 102: + message.metrics[i] = 102; + break; + case "VIDEO_MONETIZABLE_CONTENT_VIEWS": + case 601: + message.metrics[i] = 601; + break; + case "VIDEO_REAL_TIME_CREATIVE_SERVES": + case 139: + message.metrics[i] = 139; + break; + case "VIDEO_REAL_TIME_ERROR_100_COUNT": + case 143: + message.metrics[i] = 143; + break; + case "VIDEO_REAL_TIME_ERROR_101_COUNT": + case 144: + message.metrics[i] = 144; + break; + case "VIDEO_REAL_TIME_ERROR_102_COUNT": + case 145: + message.metrics[i] = 145; + break; + case "VIDEO_REAL_TIME_ERROR_200_COUNT": + case 146: + message.metrics[i] = 146; + break; + case "VIDEO_REAL_TIME_ERROR_201_COUNT": + case 147: + message.metrics[i] = 147; + break; + case "VIDEO_REAL_TIME_ERROR_202_COUNT": + case 148: + message.metrics[i] = 148; + break; + case "VIDEO_REAL_TIME_ERROR_203_COUNT": + case 149: + message.metrics[i] = 149; + break; + case "VIDEO_REAL_TIME_ERROR_300_COUNT": + case 150: + message.metrics[i] = 150; + break; + case "VIDEO_REAL_TIME_ERROR_301_COUNT": + case 151: + message.metrics[i] = 151; + break; + case "VIDEO_REAL_TIME_ERROR_302_COUNT": + case 152: + message.metrics[i] = 152; + break; + case "VIDEO_REAL_TIME_ERROR_303_COUNT": + case 153: + message.metrics[i] = 153; + break; + case "VIDEO_REAL_TIME_ERROR_400_COUNT": + case 154: + message.metrics[i] = 154; + break; + case "VIDEO_REAL_TIME_ERROR_401_COUNT": + case 155: + message.metrics[i] = 155; + break; + case "VIDEO_REAL_TIME_ERROR_402_COUNT": + case 156: + message.metrics[i] = 156; + break; + case "VIDEO_REAL_TIME_ERROR_403_COUNT": + case 157: + message.metrics[i] = 157; + break; + case "VIDEO_REAL_TIME_ERROR_405_COUNT": + case 158: + message.metrics[i] = 158; + break; + case "VIDEO_REAL_TIME_ERROR_406_COUNT": + case 159: + message.metrics[i] = 159; + break; + case "VIDEO_REAL_TIME_ERROR_407_COUNT": + case 160: + message.metrics[i] = 160; + break; + case "VIDEO_REAL_TIME_ERROR_408_COUNT": + case 161: + message.metrics[i] = 161; + break; + case "VIDEO_REAL_TIME_ERROR_409_COUNT": + case 162: + message.metrics[i] = 162; + break; + case "VIDEO_REAL_TIME_ERROR_410_COUNT": + case 163: + message.metrics[i] = 163; + break; + case "VIDEO_REAL_TIME_ERROR_500_COUNT": + case 164: + message.metrics[i] = 164; + break; + case "VIDEO_REAL_TIME_ERROR_501_COUNT": + case 165: + message.metrics[i] = 165; + break; + case "VIDEO_REAL_TIME_ERROR_502_COUNT": + case 166: + message.metrics[i] = 166; + break; + case "VIDEO_REAL_TIME_ERROR_503_COUNT": + case 167: + message.metrics[i] = 167; + break; + case "VIDEO_REAL_TIME_ERROR_600_COUNT": + case 168: + message.metrics[i] = 168; + break; + case "VIDEO_REAL_TIME_ERROR_601_COUNT": + case 169: + message.metrics[i] = 169; + break; + case "VIDEO_REAL_TIME_ERROR_602_COUNT": + case 170: + message.metrics[i] = 170; + break; + case "VIDEO_REAL_TIME_ERROR_603_COUNT": + case 171: + message.metrics[i] = 171; + break; + case "VIDEO_REAL_TIME_ERROR_604_COUNT": + case 172: + message.metrics[i] = 172; + break; + case "VIDEO_REAL_TIME_ERROR_900_COUNT": + case 173: + message.metrics[i] = 173; + break; + case "VIDEO_REAL_TIME_ERROR_901_COUNT": + case 174: + message.metrics[i] = 174; + break; + case "VIDEO_REAL_TIME_IMPRESSIONS": + case 138: + message.metrics[i] = 138; + break; + case "VIDEO_REAL_TIME_MATCHED_QUERIES": + case 140: + message.metrics[i] = 140; + break; + case "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": + case 175: + message.metrics[i] = 175; + break; + case "VIDEO_REAL_TIME_TOTAL_QUERIES": + case 142: + message.metrics[i] = 142; + break; + case "VIDEO_REAL_TIME_UNMATCHED_QUERIES": + case 141: + message.metrics[i] = 141; + break; + case "VIDEO_VIEWERSHIP_AUTO_PLAYS": + case 103: + message.metrics[i] = 103; + break; + case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": + case 104: + message.metrics[i] = 104; + break; + case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": + case 105: + message.metrics[i] = 105; + break; + case "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": + case 106: + message.metrics[i] = 106; + break; + case "VIDEO_VIEWERSHIP_COMPLETES": + case 107: + message.metrics[i] = 107; + break; + case "VIDEO_VIEWERSHIP_COMPLETION_RATE": + case 108: + message.metrics[i] = 108; + break; + case "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": + case 109: + message.metrics[i] = 109; + break; + case "VIDEO_VIEWERSHIP_FIRST_QUARTILES": + case 110: + message.metrics[i] = 110; + break; + case "VIDEO_VIEWERSHIP_MIDPOINTS": + case 111: + message.metrics[i] = 111; + break; + case "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": + case 112: + message.metrics[i] = 112; + break; + case "VIDEO_VIEWERSHIP_STARTS": + case 113: + message.metrics[i] = 113; + break; + case "VIDEO_VIEWERSHIP_THIRD_QUARTILES": + case 114: + message.metrics[i] = 114; + break; + case "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": + case 115: + message.metrics[i] = 115; + break; + case "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": + case 94: + message.metrics[i] = 94; + break; + case "VIDEO_VIEWERSHIP_VIDEO_LENGTH": + case 116: + message.metrics[i] = 116; + break; + case "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": + case 117: + message.metrics[i] = 117; + break; + case "YIELD_GROUP_AUCTIONS_WON": + case 80: + message.metrics[i] = 80; + break; + case "YIELD_GROUP_BIDS": + case 81: + message.metrics[i] = 81; + break; + case "YIELD_GROUP_BIDS_IN_AUCTION": + case 82: + message.metrics[i] = 82; + break; + case "YIELD_GROUP_CALLOUTS": + case 83: + message.metrics[i] = 83; + break; + case "YIELD_GROUP_ESTIMATED_CPM": + case 88: + message.metrics[i] = 88; + break; + case "YIELD_GROUP_ESTIMATED_REVENUE": + case 87: + message.metrics[i] = 87; + break; + case "YIELD_GROUP_IMPRESSIONS": + case 85: + message.metrics[i] = 85; + break; + case "YIELD_GROUP_MEDIATION_FILL_RATE": + case 89: + message.metrics[i] = 89; + break; + case "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": + case 86: + message.metrics[i] = 86; + break; + case "YIELD_GROUP_MEDIATION_PASSBACKS": + case 118: + message.metrics[i] = 118; + break; + case "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": + case 90: + message.metrics[i] = 90; + break; + case "YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 215: + message.metrics[i] = 215; + break; + case "YIELD_GROUP_SUCCESSFUL_RESPONSES": + case 84: + message.metrics[i] = 84; + break; + } + } + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.filters: object expected"); + message.filters[i] = $root.google.ads.admanager.v1.ReportDefinition.Filter.fromObject(object.filters[i]); + } + } + switch (object.timeZoneSource) { + default: + if (typeof object.timeZoneSource === "number") { + message.timeZoneSource = object.timeZoneSource; + break; + } + break; + case "TIME_ZONE_SOURCE_UNSPECIFIED": + case 0: + message.timeZoneSource = 0; + break; + case "PUBLISHER": + case 1: + message.timeZoneSource = 1; + break; + case "AD_EXCHANGE": + case 2: + message.timeZoneSource = 2; + break; + case "UTC": + case 3: + message.timeZoneSource = 3; + break; + case "PROVIDED": + case 4: + message.timeZoneSource = 4; + break; + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.dateRange: object expected"); + message.dateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.fromObject(object.dateRange); + } + if (object.comparisonDateRange != null) { + if (typeof object.comparisonDateRange !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.comparisonDateRange: object expected"); + message.comparisonDateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.fromObject(object.comparisonDateRange); + } + if (object.customDimensionKeyIds) { + if (!Array.isArray(object.customDimensionKeyIds)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.customDimensionKeyIds: array expected"); + message.customDimensionKeyIds = []; + for (var i = 0; i < object.customDimensionKeyIds.length; ++i) + if ($util.Long) + (message.customDimensionKeyIds[i] = $util.Long.fromValue(object.customDimensionKeyIds[i])).unsigned = false; + else if (typeof object.customDimensionKeyIds[i] === "string") + message.customDimensionKeyIds[i] = parseInt(object.customDimensionKeyIds[i], 10); + else if (typeof object.customDimensionKeyIds[i] === "number") + message.customDimensionKeyIds[i] = object.customDimensionKeyIds[i]; + else if (typeof object.customDimensionKeyIds[i] === "object") + message.customDimensionKeyIds[i] = new $util.LongBits(object.customDimensionKeyIds[i].low >>> 0, object.customDimensionKeyIds[i].high >>> 0).toNumber(); + } + if (object.lineItemCustomFieldIds) { + if (!Array.isArray(object.lineItemCustomFieldIds)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.lineItemCustomFieldIds: array expected"); + message.lineItemCustomFieldIds = []; + for (var i = 0; i < object.lineItemCustomFieldIds.length; ++i) + if ($util.Long) + (message.lineItemCustomFieldIds[i] = $util.Long.fromValue(object.lineItemCustomFieldIds[i])).unsigned = false; + else if (typeof object.lineItemCustomFieldIds[i] === "string") + message.lineItemCustomFieldIds[i] = parseInt(object.lineItemCustomFieldIds[i], 10); + else if (typeof object.lineItemCustomFieldIds[i] === "number") + message.lineItemCustomFieldIds[i] = object.lineItemCustomFieldIds[i]; + else if (typeof object.lineItemCustomFieldIds[i] === "object") + message.lineItemCustomFieldIds[i] = new $util.LongBits(object.lineItemCustomFieldIds[i].low >>> 0, object.lineItemCustomFieldIds[i].high >>> 0).toNumber(); + } + if (object.orderCustomFieldIds) { + if (!Array.isArray(object.orderCustomFieldIds)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.orderCustomFieldIds: array expected"); + message.orderCustomFieldIds = []; + for (var i = 0; i < object.orderCustomFieldIds.length; ++i) + if ($util.Long) + (message.orderCustomFieldIds[i] = $util.Long.fromValue(object.orderCustomFieldIds[i])).unsigned = false; + else if (typeof object.orderCustomFieldIds[i] === "string") + message.orderCustomFieldIds[i] = parseInt(object.orderCustomFieldIds[i], 10); + else if (typeof object.orderCustomFieldIds[i] === "number") + message.orderCustomFieldIds[i] = object.orderCustomFieldIds[i]; + else if (typeof object.orderCustomFieldIds[i] === "object") + message.orderCustomFieldIds[i] = new $util.LongBits(object.orderCustomFieldIds[i].low >>> 0, object.orderCustomFieldIds[i].high >>> 0).toNumber(); + } + if (object.creativeCustomFieldIds) { + if (!Array.isArray(object.creativeCustomFieldIds)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.creativeCustomFieldIds: array expected"); + message.creativeCustomFieldIds = []; + for (var i = 0; i < object.creativeCustomFieldIds.length; ++i) + if ($util.Long) + (message.creativeCustomFieldIds[i] = $util.Long.fromValue(object.creativeCustomFieldIds[i])).unsigned = false; + else if (typeof object.creativeCustomFieldIds[i] === "string") + message.creativeCustomFieldIds[i] = parseInt(object.creativeCustomFieldIds[i], 10); + else if (typeof object.creativeCustomFieldIds[i] === "number") + message.creativeCustomFieldIds[i] = object.creativeCustomFieldIds[i]; + else if (typeof object.creativeCustomFieldIds[i] === "object") + message.creativeCustomFieldIds[i] = new $util.LongBits(object.creativeCustomFieldIds[i].low >>> 0, object.creativeCustomFieldIds[i].high >>> 0).toNumber(); + } + switch (object.reportType) { + default: + if (typeof object.reportType === "number") { + message.reportType = object.reportType; + break; + } + break; + case "REPORT_TYPE_UNSPECIFIED": + case 0: + message.reportType = 0; + break; + case "HISTORICAL": + case 1: + message.reportType = 1; + break; + case "REACH": + case 5: + message.reportType = 5; + break; + case "PRIVACY_AND_MESSAGING": + case 6: + message.reportType = 6; + break; + case "AD_SPEED": + case 13: + message.reportType = 13; + break; + } + switch (object.timePeriodColumn) { + default: + if (typeof object.timePeriodColumn === "number") { + message.timePeriodColumn = object.timePeriodColumn; + break; + } + break; + case "TIME_PERIOD_COLUMN_UNSPECIFIED": + case 0: + message.timePeriodColumn = 0; + break; + case "TIME_PERIOD_COLUMN_DATE": + case 1: + message.timePeriodColumn = 1; + break; + case "TIME_PERIOD_COLUMN_WEEK": + case 2: + message.timePeriodColumn = 2; + break; + case "TIME_PERIOD_COLUMN_MONTH": + case 3: + message.timePeriodColumn = 3; + break; + case "TIME_PERIOD_COLUMN_QUARTER": + case 4: + message.timePeriodColumn = 4; + break; + } + if (object.flags) { + if (!Array.isArray(object.flags)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.flags: array expected"); + message.flags = []; + for (var i = 0; i < object.flags.length; ++i) { + if (typeof object.flags[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.flags: object expected"); + message.flags[i] = $root.google.ads.admanager.v1.ReportDefinition.Flag.fromObject(object.flags[i]); + } + } + if (object.sorts) { + if (!Array.isArray(object.sorts)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.sorts: array expected"); + message.sorts = []; + for (var i = 0; i < object.sorts.length; ++i) { + if (typeof object.sorts[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.sorts: object expected"); + message.sorts[i] = $root.google.ads.admanager.v1.ReportDefinition.Sort.fromObject(object.sorts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {google.ads.admanager.v1.ReportDefinition} message ReportDefinition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDefinition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.filters = []; + object.customDimensionKeyIds = []; + object.lineItemCustomFieldIds = []; + object.orderCustomFieldIds = []; + object.creativeCustomFieldIds = []; + object.flags = []; + object.sorts = []; + } + if (options.defaults) { + object.timeZone = ""; + object.currencyCode = ""; + object.dateRange = null; + object.reportType = options.enums === String ? "REPORT_TYPE_UNSPECIFIED" : 0; + object.timePeriodColumn = options.enums === String ? "TIME_PERIOD_COLUMN_UNSPECIFIED" : 0; + object.timeZoneSource = options.enums === String ? "TIME_ZONE_SOURCE_UNSPECIFIED" : 0; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimensions[j]] === undefined ? message.dimensions[j] : $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimensions[j]] : message.dimensions[j]; + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Metric[message.metrics[j]] === undefined ? message.metrics[j] : $root.google.ads.admanager.v1.ReportDefinition.Metric[message.metrics[j]] : message.metrics[j]; + } + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.ads.admanager.v1.ReportDefinition.Filter.toObject(message.filters[j], options); + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.toObject(message.dateRange, options); + if (message.customDimensionKeyIds && message.customDimensionKeyIds.length) { + object.customDimensionKeyIds = []; + for (var j = 0; j < message.customDimensionKeyIds.length; ++j) + if (typeof message.customDimensionKeyIds[j] === "number") + object.customDimensionKeyIds[j] = options.longs === String ? String(message.customDimensionKeyIds[j]) : message.customDimensionKeyIds[j]; + else + object.customDimensionKeyIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.customDimensionKeyIds[j]) : options.longs === Number ? new $util.LongBits(message.customDimensionKeyIds[j].low >>> 0, message.customDimensionKeyIds[j].high >>> 0).toNumber() : message.customDimensionKeyIds[j]; + } + if (message.reportType != null && message.hasOwnProperty("reportType")) + object.reportType = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.ReportType[message.reportType] === undefined ? message.reportType : $root.google.ads.admanager.v1.ReportDefinition.ReportType[message.reportType] : message.reportType; + if (message.comparisonDateRange != null && message.hasOwnProperty("comparisonDateRange")) { + object.comparisonDateRange = $root.google.ads.admanager.v1.ReportDefinition.DateRange.toObject(message.comparisonDateRange, options); + if (options.oneofs) + object._comparisonDateRange = "comparisonDateRange"; + } + if (message.timePeriodColumn != null && message.hasOwnProperty("timePeriodColumn")) + object.timePeriodColumn = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.TimePeriodColumn[message.timePeriodColumn] === undefined ? message.timePeriodColumn : $root.google.ads.admanager.v1.ReportDefinition.TimePeriodColumn[message.timePeriodColumn] : message.timePeriodColumn; + if (message.lineItemCustomFieldIds && message.lineItemCustomFieldIds.length) { + object.lineItemCustomFieldIds = []; + for (var j = 0; j < message.lineItemCustomFieldIds.length; ++j) + if (typeof message.lineItemCustomFieldIds[j] === "number") + object.lineItemCustomFieldIds[j] = options.longs === String ? String(message.lineItemCustomFieldIds[j]) : message.lineItemCustomFieldIds[j]; + else + object.lineItemCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lineItemCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.lineItemCustomFieldIds[j].low >>> 0, message.lineItemCustomFieldIds[j].high >>> 0).toNumber() : message.lineItemCustomFieldIds[j]; + } + if (message.orderCustomFieldIds && message.orderCustomFieldIds.length) { + object.orderCustomFieldIds = []; + for (var j = 0; j < message.orderCustomFieldIds.length; ++j) + if (typeof message.orderCustomFieldIds[j] === "number") + object.orderCustomFieldIds[j] = options.longs === String ? String(message.orderCustomFieldIds[j]) : message.orderCustomFieldIds[j]; + else + object.orderCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.orderCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.orderCustomFieldIds[j].low >>> 0, message.orderCustomFieldIds[j].high >>> 0).toNumber() : message.orderCustomFieldIds[j]; + } + if (message.creativeCustomFieldIds && message.creativeCustomFieldIds.length) { + object.creativeCustomFieldIds = []; + for (var j = 0; j < message.creativeCustomFieldIds.length; ++j) + if (typeof message.creativeCustomFieldIds[j] === "number") + object.creativeCustomFieldIds[j] = options.longs === String ? String(message.creativeCustomFieldIds[j]) : message.creativeCustomFieldIds[j]; + else + object.creativeCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.creativeCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.creativeCustomFieldIds[j].low >>> 0, message.creativeCustomFieldIds[j].high >>> 0).toNumber() : message.creativeCustomFieldIds[j]; + } + if (message.flags && message.flags.length) { + object.flags = []; + for (var j = 0; j < message.flags.length; ++j) + object.flags[j] = $root.google.ads.admanager.v1.ReportDefinition.Flag.toObject(message.flags[j], options); + } + if (message.sorts && message.sorts.length) { + object.sorts = []; + for (var j = 0; j < message.sorts.length; ++j) + object.sorts[j] = $root.google.ads.admanager.v1.ReportDefinition.Sort.toObject(message.sorts[j], options); + } + if (message.timeZoneSource != null && message.hasOwnProperty("timeZoneSource")) + object.timeZoneSource = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.TimeZoneSource[message.timeZoneSource] === undefined ? message.timeZoneSource : $root.google.ads.admanager.v1.ReportDefinition.TimeZoneSource[message.timeZoneSource] : message.timeZoneSource; + return object; + }; + + /** + * Converts this ReportDefinition to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition + * @instance + * @returns {Object.} JSON object */ - Report.Dimension = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIMENSION_UNSPECIFIED"] = 0; - values[valuesById[242] = "ADVERTISER_DOMAIN_NAME"] = 242; - values[valuesById[228] = "ADVERTISER_EXTERNAL_ID"] = 228; - values[valuesById[131] = "ADVERTISER_ID"] = 131; - values[valuesById[230] = "ADVERTISER_LABELS"] = 230; - values[valuesById[229] = "ADVERTISER_LABEL_IDS"] = 229; - values[valuesById[132] = "ADVERTISER_NAME"] = 132; - values[valuesById[227] = "ADVERTISER_PRIMARY_CONTACT"] = 227; - values[valuesById[390] = "AD_LOCATION"] = 390; - values[valuesById[391] = "AD_LOCATION_NAME"] = 391; - values[valuesById[64] = "AD_UNIT_CODE"] = 64; - values[valuesById[65] = "AD_UNIT_CODE_LEVEL_1"] = 65; - values[valuesById[74] = "AD_UNIT_CODE_LEVEL_10"] = 74; - values[valuesById[75] = "AD_UNIT_CODE_LEVEL_11"] = 75; - values[valuesById[76] = "AD_UNIT_CODE_LEVEL_12"] = 76; - values[valuesById[77] = "AD_UNIT_CODE_LEVEL_13"] = 77; - values[valuesById[78] = "AD_UNIT_CODE_LEVEL_14"] = 78; - values[valuesById[79] = "AD_UNIT_CODE_LEVEL_15"] = 79; - values[valuesById[80] = "AD_UNIT_CODE_LEVEL_16"] = 80; - values[valuesById[66] = "AD_UNIT_CODE_LEVEL_2"] = 66; - values[valuesById[67] = "AD_UNIT_CODE_LEVEL_3"] = 67; - values[valuesById[68] = "AD_UNIT_CODE_LEVEL_4"] = 68; - values[valuesById[69] = "AD_UNIT_CODE_LEVEL_5"] = 69; - values[valuesById[70] = "AD_UNIT_CODE_LEVEL_6"] = 70; - values[valuesById[71] = "AD_UNIT_CODE_LEVEL_7"] = 71; - values[valuesById[72] = "AD_UNIT_CODE_LEVEL_8"] = 72; - values[valuesById[73] = "AD_UNIT_CODE_LEVEL_9"] = 73; - values[valuesById[101] = "AD_UNIT_DEPTH"] = 101; - values[valuesById[25] = "AD_UNIT_ID"] = 25; - values[valuesById[27] = "AD_UNIT_ID_ALL_LEVEL"] = 27; - values[valuesById[30] = "AD_UNIT_ID_LEVEL_1"] = 30; - values[valuesById[48] = "AD_UNIT_ID_LEVEL_10"] = 48; - values[valuesById[50] = "AD_UNIT_ID_LEVEL_11"] = 50; - values[valuesById[52] = "AD_UNIT_ID_LEVEL_12"] = 52; - values[valuesById[54] = "AD_UNIT_ID_LEVEL_13"] = 54; - values[valuesById[56] = "AD_UNIT_ID_LEVEL_14"] = 56; - values[valuesById[58] = "AD_UNIT_ID_LEVEL_15"] = 58; - values[valuesById[60] = "AD_UNIT_ID_LEVEL_16"] = 60; - values[valuesById[32] = "AD_UNIT_ID_LEVEL_2"] = 32; - values[valuesById[34] = "AD_UNIT_ID_LEVEL_3"] = 34; - values[valuesById[36] = "AD_UNIT_ID_LEVEL_4"] = 36; - values[valuesById[38] = "AD_UNIT_ID_LEVEL_5"] = 38; - values[valuesById[40] = "AD_UNIT_ID_LEVEL_6"] = 40; - values[valuesById[42] = "AD_UNIT_ID_LEVEL_7"] = 42; - values[valuesById[44] = "AD_UNIT_ID_LEVEL_8"] = 44; - values[valuesById[46] = "AD_UNIT_ID_LEVEL_9"] = 46; - values[valuesById[142] = "AD_UNIT_ID_TOP_LEVEL"] = 142; - values[valuesById[26] = "AD_UNIT_NAME"] = 26; - values[valuesById[29] = "AD_UNIT_NAME_ALL_LEVEL"] = 29; - values[valuesById[31] = "AD_UNIT_NAME_LEVEL_1"] = 31; - values[valuesById[49] = "AD_UNIT_NAME_LEVEL_10"] = 49; - values[valuesById[51] = "AD_UNIT_NAME_LEVEL_11"] = 51; - values[valuesById[53] = "AD_UNIT_NAME_LEVEL_12"] = 53; - values[valuesById[55] = "AD_UNIT_NAME_LEVEL_13"] = 55; - values[valuesById[57] = "AD_UNIT_NAME_LEVEL_14"] = 57; - values[valuesById[59] = "AD_UNIT_NAME_LEVEL_15"] = 59; - values[valuesById[61] = "AD_UNIT_NAME_LEVEL_16"] = 61; - values[valuesById[33] = "AD_UNIT_NAME_LEVEL_2"] = 33; - values[valuesById[35] = "AD_UNIT_NAME_LEVEL_3"] = 35; - values[valuesById[37] = "AD_UNIT_NAME_LEVEL_4"] = 37; - values[valuesById[39] = "AD_UNIT_NAME_LEVEL_5"] = 39; - values[valuesById[41] = "AD_UNIT_NAME_LEVEL_6"] = 41; - values[valuesById[43] = "AD_UNIT_NAME_LEVEL_7"] = 43; - values[valuesById[45] = "AD_UNIT_NAME_LEVEL_8"] = 45; - values[valuesById[47] = "AD_UNIT_NAME_LEVEL_9"] = 47; - values[valuesById[143] = "AD_UNIT_NAME_TOP_LEVEL"] = 143; - values[valuesById[63] = "AD_UNIT_REWARD_AMOUNT"] = 63; - values[valuesById[62] = "AD_UNIT_REWARD_TYPE"] = 62; - values[valuesById[206] = "AD_UNIT_STATUS"] = 206; - values[valuesById[207] = "AD_UNIT_STATUS_NAME"] = 207; - values[valuesById[392] = "APP_VERSION"] = 392; - values[valuesById[349] = "BACKFILL_ADVERTISER_EXTERNAL_ID"] = 349; - values[valuesById[346] = "BACKFILL_ADVERTISER_ID"] = 346; - values[valuesById[351] = "BACKFILL_ADVERTISER_LABELS"] = 351; - values[valuesById[350] = "BACKFILL_ADVERTISER_LABEL_IDS"] = 350; - values[valuesById[347] = "BACKFILL_ADVERTISER_NAME"] = 347; - values[valuesById[348] = "BACKFILL_ADVERTISER_PRIMARY_CONTACT"] = 348; - values[valuesById[378] = "BACKFILL_CREATIVE_BILLING_TYPE"] = 378; - values[valuesById[379] = "BACKFILL_CREATIVE_BILLING_TYPE_NAME"] = 379; - values[valuesById[376] = "BACKFILL_CREATIVE_CLICK_THROUGH_URL"] = 376; - values[valuesById[370] = "BACKFILL_CREATIVE_ID"] = 370; - values[valuesById[371] = "BACKFILL_CREATIVE_NAME"] = 371; - values[valuesById[377] = "BACKFILL_CREATIVE_THIRD_PARTY_VENDOR"] = 377; - values[valuesById[374] = "BACKFILL_CREATIVE_TYPE"] = 374; - values[valuesById[375] = "BACKFILL_CREATIVE_TYPE_NAME"] = 375; - values[valuesById[278] = "BACKFILL_LINE_ITEM_ARCHIVED"] = 278; - values[valuesById[258] = "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION"] = 258; - values[valuesById[259] = "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME"] = 259; - values[valuesById[296] = "BACKFILL_LINE_ITEM_COMPUTED_STATUS"] = 296; - values[valuesById[297] = "BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME"] = 297; - values[valuesById[280] = "BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY"] = 280; - values[valuesById[272] = "BACKFILL_LINE_ITEM_COST_PER_UNIT"] = 272; - values[valuesById[264] = "BACKFILL_LINE_ITEM_COST_TYPE"] = 264; - values[valuesById[265] = "BACKFILL_LINE_ITEM_COST_TYPE_NAME"] = 265; - values[valuesById[381] = "BACKFILL_LINE_ITEM_CREATIVE_END_DATE"] = 381; - values[valuesById[290] = "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE"] = 290; - values[valuesById[291] = "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME"] = 291; - values[valuesById[380] = "BACKFILL_LINE_ITEM_CREATIVE_START_DATE"] = 380; - values[valuesById[288] = "BACKFILL_LINE_ITEM_CURRENCY_CODE"] = 288; - values[valuesById[274] = "BACKFILL_LINE_ITEM_DELIVERY_INDICATOR"] = 274; - values[valuesById[292] = "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE"] = 292; - values[valuesById[293] = "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME"] = 293; - values[valuesById[294] = "BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE"] = 294; - values[valuesById[295] = "BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE"] = 295; - values[valuesById[267] = "BACKFILL_LINE_ITEM_END_DATE"] = 267; - values[valuesById[269] = "BACKFILL_LINE_ITEM_END_DATE_TIME"] = 269; - values[valuesById[302] = "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE"] = 302; - values[valuesById[257] = "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME"] = 257; - values[valuesById[285] = "BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID"] = 285; - values[valuesById[273] = "BACKFILL_LINE_ITEM_EXTERNAL_ID"] = 273; - values[valuesById[303] = "BACKFILL_LINE_ITEM_FREQUENCY_CAP"] = 303; - values[valuesById[298] = "BACKFILL_LINE_ITEM_ID"] = 298; - values[valuesById[289] = "BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP"] = 289; - values[valuesById[283] = "BACKFILL_LINE_ITEM_LIFETIME_CLICKS"] = 283; - values[valuesById[282] = "BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS"] = 282; - values[valuesById[284] = "BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS"] = 284; - values[valuesById[276] = "BACKFILL_LINE_ITEM_MAKEGOOD"] = 276; - values[valuesById[299] = "BACKFILL_LINE_ITEM_NAME"] = 299; - values[valuesById[286] = "BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE"] = 286; - values[valuesById[277] = "BACKFILL_LINE_ITEM_OPTIMIZABLE"] = 277; - values[valuesById[262] = "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE"] = 262; - values[valuesById[263] = "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME"] = 263; - values[valuesById[260] = "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE"] = 260; - values[valuesById[261] = "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME"] = 261; - values[valuesById[266] = "BACKFILL_LINE_ITEM_PRIORITY"] = 266; - values[valuesById[306] = "BACKFILL_LINE_ITEM_RESERVATION_STATUS"] = 306; - values[valuesById[307] = "BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME"] = 307; - values[valuesById[268] = "BACKFILL_LINE_ITEM_START_DATE"] = 268; - values[valuesById[270] = "BACKFILL_LINE_ITEM_START_DATE_TIME"] = 270; - values[valuesById[300] = "BACKFILL_LINE_ITEM_TYPE"] = 300; - values[valuesById[301] = "BACKFILL_LINE_ITEM_TYPE_NAME"] = 301; - values[valuesById[271] = "BACKFILL_LINE_ITEM_UNLIMITED_END"] = 271; - values[valuesById[275] = "BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT"] = 275; - values[valuesById[287] = "BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE"] = 287; - values[valuesById[372] = "BACKFILL_MASTER_COMPANION_CREATIVE_ID"] = 372; - values[valuesById[373] = "BACKFILL_MASTER_COMPANION_CREATIVE_NAME"] = 373; - values[valuesById[313] = "BACKFILL_ORDER_AGENCY"] = 313; - values[valuesById[314] = "BACKFILL_ORDER_AGENCY_ID"] = 314; - values[valuesById[315] = "BACKFILL_ORDER_BOOKED_CPC"] = 315; - values[valuesById[316] = "BACKFILL_ORDER_BOOKED_CPM"] = 316; - values[valuesById[340] = "BACKFILL_ORDER_DELIVERY_STATUS"] = 340; - values[valuesById[341] = "BACKFILL_ORDER_DELIVERY_STATUS_NAME"] = 341; - values[valuesById[317] = "BACKFILL_ORDER_END_DATE"] = 317; - values[valuesById[319] = "BACKFILL_ORDER_END_DATE_TIME"] = 319; - values[valuesById[320] = "BACKFILL_ORDER_EXTERNAL_ID"] = 320; - values[valuesById[338] = "BACKFILL_ORDER_ID"] = 338; - values[valuesById[334] = "BACKFILL_ORDER_LABELS"] = 334; - values[valuesById[335] = "BACKFILL_ORDER_LABEL_IDS"] = 335; - values[valuesById[322] = "BACKFILL_ORDER_LIFETIME_CLICKS"] = 322; - values[valuesById[323] = "BACKFILL_ORDER_LIFETIME_IMPRESSIONS"] = 323; - values[valuesById[339] = "BACKFILL_ORDER_NAME"] = 339; - values[valuesById[324] = "BACKFILL_ORDER_PO_NUMBER"] = 324; - values[valuesById[321] = "BACKFILL_ORDER_PROGRAMMATIC"] = 321; - values[valuesById[325] = "BACKFILL_ORDER_SALESPERSON"] = 325; - values[valuesById[329] = "BACKFILL_ORDER_SECONDARY_SALESPEOPLE"] = 329; - values[valuesById[328] = "BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID"] = 328; - values[valuesById[331] = "BACKFILL_ORDER_SECONDARY_TRAFFICKERS"] = 331; - values[valuesById[330] = "BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID"] = 330; - values[valuesById[332] = "BACKFILL_ORDER_START_DATE"] = 332; - values[valuesById[333] = "BACKFILL_ORDER_START_DATE_TIME"] = 333; - values[valuesById[326] = "BACKFILL_ORDER_TRAFFICKER"] = 326; - values[valuesById[327] = "BACKFILL_ORDER_TRAFFICKER_ID"] = 327; - values[valuesById[318] = "BACKFILL_ORDER_UNLIMITED_END"] = 318; - values[valuesById[336] = "BACKFILL_PROGRAMMATIC_BUYER_ID"] = 336; - values[valuesById[337] = "BACKFILL_PROGRAMMATIC_BUYER_NAME"] = 337; - values[valuesById[383] = "BRANDING_TYPE"] = 383; - values[valuesById[384] = "BRANDING_TYPE_NAME"] = 384; - values[valuesById[119] = "BROWSER_CATEGORY"] = 119; - values[valuesById[120] = "BROWSER_CATEGORY_NAME"] = 120; - values[valuesById[235] = "BROWSER_ID"] = 235; - values[valuesById[236] = "BROWSER_NAME"] = 236; - values[valuesById[369] = "CARRIER_ID"] = 369; - values[valuesById[368] = "CARRIER_NAME"] = 368; - values[valuesById[133] = "CLASSIFIED_ADVERTISER_ID"] = 133; - values[valuesById[134] = "CLASSIFIED_ADVERTISER_NAME"] = 134; - values[valuesById[243] = "CLASSIFIED_BRAND_ID"] = 243; - values[valuesById[244] = "CLASSIFIED_BRAND_NAME"] = 244; - values[valuesById[246] = "CONTENT_ID"] = 246; - values[valuesById[247] = "CONTENT_NAME"] = 247; - values[valuesById[11] = "COUNTRY_ID"] = 11; - values[valuesById[12] = "COUNTRY_NAME"] = 12; - values[valuesById[366] = "CREATIVE_BILLING_TYPE"] = 366; - values[valuesById[367] = "CREATIVE_BILLING_TYPE_NAME"] = 367; - values[valuesById[174] = "CREATIVE_CLICK_THROUGH_URL"] = 174; - values[valuesById[138] = "CREATIVE_ID"] = 138; - values[valuesById[139] = "CREATIVE_NAME"] = 139; - values[valuesById[148] = "CREATIVE_TECHNOLOGY"] = 148; - values[valuesById[149] = "CREATIVE_TECHNOLOGY_NAME"] = 149; - values[valuesById[361] = "CREATIVE_THIRD_PARTY_VENDOR"] = 361; - values[valuesById[344] = "CREATIVE_TYPE"] = 344; - values[valuesById[345] = "CREATIVE_TYPE_NAME"] = 345; - values[valuesById[3] = "DATE"] = 3; - values[valuesById[4] = "DAY_OF_WEEK"] = 4; - values[valuesById[9] = "DEMAND_CHANNEL"] = 9; - values[valuesById[10] = "DEMAND_CHANNEL_NAME"] = 10; - values[valuesById[22] = "DEMAND_SUBCHANNEL"] = 22; - values[valuesById[23] = "DEMAND_SUBCHANNEL_NAME"] = 23; - values[valuesById[226] = "DEVICE"] = 226; - values[valuesById[15] = "DEVICE_CATEGORY"] = 15; - values[valuesById[16] = "DEVICE_CATEGORY_NAME"] = 16; - values[valuesById[225] = "DEVICE_NAME"] = 225; - values[valuesById[185] = "EXCHANGE_THIRD_PARTY_COMPANY_ID"] = 185; - values[valuesById[186] = "EXCHANGE_THIRD_PARTY_COMPANY_NAME"] = 186; - values[valuesById[248] = "FIRST_LOOK_PRICING_RULE_ID"] = 248; - values[valuesById[249] = "FIRST_LOOK_PRICING_RULE_NAME"] = 249; - values[valuesById[100] = "HOUR"] = 100; - values[valuesById[223] = "INTERACTION_TYPE"] = 223; - values[valuesById[224] = "INTERACTION_TYPE_NAME"] = 224; - values[valuesById[17] = "INVENTORY_FORMAT"] = 17; - values[valuesById[18] = "INVENTORY_FORMAT_NAME"] = 18; - values[valuesById[19] = "INVENTORY_TYPE"] = 19; - values[valuesById[20] = "INVENTORY_TYPE_NAME"] = 20; - values[valuesById[382] = "IS_ADX_DIRECT"] = 382; - values[valuesById[401] = "IS_FIRST_LOOK_DEAL"] = 401; - values[valuesById[214] = "KEY_VALUES_ID"] = 214; - values[valuesById[215] = "KEY_VALUES_NAME"] = 215; - values[valuesById[188] = "LINE_ITEM_ARCHIVED"] = 188; - values[valuesById[204] = "LINE_ITEM_COMPANION_DELIVERY_OPTION"] = 204; - values[valuesById[205] = "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME"] = 205; - values[valuesById[250] = "LINE_ITEM_COMPUTED_STATUS"] = 250; - values[valuesById[251] = "LINE_ITEM_COMPUTED_STATUS_NAME"] = 251; - values[valuesById[92] = "LINE_ITEM_CONTRACTED_QUANTITY"] = 92; - values[valuesById[85] = "LINE_ITEM_COST_PER_UNIT"] = 85; - values[valuesById[212] = "LINE_ITEM_COST_TYPE"] = 212; - values[valuesById[213] = "LINE_ITEM_COST_TYPE_NAME"] = 213; - values[valuesById[176] = "LINE_ITEM_CREATIVE_END_DATE"] = 176; - values[valuesById[189] = "LINE_ITEM_CREATIVE_ROTATION_TYPE"] = 189; - values[valuesById[190] = "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME"] = 190; - values[valuesById[175] = "LINE_ITEM_CREATIVE_START_DATE"] = 175; - values[valuesById[180] = "LINE_ITEM_CURRENCY_CODE"] = 180; - values[valuesById[87] = "LINE_ITEM_DELIVERY_INDICATOR"] = 87; - values[valuesById[191] = "LINE_ITEM_DELIVERY_RATE_TYPE"] = 191; - values[valuesById[192] = "LINE_ITEM_DELIVERY_RATE_TYPE_NAME"] = 192; - values[valuesById[195] = "LINE_ITEM_DISCOUNT_ABSOLUTE"] = 195; - values[valuesById[196] = "LINE_ITEM_DISCOUNT_PERCENTAGE"] = 196; - values[valuesById[81] = "LINE_ITEM_END_DATE"] = 81; - values[valuesById[83] = "LINE_ITEM_END_DATE_TIME"] = 83; - values[valuesById[201] = "LINE_ITEM_ENVIRONMENT_TYPE"] = 201; - values[valuesById[202] = "LINE_ITEM_ENVIRONMENT_TYPE_NAME"] = 202; - values[valuesById[97] = "LINE_ITEM_EXTERNAL_DEAL_ID"] = 97; - values[valuesById[86] = "LINE_ITEM_EXTERNAL_ID"] = 86; - values[valuesById[256] = "LINE_ITEM_FREQUENCY_CAP"] = 256; - values[valuesById[1] = "LINE_ITEM_ID"] = 1; - values[valuesById[181] = "LINE_ITEM_LAST_MODIFIED_BY_APP"] = 181; - values[valuesById[95] = "LINE_ITEM_LIFETIME_CLICKS"] = 95; - values[valuesById[94] = "LINE_ITEM_LIFETIME_IMPRESSIONS"] = 94; - values[valuesById[96] = "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS"] = 96; - values[valuesById[89] = "LINE_ITEM_MAKEGOOD"] = 89; - values[valuesById[2] = "LINE_ITEM_NAME"] = 2; - values[valuesById[98] = "LINE_ITEM_NON_CPD_BOOKED_REVENUE"] = 98; - values[valuesById[90] = "LINE_ITEM_OPTIMIZABLE"] = 90; - values[valuesById[210] = "LINE_ITEM_PRIMARY_GOAL_TYPE"] = 210; - values[valuesById[211] = "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME"] = 211; - values[valuesById[93] = "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE"] = 93; - values[valuesById[396] = "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE"] = 396; - values[valuesById[208] = "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE"] = 208; - values[valuesById[209] = "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME"] = 209; - values[valuesById[24] = "LINE_ITEM_PRIORITY"] = 24; - values[valuesById[304] = "LINE_ITEM_RESERVATION_STATUS"] = 304; - values[valuesById[305] = "LINE_ITEM_RESERVATION_STATUS_NAME"] = 305; - values[valuesById[82] = "LINE_ITEM_START_DATE"] = 82; - values[valuesById[84] = "LINE_ITEM_START_DATE_TIME"] = 84; - values[valuesById[193] = "LINE_ITEM_TYPE"] = 193; - values[valuesById[194] = "LINE_ITEM_TYPE_NAME"] = 194; - values[valuesById[187] = "LINE_ITEM_UNLIMITED_END"] = 187; - values[valuesById[88] = "LINE_ITEM_VALUE_COST_PER_UNIT"] = 88; - values[valuesById[179] = "LINE_ITEM_WEB_PROPERTY_CODE"] = 179; - values[valuesById[140] = "MASTER_COMPANION_CREATIVE_ID"] = 140; - values[valuesById[141] = "MASTER_COMPANION_CREATIVE_NAME"] = 141; - values[valuesById[128] = "MOBILE_APP_FREE"] = 128; - values[valuesById[129] = "MOBILE_APP_ICON_URL"] = 129; - values[valuesById[123] = "MOBILE_APP_ID"] = 123; - values[valuesById[127] = "MOBILE_APP_NAME"] = 127; - values[valuesById[311] = "MOBILE_APP_OWNERSHIP_STATUS"] = 311; - values[valuesById[312] = "MOBILE_APP_OWNERSHIP_STATUS_NAME"] = 312; - values[valuesById[125] = "MOBILE_APP_STORE"] = 125; - values[valuesById[245] = "MOBILE_APP_STORE_NAME"] = 245; - values[valuesById[99] = "MOBILE_INVENTORY_TYPE"] = 99; - values[valuesById[21] = "MOBILE_INVENTORY_TYPE_NAME"] = 21; - values[valuesById[130] = "MOBILE_SDK_VERSION_NAME"] = 130; - values[valuesById[6] = "MONTH_YEAR"] = 6; - values[valuesById[255] = "NATIVE_AD_FORMAT_ID"] = 255; - values[valuesById[254] = "NATIVE_AD_FORMAT_NAME"] = 254; - values[valuesById[253] = "NATIVE_STYLE_ID"] = 253; - values[valuesById[252] = "NATIVE_STYLE_NAME"] = 252; - values[valuesById[117] = "OPERATING_SYSTEM_CATEGORY"] = 117; - values[valuesById[118] = "OPERATING_SYSTEM_CATEGORY_NAME"] = 118; - values[valuesById[238] = "OPERATING_SYSTEM_VERSION_ID"] = 238; - values[valuesById[237] = "OPERATING_SYSTEM_VERSION_NAME"] = 237; - values[valuesById[150] = "ORDER_AGENCY"] = 150; - values[valuesById[151] = "ORDER_AGENCY_ID"] = 151; - values[valuesById[152] = "ORDER_BOOKED_CPC"] = 152; - values[valuesById[153] = "ORDER_BOOKED_CPM"] = 153; - values[valuesById[231] = "ORDER_DELIVERY_STATUS"] = 231; - values[valuesById[239] = "ORDER_DELIVERY_STATUS_NAME"] = 239; - values[valuesById[154] = "ORDER_END_DATE"] = 154; - values[valuesById[155] = "ORDER_END_DATE_TIME"] = 155; - values[valuesById[156] = "ORDER_EXTERNAL_ID"] = 156; - values[valuesById[7] = "ORDER_ID"] = 7; - values[valuesById[170] = "ORDER_LABELS"] = 170; - values[valuesById[171] = "ORDER_LABEL_IDS"] = 171; - values[valuesById[158] = "ORDER_LIFETIME_CLICKS"] = 158; - values[valuesById[159] = "ORDER_LIFETIME_IMPRESSIONS"] = 159; - values[valuesById[8] = "ORDER_NAME"] = 8; - values[valuesById[160] = "ORDER_PO_NUMBER"] = 160; - values[valuesById[157] = "ORDER_PROGRAMMATIC"] = 157; - values[valuesById[161] = "ORDER_SALESPERSON"] = 161; - values[valuesById[164] = "ORDER_SECONDARY_SALESPEOPLE"] = 164; - values[valuesById[165] = "ORDER_SECONDARY_SALESPEOPLE_ID"] = 165; - values[valuesById[166] = "ORDER_SECONDARY_TRAFFICKERS"] = 166; - values[valuesById[167] = "ORDER_SECONDARY_TRAFFICKERS_ID"] = 167; - values[valuesById[168] = "ORDER_START_DATE"] = 168; - values[valuesById[169] = "ORDER_START_DATE_TIME"] = 169; - values[valuesById[162] = "ORDER_TRAFFICKER"] = 162; - values[valuesById[163] = "ORDER_TRAFFICKER_ID"] = 163; - values[valuesById[203] = "ORDER_UNLIMITED_END"] = 203; - values[valuesById[113] = "PLACEMENT_ID"] = 113; - values[valuesById[144] = "PLACEMENT_ID_ALL"] = 144; - values[valuesById[114] = "PLACEMENT_NAME"] = 114; - values[valuesById[145] = "PLACEMENT_NAME_ALL"] = 145; - values[valuesById[362] = "PLACEMENT_STATUS"] = 362; - values[valuesById[363] = "PLACEMENT_STATUS_ALL"] = 363; - values[valuesById[364] = "PLACEMENT_STATUS_NAME"] = 364; - values[valuesById[365] = "PLACEMENT_STATUS_NAME_ALL"] = 365; - values[valuesById[240] = "PROGRAMMATIC_BUYER_ID"] = 240; - values[valuesById[241] = "PROGRAMMATIC_BUYER_NAME"] = 241; - values[valuesById[13] = "PROGRAMMATIC_CHANNEL"] = 13; - values[valuesById[14] = "PROGRAMMATIC_CHANNEL_NAME"] = 14; - values[valuesById[343] = "RENDERED_CREATIVE_SIZE"] = 343; - values[valuesById[352] = "REQUESTED_AD_SIZES"] = 352; - values[valuesById[146] = "REQUEST_TYPE"] = 146; - values[valuesById[147] = "REQUEST_TYPE_NAME"] = 147; - values[valuesById[597] = "SERVER_SIDE_UNWRAPPING_ELIGIBLE"] = 597; - values[valuesById[387] = "SITE"] = 387; - values[valuesById[232] = "TARGETING_ID"] = 232; - values[valuesById[233] = "TARGETING_NAME"] = 233; - values[valuesById[385] = "TARGETING_TYPE"] = 385; - values[valuesById[386] = "TARGETING_TYPE_NAME"] = 386; - values[valuesById[388] = "TRAFFIC_SOURCE"] = 388; - values[valuesById[389] = "TRAFFIC_SOURCE_NAME"] = 389; - values[valuesById[393] = "UNIFIED_PRICING_RULE_ID"] = 393; - values[valuesById[394] = "UNIFIED_PRICING_RULE_NAME"] = 394; - values[valuesById[172] = "VIDEO_PLCMT"] = 172; - values[valuesById[173] = "VIDEO_PLCMT_NAME"] = 173; - values[valuesById[5] = "WEEK"] = 5; - values[valuesById[184] = "YIELD_GROUP_BUYER_NAME"] = 184; - values[valuesById[182] = "YIELD_GROUP_ID"] = 182; - values[valuesById[183] = "YIELD_GROUP_NAME"] = 183; - values[valuesById[10000] = "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID"] = 10000; - values[valuesById[10001] = "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID"] = 10001; - values[valuesById[10002] = "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID"] = 10002; - values[valuesById[10003] = "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID"] = 10003; - values[valuesById[10004] = "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID"] = 10004; - values[valuesById[10005] = "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID"] = 10005; - values[valuesById[10006] = "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID"] = 10006; - values[valuesById[10007] = "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID"] = 10007; - values[valuesById[10008] = "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID"] = 10008; - values[valuesById[10009] = "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID"] = 10009; - values[valuesById[10010] = "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID"] = 10010; - values[valuesById[10011] = "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID"] = 10011; - values[valuesById[10012] = "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID"] = 10012; - values[valuesById[10013] = "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID"] = 10013; - values[valuesById[10014] = "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID"] = 10014; - values[valuesById[11000] = "LINE_ITEM_CUSTOM_FIELD_0_VALUE"] = 11000; - values[valuesById[11001] = "LINE_ITEM_CUSTOM_FIELD_1_VALUE"] = 11001; - values[valuesById[11002] = "LINE_ITEM_CUSTOM_FIELD_2_VALUE"] = 11002; - values[valuesById[11003] = "LINE_ITEM_CUSTOM_FIELD_3_VALUE"] = 11003; - values[valuesById[11004] = "LINE_ITEM_CUSTOM_FIELD_4_VALUE"] = 11004; - values[valuesById[11005] = "LINE_ITEM_CUSTOM_FIELD_5_VALUE"] = 11005; - values[valuesById[11006] = "LINE_ITEM_CUSTOM_FIELD_6_VALUE"] = 11006; - values[valuesById[11007] = "LINE_ITEM_CUSTOM_FIELD_7_VALUE"] = 11007; - values[valuesById[11008] = "LINE_ITEM_CUSTOM_FIELD_8_VALUE"] = 11008; - values[valuesById[11009] = "LINE_ITEM_CUSTOM_FIELD_9_VALUE"] = 11009; - values[valuesById[11010] = "LINE_ITEM_CUSTOM_FIELD_10_VALUE"] = 11010; - values[valuesById[11011] = "LINE_ITEM_CUSTOM_FIELD_11_VALUE"] = 11011; - values[valuesById[11012] = "LINE_ITEM_CUSTOM_FIELD_12_VALUE"] = 11012; - values[valuesById[11013] = "LINE_ITEM_CUSTOM_FIELD_13_VALUE"] = 11013; - values[valuesById[11014] = "LINE_ITEM_CUSTOM_FIELD_14_VALUE"] = 11014; - values[valuesById[12000] = "ORDER_CUSTOM_FIELD_0_OPTION_ID"] = 12000; - values[valuesById[12001] = "ORDER_CUSTOM_FIELD_1_OPTION_ID"] = 12001; - values[valuesById[12002] = "ORDER_CUSTOM_FIELD_2_OPTION_ID"] = 12002; - values[valuesById[12003] = "ORDER_CUSTOM_FIELD_3_OPTION_ID"] = 12003; - values[valuesById[12004] = "ORDER_CUSTOM_FIELD_4_OPTION_ID"] = 12004; - values[valuesById[12005] = "ORDER_CUSTOM_FIELD_5_OPTION_ID"] = 12005; - values[valuesById[12006] = "ORDER_CUSTOM_FIELD_6_OPTION_ID"] = 12006; - values[valuesById[12007] = "ORDER_CUSTOM_FIELD_7_OPTION_ID"] = 12007; - values[valuesById[12008] = "ORDER_CUSTOM_FIELD_8_OPTION_ID"] = 12008; - values[valuesById[12009] = "ORDER_CUSTOM_FIELD_9_OPTION_ID"] = 12009; - values[valuesById[12010] = "ORDER_CUSTOM_FIELD_10_OPTION_ID"] = 12010; - values[valuesById[12011] = "ORDER_CUSTOM_FIELD_11_OPTION_ID"] = 12011; - values[valuesById[12012] = "ORDER_CUSTOM_FIELD_12_OPTION_ID"] = 12012; - values[valuesById[12013] = "ORDER_CUSTOM_FIELD_13_OPTION_ID"] = 12013; - values[valuesById[12014] = "ORDER_CUSTOM_FIELD_14_OPTION_ID"] = 12014; - values[valuesById[13000] = "ORDER_CUSTOM_FIELD_0_VALUE"] = 13000; - values[valuesById[13001] = "ORDER_CUSTOM_FIELD_1_VALUE"] = 13001; - values[valuesById[13002] = "ORDER_CUSTOM_FIELD_2_VALUE"] = 13002; - values[valuesById[13003] = "ORDER_CUSTOM_FIELD_3_VALUE"] = 13003; - values[valuesById[13004] = "ORDER_CUSTOM_FIELD_4_VALUE"] = 13004; - values[valuesById[13005] = "ORDER_CUSTOM_FIELD_5_VALUE"] = 13005; - values[valuesById[13006] = "ORDER_CUSTOM_FIELD_6_VALUE"] = 13006; - values[valuesById[13007] = "ORDER_CUSTOM_FIELD_7_VALUE"] = 13007; - values[valuesById[13008] = "ORDER_CUSTOM_FIELD_8_VALUE"] = 13008; - values[valuesById[13009] = "ORDER_CUSTOM_FIELD_9_VALUE"] = 13009; - values[valuesById[13010] = "ORDER_CUSTOM_FIELD_10_VALUE"] = 13010; - values[valuesById[13011] = "ORDER_CUSTOM_FIELD_11_VALUE"] = 13011; - values[valuesById[13012] = "ORDER_CUSTOM_FIELD_12_VALUE"] = 13012; - values[valuesById[13013] = "ORDER_CUSTOM_FIELD_13_VALUE"] = 13013; - values[valuesById[13014] = "ORDER_CUSTOM_FIELD_14_VALUE"] = 13014; - values[valuesById[14000] = "CREATIVE_CUSTOM_FIELD_0_OPTION_ID"] = 14000; - values[valuesById[14001] = "CREATIVE_CUSTOM_FIELD_1_OPTION_ID"] = 14001; - values[valuesById[14002] = "CREATIVE_CUSTOM_FIELD_2_OPTION_ID"] = 14002; - values[valuesById[14003] = "CREATIVE_CUSTOM_FIELD_3_OPTION_ID"] = 14003; - values[valuesById[14004] = "CREATIVE_CUSTOM_FIELD_4_OPTION_ID"] = 14004; - values[valuesById[14005] = "CREATIVE_CUSTOM_FIELD_5_OPTION_ID"] = 14005; - values[valuesById[14006] = "CREATIVE_CUSTOM_FIELD_6_OPTION_ID"] = 14006; - values[valuesById[14007] = "CREATIVE_CUSTOM_FIELD_7_OPTION_ID"] = 14007; - values[valuesById[14008] = "CREATIVE_CUSTOM_FIELD_8_OPTION_ID"] = 14008; - values[valuesById[14009] = "CREATIVE_CUSTOM_FIELD_9_OPTION_ID"] = 14009; - values[valuesById[14010] = "CREATIVE_CUSTOM_FIELD_10_OPTION_ID"] = 14010; - values[valuesById[14011] = "CREATIVE_CUSTOM_FIELD_11_OPTION_ID"] = 14011; - values[valuesById[14012] = "CREATIVE_CUSTOM_FIELD_12_OPTION_ID"] = 14012; - values[valuesById[14013] = "CREATIVE_CUSTOM_FIELD_13_OPTION_ID"] = 14013; - values[valuesById[14014] = "CREATIVE_CUSTOM_FIELD_14_OPTION_ID"] = 14014; - values[valuesById[15000] = "CREATIVE_CUSTOM_FIELD_0_VALUE"] = 15000; - values[valuesById[15001] = "CREATIVE_CUSTOM_FIELD_1_VALUE"] = 15001; - values[valuesById[15002] = "CREATIVE_CUSTOM_FIELD_2_VALUE"] = 15002; - values[valuesById[15003] = "CREATIVE_CUSTOM_FIELD_3_VALUE"] = 15003; - values[valuesById[15004] = "CREATIVE_CUSTOM_FIELD_4_VALUE"] = 15004; - values[valuesById[15005] = "CREATIVE_CUSTOM_FIELD_5_VALUE"] = 15005; - values[valuesById[15006] = "CREATIVE_CUSTOM_FIELD_6_VALUE"] = 15006; - values[valuesById[15007] = "CREATIVE_CUSTOM_FIELD_7_VALUE"] = 15007; - values[valuesById[15008] = "CREATIVE_CUSTOM_FIELD_8_VALUE"] = 15008; - values[valuesById[15009] = "CREATIVE_CUSTOM_FIELD_9_VALUE"] = 15009; - values[valuesById[15010] = "CREATIVE_CUSTOM_FIELD_10_VALUE"] = 15010; - values[valuesById[15011] = "CREATIVE_CUSTOM_FIELD_11_VALUE"] = 15011; - values[valuesById[15012] = "CREATIVE_CUSTOM_FIELD_12_VALUE"] = 15012; - values[valuesById[15013] = "CREATIVE_CUSTOM_FIELD_13_VALUE"] = 15013; - values[valuesById[15014] = "CREATIVE_CUSTOM_FIELD_14_VALUE"] = 15014; - values[valuesById[16000] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID"] = 16000; - values[valuesById[16001] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID"] = 16001; - values[valuesById[16002] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID"] = 16002; - values[valuesById[16003] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID"] = 16003; - values[valuesById[16004] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID"] = 16004; - values[valuesById[16005] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID"] = 16005; - values[valuesById[16006] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID"] = 16006; - values[valuesById[16007] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID"] = 16007; - values[valuesById[16008] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID"] = 16008; - values[valuesById[16009] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID"] = 16009; - values[valuesById[16010] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID"] = 16010; - values[valuesById[16011] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID"] = 16011; - values[valuesById[16012] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID"] = 16012; - values[valuesById[16013] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID"] = 16013; - values[valuesById[16014] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID"] = 16014; - values[valuesById[17000] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE"] = 17000; - values[valuesById[17001] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE"] = 17001; - values[valuesById[17002] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE"] = 17002; - values[valuesById[17003] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE"] = 17003; - values[valuesById[17004] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE"] = 17004; - values[valuesById[17005] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE"] = 17005; - values[valuesById[17006] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE"] = 17006; - values[valuesById[17007] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE"] = 17007; - values[valuesById[17008] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE"] = 17008; - values[valuesById[17009] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE"] = 17009; - values[valuesById[17010] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE"] = 17010; - values[valuesById[17011] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE"] = 17011; - values[valuesById[17012] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE"] = 17012; - values[valuesById[17013] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE"] = 17013; - values[valuesById[17014] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE"] = 17014; - values[valuesById[18000] = "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID"] = 18000; - values[valuesById[18001] = "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID"] = 18001; - values[valuesById[18002] = "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID"] = 18002; - values[valuesById[18003] = "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID"] = 18003; - values[valuesById[18004] = "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID"] = 18004; - values[valuesById[18005] = "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID"] = 18005; - values[valuesById[18006] = "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID"] = 18006; - values[valuesById[18007] = "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID"] = 18007; - values[valuesById[18008] = "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID"] = 18008; - values[valuesById[18009] = "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID"] = 18009; - values[valuesById[18010] = "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID"] = 18010; - values[valuesById[18011] = "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID"] = 18011; - values[valuesById[18012] = "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID"] = 18012; - values[valuesById[18013] = "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID"] = 18013; - values[valuesById[18014] = "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID"] = 18014; - values[valuesById[19000] = "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE"] = 19000; - values[valuesById[19001] = "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE"] = 19001; - values[valuesById[19002] = "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE"] = 19002; - values[valuesById[19003] = "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE"] = 19003; - values[valuesById[19004] = "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE"] = 19004; - values[valuesById[19005] = "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE"] = 19005; - values[valuesById[19006] = "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE"] = 19006; - values[valuesById[19007] = "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE"] = 19007; - values[valuesById[19008] = "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE"] = 19008; - values[valuesById[19009] = "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE"] = 19009; - values[valuesById[19010] = "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE"] = 19010; - values[valuesById[19011] = "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE"] = 19011; - values[valuesById[19012] = "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE"] = 19012; - values[valuesById[19013] = "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE"] = 19013; - values[valuesById[19014] = "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE"] = 19014; - values[valuesById[20000] = "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID"] = 20000; - values[valuesById[20001] = "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID"] = 20001; - values[valuesById[20002] = "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID"] = 20002; - values[valuesById[20003] = "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID"] = 20003; - values[valuesById[20004] = "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID"] = 20004; - values[valuesById[20005] = "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID"] = 20005; - values[valuesById[20006] = "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID"] = 20006; - values[valuesById[20007] = "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID"] = 20007; - values[valuesById[20008] = "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID"] = 20008; - values[valuesById[20009] = "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID"] = 20009; - values[valuesById[20010] = "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID"] = 20010; - values[valuesById[20011] = "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID"] = 20011; - values[valuesById[20012] = "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID"] = 20012; - values[valuesById[20013] = "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID"] = 20013; - values[valuesById[20014] = "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID"] = 20014; - values[valuesById[21000] = "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE"] = 21000; - values[valuesById[21001] = "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE"] = 21001; - values[valuesById[21002] = "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE"] = 21002; - values[valuesById[21003] = "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE"] = 21003; - values[valuesById[21004] = "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE"] = 21004; - values[valuesById[21005] = "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE"] = 21005; - values[valuesById[21006] = "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE"] = 21006; - values[valuesById[21007] = "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE"] = 21007; - values[valuesById[21008] = "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE"] = 21008; - values[valuesById[21009] = "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE"] = 21009; - values[valuesById[21010] = "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE"] = 21010; - values[valuesById[21011] = "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE"] = 21011; - values[valuesById[21012] = "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE"] = 21012; - values[valuesById[21013] = "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE"] = 21013; - values[valuesById[21014] = "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE"] = 21014; - values[valuesById[100000] = "CUSTOM_DIMENSION_0_VALUE_ID"] = 100000; - values[valuesById[100001] = "CUSTOM_DIMENSION_1_VALUE_ID"] = 100001; - values[valuesById[100002] = "CUSTOM_DIMENSION_2_VALUE_ID"] = 100002; - values[valuesById[100003] = "CUSTOM_DIMENSION_3_VALUE_ID"] = 100003; - values[valuesById[100004] = "CUSTOM_DIMENSION_4_VALUE_ID"] = 100004; - values[valuesById[100005] = "CUSTOM_DIMENSION_5_VALUE_ID"] = 100005; - values[valuesById[100006] = "CUSTOM_DIMENSION_6_VALUE_ID"] = 100006; - values[valuesById[100007] = "CUSTOM_DIMENSION_7_VALUE_ID"] = 100007; - values[valuesById[100008] = "CUSTOM_DIMENSION_8_VALUE_ID"] = 100008; - values[valuesById[100009] = "CUSTOM_DIMENSION_9_VALUE_ID"] = 100009; - values[valuesById[101000] = "CUSTOM_DIMENSION_0_VALUE"] = 101000; - values[valuesById[101001] = "CUSTOM_DIMENSION_1_VALUE"] = 101001; - values[valuesById[101002] = "CUSTOM_DIMENSION_2_VALUE"] = 101002; - values[valuesById[101003] = "CUSTOM_DIMENSION_3_VALUE"] = 101003; - values[valuesById[101004] = "CUSTOM_DIMENSION_4_VALUE"] = 101004; - values[valuesById[101005] = "CUSTOM_DIMENSION_5_VALUE"] = 101005; - values[valuesById[101006] = "CUSTOM_DIMENSION_6_VALUE"] = 101006; - values[valuesById[101007] = "CUSTOM_DIMENSION_7_VALUE"] = 101007; - values[valuesById[101008] = "CUSTOM_DIMENSION_8_VALUE"] = 101008; - values[valuesById[101009] = "CUSTOM_DIMENSION_9_VALUE"] = 101009; - return values; - })(); + ReportDefinition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDefinition + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition"; + }; + + ReportDefinition.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface IField + * @property {google.ads.admanager.v1.ReportDefinition.Dimension|null} [dimension] Field dimension + * @property {google.ads.admanager.v1.ReportDefinition.Metric|null} [metric] Field metric + */ + + /** + * Constructs a new Field. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.IField=} [properties] Properties to set + */ + function Field(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]]; + } + + /** + * Field dimension. + * @member {google.ads.admanager.v1.ReportDefinition.Dimension|null|undefined} dimension + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @instance + */ + Field.prototype.dimension = null; + + /** + * Field metric. + * @member {google.ads.admanager.v1.ReportDefinition.Metric|null|undefined} metric + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @instance + */ + Field.prototype.metric = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Field field. + * @member {"dimension"|"metric"|undefined} field + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @instance + */ + Object.defineProperty(Field.prototype, "field", { + get: $util.oneOfGetter($oneOfFields = ["dimension", "metric"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IField=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Field.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dimension); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.metric); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimension = reader.int32(); + break; + } + case 2: { + message.metric = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimension != null && message.hasOwnProperty("dimension")) { + properties.field = 1; + switch (message.dimension) { + default: + return "dimension: enum value expected"; + case 0: + case 575: + case 576: + case 475: + case 476: + case 242: + case 228: + case 131: + case 230: + case 229: + case 132: + case 227: + case 471: + case 472: + case 473: + case 474: + case 580: + case 499: + case 500: + case 641: + case 642: + case 390: + case 391: + case 620: + case 621: + case 622: + case 497: + case 498: + case 64: + case 65: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 25: + case 27: + case 30: + case 48: + case 50: + case 52: + case 54: + case 56: + case 58: + case 60: + case 32: + case 34: + case 36: + case 38: + case 40: + case 42: + case 44: + case 46: + case 142: + case 26: + case 29: + case 31: + case 49: + case 51: + case 53: + case 55: + case 57: + case 59: + case 61: + case 33: + case 35: + case 37: + case 39: + case 41: + case 43: + case 45: + case 47: + case 143: + case 63: + case 62: + case 206: + case 207: + case 565: + case 566: + case 567: + case 568: + case 569: + case 570: + case 508: + case 582: + case 442: + case 443: + case 392: + case 579: + case 571: + case 584: + case 585: + case 421: + case 422: + case 493: + case 494: + case 679: + case 599: + case 600: + case 383: + case 384: + case 119: + case 120: + case 235: + case 236: + case 448: + case 449: + case 588: + case 589: + case 369: + case 368: + case 501: + case 542: + case 544: + case 543: + case 459: + case 452: + case 133: + case 134: + case 243: + case 244: + case 643: + case 644: + case 246: + case 731: + case 732: + case 247: + case 469: + case 470: + case 466: + case 11: + case 12: + case 366: + case 367: + case 174: + case 138: + case 139: + case 711: + case 712: + case 704: + case 705: + case 686: + case 687: + case 148: + case 149: + case 361: + case 344: + case 345: + case 706: + case 707: + case 562: + case 572: + case 573: + case 737: + case 735: + case 736: + case 738: + case 423: + case 424: + case 3: + case 4: + case 240: + case 241: + case 436: + case 437: + case 309: + case 310: + case 9: + case 10: + case 592: + case 593: + case 22: + case 23: + case 226: + case 15: + case 16: + case 525: + case 526: + case 527: + case 528: + case 225: + case 564: + case 502: + case 503: + case 623: + case 624: + case 625: + case 626: + case 715: + case 714: + case 723: + case 185: + case 186: + case 248: + case 249: + case 404: + case 405: + case 509: + case 583: + case 519: + case 520: + case 659: + case 660: + case 718: + case 719: + case 100: + case 577: + case 578: + case 223: + case 224: + case 510: + case 17: + case 18: + case 648: + case 649: + case 603: + case 604: + case 652: + case 653: + case 654: + case 650: + case 651: + case 19: + case 20: + case 382: + case 574: + case 464: + case 401: + case 214: + case 215: + case 663: + case 188: + case 204: + case 205: + case 250: + case 251: + case 92: + case 85: + case 212: + case 213: + case 176: + case 189: + case 190: + case 175: + case 180: + case 87: + case 191: + case 192: + case 195: + case 196: + case 81: + case 83: + case 201: + case 202: + case 97: + case 86: + case 256: + case 1: + case 667: + case 665: + case 181: + case 95: + case 94: + case 96: + case 89: + case 2: + case 98: + case 90: + case 669: + case 210: + case 211: + case 93: + case 396: + case 208: + case 209: + case 24: + case 304: + case 305: + case 671: + case 673: + case 675: + case 82: + case 84: + case 677: + case 193: + case 194: + case 187: + case 88: + case 179: + case 140: + case 141: + case 701: + case 754: + case 661: + case 662: + case 453: + case 454: + case 128: + case 129: + case 123: + case 127: + case 311: + case 312: + case 125: + case 245: + case 99: + case 21: + case 646: + case 647: + case 692: + case 693: + case 130: + case 6: + case 255: + case 254: + case 253: + case 252: + case 586: + case 587: + case 117: + case 118: + case 238: + case 237: + case 639: + case 640: + case 150: + case 151: + case 152: + case 153: + case 231: + case 239: + case 154: + case 155: + case 156: + case 7: + case 170: + case 171: + case 158: + case 159: + case 8: + case 160: + case 157: + case 161: + case 629: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 162: + case 163: + case 203: + case 511: + case 512: + case 513: + case 113: + case 144: + case 114: + case 145: + case 362: + case 364: + case 365: + case 455: + case 456: + case 406: + case 407: + case 633: + case 634: + case 495: + case 496: + case 408: + case 409: + case 240: + case 241: + case 13: + case 14: + case 410: + case 546: + case 412: + case 413: + case 414: + case 425: + case 545: + case 427: + case 428: + case 429: + case 415: + case 416: + case 417: + case 418: + case 419: + case 136: + case 137: + case 457: + case 458: + case 590: + case 591: + case 343: + case 352: + case 146: + case 147: + case 597: + case 631: + case 632: + case 387: + case 232: + case 233: + case 385: + case 386: + case 402: + case 403: + case 504: + case 505: + case 444: + case 388: + case 389: + case 393: + case 394: + case 506: + case 507: + case 635: + case 636: + case 637: + case 638: + case 554: + case 555: + case 556: + case 557: + case 450: + case 561: + case 560: + case 558: + case 751: + case 559: + case 438: + case 439: + case 432: + case 433: + case 721: + case 722: + case 530: + case 601: + case 602: + case 172: + case 173: + case 538: + case 539: + case 440: + case 441: + case 752: + case 753: + case 5: + case 184: + case 627: + case 182: + case 183: + case 430: + case 431: + case 399: + case 400: + case 10000: + case 10001: + case 10002: + case 10003: + case 10004: + case 10005: + case 10006: + case 10007: + case 10008: + case 10009: + case 10010: + case 10011: + case 10012: + case 10013: + case 10014: + case 11000: + case 11001: + case 11002: + case 11003: + case 11004: + case 11005: + case 11006: + case 11007: + case 11008: + case 11009: + case 11010: + case 11011: + case 11012: + case 11013: + case 11014: + case 12000: + case 12001: + case 12002: + case 12003: + case 12004: + case 12005: + case 12006: + case 12007: + case 12008: + case 12009: + case 12010: + case 12011: + case 12012: + case 12013: + case 12014: + case 13000: + case 13001: + case 13002: + case 13003: + case 13004: + case 13005: + case 13006: + case 13007: + case 13008: + case 13009: + case 13010: + case 13011: + case 13012: + case 13013: + case 13014: + case 14000: + case 14001: + case 14002: + case 14003: + case 14004: + case 14005: + case 14006: + case 14007: + case 14008: + case 14009: + case 14010: + case 14011: + case 14012: + case 14013: + case 14014: + case 15000: + case 15001: + case 15002: + case 15003: + case 15004: + case 15005: + case 15006: + case 15007: + case 15008: + case 15009: + case 15010: + case 15011: + case 15012: + case 15013: + case 15014: + case 16000: + case 16001: + case 16002: + case 16003: + case 16004: + case 16005: + case 16006: + case 16007: + case 16008: + case 16009: + case 16010: + case 16011: + case 16012: + case 16013: + case 16014: + case 17000: + case 17001: + case 17002: + case 17003: + case 17004: + case 17005: + case 17006: + case 17007: + case 17008: + case 17009: + case 17010: + case 17011: + case 17012: + case 17013: + case 17014: + case 18000: + case 18001: + case 18002: + case 18003: + case 18004: + case 18005: + case 18006: + case 18007: + case 18008: + case 18009: + case 18010: + case 18011: + case 18012: + case 18013: + case 18014: + case 19000: + case 19001: + case 19002: + case 19003: + case 19004: + case 19005: + case 19006: + case 19007: + case 19008: + case 19009: + case 19010: + case 19011: + case 19012: + case 19013: + case 19014: + case 20000: + case 20001: + case 20002: + case 20003: + case 20004: + case 20005: + case 20006: + case 20007: + case 20008: + case 20009: + case 20010: + case 20011: + case 20012: + case 20013: + case 20014: + case 21000: + case 21001: + case 21002: + case 21003: + case 21004: + case 21005: + case 21006: + case 21007: + case 21008: + case 21009: + case 21010: + case 21011: + case 21012: + case 21013: + case 21014: + case 100000: + case 100001: + case 100002: + case 100003: + case 100004: + case 100005: + case 100006: + case 100007: + case 100008: + case 100009: + case 101000: + case 101001: + case 101002: + case 101003: + case 101004: + case 101005: + case 101006: + case 101007: + case 101008: + case 101009: + break; + } + } + if (message.metric != null && message.hasOwnProperty("metric")) { + if (properties.field === 1) + return "field: multiple values"; + properties.field = 1; + switch (message.metric) { + default: + return "metric: enum value expected"; + case 0: + case 223: + case 445: + case 659: + case 446: + case 447: + case 448: + case 449: + case 660: + case 661: + case 61: + case 58: + case 450: + case 451: + case 452: + case 453: + case 411: + case 57: + case 60: + case 662: + case 663: + case 664: + case 665: + case 454: + case 414: + case 666: + case 56: + case 667: + case 59: + case 73: + case 70: + case 69: + case 72: + case 642: + case 643: + case 644: + case 645: + case 68: + case 646: + case 71: + case 26: + case 23: + case 24: + case 22: + case 28: + case 27: + case 29: + case 30: + case 41: + case 25: + case 79: + case 76: + case 75: + case 78: + case 654: + case 655: + case 656: + case 657: + case 74: + case 658: + case 77: + case 18: + case 15: + case 244: + case 16: + case 245: + case 14: + case 427: + case 428: + case 246: + case 247: + case 248: + case 249: + case 250: + case 251: + case 20: + case 19: + case 21: + case 31: + case 252: + case 253: + case 254: + case 42: + case 17: + case 212: + case 429: + case 255: + case 256: + case 257: + case 241: + case 38: + case 67: + case 64: + case 63: + case 66: + case 332: + case 331: + case 334: + case 335: + case 62: + case 333: + case 65: + case 34: + case 10: + case 262: + case 7: + case 431: + case 554: + case 32: + case 8: + case 483: + case 484: + case 6: + case 222: + case 338: + case 12: + case 11: + case 35: + case 13: + case 40: + case 33: + case 213: + case 9: + case 274: + case 275: + case 264: + case 261: + case 259: + case 260: + case 260: + case 263: + case 242: + case 425: + case 430: + case 342: + case 343: + case 344: + case 345: + case 346: + case 347: + case 348: + case 472: + case 349: + case 350: + case 473: + case 351: + case 476: + case 352: + case 515: + case 353: + case 354: + case 355: + case 356: + case 357: + case 358: + case 474: + case 359: + case 360: + case 361: + case 362: + case 442: + case 363: + case 364: + case 365: + case 475: + case 366: + case 367: + case 368: + case 369: + case 370: + case 371: + case 372: + case 373: + case 374: + case 375: + case 376: + case 377: + case 378: + case 379: + case 380: + case 381: + case 382: + case 383: + case 384: + case 385: + case 387: + case 389: + case 390: + case 37: + case 5: + case 224: + case 225: + case 418: + case 226: + case 227: + case 228: + case 443: + case 444: + case 433: + case 2: + case 44: + case 440: + case 441: + case 324: + case 326: + case 327: + case 328: + case 325: + case 329: + case 3: + case 542: + case 543: + case 544: + case 545: + case 546: + case 521: + case 522: + case 523: + case 524: + case 525: + case 520: + case 526: + case 527: + case 528: + case 529: + case 531: + case 530: + case 415: + case 229: + case 230: + case 426: + case 270: + case 271: + case 272: + case 273: + case 258: + case 231: + case 232: + case 233: + case 234: + case 235: + case 236: + case 237: + case 129: + case 128: + case 131: + case 130: + case 127: + case 126: + case 1: + case 407: + case 547: + case 548: + case 404: + case 405: + case 584: + case 412: + case 409: + case 463: + case 432: + case 135: + case 136: + case 137: + case 132: + case 133: + case 134: + case 125: + case 124: + case 123: + case 177: + case 178: + case 176: + case 416: + case 39: + case 238: + case 36: + case 214: + case 4: + case 413: + case 587: + case 588: + case 589: + case 599: + case 600: + case 590: + case 591: + case 592: + case 593: + case 594: + case 595: + case 596: + case 597: + case 598: + case 503: + case 505: + case 504: + case 506: + case 507: + case 508: + case 509: + case 510: + case 511: + case 512: + case 513: + case 514: + case 477: + case 478: + case 479: + case 480: + case 434: + case 435: + case 436: + case 437: + case 438: + case 439: + case 239: + case 455: + case 457: + case 458: + case 459: + case 456: + case 460: + case 276: + case 277: + case 45: + case 417: + case 408: + case 406: + case 43: + case 550: + case 553: + case 551: + case 552: + case 549: + case 240: + case 486: + case 487: + case 488: + case 489: + case 490: + case 491: + case 492: + case 493: + case 494: + case 495: + case 496: + case 497: + case 498: + case 121: + case 122: + case 499: + case 500: + case 501: + case 502: + case 180: + case 181: + case 182: + case 183: + case 184: + case 185: + case 186: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 202: + case 203: + case 204: + case 205: + case 206: + case 207: + case 208: + case 209: + case 210: + case 211: + case 92: + case 93: + case 95: + case 96: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 601: + case 139: + case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 156: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 163: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + case 172: + case 173: + case 174: + case 138: + case 140: + case 175: + case 142: + case 141: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 94: + case 116: + case 117: + case 80: + case 81: + case 82: + case 83: + case 88: + case 87: + case 85: + case 89: + case 86: + case 118: + case 90: + case 215: + case 84: + break; + } + } + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Field) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Field(); + switch (object.dimension) { + default: + if (typeof object.dimension === "number") { + message.dimension = object.dimension; + break; + } + break; + case "DIMENSION_UNSPECIFIED": + case 0: + message.dimension = 0; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE": + case 575: + message.dimension = 575; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME": + case 576: + message.dimension = 576; + break; + case "ADVERTISER_CREDIT_STATUS": + case 475: + message.dimension = 475; + break; + case "ADVERTISER_CREDIT_STATUS_NAME": + case 476: + message.dimension = 476; + break; + case "ADVERTISER_DOMAIN_NAME": + case 242: + message.dimension = 242; + break; + case "ADVERTISER_EXTERNAL_ID": + case 228: + message.dimension = 228; + break; + case "ADVERTISER_ID": + case 131: + message.dimension = 131; + break; + case "ADVERTISER_LABELS": + case 230: + message.dimension = 230; + break; + case "ADVERTISER_LABEL_IDS": + case 229: + message.dimension = 229; + break; + case "ADVERTISER_NAME": + case 132: + message.dimension = 132; + break; + case "ADVERTISER_PRIMARY_CONTACT": + case 227: + message.dimension = 227; + break; + case "ADVERTISER_STATUS": + case 471: + message.dimension = 471; + break; + case "ADVERTISER_STATUS_NAME": + case 472: + message.dimension = 472; + break; + case "ADVERTISER_TYPE": + case 473: + message.dimension = 473; + break; + case "ADVERTISER_TYPE_NAME": + case 474: + message.dimension = 474; + break; + case "ADVERTISER_VERTICAL": + case 580: + message.dimension = 580; + break; + case "ADX_PRODUCT": + case 499: + message.dimension = 499; + break; + case "ADX_PRODUCT_NAME": + case 500: + message.dimension = 500; + break; + case "AD_EXPERIENCES_TYPE": + case 641: + message.dimension = 641; + break; + case "AD_EXPERIENCES_TYPE_NAME": + case 642: + message.dimension = 642; + break; + case "AD_LOCATION": + case 390: + message.dimension = 390; + break; + case "AD_LOCATION_NAME": + case 391: + message.dimension = 391; + break; + case "AD_TECHNOLOGY_PROVIDER_DOMAIN": + case 620: + message.dimension = 620; + break; + case "AD_TECHNOLOGY_PROVIDER_ID": + case 621: + message.dimension = 621; + break; + case "AD_TECHNOLOGY_PROVIDER_NAME": + case 622: + message.dimension = 622; + break; + case "AD_TYPE": + case 497: + message.dimension = 497; + break; + case "AD_TYPE_NAME": + case 498: + message.dimension = 498; + break; + case "AD_UNIT_CODE": + case 64: + message.dimension = 64; + break; + case "AD_UNIT_CODE_LEVEL_1": + case 65: + message.dimension = 65; + break; + case "AD_UNIT_CODE_LEVEL_10": + case 74: + message.dimension = 74; + break; + case "AD_UNIT_CODE_LEVEL_11": + case 75: + message.dimension = 75; + break; + case "AD_UNIT_CODE_LEVEL_12": + case 76: + message.dimension = 76; + break; + case "AD_UNIT_CODE_LEVEL_13": + case 77: + message.dimension = 77; + break; + case "AD_UNIT_CODE_LEVEL_14": + case 78: + message.dimension = 78; + break; + case "AD_UNIT_CODE_LEVEL_15": + case 79: + message.dimension = 79; + break; + case "AD_UNIT_CODE_LEVEL_16": + case 80: + message.dimension = 80; + break; + case "AD_UNIT_CODE_LEVEL_2": + case 66: + message.dimension = 66; + break; + case "AD_UNIT_CODE_LEVEL_3": + case 67: + message.dimension = 67; + break; + case "AD_UNIT_CODE_LEVEL_4": + case 68: + message.dimension = 68; + break; + case "AD_UNIT_CODE_LEVEL_5": + case 69: + message.dimension = 69; + break; + case "AD_UNIT_CODE_LEVEL_6": + case 70: + message.dimension = 70; + break; + case "AD_UNIT_CODE_LEVEL_7": + case 71: + message.dimension = 71; + break; + case "AD_UNIT_CODE_LEVEL_8": + case 72: + message.dimension = 72; + break; + case "AD_UNIT_CODE_LEVEL_9": + case 73: + message.dimension = 73; + break; + case "AD_UNIT_ID": + case 25: + message.dimension = 25; + break; + case "AD_UNIT_ID_ALL_LEVEL": + case 27: + message.dimension = 27; + break; + case "AD_UNIT_ID_LEVEL_1": + case 30: + message.dimension = 30; + break; + case "AD_UNIT_ID_LEVEL_10": + case 48: + message.dimension = 48; + break; + case "AD_UNIT_ID_LEVEL_11": + case 50: + message.dimension = 50; + break; + case "AD_UNIT_ID_LEVEL_12": + case 52: + message.dimension = 52; + break; + case "AD_UNIT_ID_LEVEL_13": + case 54: + message.dimension = 54; + break; + case "AD_UNIT_ID_LEVEL_14": + case 56: + message.dimension = 56; + break; + case "AD_UNIT_ID_LEVEL_15": + case 58: + message.dimension = 58; + break; + case "AD_UNIT_ID_LEVEL_16": + case 60: + message.dimension = 60; + break; + case "AD_UNIT_ID_LEVEL_2": + case 32: + message.dimension = 32; + break; + case "AD_UNIT_ID_LEVEL_3": + case 34: + message.dimension = 34; + break; + case "AD_UNIT_ID_LEVEL_4": + case 36: + message.dimension = 36; + break; + case "AD_UNIT_ID_LEVEL_5": + case 38: + message.dimension = 38; + break; + case "AD_UNIT_ID_LEVEL_6": + case 40: + message.dimension = 40; + break; + case "AD_UNIT_ID_LEVEL_7": + case 42: + message.dimension = 42; + break; + case "AD_UNIT_ID_LEVEL_8": + case 44: + message.dimension = 44; + break; + case "AD_UNIT_ID_LEVEL_9": + case 46: + message.dimension = 46; + break; + case "AD_UNIT_ID_TOP_LEVEL": + case 142: + message.dimension = 142; + break; + case "AD_UNIT_NAME": + case 26: + message.dimension = 26; + break; + case "AD_UNIT_NAME_ALL_LEVEL": + case 29: + message.dimension = 29; + break; + case "AD_UNIT_NAME_LEVEL_1": + case 31: + message.dimension = 31; + break; + case "AD_UNIT_NAME_LEVEL_10": + case 49: + message.dimension = 49; + break; + case "AD_UNIT_NAME_LEVEL_11": + case 51: + message.dimension = 51; + break; + case "AD_UNIT_NAME_LEVEL_12": + case 53: + message.dimension = 53; + break; + case "AD_UNIT_NAME_LEVEL_13": + case 55: + message.dimension = 55; + break; + case "AD_UNIT_NAME_LEVEL_14": + case 57: + message.dimension = 57; + break; + case "AD_UNIT_NAME_LEVEL_15": + case 59: + message.dimension = 59; + break; + case "AD_UNIT_NAME_LEVEL_16": + case 61: + message.dimension = 61; + break; + case "AD_UNIT_NAME_LEVEL_2": + case 33: + message.dimension = 33; + break; + case "AD_UNIT_NAME_LEVEL_3": + case 35: + message.dimension = 35; + break; + case "AD_UNIT_NAME_LEVEL_4": + case 37: + message.dimension = 37; + break; + case "AD_UNIT_NAME_LEVEL_5": + case 39: + message.dimension = 39; + break; + case "AD_UNIT_NAME_LEVEL_6": + case 41: + message.dimension = 41; + break; + case "AD_UNIT_NAME_LEVEL_7": + case 43: + message.dimension = 43; + break; + case "AD_UNIT_NAME_LEVEL_8": + case 45: + message.dimension = 45; + break; + case "AD_UNIT_NAME_LEVEL_9": + case 47: + message.dimension = 47; + break; + case "AD_UNIT_NAME_TOP_LEVEL": + case 143: + message.dimension = 143; + break; + case "AD_UNIT_REWARD_AMOUNT": + case 63: + message.dimension = 63; + break; + case "AD_UNIT_REWARD_TYPE": + case 62: + message.dimension = 62; + break; + case "AD_UNIT_STATUS": + case 206: + message.dimension = 206; + break; + case "AD_UNIT_STATUS_NAME": + case 207: + message.dimension = 207; + break; + case "AGENCY_LEVEL_1_ID": + case 565: + message.dimension = 565; + break; + case "AGENCY_LEVEL_1_NAME": + case 566: + message.dimension = 566; + break; + case "AGENCY_LEVEL_2_ID": + case 567: + message.dimension = 567; + break; + case "AGENCY_LEVEL_2_NAME": + case 568: + message.dimension = 568; + break; + case "AGENCY_LEVEL_3_ID": + case 569: + message.dimension = 569; + break; + case "AGENCY_LEVEL_3_NAME": + case 570: + message.dimension = 570; + break; + case "AGE_BRACKET": + case 508: + message.dimension = 508; + break; + case "AGE_BRACKET_NAME": + case 582: + message.dimension = 582; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS": + case 442: + message.dimension = 442; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME": + case 443: + message.dimension = 443; + break; + case "APP_VERSION": + case 392: + message.dimension = 392; + break; + case "AUCTION_PACKAGE_DEAL": + case 579: + message.dimension = 579; + break; + case "AUCTION_PACKAGE_DEAL_ID": + case 571: + message.dimension = 571; + break; + case "AUDIENCE_SEGMENT_ID_TARGETED": + case 584: + message.dimension = 584; + break; + case "AUDIENCE_SEGMENT_TARGETED": + case 585: + message.dimension = 585; + break; + case "AUTO_REFRESHED_TRAFFIC": + case 421: + message.dimension = 421; + break; + case "AUTO_REFRESHED_TRAFFIC_NAME": + case 422: + message.dimension = 422; + break; + case "BIDDER_ENCRYPTED_ID": + case 493: + message.dimension = 493; + break; + case "BIDDER_NAME": + case 494: + message.dimension = 494; + break; + case "BID_RANGE": + case 679: + message.dimension = 679; + break; + case "BID_REJECTION_REASON": + case 599: + message.dimension = 599; + break; + case "BID_REJECTION_REASON_NAME": + case 600: + message.dimension = 600; + break; + case "BRANDING_TYPE": + case 383: + message.dimension = 383; + break; + case "BRANDING_TYPE_NAME": + case 384: + message.dimension = 384; + break; + case "BROWSER_CATEGORY": + case 119: + message.dimension = 119; + break; + case "BROWSER_CATEGORY_NAME": + case 120: + message.dimension = 120; + break; + case "BROWSER_ID": + case 235: + message.dimension = 235; + break; + case "BROWSER_NAME": + case 236: + message.dimension = 236; + break; + case "BUYER_NETWORK_ID": + case 448: + message.dimension = 448; + break; + case "BUYER_NETWORK_NAME": + case 449: + message.dimension = 449; + break; + case "CALLOUT_STATUS_CATEGORY": + case 588: + message.dimension = 588; + break; + case "CALLOUT_STATUS_CATEGORY_NAME": + case 589: + message.dimension = 589; + break; + case "CARRIER_ID": + case 369: + message.dimension = 369; + break; + case "CARRIER_NAME": + case 368: + message.dimension = 368; + break; + case "CHANNEL": + case 501: + message.dimension = 501; + break; + case "CHILD_NETWORK_CODE": + case 542: + message.dimension = 542; + break; + case "CHILD_NETWORK_ID": + case 544: + message.dimension = 544; + break; + case "CHILD_PARTNER_NAME": + case 543: + message.dimension = 543; + break; + case "CITY_ID": + case 459: + message.dimension = 459; + break; + case "CITY_NAME": + case 452: + message.dimension = 452; + break; + case "CLASSIFIED_ADVERTISER_ID": + case 133: + message.dimension = 133; + break; + case "CLASSIFIED_ADVERTISER_NAME": + case 134: + message.dimension = 134; + break; + case "CLASSIFIED_BRAND_ID": + case 243: + message.dimension = 243; + break; + case "CLASSIFIED_BRAND_NAME": + case 244: + message.dimension = 244; + break; + case "CONTENT_CMS_NAME": + case 643: + message.dimension = 643; + break; + case "CONTENT_CMS_VIDEO_ID": + case 644: + message.dimension = 644; + break; + case "CONTENT_ID": + case 246: + message.dimension = 246; + break; + case "CONTENT_MAPPING_PRESENCE": + case 731: + message.dimension = 731; + break; + case "CONTENT_MAPPING_PRESENCE_NAME": + case 732: + message.dimension = 732; + break; + case "CONTENT_NAME": + case 247: + message.dimension = 247; + break; + case "CONTINENT": + case 469: + message.dimension = 469; + break; + case "CONTINENT_NAME": + case 470: + message.dimension = 470; + break; + case "COUNTRY_CODE": + case 466: + message.dimension = 466; + break; + case "COUNTRY_ID": + case 11: + message.dimension = 11; + break; + case "COUNTRY_NAME": + case 12: + message.dimension = 12; + break; + case "CREATIVE_BILLING_TYPE": + case 366: + message.dimension = 366; + break; + case "CREATIVE_BILLING_TYPE_NAME": + case 367: + message.dimension = 367; + break; + case "CREATIVE_CLICK_THROUGH_URL": + case 174: + message.dimension = 174; + break; + case "CREATIVE_ID": + case 138: + message.dimension = 138; + break; + case "CREATIVE_NAME": + case 139: + message.dimension = 139; + break; + case "CREATIVE_POLICIES_FILTERING": + case 711: + message.dimension = 711; + break; + case "CREATIVE_POLICIES_FILTERING_NAME": + case 712: + message.dimension = 712; + break; + case "CREATIVE_PROTECTIONS_FILTERING": + case 704: + message.dimension = 704; + break; + case "CREATIVE_PROTECTIONS_FILTERING_NAME": + case 705: + message.dimension = 705; + break; + case "CREATIVE_SET_ROLE_TYPE": + case 686: + message.dimension = 686; + break; + case "CREATIVE_SET_ROLE_TYPE_NAME": + case 687: + message.dimension = 687; + break; + case "CREATIVE_TECHNOLOGY": + case 148: + message.dimension = 148; + break; + case "CREATIVE_TECHNOLOGY_NAME": + case 149: + message.dimension = 149; + break; + case "CREATIVE_THIRD_PARTY_VENDOR": + case 361: + message.dimension = 361; + break; + case "CREATIVE_TYPE": + case 344: + message.dimension = 344; + break; + case "CREATIVE_TYPE_NAME": + case 345: + message.dimension = 345; + break; + case "CREATIVE_VENDOR_ID": + case 706: + message.dimension = 706; + break; + case "CREATIVE_VENDOR_NAME": + case 707: + message.dimension = 707; + break; + case "CREATIVE_VIDEO_REDIRECT_THIRD_PARTY": + case 562: + message.dimension = 562; + break; + case "CURATOR_ID": + case 572: + message.dimension = 572; + break; + case "CURATOR_NAME": + case 573: + message.dimension = 573; + break; + case "CUSTOM_EVENT_ID": + case 737: + message.dimension = 737; + break; + case "CUSTOM_EVENT_NAME": + case 735: + message.dimension = 735; + break; + case "CUSTOM_EVENT_TYPE": + case 736: + message.dimension = 736; + break; + case "CUSTOM_EVENT_TYPE_NAME": + case 738: + message.dimension = 738; + break; + case "CUSTOM_SPOT_ID": + case 423: + message.dimension = 423; + break; + case "CUSTOM_SPOT_NAME": + case 424: + message.dimension = 424; + break; + case "DATE": + case 3: + message.dimension = 3; + break; + case "DAY_OF_WEEK": + case 4: + message.dimension = 4; + break; + case "DEAL_BUYER_ID": + case 240: + message.dimension = 240; + break; + case "DEAL_BUYER_NAME": + case 241: + message.dimension = 241; + break; + case "DEAL_ID": + case 436: + message.dimension = 436; + break; + case "DEAL_NAME": + case 437: + message.dimension = 437; + break; + case "DELIVERED_SECURE_SIGNAL_ID": + case 309: + message.dimension = 309; + break; + case "DELIVERED_SECURE_SIGNAL_NAME": + case 310: + message.dimension = 310; + break; + case "DEMAND_CHANNEL": + case 9: + message.dimension = 9; + break; + case "DEMAND_CHANNEL_NAME": + case 10: + message.dimension = 10; + break; + case "DEMAND_SOURCE": + case 592: + message.dimension = 592; + break; + case "DEMAND_SOURCE_NAME": + case 593: + message.dimension = 593; + break; + case "DEMAND_SUBCHANNEL": + case 22: + message.dimension = 22; + break; + case "DEMAND_SUBCHANNEL_NAME": + case 23: + message.dimension = 23; + break; + case "DEVICE": + case 226: + message.dimension = 226; + break; + case "DEVICE_CATEGORY": + case 15: + message.dimension = 15; + break; + case "DEVICE_CATEGORY_NAME": + case 16: + message.dimension = 16; + break; + case "DEVICE_MANUFACTURER_ID": + case 525: + message.dimension = 525; + break; + case "DEVICE_MANUFACTURER_NAME": + case 526: + message.dimension = 526; + break; + case "DEVICE_MODEL_ID": + case 527: + message.dimension = 527; + break; + case "DEVICE_MODEL_NAME": + case 528: + message.dimension = 528; + break; + case "DEVICE_NAME": + case 225: + message.dimension = 225; + break; + case "DSP_SEAT_ID": + case 564: + message.dimension = 564; + break; + case "DYNAMIC_ALLOCATION_TYPE": + case 502: + message.dimension = 502; + break; + case "DYNAMIC_ALLOCATION_TYPE_NAME": + case 503: + message.dimension = 503; + break; + case "ESP_DELIVERY": + case 623: + message.dimension = 623; + break; + case "ESP_DELIVERY_NAME": + case 624: + message.dimension = 624; + break; + case "ESP_PRESENCE": + case 625: + message.dimension = 625; + break; + case "ESP_PRESENCE_NAME": + case 626: + message.dimension = 626; + break; + case "EXCHANGE_BIDDING_DEAL_ID": + case 715: + message.dimension = 715; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE": + case 714: + message.dimension = 714; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE_NAME": + case 723: + message.dimension = 723; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_ID": + case 185: + message.dimension = 185; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": + case 186: + message.dimension = 186; + break; + case "FIRST_LOOK_PRICING_RULE_ID": + case 248: + message.dimension = 248; + break; + case "FIRST_LOOK_PRICING_RULE_NAME": + case 249: + message.dimension = 249; + break; + case "FIRST_PARTY_ID_STATUS": + case 404: + message.dimension = 404; + break; + case "FIRST_PARTY_ID_STATUS_NAME": + case 405: + message.dimension = 405; + break; + case "GENDER": + case 509: + message.dimension = 509; + break; + case "GENDER_NAME": + case 583: + message.dimension = 583; + break; + case "GOOGLE_ANALYTICS_STREAM_ID": + case 519: + message.dimension = 519; + break; + case "GOOGLE_ANALYTICS_STREAM_NAME": + case 520: + message.dimension = 520; + break; + case "HBT_YIELD_PARTNER_ID": + case 659: + message.dimension = 659; + break; + case "HBT_YIELD_PARTNER_NAME": + case 660: + message.dimension = 660; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE": + case 718: + message.dimension = 718; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE_NAME": + case 719: + message.dimension = 719; + break; + case "HOUR": + case 100: + message.dimension = 100; + break; + case "IMPRESSION_COUNTING_METHOD": + case 577: + message.dimension = 577; + break; + case "IMPRESSION_COUNTING_METHOD_NAME": + case 578: + message.dimension = 578; + break; + case "INTERACTION_TYPE": + case 223: + message.dimension = 223; + break; + case "INTERACTION_TYPE_NAME": + case 224: + message.dimension = 224; + break; + case "INTEREST": + case 510: + message.dimension = 510; + break; + case "INVENTORY_FORMAT": + case 17: + message.dimension = 17; + break; + case "INVENTORY_FORMAT_NAME": + case 18: + message.dimension = 18; + break; + case "INVENTORY_SHARE_ASSIGNMENT_ID": + case 648: + message.dimension = 648; + break; + case "INVENTORY_SHARE_ASSIGNMENT_NAME": + case 649: + message.dimension = 649; + break; + case "INVENTORY_SHARE_OUTCOME": + case 603: + message.dimension = 603; + break; + case "INVENTORY_SHARE_OUTCOME_NAME": + case 604: + message.dimension = 604; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER": + case 652: + message.dimension = 652; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER_NAME": + case 653: + message.dimension = 653; + break; + case "INVENTORY_SHARE_TARGET_SHARE_PERCENT": + case 654: + message.dimension = 654; + break; + case "INVENTORY_SHARE_TYPE": + case 650: + message.dimension = 650; + break; + case "INVENTORY_SHARE_TYPE_NAME": + case 651: + message.dimension = 651; + break; + case "INVENTORY_TYPE": + case 19: + message.dimension = 19; + break; + case "INVENTORY_TYPE_NAME": + case 20: + message.dimension = 20; + break; + case "IS_ADX_DIRECT": + case 382: + message.dimension = 382; + break; + case "IS_CURATION_TARGETED": + case 574: + message.dimension = 574; + break; + case "IS_DROPPED": + case 464: + message.dimension = 464; + break; + case "IS_FIRST_LOOK_DEAL": + case 401: + message.dimension = 401; + break; + case "KEY_VALUES_ID": + case 214: + message.dimension = 214; + break; + case "KEY_VALUES_NAME": + case 215: + message.dimension = 215; + break; + case "LINE_ITEM_AGENCY": + case 663: + message.dimension = 663; + break; + case "LINE_ITEM_ARCHIVED": + case 188: + message.dimension = 188; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION": + case 204: + message.dimension = 204; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": + case 205: + message.dimension = 205; + break; + case "LINE_ITEM_COMPUTED_STATUS": + case 250: + message.dimension = 250; + break; + case "LINE_ITEM_COMPUTED_STATUS_NAME": + case 251: + message.dimension = 251; + break; + case "LINE_ITEM_CONTRACTED_QUANTITY": + case 92: + message.dimension = 92; + break; + case "LINE_ITEM_COST_PER_UNIT": + case 85: + message.dimension = 85; + break; + case "LINE_ITEM_COST_TYPE": + case 212: + message.dimension = 212; + break; + case "LINE_ITEM_COST_TYPE_NAME": + case 213: + message.dimension = 213; + break; + case "LINE_ITEM_CREATIVE_END_DATE": + case 176: + message.dimension = 176; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE": + case 189: + message.dimension = 189; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": + case 190: + message.dimension = 190; + break; + case "LINE_ITEM_CREATIVE_START_DATE": + case 175: + message.dimension = 175; + break; + case "LINE_ITEM_CURRENCY_CODE": + case 180: + message.dimension = 180; + break; + case "LINE_ITEM_DELIVERY_INDICATOR": + case 87: + message.dimension = 87; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE": + case 191: + message.dimension = 191; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": + case 192: + message.dimension = 192; + break; + case "LINE_ITEM_DISCOUNT_ABSOLUTE": + case 195: + message.dimension = 195; + break; + case "LINE_ITEM_DISCOUNT_PERCENTAGE": + case 196: + message.dimension = 196; + break; + case "LINE_ITEM_END_DATE": + case 81: + message.dimension = 81; + break; + case "LINE_ITEM_END_DATE_TIME": + case 83: + message.dimension = 83; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE": + case 201: + message.dimension = 201; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": + case 202: + message.dimension = 202; + break; + case "LINE_ITEM_EXTERNAL_DEAL_ID": + case 97: + message.dimension = 97; + break; + case "LINE_ITEM_EXTERNAL_ID": + case 86: + message.dimension = 86; + break; + case "LINE_ITEM_FREQUENCY_CAP": + case 256: + message.dimension = 256; + break; + case "LINE_ITEM_ID": + case 1: + message.dimension = 1; + break; + case "LINE_ITEM_LABELS": + case 667: + message.dimension = 667; + break; + case "LINE_ITEM_LABEL_IDS": + case 665: + message.dimension = 665; + break; + case "LINE_ITEM_LAST_MODIFIED_BY_APP": + case 181: + message.dimension = 181; + break; + case "LINE_ITEM_LIFETIME_CLICKS": + case 95: + message.dimension = 95; + break; + case "LINE_ITEM_LIFETIME_IMPRESSIONS": + case 94: + message.dimension = 94; + break; + case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": + case 96: + message.dimension = 96; + break; + case "LINE_ITEM_MAKEGOOD": + case 89: + message.dimension = 89; + break; + case "LINE_ITEM_NAME": + case 2: + message.dimension = 2; + break; + case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": + case 98: + message.dimension = 98; + break; + case "LINE_ITEM_OPTIMIZABLE": + case 90: + message.dimension = 90; + break; + case "LINE_ITEM_PO_NUMBER": + case 669: + message.dimension = 669; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE": + case 210: + message.dimension = 210; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": + case 211: + message.dimension = 211; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": + case 93: + message.dimension = 93; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": + case 396: + message.dimension = 396; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": + case 208: + message.dimension = 208; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": + case 209: + message.dimension = 209; + break; + case "LINE_ITEM_PRIORITY": + case 24: + message.dimension = 24; + break; + case "LINE_ITEM_RESERVATION_STATUS": + case 304: + message.dimension = 304; + break; + case "LINE_ITEM_RESERVATION_STATUS_NAME": + case 305: + message.dimension = 305; + break; + case "LINE_ITEM_SALESPERSON": + case 671: + message.dimension = 671; + break; + case "LINE_ITEM_SECONDARY_SALESPEOPLE": + case 673: + message.dimension = 673; + break; + case "LINE_ITEM_SECONDARY_TRAFFICKERS": + case 675: + message.dimension = 675; + break; + case "LINE_ITEM_START_DATE": + case 82: + message.dimension = 82; + break; + case "LINE_ITEM_START_DATE_TIME": + case 84: + message.dimension = 84; + break; + case "LINE_ITEM_TRAFFICKER": + case 677: + message.dimension = 677; + break; + case "LINE_ITEM_TYPE": + case 193: + message.dimension = 193; + break; + case "LINE_ITEM_TYPE_NAME": + case 194: + message.dimension = 194; + break; + case "LINE_ITEM_UNLIMITED_END": + case 187: + message.dimension = 187; + break; + case "LINE_ITEM_VALUE_COST_PER_UNIT": + case 88: + message.dimension = 88; + break; + case "LINE_ITEM_WEB_PROPERTY_CODE": + case 179: + message.dimension = 179; + break; + case "MASTER_COMPANION_CREATIVE_ID": + case 140: + message.dimension = 140; + break; + case "MASTER_COMPANION_CREATIVE_NAME": + case 141: + message.dimension = 141; + break; + case "MEDIATION_TYPE": + case 701: + message.dimension = 701; + break; + case "MEDIATION_TYPE_NAME": + case 754: + message.dimension = 754; + break; + case "MEDIATION_YIELD_PARTNER_ID": + case 661: + message.dimension = 661; + break; + case "MEDIATION_YIELD_PARTNER_NAME": + case 662: + message.dimension = 662; + break; + case "METRO_ID": + case 453: + message.dimension = 453; + break; + case "METRO_NAME": + case 454: + message.dimension = 454; + break; + case "MOBILE_APP_FREE": + case 128: + message.dimension = 128; + break; + case "MOBILE_APP_ICON_URL": + case 129: + message.dimension = 129; + break; + case "MOBILE_APP_ID": + case 123: + message.dimension = 123; + break; + case "MOBILE_APP_NAME": + case 127: + message.dimension = 127; + break; + case "MOBILE_APP_OWNERSHIP_STATUS": + case 311: + message.dimension = 311; + break; + case "MOBILE_APP_OWNERSHIP_STATUS_NAME": + case 312: + message.dimension = 312; + break; + case "MOBILE_APP_STORE": + case 125: + message.dimension = 125; + break; + case "MOBILE_APP_STORE_NAME": + case 245: + message.dimension = 245; + break; + case "MOBILE_INVENTORY_TYPE": + case 99: + message.dimension = 99; + break; + case "MOBILE_INVENTORY_TYPE_NAME": + case 21: + message.dimension = 21; + break; + case "MOBILE_RENDERING_SDK": + case 646: + message.dimension = 646; + break; + case "MOBILE_RENDERING_SDK_NAME": + case 647: + message.dimension = 647; + break; + case "MOBILE_SDK_MAJOR_VERSION": + case 692: + message.dimension = 692; + break; + case "MOBILE_SDK_MINOR_VERSION": + case 693: + message.dimension = 693; + break; + case "MOBILE_SDK_VERSION_NAME": + case 130: + message.dimension = 130; + break; + case "MONTH_YEAR": + case 6: + message.dimension = 6; + break; + case "NATIVE_AD_FORMAT_ID": + case 255: + message.dimension = 255; + break; + case "NATIVE_AD_FORMAT_NAME": + case 254: + message.dimension = 254; + break; + case "NATIVE_STYLE_ID": + case 253: + message.dimension = 253; + break; + case "NATIVE_STYLE_NAME": + case 252: + message.dimension = 252; + break; + case "NO_FILL_REASON_CATEGORY": + case 586: + message.dimension = 586; + break; + case "NO_FILL_REASON_CATEGORY_NAME": + case 587: + message.dimension = 587; + break; + case "OPERATING_SYSTEM_CATEGORY": + case 117: + message.dimension = 117; + break; + case "OPERATING_SYSTEM_CATEGORY_NAME": + case 118: + message.dimension = 118; + break; + case "OPERATING_SYSTEM_VERSION_ID": + case 238: + message.dimension = 238; + break; + case "OPERATING_SYSTEM_VERSION_NAME": + case 237: + message.dimension = 237; + break; + case "OPTIMIZATION_TYPE": + case 639: + message.dimension = 639; + break; + case "OPTIMIZATION_TYPE_NAME": + case 640: + message.dimension = 640; + break; + case "ORDER_AGENCY": + case 150: + message.dimension = 150; + break; + case "ORDER_AGENCY_ID": + case 151: + message.dimension = 151; + break; + case "ORDER_BOOKED_CPC": + case 152: + message.dimension = 152; + break; + case "ORDER_BOOKED_CPM": + case 153: + message.dimension = 153; + break; + case "ORDER_DELIVERY_STATUS": + case 231: + message.dimension = 231; + break; + case "ORDER_DELIVERY_STATUS_NAME": + case 239: + message.dimension = 239; + break; + case "ORDER_END_DATE": + case 154: + message.dimension = 154; + break; + case "ORDER_END_DATE_TIME": + case 155: + message.dimension = 155; + break; + case "ORDER_EXTERNAL_ID": + case 156: + message.dimension = 156; + break; + case "ORDER_ID": + case 7: + message.dimension = 7; + break; + case "ORDER_LABELS": + case 170: + message.dimension = 170; + break; + case "ORDER_LABEL_IDS": + case 171: + message.dimension = 171; + break; + case "ORDER_LIFETIME_CLICKS": + case 158: + message.dimension = 158; + break; + case "ORDER_LIFETIME_IMPRESSIONS": + case 159: + message.dimension = 159; + break; + case "ORDER_NAME": + case 8: + message.dimension = 8; + break; + case "ORDER_PO_NUMBER": + case 160: + message.dimension = 160; + break; + case "ORDER_PROGRAMMATIC": + case 157: + message.dimension = 157; + break; + case "ORDER_SALESPERSON": + case 161: + message.dimension = 161; + break; + case "ORDER_SALESPERSON_ID": + case 629: + message.dimension = 629; + break; + case "ORDER_SECONDARY_SALESPEOPLE": + case 164: + message.dimension = 164; + break; + case "ORDER_SECONDARY_SALESPEOPLE_ID": + case 165: + message.dimension = 165; + break; + case "ORDER_SECONDARY_TRAFFICKERS": + case 166: + message.dimension = 166; + break; + case "ORDER_SECONDARY_TRAFFICKERS_ID": + case 167: + message.dimension = 167; + break; + case "ORDER_START_DATE": + case 168: + message.dimension = 168; + break; + case "ORDER_START_DATE_TIME": + case 169: + message.dimension = 169; + break; + case "ORDER_TRAFFICKER": + case 162: + message.dimension = 162; + break; + case "ORDER_TRAFFICKER_ID": + case 163: + message.dimension = 163; + break; + case "ORDER_UNLIMITED_END": + case 203: + message.dimension = 203; + break; + case "PAGE_PATH": + case 511: + message.dimension = 511; + break; + case "PAGE_TITLE_AND_SCREEN_CLASS": + case 512: + message.dimension = 512; + break; + case "PAGE_TITLE_AND_SCREEN_NAME": + case 513: + message.dimension = 513; + break; + case "PLACEMENT_ID": + case 113: + message.dimension = 113; + break; + case "PLACEMENT_ID_ALL": + case 144: + message.dimension = 144; + break; + case "PLACEMENT_NAME": + case 114: + message.dimension = 114; + break; + case "PLACEMENT_NAME_ALL": + case 145: + message.dimension = 145; + break; + case "PLACEMENT_STATUS": + case 362: + message.dimension = 362; + break; + case "PLACEMENT_STATUS_NAME": + case 364: + message.dimension = 364; + break; + case "PLACEMENT_STATUS_NAME_ALL": + case 365: + message.dimension = 365; + break; + case "POSTAL_CODE_ID": + case 455: + message.dimension = 455; + break; + case "POSTAL_CODE_NAME": + case 456: + message.dimension = 456; + break; + case "PPID_STATUS": + case 406: + message.dimension = 406; + break; + case "PPID_STATUS_NAME": + case 407: + message.dimension = 407; + break; + case "PREDICTED_VIEWABILITY_BUCKET": + case 633: + message.dimension = 633; + break; + case "PREDICTED_VIEWABILITY_BUCKET_NAME": + case 634: + message.dimension = 634; + break; + case "PRESENTED_SECURE_SIGNAL_ID": + case 495: + message.dimension = 495; + break; + case "PRESENTED_SECURE_SIGNAL_NAME": + case 496: + message.dimension = 496; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE": + case 408: + message.dimension = 408; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE_NAME": + case 409: + message.dimension = 409; + break; + case "PROGRAMMATIC_BUYER_ID": + case 240: + message.dimension = 240; + break; + case "PROGRAMMATIC_BUYER_NAME": + case 241: + message.dimension = 241; + break; + case "PROGRAMMATIC_CHANNEL": + case 13: + message.dimension = 13; + break; + case "PROGRAMMATIC_CHANNEL_NAME": + case 14: + message.dimension = 14; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE": + case 410: + message.dimension = 410; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS": + case 546: + message.dimension = 546; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME": + case 412: + message.dimension = 412; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER": + case 413: + message.dimension = 413; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE": + case 414: + message.dimension = 414; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE": + case 425: + message.dimension = 425; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS": + case 545: + message.dimension = 545; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME": + case 427: + message.dimension = 427; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER": + case 428: + message.dimension = 428; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE": + case 429: + message.dimension = 429; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE": + case 415: + message.dimension = 415; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID": + case 416: + message.dimension = 416; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME": + case 417: + message.dimension = 417; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER": + case 418: + message.dimension = 418; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE": + case 419: + message.dimension = 419; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID": + case 136: + message.dimension = 136; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME": + case 137: + message.dimension = 137; + break; + case "REGION_ID": + case 457: + message.dimension = 457; + break; + case "REGION_NAME": + case 458: + message.dimension = 458; + break; + case "REJECTION_CLASS_CATEGORY": + case 590: + message.dimension = 590; + break; + case "REJECTION_CLASS_CATEGORY_NAME": + case 591: + message.dimension = 591; + break; + case "RENDERED_CREATIVE_SIZE": + case 343: + message.dimension = 343; + break; + case "REQUESTED_AD_SIZES": + case 352: + message.dimension = 352; + break; + case "REQUEST_TYPE": + case 146: + message.dimension = 146; + break; + case "REQUEST_TYPE_NAME": + case 147: + message.dimension = 147; + break; + case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": + case 597: + message.dimension = 597; + break; + case "SERVING_RESTRICTION": + case 631: + message.dimension = 631; + break; + case "SERVING_RESTRICTION_NAME": + case 632: + message.dimension = 632; + break; + case "SITE": + case 387: + message.dimension = 387; + break; + case "TARGETING_ID": + case 232: + message.dimension = 232; + break; + case "TARGETING_NAME": + case 233: + message.dimension = 233; + break; + case "TARGETING_TYPE": + case 385: + message.dimension = 385; + break; + case "TARGETING_TYPE_NAME": + case 386: + message.dimension = 386; + break; + case "THIRD_PARTY_ID_STATUS": + case 402: + message.dimension = 402; + break; + case "THIRD_PARTY_ID_STATUS_NAME": + case 403: + message.dimension = 403; + break; + case "TOPICS_STATUS": + case 504: + message.dimension = 504; + break; + case "TOPICS_STATUS_NAME": + case 505: + message.dimension = 505; + break; + case "TOP_PRIVATE_DOMAIN": + case 444: + message.dimension = 444; + break; + case "TRAFFIC_SOURCE": + case 388: + message.dimension = 388; + break; + case "TRAFFIC_SOURCE_NAME": + case 389: + message.dimension = 389; + break; + case "UNIFIED_PRICING_RULE_ID": + case 393: + message.dimension = 393; + break; + case "UNIFIED_PRICING_RULE_NAME": + case 394: + message.dimension = 394; + break; + case "URL": + case 506: + message.dimension = 506; + break; + case "URL_ID": + case 507: + message.dimension = 507; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE": + case 635: + message.dimension = 635; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE_NAME": + case 636: + message.dimension = 636; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID": + case 637: + message.dimension = 637; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME": + case 638: + message.dimension = 638; + break; + case "VAST_VERSION": + case 554: + message.dimension = 554; + break; + case "VAST_VERSION_NAME": + case 555: + message.dimension = 555; + break; + case "VIDEO_AD_BREAK_TYPE": + case 556: + message.dimension = 556; + break; + case "VIDEO_AD_BREAK_TYPE_NAME": + case 557: + message.dimension = 557; + break; + case "VIDEO_AD_DURATION": + case 450: + message.dimension = 450; + break; + case "VIDEO_AD_FORMATS_RULE": + case 561: + message.dimension = 561; + break; + case "VIDEO_AD_FORMATS_RULE_ID": + case 560: + message.dimension = 560; + break; + case "VIDEO_AD_REQUEST_DURATION": + case 558: + message.dimension = 558; + break; + case "VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME": + case 751: + message.dimension = 751; + break; + case "VIDEO_AD_REQUEST_DURATION_NAME": + case 559: + message.dimension = 559; + break; + case "VIDEO_AD_REQUEST_SOURCE": + case 438: + message.dimension = 438; + break; + case "VIDEO_AD_REQUEST_SOURCE_NAME": + case 439: + message.dimension = 439; + break; + case "VIDEO_AD_TYPE": + case 432: + message.dimension = 432; + break; + case "VIDEO_AD_TYPE_NAME": + case 433: + message.dimension = 433; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE": + case 721: + message.dimension = 721; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE_NAME": + case 722: + message.dimension = 722; + break; + case "VIDEO_FALLBACK_POSITION": + case 530: + message.dimension = 530; + break; + case "VIDEO_MEASUREMENT_SOURCE": + case 601: + message.dimension = 601; + break; + case "VIDEO_MEASUREMENT_SOURCE_NAME": + case 602: + message.dimension = 602; + break; + case "VIDEO_PLCMT": + case 172: + message.dimension = 172; + break; + case "VIDEO_PLCMT_NAME": + case 173: + message.dimension = 173; + break; + case "VIDEO_POSITION_IN_POD": + case 538: + message.dimension = 538; + break; + case "VIDEO_POSITION_OF_POD": + case 539: + message.dimension = 539; + break; + case "VIDEO_SDK_VERSION": + case 440: + message.dimension = 440; + break; + case "VIDEO_SDK_VERSION_NAME": + case 441: + message.dimension = 441; + break; + case "VIDEO_STITCHER_TYPE": + case 752: + message.dimension = 752; + break; + case "VIDEO_STITCHER_TYPE_NAME": + case 753: + message.dimension = 753; + break; + case "WEEK": + case 5: + message.dimension = 5; + break; + case "YIELD_GROUP_BUYER_NAME": + case 184: + message.dimension = 184; + break; + case "YIELD_GROUP_BUYER_TAG_NAME": + case 627: + message.dimension = 627; + break; + case "YIELD_GROUP_ID": + case 182: + message.dimension = 182; + break; + case "YIELD_GROUP_NAME": + case 183: + message.dimension = 183; + break; + case "YOUTUBE_AD_DURATION_BUCKET": + case 430: + message.dimension = 430; + break; + case "YOUTUBE_AD_DURATION_BUCKET_NAME": + case 431: + message.dimension = 431; + break; + case "YOUTUBE_AD_TYPE": + case 399: + message.dimension = 399; + break; + case "YOUTUBE_AD_TYPE_NAME": + case 400: + message.dimension = 400; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 10000: + message.dimension = 10000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 10001: + message.dimension = 10001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 10002: + message.dimension = 10002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 10003: + message.dimension = 10003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 10004: + message.dimension = 10004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 10005: + message.dimension = 10005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 10006: + message.dimension = 10006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 10007: + message.dimension = 10007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 10008: + message.dimension = 10008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 10009: + message.dimension = 10009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 10010: + message.dimension = 10010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 10011: + message.dimension = 10011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 10012: + message.dimension = 10012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 10013: + message.dimension = 10013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 10014: + message.dimension = 10014; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 11000: + message.dimension = 11000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 11001: + message.dimension = 11001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 11002: + message.dimension = 11002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 11003: + message.dimension = 11003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 11004: + message.dimension = 11004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 11005: + message.dimension = 11005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 11006: + message.dimension = 11006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 11007: + message.dimension = 11007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 11008: + message.dimension = 11008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 11009: + message.dimension = 11009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 11010: + message.dimension = 11010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 11011: + message.dimension = 11011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 11012: + message.dimension = 11012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 11013: + message.dimension = 11013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 11014: + message.dimension = 11014; + break; + case "ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 12000: + message.dimension = 12000; + break; + case "ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 12001: + message.dimension = 12001; + break; + case "ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 12002: + message.dimension = 12002; + break; + case "ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 12003: + message.dimension = 12003; + break; + case "ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 12004: + message.dimension = 12004; + break; + case "ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 12005: + message.dimension = 12005; + break; + case "ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 12006: + message.dimension = 12006; + break; + case "ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 12007: + message.dimension = 12007; + break; + case "ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 12008: + message.dimension = 12008; + break; + case "ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 12009: + message.dimension = 12009; + break; + case "ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 12010: + message.dimension = 12010; + break; + case "ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 12011: + message.dimension = 12011; + break; + case "ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 12012: + message.dimension = 12012; + break; + case "ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 12013: + message.dimension = 12013; + break; + case "ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 12014: + message.dimension = 12014; + break; + case "ORDER_CUSTOM_FIELD_0_VALUE": + case 13000: + message.dimension = 13000; + break; + case "ORDER_CUSTOM_FIELD_1_VALUE": + case 13001: + message.dimension = 13001; + break; + case "ORDER_CUSTOM_FIELD_2_VALUE": + case 13002: + message.dimension = 13002; + break; + case "ORDER_CUSTOM_FIELD_3_VALUE": + case 13003: + message.dimension = 13003; + break; + case "ORDER_CUSTOM_FIELD_4_VALUE": + case 13004: + message.dimension = 13004; + break; + case "ORDER_CUSTOM_FIELD_5_VALUE": + case 13005: + message.dimension = 13005; + break; + case "ORDER_CUSTOM_FIELD_6_VALUE": + case 13006: + message.dimension = 13006; + break; + case "ORDER_CUSTOM_FIELD_7_VALUE": + case 13007: + message.dimension = 13007; + break; + case "ORDER_CUSTOM_FIELD_8_VALUE": + case 13008: + message.dimension = 13008; + break; + case "ORDER_CUSTOM_FIELD_9_VALUE": + case 13009: + message.dimension = 13009; + break; + case "ORDER_CUSTOM_FIELD_10_VALUE": + case 13010: + message.dimension = 13010; + break; + case "ORDER_CUSTOM_FIELD_11_VALUE": + case 13011: + message.dimension = 13011; + break; + case "ORDER_CUSTOM_FIELD_12_VALUE": + case 13012: + message.dimension = 13012; + break; + case "ORDER_CUSTOM_FIELD_13_VALUE": + case 13013: + message.dimension = 13013; + break; + case "ORDER_CUSTOM_FIELD_14_VALUE": + case 13014: + message.dimension = 13014; + break; + case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 14000: + message.dimension = 14000; + break; + case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 14001: + message.dimension = 14001; + break; + case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 14002: + message.dimension = 14002; + break; + case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 14003: + message.dimension = 14003; + break; + case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 14004: + message.dimension = 14004; + break; + case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 14005: + message.dimension = 14005; + break; + case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 14006: + message.dimension = 14006; + break; + case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 14007: + message.dimension = 14007; + break; + case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 14008: + message.dimension = 14008; + break; + case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 14009: + message.dimension = 14009; + break; + case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 14010: + message.dimension = 14010; + break; + case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 14011: + message.dimension = 14011; + break; + case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 14012: + message.dimension = 14012; + break; + case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 14013: + message.dimension = 14013; + break; + case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 14014: + message.dimension = 14014; + break; + case "CREATIVE_CUSTOM_FIELD_0_VALUE": + case 15000: + message.dimension = 15000; + break; + case "CREATIVE_CUSTOM_FIELD_1_VALUE": + case 15001: + message.dimension = 15001; + break; + case "CREATIVE_CUSTOM_FIELD_2_VALUE": + case 15002: + message.dimension = 15002; + break; + case "CREATIVE_CUSTOM_FIELD_3_VALUE": + case 15003: + message.dimension = 15003; + break; + case "CREATIVE_CUSTOM_FIELD_4_VALUE": + case 15004: + message.dimension = 15004; + break; + case "CREATIVE_CUSTOM_FIELD_5_VALUE": + case 15005: + message.dimension = 15005; + break; + case "CREATIVE_CUSTOM_FIELD_6_VALUE": + case 15006: + message.dimension = 15006; + break; + case "CREATIVE_CUSTOM_FIELD_7_VALUE": + case 15007: + message.dimension = 15007; + break; + case "CREATIVE_CUSTOM_FIELD_8_VALUE": + case 15008: + message.dimension = 15008; + break; + case "CREATIVE_CUSTOM_FIELD_9_VALUE": + case 15009: + message.dimension = 15009; + break; + case "CREATIVE_CUSTOM_FIELD_10_VALUE": + case 15010: + message.dimension = 15010; + break; + case "CREATIVE_CUSTOM_FIELD_11_VALUE": + case 15011: + message.dimension = 15011; + break; + case "CREATIVE_CUSTOM_FIELD_12_VALUE": + case 15012: + message.dimension = 15012; + break; + case "CREATIVE_CUSTOM_FIELD_13_VALUE": + case 15013: + message.dimension = 15013; + break; + case "CREATIVE_CUSTOM_FIELD_14_VALUE": + case 15014: + message.dimension = 15014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 16000: + message.dimension = 16000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 16001: + message.dimension = 16001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 16002: + message.dimension = 16002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 16003: + message.dimension = 16003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 16004: + message.dimension = 16004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 16005: + message.dimension = 16005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 16006: + message.dimension = 16006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 16007: + message.dimension = 16007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 16008: + message.dimension = 16008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 16009: + message.dimension = 16009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 16010: + message.dimension = 16010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 16011: + message.dimension = 16011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 16012: + message.dimension = 16012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 16013: + message.dimension = 16013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 16014: + message.dimension = 16014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 17000: + message.dimension = 17000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 17001: + message.dimension = 17001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 17002: + message.dimension = 17002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 17003: + message.dimension = 17003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 17004: + message.dimension = 17004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 17005: + message.dimension = 17005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 17006: + message.dimension = 17006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 17007: + message.dimension = 17007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 17008: + message.dimension = 17008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 17009: + message.dimension = 17009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 17010: + message.dimension = 17010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 17011: + message.dimension = 17011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 17012: + message.dimension = 17012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 17013: + message.dimension = 17013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 17014: + message.dimension = 17014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 18000: + message.dimension = 18000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 18001: + message.dimension = 18001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 18002: + message.dimension = 18002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 18003: + message.dimension = 18003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 18004: + message.dimension = 18004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 18005: + message.dimension = 18005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 18006: + message.dimension = 18006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 18007: + message.dimension = 18007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 18008: + message.dimension = 18008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 18009: + message.dimension = 18009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 18010: + message.dimension = 18010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 18011: + message.dimension = 18011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 18012: + message.dimension = 18012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 18013: + message.dimension = 18013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 18014: + message.dimension = 18014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": + case 19000: + message.dimension = 19000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": + case 19001: + message.dimension = 19001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": + case 19002: + message.dimension = 19002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": + case 19003: + message.dimension = 19003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": + case 19004: + message.dimension = 19004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": + case 19005: + message.dimension = 19005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": + case 19006: + message.dimension = 19006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": + case 19007: + message.dimension = 19007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": + case 19008: + message.dimension = 19008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": + case 19009: + message.dimension = 19009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": + case 19010: + message.dimension = 19010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": + case 19011: + message.dimension = 19011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": + case 19012: + message.dimension = 19012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": + case 19013: + message.dimension = 19013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": + case 19014: + message.dimension = 19014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 20000: + message.dimension = 20000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 20001: + message.dimension = 20001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 20002: + message.dimension = 20002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 20003: + message.dimension = 20003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 20004: + message.dimension = 20004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 20005: + message.dimension = 20005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 20006: + message.dimension = 20006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 20007: + message.dimension = 20007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 20008: + message.dimension = 20008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 20009: + message.dimension = 20009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 20010: + message.dimension = 20010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 20011: + message.dimension = 20011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 20012: + message.dimension = 20012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 20013: + message.dimension = 20013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 20014: + message.dimension = 20014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": + case 21000: + message.dimension = 21000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": + case 21001: + message.dimension = 21001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": + case 21002: + message.dimension = 21002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": + case 21003: + message.dimension = 21003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": + case 21004: + message.dimension = 21004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": + case 21005: + message.dimension = 21005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": + case 21006: + message.dimension = 21006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": + case 21007: + message.dimension = 21007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": + case 21008: + message.dimension = 21008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": + case 21009: + message.dimension = 21009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": + case 21010: + message.dimension = 21010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": + case 21011: + message.dimension = 21011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": + case 21012: + message.dimension = 21012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": + case 21013: + message.dimension = 21013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": + case 21014: + message.dimension = 21014; + break; + case "CUSTOM_DIMENSION_0_VALUE_ID": + case 100000: + message.dimension = 100000; + break; + case "CUSTOM_DIMENSION_1_VALUE_ID": + case 100001: + message.dimension = 100001; + break; + case "CUSTOM_DIMENSION_2_VALUE_ID": + case 100002: + message.dimension = 100002; + break; + case "CUSTOM_DIMENSION_3_VALUE_ID": + case 100003: + message.dimension = 100003; + break; + case "CUSTOM_DIMENSION_4_VALUE_ID": + case 100004: + message.dimension = 100004; + break; + case "CUSTOM_DIMENSION_5_VALUE_ID": + case 100005: + message.dimension = 100005; + break; + case "CUSTOM_DIMENSION_6_VALUE_ID": + case 100006: + message.dimension = 100006; + break; + case "CUSTOM_DIMENSION_7_VALUE_ID": + case 100007: + message.dimension = 100007; + break; + case "CUSTOM_DIMENSION_8_VALUE_ID": + case 100008: + message.dimension = 100008; + break; + case "CUSTOM_DIMENSION_9_VALUE_ID": + case 100009: + message.dimension = 100009; + break; + case "CUSTOM_DIMENSION_0_VALUE": + case 101000: + message.dimension = 101000; + break; + case "CUSTOM_DIMENSION_1_VALUE": + case 101001: + message.dimension = 101001; + break; + case "CUSTOM_DIMENSION_2_VALUE": + case 101002: + message.dimension = 101002; + break; + case "CUSTOM_DIMENSION_3_VALUE": + case 101003: + message.dimension = 101003; + break; + case "CUSTOM_DIMENSION_4_VALUE": + case 101004: + message.dimension = 101004; + break; + case "CUSTOM_DIMENSION_5_VALUE": + case 101005: + message.dimension = 101005; + break; + case "CUSTOM_DIMENSION_6_VALUE": + case 101006: + message.dimension = 101006; + break; + case "CUSTOM_DIMENSION_7_VALUE": + case 101007: + message.dimension = 101007; + break; + case "CUSTOM_DIMENSION_8_VALUE": + case 101008: + message.dimension = 101008; + break; + case "CUSTOM_DIMENSION_9_VALUE": + case 101009: + message.dimension = 101009; + break; + } + switch (object.metric) { + default: + if (typeof object.metric === "number") { + message.metric = object.metric; + break; + } + break; + case "METRIC_UNSPECIFIED": + case 0: + message.metric = 0; + break; + case "ACTIVE_USERS": + case 223: + message.metric = 223; + break; + case "ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT": + case 445: + message.metric = 445; + break; + case "ACTIVE_VIEW_AUDIBLE_IMPRESSIONS": + case 659: + message.metric = 659; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT": + case 446: + message.metric = 446; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT": + case 447: + message.metric = 447; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT": + case 448: + message.metric = 448; + break; + case "ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT": + case 449: + message.metric = 449; + break; + case "ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS": + case 660: + message.metric = 660; + break; + case "ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS": + case 661: + message.metric = 661; + break; + case "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 61: + message.metric = 61; + break; + case "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 58: + message.metric = 58; + break; + case "ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT": + case 450: + message.metric = 450; + break; + case "ACTIVE_VIEW_EVER_AUDIBLE_PERCENT": + case 451: + message.metric = 451; + break; + case "ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT": + case 452: + message.metric = 452; + break; + case "ACTIVE_VIEW_EVER_MUTED_PERCENT": + case 453: + message.metric = 453; + break; + case "ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION": + case 411: + message.metric = 411; + break; + case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 57: + message.metric = 57; + break; + case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 60: + message.metric = 60; + break; + case "ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 662: + message.metric = 662; + break; + case "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 663: + message.metric = 663; + break; + case "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 664: + message.metric = 664; + break; + case "ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS": + case 665: + message.metric = 665; + break; + case "ACTIVE_VIEW_PLUS_MEASURABLE_COUNT": + case 454: + message.metric = 454; + break; + case "ACTIVE_VIEW_REVENUE": + case 414: + message.metric = 414; + break; + case "ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 666: + message.metric = 666; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 56: + message.metric = 56; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 667: + message.metric = 667; + break; + case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 59: + message.metric = 59; + break; + case "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 73: + message.metric = 73; + break; + case "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 70: + message.metric = 70; + break; + case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 69: + message.metric = 69; + break; + case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 72: + message.metric = 72; + break; + case "ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 642: + message.metric = 642; + break; + case "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 643: + message.metric = 643; + break; + case "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 644: + message.metric = 644; + break; + case "ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 645: + message.metric = 645; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 68: + message.metric = 68; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 646: + message.metric = 646; + break; + case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 71: + message.metric = 71; + break; + case "ADSENSE_AVERAGE_ECPM": + case 26: + message.metric = 26; + break; + case "ADSENSE_CLICKS": + case 23: + message.metric = 23; + break; + case "ADSENSE_CTR": + case 24: + message.metric = 24; + break; + case "ADSENSE_IMPRESSIONS": + case 22: + message.metric = 22; + break; + case "ADSENSE_PERCENT_CLICKS": + case 28: + message.metric = 28; + break; + case "ADSENSE_PERCENT_IMPRESSIONS": + case 27: + message.metric = 27; + break; + case "ADSENSE_PERCENT_REVENUE": + case 29: + message.metric = 29; + break; + case "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": + case 30: + message.metric = 30; + break; + case "ADSENSE_RESPONSES_SERVED": + case 41: + message.metric = 41; + break; + case "ADSENSE_REVENUE": + case 25: + message.metric = 25; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 79: + message.metric = 79; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 76: + message.metric = 76; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 75: + message.metric = 75; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 78: + message.metric = 78; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 654: + message.metric = 654; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 655: + message.metric = 655; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 656: + message.metric = 656; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 657: + message.metric = 657; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 74: + message.metric = 74; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 658: + message.metric = 658; + break; + case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 77: + message.metric = 77; + break; + case "AD_EXCHANGE_AVERAGE_ECPM": + case 18: + message.metric = 18; + break; + case "AD_EXCHANGE_CLICKS": + case 15: + message.metric = 15; + break; + case "AD_EXCHANGE_CPC": + case 244: + message.metric = 244; + break; + case "AD_EXCHANGE_CTR": + case 16: + message.metric = 16; + break; + case "AD_EXCHANGE_DELIVERY_RATE": + case 245: + message.metric = 245; + break; + case "AD_EXCHANGE_IMPRESSIONS": + case 14: + message.metric = 14; + break; + case "AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER": + case 427: + message.metric = 427; + break; + case "AD_EXCHANGE_IMPRESSIONS_PER_SESSION": + case 428: + message.metric = 428; + break; + case "AD_EXCHANGE_LIFT": + case 246: + message.metric = 246; + break; + case "AD_EXCHANGE_MATCHED_REQUEST_CTR": + case 247: + message.metric = 247; + break; + case "AD_EXCHANGE_MATCHED_REQUEST_ECPM": + case 248: + message.metric = 248; + break; + case "AD_EXCHANGE_MATCH_RATE": + case 249: + message.metric = 249; + break; + case "AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS": + case 250: + message.metric = 250; + break; + case "AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS": + case 251: + message.metric = 251; + break; + case "AD_EXCHANGE_PERCENT_CLICKS": + case 20: + message.metric = 20; + break; + case "AD_EXCHANGE_PERCENT_IMPRESSIONS": + case 19: + message.metric = 19; + break; + case "AD_EXCHANGE_PERCENT_REVENUE": + case 21: + message.metric = 21; + break; + case "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": + case 31: + message.metric = 31; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM": + case 252: + message.metric = 252; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS": + case 253: + message.metric = 253; + break; + case "AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE": + case 254: + message.metric = 254; + break; + case "AD_EXCHANGE_RESPONSES_SERVED": + case 42: + message.metric = 42; + break; + case "AD_EXCHANGE_REVENUE": + case 17: + message.metric = 17; + break; + case "AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 212: + message.metric = 212; + break; + case "AD_EXCHANGE_REVENUE_PER_AD_VIEWER": + case 429: + message.metric = 429; + break; + case "AD_EXCHANGE_TOTAL_REQUESTS": + case 255: + message.metric = 255; + break; + case "AD_EXCHANGE_TOTAL_REQUEST_CTR": + case 256: + message.metric = 256; + break; + case "AD_EXCHANGE_TOTAL_REQUEST_ECPM": + case 257: + message.metric = 257; + break; + case "AD_EXPOSURE_SECONDS": + case 241: + message.metric = 241; + break; + case "AD_REQUESTS": + case 38: + message.metric = 38; + break; + case "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": + case 67: + message.metric = 67; + break; + case "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": + case 64: + message.metric = 64; + break; + case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": + case 63: + message.metric = 63; + break; + case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": + case 66: + message.metric = 66; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": + case 332: + message.metric = 332; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": + case 331: + message.metric = 331; + break; + case "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 334: + message.metric = 334; + break; + case "AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": + case 335: + message.metric = 335; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": + case 62: + message.metric = 62; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": + case 333: + message.metric = 333; + break; + case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": + case 65: + message.metric = 65; + break; + case "AD_SERVER_AVERAGE_ECPM": + case 34: + message.metric = 34; + break; + case "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": + case 10: + message.metric = 10; + break; + case "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": + case 262: + message.metric = 262; + break; + case "AD_SERVER_CLICKS": + case 7: + message.metric = 7; + break; + case "AD_SERVER_COMPLETED_VIEWS": + case 431: + message.metric = 431; + break; + case "AD_SERVER_COVIEWED_IMPRESSIONS": + case 554: + message.metric = 554; + break; + case "AD_SERVER_CPD_REVENUE": + case 32: + message.metric = 32; + break; + case "AD_SERVER_CTR": + case 8: + message.metric = 8; + break; + case "AD_SERVER_GROSS_REVENUE": + case 483: + message.metric = 483; + break; + case "AD_SERVER_GROSS_REVENUE_WITHOUT_CPD": + case 484: + message.metric = 484; + break; + case "AD_SERVER_IMPRESSIONS": + case 6: + message.metric = 6; + break; + case "AD_SERVER_IMPRESSIONS_WITH_COMPANION": + case 222: + message.metric = 222; + break; + case "AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": + case 338: + message.metric = 338; + break; + case "AD_SERVER_PERCENT_CLICKS": + case 12: + message.metric = 12; + break; + case "AD_SERVER_PERCENT_IMPRESSIONS": + case 11: + message.metric = 11; + break; + case "AD_SERVER_PERCENT_REVENUE": + case 35: + message.metric = 35; + break; + case "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": + case 13: + message.metric = 13; + break; + case "AD_SERVER_RESPONSES_SERVED": + case 40: + message.metric = 40; + break; + case "AD_SERVER_REVENUE": + case 33: + message.metric = 33; + break; + case "AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 213: + message.metric = 213; + break; + case "AD_SERVER_REVENUE_WITHOUT_CPD": + case 9: + message.metric = 9; + break; + case "AD_SERVER_TARGETED_CLICKS": + case 274: + message.metric = 274; + break; + case "AD_SERVER_TARGETED_IMPRESSIONS": + case 275: + message.metric = 275; + break; + case "AD_SERVER_TRACKED_ADS": + case 264: + message.metric = 264; + break; + case "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": + case 261: + message.metric = 261; + break; + case "AD_SERVER_UNFILTERED_CLICKS": + case 259: + message.metric = 259; + break; + case "AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS": + case 260: + message.metric = 260; + break; + case "AD_SERVER_UNFILTERED_IMPRESSIONS": + case 260: + message.metric = 260; + break; + case "AD_SERVER_UNFILTERED_TRACKED_ADS": + case 263: + message.metric = 263; + break; + case "AD_UNIT_EXPOSURE_SECONDS": + case 242: + message.metric = 242; + break; + case "AD_VIEWERS": + case 425: + message.metric = 425; + break; + case "ATN_ADS_FAILED_TO_RENDER": + case 430: + message.metric = 430; + break; + case "ATN_ELIGIBLE_LINE_ITEMS": + case 342: + message.metric = 342; + break; + case "ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS": + case 343: + message.metric = 343; + break; + case "ATN_HBT_ALLOWED_AD_REQUESTS": + case 344: + message.metric = 344; + break; + case "ATN_HBT_BIDS_IN_AUCTION": + case 345: + message.metric = 345; + break; + case "ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS": + case 346: + message.metric = 346; + break; + case "ATN_HBT_CANDIDATE_BIDS": + case 347: + message.metric = 347; + break; + case "ATN_HBT_INVALID_AD_REQUESTS": + case 348: + message.metric = 348; + break; + case "ATN_HBT_NO_BIDS_AD_REQUESTS": + case 472: + message.metric = 472; + break; + case "ATN_HBT_REJECTED_BIDS": + case 349: + message.metric = 349; + break; + case "ATN_HBT_VALID_AD_REQUESTS": + case 350: + message.metric = 350; + break; + case "ATN_HBT_WITH_BIDS_AD_REQUESTS": + case 473: + message.metric = 473; + break; + case "ATN_INVALID_AD_REQUESTS": + case 351: + message.metric = 351; + break; + case "ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED": + case 476: + message.metric = 476; + break; + case "ATN_LINE_ITEMS_IN_AUCTION": + case 352: + message.metric = 352; + break; + case "ATN_LINE_ITEMS_NOT_COMPETING": + case 515: + message.metric = 515; + break; + case "ATN_LINE_ITEMS_NOT_SELECTED": + case 353: + message.metric = 353; + break; + case "ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS": + case 354: + message.metric = 354; + break; + case "ATN_LINE_ITEM_TARGETED_AD_REQUESTS": + case 355: + message.metric = 355; + break; + case "ATN_MEDIATION_ALLOWED_AD_REQUESTS": + case 356: + message.metric = 356; + break; + case "ATN_MEDIATION_INVALID_AD_REQUESTS": + case 357: + message.metric = 357; + break; + case "ATN_MEDIATION_LOADED_ADS_FROM_CHAINS": + case 358: + message.metric = 358; + break; + case "ATN_MEDIATION_NO_PARTNER_AD_REQUESTS": + case 474: + message.metric = 474; + break; + case "ATN_MEDIATION_PARTNERS_IN_AUCTION": + case 359: + message.metric = 359; + break; + case "ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS": + case 360: + message.metric = 360; + break; + case "ATN_MEDIATION_REJECTED_PARTNERS": + case 361: + message.metric = 361; + break; + case "ATN_MEDIATION_TARGETED_PARTNERS": + case 362: + message.metric = 362; + break; + case "ATN_MEDIATION_TOTAL_YIELD_PARTNERS": + case 442: + message.metric = 442; + break; + case "ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS": + case 363: + message.metric = 363; + break; + case "ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS": + case 364: + message.metric = 364; + break; + case "ATN_MEDIATION_VALID_AD_REQUESTS": + case 365: + message.metric = 365; + break; + case "ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS": + case 475: + message.metric = 475; + break; + case "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS": + case 366: + message.metric = 366; + break; + case "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT": + case 367: + message.metric = 367; + break; + case "ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS": + case 368: + message.metric = 368; + break; + case "ATN_PROGRAMMATIC_BIDS_IN_AUCTION": + case 369: + message.metric = 369; + break; + case "ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS": + case 370: + message.metric = 370; + break; + case "ATN_PROGRAMMATIC_BID_REQUESTS_SENT": + case 371: + message.metric = 371; + break; + case "ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE": + case 372: + message.metric = 372; + break; + case "ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES": + case 373: + message.metric = 373; + break; + case "ATN_PROGRAMMATIC_BID_REQUEST_ERRORS": + case 374: + message.metric = 374; + break; + case "ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS": + case 375: + message.metric = 375; + break; + case "ATN_PROGRAMMATIC_REJECTED_BIDS": + case 376: + message.metric = 376; + break; + case "ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS": + case 377: + message.metric = 377; + break; + case "ATN_PROGRAMMATIC_TOTAL_BIDS": + case 378: + message.metric = 378; + break; + case "ATN_PROGRAMMATIC_VALID_AD_REQUESTS": + case 379: + message.metric = 379; + break; + case "ATN_REJECTED_LINE_ITEMS": + case 380: + message.metric = 380; + break; + case "ATN_SERVED_MEDIATION_CHAINS": + case 381: + message.metric = 381; + break; + case "ATN_SERVED_SINGLE_ADS": + case 382: + message.metric = 382; + break; + case "ATN_TARGETED_LINE_ITEMS": + case 383: + message.metric = 383; + break; + case "ATN_TOTAL_AD_REQUESTS": + case 384: + message.metric = 384; + break; + case "ATN_TOTAL_COMPETING_ADS_IN_AUCTION": + case 385: + message.metric = 385; + break; + case "ATN_TOTAL_LOADED_ADS": + case 387: + message.metric = 387; + break; + case "ATN_VALID_AD_REQUESTS": + case 389: + message.metric = 389; + break; + case "ATN_YIELD_GROUP_MEDIATION_PASSBACKS": + case 390: + message.metric = 390; + break; + case "AVERAGE_ECPM": + case 37: + message.metric = 37; + break; + case "AVERAGE_ECPM_WITHOUT_CPD": + case 5: + message.metric = 5; + break; + case "AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION": + case 224: + message.metric = 224; + break; + case "AVERAGE_ENGAGEMENT_SECONDS_PER_USER": + case 225: + message.metric = 225; + break; + case "AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR": + case 418: + message.metric = 418; + break; + case "AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER": + case 226: + message.metric = 226; + break; + case "AVERAGE_REVENUE_PER_USER": + case 227: + message.metric = 227; + break; + case "AVERAGE_SESSION_SECONDS": + case 228: + message.metric = 228; + break; + case "BIDS": + case 443: + message.metric = 443; + break; + case "BID_AVERAGE_CPM": + case 444: + message.metric = 444; + break; + case "BOUNCE_RATE": + case 433: + message.metric = 433; + break; + case "CLICKS": + case 2: + message.metric = 2; + break; + case "CODE_SERVED_COUNT": + case 44: + message.metric = 44; + break; + case "CPC_REVENUE": + case 440: + message.metric = 440; + break; + case "CPM_REVENUE": + case 441: + message.metric = 441; + break; + case "CREATIVE_LOAD_TIME_0_500_PERCENT": + case 324: + message.metric = 324; + break; + case "CREATIVE_LOAD_TIME_1000_2000_PERCENT": + case 326: + message.metric = 326; + break; + case "CREATIVE_LOAD_TIME_2000_4000_PERCENT": + case 327: + message.metric = 327; + break; + case "CREATIVE_LOAD_TIME_4000_8000_PERCENT": + case 328: + message.metric = 328; + break; + case "CREATIVE_LOAD_TIME_500_1000_PERCENT": + case 325: + message.metric = 325; + break; + case "CREATIVE_LOAD_TIME_GT_8000_PERCENT": + case 329: + message.metric = 329; + break; + case "CTR": + case 3: + message.metric = 3; + break; + case "DEALS_BIDS": + case 542: + message.metric = 542; + break; + case "DEALS_BID_RATE": + case 543: + message.metric = 543; + break; + case "DEALS_BID_REQUESTS": + case 544: + message.metric = 544; + break; + case "DEALS_WINNING_BIDS": + case 545: + message.metric = 545; + break; + case "DEALS_WIN_RATE": + case 546: + message.metric = 546; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": + case 521: + message.metric = 521; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": + case 522: + message.metric = 522; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": + case 523: + message.metric = 523; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": + case 524: + message.metric = 524; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": + case 525: + message.metric = 525; + break; + case "DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": + case 520: + message.metric = 520; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT": + case 526: + message.metric = 526; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT": + case 527: + message.metric = 527; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT": + case 528: + message.metric = 528; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT": + case 529: + message.metric = 529; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT": + case 531: + message.metric = 531; + break; + case "DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT": + case 530: + message.metric = 530; + break; + case "DROPOFF_RATE": + case 415: + message.metric = 415; + break; + case "ENGAGED_SESSIONS": + case 229: + message.metric = 229; + break; + case "ENGAGED_SESSIONS_PER_USER": + case 230: + message.metric = 230; + break; + case "ENGAGEMENT_RATE": + case 426: + message.metric = 426; + break; + case "EUROPEAN_REGULATIONS_CONSENT_RATE": + case 270: + message.metric = 270; + break; + case "EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE": + case 271: + message.metric = 271; + break; + case "EUROPEAN_REGULATIONS_MESSAGES_SHOWN": + case 272: + message.metric = 272; + break; + case "EUROPEAN_REGULATIONS_NO_CONSENT_RATE": + case 273: + message.metric = 273; + break; + case "FILL_RATE": + case 258: + message.metric = 258; + break; + case "GOOGLE_ANALYTICS_CLICKS": + case 231: + message.metric = 231; + break; + case "GOOGLE_ANALYTICS_CTR": + case 232: + message.metric = 232; + break; + case "GOOGLE_ANALYTICS_ECPM": + case 233: + message.metric = 233; + break; + case "GOOGLE_ANALYTICS_IMPRESSIONS": + case 234: + message.metric = 234; + break; + case "GOOGLE_ANALYTICS_REVENUE": + case 235: + message.metric = 235; + break; + case "GOOGLE_ANALYTICS_VIEWS": + case 236: + message.metric = 236; + break; + case "GOOGLE_ANALYTICS_VIEWS_PER_USER": + case 237: + message.metric = 237; + break; + case "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": + case 129: + message.metric = 129; + break; + case "GOOGLE_SOLD_AUCTION_IMPRESSIONS": + case 128: + message.metric = 128; + break; + case "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": + case 131: + message.metric = 131; + break; + case "GOOGLE_SOLD_IMPRESSIONS": + case 130: + message.metric = 130; + break; + case "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": + case 127: + message.metric = 127; + break; + case "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": + case 126: + message.metric = 126; + break; + case "IMPRESSIONS": + case 1: + message.metric = 1; + break; + case "INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": + case 407: + message.metric = 407; + break; + case "INVENTORY_SHARES": + case 547: + message.metric = 547; + break; + case "INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES": + case 548: + message.metric = 548; + break; + case "INVOICED_IMPRESSIONS": + case 404: + message.metric = 404; + break; + case "INVOICED_UNFILLED_IMPRESSIONS": + case 405: + message.metric = 405; + break; + case "MEDIATION_CHAINS_FILLED": + case 584: + message.metric = 584; + break; + case "MUTED_IMPRESSIONS": + case 412: + message.metric = 412; + break; + case "MUTE_ELIGIBLE_IMPRESSIONS": + case 409: + message.metric = 409; + break; + case "OPPORTUNITIES": + case 463: + message.metric = 463; + break; + case "OVERDELIVERED_IMPRESSIONS": + case 432: + message.metric = 432; + break; + case "PARTNER_SALES_FILLED_POD_REQUESTS": + case 135: + message.metric = 135; + break; + case "PARTNER_SALES_FILL_RATE": + case 136: + message.metric = 136; + break; + case "PARTNER_SALES_PARTNER_MATCH_RATE": + case 137: + message.metric = 137; + break; + case "PARTNER_SALES_QUERIES": + case 132: + message.metric = 132; + break; + case "PARTNER_SALES_UNFILLED_IMPRESSIONS": + case 133: + message.metric = 133; + break; + case "PARTNER_SALES_UNMATCHED_QUERIES": + case 134: + message.metric = 134; + break; + case "PARTNER_SOLD_CODE_SERVED": + case 125: + message.metric = 125; + break; + case "PARTNER_SOLD_COVIEWED_IMPRESSIONS": + case 124: + message.metric = 124; + break; + case "PARTNER_SOLD_IMPRESSIONS": + case 123: + message.metric = 123; + break; + case "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": + case 177: + message.metric = 177; + break; + case "PROGRAMMATIC_MATCH_RATE": + case 178: + message.metric = 178; + break; + case "PROGRAMMATIC_RESPONSES_SERVED": + case 176: + message.metric = 176; + break; + case "REACH_IMPRESSIONS": + case 416: + message.metric = 416; + break; + case "RESPONSES_SERVED": + case 39: + message.metric = 39; + break; + case "RETENTION": + case 238: + message.metric = 238; + break; + case "REVENUE": + case 36: + message.metric = 36; + break; + case "REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 214: + message.metric = 214; + break; + case "REVENUE_WITHOUT_CPD": + case 4: + message.metric = 4; + break; + case "REWARDS_GRANTED": + case 413: + message.metric = 413; + break; + case "RICH_MEDIA_AVERAGE_DISPLAY_TIME": + case 587: + message.metric = 587; + break; + case "RICH_MEDIA_AVERAGE_INTERACTION_TIME": + case 588: + message.metric = 588; + break; + case "RICH_MEDIA_BACKUP_IMAGES": + case 589: + message.metric = 589; + break; + case "RICH_MEDIA_CUSTOM_EVENT_COUNT": + case 599: + message.metric = 599; + break; + case "RICH_MEDIA_CUSTOM_EVENT_TIME": + case 600: + message.metric = 600; + break; + case "RICH_MEDIA_DISPLAY_TIME": + case 590: + message.metric = 590; + break; + case "RICH_MEDIA_EXPANDING_TIME": + case 591: + message.metric = 591; + break; + case "RICH_MEDIA_EXPANSIONS": + case 592: + message.metric = 592; + break; + case "RICH_MEDIA_FULL_SCREEN_IMPRESSIONS": + case 593: + message.metric = 593; + break; + case "RICH_MEDIA_INTERACTION_COUNT": + case 594: + message.metric = 594; + break; + case "RICH_MEDIA_INTERACTION_RATE": + case 595: + message.metric = 595; + break; + case "RICH_MEDIA_INTERACTION_TIME": + case 596: + message.metric = 596; + break; + case "RICH_MEDIA_INTERACTIVE_IMPRESSIONS": + case 597: + message.metric = 597; + break; + case "RICH_MEDIA_MANUAL_CLOSES": + case 598: + message.metric = 598; + break; + case "RICH_MEDIA_VIDEO_COMPLETES": + case 503: + message.metric = 503; + break; + case "RICH_MEDIA_VIDEO_INTERACTIONS": + case 505: + message.metric = 505; + break; + case "RICH_MEDIA_VIDEO_INTERACTION_RATE": + case 504: + message.metric = 504; + break; + case "RICH_MEDIA_VIDEO_MIDPOINTS": + case 506: + message.metric = 506; + break; + case "RICH_MEDIA_VIDEO_MUTES": + case 507: + message.metric = 507; + break; + case "RICH_MEDIA_VIDEO_PAUSES": + case 508: + message.metric = 508; + break; + case "RICH_MEDIA_VIDEO_PLAYS": + case 509: + message.metric = 509; + break; + case "RICH_MEDIA_VIDEO_REPLAYS": + case 510: + message.metric = 510; + break; + case "RICH_MEDIA_VIDEO_STOPS": + case 511: + message.metric = 511; + break; + case "RICH_MEDIA_VIDEO_UNMUTES": + case 512: + message.metric = 512; + break; + case "RICH_MEDIA_VIDEO_VIEW_RATE": + case 513: + message.metric = 513; + break; + case "RICH_MEDIA_VIDEO_VIEW_TIME": + case 514: + message.metric = 514; + break; + case "SELL_THROUGH_AVAILABLE_IMPRESSIONS": + case 477: + message.metric = 477; + break; + case "SELL_THROUGH_FORECASTED_IMPRESSIONS": + case 478: + message.metric = 478; + break; + case "SELL_THROUGH_RESERVED_IMPRESSIONS": + case 479: + message.metric = 479; + break; + case "SELL_THROUGH_SELL_THROUGH_RATE": + case 480: + message.metric = 480; + break; + case "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": + case 434: + message.metric = 434; + break; + case "SERVER_SIDE_UNWRAPPING_CALLOUTS": + case 435: + message.metric = 435; + break; + case "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": + case 436: + message.metric = 436; + break; + case "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": + case 437: + message.metric = 437; + break; + case "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": + case 438: + message.metric = 438; + break; + case "SERVER_SIDE_UNWRAPPING_TIMEOUTS": + case 439: + message.metric = 439; + break; + case "SESSIONS": + case 239: + message.metric = 239; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": + case 455: + message.metric = 455; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": + case 457: + message.metric = 457; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": + case 458: + message.metric = 458; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": + case 459: + message.metric = 459; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": + case 456: + message.metric = 456; + break; + case "TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": + case 460: + message.metric = 460; + break; + case "TARGETED_CLICKS": + case 276: + message.metric = 276; + break; + case "TARGETED_IMPRESSIONS": + case 277: + message.metric = 277; + break; + case "UNFILLED_IMPRESSIONS": + case 45: + message.metric = 45; + break; + case "UNIQUE_VISITORS": + case 417: + message.metric = 417; + break; + case "UNLOADED_IMPRESSIONS_DUE_TO_CPU": + case 408: + message.metric = 408; + break; + case "UNLOADED_IMPRESSIONS_DUE_TO_NETWORK": + case 406: + message.metric = 406; + break; + case "UNMATCHED_AD_REQUESTS": + case 43: + message.metric = 43; + break; + case "UNVIEWED_REASON_OTHER_PERCENT": + case 550: + message.metric = 550; + break; + case "UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT": + case 553: + message.metric = 553; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT": + case 551: + message.metric = 551; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT": + case 552: + message.metric = 552; + break; + case "UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT": + case 549: + message.metric = 549; + break; + case "USER_ENGAGEMENT_DURATION_IN_SECONDS": + case 240: + message.metric = 240; + break; + case "USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE": + case 486: + message.metric = 486; + break; + case "USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT": + case 487: + message.metric = 487; + break; + case "USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN": + case 488: + message.metric = 488; + break; + case "USER_MESSAGES_ALLOW_ADS_PAGEVIEWS": + case 489: + message.metric = 489; + break; + case "USER_MESSAGES_CCPA_MESSAGES_SHOWN": + case 490: + message.metric = 490; + break; + case "USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN": + case 491: + message.metric = 491; + break; + case "USER_MESSAGES_IDFA_ATT_CONSENT": + case 492: + message.metric = 492; + break; + case "USER_MESSAGES_IDFA_ATT_CONSENT_RATE": + case 493: + message.metric = 493; + break; + case "USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT": + case 494: + message.metric = 494; + break; + case "USER_MESSAGES_IDFA_ATT_DECLINE_RATE": + case 495: + message.metric = 495; + break; + case "USER_MESSAGES_IDFA_EXPLAINERS_SHOWN": + case 496: + message.metric = 496; + break; + case "USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN": + case 497: + message.metric = 497; + break; + case "USER_MESSAGES_IDFA_NO_DECISION": + case 498: + message.metric = 498; + break; + case "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": + case 121: + message.metric = 121; + break; + case "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": + case 122: + message.metric = 122; + break; + case "USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS": + case 499: + message.metric = 499; + break; + case "USER_MESSAGES_TOTAL_ESTIMATED_REVENUE": + case 500: + message.metric = 500; + break; + case "USER_MESSAGES_UPTC_MESSAGES_SHOWN": + case 501: + message.metric = 501; + break; + case "USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO": + case 502: + message.metric = 502; + break; + case "VIDEO_ERROR_100_COUNT": + case 180: + message.metric = 180; + break; + case "VIDEO_ERROR_101_COUNT": + case 181: + message.metric = 181; + break; + case "VIDEO_ERROR_102_COUNT": + case 182: + message.metric = 182; + break; + case "VIDEO_ERROR_200_COUNT": + case 183: + message.metric = 183; + break; + case "VIDEO_ERROR_201_COUNT": + case 184: + message.metric = 184; + break; + case "VIDEO_ERROR_202_COUNT": + case 185: + message.metric = 185; + break; + case "VIDEO_ERROR_203_COUNT": + case 186: + message.metric = 186; + break; + case "VIDEO_ERROR_300_COUNT": + case 187: + message.metric = 187; + break; + case "VIDEO_ERROR_301_COUNT": + case 188: + message.metric = 188; + break; + case "VIDEO_ERROR_302_COUNT": + case 189: + message.metric = 189; + break; + case "VIDEO_ERROR_303_COUNT": + case 190: + message.metric = 190; + break; + case "VIDEO_ERROR_400_COUNT": + case 191: + message.metric = 191; + break; + case "VIDEO_ERROR_401_COUNT": + case 192: + message.metric = 192; + break; + case "VIDEO_ERROR_402_COUNT": + case 193: + message.metric = 193; + break; + case "VIDEO_ERROR_403_COUNT": + case 194: + message.metric = 194; + break; + case "VIDEO_ERROR_405_COUNT": + case 195: + message.metric = 195; + break; + case "VIDEO_ERROR_406_COUNT": + case 196: + message.metric = 196; + break; + case "VIDEO_ERROR_407_COUNT": + case 197: + message.metric = 197; + break; + case "VIDEO_ERROR_408_COUNT": + case 198: + message.metric = 198; + break; + case "VIDEO_ERROR_409_COUNT": + case 199: + message.metric = 199; + break; + case "VIDEO_ERROR_410_COUNT": + case 200: + message.metric = 200; + break; + case "VIDEO_ERROR_500_COUNT": + case 201: + message.metric = 201; + break; + case "VIDEO_ERROR_501_COUNT": + case 202: + message.metric = 202; + break; + case "VIDEO_ERROR_502_COUNT": + case 203: + message.metric = 203; + break; + case "VIDEO_ERROR_503_COUNT": + case 204: + message.metric = 204; + break; + case "VIDEO_ERROR_600_COUNT": + case 205: + message.metric = 205; + break; + case "VIDEO_ERROR_601_COUNT": + case 206: + message.metric = 206; + break; + case "VIDEO_ERROR_602_COUNT": + case 207: + message.metric = 207; + break; + case "VIDEO_ERROR_603_COUNT": + case 208: + message.metric = 208; + break; + case "VIDEO_ERROR_604_COUNT": + case 209: + message.metric = 209; + break; + case "VIDEO_ERROR_900_COUNT": + case 210: + message.metric = 210; + break; + case "VIDEO_ERROR_901_COUNT": + case 211: + message.metric = 211; + break; + case "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": + case 92: + message.metric = 92; + break; + case "VIDEO_INTERACTION_COLLAPSES": + case 93: + message.metric = 93; + break; + case "VIDEO_INTERACTION_EXPANDS": + case 95: + message.metric = 95; + break; + case "VIDEO_INTERACTION_FULL_SCREENS": + case 96: + message.metric = 96; + break; + case "VIDEO_INTERACTION_MUTES": + case 97: + message.metric = 97; + break; + case "VIDEO_INTERACTION_PAUSES": + case 98: + message.metric = 98; + break; + case "VIDEO_INTERACTION_RESUMES": + case 99: + message.metric = 99; + break; + case "VIDEO_INTERACTION_REWINDS": + case 100: + message.metric = 100; + break; + case "VIDEO_INTERACTION_UNMUTES": + case 101: + message.metric = 101; + break; + case "VIDEO_INTERACTION_VIDEO_SKIPS": + case 102: + message.metric = 102; + break; + case "VIDEO_MONETIZABLE_CONTENT_VIEWS": + case 601: + message.metric = 601; + break; + case "VIDEO_REAL_TIME_CREATIVE_SERVES": + case 139: + message.metric = 139; + break; + case "VIDEO_REAL_TIME_ERROR_100_COUNT": + case 143: + message.metric = 143; + break; + case "VIDEO_REAL_TIME_ERROR_101_COUNT": + case 144: + message.metric = 144; + break; + case "VIDEO_REAL_TIME_ERROR_102_COUNT": + case 145: + message.metric = 145; + break; + case "VIDEO_REAL_TIME_ERROR_200_COUNT": + case 146: + message.metric = 146; + break; + case "VIDEO_REAL_TIME_ERROR_201_COUNT": + case 147: + message.metric = 147; + break; + case "VIDEO_REAL_TIME_ERROR_202_COUNT": + case 148: + message.metric = 148; + break; + case "VIDEO_REAL_TIME_ERROR_203_COUNT": + case 149: + message.metric = 149; + break; + case "VIDEO_REAL_TIME_ERROR_300_COUNT": + case 150: + message.metric = 150; + break; + case "VIDEO_REAL_TIME_ERROR_301_COUNT": + case 151: + message.metric = 151; + break; + case "VIDEO_REAL_TIME_ERROR_302_COUNT": + case 152: + message.metric = 152; + break; + case "VIDEO_REAL_TIME_ERROR_303_COUNT": + case 153: + message.metric = 153; + break; + case "VIDEO_REAL_TIME_ERROR_400_COUNT": + case 154: + message.metric = 154; + break; + case "VIDEO_REAL_TIME_ERROR_401_COUNT": + case 155: + message.metric = 155; + break; + case "VIDEO_REAL_TIME_ERROR_402_COUNT": + case 156: + message.metric = 156; + break; + case "VIDEO_REAL_TIME_ERROR_403_COUNT": + case 157: + message.metric = 157; + break; + case "VIDEO_REAL_TIME_ERROR_405_COUNT": + case 158: + message.metric = 158; + break; + case "VIDEO_REAL_TIME_ERROR_406_COUNT": + case 159: + message.metric = 159; + break; + case "VIDEO_REAL_TIME_ERROR_407_COUNT": + case 160: + message.metric = 160; + break; + case "VIDEO_REAL_TIME_ERROR_408_COUNT": + case 161: + message.metric = 161; + break; + case "VIDEO_REAL_TIME_ERROR_409_COUNT": + case 162: + message.metric = 162; + break; + case "VIDEO_REAL_TIME_ERROR_410_COUNT": + case 163: + message.metric = 163; + break; + case "VIDEO_REAL_TIME_ERROR_500_COUNT": + case 164: + message.metric = 164; + break; + case "VIDEO_REAL_TIME_ERROR_501_COUNT": + case 165: + message.metric = 165; + break; + case "VIDEO_REAL_TIME_ERROR_502_COUNT": + case 166: + message.metric = 166; + break; + case "VIDEO_REAL_TIME_ERROR_503_COUNT": + case 167: + message.metric = 167; + break; + case "VIDEO_REAL_TIME_ERROR_600_COUNT": + case 168: + message.metric = 168; + break; + case "VIDEO_REAL_TIME_ERROR_601_COUNT": + case 169: + message.metric = 169; + break; + case "VIDEO_REAL_TIME_ERROR_602_COUNT": + case 170: + message.metric = 170; + break; + case "VIDEO_REAL_TIME_ERROR_603_COUNT": + case 171: + message.metric = 171; + break; + case "VIDEO_REAL_TIME_ERROR_604_COUNT": + case 172: + message.metric = 172; + break; + case "VIDEO_REAL_TIME_ERROR_900_COUNT": + case 173: + message.metric = 173; + break; + case "VIDEO_REAL_TIME_ERROR_901_COUNT": + case 174: + message.metric = 174; + break; + case "VIDEO_REAL_TIME_IMPRESSIONS": + case 138: + message.metric = 138; + break; + case "VIDEO_REAL_TIME_MATCHED_QUERIES": + case 140: + message.metric = 140; + break; + case "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": + case 175: + message.metric = 175; + break; + case "VIDEO_REAL_TIME_TOTAL_QUERIES": + case 142: + message.metric = 142; + break; + case "VIDEO_REAL_TIME_UNMATCHED_QUERIES": + case 141: + message.metric = 141; + break; + case "VIDEO_VIEWERSHIP_AUTO_PLAYS": + case 103: + message.metric = 103; + break; + case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": + case 104: + message.metric = 104; + break; + case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": + case 105: + message.metric = 105; + break; + case "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": + case 106: + message.metric = 106; + break; + case "VIDEO_VIEWERSHIP_COMPLETES": + case 107: + message.metric = 107; + break; + case "VIDEO_VIEWERSHIP_COMPLETION_RATE": + case 108: + message.metric = 108; + break; + case "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": + case 109: + message.metric = 109; + break; + case "VIDEO_VIEWERSHIP_FIRST_QUARTILES": + case 110: + message.metric = 110; + break; + case "VIDEO_VIEWERSHIP_MIDPOINTS": + case 111: + message.metric = 111; + break; + case "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": + case 112: + message.metric = 112; + break; + case "VIDEO_VIEWERSHIP_STARTS": + case 113: + message.metric = 113; + break; + case "VIDEO_VIEWERSHIP_THIRD_QUARTILES": + case 114: + message.metric = 114; + break; + case "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": + case 115: + message.metric = 115; + break; + case "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": + case 94: + message.metric = 94; + break; + case "VIDEO_VIEWERSHIP_VIDEO_LENGTH": + case 116: + message.metric = 116; + break; + case "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": + case 117: + message.metric = 117; + break; + case "YIELD_GROUP_AUCTIONS_WON": + case 80: + message.metric = 80; + break; + case "YIELD_GROUP_BIDS": + case 81: + message.metric = 81; + break; + case "YIELD_GROUP_BIDS_IN_AUCTION": + case 82: + message.metric = 82; + break; + case "YIELD_GROUP_CALLOUTS": + case 83: + message.metric = 83; + break; + case "YIELD_GROUP_ESTIMATED_CPM": + case 88: + message.metric = 88; + break; + case "YIELD_GROUP_ESTIMATED_REVENUE": + case 87: + message.metric = 87; + break; + case "YIELD_GROUP_IMPRESSIONS": + case 85: + message.metric = 85; + break; + case "YIELD_GROUP_MEDIATION_FILL_RATE": + case 89: + message.metric = 89; + break; + case "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": + case 86: + message.metric = 86; + break; + case "YIELD_GROUP_MEDIATION_PASSBACKS": + case 118: + message.metric = 118; + break; + case "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": + case 90: + message.metric = 90; + break; + case "YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": + case 215: + message.metric = 215; + break; + case "YIELD_GROUP_SUCCESSFUL_RESPONSES": + case 84: + message.metric = 84; + break; + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimension] === undefined ? message.dimension : $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimension] : message.dimension; + if (options.oneofs) + object.field = "dimension"; + } + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Metric[message.metric] === undefined ? message.metric : $root.google.ads.admanager.v1.ReportDefinition.Metric[message.metric] : message.metric; + if (options.oneofs) + object.field = "metric"; + } + return object; + }; - /** - * Metric enum. - * @name google.ads.admanager.v1.Report.Metric - * @enum {number} - * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value - * @property {number} ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=61 ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value - * @property {number} ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=58 ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value - * @property {number} ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=57 ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value - * @property {number} ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=60 ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value - * @property {number} ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=56 ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value - * @property {number} ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=59 ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value - * @property {number} ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=73 ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value - * @property {number} ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=70 ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value - * @property {number} ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=69 ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value - * @property {number} ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=72 ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value - * @property {number} ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=68 ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value - * @property {number} ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=71 ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value - * @property {number} ADSENSE_AVERAGE_ECPM=26 ADSENSE_AVERAGE_ECPM value - * @property {number} ADSENSE_CLICKS=23 ADSENSE_CLICKS value - * @property {number} ADSENSE_CTR=24 ADSENSE_CTR value - * @property {number} ADSENSE_IMPRESSIONS=22 ADSENSE_IMPRESSIONS value - * @property {number} ADSENSE_PERCENT_CLICKS=28 ADSENSE_PERCENT_CLICKS value - * @property {number} ADSENSE_PERCENT_IMPRESSIONS=27 ADSENSE_PERCENT_IMPRESSIONS value - * @property {number} ADSENSE_PERCENT_REVENUE=29 ADSENSE_PERCENT_REVENUE value - * @property {number} ADSENSE_PERCENT_REVENUE_WITHOUT_CPD=30 ADSENSE_PERCENT_REVENUE_WITHOUT_CPD value - * @property {number} ADSENSE_RESPONSES_SERVED=41 ADSENSE_RESPONSES_SERVED value - * @property {number} ADSENSE_REVENUE=25 ADSENSE_REVENUE value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=79 AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=76 AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=75 AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=78 AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=74 AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value - * @property {number} AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=77 AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value - * @property {number} AD_EXCHANGE_AVERAGE_ECPM=18 AD_EXCHANGE_AVERAGE_ECPM value - * @property {number} AD_EXCHANGE_CLICKS=15 AD_EXCHANGE_CLICKS value - * @property {number} AD_EXCHANGE_CTR=16 AD_EXCHANGE_CTR value - * @property {number} AD_EXCHANGE_IMPRESSIONS=14 AD_EXCHANGE_IMPRESSIONS value - * @property {number} AD_EXCHANGE_PERCENT_CLICKS=20 AD_EXCHANGE_PERCENT_CLICKS value - * @property {number} AD_EXCHANGE_PERCENT_IMPRESSIONS=19 AD_EXCHANGE_PERCENT_IMPRESSIONS value - * @property {number} AD_EXCHANGE_PERCENT_REVENUE=21 AD_EXCHANGE_PERCENT_REVENUE value - * @property {number} AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD=31 AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD value - * @property {number} AD_EXCHANGE_RESPONSES_SERVED=42 AD_EXCHANGE_RESPONSES_SERVED value - * @property {number} AD_EXCHANGE_REVENUE=17 AD_EXCHANGE_REVENUE value - * @property {number} AD_REQUESTS=38 AD_REQUESTS value - * @property {number} AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=67 AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value - * @property {number} AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=64 AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value - * @property {number} AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=63 AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value - * @property {number} AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=66 AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value - * @property {number} AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=62 AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value - * @property {number} AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=65 AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value - * @property {number} AD_SERVER_AVERAGE_ECPM=34 AD_SERVER_AVERAGE_ECPM value - * @property {number} AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD=10 AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD value - * @property {number} AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS=262 AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS value - * @property {number} AD_SERVER_CLICKS=7 AD_SERVER_CLICKS value - * @property {number} AD_SERVER_CPD_REVENUE=32 AD_SERVER_CPD_REVENUE value - * @property {number} AD_SERVER_CTR=8 AD_SERVER_CTR value - * @property {number} AD_SERVER_IMPRESSIONS=6 AD_SERVER_IMPRESSIONS value - * @property {number} AD_SERVER_PERCENT_CLICKS=12 AD_SERVER_PERCENT_CLICKS value - * @property {number} AD_SERVER_PERCENT_IMPRESSIONS=11 AD_SERVER_PERCENT_IMPRESSIONS value - * @property {number} AD_SERVER_PERCENT_REVENUE=35 AD_SERVER_PERCENT_REVENUE value - * @property {number} AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD=13 AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD value - * @property {number} AD_SERVER_RESPONSES_SERVED=40 AD_SERVER_RESPONSES_SERVED value - * @property {number} AD_SERVER_REVENUE=33 AD_SERVER_REVENUE value - * @property {number} AD_SERVER_REVENUE_WITHOUT_CPD=9 AD_SERVER_REVENUE_WITHOUT_CPD value - * @property {number} AD_SERVER_TRACKED_ADS=264 AD_SERVER_TRACKED_ADS value - * @property {number} AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS=261 AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS value - * @property {number} AD_SERVER_UNFILTERED_CLICKS=259 AD_SERVER_UNFILTERED_CLICKS value - * @property {number} AD_SERVER_UNFILTERED_IMPRESSIONS=260 AD_SERVER_UNFILTERED_IMPRESSIONS value - * @property {number} AD_SERVER_UNFILTERED_TRACKED_ADS=263 AD_SERVER_UNFILTERED_TRACKED_ADS value - * @property {number} AVERAGE_ECPM=37 AVERAGE_ECPM value - * @property {number} AVERAGE_ECPM_WITHOUT_CPD=5 AVERAGE_ECPM_WITHOUT_CPD value - * @property {number} CLICKS=2 CLICKS value - * @property {number} CODE_SERVED_COUNT=44 CODE_SERVED_COUNT value - * @property {number} CTR=3 CTR value - * @property {number} GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS=129 GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS value - * @property {number} GOOGLE_SOLD_AUCTION_IMPRESSIONS=128 GOOGLE_SOLD_AUCTION_IMPRESSIONS value - * @property {number} GOOGLE_SOLD_COVIEWED_IMPRESSIONS=131 GOOGLE_SOLD_COVIEWED_IMPRESSIONS value - * @property {number} GOOGLE_SOLD_IMPRESSIONS=130 GOOGLE_SOLD_IMPRESSIONS value - * @property {number} GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS=127 GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS value - * @property {number} GOOGLE_SOLD_RESERVATION_IMPRESSIONS=126 GOOGLE_SOLD_RESERVATION_IMPRESSIONS value - * @property {number} IMPRESSIONS=1 IMPRESSIONS value - * @property {number} PARTNER_SALES_FILLED_POD_REQUESTS=135 PARTNER_SALES_FILLED_POD_REQUESTS value - * @property {number} PARTNER_SALES_FILL_RATE=136 PARTNER_SALES_FILL_RATE value - * @property {number} PARTNER_SALES_PARTNER_MATCH_RATE=137 PARTNER_SALES_PARTNER_MATCH_RATE value - * @property {number} PARTNER_SALES_QUERIES=132 PARTNER_SALES_QUERIES value - * @property {number} PARTNER_SALES_UNFILLED_IMPRESSIONS=133 PARTNER_SALES_UNFILLED_IMPRESSIONS value - * @property {number} PARTNER_SALES_UNMATCHED_QUERIES=134 PARTNER_SALES_UNMATCHED_QUERIES value - * @property {number} PARTNER_SOLD_CODE_SERVED=125 PARTNER_SOLD_CODE_SERVED value - * @property {number} PARTNER_SOLD_COVIEWED_IMPRESSIONS=124 PARTNER_SOLD_COVIEWED_IMPRESSIONS value - * @property {number} PARTNER_SOLD_IMPRESSIONS=123 PARTNER_SOLD_IMPRESSIONS value - * @property {number} PROGRAMMATIC_ELIGIBLE_AD_REQUESTS=177 PROGRAMMATIC_ELIGIBLE_AD_REQUESTS value - * @property {number} PROGRAMMATIC_MATCH_RATE=178 PROGRAMMATIC_MATCH_RATE value - * @property {number} PROGRAMMATIC_RESPONSES_SERVED=176 PROGRAMMATIC_RESPONSES_SERVED value - * @property {number} RESPONSES_SERVED=39 RESPONSES_SERVED value - * @property {number} REVENUE=36 REVENUE value - * @property {number} REVENUE_WITHOUT_CPD=4 REVENUE_WITHOUT_CPD value - * @property {number} SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS=434 SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS value - * @property {number} SERVER_SIDE_UNWRAPPING_CALLOUTS=435 SERVER_SIDE_UNWRAPPING_CALLOUTS value - * @property {number} SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES=436 SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES value - * @property {number} SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES=437 SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES value - * @property {number} SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES=438 SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES value - * @property {number} SERVER_SIDE_UNWRAPPING_TIMEOUTS=439 SERVER_SIDE_UNWRAPPING_TIMEOUTS value - * @property {number} UNFILLED_IMPRESSIONS=45 UNFILLED_IMPRESSIONS value - * @property {number} UNMATCHED_AD_REQUESTS=43 UNMATCHED_AD_REQUESTS value - * @property {number} USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN=121 USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN value - * @property {number} USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS=122 USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS value - * @property {number} VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE=92 VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE value - * @property {number} VIDEO_INTERACTION_COLLAPSES=93 VIDEO_INTERACTION_COLLAPSES value - * @property {number} VIDEO_INTERACTION_EXPANDS=95 VIDEO_INTERACTION_EXPANDS value - * @property {number} VIDEO_INTERACTION_FULL_SCREENS=96 VIDEO_INTERACTION_FULL_SCREENS value - * @property {number} VIDEO_INTERACTION_MUTES=97 VIDEO_INTERACTION_MUTES value - * @property {number} VIDEO_INTERACTION_PAUSES=98 VIDEO_INTERACTION_PAUSES value - * @property {number} VIDEO_INTERACTION_RESUMES=99 VIDEO_INTERACTION_RESUMES value - * @property {number} VIDEO_INTERACTION_REWINDS=100 VIDEO_INTERACTION_REWINDS value - * @property {number} VIDEO_INTERACTION_UNMUTES=101 VIDEO_INTERACTION_UNMUTES value - * @property {number} VIDEO_INTERACTION_VIDEO_SKIPS=102 VIDEO_INTERACTION_VIDEO_SKIPS value - * @property {number} VIDEO_REAL_TIME_CREATIVE_SERVES=139 VIDEO_REAL_TIME_CREATIVE_SERVES value - * @property {number} VIDEO_REAL_TIME_ERROR_100_COUNT=143 VIDEO_REAL_TIME_ERROR_100_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_101_COUNT=144 VIDEO_REAL_TIME_ERROR_101_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_102_COUNT=145 VIDEO_REAL_TIME_ERROR_102_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_200_COUNT=146 VIDEO_REAL_TIME_ERROR_200_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_201_COUNT=147 VIDEO_REAL_TIME_ERROR_201_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_202_COUNT=148 VIDEO_REAL_TIME_ERROR_202_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_203_COUNT=149 VIDEO_REAL_TIME_ERROR_203_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_300_COUNT=150 VIDEO_REAL_TIME_ERROR_300_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_301_COUNT=151 VIDEO_REAL_TIME_ERROR_301_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_302_COUNT=152 VIDEO_REAL_TIME_ERROR_302_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_303_COUNT=153 VIDEO_REAL_TIME_ERROR_303_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_400_COUNT=154 VIDEO_REAL_TIME_ERROR_400_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_401_COUNT=155 VIDEO_REAL_TIME_ERROR_401_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_402_COUNT=156 VIDEO_REAL_TIME_ERROR_402_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_403_COUNT=157 VIDEO_REAL_TIME_ERROR_403_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_405_COUNT=158 VIDEO_REAL_TIME_ERROR_405_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_406_COUNT=159 VIDEO_REAL_TIME_ERROR_406_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_407_COUNT=160 VIDEO_REAL_TIME_ERROR_407_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_408_COUNT=161 VIDEO_REAL_TIME_ERROR_408_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_409_COUNT=162 VIDEO_REAL_TIME_ERROR_409_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_410_COUNT=163 VIDEO_REAL_TIME_ERROR_410_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_500_COUNT=164 VIDEO_REAL_TIME_ERROR_500_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_501_COUNT=165 VIDEO_REAL_TIME_ERROR_501_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_502_COUNT=166 VIDEO_REAL_TIME_ERROR_502_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_503_COUNT=167 VIDEO_REAL_TIME_ERROR_503_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_600_COUNT=168 VIDEO_REAL_TIME_ERROR_600_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_601_COUNT=169 VIDEO_REAL_TIME_ERROR_601_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_602_COUNT=170 VIDEO_REAL_TIME_ERROR_602_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_603_COUNT=171 VIDEO_REAL_TIME_ERROR_603_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_604_COUNT=172 VIDEO_REAL_TIME_ERROR_604_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_900_COUNT=173 VIDEO_REAL_TIME_ERROR_900_COUNT value - * @property {number} VIDEO_REAL_TIME_ERROR_901_COUNT=174 VIDEO_REAL_TIME_ERROR_901_COUNT value - * @property {number} VIDEO_REAL_TIME_IMPRESSIONS=138 VIDEO_REAL_TIME_IMPRESSIONS value - * @property {number} VIDEO_REAL_TIME_MATCHED_QUERIES=140 VIDEO_REAL_TIME_MATCHED_QUERIES value - * @property {number} VIDEO_REAL_TIME_TOTAL_ERROR_COUNT=175 VIDEO_REAL_TIME_TOTAL_ERROR_COUNT value - * @property {number} VIDEO_REAL_TIME_TOTAL_QUERIES=142 VIDEO_REAL_TIME_TOTAL_QUERIES value - * @property {number} VIDEO_REAL_TIME_UNMATCHED_QUERIES=141 VIDEO_REAL_TIME_UNMATCHED_QUERIES value - * @property {number} VIDEO_VIEWERSHIP_AUTO_PLAYS=103 VIDEO_VIEWERSHIP_AUTO_PLAYS value - * @property {number} VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE=104 VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE value - * @property {number} VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME=105 VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME value - * @property {number} VIDEO_VIEWERSHIP_CLICK_TO_PLAYS=106 VIDEO_VIEWERSHIP_CLICK_TO_PLAYS value - * @property {number} VIDEO_VIEWERSHIP_COMPLETES=107 VIDEO_VIEWERSHIP_COMPLETES value - * @property {number} VIDEO_VIEWERSHIP_COMPLETION_RATE=108 VIDEO_VIEWERSHIP_COMPLETION_RATE value - * @property {number} VIDEO_VIEWERSHIP_ENGAGED_VIEWS=109 VIDEO_VIEWERSHIP_ENGAGED_VIEWS value - * @property {number} VIDEO_VIEWERSHIP_FIRST_QUARTILES=110 VIDEO_VIEWERSHIP_FIRST_QUARTILES value - * @property {number} VIDEO_VIEWERSHIP_MIDPOINTS=111 VIDEO_VIEWERSHIP_MIDPOINTS value - * @property {number} VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN=112 VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN value - * @property {number} VIDEO_VIEWERSHIP_STARTS=113 VIDEO_VIEWERSHIP_STARTS value - * @property {number} VIDEO_VIEWERSHIP_THIRD_QUARTILES=114 VIDEO_VIEWERSHIP_THIRD_QUARTILES value - * @property {number} VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT=115 VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT value - * @property {number} VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE=94 VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE value - * @property {number} VIDEO_VIEWERSHIP_VIDEO_LENGTH=116 VIDEO_VIEWERSHIP_VIDEO_LENGTH value - * @property {number} VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE=117 VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE value - * @property {number} YIELD_GROUP_AUCTIONS_WON=80 YIELD_GROUP_AUCTIONS_WON value - * @property {number} YIELD_GROUP_BIDS=81 YIELD_GROUP_BIDS value - * @property {number} YIELD_GROUP_BIDS_IN_AUCTION=82 YIELD_GROUP_BIDS_IN_AUCTION value - * @property {number} YIELD_GROUP_CALLOUTS=83 YIELD_GROUP_CALLOUTS value - * @property {number} YIELD_GROUP_ESTIMATED_CPM=88 YIELD_GROUP_ESTIMATED_CPM value - * @property {number} YIELD_GROUP_ESTIMATED_REVENUE=87 YIELD_GROUP_ESTIMATED_REVENUE value - * @property {number} YIELD_GROUP_IMPRESSIONS=85 YIELD_GROUP_IMPRESSIONS value - * @property {number} YIELD_GROUP_MEDIATION_FILL_RATE=89 YIELD_GROUP_MEDIATION_FILL_RATE value - * @property {number} YIELD_GROUP_MEDIATION_MATCHED_QUERIES=86 YIELD_GROUP_MEDIATION_MATCHED_QUERIES value - * @property {number} YIELD_GROUP_MEDIATION_PASSBACKS=118 YIELD_GROUP_MEDIATION_PASSBACKS value - * @property {number} YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM=90 YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM value - * @property {number} YIELD_GROUP_SUCCESSFUL_RESPONSES=84 YIELD_GROUP_SUCCESSFUL_RESPONSES value - */ - Report.Metric = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; - values[valuesById[61] = "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 61; - values[valuesById[58] = "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 58; - values[valuesById[57] = "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 57; - values[valuesById[60] = "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 60; - values[valuesById[56] = "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 56; - values[valuesById[59] = "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 59; - values[valuesById[73] = "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 73; - values[valuesById[70] = "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 70; - values[valuesById[69] = "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 69; - values[valuesById[72] = "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 72; - values[valuesById[68] = "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 68; - values[valuesById[71] = "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 71; - values[valuesById[26] = "ADSENSE_AVERAGE_ECPM"] = 26; - values[valuesById[23] = "ADSENSE_CLICKS"] = 23; - values[valuesById[24] = "ADSENSE_CTR"] = 24; - values[valuesById[22] = "ADSENSE_IMPRESSIONS"] = 22; - values[valuesById[28] = "ADSENSE_PERCENT_CLICKS"] = 28; - values[valuesById[27] = "ADSENSE_PERCENT_IMPRESSIONS"] = 27; - values[valuesById[29] = "ADSENSE_PERCENT_REVENUE"] = 29; - values[valuesById[30] = "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD"] = 30; - values[valuesById[41] = "ADSENSE_RESPONSES_SERVED"] = 41; - values[valuesById[25] = "ADSENSE_REVENUE"] = 25; - values[valuesById[79] = "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 79; - values[valuesById[76] = "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 76; - values[valuesById[75] = "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 75; - values[valuesById[78] = "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 78; - values[valuesById[74] = "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 74; - values[valuesById[77] = "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 77; - values[valuesById[18] = "AD_EXCHANGE_AVERAGE_ECPM"] = 18; - values[valuesById[15] = "AD_EXCHANGE_CLICKS"] = 15; - values[valuesById[16] = "AD_EXCHANGE_CTR"] = 16; - values[valuesById[14] = "AD_EXCHANGE_IMPRESSIONS"] = 14; - values[valuesById[20] = "AD_EXCHANGE_PERCENT_CLICKS"] = 20; - values[valuesById[19] = "AD_EXCHANGE_PERCENT_IMPRESSIONS"] = 19; - values[valuesById[21] = "AD_EXCHANGE_PERCENT_REVENUE"] = 21; - values[valuesById[31] = "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD"] = 31; - values[valuesById[42] = "AD_EXCHANGE_RESPONSES_SERVED"] = 42; - values[valuesById[17] = "AD_EXCHANGE_REVENUE"] = 17; - values[valuesById[38] = "AD_REQUESTS"] = 38; - values[valuesById[67] = "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 67; - values[valuesById[64] = "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 64; - values[valuesById[63] = "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 63; - values[valuesById[66] = "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 66; - values[valuesById[62] = "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 62; - values[valuesById[65] = "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 65; - values[valuesById[34] = "AD_SERVER_AVERAGE_ECPM"] = 34; - values[valuesById[10] = "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD"] = 10; - values[valuesById[262] = "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS"] = 262; - values[valuesById[7] = "AD_SERVER_CLICKS"] = 7; - values[valuesById[32] = "AD_SERVER_CPD_REVENUE"] = 32; - values[valuesById[8] = "AD_SERVER_CTR"] = 8; - values[valuesById[6] = "AD_SERVER_IMPRESSIONS"] = 6; - values[valuesById[12] = "AD_SERVER_PERCENT_CLICKS"] = 12; - values[valuesById[11] = "AD_SERVER_PERCENT_IMPRESSIONS"] = 11; - values[valuesById[35] = "AD_SERVER_PERCENT_REVENUE"] = 35; - values[valuesById[13] = "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD"] = 13; - values[valuesById[40] = "AD_SERVER_RESPONSES_SERVED"] = 40; - values[valuesById[33] = "AD_SERVER_REVENUE"] = 33; - values[valuesById[9] = "AD_SERVER_REVENUE_WITHOUT_CPD"] = 9; - values[valuesById[264] = "AD_SERVER_TRACKED_ADS"] = 264; - values[valuesById[261] = "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS"] = 261; - values[valuesById[259] = "AD_SERVER_UNFILTERED_CLICKS"] = 259; - values[valuesById[260] = "AD_SERVER_UNFILTERED_IMPRESSIONS"] = 260; - values[valuesById[263] = "AD_SERVER_UNFILTERED_TRACKED_ADS"] = 263; - values[valuesById[37] = "AVERAGE_ECPM"] = 37; - values[valuesById[5] = "AVERAGE_ECPM_WITHOUT_CPD"] = 5; - values[valuesById[2] = "CLICKS"] = 2; - values[valuesById[44] = "CODE_SERVED_COUNT"] = 44; - values[valuesById[3] = "CTR"] = 3; - values[valuesById[129] = "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS"] = 129; - values[valuesById[128] = "GOOGLE_SOLD_AUCTION_IMPRESSIONS"] = 128; - values[valuesById[131] = "GOOGLE_SOLD_COVIEWED_IMPRESSIONS"] = 131; - values[valuesById[130] = "GOOGLE_SOLD_IMPRESSIONS"] = 130; - values[valuesById[127] = "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS"] = 127; - values[valuesById[126] = "GOOGLE_SOLD_RESERVATION_IMPRESSIONS"] = 126; - values[valuesById[1] = "IMPRESSIONS"] = 1; - values[valuesById[135] = "PARTNER_SALES_FILLED_POD_REQUESTS"] = 135; - values[valuesById[136] = "PARTNER_SALES_FILL_RATE"] = 136; - values[valuesById[137] = "PARTNER_SALES_PARTNER_MATCH_RATE"] = 137; - values[valuesById[132] = "PARTNER_SALES_QUERIES"] = 132; - values[valuesById[133] = "PARTNER_SALES_UNFILLED_IMPRESSIONS"] = 133; - values[valuesById[134] = "PARTNER_SALES_UNMATCHED_QUERIES"] = 134; - values[valuesById[125] = "PARTNER_SOLD_CODE_SERVED"] = 125; - values[valuesById[124] = "PARTNER_SOLD_COVIEWED_IMPRESSIONS"] = 124; - values[valuesById[123] = "PARTNER_SOLD_IMPRESSIONS"] = 123; - values[valuesById[177] = "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS"] = 177; - values[valuesById[178] = "PROGRAMMATIC_MATCH_RATE"] = 178; - values[valuesById[176] = "PROGRAMMATIC_RESPONSES_SERVED"] = 176; - values[valuesById[39] = "RESPONSES_SERVED"] = 39; - values[valuesById[36] = "REVENUE"] = 36; - values[valuesById[4] = "REVENUE_WITHOUT_CPD"] = 4; - values[valuesById[434] = "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS"] = 434; - values[valuesById[435] = "SERVER_SIDE_UNWRAPPING_CALLOUTS"] = 435; - values[valuesById[436] = "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES"] = 436; - values[valuesById[437] = "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES"] = 437; - values[valuesById[438] = "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES"] = 438; - values[valuesById[439] = "SERVER_SIDE_UNWRAPPING_TIMEOUTS"] = 439; - values[valuesById[45] = "UNFILLED_IMPRESSIONS"] = 45; - values[valuesById[43] = "UNMATCHED_AD_REQUESTS"] = 43; - values[valuesById[121] = "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN"] = 121; - values[valuesById[122] = "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS"] = 122; - values[valuesById[92] = "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE"] = 92; - values[valuesById[93] = "VIDEO_INTERACTION_COLLAPSES"] = 93; - values[valuesById[95] = "VIDEO_INTERACTION_EXPANDS"] = 95; - values[valuesById[96] = "VIDEO_INTERACTION_FULL_SCREENS"] = 96; - values[valuesById[97] = "VIDEO_INTERACTION_MUTES"] = 97; - values[valuesById[98] = "VIDEO_INTERACTION_PAUSES"] = 98; - values[valuesById[99] = "VIDEO_INTERACTION_RESUMES"] = 99; - values[valuesById[100] = "VIDEO_INTERACTION_REWINDS"] = 100; - values[valuesById[101] = "VIDEO_INTERACTION_UNMUTES"] = 101; - values[valuesById[102] = "VIDEO_INTERACTION_VIDEO_SKIPS"] = 102; - values[valuesById[139] = "VIDEO_REAL_TIME_CREATIVE_SERVES"] = 139; - values[valuesById[143] = "VIDEO_REAL_TIME_ERROR_100_COUNT"] = 143; - values[valuesById[144] = "VIDEO_REAL_TIME_ERROR_101_COUNT"] = 144; - values[valuesById[145] = "VIDEO_REAL_TIME_ERROR_102_COUNT"] = 145; - values[valuesById[146] = "VIDEO_REAL_TIME_ERROR_200_COUNT"] = 146; - values[valuesById[147] = "VIDEO_REAL_TIME_ERROR_201_COUNT"] = 147; - values[valuesById[148] = "VIDEO_REAL_TIME_ERROR_202_COUNT"] = 148; - values[valuesById[149] = "VIDEO_REAL_TIME_ERROR_203_COUNT"] = 149; - values[valuesById[150] = "VIDEO_REAL_TIME_ERROR_300_COUNT"] = 150; - values[valuesById[151] = "VIDEO_REAL_TIME_ERROR_301_COUNT"] = 151; - values[valuesById[152] = "VIDEO_REAL_TIME_ERROR_302_COUNT"] = 152; - values[valuesById[153] = "VIDEO_REAL_TIME_ERROR_303_COUNT"] = 153; - values[valuesById[154] = "VIDEO_REAL_TIME_ERROR_400_COUNT"] = 154; - values[valuesById[155] = "VIDEO_REAL_TIME_ERROR_401_COUNT"] = 155; - values[valuesById[156] = "VIDEO_REAL_TIME_ERROR_402_COUNT"] = 156; - values[valuesById[157] = "VIDEO_REAL_TIME_ERROR_403_COUNT"] = 157; - values[valuesById[158] = "VIDEO_REAL_TIME_ERROR_405_COUNT"] = 158; - values[valuesById[159] = "VIDEO_REAL_TIME_ERROR_406_COUNT"] = 159; - values[valuesById[160] = "VIDEO_REAL_TIME_ERROR_407_COUNT"] = 160; - values[valuesById[161] = "VIDEO_REAL_TIME_ERROR_408_COUNT"] = 161; - values[valuesById[162] = "VIDEO_REAL_TIME_ERROR_409_COUNT"] = 162; - values[valuesById[163] = "VIDEO_REAL_TIME_ERROR_410_COUNT"] = 163; - values[valuesById[164] = "VIDEO_REAL_TIME_ERROR_500_COUNT"] = 164; - values[valuesById[165] = "VIDEO_REAL_TIME_ERROR_501_COUNT"] = 165; - values[valuesById[166] = "VIDEO_REAL_TIME_ERROR_502_COUNT"] = 166; - values[valuesById[167] = "VIDEO_REAL_TIME_ERROR_503_COUNT"] = 167; - values[valuesById[168] = "VIDEO_REAL_TIME_ERROR_600_COUNT"] = 168; - values[valuesById[169] = "VIDEO_REAL_TIME_ERROR_601_COUNT"] = 169; - values[valuesById[170] = "VIDEO_REAL_TIME_ERROR_602_COUNT"] = 170; - values[valuesById[171] = "VIDEO_REAL_TIME_ERROR_603_COUNT"] = 171; - values[valuesById[172] = "VIDEO_REAL_TIME_ERROR_604_COUNT"] = 172; - values[valuesById[173] = "VIDEO_REAL_TIME_ERROR_900_COUNT"] = 173; - values[valuesById[174] = "VIDEO_REAL_TIME_ERROR_901_COUNT"] = 174; - values[valuesById[138] = "VIDEO_REAL_TIME_IMPRESSIONS"] = 138; - values[valuesById[140] = "VIDEO_REAL_TIME_MATCHED_QUERIES"] = 140; - values[valuesById[175] = "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT"] = 175; - values[valuesById[142] = "VIDEO_REAL_TIME_TOTAL_QUERIES"] = 142; - values[valuesById[141] = "VIDEO_REAL_TIME_UNMATCHED_QUERIES"] = 141; - values[valuesById[103] = "VIDEO_VIEWERSHIP_AUTO_PLAYS"] = 103; - values[valuesById[104] = "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE"] = 104; - values[valuesById[105] = "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME"] = 105; - values[valuesById[106] = "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS"] = 106; - values[valuesById[107] = "VIDEO_VIEWERSHIP_COMPLETES"] = 107; - values[valuesById[108] = "VIDEO_VIEWERSHIP_COMPLETION_RATE"] = 108; - values[valuesById[109] = "VIDEO_VIEWERSHIP_ENGAGED_VIEWS"] = 109; - values[valuesById[110] = "VIDEO_VIEWERSHIP_FIRST_QUARTILES"] = 110; - values[valuesById[111] = "VIDEO_VIEWERSHIP_MIDPOINTS"] = 111; - values[valuesById[112] = "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN"] = 112; - values[valuesById[113] = "VIDEO_VIEWERSHIP_STARTS"] = 113; - values[valuesById[114] = "VIDEO_VIEWERSHIP_THIRD_QUARTILES"] = 114; - values[valuesById[115] = "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT"] = 115; - values[valuesById[94] = "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE"] = 94; - values[valuesById[116] = "VIDEO_VIEWERSHIP_VIDEO_LENGTH"] = 116; - values[valuesById[117] = "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE"] = 117; - values[valuesById[80] = "YIELD_GROUP_AUCTIONS_WON"] = 80; - values[valuesById[81] = "YIELD_GROUP_BIDS"] = 81; - values[valuesById[82] = "YIELD_GROUP_BIDS_IN_AUCTION"] = 82; - values[valuesById[83] = "YIELD_GROUP_CALLOUTS"] = 83; - values[valuesById[88] = "YIELD_GROUP_ESTIMATED_CPM"] = 88; - values[valuesById[87] = "YIELD_GROUP_ESTIMATED_REVENUE"] = 87; - values[valuesById[85] = "YIELD_GROUP_IMPRESSIONS"] = 85; - values[valuesById[89] = "YIELD_GROUP_MEDIATION_FILL_RATE"] = 89; - values[valuesById[86] = "YIELD_GROUP_MEDIATION_MATCHED_QUERIES"] = 86; - values[valuesById[118] = "YIELD_GROUP_MEDIATION_PASSBACKS"] = 118; - values[valuesById[90] = "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM"] = 90; - values[valuesById[84] = "YIELD_GROUP_SUCCESSFUL_RESPONSES"] = 84; - return values; + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Field"; + }; + + return Field; })(); - /** - * MetricValueType enum. - * @name google.ads.admanager.v1.Report.MetricValueType - * @enum {number} - * @property {number} PRIMARY=0 PRIMARY value - * @property {number} PRIMARY_PERCENT_OF_TOTAL=1 PRIMARY_PERCENT_OF_TOTAL value - * @property {number} COMPARISON=2 COMPARISON value - * @property {number} COMPARISON_PERCENT_OF_TOTAL=3 COMPARISON_PERCENT_OF_TOTAL value - * @property {number} ABSOLUTE_CHANGE=4 ABSOLUTE_CHANGE value - * @property {number} RELATIVE_CHANGE=5 RELATIVE_CHANGE value - */ - Report.MetricValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIMARY"] = 0; - values[valuesById[1] = "PRIMARY_PERCENT_OF_TOTAL"] = 1; - values[valuesById[2] = "COMPARISON"] = 2; - values[valuesById[3] = "COMPARISON_PERCENT_OF_TOTAL"] = 3; - values[valuesById[4] = "ABSOLUTE_CHANGE"] = 4; - values[valuesById[5] = "RELATIVE_CHANGE"] = 5; - return values; - })(); + ReportDefinition.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface IDateRange + * @property {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange|null} [fixed] DateRange fixed + * @property {google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|null} [relative] DateRange relative + */ + + /** + * Constructs a new DateRange. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.IDateRange=} [properties] Properties to set + */ + function DateRange(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]]; + } + + /** + * DateRange fixed. + * @member {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange|null|undefined} fixed + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @instance + */ + DateRange.prototype.fixed = null; + + /** + * DateRange relative. + * @member {google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange|null|undefined} relative + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @instance + */ + DateRange.prototype.relative = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateRange dateRangeType. + * @member {"fixed"|"relative"|undefined} dateRangeType + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @instance + */ + Object.defineProperty(DateRange.prototype, "dateRangeType", { + get: $util.oneOfGetter($oneOfFields = ["fixed", "relative"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IDateRange=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) + $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.encode(message.fixed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.relative != null && Object.hasOwnProperty.call(message, "relative")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relative); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fixed = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.decode(reader, reader.uint32()); + break; + } + case 2: { + message.relative = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + properties.dateRangeType = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify(message.fixed); + if (error) + return "fixed." + error; + } + } + if (message.relative != null && message.hasOwnProperty("relative")) { + if (properties.dateRangeType === 1) + return "dateRangeType: multiple values"; + properties.dateRangeType = 1; + switch (message.relative) { + default: + return "relative: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 29: + case 4: + case 26: + case 5: + case 27: + case 6: + case 28: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 22: + case 24: + break; + } + } + return null; + }; - /** - * ReportType enum. - * @name google.ads.admanager.v1.Report.ReportType - * @enum {number} - * @property {number} REPORT_TYPE_UNSPECIFIED=0 REPORT_TYPE_UNSPECIFIED value - * @property {number} HISTORICAL=1 HISTORICAL value - */ - Report.ReportType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPORT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HISTORICAL"] = 1; - return values; - })(); + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.DateRange) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.DateRange(); + if (object.fixed != null) { + if (typeof object.fixed !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.DateRange.fixed: object expected"); + message.fixed = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.fromObject(object.fixed); + } + switch (object.relative) { + default: + if (typeof object.relative === "number") { + message.relative = object.relative; + break; + } + break; + case "RELATIVE_DATE_RANGE_UNSPECIFIED": + case 0: + message.relative = 0; + break; + case "TODAY": + case 1: + message.relative = 1; + break; + case "YESTERDAY": + case 2: + message.relative = 2; + break; + case "THIS_WEEK": + case 3: + message.relative = 3; + break; + case "THIS_WEEK_TO_DATE": + case 29: + message.relative = 29; + break; + case "THIS_MONTH": + case 4: + message.relative = 4; + break; + case "THIS_MONTH_TO_DATE": + case 26: + message.relative = 26; + break; + case "THIS_QUARTER": + case 5: + message.relative = 5; + break; + case "THIS_QUARTER_TO_DATE": + case 27: + message.relative = 27; + break; + case "THIS_YEAR": + case 6: + message.relative = 6; + break; + case "THIS_YEAR_TO_DATE": + case 28: + message.relative = 28; + break; + case "LAST_WEEK": + case 7: + message.relative = 7; + break; + case "LAST_MONTH": + case 8: + message.relative = 8; + break; + case "LAST_QUARTER": + case 9: + message.relative = 9; + break; + case "LAST_YEAR": + case 10: + message.relative = 10; + break; + case "LAST_7_DAYS": + case 11: + message.relative = 11; + break; + case "LAST_30_DAYS": + case 12: + message.relative = 12; + break; + case "LAST_60_DAYS": + case 13: + message.relative = 13; + break; + case "LAST_90_DAYS": + case 14: + message.relative = 14; + break; + case "LAST_180_DAYS": + case 15: + message.relative = 15; + break; + case "LAST_360_DAYS": + case 16: + message.relative = 16; + break; + case "LAST_365_DAYS": + case 17: + message.relative = 17; + break; + case "LAST_3_MONTHS": + case 18: + message.relative = 18; + break; + case "LAST_6_MONTHS": + case 19: + message.relative = 19; + break; + case "LAST_12_MONTHS": + case 20: + message.relative = 20; + break; + case "ALL_AVAILABLE": + case 21: + message.relative = 21; + break; + case "TOMORROW": + case 30: + message.relative = 30; + break; + case "NEXT_90_DAYS": + case 31: + message.relative = 31; + break; + case "NEXT_MONTH": + case 32: + message.relative = 32; + break; + case "NEXT_3_MONTHS": + case 33: + message.relative = 33; + break; + case "NEXT_12_MONTHS": + case 34: + message.relative = 34; + break; + case "NEXT_WEEK": + case 35: + message.relative = 35; + break; + case "NEXT_QUARTER": + case 36: + message.relative = 36; + break; + case "TO_END_OF_NEXT_MONTH": + case 37: + message.relative = 37; + break; + case "PREVIOUS_PERIOD": + case 22: + message.relative = 22; + break; + case "SAME_PERIOD_PREVIOUS_YEAR": + case 24: + message.relative = 24; + break; + } + return message; + }; - /** - * Visibility enum. - * @name google.ads.admanager.v1.Report.Visibility - * @enum {number} - * @property {number} HIDDEN=0 HIDDEN value - * @property {number} DRAFT=1 DRAFT value - * @property {number} SAVED=2 SAVED value - */ - Report.Visibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HIDDEN"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "SAVED"] = 2; - return values; - })(); + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + object.fixed = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.toObject(message.fixed, options); + if (options.oneofs) + object.dateRangeType = "fixed"; + } + if (message.relative != null && message.hasOwnProperty("relative")) { + object.relative = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange[message.relative] === undefined ? message.relative : $root.google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange[message.relative] : message.relative; + if (options.oneofs) + object.dateRangeType = "relative"; + } + return object; + }; - /** - * TimeZoneSource enum. - * @name google.ads.admanager.v1.Report.TimeZoneSource - * @enum {number} - * @property {number} TIME_ZONE_SOURCE_UNSPECIFIED=0 TIME_ZONE_SOURCE_UNSPECIFIED value - * @property {number} PUBLISHER=1 PUBLISHER value - * @property {number} AD_EXCHANGE=2 AD_EXCHANGE value - * @property {number} UTC=3 UTC value - * @property {number} PROVIDED=4 PROVIDED value - */ - Report.TimeZoneSource = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIME_ZONE_SOURCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PUBLISHER"] = 1; - values[valuesById[2] = "AD_EXCHANGE"] = 2; - values[valuesById[3] = "UTC"] = 3; - values[valuesById[4] = "PROVIDED"] = 4; - return values; - })(); + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Report; - })(); + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.DateRange"; + }; - v1.ReportDefinition = (function() { + DateRange.FixedDateRange = (function() { - /** - * Properties of a ReportDefinition. - * @memberof google.ads.admanager.v1 - * @interface IReportDefinition - * @property {Array.|null} [dimensions] ReportDefinition dimensions - * @property {Array.|null} [metrics] ReportDefinition metrics - * @property {Array.|null} [filters] ReportDefinition filters - * @property {google.ads.admanager.v1.Report.TimeZoneSource|null} [timeZoneSource] ReportDefinition timeZoneSource - * @property {string|null} [timeZone] ReportDefinition timeZone - * @property {string|null} [currencyCode] ReportDefinition currencyCode - * @property {google.ads.admanager.v1.Report.IDateRange|null} [dateRange] ReportDefinition dateRange - * @property {google.ads.admanager.v1.Report.IDateRange|null} [comparisonDateRange] ReportDefinition comparisonDateRange - * @property {Array.|null} [customDimensionKeyIds] ReportDefinition customDimensionKeyIds - * @property {Array.|null} [lineItemCustomFieldIds] ReportDefinition lineItemCustomFieldIds - * @property {Array.|null} [orderCustomFieldIds] ReportDefinition orderCustomFieldIds - * @property {Array.|null} [creativeCustomFieldIds] ReportDefinition creativeCustomFieldIds - * @property {google.ads.admanager.v1.Report.ReportType|null} [reportType] ReportDefinition reportType - * @property {google.ads.admanager.v1.Report.TimePeriodColumn|null} [timePeriodColumn] ReportDefinition timePeriodColumn - * @property {Array.|null} [flags] ReportDefinition flags - * @property {Array.|null} [sorts] ReportDefinition sorts - */ + /** + * Properties of a FixedDateRange. + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @interface IFixedDateRange + * @property {google.type.IDate|null} [startDate] FixedDateRange startDate + * @property {google.type.IDate|null} [endDate] FixedDateRange endDate + */ - /** - * Constructs a new ReportDefinition. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a ReportDefinition. - * @implements IReportDefinition - * @constructor - * @param {google.ads.admanager.v1.IReportDefinition=} [properties] Properties to set - */ - function ReportDefinition(properties) { - this.dimensions = []; - this.metrics = []; - this.filters = []; - this.customDimensionKeyIds = []; - this.lineItemCustomFieldIds = []; - this.orderCustomFieldIds = []; - this.creativeCustomFieldIds = []; - this.flags = []; - this.sorts = []; - 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 FixedDateRange. + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange + * @classdesc Represents a FixedDateRange. + * @implements IFixedDateRange + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange=} [properties] Properties to set + */ + function FixedDateRange(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]]; + } - /** - * ReportDefinition dimensions. - * @member {Array.} dimensions - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dimensions = $util.emptyArray; + /** + * FixedDateRange startDate. + * @member {google.type.IDate|null|undefined} startDate + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @instance + */ + FixedDateRange.prototype.startDate = null; - /** - * ReportDefinition metrics. - * @member {Array.} metrics - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metrics = $util.emptyArray; + /** + * FixedDateRange endDate. + * @member {google.type.IDate|null|undefined} endDate + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @instance + */ + FixedDateRange.prototype.endDate = null; - /** - * ReportDefinition filters. - * @member {Array.} filters - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.filters = $util.emptyArray; + /** + * Creates a new FixedDateRange instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange} FixedDateRange instance + */ + FixedDateRange.create = function create(properties) { + return new FixedDateRange(properties); + }; + + /** + * Encodes the specified FixedDateRange message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange} message FixedDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedDateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + $root.google.type.Date.encode(message.startDate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + $root.google.type.Date.encode(message.endDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FixedDateRange message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.DateRange.IFixedDateRange} message FixedDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedDateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FixedDateRange message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange} FixedDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedDateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FixedDateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange} FixedDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedDateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FixedDateRange message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedDateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) { + var error = $root.google.type.Date.verify(message.startDate); + if (error) + return "startDate." + error; + } + if (message.endDate != null && message.hasOwnProperty("endDate")) { + var error = $root.google.type.Date.verify(message.endDate); + if (error) + return "endDate." + error; + } + return null; + }; + + /** + * Creates a FixedDateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange} FixedDateRange + */ + FixedDateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange(); + if (object.startDate != null) { + if (typeof object.startDate !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.startDate: object expected"); + message.startDate = $root.google.type.Date.fromObject(object.startDate); + } + if (object.endDate != null) { + if (typeof object.endDate !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.endDate: object expected"); + message.endDate = $root.google.type.Date.fromObject(object.endDate); + } + return message; + }; - /** - * ReportDefinition timeZoneSource. - * @member {google.ads.admanager.v1.Report.TimeZoneSource} timeZoneSource - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.timeZoneSource = 0; + /** + * Creates a plain object from a FixedDateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange} message FixedDateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedDateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = null; + object.endDate = null; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = $root.google.type.Date.toObject(message.startDate, options); + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = $root.google.type.Date.toObject(message.endDate, options); + return object; + }; - /** - * ReportDefinition timeZone. - * @member {string} timeZone - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.timeZone = ""; + /** + * Converts this FixedDateRange to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @instance + * @returns {Object.} JSON object + */ + FixedDateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ReportDefinition currencyCode. - * @member {string} currencyCode - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.currencyCode = ""; + /** + * Gets the default type url for FixedDateRange + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FixedDateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange"; + }; - /** - * ReportDefinition dateRange. - * @member {google.ads.admanager.v1.Report.IDateRange|null|undefined} dateRange - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dateRange = null; + return FixedDateRange; + })(); - /** - * ReportDefinition comparisonDateRange. - * @member {google.ads.admanager.v1.Report.IDateRange|null|undefined} comparisonDateRange - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.comparisonDateRange = null; + /** + * RelativeDateRange enum. + * @name google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange + * @enum {number} + * @property {number} RELATIVE_DATE_RANGE_UNSPECIFIED=0 RELATIVE_DATE_RANGE_UNSPECIFIED value + * @property {number} TODAY=1 TODAY value + * @property {number} YESTERDAY=2 YESTERDAY value + * @property {number} THIS_WEEK=3 THIS_WEEK value + * @property {number} THIS_WEEK_TO_DATE=29 THIS_WEEK_TO_DATE value + * @property {number} THIS_MONTH=4 THIS_MONTH value + * @property {number} THIS_MONTH_TO_DATE=26 THIS_MONTH_TO_DATE value + * @property {number} THIS_QUARTER=5 THIS_QUARTER value + * @property {number} THIS_QUARTER_TO_DATE=27 THIS_QUARTER_TO_DATE value + * @property {number} THIS_YEAR=6 THIS_YEAR value + * @property {number} THIS_YEAR_TO_DATE=28 THIS_YEAR_TO_DATE value + * @property {number} LAST_WEEK=7 LAST_WEEK value + * @property {number} LAST_MONTH=8 LAST_MONTH value + * @property {number} LAST_QUARTER=9 LAST_QUARTER value + * @property {number} LAST_YEAR=10 LAST_YEAR value + * @property {number} LAST_7_DAYS=11 LAST_7_DAYS value + * @property {number} LAST_30_DAYS=12 LAST_30_DAYS value + * @property {number} LAST_60_DAYS=13 LAST_60_DAYS value + * @property {number} LAST_90_DAYS=14 LAST_90_DAYS value + * @property {number} LAST_180_DAYS=15 LAST_180_DAYS value + * @property {number} LAST_360_DAYS=16 LAST_360_DAYS value + * @property {number} LAST_365_DAYS=17 LAST_365_DAYS value + * @property {number} LAST_3_MONTHS=18 LAST_3_MONTHS value + * @property {number} LAST_6_MONTHS=19 LAST_6_MONTHS value + * @property {number} LAST_12_MONTHS=20 LAST_12_MONTHS value + * @property {number} ALL_AVAILABLE=21 ALL_AVAILABLE value + * @property {number} TOMORROW=30 TOMORROW value + * @property {number} NEXT_90_DAYS=31 NEXT_90_DAYS value + * @property {number} NEXT_MONTH=32 NEXT_MONTH value + * @property {number} NEXT_3_MONTHS=33 NEXT_3_MONTHS value + * @property {number} NEXT_12_MONTHS=34 NEXT_12_MONTHS value + * @property {number} NEXT_WEEK=35 NEXT_WEEK value + * @property {number} NEXT_QUARTER=36 NEXT_QUARTER value + * @property {number} TO_END_OF_NEXT_MONTH=37 TO_END_OF_NEXT_MONTH value + * @property {number} PREVIOUS_PERIOD=22 PREVIOUS_PERIOD value + * @property {number} SAME_PERIOD_PREVIOUS_YEAR=24 SAME_PERIOD_PREVIOUS_YEAR value + */ + DateRange.RelativeDateRange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATIVE_DATE_RANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TODAY"] = 1; + values[valuesById[2] = "YESTERDAY"] = 2; + values[valuesById[3] = "THIS_WEEK"] = 3; + values[valuesById[29] = "THIS_WEEK_TO_DATE"] = 29; + values[valuesById[4] = "THIS_MONTH"] = 4; + values[valuesById[26] = "THIS_MONTH_TO_DATE"] = 26; + values[valuesById[5] = "THIS_QUARTER"] = 5; + values[valuesById[27] = "THIS_QUARTER_TO_DATE"] = 27; + values[valuesById[6] = "THIS_YEAR"] = 6; + values[valuesById[28] = "THIS_YEAR_TO_DATE"] = 28; + values[valuesById[7] = "LAST_WEEK"] = 7; + values[valuesById[8] = "LAST_MONTH"] = 8; + values[valuesById[9] = "LAST_QUARTER"] = 9; + values[valuesById[10] = "LAST_YEAR"] = 10; + values[valuesById[11] = "LAST_7_DAYS"] = 11; + values[valuesById[12] = "LAST_30_DAYS"] = 12; + values[valuesById[13] = "LAST_60_DAYS"] = 13; + values[valuesById[14] = "LAST_90_DAYS"] = 14; + values[valuesById[15] = "LAST_180_DAYS"] = 15; + values[valuesById[16] = "LAST_360_DAYS"] = 16; + values[valuesById[17] = "LAST_365_DAYS"] = 17; + values[valuesById[18] = "LAST_3_MONTHS"] = 18; + values[valuesById[19] = "LAST_6_MONTHS"] = 19; + values[valuesById[20] = "LAST_12_MONTHS"] = 20; + values[valuesById[21] = "ALL_AVAILABLE"] = 21; + values[valuesById[30] = "TOMORROW"] = 30; + values[valuesById[31] = "NEXT_90_DAYS"] = 31; + values[valuesById[32] = "NEXT_MONTH"] = 32; + values[valuesById[33] = "NEXT_3_MONTHS"] = 33; + values[valuesById[34] = "NEXT_12_MONTHS"] = 34; + values[valuesById[35] = "NEXT_WEEK"] = 35; + values[valuesById[36] = "NEXT_QUARTER"] = 36; + values[valuesById[37] = "TO_END_OF_NEXT_MONTH"] = 37; + values[valuesById[22] = "PREVIOUS_PERIOD"] = 22; + values[valuesById[24] = "SAME_PERIOD_PREVIOUS_YEAR"] = 24; + return values; + })(); - /** - * ReportDefinition customDimensionKeyIds. - * @member {Array.} customDimensionKeyIds - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.customDimensionKeyIds = $util.emptyArray; + return DateRange; + })(); - /** - * ReportDefinition lineItemCustomFieldIds. - * @member {Array.} lineItemCustomFieldIds - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.lineItemCustomFieldIds = $util.emptyArray; + ReportDefinition.Filter = (function() { - /** - * ReportDefinition orderCustomFieldIds. - * @member {Array.} orderCustomFieldIds - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.orderCustomFieldIds = $util.emptyArray; + /** + * Properties of a Filter. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface IFilter + * @property {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter|null} [fieldFilter] Filter fieldFilter + * @property {google.ads.admanager.v1.ReportDefinition.IFilter|null} [notFilter] Filter notFilter + * @property {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null} [andFilter] Filter andFilter + * @property {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null} [orFilter] Filter orFilter + */ - /** - * ReportDefinition creativeCustomFieldIds. - * @member {Array.} creativeCustomFieldIds - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.creativeCustomFieldIds = $util.emptyArray; + /** + * Constructs a new Filter. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.IFilter=} [properties] Properties to set + */ + function Filter(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]]; + } - /** - * ReportDefinition reportType. - * @member {google.ads.admanager.v1.Report.ReportType} reportType - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.reportType = 0; + /** + * Filter fieldFilter. + * @member {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter|null|undefined} fieldFilter + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + */ + Filter.prototype.fieldFilter = null; - /** - * ReportDefinition timePeriodColumn. - * @member {google.ads.admanager.v1.Report.TimePeriodColumn} timePeriodColumn - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.timePeriodColumn = 0; + /** + * Filter notFilter. + * @member {google.ads.admanager.v1.ReportDefinition.IFilter|null|undefined} notFilter + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + */ + Filter.prototype.notFilter = null; - /** - * ReportDefinition flags. - * @member {Array.} flags - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.flags = $util.emptyArray; + /** + * Filter andFilter. + * @member {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null|undefined} andFilter + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + */ + Filter.prototype.andFilter = null; - /** - * ReportDefinition sorts. - * @member {Array.} sorts - * @memberof google.ads.admanager.v1.ReportDefinition - * @instance - */ - ReportDefinition.prototype.sorts = $util.emptyArray; + /** + * Filter orFilter. + * @member {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList|null|undefined} orFilter + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + */ + Filter.prototype.orFilter = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportDefinition.prototype, "_comparisonDateRange", { - get: $util.oneOfGetter($oneOfFields = ["comparisonDateRange"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Filter type. + * @member {"fieldFilter"|"notFilter"|"andFilter"|"orFilter"|undefined} type + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["fieldFilter", "notFilter", "andFilter", "orFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new ReportDefinition instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {google.ads.admanager.v1.IReportDefinition=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition instance - */ - ReportDefinition.create = function create(properties) { - return new ReportDefinition(properties); - }; + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFilter=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; - /** - * Encodes the specified ReportDefinition message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {google.ads.admanager.v1.IReportDefinition} message ReportDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportDefinition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensions != null && message.dimensions.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.dimensions.length; ++i) - writer.int32(message.dimensions[i]); - writer.ldelim(); - } - if (message.metrics != null && message.metrics.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.metrics.length; ++i) - writer.int32(message.metrics[i]); - writer.ldelim(); - } - if (message.filters != null && message.filters.length) - for (var i = 0; i < message.filters.length; ++i) - $root.google.ads.admanager.v1.Report.Filter.encode(message.filters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.timeZone); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); - if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) - $root.google.ads.admanager.v1.Report.DateRange.encode(message.dateRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.customDimensionKeyIds != null && message.customDimensionKeyIds.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.customDimensionKeyIds.length; ++i) - writer.int64(message.customDimensionKeyIds[i]); - writer.ldelim(); - } - if (message.reportType != null && Object.hasOwnProperty.call(message, "reportType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.reportType); - if (message.comparisonDateRange != null && Object.hasOwnProperty.call(message, "comparisonDateRange")) - $root.google.ads.admanager.v1.Report.DateRange.encode(message.comparisonDateRange, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.timePeriodColumn != null && Object.hasOwnProperty.call(message, "timePeriodColumn")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.timePeriodColumn); - if (message.lineItemCustomFieldIds != null && message.lineItemCustomFieldIds.length) { - writer.uint32(/* id 11, wireType 2 =*/90).fork(); - for (var i = 0; i < message.lineItemCustomFieldIds.length; ++i) - writer.int64(message.lineItemCustomFieldIds[i]); - writer.ldelim(); - } - if (message.orderCustomFieldIds != null && message.orderCustomFieldIds.length) { - writer.uint32(/* id 12, wireType 2 =*/98).fork(); - for (var i = 0; i < message.orderCustomFieldIds.length; ++i) - writer.int64(message.orderCustomFieldIds[i]); - writer.ldelim(); - } - if (message.creativeCustomFieldIds != null && message.creativeCustomFieldIds.length) { - writer.uint32(/* id 13, wireType 2 =*/106).fork(); - for (var i = 0; i < message.creativeCustomFieldIds.length; ++i) - writer.int64(message.creativeCustomFieldIds[i]); - writer.ldelim(); - } - if (message.flags != null && message.flags.length) - for (var i = 0; i < message.flags.length; ++i) - $root.google.ads.admanager.v1.Report.Flag.encode(message.flags[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.sorts != null && message.sorts.length) - for (var i = 0; i < message.sorts.length; ++i) - $root.google.ads.admanager.v1.Report.Sort.encode(message.sorts[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.timeZoneSource != null && Object.hasOwnProperty.call(message, "timeZoneSource")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.timeZoneSource); - return writer; - }; + /** + * Encodes the specified Filter message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldFilter != null && Object.hasOwnProperty.call(message, "fieldFilter")) + $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.encode(message.fieldFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.notFilter != null && Object.hasOwnProperty.call(message, "notFilter")) + $root.google.ads.admanager.v1.ReportDefinition.Filter.encode(message.notFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.andFilter != null && Object.hasOwnProperty.call(message, "andFilter")) + $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.encode(message.andFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.orFilter != null && Object.hasOwnProperty.call(message, "orFilter")) + $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.encode(message.orFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {google.ads.admanager.v1.IReportDefinition} message ReportDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ReportDefinition message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportDefinition.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dimensions.push(reader.int32()); - } else - message.dimensions.push(reader.int32()); - break; - } - case 2: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metrics.push(reader.int32()); - } else - message.metrics.push(reader.int32()); - break; - } - case 3: { - if (!(message.filters && message.filters.length)) - message.filters = []; - message.filters.push($root.google.ads.admanager.v1.Report.Filter.decode(reader, reader.uint32())); - break; - } - case 20: { - message.timeZoneSource = reader.int32(); - break; - } - case 4: { - message.timeZone = reader.string(); - break; - } - case 5: { - message.currencyCode = reader.string(); - break; - } - case 6: { - message.dateRange = $root.google.ads.admanager.v1.Report.DateRange.decode(reader, reader.uint32()); - break; - } - case 9: { - message.comparisonDateRange = $root.google.ads.admanager.v1.Report.DateRange.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.customDimensionKeyIds && message.customDimensionKeyIds.length)) - message.customDimensionKeyIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.customDimensionKeyIds.push(reader.int64()); - } else - message.customDimensionKeyIds.push(reader.int64()); - break; - } - case 11: { - if (!(message.lineItemCustomFieldIds && message.lineItemCustomFieldIds.length)) - message.lineItemCustomFieldIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.lineItemCustomFieldIds.push(reader.int64()); - } else - message.lineItemCustomFieldIds.push(reader.int64()); - break; - } - case 12: { - if (!(message.orderCustomFieldIds && message.orderCustomFieldIds.length)) - message.orderCustomFieldIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.orderCustomFieldIds.push(reader.int64()); - } else - message.orderCustomFieldIds.push(reader.int64()); + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 13: { - if (!(message.creativeCustomFieldIds && message.creativeCustomFieldIds.length)) - message.creativeCustomFieldIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.creativeCustomFieldIds.push(reader.int64()); - } else - message.creativeCustomFieldIds.push(reader.int64()); + switch (tag >>> 3) { + case 1: { + message.fieldFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.notFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.andFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.decode(reader, reader.uint32()); + break; + } + case 4: { + message.orFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 8: { - message.reportType = reader.int32(); - break; + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldFilter != null && message.hasOwnProperty("fieldFilter")) { + properties.type = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.verify(message.fieldFilter); + if (error) + return "fieldFilter." + error; } - case 10: { - message.timePeriodColumn = reader.int32(); - break; + } + if (message.notFilter != null && message.hasOwnProperty("notFilter")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.verify(message.notFilter); + if (error) + return "notFilter." + error; } - case 14: { - if (!(message.flags && message.flags.length)) - message.flags = []; - message.flags.push($root.google.ads.admanager.v1.Report.Flag.decode(reader, reader.uint32())); - break; + } + if (message.andFilter != null && message.hasOwnProperty("andFilter")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify(message.andFilter); + if (error) + return "andFilter." + error; } - case 15: { - if (!(message.sorts && message.sorts.length)) - message.sorts = []; - message.sorts.push($root.google.ads.admanager.v1.Report.Sort.decode(reader, reader.uint32())); - break; + } + if (message.orFilter != null && message.hasOwnProperty("orFilter")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify(message.orFilter); + if (error) + return "orFilter." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return null; + }; - /** - * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportDefinition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Filter) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Filter(); + if (object.fieldFilter != null) { + if (typeof object.fieldFilter !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.fieldFilter: object expected"); + message.fieldFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.fromObject(object.fieldFilter); + } + if (object.notFilter != null) { + if (typeof object.notFilter !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.notFilter: object expected"); + message.notFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.fromObject(object.notFilter); + } + if (object.andFilter != null) { + if (typeof object.andFilter !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.andFilter: object expected"); + message.andFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.fromObject(object.andFilter); + } + if (object.orFilter != null) { + if (typeof object.orFilter !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.orFilter: object expected"); + message.orFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.fromObject(object.orFilter); + } + return message; + }; - /** - * Verifies a ReportDefinition message. - * @function verify - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportDefinition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) - switch (message.dimensions[i]) { - default: - return "dimensions: enum value[] expected"; - case 0: - case 242: - case 228: - case 131: - case 230: - case 229: - case 132: - case 227: - case 390: - case 391: - case 64: - case 65: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 101: - case 25: - case 27: - case 30: - case 48: - case 50: - case 52: - case 54: - case 56: - case 58: - case 60: - case 32: - case 34: - case 36: - case 38: - case 40: - case 42: - case 44: - case 46: - case 142: - case 26: - case 29: - case 31: - case 49: - case 51: - case 53: - case 55: - case 57: - case 59: - case 61: - case 33: - case 35: - case 37: - case 39: - case 41: - case 43: - case 45: - case 47: - case 143: - case 63: - case 62: - case 206: - case 207: - case 392: - case 349: - case 346: - case 351: - case 350: - case 347: - case 348: - case 378: - case 379: - case 376: - case 370: - case 371: - case 377: - case 374: - case 375: - case 278: - case 258: - case 259: - case 296: - case 297: - case 280: - case 272: - case 264: - case 265: - case 381: - case 290: - case 291: - case 380: - case 288: - case 274: - case 292: - case 293: - case 294: - case 295: - case 267: - case 269: - case 302: - case 257: - case 285: - case 273: - case 303: - case 298: - case 289: - case 283: - case 282: - case 284: - case 276: - case 299: - case 286: - case 277: - case 262: - case 263: - case 260: - case 261: - case 266: - case 306: - case 307: - case 268: - case 270: - case 300: - case 301: - case 271: - case 275: - case 287: - case 372: - case 373: - case 313: - case 314: - case 315: - case 316: - case 340: - case 341: - case 317: - case 319: - case 320: - case 338: - case 334: - case 335: - case 322: - case 323: - case 339: - case 324: - case 321: - case 325: - case 329: - case 328: - case 331: - case 330: - case 332: - case 333: - case 326: - case 327: - case 318: - case 336: - case 337: - case 383: - case 384: - case 119: - case 120: - case 235: - case 236: - case 369: - case 368: - case 133: - case 134: - case 243: - case 244: - case 246: - case 247: - case 11: - case 12: - case 366: - case 367: - case 174: - case 138: - case 139: - case 148: - case 149: - case 361: - case 344: - case 345: - case 3: - case 4: - case 9: - case 10: - case 22: - case 23: - case 226: - case 15: - case 16: - case 225: - case 185: - case 186: - case 248: - case 249: - case 100: - case 223: - case 224: - case 17: - case 18: - case 19: - case 20: - case 382: - case 401: - case 214: - case 215: - case 188: - case 204: - case 205: - case 250: - case 251: - case 92: - case 85: - case 212: - case 213: - case 176: - case 189: - case 190: - case 175: - case 180: - case 87: - case 191: - case 192: - case 195: - case 196: - case 81: - case 83: - case 201: - case 202: - case 97: - case 86: - case 256: + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fieldFilter != null && message.hasOwnProperty("fieldFilter")) { + object.fieldFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.toObject(message.fieldFilter, options); + if (options.oneofs) + object.type = "fieldFilter"; + } + if (message.notFilter != null && message.hasOwnProperty("notFilter")) { + object.notFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.toObject(message.notFilter, options); + if (options.oneofs) + object.type = "notFilter"; + } + if (message.andFilter != null && message.hasOwnProperty("andFilter")) { + object.andFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.toObject(message.andFilter, options); + if (options.oneofs) + object.type = "andFilter"; + } + if (message.orFilter != null && message.hasOwnProperty("orFilter")) { + object.orFilter = $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList.toObject(message.orFilter, options); + if (options.oneofs) + object.type = "orFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Filter"; + }; + + Filter.FieldFilter = (function() { + + /** + * Properties of a FieldFilter. + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @interface IFieldFilter + * @property {google.ads.admanager.v1.ReportDefinition.IField|null} [field] FieldFilter field + * @property {google.ads.admanager.v1.ReportDefinition.Filter.Operation|null} [operation] FieldFilter operation + * @property {Array.|null} [values] FieldFilter values + * @property {google.ads.admanager.v1.ReportDefinition.ISlice|null} [slice] FieldFilter slice + * @property {number|null} [timePeriodIndex] FieldFilter timePeriodIndex + * @property {google.ads.admanager.v1.ReportDefinition.MetricValueType|null} [metricValueType] FieldFilter metricValueType + */ + + /** + * Constructs a new FieldFilter. + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @classdesc Represents a FieldFilter. + * @implements IFieldFilter + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter=} [properties] Properties to set + */ + function FieldFilter(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]]; + } + + /** + * FieldFilter field. + * @member {google.ads.admanager.v1.ReportDefinition.IField|null|undefined} field + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.field = null; + + /** + * FieldFilter operation. + * @member {google.ads.admanager.v1.ReportDefinition.Filter.Operation} operation + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.operation = 0; + + /** + * FieldFilter values. + * @member {Array.} values + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.values = $util.emptyArray; + + /** + * FieldFilter slice. + * @member {google.ads.admanager.v1.ReportDefinition.ISlice|null|undefined} slice + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.slice = null; + + /** + * FieldFilter timePeriodIndex. + * @member {number|null|undefined} timePeriodIndex + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.timePeriodIndex = null; + + /** + * FieldFilter metricValueType. + * @member {google.ads.admanager.v1.ReportDefinition.MetricValueType|null|undefined} metricValueType + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + */ + FieldFilter.prototype.metricValueType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FieldFilter.prototype, "_slice", { + get: $util.oneOfGetter($oneOfFields = ["slice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FieldFilter.prototype, "_timePeriodIndex", { + get: $util.oneOfGetter($oneOfFields = ["timePeriodIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FieldFilter.prototype, "_metricValueType", { + get: $util.oneOfGetter($oneOfFields = ["metricValueType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FieldFilter instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter} FieldFilter instance + */ + FieldFilter.create = function create(properties) { + return new FieldFilter(properties); + }; + + /** + * Encodes the specified FieldFilter message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter} message FieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.ads.admanager.v1.ReportDefinition.Field.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operation); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.slice != null && Object.hasOwnProperty.call(message, "slice")) + $root.google.ads.admanager.v1.ReportDefinition.Slice.encode(message.slice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timePeriodIndex != null && Object.hasOwnProperty.call(message, "timePeriodIndex")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.timePeriodIndex); + if (message.metricValueType != null && Object.hasOwnProperty.call(message, "metricValueType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metricValueType); + return writer; + }; + + /** + * Encodes the specified FieldFilter message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFieldFilter} message FieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldFilter message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter} FieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.ads.admanager.v1.ReportDefinition.Field.decode(reader, reader.uint32()); + break; + } + case 2: { + message.operation = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 4: { + message.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.decode(reader, reader.uint32()); + break; + } + case 5: { + message.timePeriodIndex = reader.int32(); + break; + } + case 6: { + message.metricValueType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter} FieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldFilter message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Field.verify(message.field); + if (error) + return "field." + error; + } + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + 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.ads.admanager.v1.ReportValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + if (message.slice != null && message.hasOwnProperty("slice")) { + properties._slice = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Slice.verify(message.slice); + if (error) + return "slice." + error; + } + } + if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { + properties._timePeriodIndex = 1; + if (!$util.isInteger(message.timePeriodIndex)) + return "timePeriodIndex: integer expected"; + } + if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { + properties._metricValueType = 1; + switch (message.metricValueType) { + default: + return "metricValueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter} FieldFilter + */ + FieldFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.field: object expected"); + message.field = $root.google.ads.admanager.v1.ReportDefinition.Field.fromObject(object.field); + } + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "IN": + case 0: + message.operation = 0; + break; + case "NOT_IN": case 1: - case 181: - case 95: - case 94: - case 96: - case 89: + message.operation = 1; + break; + case "CONTAINS": case 2: - case 98: - case 90: - case 210: - case 211: - case 93: - case 396: - case 208: - case 209: - case 24: - case 304: - case 305: - case 82: - case 84: - case 193: - case 194: - case 187: - case 88: - case 179: - case 140: - case 141: - case 128: - case 129: - case 123: - case 127: - case 311: - case 312: - case 125: - case 245: - case 99: - case 21: - case 130: + message.operation = 2; + break; + case "NOT_CONTAINS": + case 3: + message.operation = 3; + break; + case "LESS_THAN": + case 4: + message.operation = 4; + break; + case "LESS_THAN_EQUALS": + case 5: + message.operation = 5; + break; + case "GREATER_THAN": case 6: - case 255: - case 254: - case 253: - case 252: - case 117: - case 118: - case 238: - case 237: - case 150: - case 151: - case 152: - case 153: - case 231: - case 239: - case 154: - case 155: - case 156: + message.operation = 6; + break; + case "GREATER_THAN_EQUALS": case 7: - case 170: - case 171: - case 158: - case 159: + message.operation = 7; + break; + case "BETWEEN": case 8: - case 160: - case 157: - case 161: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 162: - case 163: - case 203: - case 113: - case 144: - case 114: - case 145: - case 362: - case 363: - case 364: - case 365: - case 240: - case 241: - case 13: - case 14: - case 343: - case 352: - case 146: - case 147: - case 597: - case 387: - case 232: - case 233: - case 385: - case 386: - case 388: - case 389: - case 393: - case 394: - case 172: - case 173: - case 5: - case 184: - case 182: - case 183: - case 10000: - case 10001: - case 10002: - case 10003: - case 10004: - case 10005: - case 10006: - case 10007: - case 10008: - case 10009: - case 10010: - case 10011: - case 10012: - case 10013: - case 10014: - case 11000: - case 11001: - case 11002: - case 11003: - case 11004: - case 11005: - case 11006: - case 11007: - case 11008: - case 11009: - case 11010: - case 11011: - case 11012: - case 11013: - case 11014: - case 12000: - case 12001: - case 12002: - case 12003: - case 12004: - case 12005: - case 12006: - case 12007: - case 12008: - case 12009: - case 12010: - case 12011: - case 12012: - case 12013: - case 12014: - case 13000: - case 13001: - case 13002: - case 13003: - case 13004: - case 13005: - case 13006: - case 13007: - case 13008: - case 13009: - case 13010: - case 13011: - case 13012: - case 13013: - case 13014: - case 14000: - case 14001: - case 14002: - case 14003: - case 14004: - case 14005: - case 14006: - case 14007: - case 14008: - case 14009: - case 14010: - case 14011: - case 14012: - case 14013: - case 14014: - case 15000: - case 15001: - case 15002: - case 15003: - case 15004: - case 15005: - case 15006: - case 15007: - case 15008: - case 15009: - case 15010: - case 15011: - case 15012: - case 15013: - case 15014: - case 16000: - case 16001: - case 16002: - case 16003: - case 16004: - case 16005: - case 16006: - case 16007: - case 16008: - case 16009: - case 16010: - case 16011: - case 16012: - case 16013: - case 16014: - case 17000: - case 17001: - case 17002: - case 17003: - case 17004: - case 17005: - case 17006: - case 17007: - case 17008: - case 17009: - case 17010: - case 17011: - case 17012: - case 17013: - case 17014: - case 18000: - case 18001: - case 18002: - case 18003: - case 18004: - case 18005: - case 18006: - case 18007: - case 18008: - case 18009: - case 18010: - case 18011: - case 18012: - case 18013: - case 18014: - case 19000: - case 19001: - case 19002: - case 19003: - case 19004: - case 19005: - case 19006: - case 19007: - case 19008: - case 19009: - case 19010: - case 19011: - case 19012: - case 19013: - case 19014: - case 20000: - case 20001: - case 20002: - case 20003: - case 20004: - case 20005: - case 20006: - case 20007: - case 20008: - case 20009: - case 20010: - case 20011: - case 20012: - case 20013: - case 20014: - case 21000: - case 21001: - case 21002: - case 21003: - case 21004: - case 21005: - case 21006: - case 21007: - case 21008: - case 21009: - case 21010: - case 21011: - case 21012: - case 21013: - case 21014: - case 100000: - case 100001: - case 100002: - case 100003: - case 100004: - case 100005: - case 100006: - case 100007: - case 100008: - case 100009: - case 101000: - case 101001: - case 101002: - case 101003: - case 101004: - case 101005: - case 101006: - case 101007: - case 101008: - case 101009: + message.operation = 8; + break; + case "MATCHES": + case 9: + message.operation = 9; + break; + case "NOT_MATCHES": + case 10: + message.operation = 10; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.values: object expected"); + message.values[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.values[i]); + } + } + if (object.slice != null) { + if (typeof object.slice !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter.slice: object expected"); + message.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.fromObject(object.slice); + } + if (object.timePeriodIndex != null) + message.timePeriodIndex = object.timePeriodIndex | 0; + switch (object.metricValueType) { + default: + if (typeof object.metricValueType === "number") { + message.metricValueType = object.metricValueType; + break; + } break; + case "PRIMARY": + case 0: + message.metricValueType = 0; + break; + case "PRIMARY_PERCENT_OF_TOTAL": + case 1: + message.metricValueType = 1; + break; + case "COMPARISON": + case 2: + message.metricValueType = 2; + break; + case "COMPARISON_PERCENT_OF_TOTAL": + case 3: + message.metricValueType = 3; + break; + case "ABSOLUTE_CHANGE": + case 4: + message.metricValueType = 4; + break; + case "RELATIVE_CHANGE": + case 5: + message.metricValueType = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter} message FieldFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.field = null; + object.operation = options.enums === String ? "IN" : 0; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.ads.admanager.v1.ReportDefinition.Field.toObject(message.field, options); + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Filter.Operation[message.operation] === undefined ? message.operation : $root.google.ads.admanager.v1.ReportDefinition.Filter.Operation[message.operation] : message.operation; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.values[j], options); + } + if (message.slice != null && message.hasOwnProperty("slice")) { + object.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.toObject(message.slice, options); + if (options.oneofs) + object._slice = "slice"; + } + if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { + object.timePeriodIndex = message.timePeriodIndex; + if (options.oneofs) + object._timePeriodIndex = "timePeriodIndex"; + } + if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { + object.metricValueType = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.MetricValueType[message.metricValueType] === undefined ? message.metricValueType : $root.google.ads.admanager.v1.ReportDefinition.MetricValueType[message.metricValueType] : message.metricValueType; + if (options.oneofs) + object._metricValueType = "metricValueType"; + } + return object; + }; + + /** + * Converts this FieldFilter to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @instance + * @returns {Object.} JSON object + */ + FieldFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldFilter + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter"; + }; + + return FieldFilter; + })(); + + Filter.FilterList = (function() { + + /** + * Properties of a FilterList. + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @interface IFilterList + * @property {Array.|null} [filters] FilterList filters + */ + + /** + * Constructs a new FilterList. + * @memberof google.ads.admanager.v1.ReportDefinition.Filter + * @classdesc Represents a FilterList. + * @implements IFilterList + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList=} [properties] Properties to set + */ + function FilterList(properties) { + this.filters = []; + 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]]; + } + + /** + * FilterList filters. + * @member {Array.} filters + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @instance + */ + FilterList.prototype.filters = $util.emptyArray; + + /** + * Creates a new FilterList instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FilterList} FilterList instance + */ + FilterList.create = function create(properties) { + return new FilterList(properties); + }; + + /** + * Encodes the specified FilterList message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList} message FilterList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Filter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Filter.FilterList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.IFilterList} message FilterList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FilterList} FilterList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.ads.admanager.v1.ReportDefinition.Filter.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FilterList} FilterList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterList message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates a FilterList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Filter.FilterList} FilterList + */ + FilterList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Filter.FilterList(); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FilterList.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Filter.FilterList.filters: object expected"); + message.filters[i] = $root.google.ads.admanager.v1.ReportDefinition.Filter.fromObject(object.filters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Filter.FilterList} message FilterList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filters = []; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.ads.admanager.v1.ReportDefinition.Filter.toObject(message.filters[j], options); + } + return object; + }; + + /** + * Converts this FilterList to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @instance + * @returns {Object.} JSON object + */ + FilterList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterList + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Filter.FilterList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Filter.FilterList"; + }; + + return FilterList; + })(); + + /** + * Operation enum. + * @name google.ads.admanager.v1.ReportDefinition.Filter.Operation + * @enum {number} + * @property {number} IN=0 IN value + * @property {number} NOT_IN=1 NOT_IN value + * @property {number} CONTAINS=2 CONTAINS value + * @property {number} NOT_CONTAINS=3 NOT_CONTAINS value + * @property {number} LESS_THAN=4 LESS_THAN value + * @property {number} LESS_THAN_EQUALS=5 LESS_THAN_EQUALS value + * @property {number} GREATER_THAN=6 GREATER_THAN value + * @property {number} GREATER_THAN_EQUALS=7 GREATER_THAN_EQUALS value + * @property {number} BETWEEN=8 BETWEEN value + * @property {number} MATCHES=9 MATCHES value + * @property {number} NOT_MATCHES=10 NOT_MATCHES value + */ + Filter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IN"] = 0; + values[valuesById[1] = "NOT_IN"] = 1; + values[valuesById[2] = "CONTAINS"] = 2; + values[valuesById[3] = "NOT_CONTAINS"] = 3; + values[valuesById[4] = "LESS_THAN"] = 4; + values[valuesById[5] = "LESS_THAN_EQUALS"] = 5; + values[valuesById[6] = "GREATER_THAN"] = 6; + values[valuesById[7] = "GREATER_THAN_EQUALS"] = 7; + values[valuesById[8] = "BETWEEN"] = 8; + values[valuesById[9] = "MATCHES"] = 9; + values[valuesById[10] = "NOT_MATCHES"] = 10; + return values; + })(); + + return Filter; + })(); + + ReportDefinition.Sort = (function() { + + /** + * Properties of a Sort. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface ISort + * @property {google.ads.admanager.v1.ReportDefinition.IField|null} [field] Sort field + * @property {boolean|null} [descending] Sort descending + * @property {google.ads.admanager.v1.ReportDefinition.ISlice|null} [slice] Sort slice + * @property {number|null} [timePeriodIndex] Sort timePeriodIndex + * @property {google.ads.admanager.v1.ReportDefinition.MetricValueType|null} [metricValueType] Sort metricValueType + */ + + /** + * Constructs a new Sort. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a Sort. + * @implements ISort + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.ISort=} [properties] Properties to set + */ + function Sort(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]]; } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) - switch (message.metrics[i]) { + + /** + * Sort field. + * @member {google.ads.admanager.v1.ReportDefinition.IField|null|undefined} field + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + */ + Sort.prototype.field = null; + + /** + * Sort descending. + * @member {boolean} descending + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + */ + Sort.prototype.descending = false; + + /** + * Sort slice. + * @member {google.ads.admanager.v1.ReportDefinition.ISlice|null|undefined} slice + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + */ + Sort.prototype.slice = null; + + /** + * Sort timePeriodIndex. + * @member {number|null|undefined} timePeriodIndex + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + */ + Sort.prototype.timePeriodIndex = null; + + /** + * Sort metricValueType. + * @member {google.ads.admanager.v1.ReportDefinition.MetricValueType|null|undefined} metricValueType + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + */ + Sort.prototype.metricValueType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sort.prototype, "_slice", { + get: $util.oneOfGetter($oneOfFields = ["slice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sort.prototype, "_timePeriodIndex", { + get: $util.oneOfGetter($oneOfFields = ["timePeriodIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sort.prototype, "_metricValueType", { + get: $util.oneOfGetter($oneOfFields = ["metricValueType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Sort instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISort=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Sort} Sort instance + */ + Sort.create = function create(properties) { + return new Sort(properties); + }; + + /** + * Encodes the specified Sort message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Sort.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISort} message Sort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sort.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.ads.admanager.v1.ReportDefinition.Field.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.descending != null && Object.hasOwnProperty.call(message, "descending")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.descending); + if (message.slice != null && Object.hasOwnProperty.call(message, "slice")) + $root.google.ads.admanager.v1.ReportDefinition.Slice.encode(message.slice, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timePeriodIndex != null && Object.hasOwnProperty.call(message, "timePeriodIndex")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.timePeriodIndex); + if (message.metricValueType != null && Object.hasOwnProperty.call(message, "metricValueType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.metricValueType); + return writer; + }; + + /** + * Encodes the specified Sort message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Sort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISort} message Sort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sort message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Sort} Sort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Sort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.ads.admanager.v1.ReportDefinition.Field.decode(reader, reader.uint32()); + break; + } + case 2: { + message.descending = reader.bool(); + break; + } + case 3: { + message.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.decode(reader, reader.uint32()); + break; + } + case 4: { + message.timePeriodIndex = reader.int32(); + break; + } + case 5: { + message.metricValueType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Sort} Sort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sort message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sort.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Field.verify(message.field); + if (error) + return "field." + error; + } + if (message.descending != null && message.hasOwnProperty("descending")) + if (typeof message.descending !== "boolean") + return "descending: boolean expected"; + if (message.slice != null && message.hasOwnProperty("slice")) { + properties._slice = 1; + { + var error = $root.google.ads.admanager.v1.ReportDefinition.Slice.verify(message.slice); + if (error) + return "slice." + error; + } + } + if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { + properties._timePeriodIndex = 1; + if (!$util.isInteger(message.timePeriodIndex)) + return "timePeriodIndex: integer expected"; + } + if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { + properties._metricValueType = 1; + switch (message.metricValueType) { default: - return "metrics: enum value[] expected"; + return "metricValueType: enum value expected"; case 0: - case 61: - case 58: - case 57: - case 60: - case 56: - case 59: - case 73: - case 70: - case 69: - case 72: - case 68: - case 71: - case 26: - case 23: - case 24: - case 22: - case 28: - case 27: - case 29: - case 30: - case 41: - case 25: - case 79: - case 76: - case 75: - case 78: - case 74: - case 77: - case 18: - case 15: - case 16: - case 14: - case 20: - case 19: - case 21: - case 31: - case 42: - case 17: - case 38: - case 67: - case 64: - case 63: - case 66: - case 62: - case 65: - case 34: - case 10: - case 262: - case 7: - case 32: - case 8: - case 6: - case 12: - case 11: - case 35: - case 13: - case 40: - case 33: - case 9: - case 264: - case 261: - case 259: - case 260: - case 263: - case 37: - case 5: + case 1: case 2: - case 44: case 3: - case 129: - case 128: - case 131: - case 130: - case 127: - case 126: - case 1: - case 135: - case 136: - case 137: - case 132: - case 133: - case 134: - case 125: - case 124: - case 123: - case 177: - case 178: - case 176: - case 39: - case 36: case 4: - case 434: - case 435: - case 436: - case 437: - case 438: - case 439: - case 45: - case 43: - case 121: - case 122: - case 92: - case 93: - case 95: - case 96: - case 97: - case 98: - case 99: - case 100: - case 101: - case 102: - case 139: - case 143: - case 144: - case 145: - case 146: - case 147: - case 148: - case 149: - case 150: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 161: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 138: - case 140: - case 175: - case 142: - case 141: - case 103: - case 104: - case 105: - case 106: - case 107: - case 108: - case 109: - case 110: - case 111: - case 112: - case 113: - case 114: - case 115: - case 94: - case 116: - case 117: - case 80: - case 81: - case 82: - case 83: - case 88: - case 87: - case 85: - case 89: - case 86: - case 118: - case 90: - case 84: + case 5: break; } - } - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Filter.verify(message.filters[i]); - if (error) - return "filters." + error; } - } - if (message.timeZoneSource != null && message.hasOwnProperty("timeZoneSource")) - switch (message.timeZoneSource) { - default: - return "timeZoneSource: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + return null; + }; + + /** + * Creates a Sort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Sort} Sort + */ + Sort.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Sort) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Sort(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Sort.field: object expected"); + message.field = $root.google.ads.admanager.v1.ReportDefinition.Field.fromObject(object.field); } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) { - var error = $root.google.ads.admanager.v1.Report.DateRange.verify(message.dateRange); - if (error) - return "dateRange." + error; - } - if (message.comparisonDateRange != null && message.hasOwnProperty("comparisonDateRange")) { - properties._comparisonDateRange = 1; - { - var error = $root.google.ads.admanager.v1.Report.DateRange.verify(message.comparisonDateRange); - if (error) - return "comparisonDateRange." + error; + if (object.descending != null) + message.descending = Boolean(object.descending); + if (object.slice != null) { + if (typeof object.slice !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Sort.slice: object expected"); + message.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.fromObject(object.slice); } - } - if (message.customDimensionKeyIds != null && message.hasOwnProperty("customDimensionKeyIds")) { - if (!Array.isArray(message.customDimensionKeyIds)) - return "customDimensionKeyIds: array expected"; - for (var i = 0; i < message.customDimensionKeyIds.length; ++i) - if (!$util.isInteger(message.customDimensionKeyIds[i]) && !(message.customDimensionKeyIds[i] && $util.isInteger(message.customDimensionKeyIds[i].low) && $util.isInteger(message.customDimensionKeyIds[i].high))) - return "customDimensionKeyIds: integer|Long[] expected"; - } - if (message.lineItemCustomFieldIds != null && message.hasOwnProperty("lineItemCustomFieldIds")) { - if (!Array.isArray(message.lineItemCustomFieldIds)) - return "lineItemCustomFieldIds: array expected"; - for (var i = 0; i < message.lineItemCustomFieldIds.length; ++i) - if (!$util.isInteger(message.lineItemCustomFieldIds[i]) && !(message.lineItemCustomFieldIds[i] && $util.isInteger(message.lineItemCustomFieldIds[i].low) && $util.isInteger(message.lineItemCustomFieldIds[i].high))) - return "lineItemCustomFieldIds: integer|Long[] expected"; - } - if (message.orderCustomFieldIds != null && message.hasOwnProperty("orderCustomFieldIds")) { - if (!Array.isArray(message.orderCustomFieldIds)) - return "orderCustomFieldIds: array expected"; - for (var i = 0; i < message.orderCustomFieldIds.length; ++i) - if (!$util.isInteger(message.orderCustomFieldIds[i]) && !(message.orderCustomFieldIds[i] && $util.isInteger(message.orderCustomFieldIds[i].low) && $util.isInteger(message.orderCustomFieldIds[i].high))) - return "orderCustomFieldIds: integer|Long[] expected"; - } - if (message.creativeCustomFieldIds != null && message.hasOwnProperty("creativeCustomFieldIds")) { - if (!Array.isArray(message.creativeCustomFieldIds)) - return "creativeCustomFieldIds: array expected"; - for (var i = 0; i < message.creativeCustomFieldIds.length; ++i) - if (!$util.isInteger(message.creativeCustomFieldIds[i]) && !(message.creativeCustomFieldIds[i] && $util.isInteger(message.creativeCustomFieldIds[i].low) && $util.isInteger(message.creativeCustomFieldIds[i].high))) - return "creativeCustomFieldIds: integer|Long[] expected"; - } - if (message.reportType != null && message.hasOwnProperty("reportType")) - switch (message.reportType) { + if (object.timePeriodIndex != null) + message.timePeriodIndex = object.timePeriodIndex | 0; + switch (object.metricValueType) { default: - return "reportType: enum value expected"; - case 0: - case 1: + if (typeof object.metricValueType === "number") { + message.metricValueType = object.metricValueType; + break; + } break; - } - if (message.timePeriodColumn != null && message.hasOwnProperty("timePeriodColumn")) - switch (message.timePeriodColumn) { - default: - return "timePeriodColumn: enum value expected"; + case "PRIMARY": case 0: + message.metricValueType = 0; + break; + case "PRIMARY_PERCENT_OF_TOTAL": case 1: + message.metricValueType = 1; + break; + case "COMPARISON": case 2: + message.metricValueType = 2; + break; + case "COMPARISON_PERCENT_OF_TOTAL": case 3: + message.metricValueType = 3; + break; + case "ABSOLUTE_CHANGE": case 4: + message.metricValueType = 4; + break; + case "RELATIVE_CHANGE": + case 5: + message.metricValueType = 5; break; } - if (message.flags != null && message.hasOwnProperty("flags")) { - if (!Array.isArray(message.flags)) - return "flags: array expected"; - for (var i = 0; i < message.flags.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Flag.verify(message.flags[i]); - if (error) - return "flags." + error; + return message; + }; + + /** + * Creates a plain object from a Sort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Sort} message Sort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = null; + object.descending = false; } - } - if (message.sorts != null && message.hasOwnProperty("sorts")) { - if (!Array.isArray(message.sorts)) - return "sorts: array expected"; - for (var i = 0; i < message.sorts.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Sort.verify(message.sorts[i]); - if (error) - return "sorts." + error; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.ads.admanager.v1.ReportDefinition.Field.toObject(message.field, options); + if (message.descending != null && message.hasOwnProperty("descending")) + object.descending = message.descending; + if (message.slice != null && message.hasOwnProperty("slice")) { + object.slice = $root.google.ads.admanager.v1.ReportDefinition.Slice.toObject(message.slice, options); + if (options.oneofs) + object._slice = "slice"; + } + if (message.timePeriodIndex != null && message.hasOwnProperty("timePeriodIndex")) { + object.timePeriodIndex = message.timePeriodIndex; + if (options.oneofs) + object._timePeriodIndex = "timePeriodIndex"; + } + if (message.metricValueType != null && message.hasOwnProperty("metricValueType")) { + object.metricValueType = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.MetricValueType[message.metricValueType] === undefined ? message.metricValueType : $root.google.ads.admanager.v1.ReportDefinition.MetricValueType[message.metricValueType] : message.metricValueType; + if (options.oneofs) + object._metricValueType = "metricValueType"; + } + return object; + }; + + /** + * Converts this Sort to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @instance + * @returns {Object.} JSON object + */ + Sort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sort + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Sort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Sort"; + }; + + return Sort; + })(); + + ReportDefinition.Slice = (function() { + + /** + * Properties of a Slice. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface ISlice + * @property {google.ads.admanager.v1.ReportDefinition.Dimension|null} [dimension] Slice dimension + * @property {google.ads.admanager.v1.IReportValue|null} [value] Slice value + */ + + /** + * Constructs a new Slice. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a Slice. + * @implements ISlice + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.ISlice=} [properties] Properties to set + */ + function Slice(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 null; - }; - /** - * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.ReportDefinition - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ReportDefinition} ReportDefinition - */ - ReportDefinition.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ReportDefinition) - return object; - var message = new $root.google.ads.admanager.v1.ReportDefinition(); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) - switch (object.dimensions[i]) { + /** + * Slice dimension. + * @member {google.ads.admanager.v1.ReportDefinition.Dimension} dimension + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @instance + */ + Slice.prototype.dimension = 0; + + /** + * Slice value. + * @member {google.ads.admanager.v1.IReportValue|null|undefined} value + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @instance + */ + Slice.prototype.value = null; + + /** + * Creates a new Slice instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISlice=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Slice} Slice instance + */ + Slice.create = function create(properties) { + return new Slice(properties); + }; + + /** + * Encodes the specified Slice message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Slice.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISlice} message Slice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dimension); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.ads.admanager.v1.ReportValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Slice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {google.ads.admanager.v1.ReportDefinition.ISlice} message Slice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Slice message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Slice} Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slice.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Slice(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimension = reader.int32(); + break; + } + case 2: { + message.value = $root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Slice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Slice} Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Slice message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Slice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + switch (message.dimension) { default: - if (typeof object.dimensions[i] === "number") { - message.dimensions[i] = object.dimensions[i]; - break; - } - case "DIMENSION_UNSPECIFIED": + return "dimension: enum value expected"; case 0: - message.dimensions[i] = 0; - break; - case "ADVERTISER_DOMAIN_NAME": + case 575: + case 576: + case 475: + case 476: case 242: - message.dimensions[i] = 242; - break; - case "ADVERTISER_EXTERNAL_ID": case 228: - message.dimensions[i] = 228; - break; - case "ADVERTISER_ID": case 131: - message.dimensions[i] = 131; - break; - case "ADVERTISER_LABELS": case 230: - message.dimensions[i] = 230; - break; - case "ADVERTISER_LABEL_IDS": case 229: - message.dimensions[i] = 229; - break; - case "ADVERTISER_NAME": case 132: - message.dimensions[i] = 132; - break; - case "ADVERTISER_PRIMARY_CONTACT": case 227: - message.dimensions[i] = 227; - break; - case "AD_LOCATION": + case 471: + case 472: + case 473: + case 474: + case 580: + case 499: + case 500: + case 641: + case 642: case 390: - message.dimensions[i] = 390; - break; - case "AD_LOCATION_NAME": case 391: - message.dimensions[i] = 391; - break; - case "AD_UNIT_CODE": + case 620: + case 621: + case 622: + case 497: + case 498: case 64: - message.dimensions[i] = 64; - break; - case "AD_UNIT_CODE_LEVEL_1": case 65: - message.dimensions[i] = 65; - break; - case "AD_UNIT_CODE_LEVEL_10": case 74: - message.dimensions[i] = 74; - break; - case "AD_UNIT_CODE_LEVEL_11": case 75: - message.dimensions[i] = 75; - break; - case "AD_UNIT_CODE_LEVEL_12": case 76: - message.dimensions[i] = 76; - break; - case "AD_UNIT_CODE_LEVEL_13": case 77: - message.dimensions[i] = 77; - break; - case "AD_UNIT_CODE_LEVEL_14": case 78: - message.dimensions[i] = 78; - break; - case "AD_UNIT_CODE_LEVEL_15": case 79: - message.dimensions[i] = 79; - break; - case "AD_UNIT_CODE_LEVEL_16": case 80: - message.dimensions[i] = 80; - break; - case "AD_UNIT_CODE_LEVEL_2": case 66: - message.dimensions[i] = 66; - break; - case "AD_UNIT_CODE_LEVEL_3": case 67: - message.dimensions[i] = 67; - break; - case "AD_UNIT_CODE_LEVEL_4": case 68: - message.dimensions[i] = 68; - break; - case "AD_UNIT_CODE_LEVEL_5": case 69: - message.dimensions[i] = 69; - break; - case "AD_UNIT_CODE_LEVEL_6": case 70: - message.dimensions[i] = 70; - break; - case "AD_UNIT_CODE_LEVEL_7": case 71: - message.dimensions[i] = 71; - break; - case "AD_UNIT_CODE_LEVEL_8": case 72: - message.dimensions[i] = 72; - break; - case "AD_UNIT_CODE_LEVEL_9": case 73: - message.dimensions[i] = 73; - break; - case "AD_UNIT_DEPTH": - case 101: - message.dimensions[i] = 101; - break; - case "AD_UNIT_ID": case 25: - message.dimensions[i] = 25; - break; - case "AD_UNIT_ID_ALL_LEVEL": case 27: - message.dimensions[i] = 27; - break; - case "AD_UNIT_ID_LEVEL_1": case 30: - message.dimensions[i] = 30; - break; - case "AD_UNIT_ID_LEVEL_10": case 48: - message.dimensions[i] = 48; - break; - case "AD_UNIT_ID_LEVEL_11": case 50: - message.dimensions[i] = 50; - break; - case "AD_UNIT_ID_LEVEL_12": case 52: - message.dimensions[i] = 52; - break; - case "AD_UNIT_ID_LEVEL_13": case 54: - message.dimensions[i] = 54; - break; - case "AD_UNIT_ID_LEVEL_14": case 56: - message.dimensions[i] = 56; - break; - case "AD_UNIT_ID_LEVEL_15": case 58: - message.dimensions[i] = 58; - break; - case "AD_UNIT_ID_LEVEL_16": case 60: - message.dimensions[i] = 60; - break; - case "AD_UNIT_ID_LEVEL_2": case 32: - message.dimensions[i] = 32; - break; - case "AD_UNIT_ID_LEVEL_3": case 34: - message.dimensions[i] = 34; - break; - case "AD_UNIT_ID_LEVEL_4": case 36: - message.dimensions[i] = 36; - break; - case "AD_UNIT_ID_LEVEL_5": case 38: - message.dimensions[i] = 38; - break; - case "AD_UNIT_ID_LEVEL_6": case 40: - message.dimensions[i] = 40; - break; - case "AD_UNIT_ID_LEVEL_7": case 42: - message.dimensions[i] = 42; - break; - case "AD_UNIT_ID_LEVEL_8": case 44: - message.dimensions[i] = 44; - break; - case "AD_UNIT_ID_LEVEL_9": case 46: - message.dimensions[i] = 46; - break; - case "AD_UNIT_ID_TOP_LEVEL": case 142: - message.dimensions[i] = 142; - break; - case "AD_UNIT_NAME": case 26: - message.dimensions[i] = 26; - break; - case "AD_UNIT_NAME_ALL_LEVEL": case 29: - message.dimensions[i] = 29; - break; - case "AD_UNIT_NAME_LEVEL_1": case 31: - message.dimensions[i] = 31; - break; - case "AD_UNIT_NAME_LEVEL_10": case 49: - message.dimensions[i] = 49; - break; - case "AD_UNIT_NAME_LEVEL_11": case 51: - message.dimensions[i] = 51; - break; - case "AD_UNIT_NAME_LEVEL_12": case 53: - message.dimensions[i] = 53; - break; - case "AD_UNIT_NAME_LEVEL_13": case 55: - message.dimensions[i] = 55; - break; - case "AD_UNIT_NAME_LEVEL_14": case 57: - message.dimensions[i] = 57; - break; - case "AD_UNIT_NAME_LEVEL_15": case 59: - message.dimensions[i] = 59; - break; - case "AD_UNIT_NAME_LEVEL_16": case 61: - message.dimensions[i] = 61; - break; - case "AD_UNIT_NAME_LEVEL_2": case 33: - message.dimensions[i] = 33; - break; - case "AD_UNIT_NAME_LEVEL_3": case 35: - message.dimensions[i] = 35; - break; - case "AD_UNIT_NAME_LEVEL_4": case 37: - message.dimensions[i] = 37; - break; - case "AD_UNIT_NAME_LEVEL_5": case 39: - message.dimensions[i] = 39; - break; - case "AD_UNIT_NAME_LEVEL_6": case 41: - message.dimensions[i] = 41; - break; - case "AD_UNIT_NAME_LEVEL_7": case 43: - message.dimensions[i] = 43; - break; - case "AD_UNIT_NAME_LEVEL_8": case 45: - message.dimensions[i] = 45; - break; - case "AD_UNIT_NAME_LEVEL_9": case 47: - message.dimensions[i] = 47; - break; - case "AD_UNIT_NAME_TOP_LEVEL": case 143: - message.dimensions[i] = 143; - break; - case "AD_UNIT_REWARD_AMOUNT": case 63: - message.dimensions[i] = 63; - break; - case "AD_UNIT_REWARD_TYPE": case 62: - message.dimensions[i] = 62; - break; - case "AD_UNIT_STATUS": case 206: - message.dimensions[i] = 206; - break; - case "AD_UNIT_STATUS_NAME": case 207: - message.dimensions[i] = 207; - break; - case "APP_VERSION": + case 565: + case 566: + case 567: + case 568: + case 569: + case 570: + case 508: + case 582: + case 442: + case 443: case 392: - message.dimensions[i] = 392; - break; - case "BACKFILL_ADVERTISER_EXTERNAL_ID": - case 349: - message.dimensions[i] = 349; - break; - case "BACKFILL_ADVERTISER_ID": - case 346: - message.dimensions[i] = 346; - break; - case "BACKFILL_ADVERTISER_LABELS": - case 351: - message.dimensions[i] = 351; - break; - case "BACKFILL_ADVERTISER_LABEL_IDS": - case 350: - message.dimensions[i] = 350; - break; - case "BACKFILL_ADVERTISER_NAME": - case 347: - message.dimensions[i] = 347; - break; - case "BACKFILL_ADVERTISER_PRIMARY_CONTACT": - case 348: - message.dimensions[i] = 348; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE": - case 378: - message.dimensions[i] = 378; - break; - case "BACKFILL_CREATIVE_BILLING_TYPE_NAME": - case 379: - message.dimensions[i] = 379; - break; - case "BACKFILL_CREATIVE_CLICK_THROUGH_URL": - case 376: - message.dimensions[i] = 376; - break; - case "BACKFILL_CREATIVE_ID": - case 370: - message.dimensions[i] = 370; - break; - case "BACKFILL_CREATIVE_NAME": - case 371: - message.dimensions[i] = 371; - break; - case "BACKFILL_CREATIVE_THIRD_PARTY_VENDOR": - case 377: - message.dimensions[i] = 377; - break; - case "BACKFILL_CREATIVE_TYPE": - case 374: - message.dimensions[i] = 374; - break; - case "BACKFILL_CREATIVE_TYPE_NAME": - case 375: - message.dimensions[i] = 375; - break; - case "BACKFILL_LINE_ITEM_ARCHIVED": - case 278: - message.dimensions[i] = 278; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION": - case 258: - message.dimensions[i] = 258; - break; - case "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": - case 259: - message.dimensions[i] = 259; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS": - case 296: - message.dimensions[i] = 296; - break; - case "BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME": - case 297: - message.dimensions[i] = 297; - break; - case "BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY": - case 280: - message.dimensions[i] = 280; - break; - case "BACKFILL_LINE_ITEM_COST_PER_UNIT": - case 272: - message.dimensions[i] = 272; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE": - case 264: - message.dimensions[i] = 264; - break; - case "BACKFILL_LINE_ITEM_COST_TYPE_NAME": - case 265: - message.dimensions[i] = 265; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_END_DATE": - case 381: - message.dimensions[i] = 381; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE": - case 290: - message.dimensions[i] = 290; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": - case 291: - message.dimensions[i] = 291; - break; - case "BACKFILL_LINE_ITEM_CREATIVE_START_DATE": - case 380: - message.dimensions[i] = 380; - break; - case "BACKFILL_LINE_ITEM_CURRENCY_CODE": - case 288: - message.dimensions[i] = 288; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_INDICATOR": - case 274: - message.dimensions[i] = 274; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE": - case 292: - message.dimensions[i] = 292; - break; - case "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME": - case 293: - message.dimensions[i] = 293; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE": - case 294: - message.dimensions[i] = 294; - break; - case "BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE": - case 295: - message.dimensions[i] = 295; - break; - case "BACKFILL_LINE_ITEM_END_DATE": - case 267: - message.dimensions[i] = 267; - break; - case "BACKFILL_LINE_ITEM_END_DATE_TIME": - case 269: - message.dimensions[i] = 269; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE": - case 302: - message.dimensions[i] = 302; - break; - case "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME": - case 257: - message.dimensions[i] = 257; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID": - case 285: - message.dimensions[i] = 285; - break; - case "BACKFILL_LINE_ITEM_EXTERNAL_ID": - case 273: - message.dimensions[i] = 273; - break; - case "BACKFILL_LINE_ITEM_FREQUENCY_CAP": - case 303: - message.dimensions[i] = 303; - break; - case "BACKFILL_LINE_ITEM_ID": - case 298: - message.dimensions[i] = 298; - break; - case "BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP": - case 289: - message.dimensions[i] = 289; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_CLICKS": - case 283: - message.dimensions[i] = 283; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS": - case 282: - message.dimensions[i] = 282; - break; - case "BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": - case 284: - message.dimensions[i] = 284; - break; - case "BACKFILL_LINE_ITEM_MAKEGOOD": - case 276: - message.dimensions[i] = 276; - break; - case "BACKFILL_LINE_ITEM_NAME": - case 299: - message.dimensions[i] = 299; - break; - case "BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE": - case 286: - message.dimensions[i] = 286; - break; - case "BACKFILL_LINE_ITEM_OPTIMIZABLE": - case 277: - message.dimensions[i] = 277; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE": - case 262: - message.dimensions[i] = 262; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": - case 263: - message.dimensions[i] = 263; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": - case 260: - message.dimensions[i] = 260; - break; - case "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": - case 261: - message.dimensions[i] = 261; - break; - case "BACKFILL_LINE_ITEM_PRIORITY": - case 266: - message.dimensions[i] = 266; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS": - case 306: - message.dimensions[i] = 306; - break; - case "BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME": - case 307: - message.dimensions[i] = 307; - break; - case "BACKFILL_LINE_ITEM_START_DATE": - case 268: - message.dimensions[i] = 268; - break; - case "BACKFILL_LINE_ITEM_START_DATE_TIME": - case 270: - message.dimensions[i] = 270; - break; - case "BACKFILL_LINE_ITEM_TYPE": - case 300: - message.dimensions[i] = 300; - break; - case "BACKFILL_LINE_ITEM_TYPE_NAME": - case 301: - message.dimensions[i] = 301; - break; - case "BACKFILL_LINE_ITEM_UNLIMITED_END": - case 271: - message.dimensions[i] = 271; - break; - case "BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT": - case 275: - message.dimensions[i] = 275; - break; - case "BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE": - case 287: - message.dimensions[i] = 287; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_ID": - case 372: - message.dimensions[i] = 372; - break; - case "BACKFILL_MASTER_COMPANION_CREATIVE_NAME": - case 373: - message.dimensions[i] = 373; - break; - case "BACKFILL_ORDER_AGENCY": - case 313: - message.dimensions[i] = 313; - break; - case "BACKFILL_ORDER_AGENCY_ID": - case 314: - message.dimensions[i] = 314; - break; - case "BACKFILL_ORDER_BOOKED_CPC": - case 315: - message.dimensions[i] = 315; - break; - case "BACKFILL_ORDER_BOOKED_CPM": - case 316: - message.dimensions[i] = 316; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS": - case 340: - message.dimensions[i] = 340; - break; - case "BACKFILL_ORDER_DELIVERY_STATUS_NAME": - case 341: - message.dimensions[i] = 341; - break; - case "BACKFILL_ORDER_END_DATE": - case 317: - message.dimensions[i] = 317; - break; - case "BACKFILL_ORDER_END_DATE_TIME": - case 319: - message.dimensions[i] = 319; - break; - case "BACKFILL_ORDER_EXTERNAL_ID": - case 320: - message.dimensions[i] = 320; - break; - case "BACKFILL_ORDER_ID": - case 338: - message.dimensions[i] = 338; - break; - case "BACKFILL_ORDER_LABELS": - case 334: - message.dimensions[i] = 334; - break; - case "BACKFILL_ORDER_LABEL_IDS": - case 335: - message.dimensions[i] = 335; - break; - case "BACKFILL_ORDER_LIFETIME_CLICKS": - case 322: - message.dimensions[i] = 322; - break; - case "BACKFILL_ORDER_LIFETIME_IMPRESSIONS": - case 323: - message.dimensions[i] = 323; - break; - case "BACKFILL_ORDER_NAME": - case 339: - message.dimensions[i] = 339; - break; - case "BACKFILL_ORDER_PO_NUMBER": - case 324: - message.dimensions[i] = 324; - break; - case "BACKFILL_ORDER_PROGRAMMATIC": - case 321: - message.dimensions[i] = 321; - break; - case "BACKFILL_ORDER_SALESPERSON": - case 325: - message.dimensions[i] = 325; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE": - case 329: - message.dimensions[i] = 329; - break; - case "BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID": - case 328: - message.dimensions[i] = 328; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS": - case 331: - message.dimensions[i] = 331; - break; - case "BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID": - case 330: - message.dimensions[i] = 330; - break; - case "BACKFILL_ORDER_START_DATE": - case 332: - message.dimensions[i] = 332; - break; - case "BACKFILL_ORDER_START_DATE_TIME": - case 333: - message.dimensions[i] = 333; - break; - case "BACKFILL_ORDER_TRAFFICKER": - case 326: - message.dimensions[i] = 326; - break; - case "BACKFILL_ORDER_TRAFFICKER_ID": - case 327: - message.dimensions[i] = 327; - break; - case "BACKFILL_ORDER_UNLIMITED_END": - case 318: - message.dimensions[i] = 318; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_ID": - case 336: - message.dimensions[i] = 336; - break; - case "BACKFILL_PROGRAMMATIC_BUYER_NAME": - case 337: - message.dimensions[i] = 337; - break; - case "BRANDING_TYPE": + case 579: + case 571: + case 584: + case 585: + case 421: + case 422: + case 493: + case 494: + case 679: + case 599: + case 600: case 383: - message.dimensions[i] = 383; - break; - case "BRANDING_TYPE_NAME": case 384: - message.dimensions[i] = 384; - break; - case "BROWSER_CATEGORY": case 119: - message.dimensions[i] = 119; - break; - case "BROWSER_CATEGORY_NAME": case 120: - message.dimensions[i] = 120; - break; - case "BROWSER_ID": case 235: - message.dimensions[i] = 235; - break; - case "BROWSER_NAME": case 236: - message.dimensions[i] = 236; - break; - case "CARRIER_ID": + case 448: + case 449: + case 588: + case 589: case 369: - message.dimensions[i] = 369; - break; - case "CARRIER_NAME": case 368: - message.dimensions[i] = 368; - break; - case "CLASSIFIED_ADVERTISER_ID": + case 501: + case 542: + case 544: + case 543: + case 459: + case 452: case 133: - message.dimensions[i] = 133; - break; - case "CLASSIFIED_ADVERTISER_NAME": case 134: - message.dimensions[i] = 134; - break; - case "CLASSIFIED_BRAND_ID": case 243: - message.dimensions[i] = 243; - break; - case "CLASSIFIED_BRAND_NAME": case 244: - message.dimensions[i] = 244; - break; - case "CONTENT_ID": + case 643: + case 644: case 246: - message.dimensions[i] = 246; - break; - case "CONTENT_NAME": + case 731: + case 732: case 247: - message.dimensions[i] = 247; - break; - case "COUNTRY_ID": + case 469: + case 470: + case 466: case 11: - message.dimensions[i] = 11; - break; - case "COUNTRY_NAME": case 12: - message.dimensions[i] = 12; - break; - case "CREATIVE_BILLING_TYPE": case 366: - message.dimensions[i] = 366; - break; - case "CREATIVE_BILLING_TYPE_NAME": case 367: - message.dimensions[i] = 367; - break; - case "CREATIVE_CLICK_THROUGH_URL": case 174: - message.dimensions[i] = 174; - break; - case "CREATIVE_ID": case 138: - message.dimensions[i] = 138; - break; - case "CREATIVE_NAME": case 139: - message.dimensions[i] = 139; - break; - case "CREATIVE_TECHNOLOGY": + case 711: + case 712: + case 704: + case 705: + case 686: + case 687: case 148: - message.dimensions[i] = 148; - break; - case "CREATIVE_TECHNOLOGY_NAME": case 149: - message.dimensions[i] = 149; - break; - case "CREATIVE_THIRD_PARTY_VENDOR": case 361: - message.dimensions[i] = 361; - break; - case "CREATIVE_TYPE": case 344: - message.dimensions[i] = 344; - break; - case "CREATIVE_TYPE_NAME": case 345: - message.dimensions[i] = 345; - break; - case "DATE": + case 706: + case 707: + case 562: + case 572: + case 573: + case 737: + case 735: + case 736: + case 738: + case 423: + case 424: case 3: - message.dimensions[i] = 3; - break; - case "DAY_OF_WEEK": case 4: - message.dimensions[i] = 4; - break; - case "DEMAND_CHANNEL": + case 240: + case 241: + case 436: + case 437: + case 309: + case 310: case 9: - message.dimensions[i] = 9; - break; - case "DEMAND_CHANNEL_NAME": case 10: - message.dimensions[i] = 10; - break; - case "DEMAND_SUBCHANNEL": + case 592: + case 593: case 22: - message.dimensions[i] = 22; - break; - case "DEMAND_SUBCHANNEL_NAME": case 23: - message.dimensions[i] = 23; - break; - case "DEVICE": case 226: - message.dimensions[i] = 226; - break; - case "DEVICE_CATEGORY": case 15: - message.dimensions[i] = 15; - break; - case "DEVICE_CATEGORY_NAME": case 16: - message.dimensions[i] = 16; - break; - case "DEVICE_NAME": + case 525: + case 526: + case 527: + case 528: case 225: - message.dimensions[i] = 225; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_ID": + case 564: + case 502: + case 503: + case 623: + case 624: + case 625: + case 626: + case 715: + case 714: + case 723: case 185: - message.dimensions[i] = 185; - break; - case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": case 186: - message.dimensions[i] = 186; - break; - case "FIRST_LOOK_PRICING_RULE_ID": case 248: - message.dimensions[i] = 248; - break; - case "FIRST_LOOK_PRICING_RULE_NAME": case 249: - message.dimensions[i] = 249; - break; - case "HOUR": + case 404: + case 405: + case 509: + case 583: + case 519: + case 520: + case 659: + case 660: + case 718: + case 719: case 100: - message.dimensions[i] = 100; - break; - case "INTERACTION_TYPE": + case 577: + case 578: case 223: - message.dimensions[i] = 223; - break; - case "INTERACTION_TYPE_NAME": case 224: - message.dimensions[i] = 224; - break; - case "INVENTORY_FORMAT": + case 510: case 17: - message.dimensions[i] = 17; - break; - case "INVENTORY_FORMAT_NAME": case 18: - message.dimensions[i] = 18; - break; - case "INVENTORY_TYPE": + case 648: + case 649: + case 603: + case 604: + case 652: + case 653: + case 654: + case 650: + case 651: case 19: - message.dimensions[i] = 19; - break; - case "INVENTORY_TYPE_NAME": case 20: - message.dimensions[i] = 20; - break; - case "IS_ADX_DIRECT": - case 382: - message.dimensions[i] = 382; - break; - case "IS_FIRST_LOOK_DEAL": + case 382: + case 574: + case 464: case 401: - message.dimensions[i] = 401; - break; - case "KEY_VALUES_ID": case 214: - message.dimensions[i] = 214; - break; - case "KEY_VALUES_NAME": case 215: - message.dimensions[i] = 215; - break; - case "LINE_ITEM_ARCHIVED": + case 663: case 188: - message.dimensions[i] = 188; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION": case 204: - message.dimensions[i] = 204; - break; - case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": case 205: - message.dimensions[i] = 205; - break; - case "LINE_ITEM_COMPUTED_STATUS": case 250: - message.dimensions[i] = 250; - break; - case "LINE_ITEM_COMPUTED_STATUS_NAME": case 251: - message.dimensions[i] = 251; - break; - case "LINE_ITEM_CONTRACTED_QUANTITY": case 92: - message.dimensions[i] = 92; - break; - case "LINE_ITEM_COST_PER_UNIT": case 85: - message.dimensions[i] = 85; - break; - case "LINE_ITEM_COST_TYPE": case 212: - message.dimensions[i] = 212; - break; - case "LINE_ITEM_COST_TYPE_NAME": case 213: - message.dimensions[i] = 213; - break; - case "LINE_ITEM_CREATIVE_END_DATE": case 176: - message.dimensions[i] = 176; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE": case 189: - message.dimensions[i] = 189; - break; - case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": case 190: - message.dimensions[i] = 190; - break; - case "LINE_ITEM_CREATIVE_START_DATE": case 175: - message.dimensions[i] = 175; - break; - case "LINE_ITEM_CURRENCY_CODE": case 180: - message.dimensions[i] = 180; - break; - case "LINE_ITEM_DELIVERY_INDICATOR": case 87: - message.dimensions[i] = 87; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE": case 191: - message.dimensions[i] = 191; - break; - case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": case 192: - message.dimensions[i] = 192; - break; - case "LINE_ITEM_DISCOUNT_ABSOLUTE": case 195: - message.dimensions[i] = 195; - break; - case "LINE_ITEM_DISCOUNT_PERCENTAGE": case 196: - message.dimensions[i] = 196; - break; - case "LINE_ITEM_END_DATE": case 81: - message.dimensions[i] = 81; - break; - case "LINE_ITEM_END_DATE_TIME": case 83: - message.dimensions[i] = 83; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE": case 201: - message.dimensions[i] = 201; - break; - case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": case 202: - message.dimensions[i] = 202; - break; - case "LINE_ITEM_EXTERNAL_DEAL_ID": case 97: - message.dimensions[i] = 97; - break; - case "LINE_ITEM_EXTERNAL_ID": case 86: - message.dimensions[i] = 86; - break; - case "LINE_ITEM_FREQUENCY_CAP": case 256: - message.dimensions[i] = 256; - break; - case "LINE_ITEM_ID": case 1: - message.dimensions[i] = 1; - break; - case "LINE_ITEM_LAST_MODIFIED_BY_APP": + case 667: + case 665: case 181: - message.dimensions[i] = 181; - break; - case "LINE_ITEM_LIFETIME_CLICKS": case 95: - message.dimensions[i] = 95; - break; - case "LINE_ITEM_LIFETIME_IMPRESSIONS": case 94: - message.dimensions[i] = 94; - break; - case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": case 96: - message.dimensions[i] = 96; - break; - case "LINE_ITEM_MAKEGOOD": case 89: - message.dimensions[i] = 89; - break; - case "LINE_ITEM_NAME": case 2: - message.dimensions[i] = 2; - break; - case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": case 98: - message.dimensions[i] = 98; - break; - case "LINE_ITEM_OPTIMIZABLE": case 90: - message.dimensions[i] = 90; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE": + case 669: case 210: - message.dimensions[i] = 210; - break; - case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": case 211: - message.dimensions[i] = 211; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": case 93: - message.dimensions[i] = 93; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": case 396: - message.dimensions[i] = 396; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": case 208: - message.dimensions[i] = 208; - break; - case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": case 209: - message.dimensions[i] = 209; - break; - case "LINE_ITEM_PRIORITY": case 24: - message.dimensions[i] = 24; - break; - case "LINE_ITEM_RESERVATION_STATUS": case 304: - message.dimensions[i] = 304; - break; - case "LINE_ITEM_RESERVATION_STATUS_NAME": case 305: - message.dimensions[i] = 305; - break; - case "LINE_ITEM_START_DATE": + case 671: + case 673: + case 675: case 82: - message.dimensions[i] = 82; - break; - case "LINE_ITEM_START_DATE_TIME": case 84: - message.dimensions[i] = 84; - break; - case "LINE_ITEM_TYPE": + case 677: case 193: - message.dimensions[i] = 193; - break; - case "LINE_ITEM_TYPE_NAME": case 194: - message.dimensions[i] = 194; - break; - case "LINE_ITEM_UNLIMITED_END": case 187: - message.dimensions[i] = 187; - break; - case "LINE_ITEM_VALUE_COST_PER_UNIT": case 88: - message.dimensions[i] = 88; - break; - case "LINE_ITEM_WEB_PROPERTY_CODE": case 179: - message.dimensions[i] = 179; - break; - case "MASTER_COMPANION_CREATIVE_ID": case 140: - message.dimensions[i] = 140; - break; - case "MASTER_COMPANION_CREATIVE_NAME": case 141: - message.dimensions[i] = 141; - break; - case "MOBILE_APP_FREE": + case 701: + case 754: + case 661: + case 662: + case 453: + case 454: case 128: - message.dimensions[i] = 128; - break; - case "MOBILE_APP_ICON_URL": case 129: - message.dimensions[i] = 129; - break; - case "MOBILE_APP_ID": case 123: - message.dimensions[i] = 123; - break; - case "MOBILE_APP_NAME": case 127: - message.dimensions[i] = 127; - break; - case "MOBILE_APP_OWNERSHIP_STATUS": case 311: - message.dimensions[i] = 311; - break; - case "MOBILE_APP_OWNERSHIP_STATUS_NAME": case 312: - message.dimensions[i] = 312; - break; - case "MOBILE_APP_STORE": case 125: - message.dimensions[i] = 125; - break; - case "MOBILE_APP_STORE_NAME": case 245: - message.dimensions[i] = 245; - break; - case "MOBILE_INVENTORY_TYPE": case 99: - message.dimensions[i] = 99; - break; - case "MOBILE_INVENTORY_TYPE_NAME": case 21: - message.dimensions[i] = 21; - break; - case "MOBILE_SDK_VERSION_NAME": + case 646: + case 647: + case 692: + case 693: case 130: - message.dimensions[i] = 130; - break; - case "MONTH_YEAR": case 6: - message.dimensions[i] = 6; - break; - case "NATIVE_AD_FORMAT_ID": case 255: - message.dimensions[i] = 255; - break; - case "NATIVE_AD_FORMAT_NAME": case 254: - message.dimensions[i] = 254; - break; - case "NATIVE_STYLE_ID": case 253: - message.dimensions[i] = 253; - break; - case "NATIVE_STYLE_NAME": case 252: - message.dimensions[i] = 252; - break; - case "OPERATING_SYSTEM_CATEGORY": + case 586: + case 587: case 117: - message.dimensions[i] = 117; - break; - case "OPERATING_SYSTEM_CATEGORY_NAME": case 118: - message.dimensions[i] = 118; - break; - case "OPERATING_SYSTEM_VERSION_ID": case 238: - message.dimensions[i] = 238; - break; - case "OPERATING_SYSTEM_VERSION_NAME": case 237: - message.dimensions[i] = 237; - break; - case "ORDER_AGENCY": + case 639: + case 640: case 150: - message.dimensions[i] = 150; - break; - case "ORDER_AGENCY_ID": case 151: - message.dimensions[i] = 151; - break; - case "ORDER_BOOKED_CPC": case 152: - message.dimensions[i] = 152; - break; - case "ORDER_BOOKED_CPM": case 153: - message.dimensions[i] = 153; - break; - case "ORDER_DELIVERY_STATUS": case 231: - message.dimensions[i] = 231; - break; - case "ORDER_DELIVERY_STATUS_NAME": case 239: - message.dimensions[i] = 239; - break; - case "ORDER_END_DATE": case 154: - message.dimensions[i] = 154; - break; - case "ORDER_END_DATE_TIME": case 155: - message.dimensions[i] = 155; - break; - case "ORDER_EXTERNAL_ID": case 156: - message.dimensions[i] = 156; - break; - case "ORDER_ID": case 7: - message.dimensions[i] = 7; - break; - case "ORDER_LABELS": case 170: - message.dimensions[i] = 170; - break; - case "ORDER_LABEL_IDS": case 171: - message.dimensions[i] = 171; - break; - case "ORDER_LIFETIME_CLICKS": case 158: - message.dimensions[i] = 158; - break; - case "ORDER_LIFETIME_IMPRESSIONS": case 159: - message.dimensions[i] = 159; - break; - case "ORDER_NAME": case 8: - message.dimensions[i] = 8; - break; - case "ORDER_PO_NUMBER": case 160: - message.dimensions[i] = 160; - break; - case "ORDER_PROGRAMMATIC": case 157: - message.dimensions[i] = 157; - break; - case "ORDER_SALESPERSON": case 161: - message.dimensions[i] = 161; - break; - case "ORDER_SECONDARY_SALESPEOPLE": + case 629: case 164: - message.dimensions[i] = 164; - break; - case "ORDER_SECONDARY_SALESPEOPLE_ID": case 165: - message.dimensions[i] = 165; - break; - case "ORDER_SECONDARY_TRAFFICKERS": case 166: - message.dimensions[i] = 166; - break; - case "ORDER_SECONDARY_TRAFFICKERS_ID": case 167: - message.dimensions[i] = 167; - break; - case "ORDER_START_DATE": case 168: - message.dimensions[i] = 168; - break; - case "ORDER_START_DATE_TIME": case 169: - message.dimensions[i] = 169; - break; - case "ORDER_TRAFFICKER": case 162: - message.dimensions[i] = 162; - break; - case "ORDER_TRAFFICKER_ID": case 163: - message.dimensions[i] = 163; - break; - case "ORDER_UNLIMITED_END": case 203: - message.dimensions[i] = 203; - break; - case "PLACEMENT_ID": + case 511: + case 512: + case 513: case 113: - message.dimensions[i] = 113; - break; - case "PLACEMENT_ID_ALL": case 144: - message.dimensions[i] = 144; - break; - case "PLACEMENT_NAME": case 114: - message.dimensions[i] = 114; - break; - case "PLACEMENT_NAME_ALL": case 145: - message.dimensions[i] = 145; - break; - case "PLACEMENT_STATUS": case 362: - message.dimensions[i] = 362; - break; - case "PLACEMENT_STATUS_ALL": - case 363: - message.dimensions[i] = 363; - break; - case "PLACEMENT_STATUS_NAME": case 364: - message.dimensions[i] = 364; - break; - case "PLACEMENT_STATUS_NAME_ALL": case 365: - message.dimensions[i] = 365; - break; - case "PROGRAMMATIC_BUYER_ID": + case 455: + case 456: + case 406: + case 407: + case 633: + case 634: + case 495: + case 496: + case 408: + case 409: case 240: - message.dimensions[i] = 240; - break; - case "PROGRAMMATIC_BUYER_NAME": case 241: - message.dimensions[i] = 241; - break; - case "PROGRAMMATIC_CHANNEL": case 13: - message.dimensions[i] = 13; - break; - case "PROGRAMMATIC_CHANNEL_NAME": case 14: - message.dimensions[i] = 14; - break; - case "RENDERED_CREATIVE_SIZE": + case 410: + case 546: + case 412: + case 413: + case 414: + case 425: + case 545: + case 427: + case 428: + case 429: + case 415: + case 416: + case 417: + case 418: + case 419: + case 136: + case 137: + case 457: + case 458: + case 590: + case 591: case 343: - message.dimensions[i] = 343; - break; - case "REQUESTED_AD_SIZES": case 352: - message.dimensions[i] = 352; - break; - case "REQUEST_TYPE": case 146: - message.dimensions[i] = 146; - break; - case "REQUEST_TYPE_NAME": case 147: - message.dimensions[i] = 147; - break; - case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": case 597: - message.dimensions[i] = 597; - break; - case "SITE": + case 631: + case 632: case 387: - message.dimensions[i] = 387; - break; - case "TARGETING_ID": case 232: - message.dimensions[i] = 232; - break; - case "TARGETING_NAME": case 233: - message.dimensions[i] = 233; - break; - case "TARGETING_TYPE": case 385: - message.dimensions[i] = 385; - break; - case "TARGETING_TYPE_NAME": case 386: - message.dimensions[i] = 386; - break; - case "TRAFFIC_SOURCE": + case 402: + case 403: + case 504: + case 505: + case 444: case 388: - message.dimensions[i] = 388; - break; - case "TRAFFIC_SOURCE_NAME": case 389: - message.dimensions[i] = 389; - break; - case "UNIFIED_PRICING_RULE_ID": case 393: - message.dimensions[i] = 393; - break; - case "UNIFIED_PRICING_RULE_NAME": case 394: - message.dimensions[i] = 394; - break; - case "VIDEO_PLCMT": + case 506: + case 507: + case 635: + case 636: + case 637: + case 638: + case 554: + case 555: + case 556: + case 557: + case 450: + case 561: + case 560: + case 558: + case 751: + case 559: + case 438: + case 439: + case 432: + case 433: + case 721: + case 722: + case 530: + case 601: + case 602: case 172: - message.dimensions[i] = 172; - break; - case "VIDEO_PLCMT_NAME": case 173: - message.dimensions[i] = 173; - break; - case "WEEK": + case 538: + case 539: + case 440: + case 441: + case 752: + case 753: case 5: - message.dimensions[i] = 5; - break; - case "YIELD_GROUP_BUYER_NAME": case 184: - message.dimensions[i] = 184; - break; - case "YIELD_GROUP_ID": + case 627: case 182: - message.dimensions[i] = 182; - break; - case "YIELD_GROUP_NAME": case 183: - message.dimensions[i] = 183; - break; - case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 430: + case 431: + case 399: + case 400: case 10000: - message.dimensions[i] = 10000; - break; - case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": case 10001: - message.dimensions[i] = 10001; - break; - case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": case 10002: - message.dimensions[i] = 10002; - break; - case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": case 10003: - message.dimensions[i] = 10003; - break; - case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": case 10004: - message.dimensions[i] = 10004; - break; - case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": case 10005: - message.dimensions[i] = 10005; - break; - case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": case 10006: - message.dimensions[i] = 10006; - break; - case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": case 10007: - message.dimensions[i] = 10007; - break; - case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": case 10008: - message.dimensions[i] = 10008; - break; - case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": case 10009: - message.dimensions[i] = 10009; - break; - case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": case 10010: - message.dimensions[i] = 10010; - break; - case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": case 10011: - message.dimensions[i] = 10011; - break; - case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": case 10012: - message.dimensions[i] = 10012; - break; - case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": case 10013: - message.dimensions[i] = 10013; - break; - case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": case 10014: - message.dimensions[i] = 10014; - break; - case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": case 11000: - message.dimensions[i] = 11000; - break; - case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": case 11001: - message.dimensions[i] = 11001; - break; - case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": case 11002: - message.dimensions[i] = 11002; - break; - case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": case 11003: - message.dimensions[i] = 11003; - break; - case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": case 11004: - message.dimensions[i] = 11004; - break; - case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": case 11005: - message.dimensions[i] = 11005; - break; - case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": case 11006: - message.dimensions[i] = 11006; - break; - case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": case 11007: - message.dimensions[i] = 11007; - break; - case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": case 11008: - message.dimensions[i] = 11008; - break; - case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": case 11009: - message.dimensions[i] = 11009; - break; - case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": case 11010: - message.dimensions[i] = 11010; - break; - case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": case 11011: - message.dimensions[i] = 11011; - break; - case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": case 11012: - message.dimensions[i] = 11012; - break; - case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": case 11013: - message.dimensions[i] = 11013; - break; - case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": case 11014: - message.dimensions[i] = 11014; - break; - case "ORDER_CUSTOM_FIELD_0_OPTION_ID": case 12000: - message.dimensions[i] = 12000; - break; - case "ORDER_CUSTOM_FIELD_1_OPTION_ID": case 12001: - message.dimensions[i] = 12001; - break; - case "ORDER_CUSTOM_FIELD_2_OPTION_ID": case 12002: - message.dimensions[i] = 12002; - break; - case "ORDER_CUSTOM_FIELD_3_OPTION_ID": - case 12003: - message.dimensions[i] = 12003; - break; - case "ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 12003: case 12004: - message.dimensions[i] = 12004; - break; - case "ORDER_CUSTOM_FIELD_5_OPTION_ID": case 12005: - message.dimensions[i] = 12005; - break; - case "ORDER_CUSTOM_FIELD_6_OPTION_ID": case 12006: - message.dimensions[i] = 12006; - break; - case "ORDER_CUSTOM_FIELD_7_OPTION_ID": case 12007: - message.dimensions[i] = 12007; - break; - case "ORDER_CUSTOM_FIELD_8_OPTION_ID": case 12008: - message.dimensions[i] = 12008; - break; - case "ORDER_CUSTOM_FIELD_9_OPTION_ID": case 12009: - message.dimensions[i] = 12009; - break; - case "ORDER_CUSTOM_FIELD_10_OPTION_ID": case 12010: - message.dimensions[i] = 12010; - break; - case "ORDER_CUSTOM_FIELD_11_OPTION_ID": case 12011: - message.dimensions[i] = 12011; - break; - case "ORDER_CUSTOM_FIELD_12_OPTION_ID": case 12012: - message.dimensions[i] = 12012; - break; - case "ORDER_CUSTOM_FIELD_13_OPTION_ID": case 12013: - message.dimensions[i] = 12013; - break; - case "ORDER_CUSTOM_FIELD_14_OPTION_ID": case 12014: - message.dimensions[i] = 12014; - break; - case "ORDER_CUSTOM_FIELD_0_VALUE": case 13000: - message.dimensions[i] = 13000; - break; - case "ORDER_CUSTOM_FIELD_1_VALUE": case 13001: - message.dimensions[i] = 13001; - break; - case "ORDER_CUSTOM_FIELD_2_VALUE": case 13002: - message.dimensions[i] = 13002; - break; - case "ORDER_CUSTOM_FIELD_3_VALUE": case 13003: - message.dimensions[i] = 13003; - break; - case "ORDER_CUSTOM_FIELD_4_VALUE": case 13004: - message.dimensions[i] = 13004; - break; - case "ORDER_CUSTOM_FIELD_5_VALUE": case 13005: - message.dimensions[i] = 13005; - break; - case "ORDER_CUSTOM_FIELD_6_VALUE": case 13006: - message.dimensions[i] = 13006; - break; - case "ORDER_CUSTOM_FIELD_7_VALUE": case 13007: - message.dimensions[i] = 13007; - break; - case "ORDER_CUSTOM_FIELD_8_VALUE": case 13008: - message.dimensions[i] = 13008; - break; - case "ORDER_CUSTOM_FIELD_9_VALUE": case 13009: - message.dimensions[i] = 13009; - break; - case "ORDER_CUSTOM_FIELD_10_VALUE": case 13010: - message.dimensions[i] = 13010; - break; - case "ORDER_CUSTOM_FIELD_11_VALUE": case 13011: - message.dimensions[i] = 13011; - break; - case "ORDER_CUSTOM_FIELD_12_VALUE": case 13012: - message.dimensions[i] = 13012; - break; - case "ORDER_CUSTOM_FIELD_13_VALUE": case 13013: - message.dimensions[i] = 13013; - break; - case "ORDER_CUSTOM_FIELD_14_VALUE": case 13014: - message.dimensions[i] = 13014; - break; - case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": case 14000: - message.dimensions[i] = 14000; - break; - case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": case 14001: - message.dimensions[i] = 14001; - break; - case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": case 14002: - message.dimensions[i] = 14002; - break; - case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": case 14003: - message.dimensions[i] = 14003; - break; - case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": case 14004: - message.dimensions[i] = 14004; - break; - case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": case 14005: - message.dimensions[i] = 14005; - break; - case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": case 14006: - message.dimensions[i] = 14006; - break; - case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": case 14007: - message.dimensions[i] = 14007; - break; - case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": case 14008: - message.dimensions[i] = 14008; - break; - case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": case 14009: - message.dimensions[i] = 14009; - break; - case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": case 14010: - message.dimensions[i] = 14010; - break; - case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": case 14011: - message.dimensions[i] = 14011; - break; - case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": case 14012: - message.dimensions[i] = 14012; - break; - case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": case 14013: - message.dimensions[i] = 14013; - break; - case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": case 14014: - message.dimensions[i] = 14014; - break; - case "CREATIVE_CUSTOM_FIELD_0_VALUE": case 15000: - message.dimensions[i] = 15000; - break; - case "CREATIVE_CUSTOM_FIELD_1_VALUE": case 15001: - message.dimensions[i] = 15001; - break; - case "CREATIVE_CUSTOM_FIELD_2_VALUE": case 15002: - message.dimensions[i] = 15002; - break; - case "CREATIVE_CUSTOM_FIELD_3_VALUE": case 15003: - message.dimensions[i] = 15003; - break; - case "CREATIVE_CUSTOM_FIELD_4_VALUE": case 15004: - message.dimensions[i] = 15004; - break; - case "CREATIVE_CUSTOM_FIELD_5_VALUE": case 15005: - message.dimensions[i] = 15005; - break; - case "CREATIVE_CUSTOM_FIELD_6_VALUE": case 15006: - message.dimensions[i] = 15006; - break; - case "CREATIVE_CUSTOM_FIELD_7_VALUE": case 15007: - message.dimensions[i] = 15007; - break; - case "CREATIVE_CUSTOM_FIELD_8_VALUE": case 15008: - message.dimensions[i] = 15008; - break; - case "CREATIVE_CUSTOM_FIELD_9_VALUE": case 15009: - message.dimensions[i] = 15009; - break; - case "CREATIVE_CUSTOM_FIELD_10_VALUE": case 15010: - message.dimensions[i] = 15010; - break; - case "CREATIVE_CUSTOM_FIELD_11_VALUE": case 15011: - message.dimensions[i] = 15011; - break; - case "CREATIVE_CUSTOM_FIELD_12_VALUE": case 15012: - message.dimensions[i] = 15012; - break; - case "CREATIVE_CUSTOM_FIELD_13_VALUE": case 15013: - message.dimensions[i] = 15013; - break; - case "CREATIVE_CUSTOM_FIELD_14_VALUE": case 15014: - message.dimensions[i] = 15014; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": case 16000: - message.dimensions[i] = 16000; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": case 16001: - message.dimensions[i] = 16001; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": case 16002: - message.dimensions[i] = 16002; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": case 16003: - message.dimensions[i] = 16003; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": case 16004: - message.dimensions[i] = 16004; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": case 16005: - message.dimensions[i] = 16005; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": case 16006: - message.dimensions[i] = 16006; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": case 16007: - message.dimensions[i] = 16007; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": case 16008: - message.dimensions[i] = 16008; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": case 16009: - message.dimensions[i] = 16009; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": case 16010: - message.dimensions[i] = 16010; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": case 16011: - message.dimensions[i] = 16011; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": case 16012: - message.dimensions[i] = 16012; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": case 16013: - message.dimensions[i] = 16013; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": case 16014: - message.dimensions[i] = 16014; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": case 17000: - message.dimensions[i] = 17000; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": case 17001: - message.dimensions[i] = 17001; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": case 17002: - message.dimensions[i] = 17002; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": case 17003: - message.dimensions[i] = 17003; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": case 17004: - message.dimensions[i] = 17004; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": case 17005: - message.dimensions[i] = 17005; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": case 17006: - message.dimensions[i] = 17006; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": case 17007: - message.dimensions[i] = 17007; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": case 17008: - message.dimensions[i] = 17008; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": case 17009: - message.dimensions[i] = 17009; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": case 17010: - message.dimensions[i] = 17010; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": case 17011: - message.dimensions[i] = 17011; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": case 17012: - message.dimensions[i] = 17012; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": case 17013: - message.dimensions[i] = 17013; - break; - case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": case 17014: - message.dimensions[i] = 17014; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": case 18000: - message.dimensions[i] = 18000; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": case 18001: - message.dimensions[i] = 18001; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": case 18002: - message.dimensions[i] = 18002; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": case 18003: - message.dimensions[i] = 18003; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": case 18004: - message.dimensions[i] = 18004; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": case 18005: - message.dimensions[i] = 18005; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": case 18006: - message.dimensions[i] = 18006; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": case 18007: - message.dimensions[i] = 18007; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": case 18008: - message.dimensions[i] = 18008; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": case 18009: - message.dimensions[i] = 18009; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": case 18010: - message.dimensions[i] = 18010; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": case 18011: - message.dimensions[i] = 18011; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": case 18012: - message.dimensions[i] = 18012; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": case 18013: - message.dimensions[i] = 18013; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": case 18014: - message.dimensions[i] = 18014; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": case 19000: - message.dimensions[i] = 19000; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": case 19001: - message.dimensions[i] = 19001; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": case 19002: - message.dimensions[i] = 19002; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": case 19003: - message.dimensions[i] = 19003; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": case 19004: - message.dimensions[i] = 19004; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": case 19005: - message.dimensions[i] = 19005; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": case 19006: - message.dimensions[i] = 19006; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": case 19007: - message.dimensions[i] = 19007; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": case 19008: - message.dimensions[i] = 19008; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": case 19009: - message.dimensions[i] = 19009; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": case 19010: - message.dimensions[i] = 19010; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": case 19011: - message.dimensions[i] = 19011; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": case 19012: - message.dimensions[i] = 19012; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": case 19013: - message.dimensions[i] = 19013; - break; - case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": case 19014: - message.dimensions[i] = 19014; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": case 20000: - message.dimensions[i] = 20000; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": case 20001: - message.dimensions[i] = 20001; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": case 20002: - message.dimensions[i] = 20002; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": case 20003: - message.dimensions[i] = 20003; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": case 20004: - message.dimensions[i] = 20004; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": case 20005: - message.dimensions[i] = 20005; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": case 20006: - message.dimensions[i] = 20006; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": case 20007: - message.dimensions[i] = 20007; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": case 20008: - message.dimensions[i] = 20008; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": case 20009: - message.dimensions[i] = 20009; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": case 20010: - message.dimensions[i] = 20010; - break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": case 20011: - message.dimensions[i] = 20011; + case 20012: + case 20013: + case 20014: + case 21000: + case 21001: + case 21002: + case 21003: + case 21004: + case 21005: + case 21006: + case 21007: + case 21008: + case 21009: + case 21010: + case 21011: + case 21012: + case 21013: + case 21014: + case 100000: + case 100001: + case 100002: + case 100003: + case 100004: + case 100005: + case 100006: + case 100007: + case 100008: + case 100009: + case 101000: + case 101001: + case 101002: + case 101003: + case 101004: + case 101005: + case 101006: + case 101007: + case 101008: + case 101009: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a Slice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Slice} Slice + */ + Slice.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Slice) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Slice(); + switch (object.dimension) { + default: + if (typeof object.dimension === "number") { + message.dimension = object.dimension; + break; + } + break; + case "DIMENSION_UNSPECIFIED": + case 0: + message.dimension = 0; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE": + case 575: + message.dimension = 575; + break; + case "ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME": + case 576: + message.dimension = 576; + break; + case "ADVERTISER_CREDIT_STATUS": + case 475: + message.dimension = 475; + break; + case "ADVERTISER_CREDIT_STATUS_NAME": + case 476: + message.dimension = 476; + break; + case "ADVERTISER_DOMAIN_NAME": + case 242: + message.dimension = 242; + break; + case "ADVERTISER_EXTERNAL_ID": + case 228: + message.dimension = 228; + break; + case "ADVERTISER_ID": + case 131: + message.dimension = 131; + break; + case "ADVERTISER_LABELS": + case 230: + message.dimension = 230; + break; + case "ADVERTISER_LABEL_IDS": + case 229: + message.dimension = 229; + break; + case "ADVERTISER_NAME": + case 132: + message.dimension = 132; + break; + case "ADVERTISER_PRIMARY_CONTACT": + case 227: + message.dimension = 227; + break; + case "ADVERTISER_STATUS": + case 471: + message.dimension = 471; + break; + case "ADVERTISER_STATUS_NAME": + case 472: + message.dimension = 472; + break; + case "ADVERTISER_TYPE": + case 473: + message.dimension = 473; + break; + case "ADVERTISER_TYPE_NAME": + case 474: + message.dimension = 474; + break; + case "ADVERTISER_VERTICAL": + case 580: + message.dimension = 580; + break; + case "ADX_PRODUCT": + case 499: + message.dimension = 499; + break; + case "ADX_PRODUCT_NAME": + case 500: + message.dimension = 500; + break; + case "AD_EXPERIENCES_TYPE": + case 641: + message.dimension = 641; + break; + case "AD_EXPERIENCES_TYPE_NAME": + case 642: + message.dimension = 642; + break; + case "AD_LOCATION": + case 390: + message.dimension = 390; + break; + case "AD_LOCATION_NAME": + case 391: + message.dimension = 391; + break; + case "AD_TECHNOLOGY_PROVIDER_DOMAIN": + case 620: + message.dimension = 620; + break; + case "AD_TECHNOLOGY_PROVIDER_ID": + case 621: + message.dimension = 621; + break; + case "AD_TECHNOLOGY_PROVIDER_NAME": + case 622: + message.dimension = 622; + break; + case "AD_TYPE": + case 497: + message.dimension = 497; + break; + case "AD_TYPE_NAME": + case 498: + message.dimension = 498; + break; + case "AD_UNIT_CODE": + case 64: + message.dimension = 64; + break; + case "AD_UNIT_CODE_LEVEL_1": + case 65: + message.dimension = 65; + break; + case "AD_UNIT_CODE_LEVEL_10": + case 74: + message.dimension = 74; + break; + case "AD_UNIT_CODE_LEVEL_11": + case 75: + message.dimension = 75; + break; + case "AD_UNIT_CODE_LEVEL_12": + case 76: + message.dimension = 76; + break; + case "AD_UNIT_CODE_LEVEL_13": + case 77: + message.dimension = 77; + break; + case "AD_UNIT_CODE_LEVEL_14": + case 78: + message.dimension = 78; + break; + case "AD_UNIT_CODE_LEVEL_15": + case 79: + message.dimension = 79; + break; + case "AD_UNIT_CODE_LEVEL_16": + case 80: + message.dimension = 80; + break; + case "AD_UNIT_CODE_LEVEL_2": + case 66: + message.dimension = 66; + break; + case "AD_UNIT_CODE_LEVEL_3": + case 67: + message.dimension = 67; + break; + case "AD_UNIT_CODE_LEVEL_4": + case 68: + message.dimension = 68; + break; + case "AD_UNIT_CODE_LEVEL_5": + case 69: + message.dimension = 69; + break; + case "AD_UNIT_CODE_LEVEL_6": + case 70: + message.dimension = 70; + break; + case "AD_UNIT_CODE_LEVEL_7": + case 71: + message.dimension = 71; + break; + case "AD_UNIT_CODE_LEVEL_8": + case 72: + message.dimension = 72; + break; + case "AD_UNIT_CODE_LEVEL_9": + case 73: + message.dimension = 73; + break; + case "AD_UNIT_ID": + case 25: + message.dimension = 25; + break; + case "AD_UNIT_ID_ALL_LEVEL": + case 27: + message.dimension = 27; + break; + case "AD_UNIT_ID_LEVEL_1": + case 30: + message.dimension = 30; + break; + case "AD_UNIT_ID_LEVEL_10": + case 48: + message.dimension = 48; + break; + case "AD_UNIT_ID_LEVEL_11": + case 50: + message.dimension = 50; + break; + case "AD_UNIT_ID_LEVEL_12": + case 52: + message.dimension = 52; + break; + case "AD_UNIT_ID_LEVEL_13": + case 54: + message.dimension = 54; + break; + case "AD_UNIT_ID_LEVEL_14": + case 56: + message.dimension = 56; + break; + case "AD_UNIT_ID_LEVEL_15": + case 58: + message.dimension = 58; + break; + case "AD_UNIT_ID_LEVEL_16": + case 60: + message.dimension = 60; + break; + case "AD_UNIT_ID_LEVEL_2": + case 32: + message.dimension = 32; + break; + case "AD_UNIT_ID_LEVEL_3": + case 34: + message.dimension = 34; + break; + case "AD_UNIT_ID_LEVEL_4": + case 36: + message.dimension = 36; + break; + case "AD_UNIT_ID_LEVEL_5": + case 38: + message.dimension = 38; + break; + case "AD_UNIT_ID_LEVEL_6": + case 40: + message.dimension = 40; + break; + case "AD_UNIT_ID_LEVEL_7": + case 42: + message.dimension = 42; + break; + case "AD_UNIT_ID_LEVEL_8": + case 44: + message.dimension = 44; + break; + case "AD_UNIT_ID_LEVEL_9": + case 46: + message.dimension = 46; + break; + case "AD_UNIT_ID_TOP_LEVEL": + case 142: + message.dimension = 142; + break; + case "AD_UNIT_NAME": + case 26: + message.dimension = 26; + break; + case "AD_UNIT_NAME_ALL_LEVEL": + case 29: + message.dimension = 29; + break; + case "AD_UNIT_NAME_LEVEL_1": + case 31: + message.dimension = 31; + break; + case "AD_UNIT_NAME_LEVEL_10": + case 49: + message.dimension = 49; + break; + case "AD_UNIT_NAME_LEVEL_11": + case 51: + message.dimension = 51; + break; + case "AD_UNIT_NAME_LEVEL_12": + case 53: + message.dimension = 53; + break; + case "AD_UNIT_NAME_LEVEL_13": + case 55: + message.dimension = 55; + break; + case "AD_UNIT_NAME_LEVEL_14": + case 57: + message.dimension = 57; + break; + case "AD_UNIT_NAME_LEVEL_15": + case 59: + message.dimension = 59; + break; + case "AD_UNIT_NAME_LEVEL_16": + case 61: + message.dimension = 61; + break; + case "AD_UNIT_NAME_LEVEL_2": + case 33: + message.dimension = 33; + break; + case "AD_UNIT_NAME_LEVEL_3": + case 35: + message.dimension = 35; + break; + case "AD_UNIT_NAME_LEVEL_4": + case 37: + message.dimension = 37; + break; + case "AD_UNIT_NAME_LEVEL_5": + case 39: + message.dimension = 39; + break; + case "AD_UNIT_NAME_LEVEL_6": + case 41: + message.dimension = 41; + break; + case "AD_UNIT_NAME_LEVEL_7": + case 43: + message.dimension = 43; + break; + case "AD_UNIT_NAME_LEVEL_8": + case 45: + message.dimension = 45; + break; + case "AD_UNIT_NAME_LEVEL_9": + case 47: + message.dimension = 47; + break; + case "AD_UNIT_NAME_TOP_LEVEL": + case 143: + message.dimension = 143; + break; + case "AD_UNIT_REWARD_AMOUNT": + case 63: + message.dimension = 63; + break; + case "AD_UNIT_REWARD_TYPE": + case 62: + message.dimension = 62; + break; + case "AD_UNIT_STATUS": + case 206: + message.dimension = 206; + break; + case "AD_UNIT_STATUS_NAME": + case 207: + message.dimension = 207; + break; + case "AGENCY_LEVEL_1_ID": + case 565: + message.dimension = 565; + break; + case "AGENCY_LEVEL_1_NAME": + case 566: + message.dimension = 566; + break; + case "AGENCY_LEVEL_2_ID": + case 567: + message.dimension = 567; + break; + case "AGENCY_LEVEL_2_NAME": + case 568: + message.dimension = 568; + break; + case "AGENCY_LEVEL_3_ID": + case 569: + message.dimension = 569; + break; + case "AGENCY_LEVEL_3_NAME": + case 570: + message.dimension = 570; + break; + case "AGE_BRACKET": + case 508: + message.dimension = 508; + break; + case "AGE_BRACKET_NAME": + case 582: + message.dimension = 582; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS": + case 442: + message.dimension = 442; + break; + case "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME": + case 443: + message.dimension = 443; + break; + case "APP_VERSION": + case 392: + message.dimension = 392; + break; + case "AUCTION_PACKAGE_DEAL": + case 579: + message.dimension = 579; + break; + case "AUCTION_PACKAGE_DEAL_ID": + case 571: + message.dimension = 571; + break; + case "AUDIENCE_SEGMENT_ID_TARGETED": + case 584: + message.dimension = 584; + break; + case "AUDIENCE_SEGMENT_TARGETED": + case 585: + message.dimension = 585; + break; + case "AUTO_REFRESHED_TRAFFIC": + case 421: + message.dimension = 421; + break; + case "AUTO_REFRESHED_TRAFFIC_NAME": + case 422: + message.dimension = 422; + break; + case "BIDDER_ENCRYPTED_ID": + case 493: + message.dimension = 493; + break; + case "BIDDER_NAME": + case 494: + message.dimension = 494; + break; + case "BID_RANGE": + case 679: + message.dimension = 679; + break; + case "BID_REJECTION_REASON": + case 599: + message.dimension = 599; + break; + case "BID_REJECTION_REASON_NAME": + case 600: + message.dimension = 600; + break; + case "BRANDING_TYPE": + case 383: + message.dimension = 383; + break; + case "BRANDING_TYPE_NAME": + case 384: + message.dimension = 384; + break; + case "BROWSER_CATEGORY": + case 119: + message.dimension = 119; + break; + case "BROWSER_CATEGORY_NAME": + case 120: + message.dimension = 120; + break; + case "BROWSER_ID": + case 235: + message.dimension = 235; + break; + case "BROWSER_NAME": + case 236: + message.dimension = 236; + break; + case "BUYER_NETWORK_ID": + case 448: + message.dimension = 448; + break; + case "BUYER_NETWORK_NAME": + case 449: + message.dimension = 449; + break; + case "CALLOUT_STATUS_CATEGORY": + case 588: + message.dimension = 588; + break; + case "CALLOUT_STATUS_CATEGORY_NAME": + case 589: + message.dimension = 589; + break; + case "CARRIER_ID": + case 369: + message.dimension = 369; + break; + case "CARRIER_NAME": + case 368: + message.dimension = 368; + break; + case "CHANNEL": + case 501: + message.dimension = 501; + break; + case "CHILD_NETWORK_CODE": + case 542: + message.dimension = 542; + break; + case "CHILD_NETWORK_ID": + case 544: + message.dimension = 544; + break; + case "CHILD_PARTNER_NAME": + case 543: + message.dimension = 543; + break; + case "CITY_ID": + case 459: + message.dimension = 459; + break; + case "CITY_NAME": + case 452: + message.dimension = 452; + break; + case "CLASSIFIED_ADVERTISER_ID": + case 133: + message.dimension = 133; + break; + case "CLASSIFIED_ADVERTISER_NAME": + case 134: + message.dimension = 134; + break; + case "CLASSIFIED_BRAND_ID": + case 243: + message.dimension = 243; + break; + case "CLASSIFIED_BRAND_NAME": + case 244: + message.dimension = 244; + break; + case "CONTENT_CMS_NAME": + case 643: + message.dimension = 643; + break; + case "CONTENT_CMS_VIDEO_ID": + case 644: + message.dimension = 644; + break; + case "CONTENT_ID": + case 246: + message.dimension = 246; + break; + case "CONTENT_MAPPING_PRESENCE": + case 731: + message.dimension = 731; + break; + case "CONTENT_MAPPING_PRESENCE_NAME": + case 732: + message.dimension = 732; + break; + case "CONTENT_NAME": + case 247: + message.dimension = 247; + break; + case "CONTINENT": + case 469: + message.dimension = 469; + break; + case "CONTINENT_NAME": + case 470: + message.dimension = 470; + break; + case "COUNTRY_CODE": + case 466: + message.dimension = 466; + break; + case "COUNTRY_ID": + case 11: + message.dimension = 11; + break; + case "COUNTRY_NAME": + case 12: + message.dimension = 12; + break; + case "CREATIVE_BILLING_TYPE": + case 366: + message.dimension = 366; + break; + case "CREATIVE_BILLING_TYPE_NAME": + case 367: + message.dimension = 367; + break; + case "CREATIVE_CLICK_THROUGH_URL": + case 174: + message.dimension = 174; + break; + case "CREATIVE_ID": + case 138: + message.dimension = 138; + break; + case "CREATIVE_NAME": + case 139: + message.dimension = 139; + break; + case "CREATIVE_POLICIES_FILTERING": + case 711: + message.dimension = 711; + break; + case "CREATIVE_POLICIES_FILTERING_NAME": + case 712: + message.dimension = 712; + break; + case "CREATIVE_PROTECTIONS_FILTERING": + case 704: + message.dimension = 704; + break; + case "CREATIVE_PROTECTIONS_FILTERING_NAME": + case 705: + message.dimension = 705; + break; + case "CREATIVE_SET_ROLE_TYPE": + case 686: + message.dimension = 686; + break; + case "CREATIVE_SET_ROLE_TYPE_NAME": + case 687: + message.dimension = 687; + break; + case "CREATIVE_TECHNOLOGY": + case 148: + message.dimension = 148; + break; + case "CREATIVE_TECHNOLOGY_NAME": + case 149: + message.dimension = 149; + break; + case "CREATIVE_THIRD_PARTY_VENDOR": + case 361: + message.dimension = 361; + break; + case "CREATIVE_TYPE": + case 344: + message.dimension = 344; + break; + case "CREATIVE_TYPE_NAME": + case 345: + message.dimension = 345; + break; + case "CREATIVE_VENDOR_ID": + case 706: + message.dimension = 706; + break; + case "CREATIVE_VENDOR_NAME": + case 707: + message.dimension = 707; + break; + case "CREATIVE_VIDEO_REDIRECT_THIRD_PARTY": + case 562: + message.dimension = 562; + break; + case "CURATOR_ID": + case 572: + message.dimension = 572; + break; + case "CURATOR_NAME": + case 573: + message.dimension = 573; + break; + case "CUSTOM_EVENT_ID": + case 737: + message.dimension = 737; + break; + case "CUSTOM_EVENT_NAME": + case 735: + message.dimension = 735; + break; + case "CUSTOM_EVENT_TYPE": + case 736: + message.dimension = 736; + break; + case "CUSTOM_EVENT_TYPE_NAME": + case 738: + message.dimension = 738; + break; + case "CUSTOM_SPOT_ID": + case 423: + message.dimension = 423; + break; + case "CUSTOM_SPOT_NAME": + case 424: + message.dimension = 424; + break; + case "DATE": + case 3: + message.dimension = 3; + break; + case "DAY_OF_WEEK": + case 4: + message.dimension = 4; + break; + case "DEAL_BUYER_ID": + case 240: + message.dimension = 240; + break; + case "DEAL_BUYER_NAME": + case 241: + message.dimension = 241; + break; + case "DEAL_ID": + case 436: + message.dimension = 436; + break; + case "DEAL_NAME": + case 437: + message.dimension = 437; + break; + case "DELIVERED_SECURE_SIGNAL_ID": + case 309: + message.dimension = 309; + break; + case "DELIVERED_SECURE_SIGNAL_NAME": + case 310: + message.dimension = 310; + break; + case "DEMAND_CHANNEL": + case 9: + message.dimension = 9; + break; + case "DEMAND_CHANNEL_NAME": + case 10: + message.dimension = 10; + break; + case "DEMAND_SOURCE": + case 592: + message.dimension = 592; + break; + case "DEMAND_SOURCE_NAME": + case 593: + message.dimension = 593; + break; + case "DEMAND_SUBCHANNEL": + case 22: + message.dimension = 22; + break; + case "DEMAND_SUBCHANNEL_NAME": + case 23: + message.dimension = 23; + break; + case "DEVICE": + case 226: + message.dimension = 226; + break; + case "DEVICE_CATEGORY": + case 15: + message.dimension = 15; + break; + case "DEVICE_CATEGORY_NAME": + case 16: + message.dimension = 16; + break; + case "DEVICE_MANUFACTURER_ID": + case 525: + message.dimension = 525; + break; + case "DEVICE_MANUFACTURER_NAME": + case 526: + message.dimension = 526; + break; + case "DEVICE_MODEL_ID": + case 527: + message.dimension = 527; + break; + case "DEVICE_MODEL_NAME": + case 528: + message.dimension = 528; + break; + case "DEVICE_NAME": + case 225: + message.dimension = 225; + break; + case "DSP_SEAT_ID": + case 564: + message.dimension = 564; + break; + case "DYNAMIC_ALLOCATION_TYPE": + case 502: + message.dimension = 502; + break; + case "DYNAMIC_ALLOCATION_TYPE_NAME": + case 503: + message.dimension = 503; + break; + case "ESP_DELIVERY": + case 623: + message.dimension = 623; + break; + case "ESP_DELIVERY_NAME": + case 624: + message.dimension = 624; + break; + case "ESP_PRESENCE": + case 625: + message.dimension = 625; + break; + case "ESP_PRESENCE_NAME": + case 626: + message.dimension = 626; + break; + case "EXCHANGE_BIDDING_DEAL_ID": + case 715: + message.dimension = 715; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE": + case 714: + message.dimension = 714; + break; + case "EXCHANGE_BIDDING_DEAL_TYPE_NAME": + case 723: + message.dimension = 723; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_ID": + case 185: + message.dimension = 185; + break; + case "EXCHANGE_THIRD_PARTY_COMPANY_NAME": + case 186: + message.dimension = 186; + break; + case "FIRST_LOOK_PRICING_RULE_ID": + case 248: + message.dimension = 248; + break; + case "FIRST_LOOK_PRICING_RULE_NAME": + case 249: + message.dimension = 249; + break; + case "FIRST_PARTY_ID_STATUS": + case 404: + message.dimension = 404; + break; + case "FIRST_PARTY_ID_STATUS_NAME": + case 405: + message.dimension = 405; + break; + case "GENDER": + case 509: + message.dimension = 509; + break; + case "GENDER_NAME": + case 583: + message.dimension = 583; + break; + case "GOOGLE_ANALYTICS_STREAM_ID": + case 519: + message.dimension = 519; + break; + case "GOOGLE_ANALYTICS_STREAM_NAME": + case 520: + message.dimension = 520; + break; + case "HBT_YIELD_PARTNER_ID": + case 659: + message.dimension = 659; + break; + case "HBT_YIELD_PARTNER_NAME": + case 660: + message.dimension = 660; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE": + case 718: + message.dimension = 718; + break; + case "HEADER_BIDDER_INTEGRATION_TYPE_NAME": + case 719: + message.dimension = 719; + break; + case "HOUR": + case 100: + message.dimension = 100; + break; + case "IMPRESSION_COUNTING_METHOD": + case 577: + message.dimension = 577; + break; + case "IMPRESSION_COUNTING_METHOD_NAME": + case 578: + message.dimension = 578; + break; + case "INTERACTION_TYPE": + case 223: + message.dimension = 223; + break; + case "INTERACTION_TYPE_NAME": + case 224: + message.dimension = 224; + break; + case "INTEREST": + case 510: + message.dimension = 510; + break; + case "INVENTORY_FORMAT": + case 17: + message.dimension = 17; + break; + case "INVENTORY_FORMAT_NAME": + case 18: + message.dimension = 18; + break; + case "INVENTORY_SHARE_ASSIGNMENT_ID": + case 648: + message.dimension = 648; + break; + case "INVENTORY_SHARE_ASSIGNMENT_NAME": + case 649: + message.dimension = 649; + break; + case "INVENTORY_SHARE_OUTCOME": + case 603: + message.dimension = 603; + break; + case "INVENTORY_SHARE_OUTCOME_NAME": + case 604: + message.dimension = 604; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER": + case 652: + message.dimension = 652; + break; + case "INVENTORY_SHARE_PARTNER_AD_SERVER_NAME": + case 653: + message.dimension = 653; + break; + case "INVENTORY_SHARE_TARGET_SHARE_PERCENT": + case 654: + message.dimension = 654; + break; + case "INVENTORY_SHARE_TYPE": + case 650: + message.dimension = 650; + break; + case "INVENTORY_SHARE_TYPE_NAME": + case 651: + message.dimension = 651; + break; + case "INVENTORY_TYPE": + case 19: + message.dimension = 19; + break; + case "INVENTORY_TYPE_NAME": + case 20: + message.dimension = 20; + break; + case "IS_ADX_DIRECT": + case 382: + message.dimension = 382; + break; + case "IS_CURATION_TARGETED": + case 574: + message.dimension = 574; + break; + case "IS_DROPPED": + case 464: + message.dimension = 464; + break; + case "IS_FIRST_LOOK_DEAL": + case 401: + message.dimension = 401; + break; + case "KEY_VALUES_ID": + case 214: + message.dimension = 214; + break; + case "KEY_VALUES_NAME": + case 215: + message.dimension = 215; + break; + case "LINE_ITEM_AGENCY": + case 663: + message.dimension = 663; + break; + case "LINE_ITEM_ARCHIVED": + case 188: + message.dimension = 188; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION": + case 204: + message.dimension = 204; + break; + case "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": + case 205: + message.dimension = 205; + break; + case "LINE_ITEM_COMPUTED_STATUS": + case 250: + message.dimension = 250; + break; + case "LINE_ITEM_COMPUTED_STATUS_NAME": + case 251: + message.dimension = 251; + break; + case "LINE_ITEM_CONTRACTED_QUANTITY": + case 92: + message.dimension = 92; + break; + case "LINE_ITEM_COST_PER_UNIT": + case 85: + message.dimension = 85; + break; + case "LINE_ITEM_COST_TYPE": + case 212: + message.dimension = 212; + break; + case "LINE_ITEM_COST_TYPE_NAME": + case 213: + message.dimension = 213; + break; + case "LINE_ITEM_CREATIVE_END_DATE": + case 176: + message.dimension = 176; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE": + case 189: + message.dimension = 189; + break; + case "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": + case 190: + message.dimension = 190; + break; + case "LINE_ITEM_CREATIVE_START_DATE": + case 175: + message.dimension = 175; + break; + case "LINE_ITEM_CURRENCY_CODE": + case 180: + message.dimension = 180; + break; + case "LINE_ITEM_DELIVERY_INDICATOR": + case 87: + message.dimension = 87; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE": + case 191: + message.dimension = 191; + break; + case "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": + case 192: + message.dimension = 192; + break; + case "LINE_ITEM_DISCOUNT_ABSOLUTE": + case 195: + message.dimension = 195; + break; + case "LINE_ITEM_DISCOUNT_PERCENTAGE": + case 196: + message.dimension = 196; + break; + case "LINE_ITEM_END_DATE": + case 81: + message.dimension = 81; + break; + case "LINE_ITEM_END_DATE_TIME": + case 83: + message.dimension = 83; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE": + case 201: + message.dimension = 201; + break; + case "LINE_ITEM_ENVIRONMENT_TYPE_NAME": + case 202: + message.dimension = 202; + break; + case "LINE_ITEM_EXTERNAL_DEAL_ID": + case 97: + message.dimension = 97; + break; + case "LINE_ITEM_EXTERNAL_ID": + case 86: + message.dimension = 86; + break; + case "LINE_ITEM_FREQUENCY_CAP": + case 256: + message.dimension = 256; + break; + case "LINE_ITEM_ID": + case 1: + message.dimension = 1; + break; + case "LINE_ITEM_LABELS": + case 667: + message.dimension = 667; + break; + case "LINE_ITEM_LABEL_IDS": + case 665: + message.dimension = 665; + break; + case "LINE_ITEM_LAST_MODIFIED_BY_APP": + case 181: + message.dimension = 181; + break; + case "LINE_ITEM_LIFETIME_CLICKS": + case 95: + message.dimension = 95; + break; + case "LINE_ITEM_LIFETIME_IMPRESSIONS": + case 94: + message.dimension = 94; + break; + case "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": + case 96: + message.dimension = 96; + break; + case "LINE_ITEM_MAKEGOOD": + case 89: + message.dimension = 89; + break; + case "LINE_ITEM_NAME": + case 2: + message.dimension = 2; + break; + case "LINE_ITEM_NON_CPD_BOOKED_REVENUE": + case 98: + message.dimension = 98; + break; + case "LINE_ITEM_OPTIMIZABLE": + case 90: + message.dimension = 90; + break; + case "LINE_ITEM_PO_NUMBER": + case 669: + message.dimension = 669; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE": + case 210: + message.dimension = 210; + break; + case "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": + case 211: + message.dimension = 211; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": + case 93: + message.dimension = 93; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": + case 396: + message.dimension = 396; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": + case 208: + message.dimension = 208; + break; + case "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": + case 209: + message.dimension = 209; + break; + case "LINE_ITEM_PRIORITY": + case 24: + message.dimension = 24; + break; + case "LINE_ITEM_RESERVATION_STATUS": + case 304: + message.dimension = 304; + break; + case "LINE_ITEM_RESERVATION_STATUS_NAME": + case 305: + message.dimension = 305; + break; + case "LINE_ITEM_SALESPERSON": + case 671: + message.dimension = 671; + break; + case "LINE_ITEM_SECONDARY_SALESPEOPLE": + case 673: + message.dimension = 673; + break; + case "LINE_ITEM_SECONDARY_TRAFFICKERS": + case 675: + message.dimension = 675; + break; + case "LINE_ITEM_START_DATE": + case 82: + message.dimension = 82; + break; + case "LINE_ITEM_START_DATE_TIME": + case 84: + message.dimension = 84; + break; + case "LINE_ITEM_TRAFFICKER": + case 677: + message.dimension = 677; + break; + case "LINE_ITEM_TYPE": + case 193: + message.dimension = 193; + break; + case "LINE_ITEM_TYPE_NAME": + case 194: + message.dimension = 194; + break; + case "LINE_ITEM_UNLIMITED_END": + case 187: + message.dimension = 187; + break; + case "LINE_ITEM_VALUE_COST_PER_UNIT": + case 88: + message.dimension = 88; + break; + case "LINE_ITEM_WEB_PROPERTY_CODE": + case 179: + message.dimension = 179; + break; + case "MASTER_COMPANION_CREATIVE_ID": + case 140: + message.dimension = 140; + break; + case "MASTER_COMPANION_CREATIVE_NAME": + case 141: + message.dimension = 141; + break; + case "MEDIATION_TYPE": + case 701: + message.dimension = 701; + break; + case "MEDIATION_TYPE_NAME": + case 754: + message.dimension = 754; + break; + case "MEDIATION_YIELD_PARTNER_ID": + case 661: + message.dimension = 661; + break; + case "MEDIATION_YIELD_PARTNER_NAME": + case 662: + message.dimension = 662; + break; + case "METRO_ID": + case 453: + message.dimension = 453; + break; + case "METRO_NAME": + case 454: + message.dimension = 454; + break; + case "MOBILE_APP_FREE": + case 128: + message.dimension = 128; + break; + case "MOBILE_APP_ICON_URL": + case 129: + message.dimension = 129; + break; + case "MOBILE_APP_ID": + case 123: + message.dimension = 123; + break; + case "MOBILE_APP_NAME": + case 127: + message.dimension = 127; + break; + case "MOBILE_APP_OWNERSHIP_STATUS": + case 311: + message.dimension = 311; + break; + case "MOBILE_APP_OWNERSHIP_STATUS_NAME": + case 312: + message.dimension = 312; + break; + case "MOBILE_APP_STORE": + case 125: + message.dimension = 125; + break; + case "MOBILE_APP_STORE_NAME": + case 245: + message.dimension = 245; + break; + case "MOBILE_INVENTORY_TYPE": + case 99: + message.dimension = 99; + break; + case "MOBILE_INVENTORY_TYPE_NAME": + case 21: + message.dimension = 21; + break; + case "MOBILE_RENDERING_SDK": + case 646: + message.dimension = 646; + break; + case "MOBILE_RENDERING_SDK_NAME": + case 647: + message.dimension = 647; + break; + case "MOBILE_SDK_MAJOR_VERSION": + case 692: + message.dimension = 692; + break; + case "MOBILE_SDK_MINOR_VERSION": + case 693: + message.dimension = 693; + break; + case "MOBILE_SDK_VERSION_NAME": + case 130: + message.dimension = 130; + break; + case "MONTH_YEAR": + case 6: + message.dimension = 6; + break; + case "NATIVE_AD_FORMAT_ID": + case 255: + message.dimension = 255; + break; + case "NATIVE_AD_FORMAT_NAME": + case 254: + message.dimension = 254; + break; + case "NATIVE_STYLE_ID": + case 253: + message.dimension = 253; + break; + case "NATIVE_STYLE_NAME": + case 252: + message.dimension = 252; + break; + case "NO_FILL_REASON_CATEGORY": + case 586: + message.dimension = 586; + break; + case "NO_FILL_REASON_CATEGORY_NAME": + case 587: + message.dimension = 587; + break; + case "OPERATING_SYSTEM_CATEGORY": + case 117: + message.dimension = 117; + break; + case "OPERATING_SYSTEM_CATEGORY_NAME": + case 118: + message.dimension = 118; + break; + case "OPERATING_SYSTEM_VERSION_ID": + case 238: + message.dimension = 238; + break; + case "OPERATING_SYSTEM_VERSION_NAME": + case 237: + message.dimension = 237; + break; + case "OPTIMIZATION_TYPE": + case 639: + message.dimension = 639; + break; + case "OPTIMIZATION_TYPE_NAME": + case 640: + message.dimension = 640; + break; + case "ORDER_AGENCY": + case 150: + message.dimension = 150; + break; + case "ORDER_AGENCY_ID": + case 151: + message.dimension = 151; + break; + case "ORDER_BOOKED_CPC": + case 152: + message.dimension = 152; + break; + case "ORDER_BOOKED_CPM": + case 153: + message.dimension = 153; + break; + case "ORDER_DELIVERY_STATUS": + case 231: + message.dimension = 231; + break; + case "ORDER_DELIVERY_STATUS_NAME": + case 239: + message.dimension = 239; + break; + case "ORDER_END_DATE": + case 154: + message.dimension = 154; + break; + case "ORDER_END_DATE_TIME": + case 155: + message.dimension = 155; + break; + case "ORDER_EXTERNAL_ID": + case 156: + message.dimension = 156; + break; + case "ORDER_ID": + case 7: + message.dimension = 7; + break; + case "ORDER_LABELS": + case 170: + message.dimension = 170; + break; + case "ORDER_LABEL_IDS": + case 171: + message.dimension = 171; + break; + case "ORDER_LIFETIME_CLICKS": + case 158: + message.dimension = 158; + break; + case "ORDER_LIFETIME_IMPRESSIONS": + case 159: + message.dimension = 159; + break; + case "ORDER_NAME": + case 8: + message.dimension = 8; + break; + case "ORDER_PO_NUMBER": + case 160: + message.dimension = 160; + break; + case "ORDER_PROGRAMMATIC": + case 157: + message.dimension = 157; + break; + case "ORDER_SALESPERSON": + case 161: + message.dimension = 161; + break; + case "ORDER_SALESPERSON_ID": + case 629: + message.dimension = 629; + break; + case "ORDER_SECONDARY_SALESPEOPLE": + case 164: + message.dimension = 164; + break; + case "ORDER_SECONDARY_SALESPEOPLE_ID": + case 165: + message.dimension = 165; + break; + case "ORDER_SECONDARY_TRAFFICKERS": + case 166: + message.dimension = 166; + break; + case "ORDER_SECONDARY_TRAFFICKERS_ID": + case 167: + message.dimension = 167; + break; + case "ORDER_START_DATE": + case 168: + message.dimension = 168; + break; + case "ORDER_START_DATE_TIME": + case 169: + message.dimension = 169; + break; + case "ORDER_TRAFFICKER": + case 162: + message.dimension = 162; + break; + case "ORDER_TRAFFICKER_ID": + case 163: + message.dimension = 163; + break; + case "ORDER_UNLIMITED_END": + case 203: + message.dimension = 203; + break; + case "PAGE_PATH": + case 511: + message.dimension = 511; + break; + case "PAGE_TITLE_AND_SCREEN_CLASS": + case 512: + message.dimension = 512; + break; + case "PAGE_TITLE_AND_SCREEN_NAME": + case 513: + message.dimension = 513; + break; + case "PLACEMENT_ID": + case 113: + message.dimension = 113; + break; + case "PLACEMENT_ID_ALL": + case 144: + message.dimension = 144; + break; + case "PLACEMENT_NAME": + case 114: + message.dimension = 114; + break; + case "PLACEMENT_NAME_ALL": + case 145: + message.dimension = 145; + break; + case "PLACEMENT_STATUS": + case 362: + message.dimension = 362; + break; + case "PLACEMENT_STATUS_NAME": + case 364: + message.dimension = 364; + break; + case "PLACEMENT_STATUS_NAME_ALL": + case 365: + message.dimension = 365; + break; + case "POSTAL_CODE_ID": + case 455: + message.dimension = 455; + break; + case "POSTAL_CODE_NAME": + case 456: + message.dimension = 456; + break; + case "PPID_STATUS": + case 406: + message.dimension = 406; + break; + case "PPID_STATUS_NAME": + case 407: + message.dimension = 407; + break; + case "PREDICTED_VIEWABILITY_BUCKET": + case 633: + message.dimension = 633; + break; + case "PREDICTED_VIEWABILITY_BUCKET_NAME": + case 634: + message.dimension = 634; + break; + case "PRESENTED_SECURE_SIGNAL_ID": + case 495: + message.dimension = 495; + break; + case "PRESENTED_SECURE_SIGNAL_NAME": + case 496: + message.dimension = 496; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE": + case 408: + message.dimension = 408; + break; + case "PRIMARY_PERSONALIZATION_ID_TYPE_NAME": + case 409: + message.dimension = 409; + break; + case "PROGRAMMATIC_BUYER_ID": + case 240: + message.dimension = 240; + break; + case "PROGRAMMATIC_BUYER_NAME": + case 241: + message.dimension = 241; + break; + case "PROGRAMMATIC_CHANNEL": + case 13: + message.dimension = 13; + break; + case "PROGRAMMATIC_CHANNEL_NAME": + case 14: + message.dimension = 14; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE": + case 410: + message.dimension = 410; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS": + case 546: + message.dimension = 546; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME": + case 412: + message.dimension = 412; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER": + case 413: + message.dimension = 413; + break; + case "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE": + case 414: + message.dimension = 414; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE": + case 425: + message.dimension = 425; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS": + case 545: + message.dimension = 545; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME": + case 427: + message.dimension = 427; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER": + case 428: + message.dimension = 428; + break; + case "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE": + case 429: + message.dimension = 429; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE": + case 415: + message.dimension = 415; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID": + case 416: + message.dimension = 416; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME": + case 417: + message.dimension = 417; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER": + case 418: + message.dimension = 418; + break; + case "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE": + case 419: + message.dimension = 419; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID": + case 136: + message.dimension = 136; + break; + case "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME": + case 137: + message.dimension = 137; + break; + case "REGION_ID": + case 457: + message.dimension = 457; + break; + case "REGION_NAME": + case 458: + message.dimension = 458; + break; + case "REJECTION_CLASS_CATEGORY": + case 590: + message.dimension = 590; + break; + case "REJECTION_CLASS_CATEGORY_NAME": + case 591: + message.dimension = 591; + break; + case "RENDERED_CREATIVE_SIZE": + case 343: + message.dimension = 343; + break; + case "REQUESTED_AD_SIZES": + case 352: + message.dimension = 352; + break; + case "REQUEST_TYPE": + case 146: + message.dimension = 146; + break; + case "REQUEST_TYPE_NAME": + case 147: + message.dimension = 147; + break; + case "SERVER_SIDE_UNWRAPPING_ELIGIBLE": + case 597: + message.dimension = 597; + break; + case "SERVING_RESTRICTION": + case 631: + message.dimension = 631; + break; + case "SERVING_RESTRICTION_NAME": + case 632: + message.dimension = 632; + break; + case "SITE": + case 387: + message.dimension = 387; + break; + case "TARGETING_ID": + case 232: + message.dimension = 232; + break; + case "TARGETING_NAME": + case 233: + message.dimension = 233; + break; + case "TARGETING_TYPE": + case 385: + message.dimension = 385; + break; + case "TARGETING_TYPE_NAME": + case 386: + message.dimension = 386; + break; + case "THIRD_PARTY_ID_STATUS": + case 402: + message.dimension = 402; + break; + case "THIRD_PARTY_ID_STATUS_NAME": + case 403: + message.dimension = 403; + break; + case "TOPICS_STATUS": + case 504: + message.dimension = 504; + break; + case "TOPICS_STATUS_NAME": + case 505: + message.dimension = 505; + break; + case "TOP_PRIVATE_DOMAIN": + case 444: + message.dimension = 444; + break; + case "TRAFFIC_SOURCE": + case 388: + message.dimension = 388; + break; + case "TRAFFIC_SOURCE_NAME": + case 389: + message.dimension = 389; + break; + case "UNIFIED_PRICING_RULE_ID": + case 393: + message.dimension = 393; + break; + case "UNIFIED_PRICING_RULE_NAME": + case 394: + message.dimension = 394; + break; + case "URL": + case 506: + message.dimension = 506; + break; + case "URL_ID": + case 507: + message.dimension = 507; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE": + case 635: + message.dimension = 635; + break; + case "USER_MESSAGES_ENTITLEMENT_SOURCE_NAME": + case 636: + message.dimension = 636; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID": + case 637: + message.dimension = 637; + break; + case "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME": + case 638: + message.dimension = 638; + break; + case "VAST_VERSION": + case 554: + message.dimension = 554; + break; + case "VAST_VERSION_NAME": + case 555: + message.dimension = 555; + break; + case "VIDEO_AD_BREAK_TYPE": + case 556: + message.dimension = 556; + break; + case "VIDEO_AD_BREAK_TYPE_NAME": + case 557: + message.dimension = 557; + break; + case "VIDEO_AD_DURATION": + case 450: + message.dimension = 450; + break; + case "VIDEO_AD_FORMATS_RULE": + case 561: + message.dimension = 561; + break; + case "VIDEO_AD_FORMATS_RULE_ID": + case 560: + message.dimension = 560; + break; + case "VIDEO_AD_REQUEST_DURATION": + case 558: + message.dimension = 558; + break; + case "VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME": + case 751: + message.dimension = 751; + break; + case "VIDEO_AD_REQUEST_DURATION_NAME": + case 559: + message.dimension = 559; + break; + case "VIDEO_AD_REQUEST_SOURCE": + case 438: + message.dimension = 438; + break; + case "VIDEO_AD_REQUEST_SOURCE_NAME": + case 439: + message.dimension = 439; + break; + case "VIDEO_AD_TYPE": + case 432: + message.dimension = 432; + break; + case "VIDEO_AD_TYPE_NAME": + case 433: + message.dimension = 433; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE": + case 721: + message.dimension = 721; + break; + case "VIDEO_CONTINUOUS_PLAY_TYPE_NAME": + case 722: + message.dimension = 722; + break; + case "VIDEO_FALLBACK_POSITION": + case 530: + message.dimension = 530; + break; + case "VIDEO_MEASUREMENT_SOURCE": + case 601: + message.dimension = 601; + break; + case "VIDEO_MEASUREMENT_SOURCE_NAME": + case 602: + message.dimension = 602; + break; + case "VIDEO_PLCMT": + case 172: + message.dimension = 172; + break; + case "VIDEO_PLCMT_NAME": + case 173: + message.dimension = 173; + break; + case "VIDEO_POSITION_IN_POD": + case 538: + message.dimension = 538; + break; + case "VIDEO_POSITION_OF_POD": + case 539: + message.dimension = 539; + break; + case "VIDEO_SDK_VERSION": + case 440: + message.dimension = 440; + break; + case "VIDEO_SDK_VERSION_NAME": + case 441: + message.dimension = 441; + break; + case "VIDEO_STITCHER_TYPE": + case 752: + message.dimension = 752; + break; + case "VIDEO_STITCHER_TYPE_NAME": + case 753: + message.dimension = 753; + break; + case "WEEK": + case 5: + message.dimension = 5; + break; + case "YIELD_GROUP_BUYER_NAME": + case 184: + message.dimension = 184; + break; + case "YIELD_GROUP_BUYER_TAG_NAME": + case 627: + message.dimension = 627; + break; + case "YIELD_GROUP_ID": + case 182: + message.dimension = 182; + break; + case "YIELD_GROUP_NAME": + case 183: + message.dimension = 183; + break; + case "YOUTUBE_AD_DURATION_BUCKET": + case 430: + message.dimension = 430; + break; + case "YOUTUBE_AD_DURATION_BUCKET_NAME": + case 431: + message.dimension = 431; + break; + case "YOUTUBE_AD_TYPE": + case 399: + message.dimension = 399; + break; + case "YOUTUBE_AD_TYPE_NAME": + case 400: + message.dimension = 400; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 10000: + message.dimension = 10000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 10001: + message.dimension = 10001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 10002: + message.dimension = 10002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 10003: + message.dimension = 10003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 10004: + message.dimension = 10004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 10005: + message.dimension = 10005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 10006: + message.dimension = 10006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 10007: + message.dimension = 10007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 10008: + message.dimension = 10008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 10009: + message.dimension = 10009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 10010: + message.dimension = 10010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 10011: + message.dimension = 10011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 10012: + message.dimension = 10012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 10013: + message.dimension = 10013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 10014: + message.dimension = 10014; + break; + case "LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 11000: + message.dimension = 11000; + break; + case "LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 11001: + message.dimension = 11001; + break; + case "LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 11002: + message.dimension = 11002; + break; + case "LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 11003: + message.dimension = 11003; + break; + case "LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 11004: + message.dimension = 11004; + break; + case "LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 11005: + message.dimension = 11005; + break; + case "LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 11006: + message.dimension = 11006; + break; + case "LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 11007: + message.dimension = 11007; + break; + case "LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 11008: + message.dimension = 11008; + break; + case "LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 11009: + message.dimension = 11009; + break; + case "LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 11010: + message.dimension = 11010; + break; + case "LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 11011: + message.dimension = 11011; + break; + case "LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 11012: + message.dimension = 11012; + break; + case "LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 11013: + message.dimension = 11013; + break; + case "LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 11014: + message.dimension = 11014; + break; + case "ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 12000: + message.dimension = 12000; + break; + case "ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 12001: + message.dimension = 12001; + break; + case "ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 12002: + message.dimension = 12002; + break; + case "ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 12003: + message.dimension = 12003; + break; + case "ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 12004: + message.dimension = 12004; + break; + case "ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 12005: + message.dimension = 12005; + break; + case "ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 12006: + message.dimension = 12006; + break; + case "ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 12007: + message.dimension = 12007; + break; + case "ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 12008: + message.dimension = 12008; + break; + case "ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 12009: + message.dimension = 12009; + break; + case "ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 12010: + message.dimension = 12010; + break; + case "ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 12011: + message.dimension = 12011; + break; + case "ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 12012: + message.dimension = 12012; + break; + case "ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 12013: + message.dimension = 12013; + break; + case "ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 12014: + message.dimension = 12014; + break; + case "ORDER_CUSTOM_FIELD_0_VALUE": + case 13000: + message.dimension = 13000; + break; + case "ORDER_CUSTOM_FIELD_1_VALUE": + case 13001: + message.dimension = 13001; + break; + case "ORDER_CUSTOM_FIELD_2_VALUE": + case 13002: + message.dimension = 13002; + break; + case "ORDER_CUSTOM_FIELD_3_VALUE": + case 13003: + message.dimension = 13003; + break; + case "ORDER_CUSTOM_FIELD_4_VALUE": + case 13004: + message.dimension = 13004; + break; + case "ORDER_CUSTOM_FIELD_5_VALUE": + case 13005: + message.dimension = 13005; + break; + case "ORDER_CUSTOM_FIELD_6_VALUE": + case 13006: + message.dimension = 13006; + break; + case "ORDER_CUSTOM_FIELD_7_VALUE": + case 13007: + message.dimension = 13007; + break; + case "ORDER_CUSTOM_FIELD_8_VALUE": + case 13008: + message.dimension = 13008; + break; + case "ORDER_CUSTOM_FIELD_9_VALUE": + case 13009: + message.dimension = 13009; + break; + case "ORDER_CUSTOM_FIELD_10_VALUE": + case 13010: + message.dimension = 13010; + break; + case "ORDER_CUSTOM_FIELD_11_VALUE": + case 13011: + message.dimension = 13011; + break; + case "ORDER_CUSTOM_FIELD_12_VALUE": + case 13012: + message.dimension = 13012; + break; + case "ORDER_CUSTOM_FIELD_13_VALUE": + case 13013: + message.dimension = 13013; + break; + case "ORDER_CUSTOM_FIELD_14_VALUE": + case 13014: + message.dimension = 13014; + break; + case "CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 14000: + message.dimension = 14000; + break; + case "CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 14001: + message.dimension = 14001; + break; + case "CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 14002: + message.dimension = 14002; + break; + case "CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 14003: + message.dimension = 14003; + break; + case "CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 14004: + message.dimension = 14004; + break; + case "CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 14005: + message.dimension = 14005; + break; + case "CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 14006: + message.dimension = 14006; + break; + case "CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 14007: + message.dimension = 14007; + break; + case "CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 14008: + message.dimension = 14008; + break; + case "CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 14009: + message.dimension = 14009; + break; + case "CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 14010: + message.dimension = 14010; + break; + case "CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 14011: + message.dimension = 14011; + break; + case "CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 14012: + message.dimension = 14012; + break; + case "CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 14013: + message.dimension = 14013; + break; + case "CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 14014: + message.dimension = 14014; + break; + case "CREATIVE_CUSTOM_FIELD_0_VALUE": + case 15000: + message.dimension = 15000; + break; + case "CREATIVE_CUSTOM_FIELD_1_VALUE": + case 15001: + message.dimension = 15001; + break; + case "CREATIVE_CUSTOM_FIELD_2_VALUE": + case 15002: + message.dimension = 15002; + break; + case "CREATIVE_CUSTOM_FIELD_3_VALUE": + case 15003: + message.dimension = 15003; + break; + case "CREATIVE_CUSTOM_FIELD_4_VALUE": + case 15004: + message.dimension = 15004; + break; + case "CREATIVE_CUSTOM_FIELD_5_VALUE": + case 15005: + message.dimension = 15005; + break; + case "CREATIVE_CUSTOM_FIELD_6_VALUE": + case 15006: + message.dimension = 15006; + break; + case "CREATIVE_CUSTOM_FIELD_7_VALUE": + case 15007: + message.dimension = 15007; + break; + case "CREATIVE_CUSTOM_FIELD_8_VALUE": + case 15008: + message.dimension = 15008; + break; + case "CREATIVE_CUSTOM_FIELD_9_VALUE": + case 15009: + message.dimension = 15009; + break; + case "CREATIVE_CUSTOM_FIELD_10_VALUE": + case 15010: + message.dimension = 15010; + break; + case "CREATIVE_CUSTOM_FIELD_11_VALUE": + case 15011: + message.dimension = 15011; + break; + case "CREATIVE_CUSTOM_FIELD_12_VALUE": + case 15012: + message.dimension = 15012; + break; + case "CREATIVE_CUSTOM_FIELD_13_VALUE": + case 15013: + message.dimension = 15013; + break; + case "CREATIVE_CUSTOM_FIELD_14_VALUE": + case 15014: + message.dimension = 15014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": + case 16000: + message.dimension = 16000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": + case 16001: + message.dimension = 16001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": + case 16002: + message.dimension = 16002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID": + case 16003: + message.dimension = 16003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID": + case 16004: + message.dimension = 16004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID": + case 16005: + message.dimension = 16005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID": + case 16006: + message.dimension = 16006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID": + case 16007: + message.dimension = 16007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID": + case 16008: + message.dimension = 16008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID": + case 16009: + message.dimension = 16009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID": + case 16010: + message.dimension = 16010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID": + case 16011: + message.dimension = 16011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID": + case 16012: + message.dimension = 16012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID": + case 16013: + message.dimension = 16013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID": + case 16014: + message.dimension = 16014; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE": + case 17000: + message.dimension = 17000; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE": + case 17001: + message.dimension = 17001; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE": + case 17002: + message.dimension = 17002; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE": + case 17003: + message.dimension = 17003; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE": + case 17004: + message.dimension = 17004; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE": + case 17005: + message.dimension = 17005; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE": + case 17006: + message.dimension = 17006; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE": + case 17007: + message.dimension = 17007; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE": + case 17008: + message.dimension = 17008; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE": + case 17009: + message.dimension = 17009; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE": + case 17010: + message.dimension = 17010; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE": + case 17011: + message.dimension = 17011; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE": + case 17012: + message.dimension = 17012; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE": + case 17013: + message.dimension = 17013; + break; + case "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE": + case 17014: + message.dimension = 17014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID": + case 18000: + message.dimension = 18000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID": + case 18001: + message.dimension = 18001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID": + case 18002: + message.dimension = 18002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID": + case 18003: + message.dimension = 18003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID": + case 18004: + message.dimension = 18004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID": + case 18005: + message.dimension = 18005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID": + case 18006: + message.dimension = 18006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID": + case 18007: + message.dimension = 18007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID": + case 18008: + message.dimension = 18008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID": + case 18009: + message.dimension = 18009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID": + case 18010: + message.dimension = 18010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID": + case 18011: + message.dimension = 18011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID": + case 18012: + message.dimension = 18012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID": + case 18013: + message.dimension = 18013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID": + case 18014: + message.dimension = 18014; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE": + case 19000: + message.dimension = 19000; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE": + case 19001: + message.dimension = 19001; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE": + case 19002: + message.dimension = 19002; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE": + case 19003: + message.dimension = 19003; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE": + case 19004: + message.dimension = 19004; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE": + case 19005: + message.dimension = 19005; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE": + case 19006: + message.dimension = 19006; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE": + case 19007: + message.dimension = 19007; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE": + case 19008: + message.dimension = 19008; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE": + case 19009: + message.dimension = 19009; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE": + case 19010: + message.dimension = 19010; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE": + case 19011: + message.dimension = 19011; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE": + case 19012: + message.dimension = 19012; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE": + case 19013: + message.dimension = 19013; + break; + case "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE": + case 19014: + message.dimension = 19014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID": + case 20000: + message.dimension = 20000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID": + case 20001: + message.dimension = 20001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID": + case 20002: + message.dimension = 20002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID": + case 20003: + message.dimension = 20003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID": + case 20004: + message.dimension = 20004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID": + case 20005: + message.dimension = 20005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID": + case 20006: + message.dimension = 20006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID": + case 20007: + message.dimension = 20007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID": + case 20008: + message.dimension = 20008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID": + case 20009: + message.dimension = 20009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID": + case 20010: + message.dimension = 20010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID": + case 20011: + message.dimension = 20011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": + case 20012: + message.dimension = 20012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": + case 20013: + message.dimension = 20013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": + case 20014: + message.dimension = 20014; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": + case 21000: + message.dimension = 21000; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": + case 21001: + message.dimension = 21001; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": + case 21002: + message.dimension = 21002; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": + case 21003: + message.dimension = 21003; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": + case 21004: + message.dimension = 21004; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": + case 21005: + message.dimension = 21005; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": + case 21006: + message.dimension = 21006; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": + case 21007: + message.dimension = 21007; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": + case 21008: + message.dimension = 21008; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": + case 21009: + message.dimension = 21009; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": + case 21010: + message.dimension = 21010; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": + case 21011: + message.dimension = 21011; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": + case 21012: + message.dimension = 21012; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": + case 21013: + message.dimension = 21013; + break; + case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": + case 21014: + message.dimension = 21014; + break; + case "CUSTOM_DIMENSION_0_VALUE_ID": + case 100000: + message.dimension = 100000; + break; + case "CUSTOM_DIMENSION_1_VALUE_ID": + case 100001: + message.dimension = 100001; + break; + case "CUSTOM_DIMENSION_2_VALUE_ID": + case 100002: + message.dimension = 100002; + break; + case "CUSTOM_DIMENSION_3_VALUE_ID": + case 100003: + message.dimension = 100003; + break; + case "CUSTOM_DIMENSION_4_VALUE_ID": + case 100004: + message.dimension = 100004; + break; + case "CUSTOM_DIMENSION_5_VALUE_ID": + case 100005: + message.dimension = 100005; + break; + case "CUSTOM_DIMENSION_6_VALUE_ID": + case 100006: + message.dimension = 100006; + break; + case "CUSTOM_DIMENSION_7_VALUE_ID": + case 100007: + message.dimension = 100007; + break; + case "CUSTOM_DIMENSION_8_VALUE_ID": + case 100008: + message.dimension = 100008; + break; + case "CUSTOM_DIMENSION_9_VALUE_ID": + case 100009: + message.dimension = 100009; + break; + case "CUSTOM_DIMENSION_0_VALUE": + case 101000: + message.dimension = 101000; + break; + case "CUSTOM_DIMENSION_1_VALUE": + case 101001: + message.dimension = 101001; + break; + case "CUSTOM_DIMENSION_2_VALUE": + case 101002: + message.dimension = 101002; + break; + case "CUSTOM_DIMENSION_3_VALUE": + case 101003: + message.dimension = 101003; + break; + case "CUSTOM_DIMENSION_4_VALUE": + case 101004: + message.dimension = 101004; + break; + case "CUSTOM_DIMENSION_5_VALUE": + case 101005: + message.dimension = 101005; + break; + case "CUSTOM_DIMENSION_6_VALUE": + case 101006: + message.dimension = 101006; + break; + case "CUSTOM_DIMENSION_7_VALUE": + case 101007: + message.dimension = 101007; + break; + case "CUSTOM_DIMENSION_8_VALUE": + case 101008: + message.dimension = 101008; + break; + case "CUSTOM_DIMENSION_9_VALUE": + case 101009: + message.dimension = 101009; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Slice.value: object expected"); + message.value = $root.google.ads.admanager.v1.ReportValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a Slice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Slice} message Slice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Slice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimension = options.enums === String ? "DIMENSION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = options.enums === String ? $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimension] === undefined ? message.dimension : $root.google.ads.admanager.v1.ReportDefinition.Dimension[message.dimension] : message.dimension; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.ads.admanager.v1.ReportValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this Slice to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @instance + * @returns {Object.} JSON object + */ + Slice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Slice + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Slice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Slice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Slice"; + }; + + return Slice; + })(); + + ReportDefinition.Flag = (function() { + + /** + * Properties of a Flag. + * @memberof google.ads.admanager.v1.ReportDefinition + * @interface IFlag + * @property {Array.|null} [filters] Flag filters + * @property {string|null} [name] Flag name + */ + + /** + * Constructs a new Flag. + * @memberof google.ads.admanager.v1.ReportDefinition + * @classdesc Represents a Flag. + * @implements IFlag + * @constructor + * @param {google.ads.admanager.v1.ReportDefinition.IFlag=} [properties] Properties to set + */ + function Flag(properties) { + this.filters = []; + 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]]; + } + + /** + * Flag filters. + * @member {Array.} filters + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @instance + */ + Flag.prototype.filters = $util.emptyArray; + + /** + * Flag name. + * @member {string} name + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @instance + */ + Flag.prototype.name = ""; + + /** + * Creates a new Flag instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFlag=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDefinition.Flag} Flag instance + */ + Flag.create = function create(properties) { + return new Flag(properties); + }; + + /** + * Encodes the specified Flag message. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Flag.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFlag} message Flag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Flag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Filter.encode(message.filters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified Flag message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDefinition.Flag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {google.ads.admanager.v1.ReportDefinition.IFlag} message Flag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Flag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Flag message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDefinition.Flag} Flag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Flag.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDefinition.Flag(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID": - case 20012: - message.dimensions[i] = 20012; + switch (tag >>> 3) { + case 1: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.ads.admanager.v1.ReportDefinition.Filter.decode(reader, reader.uint32())); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID": - case 20013: - message.dimensions[i] = 20013; + } + } + return message; + }; + + /** + * Decodes a Flag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDefinition.Flag} Flag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Flag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Flag message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Flag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Filter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Flag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDefinition.Flag} Flag + */ + Flag.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDefinition.Flag) + return object; + var message = new $root.google.ads.admanager.v1.ReportDefinition.Flag(); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Flag.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDefinition.Flag.filters: object expected"); + message.filters[i] = $root.google.ads.admanager.v1.ReportDefinition.Filter.fromObject(object.filters[i]); + } + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Flag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {google.ads.admanager.v1.ReportDefinition.Flag} message Flag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Flag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filters = []; + if (options.defaults) + object.name = ""; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.ads.admanager.v1.ReportDefinition.Filter.toObject(message.filters[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Flag to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @instance + * @returns {Object.} JSON object + */ + Flag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Flag + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDefinition.Flag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Flag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition.Flag"; + }; + + return Flag; + })(); + + /** + * ReportType enum. + * @name google.ads.admanager.v1.ReportDefinition.ReportType + * @enum {number} + * @property {number} REPORT_TYPE_UNSPECIFIED=0 REPORT_TYPE_UNSPECIFIED value + * @property {number} HISTORICAL=1 HISTORICAL value + * @property {number} REACH=5 REACH value + * @property {number} PRIVACY_AND_MESSAGING=6 PRIVACY_AND_MESSAGING value + * @property {number} AD_SPEED=13 AD_SPEED value + */ + ReportDefinition.ReportType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPORT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HISTORICAL"] = 1; + values[valuesById[5] = "REACH"] = 5; + values[valuesById[6] = "PRIVACY_AND_MESSAGING"] = 6; + values[valuesById[13] = "AD_SPEED"] = 13; + return values; + })(); + + /** + * Dimension enum. + * @name google.ads.admanager.v1.ReportDefinition.Dimension + * @enum {number} + * @property {number} DIMENSION_UNSPECIFIED=0 DIMENSION_UNSPECIFIED value + * @property {number} ACTIVE_VIEW_MEASUREMENT_SOURCE=575 ACTIVE_VIEW_MEASUREMENT_SOURCE value + * @property {number} ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME=576 ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME value + * @property {number} ADVERTISER_CREDIT_STATUS=475 ADVERTISER_CREDIT_STATUS value + * @property {number} ADVERTISER_CREDIT_STATUS_NAME=476 ADVERTISER_CREDIT_STATUS_NAME value + * @property {number} ADVERTISER_DOMAIN_NAME=242 ADVERTISER_DOMAIN_NAME value + * @property {number} ADVERTISER_EXTERNAL_ID=228 ADVERTISER_EXTERNAL_ID value + * @property {number} ADVERTISER_ID=131 ADVERTISER_ID value + * @property {number} ADVERTISER_LABELS=230 ADVERTISER_LABELS value + * @property {number} ADVERTISER_LABEL_IDS=229 ADVERTISER_LABEL_IDS value + * @property {number} ADVERTISER_NAME=132 ADVERTISER_NAME value + * @property {number} ADVERTISER_PRIMARY_CONTACT=227 ADVERTISER_PRIMARY_CONTACT value + * @property {number} ADVERTISER_STATUS=471 ADVERTISER_STATUS value + * @property {number} ADVERTISER_STATUS_NAME=472 ADVERTISER_STATUS_NAME value + * @property {number} ADVERTISER_TYPE=473 ADVERTISER_TYPE value + * @property {number} ADVERTISER_TYPE_NAME=474 ADVERTISER_TYPE_NAME value + * @property {number} ADVERTISER_VERTICAL=580 ADVERTISER_VERTICAL value + * @property {number} ADX_PRODUCT=499 ADX_PRODUCT value + * @property {number} ADX_PRODUCT_NAME=500 ADX_PRODUCT_NAME value + * @property {number} AD_EXPERIENCES_TYPE=641 AD_EXPERIENCES_TYPE value + * @property {number} AD_EXPERIENCES_TYPE_NAME=642 AD_EXPERIENCES_TYPE_NAME value + * @property {number} AD_LOCATION=390 AD_LOCATION value + * @property {number} AD_LOCATION_NAME=391 AD_LOCATION_NAME value + * @property {number} AD_TECHNOLOGY_PROVIDER_DOMAIN=620 AD_TECHNOLOGY_PROVIDER_DOMAIN value + * @property {number} AD_TECHNOLOGY_PROVIDER_ID=621 AD_TECHNOLOGY_PROVIDER_ID value + * @property {number} AD_TECHNOLOGY_PROVIDER_NAME=622 AD_TECHNOLOGY_PROVIDER_NAME value + * @property {number} AD_TYPE=497 AD_TYPE value + * @property {number} AD_TYPE_NAME=498 AD_TYPE_NAME value + * @property {number} AD_UNIT_CODE=64 AD_UNIT_CODE value + * @property {number} AD_UNIT_CODE_LEVEL_1=65 AD_UNIT_CODE_LEVEL_1 value + * @property {number} AD_UNIT_CODE_LEVEL_10=74 AD_UNIT_CODE_LEVEL_10 value + * @property {number} AD_UNIT_CODE_LEVEL_11=75 AD_UNIT_CODE_LEVEL_11 value + * @property {number} AD_UNIT_CODE_LEVEL_12=76 AD_UNIT_CODE_LEVEL_12 value + * @property {number} AD_UNIT_CODE_LEVEL_13=77 AD_UNIT_CODE_LEVEL_13 value + * @property {number} AD_UNIT_CODE_LEVEL_14=78 AD_UNIT_CODE_LEVEL_14 value + * @property {number} AD_UNIT_CODE_LEVEL_15=79 AD_UNIT_CODE_LEVEL_15 value + * @property {number} AD_UNIT_CODE_LEVEL_16=80 AD_UNIT_CODE_LEVEL_16 value + * @property {number} AD_UNIT_CODE_LEVEL_2=66 AD_UNIT_CODE_LEVEL_2 value + * @property {number} AD_UNIT_CODE_LEVEL_3=67 AD_UNIT_CODE_LEVEL_3 value + * @property {number} AD_UNIT_CODE_LEVEL_4=68 AD_UNIT_CODE_LEVEL_4 value + * @property {number} AD_UNIT_CODE_LEVEL_5=69 AD_UNIT_CODE_LEVEL_5 value + * @property {number} AD_UNIT_CODE_LEVEL_6=70 AD_UNIT_CODE_LEVEL_6 value + * @property {number} AD_UNIT_CODE_LEVEL_7=71 AD_UNIT_CODE_LEVEL_7 value + * @property {number} AD_UNIT_CODE_LEVEL_8=72 AD_UNIT_CODE_LEVEL_8 value + * @property {number} AD_UNIT_CODE_LEVEL_9=73 AD_UNIT_CODE_LEVEL_9 value + * @property {number} AD_UNIT_ID=25 AD_UNIT_ID value + * @property {number} AD_UNIT_ID_ALL_LEVEL=27 AD_UNIT_ID_ALL_LEVEL value + * @property {number} AD_UNIT_ID_LEVEL_1=30 AD_UNIT_ID_LEVEL_1 value + * @property {number} AD_UNIT_ID_LEVEL_10=48 AD_UNIT_ID_LEVEL_10 value + * @property {number} AD_UNIT_ID_LEVEL_11=50 AD_UNIT_ID_LEVEL_11 value + * @property {number} AD_UNIT_ID_LEVEL_12=52 AD_UNIT_ID_LEVEL_12 value + * @property {number} AD_UNIT_ID_LEVEL_13=54 AD_UNIT_ID_LEVEL_13 value + * @property {number} AD_UNIT_ID_LEVEL_14=56 AD_UNIT_ID_LEVEL_14 value + * @property {number} AD_UNIT_ID_LEVEL_15=58 AD_UNIT_ID_LEVEL_15 value + * @property {number} AD_UNIT_ID_LEVEL_16=60 AD_UNIT_ID_LEVEL_16 value + * @property {number} AD_UNIT_ID_LEVEL_2=32 AD_UNIT_ID_LEVEL_2 value + * @property {number} AD_UNIT_ID_LEVEL_3=34 AD_UNIT_ID_LEVEL_3 value + * @property {number} AD_UNIT_ID_LEVEL_4=36 AD_UNIT_ID_LEVEL_4 value + * @property {number} AD_UNIT_ID_LEVEL_5=38 AD_UNIT_ID_LEVEL_5 value + * @property {number} AD_UNIT_ID_LEVEL_6=40 AD_UNIT_ID_LEVEL_6 value + * @property {number} AD_UNIT_ID_LEVEL_7=42 AD_UNIT_ID_LEVEL_7 value + * @property {number} AD_UNIT_ID_LEVEL_8=44 AD_UNIT_ID_LEVEL_8 value + * @property {number} AD_UNIT_ID_LEVEL_9=46 AD_UNIT_ID_LEVEL_9 value + * @property {number} AD_UNIT_ID_TOP_LEVEL=142 AD_UNIT_ID_TOP_LEVEL value + * @property {number} AD_UNIT_NAME=26 AD_UNIT_NAME value + * @property {number} AD_UNIT_NAME_ALL_LEVEL=29 AD_UNIT_NAME_ALL_LEVEL value + * @property {number} AD_UNIT_NAME_LEVEL_1=31 AD_UNIT_NAME_LEVEL_1 value + * @property {number} AD_UNIT_NAME_LEVEL_10=49 AD_UNIT_NAME_LEVEL_10 value + * @property {number} AD_UNIT_NAME_LEVEL_11=51 AD_UNIT_NAME_LEVEL_11 value + * @property {number} AD_UNIT_NAME_LEVEL_12=53 AD_UNIT_NAME_LEVEL_12 value + * @property {number} AD_UNIT_NAME_LEVEL_13=55 AD_UNIT_NAME_LEVEL_13 value + * @property {number} AD_UNIT_NAME_LEVEL_14=57 AD_UNIT_NAME_LEVEL_14 value + * @property {number} AD_UNIT_NAME_LEVEL_15=59 AD_UNIT_NAME_LEVEL_15 value + * @property {number} AD_UNIT_NAME_LEVEL_16=61 AD_UNIT_NAME_LEVEL_16 value + * @property {number} AD_UNIT_NAME_LEVEL_2=33 AD_UNIT_NAME_LEVEL_2 value + * @property {number} AD_UNIT_NAME_LEVEL_3=35 AD_UNIT_NAME_LEVEL_3 value + * @property {number} AD_UNIT_NAME_LEVEL_4=37 AD_UNIT_NAME_LEVEL_4 value + * @property {number} AD_UNIT_NAME_LEVEL_5=39 AD_UNIT_NAME_LEVEL_5 value + * @property {number} AD_UNIT_NAME_LEVEL_6=41 AD_UNIT_NAME_LEVEL_6 value + * @property {number} AD_UNIT_NAME_LEVEL_7=43 AD_UNIT_NAME_LEVEL_7 value + * @property {number} AD_UNIT_NAME_LEVEL_8=45 AD_UNIT_NAME_LEVEL_8 value + * @property {number} AD_UNIT_NAME_LEVEL_9=47 AD_UNIT_NAME_LEVEL_9 value + * @property {number} AD_UNIT_NAME_TOP_LEVEL=143 AD_UNIT_NAME_TOP_LEVEL value + * @property {number} AD_UNIT_REWARD_AMOUNT=63 AD_UNIT_REWARD_AMOUNT value + * @property {number} AD_UNIT_REWARD_TYPE=62 AD_UNIT_REWARD_TYPE value + * @property {number} AD_UNIT_STATUS=206 AD_UNIT_STATUS value + * @property {number} AD_UNIT_STATUS_NAME=207 AD_UNIT_STATUS_NAME value + * @property {number} AGENCY_LEVEL_1_ID=565 AGENCY_LEVEL_1_ID value + * @property {number} AGENCY_LEVEL_1_NAME=566 AGENCY_LEVEL_1_NAME value + * @property {number} AGENCY_LEVEL_2_ID=567 AGENCY_LEVEL_2_ID value + * @property {number} AGENCY_LEVEL_2_NAME=568 AGENCY_LEVEL_2_NAME value + * @property {number} AGENCY_LEVEL_3_ID=569 AGENCY_LEVEL_3_ID value + * @property {number} AGENCY_LEVEL_3_NAME=570 AGENCY_LEVEL_3_NAME value + * @property {number} AGE_BRACKET=508 AGE_BRACKET value + * @property {number} AGE_BRACKET_NAME=582 AGE_BRACKET_NAME value + * @property {number} APP_TRACKING_TRANSPARENCY_CONSENT_STATUS=442 APP_TRACKING_TRANSPARENCY_CONSENT_STATUS value + * @property {number} APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME=443 APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME value + * @property {number} APP_VERSION=392 APP_VERSION value + * @property {number} AUCTION_PACKAGE_DEAL=579 AUCTION_PACKAGE_DEAL value + * @property {number} AUCTION_PACKAGE_DEAL_ID=571 AUCTION_PACKAGE_DEAL_ID value + * @property {number} AUDIENCE_SEGMENT_ID_TARGETED=584 AUDIENCE_SEGMENT_ID_TARGETED value + * @property {number} AUDIENCE_SEGMENT_TARGETED=585 AUDIENCE_SEGMENT_TARGETED value + * @property {number} AUTO_REFRESHED_TRAFFIC=421 AUTO_REFRESHED_TRAFFIC value + * @property {number} AUTO_REFRESHED_TRAFFIC_NAME=422 AUTO_REFRESHED_TRAFFIC_NAME value + * @property {number} BIDDER_ENCRYPTED_ID=493 BIDDER_ENCRYPTED_ID value + * @property {number} BIDDER_NAME=494 BIDDER_NAME value + * @property {number} BID_RANGE=679 BID_RANGE value + * @property {number} BID_REJECTION_REASON=599 BID_REJECTION_REASON value + * @property {number} BID_REJECTION_REASON_NAME=600 BID_REJECTION_REASON_NAME value + * @property {number} BRANDING_TYPE=383 BRANDING_TYPE value + * @property {number} BRANDING_TYPE_NAME=384 BRANDING_TYPE_NAME value + * @property {number} BROWSER_CATEGORY=119 BROWSER_CATEGORY value + * @property {number} BROWSER_CATEGORY_NAME=120 BROWSER_CATEGORY_NAME value + * @property {number} BROWSER_ID=235 BROWSER_ID value + * @property {number} BROWSER_NAME=236 BROWSER_NAME value + * @property {number} BUYER_NETWORK_ID=448 BUYER_NETWORK_ID value + * @property {number} BUYER_NETWORK_NAME=449 BUYER_NETWORK_NAME value + * @property {number} CALLOUT_STATUS_CATEGORY=588 CALLOUT_STATUS_CATEGORY value + * @property {number} CALLOUT_STATUS_CATEGORY_NAME=589 CALLOUT_STATUS_CATEGORY_NAME value + * @property {number} CARRIER_ID=369 CARRIER_ID value + * @property {number} CARRIER_NAME=368 CARRIER_NAME value + * @property {number} CHANNEL=501 CHANNEL value + * @property {number} CHILD_NETWORK_CODE=542 CHILD_NETWORK_CODE value + * @property {number} CHILD_NETWORK_ID=544 CHILD_NETWORK_ID value + * @property {number} CHILD_PARTNER_NAME=543 CHILD_PARTNER_NAME value + * @property {number} CITY_ID=459 CITY_ID value + * @property {number} CITY_NAME=452 CITY_NAME value + * @property {number} CLASSIFIED_ADVERTISER_ID=133 CLASSIFIED_ADVERTISER_ID value + * @property {number} CLASSIFIED_ADVERTISER_NAME=134 CLASSIFIED_ADVERTISER_NAME value + * @property {number} CLASSIFIED_BRAND_ID=243 CLASSIFIED_BRAND_ID value + * @property {number} CLASSIFIED_BRAND_NAME=244 CLASSIFIED_BRAND_NAME value + * @property {number} CONTENT_CMS_NAME=643 CONTENT_CMS_NAME value + * @property {number} CONTENT_CMS_VIDEO_ID=644 CONTENT_CMS_VIDEO_ID value + * @property {number} CONTENT_ID=246 CONTENT_ID value + * @property {number} CONTENT_MAPPING_PRESENCE=731 CONTENT_MAPPING_PRESENCE value + * @property {number} CONTENT_MAPPING_PRESENCE_NAME=732 CONTENT_MAPPING_PRESENCE_NAME value + * @property {number} CONTENT_NAME=247 CONTENT_NAME value + * @property {number} CONTINENT=469 CONTINENT value + * @property {number} CONTINENT_NAME=470 CONTINENT_NAME value + * @property {number} COUNTRY_CODE=466 COUNTRY_CODE value + * @property {number} COUNTRY_ID=11 COUNTRY_ID value + * @property {number} COUNTRY_NAME=12 COUNTRY_NAME value + * @property {number} CREATIVE_BILLING_TYPE=366 CREATIVE_BILLING_TYPE value + * @property {number} CREATIVE_BILLING_TYPE_NAME=367 CREATIVE_BILLING_TYPE_NAME value + * @property {number} CREATIVE_CLICK_THROUGH_URL=174 CREATIVE_CLICK_THROUGH_URL value + * @property {number} CREATIVE_ID=138 CREATIVE_ID value + * @property {number} CREATIVE_NAME=139 CREATIVE_NAME value + * @property {number} CREATIVE_POLICIES_FILTERING=711 CREATIVE_POLICIES_FILTERING value + * @property {number} CREATIVE_POLICIES_FILTERING_NAME=712 CREATIVE_POLICIES_FILTERING_NAME value + * @property {number} CREATIVE_PROTECTIONS_FILTERING=704 CREATIVE_PROTECTIONS_FILTERING value + * @property {number} CREATIVE_PROTECTIONS_FILTERING_NAME=705 CREATIVE_PROTECTIONS_FILTERING_NAME value + * @property {number} CREATIVE_SET_ROLE_TYPE=686 CREATIVE_SET_ROLE_TYPE value + * @property {number} CREATIVE_SET_ROLE_TYPE_NAME=687 CREATIVE_SET_ROLE_TYPE_NAME value + * @property {number} CREATIVE_TECHNOLOGY=148 CREATIVE_TECHNOLOGY value + * @property {number} CREATIVE_TECHNOLOGY_NAME=149 CREATIVE_TECHNOLOGY_NAME value + * @property {number} CREATIVE_THIRD_PARTY_VENDOR=361 CREATIVE_THIRD_PARTY_VENDOR value + * @property {number} CREATIVE_TYPE=344 CREATIVE_TYPE value + * @property {number} CREATIVE_TYPE_NAME=345 CREATIVE_TYPE_NAME value + * @property {number} CREATIVE_VENDOR_ID=706 CREATIVE_VENDOR_ID value + * @property {number} CREATIVE_VENDOR_NAME=707 CREATIVE_VENDOR_NAME value + * @property {number} CREATIVE_VIDEO_REDIRECT_THIRD_PARTY=562 CREATIVE_VIDEO_REDIRECT_THIRD_PARTY value + * @property {number} CURATOR_ID=572 CURATOR_ID value + * @property {number} CURATOR_NAME=573 CURATOR_NAME value + * @property {number} CUSTOM_EVENT_ID=737 CUSTOM_EVENT_ID value + * @property {number} CUSTOM_EVENT_NAME=735 CUSTOM_EVENT_NAME value + * @property {number} CUSTOM_EVENT_TYPE=736 CUSTOM_EVENT_TYPE value + * @property {number} CUSTOM_EVENT_TYPE_NAME=738 CUSTOM_EVENT_TYPE_NAME value + * @property {number} CUSTOM_SPOT_ID=423 CUSTOM_SPOT_ID value + * @property {number} CUSTOM_SPOT_NAME=424 CUSTOM_SPOT_NAME value + * @property {number} DATE=3 DATE value + * @property {number} DAY_OF_WEEK=4 DAY_OF_WEEK value + * @property {number} DEAL_BUYER_ID=240 DEAL_BUYER_ID value + * @property {number} DEAL_BUYER_NAME=241 DEAL_BUYER_NAME value + * @property {number} DEAL_ID=436 DEAL_ID value + * @property {number} DEAL_NAME=437 DEAL_NAME value + * @property {number} DELIVERED_SECURE_SIGNAL_ID=309 DELIVERED_SECURE_SIGNAL_ID value + * @property {number} DELIVERED_SECURE_SIGNAL_NAME=310 DELIVERED_SECURE_SIGNAL_NAME value + * @property {number} DEMAND_CHANNEL=9 DEMAND_CHANNEL value + * @property {number} DEMAND_CHANNEL_NAME=10 DEMAND_CHANNEL_NAME value + * @property {number} DEMAND_SOURCE=592 DEMAND_SOURCE value + * @property {number} DEMAND_SOURCE_NAME=593 DEMAND_SOURCE_NAME value + * @property {number} DEMAND_SUBCHANNEL=22 DEMAND_SUBCHANNEL value + * @property {number} DEMAND_SUBCHANNEL_NAME=23 DEMAND_SUBCHANNEL_NAME value + * @property {number} DEVICE=226 DEVICE value + * @property {number} DEVICE_CATEGORY=15 DEVICE_CATEGORY value + * @property {number} DEVICE_CATEGORY_NAME=16 DEVICE_CATEGORY_NAME value + * @property {number} DEVICE_MANUFACTURER_ID=525 DEVICE_MANUFACTURER_ID value + * @property {number} DEVICE_MANUFACTURER_NAME=526 DEVICE_MANUFACTURER_NAME value + * @property {number} DEVICE_MODEL_ID=527 DEVICE_MODEL_ID value + * @property {number} DEVICE_MODEL_NAME=528 DEVICE_MODEL_NAME value + * @property {number} DEVICE_NAME=225 DEVICE_NAME value + * @property {number} DSP_SEAT_ID=564 DSP_SEAT_ID value + * @property {number} DYNAMIC_ALLOCATION_TYPE=502 DYNAMIC_ALLOCATION_TYPE value + * @property {number} DYNAMIC_ALLOCATION_TYPE_NAME=503 DYNAMIC_ALLOCATION_TYPE_NAME value + * @property {number} ESP_DELIVERY=623 ESP_DELIVERY value + * @property {number} ESP_DELIVERY_NAME=624 ESP_DELIVERY_NAME value + * @property {number} ESP_PRESENCE=625 ESP_PRESENCE value + * @property {number} ESP_PRESENCE_NAME=626 ESP_PRESENCE_NAME value + * @property {number} EXCHANGE_BIDDING_DEAL_ID=715 EXCHANGE_BIDDING_DEAL_ID value + * @property {number} EXCHANGE_BIDDING_DEAL_TYPE=714 EXCHANGE_BIDDING_DEAL_TYPE value + * @property {number} EXCHANGE_BIDDING_DEAL_TYPE_NAME=723 EXCHANGE_BIDDING_DEAL_TYPE_NAME value + * @property {number} EXCHANGE_THIRD_PARTY_COMPANY_ID=185 EXCHANGE_THIRD_PARTY_COMPANY_ID value + * @property {number} EXCHANGE_THIRD_PARTY_COMPANY_NAME=186 EXCHANGE_THIRD_PARTY_COMPANY_NAME value + * @property {number} FIRST_LOOK_PRICING_RULE_ID=248 FIRST_LOOK_PRICING_RULE_ID value + * @property {number} FIRST_LOOK_PRICING_RULE_NAME=249 FIRST_LOOK_PRICING_RULE_NAME value + * @property {number} FIRST_PARTY_ID_STATUS=404 FIRST_PARTY_ID_STATUS value + * @property {number} FIRST_PARTY_ID_STATUS_NAME=405 FIRST_PARTY_ID_STATUS_NAME value + * @property {number} GENDER=509 GENDER value + * @property {number} GENDER_NAME=583 GENDER_NAME value + * @property {number} GOOGLE_ANALYTICS_STREAM_ID=519 GOOGLE_ANALYTICS_STREAM_ID value + * @property {number} GOOGLE_ANALYTICS_STREAM_NAME=520 GOOGLE_ANALYTICS_STREAM_NAME value + * @property {number} HBT_YIELD_PARTNER_ID=659 HBT_YIELD_PARTNER_ID value + * @property {number} HBT_YIELD_PARTNER_NAME=660 HBT_YIELD_PARTNER_NAME value + * @property {number} HEADER_BIDDER_INTEGRATION_TYPE=718 HEADER_BIDDER_INTEGRATION_TYPE value + * @property {number} HEADER_BIDDER_INTEGRATION_TYPE_NAME=719 HEADER_BIDDER_INTEGRATION_TYPE_NAME value + * @property {number} HOUR=100 HOUR value + * @property {number} IMPRESSION_COUNTING_METHOD=577 IMPRESSION_COUNTING_METHOD value + * @property {number} IMPRESSION_COUNTING_METHOD_NAME=578 IMPRESSION_COUNTING_METHOD_NAME value + * @property {number} INTERACTION_TYPE=223 INTERACTION_TYPE value + * @property {number} INTERACTION_TYPE_NAME=224 INTERACTION_TYPE_NAME value + * @property {number} INTEREST=510 INTEREST value + * @property {number} INVENTORY_FORMAT=17 INVENTORY_FORMAT value + * @property {number} INVENTORY_FORMAT_NAME=18 INVENTORY_FORMAT_NAME value + * @property {number} INVENTORY_SHARE_ASSIGNMENT_ID=648 INVENTORY_SHARE_ASSIGNMENT_ID value + * @property {number} INVENTORY_SHARE_ASSIGNMENT_NAME=649 INVENTORY_SHARE_ASSIGNMENT_NAME value + * @property {number} INVENTORY_SHARE_OUTCOME=603 INVENTORY_SHARE_OUTCOME value + * @property {number} INVENTORY_SHARE_OUTCOME_NAME=604 INVENTORY_SHARE_OUTCOME_NAME value + * @property {number} INVENTORY_SHARE_PARTNER_AD_SERVER=652 INVENTORY_SHARE_PARTNER_AD_SERVER value + * @property {number} INVENTORY_SHARE_PARTNER_AD_SERVER_NAME=653 INVENTORY_SHARE_PARTNER_AD_SERVER_NAME value + * @property {number} INVENTORY_SHARE_TARGET_SHARE_PERCENT=654 INVENTORY_SHARE_TARGET_SHARE_PERCENT value + * @property {number} INVENTORY_SHARE_TYPE=650 INVENTORY_SHARE_TYPE value + * @property {number} INVENTORY_SHARE_TYPE_NAME=651 INVENTORY_SHARE_TYPE_NAME value + * @property {number} INVENTORY_TYPE=19 INVENTORY_TYPE value + * @property {number} INVENTORY_TYPE_NAME=20 INVENTORY_TYPE_NAME value + * @property {number} IS_ADX_DIRECT=382 IS_ADX_DIRECT value + * @property {number} IS_CURATION_TARGETED=574 IS_CURATION_TARGETED value + * @property {number} IS_DROPPED=464 IS_DROPPED value + * @property {number} IS_FIRST_LOOK_DEAL=401 IS_FIRST_LOOK_DEAL value + * @property {number} KEY_VALUES_ID=214 KEY_VALUES_ID value + * @property {number} KEY_VALUES_NAME=215 KEY_VALUES_NAME value + * @property {number} LINE_ITEM_AGENCY=663 LINE_ITEM_AGENCY value + * @property {number} LINE_ITEM_ARCHIVED=188 LINE_ITEM_ARCHIVED value + * @property {number} LINE_ITEM_COMPANION_DELIVERY_OPTION=204 LINE_ITEM_COMPANION_DELIVERY_OPTION value + * @property {number} LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME=205 LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME value + * @property {number} LINE_ITEM_COMPUTED_STATUS=250 LINE_ITEM_COMPUTED_STATUS value + * @property {number} LINE_ITEM_COMPUTED_STATUS_NAME=251 LINE_ITEM_COMPUTED_STATUS_NAME value + * @property {number} LINE_ITEM_CONTRACTED_QUANTITY=92 LINE_ITEM_CONTRACTED_QUANTITY value + * @property {number} LINE_ITEM_COST_PER_UNIT=85 LINE_ITEM_COST_PER_UNIT value + * @property {number} LINE_ITEM_COST_TYPE=212 LINE_ITEM_COST_TYPE value + * @property {number} LINE_ITEM_COST_TYPE_NAME=213 LINE_ITEM_COST_TYPE_NAME value + * @property {number} LINE_ITEM_CREATIVE_END_DATE=176 LINE_ITEM_CREATIVE_END_DATE value + * @property {number} LINE_ITEM_CREATIVE_ROTATION_TYPE=189 LINE_ITEM_CREATIVE_ROTATION_TYPE value + * @property {number} LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME=190 LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME value + * @property {number} LINE_ITEM_CREATIVE_START_DATE=175 LINE_ITEM_CREATIVE_START_DATE value + * @property {number} LINE_ITEM_CURRENCY_CODE=180 LINE_ITEM_CURRENCY_CODE value + * @property {number} LINE_ITEM_DELIVERY_INDICATOR=87 LINE_ITEM_DELIVERY_INDICATOR value + * @property {number} LINE_ITEM_DELIVERY_RATE_TYPE=191 LINE_ITEM_DELIVERY_RATE_TYPE value + * @property {number} LINE_ITEM_DELIVERY_RATE_TYPE_NAME=192 LINE_ITEM_DELIVERY_RATE_TYPE_NAME value + * @property {number} LINE_ITEM_DISCOUNT_ABSOLUTE=195 LINE_ITEM_DISCOUNT_ABSOLUTE value + * @property {number} LINE_ITEM_DISCOUNT_PERCENTAGE=196 LINE_ITEM_DISCOUNT_PERCENTAGE value + * @property {number} LINE_ITEM_END_DATE=81 LINE_ITEM_END_DATE value + * @property {number} LINE_ITEM_END_DATE_TIME=83 LINE_ITEM_END_DATE_TIME value + * @property {number} LINE_ITEM_ENVIRONMENT_TYPE=201 LINE_ITEM_ENVIRONMENT_TYPE value + * @property {number} LINE_ITEM_ENVIRONMENT_TYPE_NAME=202 LINE_ITEM_ENVIRONMENT_TYPE_NAME value + * @property {number} LINE_ITEM_EXTERNAL_DEAL_ID=97 LINE_ITEM_EXTERNAL_DEAL_ID value + * @property {number} LINE_ITEM_EXTERNAL_ID=86 LINE_ITEM_EXTERNAL_ID value + * @property {number} LINE_ITEM_FREQUENCY_CAP=256 LINE_ITEM_FREQUENCY_CAP value + * @property {number} LINE_ITEM_ID=1 LINE_ITEM_ID value + * @property {number} LINE_ITEM_LABELS=667 LINE_ITEM_LABELS value + * @property {number} LINE_ITEM_LABEL_IDS=665 LINE_ITEM_LABEL_IDS value + * @property {number} LINE_ITEM_LAST_MODIFIED_BY_APP=181 LINE_ITEM_LAST_MODIFIED_BY_APP value + * @property {number} LINE_ITEM_LIFETIME_CLICKS=95 LINE_ITEM_LIFETIME_CLICKS value + * @property {number} LINE_ITEM_LIFETIME_IMPRESSIONS=94 LINE_ITEM_LIFETIME_IMPRESSIONS value + * @property {number} LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS=96 LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS value + * @property {number} LINE_ITEM_MAKEGOOD=89 LINE_ITEM_MAKEGOOD value + * @property {number} LINE_ITEM_NAME=2 LINE_ITEM_NAME value + * @property {number} LINE_ITEM_NON_CPD_BOOKED_REVENUE=98 LINE_ITEM_NON_CPD_BOOKED_REVENUE value + * @property {number} LINE_ITEM_OPTIMIZABLE=90 LINE_ITEM_OPTIMIZABLE value + * @property {number} LINE_ITEM_PO_NUMBER=669 LINE_ITEM_PO_NUMBER value + * @property {number} LINE_ITEM_PRIMARY_GOAL_TYPE=210 LINE_ITEM_PRIMARY_GOAL_TYPE value + * @property {number} LINE_ITEM_PRIMARY_GOAL_TYPE_NAME=211 LINE_ITEM_PRIMARY_GOAL_TYPE_NAME value + * @property {number} LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE=93 LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE value + * @property {number} LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE=396 LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE value + * @property {number} LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE=208 LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE value + * @property {number} LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME=209 LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME value + * @property {number} LINE_ITEM_PRIORITY=24 LINE_ITEM_PRIORITY value + * @property {number} LINE_ITEM_RESERVATION_STATUS=304 LINE_ITEM_RESERVATION_STATUS value + * @property {number} LINE_ITEM_RESERVATION_STATUS_NAME=305 LINE_ITEM_RESERVATION_STATUS_NAME value + * @property {number} LINE_ITEM_SALESPERSON=671 LINE_ITEM_SALESPERSON value + * @property {number} LINE_ITEM_SECONDARY_SALESPEOPLE=673 LINE_ITEM_SECONDARY_SALESPEOPLE value + * @property {number} LINE_ITEM_SECONDARY_TRAFFICKERS=675 LINE_ITEM_SECONDARY_TRAFFICKERS value + * @property {number} LINE_ITEM_START_DATE=82 LINE_ITEM_START_DATE value + * @property {number} LINE_ITEM_START_DATE_TIME=84 LINE_ITEM_START_DATE_TIME value + * @property {number} LINE_ITEM_TRAFFICKER=677 LINE_ITEM_TRAFFICKER value + * @property {number} LINE_ITEM_TYPE=193 LINE_ITEM_TYPE value + * @property {number} LINE_ITEM_TYPE_NAME=194 LINE_ITEM_TYPE_NAME value + * @property {number} LINE_ITEM_UNLIMITED_END=187 LINE_ITEM_UNLIMITED_END value + * @property {number} LINE_ITEM_VALUE_COST_PER_UNIT=88 LINE_ITEM_VALUE_COST_PER_UNIT value + * @property {number} LINE_ITEM_WEB_PROPERTY_CODE=179 LINE_ITEM_WEB_PROPERTY_CODE value + * @property {number} MASTER_COMPANION_CREATIVE_ID=140 MASTER_COMPANION_CREATIVE_ID value + * @property {number} MASTER_COMPANION_CREATIVE_NAME=141 MASTER_COMPANION_CREATIVE_NAME value + * @property {number} MEDIATION_TYPE=701 MEDIATION_TYPE value + * @property {number} MEDIATION_TYPE_NAME=754 MEDIATION_TYPE_NAME value + * @property {number} MEDIATION_YIELD_PARTNER_ID=661 MEDIATION_YIELD_PARTNER_ID value + * @property {number} MEDIATION_YIELD_PARTNER_NAME=662 MEDIATION_YIELD_PARTNER_NAME value + * @property {number} METRO_ID=453 METRO_ID value + * @property {number} METRO_NAME=454 METRO_NAME value + * @property {number} MOBILE_APP_FREE=128 MOBILE_APP_FREE value + * @property {number} MOBILE_APP_ICON_URL=129 MOBILE_APP_ICON_URL value + * @property {number} MOBILE_APP_ID=123 MOBILE_APP_ID value + * @property {number} MOBILE_APP_NAME=127 MOBILE_APP_NAME value + * @property {number} MOBILE_APP_OWNERSHIP_STATUS=311 MOBILE_APP_OWNERSHIP_STATUS value + * @property {number} MOBILE_APP_OWNERSHIP_STATUS_NAME=312 MOBILE_APP_OWNERSHIP_STATUS_NAME value + * @property {number} MOBILE_APP_STORE=125 MOBILE_APP_STORE value + * @property {number} MOBILE_APP_STORE_NAME=245 MOBILE_APP_STORE_NAME value + * @property {number} MOBILE_INVENTORY_TYPE=99 MOBILE_INVENTORY_TYPE value + * @property {number} MOBILE_INVENTORY_TYPE_NAME=21 MOBILE_INVENTORY_TYPE_NAME value + * @property {number} MOBILE_RENDERING_SDK=646 MOBILE_RENDERING_SDK value + * @property {number} MOBILE_RENDERING_SDK_NAME=647 MOBILE_RENDERING_SDK_NAME value + * @property {number} MOBILE_SDK_MAJOR_VERSION=692 MOBILE_SDK_MAJOR_VERSION value + * @property {number} MOBILE_SDK_MINOR_VERSION=693 MOBILE_SDK_MINOR_VERSION value + * @property {number} MOBILE_SDK_VERSION_NAME=130 MOBILE_SDK_VERSION_NAME value + * @property {number} MONTH_YEAR=6 MONTH_YEAR value + * @property {number} NATIVE_AD_FORMAT_ID=255 NATIVE_AD_FORMAT_ID value + * @property {number} NATIVE_AD_FORMAT_NAME=254 NATIVE_AD_FORMAT_NAME value + * @property {number} NATIVE_STYLE_ID=253 NATIVE_STYLE_ID value + * @property {number} NATIVE_STYLE_NAME=252 NATIVE_STYLE_NAME value + * @property {number} NO_FILL_REASON_CATEGORY=586 NO_FILL_REASON_CATEGORY value + * @property {number} NO_FILL_REASON_CATEGORY_NAME=587 NO_FILL_REASON_CATEGORY_NAME value + * @property {number} OPERATING_SYSTEM_CATEGORY=117 OPERATING_SYSTEM_CATEGORY value + * @property {number} OPERATING_SYSTEM_CATEGORY_NAME=118 OPERATING_SYSTEM_CATEGORY_NAME value + * @property {number} OPERATING_SYSTEM_VERSION_ID=238 OPERATING_SYSTEM_VERSION_ID value + * @property {number} OPERATING_SYSTEM_VERSION_NAME=237 OPERATING_SYSTEM_VERSION_NAME value + * @property {number} OPTIMIZATION_TYPE=639 OPTIMIZATION_TYPE value + * @property {number} OPTIMIZATION_TYPE_NAME=640 OPTIMIZATION_TYPE_NAME value + * @property {number} ORDER_AGENCY=150 ORDER_AGENCY value + * @property {number} ORDER_AGENCY_ID=151 ORDER_AGENCY_ID value + * @property {number} ORDER_BOOKED_CPC=152 ORDER_BOOKED_CPC value + * @property {number} ORDER_BOOKED_CPM=153 ORDER_BOOKED_CPM value + * @property {number} ORDER_DELIVERY_STATUS=231 ORDER_DELIVERY_STATUS value + * @property {number} ORDER_DELIVERY_STATUS_NAME=239 ORDER_DELIVERY_STATUS_NAME value + * @property {number} ORDER_END_DATE=154 ORDER_END_DATE value + * @property {number} ORDER_END_DATE_TIME=155 ORDER_END_DATE_TIME value + * @property {number} ORDER_EXTERNAL_ID=156 ORDER_EXTERNAL_ID value + * @property {number} ORDER_ID=7 ORDER_ID value + * @property {number} ORDER_LABELS=170 ORDER_LABELS value + * @property {number} ORDER_LABEL_IDS=171 ORDER_LABEL_IDS value + * @property {number} ORDER_LIFETIME_CLICKS=158 ORDER_LIFETIME_CLICKS value + * @property {number} ORDER_LIFETIME_IMPRESSIONS=159 ORDER_LIFETIME_IMPRESSIONS value + * @property {number} ORDER_NAME=8 ORDER_NAME value + * @property {number} ORDER_PO_NUMBER=160 ORDER_PO_NUMBER value + * @property {number} ORDER_PROGRAMMATIC=157 ORDER_PROGRAMMATIC value + * @property {number} ORDER_SALESPERSON=161 ORDER_SALESPERSON value + * @property {number} ORDER_SALESPERSON_ID=629 ORDER_SALESPERSON_ID value + * @property {number} ORDER_SECONDARY_SALESPEOPLE=164 ORDER_SECONDARY_SALESPEOPLE value + * @property {number} ORDER_SECONDARY_SALESPEOPLE_ID=165 ORDER_SECONDARY_SALESPEOPLE_ID value + * @property {number} ORDER_SECONDARY_TRAFFICKERS=166 ORDER_SECONDARY_TRAFFICKERS value + * @property {number} ORDER_SECONDARY_TRAFFICKERS_ID=167 ORDER_SECONDARY_TRAFFICKERS_ID value + * @property {number} ORDER_START_DATE=168 ORDER_START_DATE value + * @property {number} ORDER_START_DATE_TIME=169 ORDER_START_DATE_TIME value + * @property {number} ORDER_TRAFFICKER=162 ORDER_TRAFFICKER value + * @property {number} ORDER_TRAFFICKER_ID=163 ORDER_TRAFFICKER_ID value + * @property {number} ORDER_UNLIMITED_END=203 ORDER_UNLIMITED_END value + * @property {number} PAGE_PATH=511 PAGE_PATH value + * @property {number} PAGE_TITLE_AND_SCREEN_CLASS=512 PAGE_TITLE_AND_SCREEN_CLASS value + * @property {number} PAGE_TITLE_AND_SCREEN_NAME=513 PAGE_TITLE_AND_SCREEN_NAME value + * @property {number} PLACEMENT_ID=113 PLACEMENT_ID value + * @property {number} PLACEMENT_ID_ALL=144 PLACEMENT_ID_ALL value + * @property {number} PLACEMENT_NAME=114 PLACEMENT_NAME value + * @property {number} PLACEMENT_NAME_ALL=145 PLACEMENT_NAME_ALL value + * @property {number} PLACEMENT_STATUS=362 PLACEMENT_STATUS value + * @property {number} PLACEMENT_STATUS_NAME=364 PLACEMENT_STATUS_NAME value + * @property {number} PLACEMENT_STATUS_NAME_ALL=365 PLACEMENT_STATUS_NAME_ALL value + * @property {number} POSTAL_CODE_ID=455 POSTAL_CODE_ID value + * @property {number} POSTAL_CODE_NAME=456 POSTAL_CODE_NAME value + * @property {number} PPID_STATUS=406 PPID_STATUS value + * @property {number} PPID_STATUS_NAME=407 PPID_STATUS_NAME value + * @property {number} PREDICTED_VIEWABILITY_BUCKET=633 PREDICTED_VIEWABILITY_BUCKET value + * @property {number} PREDICTED_VIEWABILITY_BUCKET_NAME=634 PREDICTED_VIEWABILITY_BUCKET_NAME value + * @property {number} PRESENTED_SECURE_SIGNAL_ID=495 PRESENTED_SECURE_SIGNAL_ID value + * @property {number} PRESENTED_SECURE_SIGNAL_NAME=496 PRESENTED_SECURE_SIGNAL_NAME value + * @property {number} PRIMARY_PERSONALIZATION_ID_TYPE=408 PRIMARY_PERSONALIZATION_ID_TYPE value + * @property {number} PRIMARY_PERSONALIZATION_ID_TYPE_NAME=409 PRIMARY_PERSONALIZATION_ID_TYPE_NAME value + * @property {number} PROGRAMMATIC_BUYER_ID=240 PROGRAMMATIC_BUYER_ID value + * @property {number} PROGRAMMATIC_BUYER_NAME=241 PROGRAMMATIC_BUYER_NAME value + * @property {number} PROGRAMMATIC_CHANNEL=13 PROGRAMMATIC_CHANNEL value + * @property {number} PROGRAMMATIC_CHANNEL_NAME=14 PROGRAMMATIC_CHANNEL_NAME value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE=410 PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS=546 PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME=412 PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER=413 PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE=414 PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE=425 PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS=545 PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME=427 PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER=428 PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE=429 PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE=415 PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID=416 PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME=417 PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER=418 PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER value + * @property {number} PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE=419 PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE value + * @property {number} PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID=136 PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID value + * @property {number} PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME=137 PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME value + * @property {number} REGION_ID=457 REGION_ID value + * @property {number} REGION_NAME=458 REGION_NAME value + * @property {number} REJECTION_CLASS_CATEGORY=590 REJECTION_CLASS_CATEGORY value + * @property {number} REJECTION_CLASS_CATEGORY_NAME=591 REJECTION_CLASS_CATEGORY_NAME value + * @property {number} RENDERED_CREATIVE_SIZE=343 RENDERED_CREATIVE_SIZE value + * @property {number} REQUESTED_AD_SIZES=352 REQUESTED_AD_SIZES value + * @property {number} REQUEST_TYPE=146 REQUEST_TYPE value + * @property {number} REQUEST_TYPE_NAME=147 REQUEST_TYPE_NAME value + * @property {number} SERVER_SIDE_UNWRAPPING_ELIGIBLE=597 SERVER_SIDE_UNWRAPPING_ELIGIBLE value + * @property {number} SERVING_RESTRICTION=631 SERVING_RESTRICTION value + * @property {number} SERVING_RESTRICTION_NAME=632 SERVING_RESTRICTION_NAME value + * @property {number} SITE=387 SITE value + * @property {number} TARGETING_ID=232 TARGETING_ID value + * @property {number} TARGETING_NAME=233 TARGETING_NAME value + * @property {number} TARGETING_TYPE=385 TARGETING_TYPE value + * @property {number} TARGETING_TYPE_NAME=386 TARGETING_TYPE_NAME value + * @property {number} THIRD_PARTY_ID_STATUS=402 THIRD_PARTY_ID_STATUS value + * @property {number} THIRD_PARTY_ID_STATUS_NAME=403 THIRD_PARTY_ID_STATUS_NAME value + * @property {number} TOPICS_STATUS=504 TOPICS_STATUS value + * @property {number} TOPICS_STATUS_NAME=505 TOPICS_STATUS_NAME value + * @property {number} TOP_PRIVATE_DOMAIN=444 TOP_PRIVATE_DOMAIN value + * @property {number} TRAFFIC_SOURCE=388 TRAFFIC_SOURCE value + * @property {number} TRAFFIC_SOURCE_NAME=389 TRAFFIC_SOURCE_NAME value + * @property {number} UNIFIED_PRICING_RULE_ID=393 UNIFIED_PRICING_RULE_ID value + * @property {number} UNIFIED_PRICING_RULE_NAME=394 UNIFIED_PRICING_RULE_NAME value + * @property {number} URL=506 URL value + * @property {number} URL_ID=507 URL_ID value + * @property {number} USER_MESSAGES_ENTITLEMENT_SOURCE=635 USER_MESSAGES_ENTITLEMENT_SOURCE value + * @property {number} USER_MESSAGES_ENTITLEMENT_SOURCE_NAME=636 USER_MESSAGES_ENTITLEMENT_SOURCE_NAME value + * @property {number} USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID=637 USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID value + * @property {number} USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME=638 USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME value + * @property {number} VAST_VERSION=554 VAST_VERSION value + * @property {number} VAST_VERSION_NAME=555 VAST_VERSION_NAME value + * @property {number} VIDEO_AD_BREAK_TYPE=556 VIDEO_AD_BREAK_TYPE value + * @property {number} VIDEO_AD_BREAK_TYPE_NAME=557 VIDEO_AD_BREAK_TYPE_NAME value + * @property {number} VIDEO_AD_DURATION=450 VIDEO_AD_DURATION value + * @property {number} VIDEO_AD_FORMATS_RULE=561 VIDEO_AD_FORMATS_RULE value + * @property {number} VIDEO_AD_FORMATS_RULE_ID=560 VIDEO_AD_FORMATS_RULE_ID value + * @property {number} VIDEO_AD_REQUEST_DURATION=558 VIDEO_AD_REQUEST_DURATION value + * @property {number} VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME=751 VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME value + * @property {number} VIDEO_AD_REQUEST_DURATION_NAME=559 VIDEO_AD_REQUEST_DURATION_NAME value + * @property {number} VIDEO_AD_REQUEST_SOURCE=438 VIDEO_AD_REQUEST_SOURCE value + * @property {number} VIDEO_AD_REQUEST_SOURCE_NAME=439 VIDEO_AD_REQUEST_SOURCE_NAME value + * @property {number} VIDEO_AD_TYPE=432 VIDEO_AD_TYPE value + * @property {number} VIDEO_AD_TYPE_NAME=433 VIDEO_AD_TYPE_NAME value + * @property {number} VIDEO_CONTINUOUS_PLAY_TYPE=721 VIDEO_CONTINUOUS_PLAY_TYPE value + * @property {number} VIDEO_CONTINUOUS_PLAY_TYPE_NAME=722 VIDEO_CONTINUOUS_PLAY_TYPE_NAME value + * @property {number} VIDEO_FALLBACK_POSITION=530 VIDEO_FALLBACK_POSITION value + * @property {number} VIDEO_MEASUREMENT_SOURCE=601 VIDEO_MEASUREMENT_SOURCE value + * @property {number} VIDEO_MEASUREMENT_SOURCE_NAME=602 VIDEO_MEASUREMENT_SOURCE_NAME value + * @property {number} VIDEO_PLCMT=172 VIDEO_PLCMT value + * @property {number} VIDEO_PLCMT_NAME=173 VIDEO_PLCMT_NAME value + * @property {number} VIDEO_POSITION_IN_POD=538 VIDEO_POSITION_IN_POD value + * @property {number} VIDEO_POSITION_OF_POD=539 VIDEO_POSITION_OF_POD value + * @property {number} VIDEO_SDK_VERSION=440 VIDEO_SDK_VERSION value + * @property {number} VIDEO_SDK_VERSION_NAME=441 VIDEO_SDK_VERSION_NAME value + * @property {number} VIDEO_STITCHER_TYPE=752 VIDEO_STITCHER_TYPE value + * @property {number} VIDEO_STITCHER_TYPE_NAME=753 VIDEO_STITCHER_TYPE_NAME value + * @property {number} WEEK=5 WEEK value + * @property {number} YIELD_GROUP_BUYER_NAME=184 YIELD_GROUP_BUYER_NAME value + * @property {number} YIELD_GROUP_BUYER_TAG_NAME=627 YIELD_GROUP_BUYER_TAG_NAME value + * @property {number} YIELD_GROUP_ID=182 YIELD_GROUP_ID value + * @property {number} YIELD_GROUP_NAME=183 YIELD_GROUP_NAME value + * @property {number} YOUTUBE_AD_DURATION_BUCKET=430 YOUTUBE_AD_DURATION_BUCKET value + * @property {number} YOUTUBE_AD_DURATION_BUCKET_NAME=431 YOUTUBE_AD_DURATION_BUCKET_NAME value + * @property {number} YOUTUBE_AD_TYPE=399 YOUTUBE_AD_TYPE value + * @property {number} YOUTUBE_AD_TYPE_NAME=400 YOUTUBE_AD_TYPE_NAME value + * @property {number} LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID=10000 LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID=10001 LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID=10002 LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID=10003 LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID=10004 LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID=10005 LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID=10006 LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID=10007 LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID=10008 LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID=10009 LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID=10010 LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID=10011 LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID=10012 LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID=10013 LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID=10014 LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} LINE_ITEM_CUSTOM_FIELD_0_VALUE=11000 LINE_ITEM_CUSTOM_FIELD_0_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_1_VALUE=11001 LINE_ITEM_CUSTOM_FIELD_1_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_2_VALUE=11002 LINE_ITEM_CUSTOM_FIELD_2_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_3_VALUE=11003 LINE_ITEM_CUSTOM_FIELD_3_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_4_VALUE=11004 LINE_ITEM_CUSTOM_FIELD_4_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_5_VALUE=11005 LINE_ITEM_CUSTOM_FIELD_5_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_6_VALUE=11006 LINE_ITEM_CUSTOM_FIELD_6_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_7_VALUE=11007 LINE_ITEM_CUSTOM_FIELD_7_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_8_VALUE=11008 LINE_ITEM_CUSTOM_FIELD_8_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_9_VALUE=11009 LINE_ITEM_CUSTOM_FIELD_9_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_10_VALUE=11010 LINE_ITEM_CUSTOM_FIELD_10_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_11_VALUE=11011 LINE_ITEM_CUSTOM_FIELD_11_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_12_VALUE=11012 LINE_ITEM_CUSTOM_FIELD_12_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_13_VALUE=11013 LINE_ITEM_CUSTOM_FIELD_13_VALUE value + * @property {number} LINE_ITEM_CUSTOM_FIELD_14_VALUE=11014 LINE_ITEM_CUSTOM_FIELD_14_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_0_OPTION_ID=12000 ORDER_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_1_OPTION_ID=12001 ORDER_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_2_OPTION_ID=12002 ORDER_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_3_OPTION_ID=12003 ORDER_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_4_OPTION_ID=12004 ORDER_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_5_OPTION_ID=12005 ORDER_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_6_OPTION_ID=12006 ORDER_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_7_OPTION_ID=12007 ORDER_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_8_OPTION_ID=12008 ORDER_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_9_OPTION_ID=12009 ORDER_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_10_OPTION_ID=12010 ORDER_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_11_OPTION_ID=12011 ORDER_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_12_OPTION_ID=12012 ORDER_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_13_OPTION_ID=12013 ORDER_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_14_OPTION_ID=12014 ORDER_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} ORDER_CUSTOM_FIELD_0_VALUE=13000 ORDER_CUSTOM_FIELD_0_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_1_VALUE=13001 ORDER_CUSTOM_FIELD_1_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_2_VALUE=13002 ORDER_CUSTOM_FIELD_2_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_3_VALUE=13003 ORDER_CUSTOM_FIELD_3_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_4_VALUE=13004 ORDER_CUSTOM_FIELD_4_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_5_VALUE=13005 ORDER_CUSTOM_FIELD_5_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_6_VALUE=13006 ORDER_CUSTOM_FIELD_6_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_7_VALUE=13007 ORDER_CUSTOM_FIELD_7_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_8_VALUE=13008 ORDER_CUSTOM_FIELD_8_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_9_VALUE=13009 ORDER_CUSTOM_FIELD_9_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_10_VALUE=13010 ORDER_CUSTOM_FIELD_10_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_11_VALUE=13011 ORDER_CUSTOM_FIELD_11_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_12_VALUE=13012 ORDER_CUSTOM_FIELD_12_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_13_VALUE=13013 ORDER_CUSTOM_FIELD_13_VALUE value + * @property {number} ORDER_CUSTOM_FIELD_14_VALUE=13014 ORDER_CUSTOM_FIELD_14_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_0_OPTION_ID=14000 CREATIVE_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_1_OPTION_ID=14001 CREATIVE_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_2_OPTION_ID=14002 CREATIVE_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_3_OPTION_ID=14003 CREATIVE_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_4_OPTION_ID=14004 CREATIVE_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_5_OPTION_ID=14005 CREATIVE_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_6_OPTION_ID=14006 CREATIVE_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_7_OPTION_ID=14007 CREATIVE_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_8_OPTION_ID=14008 CREATIVE_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_9_OPTION_ID=14009 CREATIVE_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_10_OPTION_ID=14010 CREATIVE_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_11_OPTION_ID=14011 CREATIVE_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_12_OPTION_ID=14012 CREATIVE_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_13_OPTION_ID=14013 CREATIVE_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_14_OPTION_ID=14014 CREATIVE_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} CREATIVE_CUSTOM_FIELD_0_VALUE=15000 CREATIVE_CUSTOM_FIELD_0_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_1_VALUE=15001 CREATIVE_CUSTOM_FIELD_1_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_2_VALUE=15002 CREATIVE_CUSTOM_FIELD_2_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_3_VALUE=15003 CREATIVE_CUSTOM_FIELD_3_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_4_VALUE=15004 CREATIVE_CUSTOM_FIELD_4_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_5_VALUE=15005 CREATIVE_CUSTOM_FIELD_5_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_6_VALUE=15006 CREATIVE_CUSTOM_FIELD_6_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_7_VALUE=15007 CREATIVE_CUSTOM_FIELD_7_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_8_VALUE=15008 CREATIVE_CUSTOM_FIELD_8_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_9_VALUE=15009 CREATIVE_CUSTOM_FIELD_9_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_10_VALUE=15010 CREATIVE_CUSTOM_FIELD_10_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_11_VALUE=15011 CREATIVE_CUSTOM_FIELD_11_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_12_VALUE=15012 CREATIVE_CUSTOM_FIELD_12_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_13_VALUE=15013 CREATIVE_CUSTOM_FIELD_13_VALUE value + * @property {number} CREATIVE_CUSTOM_FIELD_14_VALUE=15014 CREATIVE_CUSTOM_FIELD_14_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID=16000 BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID=16001 BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID=16002 BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID=16003 BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID=16004 BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID=16005 BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID=16006 BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID=16007 BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID=16008 BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID=16009 BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID=16010 BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID=16011 BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID=16012 BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID=16013 BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID=16014 BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE=17000 BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE=17001 BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE=17002 BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE=17003 BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE=17004 BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE=17005 BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE=17006 BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE=17007 BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE=17008 BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE=17009 BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE=17010 BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE=17011 BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE=17012 BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE=17013 BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE value + * @property {number} BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE=17014 BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID=18000 BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID=18001 BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID=18002 BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID=18003 BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID=18004 BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID=18005 BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID=18006 BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID=18007 BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID=18008 BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID=18009 BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID=18010 BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID=18011 BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID=18012 BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID=18013 BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID=18014 BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE=19000 BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE=19001 BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE=19002 BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE=19003 BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE=19004 BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE=19005 BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE=19006 BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE=19007 BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE=19008 BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE=19009 BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE=19010 BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE=19011 BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE=19012 BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE=19013 BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE value + * @property {number} BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE=19014 BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID=20000 BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID=20001 BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID=20002 BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID=20003 BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID=20004 BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID=20005 BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID=20006 BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID=20007 BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID=20008 BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID=20009 BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID=20010 BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID=20011 BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID=20012 BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID=20013 BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID=20014 BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE=21000 BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE=21001 BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE=21002 BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE=21003 BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE=21004 BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE=21005 BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE=21006 BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE=21007 BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE=21008 BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE=21009 BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE=21010 BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE=21011 BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE=21012 BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE=21013 BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE value + * @property {number} BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE=21014 BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE value + * @property {number} CUSTOM_DIMENSION_0_VALUE_ID=100000 CUSTOM_DIMENSION_0_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_1_VALUE_ID=100001 CUSTOM_DIMENSION_1_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_2_VALUE_ID=100002 CUSTOM_DIMENSION_2_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_3_VALUE_ID=100003 CUSTOM_DIMENSION_3_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_4_VALUE_ID=100004 CUSTOM_DIMENSION_4_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_5_VALUE_ID=100005 CUSTOM_DIMENSION_5_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_6_VALUE_ID=100006 CUSTOM_DIMENSION_6_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_7_VALUE_ID=100007 CUSTOM_DIMENSION_7_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_8_VALUE_ID=100008 CUSTOM_DIMENSION_8_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_9_VALUE_ID=100009 CUSTOM_DIMENSION_9_VALUE_ID value + * @property {number} CUSTOM_DIMENSION_0_VALUE=101000 CUSTOM_DIMENSION_0_VALUE value + * @property {number} CUSTOM_DIMENSION_1_VALUE=101001 CUSTOM_DIMENSION_1_VALUE value + * @property {number} CUSTOM_DIMENSION_2_VALUE=101002 CUSTOM_DIMENSION_2_VALUE value + * @property {number} CUSTOM_DIMENSION_3_VALUE=101003 CUSTOM_DIMENSION_3_VALUE value + * @property {number} CUSTOM_DIMENSION_4_VALUE=101004 CUSTOM_DIMENSION_4_VALUE value + * @property {number} CUSTOM_DIMENSION_5_VALUE=101005 CUSTOM_DIMENSION_5_VALUE value + * @property {number} CUSTOM_DIMENSION_6_VALUE=101006 CUSTOM_DIMENSION_6_VALUE value + * @property {number} CUSTOM_DIMENSION_7_VALUE=101007 CUSTOM_DIMENSION_7_VALUE value + * @property {number} CUSTOM_DIMENSION_8_VALUE=101008 CUSTOM_DIMENSION_8_VALUE value + * @property {number} CUSTOM_DIMENSION_9_VALUE=101009 CUSTOM_DIMENSION_9_VALUE value + */ + ReportDefinition.Dimension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIMENSION_UNSPECIFIED"] = 0; + values[valuesById[575] = "ACTIVE_VIEW_MEASUREMENT_SOURCE"] = 575; + values[valuesById[576] = "ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME"] = 576; + values[valuesById[475] = "ADVERTISER_CREDIT_STATUS"] = 475; + values[valuesById[476] = "ADVERTISER_CREDIT_STATUS_NAME"] = 476; + values[valuesById[242] = "ADVERTISER_DOMAIN_NAME"] = 242; + values[valuesById[228] = "ADVERTISER_EXTERNAL_ID"] = 228; + values[valuesById[131] = "ADVERTISER_ID"] = 131; + values[valuesById[230] = "ADVERTISER_LABELS"] = 230; + values[valuesById[229] = "ADVERTISER_LABEL_IDS"] = 229; + values[valuesById[132] = "ADVERTISER_NAME"] = 132; + values[valuesById[227] = "ADVERTISER_PRIMARY_CONTACT"] = 227; + values[valuesById[471] = "ADVERTISER_STATUS"] = 471; + values[valuesById[472] = "ADVERTISER_STATUS_NAME"] = 472; + values[valuesById[473] = "ADVERTISER_TYPE"] = 473; + values[valuesById[474] = "ADVERTISER_TYPE_NAME"] = 474; + values[valuesById[580] = "ADVERTISER_VERTICAL"] = 580; + values[valuesById[499] = "ADX_PRODUCT"] = 499; + values[valuesById[500] = "ADX_PRODUCT_NAME"] = 500; + values[valuesById[641] = "AD_EXPERIENCES_TYPE"] = 641; + values[valuesById[642] = "AD_EXPERIENCES_TYPE_NAME"] = 642; + values[valuesById[390] = "AD_LOCATION"] = 390; + values[valuesById[391] = "AD_LOCATION_NAME"] = 391; + values[valuesById[620] = "AD_TECHNOLOGY_PROVIDER_DOMAIN"] = 620; + values[valuesById[621] = "AD_TECHNOLOGY_PROVIDER_ID"] = 621; + values[valuesById[622] = "AD_TECHNOLOGY_PROVIDER_NAME"] = 622; + values[valuesById[497] = "AD_TYPE"] = 497; + values[valuesById[498] = "AD_TYPE_NAME"] = 498; + values[valuesById[64] = "AD_UNIT_CODE"] = 64; + values[valuesById[65] = "AD_UNIT_CODE_LEVEL_1"] = 65; + values[valuesById[74] = "AD_UNIT_CODE_LEVEL_10"] = 74; + values[valuesById[75] = "AD_UNIT_CODE_LEVEL_11"] = 75; + values[valuesById[76] = "AD_UNIT_CODE_LEVEL_12"] = 76; + values[valuesById[77] = "AD_UNIT_CODE_LEVEL_13"] = 77; + values[valuesById[78] = "AD_UNIT_CODE_LEVEL_14"] = 78; + values[valuesById[79] = "AD_UNIT_CODE_LEVEL_15"] = 79; + values[valuesById[80] = "AD_UNIT_CODE_LEVEL_16"] = 80; + values[valuesById[66] = "AD_UNIT_CODE_LEVEL_2"] = 66; + values[valuesById[67] = "AD_UNIT_CODE_LEVEL_3"] = 67; + values[valuesById[68] = "AD_UNIT_CODE_LEVEL_4"] = 68; + values[valuesById[69] = "AD_UNIT_CODE_LEVEL_5"] = 69; + values[valuesById[70] = "AD_UNIT_CODE_LEVEL_6"] = 70; + values[valuesById[71] = "AD_UNIT_CODE_LEVEL_7"] = 71; + values[valuesById[72] = "AD_UNIT_CODE_LEVEL_8"] = 72; + values[valuesById[73] = "AD_UNIT_CODE_LEVEL_9"] = 73; + values[valuesById[25] = "AD_UNIT_ID"] = 25; + values[valuesById[27] = "AD_UNIT_ID_ALL_LEVEL"] = 27; + values[valuesById[30] = "AD_UNIT_ID_LEVEL_1"] = 30; + values[valuesById[48] = "AD_UNIT_ID_LEVEL_10"] = 48; + values[valuesById[50] = "AD_UNIT_ID_LEVEL_11"] = 50; + values[valuesById[52] = "AD_UNIT_ID_LEVEL_12"] = 52; + values[valuesById[54] = "AD_UNIT_ID_LEVEL_13"] = 54; + values[valuesById[56] = "AD_UNIT_ID_LEVEL_14"] = 56; + values[valuesById[58] = "AD_UNIT_ID_LEVEL_15"] = 58; + values[valuesById[60] = "AD_UNIT_ID_LEVEL_16"] = 60; + values[valuesById[32] = "AD_UNIT_ID_LEVEL_2"] = 32; + values[valuesById[34] = "AD_UNIT_ID_LEVEL_3"] = 34; + values[valuesById[36] = "AD_UNIT_ID_LEVEL_4"] = 36; + values[valuesById[38] = "AD_UNIT_ID_LEVEL_5"] = 38; + values[valuesById[40] = "AD_UNIT_ID_LEVEL_6"] = 40; + values[valuesById[42] = "AD_UNIT_ID_LEVEL_7"] = 42; + values[valuesById[44] = "AD_UNIT_ID_LEVEL_8"] = 44; + values[valuesById[46] = "AD_UNIT_ID_LEVEL_9"] = 46; + values[valuesById[142] = "AD_UNIT_ID_TOP_LEVEL"] = 142; + values[valuesById[26] = "AD_UNIT_NAME"] = 26; + values[valuesById[29] = "AD_UNIT_NAME_ALL_LEVEL"] = 29; + values[valuesById[31] = "AD_UNIT_NAME_LEVEL_1"] = 31; + values[valuesById[49] = "AD_UNIT_NAME_LEVEL_10"] = 49; + values[valuesById[51] = "AD_UNIT_NAME_LEVEL_11"] = 51; + values[valuesById[53] = "AD_UNIT_NAME_LEVEL_12"] = 53; + values[valuesById[55] = "AD_UNIT_NAME_LEVEL_13"] = 55; + values[valuesById[57] = "AD_UNIT_NAME_LEVEL_14"] = 57; + values[valuesById[59] = "AD_UNIT_NAME_LEVEL_15"] = 59; + values[valuesById[61] = "AD_UNIT_NAME_LEVEL_16"] = 61; + values[valuesById[33] = "AD_UNIT_NAME_LEVEL_2"] = 33; + values[valuesById[35] = "AD_UNIT_NAME_LEVEL_3"] = 35; + values[valuesById[37] = "AD_UNIT_NAME_LEVEL_4"] = 37; + values[valuesById[39] = "AD_UNIT_NAME_LEVEL_5"] = 39; + values[valuesById[41] = "AD_UNIT_NAME_LEVEL_6"] = 41; + values[valuesById[43] = "AD_UNIT_NAME_LEVEL_7"] = 43; + values[valuesById[45] = "AD_UNIT_NAME_LEVEL_8"] = 45; + values[valuesById[47] = "AD_UNIT_NAME_LEVEL_9"] = 47; + values[valuesById[143] = "AD_UNIT_NAME_TOP_LEVEL"] = 143; + values[valuesById[63] = "AD_UNIT_REWARD_AMOUNT"] = 63; + values[valuesById[62] = "AD_UNIT_REWARD_TYPE"] = 62; + values[valuesById[206] = "AD_UNIT_STATUS"] = 206; + values[valuesById[207] = "AD_UNIT_STATUS_NAME"] = 207; + values[valuesById[565] = "AGENCY_LEVEL_1_ID"] = 565; + values[valuesById[566] = "AGENCY_LEVEL_1_NAME"] = 566; + values[valuesById[567] = "AGENCY_LEVEL_2_ID"] = 567; + values[valuesById[568] = "AGENCY_LEVEL_2_NAME"] = 568; + values[valuesById[569] = "AGENCY_LEVEL_3_ID"] = 569; + values[valuesById[570] = "AGENCY_LEVEL_3_NAME"] = 570; + values[valuesById[508] = "AGE_BRACKET"] = 508; + values[valuesById[582] = "AGE_BRACKET_NAME"] = 582; + values[valuesById[442] = "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS"] = 442; + values[valuesById[443] = "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME"] = 443; + values[valuesById[392] = "APP_VERSION"] = 392; + values[valuesById[579] = "AUCTION_PACKAGE_DEAL"] = 579; + values[valuesById[571] = "AUCTION_PACKAGE_DEAL_ID"] = 571; + values[valuesById[584] = "AUDIENCE_SEGMENT_ID_TARGETED"] = 584; + values[valuesById[585] = "AUDIENCE_SEGMENT_TARGETED"] = 585; + values[valuesById[421] = "AUTO_REFRESHED_TRAFFIC"] = 421; + values[valuesById[422] = "AUTO_REFRESHED_TRAFFIC_NAME"] = 422; + values[valuesById[493] = "BIDDER_ENCRYPTED_ID"] = 493; + values[valuesById[494] = "BIDDER_NAME"] = 494; + values[valuesById[679] = "BID_RANGE"] = 679; + values[valuesById[599] = "BID_REJECTION_REASON"] = 599; + values[valuesById[600] = "BID_REJECTION_REASON_NAME"] = 600; + values[valuesById[383] = "BRANDING_TYPE"] = 383; + values[valuesById[384] = "BRANDING_TYPE_NAME"] = 384; + values[valuesById[119] = "BROWSER_CATEGORY"] = 119; + values[valuesById[120] = "BROWSER_CATEGORY_NAME"] = 120; + values[valuesById[235] = "BROWSER_ID"] = 235; + values[valuesById[236] = "BROWSER_NAME"] = 236; + values[valuesById[448] = "BUYER_NETWORK_ID"] = 448; + values[valuesById[449] = "BUYER_NETWORK_NAME"] = 449; + values[valuesById[588] = "CALLOUT_STATUS_CATEGORY"] = 588; + values[valuesById[589] = "CALLOUT_STATUS_CATEGORY_NAME"] = 589; + values[valuesById[369] = "CARRIER_ID"] = 369; + values[valuesById[368] = "CARRIER_NAME"] = 368; + values[valuesById[501] = "CHANNEL"] = 501; + values[valuesById[542] = "CHILD_NETWORK_CODE"] = 542; + values[valuesById[544] = "CHILD_NETWORK_ID"] = 544; + values[valuesById[543] = "CHILD_PARTNER_NAME"] = 543; + values[valuesById[459] = "CITY_ID"] = 459; + values[valuesById[452] = "CITY_NAME"] = 452; + values[valuesById[133] = "CLASSIFIED_ADVERTISER_ID"] = 133; + values[valuesById[134] = "CLASSIFIED_ADVERTISER_NAME"] = 134; + values[valuesById[243] = "CLASSIFIED_BRAND_ID"] = 243; + values[valuesById[244] = "CLASSIFIED_BRAND_NAME"] = 244; + values[valuesById[643] = "CONTENT_CMS_NAME"] = 643; + values[valuesById[644] = "CONTENT_CMS_VIDEO_ID"] = 644; + values[valuesById[246] = "CONTENT_ID"] = 246; + values[valuesById[731] = "CONTENT_MAPPING_PRESENCE"] = 731; + values[valuesById[732] = "CONTENT_MAPPING_PRESENCE_NAME"] = 732; + values[valuesById[247] = "CONTENT_NAME"] = 247; + values[valuesById[469] = "CONTINENT"] = 469; + values[valuesById[470] = "CONTINENT_NAME"] = 470; + values[valuesById[466] = "COUNTRY_CODE"] = 466; + values[valuesById[11] = "COUNTRY_ID"] = 11; + values[valuesById[12] = "COUNTRY_NAME"] = 12; + values[valuesById[366] = "CREATIVE_BILLING_TYPE"] = 366; + values[valuesById[367] = "CREATIVE_BILLING_TYPE_NAME"] = 367; + values[valuesById[174] = "CREATIVE_CLICK_THROUGH_URL"] = 174; + values[valuesById[138] = "CREATIVE_ID"] = 138; + values[valuesById[139] = "CREATIVE_NAME"] = 139; + values[valuesById[711] = "CREATIVE_POLICIES_FILTERING"] = 711; + values[valuesById[712] = "CREATIVE_POLICIES_FILTERING_NAME"] = 712; + values[valuesById[704] = "CREATIVE_PROTECTIONS_FILTERING"] = 704; + values[valuesById[705] = "CREATIVE_PROTECTIONS_FILTERING_NAME"] = 705; + values[valuesById[686] = "CREATIVE_SET_ROLE_TYPE"] = 686; + values[valuesById[687] = "CREATIVE_SET_ROLE_TYPE_NAME"] = 687; + values[valuesById[148] = "CREATIVE_TECHNOLOGY"] = 148; + values[valuesById[149] = "CREATIVE_TECHNOLOGY_NAME"] = 149; + values[valuesById[361] = "CREATIVE_THIRD_PARTY_VENDOR"] = 361; + values[valuesById[344] = "CREATIVE_TYPE"] = 344; + values[valuesById[345] = "CREATIVE_TYPE_NAME"] = 345; + values[valuesById[706] = "CREATIVE_VENDOR_ID"] = 706; + values[valuesById[707] = "CREATIVE_VENDOR_NAME"] = 707; + values[valuesById[562] = "CREATIVE_VIDEO_REDIRECT_THIRD_PARTY"] = 562; + values[valuesById[572] = "CURATOR_ID"] = 572; + values[valuesById[573] = "CURATOR_NAME"] = 573; + values[valuesById[737] = "CUSTOM_EVENT_ID"] = 737; + values[valuesById[735] = "CUSTOM_EVENT_NAME"] = 735; + values[valuesById[736] = "CUSTOM_EVENT_TYPE"] = 736; + values[valuesById[738] = "CUSTOM_EVENT_TYPE_NAME"] = 738; + values[valuesById[423] = "CUSTOM_SPOT_ID"] = 423; + values[valuesById[424] = "CUSTOM_SPOT_NAME"] = 424; + values[valuesById[3] = "DATE"] = 3; + values[valuesById[4] = "DAY_OF_WEEK"] = 4; + values[valuesById[240] = "DEAL_BUYER_ID"] = 240; + values[valuesById[241] = "DEAL_BUYER_NAME"] = 241; + values[valuesById[436] = "DEAL_ID"] = 436; + values[valuesById[437] = "DEAL_NAME"] = 437; + values[valuesById[309] = "DELIVERED_SECURE_SIGNAL_ID"] = 309; + values[valuesById[310] = "DELIVERED_SECURE_SIGNAL_NAME"] = 310; + values[valuesById[9] = "DEMAND_CHANNEL"] = 9; + values[valuesById[10] = "DEMAND_CHANNEL_NAME"] = 10; + values[valuesById[592] = "DEMAND_SOURCE"] = 592; + values[valuesById[593] = "DEMAND_SOURCE_NAME"] = 593; + values[valuesById[22] = "DEMAND_SUBCHANNEL"] = 22; + values[valuesById[23] = "DEMAND_SUBCHANNEL_NAME"] = 23; + values[valuesById[226] = "DEVICE"] = 226; + values[valuesById[15] = "DEVICE_CATEGORY"] = 15; + values[valuesById[16] = "DEVICE_CATEGORY_NAME"] = 16; + values[valuesById[525] = "DEVICE_MANUFACTURER_ID"] = 525; + values[valuesById[526] = "DEVICE_MANUFACTURER_NAME"] = 526; + values[valuesById[527] = "DEVICE_MODEL_ID"] = 527; + values[valuesById[528] = "DEVICE_MODEL_NAME"] = 528; + values[valuesById[225] = "DEVICE_NAME"] = 225; + values[valuesById[564] = "DSP_SEAT_ID"] = 564; + values[valuesById[502] = "DYNAMIC_ALLOCATION_TYPE"] = 502; + values[valuesById[503] = "DYNAMIC_ALLOCATION_TYPE_NAME"] = 503; + values[valuesById[623] = "ESP_DELIVERY"] = 623; + values[valuesById[624] = "ESP_DELIVERY_NAME"] = 624; + values[valuesById[625] = "ESP_PRESENCE"] = 625; + values[valuesById[626] = "ESP_PRESENCE_NAME"] = 626; + values[valuesById[715] = "EXCHANGE_BIDDING_DEAL_ID"] = 715; + values[valuesById[714] = "EXCHANGE_BIDDING_DEAL_TYPE"] = 714; + values[valuesById[723] = "EXCHANGE_BIDDING_DEAL_TYPE_NAME"] = 723; + values[valuesById[185] = "EXCHANGE_THIRD_PARTY_COMPANY_ID"] = 185; + values[valuesById[186] = "EXCHANGE_THIRD_PARTY_COMPANY_NAME"] = 186; + values[valuesById[248] = "FIRST_LOOK_PRICING_RULE_ID"] = 248; + values[valuesById[249] = "FIRST_LOOK_PRICING_RULE_NAME"] = 249; + values[valuesById[404] = "FIRST_PARTY_ID_STATUS"] = 404; + values[valuesById[405] = "FIRST_PARTY_ID_STATUS_NAME"] = 405; + values[valuesById[509] = "GENDER"] = 509; + values[valuesById[583] = "GENDER_NAME"] = 583; + values[valuesById[519] = "GOOGLE_ANALYTICS_STREAM_ID"] = 519; + values[valuesById[520] = "GOOGLE_ANALYTICS_STREAM_NAME"] = 520; + values[valuesById[659] = "HBT_YIELD_PARTNER_ID"] = 659; + values[valuesById[660] = "HBT_YIELD_PARTNER_NAME"] = 660; + values[valuesById[718] = "HEADER_BIDDER_INTEGRATION_TYPE"] = 718; + values[valuesById[719] = "HEADER_BIDDER_INTEGRATION_TYPE_NAME"] = 719; + values[valuesById[100] = "HOUR"] = 100; + values[valuesById[577] = "IMPRESSION_COUNTING_METHOD"] = 577; + values[valuesById[578] = "IMPRESSION_COUNTING_METHOD_NAME"] = 578; + values[valuesById[223] = "INTERACTION_TYPE"] = 223; + values[valuesById[224] = "INTERACTION_TYPE_NAME"] = 224; + values[valuesById[510] = "INTEREST"] = 510; + values[valuesById[17] = "INVENTORY_FORMAT"] = 17; + values[valuesById[18] = "INVENTORY_FORMAT_NAME"] = 18; + values[valuesById[648] = "INVENTORY_SHARE_ASSIGNMENT_ID"] = 648; + values[valuesById[649] = "INVENTORY_SHARE_ASSIGNMENT_NAME"] = 649; + values[valuesById[603] = "INVENTORY_SHARE_OUTCOME"] = 603; + values[valuesById[604] = "INVENTORY_SHARE_OUTCOME_NAME"] = 604; + values[valuesById[652] = "INVENTORY_SHARE_PARTNER_AD_SERVER"] = 652; + values[valuesById[653] = "INVENTORY_SHARE_PARTNER_AD_SERVER_NAME"] = 653; + values[valuesById[654] = "INVENTORY_SHARE_TARGET_SHARE_PERCENT"] = 654; + values[valuesById[650] = "INVENTORY_SHARE_TYPE"] = 650; + values[valuesById[651] = "INVENTORY_SHARE_TYPE_NAME"] = 651; + values[valuesById[19] = "INVENTORY_TYPE"] = 19; + values[valuesById[20] = "INVENTORY_TYPE_NAME"] = 20; + values[valuesById[382] = "IS_ADX_DIRECT"] = 382; + values[valuesById[574] = "IS_CURATION_TARGETED"] = 574; + values[valuesById[464] = "IS_DROPPED"] = 464; + values[valuesById[401] = "IS_FIRST_LOOK_DEAL"] = 401; + values[valuesById[214] = "KEY_VALUES_ID"] = 214; + values[valuesById[215] = "KEY_VALUES_NAME"] = 215; + values[valuesById[663] = "LINE_ITEM_AGENCY"] = 663; + values[valuesById[188] = "LINE_ITEM_ARCHIVED"] = 188; + values[valuesById[204] = "LINE_ITEM_COMPANION_DELIVERY_OPTION"] = 204; + values[valuesById[205] = "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME"] = 205; + values[valuesById[250] = "LINE_ITEM_COMPUTED_STATUS"] = 250; + values[valuesById[251] = "LINE_ITEM_COMPUTED_STATUS_NAME"] = 251; + values[valuesById[92] = "LINE_ITEM_CONTRACTED_QUANTITY"] = 92; + values[valuesById[85] = "LINE_ITEM_COST_PER_UNIT"] = 85; + values[valuesById[212] = "LINE_ITEM_COST_TYPE"] = 212; + values[valuesById[213] = "LINE_ITEM_COST_TYPE_NAME"] = 213; + values[valuesById[176] = "LINE_ITEM_CREATIVE_END_DATE"] = 176; + values[valuesById[189] = "LINE_ITEM_CREATIVE_ROTATION_TYPE"] = 189; + values[valuesById[190] = "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME"] = 190; + values[valuesById[175] = "LINE_ITEM_CREATIVE_START_DATE"] = 175; + values[valuesById[180] = "LINE_ITEM_CURRENCY_CODE"] = 180; + values[valuesById[87] = "LINE_ITEM_DELIVERY_INDICATOR"] = 87; + values[valuesById[191] = "LINE_ITEM_DELIVERY_RATE_TYPE"] = 191; + values[valuesById[192] = "LINE_ITEM_DELIVERY_RATE_TYPE_NAME"] = 192; + values[valuesById[195] = "LINE_ITEM_DISCOUNT_ABSOLUTE"] = 195; + values[valuesById[196] = "LINE_ITEM_DISCOUNT_PERCENTAGE"] = 196; + values[valuesById[81] = "LINE_ITEM_END_DATE"] = 81; + values[valuesById[83] = "LINE_ITEM_END_DATE_TIME"] = 83; + values[valuesById[201] = "LINE_ITEM_ENVIRONMENT_TYPE"] = 201; + values[valuesById[202] = "LINE_ITEM_ENVIRONMENT_TYPE_NAME"] = 202; + values[valuesById[97] = "LINE_ITEM_EXTERNAL_DEAL_ID"] = 97; + values[valuesById[86] = "LINE_ITEM_EXTERNAL_ID"] = 86; + values[valuesById[256] = "LINE_ITEM_FREQUENCY_CAP"] = 256; + values[valuesById[1] = "LINE_ITEM_ID"] = 1; + values[valuesById[667] = "LINE_ITEM_LABELS"] = 667; + values[valuesById[665] = "LINE_ITEM_LABEL_IDS"] = 665; + values[valuesById[181] = "LINE_ITEM_LAST_MODIFIED_BY_APP"] = 181; + values[valuesById[95] = "LINE_ITEM_LIFETIME_CLICKS"] = 95; + values[valuesById[94] = "LINE_ITEM_LIFETIME_IMPRESSIONS"] = 94; + values[valuesById[96] = "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS"] = 96; + values[valuesById[89] = "LINE_ITEM_MAKEGOOD"] = 89; + values[valuesById[2] = "LINE_ITEM_NAME"] = 2; + values[valuesById[98] = "LINE_ITEM_NON_CPD_BOOKED_REVENUE"] = 98; + values[valuesById[90] = "LINE_ITEM_OPTIMIZABLE"] = 90; + values[valuesById[669] = "LINE_ITEM_PO_NUMBER"] = 669; + values[valuesById[210] = "LINE_ITEM_PRIMARY_GOAL_TYPE"] = 210; + values[valuesById[211] = "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME"] = 211; + values[valuesById[93] = "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE"] = 93; + values[valuesById[396] = "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE"] = 396; + values[valuesById[208] = "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE"] = 208; + values[valuesById[209] = "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME"] = 209; + values[valuesById[24] = "LINE_ITEM_PRIORITY"] = 24; + values[valuesById[304] = "LINE_ITEM_RESERVATION_STATUS"] = 304; + values[valuesById[305] = "LINE_ITEM_RESERVATION_STATUS_NAME"] = 305; + values[valuesById[671] = "LINE_ITEM_SALESPERSON"] = 671; + values[valuesById[673] = "LINE_ITEM_SECONDARY_SALESPEOPLE"] = 673; + values[valuesById[675] = "LINE_ITEM_SECONDARY_TRAFFICKERS"] = 675; + values[valuesById[82] = "LINE_ITEM_START_DATE"] = 82; + values[valuesById[84] = "LINE_ITEM_START_DATE_TIME"] = 84; + values[valuesById[677] = "LINE_ITEM_TRAFFICKER"] = 677; + values[valuesById[193] = "LINE_ITEM_TYPE"] = 193; + values[valuesById[194] = "LINE_ITEM_TYPE_NAME"] = 194; + values[valuesById[187] = "LINE_ITEM_UNLIMITED_END"] = 187; + values[valuesById[88] = "LINE_ITEM_VALUE_COST_PER_UNIT"] = 88; + values[valuesById[179] = "LINE_ITEM_WEB_PROPERTY_CODE"] = 179; + values[valuesById[140] = "MASTER_COMPANION_CREATIVE_ID"] = 140; + values[valuesById[141] = "MASTER_COMPANION_CREATIVE_NAME"] = 141; + values[valuesById[701] = "MEDIATION_TYPE"] = 701; + values[valuesById[754] = "MEDIATION_TYPE_NAME"] = 754; + values[valuesById[661] = "MEDIATION_YIELD_PARTNER_ID"] = 661; + values[valuesById[662] = "MEDIATION_YIELD_PARTNER_NAME"] = 662; + values[valuesById[453] = "METRO_ID"] = 453; + values[valuesById[454] = "METRO_NAME"] = 454; + values[valuesById[128] = "MOBILE_APP_FREE"] = 128; + values[valuesById[129] = "MOBILE_APP_ICON_URL"] = 129; + values[valuesById[123] = "MOBILE_APP_ID"] = 123; + values[valuesById[127] = "MOBILE_APP_NAME"] = 127; + values[valuesById[311] = "MOBILE_APP_OWNERSHIP_STATUS"] = 311; + values[valuesById[312] = "MOBILE_APP_OWNERSHIP_STATUS_NAME"] = 312; + values[valuesById[125] = "MOBILE_APP_STORE"] = 125; + values[valuesById[245] = "MOBILE_APP_STORE_NAME"] = 245; + values[valuesById[99] = "MOBILE_INVENTORY_TYPE"] = 99; + values[valuesById[21] = "MOBILE_INVENTORY_TYPE_NAME"] = 21; + values[valuesById[646] = "MOBILE_RENDERING_SDK"] = 646; + values[valuesById[647] = "MOBILE_RENDERING_SDK_NAME"] = 647; + values[valuesById[692] = "MOBILE_SDK_MAJOR_VERSION"] = 692; + values[valuesById[693] = "MOBILE_SDK_MINOR_VERSION"] = 693; + values[valuesById[130] = "MOBILE_SDK_VERSION_NAME"] = 130; + values[valuesById[6] = "MONTH_YEAR"] = 6; + values[valuesById[255] = "NATIVE_AD_FORMAT_ID"] = 255; + values[valuesById[254] = "NATIVE_AD_FORMAT_NAME"] = 254; + values[valuesById[253] = "NATIVE_STYLE_ID"] = 253; + values[valuesById[252] = "NATIVE_STYLE_NAME"] = 252; + values[valuesById[586] = "NO_FILL_REASON_CATEGORY"] = 586; + values[valuesById[587] = "NO_FILL_REASON_CATEGORY_NAME"] = 587; + values[valuesById[117] = "OPERATING_SYSTEM_CATEGORY"] = 117; + values[valuesById[118] = "OPERATING_SYSTEM_CATEGORY_NAME"] = 118; + values[valuesById[238] = "OPERATING_SYSTEM_VERSION_ID"] = 238; + values[valuesById[237] = "OPERATING_SYSTEM_VERSION_NAME"] = 237; + values[valuesById[639] = "OPTIMIZATION_TYPE"] = 639; + values[valuesById[640] = "OPTIMIZATION_TYPE_NAME"] = 640; + values[valuesById[150] = "ORDER_AGENCY"] = 150; + values[valuesById[151] = "ORDER_AGENCY_ID"] = 151; + values[valuesById[152] = "ORDER_BOOKED_CPC"] = 152; + values[valuesById[153] = "ORDER_BOOKED_CPM"] = 153; + values[valuesById[231] = "ORDER_DELIVERY_STATUS"] = 231; + values[valuesById[239] = "ORDER_DELIVERY_STATUS_NAME"] = 239; + values[valuesById[154] = "ORDER_END_DATE"] = 154; + values[valuesById[155] = "ORDER_END_DATE_TIME"] = 155; + values[valuesById[156] = "ORDER_EXTERNAL_ID"] = 156; + values[valuesById[7] = "ORDER_ID"] = 7; + values[valuesById[170] = "ORDER_LABELS"] = 170; + values[valuesById[171] = "ORDER_LABEL_IDS"] = 171; + values[valuesById[158] = "ORDER_LIFETIME_CLICKS"] = 158; + values[valuesById[159] = "ORDER_LIFETIME_IMPRESSIONS"] = 159; + values[valuesById[8] = "ORDER_NAME"] = 8; + values[valuesById[160] = "ORDER_PO_NUMBER"] = 160; + values[valuesById[157] = "ORDER_PROGRAMMATIC"] = 157; + values[valuesById[161] = "ORDER_SALESPERSON"] = 161; + values[valuesById[629] = "ORDER_SALESPERSON_ID"] = 629; + values[valuesById[164] = "ORDER_SECONDARY_SALESPEOPLE"] = 164; + values[valuesById[165] = "ORDER_SECONDARY_SALESPEOPLE_ID"] = 165; + values[valuesById[166] = "ORDER_SECONDARY_TRAFFICKERS"] = 166; + values[valuesById[167] = "ORDER_SECONDARY_TRAFFICKERS_ID"] = 167; + values[valuesById[168] = "ORDER_START_DATE"] = 168; + values[valuesById[169] = "ORDER_START_DATE_TIME"] = 169; + values[valuesById[162] = "ORDER_TRAFFICKER"] = 162; + values[valuesById[163] = "ORDER_TRAFFICKER_ID"] = 163; + values[valuesById[203] = "ORDER_UNLIMITED_END"] = 203; + values[valuesById[511] = "PAGE_PATH"] = 511; + values[valuesById[512] = "PAGE_TITLE_AND_SCREEN_CLASS"] = 512; + values[valuesById[513] = "PAGE_TITLE_AND_SCREEN_NAME"] = 513; + values[valuesById[113] = "PLACEMENT_ID"] = 113; + values[valuesById[144] = "PLACEMENT_ID_ALL"] = 144; + values[valuesById[114] = "PLACEMENT_NAME"] = 114; + values[valuesById[145] = "PLACEMENT_NAME_ALL"] = 145; + values[valuesById[362] = "PLACEMENT_STATUS"] = 362; + values[valuesById[364] = "PLACEMENT_STATUS_NAME"] = 364; + values[valuesById[365] = "PLACEMENT_STATUS_NAME_ALL"] = 365; + values[valuesById[455] = "POSTAL_CODE_ID"] = 455; + values[valuesById[456] = "POSTAL_CODE_NAME"] = 456; + values[valuesById[406] = "PPID_STATUS"] = 406; + values[valuesById[407] = "PPID_STATUS_NAME"] = 407; + values[valuesById[633] = "PREDICTED_VIEWABILITY_BUCKET"] = 633; + values[valuesById[634] = "PREDICTED_VIEWABILITY_BUCKET_NAME"] = 634; + values[valuesById[495] = "PRESENTED_SECURE_SIGNAL_ID"] = 495; + values[valuesById[496] = "PRESENTED_SECURE_SIGNAL_NAME"] = 496; + values[valuesById[408] = "PRIMARY_PERSONALIZATION_ID_TYPE"] = 408; + values[valuesById[409] = "PRIMARY_PERSONALIZATION_ID_TYPE_NAME"] = 409; + values["PROGRAMMATIC_BUYER_ID"] = 240; + values["PROGRAMMATIC_BUYER_NAME"] = 241; + values[valuesById[13] = "PROGRAMMATIC_CHANNEL"] = 13; + values[valuesById[14] = "PROGRAMMATIC_CHANNEL_NAME"] = 14; + values[valuesById[410] = "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE"] = 410; + values[valuesById[546] = "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS"] = 546; + values[valuesById[412] = "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME"] = 412; + values[valuesById[413] = "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER"] = 413; + values[valuesById[414] = "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE"] = 414; + values[valuesById[425] = "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE"] = 425; + values[valuesById[545] = "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS"] = 545; + values[valuesById[427] = "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME"] = 427; + values[valuesById[428] = "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER"] = 428; + values[valuesById[429] = "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE"] = 429; + values[valuesById[415] = "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE"] = 415; + values[valuesById[416] = "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID"] = 416; + values[valuesById[417] = "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME"] = 417; + values[valuesById[418] = "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER"] = 418; + values[valuesById[419] = "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE"] = 419; + values[valuesById[136] = "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID"] = 136; + values[valuesById[137] = "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME"] = 137; + values[valuesById[457] = "REGION_ID"] = 457; + values[valuesById[458] = "REGION_NAME"] = 458; + values[valuesById[590] = "REJECTION_CLASS_CATEGORY"] = 590; + values[valuesById[591] = "REJECTION_CLASS_CATEGORY_NAME"] = 591; + values[valuesById[343] = "RENDERED_CREATIVE_SIZE"] = 343; + values[valuesById[352] = "REQUESTED_AD_SIZES"] = 352; + values[valuesById[146] = "REQUEST_TYPE"] = 146; + values[valuesById[147] = "REQUEST_TYPE_NAME"] = 147; + values[valuesById[597] = "SERVER_SIDE_UNWRAPPING_ELIGIBLE"] = 597; + values[valuesById[631] = "SERVING_RESTRICTION"] = 631; + values[valuesById[632] = "SERVING_RESTRICTION_NAME"] = 632; + values[valuesById[387] = "SITE"] = 387; + values[valuesById[232] = "TARGETING_ID"] = 232; + values[valuesById[233] = "TARGETING_NAME"] = 233; + values[valuesById[385] = "TARGETING_TYPE"] = 385; + values[valuesById[386] = "TARGETING_TYPE_NAME"] = 386; + values[valuesById[402] = "THIRD_PARTY_ID_STATUS"] = 402; + values[valuesById[403] = "THIRD_PARTY_ID_STATUS_NAME"] = 403; + values[valuesById[504] = "TOPICS_STATUS"] = 504; + values[valuesById[505] = "TOPICS_STATUS_NAME"] = 505; + values[valuesById[444] = "TOP_PRIVATE_DOMAIN"] = 444; + values[valuesById[388] = "TRAFFIC_SOURCE"] = 388; + values[valuesById[389] = "TRAFFIC_SOURCE_NAME"] = 389; + values[valuesById[393] = "UNIFIED_PRICING_RULE_ID"] = 393; + values[valuesById[394] = "UNIFIED_PRICING_RULE_NAME"] = 394; + values[valuesById[506] = "URL"] = 506; + values[valuesById[507] = "URL_ID"] = 507; + values[valuesById[635] = "USER_MESSAGES_ENTITLEMENT_SOURCE"] = 635; + values[valuesById[636] = "USER_MESSAGES_ENTITLEMENT_SOURCE_NAME"] = 636; + values[valuesById[637] = "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID"] = 637; + values[valuesById[638] = "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME"] = 638; + values[valuesById[554] = "VAST_VERSION"] = 554; + values[valuesById[555] = "VAST_VERSION_NAME"] = 555; + values[valuesById[556] = "VIDEO_AD_BREAK_TYPE"] = 556; + values[valuesById[557] = "VIDEO_AD_BREAK_TYPE_NAME"] = 557; + values[valuesById[450] = "VIDEO_AD_DURATION"] = 450; + values[valuesById[561] = "VIDEO_AD_FORMATS_RULE"] = 561; + values[valuesById[560] = "VIDEO_AD_FORMATS_RULE_ID"] = 560; + values[valuesById[558] = "VIDEO_AD_REQUEST_DURATION"] = 558; + values[valuesById[751] = "VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME"] = 751; + values[valuesById[559] = "VIDEO_AD_REQUEST_DURATION_NAME"] = 559; + values[valuesById[438] = "VIDEO_AD_REQUEST_SOURCE"] = 438; + values[valuesById[439] = "VIDEO_AD_REQUEST_SOURCE_NAME"] = 439; + values[valuesById[432] = "VIDEO_AD_TYPE"] = 432; + values[valuesById[433] = "VIDEO_AD_TYPE_NAME"] = 433; + values[valuesById[721] = "VIDEO_CONTINUOUS_PLAY_TYPE"] = 721; + values[valuesById[722] = "VIDEO_CONTINUOUS_PLAY_TYPE_NAME"] = 722; + values[valuesById[530] = "VIDEO_FALLBACK_POSITION"] = 530; + values[valuesById[601] = "VIDEO_MEASUREMENT_SOURCE"] = 601; + values[valuesById[602] = "VIDEO_MEASUREMENT_SOURCE_NAME"] = 602; + values[valuesById[172] = "VIDEO_PLCMT"] = 172; + values[valuesById[173] = "VIDEO_PLCMT_NAME"] = 173; + values[valuesById[538] = "VIDEO_POSITION_IN_POD"] = 538; + values[valuesById[539] = "VIDEO_POSITION_OF_POD"] = 539; + values[valuesById[440] = "VIDEO_SDK_VERSION"] = 440; + values[valuesById[441] = "VIDEO_SDK_VERSION_NAME"] = 441; + values[valuesById[752] = "VIDEO_STITCHER_TYPE"] = 752; + values[valuesById[753] = "VIDEO_STITCHER_TYPE_NAME"] = 753; + values[valuesById[5] = "WEEK"] = 5; + values[valuesById[184] = "YIELD_GROUP_BUYER_NAME"] = 184; + values[valuesById[627] = "YIELD_GROUP_BUYER_TAG_NAME"] = 627; + values[valuesById[182] = "YIELD_GROUP_ID"] = 182; + values[valuesById[183] = "YIELD_GROUP_NAME"] = 183; + values[valuesById[430] = "YOUTUBE_AD_DURATION_BUCKET"] = 430; + values[valuesById[431] = "YOUTUBE_AD_DURATION_BUCKET_NAME"] = 431; + values[valuesById[399] = "YOUTUBE_AD_TYPE"] = 399; + values[valuesById[400] = "YOUTUBE_AD_TYPE_NAME"] = 400; + values[valuesById[10000] = "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID"] = 10000; + values[valuesById[10001] = "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID"] = 10001; + values[valuesById[10002] = "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID"] = 10002; + values[valuesById[10003] = "LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID"] = 10003; + values[valuesById[10004] = "LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID"] = 10004; + values[valuesById[10005] = "LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID"] = 10005; + values[valuesById[10006] = "LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID"] = 10006; + values[valuesById[10007] = "LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID"] = 10007; + values[valuesById[10008] = "LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID"] = 10008; + values[valuesById[10009] = "LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID"] = 10009; + values[valuesById[10010] = "LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID"] = 10010; + values[valuesById[10011] = "LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID"] = 10011; + values[valuesById[10012] = "LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID"] = 10012; + values[valuesById[10013] = "LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID"] = 10013; + values[valuesById[10014] = "LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID"] = 10014; + values[valuesById[11000] = "LINE_ITEM_CUSTOM_FIELD_0_VALUE"] = 11000; + values[valuesById[11001] = "LINE_ITEM_CUSTOM_FIELD_1_VALUE"] = 11001; + values[valuesById[11002] = "LINE_ITEM_CUSTOM_FIELD_2_VALUE"] = 11002; + values[valuesById[11003] = "LINE_ITEM_CUSTOM_FIELD_3_VALUE"] = 11003; + values[valuesById[11004] = "LINE_ITEM_CUSTOM_FIELD_4_VALUE"] = 11004; + values[valuesById[11005] = "LINE_ITEM_CUSTOM_FIELD_5_VALUE"] = 11005; + values[valuesById[11006] = "LINE_ITEM_CUSTOM_FIELD_6_VALUE"] = 11006; + values[valuesById[11007] = "LINE_ITEM_CUSTOM_FIELD_7_VALUE"] = 11007; + values[valuesById[11008] = "LINE_ITEM_CUSTOM_FIELD_8_VALUE"] = 11008; + values[valuesById[11009] = "LINE_ITEM_CUSTOM_FIELD_9_VALUE"] = 11009; + values[valuesById[11010] = "LINE_ITEM_CUSTOM_FIELD_10_VALUE"] = 11010; + values[valuesById[11011] = "LINE_ITEM_CUSTOM_FIELD_11_VALUE"] = 11011; + values[valuesById[11012] = "LINE_ITEM_CUSTOM_FIELD_12_VALUE"] = 11012; + values[valuesById[11013] = "LINE_ITEM_CUSTOM_FIELD_13_VALUE"] = 11013; + values[valuesById[11014] = "LINE_ITEM_CUSTOM_FIELD_14_VALUE"] = 11014; + values[valuesById[12000] = "ORDER_CUSTOM_FIELD_0_OPTION_ID"] = 12000; + values[valuesById[12001] = "ORDER_CUSTOM_FIELD_1_OPTION_ID"] = 12001; + values[valuesById[12002] = "ORDER_CUSTOM_FIELD_2_OPTION_ID"] = 12002; + values[valuesById[12003] = "ORDER_CUSTOM_FIELD_3_OPTION_ID"] = 12003; + values[valuesById[12004] = "ORDER_CUSTOM_FIELD_4_OPTION_ID"] = 12004; + values[valuesById[12005] = "ORDER_CUSTOM_FIELD_5_OPTION_ID"] = 12005; + values[valuesById[12006] = "ORDER_CUSTOM_FIELD_6_OPTION_ID"] = 12006; + values[valuesById[12007] = "ORDER_CUSTOM_FIELD_7_OPTION_ID"] = 12007; + values[valuesById[12008] = "ORDER_CUSTOM_FIELD_8_OPTION_ID"] = 12008; + values[valuesById[12009] = "ORDER_CUSTOM_FIELD_9_OPTION_ID"] = 12009; + values[valuesById[12010] = "ORDER_CUSTOM_FIELD_10_OPTION_ID"] = 12010; + values[valuesById[12011] = "ORDER_CUSTOM_FIELD_11_OPTION_ID"] = 12011; + values[valuesById[12012] = "ORDER_CUSTOM_FIELD_12_OPTION_ID"] = 12012; + values[valuesById[12013] = "ORDER_CUSTOM_FIELD_13_OPTION_ID"] = 12013; + values[valuesById[12014] = "ORDER_CUSTOM_FIELD_14_OPTION_ID"] = 12014; + values[valuesById[13000] = "ORDER_CUSTOM_FIELD_0_VALUE"] = 13000; + values[valuesById[13001] = "ORDER_CUSTOM_FIELD_1_VALUE"] = 13001; + values[valuesById[13002] = "ORDER_CUSTOM_FIELD_2_VALUE"] = 13002; + values[valuesById[13003] = "ORDER_CUSTOM_FIELD_3_VALUE"] = 13003; + values[valuesById[13004] = "ORDER_CUSTOM_FIELD_4_VALUE"] = 13004; + values[valuesById[13005] = "ORDER_CUSTOM_FIELD_5_VALUE"] = 13005; + values[valuesById[13006] = "ORDER_CUSTOM_FIELD_6_VALUE"] = 13006; + values[valuesById[13007] = "ORDER_CUSTOM_FIELD_7_VALUE"] = 13007; + values[valuesById[13008] = "ORDER_CUSTOM_FIELD_8_VALUE"] = 13008; + values[valuesById[13009] = "ORDER_CUSTOM_FIELD_9_VALUE"] = 13009; + values[valuesById[13010] = "ORDER_CUSTOM_FIELD_10_VALUE"] = 13010; + values[valuesById[13011] = "ORDER_CUSTOM_FIELD_11_VALUE"] = 13011; + values[valuesById[13012] = "ORDER_CUSTOM_FIELD_12_VALUE"] = 13012; + values[valuesById[13013] = "ORDER_CUSTOM_FIELD_13_VALUE"] = 13013; + values[valuesById[13014] = "ORDER_CUSTOM_FIELD_14_VALUE"] = 13014; + values[valuesById[14000] = "CREATIVE_CUSTOM_FIELD_0_OPTION_ID"] = 14000; + values[valuesById[14001] = "CREATIVE_CUSTOM_FIELD_1_OPTION_ID"] = 14001; + values[valuesById[14002] = "CREATIVE_CUSTOM_FIELD_2_OPTION_ID"] = 14002; + values[valuesById[14003] = "CREATIVE_CUSTOM_FIELD_3_OPTION_ID"] = 14003; + values[valuesById[14004] = "CREATIVE_CUSTOM_FIELD_4_OPTION_ID"] = 14004; + values[valuesById[14005] = "CREATIVE_CUSTOM_FIELD_5_OPTION_ID"] = 14005; + values[valuesById[14006] = "CREATIVE_CUSTOM_FIELD_6_OPTION_ID"] = 14006; + values[valuesById[14007] = "CREATIVE_CUSTOM_FIELD_7_OPTION_ID"] = 14007; + values[valuesById[14008] = "CREATIVE_CUSTOM_FIELD_8_OPTION_ID"] = 14008; + values[valuesById[14009] = "CREATIVE_CUSTOM_FIELD_9_OPTION_ID"] = 14009; + values[valuesById[14010] = "CREATIVE_CUSTOM_FIELD_10_OPTION_ID"] = 14010; + values[valuesById[14011] = "CREATIVE_CUSTOM_FIELD_11_OPTION_ID"] = 14011; + values[valuesById[14012] = "CREATIVE_CUSTOM_FIELD_12_OPTION_ID"] = 14012; + values[valuesById[14013] = "CREATIVE_CUSTOM_FIELD_13_OPTION_ID"] = 14013; + values[valuesById[14014] = "CREATIVE_CUSTOM_FIELD_14_OPTION_ID"] = 14014; + values[valuesById[15000] = "CREATIVE_CUSTOM_FIELD_0_VALUE"] = 15000; + values[valuesById[15001] = "CREATIVE_CUSTOM_FIELD_1_VALUE"] = 15001; + values[valuesById[15002] = "CREATIVE_CUSTOM_FIELD_2_VALUE"] = 15002; + values[valuesById[15003] = "CREATIVE_CUSTOM_FIELD_3_VALUE"] = 15003; + values[valuesById[15004] = "CREATIVE_CUSTOM_FIELD_4_VALUE"] = 15004; + values[valuesById[15005] = "CREATIVE_CUSTOM_FIELD_5_VALUE"] = 15005; + values[valuesById[15006] = "CREATIVE_CUSTOM_FIELD_6_VALUE"] = 15006; + values[valuesById[15007] = "CREATIVE_CUSTOM_FIELD_7_VALUE"] = 15007; + values[valuesById[15008] = "CREATIVE_CUSTOM_FIELD_8_VALUE"] = 15008; + values[valuesById[15009] = "CREATIVE_CUSTOM_FIELD_9_VALUE"] = 15009; + values[valuesById[15010] = "CREATIVE_CUSTOM_FIELD_10_VALUE"] = 15010; + values[valuesById[15011] = "CREATIVE_CUSTOM_FIELD_11_VALUE"] = 15011; + values[valuesById[15012] = "CREATIVE_CUSTOM_FIELD_12_VALUE"] = 15012; + values[valuesById[15013] = "CREATIVE_CUSTOM_FIELD_13_VALUE"] = 15013; + values[valuesById[15014] = "CREATIVE_CUSTOM_FIELD_14_VALUE"] = 15014; + values[valuesById[16000] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID"] = 16000; + values[valuesById[16001] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID"] = 16001; + values[valuesById[16002] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID"] = 16002; + values[valuesById[16003] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID"] = 16003; + values[valuesById[16004] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID"] = 16004; + values[valuesById[16005] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID"] = 16005; + values[valuesById[16006] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID"] = 16006; + values[valuesById[16007] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID"] = 16007; + values[valuesById[16008] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID"] = 16008; + values[valuesById[16009] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID"] = 16009; + values[valuesById[16010] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID"] = 16010; + values[valuesById[16011] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID"] = 16011; + values[valuesById[16012] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID"] = 16012; + values[valuesById[16013] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID"] = 16013; + values[valuesById[16014] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID"] = 16014; + values[valuesById[17000] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE"] = 17000; + values[valuesById[17001] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE"] = 17001; + values[valuesById[17002] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE"] = 17002; + values[valuesById[17003] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE"] = 17003; + values[valuesById[17004] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE"] = 17004; + values[valuesById[17005] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE"] = 17005; + values[valuesById[17006] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE"] = 17006; + values[valuesById[17007] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE"] = 17007; + values[valuesById[17008] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE"] = 17008; + values[valuesById[17009] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE"] = 17009; + values[valuesById[17010] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE"] = 17010; + values[valuesById[17011] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE"] = 17011; + values[valuesById[17012] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE"] = 17012; + values[valuesById[17013] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE"] = 17013; + values[valuesById[17014] = "BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE"] = 17014; + values[valuesById[18000] = "BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID"] = 18000; + values[valuesById[18001] = "BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID"] = 18001; + values[valuesById[18002] = "BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID"] = 18002; + values[valuesById[18003] = "BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID"] = 18003; + values[valuesById[18004] = "BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID"] = 18004; + values[valuesById[18005] = "BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID"] = 18005; + values[valuesById[18006] = "BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID"] = 18006; + values[valuesById[18007] = "BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID"] = 18007; + values[valuesById[18008] = "BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID"] = 18008; + values[valuesById[18009] = "BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID"] = 18009; + values[valuesById[18010] = "BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID"] = 18010; + values[valuesById[18011] = "BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID"] = 18011; + values[valuesById[18012] = "BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID"] = 18012; + values[valuesById[18013] = "BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID"] = 18013; + values[valuesById[18014] = "BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID"] = 18014; + values[valuesById[19000] = "BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE"] = 19000; + values[valuesById[19001] = "BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE"] = 19001; + values[valuesById[19002] = "BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE"] = 19002; + values[valuesById[19003] = "BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE"] = 19003; + values[valuesById[19004] = "BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE"] = 19004; + values[valuesById[19005] = "BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE"] = 19005; + values[valuesById[19006] = "BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE"] = 19006; + values[valuesById[19007] = "BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE"] = 19007; + values[valuesById[19008] = "BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE"] = 19008; + values[valuesById[19009] = "BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE"] = 19009; + values[valuesById[19010] = "BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE"] = 19010; + values[valuesById[19011] = "BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE"] = 19011; + values[valuesById[19012] = "BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE"] = 19012; + values[valuesById[19013] = "BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE"] = 19013; + values[valuesById[19014] = "BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE"] = 19014; + values[valuesById[20000] = "BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID"] = 20000; + values[valuesById[20001] = "BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID"] = 20001; + values[valuesById[20002] = "BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID"] = 20002; + values[valuesById[20003] = "BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID"] = 20003; + values[valuesById[20004] = "BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID"] = 20004; + values[valuesById[20005] = "BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID"] = 20005; + values[valuesById[20006] = "BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID"] = 20006; + values[valuesById[20007] = "BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID"] = 20007; + values[valuesById[20008] = "BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID"] = 20008; + values[valuesById[20009] = "BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID"] = 20009; + values[valuesById[20010] = "BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID"] = 20010; + values[valuesById[20011] = "BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID"] = 20011; + values[valuesById[20012] = "BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID"] = 20012; + values[valuesById[20013] = "BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID"] = 20013; + values[valuesById[20014] = "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID"] = 20014; + values[valuesById[21000] = "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE"] = 21000; + values[valuesById[21001] = "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE"] = 21001; + values[valuesById[21002] = "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE"] = 21002; + values[valuesById[21003] = "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE"] = 21003; + values[valuesById[21004] = "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE"] = 21004; + values[valuesById[21005] = "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE"] = 21005; + values[valuesById[21006] = "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE"] = 21006; + values[valuesById[21007] = "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE"] = 21007; + values[valuesById[21008] = "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE"] = 21008; + values[valuesById[21009] = "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE"] = 21009; + values[valuesById[21010] = "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE"] = 21010; + values[valuesById[21011] = "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE"] = 21011; + values[valuesById[21012] = "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE"] = 21012; + values[valuesById[21013] = "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE"] = 21013; + values[valuesById[21014] = "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE"] = 21014; + values[valuesById[100000] = "CUSTOM_DIMENSION_0_VALUE_ID"] = 100000; + values[valuesById[100001] = "CUSTOM_DIMENSION_1_VALUE_ID"] = 100001; + values[valuesById[100002] = "CUSTOM_DIMENSION_2_VALUE_ID"] = 100002; + values[valuesById[100003] = "CUSTOM_DIMENSION_3_VALUE_ID"] = 100003; + values[valuesById[100004] = "CUSTOM_DIMENSION_4_VALUE_ID"] = 100004; + values[valuesById[100005] = "CUSTOM_DIMENSION_5_VALUE_ID"] = 100005; + values[valuesById[100006] = "CUSTOM_DIMENSION_6_VALUE_ID"] = 100006; + values[valuesById[100007] = "CUSTOM_DIMENSION_7_VALUE_ID"] = 100007; + values[valuesById[100008] = "CUSTOM_DIMENSION_8_VALUE_ID"] = 100008; + values[valuesById[100009] = "CUSTOM_DIMENSION_9_VALUE_ID"] = 100009; + values[valuesById[101000] = "CUSTOM_DIMENSION_0_VALUE"] = 101000; + values[valuesById[101001] = "CUSTOM_DIMENSION_1_VALUE"] = 101001; + values[valuesById[101002] = "CUSTOM_DIMENSION_2_VALUE"] = 101002; + values[valuesById[101003] = "CUSTOM_DIMENSION_3_VALUE"] = 101003; + values[valuesById[101004] = "CUSTOM_DIMENSION_4_VALUE"] = 101004; + values[valuesById[101005] = "CUSTOM_DIMENSION_5_VALUE"] = 101005; + values[valuesById[101006] = "CUSTOM_DIMENSION_6_VALUE"] = 101006; + values[valuesById[101007] = "CUSTOM_DIMENSION_7_VALUE"] = 101007; + values[valuesById[101008] = "CUSTOM_DIMENSION_8_VALUE"] = 101008; + values[valuesById[101009] = "CUSTOM_DIMENSION_9_VALUE"] = 101009; + return values; + })(); + + /** + * Metric enum. + * @name google.ads.admanager.v1.ReportDefinition.Metric + * @enum {number} + * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value + * @property {number} ACTIVE_USERS=223 ACTIVE_USERS value + * @property {number} ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT=445 ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT value + * @property {number} ACTIVE_VIEW_AUDIBLE_IMPRESSIONS=659 ACTIVE_VIEW_AUDIBLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT=446 ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT value + * @property {number} ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT=447 ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT value + * @property {number} ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT=448 ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT value + * @property {number} ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT=449 ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT value + * @property {number} ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS=660 ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS=661 ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=61 ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value + * @property {number} ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=58 ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT=450 ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT value + * @property {number} ACTIVE_VIEW_EVER_AUDIBLE_PERCENT=451 ACTIVE_VIEW_EVER_AUDIBLE_PERCENT value + * @property {number} ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT=452 ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT value + * @property {number} ACTIVE_VIEW_EVER_MUTED_PERCENT=453 ACTIVE_VIEW_EVER_MUTED_PERCENT value + * @property {number} ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION=411 ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION value + * @property {number} ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=57 ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=60 ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value + * @property {number} ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS=662 ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS=663 ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION=664 ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS=665 ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_PLUS_MEASURABLE_COUNT=454 ACTIVE_VIEW_PLUS_MEASURABLE_COUNT value + * @property {number} ACTIVE_VIEW_REVENUE=414 ACTIVE_VIEW_REVENUE value + * @property {number} ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION=666 ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION value + * @property {number} ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=56 ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value + * @property {number} ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION=667 ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=59 ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value + * @property {number} ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=73 ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value + * @property {number} ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=70 ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value + * @property {number} ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=69 ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value + * @property {number} ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=72 ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value + * @property {number} ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS=642 ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS value + * @property {number} ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS=643 ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS value + * @property {number} ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION=644 ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION=645 ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION value + * @property {number} ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=68 ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value + * @property {number} ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION=646 ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=71 ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value + * @property {number} ADSENSE_AVERAGE_ECPM=26 ADSENSE_AVERAGE_ECPM value + * @property {number} ADSENSE_CLICKS=23 ADSENSE_CLICKS value + * @property {number} ADSENSE_CTR=24 ADSENSE_CTR value + * @property {number} ADSENSE_IMPRESSIONS=22 ADSENSE_IMPRESSIONS value + * @property {number} ADSENSE_PERCENT_CLICKS=28 ADSENSE_PERCENT_CLICKS value + * @property {number} ADSENSE_PERCENT_IMPRESSIONS=27 ADSENSE_PERCENT_IMPRESSIONS value + * @property {number} ADSENSE_PERCENT_REVENUE=29 ADSENSE_PERCENT_REVENUE value + * @property {number} ADSENSE_PERCENT_REVENUE_WITHOUT_CPD=30 ADSENSE_PERCENT_REVENUE_WITHOUT_CPD value + * @property {number} ADSENSE_RESPONSES_SERVED=41 ADSENSE_RESPONSES_SERVED value + * @property {number} ADSENSE_REVENUE=25 ADSENSE_REVENUE value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=79 AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=76 AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=75 AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=78 AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS=654 AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS=655 AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION=656 AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION=657 AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=74 AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION=658 AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=77 AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value + * @property {number} AD_EXCHANGE_AVERAGE_ECPM=18 AD_EXCHANGE_AVERAGE_ECPM value + * @property {number} AD_EXCHANGE_CLICKS=15 AD_EXCHANGE_CLICKS value + * @property {number} AD_EXCHANGE_CPC=244 AD_EXCHANGE_CPC value + * @property {number} AD_EXCHANGE_CTR=16 AD_EXCHANGE_CTR value + * @property {number} AD_EXCHANGE_DELIVERY_RATE=245 AD_EXCHANGE_DELIVERY_RATE value + * @property {number} AD_EXCHANGE_IMPRESSIONS=14 AD_EXCHANGE_IMPRESSIONS value + * @property {number} AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER=427 AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER value + * @property {number} AD_EXCHANGE_IMPRESSIONS_PER_SESSION=428 AD_EXCHANGE_IMPRESSIONS_PER_SESSION value + * @property {number} AD_EXCHANGE_LIFT=246 AD_EXCHANGE_LIFT value + * @property {number} AD_EXCHANGE_MATCHED_REQUEST_CTR=247 AD_EXCHANGE_MATCHED_REQUEST_CTR value + * @property {number} AD_EXCHANGE_MATCHED_REQUEST_ECPM=248 AD_EXCHANGE_MATCHED_REQUEST_ECPM value + * @property {number} AD_EXCHANGE_MATCH_RATE=249 AD_EXCHANGE_MATCH_RATE value + * @property {number} AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS=250 AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS value + * @property {number} AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS=251 AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS value + * @property {number} AD_EXCHANGE_PERCENT_CLICKS=20 AD_EXCHANGE_PERCENT_CLICKS value + * @property {number} AD_EXCHANGE_PERCENT_IMPRESSIONS=19 AD_EXCHANGE_PERCENT_IMPRESSIONS value + * @property {number} AD_EXCHANGE_PERCENT_REVENUE=21 AD_EXCHANGE_PERCENT_REVENUE value + * @property {number} AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD=31 AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD value + * @property {number} AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM=252 AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM value + * @property {number} AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS=253 AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS value + * @property {number} AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE=254 AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE value + * @property {number} AD_EXCHANGE_RESPONSES_SERVED=42 AD_EXCHANGE_RESPONSES_SERVED value + * @property {number} AD_EXCHANGE_REVENUE=17 AD_EXCHANGE_REVENUE value + * @property {number} AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT=212 AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT value + * @property {number} AD_EXCHANGE_REVENUE_PER_AD_VIEWER=429 AD_EXCHANGE_REVENUE_PER_AD_VIEWER value + * @property {number} AD_EXCHANGE_TOTAL_REQUESTS=255 AD_EXCHANGE_TOTAL_REQUESTS value + * @property {number} AD_EXCHANGE_TOTAL_REQUEST_CTR=256 AD_EXCHANGE_TOTAL_REQUEST_CTR value + * @property {number} AD_EXCHANGE_TOTAL_REQUEST_ECPM=257 AD_EXCHANGE_TOTAL_REQUEST_ECPM value + * @property {number} AD_EXPOSURE_SECONDS=241 AD_EXPOSURE_SECONDS value + * @property {number} AD_REQUESTS=38 AD_REQUESTS value + * @property {number} AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME=67 AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME value + * @property {number} AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS=64 AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS value + * @property {number} AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS=63 AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS value + * @property {number} AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE=66 AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE value + * @property {number} AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS=332 AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS value + * @property {number} AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS=331 AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS value + * @property {number} AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION=334 AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION=335 AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS=62 AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS value + * @property {number} AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION=333 AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION value + * @property {number} AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE=65 AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE value + * @property {number} AD_SERVER_AVERAGE_ECPM=34 AD_SERVER_AVERAGE_ECPM value + * @property {number} AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD=10 AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD value + * @property {number} AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS=262 AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS value + * @property {number} AD_SERVER_CLICKS=7 AD_SERVER_CLICKS value + * @property {number} AD_SERVER_COMPLETED_VIEWS=431 AD_SERVER_COMPLETED_VIEWS value + * @property {number} AD_SERVER_COVIEWED_IMPRESSIONS=554 AD_SERVER_COVIEWED_IMPRESSIONS value + * @property {number} AD_SERVER_CPD_REVENUE=32 AD_SERVER_CPD_REVENUE value + * @property {number} AD_SERVER_CTR=8 AD_SERVER_CTR value + * @property {number} AD_SERVER_GROSS_REVENUE=483 AD_SERVER_GROSS_REVENUE value + * @property {number} AD_SERVER_GROSS_REVENUE_WITHOUT_CPD=484 AD_SERVER_GROSS_REVENUE_WITHOUT_CPD value + * @property {number} AD_SERVER_IMPRESSIONS=6 AD_SERVER_IMPRESSIONS value + * @property {number} AD_SERVER_IMPRESSIONS_WITH_COMPANION=222 AD_SERVER_IMPRESSIONS_WITH_COMPANION value + * @property {number} AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS=338 AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS value + * @property {number} AD_SERVER_PERCENT_CLICKS=12 AD_SERVER_PERCENT_CLICKS value + * @property {number} AD_SERVER_PERCENT_IMPRESSIONS=11 AD_SERVER_PERCENT_IMPRESSIONS value + * @property {number} AD_SERVER_PERCENT_REVENUE=35 AD_SERVER_PERCENT_REVENUE value + * @property {number} AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD=13 AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD value + * @property {number} AD_SERVER_RESPONSES_SERVED=40 AD_SERVER_RESPONSES_SERVED value + * @property {number} AD_SERVER_REVENUE=33 AD_SERVER_REVENUE value + * @property {number} AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT=213 AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT value + * @property {number} AD_SERVER_REVENUE_WITHOUT_CPD=9 AD_SERVER_REVENUE_WITHOUT_CPD value + * @property {number} AD_SERVER_TARGETED_CLICKS=274 AD_SERVER_TARGETED_CLICKS value + * @property {number} AD_SERVER_TARGETED_IMPRESSIONS=275 AD_SERVER_TARGETED_IMPRESSIONS value + * @property {number} AD_SERVER_TRACKED_ADS=264 AD_SERVER_TRACKED_ADS value + * @property {number} AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS=261 AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS value + * @property {number} AD_SERVER_UNFILTERED_CLICKS=259 AD_SERVER_UNFILTERED_CLICKS value + * @property {number} AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS=260 AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS value + * @property {number} AD_SERVER_UNFILTERED_IMPRESSIONS=260 AD_SERVER_UNFILTERED_IMPRESSIONS value + * @property {number} AD_SERVER_UNFILTERED_TRACKED_ADS=263 AD_SERVER_UNFILTERED_TRACKED_ADS value + * @property {number} AD_UNIT_EXPOSURE_SECONDS=242 AD_UNIT_EXPOSURE_SECONDS value + * @property {number} AD_VIEWERS=425 AD_VIEWERS value + * @property {number} ATN_ADS_FAILED_TO_RENDER=430 ATN_ADS_FAILED_TO_RENDER value + * @property {number} ATN_ELIGIBLE_LINE_ITEMS=342 ATN_ELIGIBLE_LINE_ITEMS value + * @property {number} ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS=343 ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS value + * @property {number} ATN_HBT_ALLOWED_AD_REQUESTS=344 ATN_HBT_ALLOWED_AD_REQUESTS value + * @property {number} ATN_HBT_BIDS_IN_AUCTION=345 ATN_HBT_BIDS_IN_AUCTION value + * @property {number} ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS=346 ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS value + * @property {number} ATN_HBT_CANDIDATE_BIDS=347 ATN_HBT_CANDIDATE_BIDS value + * @property {number} ATN_HBT_INVALID_AD_REQUESTS=348 ATN_HBT_INVALID_AD_REQUESTS value + * @property {number} ATN_HBT_NO_BIDS_AD_REQUESTS=472 ATN_HBT_NO_BIDS_AD_REQUESTS value + * @property {number} ATN_HBT_REJECTED_BIDS=349 ATN_HBT_REJECTED_BIDS value + * @property {number} ATN_HBT_VALID_AD_REQUESTS=350 ATN_HBT_VALID_AD_REQUESTS value + * @property {number} ATN_HBT_WITH_BIDS_AD_REQUESTS=473 ATN_HBT_WITH_BIDS_AD_REQUESTS value + * @property {number} ATN_INVALID_AD_REQUESTS=351 ATN_INVALID_AD_REQUESTS value + * @property {number} ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED=476 ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED value + * @property {number} ATN_LINE_ITEMS_IN_AUCTION=352 ATN_LINE_ITEMS_IN_AUCTION value + * @property {number} ATN_LINE_ITEMS_NOT_COMPETING=515 ATN_LINE_ITEMS_NOT_COMPETING value + * @property {number} ATN_LINE_ITEMS_NOT_SELECTED=353 ATN_LINE_ITEMS_NOT_SELECTED value + * @property {number} ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS=354 ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS value + * @property {number} ATN_LINE_ITEM_TARGETED_AD_REQUESTS=355 ATN_LINE_ITEM_TARGETED_AD_REQUESTS value + * @property {number} ATN_MEDIATION_ALLOWED_AD_REQUESTS=356 ATN_MEDIATION_ALLOWED_AD_REQUESTS value + * @property {number} ATN_MEDIATION_INVALID_AD_REQUESTS=357 ATN_MEDIATION_INVALID_AD_REQUESTS value + * @property {number} ATN_MEDIATION_LOADED_ADS_FROM_CHAINS=358 ATN_MEDIATION_LOADED_ADS_FROM_CHAINS value + * @property {number} ATN_MEDIATION_NO_PARTNER_AD_REQUESTS=474 ATN_MEDIATION_NO_PARTNER_AD_REQUESTS value + * @property {number} ATN_MEDIATION_PARTNERS_IN_AUCTION=359 ATN_MEDIATION_PARTNERS_IN_AUCTION value + * @property {number} ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS=360 ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS value + * @property {number} ATN_MEDIATION_REJECTED_PARTNERS=361 ATN_MEDIATION_REJECTED_PARTNERS value + * @property {number} ATN_MEDIATION_TARGETED_PARTNERS=362 ATN_MEDIATION_TARGETED_PARTNERS value + * @property {number} ATN_MEDIATION_TOTAL_YIELD_PARTNERS=442 ATN_MEDIATION_TOTAL_YIELD_PARTNERS value + * @property {number} ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS=363 ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS value + * @property {number} ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS=364 ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS value + * @property {number} ATN_MEDIATION_VALID_AD_REQUESTS=365 ATN_MEDIATION_VALID_AD_REQUESTS value + * @property {number} ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS=475 ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS value + * @property {number} ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS=366 ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS value + * @property {number} ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT=367 ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT value + * @property {number} ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS=368 ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS value + * @property {number} ATN_PROGRAMMATIC_BIDS_IN_AUCTION=369 ATN_PROGRAMMATIC_BIDS_IN_AUCTION value + * @property {number} ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS=370 ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS value + * @property {number} ATN_PROGRAMMATIC_BID_REQUESTS_SENT=371 ATN_PROGRAMMATIC_BID_REQUESTS_SENT value + * @property {number} ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE=372 ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE value + * @property {number} ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES=373 ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES value + * @property {number} ATN_PROGRAMMATIC_BID_REQUEST_ERRORS=374 ATN_PROGRAMMATIC_BID_REQUEST_ERRORS value + * @property {number} ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS=375 ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS value + * @property {number} ATN_PROGRAMMATIC_REJECTED_BIDS=376 ATN_PROGRAMMATIC_REJECTED_BIDS value + * @property {number} ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS=377 ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS value + * @property {number} ATN_PROGRAMMATIC_TOTAL_BIDS=378 ATN_PROGRAMMATIC_TOTAL_BIDS value + * @property {number} ATN_PROGRAMMATIC_VALID_AD_REQUESTS=379 ATN_PROGRAMMATIC_VALID_AD_REQUESTS value + * @property {number} ATN_REJECTED_LINE_ITEMS=380 ATN_REJECTED_LINE_ITEMS value + * @property {number} ATN_SERVED_MEDIATION_CHAINS=381 ATN_SERVED_MEDIATION_CHAINS value + * @property {number} ATN_SERVED_SINGLE_ADS=382 ATN_SERVED_SINGLE_ADS value + * @property {number} ATN_TARGETED_LINE_ITEMS=383 ATN_TARGETED_LINE_ITEMS value + * @property {number} ATN_TOTAL_AD_REQUESTS=384 ATN_TOTAL_AD_REQUESTS value + * @property {number} ATN_TOTAL_COMPETING_ADS_IN_AUCTION=385 ATN_TOTAL_COMPETING_ADS_IN_AUCTION value + * @property {number} ATN_TOTAL_LOADED_ADS=387 ATN_TOTAL_LOADED_ADS value + * @property {number} ATN_VALID_AD_REQUESTS=389 ATN_VALID_AD_REQUESTS value + * @property {number} ATN_YIELD_GROUP_MEDIATION_PASSBACKS=390 ATN_YIELD_GROUP_MEDIATION_PASSBACKS value + * @property {number} AVERAGE_ECPM=37 AVERAGE_ECPM value + * @property {number} AVERAGE_ECPM_WITHOUT_CPD=5 AVERAGE_ECPM_WITHOUT_CPD value + * @property {number} AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION=224 AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION value + * @property {number} AVERAGE_ENGAGEMENT_SECONDS_PER_USER=225 AVERAGE_ENGAGEMENT_SECONDS_PER_USER value + * @property {number} AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR=418 AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR value + * @property {number} AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER=226 AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER value + * @property {number} AVERAGE_REVENUE_PER_USER=227 AVERAGE_REVENUE_PER_USER value + * @property {number} AVERAGE_SESSION_SECONDS=228 AVERAGE_SESSION_SECONDS value + * @property {number} BIDS=443 BIDS value + * @property {number} BID_AVERAGE_CPM=444 BID_AVERAGE_CPM value + * @property {number} BOUNCE_RATE=433 BOUNCE_RATE value + * @property {number} CLICKS=2 CLICKS value + * @property {number} CODE_SERVED_COUNT=44 CODE_SERVED_COUNT value + * @property {number} CPC_REVENUE=440 CPC_REVENUE value + * @property {number} CPM_REVENUE=441 CPM_REVENUE value + * @property {number} CREATIVE_LOAD_TIME_0_500_PERCENT=324 CREATIVE_LOAD_TIME_0_500_PERCENT value + * @property {number} CREATIVE_LOAD_TIME_1000_2000_PERCENT=326 CREATIVE_LOAD_TIME_1000_2000_PERCENT value + * @property {number} CREATIVE_LOAD_TIME_2000_4000_PERCENT=327 CREATIVE_LOAD_TIME_2000_4000_PERCENT value + * @property {number} CREATIVE_LOAD_TIME_4000_8000_PERCENT=328 CREATIVE_LOAD_TIME_4000_8000_PERCENT value + * @property {number} CREATIVE_LOAD_TIME_500_1000_PERCENT=325 CREATIVE_LOAD_TIME_500_1000_PERCENT value + * @property {number} CREATIVE_LOAD_TIME_GT_8000_PERCENT=329 CREATIVE_LOAD_TIME_GT_8000_PERCENT value + * @property {number} CTR=3 CTR value + * @property {number} DEALS_BIDS=542 DEALS_BIDS value + * @property {number} DEALS_BID_RATE=543 DEALS_BID_RATE value + * @property {number} DEALS_BID_REQUESTS=544 DEALS_BID_REQUESTS value + * @property {number} DEALS_WINNING_BIDS=545 DEALS_WINNING_BIDS value + * @property {number} DEALS_WIN_RATE=546 DEALS_WIN_RATE value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT=521 DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT=522 DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT=523 DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT=524 DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT=525 DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT value + * @property {number} DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT=520 DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT=526 DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT=527 DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT=528 DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT=529 DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT=531 DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT value + * @property {number} DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT=530 DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT value + * @property {number} DROPOFF_RATE=415 DROPOFF_RATE value + * @property {number} ENGAGED_SESSIONS=229 ENGAGED_SESSIONS value + * @property {number} ENGAGED_SESSIONS_PER_USER=230 ENGAGED_SESSIONS_PER_USER value + * @property {number} ENGAGEMENT_RATE=426 ENGAGEMENT_RATE value + * @property {number} EUROPEAN_REGULATIONS_CONSENT_RATE=270 EUROPEAN_REGULATIONS_CONSENT_RATE value + * @property {number} EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE=271 EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE value + * @property {number} EUROPEAN_REGULATIONS_MESSAGES_SHOWN=272 EUROPEAN_REGULATIONS_MESSAGES_SHOWN value + * @property {number} EUROPEAN_REGULATIONS_NO_CONSENT_RATE=273 EUROPEAN_REGULATIONS_NO_CONSENT_RATE value + * @property {number} FILL_RATE=258 FILL_RATE value + * @property {number} GOOGLE_ANALYTICS_CLICKS=231 GOOGLE_ANALYTICS_CLICKS value + * @property {number} GOOGLE_ANALYTICS_CTR=232 GOOGLE_ANALYTICS_CTR value + * @property {number} GOOGLE_ANALYTICS_ECPM=233 GOOGLE_ANALYTICS_ECPM value + * @property {number} GOOGLE_ANALYTICS_IMPRESSIONS=234 GOOGLE_ANALYTICS_IMPRESSIONS value + * @property {number} GOOGLE_ANALYTICS_REVENUE=235 GOOGLE_ANALYTICS_REVENUE value + * @property {number} GOOGLE_ANALYTICS_VIEWS=236 GOOGLE_ANALYTICS_VIEWS value + * @property {number} GOOGLE_ANALYTICS_VIEWS_PER_USER=237 GOOGLE_ANALYTICS_VIEWS_PER_USER value + * @property {number} GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS=129 GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS value + * @property {number} GOOGLE_SOLD_AUCTION_IMPRESSIONS=128 GOOGLE_SOLD_AUCTION_IMPRESSIONS value + * @property {number} GOOGLE_SOLD_COVIEWED_IMPRESSIONS=131 GOOGLE_SOLD_COVIEWED_IMPRESSIONS value + * @property {number} GOOGLE_SOLD_IMPRESSIONS=130 GOOGLE_SOLD_IMPRESSIONS value + * @property {number} GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS=127 GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS value + * @property {number} GOOGLE_SOLD_RESERVATION_IMPRESSIONS=126 GOOGLE_SOLD_RESERVATION_IMPRESSIONS value + * @property {number} IMPRESSIONS=1 IMPRESSIONS value + * @property {number} INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS=407 INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS value + * @property {number} INVENTORY_SHARES=547 INVENTORY_SHARES value + * @property {number} INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES=548 INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES value + * @property {number} INVOICED_IMPRESSIONS=404 INVOICED_IMPRESSIONS value + * @property {number} INVOICED_UNFILLED_IMPRESSIONS=405 INVOICED_UNFILLED_IMPRESSIONS value + * @property {number} MEDIATION_CHAINS_FILLED=584 MEDIATION_CHAINS_FILLED value + * @property {number} MUTED_IMPRESSIONS=412 MUTED_IMPRESSIONS value + * @property {number} MUTE_ELIGIBLE_IMPRESSIONS=409 MUTE_ELIGIBLE_IMPRESSIONS value + * @property {number} OPPORTUNITIES=463 OPPORTUNITIES value + * @property {number} OVERDELIVERED_IMPRESSIONS=432 OVERDELIVERED_IMPRESSIONS value + * @property {number} PARTNER_SALES_FILLED_POD_REQUESTS=135 PARTNER_SALES_FILLED_POD_REQUESTS value + * @property {number} PARTNER_SALES_FILL_RATE=136 PARTNER_SALES_FILL_RATE value + * @property {number} PARTNER_SALES_PARTNER_MATCH_RATE=137 PARTNER_SALES_PARTNER_MATCH_RATE value + * @property {number} PARTNER_SALES_QUERIES=132 PARTNER_SALES_QUERIES value + * @property {number} PARTNER_SALES_UNFILLED_IMPRESSIONS=133 PARTNER_SALES_UNFILLED_IMPRESSIONS value + * @property {number} PARTNER_SALES_UNMATCHED_QUERIES=134 PARTNER_SALES_UNMATCHED_QUERIES value + * @property {number} PARTNER_SOLD_CODE_SERVED=125 PARTNER_SOLD_CODE_SERVED value + * @property {number} PARTNER_SOLD_COVIEWED_IMPRESSIONS=124 PARTNER_SOLD_COVIEWED_IMPRESSIONS value + * @property {number} PARTNER_SOLD_IMPRESSIONS=123 PARTNER_SOLD_IMPRESSIONS value + * @property {number} PROGRAMMATIC_ELIGIBLE_AD_REQUESTS=177 PROGRAMMATIC_ELIGIBLE_AD_REQUESTS value + * @property {number} PROGRAMMATIC_MATCH_RATE=178 PROGRAMMATIC_MATCH_RATE value + * @property {number} PROGRAMMATIC_RESPONSES_SERVED=176 PROGRAMMATIC_RESPONSES_SERVED value + * @property {number} REACH_IMPRESSIONS=416 REACH_IMPRESSIONS value + * @property {number} RESPONSES_SERVED=39 RESPONSES_SERVED value + * @property {number} RETENTION=238 RETENTION value + * @property {number} REVENUE=36 REVENUE value + * @property {number} REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT=214 REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT value + * @property {number} REVENUE_WITHOUT_CPD=4 REVENUE_WITHOUT_CPD value + * @property {number} REWARDS_GRANTED=413 REWARDS_GRANTED value + * @property {number} RICH_MEDIA_AVERAGE_DISPLAY_TIME=587 RICH_MEDIA_AVERAGE_DISPLAY_TIME value + * @property {number} RICH_MEDIA_AVERAGE_INTERACTION_TIME=588 RICH_MEDIA_AVERAGE_INTERACTION_TIME value + * @property {number} RICH_MEDIA_BACKUP_IMAGES=589 RICH_MEDIA_BACKUP_IMAGES value + * @property {number} RICH_MEDIA_CUSTOM_EVENT_COUNT=599 RICH_MEDIA_CUSTOM_EVENT_COUNT value + * @property {number} RICH_MEDIA_CUSTOM_EVENT_TIME=600 RICH_MEDIA_CUSTOM_EVENT_TIME value + * @property {number} RICH_MEDIA_DISPLAY_TIME=590 RICH_MEDIA_DISPLAY_TIME value + * @property {number} RICH_MEDIA_EXPANDING_TIME=591 RICH_MEDIA_EXPANDING_TIME value + * @property {number} RICH_MEDIA_EXPANSIONS=592 RICH_MEDIA_EXPANSIONS value + * @property {number} RICH_MEDIA_FULL_SCREEN_IMPRESSIONS=593 RICH_MEDIA_FULL_SCREEN_IMPRESSIONS value + * @property {number} RICH_MEDIA_INTERACTION_COUNT=594 RICH_MEDIA_INTERACTION_COUNT value + * @property {number} RICH_MEDIA_INTERACTION_RATE=595 RICH_MEDIA_INTERACTION_RATE value + * @property {number} RICH_MEDIA_INTERACTION_TIME=596 RICH_MEDIA_INTERACTION_TIME value + * @property {number} RICH_MEDIA_INTERACTIVE_IMPRESSIONS=597 RICH_MEDIA_INTERACTIVE_IMPRESSIONS value + * @property {number} RICH_MEDIA_MANUAL_CLOSES=598 RICH_MEDIA_MANUAL_CLOSES value + * @property {number} RICH_MEDIA_VIDEO_COMPLETES=503 RICH_MEDIA_VIDEO_COMPLETES value + * @property {number} RICH_MEDIA_VIDEO_INTERACTIONS=505 RICH_MEDIA_VIDEO_INTERACTIONS value + * @property {number} RICH_MEDIA_VIDEO_INTERACTION_RATE=504 RICH_MEDIA_VIDEO_INTERACTION_RATE value + * @property {number} RICH_MEDIA_VIDEO_MIDPOINTS=506 RICH_MEDIA_VIDEO_MIDPOINTS value + * @property {number} RICH_MEDIA_VIDEO_MUTES=507 RICH_MEDIA_VIDEO_MUTES value + * @property {number} RICH_MEDIA_VIDEO_PAUSES=508 RICH_MEDIA_VIDEO_PAUSES value + * @property {number} RICH_MEDIA_VIDEO_PLAYS=509 RICH_MEDIA_VIDEO_PLAYS value + * @property {number} RICH_MEDIA_VIDEO_REPLAYS=510 RICH_MEDIA_VIDEO_REPLAYS value + * @property {number} RICH_MEDIA_VIDEO_STOPS=511 RICH_MEDIA_VIDEO_STOPS value + * @property {number} RICH_MEDIA_VIDEO_UNMUTES=512 RICH_MEDIA_VIDEO_UNMUTES value + * @property {number} RICH_MEDIA_VIDEO_VIEW_RATE=513 RICH_MEDIA_VIDEO_VIEW_RATE value + * @property {number} RICH_MEDIA_VIDEO_VIEW_TIME=514 RICH_MEDIA_VIDEO_VIEW_TIME value + * @property {number} SELL_THROUGH_AVAILABLE_IMPRESSIONS=477 SELL_THROUGH_AVAILABLE_IMPRESSIONS value + * @property {number} SELL_THROUGH_FORECASTED_IMPRESSIONS=478 SELL_THROUGH_FORECASTED_IMPRESSIONS value + * @property {number} SELL_THROUGH_RESERVED_IMPRESSIONS=479 SELL_THROUGH_RESERVED_IMPRESSIONS value + * @property {number} SELL_THROUGH_SELL_THROUGH_RATE=480 SELL_THROUGH_SELL_THROUGH_RATE value + * @property {number} SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS=434 SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS value + * @property {number} SERVER_SIDE_UNWRAPPING_CALLOUTS=435 SERVER_SIDE_UNWRAPPING_CALLOUTS value + * @property {number} SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES=436 SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES value + * @property {number} SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES=437 SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES value + * @property {number} SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES=438 SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES value + * @property {number} SERVER_SIDE_UNWRAPPING_TIMEOUTS=439 SERVER_SIDE_UNWRAPPING_TIMEOUTS value + * @property {number} SESSIONS=239 SESSIONS value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT=455 TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT=457 TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT=458 TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT=459 TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT=456 TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT value + * @property {number} TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT=460 TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT value + * @property {number} TARGETED_CLICKS=276 TARGETED_CLICKS value + * @property {number} TARGETED_IMPRESSIONS=277 TARGETED_IMPRESSIONS value + * @property {number} UNFILLED_IMPRESSIONS=45 UNFILLED_IMPRESSIONS value + * @property {number} UNIQUE_VISITORS=417 UNIQUE_VISITORS value + * @property {number} UNLOADED_IMPRESSIONS_DUE_TO_CPU=408 UNLOADED_IMPRESSIONS_DUE_TO_CPU value + * @property {number} UNLOADED_IMPRESSIONS_DUE_TO_NETWORK=406 UNLOADED_IMPRESSIONS_DUE_TO_NETWORK value + * @property {number} UNMATCHED_AD_REQUESTS=43 UNMATCHED_AD_REQUESTS value + * @property {number} UNVIEWED_REASON_OTHER_PERCENT=550 UNVIEWED_REASON_OTHER_PERCENT value + * @property {number} UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT=553 UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT value + * @property {number} UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT=551 UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT value + * @property {number} UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT=552 UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT value + * @property {number} UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT=549 UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT value + * @property {number} USER_ENGAGEMENT_DURATION_IN_SECONDS=240 USER_ENGAGEMENT_DURATION_IN_SECONDS value + * @property {number} USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE=486 USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE value + * @property {number} USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT=487 USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT value + * @property {number} USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN=488 USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN value + * @property {number} USER_MESSAGES_ALLOW_ADS_PAGEVIEWS=489 USER_MESSAGES_ALLOW_ADS_PAGEVIEWS value + * @property {number} USER_MESSAGES_CCPA_MESSAGES_SHOWN=490 USER_MESSAGES_CCPA_MESSAGES_SHOWN value + * @property {number} USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN=491 USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN value + * @property {number} USER_MESSAGES_IDFA_ATT_CONSENT=492 USER_MESSAGES_IDFA_ATT_CONSENT value + * @property {number} USER_MESSAGES_IDFA_ATT_CONSENT_RATE=493 USER_MESSAGES_IDFA_ATT_CONSENT_RATE value + * @property {number} USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT=494 USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT value + * @property {number} USER_MESSAGES_IDFA_ATT_DECLINE_RATE=495 USER_MESSAGES_IDFA_ATT_DECLINE_RATE value + * @property {number} USER_MESSAGES_IDFA_EXPLAINERS_SHOWN=496 USER_MESSAGES_IDFA_EXPLAINERS_SHOWN value + * @property {number} USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN=497 USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN value + * @property {number} USER_MESSAGES_IDFA_NO_DECISION=498 USER_MESSAGES_IDFA_NO_DECISION value + * @property {number} USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN=121 USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN value + * @property {number} USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS=122 USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS value + * @property {number} USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS=499 USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS value + * @property {number} USER_MESSAGES_TOTAL_ESTIMATED_REVENUE=500 USER_MESSAGES_TOTAL_ESTIMATED_REVENUE value + * @property {number} USER_MESSAGES_UPTC_MESSAGES_SHOWN=501 USER_MESSAGES_UPTC_MESSAGES_SHOWN value + * @property {number} USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO=502 USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO value + * @property {number} VIDEO_ERROR_100_COUNT=180 VIDEO_ERROR_100_COUNT value + * @property {number} VIDEO_ERROR_101_COUNT=181 VIDEO_ERROR_101_COUNT value + * @property {number} VIDEO_ERROR_102_COUNT=182 VIDEO_ERROR_102_COUNT value + * @property {number} VIDEO_ERROR_200_COUNT=183 VIDEO_ERROR_200_COUNT value + * @property {number} VIDEO_ERROR_201_COUNT=184 VIDEO_ERROR_201_COUNT value + * @property {number} VIDEO_ERROR_202_COUNT=185 VIDEO_ERROR_202_COUNT value + * @property {number} VIDEO_ERROR_203_COUNT=186 VIDEO_ERROR_203_COUNT value + * @property {number} VIDEO_ERROR_300_COUNT=187 VIDEO_ERROR_300_COUNT value + * @property {number} VIDEO_ERROR_301_COUNT=188 VIDEO_ERROR_301_COUNT value + * @property {number} VIDEO_ERROR_302_COUNT=189 VIDEO_ERROR_302_COUNT value + * @property {number} VIDEO_ERROR_303_COUNT=190 VIDEO_ERROR_303_COUNT value + * @property {number} VIDEO_ERROR_400_COUNT=191 VIDEO_ERROR_400_COUNT value + * @property {number} VIDEO_ERROR_401_COUNT=192 VIDEO_ERROR_401_COUNT value + * @property {number} VIDEO_ERROR_402_COUNT=193 VIDEO_ERROR_402_COUNT value + * @property {number} VIDEO_ERROR_403_COUNT=194 VIDEO_ERROR_403_COUNT value + * @property {number} VIDEO_ERROR_405_COUNT=195 VIDEO_ERROR_405_COUNT value + * @property {number} VIDEO_ERROR_406_COUNT=196 VIDEO_ERROR_406_COUNT value + * @property {number} VIDEO_ERROR_407_COUNT=197 VIDEO_ERROR_407_COUNT value + * @property {number} VIDEO_ERROR_408_COUNT=198 VIDEO_ERROR_408_COUNT value + * @property {number} VIDEO_ERROR_409_COUNT=199 VIDEO_ERROR_409_COUNT value + * @property {number} VIDEO_ERROR_410_COUNT=200 VIDEO_ERROR_410_COUNT value + * @property {number} VIDEO_ERROR_500_COUNT=201 VIDEO_ERROR_500_COUNT value + * @property {number} VIDEO_ERROR_501_COUNT=202 VIDEO_ERROR_501_COUNT value + * @property {number} VIDEO_ERROR_502_COUNT=203 VIDEO_ERROR_502_COUNT value + * @property {number} VIDEO_ERROR_503_COUNT=204 VIDEO_ERROR_503_COUNT value + * @property {number} VIDEO_ERROR_600_COUNT=205 VIDEO_ERROR_600_COUNT value + * @property {number} VIDEO_ERROR_601_COUNT=206 VIDEO_ERROR_601_COUNT value + * @property {number} VIDEO_ERROR_602_COUNT=207 VIDEO_ERROR_602_COUNT value + * @property {number} VIDEO_ERROR_603_COUNT=208 VIDEO_ERROR_603_COUNT value + * @property {number} VIDEO_ERROR_604_COUNT=209 VIDEO_ERROR_604_COUNT value + * @property {number} VIDEO_ERROR_900_COUNT=210 VIDEO_ERROR_900_COUNT value + * @property {number} VIDEO_ERROR_901_COUNT=211 VIDEO_ERROR_901_COUNT value + * @property {number} VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE=92 VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE value + * @property {number} VIDEO_INTERACTION_COLLAPSES=93 VIDEO_INTERACTION_COLLAPSES value + * @property {number} VIDEO_INTERACTION_EXPANDS=95 VIDEO_INTERACTION_EXPANDS value + * @property {number} VIDEO_INTERACTION_FULL_SCREENS=96 VIDEO_INTERACTION_FULL_SCREENS value + * @property {number} VIDEO_INTERACTION_MUTES=97 VIDEO_INTERACTION_MUTES value + * @property {number} VIDEO_INTERACTION_PAUSES=98 VIDEO_INTERACTION_PAUSES value + * @property {number} VIDEO_INTERACTION_RESUMES=99 VIDEO_INTERACTION_RESUMES value + * @property {number} VIDEO_INTERACTION_REWINDS=100 VIDEO_INTERACTION_REWINDS value + * @property {number} VIDEO_INTERACTION_UNMUTES=101 VIDEO_INTERACTION_UNMUTES value + * @property {number} VIDEO_INTERACTION_VIDEO_SKIPS=102 VIDEO_INTERACTION_VIDEO_SKIPS value + * @property {number} VIDEO_MONETIZABLE_CONTENT_VIEWS=601 VIDEO_MONETIZABLE_CONTENT_VIEWS value + * @property {number} VIDEO_REAL_TIME_CREATIVE_SERVES=139 VIDEO_REAL_TIME_CREATIVE_SERVES value + * @property {number} VIDEO_REAL_TIME_ERROR_100_COUNT=143 VIDEO_REAL_TIME_ERROR_100_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_101_COUNT=144 VIDEO_REAL_TIME_ERROR_101_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_102_COUNT=145 VIDEO_REAL_TIME_ERROR_102_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_200_COUNT=146 VIDEO_REAL_TIME_ERROR_200_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_201_COUNT=147 VIDEO_REAL_TIME_ERROR_201_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_202_COUNT=148 VIDEO_REAL_TIME_ERROR_202_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_203_COUNT=149 VIDEO_REAL_TIME_ERROR_203_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_300_COUNT=150 VIDEO_REAL_TIME_ERROR_300_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_301_COUNT=151 VIDEO_REAL_TIME_ERROR_301_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_302_COUNT=152 VIDEO_REAL_TIME_ERROR_302_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_303_COUNT=153 VIDEO_REAL_TIME_ERROR_303_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_400_COUNT=154 VIDEO_REAL_TIME_ERROR_400_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_401_COUNT=155 VIDEO_REAL_TIME_ERROR_401_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_402_COUNT=156 VIDEO_REAL_TIME_ERROR_402_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_403_COUNT=157 VIDEO_REAL_TIME_ERROR_403_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_405_COUNT=158 VIDEO_REAL_TIME_ERROR_405_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_406_COUNT=159 VIDEO_REAL_TIME_ERROR_406_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_407_COUNT=160 VIDEO_REAL_TIME_ERROR_407_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_408_COUNT=161 VIDEO_REAL_TIME_ERROR_408_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_409_COUNT=162 VIDEO_REAL_TIME_ERROR_409_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_410_COUNT=163 VIDEO_REAL_TIME_ERROR_410_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_500_COUNT=164 VIDEO_REAL_TIME_ERROR_500_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_501_COUNT=165 VIDEO_REAL_TIME_ERROR_501_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_502_COUNT=166 VIDEO_REAL_TIME_ERROR_502_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_503_COUNT=167 VIDEO_REAL_TIME_ERROR_503_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_600_COUNT=168 VIDEO_REAL_TIME_ERROR_600_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_601_COUNT=169 VIDEO_REAL_TIME_ERROR_601_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_602_COUNT=170 VIDEO_REAL_TIME_ERROR_602_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_603_COUNT=171 VIDEO_REAL_TIME_ERROR_603_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_604_COUNT=172 VIDEO_REAL_TIME_ERROR_604_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_900_COUNT=173 VIDEO_REAL_TIME_ERROR_900_COUNT value + * @property {number} VIDEO_REAL_TIME_ERROR_901_COUNT=174 VIDEO_REAL_TIME_ERROR_901_COUNT value + * @property {number} VIDEO_REAL_TIME_IMPRESSIONS=138 VIDEO_REAL_TIME_IMPRESSIONS value + * @property {number} VIDEO_REAL_TIME_MATCHED_QUERIES=140 VIDEO_REAL_TIME_MATCHED_QUERIES value + * @property {number} VIDEO_REAL_TIME_TOTAL_ERROR_COUNT=175 VIDEO_REAL_TIME_TOTAL_ERROR_COUNT value + * @property {number} VIDEO_REAL_TIME_TOTAL_QUERIES=142 VIDEO_REAL_TIME_TOTAL_QUERIES value + * @property {number} VIDEO_REAL_TIME_UNMATCHED_QUERIES=141 VIDEO_REAL_TIME_UNMATCHED_QUERIES value + * @property {number} VIDEO_VIEWERSHIP_AUTO_PLAYS=103 VIDEO_VIEWERSHIP_AUTO_PLAYS value + * @property {number} VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE=104 VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE value + * @property {number} VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME=105 VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME value + * @property {number} VIDEO_VIEWERSHIP_CLICK_TO_PLAYS=106 VIDEO_VIEWERSHIP_CLICK_TO_PLAYS value + * @property {number} VIDEO_VIEWERSHIP_COMPLETES=107 VIDEO_VIEWERSHIP_COMPLETES value + * @property {number} VIDEO_VIEWERSHIP_COMPLETION_RATE=108 VIDEO_VIEWERSHIP_COMPLETION_RATE value + * @property {number} VIDEO_VIEWERSHIP_ENGAGED_VIEWS=109 VIDEO_VIEWERSHIP_ENGAGED_VIEWS value + * @property {number} VIDEO_VIEWERSHIP_FIRST_QUARTILES=110 VIDEO_VIEWERSHIP_FIRST_QUARTILES value + * @property {number} VIDEO_VIEWERSHIP_MIDPOINTS=111 VIDEO_VIEWERSHIP_MIDPOINTS value + * @property {number} VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN=112 VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN value + * @property {number} VIDEO_VIEWERSHIP_STARTS=113 VIDEO_VIEWERSHIP_STARTS value + * @property {number} VIDEO_VIEWERSHIP_THIRD_QUARTILES=114 VIDEO_VIEWERSHIP_THIRD_QUARTILES value + * @property {number} VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT=115 VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT value + * @property {number} VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE=94 VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE value + * @property {number} VIDEO_VIEWERSHIP_VIDEO_LENGTH=116 VIDEO_VIEWERSHIP_VIDEO_LENGTH value + * @property {number} VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE=117 VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE value + * @property {number} YIELD_GROUP_AUCTIONS_WON=80 YIELD_GROUP_AUCTIONS_WON value + * @property {number} YIELD_GROUP_BIDS=81 YIELD_GROUP_BIDS value + * @property {number} YIELD_GROUP_BIDS_IN_AUCTION=82 YIELD_GROUP_BIDS_IN_AUCTION value + * @property {number} YIELD_GROUP_CALLOUTS=83 YIELD_GROUP_CALLOUTS value + * @property {number} YIELD_GROUP_ESTIMATED_CPM=88 YIELD_GROUP_ESTIMATED_CPM value + * @property {number} YIELD_GROUP_ESTIMATED_REVENUE=87 YIELD_GROUP_ESTIMATED_REVENUE value + * @property {number} YIELD_GROUP_IMPRESSIONS=85 YIELD_GROUP_IMPRESSIONS value + * @property {number} YIELD_GROUP_MEDIATION_FILL_RATE=89 YIELD_GROUP_MEDIATION_FILL_RATE value + * @property {number} YIELD_GROUP_MEDIATION_MATCHED_QUERIES=86 YIELD_GROUP_MEDIATION_MATCHED_QUERIES value + * @property {number} YIELD_GROUP_MEDIATION_PASSBACKS=118 YIELD_GROUP_MEDIATION_PASSBACKS value + * @property {number} YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM=90 YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM value + * @property {number} YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT=215 YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT value + * @property {number} YIELD_GROUP_SUCCESSFUL_RESPONSES=84 YIELD_GROUP_SUCCESSFUL_RESPONSES value + */ + ReportDefinition.Metric = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; + values[valuesById[223] = "ACTIVE_USERS"] = 223; + values[valuesById[445] = "ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT"] = 445; + values[valuesById[659] = "ACTIVE_VIEW_AUDIBLE_IMPRESSIONS"] = 659; + values[valuesById[446] = "ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT"] = 446; + values[valuesById[447] = "ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT"] = 447; + values[valuesById[448] = "ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT"] = 448; + values[valuesById[449] = "ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT"] = 449; + values[valuesById[660] = "ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS"] = 660; + values[valuesById[661] = "ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS"] = 661; + values[valuesById[61] = "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 61; + values[valuesById[58] = "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 58; + values[valuesById[450] = "ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT"] = 450; + values[valuesById[451] = "ACTIVE_VIEW_EVER_AUDIBLE_PERCENT"] = 451; + values[valuesById[452] = "ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT"] = 452; + values[valuesById[453] = "ACTIVE_VIEW_EVER_MUTED_PERCENT"] = 453; + values[valuesById[411] = "ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION"] = 411; + values[valuesById[57] = "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 57; + values[valuesById[60] = "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 60; + values[valuesById[662] = "ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS"] = 662; + values[valuesById[663] = "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS"] = 663; + values[valuesById[664] = "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 664; + values[valuesById[665] = "ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS"] = 665; + values[valuesById[454] = "ACTIVE_VIEW_PLUS_MEASURABLE_COUNT"] = 454; + values[valuesById[414] = "ACTIVE_VIEW_REVENUE"] = 414; + values[valuesById[666] = "ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION"] = 666; + values[valuesById[56] = "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 56; + values[valuesById[667] = "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 667; + values[valuesById[59] = "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 59; + values[valuesById[73] = "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 73; + values[valuesById[70] = "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 70; + values[valuesById[69] = "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 69; + values[valuesById[72] = "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 72; + values[valuesById[642] = "ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS"] = 642; + values[valuesById[643] = "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS"] = 643; + values[valuesById[644] = "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 644; + values[valuesById[645] = "ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION"] = 645; + values[valuesById[68] = "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 68; + values[valuesById[646] = "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 646; + values[valuesById[71] = "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 71; + values[valuesById[26] = "ADSENSE_AVERAGE_ECPM"] = 26; + values[valuesById[23] = "ADSENSE_CLICKS"] = 23; + values[valuesById[24] = "ADSENSE_CTR"] = 24; + values[valuesById[22] = "ADSENSE_IMPRESSIONS"] = 22; + values[valuesById[28] = "ADSENSE_PERCENT_CLICKS"] = 28; + values[valuesById[27] = "ADSENSE_PERCENT_IMPRESSIONS"] = 27; + values[valuesById[29] = "ADSENSE_PERCENT_REVENUE"] = 29; + values[valuesById[30] = "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD"] = 30; + values[valuesById[41] = "ADSENSE_RESPONSES_SERVED"] = 41; + values[valuesById[25] = "ADSENSE_REVENUE"] = 25; + values[valuesById[79] = "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 79; + values[valuesById[76] = "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 76; + values[valuesById[75] = "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 75; + values[valuesById[78] = "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 78; + values[valuesById[654] = "AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS"] = 654; + values[valuesById[655] = "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS"] = 655; + values[valuesById[656] = "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 656; + values[valuesById[657] = "AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION"] = 657; + values[valuesById[74] = "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 74; + values[valuesById[658] = "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 658; + values[valuesById[77] = "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 77; + values[valuesById[18] = "AD_EXCHANGE_AVERAGE_ECPM"] = 18; + values[valuesById[15] = "AD_EXCHANGE_CLICKS"] = 15; + values[valuesById[244] = "AD_EXCHANGE_CPC"] = 244; + values[valuesById[16] = "AD_EXCHANGE_CTR"] = 16; + values[valuesById[245] = "AD_EXCHANGE_DELIVERY_RATE"] = 245; + values[valuesById[14] = "AD_EXCHANGE_IMPRESSIONS"] = 14; + values[valuesById[427] = "AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER"] = 427; + values[valuesById[428] = "AD_EXCHANGE_IMPRESSIONS_PER_SESSION"] = 428; + values[valuesById[246] = "AD_EXCHANGE_LIFT"] = 246; + values[valuesById[247] = "AD_EXCHANGE_MATCHED_REQUEST_CTR"] = 247; + values[valuesById[248] = "AD_EXCHANGE_MATCHED_REQUEST_ECPM"] = 248; + values[valuesById[249] = "AD_EXCHANGE_MATCH_RATE"] = 249; + values[valuesById[250] = "AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS"] = 250; + values[valuesById[251] = "AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS"] = 251; + values[valuesById[20] = "AD_EXCHANGE_PERCENT_CLICKS"] = 20; + values[valuesById[19] = "AD_EXCHANGE_PERCENT_IMPRESSIONS"] = 19; + values[valuesById[21] = "AD_EXCHANGE_PERCENT_REVENUE"] = 21; + values[valuesById[31] = "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD"] = 31; + values[valuesById[252] = "AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM"] = 252; + values[valuesById[253] = "AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS"] = 253; + values[valuesById[254] = "AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE"] = 254; + values[valuesById[42] = "AD_EXCHANGE_RESPONSES_SERVED"] = 42; + values[valuesById[17] = "AD_EXCHANGE_REVENUE"] = 17; + values[valuesById[212] = "AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT"] = 212; + values[valuesById[429] = "AD_EXCHANGE_REVENUE_PER_AD_VIEWER"] = 429; + values[valuesById[255] = "AD_EXCHANGE_TOTAL_REQUESTS"] = 255; + values[valuesById[256] = "AD_EXCHANGE_TOTAL_REQUEST_CTR"] = 256; + values[valuesById[257] = "AD_EXCHANGE_TOTAL_REQUEST_ECPM"] = 257; + values[valuesById[241] = "AD_EXPOSURE_SECONDS"] = 241; + values[valuesById[38] = "AD_REQUESTS"] = 38; + values[valuesById[67] = "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"] = 67; + values[valuesById[64] = "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"] = 64; + values[valuesById[63] = "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"] = 63; + values[valuesById[66] = "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE"] = 66; + values[valuesById[332] = "AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS"] = 332; + values[valuesById[331] = "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS"] = 331; + values[valuesById[334] = "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 334; + values[valuesById[335] = "AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION"] = 335; + values[valuesById[62] = "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"] = 62; + values[valuesById[333] = "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION"] = 333; + values[valuesById[65] = "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE"] = 65; + values[valuesById[34] = "AD_SERVER_AVERAGE_ECPM"] = 34; + values[valuesById[10] = "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD"] = 10; + values[valuesById[262] = "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS"] = 262; + values[valuesById[7] = "AD_SERVER_CLICKS"] = 7; + values[valuesById[431] = "AD_SERVER_COMPLETED_VIEWS"] = 431; + values[valuesById[554] = "AD_SERVER_COVIEWED_IMPRESSIONS"] = 554; + values[valuesById[32] = "AD_SERVER_CPD_REVENUE"] = 32; + values[valuesById[8] = "AD_SERVER_CTR"] = 8; + values[valuesById[483] = "AD_SERVER_GROSS_REVENUE"] = 483; + values[valuesById[484] = "AD_SERVER_GROSS_REVENUE_WITHOUT_CPD"] = 484; + values[valuesById[6] = "AD_SERVER_IMPRESSIONS"] = 6; + values[valuesById[222] = "AD_SERVER_IMPRESSIONS_WITH_COMPANION"] = 222; + values[valuesById[338] = "AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS"] = 338; + values[valuesById[12] = "AD_SERVER_PERCENT_CLICKS"] = 12; + values[valuesById[11] = "AD_SERVER_PERCENT_IMPRESSIONS"] = 11; + values[valuesById[35] = "AD_SERVER_PERCENT_REVENUE"] = 35; + values[valuesById[13] = "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD"] = 13; + values[valuesById[40] = "AD_SERVER_RESPONSES_SERVED"] = 40; + values[valuesById[33] = "AD_SERVER_REVENUE"] = 33; + values[valuesById[213] = "AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT"] = 213; + values[valuesById[9] = "AD_SERVER_REVENUE_WITHOUT_CPD"] = 9; + values[valuesById[274] = "AD_SERVER_TARGETED_CLICKS"] = 274; + values[valuesById[275] = "AD_SERVER_TARGETED_IMPRESSIONS"] = 275; + values[valuesById[264] = "AD_SERVER_TRACKED_ADS"] = 264; + values[valuesById[261] = "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS"] = 261; + values[valuesById[259] = "AD_SERVER_UNFILTERED_CLICKS"] = 259; + values[valuesById[260] = "AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS"] = 260; + values["AD_SERVER_UNFILTERED_IMPRESSIONS"] = 260; + values[valuesById[263] = "AD_SERVER_UNFILTERED_TRACKED_ADS"] = 263; + values[valuesById[242] = "AD_UNIT_EXPOSURE_SECONDS"] = 242; + values[valuesById[425] = "AD_VIEWERS"] = 425; + values[valuesById[430] = "ATN_ADS_FAILED_TO_RENDER"] = 430; + values[valuesById[342] = "ATN_ELIGIBLE_LINE_ITEMS"] = 342; + values[valuesById[343] = "ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS"] = 343; + values[valuesById[344] = "ATN_HBT_ALLOWED_AD_REQUESTS"] = 344; + values[valuesById[345] = "ATN_HBT_BIDS_IN_AUCTION"] = 345; + values[valuesById[346] = "ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS"] = 346; + values[valuesById[347] = "ATN_HBT_CANDIDATE_BIDS"] = 347; + values[valuesById[348] = "ATN_HBT_INVALID_AD_REQUESTS"] = 348; + values[valuesById[472] = "ATN_HBT_NO_BIDS_AD_REQUESTS"] = 472; + values[valuesById[349] = "ATN_HBT_REJECTED_BIDS"] = 349; + values[valuesById[350] = "ATN_HBT_VALID_AD_REQUESTS"] = 350; + values[valuesById[473] = "ATN_HBT_WITH_BIDS_AD_REQUESTS"] = 473; + values[valuesById[351] = "ATN_INVALID_AD_REQUESTS"] = 351; + values[valuesById[476] = "ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED"] = 476; + values[valuesById[352] = "ATN_LINE_ITEMS_IN_AUCTION"] = 352; + values[valuesById[515] = "ATN_LINE_ITEMS_NOT_COMPETING"] = 515; + values[valuesById[353] = "ATN_LINE_ITEMS_NOT_SELECTED"] = 353; + values[valuesById[354] = "ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS"] = 354; + values[valuesById[355] = "ATN_LINE_ITEM_TARGETED_AD_REQUESTS"] = 355; + values[valuesById[356] = "ATN_MEDIATION_ALLOWED_AD_REQUESTS"] = 356; + values[valuesById[357] = "ATN_MEDIATION_INVALID_AD_REQUESTS"] = 357; + values[valuesById[358] = "ATN_MEDIATION_LOADED_ADS_FROM_CHAINS"] = 358; + values[valuesById[474] = "ATN_MEDIATION_NO_PARTNER_AD_REQUESTS"] = 474; + values[valuesById[359] = "ATN_MEDIATION_PARTNERS_IN_AUCTION"] = 359; + values[valuesById[360] = "ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS"] = 360; + values[valuesById[361] = "ATN_MEDIATION_REJECTED_PARTNERS"] = 361; + values[valuesById[362] = "ATN_MEDIATION_TARGETED_PARTNERS"] = 362; + values[valuesById[442] = "ATN_MEDIATION_TOTAL_YIELD_PARTNERS"] = 442; + values[valuesById[363] = "ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS"] = 363; + values[valuesById[364] = "ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS"] = 364; + values[valuesById[365] = "ATN_MEDIATION_VALID_AD_REQUESTS"] = 365; + values[valuesById[475] = "ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS"] = 475; + values[valuesById[366] = "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS"] = 366; + values[valuesById[367] = "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT"] = 367; + values[valuesById[368] = "ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS"] = 368; + values[valuesById[369] = "ATN_PROGRAMMATIC_BIDS_IN_AUCTION"] = 369; + values[valuesById[370] = "ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS"] = 370; + values[valuesById[371] = "ATN_PROGRAMMATIC_BID_REQUESTS_SENT"] = 371; + values[valuesById[372] = "ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE"] = 372; + values[valuesById[373] = "ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES"] = 373; + values[valuesById[374] = "ATN_PROGRAMMATIC_BID_REQUEST_ERRORS"] = 374; + values[valuesById[375] = "ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS"] = 375; + values[valuesById[376] = "ATN_PROGRAMMATIC_REJECTED_BIDS"] = 376; + values[valuesById[377] = "ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS"] = 377; + values[valuesById[378] = "ATN_PROGRAMMATIC_TOTAL_BIDS"] = 378; + values[valuesById[379] = "ATN_PROGRAMMATIC_VALID_AD_REQUESTS"] = 379; + values[valuesById[380] = "ATN_REJECTED_LINE_ITEMS"] = 380; + values[valuesById[381] = "ATN_SERVED_MEDIATION_CHAINS"] = 381; + values[valuesById[382] = "ATN_SERVED_SINGLE_ADS"] = 382; + values[valuesById[383] = "ATN_TARGETED_LINE_ITEMS"] = 383; + values[valuesById[384] = "ATN_TOTAL_AD_REQUESTS"] = 384; + values[valuesById[385] = "ATN_TOTAL_COMPETING_ADS_IN_AUCTION"] = 385; + values[valuesById[387] = "ATN_TOTAL_LOADED_ADS"] = 387; + values[valuesById[389] = "ATN_VALID_AD_REQUESTS"] = 389; + values[valuesById[390] = "ATN_YIELD_GROUP_MEDIATION_PASSBACKS"] = 390; + values[valuesById[37] = "AVERAGE_ECPM"] = 37; + values[valuesById[5] = "AVERAGE_ECPM_WITHOUT_CPD"] = 5; + values[valuesById[224] = "AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION"] = 224; + values[valuesById[225] = "AVERAGE_ENGAGEMENT_SECONDS_PER_USER"] = 225; + values[valuesById[418] = "AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR"] = 418; + values[valuesById[226] = "AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER"] = 226; + values[valuesById[227] = "AVERAGE_REVENUE_PER_USER"] = 227; + values[valuesById[228] = "AVERAGE_SESSION_SECONDS"] = 228; + values[valuesById[443] = "BIDS"] = 443; + values[valuesById[444] = "BID_AVERAGE_CPM"] = 444; + values[valuesById[433] = "BOUNCE_RATE"] = 433; + values[valuesById[2] = "CLICKS"] = 2; + values[valuesById[44] = "CODE_SERVED_COUNT"] = 44; + values[valuesById[440] = "CPC_REVENUE"] = 440; + values[valuesById[441] = "CPM_REVENUE"] = 441; + values[valuesById[324] = "CREATIVE_LOAD_TIME_0_500_PERCENT"] = 324; + values[valuesById[326] = "CREATIVE_LOAD_TIME_1000_2000_PERCENT"] = 326; + values[valuesById[327] = "CREATIVE_LOAD_TIME_2000_4000_PERCENT"] = 327; + values[valuesById[328] = "CREATIVE_LOAD_TIME_4000_8000_PERCENT"] = 328; + values[valuesById[325] = "CREATIVE_LOAD_TIME_500_1000_PERCENT"] = 325; + values[valuesById[329] = "CREATIVE_LOAD_TIME_GT_8000_PERCENT"] = 329; + values[valuesById[3] = "CTR"] = 3; + values[valuesById[542] = "DEALS_BIDS"] = 542; + values[valuesById[543] = "DEALS_BID_RATE"] = 543; + values[valuesById[544] = "DEALS_BID_REQUESTS"] = 544; + values[valuesById[545] = "DEALS_WINNING_BIDS"] = 545; + values[valuesById[546] = "DEALS_WIN_RATE"] = 546; + values[valuesById[521] = "DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT"] = 521; + values[valuesById[522] = "DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT"] = 522; + values[valuesById[523] = "DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT"] = 523; + values[valuesById[524] = "DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT"] = 524; + values[valuesById[525] = "DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT"] = 525; + values[valuesById[520] = "DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT"] = 520; + values[valuesById[526] = "DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT"] = 526; + values[valuesById[527] = "DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT"] = 527; + values[valuesById[528] = "DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT"] = 528; + values[valuesById[529] = "DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT"] = 529; + values[valuesById[531] = "DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT"] = 531; + values[valuesById[530] = "DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT"] = 530; + values[valuesById[415] = "DROPOFF_RATE"] = 415; + values[valuesById[229] = "ENGAGED_SESSIONS"] = 229; + values[valuesById[230] = "ENGAGED_SESSIONS_PER_USER"] = 230; + values[valuesById[426] = "ENGAGEMENT_RATE"] = 426; + values[valuesById[270] = "EUROPEAN_REGULATIONS_CONSENT_RATE"] = 270; + values[valuesById[271] = "EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE"] = 271; + values[valuesById[272] = "EUROPEAN_REGULATIONS_MESSAGES_SHOWN"] = 272; + values[valuesById[273] = "EUROPEAN_REGULATIONS_NO_CONSENT_RATE"] = 273; + values[valuesById[258] = "FILL_RATE"] = 258; + values[valuesById[231] = "GOOGLE_ANALYTICS_CLICKS"] = 231; + values[valuesById[232] = "GOOGLE_ANALYTICS_CTR"] = 232; + values[valuesById[233] = "GOOGLE_ANALYTICS_ECPM"] = 233; + values[valuesById[234] = "GOOGLE_ANALYTICS_IMPRESSIONS"] = 234; + values[valuesById[235] = "GOOGLE_ANALYTICS_REVENUE"] = 235; + values[valuesById[236] = "GOOGLE_ANALYTICS_VIEWS"] = 236; + values[valuesById[237] = "GOOGLE_ANALYTICS_VIEWS_PER_USER"] = 237; + values[valuesById[129] = "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS"] = 129; + values[valuesById[128] = "GOOGLE_SOLD_AUCTION_IMPRESSIONS"] = 128; + values[valuesById[131] = "GOOGLE_SOLD_COVIEWED_IMPRESSIONS"] = 131; + values[valuesById[130] = "GOOGLE_SOLD_IMPRESSIONS"] = 130; + values[valuesById[127] = "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS"] = 127; + values[valuesById[126] = "GOOGLE_SOLD_RESERVATION_IMPRESSIONS"] = 126; + values[valuesById[1] = "IMPRESSIONS"] = 1; + values[valuesById[407] = "INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS"] = 407; + values[valuesById[547] = "INVENTORY_SHARES"] = 547; + values[valuesById[548] = "INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES"] = 548; + values[valuesById[404] = "INVOICED_IMPRESSIONS"] = 404; + values[valuesById[405] = "INVOICED_UNFILLED_IMPRESSIONS"] = 405; + values[valuesById[584] = "MEDIATION_CHAINS_FILLED"] = 584; + values[valuesById[412] = "MUTED_IMPRESSIONS"] = 412; + values[valuesById[409] = "MUTE_ELIGIBLE_IMPRESSIONS"] = 409; + values[valuesById[463] = "OPPORTUNITIES"] = 463; + values[valuesById[432] = "OVERDELIVERED_IMPRESSIONS"] = 432; + values[valuesById[135] = "PARTNER_SALES_FILLED_POD_REQUESTS"] = 135; + values[valuesById[136] = "PARTNER_SALES_FILL_RATE"] = 136; + values[valuesById[137] = "PARTNER_SALES_PARTNER_MATCH_RATE"] = 137; + values[valuesById[132] = "PARTNER_SALES_QUERIES"] = 132; + values[valuesById[133] = "PARTNER_SALES_UNFILLED_IMPRESSIONS"] = 133; + values[valuesById[134] = "PARTNER_SALES_UNMATCHED_QUERIES"] = 134; + values[valuesById[125] = "PARTNER_SOLD_CODE_SERVED"] = 125; + values[valuesById[124] = "PARTNER_SOLD_COVIEWED_IMPRESSIONS"] = 124; + values[valuesById[123] = "PARTNER_SOLD_IMPRESSIONS"] = 123; + values[valuesById[177] = "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS"] = 177; + values[valuesById[178] = "PROGRAMMATIC_MATCH_RATE"] = 178; + values[valuesById[176] = "PROGRAMMATIC_RESPONSES_SERVED"] = 176; + values[valuesById[416] = "REACH_IMPRESSIONS"] = 416; + values[valuesById[39] = "RESPONSES_SERVED"] = 39; + values[valuesById[238] = "RETENTION"] = 238; + values[valuesById[36] = "REVENUE"] = 36; + values[valuesById[214] = "REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT"] = 214; + values[valuesById[4] = "REVENUE_WITHOUT_CPD"] = 4; + values[valuesById[413] = "REWARDS_GRANTED"] = 413; + values[valuesById[587] = "RICH_MEDIA_AVERAGE_DISPLAY_TIME"] = 587; + values[valuesById[588] = "RICH_MEDIA_AVERAGE_INTERACTION_TIME"] = 588; + values[valuesById[589] = "RICH_MEDIA_BACKUP_IMAGES"] = 589; + values[valuesById[599] = "RICH_MEDIA_CUSTOM_EVENT_COUNT"] = 599; + values[valuesById[600] = "RICH_MEDIA_CUSTOM_EVENT_TIME"] = 600; + values[valuesById[590] = "RICH_MEDIA_DISPLAY_TIME"] = 590; + values[valuesById[591] = "RICH_MEDIA_EXPANDING_TIME"] = 591; + values[valuesById[592] = "RICH_MEDIA_EXPANSIONS"] = 592; + values[valuesById[593] = "RICH_MEDIA_FULL_SCREEN_IMPRESSIONS"] = 593; + values[valuesById[594] = "RICH_MEDIA_INTERACTION_COUNT"] = 594; + values[valuesById[595] = "RICH_MEDIA_INTERACTION_RATE"] = 595; + values[valuesById[596] = "RICH_MEDIA_INTERACTION_TIME"] = 596; + values[valuesById[597] = "RICH_MEDIA_INTERACTIVE_IMPRESSIONS"] = 597; + values[valuesById[598] = "RICH_MEDIA_MANUAL_CLOSES"] = 598; + values[valuesById[503] = "RICH_MEDIA_VIDEO_COMPLETES"] = 503; + values[valuesById[505] = "RICH_MEDIA_VIDEO_INTERACTIONS"] = 505; + values[valuesById[504] = "RICH_MEDIA_VIDEO_INTERACTION_RATE"] = 504; + values[valuesById[506] = "RICH_MEDIA_VIDEO_MIDPOINTS"] = 506; + values[valuesById[507] = "RICH_MEDIA_VIDEO_MUTES"] = 507; + values[valuesById[508] = "RICH_MEDIA_VIDEO_PAUSES"] = 508; + values[valuesById[509] = "RICH_MEDIA_VIDEO_PLAYS"] = 509; + values[valuesById[510] = "RICH_MEDIA_VIDEO_REPLAYS"] = 510; + values[valuesById[511] = "RICH_MEDIA_VIDEO_STOPS"] = 511; + values[valuesById[512] = "RICH_MEDIA_VIDEO_UNMUTES"] = 512; + values[valuesById[513] = "RICH_MEDIA_VIDEO_VIEW_RATE"] = 513; + values[valuesById[514] = "RICH_MEDIA_VIDEO_VIEW_TIME"] = 514; + values[valuesById[477] = "SELL_THROUGH_AVAILABLE_IMPRESSIONS"] = 477; + values[valuesById[478] = "SELL_THROUGH_FORECASTED_IMPRESSIONS"] = 478; + values[valuesById[479] = "SELL_THROUGH_RESERVED_IMPRESSIONS"] = 479; + values[valuesById[480] = "SELL_THROUGH_SELL_THROUGH_RATE"] = 480; + values[valuesById[434] = "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS"] = 434; + values[valuesById[435] = "SERVER_SIDE_UNWRAPPING_CALLOUTS"] = 435; + values[valuesById[436] = "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES"] = 436; + values[valuesById[437] = "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES"] = 437; + values[valuesById[438] = "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES"] = 438; + values[valuesById[439] = "SERVER_SIDE_UNWRAPPING_TIMEOUTS"] = 439; + values[valuesById[239] = "SESSIONS"] = 239; + values[valuesById[455] = "TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT"] = 455; + values[valuesById[457] = "TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT"] = 457; + values[valuesById[458] = "TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT"] = 458; + values[valuesById[459] = "TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT"] = 459; + values[valuesById[456] = "TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT"] = 456; + values[valuesById[460] = "TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT"] = 460; + values[valuesById[276] = "TARGETED_CLICKS"] = 276; + values[valuesById[277] = "TARGETED_IMPRESSIONS"] = 277; + values[valuesById[45] = "UNFILLED_IMPRESSIONS"] = 45; + values[valuesById[417] = "UNIQUE_VISITORS"] = 417; + values[valuesById[408] = "UNLOADED_IMPRESSIONS_DUE_TO_CPU"] = 408; + values[valuesById[406] = "UNLOADED_IMPRESSIONS_DUE_TO_NETWORK"] = 406; + values[valuesById[43] = "UNMATCHED_AD_REQUESTS"] = 43; + values[valuesById[550] = "UNVIEWED_REASON_OTHER_PERCENT"] = 550; + values[valuesById[553] = "UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT"] = 553; + values[valuesById[551] = "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT"] = 551; + values[valuesById[552] = "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT"] = 552; + values[valuesById[549] = "UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT"] = 549; + values[valuesById[240] = "USER_ENGAGEMENT_DURATION_IN_SECONDS"] = 240; + values[valuesById[486] = "USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE"] = 486; + values[valuesById[487] = "USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT"] = 487; + values[valuesById[488] = "USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN"] = 488; + values[valuesById[489] = "USER_MESSAGES_ALLOW_ADS_PAGEVIEWS"] = 489; + values[valuesById[490] = "USER_MESSAGES_CCPA_MESSAGES_SHOWN"] = 490; + values[valuesById[491] = "USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN"] = 491; + values[valuesById[492] = "USER_MESSAGES_IDFA_ATT_CONSENT"] = 492; + values[valuesById[493] = "USER_MESSAGES_IDFA_ATT_CONSENT_RATE"] = 493; + values[valuesById[494] = "USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT"] = 494; + values[valuesById[495] = "USER_MESSAGES_IDFA_ATT_DECLINE_RATE"] = 495; + values[valuesById[496] = "USER_MESSAGES_IDFA_EXPLAINERS_SHOWN"] = 496; + values[valuesById[497] = "USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN"] = 497; + values[valuesById[498] = "USER_MESSAGES_IDFA_NO_DECISION"] = 498; + values[valuesById[121] = "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN"] = 121; + values[valuesById[122] = "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS"] = 122; + values[valuesById[499] = "USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS"] = 499; + values[valuesById[500] = "USER_MESSAGES_TOTAL_ESTIMATED_REVENUE"] = 500; + values[valuesById[501] = "USER_MESSAGES_UPTC_MESSAGES_SHOWN"] = 501; + values[valuesById[502] = "USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO"] = 502; + values[valuesById[180] = "VIDEO_ERROR_100_COUNT"] = 180; + values[valuesById[181] = "VIDEO_ERROR_101_COUNT"] = 181; + values[valuesById[182] = "VIDEO_ERROR_102_COUNT"] = 182; + values[valuesById[183] = "VIDEO_ERROR_200_COUNT"] = 183; + values[valuesById[184] = "VIDEO_ERROR_201_COUNT"] = 184; + values[valuesById[185] = "VIDEO_ERROR_202_COUNT"] = 185; + values[valuesById[186] = "VIDEO_ERROR_203_COUNT"] = 186; + values[valuesById[187] = "VIDEO_ERROR_300_COUNT"] = 187; + values[valuesById[188] = "VIDEO_ERROR_301_COUNT"] = 188; + values[valuesById[189] = "VIDEO_ERROR_302_COUNT"] = 189; + values[valuesById[190] = "VIDEO_ERROR_303_COUNT"] = 190; + values[valuesById[191] = "VIDEO_ERROR_400_COUNT"] = 191; + values[valuesById[192] = "VIDEO_ERROR_401_COUNT"] = 192; + values[valuesById[193] = "VIDEO_ERROR_402_COUNT"] = 193; + values[valuesById[194] = "VIDEO_ERROR_403_COUNT"] = 194; + values[valuesById[195] = "VIDEO_ERROR_405_COUNT"] = 195; + values[valuesById[196] = "VIDEO_ERROR_406_COUNT"] = 196; + values[valuesById[197] = "VIDEO_ERROR_407_COUNT"] = 197; + values[valuesById[198] = "VIDEO_ERROR_408_COUNT"] = 198; + values[valuesById[199] = "VIDEO_ERROR_409_COUNT"] = 199; + values[valuesById[200] = "VIDEO_ERROR_410_COUNT"] = 200; + values[valuesById[201] = "VIDEO_ERROR_500_COUNT"] = 201; + values[valuesById[202] = "VIDEO_ERROR_501_COUNT"] = 202; + values[valuesById[203] = "VIDEO_ERROR_502_COUNT"] = 203; + values[valuesById[204] = "VIDEO_ERROR_503_COUNT"] = 204; + values[valuesById[205] = "VIDEO_ERROR_600_COUNT"] = 205; + values[valuesById[206] = "VIDEO_ERROR_601_COUNT"] = 206; + values[valuesById[207] = "VIDEO_ERROR_602_COUNT"] = 207; + values[valuesById[208] = "VIDEO_ERROR_603_COUNT"] = 208; + values[valuesById[209] = "VIDEO_ERROR_604_COUNT"] = 209; + values[valuesById[210] = "VIDEO_ERROR_900_COUNT"] = 210; + values[valuesById[211] = "VIDEO_ERROR_901_COUNT"] = 211; + values[valuesById[92] = "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE"] = 92; + values[valuesById[93] = "VIDEO_INTERACTION_COLLAPSES"] = 93; + values[valuesById[95] = "VIDEO_INTERACTION_EXPANDS"] = 95; + values[valuesById[96] = "VIDEO_INTERACTION_FULL_SCREENS"] = 96; + values[valuesById[97] = "VIDEO_INTERACTION_MUTES"] = 97; + values[valuesById[98] = "VIDEO_INTERACTION_PAUSES"] = 98; + values[valuesById[99] = "VIDEO_INTERACTION_RESUMES"] = 99; + values[valuesById[100] = "VIDEO_INTERACTION_REWINDS"] = 100; + values[valuesById[101] = "VIDEO_INTERACTION_UNMUTES"] = 101; + values[valuesById[102] = "VIDEO_INTERACTION_VIDEO_SKIPS"] = 102; + values[valuesById[601] = "VIDEO_MONETIZABLE_CONTENT_VIEWS"] = 601; + values[valuesById[139] = "VIDEO_REAL_TIME_CREATIVE_SERVES"] = 139; + values[valuesById[143] = "VIDEO_REAL_TIME_ERROR_100_COUNT"] = 143; + values[valuesById[144] = "VIDEO_REAL_TIME_ERROR_101_COUNT"] = 144; + values[valuesById[145] = "VIDEO_REAL_TIME_ERROR_102_COUNT"] = 145; + values[valuesById[146] = "VIDEO_REAL_TIME_ERROR_200_COUNT"] = 146; + values[valuesById[147] = "VIDEO_REAL_TIME_ERROR_201_COUNT"] = 147; + values[valuesById[148] = "VIDEO_REAL_TIME_ERROR_202_COUNT"] = 148; + values[valuesById[149] = "VIDEO_REAL_TIME_ERROR_203_COUNT"] = 149; + values[valuesById[150] = "VIDEO_REAL_TIME_ERROR_300_COUNT"] = 150; + values[valuesById[151] = "VIDEO_REAL_TIME_ERROR_301_COUNT"] = 151; + values[valuesById[152] = "VIDEO_REAL_TIME_ERROR_302_COUNT"] = 152; + values[valuesById[153] = "VIDEO_REAL_TIME_ERROR_303_COUNT"] = 153; + values[valuesById[154] = "VIDEO_REAL_TIME_ERROR_400_COUNT"] = 154; + values[valuesById[155] = "VIDEO_REAL_TIME_ERROR_401_COUNT"] = 155; + values[valuesById[156] = "VIDEO_REAL_TIME_ERROR_402_COUNT"] = 156; + values[valuesById[157] = "VIDEO_REAL_TIME_ERROR_403_COUNT"] = 157; + values[valuesById[158] = "VIDEO_REAL_TIME_ERROR_405_COUNT"] = 158; + values[valuesById[159] = "VIDEO_REAL_TIME_ERROR_406_COUNT"] = 159; + values[valuesById[160] = "VIDEO_REAL_TIME_ERROR_407_COUNT"] = 160; + values[valuesById[161] = "VIDEO_REAL_TIME_ERROR_408_COUNT"] = 161; + values[valuesById[162] = "VIDEO_REAL_TIME_ERROR_409_COUNT"] = 162; + values[valuesById[163] = "VIDEO_REAL_TIME_ERROR_410_COUNT"] = 163; + values[valuesById[164] = "VIDEO_REAL_TIME_ERROR_500_COUNT"] = 164; + values[valuesById[165] = "VIDEO_REAL_TIME_ERROR_501_COUNT"] = 165; + values[valuesById[166] = "VIDEO_REAL_TIME_ERROR_502_COUNT"] = 166; + values[valuesById[167] = "VIDEO_REAL_TIME_ERROR_503_COUNT"] = 167; + values[valuesById[168] = "VIDEO_REAL_TIME_ERROR_600_COUNT"] = 168; + values[valuesById[169] = "VIDEO_REAL_TIME_ERROR_601_COUNT"] = 169; + values[valuesById[170] = "VIDEO_REAL_TIME_ERROR_602_COUNT"] = 170; + values[valuesById[171] = "VIDEO_REAL_TIME_ERROR_603_COUNT"] = 171; + values[valuesById[172] = "VIDEO_REAL_TIME_ERROR_604_COUNT"] = 172; + values[valuesById[173] = "VIDEO_REAL_TIME_ERROR_900_COUNT"] = 173; + values[valuesById[174] = "VIDEO_REAL_TIME_ERROR_901_COUNT"] = 174; + values[valuesById[138] = "VIDEO_REAL_TIME_IMPRESSIONS"] = 138; + values[valuesById[140] = "VIDEO_REAL_TIME_MATCHED_QUERIES"] = 140; + values[valuesById[175] = "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT"] = 175; + values[valuesById[142] = "VIDEO_REAL_TIME_TOTAL_QUERIES"] = 142; + values[valuesById[141] = "VIDEO_REAL_TIME_UNMATCHED_QUERIES"] = 141; + values[valuesById[103] = "VIDEO_VIEWERSHIP_AUTO_PLAYS"] = 103; + values[valuesById[104] = "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE"] = 104; + values[valuesById[105] = "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME"] = 105; + values[valuesById[106] = "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS"] = 106; + values[valuesById[107] = "VIDEO_VIEWERSHIP_COMPLETES"] = 107; + values[valuesById[108] = "VIDEO_VIEWERSHIP_COMPLETION_RATE"] = 108; + values[valuesById[109] = "VIDEO_VIEWERSHIP_ENGAGED_VIEWS"] = 109; + values[valuesById[110] = "VIDEO_VIEWERSHIP_FIRST_QUARTILES"] = 110; + values[valuesById[111] = "VIDEO_VIEWERSHIP_MIDPOINTS"] = 111; + values[valuesById[112] = "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN"] = 112; + values[valuesById[113] = "VIDEO_VIEWERSHIP_STARTS"] = 113; + values[valuesById[114] = "VIDEO_VIEWERSHIP_THIRD_QUARTILES"] = 114; + values[valuesById[115] = "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT"] = 115; + values[valuesById[94] = "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE"] = 94; + values[valuesById[116] = "VIDEO_VIEWERSHIP_VIDEO_LENGTH"] = 116; + values[valuesById[117] = "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE"] = 117; + values[valuesById[80] = "YIELD_GROUP_AUCTIONS_WON"] = 80; + values[valuesById[81] = "YIELD_GROUP_BIDS"] = 81; + values[valuesById[82] = "YIELD_GROUP_BIDS_IN_AUCTION"] = 82; + values[valuesById[83] = "YIELD_GROUP_CALLOUTS"] = 83; + values[valuesById[88] = "YIELD_GROUP_ESTIMATED_CPM"] = 88; + values[valuesById[87] = "YIELD_GROUP_ESTIMATED_REVENUE"] = 87; + values[valuesById[85] = "YIELD_GROUP_IMPRESSIONS"] = 85; + values[valuesById[89] = "YIELD_GROUP_MEDIATION_FILL_RATE"] = 89; + values[valuesById[86] = "YIELD_GROUP_MEDIATION_MATCHED_QUERIES"] = 86; + values[valuesById[118] = "YIELD_GROUP_MEDIATION_PASSBACKS"] = 118; + values[valuesById[90] = "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM"] = 90; + values[valuesById[215] = "YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT"] = 215; + values[valuesById[84] = "YIELD_GROUP_SUCCESSFUL_RESPONSES"] = 84; + return values; + })(); + + /** + * TimePeriodColumn enum. + * @name google.ads.admanager.v1.ReportDefinition.TimePeriodColumn + * @enum {number} + * @property {number} TIME_PERIOD_COLUMN_UNSPECIFIED=0 TIME_PERIOD_COLUMN_UNSPECIFIED value + * @property {number} TIME_PERIOD_COLUMN_DATE=1 TIME_PERIOD_COLUMN_DATE value + * @property {number} TIME_PERIOD_COLUMN_WEEK=2 TIME_PERIOD_COLUMN_WEEK value + * @property {number} TIME_PERIOD_COLUMN_MONTH=3 TIME_PERIOD_COLUMN_MONTH value + * @property {number} TIME_PERIOD_COLUMN_QUARTER=4 TIME_PERIOD_COLUMN_QUARTER value + */ + ReportDefinition.TimePeriodColumn = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_PERIOD_COLUMN_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIME_PERIOD_COLUMN_DATE"] = 1; + values[valuesById[2] = "TIME_PERIOD_COLUMN_WEEK"] = 2; + values[valuesById[3] = "TIME_PERIOD_COLUMN_MONTH"] = 3; + values[valuesById[4] = "TIME_PERIOD_COLUMN_QUARTER"] = 4; + return values; + })(); + + /** + * MetricValueType enum. + * @name google.ads.admanager.v1.ReportDefinition.MetricValueType + * @enum {number} + * @property {number} PRIMARY=0 PRIMARY value + * @property {number} PRIMARY_PERCENT_OF_TOTAL=1 PRIMARY_PERCENT_OF_TOTAL value + * @property {number} COMPARISON=2 COMPARISON value + * @property {number} COMPARISON_PERCENT_OF_TOTAL=3 COMPARISON_PERCENT_OF_TOTAL value + * @property {number} ABSOLUTE_CHANGE=4 ABSOLUTE_CHANGE value + * @property {number} RELATIVE_CHANGE=5 RELATIVE_CHANGE value + */ + ReportDefinition.MetricValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIMARY"] = 0; + values[valuesById[1] = "PRIMARY_PERCENT_OF_TOTAL"] = 1; + values[valuesById[2] = "COMPARISON"] = 2; + values[valuesById[3] = "COMPARISON_PERCENT_OF_TOTAL"] = 3; + values[valuesById[4] = "ABSOLUTE_CHANGE"] = 4; + values[valuesById[5] = "RELATIVE_CHANGE"] = 5; + return values; + })(); + + /** + * TimeZoneSource enum. + * @name google.ads.admanager.v1.ReportDefinition.TimeZoneSource + * @enum {number} + * @property {number} TIME_ZONE_SOURCE_UNSPECIFIED=0 TIME_ZONE_SOURCE_UNSPECIFIED value + * @property {number} PUBLISHER=1 PUBLISHER value + * @property {number} AD_EXCHANGE=2 AD_EXCHANGE value + * @property {number} UTC=3 UTC value + * @property {number} PROVIDED=4 PROVIDED value + */ + ReportDefinition.TimeZoneSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_ZONE_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUBLISHER"] = 1; + values[valuesById[2] = "AD_EXCHANGE"] = 2; + values[valuesById[3] = "UTC"] = 3; + values[valuesById[4] = "PROVIDED"] = 4; + return values; + })(); + + return ReportDefinition; + })(); + + v1.ReportValue = (function() { + + /** + * Properties of a ReportValue. + * @memberof google.ads.admanager.v1 + * @interface IReportValue + * @property {number|Long|null} [intValue] ReportValue intValue + * @property {number|null} [doubleValue] ReportValue doubleValue + * @property {string|null} [stringValue] ReportValue stringValue + * @property {boolean|null} [boolValue] ReportValue boolValue + * @property {google.ads.admanager.v1.ReportValue.IIntList|null} [intListValue] ReportValue intListValue + * @property {google.ads.admanager.v1.ReportValue.IStringList|null} [stringListValue] ReportValue stringListValue + * @property {google.ads.admanager.v1.ReportValue.IDoubleList|null} [doubleListValue] ReportValue doubleListValue + * @property {Uint8Array|null} [bytesValue] ReportValue bytesValue + */ + + /** + * Constructs a new ReportValue. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ReportValue. + * @implements IReportValue + * @constructor + * @param {google.ads.admanager.v1.IReportValue=} [properties] Properties to set + */ + function ReportValue(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]]; + } + + /** + * ReportValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.intValue = null; + + /** + * ReportValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.doubleValue = null; + + /** + * ReportValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.stringValue = null; + + /** + * ReportValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.boolValue = null; + + /** + * ReportValue intListValue. + * @member {google.ads.admanager.v1.ReportValue.IIntList|null|undefined} intListValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.intListValue = null; + + /** + * ReportValue stringListValue. + * @member {google.ads.admanager.v1.ReportValue.IStringList|null|undefined} stringListValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.stringListValue = null; + + /** + * ReportValue doubleListValue. + * @member {google.ads.admanager.v1.ReportValue.IDoubleList|null|undefined} doubleListValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.doubleListValue = null; + + /** + * ReportValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + ReportValue.prototype.bytesValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReportValue value. + * @member {"intValue"|"doubleValue"|"stringValue"|"boolValue"|"intListValue"|"stringListValue"|"doubleListValue"|"bytesValue"|undefined} value + * @memberof google.ads.admanager.v1.ReportValue + * @instance + */ + Object.defineProperty(ReportValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue", "boolValue", "intListValue", "stringListValue", "doubleListValue", "bytesValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportValue instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {google.ads.admanager.v1.IReportValue=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportValue} ReportValue instance + */ + ReportValue.create = function create(properties) { + return new ReportValue(properties); + }; + + /** + * Encodes the specified ReportValue message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {google.ads.admanager.v1.IReportValue} message ReportValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.intValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + 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.intListValue != null && Object.hasOwnProperty.call(message, "intListValue")) + $root.google.ads.admanager.v1.ReportValue.IntList.encode(message.intListValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.stringListValue != null && Object.hasOwnProperty.call(message, "stringListValue")) + $root.google.ads.admanager.v1.ReportValue.StringList.encode(message.stringListValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.bytesValue); + if (message.doubleListValue != null && Object.hasOwnProperty.call(message, "doubleListValue")) + $root.google.ads.admanager.v1.ReportValue.DoubleList.encode(message.doubleListValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportValue message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {google.ads.admanager.v1.IReportValue} message ReportValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportValue message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportValue} ReportValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.intValue = reader.int64(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID": - case 20014: - message.dimensions[i] = 20014; + } + case 2: { + message.doubleValue = reader.double(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE": - case 21000: - message.dimensions[i] = 21000; + } + case 3: { + message.stringValue = reader.string(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE": - case 21001: - message.dimensions[i] = 21001; + } + case 4: { + message.boolValue = reader.bool(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE": - case 21002: - message.dimensions[i] = 21002; + } + case 6: { + message.intListValue = $root.google.ads.admanager.v1.ReportValue.IntList.decode(reader, reader.uint32()); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE": - case 21003: - message.dimensions[i] = 21003; + } + case 7: { + message.stringListValue = $root.google.ads.admanager.v1.ReportValue.StringList.decode(reader, reader.uint32()); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE": - case 21004: - message.dimensions[i] = 21004; + } + case 9: { + message.doubleListValue = $root.google.ads.admanager.v1.ReportValue.DoubleList.decode(reader, reader.uint32()); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE": - case 21005: - message.dimensions[i] = 21005; + } + case 8: { + message.bytesValue = reader.bytes(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE": - case 21006: - message.dimensions[i] = 21006; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportValue} ReportValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportValue message. + * @function verify + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.intListValue != null && message.hasOwnProperty("intListValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.ads.admanager.v1.ReportValue.IntList.verify(message.intListValue); + if (error) + return "intListValue." + error; + } + } + if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.ads.admanager.v1.ReportValue.StringList.verify(message.stringListValue); + if (error) + return "stringListValue." + error; + } + } + if (message.doubleListValue != null && message.hasOwnProperty("doubleListValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.ads.admanager.v1.ReportValue.DoubleList.verify(message.doubleListValue); + if (error) + return "doubleListValue." + error; + } + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + return null; + }; + + /** + * Creates a ReportValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportValue} ReportValue + */ + ReportValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportValue) + return object; + var message = new $root.google.ads.admanager.v1.ReportValue(); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.intListValue != null) { + if (typeof object.intListValue !== "object") + throw TypeError(".google.ads.admanager.v1.ReportValue.intListValue: object expected"); + message.intListValue = $root.google.ads.admanager.v1.ReportValue.IntList.fromObject(object.intListValue); + } + if (object.stringListValue != null) { + if (typeof object.stringListValue !== "object") + throw TypeError(".google.ads.admanager.v1.ReportValue.stringListValue: object expected"); + message.stringListValue = $root.google.ads.admanager.v1.ReportValue.StringList.fromObject(object.stringListValue); + } + if (object.doubleListValue != null) { + if (typeof object.doubleListValue !== "object") + throw TypeError(".google.ads.admanager.v1.ReportValue.doubleListValue: object expected"); + message.doubleListValue = $root.google.ads.admanager.v1.ReportValue.DoubleList.fromObject(object.doubleListValue); + } + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + return message; + }; + + /** + * Creates a plain object from a ReportValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {google.ads.admanager.v1.ReportValue} message ReportValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.value = "intValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.intListValue != null && message.hasOwnProperty("intListValue")) { + object.intListValue = $root.google.ads.admanager.v1.ReportValue.IntList.toObject(message.intListValue, options); + if (options.oneofs) + object.value = "intListValue"; + } + if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { + object.stringListValue = $root.google.ads.admanager.v1.ReportValue.StringList.toObject(message.stringListValue, options); + if (options.oneofs) + object.value = "stringListValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.value = "bytesValue"; + } + if (message.doubleListValue != null && message.hasOwnProperty("doubleListValue")) { + object.doubleListValue = $root.google.ads.admanager.v1.ReportValue.DoubleList.toObject(message.doubleListValue, options); + if (options.oneofs) + object.value = "doubleListValue"; + } + return object; + }; + + /** + * Converts this ReportValue to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportValue + * @instance + * @returns {Object.} JSON object + */ + ReportValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportValue + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportValue"; + }; + + ReportValue.IntList = (function() { + + /** + * Properties of an IntList. + * @memberof google.ads.admanager.v1.ReportValue + * @interface IIntList + * @property {Array.|null} [values] IntList values + */ + + /** + * Constructs a new IntList. + * @memberof google.ads.admanager.v1.ReportValue + * @classdesc Represents an IntList. + * @implements IIntList + * @constructor + * @param {google.ads.admanager.v1.ReportValue.IIntList=} [properties] Properties to set + */ + function IntList(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]]; + } + + /** + * IntList values. + * @member {Array.} values + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @instance + */ + IntList.prototype.values = $util.emptyArray; + + /** + * Creates a new IntList instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {google.ads.admanager.v1.ReportValue.IIntList=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportValue.IntList} IntList instance + */ + IntList.create = function create(properties) { + return new IntList(properties); + }; + + /** + * Encodes the specified IntList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.IntList.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {google.ads.admanager.v1.ReportValue.IIntList} message IntList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.values.length; ++i) + writer.int64(message.values[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified IntList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.IntList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {google.ads.admanager.v1.ReportValue.IIntList} message IntList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportValue.IntList} IntList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportValue.IntList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE": - case 21007: - message.dimensions[i] = 21007; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.values.push(reader.int64()); + } else + message.values.push(reader.int64()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE": - case 21008: - message.dimensions[i] = 21008; + } + } + return message; + }; + + /** + * Decodes an IntList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportValue.IntList} IntList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntList message. + * @function verify + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntList.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) + if (!$util.isInteger(message.values[i]) && !(message.values[i] && $util.isInteger(message.values[i].low) && $util.isInteger(message.values[i].high))) + return "values: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates an IntList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportValue.IntList} IntList + */ + IntList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportValue.IntList) + return object; + var message = new $root.google.ads.admanager.v1.ReportValue.IntList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.ads.admanager.v1.ReportValue.IntList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + if ($util.Long) + (message.values[i] = $util.Long.fromValue(object.values[i])).unsigned = false; + else if (typeof object.values[i] === "string") + message.values[i] = parseInt(object.values[i], 10); + else if (typeof object.values[i] === "number") + message.values[i] = object.values[i]; + else if (typeof object.values[i] === "object") + message.values[i] = new $util.LongBits(object.values[i].low >>> 0, object.values[i].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from an IntList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {google.ads.admanager.v1.ReportValue.IntList} message IntList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntList.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) + if (typeof message.values[j] === "number") + object.values[j] = options.longs === String ? String(message.values[j]) : message.values[j]; + else + object.values[j] = options.longs === String ? $util.Long.prototype.toString.call(message.values[j]) : options.longs === Number ? new $util.LongBits(message.values[j].low >>> 0, message.values[j].high >>> 0).toNumber() : message.values[j]; + } + return object; + }; + + /** + * Converts this IntList to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @instance + * @returns {Object.} JSON object + */ + IntList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntList + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportValue.IntList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportValue.IntList"; + }; + + return IntList; + })(); + + ReportValue.StringList = (function() { + + /** + * Properties of a StringList. + * @memberof google.ads.admanager.v1.ReportValue + * @interface IStringList + * @property {Array.|null} [values] StringList values + */ + + /** + * Constructs a new StringList. + * @memberof google.ads.admanager.v1.ReportValue + * @classdesc Represents a StringList. + * @implements IStringList + * @constructor + * @param {google.ads.admanager.v1.ReportValue.IStringList=} [properties] Properties to set + */ + function StringList(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]]; + } + + /** + * StringList values. + * @member {Array.} values + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @instance + */ + StringList.prototype.values = $util.emptyArray; + + /** + * Creates a new StringList instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {google.ads.admanager.v1.ReportValue.IStringList=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportValue.StringList} StringList instance + */ + StringList.create = function create(properties) { + return new StringList(properties); + }; + + /** + * Encodes the specified StringList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.StringList.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {google.ads.admanager.v1.ReportValue.IStringList} message StringList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringList.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.StringList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {google.ads.admanager.v1.ReportValue.IStringList} message StringList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportValue.StringList} StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportValue.StringList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE": - case 21009: - message.dimensions[i] = 21009; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE": - case 21010: - message.dimensions[i] = 21010; + } + } + return message; + }; + + /** + * Decodes a StringList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportValue.StringList} StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringList message. + * @function verify + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringList.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a StringList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportValue.StringList} StringList + */ + StringList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportValue.StringList) + return object; + var message = new $root.google.ads.admanager.v1.ReportValue.StringList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.ads.admanager.v1.ReportValue.StringList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a StringList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {google.ads.admanager.v1.ReportValue.StringList} message StringList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringList.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] = message.values[j]; + } + return object; + }; + + /** + * Converts this StringList to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @instance + * @returns {Object.} JSON object + */ + StringList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringList + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportValue.StringList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportValue.StringList"; + }; + + return StringList; + })(); + + ReportValue.DoubleList = (function() { + + /** + * Properties of a DoubleList. + * @memberof google.ads.admanager.v1.ReportValue + * @interface IDoubleList + * @property {Array.|null} [values] DoubleList values + */ + + /** + * Constructs a new DoubleList. + * @memberof google.ads.admanager.v1.ReportValue + * @classdesc Represents a DoubleList. + * @implements IDoubleList + * @constructor + * @param {google.ads.admanager.v1.ReportValue.IDoubleList=} [properties] Properties to set + */ + function DoubleList(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]]; + } + + /** + * DoubleList values. + * @member {Array.} values + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @instance + */ + DoubleList.prototype.values = $util.emptyArray; + + /** + * Creates a new DoubleList instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {google.ads.admanager.v1.ReportValue.IDoubleList=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportValue.DoubleList} DoubleList instance + */ + DoubleList.create = function create(properties) { + return new DoubleList(properties); + }; + + /** + * Encodes the specified DoubleList message. Does not implicitly {@link google.ads.admanager.v1.ReportValue.DoubleList.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {google.ads.admanager.v1.ReportValue.IDoubleList} message DoubleList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.values.length; ++i) + writer.double(message.values[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DoubleList message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportValue.DoubleList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {google.ads.admanager.v1.ReportValue.IDoubleList} message DoubleList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportValue.DoubleList} DoubleList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportValue.DoubleList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE": - case 21011: - message.dimensions[i] = 21011; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.values.push(reader.double()); + } else + message.values.push(reader.double()); + break; + } + default: + reader.skipType(tag & 7); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE": - case 21012: - message.dimensions[i] = 21012; + } + } + return message; + }; + + /** + * Decodes a DoubleList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportValue.DoubleList} DoubleList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleList message. + * @function verify + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleList.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) + if (typeof message.values[i] !== "number") + return "values: number[] expected"; + } + return null; + }; + + /** + * Creates a DoubleList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportValue.DoubleList} DoubleList + */ + DoubleList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportValue.DoubleList) + return object; + var message = new $root.google.ads.admanager.v1.ReportValue.DoubleList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.ads.admanager.v1.ReportValue.DoubleList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = Number(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a DoubleList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {google.ads.admanager.v1.ReportValue.DoubleList} message DoubleList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleList.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] = options.json && !isFinite(message.values[j]) ? String(message.values[j]) : message.values[j]; + } + return object; + }; + + /** + * Converts this DoubleList to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @instance + * @returns {Object.} JSON object + */ + DoubleList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleList + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportValue.DoubleList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportValue.DoubleList"; + }; + + return DoubleList; + })(); + + return ReportValue; + })(); + + v1.Report = (function() { + + /** + * Properties of a Report. + * @memberof google.ads.admanager.v1 + * @interface IReport + * @property {string|null} [name] Report name + * @property {number|Long|null} [reportId] Report reportId + * @property {google.ads.admanager.v1.Report.Visibility|null} [visibility] Report visibility + * @property {google.ads.admanager.v1.IReportDefinition|null} [reportDefinition] Report reportDefinition + * @property {string|null} [displayName] Report displayName + * @property {google.protobuf.ITimestamp|null} [updateTime] Report updateTime + * @property {google.protobuf.ITimestamp|null} [createTime] Report createTime + * @property {string|null} [locale] Report locale + * @property {google.ads.admanager.v1.IScheduleOptions|null} [scheduleOptions] Report scheduleOptions + */ + + /** + * Constructs a new Report. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Report. + * @implements IReport + * @constructor + * @param {google.ads.admanager.v1.IReport=} [properties] Properties to set + */ + function Report(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]]; + } + + /** + * Report name. + * @member {string} name + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.name = ""; + + /** + * Report reportId. + * @member {number|Long} reportId + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.reportId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Report visibility. + * @member {google.ads.admanager.v1.Report.Visibility} visibility + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.visibility = 0; + + /** + * Report reportDefinition. + * @member {google.ads.admanager.v1.IReportDefinition|null|undefined} reportDefinition + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.reportDefinition = null; + + /** + * Report displayName. + * @member {string} displayName + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.displayName = ""; + + /** + * Report updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.updateTime = null; + + /** + * Report createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.createTime = null; + + /** + * Report locale. + * @member {string} locale + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.locale = ""; + + /** + * Report scheduleOptions. + * @member {google.ads.admanager.v1.IScheduleOptions|null|undefined} scheduleOptions + * @memberof google.ads.admanager.v1.Report + * @instance + */ + Report.prototype.scheduleOptions = null; + + /** + * Creates a new Report instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Report + * @static + * @param {google.ads.admanager.v1.IReport=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Report} Report instance + */ + Report.create = function create(properties) { + return new Report(properties); + }; + + /** + * Encodes the specified Report message. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Report + * @static + * @param {google.ads.admanager.v1.IReport} message Report message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Report.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.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.visibility); + if (message.reportId != null && Object.hasOwnProperty.call(message, "reportId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reportId); + if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) + $root.google.ads.admanager.v1.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.locale); + if (message.scheduleOptions != null && Object.hasOwnProperty.call(message, "scheduleOptions")) + $root.google.ads.admanager.v1.ScheduleOptions.encode(message.scheduleOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Report message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Report.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Report + * @static + * @param {google.ads.admanager.v1.IReport} message Report message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Report.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Report message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Report + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Report} Report + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Report.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Report(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE": - case 21013: - message.dimensions[i] = 21013; + } + case 3: { + message.reportId = reader.int64(); break; - case "BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE": - case 21014: - message.dimensions[i] = 21014; + } + case 2: { + message.visibility = reader.int32(); break; - case "CUSTOM_DIMENSION_0_VALUE_ID": - case 100000: - message.dimensions[i] = 100000; + } + case 4: { + message.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.decode(reader, reader.uint32()); break; - case "CUSTOM_DIMENSION_1_VALUE_ID": - case 100001: - message.dimensions[i] = 100001; + } + case 5: { + message.displayName = reader.string(); break; - case "CUSTOM_DIMENSION_2_VALUE_ID": - case 100002: - message.dimensions[i] = 100002; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "CUSTOM_DIMENSION_3_VALUE_ID": - case 100003: - message.dimensions[i] = 100003; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "CUSTOM_DIMENSION_4_VALUE_ID": - case 100004: - message.dimensions[i] = 100004; + } + case 8: { + message.locale = reader.string(); break; - case "CUSTOM_DIMENSION_5_VALUE_ID": - case 100005: - message.dimensions[i] = 100005; + } + case 9: { + message.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.decode(reader, reader.uint32()); break; - case "CUSTOM_DIMENSION_6_VALUE_ID": - case 100006: - message.dimensions[i] = 100006; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Report message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Report + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Report} Report + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Report.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Report message. + * @function verify + * @memberof google.ads.admanager.v1.Report + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Report.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.reportId != null && message.hasOwnProperty("reportId")) + if (!$util.isInteger(message.reportId) && !(message.reportId && $util.isInteger(message.reportId.low) && $util.isInteger(message.reportId.high))) + return "reportId: integer|Long expected"; + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { + var error = $root.google.ads.admanager.v1.ReportDefinition.verify(message.reportDefinition); + if (error) + return "reportDefinition." + error; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.locale != null && message.hasOwnProperty("locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) { + var error = $root.google.ads.admanager.v1.ScheduleOptions.verify(message.scheduleOptions); + if (error) + return "scheduleOptions." + error; + } + return null; + }; + + /** + * Creates a Report message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Report + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Report} Report + */ + Report.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Report) + return object; + var message = new $root.google.ads.admanager.v1.Report(); + if (object.name != null) + message.name = String(object.name); + if (object.reportId != null) + if ($util.Long) + (message.reportId = $util.Long.fromValue(object.reportId)).unsigned = false; + else if (typeof object.reportId === "string") + message.reportId = parseInt(object.reportId, 10); + else if (typeof object.reportId === "number") + message.reportId = object.reportId; + else if (typeof object.reportId === "object") + message.reportId = new $util.LongBits(object.reportId.low >>> 0, object.reportId.high >>> 0).toNumber(); + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "HIDDEN": + case 0: + message.visibility = 0; + break; + case "DRAFT": + case 1: + message.visibility = 1; + break; + case "SAVED": + case 2: + message.visibility = 2; + break; + } + if (object.reportDefinition != null) { + if (typeof object.reportDefinition !== "object") + throw TypeError(".google.ads.admanager.v1.Report.reportDefinition: object expected"); + message.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.fromObject(object.reportDefinition); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.ads.admanager.v1.Report.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.ads.admanager.v1.Report.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.locale != null) + message.locale = String(object.locale); + if (object.scheduleOptions != null) { + if (typeof object.scheduleOptions !== "object") + throw TypeError(".google.ads.admanager.v1.Report.scheduleOptions: object expected"); + message.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.fromObject(object.scheduleOptions); + } + return message; + }; + + /** + * Creates a plain object from a Report message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Report + * @static + * @param {google.ads.admanager.v1.Report} message Report + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Report.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.visibility = options.enums === String ? "HIDDEN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.reportId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.reportId = options.longs === String ? "0" : 0; + object.reportDefinition = null; + object.displayName = ""; + object.updateTime = null; + object.createTime = null; + object.locale = ""; + object.scheduleOptions = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.ads.admanager.v1.Report.Visibility[message.visibility] === undefined ? message.visibility : $root.google.ads.admanager.v1.Report.Visibility[message.visibility] : message.visibility; + if (message.reportId != null && message.hasOwnProperty("reportId")) + if (typeof message.reportId === "number") + object.reportId = options.longs === String ? String(message.reportId) : message.reportId; + else + object.reportId = options.longs === String ? $util.Long.prototype.toString.call(message.reportId) : options.longs === Number ? new $util.LongBits(message.reportId.low >>> 0, message.reportId.high >>> 0).toNumber() : message.reportId; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) + object.reportDefinition = $root.google.ads.admanager.v1.ReportDefinition.toObject(message.reportDefinition, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.locale != null && message.hasOwnProperty("locale")) + object.locale = message.locale; + if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) + object.scheduleOptions = $root.google.ads.admanager.v1.ScheduleOptions.toObject(message.scheduleOptions, options); + return object; + }; + + /** + * Converts this Report to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Report + * @instance + * @returns {Object.} JSON object + */ + Report.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Report + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Report + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Report.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Report"; + }; + + /** + * Visibility enum. + * @name google.ads.admanager.v1.Report.Visibility + * @enum {number} + * @property {number} HIDDEN=0 HIDDEN value + * @property {number} DRAFT=1 DRAFT value + * @property {number} SAVED=2 SAVED value + */ + Report.Visibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HIDDEN"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "SAVED"] = 2; + return values; + })(); + + return Report; + })(); + + v1.ReportDataTable = (function() { + + /** + * Properties of a ReportDataTable. + * @memberof google.ads.admanager.v1 + * @interface IReportDataTable + */ + + /** + * Constructs a new ReportDataTable. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ReportDataTable. + * @implements IReportDataTable + * @constructor + * @param {google.ads.admanager.v1.IReportDataTable=} [properties] Properties to set + */ + function ReportDataTable(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 ReportDataTable instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {google.ads.admanager.v1.IReportDataTable=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDataTable} ReportDataTable instance + */ + ReportDataTable.create = function create(properties) { + return new ReportDataTable(properties); + }; + + /** + * Encodes the specified ReportDataTable message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {google.ads.admanager.v1.IReportDataTable} message ReportDataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDataTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReportDataTable message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {google.ads.admanager.v1.IReportDataTable} message ReportDataTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDataTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDataTable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDataTable} ReportDataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDataTable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDataTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDataTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDataTable} ReportDataTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDataTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDataTable message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDataTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReportDataTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDataTable} ReportDataTable + */ + ReportDataTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDataTable) + return object; + return new $root.google.ads.admanager.v1.ReportDataTable(); + }; + + /** + * Creates a plain object from a ReportDataTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {google.ads.admanager.v1.ReportDataTable} message ReportDataTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDataTable.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReportDataTable to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDataTable + * @instance + * @returns {Object.} JSON object + */ + ReportDataTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDataTable + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDataTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDataTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDataTable"; + }; + + ReportDataTable.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.ads.admanager.v1.ReportDataTable + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValueGroups] Row metricValueGroups + */ + + /** + * Constructs a new Row. + * @memberof google.ads.admanager.v1.ReportDataTable + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.ads.admanager.v1.ReportDataTable.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValueGroups = []; + 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]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValueGroups. + * @member {Array.} metricValueGroups + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @instance + */ + Row.prototype.metricValueGroups = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IRow=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDataTable.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.Row.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValueGroups != null && message.metricValueGroups.length) + for (var i = 0; i < message.metricValueGroups.length; ++i) + $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup.encode(message.metricValueGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDataTable.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDataTable.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_7_VALUE_ID": - case 100007: - message.dimensions[i] = 100007; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValueGroups && message.metricValueGroups.length)) + message.metricValueGroups = []; + message.metricValueGroups.push($root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_8_VALUE_ID": - case 100008: - message.dimensions[i] = 100008; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDataTable.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValueGroups != null && message.hasOwnProperty("metricValueGroups")) { + if (!Array.isArray(message.metricValueGroups)) + return "metricValueGroups: array expected"; + for (var i = 0; i < message.metricValueGroups.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup.verify(message.metricValueGroups[i]); + if (error) + return "metricValueGroups." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDataTable.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDataTable.Row) + return object; + var message = new $root.google.ads.admanager.v1.ReportDataTable.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValueGroups) { + if (!Array.isArray(object.metricValueGroups)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.Row.metricValueGroups: array expected"); + message.metricValueGroups = []; + for (var i = 0; i < object.metricValueGroups.length; ++i) { + if (typeof object.metricValueGroups[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.Row.metricValueGroups: object expected"); + message.metricValueGroups[i] = $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup.fromObject(object.metricValueGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {google.ads.admanager.v1.ReportDataTable.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValueGroups = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValueGroups && message.metricValueGroups.length) { + object.metricValueGroups = []; + for (var j = 0; j < message.metricValueGroups.length; ++j) + object.metricValueGroups[j] = $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup.toObject(message.metricValueGroups[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDataTable.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDataTable.Row"; + }; + + return Row; + })(); + + ReportDataTable.MetricValueGroup = (function() { + + /** + * Properties of a MetricValueGroup. + * @memberof google.ads.admanager.v1.ReportDataTable + * @interface IMetricValueGroup + * @property {Array.|null} [primaryValues] MetricValueGroup primaryValues + * @property {Array.|null} [primaryPercentOfTotalValues] MetricValueGroup primaryPercentOfTotalValues + * @property {Array.|null} [comparisonValues] MetricValueGroup comparisonValues + * @property {Array.|null} [comparisonPercentOfTotalValues] MetricValueGroup comparisonPercentOfTotalValues + * @property {Array.|null} [absoluteChangeValues] MetricValueGroup absoluteChangeValues + * @property {Array.|null} [relativeChangeValues] MetricValueGroup relativeChangeValues + * @property {Array.|null} [flagValues] MetricValueGroup flagValues + */ + + /** + * Constructs a new MetricValueGroup. + * @memberof google.ads.admanager.v1.ReportDataTable + * @classdesc Represents a MetricValueGroup. + * @implements IMetricValueGroup + * @constructor + * @param {google.ads.admanager.v1.ReportDataTable.IMetricValueGroup=} [properties] Properties to set + */ + function MetricValueGroup(properties) { + this.primaryValues = []; + this.primaryPercentOfTotalValues = []; + this.comparisonValues = []; + this.comparisonPercentOfTotalValues = []; + this.absoluteChangeValues = []; + this.relativeChangeValues = []; + this.flagValues = []; + 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]]; + } + + /** + * MetricValueGroup primaryValues. + * @member {Array.} primaryValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.primaryValues = $util.emptyArray; + + /** + * MetricValueGroup primaryPercentOfTotalValues. + * @member {Array.} primaryPercentOfTotalValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.primaryPercentOfTotalValues = $util.emptyArray; + + /** + * MetricValueGroup comparisonValues. + * @member {Array.} comparisonValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.comparisonValues = $util.emptyArray; + + /** + * MetricValueGroup comparisonPercentOfTotalValues. + * @member {Array.} comparisonPercentOfTotalValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.comparisonPercentOfTotalValues = $util.emptyArray; + + /** + * MetricValueGroup absoluteChangeValues. + * @member {Array.} absoluteChangeValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.absoluteChangeValues = $util.emptyArray; + + /** + * MetricValueGroup relativeChangeValues. + * @member {Array.} relativeChangeValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.relativeChangeValues = $util.emptyArray; + + /** + * MetricValueGroup flagValues. + * @member {Array.} flagValues + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + */ + MetricValueGroup.prototype.flagValues = $util.emptyArray; + + /** + * Creates a new MetricValueGroup instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IMetricValueGroup=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ReportDataTable.MetricValueGroup} MetricValueGroup instance + */ + MetricValueGroup.create = function create(properties) { + return new MetricValueGroup(properties); + }; + + /** + * Encodes the specified MetricValueGroup message. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.MetricValueGroup.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IMetricValueGroup} message MetricValueGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValueGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryValues != null && message.primaryValues.length) + for (var i = 0; i < message.primaryValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.primaryValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.primaryPercentOfTotalValues != null && message.primaryPercentOfTotalValues.length) + for (var i = 0; i < message.primaryPercentOfTotalValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.primaryPercentOfTotalValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comparisonValues != null && message.comparisonValues.length) + for (var i = 0; i < message.comparisonValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.comparisonValues[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.comparisonPercentOfTotalValues != null && message.comparisonPercentOfTotalValues.length) + for (var i = 0; i < message.comparisonPercentOfTotalValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.comparisonPercentOfTotalValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.absoluteChangeValues != null && message.absoluteChangeValues.length) + for (var i = 0; i < message.absoluteChangeValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.absoluteChangeValues[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relativeChangeValues != null && message.relativeChangeValues.length) + for (var i = 0; i < message.relativeChangeValues.length; ++i) + $root.google.ads.admanager.v1.ReportValue.encode(message.relativeChangeValues[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.flagValues != null && message.flagValues.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.flagValues.length; ++i) + writer.bool(message.flagValues[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MetricValueGroup message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ReportDataTable.MetricValueGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {google.ads.admanager.v1.ReportDataTable.IMetricValueGroup} message MetricValueGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValueGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValueGroup message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ReportDataTable.MetricValueGroup} MetricValueGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValueGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_9_VALUE_ID": - case 100009: - message.dimensions[i] = 100009; + switch (tag >>> 3) { + case 1: { + if (!(message.primaryValues && message.primaryValues.length)) + message.primaryValues = []; + message.primaryValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.primaryPercentOfTotalValues && message.primaryPercentOfTotalValues.length)) + message.primaryPercentOfTotalValues = []; + message.primaryPercentOfTotalValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.comparisonValues && message.comparisonValues.length)) + message.comparisonValues = []; + message.comparisonValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.comparisonPercentOfTotalValues && message.comparisonPercentOfTotalValues.length)) + message.comparisonPercentOfTotalValues = []; + message.comparisonPercentOfTotalValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.absoluteChangeValues && message.absoluteChangeValues.length)) + message.absoluteChangeValues = []; + message.absoluteChangeValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.relativeChangeValues && message.relativeChangeValues.length)) + message.relativeChangeValues = []; + message.relativeChangeValues.push($root.google.ads.admanager.v1.ReportValue.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.flagValues && message.flagValues.length)) + message.flagValues = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.flagValues.push(reader.bool()); + } else + message.flagValues.push(reader.bool()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_0_VALUE": - case 101000: - message.dimensions[i] = 101000; + } + } + return message; + }; + + /** + * Decodes a MetricValueGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ReportDataTable.MetricValueGroup} MetricValueGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValueGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValueGroup message. + * @function verify + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValueGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryValues != null && message.hasOwnProperty("primaryValues")) { + if (!Array.isArray(message.primaryValues)) + return "primaryValues: array expected"; + for (var i = 0; i < message.primaryValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.primaryValues[i]); + if (error) + return "primaryValues." + error; + } + } + if (message.primaryPercentOfTotalValues != null && message.hasOwnProperty("primaryPercentOfTotalValues")) { + if (!Array.isArray(message.primaryPercentOfTotalValues)) + return "primaryPercentOfTotalValues: array expected"; + for (var i = 0; i < message.primaryPercentOfTotalValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.primaryPercentOfTotalValues[i]); + if (error) + return "primaryPercentOfTotalValues." + error; + } + } + if (message.comparisonValues != null && message.hasOwnProperty("comparisonValues")) { + if (!Array.isArray(message.comparisonValues)) + return "comparisonValues: array expected"; + for (var i = 0; i < message.comparisonValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.comparisonValues[i]); + if (error) + return "comparisonValues." + error; + } + } + if (message.comparisonPercentOfTotalValues != null && message.hasOwnProperty("comparisonPercentOfTotalValues")) { + if (!Array.isArray(message.comparisonPercentOfTotalValues)) + return "comparisonPercentOfTotalValues: array expected"; + for (var i = 0; i < message.comparisonPercentOfTotalValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.comparisonPercentOfTotalValues[i]); + if (error) + return "comparisonPercentOfTotalValues." + error; + } + } + if (message.absoluteChangeValues != null && message.hasOwnProperty("absoluteChangeValues")) { + if (!Array.isArray(message.absoluteChangeValues)) + return "absoluteChangeValues: array expected"; + for (var i = 0; i < message.absoluteChangeValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.absoluteChangeValues[i]); + if (error) + return "absoluteChangeValues." + error; + } + } + if (message.relativeChangeValues != null && message.hasOwnProperty("relativeChangeValues")) { + if (!Array.isArray(message.relativeChangeValues)) + return "relativeChangeValues: array expected"; + for (var i = 0; i < message.relativeChangeValues.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportValue.verify(message.relativeChangeValues[i]); + if (error) + return "relativeChangeValues." + error; + } + } + if (message.flagValues != null && message.hasOwnProperty("flagValues")) { + if (!Array.isArray(message.flagValues)) + return "flagValues: array expected"; + for (var i = 0; i < message.flagValues.length; ++i) + if (typeof message.flagValues[i] !== "boolean") + return "flagValues: boolean[] expected"; + } + return null; + }; + + /** + * Creates a MetricValueGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ReportDataTable.MetricValueGroup} MetricValueGroup + */ + MetricValueGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup) + return object; + var message = new $root.google.ads.admanager.v1.ReportDataTable.MetricValueGroup(); + if (object.primaryValues) { + if (!Array.isArray(object.primaryValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.primaryValues: array expected"); + message.primaryValues = []; + for (var i = 0; i < object.primaryValues.length; ++i) { + if (typeof object.primaryValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.primaryValues: object expected"); + message.primaryValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.primaryValues[i]); + } + } + if (object.primaryPercentOfTotalValues) { + if (!Array.isArray(object.primaryPercentOfTotalValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.primaryPercentOfTotalValues: array expected"); + message.primaryPercentOfTotalValues = []; + for (var i = 0; i < object.primaryPercentOfTotalValues.length; ++i) { + if (typeof object.primaryPercentOfTotalValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.primaryPercentOfTotalValues: object expected"); + message.primaryPercentOfTotalValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.primaryPercentOfTotalValues[i]); + } + } + if (object.comparisonValues) { + if (!Array.isArray(object.comparisonValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.comparisonValues: array expected"); + message.comparisonValues = []; + for (var i = 0; i < object.comparisonValues.length; ++i) { + if (typeof object.comparisonValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.comparisonValues: object expected"); + message.comparisonValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.comparisonValues[i]); + } + } + if (object.comparisonPercentOfTotalValues) { + if (!Array.isArray(object.comparisonPercentOfTotalValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.comparisonPercentOfTotalValues: array expected"); + message.comparisonPercentOfTotalValues = []; + for (var i = 0; i < object.comparisonPercentOfTotalValues.length; ++i) { + if (typeof object.comparisonPercentOfTotalValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.comparisonPercentOfTotalValues: object expected"); + message.comparisonPercentOfTotalValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.comparisonPercentOfTotalValues[i]); + } + } + if (object.absoluteChangeValues) { + if (!Array.isArray(object.absoluteChangeValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.absoluteChangeValues: array expected"); + message.absoluteChangeValues = []; + for (var i = 0; i < object.absoluteChangeValues.length; ++i) { + if (typeof object.absoluteChangeValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.absoluteChangeValues: object expected"); + message.absoluteChangeValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.absoluteChangeValues[i]); + } + } + if (object.relativeChangeValues) { + if (!Array.isArray(object.relativeChangeValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.relativeChangeValues: array expected"); + message.relativeChangeValues = []; + for (var i = 0; i < object.relativeChangeValues.length; ++i) { + if (typeof object.relativeChangeValues[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.relativeChangeValues: object expected"); + message.relativeChangeValues[i] = $root.google.ads.admanager.v1.ReportValue.fromObject(object.relativeChangeValues[i]); + } + } + if (object.flagValues) { + if (!Array.isArray(object.flagValues)) + throw TypeError(".google.ads.admanager.v1.ReportDataTable.MetricValueGroup.flagValues: array expected"); + message.flagValues = []; + for (var i = 0; i < object.flagValues.length; ++i) + message.flagValues[i] = Boolean(object.flagValues[i]); + } + return message; + }; + + /** + * Creates a plain object from a MetricValueGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {google.ads.admanager.v1.ReportDataTable.MetricValueGroup} message MetricValueGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValueGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.primaryValues = []; + object.primaryPercentOfTotalValues = []; + object.comparisonValues = []; + object.comparisonPercentOfTotalValues = []; + object.absoluteChangeValues = []; + object.relativeChangeValues = []; + object.flagValues = []; + } + if (message.primaryValues && message.primaryValues.length) { + object.primaryValues = []; + for (var j = 0; j < message.primaryValues.length; ++j) + object.primaryValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.primaryValues[j], options); + } + if (message.primaryPercentOfTotalValues && message.primaryPercentOfTotalValues.length) { + object.primaryPercentOfTotalValues = []; + for (var j = 0; j < message.primaryPercentOfTotalValues.length; ++j) + object.primaryPercentOfTotalValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.primaryPercentOfTotalValues[j], options); + } + if (message.comparisonValues && message.comparisonValues.length) { + object.comparisonValues = []; + for (var j = 0; j < message.comparisonValues.length; ++j) + object.comparisonValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.comparisonValues[j], options); + } + if (message.comparisonPercentOfTotalValues && message.comparisonPercentOfTotalValues.length) { + object.comparisonPercentOfTotalValues = []; + for (var j = 0; j < message.comparisonPercentOfTotalValues.length; ++j) + object.comparisonPercentOfTotalValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.comparisonPercentOfTotalValues[j], options); + } + if (message.absoluteChangeValues && message.absoluteChangeValues.length) { + object.absoluteChangeValues = []; + for (var j = 0; j < message.absoluteChangeValues.length; ++j) + object.absoluteChangeValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.absoluteChangeValues[j], options); + } + if (message.relativeChangeValues && message.relativeChangeValues.length) { + object.relativeChangeValues = []; + for (var j = 0; j < message.relativeChangeValues.length; ++j) + object.relativeChangeValues[j] = $root.google.ads.admanager.v1.ReportValue.toObject(message.relativeChangeValues[j], options); + } + if (message.flagValues && message.flagValues.length) { + object.flagValues = []; + for (var j = 0; j < message.flagValues.length; ++j) + object.flagValues[j] = message.flagValues[j]; + } + return object; + }; + + /** + * Converts this MetricValueGroup to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @instance + * @returns {Object.} JSON object + */ + MetricValueGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValueGroup + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ReportDataTable.MetricValueGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValueGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ReportDataTable.MetricValueGroup"; + }; + + return MetricValueGroup; + })(); + + return ReportDataTable; + })(); + + v1.ScheduleOptions = (function() { + + /** + * Properties of a ScheduleOptions. + * @memberof google.ads.admanager.v1 + * @interface IScheduleOptions + * @property {google.ads.admanager.v1.ScheduleOptions.ISchedule|null} [schedule] ScheduleOptions schedule + * @property {google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|null} [deliveryCondition] ScheduleOptions deliveryCondition + * @property {Array.|null} [flags] ScheduleOptions flags + */ + + /** + * Constructs a new ScheduleOptions. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ScheduleOptions. + * @implements IScheduleOptions + * @constructor + * @param {google.ads.admanager.v1.IScheduleOptions=} [properties] Properties to set + */ + function ScheduleOptions(properties) { + this.flags = []; + 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]]; + } + + /** + * ScheduleOptions schedule. + * @member {google.ads.admanager.v1.ScheduleOptions.ISchedule|null|undefined} schedule + * @memberof google.ads.admanager.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.schedule = null; + + /** + * ScheduleOptions deliveryCondition. + * @member {google.ads.admanager.v1.ScheduleOptions.DeliveryCondition} deliveryCondition + * @memberof google.ads.admanager.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.deliveryCondition = 0; + + /** + * ScheduleOptions flags. + * @member {Array.} flags + * @memberof google.ads.admanager.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.flags = $util.emptyArray; + + /** + * Creates a new ScheduleOptions instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {google.ads.admanager.v1.IScheduleOptions=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions instance + */ + ScheduleOptions.create = function create(properties) { + return new ScheduleOptions(properties); + }; + + /** + * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {google.ads.admanager.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + $root.google.ads.admanager.v1.ScheduleOptions.Schedule.encode(message.schedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deliveryCondition != null && Object.hasOwnProperty.call(message, "deliveryCondition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deliveryCondition); + if (message.flags != null && message.flags.length) + for (var i = 0; i < message.flags.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.Flag.encode(message.flags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {google.ads.admanager.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ScheduleOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.decode(reader, reader.uint32()); break; - case "CUSTOM_DIMENSION_1_VALUE": - case 101001: - message.dimensions[i] = 101001; + } + case 2: { + message.deliveryCondition = reader.int32(); break; - case "CUSTOM_DIMENSION_2_VALUE": - case 101002: - message.dimensions[i] = 101002; + } + case 3: { + if (!(message.flags && message.flags.length)) + message.flags = []; + message.flags.push($root.google.ads.admanager.v1.ReportDefinition.Flag.decode(reader, reader.uint32())); break; - case "CUSTOM_DIMENSION_3_VALUE": - case 101003: - message.dimensions[i] = 101003; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduleOptions message. + * @function verify + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduleOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + var error = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.verify(message.schedule); + if (error) + return "schedule." + error; + } + if (message.deliveryCondition != null && message.hasOwnProperty("deliveryCondition")) + switch (message.deliveryCondition) { + default: + return "deliveryCondition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.flags != null && message.hasOwnProperty("flags")) { + if (!Array.isArray(message.flags)) + return "flags: array expected"; + for (var i = 0; i < message.flags.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.Flag.verify(message.flags[i]); + if (error) + return "flags." + error; + } + } + return null; + }; + + /** + * Creates a ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + */ + ScheduleOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ScheduleOptions) + return object; + var message = new $root.google.ads.admanager.v1.ScheduleOptions(); + if (object.schedule != null) { + if (typeof object.schedule !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.schedule: object expected"); + message.schedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.fromObject(object.schedule); + } + switch (object.deliveryCondition) { + default: + if (typeof object.deliveryCondition === "number") { + message.deliveryCondition = object.deliveryCondition; + break; + } + break; + case "NEVER": + case 0: + message.deliveryCondition = 0; + break; + case "ALWAYS": + case 1: + message.deliveryCondition = 1; + break; + case "WHEN_FLAG_CONDITIONS_MET": + case 2: + message.deliveryCondition = 2; + break; + } + if (object.flags) { + if (!Array.isArray(object.flags)) + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.flags: array expected"); + message.flags = []; + for (var i = 0; i < object.flags.length; ++i) { + if (typeof object.flags[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.flags: object expected"); + message.flags[i] = $root.google.ads.admanager.v1.ReportDefinition.Flag.fromObject(object.flags[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {google.ads.admanager.v1.ScheduleOptions} message ScheduleOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduleOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.flags = []; + if (options.defaults) { + object.schedule = null; + object.deliveryCondition = options.enums === String ? "NEVER" : 0; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) + object.schedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.toObject(message.schedule, options); + if (message.deliveryCondition != null && message.hasOwnProperty("deliveryCondition")) + object.deliveryCondition = options.enums === String ? $root.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition[message.deliveryCondition] === undefined ? message.deliveryCondition : $root.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition[message.deliveryCondition] : message.deliveryCondition; + if (message.flags && message.flags.length) { + object.flags = []; + for (var j = 0; j < message.flags.length; ++j) + object.flags[j] = $root.google.ads.admanager.v1.ReportDefinition.Flag.toObject(message.flags[j], options); + } + return object; + }; + + /** + * Converts this ScheduleOptions to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ScheduleOptions + * @instance + * @returns {Object.} JSON object + */ + ScheduleOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScheduleOptions + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ScheduleOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduleOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ScheduleOptions"; + }; + + ScheduleOptions.Schedule = (function() { + + /** + * Properties of a Schedule. + * @memberof google.ads.admanager.v1.ScheduleOptions + * @interface ISchedule + * @property {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule|null} [weeklySchedule] Schedule weeklySchedule + * @property {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule|null} [monthlySchedule] Schedule monthlySchedule + * @property {google.type.IDate|null} [startDate] Schedule startDate + * @property {google.type.IDate|null} [endDate] Schedule endDate + * @property {google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency|null} [frequency] Schedule frequency + * @property {google.type.ITimeOfDay|null} [startTime] Schedule startTime + */ + + /** + * Constructs a new Schedule. + * @memberof google.ads.admanager.v1.ScheduleOptions + * @classdesc Represents a Schedule. + * @implements ISchedule + * @constructor + * @param {google.ads.admanager.v1.ScheduleOptions.ISchedule=} [properties] Properties to set + */ + function Schedule(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]]; + } + + /** + * Schedule weeklySchedule. + * @member {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule|null|undefined} weeklySchedule + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.weeklySchedule = null; + + /** + * Schedule monthlySchedule. + * @member {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule|null|undefined} monthlySchedule + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.monthlySchedule = null; + + /** + * Schedule startDate. + * @member {google.type.IDate|null|undefined} startDate + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.startDate = null; + + /** + * Schedule endDate. + * @member {google.type.IDate|null|undefined} endDate + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.endDate = null; + + /** + * Schedule frequency. + * @member {google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency} frequency + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.frequency = 0; + + /** + * Schedule startTime. + * @member {google.type.ITimeOfDay|null|undefined} startTime + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Schedule.prototype.startTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Schedule frequencySchedule. + * @member {"weeklySchedule"|"monthlySchedule"|undefined} frequencySchedule + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + */ + Object.defineProperty(Schedule.prototype, "frequencySchedule", { + get: $util.oneOfGetter($oneOfFields = ["weeklySchedule", "monthlySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Schedule instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.ISchedule=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule} Schedule instance + */ + Schedule.create = function create(properties) { + return new Schedule(properties); + }; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + $root.google.type.Date.encode(message.startDate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + $root.google.type.Date.encode(message.endDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frequency); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.type.TimeOfDay.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.weeklySchedule != null && Object.hasOwnProperty.call(message, "weeklySchedule")) + $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.encode(message.weeklySchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.monthlySchedule != null && Object.hasOwnProperty.call(message, "monthlySchedule")) + $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.encode(message.monthlySchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - case "CUSTOM_DIMENSION_4_VALUE": - case 101004: - message.dimensions[i] = 101004; + switch (tag >>> 3) { + case 6: { + message.weeklySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.decode(reader, reader.uint32()); + break; + } + case 7: { + message.monthlySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.decode(reader, reader.uint32()); + break; + } + case 1: { + message.startDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 3: { + message.frequency = reader.int32(); + break; + } + case 4: { + message.startTime = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "CUSTOM_DIMENSION_5_VALUE": - case 101005: - message.dimensions[i] = 101005; + } + } + return message; + }; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schedule message. + * @function verify + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + properties.frequencySchedule = 1; + { + var error = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.verify(message.weeklySchedule); + if (error) + return "weeklySchedule." + error; + } + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + if (properties.frequencySchedule === 1) + return "frequencySchedule: multiple values"; + properties.frequencySchedule = 1; + { + var error = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.verify(message.monthlySchedule); + if (error) + return "monthlySchedule." + error; + } + } + if (message.startDate != null && message.hasOwnProperty("startDate")) { + var error = $root.google.type.Date.verify(message.startDate); + if (error) + return "startDate." + error; + } + if (message.endDate != null && message.hasOwnProperty("endDate")) { + var error = $root.google.type.Date.verify(message.endDate); + if (error) + return "endDate." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: break; - case "CUSTOM_DIMENSION_6_VALUE": - case 101006: - message.dimensions[i] = 101006; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.type.TimeOfDay.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule} Schedule + */ + Schedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ScheduleOptions.Schedule) + return object; + var message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule(); + if (object.weeklySchedule != null) { + if (typeof object.weeklySchedule !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.weeklySchedule: object expected"); + message.weeklySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.fromObject(object.weeklySchedule); + } + if (object.monthlySchedule != null) { + if (typeof object.monthlySchedule !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.monthlySchedule: object expected"); + message.monthlySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.fromObject(object.monthlySchedule); + } + if (object.startDate != null) { + if (typeof object.startDate !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.startDate: object expected"); + message.startDate = $root.google.type.Date.fromObject(object.startDate); + } + if (object.endDate != null) { + if (typeof object.endDate !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.endDate: object expected"); + message.endDate = $root.google.type.Date.fromObject(object.endDate); + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; break; - case "CUSTOM_DIMENSION_7_VALUE": - case 101007: - message.dimensions[i] = 101007; + } + break; + case "FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "HOURLY": + case 1: + message.frequency = 1; + break; + case "TWO_TIMES_DAILY": + case 2: + message.frequency = 2; + break; + case "THREE_TIMES_DAILY": + case 3: + message.frequency = 3; + break; + case "FOUR_TIMES_DAILY": + case 4: + message.frequency = 4; + break; + case "DAILY": + case 5: + message.frequency = 5; + break; + case "WEEKLY": + case 6: + message.frequency = 6; + break; + case "MONTHLY": + case 7: + message.frequency = 7; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.startTime: object expected"); + message.startTime = $root.google.type.TimeOfDay.fromObject(object.startTime); + } + return message; + }; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule} message Schedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = null; + object.endDate = null; + object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; + object.startTime = null; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = $root.google.type.Date.toObject(message.startDate, options); + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = $root.google.type.Date.toObject(message.endDate, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency[message.frequency] === undefined ? message.frequency : $root.google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency[message.frequency] : message.frequency; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.type.TimeOfDay.toObject(message.startTime, options); + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + object.weeklySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.toObject(message.weeklySchedule, options); + if (options.oneofs) + object.frequencySchedule = "weeklySchedule"; + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + object.monthlySchedule = $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.toObject(message.monthlySchedule, options); + if (options.oneofs) + object.frequencySchedule = "monthlySchedule"; + } + return object; + }; + + /** + * Converts this Schedule to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @instance + * @returns {Object.} JSON object + */ + Schedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schedule + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ScheduleOptions.Schedule"; + }; + + Schedule.WeeklySchedule = (function() { + + /** + * Properties of a WeeklySchedule. + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @interface IWeeklySchedule + * @property {Array.|null} [weeklyScheduledDays] WeeklySchedule weeklyScheduledDays + */ + + /** + * Constructs a new WeeklySchedule. + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule=} [properties] Properties to set + */ + function WeeklySchedule(properties) { + this.weeklyScheduledDays = []; + 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]]; + } + + /** + * WeeklySchedule weeklyScheduledDays. + * @member {Array.} weeklyScheduledDays + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.weeklyScheduledDays = $util.emptyArray; + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weeklyScheduledDays != null && message.weeklyScheduledDays.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.weeklyScheduledDays.length; ++i) + writer.int32(message.weeklyScheduledDays[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.weeklyScheduledDays && message.weeklyScheduledDays.length)) + message.weeklyScheduledDays = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weeklyScheduledDays.push(reader.int32()); + } else + message.weeklyScheduledDays.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeeklySchedule message. + * @function verify + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeeklySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weeklyScheduledDays != null && message.hasOwnProperty("weeklyScheduledDays")) { + if (!Array.isArray(message.weeklyScheduledDays)) + return "weeklyScheduledDays: array expected"; + for (var i = 0; i < message.weeklyScheduledDays.length; ++i) + switch (message.weeklyScheduledDays[i]) { + default: + return "weeklyScheduledDays: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule) + return object; + var message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule(); + if (object.weeklyScheduledDays) { + if (!Array.isArray(object.weeklyScheduledDays)) + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule.weeklyScheduledDays: array expected"); + message.weeklyScheduledDays = []; + for (var i = 0; i < object.weeklyScheduledDays.length; ++i) + switch (object.weeklyScheduledDays[i]) { + default: + if (typeof object.weeklyScheduledDays[i] === "number") { + message.weeklyScheduledDays[i] = object.weeklyScheduledDays[i]; + break; + } + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.weeklyScheduledDays[i] = 0; + break; + case "MONDAY": + case 1: + message.weeklyScheduledDays[i] = 1; + break; + case "TUESDAY": + case 2: + message.weeklyScheduledDays[i] = 2; + break; + case "WEDNESDAY": + case 3: + message.weeklyScheduledDays[i] = 3; + break; + case "THURSDAY": + case 4: + message.weeklyScheduledDays[i] = 4; + break; + case "FRIDAY": + case 5: + message.weeklyScheduledDays[i] = 5; + break; + case "SATURDAY": + case 6: + message.weeklyScheduledDays[i] = 6; + break; + case "SUNDAY": + case 7: + message.weeklyScheduledDays[i] = 7; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule} message WeeklySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeeklySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.weeklyScheduledDays = []; + if (message.weeklyScheduledDays && message.weeklyScheduledDays.length) { + object.weeklyScheduledDays = []; + for (var j = 0; j < message.weeklyScheduledDays.length; ++j) + object.weeklyScheduledDays[j] = options.enums === String ? $root.google.type.DayOfWeek[message.weeklyScheduledDays[j]] === undefined ? message.weeklyScheduledDays[j] : $root.google.type.DayOfWeek[message.weeklyScheduledDays[j]] : message.weeklyScheduledDays[j]; + } + return object; + }; + + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeeklySchedule + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeeklySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule"; + }; + + return WeeklySchedule; + })(); + + Schedule.MonthlySchedule = (function() { + + /** + * Properties of a MonthlySchedule. + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @interface IMonthlySchedule + * @property {Array.|null} [monthlyScheduledDays] MonthlySchedule monthlyScheduledDays + */ + + /** + * Constructs a new MonthlySchedule. + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule=} [properties] Properties to set + */ + function MonthlySchedule(properties) { + this.monthlyScheduledDays = []; + 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]]; + } + + /** + * MonthlySchedule monthlyScheduledDays. + * @member {Array.} monthlyScheduledDays + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.monthlyScheduledDays = $util.emptyArray; + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.monthlyScheduledDays != null && message.monthlyScheduledDays.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.monthlyScheduledDays.length; ++i) + writer.int32(message.monthlyScheduledDays[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.monthlyScheduledDays && message.monthlyScheduledDays.length)) + message.monthlyScheduledDays = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.monthlyScheduledDays.push(reader.int32()); + } else + message.monthlyScheduledDays.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonthlySchedule message. + * @function verify + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonthlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monthlyScheduledDays != null && message.hasOwnProperty("monthlyScheduledDays")) { + if (!Array.isArray(message.monthlyScheduledDays)) + return "monthlyScheduledDays: array expected"; + for (var i = 0; i < message.monthlyScheduledDays.length; ++i) + if (!$util.isInteger(message.monthlyScheduledDays[i])) + return "monthlyScheduledDays: integer[] expected"; + } + return null; + }; + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule) + return object; + var message = new $root.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule(); + if (object.monthlyScheduledDays) { + if (!Array.isArray(object.monthlyScheduledDays)) + throw TypeError(".google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule.monthlyScheduledDays: array expected"); + message.monthlyScheduledDays = []; + for (var i = 0; i < object.monthlyScheduledDays.length; ++i) + message.monthlyScheduledDays[i] = object.monthlyScheduledDays[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule} message MonthlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonthlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.monthlyScheduledDays = []; + if (message.monthlyScheduledDays && message.monthlyScheduledDays.length) { + object.monthlyScheduledDays = []; + for (var j = 0; j < message.monthlyScheduledDays.length; ++j) + object.monthlyScheduledDays[j] = message.monthlyScheduledDays[j]; + } + return object; + }; + + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonthlySchedule + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonthlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule"; + }; + + return MonthlySchedule; + })(); + + /** + * Frequency enum. + * @name google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency + * @enum {number} + * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value + * @property {number} HOURLY=1 HOURLY value + * @property {number} TWO_TIMES_DAILY=2 TWO_TIMES_DAILY value + * @property {number} THREE_TIMES_DAILY=3 THREE_TIMES_DAILY value + * @property {number} FOUR_TIMES_DAILY=4 FOUR_TIMES_DAILY value + * @property {number} DAILY=5 DAILY value + * @property {number} WEEKLY=6 WEEKLY value + * @property {number} MONTHLY=7 MONTHLY value + */ + Schedule.Frequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOURLY"] = 1; + values[valuesById[2] = "TWO_TIMES_DAILY"] = 2; + values[valuesById[3] = "THREE_TIMES_DAILY"] = 3; + values[valuesById[4] = "FOUR_TIMES_DAILY"] = 4; + values[valuesById[5] = "DAILY"] = 5; + values[valuesById[6] = "WEEKLY"] = 6; + values[valuesById[7] = "MONTHLY"] = 7; + return values; + })(); + + return Schedule; + })(); + + /** + * DeliveryCondition enum. + * @name google.ads.admanager.v1.ScheduleOptions.DeliveryCondition + * @enum {number} + * @property {number} NEVER=0 NEVER value + * @property {number} ALWAYS=1 ALWAYS value + * @property {number} WHEN_FLAG_CONDITIONS_MET=2 WHEN_FLAG_CONDITIONS_MET value + */ + ScheduleOptions.DeliveryCondition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEVER"] = 0; + values[valuesById[1] = "ALWAYS"] = 1; + values[valuesById[2] = "WHEN_FLAG_CONDITIONS_MET"] = 2; + return values; + })(); + + return ScheduleOptions; + })(); + + v1.ReportService = (function() { + + /** + * Constructs a new ReportService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ReportService + * @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 ReportService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReportService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReportService; + + /** + * Creates new ReportService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.ReportService + * @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 {ReportService} RPC service. Useful where requests and/or responses are streamed. + */ + ReportService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|getReport}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef GetReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Report} [response] Report + */ + + /** + * Calls GetReport. + * @function getReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IGetReportRequest} request GetReportRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.GetReportCallback} callback Node-style callback called with the error, if any, and Report + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.getReport = function getReport(request, callback) { + return this.rpcCall(getReport, $root.google.ads.admanager.v1.GetReportRequest, $root.google.ads.admanager.v1.Report, request, callback); + }, "name", { value: "GetReport" }); + + /** + * Calls GetReport. + * @function getReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IGetReportRequest} request GetReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|listReports}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef ListReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListReportsResponse} [response] ListReportsResponse + */ + + /** + * Calls ListReports. + * @function listReports + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IListReportsRequest} request ListReportsRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.ListReportsCallback} callback Node-style callback called with the error, if any, and ListReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.listReports = function listReports(request, callback) { + return this.rpcCall(listReports, $root.google.ads.admanager.v1.ListReportsRequest, $root.google.ads.admanager.v1.ListReportsResponse, request, callback); + }, "name", { value: "ListReports" }); + + /** + * Calls ListReports. + * @function listReports + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IListReportsRequest} request ListReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|createReport}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef CreateReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Report} [response] Report + */ + + /** + * Calls CreateReport. + * @function createReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.ICreateReportRequest} request CreateReportRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.CreateReportCallback} callback Node-style callback called with the error, if any, and Report + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.createReport = function createReport(request, callback) { + return this.rpcCall(createReport, $root.google.ads.admanager.v1.CreateReportRequest, $root.google.ads.admanager.v1.Report, request, callback); + }, "name", { value: "CreateReport" }); + + /** + * Calls CreateReport. + * @function createReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.ICreateReportRequest} request CreateReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|updateReport}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef UpdateReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Report} [response] Report + */ + + /** + * Calls UpdateReport. + * @function updateReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IUpdateReportRequest} request UpdateReportRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.UpdateReportCallback} callback Node-style callback called with the error, if any, and Report + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.updateReport = function updateReport(request, callback) { + return this.rpcCall(updateReport, $root.google.ads.admanager.v1.UpdateReportRequest, $root.google.ads.admanager.v1.Report, request, callback); + }, "name", { value: "UpdateReport" }); + + /** + * Calls UpdateReport. + * @function updateReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IUpdateReportRequest} request UpdateReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|runReport}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef RunReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RunReport. + * @function runReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IRunReportRequest} request RunReportRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.RunReportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.runReport = function runReport(request, callback) { + return this.rpcCall(runReport, $root.google.ads.admanager.v1.RunReportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunReport" }); + + /** + * Calls RunReport. + * @function runReport + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IRunReportRequest} request RunReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.ReportService|fetchReportResultRows}. + * @memberof google.ads.admanager.v1.ReportService + * @typedef FetchReportResultRowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.FetchReportResultRowsResponse} [response] FetchReportResultRowsResponse + */ + + /** + * Calls FetchReportResultRows. + * @function fetchReportResultRows + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} request FetchReportResultRowsRequest message or plain object + * @param {google.ads.admanager.v1.ReportService.FetchReportResultRowsCallback} callback Node-style callback called with the error, if any, and FetchReportResultRowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReportService.prototype.fetchReportResultRows = function fetchReportResultRows(request, callback) { + return this.rpcCall(fetchReportResultRows, $root.google.ads.admanager.v1.FetchReportResultRowsRequest, $root.google.ads.admanager.v1.FetchReportResultRowsResponse, request, callback); + }, "name", { value: "FetchReportResultRows" }); + + /** + * Calls FetchReportResultRows. + * @function fetchReportResultRows + * @memberof google.ads.admanager.v1.ReportService + * @instance + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} request FetchReportResultRowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReportService; + })(); + + v1.RunReportRequest = (function() { + + /** + * Properties of a RunReportRequest. + * @memberof google.ads.admanager.v1 + * @interface IRunReportRequest + * @property {string|null} [name] RunReportRequest name + */ + + /** + * Constructs a new RunReportRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RunReportRequest. + * @implements IRunReportRequest + * @constructor + * @param {google.ads.admanager.v1.IRunReportRequest=} [properties] Properties to set + */ + function RunReportRequest(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]]; + } + + /** + * RunReportRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.RunReportRequest + * @instance + */ + RunReportRequest.prototype.name = ""; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {google.ads.admanager.v1.IRunReportRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest instance + */ + RunReportRequest.create = function create(properties) { + return new RunReportRequest(properties); + }; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {google.ads.admanager.v1.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.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 RunReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {google.ads.admanager.v1.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "CUSTOM_DIMENSION_8_VALUE": - case 101008: - message.dimensions[i] = 101008; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportRequest message. + * @function verify + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportRequest.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 RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + */ + RunReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RunReportRequest) + return object; + var message = new $root.google.ads.admanager.v1.RunReportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {google.ads.admanager.v1.RunReportRequest} message RunReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportRequest.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 RunReportRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RunReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RunReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RunReportRequest"; + }; + + return RunReportRequest; + })(); + + v1.RunReportMetadata = (function() { + + /** + * Properties of a RunReportMetadata. + * @memberof google.ads.admanager.v1 + * @interface IRunReportMetadata + * @property {number|null} [percentComplete] RunReportMetadata percentComplete + * @property {string|null} [report] RunReportMetadata report + */ + + /** + * Constructs a new RunReportMetadata. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RunReportMetadata. + * @implements IRunReportMetadata + * @constructor + * @param {google.ads.admanager.v1.IRunReportMetadata=} [properties] Properties to set + */ + function RunReportMetadata(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]]; + } + + /** + * RunReportMetadata percentComplete. + * @member {number} percentComplete + * @memberof google.ads.admanager.v1.RunReportMetadata + * @instance + */ + RunReportMetadata.prototype.percentComplete = 0; + + /** + * RunReportMetadata report. + * @member {string} report + * @memberof google.ads.admanager.v1.RunReportMetadata + * @instance + */ + RunReportMetadata.prototype.report = ""; + + /** + * Creates a new RunReportMetadata instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {google.ads.admanager.v1.IRunReportMetadata=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata instance + */ + RunReportMetadata.create = function create(properties) { + return new RunReportMetadata(properties); + }; + + /** + * Encodes the specified RunReportMetadata message. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {google.ads.admanager.v1.IRunReportMetadata} message RunReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percentComplete); + if (message.report != null && Object.hasOwnProperty.call(message, "report")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.report); + return writer; + }; + + /** + * Encodes the specified RunReportMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {google.ads.admanager.v1.IRunReportMetadata} message RunReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.percentComplete = reader.int32(); break; - case "CUSTOM_DIMENSION_9_VALUE": - case 101009: - message.dimensions[i] = 101009; + } + case 4: { + message.report = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; + } } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) - switch (object.metrics[i]) { - default: - if (typeof object.metrics[i] === "number") { - message.metrics[i] = object.metrics[i]; - break; - } - case "METRIC_UNSPECIFIED": - case 0: - message.metrics[i] = 0; - break; - case "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 61: - message.metrics[i] = 61; - break; - case "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 58: - message.metrics[i] = 58; - break; - case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 57: - message.metrics[i] = 57; - break; - case "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 60: - message.metrics[i] = 60; - break; - case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 56: - message.metrics[i] = 56; - break; - case "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 59: - message.metrics[i] = 59; - break; - case "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 73: - message.metrics[i] = 73; - break; - case "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 70: - message.metrics[i] = 70; - break; - case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 69: - message.metrics[i] = 69; - break; - case "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 72: - message.metrics[i] = 72; - break; - case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 68: - message.metrics[i] = 68; - break; - case "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 71: - message.metrics[i] = 71; - break; - case "ADSENSE_AVERAGE_ECPM": - case 26: - message.metrics[i] = 26; - break; - case "ADSENSE_CLICKS": - case 23: - message.metrics[i] = 23; - break; - case "ADSENSE_CTR": - case 24: - message.metrics[i] = 24; - break; - case "ADSENSE_IMPRESSIONS": - case 22: - message.metrics[i] = 22; - break; - case "ADSENSE_PERCENT_CLICKS": - case 28: - message.metrics[i] = 28; - break; - case "ADSENSE_PERCENT_IMPRESSIONS": - case 27: - message.metrics[i] = 27; - break; - case "ADSENSE_PERCENT_REVENUE": - case 29: - message.metrics[i] = 29; - break; - case "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": - case 30: - message.metrics[i] = 30; - break; - case "ADSENSE_RESPONSES_SERVED": - case 41: - message.metrics[i] = 41; - break; - case "ADSENSE_REVENUE": - case 25: - message.metrics[i] = 25; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 79: - message.metrics[i] = 79; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 76: - message.metrics[i] = 76; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 75: - message.metrics[i] = 75; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 78: - message.metrics[i] = 78; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 74: - message.metrics[i] = 74; - break; - case "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 77: - message.metrics[i] = 77; - break; - case "AD_EXCHANGE_AVERAGE_ECPM": - case 18: - message.metrics[i] = 18; - break; - case "AD_EXCHANGE_CLICKS": - case 15: - message.metrics[i] = 15; - break; - case "AD_EXCHANGE_CTR": - case 16: - message.metrics[i] = 16; - break; - case "AD_EXCHANGE_IMPRESSIONS": - case 14: - message.metrics[i] = 14; - break; - case "AD_EXCHANGE_PERCENT_CLICKS": - case 20: - message.metrics[i] = 20; - break; - case "AD_EXCHANGE_PERCENT_IMPRESSIONS": - case 19: - message.metrics[i] = 19; - break; - case "AD_EXCHANGE_PERCENT_REVENUE": - case 21: - message.metrics[i] = 21; - break; - case "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": - case 31: - message.metrics[i] = 31; - break; - case "AD_EXCHANGE_RESPONSES_SERVED": - case 42: - message.metrics[i] = 42; - break; - case "AD_EXCHANGE_REVENUE": - case 17: - message.metrics[i] = 17; - break; - case "AD_REQUESTS": - case 38: - message.metrics[i] = 38; - break; - case "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": - case 67: - message.metrics[i] = 67; - break; - case "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": - case 64: - message.metrics[i] = 64; - break; - case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": - case 63: - message.metrics[i] = 63; - break; - case "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": - case 66: - message.metrics[i] = 66; - break; - case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": - case 62: - message.metrics[i] = 62; - break; - case "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": - case 65: - message.metrics[i] = 65; - break; - case "AD_SERVER_AVERAGE_ECPM": - case 34: - message.metrics[i] = 34; - break; - case "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": - case 10: - message.metrics[i] = 10; - break; - case "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": - case 262: - message.metrics[i] = 262; - break; - case "AD_SERVER_CLICKS": - case 7: - message.metrics[i] = 7; - break; - case "AD_SERVER_CPD_REVENUE": - case 32: - message.metrics[i] = 32; - break; - case "AD_SERVER_CTR": - case 8: - message.metrics[i] = 8; - break; - case "AD_SERVER_IMPRESSIONS": - case 6: - message.metrics[i] = 6; - break; - case "AD_SERVER_PERCENT_CLICKS": - case 12: - message.metrics[i] = 12; - break; - case "AD_SERVER_PERCENT_IMPRESSIONS": - case 11: - message.metrics[i] = 11; - break; - case "AD_SERVER_PERCENT_REVENUE": - case 35: - message.metrics[i] = 35; - break; - case "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": - case 13: - message.metrics[i] = 13; - break; - case "AD_SERVER_RESPONSES_SERVED": - case 40: - message.metrics[i] = 40; - break; - case "AD_SERVER_REVENUE": - case 33: - message.metrics[i] = 33; - break; - case "AD_SERVER_REVENUE_WITHOUT_CPD": - case 9: - message.metrics[i] = 9; - break; - case "AD_SERVER_TRACKED_ADS": - case 264: - message.metrics[i] = 264; - break; - case "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": - case 261: - message.metrics[i] = 261; - break; - case "AD_SERVER_UNFILTERED_CLICKS": - case 259: - message.metrics[i] = 259; - break; - case "AD_SERVER_UNFILTERED_IMPRESSIONS": - case 260: - message.metrics[i] = 260; - break; - case "AD_SERVER_UNFILTERED_TRACKED_ADS": - case 263: - message.metrics[i] = 263; - break; - case "AVERAGE_ECPM": - case 37: - message.metrics[i] = 37; - break; - case "AVERAGE_ECPM_WITHOUT_CPD": - case 5: - message.metrics[i] = 5; - break; - case "CLICKS": - case 2: - message.metrics[i] = 2; - break; - case "CODE_SERVED_COUNT": - case 44: - message.metrics[i] = 44; - break; - case "CTR": - case 3: - message.metrics[i] = 3; - break; - case "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": - case 129: - message.metrics[i] = 129; - break; - case "GOOGLE_SOLD_AUCTION_IMPRESSIONS": - case 128: - message.metrics[i] = 128; - break; - case "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": - case 131: - message.metrics[i] = 131; - break; - case "GOOGLE_SOLD_IMPRESSIONS": - case 130: - message.metrics[i] = 130; - break; - case "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": - case 127: - message.metrics[i] = 127; - break; - case "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": - case 126: - message.metrics[i] = 126; - break; - case "IMPRESSIONS": - case 1: - message.metrics[i] = 1; - break; - case "PARTNER_SALES_FILLED_POD_REQUESTS": - case 135: - message.metrics[i] = 135; - break; - case "PARTNER_SALES_FILL_RATE": - case 136: - message.metrics[i] = 136; - break; - case "PARTNER_SALES_PARTNER_MATCH_RATE": - case 137: - message.metrics[i] = 137; - break; - case "PARTNER_SALES_QUERIES": - case 132: - message.metrics[i] = 132; - break; - case "PARTNER_SALES_UNFILLED_IMPRESSIONS": - case 133: - message.metrics[i] = 133; - break; - case "PARTNER_SALES_UNMATCHED_QUERIES": - case 134: - message.metrics[i] = 134; - break; - case "PARTNER_SOLD_CODE_SERVED": - case 125: - message.metrics[i] = 125; - break; - case "PARTNER_SOLD_COVIEWED_IMPRESSIONS": - case 124: - message.metrics[i] = 124; - break; - case "PARTNER_SOLD_IMPRESSIONS": - case 123: - message.metrics[i] = 123; - break; - case "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": - case 177: - message.metrics[i] = 177; - break; - case "PROGRAMMATIC_MATCH_RATE": - case 178: - message.metrics[i] = 178; - break; - case "PROGRAMMATIC_RESPONSES_SERVED": - case 176: - message.metrics[i] = 176; - break; - case "RESPONSES_SERVED": - case 39: - message.metrics[i] = 39; - break; - case "REVENUE": - case 36: - message.metrics[i] = 36; - break; - case "REVENUE_WITHOUT_CPD": - case 4: - message.metrics[i] = 4; - break; - case "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": - case 434: - message.metrics[i] = 434; - break; - case "SERVER_SIDE_UNWRAPPING_CALLOUTS": - case 435: - message.metrics[i] = 435; - break; - case "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": - case 436: - message.metrics[i] = 436; - break; - case "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": - case 437: - message.metrics[i] = 437; - break; - case "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": - case 438: - message.metrics[i] = 438; - break; - case "SERVER_SIDE_UNWRAPPING_TIMEOUTS": - case 439: - message.metrics[i] = 439; - break; - case "UNFILLED_IMPRESSIONS": - case 45: - message.metrics[i] = 45; - break; - case "UNMATCHED_AD_REQUESTS": - case 43: - message.metrics[i] = 43; - break; - case "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": - case 121: - message.metrics[i] = 121; - break; - case "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": - case 122: - message.metrics[i] = 122; - break; - case "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": - case 92: - message.metrics[i] = 92; - break; - case "VIDEO_INTERACTION_COLLAPSES": - case 93: - message.metrics[i] = 93; - break; - case "VIDEO_INTERACTION_EXPANDS": - case 95: - message.metrics[i] = 95; - break; - case "VIDEO_INTERACTION_FULL_SCREENS": - case 96: - message.metrics[i] = 96; - break; - case "VIDEO_INTERACTION_MUTES": - case 97: - message.metrics[i] = 97; - break; - case "VIDEO_INTERACTION_PAUSES": - case 98: - message.metrics[i] = 98; - break; - case "VIDEO_INTERACTION_RESUMES": - case 99: - message.metrics[i] = 99; - break; - case "VIDEO_INTERACTION_REWINDS": - case 100: - message.metrics[i] = 100; - break; - case "VIDEO_INTERACTION_UNMUTES": - case 101: - message.metrics[i] = 101; - break; - case "VIDEO_INTERACTION_VIDEO_SKIPS": - case 102: - message.metrics[i] = 102; - break; - case "VIDEO_REAL_TIME_CREATIVE_SERVES": - case 139: - message.metrics[i] = 139; - break; - case "VIDEO_REAL_TIME_ERROR_100_COUNT": - case 143: - message.metrics[i] = 143; - break; - case "VIDEO_REAL_TIME_ERROR_101_COUNT": - case 144: - message.metrics[i] = 144; - break; - case "VIDEO_REAL_TIME_ERROR_102_COUNT": - case 145: - message.metrics[i] = 145; - break; - case "VIDEO_REAL_TIME_ERROR_200_COUNT": - case 146: - message.metrics[i] = 146; + return message; + }; + + /** + * Decodes a RunReportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportMetadata message. + * @function verify + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + if (!$util.isInteger(message.percentComplete)) + return "percentComplete: integer expected"; + if (message.report != null && message.hasOwnProperty("report")) + if (!$util.isString(message.report)) + return "report: string expected"; + return null; + }; + + /** + * Creates a RunReportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + */ + RunReportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RunReportMetadata) + return object; + var message = new $root.google.ads.admanager.v1.RunReportMetadata(); + if (object.percentComplete != null) + message.percentComplete = object.percentComplete | 0; + if (object.report != null) + message.report = String(object.report); + return message; + }; + + /** + * Creates a plain object from a RunReportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {google.ads.admanager.v1.RunReportMetadata} message RunReportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.percentComplete = 0; + object.report = ""; + } + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + object.percentComplete = message.percentComplete; + if (message.report != null && message.hasOwnProperty("report")) + object.report = message.report; + return object; + }; + + /** + * Converts this RunReportMetadata to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RunReportMetadata + * @instance + * @returns {Object.} JSON object + */ + RunReportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportMetadata + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RunReportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RunReportMetadata"; + }; + + return RunReportMetadata; + })(); + + v1.RunReportResponse = (function() { + + /** + * Properties of a RunReportResponse. + * @memberof google.ads.admanager.v1 + * @interface IRunReportResponse + * @property {string|null} [reportResult] RunReportResponse reportResult + */ + + /** + * Constructs a new RunReportResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RunReportResponse. + * @implements IRunReportResponse + * @constructor + * @param {google.ads.admanager.v1.IRunReportResponse=} [properties] Properties to set + */ + function RunReportResponse(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]]; + } + + /** + * RunReportResponse reportResult. + * @member {string} reportResult + * @memberof google.ads.admanager.v1.RunReportResponse + * @instance + */ + RunReportResponse.prototype.reportResult = ""; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {google.ads.admanager.v1.IRunReportResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse instance + */ + RunReportResponse.create = function create(properties) { + return new RunReportResponse(properties); + }; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {google.ads.admanager.v1.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportResult != null && Object.hasOwnProperty.call(message, "reportResult")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reportResult); + return writer; + }; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {google.ads.admanager.v1.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reportResult = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_201_COUNT": - case 147: - message.metrics[i] = 147; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportResponse message. + * @function verify + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reportResult != null && message.hasOwnProperty("reportResult")) + if (!$util.isString(message.reportResult)) + return "reportResult: string expected"; + return null; + }; + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + */ + RunReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RunReportResponse) + return object; + var message = new $root.google.ads.admanager.v1.RunReportResponse(); + if (object.reportResult != null) + message.reportResult = String(object.reportResult); + return message; + }; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {google.ads.admanager.v1.RunReportResponse} message RunReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.reportResult = ""; + if (message.reportResult != null && message.hasOwnProperty("reportResult")) + object.reportResult = message.reportResult; + return object; + }; + + /** + * Converts this RunReportResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RunReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RunReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RunReportResponse"; + }; + + return RunReportResponse; + })(); + + v1.GetReportRequest = (function() { + + /** + * Properties of a GetReportRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetReportRequest + * @property {string|null} [name] GetReportRequest name + */ + + /** + * Constructs a new GetReportRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetReportRequest. + * @implements IGetReportRequest + * @constructor + * @param {google.ads.admanager.v1.IGetReportRequest=} [properties] Properties to set + */ + function GetReportRequest(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]]; + } + + /** + * GetReportRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetReportRequest + * @instance + */ + GetReportRequest.prototype.name = ""; + + /** + * Creates a new GetReportRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {google.ads.admanager.v1.IGetReportRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest instance + */ + GetReportRequest.create = function create(properties) { + return new GetReportRequest(properties); + }; + + /** + * Encodes the specified GetReportRequest message. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {google.ads.admanager.v1.IGetReportRequest} message GetReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportRequest.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 GetReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {google.ads.admanager.v1.IGetReportRequest} message GetReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_202_COUNT": - case 148: - message.metrics[i] = 148; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportRequest.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 GetReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + */ + GetReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetReportRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetReportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {google.ads.admanager.v1.GetReportRequest} message GetReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportRequest.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 GetReportRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetReportRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetReportRequest"; + }; + + return GetReportRequest; + })(); + + v1.ListReportsRequest = (function() { + + /** + * Properties of a ListReportsRequest. + * @memberof google.ads.admanager.v1 + * @interface IListReportsRequest + * @property {string|null} [parent] ListReportsRequest parent + * @property {number|null} [pageSize] ListReportsRequest pageSize + * @property {string|null} [pageToken] ListReportsRequest pageToken + * @property {string|null} [filter] ListReportsRequest filter + * @property {string|null} [orderBy] ListReportsRequest orderBy + * @property {number|null} [skip] ListReportsRequest skip + */ + + /** + * Constructs a new ListReportsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListReportsRequest. + * @implements IListReportsRequest + * @constructor + * @param {google.ads.admanager.v1.IListReportsRequest=} [properties] Properties to set + */ + function ListReportsRequest(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]]; + } + + /** + * ListReportsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.parent = ""; + + /** + * ListReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.pageSize = 0; + + /** + * ListReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.pageToken = ""; + + /** + * ListReportsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.filter = ""; + + /** + * ListReportsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.orderBy = ""; + + /** + * ListReportsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + */ + ListReportsRequest.prototype.skip = 0; + + /** + * Creates a new ListReportsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {google.ads.admanager.v1.IListReportsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest instance + */ + ListReportsRequest.create = function create(properties) { + return new ListReportsRequest(properties); + }; + + /** + * Encodes the specified ListReportsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {google.ads.admanager.v1.IListReportsRequest} message ListReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportsRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListReportsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {google.ads.admanager.v1.IListReportsRequest} message ListReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_203_COUNT": - case 149: - message.metrics[i] = 149; + } + case 2: { + message.pageSize = reader.int32(); break; - case "VIDEO_REAL_TIME_ERROR_300_COUNT": - case 150: - message.metrics[i] = 150; + } + case 3: { + message.pageToken = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_301_COUNT": - case 151: - message.metrics[i] = 151; + } + case 4: { + message.filter = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_302_COUNT": - case 152: - message.metrics[i] = 152; + } + case 5: { + message.orderBy = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_303_COUNT": - case 153: - message.metrics[i] = 153; + } + case 6: { + message.skip = reader.int32(); break; - case "VIDEO_REAL_TIME_ERROR_400_COUNT": - case 154: - message.metrics[i] = 154; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportsRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + */ + ListReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListReportsRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListReportsRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {google.ads.admanager.v1.ListReportsRequest} message ListReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportsRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListReportsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListReportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListReportsRequest"; + }; + + return ListReportsRequest; + })(); + + v1.ListReportsResponse = (function() { + + /** + * Properties of a ListReportsResponse. + * @memberof google.ads.admanager.v1 + * @interface IListReportsResponse + * @property {Array.|null} [reports] ListReportsResponse reports + * @property {string|null} [nextPageToken] ListReportsResponse nextPageToken + * @property {number|null} [totalSize] ListReportsResponse totalSize + */ + + /** + * Constructs a new ListReportsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListReportsResponse. + * @implements IListReportsResponse + * @constructor + * @param {google.ads.admanager.v1.IListReportsResponse=} [properties] Properties to set + */ + function ListReportsResponse(properties) { + this.reports = []; + 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]]; + } + + /** + * ListReportsResponse reports. + * @member {Array.} reports + * @memberof google.ads.admanager.v1.ListReportsResponse + * @instance + */ + ListReportsResponse.prototype.reports = $util.emptyArray; + + /** + * ListReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListReportsResponse + * @instance + */ + ListReportsResponse.prototype.nextPageToken = ""; + + /** + * ListReportsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListReportsResponse + * @instance + */ + ListReportsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListReportsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {google.ads.admanager.v1.IListReportsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse instance + */ + ListReportsResponse.create = function create(properties) { + return new ListReportsResponse(properties); + }; + + /** + * Encodes the specified ListReportsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {google.ads.admanager.v1.IListReportsResponse} message ListReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reports != null && message.reports.length) + for (var i = 0; i < message.reports.length; ++i) + $root.google.ads.admanager.v1.Report.encode(message.reports[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListReportsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {google.ads.admanager.v1.IListReportsResponse} message ListReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reports && message.reports.length)) + message.reports = []; + message.reports.push($root.google.ads.admanager.v1.Report.decode(reader, reader.uint32())); break; - case "VIDEO_REAL_TIME_ERROR_401_COUNT": - case 155: - message.metrics[i] = 155; + } + case 2: { + message.nextPageToken = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_402_COUNT": - case 156: - message.metrics[i] = 156; + } + case 3: { + message.totalSize = reader.int32(); break; - case "VIDEO_REAL_TIME_ERROR_403_COUNT": - case 157: - message.metrics[i] = 157; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reports != null && message.hasOwnProperty("reports")) { + if (!Array.isArray(message.reports)) + return "reports: array expected"; + for (var i = 0; i < message.reports.length; ++i) { + var error = $root.google.ads.admanager.v1.Report.verify(message.reports[i]); + if (error) + return "reports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + */ + ListReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListReportsResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListReportsResponse(); + if (object.reports) { + if (!Array.isArray(object.reports)) + throw TypeError(".google.ads.admanager.v1.ListReportsResponse.reports: array expected"); + message.reports = []; + for (var i = 0; i < object.reports.length; ++i) { + if (typeof object.reports[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListReportsResponse.reports: object expected"); + message.reports[i] = $root.google.ads.admanager.v1.Report.fromObject(object.reports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {google.ads.admanager.v1.ListReportsResponse} message ListReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reports = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.reports && message.reports.length) { + object.reports = []; + for (var j = 0; j < message.reports.length; ++j) + object.reports[j] = $root.google.ads.admanager.v1.Report.toObject(message.reports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListReportsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListReportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListReportsResponse"; + }; + + return ListReportsResponse; + })(); + + v1.CreateReportRequest = (function() { + + /** + * Properties of a CreateReportRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreateReportRequest + * @property {string|null} [parent] CreateReportRequest parent + * @property {google.ads.admanager.v1.IReport|null} [report] CreateReportRequest report + */ + + /** + * Constructs a new CreateReportRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreateReportRequest. + * @implements ICreateReportRequest + * @constructor + * @param {google.ads.admanager.v1.ICreateReportRequest=} [properties] Properties to set + */ + function CreateReportRequest(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]]; + } + + /** + * CreateReportRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateReportRequest + * @instance + */ + CreateReportRequest.prototype.parent = ""; + + /** + * CreateReportRequest report. + * @member {google.ads.admanager.v1.IReport|null|undefined} report + * @memberof google.ads.admanager.v1.CreateReportRequest + * @instance + */ + CreateReportRequest.prototype.report = null; + + /** + * Creates a new CreateReportRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {google.ads.admanager.v1.ICreateReportRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest instance + */ + CreateReportRequest.create = function create(properties) { + return new CreateReportRequest(properties); + }; + + /** + * Encodes the specified CreateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {google.ads.admanager.v1.ICreateReportRequest} message CreateReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportRequest.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.report != null && Object.hasOwnProperty.call(message, "report")) + $root.google.ads.admanager.v1.Report.encode(message.report, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {google.ads.admanager.v1.ICreateReportRequest} message CreateReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_405_COUNT": - case 158: - message.metrics[i] = 158; + } + case 2: { + message.report = $root.google.ads.admanager.v1.Report.decode(reader, reader.uint32()); break; - case "VIDEO_REAL_TIME_ERROR_406_COUNT": - case 159: - message.metrics[i] = 159; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReportRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReportRequest.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.report != null && message.hasOwnProperty("report")) { + var error = $root.google.ads.admanager.v1.Report.verify(message.report); + if (error) + return "report." + error; + } + return null; + }; + + /** + * Creates a CreateReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + */ + CreateReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateReportRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreateReportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.report != null) { + if (typeof object.report !== "object") + throw TypeError(".google.ads.admanager.v1.CreateReportRequest.report: object expected"); + message.report = $root.google.ads.admanager.v1.Report.fromObject(object.report); + } + return message; + }; + + /** + * Creates a plain object from a CreateReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {google.ads.admanager.v1.CreateReportRequest} message CreateReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.report = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.report != null && message.hasOwnProperty("report")) + object.report = $root.google.ads.admanager.v1.Report.toObject(message.report, options); + return object; + }; + + /** + * Converts this CreateReportRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreateReportRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReportRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreateReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreateReportRequest"; + }; + + return CreateReportRequest; + })(); + + v1.UpdateReportRequest = (function() { + + /** + * Properties of an UpdateReportRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdateReportRequest + * @property {google.ads.admanager.v1.IReport|null} [report] UpdateReportRequest report + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReportRequest updateMask + */ + + /** + * Constructs a new UpdateReportRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdateReportRequest. + * @implements IUpdateReportRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdateReportRequest=} [properties] Properties to set + */ + function UpdateReportRequest(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]]; + } + + /** + * UpdateReportRequest report. + * @member {google.ads.admanager.v1.IReport|null|undefined} report + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @instance + */ + UpdateReportRequest.prototype.report = null; + + /** + * UpdateReportRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @instance + */ + UpdateReportRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateReportRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {google.ads.admanager.v1.IUpdateReportRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest instance + */ + UpdateReportRequest.create = function create(properties) { + return new UpdateReportRequest(properties); + }; + + /** + * Encodes the specified UpdateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {google.ads.admanager.v1.IUpdateReportRequest} message UpdateReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.report != null && Object.hasOwnProperty.call(message, "report")) + $root.google.ads.admanager.v1.Report.encode(message.report, 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 UpdateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {google.ads.admanager.v1.IUpdateReportRequest} message UpdateReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.report = $root.google.ads.admanager.v1.Report.decode(reader, reader.uint32()); break; - case "VIDEO_REAL_TIME_ERROR_407_COUNT": - case 160: - message.metrics[i] = 160; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; - case "VIDEO_REAL_TIME_ERROR_408_COUNT": - case 161: - message.metrics[i] = 161; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateReportRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.report != null && message.hasOwnProperty("report")) { + var error = $root.google.ads.admanager.v1.Report.verify(message.report); + if (error) + return "report." + 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 an UpdateReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest + */ + UpdateReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateReportRequest) + return object; + var message = new $root.google.ads.admanager.v1.UpdateReportRequest(); + if (object.report != null) { + if (typeof object.report !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateReportRequest.report: object expected"); + message.report = $root.google.ads.admanager.v1.Report.fromObject(object.report); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateReportRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {google.ads.admanager.v1.UpdateReportRequest} message UpdateReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.report = null; + object.updateMask = null; + } + if (message.report != null && message.hasOwnProperty("report")) + object.report = $root.google.ads.admanager.v1.Report.toObject(message.report, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateReportRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateReportRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdateReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateReportRequest"; + }; + + return UpdateReportRequest; + })(); + + v1.FetchReportResultRowsRequest = (function() { + + /** + * Properties of a FetchReportResultRowsRequest. + * @memberof google.ads.admanager.v1 + * @interface IFetchReportResultRowsRequest + * @property {string|null} [name] FetchReportResultRowsRequest name + * @property {number|null} [pageSize] FetchReportResultRowsRequest pageSize + * @property {string|null} [pageToken] FetchReportResultRowsRequest pageToken + */ + + /** + * Constructs a new FetchReportResultRowsRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a FetchReportResultRowsRequest. + * @implements IFetchReportResultRowsRequest + * @constructor + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest=} [properties] Properties to set + */ + function FetchReportResultRowsRequest(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]]; + } + + /** + * FetchReportResultRowsRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @instance + */ + FetchReportResultRowsRequest.prototype.name = ""; + + /** + * FetchReportResultRowsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @instance + */ + FetchReportResultRowsRequest.prototype.pageSize = 0; + + /** + * FetchReportResultRowsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @instance + */ + FetchReportResultRowsRequest.prototype.pageToken = ""; + + /** + * Creates a new FetchReportResultRowsRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest instance + */ + FetchReportResultRowsRequest.create = function create(properties) { + return new FetchReportResultRowsRequest(properties); + }; + + /** + * Encodes the specified FetchReportResultRowsRequest message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} message FetchReportResultRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReportResultRowsRequest.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.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 FetchReportResultRowsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} message FetchReportResultRowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReportResultRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReportResultRowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FetchReportResultRowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_409_COUNT": - case 162: - message.metrics[i] = 162; + } + case 2: { + message.pageSize = reader.int32(); break; - case "VIDEO_REAL_TIME_ERROR_410_COUNT": - case 163: - message.metrics[i] = 163; + } + case 3: { + message.pageToken = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_500_COUNT": - case 164: - message.metrics[i] = 164; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReportResultRowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReportResultRowsRequest message. + * @function verify + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReportResultRowsRequest.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.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 FetchReportResultRowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + */ + FetchReportResultRowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.FetchReportResultRowsRequest) + return object; + var message = new $root.google.ads.admanager.v1.FetchReportResultRowsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 FetchReportResultRowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {google.ads.admanager.v1.FetchReportResultRowsRequest} message FetchReportResultRowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReportResultRowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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 FetchReportResultRowsRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchReportResultRowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReportResultRowsRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReportResultRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.FetchReportResultRowsRequest"; + }; + + return FetchReportResultRowsRequest; + })(); + + v1.FetchReportResultRowsResponse = (function() { + + /** + * Properties of a FetchReportResultRowsResponse. + * @memberof google.ads.admanager.v1 + * @interface IFetchReportResultRowsResponse + * @property {Array.|null} [rows] FetchReportResultRowsResponse rows + * @property {google.protobuf.ITimestamp|null} [runTime] FetchReportResultRowsResponse runTime + * @property {Array.|null} [dateRanges] FetchReportResultRowsResponse dateRanges + * @property {Array.|null} [comparisonDateRanges] FetchReportResultRowsResponse comparisonDateRanges + * @property {number|null} [totalRowCount] FetchReportResultRowsResponse totalRowCount + * @property {string|null} [nextPageToken] FetchReportResultRowsResponse nextPageToken + */ + + /** + * Constructs a new FetchReportResultRowsResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a FetchReportResultRowsResponse. + * @implements IFetchReportResultRowsResponse + * @constructor + * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse=} [properties] Properties to set + */ + function FetchReportResultRowsResponse(properties) { + this.rows = []; + this.dateRanges = []; + this.comparisonDateRanges = []; + 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]]; + } + + /** + * FetchReportResultRowsResponse rows. + * @member {Array.} rows + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.rows = $util.emptyArray; + + /** + * FetchReportResultRowsResponse runTime. + * @member {google.protobuf.ITimestamp|null|undefined} runTime + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.runTime = null; + + /** + * FetchReportResultRowsResponse dateRanges. + * @member {Array.} dateRanges + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.dateRanges = $util.emptyArray; + + /** + * FetchReportResultRowsResponse comparisonDateRanges. + * @member {Array.} comparisonDateRanges + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.comparisonDateRanges = $util.emptyArray; + + /** + * FetchReportResultRowsResponse totalRowCount. + * @member {number} totalRowCount + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.totalRowCount = 0; + + /** + * FetchReportResultRowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + */ + FetchReportResultRowsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new FetchReportResultRowsResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse instance + */ + FetchReportResultRowsResponse.create = function create(properties) { + return new FetchReportResultRowsResponse(properties); + }; + + /** + * Encodes the specified FetchReportResultRowsResponse message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse} message FetchReportResultRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReportResultRowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.ads.admanager.v1.ReportDataTable.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.runTime != null && Object.hasOwnProperty.call(message, "runTime")) + $root.google.protobuf.Timestamp.encode(message.runTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.encode(message.dateRanges[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.comparisonDateRanges != null && message.comparisonDateRanges.length) + for (var i = 0; i < message.comparisonDateRanges.length; ++i) + $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.encode(message.comparisonDateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalRowCount); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified FetchReportResultRowsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse} message FetchReportResultRowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReportResultRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReportResultRowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FetchReportResultRowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.ads.admanager.v1.ReportDataTable.Row.decode(reader, reader.uint32())); break; - case "VIDEO_REAL_TIME_ERROR_501_COUNT": - case 165: - message.metrics[i] = 165; + } + case 2: { + message.runTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "VIDEO_REAL_TIME_ERROR_502_COUNT": - case 166: - message.metrics[i] = 166; + } + case 3: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.decode(reader, reader.uint32())); break; - case "VIDEO_REAL_TIME_ERROR_503_COUNT": - case 167: - message.metrics[i] = 167; + } + case 4: { + if (!(message.comparisonDateRanges && message.comparisonDateRanges.length)) + message.comparisonDateRanges = []; + message.comparisonDateRanges.push($root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.decode(reader, reader.uint32())); break; - case "VIDEO_REAL_TIME_ERROR_600_COUNT": - case 168: - message.metrics[i] = 168; + } + case 5: { + message.totalRowCount = reader.int32(); break; - case "VIDEO_REAL_TIME_ERROR_601_COUNT": - case 169: - message.metrics[i] = 169; + } + case 6: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReportResultRowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReportResultRowsResponse message. + * @function verify + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReportResultRowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDataTable.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.runTime != null && message.hasOwnProperty("runTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.runTime); + if (error) + return "runTime." + error; + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.comparisonDateRanges != null && message.hasOwnProperty("comparisonDateRanges")) { + if (!Array.isArray(message.comparisonDateRanges)) + return "comparisonDateRanges: array expected"; + for (var i = 0; i < message.comparisonDateRanges.length; ++i) { + var error = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.verify(message.comparisonDateRanges[i]); + if (error) + return "comparisonDateRanges." + error; + } + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) + if (!$util.isInteger(message.totalRowCount)) + return "totalRowCount: integer expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a FetchReportResultRowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + */ + FetchReportResultRowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.FetchReportResultRowsResponse) + return object; + var message = new $root.google.ads.admanager.v1.FetchReportResultRowsResponse(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.rows: object expected"); + message.rows[i] = $root.google.ads.admanager.v1.ReportDataTable.Row.fromObject(object.rows[i]); + } + } + if (object.runTime != null) { + if (typeof object.runTime !== "object") + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.runTime: object expected"); + message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.dateRanges: object expected"); + message.dateRanges[i] = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.fromObject(object.dateRanges[i]); + } + } + if (object.comparisonDateRanges) { + if (!Array.isArray(object.comparisonDateRanges)) + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.comparisonDateRanges: array expected"); + message.comparisonDateRanges = []; + for (var i = 0; i < object.comparisonDateRanges.length; ++i) { + if (typeof object.comparisonDateRanges[i] !== "object") + throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.comparisonDateRanges: object expected"); + message.comparisonDateRanges[i] = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.fromObject(object.comparisonDateRanges[i]); + } + } + if (object.totalRowCount != null) + message.totalRowCount = object.totalRowCount | 0; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a FetchReportResultRowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {google.ads.admanager.v1.FetchReportResultRowsResponse} message FetchReportResultRowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReportResultRowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rows = []; + object.dateRanges = []; + object.comparisonDateRanges = []; + } + if (options.defaults) { + object.runTime = null; + object.totalRowCount = 0; + object.nextPageToken = ""; + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.ads.admanager.v1.ReportDataTable.Row.toObject(message.rows[j], options); + } + if (message.runTime != null && message.hasOwnProperty("runTime")) + object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.toObject(message.dateRanges[j], options); + } + if (message.comparisonDateRanges && message.comparisonDateRanges.length) { + object.comparisonDateRanges = []; + for (var j = 0; j < message.comparisonDateRanges.length; ++j) + object.comparisonDateRanges[j] = $root.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange.toObject(message.comparisonDateRanges[j], options); + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) + object.totalRowCount = message.totalRowCount; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this FetchReportResultRowsResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchReportResultRowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReportResultRowsResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReportResultRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.FetchReportResultRowsResponse"; + }; + + return FetchReportResultRowsResponse; + })(); + + v1.RoleStatusEnum = (function() { + + /** + * Properties of a RoleStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface IRoleStatusEnum + */ + + /** + * Constructs a new RoleStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RoleStatusEnum. + * @implements IRoleStatusEnum + * @constructor + * @param {google.ads.admanager.v1.IRoleStatusEnum=} [properties] Properties to set + */ + function RoleStatusEnum(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 RoleStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {google.ads.admanager.v1.IRoleStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum instance + */ + RoleStatusEnum.create = function create(properties) { + return new RoleStatusEnum(properties); + }; + + /** + * Encodes the specified RoleStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {google.ads.admanager.v1.IRoleStatusEnum} message RoleStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoleStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RoleStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {google.ads.admanager.v1.IRoleStatusEnum} message RoleStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RoleStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RoleStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoleStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RoleStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RoleStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RoleStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RoleStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RoleStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RoleStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + */ + RoleStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.RoleStatusEnum) + return object; + return new $root.google.ads.admanager.v1.RoleStatusEnum(); + }; + + /** + * Creates a plain object from a RoleStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {google.ads.admanager.v1.RoleStatusEnum} message RoleStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RoleStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RoleStatusEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @instance + * @returns {Object.} JSON object + */ + RoleStatusEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RoleStatusEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.RoleStatusEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RoleStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.RoleStatusEnum"; + }; + + /** + * RoleStatus enum. + * @name google.ads.admanager.v1.RoleStatusEnum.RoleStatus + * @enum {number} + * @property {number} ROLE_STATUS_UNSPECIFIED=0 ROLE_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + RoleStatusEnum.RoleStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + return RoleStatusEnum; + })(); + + v1.Role = (function() { + + /** + * Properties of a Role. + * @memberof google.ads.admanager.v1 + * @interface IRole + * @property {string|null} [name] Role name + * @property {number|Long|null} [roleId] Role roleId + * @property {string|null} [displayName] Role displayName + * @property {string|null} [description] Role description + * @property {boolean|null} [builtIn] Role builtIn + * @property {google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null} [status] Role status + */ + + /** + * Constructs a new Role. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Role. + * @implements IRole + * @constructor + * @param {google.ads.admanager.v1.IRole=} [properties] Properties to set + */ + function Role(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]]; + } + + /** + * Role name. + * @member {string} name + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.name = ""; + + /** + * Role roleId. + * @member {number|Long|null|undefined} roleId + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.roleId = null; + + /** + * Role displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.displayName = null; + + /** + * Role description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.description = null; + + /** + * Role builtIn. + * @member {boolean|null|undefined} builtIn + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.builtIn = null; + + /** + * Role status. + * @member {google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null|undefined} status + * @memberof google.ads.admanager.v1.Role + * @instance + */ + Role.prototype.status = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Role.prototype, "_roleId", { + get: $util.oneOfGetter($oneOfFields = ["roleId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Role.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Role.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Role.prototype, "_builtIn", { + get: $util.oneOfGetter($oneOfFields = ["builtIn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Role.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Role instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Role + * @static + * @param {google.ads.admanager.v1.IRole=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Role} Role instance + */ + Role.create = function create(properties) { + return new Role(properties); + }; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Role + * @static + * @param {google.ads.admanager.v1.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.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.roleId != null && Object.hasOwnProperty.call(message, "roleId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.roleId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.builtIn != null && Object.hasOwnProperty.call(message, "builtIn")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.builtIn); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + return writer; + }; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Role + * @static + * @param {google.ads.admanager.v1.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Role message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Role(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_602_COUNT": - case 170: - message.metrics[i] = 170; + } + case 2: { + message.roleId = reader.int64(); break; - case "VIDEO_REAL_TIME_ERROR_603_COUNT": - case 171: - message.metrics[i] = 171; + } + case 3: { + message.displayName = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_604_COUNT": - case 172: - message.metrics[i] = 172; + } + case 4: { + message.description = reader.string(); break; - case "VIDEO_REAL_TIME_ERROR_900_COUNT": - case 173: - message.metrics[i] = 173; + } + case 5: { + message.builtIn = reader.bool(); break; - case "VIDEO_REAL_TIME_ERROR_901_COUNT": - case 174: - message.metrics[i] = 174; + } + case 6: { + message.status = reader.int32(); break; - case "VIDEO_REAL_TIME_IMPRESSIONS": - case 138: - message.metrics[i] = 138; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Role message. + * @function verify + * @memberof google.ads.admanager.v1.Role + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Role.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.roleId != null && message.hasOwnProperty("roleId")) { + properties._roleId = 1; + if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) + return "roleId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.builtIn != null && message.hasOwnProperty("builtIn")) { + properties._builtIn = 1; + if (typeof message.builtIn !== "boolean") + return "builtIn: boolean expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a Role message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Role + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Role} Role + */ + Role.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Role) + return object; + var message = new $root.google.ads.admanager.v1.Role(); + if (object.name != null) + message.name = String(object.name); + if (object.roleId != null) + if ($util.Long) + (message.roleId = $util.Long.fromValue(object.roleId)).unsigned = false; + else if (typeof object.roleId === "string") + message.roleId = parseInt(object.roleId, 10); + else if (typeof object.roleId === "number") + message.roleId = object.roleId; + else if (typeof object.roleId === "object") + message.roleId = new $util.LongBits(object.roleId.low >>> 0, object.roleId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.builtIn != null) + message.builtIn = Boolean(object.builtIn); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "ROLE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Role + * @static + * @param {google.ads.admanager.v1.Role} message Role + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Role.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 (message.roleId != null && message.hasOwnProperty("roleId")) { + if (typeof message.roleId === "number") + object.roleId = options.longs === String ? String(message.roleId) : message.roleId; + else + object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; + if (options.oneofs) + object._roleId = "roleId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.builtIn != null && message.hasOwnProperty("builtIn")) { + object.builtIn = message.builtIn; + if (options.oneofs) + object._builtIn = "builtIn"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.RoleStatusEnum.RoleStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.RoleStatusEnum.RoleStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + return object; + }; + + /** + * Converts this Role to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Role + * @instance + * @returns {Object.} JSON object + */ + Role.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Role + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Role + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Role"; + }; + + return Role; + })(); + + v1.RoleService = (function() { + + /** + * Constructs a new RoleService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a RoleService + * @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 RoleService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (RoleService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RoleService; + + /** + * Creates new RoleService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.RoleService + * @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 {RoleService} RPC service. Useful where requests and/or responses are streamed. + */ + RoleService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.RoleService|getRole}. + * @memberof google.ads.admanager.v1.RoleService + * @typedef GetRoleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Role} [response] Role + */ + + /** + * Calls GetRole. + * @function getRole + * @memberof google.ads.admanager.v1.RoleService + * @instance + * @param {google.ads.admanager.v1.IGetRoleRequest} request GetRoleRequest message or plain object + * @param {google.ads.admanager.v1.RoleService.GetRoleCallback} callback Node-style callback called with the error, if any, and Role + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RoleService.prototype.getRole = function getRole(request, callback) { + return this.rpcCall(getRole, $root.google.ads.admanager.v1.GetRoleRequest, $root.google.ads.admanager.v1.Role, request, callback); + }, "name", { value: "GetRole" }); + + /** + * Calls GetRole. + * @function getRole + * @memberof google.ads.admanager.v1.RoleService + * @instance + * @param {google.ads.admanager.v1.IGetRoleRequest} request GetRoleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.RoleService|listRoles}. + * @memberof google.ads.admanager.v1.RoleService + * @typedef ListRolesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListRolesResponse} [response] ListRolesResponse + */ + + /** + * Calls ListRoles. + * @function listRoles + * @memberof google.ads.admanager.v1.RoleService + * @instance + * @param {google.ads.admanager.v1.IListRolesRequest} request ListRolesRequest message or plain object + * @param {google.ads.admanager.v1.RoleService.ListRolesCallback} callback Node-style callback called with the error, if any, and ListRolesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RoleService.prototype.listRoles = function listRoles(request, callback) { + return this.rpcCall(listRoles, $root.google.ads.admanager.v1.ListRolesRequest, $root.google.ads.admanager.v1.ListRolesResponse, request, callback); + }, "name", { value: "ListRoles" }); + + /** + * Calls ListRoles. + * @function listRoles + * @memberof google.ads.admanager.v1.RoleService + * @instance + * @param {google.ads.admanager.v1.IListRolesRequest} request ListRolesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return RoleService; + })(); + + v1.GetRoleRequest = (function() { + + /** + * Properties of a GetRoleRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetRoleRequest + * @property {string|null} [name] GetRoleRequest name + */ + + /** + * Constructs a new GetRoleRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetRoleRequest. + * @implements IGetRoleRequest + * @constructor + * @param {google.ads.admanager.v1.IGetRoleRequest=} [properties] Properties to set + */ + function GetRoleRequest(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]]; + } + + /** + * GetRoleRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetRoleRequest + * @instance + */ + GetRoleRequest.prototype.name = ""; + + /** + * Creates a new GetRoleRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {google.ads.admanager.v1.IGetRoleRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest instance + */ + GetRoleRequest.create = function create(properties) { + return new GetRoleRequest(properties); + }; + + /** + * Encodes the specified GetRoleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {google.ads.admanager.v1.IGetRoleRequest} message GetRoleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRoleRequest.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 GetRoleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {google.ads.admanager.v1.IGetRoleRequest} message GetRoleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRoleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRoleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRoleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetRoleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_REAL_TIME_MATCHED_QUERIES": - case 140: - message.metrics[i] = 140; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRoleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRoleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRoleRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRoleRequest.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 GetRoleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + */ + GetRoleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetRoleRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetRoleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRoleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {google.ads.admanager.v1.GetRoleRequest} message GetRoleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRoleRequest.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 GetRoleRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetRoleRequest + * @instance + * @returns {Object.} JSON object + */ + GetRoleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRoleRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetRoleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRoleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetRoleRequest"; + }; + + return GetRoleRequest; + })(); + + v1.ListRolesRequest = (function() { + + /** + * Properties of a ListRolesRequest. + * @memberof google.ads.admanager.v1 + * @interface IListRolesRequest + * @property {string|null} [parent] ListRolesRequest parent + * @property {number|null} [pageSize] ListRolesRequest pageSize + * @property {string|null} [pageToken] ListRolesRequest pageToken + * @property {string|null} [filter] ListRolesRequest filter + * @property {string|null} [orderBy] ListRolesRequest orderBy + * @property {number|null} [skip] ListRolesRequest skip + */ + + /** + * Constructs a new ListRolesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListRolesRequest. + * @implements IListRolesRequest + * @constructor + * @param {google.ads.admanager.v1.IListRolesRequest=} [properties] Properties to set + */ + function ListRolesRequest(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]]; + } + + /** + * ListRolesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.parent = ""; + + /** + * ListRolesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.pageSize = 0; + + /** + * ListRolesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.pageToken = ""; + + /** + * ListRolesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.filter = ""; + + /** + * ListRolesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.orderBy = ""; + + /** + * ListRolesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + */ + ListRolesRequest.prototype.skip = 0; + + /** + * Creates a new ListRolesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {google.ads.admanager.v1.IListRolesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest instance + */ + ListRolesRequest.create = function create(properties) { + return new ListRolesRequest(properties); + }; + + /** + * Encodes the specified ListRolesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {google.ads.admanager.v1.IListRolesRequest} message ListRolesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolesRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListRolesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {google.ads.admanager.v1.IListRolesRequest} message ListRolesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListRolesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": - case 175: - message.metrics[i] = 175; + } + case 2: { + message.pageSize = reader.int32(); break; - case "VIDEO_REAL_TIME_TOTAL_QUERIES": - case 142: - message.metrics[i] = 142; + } + case 3: { + message.pageToken = reader.string(); break; - case "VIDEO_REAL_TIME_UNMATCHED_QUERIES": - case 141: - message.metrics[i] = 141; + } + case 4: { + message.filter = reader.string(); break; - case "VIDEO_VIEWERSHIP_AUTO_PLAYS": - case 103: - message.metrics[i] = 103; + } + case 5: { + message.orderBy = reader.string(); break; - case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": - case 104: - message.metrics[i] = 104; + } + case 6: { + message.skip = reader.int32(); break; - case "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": - case 105: - message.metrics[i] = 105; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRolesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRolesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolesRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListRolesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + */ + ListRolesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListRolesRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListRolesRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListRolesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {google.ads.admanager.v1.ListRolesRequest} message ListRolesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolesRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListRolesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListRolesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRolesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRolesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListRolesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListRolesRequest"; + }; + + return ListRolesRequest; + })(); + + v1.ListRolesResponse = (function() { + + /** + * Properties of a ListRolesResponse. + * @memberof google.ads.admanager.v1 + * @interface IListRolesResponse + * @property {Array.|null} [roles] ListRolesResponse roles + * @property {string|null} [nextPageToken] ListRolesResponse nextPageToken + * @property {number|null} [totalSize] ListRolesResponse totalSize + */ + + /** + * Constructs a new ListRolesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListRolesResponse. + * @implements IListRolesResponse + * @constructor + * @param {google.ads.admanager.v1.IListRolesResponse=} [properties] Properties to set + */ + function ListRolesResponse(properties) { + this.roles = []; + 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]]; + } + + /** + * ListRolesResponse roles. + * @member {Array.} roles + * @memberof google.ads.admanager.v1.ListRolesResponse + * @instance + */ + ListRolesResponse.prototype.roles = $util.emptyArray; + + /** + * ListRolesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListRolesResponse + * @instance + */ + ListRolesResponse.prototype.nextPageToken = ""; + + /** + * ListRolesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListRolesResponse + * @instance + */ + ListRolesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListRolesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {google.ads.admanager.v1.IListRolesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse instance + */ + ListRolesResponse.create = function create(properties) { + return new ListRolesResponse(properties); + }; + + /** + * Encodes the specified ListRolesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {google.ads.admanager.v1.IListRolesResponse} message ListRolesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.roles != null && message.roles.length) + for (var i = 0; i < message.roles.length; ++i) + $root.google.ads.admanager.v1.Role.encode(message.roles[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListRolesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {google.ads.admanager.v1.IListRolesResponse} message ListRolesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListRolesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.roles && message.roles.length)) + message.roles = []; + message.roles.push($root.google.ads.admanager.v1.Role.decode(reader, reader.uint32())); break; - case "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": - case 106: - message.metrics[i] = 106; + } + case 2: { + message.nextPageToken = reader.string(); break; - case "VIDEO_VIEWERSHIP_COMPLETES": - case 107: - message.metrics[i] = 107; + } + case 3: { + message.totalSize = reader.int32(); break; - case "VIDEO_VIEWERSHIP_COMPLETION_RATE": - case 108: - message.metrics[i] = 108; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRolesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRolesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.roles != null && message.hasOwnProperty("roles")) { + if (!Array.isArray(message.roles)) + return "roles: array expected"; + for (var i = 0; i < message.roles.length; ++i) { + var error = $root.google.ads.admanager.v1.Role.verify(message.roles[i]); + if (error) + return "roles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListRolesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + */ + ListRolesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListRolesResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListRolesResponse(); + if (object.roles) { + if (!Array.isArray(object.roles)) + throw TypeError(".google.ads.admanager.v1.ListRolesResponse.roles: array expected"); + message.roles = []; + for (var i = 0; i < object.roles.length; ++i) { + if (typeof object.roles[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListRolesResponse.roles: object expected"); + message.roles[i] = $root.google.ads.admanager.v1.Role.fromObject(object.roles[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListRolesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {google.ads.admanager.v1.ListRolesResponse} message ListRolesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.roles = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.roles && message.roles.length) { + object.roles = []; + for (var j = 0; j < message.roles.length; ++j) + object.roles[j] = $root.google.ads.admanager.v1.Role.toObject(message.roles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListRolesResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListRolesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRolesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRolesResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListRolesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListRolesResponse"; + }; + + return ListRolesResponse; + })(); + + v1.SiteDisapprovalReasonEnum = (function() { + + /** + * Properties of a SiteDisapprovalReasonEnum. + * @memberof google.ads.admanager.v1 + * @interface ISiteDisapprovalReasonEnum + */ + + /** + * Constructs a new SiteDisapprovalReasonEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a SiteDisapprovalReasonEnum. + * @implements ISiteDisapprovalReasonEnum + * @constructor + * @param {google.ads.admanager.v1.ISiteDisapprovalReasonEnum=} [properties] Properties to set + */ + function SiteDisapprovalReasonEnum(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 SiteDisapprovalReasonEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {google.ads.admanager.v1.ISiteDisapprovalReasonEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SiteDisapprovalReasonEnum} SiteDisapprovalReasonEnum instance + */ + SiteDisapprovalReasonEnum.create = function create(properties) { + return new SiteDisapprovalReasonEnum(properties); + }; + + /** + * Encodes the specified SiteDisapprovalReasonEnum message. Does not implicitly {@link google.ads.admanager.v1.SiteDisapprovalReasonEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {google.ads.admanager.v1.ISiteDisapprovalReasonEnum} message SiteDisapprovalReasonEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SiteDisapprovalReasonEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SiteDisapprovalReasonEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SiteDisapprovalReasonEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {google.ads.admanager.v1.ISiteDisapprovalReasonEnum} message SiteDisapprovalReasonEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SiteDisapprovalReasonEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SiteDisapprovalReasonEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.SiteDisapprovalReasonEnum} SiteDisapprovalReasonEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SiteDisapprovalReasonEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SiteDisapprovalReasonEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SiteDisapprovalReasonEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.SiteDisapprovalReasonEnum} SiteDisapprovalReasonEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SiteDisapprovalReasonEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SiteDisapprovalReasonEnum message. + * @function verify + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SiteDisapprovalReasonEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SiteDisapprovalReasonEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.SiteDisapprovalReasonEnum} SiteDisapprovalReasonEnum + */ + SiteDisapprovalReasonEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SiteDisapprovalReasonEnum) + return object; + return new $root.google.ads.admanager.v1.SiteDisapprovalReasonEnum(); + }; + + /** + * Creates a plain object from a SiteDisapprovalReasonEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {google.ads.admanager.v1.SiteDisapprovalReasonEnum} message SiteDisapprovalReasonEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SiteDisapprovalReasonEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SiteDisapprovalReasonEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @instance + * @returns {Object.} JSON object + */ + SiteDisapprovalReasonEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SiteDisapprovalReasonEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.SiteDisapprovalReasonEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SiteDisapprovalReasonEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.SiteDisapprovalReasonEnum"; + }; + + /** + * SiteDisapprovalReason enum. + * @name google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason + * @enum {number} + * @property {number} SITE_DISAPPROVAL_REASON_UNSPECIFIED=0 SITE_DISAPPROVAL_REASON_UNSPECIFIED value + * @property {number} CONTENT=1 CONTENT value + * @property {number} OTHER=2 OTHER value + * @property {number} OWNERSHIP=3 OWNERSHIP value + */ + SiteDisapprovalReasonEnum.SiteDisapprovalReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SITE_DISAPPROVAL_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTENT"] = 1; + values[valuesById[2] = "OTHER"] = 2; + values[valuesById[3] = "OWNERSHIP"] = 3; + return values; + })(); + + return SiteDisapprovalReasonEnum; + })(); + + v1.SiteApprovalStatusEnum = (function() { + + /** + * Properties of a SiteApprovalStatusEnum. + * @memberof google.ads.admanager.v1 + * @interface ISiteApprovalStatusEnum + */ + + /** + * Constructs a new SiteApprovalStatusEnum. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a SiteApprovalStatusEnum. + * @implements ISiteApprovalStatusEnum + * @constructor + * @param {google.ads.admanager.v1.ISiteApprovalStatusEnum=} [properties] Properties to set + */ + function SiteApprovalStatusEnum(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 SiteApprovalStatusEnum instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {google.ads.admanager.v1.ISiteApprovalStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.SiteApprovalStatusEnum} SiteApprovalStatusEnum instance + */ + SiteApprovalStatusEnum.create = function create(properties) { + return new SiteApprovalStatusEnum(properties); + }; + + /** + * Encodes the specified SiteApprovalStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.SiteApprovalStatusEnum.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {google.ads.admanager.v1.ISiteApprovalStatusEnum} message SiteApprovalStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SiteApprovalStatusEnum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SiteApprovalStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.SiteApprovalStatusEnum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {google.ads.admanager.v1.ISiteApprovalStatusEnum} message SiteApprovalStatusEnum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SiteApprovalStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SiteApprovalStatusEnum message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.SiteApprovalStatusEnum} SiteApprovalStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SiteApprovalStatusEnum.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.SiteApprovalStatusEnum(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SiteApprovalStatusEnum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.SiteApprovalStatusEnum} SiteApprovalStatusEnum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SiteApprovalStatusEnum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SiteApprovalStatusEnum message. + * @function verify + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SiteApprovalStatusEnum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SiteApprovalStatusEnum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.SiteApprovalStatusEnum} SiteApprovalStatusEnum + */ + SiteApprovalStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.SiteApprovalStatusEnum) + return object; + return new $root.google.ads.admanager.v1.SiteApprovalStatusEnum(); + }; + + /** + * Creates a plain object from a SiteApprovalStatusEnum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {google.ads.admanager.v1.SiteApprovalStatusEnum} message SiteApprovalStatusEnum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SiteApprovalStatusEnum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SiteApprovalStatusEnum to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @instance + * @returns {Object.} JSON object + */ + SiteApprovalStatusEnum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SiteApprovalStatusEnum + * @function getTypeUrl + * @memberof google.ads.admanager.v1.SiteApprovalStatusEnum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SiteApprovalStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.SiteApprovalStatusEnum"; + }; + + /** + * SiteApprovalStatus enum. + * @name google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus + * @enum {number} + * @property {number} SITE_APPROVAL_STATUS_UNSPECIFIED=0 SITE_APPROVAL_STATUS_UNSPECIFIED value + * @property {number} APPROVED=1 APPROVED value + * @property {number} DISAPPROVED=2 DISAPPROVED value + * @property {number} DRAFT=3 DRAFT value + * @property {number} REQUIRES_REVIEW=4 REQUIRES_REVIEW value + * @property {number} UNCHECKED=5 UNCHECKED value + */ + SiteApprovalStatusEnum.SiteApprovalStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SITE_APPROVAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "APPROVED"] = 1; + values[valuesById[2] = "DISAPPROVED"] = 2; + values[valuesById[3] = "DRAFT"] = 3; + values[valuesById[4] = "REQUIRES_REVIEW"] = 4; + values[valuesById[5] = "UNCHECKED"] = 5; + return values; + })(); + + return SiteApprovalStatusEnum; + })(); + + v1.Site = (function() { + + /** + * Properties of a Site. + * @memberof google.ads.admanager.v1 + * @interface ISite + * @property {string|null} [name] Site name + * @property {string|null} [url] Site url + * @property {string|null} [childNetworkCode] Site childNetworkCode + * @property {google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|null} [approvalStatus] Site approvalStatus + * @property {google.protobuf.ITimestamp|null} [approvalStatusUpdateTime] Site approvalStatusUpdateTime + * @property {Array.|null} [disapprovalReasons] Site disapprovalReasons + */ + + /** + * Constructs a new Site. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a Site. + * @implements ISite + * @constructor + * @param {google.ads.admanager.v1.ISite=} [properties] Properties to set + */ + function Site(properties) { + this.disapprovalReasons = []; + 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]]; + } + + /** + * Site name. + * @member {string} name + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.name = ""; + + /** + * Site url. + * @member {string|null|undefined} url + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.url = null; + + /** + * Site childNetworkCode. + * @member {string|null|undefined} childNetworkCode + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.childNetworkCode = null; + + /** + * Site approvalStatus. + * @member {google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus|null|undefined} approvalStatus + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.approvalStatus = null; + + /** + * Site approvalStatusUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} approvalStatusUpdateTime + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.approvalStatusUpdateTime = null; + + /** + * Site disapprovalReasons. + * @member {Array.} disapprovalReasons + * @memberof google.ads.admanager.v1.Site + * @instance + */ + Site.prototype.disapprovalReasons = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Site.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Site.prototype, "_childNetworkCode", { + get: $util.oneOfGetter($oneOfFields = ["childNetworkCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Site.prototype, "_approvalStatus", { + get: $util.oneOfGetter($oneOfFields = ["approvalStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Site.prototype, "_approvalStatusUpdateTime", { + get: $util.oneOfGetter($oneOfFields = ["approvalStatusUpdateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Site instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.Site + * @static + * @param {google.ads.admanager.v1.ISite=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Site} Site instance + */ + Site.create = function create(properties) { + return new Site(properties); + }; + + /** + * Encodes the specified Site message. Does not implicitly {@link google.ads.admanager.v1.Site.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.Site + * @static + * @param {google.ads.admanager.v1.ISite} message Site message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Site.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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); + if (message.childNetworkCode != null && Object.hasOwnProperty.call(message, "childNetworkCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.childNetworkCode); + if (message.approvalStatus != null && Object.hasOwnProperty.call(message, "approvalStatus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.approvalStatus); + if (message.approvalStatusUpdateTime != null && Object.hasOwnProperty.call(message, "approvalStatusUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.approvalStatusUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.disapprovalReasons != null && message.disapprovalReasons.length) + for (var i = 0; i < message.disapprovalReasons.length; ++i) + $root.google.ads.admanager.v1.DisapprovalReason.encode(message.disapprovalReasons[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Site message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Site.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.Site + * @static + * @param {google.ads.admanager.v1.ISite} message Site message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Site.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Site message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.Site + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.Site} Site + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Site.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Site(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": - case 109: - message.metrics[i] = 109; + } + case 3: { + message.url = reader.string(); break; - case "VIDEO_VIEWERSHIP_FIRST_QUARTILES": - case 110: - message.metrics[i] = 110; + } + case 4: { + message.childNetworkCode = reader.string(); break; - case "VIDEO_VIEWERSHIP_MIDPOINTS": - case 111: - message.metrics[i] = 111; + } + case 5: { + message.approvalStatus = reader.int32(); break; - case "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": - case 112: - message.metrics[i] = 112; + } + case 6: { + message.approvalStatusUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "VIDEO_VIEWERSHIP_STARTS": - case 113: - message.metrics[i] = 113; + } + case 7: { + if (!(message.disapprovalReasons && message.disapprovalReasons.length)) + message.disapprovalReasons = []; + message.disapprovalReasons.push($root.google.ads.admanager.v1.DisapprovalReason.decode(reader, reader.uint32())); break; - case "VIDEO_VIEWERSHIP_THIRD_QUARTILES": - case 114: - message.metrics[i] = 114; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Site message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.Site + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.Site} Site + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Site.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Site message. + * @function verify + * @memberof google.ads.admanager.v1.Site + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Site.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.url != null && message.hasOwnProperty("url")) { + properties._url = 1; + if (!$util.isString(message.url)) + return "url: string expected"; + } + if (message.childNetworkCode != null && message.hasOwnProperty("childNetworkCode")) { + properties._childNetworkCode = 1; + if (!$util.isString(message.childNetworkCode)) + return "childNetworkCode: string expected"; + } + if (message.approvalStatus != null && message.hasOwnProperty("approvalStatus")) { + properties._approvalStatus = 1; + switch (message.approvalStatus) { + default: + return "approvalStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.approvalStatusUpdateTime != null && message.hasOwnProperty("approvalStatusUpdateTime")) { + properties._approvalStatusUpdateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.approvalStatusUpdateTime); + if (error) + return "approvalStatusUpdateTime." + error; + } + } + if (message.disapprovalReasons != null && message.hasOwnProperty("disapprovalReasons")) { + if (!Array.isArray(message.disapprovalReasons)) + return "disapprovalReasons: array expected"; + for (var i = 0; i < message.disapprovalReasons.length; ++i) { + var error = $root.google.ads.admanager.v1.DisapprovalReason.verify(message.disapprovalReasons[i]); + if (error) + return "disapprovalReasons." + error; + } + } + return null; + }; + + /** + * Creates a Site message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.Site + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.Site} Site + */ + Site.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Site) + return object; + var message = new $root.google.ads.admanager.v1.Site(); + if (object.name != null) + message.name = String(object.name); + if (object.url != null) + message.url = String(object.url); + if (object.childNetworkCode != null) + message.childNetworkCode = String(object.childNetworkCode); + switch (object.approvalStatus) { + default: + if (typeof object.approvalStatus === "number") { + message.approvalStatus = object.approvalStatus; + break; + } + break; + case "SITE_APPROVAL_STATUS_UNSPECIFIED": + case 0: + message.approvalStatus = 0; + break; + case "APPROVED": + case 1: + message.approvalStatus = 1; + break; + case "DISAPPROVED": + case 2: + message.approvalStatus = 2; + break; + case "DRAFT": + case 3: + message.approvalStatus = 3; + break; + case "REQUIRES_REVIEW": + case 4: + message.approvalStatus = 4; + break; + case "UNCHECKED": + case 5: + message.approvalStatus = 5; + break; + } + if (object.approvalStatusUpdateTime != null) { + if (typeof object.approvalStatusUpdateTime !== "object") + throw TypeError(".google.ads.admanager.v1.Site.approvalStatusUpdateTime: object expected"); + message.approvalStatusUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.approvalStatusUpdateTime); + } + if (object.disapprovalReasons) { + if (!Array.isArray(object.disapprovalReasons)) + throw TypeError(".google.ads.admanager.v1.Site.disapprovalReasons: array expected"); + message.disapprovalReasons = []; + for (var i = 0; i < object.disapprovalReasons.length; ++i) { + if (typeof object.disapprovalReasons[i] !== "object") + throw TypeError(".google.ads.admanager.v1.Site.disapprovalReasons: object expected"); + message.disapprovalReasons[i] = $root.google.ads.admanager.v1.DisapprovalReason.fromObject(object.disapprovalReasons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Site message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.Site + * @static + * @param {google.ads.admanager.v1.Site} message Site + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Site.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.disapprovalReasons = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.url != null && message.hasOwnProperty("url")) { + object.url = message.url; + if (options.oneofs) + object._url = "url"; + } + if (message.childNetworkCode != null && message.hasOwnProperty("childNetworkCode")) { + object.childNetworkCode = message.childNetworkCode; + if (options.oneofs) + object._childNetworkCode = "childNetworkCode"; + } + if (message.approvalStatus != null && message.hasOwnProperty("approvalStatus")) { + object.approvalStatus = options.enums === String ? $root.google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus[message.approvalStatus] === undefined ? message.approvalStatus : $root.google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus[message.approvalStatus] : message.approvalStatus; + if (options.oneofs) + object._approvalStatus = "approvalStatus"; + } + if (message.approvalStatusUpdateTime != null && message.hasOwnProperty("approvalStatusUpdateTime")) { + object.approvalStatusUpdateTime = $root.google.protobuf.Timestamp.toObject(message.approvalStatusUpdateTime, options); + if (options.oneofs) + object._approvalStatusUpdateTime = "approvalStatusUpdateTime"; + } + if (message.disapprovalReasons && message.disapprovalReasons.length) { + object.disapprovalReasons = []; + for (var j = 0; j < message.disapprovalReasons.length; ++j) + object.disapprovalReasons[j] = $root.google.ads.admanager.v1.DisapprovalReason.toObject(message.disapprovalReasons[j], options); + } + return object; + }; + + /** + * Converts this Site to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.Site + * @instance + * @returns {Object.} JSON object + */ + Site.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Site + * @function getTypeUrl + * @memberof google.ads.admanager.v1.Site + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Site.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.Site"; + }; + + return Site; + })(); + + v1.DisapprovalReason = (function() { + + /** + * Properties of a DisapprovalReason. + * @memberof google.ads.admanager.v1 + * @interface IDisapprovalReason + * @property {google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|null} [type] DisapprovalReason type + * @property {string|null} [details] DisapprovalReason details + */ + + /** + * Constructs a new DisapprovalReason. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a DisapprovalReason. + * @implements IDisapprovalReason + * @constructor + * @param {google.ads.admanager.v1.IDisapprovalReason=} [properties] Properties to set + */ + function DisapprovalReason(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]]; + } + + /** + * DisapprovalReason type. + * @member {google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason|null|undefined} type + * @memberof google.ads.admanager.v1.DisapprovalReason + * @instance + */ + DisapprovalReason.prototype.type = null; + + /** + * DisapprovalReason details. + * @member {string|null|undefined} details + * @memberof google.ads.admanager.v1.DisapprovalReason + * @instance + */ + DisapprovalReason.prototype.details = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisapprovalReason.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisapprovalReason.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DisapprovalReason instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {google.ads.admanager.v1.IDisapprovalReason=} [properties] Properties to set + * @returns {google.ads.admanager.v1.DisapprovalReason} DisapprovalReason instance + */ + DisapprovalReason.create = function create(properties) { + return new DisapprovalReason(properties); + }; + + /** + * Encodes the specified DisapprovalReason message. Does not implicitly {@link google.ads.admanager.v1.DisapprovalReason.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {google.ads.admanager.v1.IDisapprovalReason} message DisapprovalReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisapprovalReason.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.details); + return writer; + }; + + /** + * Encodes the specified DisapprovalReason message, length delimited. Does not implicitly {@link google.ads.admanager.v1.DisapprovalReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {google.ads.admanager.v1.IDisapprovalReason} message DisapprovalReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisapprovalReason.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisapprovalReason message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.DisapprovalReason} DisapprovalReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisapprovalReason.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.DisapprovalReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); break; - case "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": - case 115: - message.metrics[i] = 115; + } + case 2: { + message.details = reader.string(); break; - case "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": - case 94: - message.metrics[i] = 94; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisapprovalReason message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.DisapprovalReason} DisapprovalReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisapprovalReason.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisapprovalReason message. + * @function verify + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisapprovalReason.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; + if (!$util.isString(message.details)) + return "details: string expected"; + } + return null; + }; + + /** + * Creates a DisapprovalReason message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.DisapprovalReason} DisapprovalReason + */ + DisapprovalReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.DisapprovalReason) + return object; + var message = new $root.google.ads.admanager.v1.DisapprovalReason(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "SITE_DISAPPROVAL_REASON_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONTENT": + case 1: + message.type = 1; + break; + case "OTHER": + case 2: + message.type = 2; + break; + case "OWNERSHIP": + case 3: + message.type = 3; + break; + } + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a DisapprovalReason message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {google.ads.admanager.v1.DisapprovalReason} message DisapprovalReason + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisapprovalReason.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason[message.type] === undefined ? message.type : $root.google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.details != null && message.hasOwnProperty("details")) { + object.details = message.details; + if (options.oneofs) + object._details = "details"; + } + return object; + }; + + /** + * Converts this DisapprovalReason to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.DisapprovalReason + * @instance + * @returns {Object.} JSON object + */ + DisapprovalReason.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisapprovalReason + * @function getTypeUrl + * @memberof google.ads.admanager.v1.DisapprovalReason + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisapprovalReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.DisapprovalReason"; + }; + + return DisapprovalReason; + })(); + + v1.SiteService = (function() { + + /** + * Constructs a new SiteService service. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a SiteService + * @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 SiteService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SiteService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SiteService; + + /** + * Creates new SiteService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.SiteService + * @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 {SiteService} RPC service. Useful where requests and/or responses are streamed. + */ + SiteService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|getSite}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef GetSiteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Site} [response] Site + */ + + /** + * Calls GetSite. + * @function getSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IGetSiteRequest} request GetSiteRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.GetSiteCallback} callback Node-style callback called with the error, if any, and Site + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.getSite = function getSite(request, callback) { + return this.rpcCall(getSite, $root.google.ads.admanager.v1.GetSiteRequest, $root.google.ads.admanager.v1.Site, request, callback); + }, "name", { value: "GetSite" }); + + /** + * Calls GetSite. + * @function getSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IGetSiteRequest} request GetSiteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|listSites}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef ListSitesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListSitesResponse} [response] ListSitesResponse + */ + + /** + * Calls ListSites. + * @function listSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IListSitesRequest} request ListSitesRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.ListSitesCallback} callback Node-style callback called with the error, if any, and ListSitesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.listSites = function listSites(request, callback) { + return this.rpcCall(listSites, $root.google.ads.admanager.v1.ListSitesRequest, $root.google.ads.admanager.v1.ListSitesResponse, request, callback); + }, "name", { value: "ListSites" }); + + /** + * Calls ListSites. + * @function listSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IListSitesRequest} request ListSitesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|createSite}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef CreateSiteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Site} [response] Site + */ + + /** + * Calls CreateSite. + * @function createSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.ICreateSiteRequest} request CreateSiteRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.CreateSiteCallback} callback Node-style callback called with the error, if any, and Site + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.createSite = function createSite(request, callback) { + return this.rpcCall(createSite, $root.google.ads.admanager.v1.CreateSiteRequest, $root.google.ads.admanager.v1.Site, request, callback); + }, "name", { value: "CreateSite" }); + + /** + * Calls CreateSite. + * @function createSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.ICreateSiteRequest} request CreateSiteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchCreateSites}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef BatchCreateSitesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreateSitesResponse} [response] BatchCreateSitesResponse + */ + + /** + * Calls BatchCreateSites. + * @function batchCreateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest} request BatchCreateSitesRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.BatchCreateSitesCallback} callback Node-style callback called with the error, if any, and BatchCreateSitesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.batchCreateSites = function batchCreateSites(request, callback) { + return this.rpcCall(batchCreateSites, $root.google.ads.admanager.v1.BatchCreateSitesRequest, $root.google.ads.admanager.v1.BatchCreateSitesResponse, request, callback); + }, "name", { value: "BatchCreateSites" }); + + /** + * Calls BatchCreateSites. + * @function batchCreateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest} request BatchCreateSitesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|updateSite}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef UpdateSiteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Site} [response] Site + */ + + /** + * Calls UpdateSite. + * @function updateSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IUpdateSiteRequest} request UpdateSiteRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.UpdateSiteCallback} callback Node-style callback called with the error, if any, and Site + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.updateSite = function updateSite(request, callback) { + return this.rpcCall(updateSite, $root.google.ads.admanager.v1.UpdateSiteRequest, $root.google.ads.admanager.v1.Site, request, callback); + }, "name", { value: "UpdateSite" }); + + /** + * Calls UpdateSite. + * @function updateSite + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IUpdateSiteRequest} request UpdateSiteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchUpdateSites}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef BatchUpdateSitesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdateSitesResponse} [response] BatchUpdateSitesResponse + */ + + /** + * Calls BatchUpdateSites. + * @function batchUpdateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest} request BatchUpdateSitesRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.BatchUpdateSitesCallback} callback Node-style callback called with the error, if any, and BatchUpdateSitesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.batchUpdateSites = function batchUpdateSites(request, callback) { + return this.rpcCall(batchUpdateSites, $root.google.ads.admanager.v1.BatchUpdateSitesRequest, $root.google.ads.admanager.v1.BatchUpdateSitesResponse, request, callback); + }, "name", { value: "BatchUpdateSites" }); + + /** + * Calls BatchUpdateSites. + * @function batchUpdateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest} request BatchUpdateSitesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchDeactivateSites}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef BatchDeactivateSitesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchDeactivateSitesResponse} [response] BatchDeactivateSitesResponse + */ + + /** + * Calls BatchDeactivateSites. + * @function batchDeactivateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest} request BatchDeactivateSitesRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.BatchDeactivateSitesCallback} callback Node-style callback called with the error, if any, and BatchDeactivateSitesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.batchDeactivateSites = function batchDeactivateSites(request, callback) { + return this.rpcCall(batchDeactivateSites, $root.google.ads.admanager.v1.BatchDeactivateSitesRequest, $root.google.ads.admanager.v1.BatchDeactivateSitesResponse, request, callback); + }, "name", { value: "BatchDeactivateSites" }); + + /** + * Calls BatchDeactivateSites. + * @function batchDeactivateSites + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest} request BatchDeactivateSitesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.SiteService|batchSubmitSitesForApproval}. + * @memberof google.ads.admanager.v1.SiteService + * @typedef BatchSubmitSitesForApprovalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} [response] BatchSubmitSitesForApprovalResponse + */ + + /** + * Calls BatchSubmitSitesForApproval. + * @function batchSubmitSitesForApproval + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest} request BatchSubmitSitesForApprovalRequest message or plain object + * @param {google.ads.admanager.v1.SiteService.BatchSubmitSitesForApprovalCallback} callback Node-style callback called with the error, if any, and BatchSubmitSitesForApprovalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SiteService.prototype.batchSubmitSitesForApproval = function batchSubmitSitesForApproval(request, callback) { + return this.rpcCall(batchSubmitSitesForApproval, $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest, $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse, request, callback); + }, "name", { value: "BatchSubmitSitesForApproval" }); + + /** + * Calls BatchSubmitSitesForApproval. + * @function batchSubmitSitesForApproval + * @memberof google.ads.admanager.v1.SiteService + * @instance + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest} request BatchSubmitSitesForApprovalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SiteService; + })(); + + v1.GetSiteRequest = (function() { + + /** + * Properties of a GetSiteRequest. + * @memberof google.ads.admanager.v1 + * @interface IGetSiteRequest + * @property {string|null} [name] GetSiteRequest name + */ + + /** + * Constructs a new GetSiteRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetSiteRequest. + * @implements IGetSiteRequest + * @constructor + * @param {google.ads.admanager.v1.IGetSiteRequest=} [properties] Properties to set + */ + function GetSiteRequest(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]]; + } + + /** + * GetSiteRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetSiteRequest + * @instance + */ + GetSiteRequest.prototype.name = ""; + + /** + * Creates a new GetSiteRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {google.ads.admanager.v1.IGetSiteRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetSiteRequest} GetSiteRequest instance + */ + GetSiteRequest.create = function create(properties) { + return new GetSiteRequest(properties); + }; + + /** + * Encodes the specified GetSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.GetSiteRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {google.ads.admanager.v1.IGetSiteRequest} message GetSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSiteRequest.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 GetSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetSiteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {google.ads.admanager.v1.IGetSiteRequest} message GetSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSiteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSiteRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.GetSiteRequest} GetSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSiteRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetSiteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "VIDEO_VIEWERSHIP_VIDEO_LENGTH": - case 116: - message.metrics[i] = 116; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSiteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.GetSiteRequest} GetSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSiteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSiteRequest message. + * @function verify + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSiteRequest.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 GetSiteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.GetSiteRequest} GetSiteRequest + */ + GetSiteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetSiteRequest) + return object; + var message = new $root.google.ads.admanager.v1.GetSiteRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSiteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {google.ads.admanager.v1.GetSiteRequest} message GetSiteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSiteRequest.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 GetSiteRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.GetSiteRequest + * @instance + * @returns {Object.} JSON object + */ + GetSiteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSiteRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.GetSiteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSiteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.GetSiteRequest"; + }; + + return GetSiteRequest; + })(); + + v1.ListSitesRequest = (function() { + + /** + * Properties of a ListSitesRequest. + * @memberof google.ads.admanager.v1 + * @interface IListSitesRequest + * @property {string|null} [parent] ListSitesRequest parent + * @property {number|null} [pageSize] ListSitesRequest pageSize + * @property {string|null} [pageToken] ListSitesRequest pageToken + * @property {string|null} [filter] ListSitesRequest filter + * @property {string|null} [orderBy] ListSitesRequest orderBy + * @property {number|null} [skip] ListSitesRequest skip + */ + + /** + * Constructs a new ListSitesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListSitesRequest. + * @implements IListSitesRequest + * @constructor + * @param {google.ads.admanager.v1.IListSitesRequest=} [properties] Properties to set + */ + function ListSitesRequest(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]]; + } + + /** + * ListSitesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.parent = ""; + + /** + * ListSitesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.pageSize = 0; + + /** + * ListSitesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.pageToken = ""; + + /** + * ListSitesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.filter = ""; + + /** + * ListSitesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.orderBy = ""; + + /** + * ListSitesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + */ + ListSitesRequest.prototype.skip = 0; + + /** + * Creates a new ListSitesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {google.ads.admanager.v1.IListSitesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListSitesRequest} ListSitesRequest instance + */ + ListSitesRequest.create = function create(properties) { + return new ListSitesRequest(properties); + }; + + /** + * Encodes the specified ListSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListSitesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {google.ads.admanager.v1.IListSitesRequest} message ListSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSitesRequest.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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + return writer; + }; + + /** + * Encodes the specified ListSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListSitesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {google.ads.admanager.v1.IListSitesRequest} message ListSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSitesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSitesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListSitesRequest} ListSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSitesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListSitesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": - case 117: - message.metrics[i] = 117; + } + case 2: { + message.pageSize = reader.int32(); break; - case "YIELD_GROUP_AUCTIONS_WON": - case 80: - message.metrics[i] = 80; + } + case 3: { + message.pageToken = reader.string(); break; - case "YIELD_GROUP_BIDS": - case 81: - message.metrics[i] = 81; + } + case 4: { + message.filter = reader.string(); break; - case "YIELD_GROUP_BIDS_IN_AUCTION": - case 82: - message.metrics[i] = 82; + } + case 5: { + message.orderBy = reader.string(); break; - case "YIELD_GROUP_CALLOUTS": - case 83: - message.metrics[i] = 83; + } + case 6: { + message.skip = reader.int32(); break; - case "YIELD_GROUP_ESTIMATED_CPM": - case 88: - message.metrics[i] = 88; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSitesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListSitesRequest} ListSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSitesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSitesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSitesRequest.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.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; + return null; + }; + + /** + * Creates a ListSitesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListSitesRequest} ListSitesRequest + */ + ListSitesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListSitesRequest) + return object; + var message = new $root.google.ads.admanager.v1.ListSitesRequest(); + 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.skip != null) + message.skip = object.skip | 0; + return message; + }; + + /** + * Creates a plain object from a ListSitesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {google.ads.admanager.v1.ListSitesRequest} message ListSitesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSitesRequest.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.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; + return object; + }; + + /** + * Converts this ListSitesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListSitesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSitesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSitesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListSitesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSitesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListSitesRequest"; + }; + + return ListSitesRequest; + })(); + + v1.ListSitesResponse = (function() { + + /** + * Properties of a ListSitesResponse. + * @memberof google.ads.admanager.v1 + * @interface IListSitesResponse + * @property {Array.|null} [sites] ListSitesResponse sites + * @property {string|null} [nextPageToken] ListSitesResponse nextPageToken + * @property {number|null} [totalSize] ListSitesResponse totalSize + */ + + /** + * Constructs a new ListSitesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a ListSitesResponse. + * @implements IListSitesResponse + * @constructor + * @param {google.ads.admanager.v1.IListSitesResponse=} [properties] Properties to set + */ + function ListSitesResponse(properties) { + this.sites = []; + 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]]; + } + + /** + * ListSitesResponse sites. + * @member {Array.} sites + * @memberof google.ads.admanager.v1.ListSitesResponse + * @instance + */ + ListSitesResponse.prototype.sites = $util.emptyArray; + + /** + * ListSitesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListSitesResponse + * @instance + */ + ListSitesResponse.prototype.nextPageToken = ""; + + /** + * ListSitesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListSitesResponse + * @instance + */ + ListSitesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListSitesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {google.ads.admanager.v1.IListSitesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListSitesResponse} ListSitesResponse instance + */ + ListSitesResponse.create = function create(properties) { + return new ListSitesResponse(properties); + }; + + /** + * Encodes the specified ListSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListSitesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {google.ads.admanager.v1.IListSitesResponse} message ListSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSitesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sites != null && message.sites.length) + for (var i = 0; i < message.sites.length; ++i) + $root.google.ads.admanager.v1.Site.encode(message.sites[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListSitesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {google.ads.admanager.v1.IListSitesResponse} message ListSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSitesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSitesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.ListSitesResponse} ListSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSitesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListSitesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.sites && message.sites.length)) + message.sites = []; + message.sites.push($root.google.ads.admanager.v1.Site.decode(reader, reader.uint32())); break; - case "YIELD_GROUP_ESTIMATED_REVENUE": - case 87: - message.metrics[i] = 87; + } + case 2: { + message.nextPageToken = reader.string(); break; - case "YIELD_GROUP_IMPRESSIONS": - case 85: - message.metrics[i] = 85; + } + case 3: { + message.totalSize = reader.int32(); break; - case "YIELD_GROUP_MEDIATION_FILL_RATE": - case 89: - message.metrics[i] = 89; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSitesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.ListSitesResponse} ListSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSitesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSitesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSitesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sites != null && message.hasOwnProperty("sites")) { + if (!Array.isArray(message.sites)) + return "sites: array expected"; + for (var i = 0; i < message.sites.length; ++i) { + var error = $root.google.ads.admanager.v1.Site.verify(message.sites[i]); + if (error) + return "sites." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListSitesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.ListSitesResponse} ListSitesResponse + */ + ListSitesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListSitesResponse) + return object; + var message = new $root.google.ads.admanager.v1.ListSitesResponse(); + if (object.sites) { + if (!Array.isArray(object.sites)) + throw TypeError(".google.ads.admanager.v1.ListSitesResponse.sites: array expected"); + message.sites = []; + for (var i = 0; i < object.sites.length; ++i) { + if (typeof object.sites[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListSitesResponse.sites: object expected"); + message.sites[i] = $root.google.ads.admanager.v1.Site.fromObject(object.sites[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListSitesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {google.ads.admanager.v1.ListSitesResponse} message ListSitesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSitesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sites = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.sites && message.sites.length) { + object.sites = []; + for (var j = 0; j < message.sites.length; ++j) + object.sites[j] = $root.google.ads.admanager.v1.Site.toObject(message.sites[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListSitesResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.ListSitesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSitesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSitesResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.ListSitesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSitesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.ListSitesResponse"; + }; + + return ListSitesResponse; + })(); + + v1.CreateSiteRequest = (function() { + + /** + * Properties of a CreateSiteRequest. + * @memberof google.ads.admanager.v1 + * @interface ICreateSiteRequest + * @property {string|null} [parent] CreateSiteRequest parent + * @property {google.ads.admanager.v1.ISite|null} [site] CreateSiteRequest site + */ + + /** + * Constructs a new CreateSiteRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a CreateSiteRequest. + * @implements ICreateSiteRequest + * @constructor + * @param {google.ads.admanager.v1.ICreateSiteRequest=} [properties] Properties to set + */ + function CreateSiteRequest(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]]; + } + + /** + * CreateSiteRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @instance + */ + CreateSiteRequest.prototype.parent = ""; + + /** + * CreateSiteRequest site. + * @member {google.ads.admanager.v1.ISite|null|undefined} site + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @instance + */ + CreateSiteRequest.prototype.site = null; + + /** + * Creates a new CreateSiteRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {google.ads.admanager.v1.ICreateSiteRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateSiteRequest} CreateSiteRequest instance + */ + CreateSiteRequest.create = function create(properties) { + return new CreateSiteRequest(properties); + }; + + /** + * Encodes the specified CreateSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateSiteRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {google.ads.admanager.v1.ICreateSiteRequest} message CreateSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSiteRequest.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.site != null && Object.hasOwnProperty.call(message, "site")) + $root.google.ads.admanager.v1.Site.encode(message.site, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateSiteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {google.ads.admanager.v1.ICreateSiteRequest} message CreateSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSiteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSiteRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.CreateSiteRequest} CreateSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSiteRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateSiteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": - case 86: - message.metrics[i] = 86; + } + case 2: { + message.site = $root.google.ads.admanager.v1.Site.decode(reader, reader.uint32()); break; - case "YIELD_GROUP_MEDIATION_PASSBACKS": - case 118: - message.metrics[i] = 118; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSiteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.CreateSiteRequest} CreateSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSiteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSiteRequest message. + * @function verify + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSiteRequest.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.site != null && message.hasOwnProperty("site")) { + var error = $root.google.ads.admanager.v1.Site.verify(message.site); + if (error) + return "site." + error; + } + return null; + }; + + /** + * Creates a CreateSiteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.CreateSiteRequest} CreateSiteRequest + */ + CreateSiteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateSiteRequest) + return object; + var message = new $root.google.ads.admanager.v1.CreateSiteRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.site != null) { + if (typeof object.site !== "object") + throw TypeError(".google.ads.admanager.v1.CreateSiteRequest.site: object expected"); + message.site = $root.google.ads.admanager.v1.Site.fromObject(object.site); + } + return message; + }; + + /** + * Creates a plain object from a CreateSiteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {google.ads.admanager.v1.CreateSiteRequest} message CreateSiteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSiteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.site = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.site != null && message.hasOwnProperty("site")) + object.site = $root.google.ads.admanager.v1.Site.toObject(message.site, options); + return object; + }; + + /** + * Converts this CreateSiteRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSiteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSiteRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.CreateSiteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSiteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.CreateSiteRequest"; + }; + + return CreateSiteRequest; + })(); + + v1.BatchCreateSitesRequest = (function() { + + /** + * Properties of a BatchCreateSitesRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreateSitesRequest + * @property {string|null} [parent] BatchCreateSitesRequest parent + * @property {Array.|null} [requests] BatchCreateSitesRequest requests + */ + + /** + * Constructs a new BatchCreateSitesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreateSitesRequest. + * @implements IBatchCreateSitesRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest=} [properties] Properties to set + */ + function BatchCreateSitesRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchCreateSitesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @instance + */ + BatchCreateSitesRequest.prototype.parent = ""; + + /** + * BatchCreateSitesRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @instance + */ + BatchCreateSitesRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateSitesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateSitesRequest} BatchCreateSitesRequest instance + */ + BatchCreateSitesRequest.create = function create(properties) { + return new BatchCreateSitesRequest(properties); + }; + + /** + * Encodes the specified BatchCreateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest} message BatchCreateSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateSitesRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreateSiteRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesRequest} message BatchCreateSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateSitesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateSitesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreateSitesRequest} BatchCreateSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateSitesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateSitesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": - case 90: - message.metrics[i] = 90; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreateSiteRequest.decode(reader, reader.uint32())); break; - case "YIELD_GROUP_SUCCESSFUL_RESPONSES": - case 84: - message.metrics[i] = 84; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchCreateSitesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreateSitesRequest} BatchCreateSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateSitesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateSitesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateSitesRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreateSiteRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateSitesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreateSitesRequest} BatchCreateSitesRequest + */ + BatchCreateSitesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateSitesRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreateSitesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreateSitesRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateSitesRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreateSiteRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateSitesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {google.ads.admanager.v1.BatchCreateSitesRequest} message BatchCreateSitesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateSitesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreateSiteRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateSitesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @instance + * @returns {Object.} JSON object + */ + BatchCreateSitesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateSitesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreateSitesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateSitesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateSitesRequest"; + }; + + return BatchCreateSitesRequest; + })(); + + v1.BatchCreateSitesResponse = (function() { + + /** + * Properties of a BatchCreateSitesResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchCreateSitesResponse + * @property {Array.|null} [sites] BatchCreateSitesResponse sites + */ + + /** + * Constructs a new BatchCreateSitesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchCreateSitesResponse. + * @implements IBatchCreateSitesResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchCreateSitesResponse=} [properties] Properties to set + */ + function BatchCreateSitesResponse(properties) { + this.sites = []; + 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]]; + } + + /** + * BatchCreateSitesResponse sites. + * @member {Array.} sites + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @instance + */ + BatchCreateSitesResponse.prototype.sites = $util.emptyArray; + + /** + * Creates a new BatchCreateSitesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateSitesResponse} BatchCreateSitesResponse instance + */ + BatchCreateSitesResponse.create = function create(properties) { + return new BatchCreateSitesResponse(properties); + }; + + /** + * Encodes the specified BatchCreateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesResponse} message BatchCreateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateSitesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sites != null && message.sites.length) + for (var i = 0; i < message.sites.length; ++i) + $root.google.ads.admanager.v1.Site.encode(message.sites[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateSitesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchCreateSitesResponse} message BatchCreateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateSitesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateSitesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchCreateSitesResponse} BatchCreateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateSitesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateSitesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.sites && message.sites.length)) + message.sites = []; + message.sites.push($root.google.ads.admanager.v1.Site.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; + } } - if (object.filters) { - if (!Array.isArray(object.filters)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.filters: array expected"); - message.filters = []; - for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ReportDefinition.filters: object expected"); - message.filters[i] = $root.google.ads.admanager.v1.Report.Filter.fromObject(object.filters[i]); + return message; + }; + + /** + * Decodes a BatchCreateSitesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchCreateSitesResponse} BatchCreateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateSitesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateSitesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateSitesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sites != null && message.hasOwnProperty("sites")) { + if (!Array.isArray(message.sites)) + return "sites: array expected"; + for (var i = 0; i < message.sites.length; ++i) { + var error = $root.google.ads.admanager.v1.Site.verify(message.sites[i]); + if (error) + return "sites." + error; } } - switch (object.timeZoneSource) { - default: - if (typeof object.timeZoneSource === "number") { - message.timeZoneSource = object.timeZoneSource; + return null; + }; + + /** + * Creates a BatchCreateSitesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchCreateSitesResponse} BatchCreateSitesResponse + */ + BatchCreateSitesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateSitesResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchCreateSitesResponse(); + if (object.sites) { + if (!Array.isArray(object.sites)) + throw TypeError(".google.ads.admanager.v1.BatchCreateSitesResponse.sites: array expected"); + message.sites = []; + for (var i = 0; i < object.sites.length; ++i) { + if (typeof object.sites[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateSitesResponse.sites: object expected"); + message.sites[i] = $root.google.ads.admanager.v1.Site.fromObject(object.sites[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateSitesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {google.ads.admanager.v1.BatchCreateSitesResponse} message BatchCreateSitesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateSitesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sites = []; + if (message.sites && message.sites.length) { + object.sites = []; + for (var j = 0; j < message.sites.length; ++j) + object.sites[j] = $root.google.ads.admanager.v1.Site.toObject(message.sites[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateSitesResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateSitesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateSitesResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchCreateSitesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateSitesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateSitesResponse"; + }; + + return BatchCreateSitesResponse; + })(); + + v1.UpdateSiteRequest = (function() { + + /** + * Properties of an UpdateSiteRequest. + * @memberof google.ads.admanager.v1 + * @interface IUpdateSiteRequest + * @property {google.ads.admanager.v1.ISite|null} [site] UpdateSiteRequest site + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSiteRequest updateMask + */ + + /** + * Constructs a new UpdateSiteRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents an UpdateSiteRequest. + * @implements IUpdateSiteRequest + * @constructor + * @param {google.ads.admanager.v1.IUpdateSiteRequest=} [properties] Properties to set + */ + function UpdateSiteRequest(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]]; + } + + /** + * UpdateSiteRequest site. + * @member {google.ads.admanager.v1.ISite|null|undefined} site + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @instance + */ + UpdateSiteRequest.prototype.site = null; + + /** + * UpdateSiteRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @instance + */ + UpdateSiteRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSiteRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {google.ads.admanager.v1.IUpdateSiteRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateSiteRequest} UpdateSiteRequest instance + */ + UpdateSiteRequest.create = function create(properties) { + return new UpdateSiteRequest(properties); + }; + + /** + * Encodes the specified UpdateSiteRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateSiteRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {google.ads.admanager.v1.IUpdateSiteRequest} message UpdateSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSiteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.site != null && Object.hasOwnProperty.call(message, "site")) + $root.google.ads.admanager.v1.Site.encode(message.site, 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 UpdateSiteRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateSiteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {google.ads.admanager.v1.IUpdateSiteRequest} message UpdateSiteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSiteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSiteRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.UpdateSiteRequest} UpdateSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSiteRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateSiteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.site = $root.google.ads.admanager.v1.Site.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "TIME_ZONE_SOURCE_UNSPECIFIED": - case 0: - message.timeZoneSource = 0; - break; - case "PUBLISHER": - case 1: - message.timeZoneSource = 1; - break; - case "AD_EXCHANGE": - case 2: - message.timeZoneSource = 2; - break; - case "UTC": - case 3: - message.timeZoneSource = 3; - break; - case "PROVIDED": - case 4: - message.timeZoneSource = 4; - break; } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.dateRange != null) { - if (typeof object.dateRange !== "object") - throw TypeError(".google.ads.admanager.v1.ReportDefinition.dateRange: object expected"); - message.dateRange = $root.google.ads.admanager.v1.Report.DateRange.fromObject(object.dateRange); + return message; + }; + + /** + * Decodes an UpdateSiteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.UpdateSiteRequest} UpdateSiteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSiteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSiteRequest message. + * @function verify + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSiteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.site != null && message.hasOwnProperty("site")) { + var error = $root.google.ads.admanager.v1.Site.verify(message.site); + if (error) + return "site." + error; } - if (object.comparisonDateRange != null) { - if (typeof object.comparisonDateRange !== "object") - throw TypeError(".google.ads.admanager.v1.ReportDefinition.comparisonDateRange: object expected"); - message.comparisonDateRange = $root.google.ads.admanager.v1.Report.DateRange.fromObject(object.comparisonDateRange); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (object.customDimensionKeyIds) { - if (!Array.isArray(object.customDimensionKeyIds)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.customDimensionKeyIds: array expected"); - message.customDimensionKeyIds = []; - for (var i = 0; i < object.customDimensionKeyIds.length; ++i) - if ($util.Long) - (message.customDimensionKeyIds[i] = $util.Long.fromValue(object.customDimensionKeyIds[i])).unsigned = false; - else if (typeof object.customDimensionKeyIds[i] === "string") - message.customDimensionKeyIds[i] = parseInt(object.customDimensionKeyIds[i], 10); - else if (typeof object.customDimensionKeyIds[i] === "number") - message.customDimensionKeyIds[i] = object.customDimensionKeyIds[i]; - else if (typeof object.customDimensionKeyIds[i] === "object") - message.customDimensionKeyIds[i] = new $util.LongBits(object.customDimensionKeyIds[i].low >>> 0, object.customDimensionKeyIds[i].high >>> 0).toNumber(); + return null; + }; + + /** + * Creates an UpdateSiteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.UpdateSiteRequest} UpdateSiteRequest + */ + UpdateSiteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateSiteRequest) + return object; + var message = new $root.google.ads.admanager.v1.UpdateSiteRequest(); + if (object.site != null) { + if (typeof object.site !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateSiteRequest.site: object expected"); + message.site = $root.google.ads.admanager.v1.Site.fromObject(object.site); } - if (object.lineItemCustomFieldIds) { - if (!Array.isArray(object.lineItemCustomFieldIds)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.lineItemCustomFieldIds: array expected"); - message.lineItemCustomFieldIds = []; - for (var i = 0; i < object.lineItemCustomFieldIds.length; ++i) - if ($util.Long) - (message.lineItemCustomFieldIds[i] = $util.Long.fromValue(object.lineItemCustomFieldIds[i])).unsigned = false; - else if (typeof object.lineItemCustomFieldIds[i] === "string") - message.lineItemCustomFieldIds[i] = parseInt(object.lineItemCustomFieldIds[i], 10); - else if (typeof object.lineItemCustomFieldIds[i] === "number") - message.lineItemCustomFieldIds[i] = object.lineItemCustomFieldIds[i]; - else if (typeof object.lineItemCustomFieldIds[i] === "object") - message.lineItemCustomFieldIds[i] = new $util.LongBits(object.lineItemCustomFieldIds[i].low >>> 0, object.lineItemCustomFieldIds[i].high >>> 0).toNumber(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateSiteRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.orderCustomFieldIds) { - if (!Array.isArray(object.orderCustomFieldIds)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.orderCustomFieldIds: array expected"); - message.orderCustomFieldIds = []; - for (var i = 0; i < object.orderCustomFieldIds.length; ++i) - if ($util.Long) - (message.orderCustomFieldIds[i] = $util.Long.fromValue(object.orderCustomFieldIds[i])).unsigned = false; - else if (typeof object.orderCustomFieldIds[i] === "string") - message.orderCustomFieldIds[i] = parseInt(object.orderCustomFieldIds[i], 10); - else if (typeof object.orderCustomFieldIds[i] === "number") - message.orderCustomFieldIds[i] = object.orderCustomFieldIds[i]; - else if (typeof object.orderCustomFieldIds[i] === "object") - message.orderCustomFieldIds[i] = new $util.LongBits(object.orderCustomFieldIds[i].low >>> 0, object.orderCustomFieldIds[i].high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an UpdateSiteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {google.ads.admanager.v1.UpdateSiteRequest} message UpdateSiteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSiteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.site = null; + object.updateMask = null; + } + if (message.site != null && message.hasOwnProperty("site")) + object.site = $root.google.ads.admanager.v1.Site.toObject(message.site, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSiteRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSiteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSiteRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.UpdateSiteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSiteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateSiteRequest"; + }; + + return UpdateSiteRequest; + })(); + + v1.BatchUpdateSitesRequest = (function() { + + /** + * Properties of a BatchUpdateSitesRequest. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdateSitesRequest + * @property {string|null} [parent] BatchUpdateSitesRequest parent + * @property {Array.|null} [requests] BatchUpdateSitesRequest requests + */ + + /** + * Constructs a new BatchUpdateSitesRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdateSitesRequest. + * @implements IBatchUpdateSitesRequest + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest=} [properties] Properties to set + */ + function BatchUpdateSitesRequest(properties) { + this.requests = []; + 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]]; + } + + /** + * BatchUpdateSitesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @instance + */ + BatchUpdateSitesRequest.prototype.parent = ""; + + /** + * BatchUpdateSitesRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @instance + */ + BatchUpdateSitesRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdateSitesRequest instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateSitesRequest} BatchUpdateSitesRequest instance + */ + BatchUpdateSitesRequest.create = function create(properties) { + return new BatchUpdateSitesRequest(properties); + }; + + /** + * Encodes the specified BatchUpdateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest} message BatchUpdateSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateSitesRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdateSiteRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesRequest} message BatchUpdateSitesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateSitesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateSitesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdateSitesRequest} BatchUpdateSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateSitesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateSitesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdateSiteRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateSitesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdateSitesRequest} BatchUpdateSitesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateSitesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateSitesRequest message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateSitesRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdateSiteRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateSitesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdateSitesRequest} BatchUpdateSitesRequest + */ + BatchUpdateSitesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateSitesRequest) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdateSitesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateSitesRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateSitesRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdateSiteRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdateSitesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {google.ads.admanager.v1.BatchUpdateSitesRequest} message BatchUpdateSitesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateSitesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdateSiteRequest.toObject(message.requests[j], options); } - if (object.creativeCustomFieldIds) { - if (!Array.isArray(object.creativeCustomFieldIds)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.creativeCustomFieldIds: array expected"); - message.creativeCustomFieldIds = []; - for (var i = 0; i < object.creativeCustomFieldIds.length; ++i) - if ($util.Long) - (message.creativeCustomFieldIds[i] = $util.Long.fromValue(object.creativeCustomFieldIds[i])).unsigned = false; - else if (typeof object.creativeCustomFieldIds[i] === "string") - message.creativeCustomFieldIds[i] = parseInt(object.creativeCustomFieldIds[i], 10); - else if (typeof object.creativeCustomFieldIds[i] === "number") - message.creativeCustomFieldIds[i] = object.creativeCustomFieldIds[i]; - else if (typeof object.creativeCustomFieldIds[i] === "object") - message.creativeCustomFieldIds[i] = new $util.LongBits(object.creativeCustomFieldIds[i].low >>> 0, object.creativeCustomFieldIds[i].high >>> 0).toNumber(); + return object; + }; + + /** + * Converts this BatchUpdateSitesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateSitesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdateSitesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchUpdateSitesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateSitesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - switch (object.reportType) { - default: - if (typeof object.reportType === "number") { - message.reportType = object.reportType; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateSitesRequest"; + }; + + return BatchUpdateSitesRequest; + })(); + + v1.BatchUpdateSitesResponse = (function() { + + /** + * Properties of a BatchUpdateSitesResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchUpdateSitesResponse + * @property {Array.|null} [sites] BatchUpdateSitesResponse sites + */ + + /** + * Constructs a new BatchUpdateSitesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchUpdateSitesResponse. + * @implements IBatchUpdateSitesResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchUpdateSitesResponse=} [properties] Properties to set + */ + function BatchUpdateSitesResponse(properties) { + this.sites = []; + 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]]; + } + + /** + * BatchUpdateSitesResponse sites. + * @member {Array.} sites + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @instance + */ + BatchUpdateSitesResponse.prototype.sites = $util.emptyArray; + + /** + * Creates a new BatchUpdateSitesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateSitesResponse} BatchUpdateSitesResponse instance + */ + BatchUpdateSitesResponse.create = function create(properties) { + return new BatchUpdateSitesResponse(properties); + }; + + /** + * Encodes the specified BatchUpdateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesResponse} message BatchUpdateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateSitesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sites != null && message.sites.length) + for (var i = 0; i < message.sites.length; ++i) + $root.google.ads.admanager.v1.Site.encode(message.sites[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateSitesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchUpdateSitesResponse} message BatchUpdateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateSitesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateSitesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchUpdateSitesResponse} BatchUpdateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateSitesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateSitesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - break; - case "REPORT_TYPE_UNSPECIFIED": - case 0: - message.reportType = 0; - break; - case "HISTORICAL": - case 1: - message.reportType = 1; - break; - } - switch (object.timePeriodColumn) { - default: - if (typeof object.timePeriodColumn === "number") { - message.timePeriodColumn = object.timePeriodColumn; + switch (tag >>> 3) { + case 1: { + if (!(message.sites && message.sites.length)) + message.sites = []; + message.sites.push($root.google.ads.admanager.v1.Site.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "TIME_PERIOD_COLUMN_UNSPECIFIED": - case 0: - message.timePeriodColumn = 0; - break; - case "TIME_PERIOD_COLUMN_DATE": - case 1: - message.timePeriodColumn = 1; - break; - case "TIME_PERIOD_COLUMN_WEEK": - case 2: - message.timePeriodColumn = 2; - break; - case "TIME_PERIOD_COLUMN_MONTH": - case 3: - message.timePeriodColumn = 3; - break; - case "TIME_PERIOD_COLUMN_QUARTER": - case 4: - message.timePeriodColumn = 4; - break; } - if (object.flags) { - if (!Array.isArray(object.flags)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.flags: array expected"); - message.flags = []; - for (var i = 0; i < object.flags.length; ++i) { - if (typeof object.flags[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ReportDefinition.flags: object expected"); - message.flags[i] = $root.google.ads.admanager.v1.Report.Flag.fromObject(object.flags[i]); + return message; + }; + + /** + * Decodes a BatchUpdateSitesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchUpdateSitesResponse} BatchUpdateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateSitesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateSitesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateSitesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sites != null && message.hasOwnProperty("sites")) { + if (!Array.isArray(message.sites)) + return "sites: array expected"; + for (var i = 0; i < message.sites.length; ++i) { + var error = $root.google.ads.admanager.v1.Site.verify(message.sites[i]); + if (error) + return "sites." + error; } } - if (object.sorts) { - if (!Array.isArray(object.sorts)) - throw TypeError(".google.ads.admanager.v1.ReportDefinition.sorts: array expected"); - message.sorts = []; - for (var i = 0; i < object.sorts.length; ++i) { - if (typeof object.sorts[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ReportDefinition.sorts: object expected"); - message.sorts[i] = $root.google.ads.admanager.v1.Report.Sort.fromObject(object.sorts[i]); + return null; + }; + + /** + * Creates a BatchUpdateSitesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchUpdateSitesResponse} BatchUpdateSitesResponse + */ + BatchUpdateSitesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateSitesResponse) + return object; + var message = new $root.google.ads.admanager.v1.BatchUpdateSitesResponse(); + if (object.sites) { + if (!Array.isArray(object.sites)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateSitesResponse.sites: array expected"); + message.sites = []; + for (var i = 0; i < object.sites.length; ++i) { + if (typeof object.sites[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateSitesResponse.sites: object expected"); + message.sites[i] = $root.google.ads.admanager.v1.Site.fromObject(object.sites[i]); } } return message; }; /** - * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateSitesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ReportDefinition + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse * @static - * @param {google.ads.admanager.v1.ReportDefinition} message ReportDefinition + * @param {google.ads.admanager.v1.BatchUpdateSitesResponse} message BatchUpdateSitesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReportDefinition.toObject = function toObject(message, options) { + BatchUpdateSitesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.filters = []; - object.customDimensionKeyIds = []; - object.lineItemCustomFieldIds = []; - object.orderCustomFieldIds = []; - object.creativeCustomFieldIds = []; - object.flags = []; - object.sorts = []; - } - if (options.defaults) { - object.timeZone = ""; - object.currencyCode = ""; - object.dateRange = null; - object.reportType = options.enums === String ? "REPORT_TYPE_UNSPECIFIED" : 0; - object.timePeriodColumn = options.enums === String ? "TIME_PERIOD_COLUMN_UNSPECIFIED" : 0; - object.timeZoneSource = options.enums === String ? "TIME_ZONE_SOURCE_UNSPECIFIED" : 0; - } - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = options.enums === String ? $root.google.ads.admanager.v1.Report.Dimension[message.dimensions[j]] === undefined ? message.dimensions[j] : $root.google.ads.admanager.v1.Report.Dimension[message.dimensions[j]] : message.dimensions[j]; - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = options.enums === String ? $root.google.ads.admanager.v1.Report.Metric[message.metrics[j]] === undefined ? message.metrics[j] : $root.google.ads.admanager.v1.Report.Metric[message.metrics[j]] : message.metrics[j]; - } - if (message.filters && message.filters.length) { - object.filters = []; - for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.google.ads.admanager.v1.Report.Filter.toObject(message.filters[j], options); - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) - object.dateRange = $root.google.ads.admanager.v1.Report.DateRange.toObject(message.dateRange, options); - if (message.customDimensionKeyIds && message.customDimensionKeyIds.length) { - object.customDimensionKeyIds = []; - for (var j = 0; j < message.customDimensionKeyIds.length; ++j) - if (typeof message.customDimensionKeyIds[j] === "number") - object.customDimensionKeyIds[j] = options.longs === String ? String(message.customDimensionKeyIds[j]) : message.customDimensionKeyIds[j]; - else - object.customDimensionKeyIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.customDimensionKeyIds[j]) : options.longs === Number ? new $util.LongBits(message.customDimensionKeyIds[j].low >>> 0, message.customDimensionKeyIds[j].high >>> 0).toNumber() : message.customDimensionKeyIds[j]; - } - if (message.reportType != null && message.hasOwnProperty("reportType")) - object.reportType = options.enums === String ? $root.google.ads.admanager.v1.Report.ReportType[message.reportType] === undefined ? message.reportType : $root.google.ads.admanager.v1.Report.ReportType[message.reportType] : message.reportType; - if (message.comparisonDateRange != null && message.hasOwnProperty("comparisonDateRange")) { - object.comparisonDateRange = $root.google.ads.admanager.v1.Report.DateRange.toObject(message.comparisonDateRange, options); - if (options.oneofs) - object._comparisonDateRange = "comparisonDateRange"; - } - if (message.timePeriodColumn != null && message.hasOwnProperty("timePeriodColumn")) - object.timePeriodColumn = options.enums === String ? $root.google.ads.admanager.v1.Report.TimePeriodColumn[message.timePeriodColumn] === undefined ? message.timePeriodColumn : $root.google.ads.admanager.v1.Report.TimePeriodColumn[message.timePeriodColumn] : message.timePeriodColumn; - if (message.lineItemCustomFieldIds && message.lineItemCustomFieldIds.length) { - object.lineItemCustomFieldIds = []; - for (var j = 0; j < message.lineItemCustomFieldIds.length; ++j) - if (typeof message.lineItemCustomFieldIds[j] === "number") - object.lineItemCustomFieldIds[j] = options.longs === String ? String(message.lineItemCustomFieldIds[j]) : message.lineItemCustomFieldIds[j]; - else - object.lineItemCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lineItemCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.lineItemCustomFieldIds[j].low >>> 0, message.lineItemCustomFieldIds[j].high >>> 0).toNumber() : message.lineItemCustomFieldIds[j]; - } - if (message.orderCustomFieldIds && message.orderCustomFieldIds.length) { - object.orderCustomFieldIds = []; - for (var j = 0; j < message.orderCustomFieldIds.length; ++j) - if (typeof message.orderCustomFieldIds[j] === "number") - object.orderCustomFieldIds[j] = options.longs === String ? String(message.orderCustomFieldIds[j]) : message.orderCustomFieldIds[j]; - else - object.orderCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.orderCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.orderCustomFieldIds[j].low >>> 0, message.orderCustomFieldIds[j].high >>> 0).toNumber() : message.orderCustomFieldIds[j]; - } - if (message.creativeCustomFieldIds && message.creativeCustomFieldIds.length) { - object.creativeCustomFieldIds = []; - for (var j = 0; j < message.creativeCustomFieldIds.length; ++j) - if (typeof message.creativeCustomFieldIds[j] === "number") - object.creativeCustomFieldIds[j] = options.longs === String ? String(message.creativeCustomFieldIds[j]) : message.creativeCustomFieldIds[j]; - else - object.creativeCustomFieldIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.creativeCustomFieldIds[j]) : options.longs === Number ? new $util.LongBits(message.creativeCustomFieldIds[j].low >>> 0, message.creativeCustomFieldIds[j].high >>> 0).toNumber() : message.creativeCustomFieldIds[j]; - } - if (message.flags && message.flags.length) { - object.flags = []; - for (var j = 0; j < message.flags.length; ++j) - object.flags[j] = $root.google.ads.admanager.v1.Report.Flag.toObject(message.flags[j], options); - } - if (message.sorts && message.sorts.length) { - object.sorts = []; - for (var j = 0; j < message.sorts.length; ++j) - object.sorts[j] = $root.google.ads.admanager.v1.Report.Sort.toObject(message.sorts[j], options); + if (options.arrays || options.defaults) + object.sites = []; + if (message.sites && message.sites.length) { + object.sites = []; + for (var j = 0; j < message.sites.length; ++j) + object.sites[j] = $root.google.ads.admanager.v1.Site.toObject(message.sites[j], options); } - if (message.timeZoneSource != null && message.hasOwnProperty("timeZoneSource")) - object.timeZoneSource = options.enums === String ? $root.google.ads.admanager.v1.Report.TimeZoneSource[message.timeZoneSource] === undefined ? message.timeZoneSource : $root.google.ads.admanager.v1.Report.TimeZoneSource[message.timeZoneSource] : message.timeZoneSource; return object; }; /** - * Converts this ReportDefinition to JSON. + * Converts this BatchUpdateSitesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ReportDefinition + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse * @instance * @returns {Object.} JSON object */ - ReportDefinition.prototype.toJSON = function toJSON() { + BatchUpdateSitesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReportDefinition + * Gets the default type url for BatchUpdateSitesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ReportDefinition + * @memberof google.ads.admanager.v1.BatchUpdateSitesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateSitesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ReportDefinition"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateSitesResponse"; }; - return ReportDefinition; + return BatchUpdateSitesResponse; })(); - v1.ScheduleOptions = (function() { + v1.BatchDeactivateSitesRequest = (function() { /** - * Properties of a ScheduleOptions. + * Properties of a BatchDeactivateSitesRequest. * @memberof google.ads.admanager.v1 - * @interface IScheduleOptions - * @property {google.ads.admanager.v1.ISchedule|null} [schedule] ScheduleOptions schedule - * @property {google.ads.admanager.v1.ScheduleOptions.DeliveryCondition|null} [deliveryCondition] ScheduleOptions deliveryCondition - * @property {Array.|null} [flags] ScheduleOptions flags + * @interface IBatchDeactivateSitesRequest + * @property {string|null} [parent] BatchDeactivateSitesRequest parent + * @property {Array.|null} [names] BatchDeactivateSitesRequest names */ /** - * Constructs a new ScheduleOptions. + * Constructs a new BatchDeactivateSitesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ScheduleOptions. - * @implements IScheduleOptions + * @classdesc Represents a BatchDeactivateSitesRequest. + * @implements IBatchDeactivateSitesRequest * @constructor - * @param {google.ads.admanager.v1.IScheduleOptions=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest=} [properties] Properties to set */ - function ScheduleOptions(properties) { - this.flags = []; + function BatchDeactivateSitesRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60845,108 +111310,94 @@ } /** - * ScheduleOptions schedule. - * @member {google.ads.admanager.v1.ISchedule|null|undefined} schedule - * @memberof google.ads.admanager.v1.ScheduleOptions - * @instance - */ - ScheduleOptions.prototype.schedule = null; - - /** - * ScheduleOptions deliveryCondition. - * @member {google.ads.admanager.v1.ScheduleOptions.DeliveryCondition} deliveryCondition - * @memberof google.ads.admanager.v1.ScheduleOptions + * BatchDeactivateSitesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @instance */ - ScheduleOptions.prototype.deliveryCondition = 0; + BatchDeactivateSitesRequest.prototype.parent = ""; /** - * ScheduleOptions flags. - * @member {Array.} flags - * @memberof google.ads.admanager.v1.ScheduleOptions + * BatchDeactivateSitesRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @instance */ - ScheduleOptions.prototype.flags = $util.emptyArray; + BatchDeactivateSitesRequest.prototype.names = $util.emptyArray; /** - * Creates a new ScheduleOptions instance using the specified properties. + * Creates a new BatchDeactivateSitesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static - * @param {google.ads.admanager.v1.IScheduleOptions=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions instance + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateSitesRequest} BatchDeactivateSitesRequest instance */ - ScheduleOptions.create = function create(properties) { - return new ScheduleOptions(properties); + BatchDeactivateSitesRequest.create = function create(properties) { + return new BatchDeactivateSitesRequest(properties); }; /** - * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * Encodes the specified BatchDeactivateSitesRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static - * @param {google.ads.admanager.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest} message BatchDeactivateSitesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ScheduleOptions.encode = function encode(message, writer) { + BatchDeactivateSitesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - $root.google.ads.admanager.v1.Schedule.encode(message.schedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deliveryCondition != null && Object.hasOwnProperty.call(message, "deliveryCondition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deliveryCondition); - if (message.flags != null && message.flags.length) - for (var i = 0; i < message.flags.length; ++i) - $root.google.ads.admanager.v1.Report.Flag.encode(message.flags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ScheduleOptions.verify|verify} messages. + * Encodes the specified BatchDeactivateSitesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static - * @param {google.ads.admanager.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateSitesRequest} message BatchDeactivateSitesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ScheduleOptions.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeactivateSitesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ScheduleOptions message from the specified reader or buffer. + * Decodes a BatchDeactivateSitesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + * @returns {google.ads.admanager.v1.BatchDeactivateSitesRequest} BatchDeactivateSitesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ScheduleOptions.decode = function decode(reader, length, error) { + BatchDeactivateSitesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ScheduleOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateSitesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.schedule = $root.google.ads.admanager.v1.Schedule.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.deliveryCondition = reader.int32(); - break; - } - case 3: { - if (!(message.flags && message.flags.length)) - message.flags = []; - message.flags.push($root.google.ads.admanager.v1.Report.Flag.decode(reader, reader.uint32())); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -60958,207 +111409,322 @@ }; /** - * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateSitesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + * @returns {google.ads.admanager.v1.BatchDeactivateSitesRequest} BatchDeactivateSitesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ScheduleOptions.decodeDelimited = function decodeDelimited(reader) { + BatchDeactivateSitesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ScheduleOptions message. + * Verifies a BatchDeactivateSitesRequest message. * @function verify - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ScheduleOptions.verify = function verify(message) { + BatchDeactivateSitesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - var error = $root.google.ads.admanager.v1.Schedule.verify(message.schedule); - if (error) - return "schedule." + error; - } - if (message.deliveryCondition != null && message.hasOwnProperty("deliveryCondition")) - switch (message.deliveryCondition) { - default: - return "deliveryCondition: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.flags != null && message.hasOwnProperty("flags")) { - if (!Array.isArray(message.flags)) - return "flags: array expected"; - for (var i = 0; i < message.flags.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.Flag.verify(message.flags[i]); - if (error) - return "flags." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateSitesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ScheduleOptions} ScheduleOptions + * @returns {google.ads.admanager.v1.BatchDeactivateSitesRequest} BatchDeactivateSitesRequest */ - ScheduleOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ScheduleOptions) + BatchDeactivateSitesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateSitesRequest) return object; - var message = new $root.google.ads.admanager.v1.ScheduleOptions(); - if (object.schedule != null) { - if (typeof object.schedule !== "object") - throw TypeError(".google.ads.admanager.v1.ScheduleOptions.schedule: object expected"); - message.schedule = $root.google.ads.admanager.v1.Schedule.fromObject(object.schedule); + var message = new $root.google.ads.admanager.v1.BatchDeactivateSitesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchDeactivateSitesRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } - switch (object.deliveryCondition) { - default: - if (typeof object.deliveryCondition === "number") { - message.deliveryCondition = object.deliveryCondition; - break; - } - break; - case "NEVER": - case 0: - message.deliveryCondition = 0; - break; - case "ALWAYS": - case 1: - message.deliveryCondition = 1; - break; - case "WHEN_FLAG_CONDITIONS_MET": - case 2: - message.deliveryCondition = 2; - break; + return message; + }; + + /** + * Creates a plain object from a BatchDeactivateSitesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest + * @static + * @param {google.ads.admanager.v1.BatchDeactivateSitesRequest} message BatchDeactivateSitesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeactivateSitesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } - if (object.flags) { - if (!Array.isArray(object.flags)) - throw TypeError(".google.ads.admanager.v1.ScheduleOptions.flags: array expected"); - message.flags = []; - for (var i = 0; i < object.flags.length; ++i) { - if (typeof object.flags[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ScheduleOptions.flags: object expected"); - message.flags[i] = $root.google.ads.admanager.v1.Report.Flag.fromObject(object.flags[i]); + return object; + }; + + /** + * Converts this BatchDeactivateSitesRequest to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest + * @instance + * @returns {Object.} JSON object + */ + BatchDeactivateSitesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeactivateSitesRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchDeactivateSitesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeactivateSitesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateSitesRequest"; + }; + + return BatchDeactivateSitesRequest; + })(); + + v1.BatchDeactivateSitesResponse = (function() { + + /** + * Properties of a BatchDeactivateSitesResponse. + * @memberof google.ads.admanager.v1 + * @interface IBatchDeactivateSitesResponse + */ + + /** + * Constructs a new BatchDeactivateSitesResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchDeactivateSitesResponse. + * @implements IBatchDeactivateSitesResponse + * @constructor + * @param {google.ads.admanager.v1.IBatchDeactivateSitesResponse=} [properties] Properties to set + */ + function BatchDeactivateSitesResponse(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 BatchDeactivateSitesResponse instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivateSitesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateSitesResponse} BatchDeactivateSitesResponse instance + */ + BatchDeactivateSitesResponse.create = function create(properties) { + return new BatchDeactivateSitesResponse(properties); + }; + + /** + * Encodes the specified BatchDeactivateSitesResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivateSitesResponse} message BatchDeactivateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivateSitesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BatchDeactivateSitesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateSitesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {google.ads.admanager.v1.IBatchDeactivateSitesResponse} message BatchDeactivateSitesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeactivateSitesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeactivateSitesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchDeactivateSitesResponse} BatchDeactivateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivateSitesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateSitesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. + * Decodes a BatchDeactivateSitesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchDeactivateSitesResponse} BatchDeactivateSitesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeactivateSitesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeactivateSitesResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeactivateSitesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BatchDeactivateSitesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchDeactivateSitesResponse} BatchDeactivateSitesResponse + */ + BatchDeactivateSitesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateSitesResponse) + return object; + return new $root.google.ads.admanager.v1.BatchDeactivateSitesResponse(); + }; + + /** + * Creates a plain object from a BatchDeactivateSitesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse * @static - * @param {google.ads.admanager.v1.ScheduleOptions} message ScheduleOptions + * @param {google.ads.admanager.v1.BatchDeactivateSitesResponse} message BatchDeactivateSitesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ScheduleOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.flags = []; - if (options.defaults) { - object.schedule = null; - object.deliveryCondition = options.enums === String ? "NEVER" : 0; - } - if (message.schedule != null && message.hasOwnProperty("schedule")) - object.schedule = $root.google.ads.admanager.v1.Schedule.toObject(message.schedule, options); - if (message.deliveryCondition != null && message.hasOwnProperty("deliveryCondition")) - object.deliveryCondition = options.enums === String ? $root.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition[message.deliveryCondition] === undefined ? message.deliveryCondition : $root.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition[message.deliveryCondition] : message.deliveryCondition; - if (message.flags && message.flags.length) { - object.flags = []; - for (var j = 0; j < message.flags.length; ++j) - object.flags[j] = $root.google.ads.admanager.v1.Report.Flag.toObject(message.flags[j], options); - } - return object; + BatchDeactivateSitesResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ScheduleOptions to JSON. + * Converts this BatchDeactivateSitesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse * @instance * @returns {Object.} JSON object */ - ScheduleOptions.prototype.toJSON = function toJSON() { + BatchDeactivateSitesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ScheduleOptions + * Gets the default type url for BatchDeactivateSitesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ScheduleOptions + * @memberof google.ads.admanager.v1.BatchDeactivateSitesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ScheduleOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeactivateSitesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ScheduleOptions"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateSitesResponse"; }; - /** - * DeliveryCondition enum. - * @name google.ads.admanager.v1.ScheduleOptions.DeliveryCondition - * @enum {number} - * @property {number} NEVER=0 NEVER value - * @property {number} ALWAYS=1 ALWAYS value - * @property {number} WHEN_FLAG_CONDITIONS_MET=2 WHEN_FLAG_CONDITIONS_MET value - */ - ScheduleOptions.DeliveryCondition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEVER"] = 0; - values[valuesById[1] = "ALWAYS"] = 1; - values[valuesById[2] = "WHEN_FLAG_CONDITIONS_MET"] = 2; - return values; - })(); - - return ScheduleOptions; + return BatchDeactivateSitesResponse; })(); - v1.Schedule = (function() { + v1.BatchSubmitSitesForApprovalRequest = (function() { /** - * Properties of a Schedule. + * Properties of a BatchSubmitSitesForApprovalRequest. * @memberof google.ads.admanager.v1 - * @interface ISchedule - * @property {google.ads.admanager.v1.Schedule.IWeeklySchedule|null} [weeklySchedule] Schedule weeklySchedule - * @property {google.ads.admanager.v1.Schedule.IMonthlySchedule|null} [monthlySchedule] Schedule monthlySchedule - * @property {google.type.IDate|null} [startDate] Schedule startDate - * @property {google.type.IDate|null} [endDate] Schedule endDate - * @property {google.ads.admanager.v1.Schedule.Frequency|null} [frequency] Schedule frequency - * @property {google.type.ITimeOfDay|null} [startTime] Schedule startTime + * @interface IBatchSubmitSitesForApprovalRequest + * @property {string|null} [parent] BatchSubmitSitesForApprovalRequest parent + * @property {Array.|null} [names] BatchSubmitSitesForApprovalRequest names */ /** - * Constructs a new Schedule. + * Constructs a new BatchSubmitSitesForApprovalRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Schedule. - * @implements ISchedule + * @classdesc Represents a BatchSubmitSitesForApprovalRequest. + * @implements IBatchSubmitSitesForApprovalRequest * @constructor - * @param {google.ads.admanager.v1.ISchedule=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest=} [properties] Properties to set */ - function Schedule(properties) { + function BatchSubmitSitesForApprovalRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61166,161 +111732,94 @@ } /** - * Schedule weeklySchedule. - * @member {google.ads.admanager.v1.Schedule.IWeeklySchedule|null|undefined} weeklySchedule - * @memberof google.ads.admanager.v1.Schedule - * @instance - */ - Schedule.prototype.weeklySchedule = null; - - /** - * Schedule monthlySchedule. - * @member {google.ads.admanager.v1.Schedule.IMonthlySchedule|null|undefined} monthlySchedule - * @memberof google.ads.admanager.v1.Schedule - * @instance - */ - Schedule.prototype.monthlySchedule = null; - - /** - * Schedule startDate. - * @member {google.type.IDate|null|undefined} startDate - * @memberof google.ads.admanager.v1.Schedule - * @instance - */ - Schedule.prototype.startDate = null; - - /** - * Schedule endDate. - * @member {google.type.IDate|null|undefined} endDate - * @memberof google.ads.admanager.v1.Schedule - * @instance - */ - Schedule.prototype.endDate = null; - - /** - * Schedule frequency. - * @member {google.ads.admanager.v1.Schedule.Frequency} frequency - * @memberof google.ads.admanager.v1.Schedule - * @instance - */ - Schedule.prototype.frequency = 0; - - /** - * Schedule startTime. - * @member {google.type.ITimeOfDay|null|undefined} startTime - * @memberof google.ads.admanager.v1.Schedule + * BatchSubmitSitesForApprovalRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @instance */ - Schedule.prototype.startTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BatchSubmitSitesForApprovalRequest.prototype.parent = ""; /** - * Schedule frequencySchedule. - * @member {"weeklySchedule"|"monthlySchedule"|undefined} frequencySchedule - * @memberof google.ads.admanager.v1.Schedule + * BatchSubmitSitesForApprovalRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @instance */ - Object.defineProperty(Schedule.prototype, "frequencySchedule", { - get: $util.oneOfGetter($oneOfFields = ["weeklySchedule", "monthlySchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchSubmitSitesForApprovalRequest.prototype.names = $util.emptyArray; /** - * Creates a new Schedule instance using the specified properties. + * Creates a new BatchSubmitSitesForApprovalRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static - * @param {google.ads.admanager.v1.ISchedule=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Schedule} Schedule instance + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest} BatchSubmitSitesForApprovalRequest instance */ - Schedule.create = function create(properties) { - return new Schedule(properties); + BatchSubmitSitesForApprovalRequest.create = function create(properties) { + return new BatchSubmitSitesForApprovalRequest(properties); }; /** - * Encodes the specified Schedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.verify|verify} messages. + * Encodes the specified BatchSubmitSitesForApprovalRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static - * @param {google.ads.admanager.v1.ISchedule} message Schedule message or plain object to encode + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest} message BatchSubmitSitesForApprovalRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schedule.encode = function encode(message, writer) { + BatchSubmitSitesForApprovalRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - $root.google.type.Date.encode(message.startDate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - $root.google.type.Date.encode(message.endDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frequency); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.type.TimeOfDay.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.weeklySchedule != null && Object.hasOwnProperty.call(message, "weeklySchedule")) - $root.google.ads.admanager.v1.Schedule.WeeklySchedule.encode(message.weeklySchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.monthlySchedule != null && Object.hasOwnProperty.call(message, "monthlySchedule")) - $root.google.ads.admanager.v1.Schedule.MonthlySchedule.encode(message.monthlySchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.verify|verify} messages. + * Encodes the specified BatchSubmitSitesForApprovalRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static - * @param {google.ads.admanager.v1.ISchedule} message Schedule message or plain object to encode + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest} message BatchSubmitSitesForApprovalRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schedule.encodeDelimited = function encodeDelimited(message, writer) { + BatchSubmitSitesForApprovalRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Schedule message from the specified reader or buffer. + * Decodes a BatchSubmitSitesForApprovalRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Schedule} Schedule + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest} BatchSubmitSitesForApprovalRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schedule.decode = function decode(reader, length, error) { + BatchSubmitSitesForApprovalRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Schedule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 6: { - message.weeklySchedule = $root.google.ads.admanager.v1.Schedule.WeeklySchedule.decode(reader, reader.uint32()); - break; - } - case 7: { - message.monthlySchedule = $root.google.ads.admanager.v1.Schedule.MonthlySchedule.decode(reader, reader.uint32()); - break; - } case 1: { - message.startDate = $root.google.type.Date.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 3: { - message.frequency = reader.int32(); - break; - } - case 4: { - message.startTime = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -61332,1016 +111831,855 @@ }; /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. + * Decodes a BatchSubmitSitesForApprovalRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Schedule} Schedule + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest} BatchSubmitSitesForApprovalRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schedule.decodeDelimited = function decodeDelimited(reader) { + BatchSubmitSitesForApprovalRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Schedule message. + * Verifies a BatchSubmitSitesForApprovalRequest message. * @function verify - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Schedule.verify = function verify(message) { + BatchSubmitSitesForApprovalRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { - properties.frequencySchedule = 1; - { - var error = $root.google.ads.admanager.v1.Schedule.WeeklySchedule.verify(message.weeklySchedule); - if (error) - return "weeklySchedule." + error; - } - } - if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { - if (properties.frequencySchedule === 1) - return "frequencySchedule: multiple values"; - properties.frequencySchedule = 1; - { - var error = $root.google.ads.admanager.v1.Schedule.MonthlySchedule.verify(message.monthlySchedule); - if (error) - return "monthlySchedule." + error; - } - } - if (message.startDate != null && message.hasOwnProperty("startDate")) { - var error = $root.google.type.Date.verify(message.startDate); - if (error) - return "startDate." + error; - } - if (message.endDate != null && message.hasOwnProperty("endDate")) { - var error = $root.google.type.Date.verify(message.endDate); - if (error) - return "endDate." + error; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.type.TimeOfDay.verify(message.startTime); - if (error) - return "startTime." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * Creates a BatchSubmitSitesForApprovalRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Schedule} Schedule + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest} BatchSubmitSitesForApprovalRequest */ - Schedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Schedule) + BatchSubmitSitesForApprovalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest) return object; - var message = new $root.google.ads.admanager.v1.Schedule(); - if (object.weeklySchedule != null) { - if (typeof object.weeklySchedule !== "object") - throw TypeError(".google.ads.admanager.v1.Schedule.weeklySchedule: object expected"); - message.weeklySchedule = $root.google.ads.admanager.v1.Schedule.WeeklySchedule.fromObject(object.weeklySchedule); - } - if (object.monthlySchedule != null) { - if (typeof object.monthlySchedule !== "object") - throw TypeError(".google.ads.admanager.v1.Schedule.monthlySchedule: object expected"); - message.monthlySchedule = $root.google.ads.admanager.v1.Schedule.MonthlySchedule.fromObject(object.monthlySchedule); - } - if (object.startDate != null) { - if (typeof object.startDate !== "object") - throw TypeError(".google.ads.admanager.v1.Schedule.startDate: object expected"); - message.startDate = $root.google.type.Date.fromObject(object.startDate); - } - if (object.endDate != null) { - if (typeof object.endDate !== "object") - throw TypeError(".google.ads.admanager.v1.Schedule.endDate: object expected"); - message.endDate = $root.google.type.Date.fromObject(object.endDate); - } - switch (object.frequency) { - default: - if (typeof object.frequency === "number") { - message.frequency = object.frequency; - break; - } - break; - case "FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "HOURLY": - case 1: - message.frequency = 1; - break; - case "TWO_TIMES_DAILY": - case 2: - message.frequency = 2; - break; - case "THREE_TIMES_DAILY": - case 3: - message.frequency = 3; - break; - case "FOUR_TIMES_DAILY": - case 4: - message.frequency = 4; - break; - case "DAILY": - case 5: - message.frequency = 5; - break; - case "WEEKLY": - case 6: - message.frequency = 6; - break; - case "MONTHLY": - case 7: - message.frequency = 7; - break; - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.ads.admanager.v1.Schedule.startTime: object expected"); - message.startTime = $root.google.type.TimeOfDay.fromObject(object.startTime); + var message = new $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * Creates a plain object from a BatchSubmitSitesForApprovalRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @static - * @param {google.ads.admanager.v1.Schedule} message Schedule + * @param {google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest} message BatchSubmitSitesForApprovalRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Schedule.toObject = function toObject(message, options) { + BatchSubmitSitesForApprovalRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.startDate = null; - object.endDate = null; - object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; - object.startTime = null; - } - if (message.startDate != null && message.hasOwnProperty("startDate")) - object.startDate = $root.google.type.Date.toObject(message.startDate, options); - if (message.endDate != null && message.hasOwnProperty("endDate")) - object.endDate = $root.google.type.Date.toObject(message.endDate, options); - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.ads.admanager.v1.Schedule.Frequency[message.frequency] === undefined ? message.frequency : $root.google.ads.admanager.v1.Schedule.Frequency[message.frequency] : message.frequency; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.type.TimeOfDay.toObject(message.startTime, options); - if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { - object.weeklySchedule = $root.google.ads.admanager.v1.Schedule.WeeklySchedule.toObject(message.weeklySchedule, options); - if (options.oneofs) - object.frequencySchedule = "weeklySchedule"; - } - if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { - object.monthlySchedule = $root.google.ads.admanager.v1.Schedule.MonthlySchedule.toObject(message.monthlySchedule, options); - if (options.oneofs) - object.frequencySchedule = "monthlySchedule"; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } return object; }; /** - * Converts this Schedule to JSON. + * Converts this BatchSubmitSitesForApprovalRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Schedule + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest * @instance * @returns {Object.} JSON object */ - Schedule.prototype.toJSON = function toJSON() { + BatchSubmitSitesForApprovalRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Schedule - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Schedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Schedule"; - }; - - Schedule.WeeklySchedule = (function() { - - /** - * Properties of a WeeklySchedule. - * @memberof google.ads.admanager.v1.Schedule - * @interface IWeeklySchedule - * @property {Array.|null} [weeklyScheduledDays] WeeklySchedule weeklyScheduledDays - */ - - /** - * Constructs a new WeeklySchedule. - * @memberof google.ads.admanager.v1.Schedule - * @classdesc Represents a WeeklySchedule. - * @implements IWeeklySchedule - * @constructor - * @param {google.ads.admanager.v1.Schedule.IWeeklySchedule=} [properties] Properties to set - */ - function WeeklySchedule(properties) { - this.weeklyScheduledDays = []; - 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]]; - } - - /** - * WeeklySchedule weeklyScheduledDays. - * @member {Array.} weeklyScheduledDays - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.weeklyScheduledDays = $util.emptyArray; - - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IWeeklySchedule=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Schedule.WeeklySchedule} WeeklySchedule instance - */ - WeeklySchedule.create = function create(properties) { - return new WeeklySchedule(properties); - }; - - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.WeeklySchedule.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weeklyScheduledDays != null && message.weeklyScheduledDays.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.weeklyScheduledDays.length; ++i) - writer.int32(message.weeklyScheduledDays[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.WeeklySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Schedule.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Schedule.WeeklySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.weeklyScheduledDays && message.weeklyScheduledDays.length)) - message.weeklyScheduledDays = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weeklyScheduledDays.push(reader.int32()); - } else - message.weeklyScheduledDays.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Schedule.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeeklySchedule message. - * @function verify - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeeklySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weeklyScheduledDays != null && message.hasOwnProperty("weeklyScheduledDays")) { - if (!Array.isArray(message.weeklyScheduledDays)) - return "weeklyScheduledDays: array expected"; - for (var i = 0; i < message.weeklyScheduledDays.length; ++i) - switch (message.weeklyScheduledDays[i]) { - default: - return "weeklyScheduledDays: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - return null; - }; - - /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Schedule.WeeklySchedule} WeeklySchedule - */ - WeeklySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Schedule.WeeklySchedule) - return object; - var message = new $root.google.ads.admanager.v1.Schedule.WeeklySchedule(); - if (object.weeklyScheduledDays) { - if (!Array.isArray(object.weeklyScheduledDays)) - throw TypeError(".google.ads.admanager.v1.Schedule.WeeklySchedule.weeklyScheduledDays: array expected"); - message.weeklyScheduledDays = []; - for (var i = 0; i < object.weeklyScheduledDays.length; ++i) - switch (object.weeklyScheduledDays[i]) { - default: - if (typeof object.weeklyScheduledDays[i] === "number") { - message.weeklyScheduledDays[i] = object.weeklyScheduledDays[i]; - break; - } - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.weeklyScheduledDays[i] = 0; - break; - case "MONDAY": - case 1: - message.weeklyScheduledDays[i] = 1; - break; - case "TUESDAY": - case 2: - message.weeklyScheduledDays[i] = 2; - break; - case "WEDNESDAY": - case 3: - message.weeklyScheduledDays[i] = 3; - break; - case "THURSDAY": - case 4: - message.weeklyScheduledDays[i] = 4; - break; - case "FRIDAY": - case 5: - message.weeklyScheduledDays[i] = 5; - break; - case "SATURDAY": - case 6: - message.weeklyScheduledDays[i] = 6; - break; - case "SUNDAY": - case 7: - message.weeklyScheduledDays[i] = 7; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.WeeklySchedule} message WeeklySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeeklySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.weeklyScheduledDays = []; - if (message.weeklyScheduledDays && message.weeklyScheduledDays.length) { - object.weeklyScheduledDays = []; - for (var j = 0; j < message.weeklyScheduledDays.length; ++j) - object.weeklyScheduledDays[j] = options.enums === String ? $root.google.type.DayOfWeek[message.weeklyScheduledDays[j]] === undefined ? message.weeklyScheduledDays[j] : $root.google.type.DayOfWeek[message.weeklyScheduledDays[j]] : message.weeklyScheduledDays[j]; - } - return object; - }; - - /** - * Converts this WeeklySchedule to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @instance - * @returns {Object.} JSON object - */ - WeeklySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WeeklySchedule - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Schedule.WeeklySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WeeklySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Schedule.WeeklySchedule"; - }; - - return WeeklySchedule; - })(); - - Schedule.MonthlySchedule = (function() { - - /** - * Properties of a MonthlySchedule. - * @memberof google.ads.admanager.v1.Schedule - * @interface IMonthlySchedule - * @property {Array.|null} [monthlyScheduledDays] MonthlySchedule monthlyScheduledDays - */ - - /** - * Constructs a new MonthlySchedule. - * @memberof google.ads.admanager.v1.Schedule - * @classdesc Represents a MonthlySchedule. - * @implements IMonthlySchedule - * @constructor - * @param {google.ads.admanager.v1.Schedule.IMonthlySchedule=} [properties] Properties to set - */ - function MonthlySchedule(properties) { - this.monthlyScheduledDays = []; - 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]]; - } - - /** - * MonthlySchedule monthlyScheduledDays. - * @member {Array.} monthlyScheduledDays - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.monthlyScheduledDays = $util.emptyArray; - - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IMonthlySchedule=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Schedule.MonthlySchedule} MonthlySchedule instance - */ - MonthlySchedule.create = function create(properties) { - return new MonthlySchedule(properties); - }; - - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.ads.admanager.v1.Schedule.MonthlySchedule.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.monthlyScheduledDays != null && message.monthlyScheduledDays.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.monthlyScheduledDays.length; ++i) - writer.int32(message.monthlyScheduledDays[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Schedule.MonthlySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Schedule.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Schedule.MonthlySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.monthlyScheduledDays && message.monthlyScheduledDays.length)) - message.monthlyScheduledDays = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.monthlyScheduledDays.push(reader.int32()); - } else - message.monthlyScheduledDays.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Schedule.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonthlySchedule message. - * @function verify - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonthlySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.monthlyScheduledDays != null && message.hasOwnProperty("monthlyScheduledDays")) { - if (!Array.isArray(message.monthlyScheduledDays)) - return "monthlyScheduledDays: array expected"; - for (var i = 0; i < message.monthlyScheduledDays.length; ++i) - if (!$util.isInteger(message.monthlyScheduledDays[i])) - return "monthlyScheduledDays: integer[] expected"; - } - return null; - }; - - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Schedule.MonthlySchedule} MonthlySchedule - */ - MonthlySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Schedule.MonthlySchedule) - return object; - var message = new $root.google.ads.admanager.v1.Schedule.MonthlySchedule(); - if (object.monthlyScheduledDays) { - if (!Array.isArray(object.monthlyScheduledDays)) - throw TypeError(".google.ads.admanager.v1.Schedule.MonthlySchedule.monthlyScheduledDays: array expected"); - message.monthlyScheduledDays = []; - for (var i = 0; i < object.monthlyScheduledDays.length; ++i) - message.monthlyScheduledDays[i] = object.monthlyScheduledDays[i] | 0; - } - return message; - }; - - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {google.ads.admanager.v1.Schedule.MonthlySchedule} message MonthlySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonthlySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.monthlyScheduledDays = []; - if (message.monthlyScheduledDays && message.monthlyScheduledDays.length) { - object.monthlyScheduledDays = []; - for (var j = 0; j < message.monthlyScheduledDays.length; ++j) - object.monthlyScheduledDays[j] = message.monthlyScheduledDays[j]; - } - return object; - }; - - /** - * Converts this MonthlySchedule to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @instance - * @returns {Object.} JSON object - */ - MonthlySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonthlySchedule - * @function getTypeUrl - * @memberof google.ads.admanager.v1.Schedule.MonthlySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonthlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.Schedule.MonthlySchedule"; - }; - - return MonthlySchedule; - })(); - - /** - * Frequency enum. - * @name google.ads.admanager.v1.Schedule.Frequency - * @enum {number} - * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value - * @property {number} HOURLY=1 HOURLY value - * @property {number} TWO_TIMES_DAILY=2 TWO_TIMES_DAILY value - * @property {number} THREE_TIMES_DAILY=3 THREE_TIMES_DAILY value - * @property {number} FOUR_TIMES_DAILY=4 FOUR_TIMES_DAILY value - * @property {number} DAILY=5 DAILY value - * @property {number} WEEKLY=6 WEEKLY value - * @property {number} MONTHLY=7 MONTHLY value - */ - Schedule.Frequency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "HOURLY"] = 1; - values[valuesById[2] = "TWO_TIMES_DAILY"] = 2; - values[valuesById[3] = "THREE_TIMES_DAILY"] = 3; - values[valuesById[4] = "FOUR_TIMES_DAILY"] = 4; - values[valuesById[5] = "DAILY"] = 5; - values[valuesById[6] = "WEEKLY"] = 6; - values[valuesById[7] = "MONTHLY"] = 7; - return values; - })(); + * Gets the default type url for BatchSubmitSitesForApprovalRequest + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchSubmitSitesForApprovalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest"; + }; - return Schedule; + return BatchSubmitSitesForApprovalRequest; })(); - v1.ReportService = (function() { + v1.BatchSubmitSitesForApprovalResponse = (function() { /** - * Constructs a new ReportService service. + * Properties of a BatchSubmitSitesForApprovalResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ReportService - * @extends $protobuf.rpc.Service + * @interface IBatchSubmitSitesForApprovalResponse + */ + + /** + * Constructs a new BatchSubmitSitesForApprovalResponse. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a BatchSubmitSitesForApprovalResponse. + * @implements IBatchSubmitSitesForApprovalResponse * @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 + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse=} [properties] Properties to set */ - function ReportService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function BatchSubmitSitesForApprovalResponse(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]]; } - (ReportService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReportService; - /** - * Creates new ReportService service using the specified rpc implementation. + * Creates a new BatchSubmitSitesForApprovalResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ReportService + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse * @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 {ReportService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} BatchSubmitSitesForApprovalResponse instance */ - ReportService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + BatchSubmitSitesForApprovalResponse.create = function create(properties) { + return new BatchSubmitSitesForApprovalResponse(properties); }; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|getReport}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef GetReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Report} [response] Report + * Encodes the specified BatchSubmitSitesForApprovalResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse} message BatchSubmitSitesForApprovalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BatchSubmitSitesForApprovalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Calls GetReport. - * @function getReport - * @memberof google.ads.admanager.v1.ReportService - * @instance - * @param {google.ads.admanager.v1.IGetReportRequest} request GetReportRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.GetReportCallback} callback Node-style callback called with the error, if any, and Report - * @returns {undefined} - * @variation 1 + * Encodes the specified BatchSubmitSitesForApprovalResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse} message BatchSubmitSitesForApprovalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ReportService.prototype.getReport = function getReport(request, callback) { - return this.rpcCall(getReport, $root.google.ads.admanager.v1.GetReportRequest, $root.google.ads.admanager.v1.Report, request, callback); - }, "name", { value: "GetReport" }); + BatchSubmitSitesForApprovalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetReport. - * @function getReport - * @memberof google.ads.admanager.v1.ReportService + * Decodes a BatchSubmitSitesForApprovalResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} BatchSubmitSitesForApprovalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchSubmitSitesForApprovalResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchSubmitSitesForApprovalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} BatchSubmitSitesForApprovalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchSubmitSitesForApprovalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchSubmitSitesForApprovalResponse message. + * @function verify + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchSubmitSitesForApprovalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BatchSubmitSitesForApprovalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} BatchSubmitSitesForApprovalResponse + */ + BatchSubmitSitesForApprovalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse) + return object; + return new $root.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse(); + }; + + /** + * Creates a plain object from a BatchSubmitSitesForApprovalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse} message BatchSubmitSitesForApprovalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchSubmitSitesForApprovalResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BatchSubmitSitesForApprovalResponse to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse * @instance - * @param {google.ads.admanager.v1.IGetReportRequest} request GetReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + BatchSubmitSitesForApprovalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|listReports}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef ListReportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListReportsResponse} [response] ListReportsResponse + * Gets the default type url for BatchSubmitSitesForApprovalResponse + * @function getTypeUrl + * @memberof google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchSubmitSitesForApprovalResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse"; + }; + + return BatchSubmitSitesForApprovalResponse; + })(); + + v1.TaxonomyCategory = (function() { + + /** + * Properties of a TaxonomyCategory. + * @memberof google.ads.admanager.v1 + * @interface ITaxonomyCategory + * @property {string|null} [name] TaxonomyCategory name + * @property {number|Long|null} [taxonomyCategoryId] TaxonomyCategory taxonomyCategoryId + * @property {string|null} [displayName] TaxonomyCategory displayName + * @property {boolean|null} [groupingOnly] TaxonomyCategory groupingOnly + * @property {number|Long|null} [parentTaxonomyCategoryId] TaxonomyCategory parentTaxonomyCategoryId + * @property {google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null} [taxonomyType] TaxonomyCategory taxonomyType + * @property {Array.|null} [ancestorNames] TaxonomyCategory ancestorNames + * @property {Array.|null} [ancestorTaxonomyCategoryIds] TaxonomyCategory ancestorTaxonomyCategoryIds */ /** - * Calls ListReports. - * @function listReports - * @memberof google.ads.admanager.v1.ReportService + * Constructs a new TaxonomyCategory. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a TaxonomyCategory. + * @implements ITaxonomyCategory + * @constructor + * @param {google.ads.admanager.v1.ITaxonomyCategory=} [properties] Properties to set + */ + function TaxonomyCategory(properties) { + this.ancestorNames = []; + this.ancestorTaxonomyCategoryIds = []; + 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]]; + } + + /** + * TaxonomyCategory name. + * @member {string} name + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.IListReportsRequest} request ListReportsRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.ListReportsCallback} callback Node-style callback called with the error, if any, and ListReportsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ReportService.prototype.listReports = function listReports(request, callback) { - return this.rpcCall(listReports, $root.google.ads.admanager.v1.ListReportsRequest, $root.google.ads.admanager.v1.ListReportsResponse, request, callback); - }, "name", { value: "ListReports" }); + TaxonomyCategory.prototype.name = ""; /** - * Calls ListReports. - * @function listReports - * @memberof google.ads.admanager.v1.ReportService + * TaxonomyCategory taxonomyCategoryId. + * @member {number|Long|null|undefined} taxonomyCategoryId + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.IListReportsRequest} request ListReportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TaxonomyCategory.prototype.taxonomyCategoryId = null; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|createReport}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef CreateReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Report} [response] Report + * TaxonomyCategory displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @instance */ + TaxonomyCategory.prototype.displayName = null; /** - * Calls CreateReport. - * @function createReport - * @memberof google.ads.admanager.v1.ReportService + * TaxonomyCategory groupingOnly. + * @member {boolean|null|undefined} groupingOnly + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.ICreateReportRequest} request CreateReportRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.CreateReportCallback} callback Node-style callback called with the error, if any, and Report - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ReportService.prototype.createReport = function createReport(request, callback) { - return this.rpcCall(createReport, $root.google.ads.admanager.v1.CreateReportRequest, $root.google.ads.admanager.v1.Report, request, callback); - }, "name", { value: "CreateReport" }); + TaxonomyCategory.prototype.groupingOnly = null; /** - * Calls CreateReport. - * @function createReport - * @memberof google.ads.admanager.v1.ReportService + * TaxonomyCategory parentTaxonomyCategoryId. + * @member {number|Long|null|undefined} parentTaxonomyCategoryId + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.ICreateReportRequest} request CreateReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TaxonomyCategory.prototype.parentTaxonomyCategoryId = null; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|updateReport}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef UpdateReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Report} [response] Report + * TaxonomyCategory taxonomyType. + * @member {google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null|undefined} taxonomyType + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @instance */ + TaxonomyCategory.prototype.taxonomyType = null; /** - * Calls UpdateReport. - * @function updateReport - * @memberof google.ads.admanager.v1.ReportService + * TaxonomyCategory ancestorNames. + * @member {Array.} ancestorNames + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.IUpdateReportRequest} request UpdateReportRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.UpdateReportCallback} callback Node-style callback called with the error, if any, and Report - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ReportService.prototype.updateReport = function updateReport(request, callback) { - return this.rpcCall(updateReport, $root.google.ads.admanager.v1.UpdateReportRequest, $root.google.ads.admanager.v1.Report, request, callback); - }, "name", { value: "UpdateReport" }); + TaxonomyCategory.prototype.ancestorNames = $util.emptyArray; /** - * Calls UpdateReport. - * @function updateReport - * @memberof google.ads.admanager.v1.ReportService + * TaxonomyCategory ancestorTaxonomyCategoryIds. + * @member {Array.} ancestorTaxonomyCategoryIds + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.IUpdateReportRequest} request UpdateReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TaxonomyCategory.prototype.ancestorTaxonomyCategoryIds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TaxonomyCategory.prototype, "_taxonomyCategoryId", { + get: $util.oneOfGetter($oneOfFields = ["taxonomyCategoryId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TaxonomyCategory.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TaxonomyCategory.prototype, "_groupingOnly", { + get: $util.oneOfGetter($oneOfFields = ["groupingOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TaxonomyCategory.prototype, "_parentTaxonomyCategoryId", { + get: $util.oneOfGetter($oneOfFields = ["parentTaxonomyCategoryId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TaxonomyCategory.prototype, "_taxonomyType", { + get: $util.oneOfGetter($oneOfFields = ["taxonomyType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|runReport}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef RunReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new TaxonomyCategory instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {google.ads.admanager.v1.ITaxonomyCategory=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory instance */ + TaxonomyCategory.create = function create(properties) { + return new TaxonomyCategory(properties); + }; /** - * Calls RunReport. - * @function runReport - * @memberof google.ads.admanager.v1.ReportService - * @instance - * @param {google.ads.admanager.v1.IRunReportRequest} request RunReportRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.RunReportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified TaxonomyCategory message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {google.ads.admanager.v1.ITaxonomyCategory} message TaxonomyCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ReportService.prototype.runReport = function runReport(request, callback) { - return this.rpcCall(runReport, $root.google.ads.admanager.v1.RunReportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunReport" }); + TaxonomyCategory.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.taxonomyCategoryId != null && Object.hasOwnProperty.call(message, "taxonomyCategoryId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.taxonomyCategoryId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.groupingOnly != null && Object.hasOwnProperty.call(message, "groupingOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.groupingOnly); + if (message.parentTaxonomyCategoryId != null && Object.hasOwnProperty.call(message, "parentTaxonomyCategoryId")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.parentTaxonomyCategoryId); + if (message.ancestorNames != null && message.ancestorNames.length) + for (var i = 0; i < message.ancestorNames.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.ancestorNames[i]); + if (message.ancestorTaxonomyCategoryIds != null && message.ancestorTaxonomyCategoryIds.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.ancestorTaxonomyCategoryIds.length; ++i) + writer.int64(message.ancestorTaxonomyCategoryIds[i]); + writer.ldelim(); + } + if (message.taxonomyType != null && Object.hasOwnProperty.call(message, "taxonomyType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.taxonomyType); + return writer; + }; + + /** + * Encodes the specified TaxonomyCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {google.ads.admanager.v1.ITaxonomyCategory} message TaxonomyCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaxonomyCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaxonomyCategory message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaxonomyCategory.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TaxonomyCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.taxonomyCategoryId = reader.int64(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 5: { + message.groupingOnly = reader.bool(); + break; + } + case 6: { + message.parentTaxonomyCategoryId = reader.int64(); + break; + } + case 9: { + message.taxonomyType = reader.int32(); + break; + } + case 7: { + if (!(message.ancestorNames && message.ancestorNames.length)) + message.ancestorNames = []; + message.ancestorNames.push(reader.string()); + break; + } + case 8: { + if (!(message.ancestorTaxonomyCategoryIds && message.ancestorTaxonomyCategoryIds.length)) + message.ancestorTaxonomyCategoryIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ancestorTaxonomyCategoryIds.push(reader.int64()); + } else + message.ancestorTaxonomyCategoryIds.push(reader.int64()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaxonomyCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaxonomyCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaxonomyCategory message. + * @function verify + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaxonomyCategory.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.taxonomyCategoryId != null && message.hasOwnProperty("taxonomyCategoryId")) { + properties._taxonomyCategoryId = 1; + if (!$util.isInteger(message.taxonomyCategoryId) && !(message.taxonomyCategoryId && $util.isInteger(message.taxonomyCategoryId.low) && $util.isInteger(message.taxonomyCategoryId.high))) + return "taxonomyCategoryId: integer|Long expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.groupingOnly != null && message.hasOwnProperty("groupingOnly")) { + properties._groupingOnly = 1; + if (typeof message.groupingOnly !== "boolean") + return "groupingOnly: boolean expected"; + } + if (message.parentTaxonomyCategoryId != null && message.hasOwnProperty("parentTaxonomyCategoryId")) { + properties._parentTaxonomyCategoryId = 1; + if (!$util.isInteger(message.parentTaxonomyCategoryId) && !(message.parentTaxonomyCategoryId && $util.isInteger(message.parentTaxonomyCategoryId.low) && $util.isInteger(message.parentTaxonomyCategoryId.high))) + return "parentTaxonomyCategoryId: integer|Long expected"; + } + if (message.taxonomyType != null && message.hasOwnProperty("taxonomyType")) { + properties._taxonomyType = 1; + switch (message.taxonomyType) { + default: + return "taxonomyType: enum value expected"; + case 0: + case 3: + case 8: + case 4: + case 6: + case 5: + case 7: + break; + } + } + if (message.ancestorNames != null && message.hasOwnProperty("ancestorNames")) { + if (!Array.isArray(message.ancestorNames)) + return "ancestorNames: array expected"; + for (var i = 0; i < message.ancestorNames.length; ++i) + if (!$util.isString(message.ancestorNames[i])) + return "ancestorNames: string[] expected"; + } + if (message.ancestorTaxonomyCategoryIds != null && message.hasOwnProperty("ancestorTaxonomyCategoryIds")) { + if (!Array.isArray(message.ancestorTaxonomyCategoryIds)) + return "ancestorTaxonomyCategoryIds: array expected"; + for (var i = 0; i < message.ancestorTaxonomyCategoryIds.length; ++i) + if (!$util.isInteger(message.ancestorTaxonomyCategoryIds[i]) && !(message.ancestorTaxonomyCategoryIds[i] && $util.isInteger(message.ancestorTaxonomyCategoryIds[i].low) && $util.isInteger(message.ancestorTaxonomyCategoryIds[i].high))) + return "ancestorTaxonomyCategoryIds: integer|Long[] expected"; + } + return null; + }; /** - * Calls RunReport. - * @function runReport - * @memberof google.ads.admanager.v1.ReportService - * @instance - * @param {google.ads.admanager.v1.IRunReportRequest} request RunReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a TaxonomyCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory */ + TaxonomyCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TaxonomyCategory) + return object; + var message = new $root.google.ads.admanager.v1.TaxonomyCategory(); + if (object.name != null) + message.name = String(object.name); + if (object.taxonomyCategoryId != null) + if ($util.Long) + (message.taxonomyCategoryId = $util.Long.fromValue(object.taxonomyCategoryId)).unsigned = false; + else if (typeof object.taxonomyCategoryId === "string") + message.taxonomyCategoryId = parseInt(object.taxonomyCategoryId, 10); + else if (typeof object.taxonomyCategoryId === "number") + message.taxonomyCategoryId = object.taxonomyCategoryId; + else if (typeof object.taxonomyCategoryId === "object") + message.taxonomyCategoryId = new $util.LongBits(object.taxonomyCategoryId.low >>> 0, object.taxonomyCategoryId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.groupingOnly != null) + message.groupingOnly = Boolean(object.groupingOnly); + if (object.parentTaxonomyCategoryId != null) + if ($util.Long) + (message.parentTaxonomyCategoryId = $util.Long.fromValue(object.parentTaxonomyCategoryId)).unsigned = false; + else if (typeof object.parentTaxonomyCategoryId === "string") + message.parentTaxonomyCategoryId = parseInt(object.parentTaxonomyCategoryId, 10); + else if (typeof object.parentTaxonomyCategoryId === "number") + message.parentTaxonomyCategoryId = object.parentTaxonomyCategoryId; + else if (typeof object.parentTaxonomyCategoryId === "object") + message.parentTaxonomyCategoryId = new $util.LongBits(object.parentTaxonomyCategoryId.low >>> 0, object.parentTaxonomyCategoryId.high >>> 0).toNumber(); + switch (object.taxonomyType) { + default: + if (typeof object.taxonomyType === "number") { + message.taxonomyType = object.taxonomyType; + break; + } + break; + case "TAXONOMY_TYPE_UNSPECIFIED": + case 0: + message.taxonomyType = 0; + break; + case "TAXONOMY_IAB_AUDIENCE_1_1": + case 3: + message.taxonomyType = 3; + break; + case "TAXONOMY_IAB_CONTENT_1_0": + case 8: + message.taxonomyType = 8; + break; + case "TAXONOMY_IAB_CONTENT_2_1": + case 4: + message.taxonomyType = 4; + break; + case "TAXONOMY_IAB_CONTENT_2_2": + case 6: + message.taxonomyType = 6; + break; + case "TAXONOMY_IAB_CONTENT_3_0": + case 5: + message.taxonomyType = 5; + break; + case "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0": + case 7: + message.taxonomyType = 7; + break; + } + if (object.ancestorNames) { + if (!Array.isArray(object.ancestorNames)) + throw TypeError(".google.ads.admanager.v1.TaxonomyCategory.ancestorNames: array expected"); + message.ancestorNames = []; + for (var i = 0; i < object.ancestorNames.length; ++i) + message.ancestorNames[i] = String(object.ancestorNames[i]); + } + if (object.ancestorTaxonomyCategoryIds) { + if (!Array.isArray(object.ancestorTaxonomyCategoryIds)) + throw TypeError(".google.ads.admanager.v1.TaxonomyCategory.ancestorTaxonomyCategoryIds: array expected"); + message.ancestorTaxonomyCategoryIds = []; + for (var i = 0; i < object.ancestorTaxonomyCategoryIds.length; ++i) + if ($util.Long) + (message.ancestorTaxonomyCategoryIds[i] = $util.Long.fromValue(object.ancestorTaxonomyCategoryIds[i])).unsigned = false; + else if (typeof object.ancestorTaxonomyCategoryIds[i] === "string") + message.ancestorTaxonomyCategoryIds[i] = parseInt(object.ancestorTaxonomyCategoryIds[i], 10); + else if (typeof object.ancestorTaxonomyCategoryIds[i] === "number") + message.ancestorTaxonomyCategoryIds[i] = object.ancestorTaxonomyCategoryIds[i]; + else if (typeof object.ancestorTaxonomyCategoryIds[i] === "object") + message.ancestorTaxonomyCategoryIds[i] = new $util.LongBits(object.ancestorTaxonomyCategoryIds[i].low >>> 0, object.ancestorTaxonomyCategoryIds[i].high >>> 0).toNumber(); + } + return message; + }; /** - * Callback as used by {@link google.ads.admanager.v1.ReportService|fetchReportResultRows}. - * @memberof google.ads.admanager.v1.ReportService - * @typedef FetchReportResultRowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.FetchReportResultRowsResponse} [response] FetchReportResultRowsResponse + * Creates a plain object from a TaxonomyCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {google.ads.admanager.v1.TaxonomyCategory} message TaxonomyCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + TaxonomyCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ancestorNames = []; + object.ancestorTaxonomyCategoryIds = []; + } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.taxonomyCategoryId != null && message.hasOwnProperty("taxonomyCategoryId")) { + if (typeof message.taxonomyCategoryId === "number") + object.taxonomyCategoryId = options.longs === String ? String(message.taxonomyCategoryId) : message.taxonomyCategoryId; + else + object.taxonomyCategoryId = options.longs === String ? $util.Long.prototype.toString.call(message.taxonomyCategoryId) : options.longs === Number ? new $util.LongBits(message.taxonomyCategoryId.low >>> 0, message.taxonomyCategoryId.high >>> 0).toNumber() : message.taxonomyCategoryId; + if (options.oneofs) + object._taxonomyCategoryId = "taxonomyCategoryId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.groupingOnly != null && message.hasOwnProperty("groupingOnly")) { + object.groupingOnly = message.groupingOnly; + if (options.oneofs) + object._groupingOnly = "groupingOnly"; + } + if (message.parentTaxonomyCategoryId != null && message.hasOwnProperty("parentTaxonomyCategoryId")) { + if (typeof message.parentTaxonomyCategoryId === "number") + object.parentTaxonomyCategoryId = options.longs === String ? String(message.parentTaxonomyCategoryId) : message.parentTaxonomyCategoryId; + else + object.parentTaxonomyCategoryId = options.longs === String ? $util.Long.prototype.toString.call(message.parentTaxonomyCategoryId) : options.longs === Number ? new $util.LongBits(message.parentTaxonomyCategoryId.low >>> 0, message.parentTaxonomyCategoryId.high >>> 0).toNumber() : message.parentTaxonomyCategoryId; + if (options.oneofs) + object._parentTaxonomyCategoryId = "parentTaxonomyCategoryId"; + } + if (message.ancestorNames && message.ancestorNames.length) { + object.ancestorNames = []; + for (var j = 0; j < message.ancestorNames.length; ++j) + object.ancestorNames[j] = message.ancestorNames[j]; + } + if (message.ancestorTaxonomyCategoryIds && message.ancestorTaxonomyCategoryIds.length) { + object.ancestorTaxonomyCategoryIds = []; + for (var j = 0; j < message.ancestorTaxonomyCategoryIds.length; ++j) + if (typeof message.ancestorTaxonomyCategoryIds[j] === "number") + object.ancestorTaxonomyCategoryIds[j] = options.longs === String ? String(message.ancestorTaxonomyCategoryIds[j]) : message.ancestorTaxonomyCategoryIds[j]; + else + object.ancestorTaxonomyCategoryIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.ancestorTaxonomyCategoryIds[j]) : options.longs === Number ? new $util.LongBits(message.ancestorTaxonomyCategoryIds[j].low >>> 0, message.ancestorTaxonomyCategoryIds[j].high >>> 0).toNumber() : message.ancestorTaxonomyCategoryIds[j]; + } + if (message.taxonomyType != null && message.hasOwnProperty("taxonomyType")) { + object.taxonomyType = options.enums === String ? $root.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType[message.taxonomyType] === undefined ? message.taxonomyType : $root.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType[message.taxonomyType] : message.taxonomyType; + if (options.oneofs) + object._taxonomyType = "taxonomyType"; + } + return object; + }; /** - * Calls FetchReportResultRows. - * @function fetchReportResultRows - * @memberof google.ads.admanager.v1.ReportService + * Converts this TaxonomyCategory to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.TaxonomyCategory * @instance - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} request FetchReportResultRowsRequest message or plain object - * @param {google.ads.admanager.v1.ReportService.FetchReportResultRowsCallback} callback Node-style callback called with the error, if any, and FetchReportResultRowsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ReportService.prototype.fetchReportResultRows = function fetchReportResultRows(request, callback) { - return this.rpcCall(fetchReportResultRows, $root.google.ads.admanager.v1.FetchReportResultRowsRequest, $root.google.ads.admanager.v1.FetchReportResultRowsResponse, request, callback); - }, "name", { value: "FetchReportResultRows" }); + TaxonomyCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls FetchReportResultRows. - * @function fetchReportResultRows - * @memberof google.ads.admanager.v1.ReportService - * @instance - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} request FetchReportResultRowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for TaxonomyCategory + * @function getTypeUrl + * @memberof google.ads.admanager.v1.TaxonomyCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + TaxonomyCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.TaxonomyCategory"; + }; - return ReportService; + return TaxonomyCategory; })(); - v1.RunReportRequest = (function() { + v1.TaxonomyTypeEnum = (function() { /** - * Properties of a RunReportRequest. + * Properties of a TaxonomyTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IRunReportRequest - * @property {string|null} [name] RunReportRequest name + * @interface ITaxonomyTypeEnum */ /** - * Constructs a new RunReportRequest. + * Constructs a new TaxonomyTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RunReportRequest. - * @implements IRunReportRequest + * @classdesc Represents a TaxonomyTypeEnum. + * @implements ITaxonomyTypeEnum * @constructor - * @param {google.ads.admanager.v1.IRunReportRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITaxonomyTypeEnum=} [properties] Properties to set */ - function RunReportRequest(properties) { + function TaxonomyTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62349,79 +112687,65 @@ } /** - * RunReportRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.RunReportRequest - * @instance - */ - RunReportRequest.prototype.name = ""; - - /** - * Creates a new RunReportRequest instance using the specified properties. + * Creates a new TaxonomyTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static - * @param {google.ads.admanager.v1.IRunReportRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest instance + * @param {google.ads.admanager.v1.ITaxonomyTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum instance */ - RunReportRequest.create = function create(properties) { - return new RunReportRequest(properties); + TaxonomyTypeEnum.create = function create(properties) { + return new TaxonomyTypeEnum(properties); }; /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * Encodes the specified TaxonomyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static - * @param {google.ads.admanager.v1.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITaxonomyTypeEnum} message TaxonomyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportRequest.encode = function encode(message, writer) { + TaxonomyTypeEnum.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 RunReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportRequest.verify|verify} messages. + * Encodes the specified TaxonomyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static - * @param {google.ads.admanager.v1.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITaxonomyTypeEnum} message TaxonomyTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + TaxonomyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunReportRequest message from the specified reader or buffer. + * Decodes a TaxonomyTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportRequest.decode = function decode(reader, length, error) { + TaxonomyTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TaxonomyTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -62431,123 +112755,234 @@ }; /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * Decodes a TaxonomyTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportRequest.decodeDelimited = function decodeDelimited(reader) { + TaxonomyTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunReportRequest message. + * Verifies a TaxonomyTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunReportRequest.verify = function verify(message) { + TaxonomyTypeEnum.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 RunReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TaxonomyTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RunReportRequest} RunReportRequest + * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum */ - RunReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RunReportRequest) + TaxonomyTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TaxonomyTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.RunReportRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.ads.admanager.v1.TaxonomyTypeEnum(); }; /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * Creates a plain object from a TaxonomyTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static - * @param {google.ads.admanager.v1.RunReportRequest} message RunReportRequest + * @param {google.ads.admanager.v1.TaxonomyTypeEnum} message TaxonomyTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunReportRequest.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; + TaxonomyTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this RunReportRequest to JSON. + * Converts this TaxonomyTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @instance * @returns {Object.} JSON object */ - RunReportRequest.prototype.toJSON = function toJSON() { + TaxonomyTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunReportRequest + * Gets the default type url for TaxonomyTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.RunReportRequest + * @memberof google.ads.admanager.v1.TaxonomyTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TaxonomyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RunReportRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.TaxonomyTypeEnum"; }; - return RunReportRequest; + /** + * TaxonomyType enum. + * @name google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType + * @enum {number} + * @property {number} TAXONOMY_TYPE_UNSPECIFIED=0 TAXONOMY_TYPE_UNSPECIFIED value + * @property {number} TAXONOMY_IAB_AUDIENCE_1_1=3 TAXONOMY_IAB_AUDIENCE_1_1 value + * @property {number} TAXONOMY_IAB_CONTENT_1_0=8 TAXONOMY_IAB_CONTENT_1_0 value + * @property {number} TAXONOMY_IAB_CONTENT_2_1=4 TAXONOMY_IAB_CONTENT_2_1 value + * @property {number} TAXONOMY_IAB_CONTENT_2_2=6 TAXONOMY_IAB_CONTENT_2_2 value + * @property {number} TAXONOMY_IAB_CONTENT_3_0=5 TAXONOMY_IAB_CONTENT_3_0 value + * @property {number} TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0=7 TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 value + */ + TaxonomyTypeEnum.TaxonomyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TAXONOMY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[3] = "TAXONOMY_IAB_AUDIENCE_1_1"] = 3; + values[valuesById[8] = "TAXONOMY_IAB_CONTENT_1_0"] = 8; + values[valuesById[4] = "TAXONOMY_IAB_CONTENT_2_1"] = 4; + values[valuesById[6] = "TAXONOMY_IAB_CONTENT_2_2"] = 6; + values[valuesById[5] = "TAXONOMY_IAB_CONTENT_3_0"] = 5; + values[valuesById[7] = "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0"] = 7; + return values; + })(); + + return TaxonomyTypeEnum; })(); - v1.RunReportMetadata = (function() { + v1.TaxonomyCategoryService = (function() { /** - * Properties of a RunReportMetadata. + * Constructs a new TaxonomyCategoryService service. * @memberof google.ads.admanager.v1 - * @interface IRunReportMetadata - * @property {number|null} [percentComplete] RunReportMetadata percentComplete - * @property {string|null} [report] RunReportMetadata report + * @classdesc Represents a TaxonomyCategoryService + * @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 TaxonomyCategoryService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TaxonomyCategoryService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TaxonomyCategoryService; /** - * Constructs a new RunReportMetadata. + * Creates new TaxonomyCategoryService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @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 {TaxonomyCategoryService} RPC service. Useful where requests and/or responses are streamed. + */ + TaxonomyCategoryService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|getTaxonomyCategory}. + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @typedef GetTaxonomyCategoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.TaxonomyCategory} [response] TaxonomyCategory + */ + + /** + * Calls GetTaxonomyCategory. + * @function getTaxonomyCategory + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @instance + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} request GetTaxonomyCategoryRequest message or plain object + * @param {google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategoryCallback} callback Node-style callback called with the error, if any, and TaxonomyCategory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TaxonomyCategoryService.prototype.getTaxonomyCategory = function getTaxonomyCategory(request, callback) { + return this.rpcCall(getTaxonomyCategory, $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest, $root.google.ads.admanager.v1.TaxonomyCategory, request, callback); + }, "name", { value: "GetTaxonomyCategory" }); + + /** + * Calls GetTaxonomyCategory. + * @function getTaxonomyCategory + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @instance + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} request GetTaxonomyCategoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|listTaxonomyCategories}. + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @typedef ListTaxonomyCategoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} [response] ListTaxonomyCategoriesResponse + */ + + /** + * Calls ListTaxonomyCategories. + * @function listTaxonomyCategories + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @instance + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} request ListTaxonomyCategoriesRequest message or plain object + * @param {google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategoriesCallback} callback Node-style callback called with the error, if any, and ListTaxonomyCategoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TaxonomyCategoryService.prototype.listTaxonomyCategories = function listTaxonomyCategories(request, callback) { + return this.rpcCall(listTaxonomyCategories, $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest, $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse, request, callback); + }, "name", { value: "ListTaxonomyCategories" }); + + /** + * Calls ListTaxonomyCategories. + * @function listTaxonomyCategories + * @memberof google.ads.admanager.v1.TaxonomyCategoryService + * @instance + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} request ListTaxonomyCategoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TaxonomyCategoryService; + })(); + + v1.GetTaxonomyCategoryRequest = (function() { + + /** + * Properties of a GetTaxonomyCategoryRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RunReportMetadata. - * @implements IRunReportMetadata + * @interface IGetTaxonomyCategoryRequest + * @property {string|null} [name] GetTaxonomyCategoryRequest name + */ + + /** + * Constructs a new GetTaxonomyCategoryRequest. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a GetTaxonomyCategoryRequest. + * @implements IGetTaxonomyCategoryRequest * @constructor - * @param {google.ads.admanager.v1.IRunReportMetadata=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest=} [properties] Properties to set */ - function RunReportMetadata(properties) { + function GetTaxonomyCategoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62555,91 +112990,77 @@ } /** - * RunReportMetadata percentComplete. - * @member {number} percentComplete - * @memberof google.ads.admanager.v1.RunReportMetadata - * @instance - */ - RunReportMetadata.prototype.percentComplete = 0; - - /** - * RunReportMetadata report. - * @member {string} report - * @memberof google.ads.admanager.v1.RunReportMetadata + * GetTaxonomyCategoryRequest name. + * @member {string} name + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @instance */ - RunReportMetadata.prototype.report = ""; + GetTaxonomyCategoryRequest.prototype.name = ""; /** - * Creates a new RunReportMetadata instance using the specified properties. + * Creates a new GetTaxonomyCategoryRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static - * @param {google.ads.admanager.v1.IRunReportMetadata=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata instance + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest instance */ - RunReportMetadata.create = function create(properties) { - return new RunReportMetadata(properties); + GetTaxonomyCategoryRequest.create = function create(properties) { + return new GetTaxonomyCategoryRequest(properties); }; /** - * Encodes the specified RunReportMetadata message. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * Encodes the specified GetTaxonomyCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static - * @param {google.ads.admanager.v1.IRunReportMetadata} message RunReportMetadata message or plain object to encode + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportMetadata.encode = function encode(message, writer) { + GetTaxonomyCategoryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percentComplete); - if (message.report != null && Object.hasOwnProperty.call(message, "report")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.report); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified RunReportMetadata message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportMetadata.verify|verify} messages. + * Encodes the specified GetTaxonomyCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static - * @param {google.ads.admanager.v1.IRunReportMetadata} message RunReportMetadata message or plain object to encode + * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetTaxonomyCategoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunReportMetadata message from the specified reader or buffer. + * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportMetadata.decode = function decode(reader, length, error) { + GetTaxonomyCategoryRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.percentComplete = reader.int32(); - break; - } - case 4: { - message.report = reader.string(); + case 1: { + message.name = reader.string(); break; } default: @@ -62651,131 +113072,127 @@ }; /** - * Decodes a RunReportMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportMetadata.decodeDelimited = function decodeDelimited(reader) { + GetTaxonomyCategoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunReportMetadata message. + * Verifies a GetTaxonomyCategoryRequest message. * @function verify - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunReportMetadata.verify = function verify(message) { + GetTaxonomyCategoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - if (!$util.isInteger(message.percentComplete)) - return "percentComplete: integer expected"; - if (message.report != null && message.hasOwnProperty("report")) - if (!$util.isString(message.report)) - return "report: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a RunReportMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaxonomyCategoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RunReportMetadata} RunReportMetadata + * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest */ - RunReportMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RunReportMetadata) + GetTaxonomyCategoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest) return object; - var message = new $root.google.ads.admanager.v1.RunReportMetadata(); - if (object.percentComplete != null) - message.percentComplete = object.percentComplete | 0; - if (object.report != null) - message.report = String(object.report); + var message = new $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a RunReportMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetTaxonomyCategoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static - * @param {google.ads.admanager.v1.RunReportMetadata} message RunReportMetadata + * @param {google.ads.admanager.v1.GetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunReportMetadata.toObject = function toObject(message, options) { + GetTaxonomyCategoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.percentComplete = 0; - object.report = ""; - } - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - object.percentComplete = message.percentComplete; - if (message.report != null && message.hasOwnProperty("report")) - object.report = message.report; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this RunReportMetadata to JSON. + * Converts this GetTaxonomyCategoryRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @instance * @returns {Object.} JSON object */ - RunReportMetadata.prototype.toJSON = function toJSON() { + GetTaxonomyCategoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunReportMetadata + * Gets the default type url for GetTaxonomyCategoryRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.RunReportMetadata + * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTaxonomyCategoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RunReportMetadata"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetTaxonomyCategoryRequest"; }; - return RunReportMetadata; + return GetTaxonomyCategoryRequest; })(); - v1.RunReportResponse = (function() { + v1.ListTaxonomyCategoriesRequest = (function() { /** - * Properties of a RunReportResponse. + * Properties of a ListTaxonomyCategoriesRequest. * @memberof google.ads.admanager.v1 - * @interface IRunReportResponse - * @property {string|null} [reportResult] RunReportResponse reportResult + * @interface IListTaxonomyCategoriesRequest + * @property {string|null} [parent] ListTaxonomyCategoriesRequest parent + * @property {number|null} [pageSize] ListTaxonomyCategoriesRequest pageSize + * @property {string|null} [pageToken] ListTaxonomyCategoriesRequest pageToken + * @property {string|null} [filter] ListTaxonomyCategoriesRequest filter + * @property {string|null} [orderBy] ListTaxonomyCategoriesRequest orderBy + * @property {number|null} [skip] ListTaxonomyCategoriesRequest skip */ /** - * Constructs a new RunReportResponse. + * Constructs a new ListTaxonomyCategoriesRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RunReportResponse. - * @implements IRunReportResponse + * @classdesc Represents a ListTaxonomyCategoriesRequest. + * @implements IListTaxonomyCategoriesRequest * @constructor - * @param {google.ads.admanager.v1.IRunReportResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest=} [properties] Properties to set */ - function RunReportResponse(properties) { + function ListTaxonomyCategoriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62783,77 +113200,147 @@ } /** - * RunReportResponse reportResult. - * @member {string} reportResult - * @memberof google.ads.admanager.v1.RunReportResponse + * ListTaxonomyCategoriesRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @instance */ - RunReportResponse.prototype.reportResult = ""; + ListTaxonomyCategoriesRequest.prototype.parent = ""; /** - * Creates a new RunReportResponse instance using the specified properties. + * ListTaxonomyCategoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @instance + */ + ListTaxonomyCategoriesRequest.prototype.pageSize = 0; + + /** + * ListTaxonomyCategoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @instance + */ + ListTaxonomyCategoriesRequest.prototype.pageToken = ""; + + /** + * ListTaxonomyCategoriesRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @instance + */ + ListTaxonomyCategoriesRequest.prototype.filter = ""; + + /** + * ListTaxonomyCategoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @instance + */ + ListTaxonomyCategoriesRequest.prototype.orderBy = ""; + + /** + * ListTaxonomyCategoriesRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @instance + */ + ListTaxonomyCategoriesRequest.prototype.skip = 0; + + /** + * Creates a new ListTaxonomyCategoriesRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static - * @param {google.ads.admanager.v1.IRunReportResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse instance + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest instance */ - RunReportResponse.create = function create(properties) { - return new RunReportResponse(properties); + ListTaxonomyCategoriesRequest.create = function create(properties) { + return new ListTaxonomyCategoriesRequest(properties); }; /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * Encodes the specified ListTaxonomyCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static - * @param {google.ads.admanager.v1.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportResponse.encode = function encode(message, writer) { + ListTaxonomyCategoriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.reportResult != null && Object.hasOwnProperty.call(message, "reportResult")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.reportResult); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RunReportResponse.verify|verify} messages. + * Encodes the specified ListTaxonomyCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static - * @param {google.ads.admanager.v1.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListTaxonomyCategoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunReportResponse message from the specified reader or buffer. + * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportResponse.decode = function decode(reader, length, error) { + ListTaxonomyCategoriesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RunReportResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.reportResult = 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; + } + case 6: { + message.skip = reader.int32(); break; } default: @@ -62865,122 +113352,166 @@ }; /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunReportResponse.decodeDelimited = function decodeDelimited(reader) { + ListTaxonomyCategoriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunReportResponse message. + * Verifies a ListTaxonomyCategoriesRequest message. * @function verify - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunReportResponse.verify = function verify(message) { + ListTaxonomyCategoriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reportResult != null && message.hasOwnProperty("reportResult")) - if (!$util.isString(message.reportResult)) - return "reportResult: 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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomyCategoriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RunReportResponse} RunReportResponse + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest */ - RunReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RunReportResponse) + ListTaxonomyCategoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest) return object; - var message = new $root.google.ads.admanager.v1.RunReportResponse(); - if (object.reportResult != null) - message.reportResult = String(object.reportResult); + var message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListTaxonomyCategoriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static - * @param {google.ads.admanager.v1.RunReportResponse} message RunReportResponse + * @param {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunReportResponse.toObject = function toObject(message, options) { + ListTaxonomyCategoriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.reportResult = ""; - if (message.reportResult != null && message.hasOwnProperty("reportResult")) - object.reportResult = message.reportResult; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; + } + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this RunReportResponse to JSON. + * Converts this ListTaxonomyCategoriesRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @instance * @returns {Object.} JSON object */ - RunReportResponse.prototype.toJSON = function toJSON() { + ListTaxonomyCategoriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunReportResponse + * Gets the default type url for ListTaxonomyCategoriesRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.RunReportResponse + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTaxonomyCategoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RunReportResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListTaxonomyCategoriesRequest"; }; - return RunReportResponse; + return ListTaxonomyCategoriesRequest; })(); - v1.GetReportRequest = (function() { + v1.ListTaxonomyCategoriesResponse = (function() { /** - * Properties of a GetReportRequest. + * Properties of a ListTaxonomyCategoriesResponse. * @memberof google.ads.admanager.v1 - * @interface IGetReportRequest - * @property {string|null} [name] GetReportRequest name + * @interface IListTaxonomyCategoriesResponse + * @property {Array.|null} [taxonomyCategories] ListTaxonomyCategoriesResponse taxonomyCategories + * @property {string|null} [nextPageToken] ListTaxonomyCategoriesResponse nextPageToken + * @property {number|null} [totalSize] ListTaxonomyCategoriesResponse totalSize */ /** - * Constructs a new GetReportRequest. + * Constructs a new ListTaxonomyCategoriesResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetReportRequest. - * @implements IGetReportRequest + * @classdesc Represents a ListTaxonomyCategoriesResponse. + * @implements IListTaxonomyCategoriesResponse * @constructor - * @param {google.ads.admanager.v1.IGetReportRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse=} [properties] Properties to set */ - function GetReportRequest(properties) { + function ListTaxonomyCategoriesResponse(properties) { + this.taxonomyCategories = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62988,77 +113519,108 @@ } /** - * GetReportRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetReportRequest + * ListTaxonomyCategoriesResponse taxonomyCategories. + * @member {Array.} taxonomyCategories + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @instance */ - GetReportRequest.prototype.name = ""; + ListTaxonomyCategoriesResponse.prototype.taxonomyCategories = $util.emptyArray; /** - * Creates a new GetReportRequest instance using the specified properties. + * ListTaxonomyCategoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @instance + */ + ListTaxonomyCategoriesResponse.prototype.nextPageToken = ""; + + /** + * ListTaxonomyCategoriesResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @instance + */ + ListTaxonomyCategoriesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListTaxonomyCategoriesResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static - * @param {google.ads.admanager.v1.IGetReportRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest instance + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse instance */ - GetReportRequest.create = function create(properties) { - return new GetReportRequest(properties); + ListTaxonomyCategoriesResponse.create = function create(properties) { + return new ListTaxonomyCategoriesResponse(properties); }; /** - * Encodes the specified GetReportRequest message. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * Encodes the specified ListTaxonomyCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static - * @param {google.ads.admanager.v1.IGetReportRequest} message GetReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReportRequest.encode = function encode(message, writer) { + ListTaxonomyCategoriesResponse.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.taxonomyCategories != null && message.taxonomyCategories.length) + for (var i = 0; i < message.taxonomyCategories.length; ++i) + $root.google.ads.admanager.v1.TaxonomyCategory.encode(message.taxonomyCategories[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified GetReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetReportRequest.verify|verify} messages. + * Encodes the specified ListTaxonomyCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static - * @param {google.ads.admanager.v1.IGetReportRequest} message GetReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTaxonomyCategoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetReportRequest message from the specified reader or buffer. + * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReportRequest.decode = function decode(reader, length, error) { + ListTaxonomyCategoriesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetReportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.taxonomyCategories && message.taxonomyCategories.length)) + message.taxonomyCategories = []; + message.taxonomyCategories.push($root.google.ads.admanager.v1.TaxonomyCategory.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -63070,127 +113632,156 @@ }; /** - * Decodes a GetReportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReportRequest.decodeDelimited = function decodeDelimited(reader) { + ListTaxonomyCategoriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetReportRequest message. + * Verifies a ListTaxonomyCategoriesResponse message. * @function verify - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetReportRequest.verify = function verify(message) { + ListTaxonomyCategoriesResponse.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.taxonomyCategories != null && message.hasOwnProperty("taxonomyCategories")) { + if (!Array.isArray(message.taxonomyCategories)) + return "taxonomyCategories: array expected"; + for (var i = 0; i < message.taxonomyCategories.length; ++i) { + var error = $root.google.ads.admanager.v1.TaxonomyCategory.verify(message.taxonomyCategories[i]); + if (error) + return "taxonomyCategories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a GetReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomyCategoriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetReportRequest} GetReportRequest + * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse */ - GetReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetReportRequest) + ListTaxonomyCategoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse) return object; - var message = new $root.google.ads.admanager.v1.GetReportRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse(); + if (object.taxonomyCategories) { + if (!Array.isArray(object.taxonomyCategories)) + throw TypeError(".google.ads.admanager.v1.ListTaxonomyCategoriesResponse.taxonomyCategories: array expected"); + message.taxonomyCategories = []; + for (var i = 0; i < object.taxonomyCategories.length; ++i) { + if (typeof object.taxonomyCategories[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListTaxonomyCategoriesResponse.taxonomyCategories: object expected"); + message.taxonomyCategories[i] = $root.google.ads.admanager.v1.TaxonomyCategory.fromObject(object.taxonomyCategories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a GetReportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTaxonomyCategoriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static - * @param {google.ads.admanager.v1.GetReportRequest} message GetReportRequest + * @param {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetReportRequest.toObject = function toObject(message, options) { + ListTaxonomyCategoriesResponse.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.arrays || options.defaults) + object.taxonomyCategories = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.taxonomyCategories && message.taxonomyCategories.length) { + object.taxonomyCategories = []; + for (var j = 0; j < message.taxonomyCategories.length; ++j) + object.taxonomyCategories[j] = $root.google.ads.admanager.v1.TaxonomyCategory.toObject(message.taxonomyCategories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this GetReportRequest to JSON. + * Converts this ListTaxonomyCategoriesResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @instance * @returns {Object.} JSON object */ - GetReportRequest.prototype.toJSON = function toJSON() { + ListTaxonomyCategoriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetReportRequest + * Gets the default type url for ListTaxonomyCategoriesResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetReportRequest + * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTaxonomyCategoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetReportRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListTaxonomyCategoriesResponse"; }; - return GetReportRequest; + return ListTaxonomyCategoriesResponse; })(); - v1.ListReportsRequest = (function() { + v1.TeamStatusEnum = (function() { /** - * Properties of a ListReportsRequest. + * Properties of a TeamStatusEnum. * @memberof google.ads.admanager.v1 - * @interface IListReportsRequest - * @property {string|null} [parent] ListReportsRequest parent - * @property {number|null} [pageSize] ListReportsRequest pageSize - * @property {string|null} [pageToken] ListReportsRequest pageToken - * @property {string|null} [filter] ListReportsRequest filter - * @property {string|null} [orderBy] ListReportsRequest orderBy - * @property {number|null} [skip] ListReportsRequest skip + * @interface ITeamStatusEnum */ /** - * Constructs a new ListReportsRequest. + * Constructs a new TeamStatusEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListReportsRequest. - * @implements IListReportsRequest + * @classdesc Represents a TeamStatusEnum. + * @implements ITeamStatusEnum * @constructor - * @param {google.ads.admanager.v1.IListReportsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITeamStatusEnum=} [properties] Properties to set */ - function ListReportsRequest(properties) { + function TeamStatusEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63198,149 +113789,65 @@ } /** - * ListReportsRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.parent = ""; - - /** - * ListReportsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.pageSize = 0; - - /** - * ListReportsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.pageToken = ""; - - /** - * ListReportsRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.filter = ""; - - /** - * ListReportsRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.orderBy = ""; - - /** - * ListReportsRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListReportsRequest - * @instance - */ - ListReportsRequest.prototype.skip = 0; - - /** - * Creates a new ListReportsRequest instance using the specified properties. + * Creates a new TeamStatusEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static - * @param {google.ads.admanager.v1.IListReportsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest instance + * @param {google.ads.admanager.v1.ITeamStatusEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TeamStatusEnum} TeamStatusEnum instance */ - ListReportsRequest.create = function create(properties) { - return new ListReportsRequest(properties); + TeamStatusEnum.create = function create(properties) { + return new TeamStatusEnum(properties); }; /** - * Encodes the specified ListReportsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * Encodes the specified TeamStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.TeamStatusEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static - * @param {google.ads.admanager.v1.IListReportsRequest} message ListReportsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITeamStatusEnum} message TeamStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReportsRequest.encode = function encode(message, writer) { + TeamStatusEnum.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified ListReportsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsRequest.verify|verify} messages. + * Encodes the specified TeamStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TeamStatusEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static - * @param {google.ads.admanager.v1.IListReportsRequest} message ListReportsRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITeamStatusEnum} message TeamStatusEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TeamStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReportsRequest message from the specified reader or buffer. + * Decodes a TeamStatusEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + * @returns {google.ads.admanager.v1.TeamStatusEnum} TeamStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReportsRequest.decode = function decode(reader, length, error) { + TeamStatusEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListReportsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TeamStatusEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; - } - case 6: { - message.skip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -63350,166 +113857,124 @@ }; /** - * Decodes a ListReportsRequest message from the specified reader or buffer, length delimited. + * Decodes a TeamStatusEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + * @returns {google.ads.admanager.v1.TeamStatusEnum} TeamStatusEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReportsRequest.decodeDelimited = function decodeDelimited(reader) { + TeamStatusEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReportsRequest message. + * Verifies a TeamStatusEnum message. * @function verify - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReportsRequest.verify = function verify(message) { + TeamStatusEnum.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; return null; }; /** - * Creates a ListReportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TeamStatusEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListReportsRequest} ListReportsRequest + * @returns {google.ads.admanager.v1.TeamStatusEnum} TeamStatusEnum */ - ListReportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListReportsRequest) + TeamStatusEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TeamStatusEnum) return object; - var message = new $root.google.ads.admanager.v1.ListReportsRequest(); - 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.skip != null) - message.skip = object.skip | 0; - return message; + return new $root.google.ads.admanager.v1.TeamStatusEnum(); }; /** - * Creates a plain object from a ListReportsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TeamStatusEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static - * @param {google.ads.admanager.v1.ListReportsRequest} message ListReportsRequest + * @param {google.ads.admanager.v1.TeamStatusEnum} message TeamStatusEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReportsRequest.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.skip = 0; - } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; - return object; + TeamStatusEnum.toObject = function toObject() { + return {}; }; /** - * Converts this ListReportsRequest to JSON. + * Converts this TeamStatusEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @instance * @returns {Object.} JSON object */ - ListReportsRequest.prototype.toJSON = function toJSON() { + TeamStatusEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReportsRequest + * Gets the default type url for TeamStatusEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListReportsRequest + * @memberof google.ads.admanager.v1.TeamStatusEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TeamStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListReportsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.TeamStatusEnum"; }; - return ListReportsRequest; + /** + * TeamStatus enum. + * @name google.ads.admanager.v1.TeamStatusEnum.TeamStatus + * @enum {number} + * @property {number} TEAM_STATUS_UNSPECIFIED=0 TEAM_STATUS_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + TeamStatusEnum.TeamStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEAM_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + return TeamStatusEnum; })(); - v1.ListReportsResponse = (function() { + v1.TeamAccessTypeEnum = (function() { /** - * Properties of a ListReportsResponse. + * Properties of a TeamAccessTypeEnum. * @memberof google.ads.admanager.v1 - * @interface IListReportsResponse - * @property {Array.|null} [reports] ListReportsResponse reports - * @property {string|null} [nextPageToken] ListReportsResponse nextPageToken - * @property {number|null} [totalSize] ListReportsResponse totalSize + * @interface ITeamAccessTypeEnum */ /** - * Constructs a new ListReportsResponse. + * Constructs a new TeamAccessTypeEnum. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListReportsResponse. - * @implements IListReportsResponse + * @classdesc Represents a TeamAccessTypeEnum. + * @implements ITeamAccessTypeEnum * @constructor - * @param {google.ads.admanager.v1.IListReportsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITeamAccessTypeEnum=} [properties] Properties to set */ - function ListReportsResponse(properties) { - this.reports = []; + function TeamAccessTypeEnum(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63517,110 +113982,65 @@ } /** - * ListReportsResponse reports. - * @member {Array.} reports - * @memberof google.ads.admanager.v1.ListReportsResponse - * @instance - */ - ListReportsResponse.prototype.reports = $util.emptyArray; - - /** - * ListReportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListReportsResponse - * @instance - */ - ListReportsResponse.prototype.nextPageToken = ""; - - /** - * ListReportsResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListReportsResponse - * @instance - */ - ListReportsResponse.prototype.totalSize = 0; - - /** - * Creates a new ListReportsResponse instance using the specified properties. + * Creates a new TeamAccessTypeEnum instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static - * @param {google.ads.admanager.v1.IListReportsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse instance + * @param {google.ads.admanager.v1.ITeamAccessTypeEnum=} [properties] Properties to set + * @returns {google.ads.admanager.v1.TeamAccessTypeEnum} TeamAccessTypeEnum instance */ - ListReportsResponse.create = function create(properties) { - return new ListReportsResponse(properties); + TeamAccessTypeEnum.create = function create(properties) { + return new TeamAccessTypeEnum(properties); }; /** - * Encodes the specified ListReportsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * Encodes the specified TeamAccessTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TeamAccessTypeEnum.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static - * @param {google.ads.admanager.v1.IListReportsResponse} message ListReportsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ITeamAccessTypeEnum} message TeamAccessTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReportsResponse.encode = function encode(message, writer) { + TeamAccessTypeEnum.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.reports != null && message.reports.length) - for (var i = 0; i < message.reports.length; ++i) - $root.google.ads.admanager.v1.Report.encode(message.reports[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListReportsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListReportsResponse.verify|verify} messages. + * Encodes the specified TeamAccessTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TeamAccessTypeEnum.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static - * @param {google.ads.admanager.v1.IListReportsResponse} message ListReportsResponse message or plain object to encode + * @param {google.ads.admanager.v1.ITeamAccessTypeEnum} message TeamAccessTypeEnum message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TeamAccessTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReportsResponse message from the specified reader or buffer. + * Decodes a TeamAccessTypeEnum message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + * @returns {google.ads.admanager.v1.TeamAccessTypeEnum} TeamAccessTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReportsResponse.decode = function decode(reader, length, error) { + TeamAccessTypeEnum.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListReportsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TeamAccessTypeEnum(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.reports && message.reports.length)) - message.reports = []; - message.reports.push($root.google.ads.admanager.v1.Report.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -63630,158 +114050,133 @@ }; /** - * Decodes a ListReportsResponse message from the specified reader or buffer, length delimited. + * Decodes a TeamAccessTypeEnum message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + * @returns {google.ads.admanager.v1.TeamAccessTypeEnum} TeamAccessTypeEnum * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReportsResponse.decodeDelimited = function decodeDelimited(reader) { + TeamAccessTypeEnum.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReportsResponse message. + * Verifies a TeamAccessTypeEnum message. * @function verify - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReportsResponse.verify = function verify(message) { + TeamAccessTypeEnum.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reports != null && message.hasOwnProperty("reports")) { - if (!Array.isArray(message.reports)) - return "reports: array expected"; - for (var i = 0; i < message.reports.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.verify(message.reports[i]); - if (error) - return "reports." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListReportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TeamAccessTypeEnum message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListReportsResponse} ListReportsResponse + * @returns {google.ads.admanager.v1.TeamAccessTypeEnum} TeamAccessTypeEnum */ - ListReportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListReportsResponse) + TeamAccessTypeEnum.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.TeamAccessTypeEnum) return object; - var message = new $root.google.ads.admanager.v1.ListReportsResponse(); - if (object.reports) { - if (!Array.isArray(object.reports)) - throw TypeError(".google.ads.admanager.v1.ListReportsResponse.reports: array expected"); - message.reports = []; - for (var i = 0; i < object.reports.length; ++i) { - if (typeof object.reports[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListReportsResponse.reports: object expected"); - message.reports[i] = $root.google.ads.admanager.v1.Report.fromObject(object.reports[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; - return message; + return new $root.google.ads.admanager.v1.TeamAccessTypeEnum(); }; /** - * Creates a plain object from a ListReportsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TeamAccessTypeEnum message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static - * @param {google.ads.admanager.v1.ListReportsResponse} message ListReportsResponse + * @param {google.ads.admanager.v1.TeamAccessTypeEnum} message TeamAccessTypeEnum * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.reports = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.reports && message.reports.length) { - object.reports = []; - for (var j = 0; j < message.reports.length; ++j) - object.reports[j] = $root.google.ads.admanager.v1.Report.toObject(message.reports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; + TeamAccessTypeEnum.toObject = function toObject() { + return {}; }; /** - * Converts this ListReportsResponse to JSON. + * Converts this TeamAccessTypeEnum to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @instance * @returns {Object.} JSON object */ - ListReportsResponse.prototype.toJSON = function toJSON() { + TeamAccessTypeEnum.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReportsResponse + * Gets the default type url for TeamAccessTypeEnum * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListReportsResponse + * @memberof google.ads.admanager.v1.TeamAccessTypeEnum * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TeamAccessTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListReportsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.TeamAccessTypeEnum"; }; - return ListReportsResponse; + /** + * TeamAccessType enum. + * @name google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType + * @enum {number} + * @property {number} TEAM_ACCESS_TYPE_UNSPECIFIED=0 TEAM_ACCESS_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} READ_WRITE=3 READ_WRITE value + */ + TeamAccessTypeEnum.TeamAccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEAM_ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "READ_WRITE"] = 3; + return values; + })(); + + return TeamAccessTypeEnum; })(); - v1.CreateReportRequest = (function() { + v1.Team = (function() { /** - * Properties of a CreateReportRequest. + * Properties of a Team. * @memberof google.ads.admanager.v1 - * @interface ICreateReportRequest - * @property {string|null} [parent] CreateReportRequest parent - * @property {google.ads.admanager.v1.IReport|null} [report] CreateReportRequest report + * @interface ITeam + * @property {string|null} [name] Team name + * @property {string|null} [displayName] Team displayName + * @property {string|null} [description] Team description + * @property {google.ads.admanager.v1.TeamStatusEnum.TeamStatus|null} [status] Team status + * @property {boolean|null} [allCompaniesAccess] Team allCompaniesAccess + * @property {boolean|null} [allInventoryAccess] Team allInventoryAccess + * @property {google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|null} [accessType] Team accessType */ /** - * Constructs a new CreateReportRequest. + * Constructs a new Team. * @memberof google.ads.admanager.v1 - * @classdesc Represents a CreateReportRequest. - * @implements ICreateReportRequest + * @classdesc Represents a Team. + * @implements ITeam * @constructor - * @param {google.ads.admanager.v1.ICreateReportRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.ITeam=} [properties] Properties to set */ - function CreateReportRequest(properties) { + function Team(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63789,91 +114184,200 @@ } /** - * CreateReportRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.CreateReportRequest + * Team name. + * @member {string} name + * @memberof google.ads.admanager.v1.Team + * @instance + */ + Team.prototype.name = ""; + + /** + * Team displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.admanager.v1.Team + * @instance + */ + Team.prototype.displayName = null; + + /** + * Team description. + * @member {string|null|undefined} description + * @memberof google.ads.admanager.v1.Team + * @instance + */ + Team.prototype.description = null; + + /** + * Team status. + * @member {google.ads.admanager.v1.TeamStatusEnum.TeamStatus|null|undefined} status + * @memberof google.ads.admanager.v1.Team + * @instance + */ + Team.prototype.status = null; + + /** + * Team allCompaniesAccess. + * @member {boolean|null|undefined} allCompaniesAccess + * @memberof google.ads.admanager.v1.Team * @instance */ - CreateReportRequest.prototype.parent = ""; + Team.prototype.allCompaniesAccess = null; /** - * CreateReportRequest report. - * @member {google.ads.admanager.v1.IReport|null|undefined} report - * @memberof google.ads.admanager.v1.CreateReportRequest + * Team allInventoryAccess. + * @member {boolean|null|undefined} allInventoryAccess + * @memberof google.ads.admanager.v1.Team * @instance */ - CreateReportRequest.prototype.report = null; + Team.prototype.allInventoryAccess = null; /** - * Creates a new CreateReportRequest instance using the specified properties. + * Team accessType. + * @member {google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType|null|undefined} accessType + * @memberof google.ads.admanager.v1.Team + * @instance + */ + Team.prototype.accessType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_allCompaniesAccess", { + get: $util.oneOfGetter($oneOfFields = ["allCompaniesAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_allInventoryAccess", { + get: $util.oneOfGetter($oneOfFields = ["allInventoryAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Team.prototype, "_accessType", { + get: $util.oneOfGetter($oneOfFields = ["accessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Team instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static - * @param {google.ads.admanager.v1.ICreateReportRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest instance + * @param {google.ads.admanager.v1.ITeam=} [properties] Properties to set + * @returns {google.ads.admanager.v1.Team} Team instance */ - CreateReportRequest.create = function create(properties) { - return new CreateReportRequest(properties); + Team.create = function create(properties) { + return new Team(properties); }; /** - * Encodes the specified CreateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * Encodes the specified Team message. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static - * @param {google.ads.admanager.v1.ICreateReportRequest} message CreateReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITeam} message Team message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReportRequest.encode = function encode(message, writer) { + Team.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.report != null && Object.hasOwnProperty.call(message, "report")) - $root.google.ads.admanager.v1.Report.encode(message.report, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.allCompaniesAccess != null && Object.hasOwnProperty.call(message, "allCompaniesAccess")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allCompaniesAccess); + if (message.allInventoryAccess != null && Object.hasOwnProperty.call(message, "allInventoryAccess")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allInventoryAccess); + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.accessType); return writer; }; /** - * Encodes the specified CreateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateReportRequest.verify|verify} messages. + * Encodes the specified Team message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static - * @param {google.ads.admanager.v1.ICreateReportRequest} message CreateReportRequest message or plain object to encode + * @param {google.ads.admanager.v1.ITeam} message Team message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + Team.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateReportRequest message from the specified reader or buffer. + * Decodes a Team message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + * @returns {google.ads.admanager.v1.Team} Team * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReportRequest.decode = function decode(reader, length, error) { + Team.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateReportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Team(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } - case 2: { - message.report = $root.google.ads.admanager.v1.Report.decode(reader, reader.uint32()); + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.allCompaniesAccess = reader.bool(); + break; + } + case 7: { + message.allInventoryAccess = reader.bool(); + break; + } + case 8: { + message.accessType = reader.int32(); break; } default: @@ -63885,377 +114389,547 @@ }; /** - * Decodes a CreateReportRequest message from the specified reader or buffer, length delimited. + * Decodes a Team message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + * @returns {google.ads.admanager.v1.Team} Team * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReportRequest.decodeDelimited = function decodeDelimited(reader) { + Team.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateReportRequest message. + * Verifies a Team message. * @function verify - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateReportRequest.verify = function verify(message) { + Team.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.report != null && message.hasOwnProperty("report")) { - var error = $root.google.ads.admanager.v1.Report.verify(message.report); - if (error) - return "report." + error; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.allCompaniesAccess != null && message.hasOwnProperty("allCompaniesAccess")) { + properties._allCompaniesAccess = 1; + if (typeof message.allCompaniesAccess !== "boolean") + return "allCompaniesAccess: boolean expected"; + } + if (message.allInventoryAccess != null && message.hasOwnProperty("allInventoryAccess")) { + properties._allInventoryAccess = 1; + if (typeof message.allInventoryAccess !== "boolean") + return "allInventoryAccess: boolean expected"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + properties._accessType = 1; + switch (message.accessType) { + default: + return "accessType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } return null; }; /** - * Creates a CreateReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Team message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.CreateReportRequest} CreateReportRequest + * @returns {google.ads.admanager.v1.Team} Team */ - CreateReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.CreateReportRequest) + Team.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.Team) return object; - var message = new $root.google.ads.admanager.v1.CreateReportRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.report != null) { - if (typeof object.report !== "object") - throw TypeError(".google.ads.admanager.v1.CreateReportRequest.report: object expected"); - message.report = $root.google.ads.admanager.v1.Report.fromObject(object.report); + var message = new $root.google.ads.admanager.v1.Team(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "TEAM_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "ACTIVE": + case 1: + message.status = 1; + break; + case "INACTIVE": + case 2: + message.status = 2; + break; + } + if (object.allCompaniesAccess != null) + message.allCompaniesAccess = Boolean(object.allCompaniesAccess); + if (object.allInventoryAccess != null) + message.allInventoryAccess = Boolean(object.allInventoryAccess); + switch (object.accessType) { + default: + if (typeof object.accessType === "number") { + message.accessType = object.accessType; + break; + } + break; + case "TEAM_ACCESS_TYPE_UNSPECIFIED": + case 0: + message.accessType = 0; + break; + case "NONE": + case 1: + message.accessType = 1; + break; + case "READ_ONLY": + case 2: + message.accessType = 2; + break; + case "READ_WRITE": + case 3: + message.accessType = 3; + break; } return message; }; /** - * Creates a plain object from a CreateReportRequest message. Also converts values to other types if specified. + * Creates a plain object from a Team message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static - * @param {google.ads.admanager.v1.CreateReportRequest} message CreateReportRequest + * @param {google.ads.admanager.v1.Team} message Team * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateReportRequest.toObject = function toObject(message, options) { + Team.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.report = null; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.admanager.v1.TeamStatusEnum.TeamStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.TeamStatusEnum.TeamStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.allCompaniesAccess != null && message.hasOwnProperty("allCompaniesAccess")) { + object.allCompaniesAccess = message.allCompaniesAccess; + if (options.oneofs) + object._allCompaniesAccess = "allCompaniesAccess"; + } + if (message.allInventoryAccess != null && message.hasOwnProperty("allInventoryAccess")) { + object.allInventoryAccess = message.allInventoryAccess; + if (options.oneofs) + object._allInventoryAccess = "allInventoryAccess"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + object.accessType = options.enums === String ? $root.google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType[message.accessType] === undefined ? message.accessType : $root.google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType[message.accessType] : message.accessType; + if (options.oneofs) + object._accessType = "accessType"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.report != null && message.hasOwnProperty("report")) - object.report = $root.google.ads.admanager.v1.Report.toObject(message.report, options); return object; }; /** - * Converts this CreateReportRequest to JSON. + * Converts this Team to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @instance * @returns {Object.} JSON object */ - CreateReportRequest.prototype.toJSON = function toJSON() { + Team.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateReportRequest + * Gets the default type url for Team * @function getTypeUrl - * @memberof google.ads.admanager.v1.CreateReportRequest + * @memberof google.ads.admanager.v1.Team * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Team.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.CreateReportRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.Team"; }; - return CreateReportRequest; + return Team; })(); - v1.UpdateReportRequest = (function() { + v1.TeamService = (function() { /** - * Properties of an UpdateReportRequest. + * Constructs a new TeamService service. * @memberof google.ads.admanager.v1 - * @interface IUpdateReportRequest - * @property {google.ads.admanager.v1.IReport|null} [report] UpdateReportRequest report - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReportRequest updateMask + * @classdesc Represents a TeamService + * @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 TeamService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TeamService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TeamService; /** - * Constructs a new UpdateReportRequest. - * @memberof google.ads.admanager.v1 - * @classdesc Represents an UpdateReportRequest. - * @implements IUpdateReportRequest - * @constructor - * @param {google.ads.admanager.v1.IUpdateReportRequest=} [properties] Properties to set + * Creates new TeamService service using the specified rpc implementation. + * @function create + * @memberof google.ads.admanager.v1.TeamService + * @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 {TeamService} RPC service. Useful where requests and/or responses are streamed. */ - function UpdateReportRequest(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]]; - } + TeamService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateReportRequest report. - * @member {google.ads.admanager.v1.IReport|null|undefined} report - * @memberof google.ads.admanager.v1.UpdateReportRequest + * Callback as used by {@link google.ads.admanager.v1.TeamService|getTeam}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef GetTeamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Team} [response] Team + */ + + /** + * Calls GetTeam. + * @function getTeam + * @memberof google.ads.admanager.v1.TeamService * @instance + * @param {google.ads.admanager.v1.IGetTeamRequest} request GetTeamRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.GetTeamCallback} callback Node-style callback called with the error, if any, and Team + * @returns {undefined} + * @variation 1 */ - UpdateReportRequest.prototype.report = null; + Object.defineProperty(TeamService.prototype.getTeam = function getTeam(request, callback) { + return this.rpcCall(getTeam, $root.google.ads.admanager.v1.GetTeamRequest, $root.google.ads.admanager.v1.Team, request, callback); + }, "name", { value: "GetTeam" }); /** - * UpdateReportRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.admanager.v1.UpdateReportRequest + * Calls GetTeam. + * @function getTeam + * @memberof google.ads.admanager.v1.TeamService * @instance + * @param {google.ads.admanager.v1.IGetTeamRequest} request GetTeamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateReportRequest.prototype.updateMask = null; /** - * Creates a new UpdateReportRequest instance using the specified properties. - * @function create - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {google.ads.admanager.v1.IUpdateReportRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest instance + * Callback as used by {@link google.ads.admanager.v1.TeamService|listTeams}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef ListTeamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.ListTeamsResponse} [response] ListTeamsResponse */ - UpdateReportRequest.create = function create(properties) { - return new UpdateReportRequest(properties); - }; /** - * Encodes the specified UpdateReportRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {google.ads.admanager.v1.IUpdateReportRequest} message UpdateReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListTeams. + * @function listTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IListTeamsRequest} request ListTeamsRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.ListTeamsCallback} callback Node-style callback called with the error, if any, and ListTeamsResponse + * @returns {undefined} + * @variation 1 */ - UpdateReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.report != null && Object.hasOwnProperty.call(message, "report")) - $root.google.ads.admanager.v1.Report.encode(message.report, 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; - }; + Object.defineProperty(TeamService.prototype.listTeams = function listTeams(request, callback) { + return this.rpcCall(listTeams, $root.google.ads.admanager.v1.ListTeamsRequest, $root.google.ads.admanager.v1.ListTeamsResponse, request, callback); + }, "name", { value: "ListTeams" }); /** - * Encodes the specified UpdateReportRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {google.ads.admanager.v1.IUpdateReportRequest} message UpdateReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListTeams. + * @function listTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IListTeamsRequest} request ListTeamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an UpdateReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest - * @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.ads.admanager.v1.TeamService|createTeam}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef CreateTeamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Team} [response] Team */ - UpdateReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.report = $root.google.ads.admanager.v1.Report.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateTeam. + * @function createTeam + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.ICreateTeamRequest} request CreateTeamRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.CreateTeamCallback} callback Node-style callback called with the error, if any, and Team + * @returns {undefined} + * @variation 1 */ - UpdateReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(TeamService.prototype.createTeam = function createTeam(request, callback) { + return this.rpcCall(createTeam, $root.google.ads.admanager.v1.CreateTeamRequest, $root.google.ads.admanager.v1.Team, request, callback); + }, "name", { value: "CreateTeam" }); /** - * Verifies an UpdateReportRequest message. - * @function verify - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateTeam. + * @function createTeam + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.ICreateTeamRequest} request CreateTeamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.report != null && message.hasOwnProperty("report")) { - var error = $root.google.ads.admanager.v1.Report.verify(message.report); - if (error) - return "report." + 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 an UpdateReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.UpdateReportRequest} UpdateReportRequest + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchCreateTeams}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef BatchCreateTeamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchCreateTeamsResponse} [response] BatchCreateTeamsResponse + */ + + /** + * Calls BatchCreateTeams. + * @function batchCreateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest} request BatchCreateTeamsRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.BatchCreateTeamsCallback} callback Node-style callback called with the error, if any, and BatchCreateTeamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TeamService.prototype.batchCreateTeams = function batchCreateTeams(request, callback) { + return this.rpcCall(batchCreateTeams, $root.google.ads.admanager.v1.BatchCreateTeamsRequest, $root.google.ads.admanager.v1.BatchCreateTeamsResponse, request, callback); + }, "name", { value: "BatchCreateTeams" }); + + /** + * Calls BatchCreateTeams. + * @function batchCreateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest} request BatchCreateTeamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.TeamService|updateTeam}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef UpdateTeamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.Team} [response] Team + */ + + /** + * Calls UpdateTeam. + * @function updateTeam + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IUpdateTeamRequest} request UpdateTeamRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.UpdateTeamCallback} callback Node-style callback called with the error, if any, and Team + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TeamService.prototype.updateTeam = function updateTeam(request, callback) { + return this.rpcCall(updateTeam, $root.google.ads.admanager.v1.UpdateTeamRequest, $root.google.ads.admanager.v1.Team, request, callback); + }, "name", { value: "UpdateTeam" }); + + /** + * Calls UpdateTeam. + * @function updateTeam + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IUpdateTeamRequest} request UpdateTeamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchUpdateTeams}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef BatchUpdateTeamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchUpdateTeamsResponse} [response] BatchUpdateTeamsResponse + */ + + /** + * Calls BatchUpdateTeams. + * @function batchUpdateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest} request BatchUpdateTeamsRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.BatchUpdateTeamsCallback} callback Node-style callback called with the error, if any, and BatchUpdateTeamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TeamService.prototype.batchUpdateTeams = function batchUpdateTeams(request, callback) { + return this.rpcCall(batchUpdateTeams, $root.google.ads.admanager.v1.BatchUpdateTeamsRequest, $root.google.ads.admanager.v1.BatchUpdateTeamsResponse, request, callback); + }, "name", { value: "BatchUpdateTeams" }); + + /** + * Calls BatchUpdateTeams. + * @function batchUpdateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest} request BatchUpdateTeamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchActivateTeams}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef BatchActivateTeamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchActivateTeamsResponse} [response] BatchActivateTeamsResponse + */ + + /** + * Calls BatchActivateTeams. + * @function batchActivateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest} request BatchActivateTeamsRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.BatchActivateTeamsCallback} callback Node-style callback called with the error, if any, and BatchActivateTeamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TeamService.prototype.batchActivateTeams = function batchActivateTeams(request, callback) { + return this.rpcCall(batchActivateTeams, $root.google.ads.admanager.v1.BatchActivateTeamsRequest, $root.google.ads.admanager.v1.BatchActivateTeamsResponse, request, callback); + }, "name", { value: "BatchActivateTeams" }); + + /** + * Calls BatchActivateTeams. + * @function batchActivateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest} request BatchActivateTeamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.UpdateReportRequest) - return object; - var message = new $root.google.ads.admanager.v1.UpdateReportRequest(); - if (object.report != null) { - if (typeof object.report !== "object") - throw TypeError(".google.ads.admanager.v1.UpdateReportRequest.report: object expected"); - message.report = $root.google.ads.admanager.v1.Report.fromObject(object.report); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.admanager.v1.UpdateReportRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; /** - * Creates a plain object from an UpdateReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {google.ads.admanager.v1.UpdateReportRequest} message UpdateReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.ads.admanager.v1.TeamService|batchDeactivateTeams}. + * @memberof google.ads.admanager.v1.TeamService + * @typedef BatchDeactivateTeamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.admanager.v1.BatchDeactivateTeamsResponse} [response] BatchDeactivateTeamsResponse */ - UpdateReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.report = null; - object.updateMask = null; - } - if (message.report != null && message.hasOwnProperty("report")) - object.report = $root.google.ads.admanager.v1.Report.toObject(message.report, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; /** - * Converts this UpdateReportRequest to JSON. - * @function toJSON - * @memberof google.ads.admanager.v1.UpdateReportRequest + * Calls BatchDeactivateTeams. + * @function batchDeactivateTeams + * @memberof google.ads.admanager.v1.TeamService * @instance - * @returns {Object.} JSON object + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest} request BatchDeactivateTeamsRequest message or plain object + * @param {google.ads.admanager.v1.TeamService.BatchDeactivateTeamsCallback} callback Node-style callback called with the error, if any, and BatchDeactivateTeamsResponse + * @returns {undefined} + * @variation 1 */ - UpdateReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(TeamService.prototype.batchDeactivateTeams = function batchDeactivateTeams(request, callback) { + return this.rpcCall(batchDeactivateTeams, $root.google.ads.admanager.v1.BatchDeactivateTeamsRequest, $root.google.ads.admanager.v1.BatchDeactivateTeamsResponse, request, callback); + }, "name", { value: "BatchDeactivateTeams" }); /** - * Gets the default type url for UpdateReportRequest - * @function getTypeUrl - * @memberof google.ads.admanager.v1.UpdateReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls BatchDeactivateTeams. + * @function batchDeactivateTeams + * @memberof google.ads.admanager.v1.TeamService + * @instance + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest} request BatchDeactivateTeamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.admanager.v1.UpdateReportRequest"; - }; - return UpdateReportRequest; + return TeamService; })(); - v1.FetchReportResultRowsRequest = (function() { + v1.GetTeamRequest = (function() { /** - * Properties of a FetchReportResultRowsRequest. + * Properties of a GetTeamRequest. * @memberof google.ads.admanager.v1 - * @interface IFetchReportResultRowsRequest - * @property {string|null} [name] FetchReportResultRowsRequest name - * @property {number|null} [pageSize] FetchReportResultRowsRequest pageSize - * @property {string|null} [pageToken] FetchReportResultRowsRequest pageToken + * @interface IGetTeamRequest + * @property {string|null} [name] GetTeamRequest name */ /** - * Constructs a new FetchReportResultRowsRequest. + * Constructs a new GetTeamRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a FetchReportResultRowsRequest. - * @implements IFetchReportResultRowsRequest + * @classdesc Represents a GetTeamRequest. + * @implements IGetTeamRequest * @constructor - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IGetTeamRequest=} [properties] Properties to set */ - function FetchReportResultRowsRequest(properties) { + function GetTeamRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64263,90 +114937,70 @@ } /** - * FetchReportResultRowsRequest name. + * GetTeamRequest name. * @member {string} name - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest - * @instance - */ - FetchReportResultRowsRequest.prototype.name = ""; - - /** - * FetchReportResultRowsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest - * @instance - */ - FetchReportResultRowsRequest.prototype.pageSize = 0; - - /** - * FetchReportResultRowsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @instance */ - FetchReportResultRowsRequest.prototype.pageToken = ""; + GetTeamRequest.prototype.name = ""; /** - * Creates a new FetchReportResultRowsRequest instance using the specified properties. + * Creates a new GetTeamRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest instance + * @param {google.ads.admanager.v1.IGetTeamRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.GetTeamRequest} GetTeamRequest instance */ - FetchReportResultRowsRequest.create = function create(properties) { - return new FetchReportResultRowsRequest(properties); + GetTeamRequest.create = function create(properties) { + return new GetTeamRequest(properties); }; /** - * Encodes the specified FetchReportResultRowsRequest message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * Encodes the specified GetTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTeamRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} message FetchReportResultRowsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetTeamRequest} message GetTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchReportResultRowsRequest.encode = function encode(message, writer) { + GetTeamRequest.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.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 FetchReportResultRowsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsRequest.verify|verify} messages. + * Encodes the specified GetTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTeamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsRequest} message FetchReportResultRowsRequest message or plain object to encode + * @param {google.ads.admanager.v1.IGetTeamRequest} message GetTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchReportResultRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTeamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer. + * Decodes a GetTeamRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + * @returns {google.ads.admanager.v1.GetTeamRequest} GetTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchReportResultRowsRequest.decode = function decode(reader, length, error) { + GetTeamRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FetchReportResultRowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetTeamRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -64356,14 +115010,6 @@ message.name = reader.string(); break; } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -64373,147 +115019,127 @@ }; /** - * Decodes a FetchReportResultRowsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTeamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + * @returns {google.ads.admanager.v1.GetTeamRequest} GetTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchReportResultRowsRequest.decodeDelimited = function decodeDelimited(reader) { + GetTeamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchReportResultRowsRequest message. + * Verifies a GetTeamRequest message. * @function verify - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchReportResultRowsRequest.verify = function verify(message) { + GetTeamRequest.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.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 FetchReportResultRowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTeamRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.FetchReportResultRowsRequest} FetchReportResultRowsRequest + * @returns {google.ads.admanager.v1.GetTeamRequest} GetTeamRequest */ - FetchReportResultRowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.FetchReportResultRowsRequest) + GetTeamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.GetTeamRequest) return object; - var message = new $root.google.ads.admanager.v1.FetchReportResultRowsRequest(); + var message = new $root.google.ads.admanager.v1.GetTeamRequest(); if (object.name != null) message.name = String(object.name); - 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 FetchReportResultRowsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTeamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static - * @param {google.ads.admanager.v1.FetchReportResultRowsRequest} message FetchReportResultRowsRequest + * @param {google.ads.admanager.v1.GetTeamRequest} message GetTeamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchReportResultRowsRequest.toObject = function toObject(message, options) { + GetTeamRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - 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 FetchReportResultRowsRequest to JSON. + * Converts this GetTeamRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @instance * @returns {Object.} JSON object */ - FetchReportResultRowsRequest.prototype.toJSON = function toJSON() { + GetTeamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchReportResultRowsRequest + * Gets the default type url for GetTeamRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.FetchReportResultRowsRequest + * @memberof google.ads.admanager.v1.GetTeamRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchReportResultRowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTeamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.FetchReportResultRowsRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.GetTeamRequest"; }; - return FetchReportResultRowsRequest; + return GetTeamRequest; })(); - v1.FetchReportResultRowsResponse = (function() { + v1.ListTeamsRequest = (function() { /** - * Properties of a FetchReportResultRowsResponse. + * Properties of a ListTeamsRequest. * @memberof google.ads.admanager.v1 - * @interface IFetchReportResultRowsResponse - * @property {Array.|null} [rows] FetchReportResultRowsResponse rows - * @property {google.protobuf.ITimestamp|null} [runTime] FetchReportResultRowsResponse runTime - * @property {Array.|null} [dateRanges] FetchReportResultRowsResponse dateRanges - * @property {Array.|null} [comparisonDateRanges] FetchReportResultRowsResponse comparisonDateRanges - * @property {number|null} [totalRowCount] FetchReportResultRowsResponse totalRowCount - * @property {string|null} [nextPageToken] FetchReportResultRowsResponse nextPageToken + * @interface IListTeamsRequest + * @property {string|null} [parent] ListTeamsRequest parent + * @property {number|null} [pageSize] ListTeamsRequest pageSize + * @property {string|null} [pageToken] ListTeamsRequest pageToken + * @property {string|null} [filter] ListTeamsRequest filter + * @property {string|null} [orderBy] ListTeamsRequest orderBy + * @property {number|null} [skip] ListTeamsRequest skip */ /** - * Constructs a new FetchReportResultRowsResponse. + * Constructs a new ListTeamsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a FetchReportResultRowsResponse. - * @implements IFetchReportResultRowsResponse + * @classdesc Represents a ListTeamsRequest. + * @implements IListTeamsRequest * @constructor - * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListTeamsRequest=} [properties] Properties to set */ - function FetchReportResultRowsResponse(properties) { - this.rows = []; - this.dateRanges = []; - this.comparisonDateRanges = []; + function ListTeamsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64521,156 +115147,147 @@ } /** - * FetchReportResultRowsResponse rows. - * @member {Array.} rows - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.rows = $util.emptyArray; + ListTeamsRequest.prototype.parent = ""; /** - * FetchReportResultRowsResponse runTime. - * @member {google.protobuf.ITimestamp|null|undefined} runTime - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.runTime = null; + ListTeamsRequest.prototype.pageSize = 0; /** - * FetchReportResultRowsResponse dateRanges. - * @member {Array.} dateRanges - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.dateRanges = $util.emptyArray; + ListTeamsRequest.prototype.pageToken = ""; /** - * FetchReportResultRowsResponse comparisonDateRanges. - * @member {Array.} comparisonDateRanges - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest filter. + * @member {string} filter + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.comparisonDateRanges = $util.emptyArray; + ListTeamsRequest.prototype.filter = ""; /** - * FetchReportResultRowsResponse totalRowCount. - * @member {number} totalRowCount - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest orderBy. + * @member {string} orderBy + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.totalRowCount = 0; + ListTeamsRequest.prototype.orderBy = ""; /** - * FetchReportResultRowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * ListTeamsRequest skip. + * @member {number} skip + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance */ - FetchReportResultRowsResponse.prototype.nextPageToken = ""; + ListTeamsRequest.prototype.skip = 0; /** - * Creates a new FetchReportResultRowsResponse instance using the specified properties. + * Creates a new ListTeamsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse instance + * @param {google.ads.admanager.v1.IListTeamsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListTeamsRequest} ListTeamsRequest instance */ - FetchReportResultRowsResponse.create = function create(properties) { - return new FetchReportResultRowsResponse(properties); + ListTeamsRequest.create = function create(properties) { + return new ListTeamsRequest(properties); }; /** - * Encodes the specified FetchReportResultRowsResponse message. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * Encodes the specified ListTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTeamsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse} message FetchReportResultRowsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListTeamsRequest} message ListTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchReportResultRowsResponse.encode = function encode(message, writer) { + ListTeamsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.ads.admanager.v1.Report.DataTable.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.runTime != null && Object.hasOwnProperty.call(message, "runTime")) - $root.google.protobuf.Timestamp.encode(message.runTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.encode(message.dateRanges[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.comparisonDateRanges != null && message.comparisonDateRanges.length) - for (var i = 0; i < message.comparisonDateRanges.length; ++i) - $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.encode(message.comparisonDateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalRowCount); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.nextPageToken); + 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.skip != null && Object.hasOwnProperty.call(message, "skip")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified FetchReportResultRowsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.FetchReportResultRowsResponse.verify|verify} messages. + * Encodes the specified ListTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTeamsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static - * @param {google.ads.admanager.v1.IFetchReportResultRowsResponse} message FetchReportResultRowsResponse message or plain object to encode + * @param {google.ads.admanager.v1.IListTeamsRequest} message ListTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchReportResultRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer. + * Decodes a ListTeamsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + * @returns {google.ads.admanager.v1.ListTeamsRequest} ListTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchReportResultRowsResponse.decode = function decode(reader, length, error) { + ListTeamsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.FetchReportResultRowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTeamsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.ads.admanager.v1.Report.DataTable.Row.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.runTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.decode(reader, reader.uint32())); + message.pageToken = reader.string(); break; } case 4: { - if (!(message.comparisonDateRanges && message.comparisonDateRanges.length)) - message.comparisonDateRanges = []; - message.comparisonDateRanges.push($root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.decode(reader, reader.uint32())); + message.filter = reader.string(); break; } case 5: { - message.totalRowCount = reader.int32(); + message.orderBy = reader.string(); break; } case 6: { - message.nextPageToken = reader.string(); + message.skip = reader.int32(); break; } default: @@ -64682,220 +115299,166 @@ }; /** - * Decodes a FetchReportResultRowsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTeamsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + * @returns {google.ads.admanager.v1.ListTeamsRequest} ListTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchReportResultRowsResponse.decodeDelimited = function decodeDelimited(reader) { + ListTeamsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchReportResultRowsResponse message. + * Verifies a ListTeamsRequest message. * @function verify - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchReportResultRowsResponse.verify = function verify(message) { + ListTeamsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.DataTable.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.runTime != null && message.hasOwnProperty("runTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.runTime); - if (error) - return "runTime." + error; - } - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.comparisonDateRanges != null && message.hasOwnProperty("comparisonDateRanges")) { - if (!Array.isArray(message.comparisonDateRanges)) - return "comparisonDateRanges: array expected"; - for (var i = 0; i < message.comparisonDateRanges.length; ++i) { - var error = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.verify(message.comparisonDateRanges[i]); - if (error) - return "comparisonDateRanges." + error; - } - } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) - if (!$util.isInteger(message.totalRowCount)) - return "totalRowCount: integer expected"; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: 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"; + if (message.skip != null && message.hasOwnProperty("skip")) + if (!$util.isInteger(message.skip)) + return "skip: integer expected"; return null; }; /** - * Creates a FetchReportResultRowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTeamsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.FetchReportResultRowsResponse} FetchReportResultRowsResponse + * @returns {google.ads.admanager.v1.ListTeamsRequest} ListTeamsRequest */ - FetchReportResultRowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.FetchReportResultRowsResponse) + ListTeamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListTeamsRequest) return object; - var message = new $root.google.ads.admanager.v1.FetchReportResultRowsResponse(); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.rows: object expected"); - message.rows[i] = $root.google.ads.admanager.v1.Report.DataTable.Row.fromObject(object.rows[i]); - } - } - if (object.runTime != null) { - if (typeof object.runTime !== "object") - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.runTime: object expected"); - message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); - } - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.dateRanges: object expected"); - message.dateRanges[i] = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.fromObject(object.dateRanges[i]); - } - } - if (object.comparisonDateRanges) { - if (!Array.isArray(object.comparisonDateRanges)) - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.comparisonDateRanges: array expected"); - message.comparisonDateRanges = []; - for (var i = 0; i < object.comparisonDateRanges.length; ++i) { - if (typeof object.comparisonDateRanges[i] !== "object") - throw TypeError(".google.ads.admanager.v1.FetchReportResultRowsResponse.comparisonDateRanges: object expected"); - message.comparisonDateRanges[i] = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.fromObject(object.comparisonDateRanges[i]); - } - } - if (object.totalRowCount != null) - message.totalRowCount = object.totalRowCount | 0; - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.ads.admanager.v1.ListTeamsRequest(); + 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.skip != null) + message.skip = object.skip | 0; return message; }; /** - * Creates a plain object from a FetchReportResultRowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListTeamsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static - * @param {google.ads.admanager.v1.FetchReportResultRowsResponse} message FetchReportResultRowsResponse + * @param {google.ads.admanager.v1.ListTeamsRequest} message ListTeamsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchReportResultRowsResponse.toObject = function toObject(message, options) { + ListTeamsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rows = []; - object.dateRanges = []; - object.comparisonDateRanges = []; - } if (options.defaults) { - object.runTime = null; - object.totalRowCount = 0; - object.nextPageToken = ""; - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.ads.admanager.v1.Report.DataTable.Row.toObject(message.rows[j], options); - } - if (message.runTime != null && message.hasOwnProperty("runTime")) - object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.toObject(message.dateRanges[j], options); - } - if (message.comparisonDateRanges && message.comparisonDateRanges.length) { - object.comparisonDateRanges = []; - for (var j = 0; j < message.comparisonDateRanges.length; ++j) - object.comparisonDateRanges[j] = $root.google.ads.admanager.v1.Report.DateRange.FixedDateRange.toObject(message.comparisonDateRanges[j], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.skip = 0; } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) - object.totalRowCount = message.totalRowCount; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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.skip != null && message.hasOwnProperty("skip")) + object.skip = message.skip; return object; }; /** - * Converts this FetchReportResultRowsResponse to JSON. + * Converts this ListTeamsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @instance * @returns {Object.} JSON object */ - FetchReportResultRowsResponse.prototype.toJSON = function toJSON() { + ListTeamsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchReportResultRowsResponse + * Gets the default type url for ListTeamsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.FetchReportResultRowsResponse + * @memberof google.ads.admanager.v1.ListTeamsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchReportResultRowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTeamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.FetchReportResultRowsResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListTeamsRequest"; }; - return FetchReportResultRowsResponse; + return ListTeamsRequest; })(); - v1.RoleStatusEnum = (function() { + v1.ListTeamsResponse = (function() { /** - * Properties of a RoleStatusEnum. + * Properties of a ListTeamsResponse. * @memberof google.ads.admanager.v1 - * @interface IRoleStatusEnum + * @interface IListTeamsResponse + * @property {Array.|null} [teams] ListTeamsResponse teams + * @property {string|null} [nextPageToken] ListTeamsResponse nextPageToken + * @property {number|null} [totalSize] ListTeamsResponse totalSize */ /** - * Constructs a new RoleStatusEnum. + * Constructs a new ListTeamsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a RoleStatusEnum. - * @implements IRoleStatusEnum + * @classdesc Represents a ListTeamsResponse. + * @implements IListTeamsResponse * @constructor - * @param {google.ads.admanager.v1.IRoleStatusEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IListTeamsResponse=} [properties] Properties to set */ - function RoleStatusEnum(properties) { + function ListTeamsResponse(properties) { + this.teams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64903,65 +115466,110 @@ } /** - * Creates a new RoleStatusEnum instance using the specified properties. + * ListTeamsResponse teams. + * @member {Array.} teams + * @memberof google.ads.admanager.v1.ListTeamsResponse + * @instance + */ + ListTeamsResponse.prototype.teams = $util.emptyArray; + + /** + * ListTeamsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.admanager.v1.ListTeamsResponse + * @instance + */ + ListTeamsResponse.prototype.nextPageToken = ""; + + /** + * ListTeamsResponse totalSize. + * @member {number} totalSize + * @memberof google.ads.admanager.v1.ListTeamsResponse + * @instance + */ + ListTeamsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListTeamsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static - * @param {google.ads.admanager.v1.IRoleStatusEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum instance + * @param {google.ads.admanager.v1.IListTeamsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.ListTeamsResponse} ListTeamsResponse instance */ - RoleStatusEnum.create = function create(properties) { - return new RoleStatusEnum(properties); + ListTeamsResponse.create = function create(properties) { + return new ListTeamsResponse(properties); }; /** - * Encodes the specified RoleStatusEnum message. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * Encodes the specified ListTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTeamsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static - * @param {google.ads.admanager.v1.IRoleStatusEnum} message RoleStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListTeamsResponse} message ListTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoleStatusEnum.encode = function encode(message, writer) { + ListTeamsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.teams != null && message.teams.length) + for (var i = 0; i < message.teams.length; ++i) + $root.google.ads.admanager.v1.Team.encode(message.teams[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified RoleStatusEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.RoleStatusEnum.verify|verify} messages. + * Encodes the specified ListTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTeamsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static - * @param {google.ads.admanager.v1.IRoleStatusEnum} message RoleStatusEnum message or plain object to encode + * @param {google.ads.admanager.v1.IListTeamsResponse} message ListTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoleStatusEnum.encodeDelimited = function encodeDelimited(message, writer) { + ListTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RoleStatusEnum message from the specified reader or buffer. + * Decodes a ListTeamsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + * @returns {google.ads.admanager.v1.ListTeamsResponse} ListTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoleStatusEnum.decode = function decode(reader, length, error) { + ListTeamsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.RoleStatusEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTeamsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.teams && message.teams.length)) + message.teams = []; + message.teams.push($root.google.ads.admanager.v1.Team.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -64971,130 +115579,158 @@ }; /** - * Decodes a RoleStatusEnum message from the specified reader or buffer, length delimited. + * Decodes a ListTeamsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + * @returns {google.ads.admanager.v1.ListTeamsResponse} ListTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoleStatusEnum.decodeDelimited = function decodeDelimited(reader) { + ListTeamsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RoleStatusEnum message. + * Verifies a ListTeamsResponse message. * @function verify - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RoleStatusEnum.verify = function verify(message) { + ListTeamsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.teams != null && message.hasOwnProperty("teams")) { + if (!Array.isArray(message.teams)) + return "teams: array expected"; + for (var i = 0; i < message.teams.length; ++i) { + var error = $root.google.ads.admanager.v1.Team.verify(message.teams[i]); + if (error) + return "teams." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a RoleStatusEnum message from a plain object. Also converts values to their respective internal types. + * Creates a ListTeamsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.RoleStatusEnum} RoleStatusEnum + * @returns {google.ads.admanager.v1.ListTeamsResponse} ListTeamsResponse */ - RoleStatusEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.RoleStatusEnum) + ListTeamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.ListTeamsResponse) return object; - return new $root.google.ads.admanager.v1.RoleStatusEnum(); + var message = new $root.google.ads.admanager.v1.ListTeamsResponse(); + if (object.teams) { + if (!Array.isArray(object.teams)) + throw TypeError(".google.ads.admanager.v1.ListTeamsResponse.teams: array expected"); + message.teams = []; + for (var i = 0; i < object.teams.length; ++i) { + if (typeof object.teams[i] !== "object") + throw TypeError(".google.ads.admanager.v1.ListTeamsResponse.teams: object expected"); + message.teams[i] = $root.google.ads.admanager.v1.Team.fromObject(object.teams[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; }; /** - * Creates a plain object from a RoleStatusEnum message. Also converts values to other types if specified. + * Creates a plain object from a ListTeamsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static - * @param {google.ads.admanager.v1.RoleStatusEnum} message RoleStatusEnum + * @param {google.ads.admanager.v1.ListTeamsResponse} message ListTeamsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoleStatusEnum.toObject = function toObject() { - return {}; + ListTeamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.teams = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.teams && message.teams.length) { + object.teams = []; + for (var j = 0; j < message.teams.length; ++j) + object.teams[j] = $root.google.ads.admanager.v1.Team.toObject(message.teams[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; }; /** - * Converts this RoleStatusEnum to JSON. + * Converts this ListTeamsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @instance * @returns {Object.} JSON object */ - RoleStatusEnum.prototype.toJSON = function toJSON() { + ListTeamsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RoleStatusEnum + * Gets the default type url for ListTeamsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.RoleStatusEnum + * @memberof google.ads.admanager.v1.ListTeamsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RoleStatusEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTeamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.RoleStatusEnum"; + return typeUrlPrefix + "/google.ads.admanager.v1.ListTeamsResponse"; }; - /** - * RoleStatus enum. - * @name google.ads.admanager.v1.RoleStatusEnum.RoleStatus - * @enum {number} - * @property {number} ROLE_STATUS_UNSPECIFIED=0 ROLE_STATUS_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - RoleStatusEnum.RoleStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROLE_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - return RoleStatusEnum; + return ListTeamsResponse; })(); - v1.Role = (function() { + v1.CreateTeamRequest = (function() { /** - * Properties of a Role. + * Properties of a CreateTeamRequest. * @memberof google.ads.admanager.v1 - * @interface IRole - * @property {string|null} [name] Role name - * @property {number|Long|null} [roleId] Role roleId - * @property {string|null} [displayName] Role displayName - * @property {string|null} [description] Role description - * @property {boolean|null} [builtIn] Role builtIn - * @property {google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null} [status] Role status + * @interface ICreateTeamRequest + * @property {string|null} [parent] CreateTeamRequest parent + * @property {google.ads.admanager.v1.ITeam|null} [team] CreateTeamRequest team */ /** - * Constructs a new Role. + * Constructs a new CreateTeamRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Role. - * @implements IRole + * @classdesc Represents a CreateTeamRequest. + * @implements ICreateTeamRequest * @constructor - * @param {google.ads.admanager.v1.IRole=} [properties] Properties to set + * @param {google.ads.admanager.v1.ICreateTeamRequest=} [properties] Properties to set */ - function Role(properties) { + function CreateTeamRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65102,180 +115738,91 @@ } /** - * Role name. - * @member {string} name - * @memberof google.ads.admanager.v1.Role - * @instance - */ - Role.prototype.name = ""; - - /** - * Role roleId. - * @member {number|Long|null|undefined} roleId - * @memberof google.ads.admanager.v1.Role - * @instance - */ - Role.prototype.roleId = null; - - /** - * Role displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.Role - * @instance - */ - Role.prototype.displayName = null; - - /** - * Role description. - * @member {string|null|undefined} description - * @memberof google.ads.admanager.v1.Role - * @instance - */ - Role.prototype.description = null; - - /** - * Role builtIn. - * @member {boolean|null|undefined} builtIn - * @memberof google.ads.admanager.v1.Role + * CreateTeamRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.CreateTeamRequest * @instance */ - Role.prototype.builtIn = null; + CreateTeamRequest.prototype.parent = ""; /** - * Role status. - * @member {google.ads.admanager.v1.RoleStatusEnum.RoleStatus|null|undefined} status - * @memberof google.ads.admanager.v1.Role + * CreateTeamRequest team. + * @member {google.ads.admanager.v1.ITeam|null|undefined} team + * @memberof google.ads.admanager.v1.CreateTeamRequest * @instance */ - Role.prototype.status = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Role.prototype, "_roleId", { - get: $util.oneOfGetter($oneOfFields = ["roleId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Role.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Role.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Role.prototype, "_builtIn", { - get: $util.oneOfGetter($oneOfFields = ["builtIn"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Role.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateTeamRequest.prototype.team = null; /** - * Creates a new Role instance using the specified properties. + * Creates a new CreateTeamRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static - * @param {google.ads.admanager.v1.IRole=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Role} Role instance + * @param {google.ads.admanager.v1.ICreateTeamRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.CreateTeamRequest} CreateTeamRequest instance */ - Role.create = function create(properties) { - return new Role(properties); + CreateTeamRequest.create = function create(properties) { + return new CreateTeamRequest(properties); }; /** - * Encodes the specified Role message. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * Encodes the specified CreateTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.CreateTeamRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static - * @param {google.ads.admanager.v1.IRole} message Role message or plain object to encode + * @param {google.ads.admanager.v1.ICreateTeamRequest} message CreateTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Role.encode = function encode(message, writer) { + CreateTeamRequest.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.roleId != null && Object.hasOwnProperty.call(message, "roleId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.roleId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.builtIn != null && Object.hasOwnProperty.call(message, "builtIn")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.builtIn); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.status); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.team != null && Object.hasOwnProperty.call(message, "team")) + $root.google.ads.admanager.v1.Team.encode(message.team, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Role.verify|verify} messages. + * Encodes the specified CreateTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.CreateTeamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static - * @param {google.ads.admanager.v1.IRole} message Role message or plain object to encode + * @param {google.ads.admanager.v1.ICreateTeamRequest} message CreateTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Role.encodeDelimited = function encodeDelimited(message, writer) { + CreateTeamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Role message from the specified reader or buffer. + * Decodes a CreateTeamRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Role} Role + * @returns {google.ads.admanager.v1.CreateTeamRequest} CreateTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Role.decode = function decode(reader, length, error) { + CreateTeamRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Role(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.CreateTeamRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.roleId = reader.int64(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.builtIn = reader.bool(); - break; - } - case 6: { - message.status = reader.int32(); + message.team = $root.google.ads.admanager.v1.Team.decode(reader, reader.uint32()); break; } default: @@ -65287,318 +115834,138 @@ }; /** - * Decodes a Role message from the specified reader or buffer, length delimited. + * Decodes a CreateTeamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Role} Role + * @returns {google.ads.admanager.v1.CreateTeamRequest} CreateTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Role.decodeDelimited = function decodeDelimited(reader) { + CreateTeamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Role message. + * Verifies a CreateTeamRequest message. * @function verify - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Role.verify = function verify(message) { + CreateTeamRequest.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.roleId != null && message.hasOwnProperty("roleId")) { - properties._roleId = 1; - if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) - return "roleId: integer|Long expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.builtIn != null && message.hasOwnProperty("builtIn")) { - properties._builtIn = 1; - if (typeof message.builtIn !== "boolean") - return "builtIn: boolean expected"; - } - if (message.status != null && message.hasOwnProperty("status")) { - properties._status = 1; - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.team != null && message.hasOwnProperty("team")) { + var error = $root.google.ads.admanager.v1.Team.verify(message.team); + if (error) + return "team." + error; } return null; }; /** - * Creates a Role message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTeamRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Role} Role + * @returns {google.ads.admanager.v1.CreateTeamRequest} CreateTeamRequest */ - Role.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Role) + CreateTeamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.CreateTeamRequest) return object; - var message = new $root.google.ads.admanager.v1.Role(); - if (object.name != null) - message.name = String(object.name); - if (object.roleId != null) - if ($util.Long) - (message.roleId = $util.Long.fromValue(object.roleId)).unsigned = false; - else if (typeof object.roleId === "string") - message.roleId = parseInt(object.roleId, 10); - else if (typeof object.roleId === "number") - message.roleId = object.roleId; - else if (typeof object.roleId === "object") - message.roleId = new $util.LongBits(object.roleId.low >>> 0, object.roleId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.builtIn != null) - message.builtIn = Boolean(object.builtIn); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "ROLE_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "ACTIVE": - case 1: - message.status = 1; - break; - case "INACTIVE": - case 2: - message.status = 2; - break; + var message = new $root.google.ads.admanager.v1.CreateTeamRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.team != null) { + if (typeof object.team !== "object") + throw TypeError(".google.ads.admanager.v1.CreateTeamRequest.team: object expected"); + message.team = $root.google.ads.admanager.v1.Team.fromObject(object.team); } return message; }; /** - * Creates a plain object from a Role message. Also converts values to other types if specified. + * Creates a plain object from a CreateTeamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static - * @param {google.ads.admanager.v1.Role} message Role + * @param {google.ads.admanager.v1.CreateTeamRequest} message CreateTeamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Role.toObject = function toObject(message, options) { + CreateTeamRequest.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 (message.roleId != null && message.hasOwnProperty("roleId")) { - if (typeof message.roleId === "number") - object.roleId = options.longs === String ? String(message.roleId) : message.roleId; - else - object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (options.oneofs) - object._roleId = "roleId"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.builtIn != null && message.hasOwnProperty("builtIn")) { - object.builtIn = message.builtIn; - if (options.oneofs) - object._builtIn = "builtIn"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.admanager.v1.RoleStatusEnum.RoleStatus[message.status] === undefined ? message.status : $root.google.ads.admanager.v1.RoleStatusEnum.RoleStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; + if (options.defaults) { + object.parent = ""; + object.team = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.team != null && message.hasOwnProperty("team")) + object.team = $root.google.ads.admanager.v1.Team.toObject(message.team, options); return object; }; /** - * Converts this Role to JSON. + * Converts this CreateTeamRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @instance * @returns {Object.} JSON object */ - Role.prototype.toJSON = function toJSON() { + CreateTeamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Role + * Gets the default type url for CreateTeamRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.Role + * @memberof google.ads.admanager.v1.CreateTeamRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateTeamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Role"; - }; - - return Role; - })(); - - v1.RoleService = (function() { - - /** - * Constructs a new RoleService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a RoleService - * @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 RoleService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (RoleService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RoleService; - - /** - * Creates new RoleService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.RoleService - * @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 {RoleService} RPC service. Useful where requests and/or responses are streamed. - */ - RoleService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.ads.admanager.v1.CreateTeamRequest"; }; - /** - * Callback as used by {@link google.ads.admanager.v1.RoleService|getRole}. - * @memberof google.ads.admanager.v1.RoleService - * @typedef GetRoleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.Role} [response] Role - */ - - /** - * Calls GetRole. - * @function getRole - * @memberof google.ads.admanager.v1.RoleService - * @instance - * @param {google.ads.admanager.v1.IGetRoleRequest} request GetRoleRequest message or plain object - * @param {google.ads.admanager.v1.RoleService.GetRoleCallback} callback Node-style callback called with the error, if any, and Role - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(RoleService.prototype.getRole = function getRole(request, callback) { - return this.rpcCall(getRole, $root.google.ads.admanager.v1.GetRoleRequest, $root.google.ads.admanager.v1.Role, request, callback); - }, "name", { value: "GetRole" }); - - /** - * Calls GetRole. - * @function getRole - * @memberof google.ads.admanager.v1.RoleService - * @instance - * @param {google.ads.admanager.v1.IGetRoleRequest} request GetRoleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.RoleService|listRoles}. - * @memberof google.ads.admanager.v1.RoleService - * @typedef ListRolesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListRolesResponse} [response] ListRolesResponse - */ - - /** - * Calls ListRoles. - * @function listRoles - * @memberof google.ads.admanager.v1.RoleService - * @instance - * @param {google.ads.admanager.v1.IListRolesRequest} request ListRolesRequest message or plain object - * @param {google.ads.admanager.v1.RoleService.ListRolesCallback} callback Node-style callback called with the error, if any, and ListRolesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(RoleService.prototype.listRoles = function listRoles(request, callback) { - return this.rpcCall(listRoles, $root.google.ads.admanager.v1.ListRolesRequest, $root.google.ads.admanager.v1.ListRolesResponse, request, callback); - }, "name", { value: "ListRoles" }); - - /** - * Calls ListRoles. - * @function listRoles - * @memberof google.ads.admanager.v1.RoleService - * @instance - * @param {google.ads.admanager.v1.IListRolesRequest} request ListRolesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return RoleService; + return CreateTeamRequest; })(); - v1.GetRoleRequest = (function() { + v1.BatchCreateTeamsRequest = (function() { /** - * Properties of a GetRoleRequest. + * Properties of a BatchCreateTeamsRequest. * @memberof google.ads.admanager.v1 - * @interface IGetRoleRequest - * @property {string|null} [name] GetRoleRequest name + * @interface IBatchCreateTeamsRequest + * @property {string|null} [parent] BatchCreateTeamsRequest parent + * @property {Array.|null} [requests] BatchCreateTeamsRequest requests */ /** - * Constructs a new GetRoleRequest. + * Constructs a new BatchCreateTeamsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetRoleRequest. - * @implements IGetRoleRequest + * @classdesc Represents a BatchCreateTeamsRequest. + * @implements IBatchCreateTeamsRequest * @constructor - * @param {google.ads.admanager.v1.IGetRoleRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest=} [properties] Properties to set */ - function GetRoleRequest(properties) { + function BatchCreateTeamsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65606,77 +115973,94 @@ } /** - * GetRoleRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetRoleRequest + * BatchCreateTeamsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @instance */ - GetRoleRequest.prototype.name = ""; + BatchCreateTeamsRequest.prototype.parent = ""; /** - * Creates a new GetRoleRequest instance using the specified properties. + * BatchCreateTeamsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest + * @instance + */ + BatchCreateTeamsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateTeamsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetRoleRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest instance + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateTeamsRequest} BatchCreateTeamsRequest instance */ - GetRoleRequest.create = function create(properties) { - return new GetRoleRequest(properties); + BatchCreateTeamsRequest.create = function create(properties) { + return new BatchCreateTeamsRequest(properties); }; /** - * Encodes the specified GetRoleRequest message. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * Encodes the specified BatchCreateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetRoleRequest} message GetRoleRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest} message BatchCreateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoleRequest.encode = function encode(message, writer) { + BatchCreateTeamsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.CreateTeamRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRoleRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetRoleRequest.verify|verify} messages. + * Encodes the specified BatchCreateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetRoleRequest} message GetRoleRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateTeamsRequest} message BatchCreateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRoleRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRoleRequest message from the specified reader or buffer. + * Decodes a BatchCreateTeamsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsRequest} BatchCreateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoleRequest.decode = function decode(reader, length, error) { + BatchCreateTeamsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetRoleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateTeamsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.CreateTeamRequest.decode(reader, reader.uint32())); break; } default: @@ -65688,127 +116072,149 @@ }; /** - * Decodes a GetRoleRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateTeamsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsRequest} BatchCreateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRoleRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateTeamsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRoleRequest message. + * Verifies a BatchCreateTeamsRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRoleRequest.verify = function verify(message) { + BatchCreateTeamsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.CreateTeamRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } return null; }; /** - * Creates a GetRoleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetRoleRequest} GetRoleRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsRequest} BatchCreateTeamsRequest */ - GetRoleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetRoleRequest) + BatchCreateTeamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateTeamsRequest) return object; - var message = new $root.google.ads.admanager.v1.GetRoleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.BatchCreateTeamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchCreateTeamsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateTeamsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.CreateTeamRequest.fromObject(object.requests[i]); + } + } return message; }; /** - * Creates a plain object from a GetRoleRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateTeamsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static - * @param {google.ads.admanager.v1.GetRoleRequest} message GetRoleRequest + * @param {google.ads.admanager.v1.BatchCreateTeamsRequest} message BatchCreateTeamsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRoleRequest.toObject = function toObject(message, options) { + BatchCreateTeamsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.requests = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.CreateTeamRequest.toObject(message.requests[j], options); + } return object; }; /** - * Converts this GetRoleRequest to JSON. + * Converts this BatchCreateTeamsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @instance * @returns {Object.} JSON object */ - GetRoleRequest.prototype.toJSON = function toJSON() { + BatchCreateTeamsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetRoleRequest + * Gets the default type url for BatchCreateTeamsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetRoleRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetRoleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateTeamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetRoleRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateTeamsRequest"; }; - return GetRoleRequest; + return BatchCreateTeamsRequest; })(); - v1.ListRolesRequest = (function() { + v1.BatchCreateTeamsResponse = (function() { /** - * Properties of a ListRolesRequest. + * Properties of a BatchCreateTeamsResponse. * @memberof google.ads.admanager.v1 - * @interface IListRolesRequest - * @property {string|null} [parent] ListRolesRequest parent - * @property {number|null} [pageSize] ListRolesRequest pageSize - * @property {string|null} [pageToken] ListRolesRequest pageToken - * @property {string|null} [filter] ListRolesRequest filter - * @property {string|null} [orderBy] ListRolesRequest orderBy - * @property {number|null} [skip] ListRolesRequest skip + * @interface IBatchCreateTeamsResponse + * @property {Array.|null} [teams] BatchCreateTeamsResponse teams */ /** - * Constructs a new ListRolesRequest. + * Constructs a new BatchCreateTeamsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListRolesRequest. - * @implements IListRolesRequest + * @classdesc Represents a BatchCreateTeamsResponse. + * @implements IBatchCreateTeamsResponse * @constructor - * @param {google.ads.admanager.v1.IListRolesRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchCreateTeamsResponse=} [properties] Properties to set */ - function ListRolesRequest(properties) { + function BatchCreateTeamsResponse(properties) { + this.teams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65816,147 +116222,80 @@ } /** - * ListRolesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListRolesRequest - * @instance - */ - ListRolesRequest.prototype.parent = ""; - - /** - * ListRolesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListRolesRequest - * @instance - */ - ListRolesRequest.prototype.pageSize = 0; - - /** - * ListRolesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListRolesRequest - * @instance - */ - ListRolesRequest.prototype.pageToken = ""; - - /** - * ListRolesRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListRolesRequest - * @instance - */ - ListRolesRequest.prototype.filter = ""; - - /** - * ListRolesRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListRolesRequest - * @instance - */ - ListRolesRequest.prototype.orderBy = ""; - - /** - * ListRolesRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListRolesRequest + * BatchCreateTeamsResponse teams. + * @member {Array.} teams + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @instance */ - ListRolesRequest.prototype.skip = 0; + BatchCreateTeamsResponse.prototype.teams = $util.emptyArray; /** - * Creates a new ListRolesRequest instance using the specified properties. + * Creates a new BatchCreateTeamsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListRolesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest instance + * @param {google.ads.admanager.v1.IBatchCreateTeamsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchCreateTeamsResponse} BatchCreateTeamsResponse instance */ - ListRolesRequest.create = function create(properties) { - return new ListRolesRequest(properties); + BatchCreateTeamsResponse.create = function create(properties) { + return new BatchCreateTeamsResponse(properties); }; /** - * Encodes the specified ListRolesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * Encodes the specified BatchCreateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListRolesRequest} message ListRolesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateTeamsResponse} message BatchCreateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolesRequest.encode = function encode(message, writer) { + BatchCreateTeamsResponse.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); + if (message.teams != null && message.teams.length) + for (var i = 0; i < message.teams.length; ++i) + $root.google.ads.admanager.v1.Team.encode(message.teams[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListRolesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesRequest.verify|verify} messages. + * Encodes the specified BatchCreateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchCreateTeamsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListRolesRequest} message ListRolesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchCreateTeamsResponse} message BatchCreateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolesRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolesRequest message from the specified reader or buffer. + * Decodes a BatchCreateTeamsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsResponse} BatchCreateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolesRequest.decode = function decode(reader, length, error) { + BatchCreateTeamsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListRolesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchCreateTeamsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; - } - case 6: { - message.skip = reader.int32(); + if (!(message.teams && message.teams.length)) + message.teams = []; + message.teams.push($root.google.ads.admanager.v1.Team.decode(reader, reader.uint32())); break; } default: @@ -65968,166 +116307,140 @@ }; /** - * Decodes a ListRolesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateTeamsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsResponse} BatchCreateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolesRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateTeamsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolesRequest message. + * Verifies a BatchCreateTeamsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolesRequest.verify = function verify(message) { + BatchCreateTeamsResponse.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; + if (message.teams != null && message.hasOwnProperty("teams")) { + if (!Array.isArray(message.teams)) + return "teams: array expected"; + for (var i = 0; i < message.teams.length; ++i) { + var error = $root.google.ads.admanager.v1.Team.verify(message.teams[i]); + if (error) + return "teams." + error; + } + } return null; }; /** - * Creates a ListRolesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListRolesRequest} ListRolesRequest + * @returns {google.ads.admanager.v1.BatchCreateTeamsResponse} BatchCreateTeamsResponse */ - ListRolesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListRolesRequest) + BatchCreateTeamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchCreateTeamsResponse) return object; - var message = new $root.google.ads.admanager.v1.ListRolesRequest(); - 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.skip != null) - message.skip = object.skip | 0; + var message = new $root.google.ads.admanager.v1.BatchCreateTeamsResponse(); + if (object.teams) { + if (!Array.isArray(object.teams)) + throw TypeError(".google.ads.admanager.v1.BatchCreateTeamsResponse.teams: array expected"); + message.teams = []; + for (var i = 0; i < object.teams.length; ++i) { + if (typeof object.teams[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchCreateTeamsResponse.teams: object expected"); + message.teams[i] = $root.google.ads.admanager.v1.Team.fromObject(object.teams[i]); + } + } return message; }; /** - * Creates a plain object from a ListRolesRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateTeamsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static - * @param {google.ads.admanager.v1.ListRolesRequest} message ListRolesRequest + * @param {google.ads.admanager.v1.BatchCreateTeamsResponse} message BatchCreateTeamsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolesRequest.toObject = function toObject(message, options) { + BatchCreateTeamsResponse.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.skip = 0; + if (options.arrays || options.defaults) + object.teams = []; + if (message.teams && message.teams.length) { + object.teams = []; + for (var j = 0; j < message.teams.length; ++j) + object.teams[j] = $root.google.ads.admanager.v1.Team.toObject(message.teams[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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; return object; }; /** - * Converts this ListRolesRequest to JSON. + * Converts this BatchCreateTeamsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @instance * @returns {Object.} JSON object */ - ListRolesRequest.prototype.toJSON = function toJSON() { + BatchCreateTeamsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolesRequest + * Gets the default type url for BatchCreateTeamsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListRolesRequest + * @memberof google.ads.admanager.v1.BatchCreateTeamsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateTeamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListRolesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchCreateTeamsResponse"; }; - return ListRolesRequest; + return BatchCreateTeamsResponse; })(); - v1.ListRolesResponse = (function() { + v1.UpdateTeamRequest = (function() { /** - * Properties of a ListRolesResponse. + * Properties of an UpdateTeamRequest. * @memberof google.ads.admanager.v1 - * @interface IListRolesResponse - * @property {Array.|null} [roles] ListRolesResponse roles - * @property {string|null} [nextPageToken] ListRolesResponse nextPageToken - * @property {number|null} [totalSize] ListRolesResponse totalSize + * @interface IUpdateTeamRequest + * @property {google.ads.admanager.v1.ITeam|null} [team] UpdateTeamRequest team + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTeamRequest updateMask */ /** - * Constructs a new ListRolesResponse. + * Constructs a new UpdateTeamRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListRolesResponse. - * @implements IListRolesResponse + * @classdesc Represents an UpdateTeamRequest. + * @implements IUpdateTeamRequest * @constructor - * @param {google.ads.admanager.v1.IListRolesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IUpdateTeamRequest=} [properties] Properties to set */ - function ListRolesResponse(properties) { - this.roles = []; + function UpdateTeamRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66135,108 +116448,91 @@ } /** - * ListRolesResponse roles. - * @member {Array.} roles - * @memberof google.ads.admanager.v1.ListRolesResponse - * @instance - */ - ListRolesResponse.prototype.roles = $util.emptyArray; - - /** - * ListRolesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListRolesResponse + * UpdateTeamRequest team. + * @member {google.ads.admanager.v1.ITeam|null|undefined} team + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @instance */ - ListRolesResponse.prototype.nextPageToken = ""; + UpdateTeamRequest.prototype.team = null; /** - * ListRolesResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListRolesResponse + * UpdateTeamRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @instance */ - ListRolesResponse.prototype.totalSize = 0; + UpdateTeamRequest.prototype.updateMask = null; /** - * Creates a new ListRolesResponse instance using the specified properties. + * Creates a new UpdateTeamRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static - * @param {google.ads.admanager.v1.IListRolesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse instance + * @param {google.ads.admanager.v1.IUpdateTeamRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.UpdateTeamRequest} UpdateTeamRequest instance */ - ListRolesResponse.create = function create(properties) { - return new ListRolesResponse(properties); + UpdateTeamRequest.create = function create(properties) { + return new UpdateTeamRequest(properties); }; /** - * Encodes the specified ListRolesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * Encodes the specified UpdateTeamRequest message. Does not implicitly {@link google.ads.admanager.v1.UpdateTeamRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static - * @param {google.ads.admanager.v1.IListRolesResponse} message ListRolesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateTeamRequest} message UpdateTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolesResponse.encode = function encode(message, writer) { + UpdateTeamRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.roles != null && message.roles.length) - for (var i = 0; i < message.roles.length; ++i) - $root.google.ads.admanager.v1.Role.encode(message.roles[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.team != null && Object.hasOwnProperty.call(message, "team")) + $root.google.ads.admanager.v1.Team.encode(message.team, 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 ListRolesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListRolesResponse.verify|verify} messages. + * Encodes the specified UpdateTeamRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.UpdateTeamRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static - * @param {google.ads.admanager.v1.IListRolesResponse} message ListRolesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IUpdateTeamRequest} message UpdateTeamRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTeamRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolesResponse message from the specified reader or buffer. + * Decodes an UpdateTeamRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + * @returns {google.ads.admanager.v1.UpdateTeamRequest} UpdateTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolesResponse.decode = function decode(reader, length, error) { + UpdateTeamRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListRolesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.UpdateTeamRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.roles && message.roles.length)) - message.roles = []; - message.roles.push($root.google.ads.admanager.v1.Role.decode(reader, reader.uint32())); + message.team = $root.google.ads.admanager.v1.Team.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -66248,166 +116544,143 @@ }; /** - * Decodes a ListRolesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateTeamRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + * @returns {google.ads.admanager.v1.UpdateTeamRequest} UpdateTeamRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateTeamRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolesResponse message. + * Verifies an UpdateTeamRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolesResponse.verify = function verify(message) { + UpdateTeamRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.roles != null && message.hasOwnProperty("roles")) { - if (!Array.isArray(message.roles)) - return "roles: array expected"; - for (var i = 0; i < message.roles.length; ++i) { - var error = $root.google.ads.admanager.v1.Role.verify(message.roles[i]); - if (error) - return "roles." + error; - } + if (message.team != null && message.hasOwnProperty("team")) { + var error = $root.google.ads.admanager.v1.Team.verify(message.team); + if (error) + return "team." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListRolesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTeamRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListRolesResponse} ListRolesResponse + * @returns {google.ads.admanager.v1.UpdateTeamRequest} UpdateTeamRequest */ - ListRolesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListRolesResponse) + UpdateTeamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.UpdateTeamRequest) return object; - var message = new $root.google.ads.admanager.v1.ListRolesResponse(); - if (object.roles) { - if (!Array.isArray(object.roles)) - throw TypeError(".google.ads.admanager.v1.ListRolesResponse.roles: array expected"); - message.roles = []; - for (var i = 0; i < object.roles.length; ++i) { - if (typeof object.roles[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListRolesResponse.roles: object expected"); - message.roles[i] = $root.google.ads.admanager.v1.Role.fromObject(object.roles[i]); - } + var message = new $root.google.ads.admanager.v1.UpdateTeamRequest(); + if (object.team != null) { + if (typeof object.team !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateTeamRequest.team: object expected"); + message.team = $root.google.ads.admanager.v1.Team.fromObject(object.team); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.admanager.v1.UpdateTeamRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListRolesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTeamRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static - * @param {google.ads.admanager.v1.ListRolesResponse} message ListRolesResponse + * @param {google.ads.admanager.v1.UpdateTeamRequest} message UpdateTeamRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolesResponse.toObject = function toObject(message, options) { + UpdateTeamRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.roles = []; if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.roles && message.roles.length) { - object.roles = []; - for (var j = 0; j < message.roles.length; ++j) - object.roles[j] = $root.google.ads.admanager.v1.Role.toObject(message.roles[j], options); + object.team = null; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.team != null && message.hasOwnProperty("team")) + object.team = $root.google.ads.admanager.v1.Team.toObject(message.team, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListRolesResponse to JSON. + * Converts this UpdateTeamRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @instance * @returns {Object.} JSON object */ - ListRolesResponse.prototype.toJSON = function toJSON() { + UpdateTeamRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolesResponse + * Gets the default type url for UpdateTeamRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListRolesResponse + * @memberof google.ads.admanager.v1.UpdateTeamRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateTeamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListRolesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.UpdateTeamRequest"; }; - return ListRolesResponse; + return UpdateTeamRequest; })(); - v1.TaxonomyCategory = (function() { + v1.BatchUpdateTeamsRequest = (function() { /** - * Properties of a TaxonomyCategory. + * Properties of a BatchUpdateTeamsRequest. * @memberof google.ads.admanager.v1 - * @interface ITaxonomyCategory - * @property {string|null} [name] TaxonomyCategory name - * @property {number|Long|null} [taxonomyCategoryId] TaxonomyCategory taxonomyCategoryId - * @property {string|null} [displayName] TaxonomyCategory displayName - * @property {boolean|null} [groupingOnly] TaxonomyCategory groupingOnly - * @property {number|Long|null} [parentTaxonomyCategoryId] TaxonomyCategory parentTaxonomyCategoryId - * @property {google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null} [taxonomyType] TaxonomyCategory taxonomyType - * @property {Array.|null} [ancestorNames] TaxonomyCategory ancestorNames - * @property {Array.|null} [ancestorTaxonomyCategoryIds] TaxonomyCategory ancestorTaxonomyCategoryIds + * @interface IBatchUpdateTeamsRequest + * @property {string|null} [parent] BatchUpdateTeamsRequest parent + * @property {Array.|null} [requests] BatchUpdateTeamsRequest requests */ /** - * Constructs a new TaxonomyCategory. + * Constructs a new BatchUpdateTeamsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TaxonomyCategory. - * @implements ITaxonomyCategory + * @classdesc Represents a BatchUpdateTeamsRequest. + * @implements IBatchUpdateTeamsRequest * @constructor - * @param {google.ads.admanager.v1.ITaxonomyCategory=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest=} [properties] Properties to set */ - function TaxonomyCategory(properties) { - this.ancestorNames = []; - this.ancestorTaxonomyCategoryIds = []; + function BatchUpdateTeamsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66415,222 +116688,94 @@ } /** - * TaxonomyCategory name. - * @member {string} name - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.name = ""; - - /** - * TaxonomyCategory taxonomyCategoryId. - * @member {number|Long|null|undefined} taxonomyCategoryId - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.taxonomyCategoryId = null; - - /** - * TaxonomyCategory displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.displayName = null; - - /** - * TaxonomyCategory groupingOnly. - * @member {boolean|null|undefined} groupingOnly - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.groupingOnly = null; - - /** - * TaxonomyCategory parentTaxonomyCategoryId. - * @member {number|Long|null|undefined} parentTaxonomyCategoryId - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.parentTaxonomyCategoryId = null; - - /** - * TaxonomyCategory taxonomyType. - * @member {google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType|null|undefined} taxonomyType - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @instance - */ - TaxonomyCategory.prototype.taxonomyType = null; - - /** - * TaxonomyCategory ancestorNames. - * @member {Array.} ancestorNames - * @memberof google.ads.admanager.v1.TaxonomyCategory + * BatchUpdateTeamsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @instance */ - TaxonomyCategory.prototype.ancestorNames = $util.emptyArray; + BatchUpdateTeamsRequest.prototype.parent = ""; /** - * TaxonomyCategory ancestorTaxonomyCategoryIds. - * @member {Array.} ancestorTaxonomyCategoryIds - * @memberof google.ads.admanager.v1.TaxonomyCategory + * BatchUpdateTeamsRequest requests. + * @member {Array.} requests + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @instance */ - TaxonomyCategory.prototype.ancestorTaxonomyCategoryIds = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TaxonomyCategory.prototype, "_taxonomyCategoryId", { - get: $util.oneOfGetter($oneOfFields = ["taxonomyCategoryId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TaxonomyCategory.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TaxonomyCategory.prototype, "_groupingOnly", { - get: $util.oneOfGetter($oneOfFields = ["groupingOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TaxonomyCategory.prototype, "_parentTaxonomyCategoryId", { - get: $util.oneOfGetter($oneOfFields = ["parentTaxonomyCategoryId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TaxonomyCategory.prototype, "_taxonomyType", { - get: $util.oneOfGetter($oneOfFields = ["taxonomyType"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchUpdateTeamsRequest.prototype.requests = $util.emptyArray; /** - * Creates a new TaxonomyCategory instance using the specified properties. + * Creates a new BatchUpdateTeamsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TaxonomyCategory - * @static - * @param {google.ads.admanager.v1.ITaxonomyCategory=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory instance + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest + * @static + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateTeamsRequest} BatchUpdateTeamsRequest instance */ - TaxonomyCategory.create = function create(properties) { - return new TaxonomyCategory(properties); + BatchUpdateTeamsRequest.create = function create(properties) { + return new BatchUpdateTeamsRequest(properties); }; /** - * Encodes the specified TaxonomyCategory message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * Encodes the specified BatchUpdateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static - * @param {google.ads.admanager.v1.ITaxonomyCategory} message TaxonomyCategory message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest} message BatchUpdateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TaxonomyCategory.encode = function encode(message, writer) { + BatchUpdateTeamsRequest.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.taxonomyCategoryId != null && Object.hasOwnProperty.call(message, "taxonomyCategoryId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.taxonomyCategoryId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.groupingOnly != null && Object.hasOwnProperty.call(message, "groupingOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.groupingOnly); - if (message.parentTaxonomyCategoryId != null && Object.hasOwnProperty.call(message, "parentTaxonomyCategoryId")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.parentTaxonomyCategoryId); - if (message.ancestorNames != null && message.ancestorNames.length) - for (var i = 0; i < message.ancestorNames.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.ancestorNames[i]); - if (message.ancestorTaxonomyCategoryIds != null && message.ancestorTaxonomyCategoryIds.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.ancestorTaxonomyCategoryIds.length; ++i) - writer.int64(message.ancestorTaxonomyCategoryIds[i]); - writer.ldelim(); - } - if (message.taxonomyType != null && Object.hasOwnProperty.call(message, "taxonomyType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.taxonomyType); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.ads.admanager.v1.UpdateTeamRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TaxonomyCategory message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyCategory.verify|verify} messages. + * Encodes the specified BatchUpdateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static - * @param {google.ads.admanager.v1.ITaxonomyCategory} message TaxonomyCategory message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateTeamsRequest} message BatchUpdateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TaxonomyCategory.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TaxonomyCategory message from the specified reader or buffer. + * Decodes a BatchUpdateTeamsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory + * @returns {google.ads.admanager.v1.BatchUpdateTeamsRequest} BatchUpdateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TaxonomyCategory.decode = function decode(reader, length, error) { + BatchUpdateTeamsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TaxonomyCategory(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateTeamsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.taxonomyCategoryId = reader.int64(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 5: { - message.groupingOnly = reader.bool(); - break; - } - case 6: { - message.parentTaxonomyCategoryId = reader.int64(); - break; - } - case 9: { - message.taxonomyType = reader.int32(); - break; - } - case 7: { - if (!(message.ancestorNames && message.ancestorNames.length)) - message.ancestorNames = []; - message.ancestorNames.push(reader.string()); - break; - } - case 8: { - if (!(message.ancestorTaxonomyCategoryIds && message.ancestorTaxonomyCategoryIds.length)) - message.ancestorTaxonomyCategoryIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ancestorTaxonomyCategoryIds.push(reader.int64()); - } else - message.ancestorTaxonomyCategoryIds.push(reader.int64()); + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.ads.admanager.v1.UpdateTeamRequest.decode(reader, reader.uint32())); break; } default: @@ -66642,293 +116787,149 @@ }; /** - * Decodes a TaxonomyCategory message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateTeamsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory + * @returns {google.ads.admanager.v1.BatchUpdateTeamsRequest} BatchUpdateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TaxonomyCategory.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateTeamsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TaxonomyCategory message. + * Verifies a BatchUpdateTeamsRequest message. * @function verify - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TaxonomyCategory.verify = function verify(message) { + BatchUpdateTeamsRequest.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.taxonomyCategoryId != null && message.hasOwnProperty("taxonomyCategoryId")) { - properties._taxonomyCategoryId = 1; - if (!$util.isInteger(message.taxonomyCategoryId) && !(message.taxonomyCategoryId && $util.isInteger(message.taxonomyCategoryId.low) && $util.isInteger(message.taxonomyCategoryId.high))) - return "taxonomyCategoryId: integer|Long expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - properties._displayName = 1; - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - } - if (message.groupingOnly != null && message.hasOwnProperty("groupingOnly")) { - properties._groupingOnly = 1; - if (typeof message.groupingOnly !== "boolean") - return "groupingOnly: boolean expected"; - } - if (message.parentTaxonomyCategoryId != null && message.hasOwnProperty("parentTaxonomyCategoryId")) { - properties._parentTaxonomyCategoryId = 1; - if (!$util.isInteger(message.parentTaxonomyCategoryId) && !(message.parentTaxonomyCategoryId && $util.isInteger(message.parentTaxonomyCategoryId.low) && $util.isInteger(message.parentTaxonomyCategoryId.high))) - return "parentTaxonomyCategoryId: integer|Long expected"; - } - if (message.taxonomyType != null && message.hasOwnProperty("taxonomyType")) { - properties._taxonomyType = 1; - switch (message.taxonomyType) { - default: - return "taxonomyType: enum value expected"; - case 0: - case 3: - case 4: - case 6: - case 5: - case 7: - break; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.ads.admanager.v1.UpdateTeamRequest.verify(message.requests[i]); + if (error) + return "requests." + error; } } - if (message.ancestorNames != null && message.hasOwnProperty("ancestorNames")) { - if (!Array.isArray(message.ancestorNames)) - return "ancestorNames: array expected"; - for (var i = 0; i < message.ancestorNames.length; ++i) - if (!$util.isString(message.ancestorNames[i])) - return "ancestorNames: string[] expected"; - } - if (message.ancestorTaxonomyCategoryIds != null && message.hasOwnProperty("ancestorTaxonomyCategoryIds")) { - if (!Array.isArray(message.ancestorTaxonomyCategoryIds)) - return "ancestorTaxonomyCategoryIds: array expected"; - for (var i = 0; i < message.ancestorTaxonomyCategoryIds.length; ++i) - if (!$util.isInteger(message.ancestorTaxonomyCategoryIds[i]) && !(message.ancestorTaxonomyCategoryIds[i] && $util.isInteger(message.ancestorTaxonomyCategoryIds[i].low) && $util.isInteger(message.ancestorTaxonomyCategoryIds[i].high))) - return "ancestorTaxonomyCategoryIds: integer|Long[] expected"; - } return null; }; /** - * Creates a TaxonomyCategory message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TaxonomyCategory} TaxonomyCategory + * @returns {google.ads.admanager.v1.BatchUpdateTeamsRequest} BatchUpdateTeamsRequest */ - TaxonomyCategory.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TaxonomyCategory) + BatchUpdateTeamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateTeamsRequest) return object; - var message = new $root.google.ads.admanager.v1.TaxonomyCategory(); - if (object.name != null) - message.name = String(object.name); - if (object.taxonomyCategoryId != null) - if ($util.Long) - (message.taxonomyCategoryId = $util.Long.fromValue(object.taxonomyCategoryId)).unsigned = false; - else if (typeof object.taxonomyCategoryId === "string") - message.taxonomyCategoryId = parseInt(object.taxonomyCategoryId, 10); - else if (typeof object.taxonomyCategoryId === "number") - message.taxonomyCategoryId = object.taxonomyCategoryId; - else if (typeof object.taxonomyCategoryId === "object") - message.taxonomyCategoryId = new $util.LongBits(object.taxonomyCategoryId.low >>> 0, object.taxonomyCategoryId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.groupingOnly != null) - message.groupingOnly = Boolean(object.groupingOnly); - if (object.parentTaxonomyCategoryId != null) - if ($util.Long) - (message.parentTaxonomyCategoryId = $util.Long.fromValue(object.parentTaxonomyCategoryId)).unsigned = false; - else if (typeof object.parentTaxonomyCategoryId === "string") - message.parentTaxonomyCategoryId = parseInt(object.parentTaxonomyCategoryId, 10); - else if (typeof object.parentTaxonomyCategoryId === "number") - message.parentTaxonomyCategoryId = object.parentTaxonomyCategoryId; - else if (typeof object.parentTaxonomyCategoryId === "object") - message.parentTaxonomyCategoryId = new $util.LongBits(object.parentTaxonomyCategoryId.low >>> 0, object.parentTaxonomyCategoryId.high >>> 0).toNumber(); - switch (object.taxonomyType) { - default: - if (typeof object.taxonomyType === "number") { - message.taxonomyType = object.taxonomyType; - break; + var message = new $root.google.ads.admanager.v1.BatchUpdateTeamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateTeamsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateTeamsRequest.requests: object expected"); + message.requests[i] = $root.google.ads.admanager.v1.UpdateTeamRequest.fromObject(object.requests[i]); } - break; - case "TAXONOMY_TYPE_UNSPECIFIED": - case 0: - message.taxonomyType = 0; - break; - case "TAXONOMY_IAB_AUDIENCE_1_1": - case 3: - message.taxonomyType = 3; - break; - case "TAXONOMY_IAB_CONTENT_2_1": - case 4: - message.taxonomyType = 4; - break; - case "TAXONOMY_IAB_CONTENT_2_2": - case 6: - message.taxonomyType = 6; - break; - case "TAXONOMY_IAB_CONTENT_3_0": - case 5: - message.taxonomyType = 5; - break; - case "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0": - case 7: - message.taxonomyType = 7; - break; - } - if (object.ancestorNames) { - if (!Array.isArray(object.ancestorNames)) - throw TypeError(".google.ads.admanager.v1.TaxonomyCategory.ancestorNames: array expected"); - message.ancestorNames = []; - for (var i = 0; i < object.ancestorNames.length; ++i) - message.ancestorNames[i] = String(object.ancestorNames[i]); - } - if (object.ancestorTaxonomyCategoryIds) { - if (!Array.isArray(object.ancestorTaxonomyCategoryIds)) - throw TypeError(".google.ads.admanager.v1.TaxonomyCategory.ancestorTaxonomyCategoryIds: array expected"); - message.ancestorTaxonomyCategoryIds = []; - for (var i = 0; i < object.ancestorTaxonomyCategoryIds.length; ++i) - if ($util.Long) - (message.ancestorTaxonomyCategoryIds[i] = $util.Long.fromValue(object.ancestorTaxonomyCategoryIds[i])).unsigned = false; - else if (typeof object.ancestorTaxonomyCategoryIds[i] === "string") - message.ancestorTaxonomyCategoryIds[i] = parseInt(object.ancestorTaxonomyCategoryIds[i], 10); - else if (typeof object.ancestorTaxonomyCategoryIds[i] === "number") - message.ancestorTaxonomyCategoryIds[i] = object.ancestorTaxonomyCategoryIds[i]; - else if (typeof object.ancestorTaxonomyCategoryIds[i] === "object") - message.ancestorTaxonomyCategoryIds[i] = new $util.LongBits(object.ancestorTaxonomyCategoryIds[i].low >>> 0, object.ancestorTaxonomyCategoryIds[i].high >>> 0).toNumber(); } return message; }; /** - * Creates a plain object from a TaxonomyCategory message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateTeamsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static - * @param {google.ads.admanager.v1.TaxonomyCategory} message TaxonomyCategory + * @param {google.ads.admanager.v1.BatchUpdateTeamsRequest} message BatchUpdateTeamsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TaxonomyCategory.toObject = function toObject(message, options) { + BatchUpdateTeamsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.ancestorNames = []; - object.ancestorTaxonomyCategoryIds = []; - } + if (options.arrays || options.defaults) + object.requests = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.taxonomyCategoryId != null && message.hasOwnProperty("taxonomyCategoryId")) { - if (typeof message.taxonomyCategoryId === "number") - object.taxonomyCategoryId = options.longs === String ? String(message.taxonomyCategoryId) : message.taxonomyCategoryId; - else - object.taxonomyCategoryId = options.longs === String ? $util.Long.prototype.toString.call(message.taxonomyCategoryId) : options.longs === Number ? new $util.LongBits(message.taxonomyCategoryId.low >>> 0, message.taxonomyCategoryId.high >>> 0).toNumber() : message.taxonomyCategoryId; - if (options.oneofs) - object._taxonomyCategoryId = "taxonomyCategoryId"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) { - object.displayName = message.displayName; - if (options.oneofs) - object._displayName = "displayName"; - } - if (message.groupingOnly != null && message.hasOwnProperty("groupingOnly")) { - object.groupingOnly = message.groupingOnly; - if (options.oneofs) - object._groupingOnly = "groupingOnly"; - } - if (message.parentTaxonomyCategoryId != null && message.hasOwnProperty("parentTaxonomyCategoryId")) { - if (typeof message.parentTaxonomyCategoryId === "number") - object.parentTaxonomyCategoryId = options.longs === String ? String(message.parentTaxonomyCategoryId) : message.parentTaxonomyCategoryId; - else - object.parentTaxonomyCategoryId = options.longs === String ? $util.Long.prototype.toString.call(message.parentTaxonomyCategoryId) : options.longs === Number ? new $util.LongBits(message.parentTaxonomyCategoryId.low >>> 0, message.parentTaxonomyCategoryId.high >>> 0).toNumber() : message.parentTaxonomyCategoryId; - if (options.oneofs) - object._parentTaxonomyCategoryId = "parentTaxonomyCategoryId"; - } - if (message.ancestorNames && message.ancestorNames.length) { - object.ancestorNames = []; - for (var j = 0; j < message.ancestorNames.length; ++j) - object.ancestorNames[j] = message.ancestorNames[j]; - } - if (message.ancestorTaxonomyCategoryIds && message.ancestorTaxonomyCategoryIds.length) { - object.ancestorTaxonomyCategoryIds = []; - for (var j = 0; j < message.ancestorTaxonomyCategoryIds.length; ++j) - if (typeof message.ancestorTaxonomyCategoryIds[j] === "number") - object.ancestorTaxonomyCategoryIds[j] = options.longs === String ? String(message.ancestorTaxonomyCategoryIds[j]) : message.ancestorTaxonomyCategoryIds[j]; - else - object.ancestorTaxonomyCategoryIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.ancestorTaxonomyCategoryIds[j]) : options.longs === Number ? new $util.LongBits(message.ancestorTaxonomyCategoryIds[j].low >>> 0, message.ancestorTaxonomyCategoryIds[j].high >>> 0).toNumber() : message.ancestorTaxonomyCategoryIds[j]; - } - if (message.taxonomyType != null && message.hasOwnProperty("taxonomyType")) { - object.taxonomyType = options.enums === String ? $root.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType[message.taxonomyType] === undefined ? message.taxonomyType : $root.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType[message.taxonomyType] : message.taxonomyType; - if (options.oneofs) - object._taxonomyType = "taxonomyType"; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.ads.admanager.v1.UpdateTeamRequest.toObject(message.requests[j], options); } return object; }; /** - * Converts this TaxonomyCategory to JSON. + * Converts this BatchUpdateTeamsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @instance * @returns {Object.} JSON object */ - TaxonomyCategory.prototype.toJSON = function toJSON() { + BatchUpdateTeamsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TaxonomyCategory + * Gets the default type url for BatchUpdateTeamsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.TaxonomyCategory + * @memberof google.ads.admanager.v1.BatchUpdateTeamsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TaxonomyCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateTeamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TaxonomyCategory"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateTeamsRequest"; }; - return TaxonomyCategory; + return BatchUpdateTeamsRequest; })(); - v1.TaxonomyTypeEnum = (function() { + v1.BatchUpdateTeamsResponse = (function() { /** - * Properties of a TaxonomyTypeEnum. + * Properties of a BatchUpdateTeamsResponse. * @memberof google.ads.admanager.v1 - * @interface ITaxonomyTypeEnum + * @interface IBatchUpdateTeamsResponse + * @property {Array.|null} [teams] BatchUpdateTeamsResponse teams */ /** - * Constructs a new TaxonomyTypeEnum. + * Constructs a new BatchUpdateTeamsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a TaxonomyTypeEnum. - * @implements ITaxonomyTypeEnum + * @classdesc Represents a BatchUpdateTeamsResponse. + * @implements IBatchUpdateTeamsResponse * @constructor - * @param {google.ads.admanager.v1.ITaxonomyTypeEnum=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchUpdateTeamsResponse=} [properties] Properties to set */ - function TaxonomyTypeEnum(properties) { + function BatchUpdateTeamsResponse(properties) { + this.teams = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66936,65 +116937,82 @@ } /** - * Creates a new TaxonomyTypeEnum instance using the specified properties. + * BatchUpdateTeamsResponse teams. + * @member {Array.} teams + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse + * @instance + */ + BatchUpdateTeamsResponse.prototype.teams = $util.emptyArray; + + /** + * Creates a new BatchUpdateTeamsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITaxonomyTypeEnum=} [properties] Properties to set - * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum instance + * @param {google.ads.admanager.v1.IBatchUpdateTeamsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchUpdateTeamsResponse} BatchUpdateTeamsResponse instance */ - TaxonomyTypeEnum.create = function create(properties) { - return new TaxonomyTypeEnum(properties); + BatchUpdateTeamsResponse.create = function create(properties) { + return new BatchUpdateTeamsResponse(properties); }; /** - * Encodes the specified TaxonomyTypeEnum message. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. + * Encodes the specified BatchUpdateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITaxonomyTypeEnum} message TaxonomyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateTeamsResponse} message BatchUpdateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TaxonomyTypeEnum.encode = function encode(message, writer) { + BatchUpdateTeamsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.teams != null && message.teams.length) + for (var i = 0; i < message.teams.length; ++i) + $root.google.ads.admanager.v1.Team.encode(message.teams[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TaxonomyTypeEnum message, length delimited. Does not implicitly {@link google.ads.admanager.v1.TaxonomyTypeEnum.verify|verify} messages. + * Encodes the specified BatchUpdateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchUpdateTeamsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITaxonomyTypeEnum} message TaxonomyTypeEnum message or plain object to encode + * @param {google.ads.admanager.v1.IBatchUpdateTeamsResponse} message BatchUpdateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TaxonomyTypeEnum.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TaxonomyTypeEnum message from the specified reader or buffer. + * Decodes a BatchUpdateTeamsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum + * @returns {google.ads.admanager.v1.BatchUpdateTeamsResponse} BatchUpdateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TaxonomyTypeEnum.decode = function decode(reader, length, error) { + BatchUpdateTeamsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.TaxonomyTypeEnum(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchUpdateTeamsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.teams && message.teams.length)) + message.teams = []; + message.teams.push($root.google.ads.admanager.v1.Team.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -67004,232 +117022,141 @@ }; /** - * Decodes a TaxonomyTypeEnum message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateTeamsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum + * @returns {google.ads.admanager.v1.BatchUpdateTeamsResponse} BatchUpdateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TaxonomyTypeEnum.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateTeamsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TaxonomyTypeEnum message. + * Verifies a BatchUpdateTeamsResponse message. * @function verify - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TaxonomyTypeEnum.verify = function verify(message) { + BatchUpdateTeamsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.teams != null && message.hasOwnProperty("teams")) { + if (!Array.isArray(message.teams)) + return "teams: array expected"; + for (var i = 0; i < message.teams.length; ++i) { + var error = $root.google.ads.admanager.v1.Team.verify(message.teams[i]); + if (error) + return "teams." + error; + } + } return null; }; /** - * Creates a TaxonomyTypeEnum message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.TaxonomyTypeEnum} TaxonomyTypeEnum + * @returns {google.ads.admanager.v1.BatchUpdateTeamsResponse} BatchUpdateTeamsResponse */ - TaxonomyTypeEnum.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.TaxonomyTypeEnum) + BatchUpdateTeamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchUpdateTeamsResponse) return object; - return new $root.google.ads.admanager.v1.TaxonomyTypeEnum(); + var message = new $root.google.ads.admanager.v1.BatchUpdateTeamsResponse(); + if (object.teams) { + if (!Array.isArray(object.teams)) + throw TypeError(".google.ads.admanager.v1.BatchUpdateTeamsResponse.teams: array expected"); + message.teams = []; + for (var i = 0; i < object.teams.length; ++i) { + if (typeof object.teams[i] !== "object") + throw TypeError(".google.ads.admanager.v1.BatchUpdateTeamsResponse.teams: object expected"); + message.teams[i] = $root.google.ads.admanager.v1.Team.fromObject(object.teams[i]); + } + } + return message; }; /** - * Creates a plain object from a TaxonomyTypeEnum message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateTeamsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static - * @param {google.ads.admanager.v1.TaxonomyTypeEnum} message TaxonomyTypeEnum + * @param {google.ads.admanager.v1.BatchUpdateTeamsResponse} message BatchUpdateTeamsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TaxonomyTypeEnum.toObject = function toObject() { - return {}; + BatchUpdateTeamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.teams = []; + if (message.teams && message.teams.length) { + object.teams = []; + for (var j = 0; j < message.teams.length; ++j) + object.teams[j] = $root.google.ads.admanager.v1.Team.toObject(message.teams[j], options); + } + return object; }; /** - * Converts this TaxonomyTypeEnum to JSON. + * Converts this BatchUpdateTeamsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @instance * @returns {Object.} JSON object */ - TaxonomyTypeEnum.prototype.toJSON = function toJSON() { + BatchUpdateTeamsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TaxonomyTypeEnum + * Gets the default type url for BatchUpdateTeamsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.TaxonomyTypeEnum + * @memberof google.ads.admanager.v1.BatchUpdateTeamsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TaxonomyTypeEnum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchUpdateTeamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.TaxonomyTypeEnum"; - }; - - /** - * TaxonomyType enum. - * @name google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType - * @enum {number} - * @property {number} TAXONOMY_TYPE_UNSPECIFIED=0 TAXONOMY_TYPE_UNSPECIFIED value - * @property {number} TAXONOMY_IAB_AUDIENCE_1_1=3 TAXONOMY_IAB_AUDIENCE_1_1 value - * @property {number} TAXONOMY_IAB_CONTENT_2_1=4 TAXONOMY_IAB_CONTENT_2_1 value - * @property {number} TAXONOMY_IAB_CONTENT_2_2=6 TAXONOMY_IAB_CONTENT_2_2 value - * @property {number} TAXONOMY_IAB_CONTENT_3_0=5 TAXONOMY_IAB_CONTENT_3_0 value - * @property {number} TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0=7 TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 value - */ - TaxonomyTypeEnum.TaxonomyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TAXONOMY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[3] = "TAXONOMY_IAB_AUDIENCE_1_1"] = 3; - values[valuesById[4] = "TAXONOMY_IAB_CONTENT_2_1"] = 4; - values[valuesById[6] = "TAXONOMY_IAB_CONTENT_2_2"] = 6; - values[valuesById[5] = "TAXONOMY_IAB_CONTENT_3_0"] = 5; - values[valuesById[7] = "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0"] = 7; - return values; - })(); - - return TaxonomyTypeEnum; - })(); - - v1.TaxonomyCategoryService = (function() { - - /** - * Constructs a new TaxonomyCategoryService service. - * @memberof google.ads.admanager.v1 - * @classdesc Represents a TaxonomyCategoryService - * @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 TaxonomyCategoryService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (TaxonomyCategoryService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TaxonomyCategoryService; - - /** - * Creates new TaxonomyCategoryService service using the specified rpc implementation. - * @function create - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @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 {TaxonomyCategoryService} RPC service. Useful where requests and/or responses are streamed. - */ - TaxonomyCategoryService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.ads.admanager.v1.BatchUpdateTeamsResponse"; }; - /** - * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|getTaxonomyCategory}. - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @typedef GetTaxonomyCategoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.TaxonomyCategory} [response] TaxonomyCategory - */ - - /** - * Calls GetTaxonomyCategory. - * @function getTaxonomyCategory - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @instance - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} request GetTaxonomyCategoryRequest message or plain object - * @param {google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategoryCallback} callback Node-style callback called with the error, if any, and TaxonomyCategory - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TaxonomyCategoryService.prototype.getTaxonomyCategory = function getTaxonomyCategory(request, callback) { - return this.rpcCall(getTaxonomyCategory, $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest, $root.google.ads.admanager.v1.TaxonomyCategory, request, callback); - }, "name", { value: "GetTaxonomyCategory" }); - - /** - * Calls GetTaxonomyCategory. - * @function getTaxonomyCategory - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @instance - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} request GetTaxonomyCategoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.admanager.v1.TaxonomyCategoryService|listTaxonomyCategories}. - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @typedef ListTaxonomyCategoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} [response] ListTaxonomyCategoriesResponse - */ - - /** - * Calls ListTaxonomyCategories. - * @function listTaxonomyCategories - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @instance - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} request ListTaxonomyCategoriesRequest message or plain object - * @param {google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategoriesCallback} callback Node-style callback called with the error, if any, and ListTaxonomyCategoriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TaxonomyCategoryService.prototype.listTaxonomyCategories = function listTaxonomyCategories(request, callback) { - return this.rpcCall(listTaxonomyCategories, $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest, $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse, request, callback); - }, "name", { value: "ListTaxonomyCategories" }); - - /** - * Calls ListTaxonomyCategories. - * @function listTaxonomyCategories - * @memberof google.ads.admanager.v1.TaxonomyCategoryService - * @instance - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} request ListTaxonomyCategoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TaxonomyCategoryService; + return BatchUpdateTeamsResponse; })(); - v1.GetTaxonomyCategoryRequest = (function() { + v1.BatchActivateTeamsRequest = (function() { /** - * Properties of a GetTaxonomyCategoryRequest. + * Properties of a BatchActivateTeamsRequest. * @memberof google.ads.admanager.v1 - * @interface IGetTaxonomyCategoryRequest - * @property {string|null} [name] GetTaxonomyCategoryRequest name + * @interface IBatchActivateTeamsRequest + * @property {string|null} [parent] BatchActivateTeamsRequest parent + * @property {Array.|null} [names] BatchActivateTeamsRequest names */ /** - * Constructs a new GetTaxonomyCategoryRequest. + * Constructs a new BatchActivateTeamsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a GetTaxonomyCategoryRequest. - * @implements IGetTaxonomyCategoryRequest + * @classdesc Represents a BatchActivateTeamsRequest. + * @implements IBatchActivateTeamsRequest * @constructor - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest=} [properties] Properties to set */ - function GetTaxonomyCategoryRequest(properties) { + function BatchActivateTeamsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67237,77 +117164,94 @@ } /** - * GetTaxonomyCategoryRequest name. - * @member {string} name - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * BatchActivateTeamsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @instance */ - GetTaxonomyCategoryRequest.prototype.name = ""; + BatchActivateTeamsRequest.prototype.parent = ""; /** - * Creates a new GetTaxonomyCategoryRequest instance using the specified properties. + * BatchActivateTeamsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest + * @instance + */ + BatchActivateTeamsRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchActivateTeamsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest instance + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivateTeamsRequest} BatchActivateTeamsRequest instance */ - GetTaxonomyCategoryRequest.create = function create(properties) { - return new GetTaxonomyCategoryRequest(properties); + BatchActivateTeamsRequest.create = function create(properties) { + return new BatchActivateTeamsRequest(properties); }; /** - * Encodes the specified GetTaxonomyCategoryRequest message. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. + * Encodes the specified BatchActivateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest} message BatchActivateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaxonomyCategoryRequest.encode = function encode(message, writer) { + BatchActivateTeamsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified GetTaxonomyCategoryRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.GetTaxonomyCategoryRequest.verify|verify} messages. + * Encodes the specified BatchActivateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IGetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateTeamsRequest} message BatchActivateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaxonomyCategoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchActivateTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer. + * Decodes a BatchActivateTeamsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsRequest} BatchActivateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaxonomyCategoryRequest.decode = function decode(reader, length, error) { + BatchActivateTeamsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivateTeamsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -67319,127 +117263,142 @@ }; /** - * Decodes a GetTaxonomyCategoryRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateTeamsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsRequest} BatchActivateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaxonomyCategoryRequest.decodeDelimited = function decodeDelimited(reader) { + BatchActivateTeamsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTaxonomyCategoryRequest message. + * Verifies a BatchActivateTeamsRequest message. * @function verify - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTaxonomyCategoryRequest.verify = function verify(message) { + BatchActivateTeamsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } return null; }; /** - * Creates a GetTaxonomyCategoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.GetTaxonomyCategoryRequest} GetTaxonomyCategoryRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsRequest} BatchActivateTeamsRequest */ - GetTaxonomyCategoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest) + BatchActivateTeamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivateTeamsRequest) return object; - var message = new $root.google.ads.admanager.v1.GetTaxonomyCategoryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.ads.admanager.v1.BatchActivateTeamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchActivateTeamsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } return message; }; /** - * Creates a plain object from a GetTaxonomyCategoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchActivateTeamsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static - * @param {google.ads.admanager.v1.GetTaxonomyCategoryRequest} message GetTaxonomyCategoryRequest + * @param {google.ads.admanager.v1.BatchActivateTeamsRequest} message BatchActivateTeamsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTaxonomyCategoryRequest.toObject = function toObject(message, options) { + BatchActivateTeamsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.names = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } return object; }; /** - * Converts this GetTaxonomyCategoryRequest to JSON. + * Converts this BatchActivateTeamsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @instance * @returns {Object.} JSON object */ - GetTaxonomyCategoryRequest.prototype.toJSON = function toJSON() { + BatchActivateTeamsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTaxonomyCategoryRequest + * Gets the default type url for BatchActivateTeamsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.GetTaxonomyCategoryRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTaxonomyCategoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchActivateTeamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.GetTaxonomyCategoryRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivateTeamsRequest"; }; - return GetTaxonomyCategoryRequest; + return BatchActivateTeamsRequest; })(); - v1.ListTaxonomyCategoriesRequest = (function() { + v1.BatchActivateTeamsResponse = (function() { /** - * Properties of a ListTaxonomyCategoriesRequest. + * Properties of a BatchActivateTeamsResponse. * @memberof google.ads.admanager.v1 - * @interface IListTaxonomyCategoriesRequest - * @property {string|null} [parent] ListTaxonomyCategoriesRequest parent - * @property {number|null} [pageSize] ListTaxonomyCategoriesRequest pageSize - * @property {string|null} [pageToken] ListTaxonomyCategoriesRequest pageToken - * @property {string|null} [filter] ListTaxonomyCategoriesRequest filter - * @property {string|null} [orderBy] ListTaxonomyCategoriesRequest orderBy - * @property {number|null} [skip] ListTaxonomyCategoriesRequest skip + * @interface IBatchActivateTeamsResponse */ /** - * Constructs a new ListTaxonomyCategoriesRequest. + * Constructs a new BatchActivateTeamsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListTaxonomyCategoriesRequest. - * @implements IListTaxonomyCategoriesRequest + * @classdesc Represents a BatchActivateTeamsResponse. + * @implements IBatchActivateTeamsResponse * @constructor - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchActivateTeamsResponse=} [properties] Properties to set */ - function ListTaxonomyCategoriesRequest(properties) { + function BatchActivateTeamsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67447,149 +117406,65 @@ } /** - * ListTaxonomyCategoriesRequest parent. - * @member {string} parent - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.parent = ""; - - /** - * ListTaxonomyCategoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.pageSize = 0; - - /** - * ListTaxonomyCategoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.pageToken = ""; - - /** - * ListTaxonomyCategoriesRequest filter. - * @member {string} filter - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.filter = ""; - - /** - * ListTaxonomyCategoriesRequest orderBy. - * @member {string} orderBy - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.orderBy = ""; - - /** - * ListTaxonomyCategoriesRequest skip. - * @member {number} skip - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest - * @instance - */ - ListTaxonomyCategoriesRequest.prototype.skip = 0; - - /** - * Creates a new ListTaxonomyCategoriesRequest instance using the specified properties. + * Creates a new BatchActivateTeamsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest instance + * @param {google.ads.admanager.v1.IBatchActivateTeamsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchActivateTeamsResponse} BatchActivateTeamsResponse instance */ - ListTaxonomyCategoriesRequest.create = function create(properties) { - return new ListTaxonomyCategoriesRequest(properties); + BatchActivateTeamsResponse.create = function create(properties) { + return new BatchActivateTeamsResponse(properties); }; /** - * Encodes the specified ListTaxonomyCategoriesRequest message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. + * Encodes the specified BatchActivateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateTeamsResponse} message BatchActivateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTaxonomyCategoriesRequest.encode = function encode(message, writer) { + BatchActivateTeamsResponse.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.skip != null && Object.hasOwnProperty.call(message, "skip")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skip); return writer; }; /** - * Encodes the specified ListTaxonomyCategoriesRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesRequest.verify|verify} messages. + * Encodes the specified BatchActivateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchActivateTeamsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest message or plain object to encode + * @param {google.ads.admanager.v1.IBatchActivateTeamsResponse} message BatchActivateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTaxonomyCategoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchActivateTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer. + * Decodes a BatchActivateTeamsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsResponse} BatchActivateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTaxonomyCategoriesRequest.decode = function decode(reader, length, error) { + BatchActivateTeamsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchActivateTeamsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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; - } - case 6: { - message.skip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -67599,166 +117474,111 @@ }; /** - * Decodes a ListTaxonomyCategoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchActivateTeamsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsResponse} BatchActivateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTaxonomyCategoriesRequest.decodeDelimited = function decodeDelimited(reader) { + BatchActivateTeamsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTaxonomyCategoriesRequest message. + * Verifies a BatchActivateTeamsResponse message. * @function verify - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTaxonomyCategoriesRequest.verify = function verify(message) { + BatchActivateTeamsResponse.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.skip != null && message.hasOwnProperty("skip")) - if (!$util.isInteger(message.skip)) - return "skip: integer expected"; return null; }; /** - * Creates a ListTaxonomyCategoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchActivateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} ListTaxonomyCategoriesRequest + * @returns {google.ads.admanager.v1.BatchActivateTeamsResponse} BatchActivateTeamsResponse */ - ListTaxonomyCategoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest) + BatchActivateTeamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchActivateTeamsResponse) return object; - var message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesRequest(); - 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.skip != null) - message.skip = object.skip | 0; - return message; + return new $root.google.ads.admanager.v1.BatchActivateTeamsResponse(); }; /** - * Creates a plain object from a ListTaxonomyCategoriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchActivateTeamsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static - * @param {google.ads.admanager.v1.ListTaxonomyCategoriesRequest} message ListTaxonomyCategoriesRequest + * @param {google.ads.admanager.v1.BatchActivateTeamsResponse} message BatchActivateTeamsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTaxonomyCategoriesRequest.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.skip = 0; - } - 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.skip != null && message.hasOwnProperty("skip")) - object.skip = message.skip; - return object; + BatchActivateTeamsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListTaxonomyCategoriesRequest to JSON. + * Converts this BatchActivateTeamsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @instance * @returns {Object.} JSON object */ - ListTaxonomyCategoriesRequest.prototype.toJSON = function toJSON() { + BatchActivateTeamsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTaxonomyCategoriesRequest + * Gets the default type url for BatchActivateTeamsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesRequest + * @memberof google.ads.admanager.v1.BatchActivateTeamsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTaxonomyCategoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchActivateTeamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListTaxonomyCategoriesRequest"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchActivateTeamsResponse"; }; - return ListTaxonomyCategoriesRequest; + return BatchActivateTeamsResponse; })(); - v1.ListTaxonomyCategoriesResponse = (function() { + v1.BatchDeactivateTeamsRequest = (function() { /** - * Properties of a ListTaxonomyCategoriesResponse. + * Properties of a BatchDeactivateTeamsRequest. * @memberof google.ads.admanager.v1 - * @interface IListTaxonomyCategoriesResponse - * @property {Array.|null} [taxonomyCategories] ListTaxonomyCategoriesResponse taxonomyCategories - * @property {string|null} [nextPageToken] ListTaxonomyCategoriesResponse nextPageToken - * @property {number|null} [totalSize] ListTaxonomyCategoriesResponse totalSize + * @interface IBatchDeactivateTeamsRequest + * @property {string|null} [parent] BatchDeactivateTeamsRequest parent + * @property {Array.|null} [names] BatchDeactivateTeamsRequest names */ /** - * Constructs a new ListTaxonomyCategoriesResponse. + * Constructs a new BatchDeactivateTeamsRequest. * @memberof google.ads.admanager.v1 - * @classdesc Represents a ListTaxonomyCategoriesResponse. - * @implements IListTaxonomyCategoriesResponse + * @classdesc Represents a BatchDeactivateTeamsRequest. + * @implements IBatchDeactivateTeamsRequest * @constructor - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest=} [properties] Properties to set */ - function ListTaxonomyCategoriesResponse(properties) { - this.taxonomyCategories = []; + function BatchDeactivateTeamsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67766,108 +117586,94 @@ } /** - * ListTaxonomyCategoriesResponse taxonomyCategories. - * @member {Array.} taxonomyCategories - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse - * @instance - */ - ListTaxonomyCategoriesResponse.prototype.taxonomyCategories = $util.emptyArray; - - /** - * ListTaxonomyCategoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * BatchDeactivateTeamsRequest parent. + * @member {string} parent + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @instance */ - ListTaxonomyCategoriesResponse.prototype.nextPageToken = ""; + BatchDeactivateTeamsRequest.prototype.parent = ""; /** - * ListTaxonomyCategoriesResponse totalSize. - * @member {number} totalSize - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * BatchDeactivateTeamsRequest names. + * @member {Array.} names + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @instance */ - ListTaxonomyCategoriesResponse.prototype.totalSize = 0; + BatchDeactivateTeamsRequest.prototype.names = $util.emptyArray; /** - * Creates a new ListTaxonomyCategoriesResponse instance using the specified properties. + * Creates a new BatchDeactivateTeamsRequest instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse=} [properties] Properties to set - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse instance + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsRequest} BatchDeactivateTeamsRequest instance */ - ListTaxonomyCategoriesResponse.create = function create(properties) { - return new ListTaxonomyCategoriesResponse(properties); + BatchDeactivateTeamsRequest.create = function create(properties) { + return new BatchDeactivateTeamsRequest(properties); }; /** - * Encodes the specified ListTaxonomyCategoriesResponse message. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. + * Encodes the specified BatchDeactivateTeamsRequest message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest} message BatchDeactivateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTaxonomyCategoriesResponse.encode = function encode(message, writer) { + BatchDeactivateTeamsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.taxonomyCategories != null && message.taxonomyCategories.length) - for (var i = 0; i < message.taxonomyCategories.length; ++i) - $root.google.ads.admanager.v1.TaxonomyCategory.encode(message.taxonomyCategories[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified ListTaxonomyCategoriesResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.ListTaxonomyCategoriesResponse.verify|verify} messages. + * Encodes the specified BatchDeactivateTeamsRequest message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static - * @param {google.ads.admanager.v1.IListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsRequest} message BatchDeactivateTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTaxonomyCategoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeactivateTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer. + * Decodes a BatchDeactivateTeamsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsRequest} BatchDeactivateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTaxonomyCategoriesResponse.decode = function decode(reader, length, error) { + BatchDeactivateTeamsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateTeamsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.taxonomyCategories && message.taxonomyCategories.length)) - message.taxonomyCategories = []; - message.taxonomyCategories.push($root.google.ads.admanager.v1.TaxonomyCategory.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - message.totalSize = reader.int32(); + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -67879,157 +117685,142 @@ }; /** - * Decodes a ListTaxonomyCategoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateTeamsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsRequest} BatchDeactivateTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTaxonomyCategoriesResponse.decodeDelimited = function decodeDelimited(reader) { + BatchDeactivateTeamsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTaxonomyCategoriesResponse message. + * Verifies a BatchDeactivateTeamsRequest message. * @function verify - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTaxonomyCategoriesResponse.verify = function verify(message) { + BatchDeactivateTeamsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.taxonomyCategories != null && message.hasOwnProperty("taxonomyCategories")) { - if (!Array.isArray(message.taxonomyCategories)) - return "taxonomyCategories: array expected"; - for (var i = 0; i < message.taxonomyCategories.length; ++i) { - var error = $root.google.ads.admanager.v1.TaxonomyCategory.verify(message.taxonomyCategories[i]); - if (error) - return "taxonomyCategories." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListTaxonomyCategoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateTeamsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} ListTaxonomyCategoriesResponse + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsRequest} BatchDeactivateTeamsRequest */ - ListTaxonomyCategoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse) + BatchDeactivateTeamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateTeamsRequest) return object; - var message = new $root.google.ads.admanager.v1.ListTaxonomyCategoriesResponse(); - if (object.taxonomyCategories) { - if (!Array.isArray(object.taxonomyCategories)) - throw TypeError(".google.ads.admanager.v1.ListTaxonomyCategoriesResponse.taxonomyCategories: array expected"); - message.taxonomyCategories = []; - for (var i = 0; i < object.taxonomyCategories.length; ++i) { - if (typeof object.taxonomyCategories[i] !== "object") - throw TypeError(".google.ads.admanager.v1.ListTaxonomyCategoriesResponse.taxonomyCategories: object expected"); - message.taxonomyCategories[i] = $root.google.ads.admanager.v1.TaxonomyCategory.fromObject(object.taxonomyCategories[i]); - } + var message = new $root.google.ads.admanager.v1.BatchDeactivateTeamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.ads.admanager.v1.BatchDeactivateTeamsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListTaxonomyCategoriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeactivateTeamsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static - * @param {google.ads.admanager.v1.ListTaxonomyCategoriesResponse} message ListTaxonomyCategoriesResponse + * @param {google.ads.admanager.v1.BatchDeactivateTeamsRequest} message BatchDeactivateTeamsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTaxonomyCategoriesResponse.toObject = function toObject(message, options) { + BatchDeactivateTeamsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.taxonomyCategories = []; - if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.taxonomyCategories && message.taxonomyCategories.length) { - object.taxonomyCategories = []; - for (var j = 0; j < message.taxonomyCategories.length; ++j) - object.taxonomyCategories[j] = $root.google.ads.admanager.v1.TaxonomyCategory.toObject(message.taxonomyCategories[j], options); + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; return object; }; /** - * Converts this ListTaxonomyCategoriesResponse to JSON. + * Converts this BatchDeactivateTeamsRequest to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @instance * @returns {Object.} JSON object */ - ListTaxonomyCategoriesResponse.prototype.toJSON = function toJSON() { + BatchDeactivateTeamsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTaxonomyCategoriesResponse + * Gets the default type url for BatchDeactivateTeamsRequest * @function getTypeUrl - * @memberof google.ads.admanager.v1.ListTaxonomyCategoriesResponse + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTaxonomyCategoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeactivateTeamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.ListTaxonomyCategoriesResponse"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateTeamsRequest"; }; - return ListTaxonomyCategoriesResponse; + return BatchDeactivateTeamsRequest; })(); - v1.Team = (function() { + v1.BatchDeactivateTeamsResponse = (function() { /** - * Properties of a Team. + * Properties of a BatchDeactivateTeamsResponse. * @memberof google.ads.admanager.v1 - * @interface ITeam - * @property {string|null} [name] Team name + * @interface IBatchDeactivateTeamsResponse */ /** - * Constructs a new Team. + * Constructs a new BatchDeactivateTeamsResponse. * @memberof google.ads.admanager.v1 - * @classdesc Represents a Team. - * @implements ITeam + * @classdesc Represents a BatchDeactivateTeamsResponse. + * @implements IBatchDeactivateTeamsResponse * @constructor - * @param {google.ads.admanager.v1.ITeam=} [properties] Properties to set + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsResponse=} [properties] Properties to set */ - function Team(properties) { + function BatchDeactivateTeamsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68037,79 +117828,65 @@ } /** - * Team name. - * @member {string} name - * @memberof google.ads.admanager.v1.Team - * @instance - */ - Team.prototype.name = ""; - - /** - * Creates a new Team instance using the specified properties. + * Creates a new BatchDeactivateTeamsResponse instance using the specified properties. * @function create - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITeam=} [properties] Properties to set - * @returns {google.ads.admanager.v1.Team} Team instance + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsResponse=} [properties] Properties to set + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsResponse} BatchDeactivateTeamsResponse instance */ - Team.create = function create(properties) { - return new Team(properties); + BatchDeactivateTeamsResponse.create = function create(properties) { + return new BatchDeactivateTeamsResponse(properties); }; /** - * Encodes the specified Team message. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. + * Encodes the specified BatchDeactivateTeamsResponse message. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsResponse.verify|verify} messages. * @function encode - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITeam} message Team message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsResponse} message BatchDeactivateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Team.encode = function encode(message, writer) { + BatchDeactivateTeamsResponse.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 Team message, length delimited. Does not implicitly {@link google.ads.admanager.v1.Team.verify|verify} messages. + * Encodes the specified BatchDeactivateTeamsResponse message, length delimited. Does not implicitly {@link google.ads.admanager.v1.BatchDeactivateTeamsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static - * @param {google.ads.admanager.v1.ITeam} message Team message or plain object to encode + * @param {google.ads.admanager.v1.IBatchDeactivateTeamsResponse} message BatchDeactivateTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Team.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeactivateTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Team message from the specified reader or buffer. + * Decodes a BatchDeactivateTeamsResponse message from the specified reader or buffer. * @function decode - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ads.admanager.v1.Team} Team + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsResponse} BatchDeactivateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Team.decode = function decode(reader, length, error) { + BatchDeactivateTeamsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.Team(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.BatchDeactivateTeamsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -68119,102 +117896,89 @@ }; /** - * Decodes a Team message from the specified reader or buffer, length delimited. + * Decodes a BatchDeactivateTeamsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.admanager.v1.Team} Team + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsResponse} BatchDeactivateTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Team.decodeDelimited = function decodeDelimited(reader) { + BatchDeactivateTeamsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Team message. + * Verifies a BatchDeactivateTeamsResponse message. * @function verify - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Team.verify = function verify(message) { + BatchDeactivateTeamsResponse.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 Team message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeactivateTeamsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.admanager.v1.Team} Team + * @returns {google.ads.admanager.v1.BatchDeactivateTeamsResponse} BatchDeactivateTeamsResponse */ - Team.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.admanager.v1.Team) + BatchDeactivateTeamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.BatchDeactivateTeamsResponse) return object; - var message = new $root.google.ads.admanager.v1.Team(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.ads.admanager.v1.BatchDeactivateTeamsResponse(); }; /** - * Creates a plain object from a Team message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeactivateTeamsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static - * @param {google.ads.admanager.v1.Team} message Team + * @param {google.ads.admanager.v1.BatchDeactivateTeamsResponse} message BatchDeactivateTeamsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Team.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; + BatchDeactivateTeamsResponse.toObject = function toObject() { + return {}; }; /** - * Converts this Team to JSON. + * Converts this BatchDeactivateTeamsResponse to JSON. * @function toJSON - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @instance * @returns {Object.} JSON object */ - Team.prototype.toJSON = function toJSON() { + BatchDeactivateTeamsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Team + * Gets the default type url for BatchDeactivateTeamsResponse * @function getTypeUrl - * @memberof google.ads.admanager.v1.Team + * @memberof google.ads.admanager.v1.BatchDeactivateTeamsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Team.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeactivateTeamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.admanager.v1.Team"; + return typeUrlPrefix + "/google.ads.admanager.v1.BatchDeactivateTeamsResponse"; }; - return Team; + return BatchDeactivateTeamsResponse; })(); v1.User = (function() { @@ -68973,6 +118737,329 @@ return GetUserRequest; })(); + v1.WebProperty = (function() { + + /** + * Properties of a WebProperty. + * @memberof google.ads.admanager.v1 + * @interface IWebProperty + * @property {string|null} [name] WebProperty name + * @property {string|null} [webPropertyCode] WebProperty webPropertyCode + * @property {google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct|null} [productType] WebProperty productType + * @property {number|Long|null} [webPropertyId] WebProperty webPropertyId + */ + + /** + * Constructs a new WebProperty. + * @memberof google.ads.admanager.v1 + * @classdesc Represents a WebProperty. + * @implements IWebProperty + * @constructor + * @param {google.ads.admanager.v1.IWebProperty=} [properties] Properties to set + */ + function WebProperty(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]]; + } + + /** + * WebProperty name. + * @member {string} name + * @memberof google.ads.admanager.v1.WebProperty + * @instance + */ + WebProperty.prototype.name = ""; + + /** + * WebProperty webPropertyCode. + * @member {string} webPropertyCode + * @memberof google.ads.admanager.v1.WebProperty + * @instance + */ + WebProperty.prototype.webPropertyCode = ""; + + /** + * WebProperty productType. + * @member {google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct} productType + * @memberof google.ads.admanager.v1.WebProperty + * @instance + */ + WebProperty.prototype.productType = 0; + + /** + * WebProperty webPropertyId. + * @member {number|Long} webPropertyId + * @memberof google.ads.admanager.v1.WebProperty + * @instance + */ + WebProperty.prototype.webPropertyId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new WebProperty instance using the specified properties. + * @function create + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {google.ads.admanager.v1.IWebProperty=} [properties] Properties to set + * @returns {google.ads.admanager.v1.WebProperty} WebProperty instance + */ + WebProperty.create = function create(properties) { + return new WebProperty(properties); + }; + + /** + * Encodes the specified WebProperty message. Does not implicitly {@link google.ads.admanager.v1.WebProperty.verify|verify} messages. + * @function encode + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {google.ads.admanager.v1.IWebProperty} message WebProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebProperty.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.webPropertyCode != null && Object.hasOwnProperty.call(message, "webPropertyCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.webPropertyCode); + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.productType); + if (message.webPropertyId != null && Object.hasOwnProperty.call(message, "webPropertyId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.webPropertyId); + return writer; + }; + + /** + * Encodes the specified WebProperty message, length delimited. Does not implicitly {@link google.ads.admanager.v1.WebProperty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {google.ads.admanager.v1.IWebProperty} message WebProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebProperty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebProperty message from the specified reader or buffer. + * @function decode + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.admanager.v1.WebProperty} WebProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebProperty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.admanager.v1.WebProperty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.webPropertyCode = reader.string(); + break; + } + case 3: { + message.productType = reader.int32(); + break; + } + case 4: { + message.webPropertyId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebProperty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.admanager.v1.WebProperty} WebProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebProperty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebProperty message. + * @function verify + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebProperty.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.webPropertyCode != null && message.hasOwnProperty("webPropertyCode")) + if (!$util.isString(message.webPropertyCode)) + return "webPropertyCode: string expected"; + if (message.productType != null && message.hasOwnProperty("productType")) + switch (message.productType) { + default: + return "productType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.webPropertyId != null && message.hasOwnProperty("webPropertyId")) + if (!$util.isInteger(message.webPropertyId) && !(message.webPropertyId && $util.isInteger(message.webPropertyId.low) && $util.isInteger(message.webPropertyId.high))) + return "webPropertyId: integer|Long expected"; + return null; + }; + + /** + * Creates a WebProperty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {Object.} object Plain object + * @returns {google.ads.admanager.v1.WebProperty} WebProperty + */ + WebProperty.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.admanager.v1.WebProperty) + return object; + var message = new $root.google.ads.admanager.v1.WebProperty(); + if (object.name != null) + message.name = String(object.name); + if (object.webPropertyCode != null) + message.webPropertyCode = String(object.webPropertyCode); + switch (object.productType) { + default: + if (typeof object.productType === "number") { + message.productType = object.productType; + break; + } + break; + case "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED": + case 0: + message.productType = 0; + break; + case "DISPLAY": + case 1: + message.productType = 1; + break; + case "MOBILE_APP": + case 2: + message.productType = 2; + break; + case "VIDEO_AND_AUDIO": + case 3: + message.productType = 3; + break; + case "GAMES": + case 4: + message.productType = 4; + break; + } + if (object.webPropertyId != null) + if ($util.Long) + (message.webPropertyId = $util.Long.fromValue(object.webPropertyId)).unsigned = false; + else if (typeof object.webPropertyId === "string") + message.webPropertyId = parseInt(object.webPropertyId, 10); + else if (typeof object.webPropertyId === "number") + message.webPropertyId = object.webPropertyId; + else if (typeof object.webPropertyId === "object") + message.webPropertyId = new $util.LongBits(object.webPropertyId.low >>> 0, object.webPropertyId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a WebProperty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {google.ads.admanager.v1.WebProperty} message WebProperty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebProperty.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.webPropertyCode = ""; + object.productType = options.enums === String ? "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.webPropertyId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.webPropertyId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.webPropertyCode != null && message.hasOwnProperty("webPropertyCode")) + object.webPropertyCode = message.webPropertyCode; + if (message.productType != null && message.hasOwnProperty("productType")) + object.productType = options.enums === String ? $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct[message.productType] === undefined ? message.productType : $root.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct[message.productType] : message.productType; + if (message.webPropertyId != null && message.hasOwnProperty("webPropertyId")) + if (typeof message.webPropertyId === "number") + object.webPropertyId = options.longs === String ? String(message.webPropertyId) : message.webPropertyId; + else + object.webPropertyId = options.longs === String ? $util.Long.prototype.toString.call(message.webPropertyId) : options.longs === Number ? new $util.LongBits(message.webPropertyId.low >>> 0, message.webPropertyId.high >>> 0).toNumber() : message.webPropertyId; + return object; + }; + + /** + * Converts this WebProperty to JSON. + * @function toJSON + * @memberof google.ads.admanager.v1.WebProperty + * @instance + * @returns {Object.} JSON object + */ + WebProperty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebProperty + * @function getTypeUrl + * @memberof google.ads.admanager.v1.WebProperty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.admanager.v1.WebProperty"; + }; + + return WebProperty; + })(); + return v1; })(); @@ -87772,154 +137859,356 @@ }; /** - * 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 + * 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 + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * 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); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * 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); + }; + + /** + * 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 + */ + + /** + * 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" }); + + /** + * 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 */ - 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 + * 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 */ - 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; - }; + 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" }); /** - * 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 + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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 + * 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 */ - 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 + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations * @instance - * @returns {Object.} JSON object + * @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 */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + 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" }); /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - return Any; + return Operations; })(); - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Money = (function() { + longrunning.Operation = (function() { /** - * Properties of a Money. - * @memberof google.type - * @interface IMoney - * @property {string|null} [currencyCode] Money currencyCode - * @property {number|Long|null} [units] Money units - * @property {number|null} [nanos] Money nanos + * 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 Money. - * @memberof google.type - * @classdesc Represents a Money. - * @implements IMoney + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation * @constructor - * @param {google.type.IMoney=} [properties] Properties to set + * @param {google.longrunning.IOperation=} [properties] Properties to set */ - function Money(properties) { + function Operation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87927,105 +138216,147 @@ } /** - * Money currencyCode. - * @member {string} currencyCode - * @memberof google.type.Money + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation * @instance */ - Money.prototype.currencyCode = ""; + Operation.prototype.name = ""; /** - * Money units. - * @member {number|Long} units - * @memberof google.type.Money + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation * @instance */ - Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Operation.prototype.metadata = null; /** - * Money nanos. - * @member {number} nanos - * @memberof google.type.Money + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation * @instance */ - Money.prototype.nanos = 0; + Operation.prototype.done = false; /** - * Creates a new Money instance using the specified properties. + * 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; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * 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) + }); + + /** + * Creates a new Operation instance using the specified properties. * @function create - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static - * @param {google.type.IMoney=} [properties] Properties to set - * @returns {google.type.Money} Money instance + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance */ - Money.create = function create(properties) { - return new Money(properties); + Operation.create = function create(properties) { + return new Operation(properties); }; /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. * @function encode - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static - * @param {google.type.IMoney} message Money message or plain object to encode + * @param {google.longrunning.IOperation} message Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Money.encode = function encode(message, writer) { + Operation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); - if (message.units != null && Object.hasOwnProperty.call(message, "units")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); + 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; }; /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static - * @param {google.type.IMoney} message Money message or plain object to encode + * @param {google.longrunning.IOperation} message Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Money.encodeDelimited = function encodeDelimited(message, writer) { + Operation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Money message from the specified reader or buffer. + * Decodes an Operation message from the specified reader or buffer. * @function decode - * @memberof google.type.Money + * @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.type.Money} Money + * @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 */ - Money.decode = function decode(reader, length, error) { + Operation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.currencyCode = reader.string(); + message.name = reader.string(); break; } case 2: { - message.units = reader.int64(); + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; } case 3: { - message.nanos = reader.int32(); + 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: @@ -88037,261 +138368,261 @@ }; /** - * Decodes a Money message from the specified reader or buffer, length delimited. + * Decodes an Operation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Money} Money + * @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 */ - Money.decodeDelimited = function decodeDelimited(reader) { + Operation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Money message. + * Verifies an Operation message. * @function verify - * @memberof google.type.Money + * @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 */ - Money.verify = function verify(message) { + Operation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.units != null && message.hasOwnProperty("units")) - if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) - return "units: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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.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 a Money message from a plain object. Also converts values to their respective internal types. + * Creates an Operation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static * @param {Object.} object Plain object - * @returns {google.type.Money} Money + * @returns {google.longrunning.Operation} Operation */ - Money.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Money) + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) return object; - var message = new $root.google.type.Money(); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.units != null) - if ($util.Long) - (message.units = $util.Long.fromValue(object.units)).unsigned = false; - else if (typeof object.units === "string") - message.units = parseInt(object.units, 10); - else if (typeof object.units === "number") - message.units = object.units; - else if (typeof object.units === "object") - message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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; }; /** - * Creates a plain object from a Money message. Also converts values to other types if specified. + * Creates a plain object from an Operation message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static - * @param {google.type.Money} message Money + * @param {google.longrunning.Operation} message Operation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Money.toObject = function toObject(message, options) { + Operation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.currencyCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.units = options.longs === String ? "0" : 0; - object.nanos = 0; + 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"; } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.units != null && message.hasOwnProperty("units")) - if (typeof message.units === "number") - object.units = options.longs === String ? String(message.units) : message.units; - else - object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Money to JSON. + * Converts this Operation to JSON. * @function toJSON - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @instance * @returns {Object.} JSON object */ - Money.prototype.toJSON = function toJSON() { + Operation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Money + * Gets the default type url for Operation * @function getTypeUrl - * @memberof google.type.Money + * @memberof google.longrunning.Operation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.type.Money"; + return typeUrlPrefix + "/google.longrunning.Operation"; }; - return Money; + return Operation; })(); - type.Date = (function() { + longrunning.GetOperationRequest = (function() { /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name */ /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest * @constructor - * @param {google.type.IDate=} [properties] Properties to set + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set */ - function Date(properties) { + function GetOperationRequest(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]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; + } /** - * Date day. - * @member {number} day - * @memberof google.type.Date + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest * @instance */ - Date.prototype.day = 0; + GetOperationRequest.prototype.name = ""; /** - * Creates a new Date instance using the specified properties. + * Creates a new GetOperationRequest instance using the specified properties. * @function create - * @memberof google.type.Date + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance */ - Date.create = function create(properties) { - return new Date(properties); + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); }; /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. * @function encode - * @memberof google.type.Date + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.type.IDate} message Date 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 */ - Date.encode = function encode(message, writer) { + GetOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.Date + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.type.IDate} message Date 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 */ - Date.encodeDelimited = function encodeDelimited(message, writer) { + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Date message from the specified reader or buffer. + * Decodes a GetOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.type.Date + * @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.type.Date} Date + * @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 */ - Date.decode = function decode(reader, length, error) { + GetOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); + message.name = reader.string(); break; } default: @@ -88303,168 +138634,125 @@ }; /** - * Decodes a Date 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.type.Date + * @memberof google.longrunning.GetOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date + * @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 */ - Date.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 Date message. + * Verifies a GetOperationRequest message. * @function verify - * @memberof google.type.Date + * @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 */ - Date.verify = function verify(message) { + GetOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Date 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.type.Date + * @memberof google.longrunning.GetOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.type.Date} Date + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Date 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.type.Date + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.type.Date} message Date + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Date.toObject = function toObject(message, options) { + GetOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Date to JSON. + * Converts this GetOperationRequest to JSON. * @function toJSON - * @memberof google.type.Date + * @memberof google.longrunning.GetOperationRequest * @instance * @returns {Object.} JSON object */ - Date.prototype.toJSON = function toJSON() { + GetOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Date + * Gets the default type url for GetOperationRequest * @function getTypeUrl - * @memberof google.type.Date + * @memberof google.longrunning.GetOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.type.Date"; + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; }; - return Date; - })(); - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; + return GetOperationRequest; })(); - type.TimeOfDay = (function() { + longrunning.ListOperationsRequest = (function() { /** - * Properties of a TimeOfDay. - * @memberof google.type - * @interface ITimeOfDay - * @property {number|null} [hours] TimeOfDay hours - * @property {number|null} [minutes] TimeOfDay minutes - * @property {number|null} [seconds] TimeOfDay seconds - * @property {number|null} [nanos] TimeOfDay nanos + * 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 */ /** - * Constructs a new TimeOfDay. - * @memberof google.type - * @classdesc Represents a TimeOfDay. - * @implements ITimeOfDay + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest * @constructor - * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set */ - function TimeOfDay(properties) { + function ListOperationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88472,119 +138760,119 @@ } /** - * TimeOfDay hours. - * @member {number} hours - * @memberof google.type.TimeOfDay + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest * @instance */ - TimeOfDay.prototype.hours = 0; + ListOperationsRequest.prototype.name = ""; /** - * TimeOfDay minutes. - * @member {number} minutes - * @memberof google.type.TimeOfDay + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest * @instance */ - TimeOfDay.prototype.minutes = 0; + ListOperationsRequest.prototype.filter = ""; /** - * TimeOfDay seconds. - * @member {number} seconds - * @memberof google.type.TimeOfDay + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest * @instance */ - TimeOfDay.prototype.seconds = 0; + ListOperationsRequest.prototype.pageSize = 0; /** - * TimeOfDay nanos. - * @member {number} nanos - * @memberof google.type.TimeOfDay + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest * @instance */ - TimeOfDay.prototype.nanos = 0; + ListOperationsRequest.prototype.pageToken = ""; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new ListOperationsRequest instance using the specified properties. * @function create - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.type.ITimeOfDay=} [properties] Properties to set - * @returns {google.type.TimeOfDay} TimeOfDay instance + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance */ - TimeOfDay.create = function create(properties) { - return new TimeOfDay(properties); + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); }; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encode - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encode = function encode(message, writer) { + ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + 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; }; /** - * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a ListOperationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeOfDay + * @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.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decode = function decode(reader, length, error) { + ListOperationsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } case 1: { - message.hours = reader.int32(); + message.filter = reader.string(); break; } case 2: { - message.minutes = reader.int32(); + message.pageSize = reader.int32(); break; } case 3: { - message.seconds = reader.int32(); - break; - } - case 4: { - message.nanos = reader.int32(); + message.pageToken = reader.string(); break; } default: @@ -88596,363 +138884,397 @@ }; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeOfDay message. + * Verifies a ListOperationsRequest message. * @function verify - * @memberof google.type.TimeOfDay + * @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 */ - TimeOfDay.verify = function verify(message) { + ListOperationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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; }; /** - * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static * @param {Object.} object Plain object - * @returns {google.type.TimeOfDay} TimeOfDay + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest */ - TimeOfDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeOfDay) + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; - var message = new $root.google.type.TimeOfDay(); - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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; }; /** - * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.type.TimeOfDay} message TimeOfDay + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeOfDay.toObject = function toObject(message, options) { + ListOperationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; } - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + 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; }; /** - * Converts this TimeOfDay to JSON. + * Converts this ListOperationsRequest to JSON. * @function toJSON - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @instance * @returns {Object.} JSON object */ - TimeOfDay.prototype.toJSON = function toJSON() { + ListOperationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TimeOfDay + * Gets the default type url for ListOperationsRequest * @function getTypeUrl - * @memberof google.type.TimeOfDay + * @memberof google.longrunning.ListOperationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TimeOfDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.type.TimeOfDay"; + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; }; - return TimeOfDay; + return ListOperationsRequest; })(); - return type; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { + longrunning.ListOperationsResponse = (function() { /** - * Constructs a new Operations service. + * Properties of a ListOperationsResponse. * @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); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * 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); - }; - - /** - * 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 - */ - - /** - * 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" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken */ /** - * 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 + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set */ + function ListOperationsResponse(properties) { + this.operations = []; + 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 GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse * @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" }); + ListOperationsResponse.prototype.operations = $util.emptyArray; /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListOperationsResponse.prototype.nextPageToken = ""; /** - * 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 + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; /** - * 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 + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - 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" }); + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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; + }; /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * 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 + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @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.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * 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 + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 */ - 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" }); + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListOperationsResponse message. + * @function verify + * @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 */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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; + }; /** - * 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 + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + 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; + }; /** - * 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 + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - 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" }); + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + }; /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Operations; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; })(); - longrunning.Operation = (function() { + longrunning.CancelOperationRequest = (function() { /** - * Properties of an Operation. + * Properties of a CancelOperationRequest. * @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 + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name */ /** - * Constructs a new Operation. + * Constructs a new CancelOperationRequest. * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set */ - function Operation(properties) { + function CancelOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88960,124 +139282,70 @@ } /** - * Operation name. + * CancelOperationRequest 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; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @instance */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); + CancelOperationRequest.prototype.name = ""; /** - * Creates a new Operation instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @function create - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance */ - Operation.create = function create(properties) { - return new Operation(properties); + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); }; /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encode - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.longrunning.IOperation} message Operation 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 */ - Operation.encode = function encode(message, writer) { + CancelOperationRequest.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; }; /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.longrunning.IOperation} message Operation 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 */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Operation message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.Operation + * @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.longrunning.Operation} Operation + * @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 */ - Operation.decode = function decode(reader, length, error) { + CancelOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -89087,22 +139355,6 @@ 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; @@ -89112,183 +139364,122 @@ }; /** - * Decodes an Operation 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.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation + * @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 */ - Operation.decodeDelimited = function decodeDelimited(reader) { + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Operation message. + * Verifies a CancelOperationRequest message. * @function verify - * @memberof google.longrunning.Operation + * @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 */ - Operation.verify = function verify(message) { + CancelOperationRequest.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.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. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; - var message = new $root.google.longrunning.Operation(); + var message = new $root.google.longrunning.CancelOperationRequest(); 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; }; /** - * Creates a plain object from an Operation 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.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.longrunning.Operation} message Operation + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Operation.toObject = function toObject(message, options) { + CancelOperationRequest.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"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Operation to JSON. + * Converts this CancelOperationRequest to JSON. * @function toJSON - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @instance * @returns {Object.} JSON object */ - Operation.prototype.toJSON = function toJSON() { + CancelOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Operation + * Gets the default type url for CancelOperationRequest * @function getTypeUrl - * @memberof google.longrunning.Operation + * @memberof google.longrunning.CancelOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.Operation"; + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; }; - return Operation; + return CancelOperationRequest; })(); - longrunning.GetOperationRequest = (function() { + longrunning.DeleteOperationRequest = (function() { /** - * Properties of a GetOperationRequest. + * Properties of a DeleteOperationRequest. * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name */ /** - * Constructs a new GetOperationRequest. + * Constructs a new DeleteOperationRequest. * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set */ - function GetOperationRequest(properties) { + function DeleteOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89296,35 +139487,35 @@ } /** - * GetOperationRequest name. + * DeleteOperationRequest name. * @member {string} name - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @instance */ - GetOperationRequest.prototype.name = ""; + DeleteOperationRequest.prototype.name = ""; /** - * Creates a new GetOperationRequest instance using the specified properties. + * Creates a new DeleteOperationRequest instance using the specified properties. * @function create - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); }; /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. * @function encode - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest 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 */ - GetOperationRequest.encode = function encode(message, writer) { + DeleteOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -89333,33 +139524,33 @@ }; /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest 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 */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOperationRequest message from the specified reader or buffer. + * Decodes a DeleteOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.GetOperationRequest + * @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.longrunning.GetOperationRequest} GetOperationRequest + * @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 */ - GetOperationRequest.decode = function decode(reader, length, error) { + DeleteOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -89378,30 +139569,30 @@ }; /** - * Decodes a GetOperationRequest 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.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @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 */ - GetOperationRequest.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 GetOperationRequest message. + * Verifies a DeleteOperationRequest message. * @function verify - * @memberof google.longrunning.GetOperationRequest + * @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 */ - GetOperationRequest.verify = function verify(message) { + DeleteOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -89411,32 +139602,32 @@ }; /** - * Creates a GetOperationRequest 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.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; - var message = new $root.google.longrunning.GetOperationRequest(); + var message = new $root.google.longrunning.DeleteOperationRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetOperationRequest 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.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperationRequest.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -89448,55 +139639,53 @@ }; /** - * Converts this GetOperationRequest to JSON. + * Converts this DeleteOperationRequest to JSON. * @function toJSON - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @instance * @returns {Object.} JSON object */ - GetOperationRequest.prototype.toJSON = function toJSON() { + DeleteOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOperationRequest + * Gets the default type url for DeleteOperationRequest * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; }; - return GetOperationRequest; + return DeleteOperationRequest; })(); - longrunning.ListOperationsRequest = (function() { + longrunning.WaitOperationRequest = (function() { /** - * Properties of a ListOperationsRequest. + * Properties of a WaitOperationRequest. * @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 + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout */ /** - * Constructs a new ListOperationsRequest. + * Constructs a new WaitOperationRequest. * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set */ - function ListOperationsRequest(properties) { + function WaitOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89504,119 +139693,91 @@ } /** - * ListOperationsRequest name. + * WaitOperationRequest name. * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @instance */ - ListOperationsRequest.prototype.pageSize = 0; + WaitOperationRequest.prototype.name = ""; /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest * @instance */ - ListOperationsRequest.prototype.pageToken = ""; + WaitOperationRequest.prototype.timeout = null; /** - * Creates a new ListOperationsRequest instance using the specified properties. + * Creates a new WaitOperationRequest instance using the specified properties. * @function create - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); }; /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encode - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest 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 */ - ListOperationsRequest.encode = function encode(message, writer) { + WaitOperationRequest.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); + 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 ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest 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 */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. + * Decodes a WaitOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.ListOperationsRequest + * @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.longrunning.ListOperationsRequest} ListOperationsRequest + * @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 */ - ListOperationsRequest.decode = function decode(reader, length, error) { + WaitOperationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } case 1: { - message.filter = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -89628,149 +139789,137 @@ }; /** - * Decodes a ListOperationsRequest 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.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @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 */ - ListOperationsRequest.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 ListOperationsRequest message. + * Verifies a WaitOperationRequest message. * @function verify - * @memberof google.longrunning.ListOperationsRequest + * @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 */ - ListOperationsRequest.verify = function verify(message) { + WaitOperationRequest.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"; + 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 ListOperationsRequest 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.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; - var message = new $root.google.longrunning.ListOperationsRequest(); + var message = new $root.google.longrunning.WaitOperationRequest(); 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); + 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 ListOperationsRequest 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.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsRequest.toObject = function toObject(message, options) { + WaitOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; object.name = ""; + object.timeout = null; } - 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; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; /** - * Converts this ListOperationsRequest to JSON. + * Converts this WaitOperationRequest to JSON. * @function toJSON - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @instance * @returns {Object.} JSON object */ - ListOperationsRequest.prototype.toJSON = function toJSON() { + WaitOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperationsRequest + * Gets the default type url for WaitOperationRequest * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest + * @memberof google.longrunning.WaitOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; }; - return ListOperationsRequest; + return WaitOperationRequest; })(); - longrunning.ListOperationsResponse = (function() { + longrunning.OperationInfo = (function() { /** - * Properties of a ListOperationsResponse. + * Properties of an OperationInfo. * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType */ /** - * Constructs a new ListOperationsResponse. + * Constructs a new OperationInfo. * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set */ - function ListOperationsResponse(properties) { - this.operations = []; + function OperationInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89778,94 +139927,91 @@ } /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo * @instance */ - ListOperationsResponse.prototype.operations = $util.emptyArray; + OperationInfo.prototype.responseType = ""; /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo * @instance */ - ListOperationsResponse.prototype.nextPageToken = ""; + OperationInfo.prototype.metadataType = ""; /** - * Creates a new ListOperationsResponse instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @function create - * @memberof google.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); }; /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encode - * @memberof google.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse 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 */ - ListOperationsResponse.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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); + 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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse 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 */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.ListOperationsResponse + * @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.longrunning.ListOperationsResponse} ListOperationsResponse + * @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 */ - ListOperationsResponse.decode = function decode(reader, length, error) { + OperationInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + message.responseType = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.metadataType = reader.string(); break; } default: @@ -89877,148 +140023,146 @@ }; /** - * Decodes a ListOperationsResponse 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.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @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 */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + OperationInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOperationsResponse message. + * Verifies an OperationInfo message. * @function verify - * @memberof google.longrunning.ListOperationsResponse + * @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 */ - ListOperationsResponse.verify = function verify(message) { + OperationInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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"; + 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 a ListOperationsResponse 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.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @returns {google.longrunning.OperationInfo} OperationInfo */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) return object; - 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); + 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 a ListOperationsResponse 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.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {google.longrunning.OperationInfo} message OperationInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsResponse.toObject = function toObject(message, options) { + OperationInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - 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 (options.defaults) { + object.responseType = ""; + object.metadataType = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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 ListOperationsResponse to JSON. + * Converts this OperationInfo to JSON. * @function toJSON - * @memberof google.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @instance * @returns {Object.} JSON object */ - ListOperationsResponse.prototype.toJSON = function toJSON() { + OperationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOperationsResponse + * Gets the default type url for OperationInfo * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse + * @memberof google.longrunning.OperationInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + return typeUrlPrefix + "/google.longrunning.OperationInfo"; }; - return ListOperationsResponse; + return OperationInfo; })(); - longrunning.CancelOperationRequest = (function() { + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name + * 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 CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function CancelOperationRequest(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90026,77 +140170,108 @@ } /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - CancelOperationRequest.prototype.name = ""; + Status.prototype.code = 0; /** - * Creates a new CancelOperationRequest 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.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest 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 */ - CancelOperationRequest.encode = function encode(message, writer) { + Status.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.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest 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 */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.CancelOperationRequest + * @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.longrunning.CancelOperationRequest} CancelOperationRequest + * @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 */ - CancelOperationRequest.decode = function decode(reader, length, error) { + Status.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = 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: @@ -90108,122 +140283,170 @@ }; /** - * Decodes a CancelOperationRequest 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.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @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 */ - CancelOperationRequest.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 CancelOperationRequest message. + * Verifies a Status message. * @function verify - * @memberof google.longrunning.CancelOperationRequest + * @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 */ - CancelOperationRequest.verify = function verify(message) { + Status.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.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 CancelOperationRequest 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.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @returns {google.rpc.Status} Status */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); + 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 CancelOperationRequest 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.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelOperationRequest.toObject = function toObject(message, options) { + Status.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.arrays || options.defaults) + 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 CancelOperationRequest to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - CancelOperationRequest.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CancelOperationRequest + * Gets the default type url for Status * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest + * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + return typeUrlPrefix + "/google.rpc.Status"; }; - return CancelOperationRequest; + return Status; })(); - longrunning.DeleteOperationRequest = (function() { + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime */ /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @param {google.type.IInterval=} [properties] Properties to set */ - function DeleteOperationRequest(properties) { + function Interval(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90231,77 +140454,91 @@ } /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval * @instance */ - DeleteOperationRequest.prototype.name = ""; + Interval.prototype.startTime = null; /** - * Creates a new DeleteOperationRequest instance using the specified properties. + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. * @function create - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); + Interval.create = function create(properties) { + return new Interval(properties); }; /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. * @function encode - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {google.type.IInterval} message Interval message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationRequest.encode = function encode(message, writer) { + Interval.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.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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(); return writer; }; /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {google.type.IInterval} message Interval message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + Interval.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * Decodes an Interval message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @returns {google.type.Interval} Interval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationRequest.decode = function decode(reader, length, error) { + Interval.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -90313,123 +140550,143 @@ }; /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * Decodes an Interval message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @returns {google.type.Interval} Interval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + Interval.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteOperationRequest message. + * Verifies an Interval message. * @function verify - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteOperationRequest.verify = function verify(message) { + Interval.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.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } return null; }; /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Interval message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @returns {google.type.Interval} Interval */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * Creates a plain object from an Interval message. Also converts values to other types if specified. * @function toObject - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {google.type.Interval} message Interval * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationRequest.toObject = function toObject(message, options) { + Interval.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.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this DeleteOperationRequest to JSON. + * Converts this Interval to JSON. * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @instance * @returns {Object.} JSON object */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { + Interval.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteOperationRequest + * Gets the default type url for Interval * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest + * @memberof google.type.Interval * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + return typeUrlPrefix + "/google.type.Interval"; }; - return DeleteOperationRequest; + return Interval; })(); - longrunning.WaitOperationRequest = (function() { + type.Money = (function() { /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + * Properties of a Money. + * @memberof google.type + * @interface IMoney + * @property {string|null} [currencyCode] Money currencyCode + * @property {number|Long|null} [units] Money units + * @property {number|null} [nanos] Money nanos */ /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest + * Constructs a new Money. + * @memberof google.type + * @classdesc Represents a Money. + * @implements IMoney * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @param {google.type.IMoney=} [properties] Properties to set */ - function WaitOperationRequest(properties) { + function Money(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90437,91 +140694,105 @@ } /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest + * Money currencyCode. + * @member {string} currencyCode + * @memberof google.type.Money * @instance */ - WaitOperationRequest.prototype.name = ""; + Money.prototype.currencyCode = ""; /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest + * Money units. + * @member {number|Long} units + * @memberof google.type.Money * @instance */ - WaitOperationRequest.prototype.timeout = null; + Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new WaitOperationRequest instance using the specified properties. + * Money nanos. + * @member {number} nanos + * @memberof google.type.Money + * @instance + */ + Money.prototype.nanos = 0; + + /** + * Creates a new Money instance using the specified properties. * @function create - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + * @param {google.type.IMoney=} [properties] Properties to set + * @returns {google.type.Money} Money instance */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); + Money.create = function create(properties) { + return new Money(properties); }; /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. * @function encode - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {google.type.IMoney} message Money message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WaitOperationRequest.encode = function encode(message, writer) { + Money.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); + if (message.units != null && Object.hasOwnProperty.call(message, "units")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); return writer; }; /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {google.type.IMoney} message Money message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + Money.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. + * Decodes a Money message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @returns {google.type.Money} Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WaitOperationRequest.decode = function decode(reader, length, error) { + Money.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.currencyCode = reader.string(); break; } case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.units = reader.int64(); + break; + } + case 3: { + message.nanos = reader.int32(); break; } default: @@ -90533,137 +140804,155 @@ }; /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * Decodes a Money message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @returns {google.type.Money} Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + Money.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WaitOperationRequest message. + * Verifies a Money message. * @function verify - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WaitOperationRequest.verify = function verify(message) { + Money.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.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.units != null && message.hasOwnProperty("units")) + if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) + return "units: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Money message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @returns {google.type.Money} Money */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) + Money.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Money) return object; - 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); - } + var message = new $root.google.type.Money(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.units != null) + if ($util.Long) + (message.units = $util.Long.fromValue(object.units)).unsigned = false; + else if (typeof object.units === "string") + message.units = parseInt(object.units, 10); + else if (typeof object.units === "number") + message.units = object.units; + else if (typeof object.units === "object") + message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * Creates a plain object from a Money message. Also converts values to other types if specified. * @function toObject - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {google.type.Money} message Money * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WaitOperationRequest.toObject = function toObject(message, options) { + Money.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.timeout = null; + object.currencyCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.units = options.longs === String ? "0" : 0; + object.nanos = 0; } - 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); + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.units != null && message.hasOwnProperty("units")) + if (typeof message.units === "number") + object.units = options.longs === String ? String(message.units) : message.units; + else + object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this WaitOperationRequest to JSON. + * Converts this Money to JSON. * @function toJSON - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @instance * @returns {Object.} JSON object */ - WaitOperationRequest.prototype.toJSON = function toJSON() { + Money.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WaitOperationRequest + * Gets the default type url for Money * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest + * @memberof google.type.Money * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + return typeUrlPrefix + "/google.type.Money"; }; - return WaitOperationRequest; + return Money; })(); - longrunning.OperationInfo = (function() { + type.Date = (function() { /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day */ /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @param {google.type.IDate=} [properties] Properties to set */ - function OperationInfo(properties) { + function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90671,91 +140960,105 @@ } /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo + * Date year. + * @member {number} year + * @memberof google.type.Date * @instance */ - OperationInfo.prototype.responseType = ""; + Date.prototype.year = 0; /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo + * Date month. + * @member {number} month + * @memberof google.type.Date * @instance */ - OperationInfo.prototype.metadataType = ""; + Date.prototype.month = 0; /** - * Creates a new OperationInfo instance using the specified properties. + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. * @function create - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); + Date.create = function create(properties) { + return new Date(properties); }; /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encode - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationInfo.encode = function encode(message, writer) { + Date.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); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); return writer; }; /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encodeDelimited - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + Date.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationInfo message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @function decode - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationInfo.decode = function decode(reader, length, error) { + Date.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.responseType = reader.string(); + message.year = reader.int32(); break; } case 2: { - message.metadataType = reader.string(); + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); break; } default: @@ -90767,146 +141070,168 @@ }; /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { + Date.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationInfo message. + * Verifies a Date message. * @function verify - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationInfo.verify = function verify(message) { + Date.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"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; return null; }; /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo + * @returns {google.type.Date} Date */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) return object; - 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); + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; return message; }; /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * Creates a plain object from a Date message. Also converts values to other types if specified. * @function toObject - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static - * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {google.type.Date} message Date * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationInfo.toObject = function toObject(message, options) { + Date.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; + object.year = 0; + object.month = 0; + object.day = 0; } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; return object; }; /** - * Converts this OperationInfo to JSON. + * Converts this Date to JSON. * @function toJSON - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @instance * @returns {Object.} JSON object */ - OperationInfo.prototype.toJSON = function toJSON() { + Date.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationInfo + * Gets the default type url for Date * @function getTypeUrl - * @memberof google.longrunning.OperationInfo + * @memberof google.type.Date * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; + return typeUrlPrefix + "/google.type.Date"; }; - return OperationInfo; + return Date; })(); - return longrunning; - })(); - - google.rpc = (function() { - /** - * Namespace rpc. - * @memberof google - * @namespace + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value */ - var rpc = {}; + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); - rpc.Status = (function() { + type.TimeOfDay = (function() { /** - * 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 + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.type.ITimeOfDay=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function TimeOfDay(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90914,108 +141239,119 @@ } /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay * @instance */ - Status.prototype.code = 0; + TimeOfDay.prototype.hours = 0; /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay * @instance */ - Status.prototype.message = ""; + TimeOfDay.prototype.minutes = 0; /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay * @instance */ - Status.prototype.details = $util.emptyArray; + TimeOfDay.prototype.seconds = 0; /** - * Creates a new Status instance using the specified properties. + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.nanos = 0; + + /** + * Creates a new TimeOfDay instance using the specified properties. * @function create - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance */ - Status.create = function create(properties) { - return new Status(properties); + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); }; /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encode - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer) { + TimeOfDay.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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(); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); return writer; }; /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encodeDelimited - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encodeDelimited = function encodeDelimited(message, writer) { + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Status message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @function decode - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status + * @returns {google.type.TimeOfDay} TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.decode = function decode(reader, length, error) { + TimeOfDay.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.code = reader.int32(); + message.hours = reader.int32(); break; } case 2: { - message.message = reader.string(); + message.minutes = reader.int32(); break; } case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + message.seconds = reader.int32(); + break; + } + case 4: { + message.nanos = reader.int32(); break; } default: @@ -91027,140 +141363,130 @@ }; /** - * Decodes a Status message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status + * @returns {google.type.TimeOfDay} TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Status.decodeDelimited = function decodeDelimited(reader) { + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Status message. + * Verifies a TimeOfDay message. * @function verify - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Status.verify = function verify(message) { + TimeOfDay.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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; - } - } + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status + * @returns {google.type.TimeOfDay} TimeOfDay */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) + TimeOfDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeOfDay) return object; - 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]); - } - } + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. * @function toObject - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static - * @param {google.rpc.Status} message Status + * @param {google.type.TimeOfDay} message TimeOfDay * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + TimeOfDay.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - 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); + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; } + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Status to JSON. + * Converts this TimeOfDay to JSON. * @function toJSON - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + TimeOfDay.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Status + * Gets the default type url for TimeOfDay * @function getTypeUrl - * @memberof google.rpc.Status + * @memberof google.type.TimeOfDay * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TimeOfDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.rpc.Status"; + return typeUrlPrefix + "/google.type.TimeOfDay"; }; - return Status; + return TimeOfDay; })(); - return rpc; + return type; })(); return google; diff --git a/packages/google-ads-admanager/protos/protos.json b/packages/google-ads-admanager/protos/protos.json index 1c5f84623d52..a2e13f188c52 100644 --- a/packages/google-ads-admanager/protos/protos.json +++ b/packages/google-ads-admanager/protos/protos.json @@ -11,7 +11,7 @@ "csharp_namespace": "Google.Ads.AdManager.V1", "go_package": "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager", "java_multiple_files": true, - "java_outer_classname": "UserServiceProto", + "java_outer_classname": "WebPropertyProto", "java_package": "com.google.ads.admanager.v1", "php_namespace": "Google\\Ads\\AdManager\\V1", "ruby_package": "Google::Ads::AdManager::V1" @@ -436,6 +436,299 @@ } } }, + "AdReviewCenterAdStatusEnum": { + "fields": {}, + "nested": { + "AdReviewCenterAdStatus": { + "values": { + "AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED": 0, + "ALLOWED": 1, + "BLOCKED": 2, + "UNREVIEWED": 3 + } + } + } + }, + "AdReviewCenterAd": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/AdReviewCenterAd", + "(google.api.resource).pattern": "networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}", + "(google.api.resource).plural": "adReviewCenterAds", + "(google.api.resource).singular": "adReviewCenterAd" + }, + "oneofs": { + "_previewUrl": { + "oneof": [ + "previewUrl" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "adReviewCenterAdId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "productType": { + "type": "ExchangeSyndicationProductEnum.ExchangeSyndicationProduct", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus", + "id": 4 + }, + "previewUrl": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ExchangeSyndicationProductEnum": { + "fields": {}, + "nested": { + "ExchangeSyndicationProduct": { + "values": { + "EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED": 0, + "DISPLAY": 1, + "MOBILE_APP": 2, + "VIDEO_AND_AUDIO": 3, + "GAMES": 4 + } + } + } + }, + "AdReviewCenterAdService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "SearchAdReviewCenterAds": { + "requestType": "SearchAdReviewCenterAdsRequest", + "responseType": "SearchAdReviewCenterAdsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "BatchAllowAdReviewCenterAds": { + "requestType": "BatchAllowAdReviewCenterAdsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "BatchAllowAdReviewCenterAdsResponse", + "(google.longrunning.operation_info).metadata_type": "BatchAdReviewCenterAdsOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BatchAllowAdReviewCenterAdsResponse", + "metadata_type": "BatchAdReviewCenterAdsOperationMetadata" + } + } + ] + }, + "BatchBlockAdReviewCenterAds": { + "requestType": "BatchBlockAdReviewCenterAdsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "BatchBlockAdReviewCenterAdsResponse", + "(google.longrunning.operation_info).metadata_type": "BatchAdReviewCenterAdsOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BatchBlockAdReviewCenterAdsResponse", + "metadata_type": "BatchAdReviewCenterAdsOperationMetadata" + } + } + ] + } + } + }, + "SearchAdReviewCenterAdsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/WebProperty" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "status": { + "type": "AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adReviewCenterAdId": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateTimeRange": { + "type": "google.type.Interval", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "searchText": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "buyerAccountId": { + "rule": "repeated", + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchAdReviewCenterAdsResponse": { + "fields": { + "adReviewCenterAds": { + "rule": "repeated", + "type": "AdReviewCenterAd", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "BatchAllowAdReviewCenterAdsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/WebProperty" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/AdReviewCenterAd" + } + } + } + }, + "BatchAllowAdReviewCenterAdsResponse": { + "fields": {} + }, + "BatchBlockAdReviewCenterAdsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/WebProperty" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/AdReviewCenterAd" + } + } + } + }, + "BatchBlockAdReviewCenterAdsResponse": { + "fields": {} + }, + "BatchAdReviewCenterAdsOperationMetadata": { + "fields": { + "failedRequests": { + "keyType": "int32", + "type": "google.rpc.Status", + "id": 1 + } + } + }, "AdUnitStatusEnum": { "fields": {}, "nested": { @@ -764,19 +1057,33 @@ } }, "AdUnitSize": { + "oneofs": { + "_size": { + "oneof": [ + "size" + ] + }, + "_environmentType": { + "oneof": [ + "environmentType" + ] + } + }, "fields": { "size": { "type": "Size", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, "environmentType": { "type": "EnvironmentTypeEnum.EnvironmentType", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, "companions": { @@ -787,44 +1094,80 @@ } }, "AdUnitParent": { + "oneofs": { + "_parentAdUnit": { + "oneof": [ + "parentAdUnit" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_adUnitCode": { + "oneof": [ + "adUnitCode" + ] + } + }, "fields": { "parentAdUnit": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit" + "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit", + "proto3_optional": true } }, "displayName": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, "adUnitCode": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } } } }, "LabelFrequencyCap": { + "oneofs": { + "_label": { + "oneof": [ + "label" + ] + }, + "_frequencyCap": { + "oneof": [ + "frequencyCap" + ] + } + }, "fields": { "label": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Label" + "(google.api.resource_reference).type": "admanager.googleapis.com/Label", + "proto3_optional": true } }, "frequencyCap": { "type": "FrequencyCap", - "id": 2 + "id": 2, + "options": { + "proto3_optional": true + } } } }, @@ -1189,19 +1532,14 @@ } } }, - "BandwidthGroup": { + "Application": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/BandwidthGroup", - "(google.api.resource).pattern": "networks/{network_code}/bandwidthGroups/{bandwidth_group}", - "(google.api.resource).plural": "bandwidthGroups", - "(google.api.resource).singular": "bandwidthGroup" + "(google.api.resource).type": "admanager.googleapis.com/Application", + "(google.api.resource).pattern": "networks/{network_code}/applications/{application}", + "(google.api.resource).plural": "applications", + "(google.api.resource).singular": "application" }, "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, "_displayName": { "oneof": [ "displayName" @@ -1213,37 +1551,36 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER", - "proto3_optional": true + "(google.api.field_behavior)": "IDENTIFIER" } }, "displayName": { "type": "string", - "id": 2, + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, - "BandwidthGroupService": { + "ApplicationService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetBandwidthGroup": { - "requestType": "GetBandwidthGroupRequest", - "responseType": "BandwidthGroup", + "GetApplication": { + "requestType": "GetApplicationRequest", + "responseType": "Application", "options": { - "(google.api.http).get": "/v1/{name=networks/*/bandwidthGroups/*}", + "(google.api.http).get": "/v1/{name=networks/*/applications/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/bandwidthGroups/*}" + "get": "/v1/{name=networks/*/applications/*}" } }, { @@ -1251,17 +1588,17 @@ } ] }, - "ListBandwidthGroups": { - "requestType": "ListBandwidthGroupsRequest", - "responseType": "ListBandwidthGroupsResponse", + "ListApplications": { + "requestType": "ListApplicationsRequest", + "responseType": "ListApplicationsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/bandwidthGroups", + "(google.api.http).get": "/v1/{parent=networks/*}/applications", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/bandwidthGroups" + "get": "/v1/{parent=networks/*}/applications" } }, { @@ -1271,19 +1608,19 @@ } } }, - "GetBandwidthGroupRequest": { + "GetApplicationRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + "(google.api.resource_reference).type": "admanager.googleapis.com/Application" } } } }, - "ListBandwidthGroupsRequest": { + "ListApplicationsRequest": { "fields": { "parent": { "type": "string", @@ -1330,11 +1667,11 @@ } } }, - "ListBandwidthGroupsResponse": { + "ListApplicationsResponse": { "fields": { - "bandwidthGroups": { + "applications": { "rule": "repeated", - "type": "BandwidthGroup", + "type": "Application", "id": 1 }, "nextPageToken": { @@ -1347,47 +1684,17 @@ } } }, - "CompanyTypeEnum": { - "fields": {}, - "nested": { - "CompanyType": { - "values": { - "COMPANY_TYPE_UNSPECIFIED": 0, - "ADVERTISER": 1, - "HOUSE_ADVERTISER": 2, - "AGENCY": 3, - "HOUSE_AGENCY": 4, - "AD_NETWORK": 5 - } - } - } - }, - "CompanyCreditStatusEnum": { - "fields": {}, - "nested": { - "CompanyCreditStatus": { - "values": { - "COMPANY_CREDIT_STATUS_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2, - "ON_HOLD": 3, - "STOP": 4, - "BLOCKED": 5 - } - } - } - }, - "Company": { + "AudienceSegment": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/Company", - "(google.api.resource).pattern": "networks/{network_code}/companies/{company}", - "(google.api.resource).plural": "companies", - "(google.api.resource).singular": "company" + "(google.api.resource).type": "admanager.googleapis.com/AudienceSegment", + "(google.api.resource).pattern": "networks/{network_code}/audienceSegments/{audience_segment}", + "(google.api.resource).plural": "audienceSegments", + "(google.api.resource).singular": "audienceSegment" }, "oneofs": { - "_primaryContact": { + "_displayName": { "oneof": [ - "primaryContact" + "displayName" ] } }, @@ -1399,135 +1706,33 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "companyId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, "displayName": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "CompanyTypeEnum.CompanyType", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "address": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "email": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "fax": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "phone": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "externalId": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "comment": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "creditStatus": { - "type": "CompanyCreditStatusEnum.CompanyCreditStatus", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "appliedLabels": { - "rule": "repeated", - "type": "AppliedLabel", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "primaryContact": { - "type": "string", - "id": 13, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Contact", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } - }, - "appliedTeams": { - "rule": "repeated", - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Team" - } - }, - "thirdPartyCompanyId": { - "type": "int64", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } } } }, - "CompanyService": { + "AudienceSegmentService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetCompany": { - "requestType": "GetCompanyRequest", - "responseType": "Company", + "GetAudienceSegment": { + "requestType": "GetAudienceSegmentRequest", + "responseType": "AudienceSegment", "options": { - "(google.api.http).get": "/v1/{name=networks/*/companies/*}", + "(google.api.http).get": "/v1/{name=networks/*/audienceSegments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/companies/*}" + "get": "/v1/{name=networks/*/audienceSegments/*}" } }, { @@ -1535,17 +1740,17 @@ } ] }, - "ListCompanies": { - "requestType": "ListCompaniesRequest", - "responseType": "ListCompaniesResponse", + "ListAudienceSegments": { + "requestType": "ListAudienceSegmentsRequest", + "responseType": "ListAudienceSegmentsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/companies", + "(google.api.http).get": "/v1/{parent=networks/*}/audienceSegments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/companies" + "get": "/v1/{parent=networks/*}/audienceSegments" } }, { @@ -1555,19 +1760,19 @@ } } }, - "GetCompanyRequest": { + "GetAudienceSegmentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Company" + "(google.api.resource_reference).type": "admanager.googleapis.com/AudienceSegment" } } } }, - "ListCompaniesRequest": { + "ListAudienceSegmentsRequest": { "fields": { "parent": { "type": "string", @@ -1614,11 +1819,11 @@ } } }, - "ListCompaniesResponse": { + "ListAudienceSegmentsResponse": { "fields": { - "companies": { + "audienceSegments": { "rule": "repeated", - "type": "Company", + "type": "AudienceSegment", "id": 1 }, "nextPageToken": { @@ -1631,17 +1836,22 @@ } } }, - "Contact": { + "BandwidthGroup": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/Contact", - "(google.api.resource).pattern": "networks/{network_code}/contacts/{contact}", - "(google.api.resource).plural": "contacts", - "(google.api.resource).singular": "contact" + "(google.api.resource).type": "admanager.googleapis.com/BandwidthGroup", + "(google.api.resource).pattern": "networks/{network_code}/bandwidthGroups/{bandwidth_group}", + "(google.api.resource).plural": "bandwidthGroups", + "(google.api.resource).singular": "bandwidthGroup" }, "oneofs": { - "_companyDisplayName": { + "_name": { + "oneof": [ + "name" + ] + }, + "_displayName": { "oneof": [ - "companyDisplayName" + "displayName" ] } }, @@ -1650,12 +1860,13 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "IDENTIFIER", + "proto3_optional": true } }, - "companyDisplayName": { + "displayName": { "type": "string", - "id": 19, + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true @@ -1663,213 +1874,175 @@ } } }, - "CustomFieldDataTypeEnum": { - "fields": {}, - "nested": { - "CustomFieldDataType": { - "values": { - "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED": 0, - "STRING": 1, - "NUMBER": 2, - "TOGGLE": 3, - "DROP_DOWN": 4 - } - } - } - }, - "CustomFieldEntityTypeEnum": { - "fields": {}, - "nested": { - "CustomFieldEntityType": { - "values": { - "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED": 0, - "LINE_ITEM": 1, - "ORDER": 2, - "CREATIVE": 3, - "PROPOSAL": 4, - "PROPOSAL_LINE_ITEM": 5 - } - } - } - }, - "CustomFieldStatusEnum": { - "fields": {}, - "nested": { - "CustomFieldStatus": { - "values": { - "CUSTOM_FIELD_STATUS_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 - } - } - } - }, - "CustomFieldVisibilityEnum": { - "fields": {}, - "nested": { - "CustomFieldVisibility": { - "values": { - "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED": 0, - "HIDDEN": 1, - "READ_ONLY": 2, - "EDITABLE": 3 - } - } - } - }, - "CustomField": { + "BandwidthGroupService": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/CustomField", - "(google.api.resource).pattern": "networks/{network_code}/customFields/{custom_field}", - "(google.api.resource).plural": "customFields", - "(google.api.resource).singular": "customField" + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, - "oneofs": { - "_customFieldId": { - "oneof": [ - "customFieldId" - ] - }, - "_displayName": { - "oneof": [ - "displayName" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_status": { - "oneof": [ - "status" - ] - }, - "_entityType": { - "oneof": [ - "entityType" - ] - }, - "_dataType": { - "oneof": [ - "dataType" + "methods": { + "GetBandwidthGroup": { + "requestType": "GetBandwidthGroupRequest", + "responseType": "BandwidthGroup", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/bandwidthGroups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/bandwidthGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } ] }, - "_visibility": { - "oneof": [ - "visibility" + "ListBandwidthGroups": { + "requestType": "ListBandwidthGroupsRequest", + "responseType": "ListBandwidthGroupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/bandwidthGroups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/bandwidthGroups" + } + }, + { + "(google.api.method_signature)": "parent" + } ] } - }, + } + }, + "GetBandwidthGroupRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + } + } + } + }, + "ListBandwidthGroupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "customFieldId": { - "type": "int64", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "displayName": { + "pageToken": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { + "filter": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "status": { - "type": "CustomFieldStatusEnum.CustomFieldStatus", + "orderBy": { + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "entityType": { - "type": "CustomFieldEntityTypeEnum.CustomFieldEntityType", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "dataType": { - "type": "CustomFieldDataTypeEnum.CustomFieldDataType", - "id": 8, + "skip": { + "type": "int32", + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListBandwidthGroupsResponse": { + "fields": { + "bandwidthGroups": { + "rule": "repeated", + "type": "BandwidthGroup", + "id": 1 }, - "visibility": { - "type": "CustomFieldVisibilityEnum.CustomFieldVisibility", - "id": 9, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } + "nextPageToken": { + "type": "string", + "id": 2 }, - "options": { - "rule": "repeated", - "type": "CustomFieldOption", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "totalSize": { + "type": "int32", + "id": 3 } } }, - "CustomFieldOption": { + "BrowserLanguage": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/BrowserLanguage", + "(google.api.resource).pattern": "networks/{network_code}/browserLanguages/{browser_language}", + "(google.api.resource).plural": "browserLanguages", + "(google.api.resource).singular": "browserLanguage" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + } + }, "fields": { - "customFieldOptionId": { - "type": "int64", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, "displayName": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } } } }, - "CustomFieldService": { + "BrowserLanguageService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetCustomField": { - "requestType": "GetCustomFieldRequest", - "responseType": "CustomField", + "GetBrowserLanguage": { + "requestType": "GetBrowserLanguageRequest", + "responseType": "BrowserLanguage", "options": { - "(google.api.http).get": "/v1/{name=networks/*/customFields/*}", + "(google.api.http).get": "/v1/{name=networks/*/browserLanguages/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/customFields/*}" + "get": "/v1/{name=networks/*/browserLanguages/*}" } }, { @@ -1877,17 +2050,17 @@ } ] }, - "ListCustomFields": { - "requestType": "ListCustomFieldsRequest", - "responseType": "ListCustomFieldsResponse", + "ListBrowserLanguages": { + "requestType": "ListBrowserLanguagesRequest", + "responseType": "ListBrowserLanguagesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/customFields", + "(google.api.http).get": "/v1/{parent=networks/*}/browserLanguages", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/customFields" + "get": "/v1/{parent=networks/*}/browserLanguages" } }, { @@ -1897,19 +2070,19 @@ } } }, - "GetCustomFieldRequest": { + "GetBrowserLanguageRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" + "(google.api.resource_reference).type": "admanager.googleapis.com/BrowserLanguage" } } } }, - "ListCustomFieldsRequest": { + "ListBrowserLanguagesRequest": { "fields": { "parent": { "type": "string", @@ -1956,11 +2129,11 @@ } } }, - "ListCustomFieldsResponse": { + "ListBrowserLanguagesResponse": { "fields": { - "customFields": { + "browserLanguages": { "rule": "repeated", - "type": "CustomField", + "type": "BrowserLanguage", "id": 1 }, "nextPageToken": { @@ -1973,178 +2146,81 @@ } } }, - "CustomFieldValue": { + "Browser": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Browser", + "(google.api.resource).pattern": "networks/{network_code}/browsers/{browser}", + "(google.api.resource).plural": "browsers", + "(google.api.resource).singular": "browser" + }, "oneofs": { - "_value": { + "_displayName": { "oneof": [ - "value" + "displayName" + ] + }, + "_majorVersion": { + "oneof": [ + "majorVersion" + ] + }, + "_minorVersion": { + "oneof": [ + "minorVersion" ] } }, "fields": { - "customField": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" - } - }, - "value": { - "type": "Value", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - } - }, - "nested": { - "Value": { - "oneofs": { - "value": { - "oneof": [ - "dropdownValue", - "stringValue", - "numberValue", - "toggleValue" - ] - } - }, - "fields": { - "dropdownValue": { - "type": "int64", - "id": 1 - }, - "stringValue": { - "type": "string", - "id": 2 - }, - "numberValue": { - "type": "double", - "id": 3 - }, - "toggleValue": { - "type": "bool", - "id": 4 - } - } - } - } - }, - "CustomTargetingKeyStatusEnum": { - "fields": {}, - "nested": { - "CustomTargetingKeyStatus": { - "values": { - "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 - } - } - } - }, - "CustomTargetingKeyTypeEnum": { - "fields": {}, - "nested": { - "CustomTargetingKeyType": { - "values": { - "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED": 0, - "PREDEFINED": 1, - "FREEFORM": 2 - } - } - } - }, - "CustomTargetingKeyReportableTypeEnum": { - "fields": {}, - "nested": { - "CustomTargetingKeyReportableType": { - "values": { - "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED": 0, - "OFF": 1, - "ON": 2, - "CUSTOM_DIMENSION": 3 - } - } - } - }, - "CustomTargetingKey": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/CustomTargetingKey", - "(google.api.resource).pattern": "networks/{network_code}/customTargetingKeys/{custom_targeting_key}", - "(google.api.resource).plural": "customTargetingKeys", - "(google.api.resource).singular": "customTargetingKey" - }, - "fields": { - "name": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "IDENTIFIER" } }, - "customTargetingKeyId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "adTagName": { + "displayName": { "type": "string", - "id": 3, + "id": 2, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "displayName": { + "majorVersion": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "type": { - "type": "CustomTargetingKeyTypeEnum.CustomTargetingKeyType", + "minorVersion": { + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "status": { - "type": "CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reportableType": { - "type": "CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } } } }, - "CustomTargetingKeyService": { + "BrowserService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetCustomTargetingKey": { - "requestType": "GetCustomTargetingKeyRequest", - "responseType": "CustomTargetingKey", + "GetBrowser": { + "requestType": "GetBrowserRequest", + "responseType": "Browser", "options": { - "(google.api.http).get": "/v1/{name=networks/*/customTargetingKeys/*}", + "(google.api.http).get": "/v1/{name=networks/*/browsers/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/customTargetingKeys/*}" + "get": "/v1/{name=networks/*/browsers/*}" } }, { @@ -2152,17 +2228,17 @@ } ] }, - "ListCustomTargetingKeys": { - "requestType": "ListCustomTargetingKeysRequest", - "responseType": "ListCustomTargetingKeysResponse", + "ListBrowsers": { + "requestType": "ListBrowsersRequest", + "responseType": "ListBrowsersResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/customTargetingKeys", + "(google.api.http).get": "/v1/{parent=networks/*}/browsers", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/customTargetingKeys" + "get": "/v1/{parent=networks/*}/browsers" } }, { @@ -2172,19 +2248,19 @@ } } }, - "GetCustomTargetingKeyRequest": { + "GetBrowserRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey" + "(google.api.resource_reference).type": "admanager.googleapis.com/Browser" } } } }, - "ListCustomTargetingKeysRequest": { + "ListBrowsersRequest": { "fields": { "parent": { "type": "string", @@ -2231,11 +2307,11 @@ } } }, - "ListCustomTargetingKeysResponse": { + "ListBrowsersResponse": { "fields": { - "customTargetingKeys": { + "browsers": { "rule": "repeated", - "type": "CustomTargetingKey", + "type": "Browser", "id": 1 }, "nextPageToken": { @@ -2248,40 +2324,24 @@ } } }, - "CustomTargetingValueStatusEnum": { + "CmsMetadataKeyStatusEnum": { "fields": {}, "nested": { - "CustomTargetingValueStatus": { + "CmsMetadataKeyStatus": { "values": { - "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED": 0, + "CMS_METADATA_KEY_STATUS_UNSPECIFIED": 0, "ACTIVE": 1, "INACTIVE": 2 } } } }, - "CustomTargetingValueMatchTypeEnum": { - "fields": {}, - "nested": { - "CustomTargetingValueMatchType": { - "values": { - "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED": 0, - "EXACT": 1, - "BROAD": 2, - "PREFIX": 3, - "BROAD_PREFIX": 4, - "SUFFIX": 5, - "CONTAINS": 6 - } - } - } - }, - "CustomTargetingValue": { + "CmsMetadataKey": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/CustomTargetingValue", - "(google.api.resource).pattern": "networks/{network_code}/customTargetingValues/{custom_targeting_value}", - "(google.api.resource).plural": "customTargetingValues", - "(google.api.resource).singular": "customTargetingValue" + "(google.api.resource).type": "admanager.googleapis.com/CmsMetadataKey", + "(google.api.resource).pattern": "networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}", + "(google.api.resource).plural": "cmsMetadataKeys", + "(google.api.resource).singular": "cmsMetadataKey" }, "fields": { "name": { @@ -2291,65 +2351,39 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "customTargetingKey": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey" - } - }, - "adTagName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, "displayName": { "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "matchType": { - "type": "CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType", - "id": 6, + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "status": { - "type": "CustomTargetingValueStatusEnum.CustomTargetingValueStatus", - "id": 7, + "type": "CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus", + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "CustomTargetingValueService": { + "CmsMetadataKeyService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetCustomTargetingValue": { - "requestType": "GetCustomTargetingValueRequest", - "responseType": "CustomTargetingValue", + "GetCmsMetadataKey": { + "requestType": "GetCmsMetadataKeyRequest", + "responseType": "CmsMetadataKey", "options": { - "(google.api.http).get": "/v1/{name=networks/*/customTargetingValues/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}", + "(google.api.http).get": "/v1/{name=networks/*/cmsMetadataKeys/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/customTargetingValues/*}", - "additional_bindings": { - "get": "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}" - } + "get": "/v1/{name=networks/*/cmsMetadataKeys/*}" } }, { @@ -2357,21 +2391,17 @@ } ] }, - "ListCustomTargetingValues": { - "requestType": "ListCustomTargetingValuesRequest", - "responseType": "ListCustomTargetingValuesResponse", + "ListCmsMetadataKeys": { + "requestType": "ListCmsMetadataKeysRequest", + "responseType": "ListCmsMetadataKeysResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/customTargetingValues", - "(google.api.http).additional_bindings.get": "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues", + "(google.api.http).get": "/v1/{parent=networks/*}/cmsMetadataKeys", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/customTargetingValues", - "additional_bindings": { - "get": "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues" - } + "get": "/v1/{parent=networks/*}/cmsMetadataKeys" } }, { @@ -2381,19 +2411,19 @@ } } }, - "GetCustomTargetingValueRequest": { + "GetCmsMetadataKeyRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingValue" + "(google.api.resource_reference).type": "admanager.googleapis.com/CmsMetadataKey" } } } }, - "ListCustomTargetingValuesRequest": { + "ListCmsMetadataKeysRequest": { "fields": { "parent": { "type": "string", @@ -2440,11 +2470,11 @@ } } }, - "ListCustomTargetingValuesResponse": { + "ListCmsMetadataKeysResponse": { "fields": { - "customTargetingValues": { + "cmsMetadataKeys": { "rule": "repeated", - "type": "CustomTargetingValue", + "type": "CmsMetadataKey", "id": 1 }, "nextPageToken": { @@ -2457,31 +2487,25 @@ } } }, - "DealBuyerPermissionTypeEnum": { + "CmsMetadataValueStatusEnum": { "fields": {}, "nested": { - "DealBuyerPermissionType": { + "CmsMetadataValueStatus": { "values": { - "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED": 0, - "NEGOTIATOR_ONLY": 1, - "BIDDER": 2 + "CMS_METADATA_VALUE_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "ARCHIVED": 2, + "INACTIVE": 3 } } } }, - "DeviceCategory": { + "CmsMetadataValue": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/DeviceCategory", - "(google.api.resource).pattern": "networks/{network_code}/deviceCategories/{device_category}", - "(google.api.resource).plural": "deviceCategories", - "(google.api.resource).singular": "deviceCategory" - }, - "oneofs": { - "_displayName": { - "oneof": [ - "displayName" - ] - } + "(google.api.resource).type": "admanager.googleapis.com/CmsMetadataValue", + "(google.api.resource).pattern": "networks/{network_code}/cmsMetadataValues/{cms_metadata_value}", + "(google.api.resource).plural": "cmsMetadataValues", + "(google.api.resource).singular": "cmsMetadataValue" }, "fields": { "name": { @@ -2493,31 +2517,42 @@ }, "displayName": { "type": "string", - "id": 2, + "id": 3 + }, + "key": { + "type": "string", + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "admanager.googleapis.com/CmsMetadataKey" + } + }, + "status": { + "type": "CmsMetadataValueStatusEnum.CmsMetadataValueStatus", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "DeviceCategoryService": { + "CmsMetadataValueService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetDeviceCategory": { - "requestType": "GetDeviceCategoryRequest", - "responseType": "DeviceCategory", + "GetCmsMetadataValue": { + "requestType": "GetCmsMetadataValueRequest", + "responseType": "CmsMetadataValue", "options": { - "(google.api.http).get": "/v1/{name=networks/*/deviceCategories/*}", + "(google.api.http).get": "/v1/{name=networks/*/cmsMetadataValues/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/deviceCategories/*}" + "get": "/v1/{name=networks/*/cmsMetadataValues/*}" } }, { @@ -2525,17 +2560,17 @@ } ] }, - "ListDeviceCategories": { - "requestType": "ListDeviceCategoriesRequest", - "responseType": "ListDeviceCategoriesResponse", + "ListCmsMetadataValues": { + "requestType": "ListCmsMetadataValuesRequest", + "responseType": "ListCmsMetadataValuesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/deviceCategories", + "(google.api.http).get": "/v1/{parent=networks/*}/cmsMetadataValues", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/deviceCategories" + "get": "/v1/{parent=networks/*}/cmsMetadataValues" } }, { @@ -2545,19 +2580,19 @@ } } }, - "GetDeviceCategoryRequest": { + "GetCmsMetadataValueRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" + "(google.api.resource_reference).type": "admanager.googleapis.com/CmsMetadataValue" } } } }, - "ListDeviceCategoriesRequest": { + "ListCmsMetadataValuesRequest": { "fields": { "parent": { "type": "string", @@ -2604,11 +2639,11 @@ } } }, - "ListDeviceCategoriesResponse": { + "ListCmsMetadataValuesResponse": { "fields": { - "deviceCategories": { + "cmsMetadataValues": { "rule": "repeated", - "type": "DeviceCategory", + "type": "CmsMetadataValue", "id": 1 }, "nextPageToken": { @@ -2621,40 +2656,111 @@ } } }, - "EntitySignalsMapping": { + "CompanyTypeEnum": { + "fields": {}, + "nested": { + "CompanyType": { + "values": { + "COMPANY_TYPE_UNSPECIFIED": 0, + "ADVERTISER": 1, + "HOUSE_ADVERTISER": 2, + "AGENCY": 3, + "HOUSE_AGENCY": 4, + "AD_NETWORK": 5 + } + } + } + }, + "CompanyCreditStatusEnum": { + "fields": {}, + "nested": { + "CompanyCreditStatus": { + "values": { + "COMPANY_CREDIT_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "ON_HOLD": 3, + "STOP": 4, + "BLOCKED": 5 + } + } + } + }, + "Company": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/EntitySignalsMapping", - "(google.api.resource).pattern": "networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}", - "(google.api.resource).plural": "entitySignalsMappings", - "(google.api.resource).singular": "entitySignalsMapping" + "(google.api.resource).type": "admanager.googleapis.com/Company", + "(google.api.resource).pattern": "networks/{network_code}/companies/{company}", + "(google.api.resource).plural": "companies", + "(google.api.resource).singular": "company" }, "oneofs": { - "entity": { + "_companyId": { "oneof": [ - "audienceSegmentId", - "contentBundleId", - "customTargetingValueId" + "companyId" ] }, - "_entitySignalsMappingId": { + "_displayName": { "oneof": [ - "entitySignalsMappingId" + "displayName" ] - } - }, - "fields": { - "audienceSegmentId": { - "type": "int64", - "id": 3 }, - "contentBundleId": { - "type": "int64", - "id": 4 + "_type": { + "oneof": [ + "type" + ] }, - "customTargetingValueId": { - "type": "int64", - "id": 5 + "_address": { + "oneof": [ + "address" + ] + }, + "_email": { + "oneof": [ + "email" + ] + }, + "_fax": { + "oneof": [ + "fax" + ] + }, + "_phone": { + "oneof": [ + "phone" + ] + }, + "_externalId": { + "oneof": [ + "externalId" + ] + }, + "_comment": { + "oneof": [ + "comment" + ] + }, + "_creditStatus": { + "oneof": [ + "creditStatus" + ] + }, + "_primaryContact": { + "oneof": [ + "primaryContact" + ] + }, + "_thirdPartyCompanyId": { + "oneof": [ + "thirdPartyCompanyId" + ] }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + } + }, + "fields": { "name": { "type": "string", "id": 1, @@ -2662,7 +2768,7 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "entitySignalsMappingId": { + "companyId": { "type": "int64", "id": 2, "options": { @@ -2670,33 +2776,139 @@ "proto3_optional": true } }, - "taxonomyCategoryIds": { - "rule": "repeated", - "type": "int64", + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "type": { + "type": "CompanyTypeEnum.CompanyType", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "address": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "email": { + "type": "string", "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "fax": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "phone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalId": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "comment": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "creditStatus": { + "type": "CompanyCreditStatusEnum.CompanyCreditStatus", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "appliedLabels": { + "rule": "repeated", + "type": "AppliedLabel", + "id": 12, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "primaryContact": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Contact", + "proto3_optional": true + } + }, + "appliedTeams": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" + } + }, + "thirdPartyCompanyId": { + "type": "int64", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } } } }, - "EntitySignalsMappingService": { + "CompanyService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetEntitySignalsMapping": { - "requestType": "GetEntitySignalsMappingRequest", - "responseType": "EntitySignalsMapping", + "GetCompany": { + "requestType": "GetCompanyRequest", + "responseType": "Company", "options": { - "(google.api.http).get": "/v1/{name=networks/*/entitySignalsMappings/*}", + "(google.api.http).get": "/v1/{name=networks/*/companies/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/entitySignalsMappings/*}" + "get": "/v1/{name=networks/*/companies/*}" } }, { @@ -2704,119 +2916,39 @@ } ] }, - "ListEntitySignalsMappings": { - "requestType": "ListEntitySignalsMappingsRequest", - "responseType": "ListEntitySignalsMappingsResponse", + "ListCompanies": { + "requestType": "ListCompaniesRequest", + "responseType": "ListCompaniesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/entitySignalsMappings", + "(google.api.http).get": "/v1/{parent=networks/*}/companies", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/entitySignalsMappings" + "get": "/v1/{parent=networks/*}/companies" } }, { "(google.api.method_signature)": "parent" } ] - }, - "CreateEntitySignalsMapping": { - "requestType": "CreateEntitySignalsMappingRequest", - "responseType": "EntitySignalsMapping", - "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings", - "(google.api.http).body": "entity_signals_mapping", - "(google.api.method_signature)": "parent,entity_signals_mapping" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=networks/*}/entitySignalsMappings", - "body": "entity_signals_mapping" - } - }, - { - "(google.api.method_signature)": "parent,entity_signals_mapping" - } - ] - }, - "UpdateEntitySignalsMapping": { - "requestType": "UpdateEntitySignalsMappingRequest", - "responseType": "EntitySignalsMapping", - "options": { - "(google.api.http).patch": "/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}", - "(google.api.http).body": "entity_signals_mapping", - "(google.api.method_signature)": "entity_signals_mapping,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}", - "body": "entity_signals_mapping" - } - }, - { - "(google.api.method_signature)": "entity_signals_mapping,update_mask" - } - ] - }, - "BatchCreateEntitySignalsMappings": { - "requestType": "BatchCreateEntitySignalsMappingsRequest", - "responseType": "BatchCreateEntitySignalsMappingsResponse", - "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings:batchCreate", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,requests" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=networks/*}/entitySignalsMappings:batchCreate", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,requests" - } - ] - }, - "BatchUpdateEntitySignalsMappings": { - "requestType": "BatchUpdateEntitySignalsMappingsRequest", - "responseType": "BatchUpdateEntitySignalsMappingsResponse", - "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,requests" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,requests" - } - ] } } }, - "GetEntitySignalsMappingRequest": { + "GetCompanyRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/EntitySignalsMapping" + "(google.api.resource_reference).type": "admanager.googleapis.com/Company" } } } }, - "ListEntitySignalsMappingsRequest": { + "ListCompaniesRequest": { "fields": { "parent": { "type": "string", @@ -2863,48 +2995,11 @@ } } }, - "CreateEntitySignalsMappingRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" - } - }, - "entitySignalsMapping": { - "type": "EntitySignalsMapping", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateEntitySignalsMappingRequest": { - "fields": { - "entitySignalsMapping": { - "type": "EntitySignalsMapping", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListEntitySignalsMappingsResponse": { + "ListCompaniesResponse": { "fields": { - "entitySignalsMappings": { + "companies": { "rule": "repeated", - "type": "EntitySignalsMapping", + "type": "Company", "id": 1 }, "nextPageToken": { @@ -2917,70 +3012,28 @@ } } }, - "BatchCreateEntitySignalsMappingsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" - } - }, - "requests": { - "rule": "repeated", - "type": "CreateEntitySignalsMappingRequest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "BatchCreateEntitySignalsMappingsResponse": { - "fields": { - "entitySignalsMappings": { - "rule": "repeated", - "type": "EntitySignalsMapping", - "id": 1 - } - } - }, - "BatchUpdateEntitySignalsMappingsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" - } - }, - "requests": { - "rule": "repeated", - "type": "UpdateEntitySignalsMappingRequest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "ContactStatusEnum": { + "fields": {}, + "nested": { + "ContactStatus": { + "values": { + "CONTACT_STATUS_UNSPECIFIED": 0, + "INVITE_CANCELED": 1, + "INVITE_EXPIRED": 2, + "INVITE_PENDING": 3, + "UNINVITED": 4, + "USER_ACTIVE": 5, + "USER_DISABLED": 6 } } } }, - "BatchUpdateEntitySignalsMappingsResponse": { - "fields": { - "entitySignalsMappings": { - "rule": "repeated", - "type": "EntitySignalsMapping", - "id": 1 - } - } - }, - "GeoTarget": { + "Contact": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/GeoTarget", - "(google.api.resource).pattern": "networks/{network_code}/geoTargets/{geo_target}", - "(google.api.resource).plural": "geoTargets", - "(google.api.resource).singular": "geoTarget" + "(google.api.resource).type": "admanager.googleapis.com/Contact", + "(google.api.resource).pattern": "networks/{network_code}/contacts/{contact}", + "(google.api.resource).plural": "contacts", + "(google.api.resource).singular": "contact" }, "oneofs": { "_displayName": { @@ -2988,24 +3041,49 @@ "displayName" ] }, - "_canonicalParent": { + "_company": { "oneof": [ - "canonicalParent" + "company" ] }, - "_regionCode": { + "_status": { "oneof": [ - "regionCode" + "status" ] }, - "_type": { + "_address": { "oneof": [ - "type" + "address" ] }, - "_targetable": { + "_cellPhone": { "oneof": [ - "targetable" + "cellPhone" + ] + }, + "_comment": { + "oneof": [ + "comment" + ] + }, + "_email": { + "oneof": [ + "email" + ] + }, + "_fax": { + "oneof": [ + "fax" + ] + }, + "_title": { + "oneof": [ + "title" + ] + }, + "_workPhone": { + "oneof": [ + "workPhone" ] } }, @@ -3019,72 +3097,104 @@ }, "displayName": { "type": "string", - "id": 2, + "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "canonicalParent": { + "company": { "type": "string", - "id": 3, + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget", + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "admanager.googleapis.com/Company", "proto3_optional": true } }, - "parentNames": { - "rule": "repeated", - "type": "string", - "id": 4, + "status": { + "type": "ContactStatusEnum.ContactStatus", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "regionCode": { + "address": { "type": "string", - "id": 5, + "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "type": { + "cellPhone": { "type": "string", - "id": 6, + "id": 8, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "targetable": { - "type": "bool", - "id": 7, + "comment": { + "type": "string", + "id": 9, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "email": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "fax": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "title": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "workPhone": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, - "GeoTargetService": { + "ContactService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetGeoTarget": { - "requestType": "GetGeoTargetRequest", - "responseType": "GeoTarget", + "GetContact": { + "requestType": "GetContactRequest", + "responseType": "Contact", "options": { - "(google.api.http).get": "/v1/{name=networks/*/geoTargets/*}", + "(google.api.http).get": "/v1/{name=networks/*/contacts/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/geoTargets/*}" + "get": "/v1/{name=networks/*/contacts/*}" } }, { @@ -3092,39 +3202,119 @@ } ] }, - "ListGeoTargets": { - "requestType": "ListGeoTargetsRequest", - "responseType": "ListGeoTargetsResponse", + "ListContacts": { + "requestType": "ListContactsRequest", + "responseType": "ListContactsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/geoTargets", + "(google.api.http).get": "/v1/{parent=networks/*}/contacts", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/geoTargets" + "get": "/v1/{parent=networks/*}/contacts" } }, { "(google.api.method_signature)": "parent" } ] + }, + "CreateContact": { + "requestType": "CreateContactRequest", + "responseType": "Contact", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/contacts", + "(google.api.http).body": "contact", + "(google.api.method_signature)": "parent,contact" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/contacts", + "body": "contact" + } + }, + { + "(google.api.method_signature)": "parent,contact" + } + ] + }, + "BatchCreateContacts": { + "requestType": "BatchCreateContactsRequest", + "responseType": "BatchCreateContactsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/contacts:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/contacts:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "UpdateContact": { + "requestType": "UpdateContactRequest", + "responseType": "Contact", + "options": { + "(google.api.http).patch": "/v1/{contact.name=networks/*/contacts/*}", + "(google.api.http).body": "contact", + "(google.api.method_signature)": "contact,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{contact.name=networks/*/contacts/*}", + "body": "contact" + } + }, + { + "(google.api.method_signature)": "contact,update_mask" + } + ] + }, + "BatchUpdateContacts": { + "requestType": "BatchUpdateContactsRequest", + "responseType": "BatchUpdateContactsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/contacts:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/contacts:batchUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] } } }, - "GetGeoTargetRequest": { + "GetContactRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" + "(google.api.resource_reference).type": "admanager.googleapis.com/Contact" } } } }, - "ListGeoTargetsRequest": { + "ListContactsRequest": { "fields": { "parent": { "type": "string", @@ -3171,11 +3361,11 @@ } } }, - "ListGeoTargetsResponse": { + "ListContactsResponse": { "fields": { - "geoTargets": { + "contacts": { "rule": "repeated", - "type": "GeoTarget", + "type": "Contact", "id": 1 }, "nextPageToken": { @@ -3188,139 +3378,142 @@ } } }, - "Label": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/Label", - "(google.api.resource).pattern": "networks/{network_code}/labels/{label}", - "(google.api.resource).plural": "labels", - "(google.api.resource).singular": "label" - }, + "CreateContactRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } - } - } - }, - "LiveStreamEvent": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/LiveStreamEvent", - "(google.api.resource).pattern": "networks/{network_code}/liveStreamEvents/{live_stream_event}", - "(google.api.resource).plural": "liveStreamEvents", - "(google.api.resource).singular": "liveStreamEvent" - }, - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "contact": { + "type": "Contact", + "id": 2, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "Network": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/Network", - "(google.api.resource).pattern": "networks/{network_code}", - "(google.api.resource).plural": "networks", - "(google.api.resource).singular": "network" - }, + "BatchCreateContactsRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "displayName": { - "type": "string", + "requests": { + "rule": "repeated", + "type": "CreateContactRequest", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } - }, - "networkCode": { - "type": "string", - "id": 3, + } + } + }, + "BatchCreateContactsResponse": { + "fields": { + "contacts": { + "rule": "repeated", + "type": "Contact", + "id": 1 + } + } + }, + "UpdateContactRequest": { + "fields": { + "contact": { + "type": "Contact", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "propertyCode": { - "type": "string", - "id": 4, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } - }, - "timeZone": { + } + } + }, + "BatchUpdateContactsRequest": { + "fields": { + "parent": { "type": "string", - "id": 5, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "currencyCode": { - "type": "string", - "id": 6, + "requests": { + "rule": "repeated", + "type": "UpdateContactRequest", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } - }, - "secondaryCurrencyCodes": { + } + } + }, + "BatchUpdateContactsResponse": { + "fields": { + "contacts": { "rule": "repeated", + "type": "Contact", + "id": 1 + } + } + }, + "ContentBundle": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/ContentBundle", + "(google.api.resource).pattern": "networks/{network_code}/contentBundles/{content_bundle}", + "(google.api.resource).plural": "contentBundles", + "(google.api.resource).singular": "contentBundle" + }, + "fields": { + "name": { "type": "string", - "id": 7, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "effectiveRootAdUnit": { + "displayName": { "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit" - } - }, - "testNetwork": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "networkId": { - "type": "int64", - "id": 11, + "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "NetworkService": { + "ContentBundleService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetNetwork": { - "requestType": "GetNetworkRequest", - "responseType": "Network", + "GetContentBundle": { + "requestType": "GetContentBundleRequest", + "responseType": "ContentBundle", "options": { - "(google.api.http).get": "/v1/{name=networks/*}", + "(google.api.http).get": "/v1/{name=networks/*/contentBundles/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*}" + "get": "/v1/{name=networks/*/contentBundles/*}" } }, { @@ -3328,59 +3521,108 @@ } ] }, - "ListNetworks": { - "requestType": "ListNetworksRequest", - "responseType": "ListNetworksResponse", + "ListContentBundles": { + "requestType": "ListContentBundlesRequest", + "responseType": "ListContentBundlesResponse", "options": { - "(google.api.http).get": "/v1/networks" + "(google.api.http).get": "/v1/{parent=networks/*}/contentBundles", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/networks" + "get": "/v1/{parent=networks/*}/contentBundles" } + }, + { + "(google.api.method_signature)": "parent" } ] } } }, - "GetNetworkRequest": { + "GetContentBundleRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + "(google.api.resource_reference).type": "admanager.googleapis.com/ContentBundle" } } } }, - "ListNetworksRequest": { - "fields": {} + "ListContentBundlesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - "ListNetworksResponse": { + "ListContentBundlesResponse": { "fields": { - "networks": { + "contentBundles": { "rule": "repeated", - "type": "Network", + "type": "ContentBundle", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 } } }, - "OperatingSystem": { + "ContentLabel": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/OperatingSystem", - "(google.api.resource).pattern": "networks/{network_code}/operatingSystems/{operating_system}", - "(google.api.resource).plural": "operatingSystems", - "(google.api.resource).singular": "operatingSystem" - }, - "oneofs": { - "_displayName": { - "oneof": [ - "displayName" - ] - } + "(google.api.resource).type": "admanager.googleapis.com/ContentLabel", + "(google.api.resource).pattern": "networks/{network_code}/contentLabels/{content_label}", + "(google.api.resource).plural": "contentLabels", + "(google.api.resource).singular": "contentLabel" }, "fields": { "name": { @@ -3394,29 +3636,28 @@ "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "OperatingSystemService": { + "ContentLabelService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetOperatingSystem": { - "requestType": "GetOperatingSystemRequest", - "responseType": "OperatingSystem", + "GetContentLabel": { + "requestType": "GetContentLabelRequest", + "responseType": "ContentLabel", "options": { - "(google.api.http).get": "/v1/{name=networks/*/operatingSystems/*}", + "(google.api.http).get": "/v1/{name=networks/*/contentLabels/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/operatingSystems/*}" + "get": "/v1/{name=networks/*/contentLabels/*}" } }, { @@ -3424,17 +3665,17 @@ } ] }, - "ListOperatingSystems": { - "requestType": "ListOperatingSystemsRequest", - "responseType": "ListOperatingSystemsResponse", + "ListContentLabels": { + "requestType": "ListContentLabelsRequest", + "responseType": "ListContentLabelsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/operatingSystems", + "(google.api.http).get": "/v1/{parent=networks/*}/contentLabels", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/operatingSystems" + "get": "/v1/{parent=networks/*}/contentLabels" } }, { @@ -3444,19 +3685,19 @@ } } }, - "GetOperatingSystemRequest": { + "GetContentLabelRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" + "(google.api.resource_reference).type": "admanager.googleapis.com/ContentLabel" } } } }, - "ListOperatingSystemsRequest": { + "ListContentLabelsRequest": { "fields": { "parent": { "type": "string", @@ -3503,11 +3744,11 @@ } } }, - "ListOperatingSystemsResponse": { + "ListContentLabelsResponse": { "fields": { - "operatingSystems": { + "contentLabels": { "rule": "repeated", - "type": "OperatingSystem", + "type": "ContentLabel", "id": 1 }, "nextPageToken": { @@ -3520,27 +3761,17 @@ } } }, - "OperatingSystemVersion": { + "Content": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/OperatingSystemVersion", - "(google.api.resource).pattern": "networks/{network_code}/operatingSystemVersions/{operating_system_version}", - "(google.api.resource).plural": "operatingSystemVersions", - "(google.api.resource).singular": "operatingSystemVersion" + "(google.api.resource).type": "admanager.googleapis.com/Content", + "(google.api.resource).pattern": "networks/{network_code}/content/{content}", + "(google.api.resource).plural": "content", + "(google.api.resource).singular": "content" }, "oneofs": { - "_majorVersion": { - "oneof": [ - "majorVersion" - ] - }, - "_minorVersion": { - "oneof": [ - "minorVersion" - ] - }, - "_microVersion": { + "_displayName": { "oneof": [ - "microVersion" + "displayName" ] } }, @@ -3552,49 +3783,33 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "majorVersion": { - "type": "int32", + "displayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } - }, - "minorVersion": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "microVersion": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } } } }, - "OperatingSystemVersionService": { + "ContentService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetOperatingSystemVersion": { - "requestType": "GetOperatingSystemVersionRequest", - "responseType": "OperatingSystemVersion", + "GetContent": { + "requestType": "GetContentRequest", + "responseType": "Content", "options": { - "(google.api.http).get": "/v1/{name=networks/*/operatingSystemVersions/*}", + "(google.api.http).get": "/v1/{name=networks/*/content/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/operatingSystemVersions/*}" + "get": "/v1/{name=networks/*/content/*}" } }, { @@ -3602,17 +3817,17 @@ } ] }, - "ListOperatingSystemVersions": { - "requestType": "ListOperatingSystemVersionsRequest", - "responseType": "ListOperatingSystemVersionsResponse", + "ListContent": { + "requestType": "ListContentRequest", + "responseType": "ListContentResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/operatingSystemVersions", + "(google.api.http).get": "/v1/{parent=networks/*}/content", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/operatingSystemVersions" + "get": "/v1/{parent=networks/*}/content" } }, { @@ -3622,19 +3837,19 @@ } } }, - "GetOperatingSystemVersionRequest": { + "GetContentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" + "(google.api.resource_reference).type": "admanager.googleapis.com/Content" } } } }, - "ListOperatingSystemVersionsRequest": { + "ListContentRequest": { "fields": { "parent": { "type": "string", @@ -3681,11 +3896,11 @@ } } }, - "ListOperatingSystemVersionsResponse": { + "ListContentResponse": { "fields": { - "operatingSystemVersions": { + "content": { "rule": "repeated", - "type": "OperatingSystemVersion", + "type": "Content", "id": 1 }, "nextPageToken": { @@ -3698,124 +3913,82 @@ } } }, - "OrderStatusEnum": { + "CreativeTemplateTypeEnum": { "fields": {}, "nested": { - "OrderStatus": { + "CreativeTemplateType": { "values": { - "ORDER_STATUS_UNSPECIFIED": 0, - "DRAFT": 2, - "PENDING_APPROVAL": 3, - "APPROVED": 4, - "DISAPPROVED": 5, - "PAUSED": 6, - "CANCELED": 7, - "DELETED": 8 + "CREATIVE_TEMPLATE_TYPE_UNSPECIFIED": 0, + "STANDARD": 1, + "CUSTOM": 2 } } } }, - "Order": { + "CreativeTemplateStatusEnum": { + "fields": {}, + "nested": { + "CreativeTemplateStatus": { + "values": { + "CREATIVE_TEMPLATE_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETED": 2, + "INACTIVE": 3 + } + } + } + }, + "CreativeTemplate": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/Order", - "(google.api.resource).pattern": "networks/{network_code}/orders/{order}", - "(google.api.resource).plural": "orders", - "(google.api.resource).singular": "order" + "(google.api.resource).type": "admanager.googleapis.com/CreativeTemplate", + "(google.api.resource).pattern": "networks/{network_code}/creativeTemplates/{creative_template}", + "(google.api.resource).plural": "creativeTemplates", + "(google.api.resource).singular": "creativeTemplate" }, "oneofs": { - "_orderId": { - "oneof": [ - "orderId" - ] - }, "_displayName": { "oneof": [ "displayName" ] }, - "_programmatic": { - "oneof": [ - "programmatic" - ] - }, - "_trafficker": { - "oneof": [ - "trafficker" - ] - }, - "_advertiser": { - "oneof": [ - "advertiser" - ] - }, - "_agency": { - "oneof": [ - "agency" - ] - }, - "_creator": { - "oneof": [ - "creator" - ] - }, - "_currencyCode": { - "oneof": [ - "currencyCode" - ] - }, - "_startTime": { - "oneof": [ - "startTime" - ] - }, - "_endTime": { - "oneof": [ - "endTime" - ] - }, - "_unlimitedEndTime": { - "oneof": [ - "unlimitedEndTime" - ] - }, - "_externalOrderId": { + "_description": { "oneof": [ - "externalOrderId" + "description" ] }, - "_archived": { + "_snippet": { "oneof": [ - "archived" + "snippet" ] }, - "_lastModifiedByApp": { + "_status": { "oneof": [ - "lastModifiedByApp" + "status" ] }, - "_updateTime": { + "_type": { "oneof": [ - "updateTime" + "type" ] }, - "_notes": { + "_interstitial": { "oneof": [ - "notes" + "interstitial" ] }, - "_poNumber": { + "_nativeEligible": { "oneof": [ - "poNumber" + "nativeEligible" ] }, - "_status": { + "_nativeVideoEligible": { "oneof": [ - "status" + "nativeVideoEligible" ] }, - "_salesperson": { + "_safeFrameCompatible": { "oneof": [ - "salesperson" + "safeFrameCompatible" ] } }, @@ -3827,14 +4000,6 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "orderId": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, "displayName": { "type": "string", "id": 2, @@ -3843,284 +4008,473 @@ "proto3_optional": true } }, - "programmatic": { - "type": "bool", + "description": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "trafficker": { + "snippet": { "type": "string", - "id": 23, + "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/User", "proto3_optional": true } }, - "advertiserContacts": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Contact" - } - }, - "advertiser": { - "type": "string", + "status": { + "type": "CreativeTemplateStatusEnum.CreativeTemplateStatus", "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Company", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "agencyContacts": { - "rule": "repeated", - "type": "string", + "type": { + "type": "CreativeTemplateTypeEnum.CreativeTemplateType", "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Contact" + "proto3_optional": true } }, - "agency": { - "type": "string", + "interstitial": { + "type": "bool", "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Company", "proto3_optional": true } }, - "appliedTeams": { - "rule": "repeated", - "type": "string", + "nativeEligible": { + "type": "bool", "id": 9, "options": { "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Team" - } - }, - "effectiveTeams": { - "rule": "repeated", - "type": "string", - "id": 28, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "admanager.googleapis.com/Team" + "proto3_optional": true } }, - "creator": { - "type": "string", + "nativeVideoEligible": { + "type": "bool", "id": 10, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "admanager.googleapis.com/User", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "currencyCode": { - "type": "string", - "id": 11, + "safeFrameCompatible": { + "type": "bool", + "id": 12, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 19, + "variables": { + "rule": "repeated", + "type": "CreativeTemplateVariable", + "id": 14, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "CreativeTemplateVariable": { + "oneofs": { + "SubType": { + "oneof": [ + "assetVariable", + "listStringVariable", + "longVariable", + "stringVariable", + "urlVariable" + ] }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } + "_label": { + "oneof": [ + "label" + ] }, - "unlimitedEndTime": { - "type": "bool", - "id": 45, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } + "_uniqueDisplayName": { + "oneof": [ + "uniqueDisplayName" + ] }, - "externalOrderId": { - "type": "int32", - "id": 13, + "_description": { + "oneof": [ + "description" + ] + }, + "_required": { + "oneof": [ + "required" + ] + } + }, + "fields": { + "assetVariable": { + "type": "AssetCreativeTemplateVariable", + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "archived": { - "type": "bool", - "id": 14, + "listStringVariable": { + "type": "ListStringCreativeTemplateVariable", + "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "lastModifiedByApp": { - "type": "string", - "id": 15, + "longVariable": { + "type": "LongCreativeTemplateVariable", + "id": 8, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 16, + "stringVariable": { + "type": "StringCreativeTemplateVariable", + "id": 9, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "notes": { - "type": "string", - "id": 17, + "urlVariable": { + "type": "UrlCreativeTemplateVariable", + "id": 10, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "poNumber": { + "label": { "type": "string", - "id": 18, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "status": { - "type": "OrderStatusEnum.OrderStatus", - "id": 20, + "uniqueDisplayName": { + "type": "string", + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "salesperson": { + "description": { "type": "string", - "id": 21, + "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/User", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "secondarySalespeople": { - "rule": "repeated", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "UNORDERED_LIST", - "(google.api.resource_reference).type": "admanager.googleapis.com/User" - } - }, - "secondaryTraffickers": { - "rule": "repeated", - "type": "string", - "id": 24, - "options": { - "(google.api.field_behavior)": "UNORDERED_LIST", - "(google.api.resource_reference).type": "admanager.googleapis.com/User" - } - }, - "appliedLabels": { - "rule": "repeated", - "type": "AppliedLabel", - "id": 25, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "effectiveAppliedLabels": { - "rule": "repeated", - "type": "AppliedLabel", - "id": 26, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customFieldValues": { - "rule": "repeated", - "type": "CustomFieldValue", - "id": 38, + "required": { + "type": "bool", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } - } - }, - "OrderService": { - "options": { - "(google.api.default_host)": "admanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, - "methods": { - "GetOrder": { - "requestType": "GetOrderRequest", - "responseType": "Order", - "options": { - "(google.api.http).get": "/v1/{name=networks/*/orders/*}", - "(google.api.method_signature)": "name" + "nested": { + "AssetCreativeTemplateVariable": { + "fields": { + "mimeTypes": { + "rule": "repeated", + "type": "MimeType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=networks/*/orders/*}" + "nested": { + "MimeType": { + "values": { + "MIME_TYPE_UNSPECIFIED": 0, + "JPG": 1, + "PNG": 2, + "GIF": 3 } - }, - { - "(google.api.method_signature)": "name" } - ] + } }, - "ListOrders": { - "requestType": "ListOrdersRequest", - "responseType": "ListOrdersResponse", - "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/orders", - "(google.api.method_signature)": "parent" + "ListStringCreativeTemplateVariable": { + "oneofs": { + "_defaultValue": { + "oneof": [ + "defaultValue" + ] + }, + "_sampleValue": { + "oneof": [ + "sampleValue" + ] + }, + "_allowOtherChoice": { + "oneof": [ + "allowOtherChoice" + ] + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=networks/*}/orders" + "fields": { + "defaultValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "GetOrderRequest": { + "sampleValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "choices": { + "rule": "repeated", + "type": "VariableChoice", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowOtherChoice": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "VariableChoice": { + "oneofs": { + "_label": { + "oneof": [ + "label" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "label": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + } + } + }, + "LongCreativeTemplateVariable": { + "oneofs": { + "_defaultValue": { + "oneof": [ + "defaultValue" + ] + }, + "_sampleValue": { + "oneof": [ + "sampleValue" + ] + } + }, + "fields": { + "defaultValue": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sampleValue": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "StringCreativeTemplateVariable": { + "oneofs": { + "_defaultValue": { + "oneof": [ + "defaultValue" + ] + }, + "_sampleValue": { + "oneof": [ + "sampleValue" + ] + } + }, + "fields": { + "defaultValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sampleValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "UrlCreativeTemplateVariable": { + "oneofs": { + "_defaultValue": { + "oneof": [ + "defaultValue" + ] + }, + "_sampleValue": { + "oneof": [ + "sampleValue" + ] + }, + "_urlType": { + "oneof": [ + "urlType" + ] + } + }, + "fields": { + "defaultValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sampleValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "urlType": { + "type": "CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + } + } + }, + "CreativeTemplateVariableUrlTypeEnum": { + "fields": {}, + "nested": { + "CreativeTemplateVariableUrlType": { + "values": { + "CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED": 0, + "CLICK_TRACKER": 1, + "DEEPLINK": 2, + "IMPRESSION_TRACKER": 3, + "STANDARD_HTTP": 4 + } + } + } + }, + "CreativeTemplateService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetCreativeTemplate": { + "requestType": "GetCreativeTemplateRequest", + "responseType": "CreativeTemplate", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/creativeTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/creativeTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCreativeTemplates": { + "requestType": "ListCreativeTemplatesRequest", + "responseType": "ListCreativeTemplatesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/creativeTemplates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/creativeTemplates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetCreativeTemplateRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Order" + "(google.api.resource_reference).type": "admanager.googleapis.com/CreativeTemplate" } } } }, - "ListOrdersRequest": { + "ListCreativeTemplatesRequest": { "fields": { "parent": { "type": "string", @@ -4167,11 +4521,11 @@ } } }, - "ListOrdersResponse": { + "ListCreativeTemplatesResponse": { "fields": { - "orders": { + "creativeTemplates": { "rule": "repeated", - "type": "Order", + "type": "CreativeTemplate", "id": 1 }, "nextPageToken": { @@ -4184,27 +4538,73 @@ } } }, - "PlacementStatusEnum": { + "CustomFieldDataTypeEnum": { "fields": {}, "nested": { - "PlacementStatus": { + "CustomFieldDataType": { "values": { - "PLACEMENT_STATUS_UNSPECIFIED": 0, + "CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED": 0, + "STRING": 1, + "NUMBER": 2, + "TOGGLE": 3, + "DROP_DOWN": 4 + } + } + } + }, + "CustomFieldEntityTypeEnum": { + "fields": {}, + "nested": { + "CustomFieldEntityType": { + "values": { + "CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED": 0, + "LINE_ITEM": 1, + "ORDER": 2, + "CREATIVE": 3, + "PROPOSAL": 4, + "PROPOSAL_LINE_ITEM": 5 + } + } + } + }, + "CustomFieldStatusEnum": { + "fields": {}, + "nested": { + "CustomFieldStatus": { + "values": { + "CUSTOM_FIELD_STATUS_UNSPECIFIED": 0, "ACTIVE": 1, - "INACTIVE": 2, - "ARCHIVED": 3 + "INACTIVE": 2 } } } }, - "Placement": { + "CustomFieldVisibilityEnum": { + "fields": {}, + "nested": { + "CustomFieldVisibility": { + "values": { + "CUSTOM_FIELD_VISIBILITY_UNSPECIFIED": 0, + "HIDDEN": 1, + "READ_ONLY": 2, + "EDITABLE": 3 + } + } + } + }, + "CustomField": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/Placement", - "(google.api.resource).pattern": "networks/{network_code}/placements/{placement}", - "(google.api.resource).plural": "placements", - "(google.api.resource).singular": "placement" + "(google.api.resource).type": "admanager.googleapis.com/CustomField", + "(google.api.resource).pattern": "networks/{network_code}/customFields/{custom_field}", + "(google.api.resource).plural": "customFields", + "(google.api.resource).singular": "customField" }, "oneofs": { + "_customFieldId": { + "oneof": [ + "customFieldId" + ] + }, "_displayName": { "oneof": [ "displayName" @@ -4215,22 +4615,27 @@ "description" ] }, - "_placementCode": { - "oneof": [ - "placementCode" - ] - }, "_status": { "oneof": [ "status" ] }, - "_updateTime": { + "_entityType": { "oneof": [ - "updateTime" + "entityType" ] - } - }, + }, + "_dataType": { + "oneof": [ + "dataType" + ] + }, + "_visibility": { + "oneof": [ + "visibility" + ] + } + }, "fields": { "name": { "type": "string", @@ -4239,11 +4644,12 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "placementId": { + "customFieldId": { "type": "int64", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, "displayName": { @@ -4262,58 +4668,83 @@ "proto3_optional": true } }, - "placementCode": { - "type": "string", + "status": { + "type": "CustomFieldStatusEnum.CustomFieldStatus", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "status": { - "type": "PlacementStatusEnum.PlacementStatus", - "id": 6, + "entityType": { + "type": "CustomFieldEntityTypeEnum.CustomFieldEntityType", + "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "targetedAdUnits": { - "rule": "repeated", - "type": "string", - "id": 7, + "dataType": { + "type": "CustomFieldDataTypeEnum.CustomFieldDataType", + "id": 8, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, - "updateTime": { - "type": "google.protobuf.Timestamp", + "visibility": { + "type": "CustomFieldVisibilityEnum.CustomFieldVisibility", "id": 9, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } + }, + "options": { + "rule": "repeated", + "type": "CustomFieldOption", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "PlacementService": { + "CustomFieldOption": { + "fields": { + "customFieldOptionId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "NON_EMPTY_DEFAULT" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CustomFieldService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetPlacement": { - "requestType": "GetPlacementRequest", - "responseType": "Placement", + "GetCustomField": { + "requestType": "GetCustomFieldRequest", + "responseType": "CustomField", "options": { - "(google.api.http).get": "/v1/{name=networks/*/placements/*}", + "(google.api.http).get": "/v1/{name=networks/*/customFields/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/placements/*}" + "get": "/v1/{name=networks/*/customFields/*}" } }, { @@ -4321,39 +4752,159 @@ } ] }, - "ListPlacements": { - "requestType": "ListPlacementsRequest", - "responseType": "ListPlacementsResponse", + "ListCustomFields": { + "requestType": "ListCustomFieldsRequest", + "responseType": "ListCustomFieldsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/placements", + "(google.api.http).get": "/v1/{parent=networks/*}/customFields", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/placements" + "get": "/v1/{parent=networks/*}/customFields" } }, { "(google.api.method_signature)": "parent" } ] + }, + "CreateCustomField": { + "requestType": "CreateCustomFieldRequest", + "responseType": "CustomField", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/customFields", + "(google.api.http).body": "custom_field", + "(google.api.method_signature)": "parent,custom_field" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/customFields", + "body": "custom_field" + } + }, + { + "(google.api.method_signature)": "parent,custom_field" + } + ] + }, + "BatchCreateCustomFields": { + "requestType": "BatchCreateCustomFieldsRequest", + "responseType": "BatchCreateCustomFieldsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/customFields:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/customFields:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "UpdateCustomField": { + "requestType": "UpdateCustomFieldRequest", + "responseType": "CustomField", + "options": { + "(google.api.http).patch": "/v1/{custom_field.name=networks/*/customFields/*}", + "(google.api.http).body": "custom_field", + "(google.api.method_signature)": "custom_field,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{custom_field.name=networks/*/customFields/*}", + "body": "custom_field" + } + }, + { + "(google.api.method_signature)": "custom_field,update_mask" + } + ] + }, + "BatchUpdateCustomFields": { + "requestType": "BatchUpdateCustomFieldsRequest", + "responseType": "BatchUpdateCustomFieldsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/customFields:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/customFields:batchUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BatchActivateCustomFields": { + "requestType": "BatchActivateCustomFieldsRequest", + "responseType": "BatchActivateCustomFieldsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/customFields:batchActivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/customFields:batchActivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] + }, + "BatchDeactivateCustomFields": { + "requestType": "BatchDeactivateCustomFieldsRequest", + "responseType": "BatchDeactivateCustomFieldsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/customFields:batchDeactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/customFields:batchDeactivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] } } }, - "GetPlacementRequest": { + "GetCustomFieldRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" } } } }, - "ListPlacementsRequest": { + "ListCustomFieldsRequest": { "fields": { "parent": { "type": "string", @@ -4400,11 +4951,11 @@ } } }, - "ListPlacementsResponse": { + "ListCustomFieldsResponse": { "fields": { - "placements": { + "customFields": { "rule": "repeated", - "type": "Placement", + "type": "CustomField", "id": 1 }, "nextPageToken": { @@ -4417,87 +4968,281 @@ } } }, - "PrivateAuctionDeal": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/PrivateAuctionDeal", - "(google.api.resource).pattern": "networks/{network_code}/privateAuctionDeals/{private_auction_deal}", - "(google.api.resource).plural": "privateAuctionDeals", - "(google.api.resource).singular": "privateAuctionDeal" - }, - "oneofs": { - "_privateAuctionDealId": { - "oneof": [ - "privateAuctionDealId" - ] + "CreateCustomFieldRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "_privateAuctionId": { - "oneof": [ - "privateAuctionId" - ] + "customField": { + "type": "CustomField", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateCustomFieldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "_privateAuctionDisplayName": { - "oneof": [ - "privateAuctionDisplayName" - ] + "requests": { + "rule": "repeated", + "type": "CreateCustomFieldRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateCustomFieldsResponse": { + "fields": { + "customFields": { + "rule": "repeated", + "type": "CustomField", + "id": 1 + } + } + }, + "UpdateCustomFieldRequest": { + "fields": { + "customField": { + "type": "CustomField", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "_buyerAccountId": { - "oneof": [ - "buyerAccountId" - ] - }, - "_externalDealId": { - "oneof": [ - "externalDealId" - ] - }, - "_targeting": { - "oneof": [ - "targeting" - ] + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateCustomFieldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "_endTime": { - "oneof": [ - "endTime" - ] + "requests": { + "rule": "repeated", + "type": "UpdateCustomFieldRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateCustomFieldsResponse": { + "fields": { + "customFields": { + "rule": "repeated", + "type": "CustomField", + "id": 1 + } + } + }, + "BatchActivateCustomFieldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "_floorPrice": { - "oneof": [ - "floorPrice" - ] + "names": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" + } + } + } + }, + "BatchActivateCustomFieldsResponse": { + "fields": {} + }, + "BatchDeactivateCustomFieldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "_status": { + "names": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" + } + } + } + }, + "BatchDeactivateCustomFieldsResponse": { + "fields": {} + }, + "CustomFieldValue": { + "oneofs": { + "_value": { "oneof": [ - "status" + "value" ] + } + }, + "fields": { + "customField": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomField" + } }, - "_auctionPriorityEnabled": { + "value": { + "type": "Value", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + }, + "nested": { + "Value": { + "oneofs": { + "value": { + "oneof": [ + "dropdownValue", + "stringValue", + "numberValue", + "toggleValue" + ] + } + }, + "fields": { + "dropdownValue": { + "type": "int64", + "id": 1 + }, + "stringValue": { + "type": "string", + "id": 2 + }, + "numberValue": { + "type": "double", + "id": 3 + }, + "toggleValue": { + "type": "bool", + "id": 4 + } + } + } + } + }, + "CustomTargetingKeyStatusEnum": { + "fields": {}, + "nested": { + "CustomTargetingKeyStatus": { + "values": { + "CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + } + } + }, + "CustomTargetingKeyTypeEnum": { + "fields": {}, + "nested": { + "CustomTargetingKeyType": { + "values": { + "CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED": 0, + "PREDEFINED": 1, + "FREEFORM": 2 + } + } + } + }, + "CustomTargetingKeyReportableTypeEnum": { + "fields": {}, + "nested": { + "CustomTargetingKeyReportableType": { + "values": { + "CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED": 0, + "OFF": 1, + "ON": 2, + "CUSTOM_DIMENSION": 3 + } + } + } + }, + "CustomTargetingKey": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/CustomTargetingKey", + "(google.api.resource).pattern": "networks/{network_code}/customTargetingKeys/{custom_targeting_key}", + "(google.api.resource).plural": "customTargetingKeys", + "(google.api.resource).singular": "customTargetingKey" + }, + "oneofs": { + "_customTargetingKeyId": { "oneof": [ - "auctionPriorityEnabled" + "customTargetingKeyId" ] }, - "_blockOverrideEnabled": { + "_adTagName": { "oneof": [ - "blockOverrideEnabled" + "adTagName" ] }, - "_buyerPermissionType": { + "_displayName": { "oneof": [ - "buyerPermissionType" + "displayName" ] }, - "_buyerData": { + "_type": { "oneof": [ - "buyerData" + "type" ] }, - "_createTime": { + "_status": { "oneof": [ - "createTime" + "status" ] }, - "_updateTime": { + "_reportableType": { "oneof": [ - "updateTime" + "reportableType" ] } }, @@ -4509,7 +5254,7 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "privateAuctionDealId": { + "customTargetingKeyId": { "type": "int64", "id": 2, "options": { @@ -4517,656 +5262,622 @@ "proto3_optional": true } }, - "privateAuctionId": { - "type": "int64", + "adTagName": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "IMMUTABLE", "proto3_optional": true } }, - "privateAuctionDisplayName": { + "displayName": { "type": "string", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "buyerAccountId": { - "type": "int64", "id": 4, "options": { - "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "externalDealId": { - "type": "int64", + "type": { + "type": "CustomTargetingKeyTypeEnum.CustomTargetingKeyType", "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "targeting": { - "type": "Targeting", + "status": { + "type": "CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus", "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 8, + "reportableType": { + "type": "CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType", + "id": 7, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } - }, - "floorPrice": { - "type": "google.type.Money", - "id": 9, + } + } + }, + "CustomTargetingKeyService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetCustomTargetingKey": { + "requestType": "GetCustomTargetingKeyRequest", + "responseType": "CustomTargetingKey", "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } + "(google.api.http).get": "/v1/{name=networks/*/customTargetingKeys/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/customTargetingKeys/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "creativeSizes": { - "rule": "repeated", - "type": "Size", - "id": 18, + "ListCustomTargetingKeys": { + "requestType": "ListCustomTargetingKeysRequest", + "responseType": "ListCustomTargetingKeysResponse", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "status": { - "type": "PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus", - "id": 10, + "(google.api.http).get": "/v1/{parent=networks/*}/customTargetingKeys", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/customTargetingKeys" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetCustomTargetingKeyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey" } - }, - "auctionPriorityEnabled": { - "type": "bool", - "id": 11, + } + } + }, + "ListCustomTargetingKeysRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "blockOverrideEnabled": { - "type": "bool", - "id": 12, + "pageSize": { + "type": "int32", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "buyerPermissionType": { - "type": "DealBuyerPermissionTypeEnum.DealBuyerPermissionType", - "id": 13, + "pageToken": { + "type": "string", + "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "buyerData": { - "type": "BuyerData", - "id": 14, + "filter": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 15, + "orderBy": { + "type": "string", + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 16, + "skip": { + "type": "int32", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } } - }, + } + }, + "ListCustomTargetingKeysResponse": { + "fields": { + "customTargetingKeys": { + "rule": "repeated", + "type": "CustomTargetingKey", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CustomTargetingValueStatusEnum": { + "fields": {}, "nested": { - "BuyerData": { - "fields": { - "buyerEmails": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "CustomTargetingValueStatus": { + "values": { + "CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 } } } }, - "PrivateMarketplaceDealStatusEnum": { + "CustomTargetingValueMatchTypeEnum": { "fields": {}, "nested": { - "PrivateMarketplaceDealStatus": { + "CustomTargetingValueMatchType": { "values": { - "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED": 0, - "PENDING": 1, - "ACTIVE": 2, - "CANCELED": 3, - "SELLER_PAUSED": 4, - "BUYER_PAUSED": 5 + "CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BROAD": 2, + "PREFIX": 3, + "BROAD_PREFIX": 4, + "SUFFIX": 5, + "CONTAINS": 6 } } } }, - "Targeting": { + "CustomTargetingValue": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/CustomTargetingValue", + "(google.api.resource).pattern": "networks/{network_code}/customTargetingValues/{custom_targeting_value}", + "(google.api.resource).plural": "customTargetingValues", + "(google.api.resource).singular": "customTargetingValue" + }, + "oneofs": { + "_customTargetingKey": { + "oneof": [ + "customTargetingKey" + ] + }, + "_adTagName": { + "oneof": [ + "adTagName" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_matchType": { + "oneof": [ + "matchType" + ] + }, + "_status": { + "oneof": [ + "status" + ] + } + }, "fields": { - "geoTargeting": { - "type": "GeoTargeting", - "id": 2, + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "technologyTargeting": { - "type": "TechnologyTargeting", - "id": 3, + "customTargetingKey": { + "type": "string", + "id": 8, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey", + "proto3_optional": true } }, - "inventoryTargeting": { - "type": "InventoryTargeting", + "adTagName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "displayName": { + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "requestPlatformTargeting": { - "type": "RequestPlatformTargeting", + "matchType": { + "type": "CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType", "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, - "customTargeting": { - "type": "CustomTargeting", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "userDomainTargeting": { - "type": "UserDomainTargeting", - "id": 10, + "status": { + "type": "CustomTargetingValueStatusEnum.CustomTargetingValueStatus", + "id": 7, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } - }, - "videoPositionTargeting": { - "type": "VideoPositionTargeting", - "id": 12, + } + } + }, + "CustomTargetingValueService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetCustomTargetingValue": { + "requestType": "GetCustomTargetingValueRequest", + "responseType": "CustomTargetingValue", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).get": "/v1/{name=networks/*/customTargetingValues/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/customTargetingValues/*}", + "additional_bindings": { + "get": "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "dataSegmentTargeting": { - "type": "DataSegmentTargeting", - "id": 13, + "ListCustomTargetingValues": { + "requestType": "ListCustomTargetingValuesRequest", + "responseType": "ListCustomTargetingValuesResponse", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).get": "/v1/{parent=networks/*}/customTargetingValues", + "(google.api.http).additional_bindings.get": "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/customTargetingValues", + "additional_bindings": { + "get": "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, - "GeoTargeting": { + "GetCustomTargetingValueRequest": { "fields": { - "targetedGeos": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" - } - }, - "excludedGeos": { - "rule": "repeated", + "name": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingValue" } } } }, - "TechnologyTargeting": { + "ListCustomTargetingValuesRequest": { "fields": { - "bandwidthTargeting": { - "type": "BandwidthTargeting", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "deviceCategoryTargeting": { - "type": "DeviceCategoryTargeting", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "operatingSystemTargeting": { - "type": "OperatingSystemTargeting", + "pageSize": { + "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "BandwidthTargeting": { - "fields": { - "targetedBandwidthGroups": { - "rule": "repeated", + }, + "pageToken": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + "(google.api.field_behavior)": "OPTIONAL" } }, - "excludedBandwidthGroups": { - "rule": "repeated", + "filter": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "DeviceCategoryTargeting": { - "fields": { - "targetedCategories": { - "rule": "repeated", + }, + "orderBy": { "type": "string", - "id": 3, + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" + "(google.api.field_behavior)": "OPTIONAL" } }, - "excludedCategories": { - "rule": "repeated", - "type": "string", - "id": 4, + "skip": { + "type": "int32", + "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "OperatingSystemTargeting": { + "ListCustomTargetingValuesResponse": { "fields": { - "targetedOperatingSystems": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" - } - }, - "excludedOperatingSystems": { + "customTargetingValues": { "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" - } + "type": "CustomTargetingValue", + "id": 1 }, - "targetedOperatingSystemVersions": { - "rule": "repeated", + "nextPageToken": { "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" - } + "id": 2 }, - "excludedOperatingSystemVersions": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" - } + "totalSize": { + "type": "int32", + "id": 3 } } }, - "InventoryTargeting": { - "fields": { - "targetedAdUnits": { - "rule": "repeated", - "type": "AdUnitTargeting", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludedAdUnits": { - "rule": "repeated", - "type": "AdUnitTargeting", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "targetedPlacements": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + "DealBuyerPermissionTypeEnum": { + "fields": {}, + "nested": { + "DealBuyerPermissionType": { + "values": { + "DEAL_BUYER_PERMISSION_TYPE_UNSPECIFIED": 0, + "NEGOTIATOR_ONLY": 1, + "BIDDER": 2 } } } }, - "AdUnitTargeting": { + "DeviceCapability": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/DeviceCapability", + "(google.api.resource).pattern": "networks/{network_code}/deviceCapabilities/{device_capability}", + "(google.api.resource).plural": "deviceCapabilities", + "(google.api.resource).singular": "deviceCapability" + }, "oneofs": { - "_includeDescendants": { - "oneof": [ - "includeDescendants" - ] - }, - "_adUnit": { + "_displayName": { "oneof": [ - "adUnit" + "displayName" ] } }, "fields": { - "includeDescendants": { - "type": "bool", + "name": { + "type": "string", "id": 1, "options": { - "proto3_optional": true + "(google.api.field_behavior)": "IDENTIFIER" } }, - "adUnit": { + "displayName": { "type": "string", - "id": 3, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } } } }, - "RequestPlatformTargeting": { - "fields": { - "requestPlatforms": { - "rule": "repeated", - "type": "RequestPlatformEnum.RequestPlatform", - "id": 1, + "DeviceCapabilityService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetDeviceCapability": { + "requestType": "GetDeviceCapabilityRequest", + "responseType": "DeviceCapability", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).get": "/v1/{name=networks/*/deviceCapabilities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/deviceCapabilities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDeviceCapabilities": { + "requestType": "ListDeviceCapabilitiesRequest", + "responseType": "ListDeviceCapabilitiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/deviceCapabilities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/deviceCapabilities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, - "CustomTargeting": { + "GetDeviceCapabilityRequest": { "fields": { - "customTargetingClauses": { - "rule": "repeated", - "type": "CustomTargetingClause", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCapability" } } } }, - "CustomTargetingClause": { + "ListDeviceCapabilitiesRequest": { "fields": { - "customTargetingLiterals": { - "rule": "repeated", - "type": "CustomTargetingLiteral", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } - } - } - }, - "CustomTargetingLiteral": { - "oneofs": { - "_negative": { - "oneof": [ - "negative" - ] }, - "_customTargetingKey": { - "oneof": [ - "customTargetingKey" - ] - } - }, - "fields": { - "negative": { - "type": "bool", - "id": 1, + "pageSize": { + "type": "int32", + "id": 2, "options": { - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "customTargetingKey": { + "pageToken": { "type": "string", - "id": 4, + "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "customTargetingValues": { - "rule": "repeated", + "filter": { "type": "string", - "id": 5, + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingValue" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "UserDomainTargeting": { - "fields": { - "targetedUserDomains": { - "rule": "repeated", + }, + "orderBy": { "type": "string", - "id": 1, + "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "excludedUserDomains": { - "rule": "repeated", - "type": "string", - "id": 2, + "skip": { + "type": "int32", + "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "VideoPositionTargeting": { + "ListDeviceCapabilitiesResponse": { "fields": { - "videoPositions": { + "deviceCapabilities": { "rule": "repeated", - "type": "VideoPosition", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "type": "DeviceCapability", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 } } }, - "VideoPosition": { + "DeviceCategory": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/DeviceCategory", + "(google.api.resource).pattern": "networks/{network_code}/deviceCategories/{device_category}", + "(google.api.resource).plural": "deviceCategories", + "(google.api.resource).singular": "deviceCategory" + }, "oneofs": { - "_midrollIndex": { - "oneof": [ - "midrollIndex" - ] - }, - "_reverseMidrollIndex": { - "oneof": [ - "reverseMidrollIndex" - ] - }, - "_podPosition": { - "oneof": [ - "podPosition" - ] - }, - "_positionType": { - "oneof": [ - "positionType" - ] - }, - "_bumperType": { + "_displayName": { "oneof": [ - "bumperType" + "displayName" ] } }, "fields": { - "midrollIndex": { - "type": "int64", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "IDENTIFIER" } }, - "reverseMidrollIndex": { - "type": "int64", + "displayName": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "podPosition": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "positionType": { - "type": "VideoPositionEnum.VideoPosition", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "bumperType": { - "type": "TargetedVideoBumperTypeEnum.TargetedVideoBumperType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } } } }, - "DataSegmentTargeting": { - "fields": { - "hasDataSegmentTargeting": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "RequestPlatformEnum": { - "fields": {}, - "nested": { - "RequestPlatform": { - "values": { - "REQUEST_PLATFORM_UNSPECIFIED": 0, - "BROWSER": 1, - "MOBILE_APP": 2, - "VIDEO_PLAYER": 3 - } - } - } - }, - "TargetedVideoBumperTypeEnum": { - "fields": {}, - "nested": { - "TargetedVideoBumperType": { - "values": { - "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED": 0, - "AFTER": 1, - "BEFORE": 2 - } - } - } - }, - "VideoPositionEnum": { - "fields": {}, - "nested": { - "VideoPosition": { - "values": { - "VIDEO_POSITION_UNSPECIFIED": 0, - "ALL": 1, - "MIDROLL": 2, - "POSTROLL": 3, - "PREROLL": 4 - } - } - } - }, - "PrivateAuctionDealService": { + "DeviceCategoryService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetPrivateAuctionDeal": { - "requestType": "GetPrivateAuctionDealRequest", - "responseType": "PrivateAuctionDeal", + "GetDeviceCategory": { + "requestType": "GetDeviceCategoryRequest", + "responseType": "DeviceCategory", "options": { - "(google.api.http).get": "/v1/{name=networks/*/privateAuctionDeals/*}", + "(google.api.http).get": "/v1/{name=networks/*/deviceCategories/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/privateAuctionDeals/*}" + "get": "/v1/{name=networks/*/deviceCategories/*}" } }, { @@ -5174,79 +5885,39 @@ } ] }, - "ListPrivateAuctionDeals": { - "requestType": "ListPrivateAuctionDealsRequest", - "responseType": "ListPrivateAuctionDealsResponse", + "ListDeviceCategories": { + "requestType": "ListDeviceCategoriesRequest", + "responseType": "ListDeviceCategoriesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/privateAuctionDeals", + "(google.api.http).get": "/v1/{parent=networks/*}/deviceCategories", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/privateAuctionDeals" + "get": "/v1/{parent=networks/*}/deviceCategories" } }, { "(google.api.method_signature)": "parent" } ] - }, - "CreatePrivateAuctionDeal": { - "requestType": "CreatePrivateAuctionDealRequest", - "responseType": "PrivateAuctionDeal", - "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/privateAuctionDeals", - "(google.api.http).body": "private_auction_deal", - "(google.api.method_signature)": "parent,private_auction_deal" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=networks/*}/privateAuctionDeals", - "body": "private_auction_deal" - } - }, - { - "(google.api.method_signature)": "parent,private_auction_deal" - } - ] - }, - "UpdatePrivateAuctionDeal": { - "requestType": "UpdatePrivateAuctionDealRequest", - "responseType": "PrivateAuctionDeal", - "options": { - "(google.api.http).patch": "/v1/{private_auction_deal.name=networks/*/privateAuctionDeals/*}", - "(google.api.http).body": "private_auction_deal", - "(google.api.method_signature)": "private_auction_deal,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{private_auction_deal.name=networks/*/privateAuctionDeals/*}", - "body": "private_auction_deal" - } - }, - { - "(google.api.method_signature)": "private_auction_deal,update_mask" - } - ] } } }, - "GetPrivateAuctionDealRequest": { + "GetDeviceCategoryRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/PrivateAuctionDeal" + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" } } } }, - "ListPrivateAuctionDealsRequest": { + "ListDeviceCategoriesRequest": { "fields": { "parent": { "type": "string", @@ -5293,11 +5964,11 @@ } } }, - "ListPrivateAuctionDealsResponse": { + "ListDeviceCategoriesResponse": { "fields": { - "privateAuctionDeals": { + "deviceCategories": { "rule": "repeated", - "type": "PrivateAuctionDeal", + "type": "DeviceCategory", "id": 1 }, "nextPageToken": { @@ -5310,80 +5981,18 @@ } } }, - "CreatePrivateAuctionDealRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" - } - }, - "privateAuctionDeal": { - "type": "PrivateAuctionDeal", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdatePrivateAuctionDealRequest": { - "fields": { - "privateAuctionDeal": { - "type": "PrivateAuctionDeal", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PrivateAuction": { + "DeviceManufacturer": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/PrivateAuction", - "(google.api.resource).pattern": "networks/{network_code}/privateAuctions/{private_auction}", - "(google.api.resource).plural": "privateAuctions", - "(google.api.resource).singular": "privateAuction" + "(google.api.resource).type": "admanager.googleapis.com/DeviceManufacturer", + "(google.api.resource).pattern": "networks/{network_code}/deviceManufacturers/{device_manufacturer}", + "(google.api.resource).plural": "deviceManufacturers", + "(google.api.resource).singular": "deviceManufacturer" }, "oneofs": { - "_privateAuctionId": { - "oneof": [ - "privateAuctionId" - ] - }, "_displayName": { "oneof": [ "displayName" ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_archived": { - "oneof": [ - "archived" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] } }, "fields": { @@ -5394,58 +6003,9 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "privateAuctionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, "displayName": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "sellerContactUsers": { - "rule": "repeated", - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "admanager.googleapis.com/User" - } - }, - "archived": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 8, + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true @@ -5453,23 +6013,23 @@ } } }, - "PrivateAuctionService": { + "DeviceManufacturerService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetPrivateAuction": { - "requestType": "GetPrivateAuctionRequest", - "responseType": "PrivateAuction", + "GetDeviceManufacturer": { + "requestType": "GetDeviceManufacturerRequest", + "responseType": "DeviceManufacturer", "options": { - "(google.api.http).get": "/v1/{name=networks/*/privateAuctions/*}", + "(google.api.http).get": "/v1/{name=networks/*/deviceManufacturers/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/privateAuctions/*}" + "get": "/v1/{name=networks/*/deviceManufacturers/*}" } }, { @@ -5477,79 +6037,39 @@ } ] }, - "ListPrivateAuctions": { - "requestType": "ListPrivateAuctionsRequest", - "responseType": "ListPrivateAuctionsResponse", + "ListDeviceManufacturers": { + "requestType": "ListDeviceManufacturersRequest", + "responseType": "ListDeviceManufacturersResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/privateAuctions", + "(google.api.http).get": "/v1/{parent=networks/*}/deviceManufacturers", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/privateAuctions" + "get": "/v1/{parent=networks/*}/deviceManufacturers" } }, { "(google.api.method_signature)": "parent" } ] - }, - "CreatePrivateAuction": { - "requestType": "CreatePrivateAuctionRequest", - "responseType": "PrivateAuction", - "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/privateAuctions", - "(google.api.http).body": "private_auction", - "(google.api.method_signature)": "parent,private_auction" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=networks/*}/privateAuctions", - "body": "private_auction" - } - }, - { - "(google.api.method_signature)": "parent,private_auction" - } - ] - }, - "UpdatePrivateAuction": { - "requestType": "UpdatePrivateAuctionRequest", - "responseType": "PrivateAuction", - "options": { - "(google.api.http).patch": "/v1/{private_auction.name=networks/*/privateAuctions/*}", - "(google.api.http).body": "private_auction", - "(google.api.method_signature)": "private_auction,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{private_auction.name=networks/*/privateAuctions/*}", - "body": "private_auction" - } - }, - { - "(google.api.method_signature)": "private_auction,update_mask" - } - ] } } }, - "GetPrivateAuctionRequest": { + "GetDeviceManufacturerRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/PrivateAuction" + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceManufacturer" } } } }, - "ListPrivateAuctionsRequest": { + "ListDeviceManufacturersRequest": { "fields": { "parent": { "type": "string", @@ -5596,11 +6116,11 @@ } } }, - "ListPrivateAuctionsResponse": { + "ListDeviceManufacturersResponse": { "fields": { - "privateAuctions": { + "deviceManufacturers": { "rule": "repeated", - "type": "PrivateAuction", + "type": "DeviceManufacturer", "id": 1 }, "nextPageToken": { @@ -5613,88 +6133,40 @@ } } }, - "CreatePrivateAuctionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Network" - } - }, - "privateAuction": { - "type": "PrivateAuction", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdatePrivateAuctionRequest": { - "fields": { - "privateAuction": { - "type": "PrivateAuction", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ProgrammaticBuyer": { + "EntitySignalsMapping": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/ProgrammaticBuyer", - "(google.api.resource).pattern": "networks/{network_code}/programmaticBuyers/{programmatic_buyer}", - "(google.api.resource).plural": "programmaticBuyers", - "(google.api.resource).singular": "programmaticBuyer" + "(google.api.resource).type": "admanager.googleapis.com/EntitySignalsMapping", + "(google.api.resource).pattern": "networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}", + "(google.api.resource).plural": "entitySignalsMappings", + "(google.api.resource).singular": "entitySignalsMapping" }, "oneofs": { - "_buyerAccountId": { - "oneof": [ - "buyerAccountId" - ] - }, - "_displayName": { - "oneof": [ - "displayName" - ] - }, - "_parentAccountId": { - "oneof": [ - "parentAccountId" - ] - }, - "_partnerClientId": { - "oneof": [ - "partnerClientId" - ] - }, - "_agency": { - "oneof": [ - "agency" - ] - }, - "_preferredDealsEnabled": { + "entity": { "oneof": [ - "preferredDealsEnabled" + "audienceSegmentId", + "contentBundleId", + "customTargetingValueId" ] }, - "_programmaticGuaranteedEnabled": { + "_entitySignalsMappingId": { "oneof": [ - "programmaticGuaranteedEnabled" + "entitySignalsMappingId" ] } }, "fields": { + "audienceSegmentId": { + "type": "int64", + "id": 3 + }, + "contentBundleId": { + "type": "int64", + "id": 4 + }, + "customTargetingValueId": { + "type": "int64", + "id": 5 + }, "name": { "type": "string", "id": 1, @@ -5702,7 +6174,7 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "buyerAccountId": { + "entitySignalsMappingId": { "type": "int64", "id": 2, "options": { @@ -5710,73 +6182,33 @@ "proto3_optional": true } }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "parentAccountId": { + "taxonomyCategoryIds": { + "rule": "repeated", "type": "int64", "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "partnerClientId": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "agency": { - "type": "bool", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "preferredDealsEnabled": { - "type": "bool", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "programmaticGuaranteedEnabled": { - "type": "bool", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ProgrammaticBuyerService": { + "EntitySignalsMappingService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetProgrammaticBuyer": { - "requestType": "GetProgrammaticBuyerRequest", - "responseType": "ProgrammaticBuyer", + "GetEntitySignalsMapping": { + "requestType": "GetEntitySignalsMappingRequest", + "responseType": "EntitySignalsMapping", "options": { - "(google.api.http).get": "/v1/{name=networks/*/programmaticBuyers/*}", + "(google.api.http).get": "/v1/{name=networks/*/entitySignalsMappings/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/programmaticBuyers/*}" + "get": "/v1/{name=networks/*/entitySignalsMappings/*}" } }, { @@ -5784,39 +6216,119 @@ } ] }, - "ListProgrammaticBuyers": { - "requestType": "ListProgrammaticBuyersRequest", - "responseType": "ListProgrammaticBuyersResponse", + "ListEntitySignalsMappings": { + "requestType": "ListEntitySignalsMappingsRequest", + "responseType": "ListEntitySignalsMappingsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/programmaticBuyers", + "(google.api.http).get": "/v1/{parent=networks/*}/entitySignalsMappings", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/programmaticBuyers" + "get": "/v1/{parent=networks/*}/entitySignalsMappings" } }, { "(google.api.method_signature)": "parent" } ] + }, + "CreateEntitySignalsMapping": { + "requestType": "CreateEntitySignalsMappingRequest", + "responseType": "EntitySignalsMapping", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings", + "(google.api.http).body": "entity_signals_mapping", + "(google.api.method_signature)": "parent,entity_signals_mapping" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/entitySignalsMappings", + "body": "entity_signals_mapping" + } + }, + { + "(google.api.method_signature)": "parent,entity_signals_mapping" + } + ] + }, + "UpdateEntitySignalsMapping": { + "requestType": "UpdateEntitySignalsMappingRequest", + "responseType": "EntitySignalsMapping", + "options": { + "(google.api.http).patch": "/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}", + "(google.api.http).body": "entity_signals_mapping", + "(google.api.method_signature)": "entity_signals_mapping,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}", + "body": "entity_signals_mapping" + } + }, + { + "(google.api.method_signature)": "entity_signals_mapping,update_mask" + } + ] + }, + "BatchCreateEntitySignalsMappings": { + "requestType": "BatchCreateEntitySignalsMappingsRequest", + "responseType": "BatchCreateEntitySignalsMappingsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/entitySignalsMappings:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BatchUpdateEntitySignalsMappings": { + "requestType": "BatchUpdateEntitySignalsMappingsRequest", + "responseType": "BatchUpdateEntitySignalsMappingsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] } } }, - "GetProgrammaticBuyerRequest": { + "GetEntitySignalsMappingRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/ProgrammaticBuyer" + "(google.api.resource_reference).type": "admanager.googleapis.com/EntitySignalsMapping" } } } }, - "ListProgrammaticBuyersRequest": { + "ListEntitySignalsMappingsRequest": { "fields": { "parent": { "type": "string", @@ -5863,892 +6375,5120 @@ } } }, - "ListProgrammaticBuyersResponse": { + "CreateEntitySignalsMappingRequest": { "fields": { - "programmaticBuyers": { - "rule": "repeated", - "type": "ProgrammaticBuyer", - "id": 1 - }, - "nextPageToken": { + "parent": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "totalSize": { - "type": "int32", - "id": 3 + "entitySignalsMapping": { + "type": "EntitySignalsMapping", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "Report": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/Report", - "(google.api.resource).pattern": "networks/{network_code}/reports/{report}", - "(google.api.resource).plural": "reports", - "(google.api.resource).singular": "report" - }, + "UpdateEntitySignalsMappingRequest": { "fields": { - "name": { - "type": "string", + "entitySignalsMapping": { + "type": "EntitySignalsMapping", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED" } }, - "reportId": { - "type": "int64", - "id": 3, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "ListEntitySignalsMappingsResponse": { + "fields": { + "entitySignalsMappings": { + "rule": "repeated", + "type": "EntitySignalsMapping", + "id": 1 }, - "visibility": { - "type": "Visibility", + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "BatchCreateEntitySignalsMappingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateEntitySignalsMappingRequest", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateEntitySignalsMappingsResponse": { + "fields": { + "entitySignalsMappings": { + "rule": "repeated", + "type": "EntitySignalsMapping", + "id": 1 + } + } + }, + "BatchUpdateEntitySignalsMappingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "reportDefinition": { - "type": "ReportDefinition", - "id": 4, + "requests": { + "rule": "repeated", + "type": "UpdateEntitySignalsMappingRequest", + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "BatchUpdateEntitySignalsMappingsResponse": { + "fields": { + "entitySignalsMappings": { + "rule": "repeated", + "type": "EntitySignalsMapping", + "id": 1 + } + } + }, + "GeoTarget": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/GeoTarget", + "(google.api.resource).pattern": "networks/{network_code}/geoTargets/{geo_target}", + "(google.api.resource).plural": "geoTargets", + "(google.api.resource).singular": "geoTarget" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_canonicalParent": { + "oneof": [ + "canonicalParent" + ] + }, + "_regionCode": { + "oneof": [ + "regionCode" + ] + }, + "_type": { + "oneof": [ + "type" + ] + }, + "_targetable": { + "oneof": [ + "targetable" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, "displayName": { "type": "string", - "id": 5, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, + "canonicalParent": { + "type": "string", + "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget", + "proto3_optional": true } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7, + "parentNames": { + "rule": "repeated", + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "locale": { + "regionCode": { "type": "string", - "id": 8, + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "scheduleOptions": { - "type": "ScheduleOptions", - "id": 9, + "type": { + "type": "string", + "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "targetable": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } } + } + }, + "GeoTargetService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, - "nested": { - "Value": { - "oneofs": { - "value": { - "oneof": [ - "intValue", - "doubleValue", - "stringValue", - "boolValue", - "intListValue", - "stringListValue", - "bytesValue" - ] - } + "methods": { + "GetGeoTarget": { + "requestType": "GetGeoTargetRequest", + "responseType": "GeoTarget", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/geoTargets/*}", + "(google.api.method_signature)": "name" }, - "fields": { - "intValue": { - "type": "int64", - "id": 1 - }, - "doubleValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "intListValue": { - "type": "IntList", - "id": 6 - }, - "stringListValue": { - "type": "StringList", - "id": 7 + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/geoTargets/*}" + } }, - "bytesValue": { - "type": "bytes", - "id": 8 + { + "(google.api.method_signature)": "name" } + ] + }, + "ListGeoTargets": { + "requestType": "ListGeoTargetsRequest", + "responseType": "ListGeoTargetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/geoTargets", + "(google.api.method_signature)": "parent" }, - "nested": { - "IntList": { - "fields": { - "values": { - "rule": "repeated", - "type": "int64", - "id": 1 - } + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/geoTargets" } }, - "StringList": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetGeoTargetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" + } + } + } + }, + "ListGeoTargetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "Sort": { - "oneofs": { - "_slice": { - "oneof": [ - "slice" - ] - }, - "_timePeriodIndex": { - "oneof": [ - "timePeriodIndex" - ] - }, - "_metricValueType": { - "oneof": [ - "metricValueType" - ] - } - }, - "fields": { - "field": { - "type": "Field", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "descending": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "slice": { - "type": "Slice", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "timePeriodIndex": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metricValueType": { - "type": "MetricValueType", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "DataTable": { - "fields": {}, - "nested": { - "Row": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "Value", - "id": 1 - }, - "metricValueGroups": { - "rule": "repeated", - "type": "MetricValueGroup", - "id": 2 - } - } - }, - "MetricValueGroup": { - "fields": { - "primaryValues": { - "rule": "repeated", - "type": "Value", - "id": 1 - }, - "primaryPercentOfTotalValues": { - "rule": "repeated", - "type": "Value", - "id": 2 - }, - "comparisonValues": { - "rule": "repeated", - "type": "Value", - "id": 3 - }, - "comparisonPercentOfTotalValues": { - "rule": "repeated", - "type": "Value", - "id": 4 - }, - "absoluteChangeValues": { - "rule": "repeated", - "type": "Value", - "id": 5 - }, - "relativeChangeValues": { - "rule": "repeated", - "type": "Value", - "id": 6 - }, - "flagValues": { - "rule": "repeated", - "type": "bool", - "id": 7 - } - } - } + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Field": { - "oneofs": { - "field": { - "oneof": [ - "dimension", - "metric" - ] - } - }, - "fields": { - "dimension": { - "type": "Dimension", - "id": 1 - }, - "metric": { - "type": "Metric", - "id": 2 - } + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Slice": { - "fields": { - "dimension": { - "type": "Dimension", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "value": { - "type": "Value", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Filter": { - "oneofs": { - "type": { - "oneof": [ - "fieldFilter", - "notFilter", - "andFilter", - "orFilter" - ] - } - }, - "fields": { - "fieldFilter": { - "type": "FieldFilter", - "id": 1 - }, - "notFilter": { - "type": "Filter", - "id": 2 - }, - "andFilter": { - "type": "FilterList", - "id": 3 - }, - "orFilter": { - "type": "FilterList", - "id": 4 - } - }, - "nested": { - "FieldFilter": { - "oneofs": { - "_slice": { - "oneof": [ - "slice" - ] - }, - "_timePeriodIndex": { - "oneof": [ - "timePeriodIndex" - ] - }, - "_metricValueType": { - "oneof": [ - "metricValueType" - ] - } - }, - "fields": { - "field": { - "type": "Field", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "operation": { - "type": "Operation", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "values": { - "rule": "repeated", - "type": "Value", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "slice": { - "type": "Slice", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "timePeriodIndex": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metricValueType": { - "type": "MetricValueType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "FilterList": { - "fields": { - "filters": { - "rule": "repeated", - "type": "Filter", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Operation": { - "values": { - "IN": 0, - "NOT_IN": 1, - "CONTAINS": 2, - "NOT_CONTAINS": 3, - "LESS_THAN": 4, - "LESS_THAN_EQUALS": 5, - "GREATER_THAN": 6, - "GREATER_THAN_EQUALS": 7, - "BETWEEN": 8, - "MATCHES": 9, - "NOT_MATCHES": 10 - } - } + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListGeoTargetsResponse": { + "fields": { + "geoTargets": { + "rule": "repeated", + "type": "GeoTarget", + "id": 1 }, - "Flag": { - "fields": { - "filters": { - "rule": "repeated", - "type": "Filter", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "Label": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Label", + "(google.api.resource).pattern": "networks/{network_code}/labels/{label}", + "(google.api.resource).plural": "labels", + "(google.api.resource).singular": "label" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + } + } + }, + "LiveStreamEvent": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/LiveStreamEvent", + "(google.api.resource).pattern": "networks/{network_code}/liveStreamEvents/{live_stream_event}", + "(google.api.resource).plural": "liveStreamEvents", + "(google.api.resource).singular": "liveStreamEvent" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" } + } + } + }, + "MobileCarrier": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/MobileCarrier", + "(google.api.resource).pattern": "networks/{network_code}/mobileCarriers/{mobile_carrier}", + "(google.api.resource).plural": "mobileCarriers", + "(google.api.resource).singular": "mobileCarrier" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] }, - "DateRange": { - "oneofs": { - "dateRangeType": { - "oneof": [ - "fixed", - "relative" - ] - } + "_regionCode": { + "oneof": [ + "regionCode" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "regionCode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "MobileCarrierService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetMobileCarrier": { + "requestType": "GetMobileCarrierRequest", + "responseType": "MobileCarrier", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/mobileCarriers/*}", + "(google.api.method_signature)": "name" }, - "fields": { - "fixed": { - "type": "FixedDateRange", - "id": 1 + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/mobileCarriers/*}" + } }, - "relative": { - "type": "RelativeDateRange", - "id": 2 + { + "(google.api.method_signature)": "name" } + ] + }, + "ListMobileCarriers": { + "requestType": "ListMobileCarriersRequest", + "responseType": "ListMobileCarriersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/mobileCarriers", + "(google.api.method_signature)": "parent" }, - "nested": { - "FixedDateRange": { - "fields": { - "startDate": { - "type": "google.type.Date", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endDate": { - "type": "google.type.Date", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/mobileCarriers" } }, - "RelativeDateRange": { - "values": { - "RELATIVE_DATE_RANGE_UNSPECIFIED": 0, - "TODAY": 1, - "YESTERDAY": 2, - "THIS_WEEK": 3, - "THIS_WEEK_TO_DATE": 29, - "THIS_MONTH": 4, - "THIS_MONTH_TO_DATE": 26, - "THIS_QUARTER": 5, - "THIS_QUARTER_TO_DATE": 27, - "THIS_YEAR": 6, - "THIS_YEAR_TO_DATE": 28, - "LAST_WEEK": 7, - "LAST_MONTH": 8, - "LAST_QUARTER": 9, - "LAST_YEAR": 10, - "LAST_7_DAYS": 11, - "LAST_30_DAYS": 12, - "LAST_60_DAYS": 13, - "LAST_90_DAYS": 14, - "LAST_180_DAYS": 15, - "LAST_360_DAYS": 16, - "LAST_365_DAYS": 17, - "LAST_3_MONTHS": 18, - "LAST_6_MONTHS": 19, - "LAST_12_MONTHS": 20, - "ALL_AVAILABLE": 21, - "PREVIOUS_PERIOD": 22, - "SAME_PERIOD_PREVIOUS_YEAR": 24 - } + { + "(google.api.method_signature)": "parent" } + ] + } + } + }, + "GetMobileCarrierRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileCarrier" + } + } + } + }, + "ListMobileCarriersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "TimePeriodColumn": { - "values": { - "TIME_PERIOD_COLUMN_UNSPECIFIED": 0, - "TIME_PERIOD_COLUMN_DATE": 1, - "TIME_PERIOD_COLUMN_WEEK": 2, - "TIME_PERIOD_COLUMN_MONTH": 3, - "TIME_PERIOD_COLUMN_QUARTER": 4 + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Dimension": { - "values": { - "DIMENSION_UNSPECIFIED": 0, - "ADVERTISER_DOMAIN_NAME": 242, - "ADVERTISER_EXTERNAL_ID": 228, - "ADVERTISER_ID": 131, - "ADVERTISER_LABELS": 230, - "ADVERTISER_LABEL_IDS": 229, - "ADVERTISER_NAME": 132, - "ADVERTISER_PRIMARY_CONTACT": 227, - "AD_LOCATION": 390, - "AD_LOCATION_NAME": 391, - "AD_UNIT_CODE": 64, - "AD_UNIT_CODE_LEVEL_1": 65, - "AD_UNIT_CODE_LEVEL_10": 74, - "AD_UNIT_CODE_LEVEL_11": 75, - "AD_UNIT_CODE_LEVEL_12": 76, - "AD_UNIT_CODE_LEVEL_13": 77, - "AD_UNIT_CODE_LEVEL_14": 78, - "AD_UNIT_CODE_LEVEL_15": 79, - "AD_UNIT_CODE_LEVEL_16": 80, - "AD_UNIT_CODE_LEVEL_2": 66, - "AD_UNIT_CODE_LEVEL_3": 67, - "AD_UNIT_CODE_LEVEL_4": 68, - "AD_UNIT_CODE_LEVEL_5": 69, - "AD_UNIT_CODE_LEVEL_6": 70, - "AD_UNIT_CODE_LEVEL_7": 71, - "AD_UNIT_CODE_LEVEL_8": 72, - "AD_UNIT_CODE_LEVEL_9": 73, - "AD_UNIT_DEPTH": 101, - "AD_UNIT_ID": 25, - "AD_UNIT_ID_ALL_LEVEL": 27, - "AD_UNIT_ID_LEVEL_1": 30, - "AD_UNIT_ID_LEVEL_10": 48, - "AD_UNIT_ID_LEVEL_11": 50, - "AD_UNIT_ID_LEVEL_12": 52, - "AD_UNIT_ID_LEVEL_13": 54, - "AD_UNIT_ID_LEVEL_14": 56, - "AD_UNIT_ID_LEVEL_15": 58, - "AD_UNIT_ID_LEVEL_16": 60, - "AD_UNIT_ID_LEVEL_2": 32, - "AD_UNIT_ID_LEVEL_3": 34, - "AD_UNIT_ID_LEVEL_4": 36, - "AD_UNIT_ID_LEVEL_5": 38, - "AD_UNIT_ID_LEVEL_6": 40, - "AD_UNIT_ID_LEVEL_7": 42, - "AD_UNIT_ID_LEVEL_8": 44, - "AD_UNIT_ID_LEVEL_9": 46, - "AD_UNIT_ID_TOP_LEVEL": 142, - "AD_UNIT_NAME": 26, - "AD_UNIT_NAME_ALL_LEVEL": 29, - "AD_UNIT_NAME_LEVEL_1": 31, - "AD_UNIT_NAME_LEVEL_10": 49, - "AD_UNIT_NAME_LEVEL_11": 51, - "AD_UNIT_NAME_LEVEL_12": 53, - "AD_UNIT_NAME_LEVEL_13": 55, - "AD_UNIT_NAME_LEVEL_14": 57, - "AD_UNIT_NAME_LEVEL_15": 59, - "AD_UNIT_NAME_LEVEL_16": 61, - "AD_UNIT_NAME_LEVEL_2": 33, - "AD_UNIT_NAME_LEVEL_3": 35, - "AD_UNIT_NAME_LEVEL_4": 37, - "AD_UNIT_NAME_LEVEL_5": 39, - "AD_UNIT_NAME_LEVEL_6": 41, - "AD_UNIT_NAME_LEVEL_7": 43, - "AD_UNIT_NAME_LEVEL_8": 45, - "AD_UNIT_NAME_LEVEL_9": 47, - "AD_UNIT_NAME_TOP_LEVEL": 143, - "AD_UNIT_REWARD_AMOUNT": 63, - "AD_UNIT_REWARD_TYPE": 62, - "AD_UNIT_STATUS": 206, - "AD_UNIT_STATUS_NAME": 207, - "APP_VERSION": 392, - "BACKFILL_ADVERTISER_EXTERNAL_ID": 349, - "BACKFILL_ADVERTISER_ID": 346, - "BACKFILL_ADVERTISER_LABELS": 351, - "BACKFILL_ADVERTISER_LABEL_IDS": 350, - "BACKFILL_ADVERTISER_NAME": 347, - "BACKFILL_ADVERTISER_PRIMARY_CONTACT": 348, - "BACKFILL_CREATIVE_BILLING_TYPE": 378, - "BACKFILL_CREATIVE_BILLING_TYPE_NAME": 379, - "BACKFILL_CREATIVE_CLICK_THROUGH_URL": 376, - "BACKFILL_CREATIVE_ID": 370, - "BACKFILL_CREATIVE_NAME": 371, - "BACKFILL_CREATIVE_THIRD_PARTY_VENDOR": 377, - "BACKFILL_CREATIVE_TYPE": 374, - "BACKFILL_CREATIVE_TYPE_NAME": 375, - "BACKFILL_LINE_ITEM_ARCHIVED": 278, - "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION": 258, - "BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": 259, - "BACKFILL_LINE_ITEM_COMPUTED_STATUS": 296, - "BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME": 297, - "BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY": 280, - "BACKFILL_LINE_ITEM_COST_PER_UNIT": 272, - "BACKFILL_LINE_ITEM_COST_TYPE": 264, - "BACKFILL_LINE_ITEM_COST_TYPE_NAME": 265, - "BACKFILL_LINE_ITEM_CREATIVE_END_DATE": 381, - "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE": 290, - "BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": 291, - "BACKFILL_LINE_ITEM_CREATIVE_START_DATE": 380, - "BACKFILL_LINE_ITEM_CURRENCY_CODE": 288, - "BACKFILL_LINE_ITEM_DELIVERY_INDICATOR": 274, - "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE": 292, - "BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME": 293, - "BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE": 294, - "BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE": 295, - "BACKFILL_LINE_ITEM_END_DATE": 267, - "BACKFILL_LINE_ITEM_END_DATE_TIME": 269, - "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE": 302, - "BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME": 257, - "BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID": 285, - "BACKFILL_LINE_ITEM_EXTERNAL_ID": 273, - "BACKFILL_LINE_ITEM_FREQUENCY_CAP": 303, - "BACKFILL_LINE_ITEM_ID": 298, - "BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP": 289, - "BACKFILL_LINE_ITEM_LIFETIME_CLICKS": 283, - "BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS": 282, - "BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": 284, - "BACKFILL_LINE_ITEM_MAKEGOOD": 276, - "BACKFILL_LINE_ITEM_NAME": 299, - "BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE": 286, - "BACKFILL_LINE_ITEM_OPTIMIZABLE": 277, - "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE": 262, - "BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": 263, - "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": 260, - "BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": 261, - "BACKFILL_LINE_ITEM_PRIORITY": 266, - "BACKFILL_LINE_ITEM_RESERVATION_STATUS": 306, - "BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME": 307, - "BACKFILL_LINE_ITEM_START_DATE": 268, - "BACKFILL_LINE_ITEM_START_DATE_TIME": 270, - "BACKFILL_LINE_ITEM_TYPE": 300, - "BACKFILL_LINE_ITEM_TYPE_NAME": 301, - "BACKFILL_LINE_ITEM_UNLIMITED_END": 271, - "BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT": 275, - "BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE": 287, - "BACKFILL_MASTER_COMPANION_CREATIVE_ID": 372, - "BACKFILL_MASTER_COMPANION_CREATIVE_NAME": 373, - "BACKFILL_ORDER_AGENCY": 313, - "BACKFILL_ORDER_AGENCY_ID": 314, - "BACKFILL_ORDER_BOOKED_CPC": 315, - "BACKFILL_ORDER_BOOKED_CPM": 316, - "BACKFILL_ORDER_DELIVERY_STATUS": 340, - "BACKFILL_ORDER_DELIVERY_STATUS_NAME": 341, - "BACKFILL_ORDER_END_DATE": 317, - "BACKFILL_ORDER_END_DATE_TIME": 319, - "BACKFILL_ORDER_EXTERNAL_ID": 320, - "BACKFILL_ORDER_ID": 338, - "BACKFILL_ORDER_LABELS": 334, - "BACKFILL_ORDER_LABEL_IDS": 335, - "BACKFILL_ORDER_LIFETIME_CLICKS": 322, - "BACKFILL_ORDER_LIFETIME_IMPRESSIONS": 323, - "BACKFILL_ORDER_NAME": 339, - "BACKFILL_ORDER_PO_NUMBER": 324, - "BACKFILL_ORDER_PROGRAMMATIC": 321, - "BACKFILL_ORDER_SALESPERSON": 325, - "BACKFILL_ORDER_SECONDARY_SALESPEOPLE": 329, - "BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID": 328, - "BACKFILL_ORDER_SECONDARY_TRAFFICKERS": 331, - "BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID": 330, - "BACKFILL_ORDER_START_DATE": 332, - "BACKFILL_ORDER_START_DATE_TIME": 333, - "BACKFILL_ORDER_TRAFFICKER": 326, - "BACKFILL_ORDER_TRAFFICKER_ID": 327, - "BACKFILL_ORDER_UNLIMITED_END": 318, - "BACKFILL_PROGRAMMATIC_BUYER_ID": 336, - "BACKFILL_PROGRAMMATIC_BUYER_NAME": 337, - "BRANDING_TYPE": 383, - "BRANDING_TYPE_NAME": 384, - "BROWSER_CATEGORY": 119, - "BROWSER_CATEGORY_NAME": 120, - "BROWSER_ID": 235, - "BROWSER_NAME": 236, - "CARRIER_ID": 369, - "CARRIER_NAME": 368, - "CLASSIFIED_ADVERTISER_ID": 133, - "CLASSIFIED_ADVERTISER_NAME": 134, - "CLASSIFIED_BRAND_ID": 243, - "CLASSIFIED_BRAND_NAME": 244, - "CONTENT_ID": 246, - "CONTENT_NAME": 247, - "COUNTRY_ID": 11, - "COUNTRY_NAME": 12, - "CREATIVE_BILLING_TYPE": 366, - "CREATIVE_BILLING_TYPE_NAME": 367, - "CREATIVE_CLICK_THROUGH_URL": 174, - "CREATIVE_ID": 138, - "CREATIVE_NAME": 139, - "CREATIVE_TECHNOLOGY": 148, - "CREATIVE_TECHNOLOGY_NAME": 149, - "CREATIVE_THIRD_PARTY_VENDOR": 361, - "CREATIVE_TYPE": 344, - "CREATIVE_TYPE_NAME": 345, - "DATE": 3, - "DAY_OF_WEEK": 4, - "DEMAND_CHANNEL": 9, - "DEMAND_CHANNEL_NAME": 10, - "DEMAND_SUBCHANNEL": 22, - "DEMAND_SUBCHANNEL_NAME": 23, - "DEVICE": 226, - "DEVICE_CATEGORY": 15, - "DEVICE_CATEGORY_NAME": 16, - "DEVICE_NAME": 225, - "EXCHANGE_THIRD_PARTY_COMPANY_ID": 185, - "EXCHANGE_THIRD_PARTY_COMPANY_NAME": 186, - "FIRST_LOOK_PRICING_RULE_ID": 248, - "FIRST_LOOK_PRICING_RULE_NAME": 249, - "HOUR": 100, - "INTERACTION_TYPE": 223, - "INTERACTION_TYPE_NAME": 224, - "INVENTORY_FORMAT": 17, - "INVENTORY_FORMAT_NAME": 18, - "INVENTORY_TYPE": 19, - "INVENTORY_TYPE_NAME": 20, - "IS_ADX_DIRECT": 382, - "IS_FIRST_LOOK_DEAL": 401, - "KEY_VALUES_ID": 214, - "KEY_VALUES_NAME": 215, - "LINE_ITEM_ARCHIVED": 188, - "LINE_ITEM_COMPANION_DELIVERY_OPTION": 204, - "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": 205, - "LINE_ITEM_COMPUTED_STATUS": 250, - "LINE_ITEM_COMPUTED_STATUS_NAME": 251, - "LINE_ITEM_CONTRACTED_QUANTITY": 92, - "LINE_ITEM_COST_PER_UNIT": 85, - "LINE_ITEM_COST_TYPE": 212, - "LINE_ITEM_COST_TYPE_NAME": 213, - "LINE_ITEM_CREATIVE_END_DATE": 176, - "LINE_ITEM_CREATIVE_ROTATION_TYPE": 189, - "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": 190, - "LINE_ITEM_CREATIVE_START_DATE": 175, - "LINE_ITEM_CURRENCY_CODE": 180, - "LINE_ITEM_DELIVERY_INDICATOR": 87, - "LINE_ITEM_DELIVERY_RATE_TYPE": 191, - "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": 192, - "LINE_ITEM_DISCOUNT_ABSOLUTE": 195, - "LINE_ITEM_DISCOUNT_PERCENTAGE": 196, - "LINE_ITEM_END_DATE": 81, - "LINE_ITEM_END_DATE_TIME": 83, - "LINE_ITEM_ENVIRONMENT_TYPE": 201, - "LINE_ITEM_ENVIRONMENT_TYPE_NAME": 202, - "LINE_ITEM_EXTERNAL_DEAL_ID": 97, - "LINE_ITEM_EXTERNAL_ID": 86, - "LINE_ITEM_FREQUENCY_CAP": 256, - "LINE_ITEM_ID": 1, - "LINE_ITEM_LAST_MODIFIED_BY_APP": 181, - "LINE_ITEM_LIFETIME_CLICKS": 95, - "LINE_ITEM_LIFETIME_IMPRESSIONS": 94, - "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": 96, - "LINE_ITEM_MAKEGOOD": 89, - "LINE_ITEM_NAME": 2, - "LINE_ITEM_NON_CPD_BOOKED_REVENUE": 98, - "LINE_ITEM_OPTIMIZABLE": 90, - "LINE_ITEM_PRIMARY_GOAL_TYPE": 210, - "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": 211, - "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": 93, - "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": 396, - "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": 208, - "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": 209, - "LINE_ITEM_PRIORITY": 24, - "LINE_ITEM_RESERVATION_STATUS": 304, - "LINE_ITEM_RESERVATION_STATUS_NAME": 305, - "LINE_ITEM_START_DATE": 82, - "LINE_ITEM_START_DATE_TIME": 84, - "LINE_ITEM_TYPE": 193, - "LINE_ITEM_TYPE_NAME": 194, - "LINE_ITEM_UNLIMITED_END": 187, - "LINE_ITEM_VALUE_COST_PER_UNIT": 88, - "LINE_ITEM_WEB_PROPERTY_CODE": 179, - "MASTER_COMPANION_CREATIVE_ID": 140, - "MASTER_COMPANION_CREATIVE_NAME": 141, - "MOBILE_APP_FREE": 128, - "MOBILE_APP_ICON_URL": 129, - "MOBILE_APP_ID": 123, - "MOBILE_APP_NAME": 127, - "MOBILE_APP_OWNERSHIP_STATUS": 311, - "MOBILE_APP_OWNERSHIP_STATUS_NAME": 312, - "MOBILE_APP_STORE": 125, - "MOBILE_APP_STORE_NAME": 245, - "MOBILE_INVENTORY_TYPE": 99, - "MOBILE_INVENTORY_TYPE_NAME": 21, - "MOBILE_SDK_VERSION_NAME": 130, - "MONTH_YEAR": 6, - "NATIVE_AD_FORMAT_ID": 255, - "NATIVE_AD_FORMAT_NAME": 254, - "NATIVE_STYLE_ID": 253, - "NATIVE_STYLE_NAME": 252, - "OPERATING_SYSTEM_CATEGORY": 117, - "OPERATING_SYSTEM_CATEGORY_NAME": 118, - "OPERATING_SYSTEM_VERSION_ID": 238, - "OPERATING_SYSTEM_VERSION_NAME": 237, - "ORDER_AGENCY": 150, - "ORDER_AGENCY_ID": 151, - "ORDER_BOOKED_CPC": 152, - "ORDER_BOOKED_CPM": 153, - "ORDER_DELIVERY_STATUS": 231, - "ORDER_DELIVERY_STATUS_NAME": 239, - "ORDER_END_DATE": 154, - "ORDER_END_DATE_TIME": 155, - "ORDER_EXTERNAL_ID": 156, - "ORDER_ID": 7, - "ORDER_LABELS": 170, - "ORDER_LABEL_IDS": 171, - "ORDER_LIFETIME_CLICKS": 158, - "ORDER_LIFETIME_IMPRESSIONS": 159, - "ORDER_NAME": 8, - "ORDER_PO_NUMBER": 160, - "ORDER_PROGRAMMATIC": 157, - "ORDER_SALESPERSON": 161, - "ORDER_SECONDARY_SALESPEOPLE": 164, - "ORDER_SECONDARY_SALESPEOPLE_ID": 165, - "ORDER_SECONDARY_TRAFFICKERS": 166, - "ORDER_SECONDARY_TRAFFICKERS_ID": 167, - "ORDER_START_DATE": 168, - "ORDER_START_DATE_TIME": 169, - "ORDER_TRAFFICKER": 162, - "ORDER_TRAFFICKER_ID": 163, - "ORDER_UNLIMITED_END": 203, - "PLACEMENT_ID": 113, - "PLACEMENT_ID_ALL": 144, - "PLACEMENT_NAME": 114, - "PLACEMENT_NAME_ALL": 145, - "PLACEMENT_STATUS": 362, - "PLACEMENT_STATUS_ALL": 363, - "PLACEMENT_STATUS_NAME": 364, - "PLACEMENT_STATUS_NAME_ALL": 365, - "PROGRAMMATIC_BUYER_ID": 240, - "PROGRAMMATIC_BUYER_NAME": 241, - "PROGRAMMATIC_CHANNEL": 13, - "PROGRAMMATIC_CHANNEL_NAME": 14, - "RENDERED_CREATIVE_SIZE": 343, - "REQUESTED_AD_SIZES": 352, - "REQUEST_TYPE": 146, - "REQUEST_TYPE_NAME": 147, - "SERVER_SIDE_UNWRAPPING_ELIGIBLE": 597, - "SITE": 387, - "TARGETING_ID": 232, - "TARGETING_NAME": 233, - "TARGETING_TYPE": 385, - "TARGETING_TYPE_NAME": 386, - "TRAFFIC_SOURCE": 388, - "TRAFFIC_SOURCE_NAME": 389, - "UNIFIED_PRICING_RULE_ID": 393, - "UNIFIED_PRICING_RULE_NAME": 394, - "VIDEO_PLCMT": 172, - "VIDEO_PLCMT_NAME": 173, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMobileCarriersResponse": { + "fields": { + "mobileCarriers": { + "rule": "repeated", + "type": "MobileCarrier", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "MobileDevice": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/MobileDevice", + "(google.api.resource).pattern": "networks/{network_code}/mobileDevices/{mobile_device}", + "(google.api.resource).plural": "mobileDevices", + "(google.api.resource).singular": "mobileDevice" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_manufacturer": { + "oneof": [ + "manufacturer" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "manufacturer": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceManufacturer", + "proto3_optional": true + } + } + } + }, + "MobileDeviceService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetMobileDevice": { + "requestType": "GetMobileDeviceRequest", + "responseType": "MobileDevice", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/mobileDevices/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/mobileDevices/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMobileDevices": { + "requestType": "ListMobileDevicesRequest", + "responseType": "ListMobileDevicesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/mobileDevices", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/mobileDevices" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetMobileDeviceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDevice" + } + } + } + }, + "ListMobileDevicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMobileDevicesResponse": { + "fields": { + "mobileDevices": { + "rule": "repeated", + "type": "MobileDevice", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "MobileDeviceSubmodel": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/MobileDeviceSubmodel", + "(google.api.resource).pattern": "networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}", + "(google.api.resource).plural": "mobileDeviceSubmodels", + "(google.api.resource).singular": "mobileDeviceSubmodel" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_mobileDevice": { + "oneof": [ + "mobileDevice" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "mobileDevice": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDevice", + "proto3_optional": true + } + } + } + }, + "MobileDeviceSubmodelService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetMobileDeviceSubmodel": { + "requestType": "GetMobileDeviceSubmodelRequest", + "responseType": "MobileDeviceSubmodel", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/mobileDeviceSubmodels/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/mobileDeviceSubmodels/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMobileDeviceSubmodels": { + "requestType": "ListMobileDeviceSubmodelsRequest", + "responseType": "ListMobileDeviceSubmodelsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/mobileDeviceSubmodels", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/mobileDeviceSubmodels" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetMobileDeviceSubmodelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDeviceSubmodel" + } + } + } + }, + "ListMobileDeviceSubmodelsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMobileDeviceSubmodelsResponse": { + "fields": { + "mobileDeviceSubmodels": { + "rule": "repeated", + "type": "MobileDeviceSubmodel", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "Network": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Network", + "(google.api.resource).pattern": "networks/{network_code}", + "(google.api.resource).plural": "networks", + "(google.api.resource).singular": "network" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyCode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "timeZone": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currencyCode": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "secondaryCurrencyCodes": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "effectiveRootAdUnit": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit" + } + }, + "testNetwork": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networkId": { + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NetworkService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetNetwork": { + "requestType": "GetNetworkRequest", + "responseType": "Network", + "options": { + "(google.api.http).get": "/v1/{name=networks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListNetworks": { + "requestType": "ListNetworksRequest", + "responseType": "ListNetworksResponse", + "options": { + "(google.api.http).get": "/v1/networks" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/networks" + } + } + ] + } + } + }, + "GetNetworkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + } + } + }, + "ListNetworksRequest": { + "fields": {} + }, + "ListNetworksResponse": { + "fields": { + "networks": { + "rule": "repeated", + "type": "Network", + "id": 1 + } + } + }, + "OperatingSystem": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/OperatingSystem", + "(google.api.resource).pattern": "networks/{network_code}/operatingSystems/{operating_system}", + "(google.api.resource).plural": "operatingSystems", + "(google.api.resource).singular": "operatingSystem" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "OperatingSystemService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetOperatingSystem": { + "requestType": "GetOperatingSystemRequest", + "responseType": "OperatingSystem", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/operatingSystems/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/operatingSystems/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOperatingSystems": { + "requestType": "ListOperatingSystemsRequest", + "responseType": "ListOperatingSystemsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/operatingSystems", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/operatingSystems" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetOperatingSystemRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" + } + } + } + }, + "ListOperatingSystemsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListOperatingSystemsResponse": { + "fields": { + "operatingSystems": { + "rule": "repeated", + "type": "OperatingSystem", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "OperatingSystemVersion": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/OperatingSystemVersion", + "(google.api.resource).pattern": "networks/{network_code}/operatingSystemVersions/{operating_system_version}", + "(google.api.resource).plural": "operatingSystemVersions", + "(google.api.resource).singular": "operatingSystemVersion" + }, + "oneofs": { + "_majorVersion": { + "oneof": [ + "majorVersion" + ] + }, + "_minorVersion": { + "oneof": [ + "minorVersion" + ] + }, + "_microVersion": { + "oneof": [ + "microVersion" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "majorVersion": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "minorVersion": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "microVersion": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "OperatingSystemVersionService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetOperatingSystemVersion": { + "requestType": "GetOperatingSystemVersionRequest", + "responseType": "OperatingSystemVersion", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/operatingSystemVersions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/operatingSystemVersions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOperatingSystemVersions": { + "requestType": "ListOperatingSystemVersionsRequest", + "responseType": "ListOperatingSystemVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/operatingSystemVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/operatingSystemVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetOperatingSystemVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" + } + } + } + }, + "ListOperatingSystemVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListOperatingSystemVersionsResponse": { + "fields": { + "operatingSystemVersions": { + "rule": "repeated", + "type": "OperatingSystemVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "OrderStatusEnum": { + "fields": {}, + "nested": { + "OrderStatus": { + "values": { + "ORDER_STATUS_UNSPECIFIED": 0, + "DRAFT": 2, + "PENDING_APPROVAL": 3, + "APPROVED": 4, + "DISAPPROVED": 5, + "PAUSED": 6, + "CANCELED": 7, + "DELETED": 8 + } + } + } + }, + "Order": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Order", + "(google.api.resource).pattern": "networks/{network_code}/orders/{order}", + "(google.api.resource).plural": "orders", + "(google.api.resource).singular": "order" + }, + "oneofs": { + "_orderId": { + "oneof": [ + "orderId" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_programmatic": { + "oneof": [ + "programmatic" + ] + }, + "_trafficker": { + "oneof": [ + "trafficker" + ] + }, + "_advertiser": { + "oneof": [ + "advertiser" + ] + }, + "_agency": { + "oneof": [ + "agency" + ] + }, + "_creator": { + "oneof": [ + "creator" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_startTime": { + "oneof": [ + "startTime" + ] + }, + "_endTime": { + "oneof": [ + "endTime" + ] + }, + "_unlimitedEndTime": { + "oneof": [ + "unlimitedEndTime" + ] + }, + "_externalOrderId": { + "oneof": [ + "externalOrderId" + ] + }, + "_archived": { + "oneof": [ + "archived" + ] + }, + "_lastModifiedByApp": { + "oneof": [ + "lastModifiedByApp" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_notes": { + "oneof": [ + "notes" + ] + }, + "_poNumber": { + "oneof": [ + "poNumber" + ] + }, + "_status": { + "oneof": [ + "status" + ] + }, + "_salesperson": { + "oneof": [ + "salesperson" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "orderId": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "programmatic": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "trafficker": { + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/User", + "proto3_optional": true + } + }, + "advertiserContacts": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Contact" + } + }, + "advertiser": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Company", + "proto3_optional": true + } + }, + "agencyContacts": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Contact" + } + }, + "agency": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Company", + "proto3_optional": true + } + }, + "appliedTeams": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" + } + }, + "effectiveTeams": { + "rule": "repeated", + "type": "string", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" + } + }, + "creator": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "admanager.googleapis.com/User", + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "unlimitedEndTime": { + "type": "bool", + "id": 45, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "externalOrderId": { + "type": "int32", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "archived": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "lastModifiedByApp": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "notes": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "poNumber": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "status": { + "type": "OrderStatusEnum.OrderStatus", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "salesperson": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/User", + "proto3_optional": true + } + }, + "secondarySalespeople": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST", + "(google.api.resource_reference).type": "admanager.googleapis.com/User" + } + }, + "secondaryTraffickers": { + "rule": "repeated", + "type": "string", + "id": 24, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST", + "(google.api.resource_reference).type": "admanager.googleapis.com/User" + } + }, + "appliedLabels": { + "rule": "repeated", + "type": "AppliedLabel", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "effectiveAppliedLabels": { + "rule": "repeated", + "type": "AppliedLabel", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customFieldValues": { + "rule": "repeated", + "type": "CustomFieldValue", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OrderService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetOrder": { + "requestType": "GetOrderRequest", + "responseType": "Order", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/orders/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/orders/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOrders": { + "requestType": "ListOrdersRequest", + "responseType": "ListOrdersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/orders", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/orders" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetOrderRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Order" + } + } + } + }, + "ListOrdersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListOrdersResponse": { + "fields": { + "orders": { + "rule": "repeated", + "type": "Order", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "PlacementStatusEnum": { + "fields": {}, + "nested": { + "PlacementStatus": { + "values": { + "PLACEMENT_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "ARCHIVED": 3 + } + } + } + }, + "Placement": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Placement", + "(google.api.resource).pattern": "networks/{network_code}/placements/{placement}", + "(google.api.resource).plural": "placements", + "(google.api.resource).singular": "placement" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_placementCode": { + "oneof": [ + "placementCode" + ] + }, + "_status": { + "oneof": [ + "status" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "placementId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "placementCode": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "status": { + "type": "PlacementStatusEnum.PlacementStatus", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "targetedAdUnits": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "PlacementService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetPlacement": { + "requestType": "GetPlacementRequest", + "responseType": "Placement", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/placements/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/placements/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPlacements": { + "requestType": "ListPlacementsRequest", + "responseType": "ListPlacementsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/placements", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/placements" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePlacement": { + "requestType": "CreatePlacementRequest", + "responseType": "Placement", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements", + "(google.api.http).body": "placement", + "(google.api.method_signature)": "parent,placement" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements", + "body": "placement" + } + }, + { + "(google.api.method_signature)": "parent,placement" + } + ] + }, + "UpdatePlacement": { + "requestType": "UpdatePlacementRequest", + "responseType": "Placement", + "options": { + "(google.api.http).patch": "/v1/{placement.name=networks/*/placements/*}", + "(google.api.http).body": "placement", + "(google.api.method_signature)": "placement,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{placement.name=networks/*/placements/*}", + "body": "placement" + } + }, + { + "(google.api.method_signature)": "placement,update_mask" + } + ] + }, + "BatchCreatePlacements": { + "requestType": "BatchCreatePlacementsRequest", + "responseType": "BatchCreatePlacementsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BatchUpdatePlacements": { + "requestType": "BatchUpdatePlacementsRequest", + "responseType": "BatchUpdatePlacementsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements:batchUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BatchActivatePlacements": { + "requestType": "BatchActivatePlacementsRequest", + "responseType": "BatchActivatePlacementsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements:batchActivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements:batchActivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] + }, + "BatchDeactivatePlacements": { + "requestType": "BatchDeactivatePlacementsRequest", + "responseType": "BatchDeactivatePlacementsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements:batchDeactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements:batchDeactivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] + }, + "BatchArchivePlacements": { + "requestType": "BatchArchivePlacementsRequest", + "responseType": "BatchArchivePlacementsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/placements:batchArchive", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/placements:batchArchive", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] + } + } + }, + "GetPlacementRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + } + } + } + }, + "ListPlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPlacementsResponse": { + "fields": { + "placements": { + "rule": "repeated", + "type": "Placement", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CreatePlacementRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "placement": { + "type": "Placement", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreatePlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "requests": { + "rule": "repeated", + "type": "CreatePlacementRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreatePlacementsResponse": { + "fields": { + "placements": { + "rule": "repeated", + "type": "Placement", + "id": 1 + } + } + }, + "UpdatePlacementRequest": { + "fields": { + "placement": { + "type": "Placement", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdatePlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "requests": { + "rule": "repeated", + "type": "UpdatePlacementRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdatePlacementsResponse": { + "fields": { + "placements": { + "rule": "repeated", + "type": "Placement", + "id": 1 + } + } + }, + "BatchActivatePlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + } + } + } + }, + "BatchActivatePlacementsResponse": { + "fields": {} + }, + "BatchDeactivatePlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + } + } + } + }, + "BatchDeactivatePlacementsResponse": { + "fields": {} + }, + "BatchArchivePlacementsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + } + } + } + }, + "BatchArchivePlacementsResponse": { + "fields": {} + }, + "PrivateAuctionDeal": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/PrivateAuctionDeal", + "(google.api.resource).pattern": "networks/{network_code}/privateAuctionDeals/{private_auction_deal}", + "(google.api.resource).plural": "privateAuctionDeals", + "(google.api.resource).singular": "privateAuctionDeal" + }, + "oneofs": { + "_privateAuctionDealId": { + "oneof": [ + "privateAuctionDealId" + ] + }, + "_privateAuctionId": { + "oneof": [ + "privateAuctionId" + ] + }, + "_privateAuctionDisplayName": { + "oneof": [ + "privateAuctionDisplayName" + ] + }, + "_buyerAccountId": { + "oneof": [ + "buyerAccountId" + ] + }, + "_externalDealId": { + "oneof": [ + "externalDealId" + ] + }, + "_targeting": { + "oneof": [ + "targeting" + ] + }, + "_endTime": { + "oneof": [ + "endTime" + ] + }, + "_floorPrice": { + "oneof": [ + "floorPrice" + ] + }, + "_status": { + "oneof": [ + "status" + ] + }, + "_auctionPriorityEnabled": { + "oneof": [ + "auctionPriorityEnabled" + ] + }, + "_blockOverrideEnabled": { + "oneof": [ + "blockOverrideEnabled" + ] + }, + "_buyerPermissionType": { + "oneof": [ + "buyerPermissionType" + ] + }, + "_buyerData": { + "oneof": [ + "buyerData" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "privateAuctionDealId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "privateAuctionId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "privateAuctionDisplayName": { + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "buyerAccountId": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "externalDealId": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "targeting": { + "type": "Targeting", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "floorPrice": { + "type": "google.type.Money", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "creativeSizes": { + "rule": "repeated", + "type": "Size", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "status": { + "type": "PrivateMarketplaceDealStatusEnum.PrivateMarketplaceDealStatus", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "auctionPriorityEnabled": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "blockOverrideEnabled": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "buyerPermissionType": { + "type": "DealBuyerPermissionTypeEnum.DealBuyerPermissionType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "buyerData": { + "type": "BuyerData", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "BuyerData": { + "fields": { + "buyerEmails": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "PrivateMarketplaceDealStatusEnum": { + "fields": {}, + "nested": { + "PrivateMarketplaceDealStatus": { + "values": { + "PRIVATE_MARKETPLACE_DEAL_STATUS_UNSPECIFIED": 0, + "PENDING": 1, + "ACTIVE": 2, + "CANCELED": 3, + "SELLER_PAUSED": 4, + "BUYER_PAUSED": 5 + } + } + } + }, + "Targeting": { + "fields": { + "geoTargeting": { + "type": "GeoTargeting", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "technologyTargeting": { + "type": "TechnologyTargeting", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inventoryTargeting": { + "type": "InventoryTargeting", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestPlatformTargeting": { + "type": "RequestPlatformTargeting", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customTargeting": { + "type": "CustomTargeting", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userDomainTargeting": { + "type": "UserDomainTargeting", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "videoPositionTargeting": { + "type": "VideoPositionTargeting", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSegmentTargeting": { + "type": "DataSegmentTargeting", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "contentTargeting": { + "type": "ContentTargeting", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mobileApplicationTargeting": { + "type": "MobileApplicationTargeting", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GeoTargeting": { + "fields": { + "targetedGeos": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" + } + }, + "excludedGeos": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/GeoTarget" + } + } + } + }, + "TechnologyTargeting": { + "fields": { + "bandwidthTargeting": { + "type": "BandwidthTargeting", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "browserTargeting": { + "type": "BrowserTargeting", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "browserLanguageTargeting": { + "type": "BrowserLanguageTargeting", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deviceCapabilityTargeting": { + "type": "DeviceCapabilityTargeting", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deviceCategoryTargeting": { + "type": "DeviceCategoryTargeting", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deviceManufacturerTargeting": { + "type": "DeviceManufacturerTargeting", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mobileCarrierTargeting": { + "type": "MobileCarrierTargeting", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "operatingSystemTargeting": { + "type": "OperatingSystemTargeting", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BandwidthTargeting": { + "fields": { + "targetedBandwidthGroups": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + } + }, + "excludedBandwidthGroups": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/BandwidthGroup" + } + } + } + }, + "BrowserTargeting": { + "fields": { + "targetedBrowsers": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Browser" + } + }, + "excludedBrowsers": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Browser" + } + } + } + }, + "BrowserLanguageTargeting": { + "fields": { + "targetedBrowserLanguages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/BrowserLanguage" + } + }, + "excludedBrowserLanguages": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/BrowserLanguage" + } + } + } + }, + "DeviceCategoryTargeting": { + "fields": { + "targetedCategories": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" + } + }, + "excludedCategories": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCategory" + } + } + } + }, + "DeviceCapabilityTargeting": { + "fields": { + "targetedCapabilities": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCapability" + } + }, + "excludedCapabilities": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceCapability" + } + } + } + }, + "DeviceManufacturerTargeting": { + "fields": { + "targetedDeviceManufacturers": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceManufacturer" + } + }, + "excludedDeviceManufacturers": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/DeviceManufacturer" + } + }, + "targetedMobileDevices": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDevice" + } + }, + "excludedMobileDevices": { + "rule": "repeated", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDevice" + } + }, + "targetedMobileDeviceSubmodels": { + "rule": "repeated", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDeviceSubmodel" + } + }, + "excludedMobileDeviceSubmodels": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileDeviceSubmodel" + } + } + } + }, + "MobileCarrierTargeting": { + "fields": { + "targetedMobileCarriers": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileCarrier" + } + }, + "excludedMobileCarriers": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/MobileCarrier" + } + } + } + }, + "OperatingSystemTargeting": { + "fields": { + "targetedOperatingSystems": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" + } + }, + "excludedOperatingSystems": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystem" + } + }, + "targetedOperatingSystemVersions": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" + } + }, + "excludedOperatingSystemVersions": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/OperatingSystemVersion" + } + } + } + }, + "InventoryTargeting": { + "fields": { + "targetedAdUnits": { + "rule": "repeated", + "type": "AdUnitTargeting", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludedAdUnits": { + "rule": "repeated", + "type": "AdUnitTargeting", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targetedPlacements": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Placement" + } + } + } + }, + "AdUnitTargeting": { + "oneofs": { + "_includeDescendants": { + "oneof": [ + "includeDescendants" + ] + }, + "_adUnit": { + "oneof": [ + "adUnit" + ] + } + }, + "fields": { + "includeDescendants": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "adUnit": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/AdUnit", + "proto3_optional": true + } + } + } + }, + "RequestPlatformTargeting": { + "fields": { + "requestPlatforms": { + "rule": "repeated", + "type": "RequestPlatformEnum.RequestPlatform", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CustomTargeting": { + "fields": { + "customTargetingClauses": { + "rule": "repeated", + "type": "CustomTargetingClause", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CustomTargetingClause": { + "fields": { + "customTargetingLiterals": { + "rule": "repeated", + "type": "CustomTargetingLiteral", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "audienceSegmentTargetings": { + "rule": "repeated", + "type": "AudienceSegmentTargeting", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cmsMetadataTargetings": { + "rule": "repeated", + "type": "CmsMetadataTargeting", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CustomTargetingLiteral": { + "oneofs": { + "_negative": { + "oneof": [ + "negative" + ] + }, + "_customTargetingKey": { + "oneof": [ + "customTargetingKey" + ] + } + }, + "fields": { + "negative": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "customTargetingKey": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingKey", + "proto3_optional": true + } + }, + "customTargetingValues": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/CustomTargetingValue" + } + } + } + }, + "AudienceSegmentTargeting": { + "oneofs": { + "_negative": { + "oneof": [ + "negative" + ] + } + }, + "fields": { + "negative": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceSegments": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/AudienceSegment" + } + } + } + }, + "CmsMetadataTargeting": { + "oneofs": { + "_negative": { + "oneof": [ + "negative" + ] + } + }, + "fields": { + "negative": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "cmsMetadataValues": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/CmsMetadataValue" + } + } + } + }, + "UserDomainTargeting": { + "fields": { + "targetedUserDomains": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludedUserDomains": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VideoPositionTargeting": { + "fields": { + "videoPositions": { + "rule": "repeated", + "type": "VideoPosition", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VideoPosition": { + "oneofs": { + "_midrollIndex": { + "oneof": [ + "midrollIndex" + ] + }, + "_reverseMidrollIndex": { + "oneof": [ + "reverseMidrollIndex" + ] + }, + "_podPosition": { + "oneof": [ + "podPosition" + ] + }, + "_positionType": { + "oneof": [ + "positionType" + ] + }, + "_bumperType": { + "oneof": [ + "bumperType" + ] + } + }, + "fields": { + "midrollIndex": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "reverseMidrollIndex": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "podPosition": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "positionType": { + "type": "VideoPositionEnum.VideoPosition", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "bumperType": { + "type": "TargetedVideoBumperTypeEnum.TargetedVideoBumperType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DataSegmentTargeting": { + "fields": { + "hasDataSegmentTargeting": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ContentTargeting": { + "fields": { + "targetedContent": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Content" + } + }, + "excludedContent": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Content" + } + }, + "targetedContentBundles": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/ContentBundle" + } + }, + "excludedContentBundles": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/ContentBundle" + } + } + } + }, + "MobileApplicationTargeting": { + "oneofs": { + "targeting": { + "oneof": [ + "firstPartyTargeting" + ] + } + }, + "fields": { + "firstPartyTargeting": { + "type": "FirstPartyMobileApplicationTargeting", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FirstPartyMobileApplicationTargeting": { + "fields": { + "targetedApplications": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Application" + } + }, + "excludedApplications": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/Application" + } + } + } + }, + "RequestPlatformEnum": { + "fields": {}, + "nested": { + "RequestPlatform": { + "values": { + "REQUEST_PLATFORM_UNSPECIFIED": 0, + "BROWSER": 1, + "MOBILE_APP": 2, + "VIDEO_PLAYER": 3 + } + } + } + }, + "TargetedVideoBumperTypeEnum": { + "fields": {}, + "nested": { + "TargetedVideoBumperType": { + "values": { + "TARGETED_VIDEO_BUMPER_TYPE_UNSPECIFIED": 0, + "AFTER": 1, + "BEFORE": 2 + } + } + } + }, + "VideoPositionEnum": { + "fields": {}, + "nested": { + "VideoPosition": { + "values": { + "VIDEO_POSITION_UNSPECIFIED": 0, + "ALL": 1, + "MIDROLL": 2, + "POSTROLL": 3, + "PREROLL": 4 + } + } + } + }, + "PrivateAuctionDealService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetPrivateAuctionDeal": { + "requestType": "GetPrivateAuctionDealRequest", + "responseType": "PrivateAuctionDeal", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/privateAuctionDeals/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/privateAuctionDeals/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPrivateAuctionDeals": { + "requestType": "ListPrivateAuctionDealsRequest", + "responseType": "ListPrivateAuctionDealsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/privateAuctionDeals", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/privateAuctionDeals" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePrivateAuctionDeal": { + "requestType": "CreatePrivateAuctionDealRequest", + "responseType": "PrivateAuctionDeal", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/privateAuctionDeals", + "(google.api.http).body": "private_auction_deal", + "(google.api.method_signature)": "parent,private_auction_deal" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/privateAuctionDeals", + "body": "private_auction_deal" + } + }, + { + "(google.api.method_signature)": "parent,private_auction_deal" + } + ] + }, + "UpdatePrivateAuctionDeal": { + "requestType": "UpdatePrivateAuctionDealRequest", + "responseType": "PrivateAuctionDeal", + "options": { + "(google.api.http).patch": "/v1/{private_auction_deal.name=networks/*/privateAuctionDeals/*}", + "(google.api.http).body": "private_auction_deal", + "(google.api.method_signature)": "private_auction_deal,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{private_auction_deal.name=networks/*/privateAuctionDeals/*}", + "body": "private_auction_deal" + } + }, + { + "(google.api.method_signature)": "private_auction_deal,update_mask" + } + ] + } + } + }, + "GetPrivateAuctionDealRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/PrivateAuctionDeal" + } + } + } + }, + "ListPrivateAuctionDealsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPrivateAuctionDealsResponse": { + "fields": { + "privateAuctionDeals": { + "rule": "repeated", + "type": "PrivateAuctionDeal", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CreatePrivateAuctionDealRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "privateAuctionDeal": { + "type": "PrivateAuctionDeal", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdatePrivateAuctionDealRequest": { + "fields": { + "privateAuctionDeal": { + "type": "PrivateAuctionDeal", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PrivateAuction": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/PrivateAuction", + "(google.api.resource).pattern": "networks/{network_code}/privateAuctions/{private_auction}", + "(google.api.resource).plural": "privateAuctions", + "(google.api.resource).singular": "privateAuction" + }, + "oneofs": { + "_privateAuctionId": { + "oneof": [ + "privateAuctionId" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_archived": { + "oneof": [ + "archived" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "privateAuctionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sellerContactUsers": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "admanager.googleapis.com/User" + } + }, + "archived": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "PrivateAuctionService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetPrivateAuction": { + "requestType": "GetPrivateAuctionRequest", + "responseType": "PrivateAuction", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/privateAuctions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/privateAuctions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPrivateAuctions": { + "requestType": "ListPrivateAuctionsRequest", + "responseType": "ListPrivateAuctionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/privateAuctions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/privateAuctions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePrivateAuction": { + "requestType": "CreatePrivateAuctionRequest", + "responseType": "PrivateAuction", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/privateAuctions", + "(google.api.http).body": "private_auction", + "(google.api.method_signature)": "parent,private_auction" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/privateAuctions", + "body": "private_auction" + } + }, + { + "(google.api.method_signature)": "parent,private_auction" + } + ] + }, + "UpdatePrivateAuction": { + "requestType": "UpdatePrivateAuctionRequest", + "responseType": "PrivateAuction", + "options": { + "(google.api.http).patch": "/v1/{private_auction.name=networks/*/privateAuctions/*}", + "(google.api.http).body": "private_auction", + "(google.api.method_signature)": "private_auction,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{private_auction.name=networks/*/privateAuctions/*}", + "body": "private_auction" + } + }, + { + "(google.api.method_signature)": "private_auction,update_mask" + } + ] + } + } + }, + "GetPrivateAuctionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/PrivateAuction" + } + } + } + }, + "ListPrivateAuctionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPrivateAuctionsResponse": { + "fields": { + "privateAuctions": { + "rule": "repeated", + "type": "PrivateAuction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CreatePrivateAuctionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "privateAuction": { + "type": "PrivateAuction", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdatePrivateAuctionRequest": { + "fields": { + "privateAuction": { + "type": "PrivateAuction", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ProgrammaticBuyer": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/ProgrammaticBuyer", + "(google.api.resource).pattern": "networks/{network_code}/programmaticBuyers/{programmatic_buyer}", + "(google.api.resource).plural": "programmaticBuyers", + "(google.api.resource).singular": "programmaticBuyer" + }, + "oneofs": { + "_buyerAccountId": { + "oneof": [ + "buyerAccountId" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_parentAccountId": { + "oneof": [ + "parentAccountId" + ] + }, + "_partnerClientId": { + "oneof": [ + "partnerClientId" + ] + }, + "_agency": { + "oneof": [ + "agency" + ] + }, + "_preferredDealsEnabled": { + "oneof": [ + "preferredDealsEnabled" + ] + }, + "_programmaticGuaranteedEnabled": { + "oneof": [ + "programmaticGuaranteedEnabled" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "buyerAccountId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "parentAccountId": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "partnerClientId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "agency": { + "type": "bool", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "preferredDealsEnabled": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "programmaticGuaranteedEnabled": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ProgrammaticBuyerService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetProgrammaticBuyer": { + "requestType": "GetProgrammaticBuyerRequest", + "responseType": "ProgrammaticBuyer", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/programmaticBuyers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/programmaticBuyers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListProgrammaticBuyers": { + "requestType": "ListProgrammaticBuyersRequest", + "responseType": "ListProgrammaticBuyersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/programmaticBuyers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/programmaticBuyers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetProgrammaticBuyerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/ProgrammaticBuyer" + } + } + } + }, + "ListProgrammaticBuyersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListProgrammaticBuyersResponse": { + "fields": { + "programmaticBuyers": { + "rule": "repeated", + "type": "ProgrammaticBuyer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "ReportDefinition": { + "oneofs": { + "_comparisonDateRange": { + "oneof": [ + "comparisonDateRange" + ] + } + }, + "fields": { + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filters": { + "rule": "repeated", + "type": "Filter", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeZoneSource": { + "type": "TimeZoneSource", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeZone": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRange": { + "type": "DateRange", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "comparisonDateRange": { + "type": "DateRange", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "customDimensionKeyIds": { + "rule": "repeated", + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lineItemCustomFieldIds": { + "rule": "repeated", + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderCustomFieldIds": { + "rule": "repeated", + "type": "int64", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "creativeCustomFieldIds": { + "rule": "repeated", + "type": "int64", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reportType": { + "type": "ReportType", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timePeriodColumn": { + "type": "TimePeriodColumn", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "flags": { + "rule": "repeated", + "type": "Flag", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sorts": { + "rule": "repeated", + "type": "Sort", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Field": { + "oneofs": { + "field": { + "oneof": [ + "dimension", + "metric" + ] + } + }, + "fields": { + "dimension": { + "type": "Dimension", + "id": 1 + }, + "metric": { + "type": "Metric", + "id": 2 + } + } + }, + "DateRange": { + "oneofs": { + "dateRangeType": { + "oneof": [ + "fixed", + "relative" + ] + } + }, + "fields": { + "fixed": { + "type": "FixedDateRange", + "id": 1 + }, + "relative": { + "type": "RelativeDateRange", + "id": 2 + } + }, + "nested": { + "FixedDateRange": { + "fields": { + "startDate": { + "type": "google.type.Date", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endDate": { + "type": "google.type.Date", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RelativeDateRange": { + "values": { + "RELATIVE_DATE_RANGE_UNSPECIFIED": 0, + "TODAY": 1, + "YESTERDAY": 2, + "THIS_WEEK": 3, + "THIS_WEEK_TO_DATE": 29, + "THIS_MONTH": 4, + "THIS_MONTH_TO_DATE": 26, + "THIS_QUARTER": 5, + "THIS_QUARTER_TO_DATE": 27, + "THIS_YEAR": 6, + "THIS_YEAR_TO_DATE": 28, + "LAST_WEEK": 7, + "LAST_MONTH": 8, + "LAST_QUARTER": 9, + "LAST_YEAR": 10, + "LAST_7_DAYS": 11, + "LAST_30_DAYS": 12, + "LAST_60_DAYS": 13, + "LAST_90_DAYS": 14, + "LAST_180_DAYS": 15, + "LAST_360_DAYS": 16, + "LAST_365_DAYS": 17, + "LAST_3_MONTHS": 18, + "LAST_6_MONTHS": 19, + "LAST_12_MONTHS": 20, + "ALL_AVAILABLE": 21, + "TOMORROW": 30, + "NEXT_90_DAYS": 31, + "NEXT_MONTH": 32, + "NEXT_3_MONTHS": 33, + "NEXT_12_MONTHS": 34, + "NEXT_WEEK": 35, + "NEXT_QUARTER": 36, + "TO_END_OF_NEXT_MONTH": 37, + "PREVIOUS_PERIOD": 22, + "SAME_PERIOD_PREVIOUS_YEAR": 24 + } + } + } + }, + "Filter": { + "oneofs": { + "type": { + "oneof": [ + "fieldFilter", + "notFilter", + "andFilter", + "orFilter" + ] + } + }, + "fields": { + "fieldFilter": { + "type": "FieldFilter", + "id": 1 + }, + "notFilter": { + "type": "Filter", + "id": 2 + }, + "andFilter": { + "type": "FilterList", + "id": 3 + }, + "orFilter": { + "type": "FilterList", + "id": 4 + } + }, + "nested": { + "FieldFilter": { + "oneofs": { + "_slice": { + "oneof": [ + "slice" + ] + }, + "_timePeriodIndex": { + "oneof": [ + "timePeriodIndex" + ] + }, + "_metricValueType": { + "oneof": [ + "metricValueType" + ] + } + }, + "fields": { + "field": { + "type": "Field", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "operation": { + "type": "Operation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "values": { + "rule": "repeated", + "type": "ReportValue", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "slice": { + "type": "Slice", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "timePeriodIndex": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metricValueType": { + "type": "MetricValueType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "FilterList": { + "fields": { + "filters": { + "rule": "repeated", + "type": "Filter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Operation": { + "values": { + "IN": 0, + "NOT_IN": 1, + "CONTAINS": 2, + "NOT_CONTAINS": 3, + "LESS_THAN": 4, + "LESS_THAN_EQUALS": 5, + "GREATER_THAN": 6, + "GREATER_THAN_EQUALS": 7, + "BETWEEN": 8, + "MATCHES": 9, + "NOT_MATCHES": 10 + } + } + } + }, + "Sort": { + "oneofs": { + "_slice": { + "oneof": [ + "slice" + ] + }, + "_timePeriodIndex": { + "oneof": [ + "timePeriodIndex" + ] + }, + "_metricValueType": { + "oneof": [ + "metricValueType" + ] + } + }, + "fields": { + "field": { + "type": "Field", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "descending": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "slice": { + "type": "Slice", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "timePeriodIndex": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metricValueType": { + "type": "MetricValueType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Slice": { + "fields": { + "dimension": { + "type": "Dimension", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "ReportValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Flag": { + "fields": { + "filters": { + "rule": "repeated", + "type": "Filter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ReportType": { + "values": { + "REPORT_TYPE_UNSPECIFIED": 0, + "HISTORICAL": 1, + "REACH": 5, + "PRIVACY_AND_MESSAGING": 6, + "AD_SPEED": 13 + } + }, + "Dimension": { + "options": { + "allow_alias": true + }, + "valuesOptions": { + "PROGRAMMATIC_BUYER_ID": { + "deprecated": true + }, + "PROGRAMMATIC_BUYER_NAME": { + "deprecated": true + } + }, + "values": { + "DIMENSION_UNSPECIFIED": 0, + "ACTIVE_VIEW_MEASUREMENT_SOURCE": 575, + "ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME": 576, + "ADVERTISER_CREDIT_STATUS": 475, + "ADVERTISER_CREDIT_STATUS_NAME": 476, + "ADVERTISER_DOMAIN_NAME": 242, + "ADVERTISER_EXTERNAL_ID": 228, + "ADVERTISER_ID": 131, + "ADVERTISER_LABELS": 230, + "ADVERTISER_LABEL_IDS": 229, + "ADVERTISER_NAME": 132, + "ADVERTISER_PRIMARY_CONTACT": 227, + "ADVERTISER_STATUS": 471, + "ADVERTISER_STATUS_NAME": 472, + "ADVERTISER_TYPE": 473, + "ADVERTISER_TYPE_NAME": 474, + "ADVERTISER_VERTICAL": 580, + "ADX_PRODUCT": 499, + "ADX_PRODUCT_NAME": 500, + "AD_EXPERIENCES_TYPE": 641, + "AD_EXPERIENCES_TYPE_NAME": 642, + "AD_LOCATION": 390, + "AD_LOCATION_NAME": 391, + "AD_TECHNOLOGY_PROVIDER_DOMAIN": 620, + "AD_TECHNOLOGY_PROVIDER_ID": 621, + "AD_TECHNOLOGY_PROVIDER_NAME": 622, + "AD_TYPE": 497, + "AD_TYPE_NAME": 498, + "AD_UNIT_CODE": 64, + "AD_UNIT_CODE_LEVEL_1": 65, + "AD_UNIT_CODE_LEVEL_10": 74, + "AD_UNIT_CODE_LEVEL_11": 75, + "AD_UNIT_CODE_LEVEL_12": 76, + "AD_UNIT_CODE_LEVEL_13": 77, + "AD_UNIT_CODE_LEVEL_14": 78, + "AD_UNIT_CODE_LEVEL_15": 79, + "AD_UNIT_CODE_LEVEL_16": 80, + "AD_UNIT_CODE_LEVEL_2": 66, + "AD_UNIT_CODE_LEVEL_3": 67, + "AD_UNIT_CODE_LEVEL_4": 68, + "AD_UNIT_CODE_LEVEL_5": 69, + "AD_UNIT_CODE_LEVEL_6": 70, + "AD_UNIT_CODE_LEVEL_7": 71, + "AD_UNIT_CODE_LEVEL_8": 72, + "AD_UNIT_CODE_LEVEL_9": 73, + "AD_UNIT_ID": 25, + "AD_UNIT_ID_ALL_LEVEL": 27, + "AD_UNIT_ID_LEVEL_1": 30, + "AD_UNIT_ID_LEVEL_10": 48, + "AD_UNIT_ID_LEVEL_11": 50, + "AD_UNIT_ID_LEVEL_12": 52, + "AD_UNIT_ID_LEVEL_13": 54, + "AD_UNIT_ID_LEVEL_14": 56, + "AD_UNIT_ID_LEVEL_15": 58, + "AD_UNIT_ID_LEVEL_16": 60, + "AD_UNIT_ID_LEVEL_2": 32, + "AD_UNIT_ID_LEVEL_3": 34, + "AD_UNIT_ID_LEVEL_4": 36, + "AD_UNIT_ID_LEVEL_5": 38, + "AD_UNIT_ID_LEVEL_6": 40, + "AD_UNIT_ID_LEVEL_7": 42, + "AD_UNIT_ID_LEVEL_8": 44, + "AD_UNIT_ID_LEVEL_9": 46, + "AD_UNIT_ID_TOP_LEVEL": 142, + "AD_UNIT_NAME": 26, + "AD_UNIT_NAME_ALL_LEVEL": 29, + "AD_UNIT_NAME_LEVEL_1": 31, + "AD_UNIT_NAME_LEVEL_10": 49, + "AD_UNIT_NAME_LEVEL_11": 51, + "AD_UNIT_NAME_LEVEL_12": 53, + "AD_UNIT_NAME_LEVEL_13": 55, + "AD_UNIT_NAME_LEVEL_14": 57, + "AD_UNIT_NAME_LEVEL_15": 59, + "AD_UNIT_NAME_LEVEL_16": 61, + "AD_UNIT_NAME_LEVEL_2": 33, + "AD_UNIT_NAME_LEVEL_3": 35, + "AD_UNIT_NAME_LEVEL_4": 37, + "AD_UNIT_NAME_LEVEL_5": 39, + "AD_UNIT_NAME_LEVEL_6": 41, + "AD_UNIT_NAME_LEVEL_7": 43, + "AD_UNIT_NAME_LEVEL_8": 45, + "AD_UNIT_NAME_LEVEL_9": 47, + "AD_UNIT_NAME_TOP_LEVEL": 143, + "AD_UNIT_REWARD_AMOUNT": 63, + "AD_UNIT_REWARD_TYPE": 62, + "AD_UNIT_STATUS": 206, + "AD_UNIT_STATUS_NAME": 207, + "AGENCY_LEVEL_1_ID": 565, + "AGENCY_LEVEL_1_NAME": 566, + "AGENCY_LEVEL_2_ID": 567, + "AGENCY_LEVEL_2_NAME": 568, + "AGENCY_LEVEL_3_ID": 569, + "AGENCY_LEVEL_3_NAME": 570, + "AGE_BRACKET": 508, + "AGE_BRACKET_NAME": 582, + "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS": 442, + "APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME": 443, + "APP_VERSION": 392, + "AUCTION_PACKAGE_DEAL": 579, + "AUCTION_PACKAGE_DEAL_ID": 571, + "AUDIENCE_SEGMENT_ID_TARGETED": 584, + "AUDIENCE_SEGMENT_TARGETED": 585, + "AUTO_REFRESHED_TRAFFIC": 421, + "AUTO_REFRESHED_TRAFFIC_NAME": 422, + "BIDDER_ENCRYPTED_ID": 493, + "BIDDER_NAME": 494, + "BID_RANGE": 679, + "BID_REJECTION_REASON": 599, + "BID_REJECTION_REASON_NAME": 600, + "BRANDING_TYPE": 383, + "BRANDING_TYPE_NAME": 384, + "BROWSER_CATEGORY": 119, + "BROWSER_CATEGORY_NAME": 120, + "BROWSER_ID": 235, + "BROWSER_NAME": 236, + "BUYER_NETWORK_ID": 448, + "BUYER_NETWORK_NAME": 449, + "CALLOUT_STATUS_CATEGORY": 588, + "CALLOUT_STATUS_CATEGORY_NAME": 589, + "CARRIER_ID": 369, + "CARRIER_NAME": 368, + "CHANNEL": 501, + "CHILD_NETWORK_CODE": 542, + "CHILD_NETWORK_ID": 544, + "CHILD_PARTNER_NAME": 543, + "CITY_ID": 459, + "CITY_NAME": 452, + "CLASSIFIED_ADVERTISER_ID": 133, + "CLASSIFIED_ADVERTISER_NAME": 134, + "CLASSIFIED_BRAND_ID": 243, + "CLASSIFIED_BRAND_NAME": 244, + "CONTENT_CMS_NAME": 643, + "CONTENT_CMS_VIDEO_ID": 644, + "CONTENT_ID": 246, + "CONTENT_MAPPING_PRESENCE": 731, + "CONTENT_MAPPING_PRESENCE_NAME": 732, + "CONTENT_NAME": 247, + "CONTINENT": 469, + "CONTINENT_NAME": 470, + "COUNTRY_CODE": 466, + "COUNTRY_ID": 11, + "COUNTRY_NAME": 12, + "CREATIVE_BILLING_TYPE": 366, + "CREATIVE_BILLING_TYPE_NAME": 367, + "CREATIVE_CLICK_THROUGH_URL": 174, + "CREATIVE_ID": 138, + "CREATIVE_NAME": 139, + "CREATIVE_POLICIES_FILTERING": 711, + "CREATIVE_POLICIES_FILTERING_NAME": 712, + "CREATIVE_PROTECTIONS_FILTERING": 704, + "CREATIVE_PROTECTIONS_FILTERING_NAME": 705, + "CREATIVE_SET_ROLE_TYPE": 686, + "CREATIVE_SET_ROLE_TYPE_NAME": 687, + "CREATIVE_TECHNOLOGY": 148, + "CREATIVE_TECHNOLOGY_NAME": 149, + "CREATIVE_THIRD_PARTY_VENDOR": 361, + "CREATIVE_TYPE": 344, + "CREATIVE_TYPE_NAME": 345, + "CREATIVE_VENDOR_ID": 706, + "CREATIVE_VENDOR_NAME": 707, + "CREATIVE_VIDEO_REDIRECT_THIRD_PARTY": 562, + "CURATOR_ID": 572, + "CURATOR_NAME": 573, + "CUSTOM_EVENT_ID": 737, + "CUSTOM_EVENT_NAME": 735, + "CUSTOM_EVENT_TYPE": 736, + "CUSTOM_EVENT_TYPE_NAME": 738, + "CUSTOM_SPOT_ID": 423, + "CUSTOM_SPOT_NAME": 424, + "DATE": 3, + "DAY_OF_WEEK": 4, + "DEAL_BUYER_ID": 240, + "DEAL_BUYER_NAME": 241, + "DEAL_ID": 436, + "DEAL_NAME": 437, + "DELIVERED_SECURE_SIGNAL_ID": 309, + "DELIVERED_SECURE_SIGNAL_NAME": 310, + "DEMAND_CHANNEL": 9, + "DEMAND_CHANNEL_NAME": 10, + "DEMAND_SOURCE": 592, + "DEMAND_SOURCE_NAME": 593, + "DEMAND_SUBCHANNEL": 22, + "DEMAND_SUBCHANNEL_NAME": 23, + "DEVICE": 226, + "DEVICE_CATEGORY": 15, + "DEVICE_CATEGORY_NAME": 16, + "DEVICE_MANUFACTURER_ID": 525, + "DEVICE_MANUFACTURER_NAME": 526, + "DEVICE_MODEL_ID": 527, + "DEVICE_MODEL_NAME": 528, + "DEVICE_NAME": 225, + "DSP_SEAT_ID": 564, + "DYNAMIC_ALLOCATION_TYPE": 502, + "DYNAMIC_ALLOCATION_TYPE_NAME": 503, + "ESP_DELIVERY": 623, + "ESP_DELIVERY_NAME": 624, + "ESP_PRESENCE": 625, + "ESP_PRESENCE_NAME": 626, + "EXCHANGE_BIDDING_DEAL_ID": 715, + "EXCHANGE_BIDDING_DEAL_TYPE": 714, + "EXCHANGE_BIDDING_DEAL_TYPE_NAME": 723, + "EXCHANGE_THIRD_PARTY_COMPANY_ID": 185, + "EXCHANGE_THIRD_PARTY_COMPANY_NAME": 186, + "FIRST_LOOK_PRICING_RULE_ID": 248, + "FIRST_LOOK_PRICING_RULE_NAME": 249, + "FIRST_PARTY_ID_STATUS": 404, + "FIRST_PARTY_ID_STATUS_NAME": 405, + "GENDER": 509, + "GENDER_NAME": 583, + "GOOGLE_ANALYTICS_STREAM_ID": 519, + "GOOGLE_ANALYTICS_STREAM_NAME": 520, + "HBT_YIELD_PARTNER_ID": 659, + "HBT_YIELD_PARTNER_NAME": 660, + "HEADER_BIDDER_INTEGRATION_TYPE": 718, + "HEADER_BIDDER_INTEGRATION_TYPE_NAME": 719, + "HOUR": 100, + "IMPRESSION_COUNTING_METHOD": 577, + "IMPRESSION_COUNTING_METHOD_NAME": 578, + "INTERACTION_TYPE": 223, + "INTERACTION_TYPE_NAME": 224, + "INTEREST": 510, + "INVENTORY_FORMAT": 17, + "INVENTORY_FORMAT_NAME": 18, + "INVENTORY_SHARE_ASSIGNMENT_ID": 648, + "INVENTORY_SHARE_ASSIGNMENT_NAME": 649, + "INVENTORY_SHARE_OUTCOME": 603, + "INVENTORY_SHARE_OUTCOME_NAME": 604, + "INVENTORY_SHARE_PARTNER_AD_SERVER": 652, + "INVENTORY_SHARE_PARTNER_AD_SERVER_NAME": 653, + "INVENTORY_SHARE_TARGET_SHARE_PERCENT": 654, + "INVENTORY_SHARE_TYPE": 650, + "INVENTORY_SHARE_TYPE_NAME": 651, + "INVENTORY_TYPE": 19, + "INVENTORY_TYPE_NAME": 20, + "IS_ADX_DIRECT": 382, + "IS_CURATION_TARGETED": 574, + "IS_DROPPED": 464, + "IS_FIRST_LOOK_DEAL": 401, + "KEY_VALUES_ID": 214, + "KEY_VALUES_NAME": 215, + "LINE_ITEM_AGENCY": 663, + "LINE_ITEM_ARCHIVED": 188, + "LINE_ITEM_COMPANION_DELIVERY_OPTION": 204, + "LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME": 205, + "LINE_ITEM_COMPUTED_STATUS": 250, + "LINE_ITEM_COMPUTED_STATUS_NAME": 251, + "LINE_ITEM_CONTRACTED_QUANTITY": 92, + "LINE_ITEM_COST_PER_UNIT": 85, + "LINE_ITEM_COST_TYPE": 212, + "LINE_ITEM_COST_TYPE_NAME": 213, + "LINE_ITEM_CREATIVE_END_DATE": 176, + "LINE_ITEM_CREATIVE_ROTATION_TYPE": 189, + "LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME": 190, + "LINE_ITEM_CREATIVE_START_DATE": 175, + "LINE_ITEM_CURRENCY_CODE": 180, + "LINE_ITEM_DELIVERY_INDICATOR": 87, + "LINE_ITEM_DELIVERY_RATE_TYPE": 191, + "LINE_ITEM_DELIVERY_RATE_TYPE_NAME": 192, + "LINE_ITEM_DISCOUNT_ABSOLUTE": 195, + "LINE_ITEM_DISCOUNT_PERCENTAGE": 196, + "LINE_ITEM_END_DATE": 81, + "LINE_ITEM_END_DATE_TIME": 83, + "LINE_ITEM_ENVIRONMENT_TYPE": 201, + "LINE_ITEM_ENVIRONMENT_TYPE_NAME": 202, + "LINE_ITEM_EXTERNAL_DEAL_ID": 97, + "LINE_ITEM_EXTERNAL_ID": 86, + "LINE_ITEM_FREQUENCY_CAP": 256, + "LINE_ITEM_ID": 1, + "LINE_ITEM_LABELS": 667, + "LINE_ITEM_LABEL_IDS": 665, + "LINE_ITEM_LAST_MODIFIED_BY_APP": 181, + "LINE_ITEM_LIFETIME_CLICKS": 95, + "LINE_ITEM_LIFETIME_IMPRESSIONS": 94, + "LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS": 96, + "LINE_ITEM_MAKEGOOD": 89, + "LINE_ITEM_NAME": 2, + "LINE_ITEM_NON_CPD_BOOKED_REVENUE": 98, + "LINE_ITEM_OPTIMIZABLE": 90, + "LINE_ITEM_PO_NUMBER": 669, + "LINE_ITEM_PRIMARY_GOAL_TYPE": 210, + "LINE_ITEM_PRIMARY_GOAL_TYPE_NAME": 211, + "LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE": 93, + "LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE": 396, + "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE": 208, + "LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME": 209, + "LINE_ITEM_PRIORITY": 24, + "LINE_ITEM_RESERVATION_STATUS": 304, + "LINE_ITEM_RESERVATION_STATUS_NAME": 305, + "LINE_ITEM_SALESPERSON": 671, + "LINE_ITEM_SECONDARY_SALESPEOPLE": 673, + "LINE_ITEM_SECONDARY_TRAFFICKERS": 675, + "LINE_ITEM_START_DATE": 82, + "LINE_ITEM_START_DATE_TIME": 84, + "LINE_ITEM_TRAFFICKER": 677, + "LINE_ITEM_TYPE": 193, + "LINE_ITEM_TYPE_NAME": 194, + "LINE_ITEM_UNLIMITED_END": 187, + "LINE_ITEM_VALUE_COST_PER_UNIT": 88, + "LINE_ITEM_WEB_PROPERTY_CODE": 179, + "MASTER_COMPANION_CREATIVE_ID": 140, + "MASTER_COMPANION_CREATIVE_NAME": 141, + "MEDIATION_TYPE": 701, + "MEDIATION_TYPE_NAME": 754, + "MEDIATION_YIELD_PARTNER_ID": 661, + "MEDIATION_YIELD_PARTNER_NAME": 662, + "METRO_ID": 453, + "METRO_NAME": 454, + "MOBILE_APP_FREE": 128, + "MOBILE_APP_ICON_URL": 129, + "MOBILE_APP_ID": 123, + "MOBILE_APP_NAME": 127, + "MOBILE_APP_OWNERSHIP_STATUS": 311, + "MOBILE_APP_OWNERSHIP_STATUS_NAME": 312, + "MOBILE_APP_STORE": 125, + "MOBILE_APP_STORE_NAME": 245, + "MOBILE_INVENTORY_TYPE": 99, + "MOBILE_INVENTORY_TYPE_NAME": 21, + "MOBILE_RENDERING_SDK": 646, + "MOBILE_RENDERING_SDK_NAME": 647, + "MOBILE_SDK_MAJOR_VERSION": 692, + "MOBILE_SDK_MINOR_VERSION": 693, + "MOBILE_SDK_VERSION_NAME": 130, + "MONTH_YEAR": 6, + "NATIVE_AD_FORMAT_ID": 255, + "NATIVE_AD_FORMAT_NAME": 254, + "NATIVE_STYLE_ID": 253, + "NATIVE_STYLE_NAME": 252, + "NO_FILL_REASON_CATEGORY": 586, + "NO_FILL_REASON_CATEGORY_NAME": 587, + "OPERATING_SYSTEM_CATEGORY": 117, + "OPERATING_SYSTEM_CATEGORY_NAME": 118, + "OPERATING_SYSTEM_VERSION_ID": 238, + "OPERATING_SYSTEM_VERSION_NAME": 237, + "OPTIMIZATION_TYPE": 639, + "OPTIMIZATION_TYPE_NAME": 640, + "ORDER_AGENCY": 150, + "ORDER_AGENCY_ID": 151, + "ORDER_BOOKED_CPC": 152, + "ORDER_BOOKED_CPM": 153, + "ORDER_DELIVERY_STATUS": 231, + "ORDER_DELIVERY_STATUS_NAME": 239, + "ORDER_END_DATE": 154, + "ORDER_END_DATE_TIME": 155, + "ORDER_EXTERNAL_ID": 156, + "ORDER_ID": 7, + "ORDER_LABELS": 170, + "ORDER_LABEL_IDS": 171, + "ORDER_LIFETIME_CLICKS": 158, + "ORDER_LIFETIME_IMPRESSIONS": 159, + "ORDER_NAME": 8, + "ORDER_PO_NUMBER": 160, + "ORDER_PROGRAMMATIC": 157, + "ORDER_SALESPERSON": 161, + "ORDER_SALESPERSON_ID": 629, + "ORDER_SECONDARY_SALESPEOPLE": 164, + "ORDER_SECONDARY_SALESPEOPLE_ID": 165, + "ORDER_SECONDARY_TRAFFICKERS": 166, + "ORDER_SECONDARY_TRAFFICKERS_ID": 167, + "ORDER_START_DATE": 168, + "ORDER_START_DATE_TIME": 169, + "ORDER_TRAFFICKER": 162, + "ORDER_TRAFFICKER_ID": 163, + "ORDER_UNLIMITED_END": 203, + "PAGE_PATH": 511, + "PAGE_TITLE_AND_SCREEN_CLASS": 512, + "PAGE_TITLE_AND_SCREEN_NAME": 513, + "PLACEMENT_ID": 113, + "PLACEMENT_ID_ALL": 144, + "PLACEMENT_NAME": 114, + "PLACEMENT_NAME_ALL": 145, + "PLACEMENT_STATUS": 362, + "PLACEMENT_STATUS_NAME": 364, + "PLACEMENT_STATUS_NAME_ALL": 365, + "POSTAL_CODE_ID": 455, + "POSTAL_CODE_NAME": 456, + "PPID_STATUS": 406, + "PPID_STATUS_NAME": 407, + "PREDICTED_VIEWABILITY_BUCKET": 633, + "PREDICTED_VIEWABILITY_BUCKET_NAME": 634, + "PRESENTED_SECURE_SIGNAL_ID": 495, + "PRESENTED_SECURE_SIGNAL_NAME": 496, + "PRIMARY_PERSONALIZATION_ID_TYPE": 408, + "PRIMARY_PERSONALIZATION_ID_TYPE_NAME": 409, + "PROGRAMMATIC_BUYER_ID": 240, + "PROGRAMMATIC_BUYER_NAME": 241, + "PROGRAMMATIC_CHANNEL": 13, + "PROGRAMMATIC_CHANNEL_NAME": 14, + "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE": 410, + "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS": 546, + "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME": 412, + "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER": 413, + "PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE": 414, + "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE": 425, + "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS": 545, + "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME": 427, + "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER": 428, + "PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE": 429, + "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE": 415, + "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID": 416, + "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME": 417, + "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER": 418, + "PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE": 419, + "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID": 136, + "PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME": 137, + "REGION_ID": 457, + "REGION_NAME": 458, + "REJECTION_CLASS_CATEGORY": 590, + "REJECTION_CLASS_CATEGORY_NAME": 591, + "RENDERED_CREATIVE_SIZE": 343, + "REQUESTED_AD_SIZES": 352, + "REQUEST_TYPE": 146, + "REQUEST_TYPE_NAME": 147, + "SERVER_SIDE_UNWRAPPING_ELIGIBLE": 597, + "SERVING_RESTRICTION": 631, + "SERVING_RESTRICTION_NAME": 632, + "SITE": 387, + "TARGETING_ID": 232, + "TARGETING_NAME": 233, + "TARGETING_TYPE": 385, + "TARGETING_TYPE_NAME": 386, + "THIRD_PARTY_ID_STATUS": 402, + "THIRD_PARTY_ID_STATUS_NAME": 403, + "TOPICS_STATUS": 504, + "TOPICS_STATUS_NAME": 505, + "TOP_PRIVATE_DOMAIN": 444, + "TRAFFIC_SOURCE": 388, + "TRAFFIC_SOURCE_NAME": 389, + "UNIFIED_PRICING_RULE_ID": 393, + "UNIFIED_PRICING_RULE_NAME": 394, + "URL": 506, + "URL_ID": 507, + "USER_MESSAGES_ENTITLEMENT_SOURCE": 635, + "USER_MESSAGES_ENTITLEMENT_SOURCE_NAME": 636, + "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID": 637, + "USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME": 638, + "VAST_VERSION": 554, + "VAST_VERSION_NAME": 555, + "VIDEO_AD_BREAK_TYPE": 556, + "VIDEO_AD_BREAK_TYPE_NAME": 557, + "VIDEO_AD_DURATION": 450, + "VIDEO_AD_FORMATS_RULE": 561, + "VIDEO_AD_FORMATS_RULE_ID": 560, + "VIDEO_AD_REQUEST_DURATION": 558, + "VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME": 751, + "VIDEO_AD_REQUEST_DURATION_NAME": 559, + "VIDEO_AD_REQUEST_SOURCE": 438, + "VIDEO_AD_REQUEST_SOURCE_NAME": 439, + "VIDEO_AD_TYPE": 432, + "VIDEO_AD_TYPE_NAME": 433, + "VIDEO_CONTINUOUS_PLAY_TYPE": 721, + "VIDEO_CONTINUOUS_PLAY_TYPE_NAME": 722, + "VIDEO_FALLBACK_POSITION": 530, + "VIDEO_MEASUREMENT_SOURCE": 601, + "VIDEO_MEASUREMENT_SOURCE_NAME": 602, + "VIDEO_PLCMT": 172, + "VIDEO_PLCMT_NAME": 173, + "VIDEO_POSITION_IN_POD": 538, + "VIDEO_POSITION_OF_POD": 539, + "VIDEO_SDK_VERSION": 440, + "VIDEO_SDK_VERSION_NAME": 441, + "VIDEO_STITCHER_TYPE": 752, + "VIDEO_STITCHER_TYPE_NAME": 753, "WEEK": 5, "YIELD_GROUP_BUYER_NAME": 184, + "YIELD_GROUP_BUYER_TAG_NAME": 627, "YIELD_GROUP_ID": 182, "YIELD_GROUP_NAME": 183, + "YOUTUBE_AD_DURATION_BUCKET": 430, + "YOUTUBE_AD_DURATION_BUCKET_NAME": 431, + "YOUTUBE_AD_TYPE": 399, + "YOUTUBE_AD_TYPE_NAME": 400, "LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID": 10000, "LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID": 10001, "LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID": 10002, @@ -6951,469 +11691,1531 @@ "CUSTOM_DIMENSION_9_VALUE": 101009 } }, - "Metric": { - "values": { - "METRIC_UNSPECIFIED": 0, - "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 61, - "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 58, - "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 57, - "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 60, - "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 56, - "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 59, - "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 73, - "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 70, - "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 69, - "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 72, - "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 68, - "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 71, - "ADSENSE_AVERAGE_ECPM": 26, - "ADSENSE_CLICKS": 23, - "ADSENSE_CTR": 24, - "ADSENSE_IMPRESSIONS": 22, - "ADSENSE_PERCENT_CLICKS": 28, - "ADSENSE_PERCENT_IMPRESSIONS": 27, - "ADSENSE_PERCENT_REVENUE": 29, - "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": 30, - "ADSENSE_RESPONSES_SERVED": 41, - "ADSENSE_REVENUE": 25, - "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 79, - "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 76, - "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 75, - "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 78, - "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 74, - "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 77, - "AD_EXCHANGE_AVERAGE_ECPM": 18, - "AD_EXCHANGE_CLICKS": 15, - "AD_EXCHANGE_CTR": 16, - "AD_EXCHANGE_IMPRESSIONS": 14, - "AD_EXCHANGE_PERCENT_CLICKS": 20, - "AD_EXCHANGE_PERCENT_IMPRESSIONS": 19, - "AD_EXCHANGE_PERCENT_REVENUE": 21, - "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": 31, - "AD_EXCHANGE_RESPONSES_SERVED": 42, - "AD_EXCHANGE_REVENUE": 17, - "AD_REQUESTS": 38, - "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 67, - "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 64, - "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 63, - "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 66, - "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 62, - "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 65, - "AD_SERVER_AVERAGE_ECPM": 34, - "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": 10, - "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": 262, - "AD_SERVER_CLICKS": 7, - "AD_SERVER_CPD_REVENUE": 32, - "AD_SERVER_CTR": 8, - "AD_SERVER_IMPRESSIONS": 6, - "AD_SERVER_PERCENT_CLICKS": 12, - "AD_SERVER_PERCENT_IMPRESSIONS": 11, - "AD_SERVER_PERCENT_REVENUE": 35, - "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": 13, - "AD_SERVER_RESPONSES_SERVED": 40, - "AD_SERVER_REVENUE": 33, - "AD_SERVER_REVENUE_WITHOUT_CPD": 9, - "AD_SERVER_TRACKED_ADS": 264, - "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": 261, - "AD_SERVER_UNFILTERED_CLICKS": 259, - "AD_SERVER_UNFILTERED_IMPRESSIONS": 260, - "AD_SERVER_UNFILTERED_TRACKED_ADS": 263, - "AVERAGE_ECPM": 37, - "AVERAGE_ECPM_WITHOUT_CPD": 5, - "CLICKS": 2, - "CODE_SERVED_COUNT": 44, - "CTR": 3, - "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": 129, - "GOOGLE_SOLD_AUCTION_IMPRESSIONS": 128, - "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": 131, - "GOOGLE_SOLD_IMPRESSIONS": 130, - "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": 127, - "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": 126, - "IMPRESSIONS": 1, - "PARTNER_SALES_FILLED_POD_REQUESTS": 135, - "PARTNER_SALES_FILL_RATE": 136, - "PARTNER_SALES_PARTNER_MATCH_RATE": 137, - "PARTNER_SALES_QUERIES": 132, - "PARTNER_SALES_UNFILLED_IMPRESSIONS": 133, - "PARTNER_SALES_UNMATCHED_QUERIES": 134, - "PARTNER_SOLD_CODE_SERVED": 125, - "PARTNER_SOLD_COVIEWED_IMPRESSIONS": 124, - "PARTNER_SOLD_IMPRESSIONS": 123, - "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": 177, - "PROGRAMMATIC_MATCH_RATE": 178, - "PROGRAMMATIC_RESPONSES_SERVED": 176, - "RESPONSES_SERVED": 39, - "REVENUE": 36, - "REVENUE_WITHOUT_CPD": 4, - "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": 434, - "SERVER_SIDE_UNWRAPPING_CALLOUTS": 435, - "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": 436, - "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": 437, - "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": 438, - "SERVER_SIDE_UNWRAPPING_TIMEOUTS": 439, - "UNFILLED_IMPRESSIONS": 45, - "UNMATCHED_AD_REQUESTS": 43, - "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": 121, - "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": 122, - "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": 92, - "VIDEO_INTERACTION_COLLAPSES": 93, - "VIDEO_INTERACTION_EXPANDS": 95, - "VIDEO_INTERACTION_FULL_SCREENS": 96, - "VIDEO_INTERACTION_MUTES": 97, - "VIDEO_INTERACTION_PAUSES": 98, - "VIDEO_INTERACTION_RESUMES": 99, - "VIDEO_INTERACTION_REWINDS": 100, - "VIDEO_INTERACTION_UNMUTES": 101, - "VIDEO_INTERACTION_VIDEO_SKIPS": 102, - "VIDEO_REAL_TIME_CREATIVE_SERVES": 139, - "VIDEO_REAL_TIME_ERROR_100_COUNT": 143, - "VIDEO_REAL_TIME_ERROR_101_COUNT": 144, - "VIDEO_REAL_TIME_ERROR_102_COUNT": 145, - "VIDEO_REAL_TIME_ERROR_200_COUNT": 146, - "VIDEO_REAL_TIME_ERROR_201_COUNT": 147, - "VIDEO_REAL_TIME_ERROR_202_COUNT": 148, - "VIDEO_REAL_TIME_ERROR_203_COUNT": 149, - "VIDEO_REAL_TIME_ERROR_300_COUNT": 150, - "VIDEO_REAL_TIME_ERROR_301_COUNT": 151, - "VIDEO_REAL_TIME_ERROR_302_COUNT": 152, - "VIDEO_REAL_TIME_ERROR_303_COUNT": 153, - "VIDEO_REAL_TIME_ERROR_400_COUNT": 154, - "VIDEO_REAL_TIME_ERROR_401_COUNT": 155, - "VIDEO_REAL_TIME_ERROR_402_COUNT": 156, - "VIDEO_REAL_TIME_ERROR_403_COUNT": 157, - "VIDEO_REAL_TIME_ERROR_405_COUNT": 158, - "VIDEO_REAL_TIME_ERROR_406_COUNT": 159, - "VIDEO_REAL_TIME_ERROR_407_COUNT": 160, - "VIDEO_REAL_TIME_ERROR_408_COUNT": 161, - "VIDEO_REAL_TIME_ERROR_409_COUNT": 162, - "VIDEO_REAL_TIME_ERROR_410_COUNT": 163, - "VIDEO_REAL_TIME_ERROR_500_COUNT": 164, - "VIDEO_REAL_TIME_ERROR_501_COUNT": 165, - "VIDEO_REAL_TIME_ERROR_502_COUNT": 166, - "VIDEO_REAL_TIME_ERROR_503_COUNT": 167, - "VIDEO_REAL_TIME_ERROR_600_COUNT": 168, - "VIDEO_REAL_TIME_ERROR_601_COUNT": 169, - "VIDEO_REAL_TIME_ERROR_602_COUNT": 170, - "VIDEO_REAL_TIME_ERROR_603_COUNT": 171, - "VIDEO_REAL_TIME_ERROR_604_COUNT": 172, - "VIDEO_REAL_TIME_ERROR_900_COUNT": 173, - "VIDEO_REAL_TIME_ERROR_901_COUNT": 174, - "VIDEO_REAL_TIME_IMPRESSIONS": 138, - "VIDEO_REAL_TIME_MATCHED_QUERIES": 140, - "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": 175, - "VIDEO_REAL_TIME_TOTAL_QUERIES": 142, - "VIDEO_REAL_TIME_UNMATCHED_QUERIES": 141, - "VIDEO_VIEWERSHIP_AUTO_PLAYS": 103, - "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": 104, - "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": 105, - "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": 106, - "VIDEO_VIEWERSHIP_COMPLETES": 107, - "VIDEO_VIEWERSHIP_COMPLETION_RATE": 108, - "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": 109, - "VIDEO_VIEWERSHIP_FIRST_QUARTILES": 110, - "VIDEO_VIEWERSHIP_MIDPOINTS": 111, - "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": 112, - "VIDEO_VIEWERSHIP_STARTS": 113, - "VIDEO_VIEWERSHIP_THIRD_QUARTILES": 114, - "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": 115, - "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": 94, - "VIDEO_VIEWERSHIP_VIDEO_LENGTH": 116, - "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": 117, - "YIELD_GROUP_AUCTIONS_WON": 80, - "YIELD_GROUP_BIDS": 81, - "YIELD_GROUP_BIDS_IN_AUCTION": 82, - "YIELD_GROUP_CALLOUTS": 83, - "YIELD_GROUP_ESTIMATED_CPM": 88, - "YIELD_GROUP_ESTIMATED_REVENUE": 87, - "YIELD_GROUP_IMPRESSIONS": 85, - "YIELD_GROUP_MEDIATION_FILL_RATE": 89, - "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": 86, - "YIELD_GROUP_MEDIATION_PASSBACKS": 118, - "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": 90, - "YIELD_GROUP_SUCCESSFUL_RESPONSES": 84 + "Metric": { + "options": { + "allow_alias": true + }, + "valuesOptions": { + "AD_SERVER_UNFILTERED_IMPRESSIONS": { + "deprecated": true + } + }, + "values": { + "METRIC_UNSPECIFIED": 0, + "ACTIVE_USERS": 223, + "ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT": 445, + "ACTIVE_VIEW_AUDIBLE_IMPRESSIONS": 659, + "ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT": 446, + "ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT": 447, + "ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT": 448, + "ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT": 449, + "ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS": 660, + "ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS": 661, + "ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 61, + "ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 58, + "ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT": 450, + "ACTIVE_VIEW_EVER_AUDIBLE_PERCENT": 451, + "ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT": 452, + "ACTIVE_VIEW_EVER_MUTED_PERCENT": 453, + "ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION": 411, + "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 57, + "ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 60, + "ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": 662, + "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": 663, + "ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 664, + "ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS": 665, + "ACTIVE_VIEW_PLUS_MEASURABLE_COUNT": 454, + "ACTIVE_VIEW_REVENUE": 414, + "ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": 666, + "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 56, + "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 667, + "ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 59, + "ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 73, + "ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 70, + "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 69, + "ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 72, + "ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": 642, + "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": 643, + "ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 644, + "ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": 645, + "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 68, + "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 646, + "ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 71, + "ADSENSE_AVERAGE_ECPM": 26, + "ADSENSE_CLICKS": 23, + "ADSENSE_CTR": 24, + "ADSENSE_IMPRESSIONS": 22, + "ADSENSE_PERCENT_CLICKS": 28, + "ADSENSE_PERCENT_IMPRESSIONS": 27, + "ADSENSE_PERCENT_REVENUE": 29, + "ADSENSE_PERCENT_REVENUE_WITHOUT_CPD": 30, + "ADSENSE_RESPONSES_SERVED": 41, + "ADSENSE_REVENUE": 25, + "AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 79, + "AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 76, + "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 75, + "AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 78, + "AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": 654, + "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": 655, + "AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 656, + "AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": 657, + "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 74, + "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 658, + "AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 77, + "AD_EXCHANGE_AVERAGE_ECPM": 18, + "AD_EXCHANGE_CLICKS": 15, + "AD_EXCHANGE_CPC": 244, + "AD_EXCHANGE_CTR": 16, + "AD_EXCHANGE_DELIVERY_RATE": 245, + "AD_EXCHANGE_IMPRESSIONS": 14, + "AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER": 427, + "AD_EXCHANGE_IMPRESSIONS_PER_SESSION": 428, + "AD_EXCHANGE_LIFT": 246, + "AD_EXCHANGE_MATCHED_REQUEST_CTR": 247, + "AD_EXCHANGE_MATCHED_REQUEST_ECPM": 248, + "AD_EXCHANGE_MATCH_RATE": 249, + "AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS": 250, + "AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS": 251, + "AD_EXCHANGE_PERCENT_CLICKS": 20, + "AD_EXCHANGE_PERCENT_IMPRESSIONS": 19, + "AD_EXCHANGE_PERCENT_REVENUE": 21, + "AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD": 31, + "AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM": 252, + "AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS": 253, + "AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE": 254, + "AD_EXCHANGE_RESPONSES_SERVED": 42, + "AD_EXCHANGE_REVENUE": 17, + "AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": 212, + "AD_EXCHANGE_REVENUE_PER_AD_VIEWER": 429, + "AD_EXCHANGE_TOTAL_REQUESTS": 255, + "AD_EXCHANGE_TOTAL_REQUEST_CTR": 256, + "AD_EXCHANGE_TOTAL_REQUEST_ECPM": 257, + "AD_EXPOSURE_SECONDS": 241, + "AD_REQUESTS": 38, + "AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME": 67, + "AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS": 64, + "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS": 63, + "AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE": 66, + "AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS": 332, + "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS": 331, + "AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 334, + "AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION": 335, + "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS": 62, + "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION": 333, + "AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE": 65, + "AD_SERVER_AVERAGE_ECPM": 34, + "AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD": 10, + "AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS": 262, + "AD_SERVER_CLICKS": 7, + "AD_SERVER_COMPLETED_VIEWS": 431, + "AD_SERVER_COVIEWED_IMPRESSIONS": 554, + "AD_SERVER_CPD_REVENUE": 32, + "AD_SERVER_CTR": 8, + "AD_SERVER_GROSS_REVENUE": 483, + "AD_SERVER_GROSS_REVENUE_WITHOUT_CPD": 484, + "AD_SERVER_IMPRESSIONS": 6, + "AD_SERVER_IMPRESSIONS_WITH_COMPANION": 222, + "AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": 338, + "AD_SERVER_PERCENT_CLICKS": 12, + "AD_SERVER_PERCENT_IMPRESSIONS": 11, + "AD_SERVER_PERCENT_REVENUE": 35, + "AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD": 13, + "AD_SERVER_RESPONSES_SERVED": 40, + "AD_SERVER_REVENUE": 33, + "AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": 213, + "AD_SERVER_REVENUE_WITHOUT_CPD": 9, + "AD_SERVER_TARGETED_CLICKS": 274, + "AD_SERVER_TARGETED_IMPRESSIONS": 275, + "AD_SERVER_TRACKED_ADS": 264, + "AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS": 261, + "AD_SERVER_UNFILTERED_CLICKS": 259, + "AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS": 260, + "AD_SERVER_UNFILTERED_IMPRESSIONS": 260, + "AD_SERVER_UNFILTERED_TRACKED_ADS": 263, + "AD_UNIT_EXPOSURE_SECONDS": 242, + "AD_VIEWERS": 425, + "ATN_ADS_FAILED_TO_RENDER": 430, + "ATN_ELIGIBLE_LINE_ITEMS": 342, + "ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS": 343, + "ATN_HBT_ALLOWED_AD_REQUESTS": 344, + "ATN_HBT_BIDS_IN_AUCTION": 345, + "ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS": 346, + "ATN_HBT_CANDIDATE_BIDS": 347, + "ATN_HBT_INVALID_AD_REQUESTS": 348, + "ATN_HBT_NO_BIDS_AD_REQUESTS": 472, + "ATN_HBT_REJECTED_BIDS": 349, + "ATN_HBT_VALID_AD_REQUESTS": 350, + "ATN_HBT_WITH_BIDS_AD_REQUESTS": 473, + "ATN_INVALID_AD_REQUESTS": 351, + "ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED": 476, + "ATN_LINE_ITEMS_IN_AUCTION": 352, + "ATN_LINE_ITEMS_NOT_COMPETING": 515, + "ATN_LINE_ITEMS_NOT_SELECTED": 353, + "ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS": 354, + "ATN_LINE_ITEM_TARGETED_AD_REQUESTS": 355, + "ATN_MEDIATION_ALLOWED_AD_REQUESTS": 356, + "ATN_MEDIATION_INVALID_AD_REQUESTS": 357, + "ATN_MEDIATION_LOADED_ADS_FROM_CHAINS": 358, + "ATN_MEDIATION_NO_PARTNER_AD_REQUESTS": 474, + "ATN_MEDIATION_PARTNERS_IN_AUCTION": 359, + "ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS": 360, + "ATN_MEDIATION_REJECTED_PARTNERS": 361, + "ATN_MEDIATION_TARGETED_PARTNERS": 362, + "ATN_MEDIATION_TOTAL_YIELD_PARTNERS": 442, + "ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS": 363, + "ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS": 364, + "ATN_MEDIATION_VALID_AD_REQUESTS": 365, + "ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS": 475, + "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS": 366, + "ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT": 367, + "ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS": 368, + "ATN_PROGRAMMATIC_BIDS_IN_AUCTION": 369, + "ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS": 370, + "ATN_PROGRAMMATIC_BID_REQUESTS_SENT": 371, + "ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE": 372, + "ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES": 373, + "ATN_PROGRAMMATIC_BID_REQUEST_ERRORS": 374, + "ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS": 375, + "ATN_PROGRAMMATIC_REJECTED_BIDS": 376, + "ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS": 377, + "ATN_PROGRAMMATIC_TOTAL_BIDS": 378, + "ATN_PROGRAMMATIC_VALID_AD_REQUESTS": 379, + "ATN_REJECTED_LINE_ITEMS": 380, + "ATN_SERVED_MEDIATION_CHAINS": 381, + "ATN_SERVED_SINGLE_ADS": 382, + "ATN_TARGETED_LINE_ITEMS": 383, + "ATN_TOTAL_AD_REQUESTS": 384, + "ATN_TOTAL_COMPETING_ADS_IN_AUCTION": 385, + "ATN_TOTAL_LOADED_ADS": 387, + "ATN_VALID_AD_REQUESTS": 389, + "ATN_YIELD_GROUP_MEDIATION_PASSBACKS": 390, + "AVERAGE_ECPM": 37, + "AVERAGE_ECPM_WITHOUT_CPD": 5, + "AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION": 224, + "AVERAGE_ENGAGEMENT_SECONDS_PER_USER": 225, + "AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR": 418, + "AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER": 226, + "AVERAGE_REVENUE_PER_USER": 227, + "AVERAGE_SESSION_SECONDS": 228, + "BIDS": 443, + "BID_AVERAGE_CPM": 444, + "BOUNCE_RATE": 433, + "CLICKS": 2, + "CODE_SERVED_COUNT": 44, + "CPC_REVENUE": 440, + "CPM_REVENUE": 441, + "CREATIVE_LOAD_TIME_0_500_PERCENT": 324, + "CREATIVE_LOAD_TIME_1000_2000_PERCENT": 326, + "CREATIVE_LOAD_TIME_2000_4000_PERCENT": 327, + "CREATIVE_LOAD_TIME_4000_8000_PERCENT": 328, + "CREATIVE_LOAD_TIME_500_1000_PERCENT": 325, + "CREATIVE_LOAD_TIME_GT_8000_PERCENT": 329, + "CTR": 3, + "DEALS_BIDS": 542, + "DEALS_BID_RATE": 543, + "DEALS_BID_REQUESTS": 544, + "DEALS_WINNING_BIDS": 545, + "DEALS_WIN_RATE": 546, + "DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": 521, + "DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": 522, + "DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": 523, + "DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": 524, + "DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": 525, + "DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": 520, + "DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT": 526, + "DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT": 527, + "DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT": 528, + "DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT": 529, + "DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT": 531, + "DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT": 530, + "DROPOFF_RATE": 415, + "ENGAGED_SESSIONS": 229, + "ENGAGED_SESSIONS_PER_USER": 230, + "ENGAGEMENT_RATE": 426, + "EUROPEAN_REGULATIONS_CONSENT_RATE": 270, + "EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE": 271, + "EUROPEAN_REGULATIONS_MESSAGES_SHOWN": 272, + "EUROPEAN_REGULATIONS_NO_CONSENT_RATE": 273, + "FILL_RATE": 258, + "GOOGLE_ANALYTICS_CLICKS": 231, + "GOOGLE_ANALYTICS_CTR": 232, + "GOOGLE_ANALYTICS_ECPM": 233, + "GOOGLE_ANALYTICS_IMPRESSIONS": 234, + "GOOGLE_ANALYTICS_REVENUE": 235, + "GOOGLE_ANALYTICS_VIEWS": 236, + "GOOGLE_ANALYTICS_VIEWS_PER_USER": 237, + "GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS": 129, + "GOOGLE_SOLD_AUCTION_IMPRESSIONS": 128, + "GOOGLE_SOLD_COVIEWED_IMPRESSIONS": 131, + "GOOGLE_SOLD_IMPRESSIONS": 130, + "GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS": 127, + "GOOGLE_SOLD_RESERVATION_IMPRESSIONS": 126, + "IMPRESSIONS": 1, + "INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS": 407, + "INVENTORY_SHARES": 547, + "INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES": 548, + "INVOICED_IMPRESSIONS": 404, + "INVOICED_UNFILLED_IMPRESSIONS": 405, + "MEDIATION_CHAINS_FILLED": 584, + "MUTED_IMPRESSIONS": 412, + "MUTE_ELIGIBLE_IMPRESSIONS": 409, + "OPPORTUNITIES": 463, + "OVERDELIVERED_IMPRESSIONS": 432, + "PARTNER_SALES_FILLED_POD_REQUESTS": 135, + "PARTNER_SALES_FILL_RATE": 136, + "PARTNER_SALES_PARTNER_MATCH_RATE": 137, + "PARTNER_SALES_QUERIES": 132, + "PARTNER_SALES_UNFILLED_IMPRESSIONS": 133, + "PARTNER_SALES_UNMATCHED_QUERIES": 134, + "PARTNER_SOLD_CODE_SERVED": 125, + "PARTNER_SOLD_COVIEWED_IMPRESSIONS": 124, + "PARTNER_SOLD_IMPRESSIONS": 123, + "PROGRAMMATIC_ELIGIBLE_AD_REQUESTS": 177, + "PROGRAMMATIC_MATCH_RATE": 178, + "PROGRAMMATIC_RESPONSES_SERVED": 176, + "REACH_IMPRESSIONS": 416, + "RESPONSES_SERVED": 39, + "RETENTION": 238, + "REVENUE": 36, + "REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": 214, + "REVENUE_WITHOUT_CPD": 4, + "REWARDS_GRANTED": 413, + "RICH_MEDIA_AVERAGE_DISPLAY_TIME": 587, + "RICH_MEDIA_AVERAGE_INTERACTION_TIME": 588, + "RICH_MEDIA_BACKUP_IMAGES": 589, + "RICH_MEDIA_CUSTOM_EVENT_COUNT": 599, + "RICH_MEDIA_CUSTOM_EVENT_TIME": 600, + "RICH_MEDIA_DISPLAY_TIME": 590, + "RICH_MEDIA_EXPANDING_TIME": 591, + "RICH_MEDIA_EXPANSIONS": 592, + "RICH_MEDIA_FULL_SCREEN_IMPRESSIONS": 593, + "RICH_MEDIA_INTERACTION_COUNT": 594, + "RICH_MEDIA_INTERACTION_RATE": 595, + "RICH_MEDIA_INTERACTION_TIME": 596, + "RICH_MEDIA_INTERACTIVE_IMPRESSIONS": 597, + "RICH_MEDIA_MANUAL_CLOSES": 598, + "RICH_MEDIA_VIDEO_COMPLETES": 503, + "RICH_MEDIA_VIDEO_INTERACTIONS": 505, + "RICH_MEDIA_VIDEO_INTERACTION_RATE": 504, + "RICH_MEDIA_VIDEO_MIDPOINTS": 506, + "RICH_MEDIA_VIDEO_MUTES": 507, + "RICH_MEDIA_VIDEO_PAUSES": 508, + "RICH_MEDIA_VIDEO_PLAYS": 509, + "RICH_MEDIA_VIDEO_REPLAYS": 510, + "RICH_MEDIA_VIDEO_STOPS": 511, + "RICH_MEDIA_VIDEO_UNMUTES": 512, + "RICH_MEDIA_VIDEO_VIEW_RATE": 513, + "RICH_MEDIA_VIDEO_VIEW_TIME": 514, + "SELL_THROUGH_AVAILABLE_IMPRESSIONS": 477, + "SELL_THROUGH_FORECASTED_IMPRESSIONS": 478, + "SELL_THROUGH_RESERVED_IMPRESSIONS": 479, + "SELL_THROUGH_SELL_THROUGH_RATE": 480, + "SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS": 434, + "SERVER_SIDE_UNWRAPPING_CALLOUTS": 435, + "SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES": 436, + "SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES": 437, + "SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES": 438, + "SERVER_SIDE_UNWRAPPING_TIMEOUTS": 439, + "SESSIONS": 239, + "TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT": 455, + "TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT": 457, + "TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT": 458, + "TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT": 459, + "TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT": 456, + "TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT": 460, + "TARGETED_CLICKS": 276, + "TARGETED_IMPRESSIONS": 277, + "UNFILLED_IMPRESSIONS": 45, + "UNIQUE_VISITORS": 417, + "UNLOADED_IMPRESSIONS_DUE_TO_CPU": 408, + "UNLOADED_IMPRESSIONS_DUE_TO_NETWORK": 406, + "UNMATCHED_AD_REQUESTS": 43, + "UNVIEWED_REASON_OTHER_PERCENT": 550, + "UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT": 553, + "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT": 551, + "UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT": 552, + "UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT": 549, + "USER_ENGAGEMENT_DURATION_IN_SECONDS": 240, + "USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE": 486, + "USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT": 487, + "USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN": 488, + "USER_MESSAGES_ALLOW_ADS_PAGEVIEWS": 489, + "USER_MESSAGES_CCPA_MESSAGES_SHOWN": 490, + "USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN": 491, + "USER_MESSAGES_IDFA_ATT_CONSENT": 492, + "USER_MESSAGES_IDFA_ATT_CONSENT_RATE": 493, + "USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT": 494, + "USER_MESSAGES_IDFA_ATT_DECLINE_RATE": 495, + "USER_MESSAGES_IDFA_EXPLAINERS_SHOWN": 496, + "USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN": 497, + "USER_MESSAGES_IDFA_NO_DECISION": 498, + "USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN": 121, + "USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS": 122, + "USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS": 499, + "USER_MESSAGES_TOTAL_ESTIMATED_REVENUE": 500, + "USER_MESSAGES_UPTC_MESSAGES_SHOWN": 501, + "USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO": 502, + "VIDEO_ERROR_100_COUNT": 180, + "VIDEO_ERROR_101_COUNT": 181, + "VIDEO_ERROR_102_COUNT": 182, + "VIDEO_ERROR_200_COUNT": 183, + "VIDEO_ERROR_201_COUNT": 184, + "VIDEO_ERROR_202_COUNT": 185, + "VIDEO_ERROR_203_COUNT": 186, + "VIDEO_ERROR_300_COUNT": 187, + "VIDEO_ERROR_301_COUNT": 188, + "VIDEO_ERROR_302_COUNT": 189, + "VIDEO_ERROR_303_COUNT": 190, + "VIDEO_ERROR_400_COUNT": 191, + "VIDEO_ERROR_401_COUNT": 192, + "VIDEO_ERROR_402_COUNT": 193, + "VIDEO_ERROR_403_COUNT": 194, + "VIDEO_ERROR_405_COUNT": 195, + "VIDEO_ERROR_406_COUNT": 196, + "VIDEO_ERROR_407_COUNT": 197, + "VIDEO_ERROR_408_COUNT": 198, + "VIDEO_ERROR_409_COUNT": 199, + "VIDEO_ERROR_410_COUNT": 200, + "VIDEO_ERROR_500_COUNT": 201, + "VIDEO_ERROR_501_COUNT": 202, + "VIDEO_ERROR_502_COUNT": 203, + "VIDEO_ERROR_503_COUNT": 204, + "VIDEO_ERROR_600_COUNT": 205, + "VIDEO_ERROR_601_COUNT": 206, + "VIDEO_ERROR_602_COUNT": 207, + "VIDEO_ERROR_603_COUNT": 208, + "VIDEO_ERROR_604_COUNT": 209, + "VIDEO_ERROR_900_COUNT": 210, + "VIDEO_ERROR_901_COUNT": 211, + "VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE": 92, + "VIDEO_INTERACTION_COLLAPSES": 93, + "VIDEO_INTERACTION_EXPANDS": 95, + "VIDEO_INTERACTION_FULL_SCREENS": 96, + "VIDEO_INTERACTION_MUTES": 97, + "VIDEO_INTERACTION_PAUSES": 98, + "VIDEO_INTERACTION_RESUMES": 99, + "VIDEO_INTERACTION_REWINDS": 100, + "VIDEO_INTERACTION_UNMUTES": 101, + "VIDEO_INTERACTION_VIDEO_SKIPS": 102, + "VIDEO_MONETIZABLE_CONTENT_VIEWS": 601, + "VIDEO_REAL_TIME_CREATIVE_SERVES": 139, + "VIDEO_REAL_TIME_ERROR_100_COUNT": 143, + "VIDEO_REAL_TIME_ERROR_101_COUNT": 144, + "VIDEO_REAL_TIME_ERROR_102_COUNT": 145, + "VIDEO_REAL_TIME_ERROR_200_COUNT": 146, + "VIDEO_REAL_TIME_ERROR_201_COUNT": 147, + "VIDEO_REAL_TIME_ERROR_202_COUNT": 148, + "VIDEO_REAL_TIME_ERROR_203_COUNT": 149, + "VIDEO_REAL_TIME_ERROR_300_COUNT": 150, + "VIDEO_REAL_TIME_ERROR_301_COUNT": 151, + "VIDEO_REAL_TIME_ERROR_302_COUNT": 152, + "VIDEO_REAL_TIME_ERROR_303_COUNT": 153, + "VIDEO_REAL_TIME_ERROR_400_COUNT": 154, + "VIDEO_REAL_TIME_ERROR_401_COUNT": 155, + "VIDEO_REAL_TIME_ERROR_402_COUNT": 156, + "VIDEO_REAL_TIME_ERROR_403_COUNT": 157, + "VIDEO_REAL_TIME_ERROR_405_COUNT": 158, + "VIDEO_REAL_TIME_ERROR_406_COUNT": 159, + "VIDEO_REAL_TIME_ERROR_407_COUNT": 160, + "VIDEO_REAL_TIME_ERROR_408_COUNT": 161, + "VIDEO_REAL_TIME_ERROR_409_COUNT": 162, + "VIDEO_REAL_TIME_ERROR_410_COUNT": 163, + "VIDEO_REAL_TIME_ERROR_500_COUNT": 164, + "VIDEO_REAL_TIME_ERROR_501_COUNT": 165, + "VIDEO_REAL_TIME_ERROR_502_COUNT": 166, + "VIDEO_REAL_TIME_ERROR_503_COUNT": 167, + "VIDEO_REAL_TIME_ERROR_600_COUNT": 168, + "VIDEO_REAL_TIME_ERROR_601_COUNT": 169, + "VIDEO_REAL_TIME_ERROR_602_COUNT": 170, + "VIDEO_REAL_TIME_ERROR_603_COUNT": 171, + "VIDEO_REAL_TIME_ERROR_604_COUNT": 172, + "VIDEO_REAL_TIME_ERROR_900_COUNT": 173, + "VIDEO_REAL_TIME_ERROR_901_COUNT": 174, + "VIDEO_REAL_TIME_IMPRESSIONS": 138, + "VIDEO_REAL_TIME_MATCHED_QUERIES": 140, + "VIDEO_REAL_TIME_TOTAL_ERROR_COUNT": 175, + "VIDEO_REAL_TIME_TOTAL_QUERIES": 142, + "VIDEO_REAL_TIME_UNMATCHED_QUERIES": 141, + "VIDEO_VIEWERSHIP_AUTO_PLAYS": 103, + "VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE": 104, + "VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME": 105, + "VIDEO_VIEWERSHIP_CLICK_TO_PLAYS": 106, + "VIDEO_VIEWERSHIP_COMPLETES": 107, + "VIDEO_VIEWERSHIP_COMPLETION_RATE": 108, + "VIDEO_VIEWERSHIP_ENGAGED_VIEWS": 109, + "VIDEO_VIEWERSHIP_FIRST_QUARTILES": 110, + "VIDEO_VIEWERSHIP_MIDPOINTS": 111, + "VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN": 112, + "VIDEO_VIEWERSHIP_STARTS": 113, + "VIDEO_VIEWERSHIP_THIRD_QUARTILES": 114, + "VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT": 115, + "VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE": 94, + "VIDEO_VIEWERSHIP_VIDEO_LENGTH": 116, + "VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE": 117, + "YIELD_GROUP_AUCTIONS_WON": 80, + "YIELD_GROUP_BIDS": 81, + "YIELD_GROUP_BIDS_IN_AUCTION": 82, + "YIELD_GROUP_CALLOUTS": 83, + "YIELD_GROUP_ESTIMATED_CPM": 88, + "YIELD_GROUP_ESTIMATED_REVENUE": 87, + "YIELD_GROUP_IMPRESSIONS": 85, + "YIELD_GROUP_MEDIATION_FILL_RATE": 89, + "YIELD_GROUP_MEDIATION_MATCHED_QUERIES": 86, + "YIELD_GROUP_MEDIATION_PASSBACKS": 118, + "YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM": 90, + "YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT": 215, + "YIELD_GROUP_SUCCESSFUL_RESPONSES": 84 + } + }, + "TimePeriodColumn": { + "values": { + "TIME_PERIOD_COLUMN_UNSPECIFIED": 0, + "TIME_PERIOD_COLUMN_DATE": 1, + "TIME_PERIOD_COLUMN_WEEK": 2, + "TIME_PERIOD_COLUMN_MONTH": 3, + "TIME_PERIOD_COLUMN_QUARTER": 4 + } + }, + "MetricValueType": { + "values": { + "PRIMARY": 0, + "PRIMARY_PERCENT_OF_TOTAL": 1, + "COMPARISON": 2, + "COMPARISON_PERCENT_OF_TOTAL": 3, + "ABSOLUTE_CHANGE": 4, + "RELATIVE_CHANGE": 5 + } + }, + "TimeZoneSource": { + "values": { + "TIME_ZONE_SOURCE_UNSPECIFIED": 0, + "PUBLISHER": 1, + "AD_EXCHANGE": 2, + "UTC": 3, + "PROVIDED": 4 + } + } + } + }, + "ReportValue": { + "oneofs": { + "value": { + "oneof": [ + "intValue", + "doubleValue", + "stringValue", + "boolValue", + "intListValue", + "stringListValue", + "doubleListValue", + "bytesValue" + ] + } + }, + "fields": { + "intValue": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "intListValue": { + "type": "IntList", + "id": 6 + }, + "stringListValue": { + "type": "StringList", + "id": 7 + }, + "doubleListValue": { + "type": "DoubleList", + "id": 9 + }, + "bytesValue": { + "type": "bytes", + "id": 8 + } + }, + "nested": { + "IntList": { + "fields": { + "values": { + "rule": "repeated", + "type": "int64", + "id": 1 + } + } + }, + "StringList": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "DoubleList": { + "fields": { + "values": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } + } + } + }, + "Report": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Report", + "(google.api.resource).pattern": "networks/{network_code}/reports/{report}", + "(google.api.resource).plural": "reports", + "(google.api.resource).singular": "report" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "reportId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "visibility": { + "type": "Visibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reportDefinition": { + "type": "ReportDefinition", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "locale": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "scheduleOptions": { + "type": "ScheduleOptions", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Visibility": { + "values": { + "HIDDEN": 0, + "DRAFT": 1, + "SAVED": 2 + } + } + } + }, + "ReportDataTable": { + "fields": {}, + "nested": { + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 1 + }, + "metricValueGroups": { + "rule": "repeated", + "type": "MetricValueGroup", + "id": 2 + } + } + }, + "MetricValueGroup": { + "fields": { + "primaryValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 1 + }, + "primaryPercentOfTotalValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 2 + }, + "comparisonValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 3 + }, + "comparisonPercentOfTotalValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 4 + }, + "absoluteChangeValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 5 + }, + "relativeChangeValues": { + "rule": "repeated", + "type": "ReportValue", + "id": 6 + }, + "flagValues": { + "rule": "repeated", + "type": "bool", + "id": 7 + } + } + } + } + }, + "ScheduleOptions": { + "fields": { + "schedule": { + "type": "Schedule", + "id": 1 + }, + "deliveryCondition": { + "type": "DeliveryCondition", + "id": 2 + }, + "flags": { + "rule": "repeated", + "type": "ReportDefinition.Flag", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Schedule": { + "oneofs": { + "frequencySchedule": { + "oneof": [ + "weeklySchedule", + "monthlySchedule" + ] + } + }, + "fields": { + "weeklySchedule": { + "type": "WeeklySchedule", + "id": 6 + }, + "monthlySchedule": { + "type": "MonthlySchedule", + "id": 7 + }, + "startDate": { + "type": "google.type.Date", + "id": 1 + }, + "endDate": { + "type": "google.type.Date", + "id": 2 + }, + "frequency": { + "type": "Frequency", + "id": 3 + }, + "startTime": { + "type": "google.type.TimeOfDay", + "id": 4 + } + }, + "nested": { + "WeeklySchedule": { + "fields": { + "weeklyScheduledDays": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 1 + } + } + }, + "MonthlySchedule": { + "fields": { + "monthlyScheduledDays": { + "rule": "repeated", + "type": "int32", + "id": 1 + } + } + }, + "Frequency": { + "values": { + "FREQUENCY_UNSPECIFIED": 0, + "HOURLY": 1, + "TWO_TIMES_DAILY": 2, + "THREE_TIMES_DAILY": 3, + "FOUR_TIMES_DAILY": 4, + "DAILY": 5, + "WEEKLY": 6, + "MONTHLY": 7 + } + } + } + }, + "DeliveryCondition": { + "values": { + "NEVER": 0, + "ALWAYS": 1, + "WHEN_FLAG_CONDITIONS_MET": 2 + } + } + } + }, + "ReportService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetReport": { + "requestType": "GetReportRequest", + "responseType": "Report", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/reports/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/reports/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReports": { + "requestType": "ListReportsRequest", + "responseType": "ListReportsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=networks/*}/reports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/reports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateReport": { + "requestType": "CreateReportRequest", + "responseType": "Report", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/reports", + "(google.api.http).body": "report", + "(google.api.method_signature)": "parent,report" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/reports", + "body": "report" + } + }, + { + "(google.api.method_signature)": "parent,report" + } + ] + }, + "UpdateReport": { + "requestType": "UpdateReportRequest", + "responseType": "Report", + "options": { + "(google.api.http).patch": "/v1/{report.name=networks/*/reports/*}", + "(google.api.http).body": "report", + "(google.api.method_signature)": "report,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{report.name=networks/*/reports/*}", + "body": "report" + } + }, + { + "(google.api.method_signature)": "report,update_mask" + } + ] + }, + "RunReport": { + "requestType": "RunReportRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=networks/*/reports/*}:run", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RunReportResponse", + "(google.longrunning.operation_info).metadata_type": "RunReportMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=networks/*/reports/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RunReportResponse", + "metadata_type": "RunReportMetadata" + } + } + ] + }, + "FetchReportResultRows": { + "requestType": "FetchReportResultRowsRequest", + "responseType": "FetchReportResultRowsResponse", + "options": { + "(google.api.http).get": "/v1/{name=networks/*/reports/*/results/*}:fetchRows", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/reports/*/results/*}:fetchRows" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "RunReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Report" + } + } + } + }, + "RunReportMetadata": { + "fields": { + "percentComplete": { + "type": "int32", + "id": 2 + }, + "report": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "admanager.googleapis.com/Report" + } + } + } + }, + "RunReportResponse": { + "fields": { + "reportResult": { + "type": "string", + "id": 1 + } + } + }, + "GetReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Report" + } + } + } + }, + "ListReportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReportsResponse": { + "fields": { + "reports": { + "rule": "repeated", + "type": "Report", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CreateReportRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "report": { + "type": "Report", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateReportRequest": { + "fields": { + "report": { + "type": "Report", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "MetricValueType": { - "values": { - "PRIMARY": 0, - "PRIMARY_PERCENT_OF_TOTAL": 1, - "COMPARISON": 2, - "COMPARISON_PERCENT_OF_TOTAL": 3, - "ABSOLUTE_CHANGE": 4, - "RELATIVE_CHANGE": 5 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "FetchReportResultRowsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "ReportType": { - "values": { - "REPORT_TYPE_UNSPECIFIED": 0, - "HISTORICAL": 1 + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Visibility": { - "values": { - "HIDDEN": 0, - "DRAFT": 1, - "SAVED": 2 + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "FetchReportResultRowsResponse": { + "fields": { + "rows": { + "rule": "repeated", + "type": "ReportDataTable.Row", + "id": 1 }, - "TimeZoneSource": { + "runTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "dateRanges": { + "rule": "repeated", + "type": "ReportDefinition.DateRange.FixedDateRange", + "id": 3 + }, + "comparisonDateRanges": { + "rule": "repeated", + "type": "ReportDefinition.DateRange.FixedDateRange", + "id": 4 + }, + "totalRowCount": { + "type": "int32", + "id": 5 + }, + "nextPageToken": { + "type": "string", + "id": 6 + } + } + }, + "RoleStatusEnum": { + "fields": {}, + "nested": { + "RoleStatus": { "values": { - "TIME_ZONE_SOURCE_UNSPECIFIED": 0, - "PUBLISHER": 1, - "AD_EXCHANGE": 2, - "UTC": 3, - "PROVIDED": 4 + "ROLE_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 } } } }, - "ReportDefinition": { + "Role": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Role", + "(google.api.resource).pattern": "networks/{network_code}/roles/{role}", + "(google.api.resource).plural": "roles", + "(google.api.resource).singular": "role" + }, "oneofs": { - "_comparisonDateRange": { + "_roleId": { "oneof": [ - "comparisonDateRange" + "roleId" + ] + }, + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_builtIn": { + "oneof": [ + "builtIn" + ] + }, + "_status": { + "oneof": [ + "status" ] } }, "fields": { - "dimensions": { - "rule": "repeated", - "type": "Report.Dimension", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "metrics": { - "rule": "repeated", - "type": "Report.Metric", + "roleId": { + "type": "int64", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "filters": { - "rule": "repeated", - "type": "Report.Filter", + "displayName": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "timeZoneSource": { - "type": "Report.TimeZoneSource", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, - "timeZone": { + "description": { "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "currencyCode": { - "type": "string", + "builtIn": { + "type": "bool", "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "dateRange": { - "type": "Report.DateRange", + "status": { + "type": "RoleStatusEnum.RoleStatus", "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "comparisonDateRange": { - "type": "Report.DateRange", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } - }, - "customDimensionKeyIds": { - "rule": "repeated", - "type": "int64", - "id": 7, + } + } + }, + "RoleService": { + "options": { + "(google.api.default_host)": "admanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" + }, + "methods": { + "GetRole": { + "requestType": "GetRoleRequest", + "responseType": "Role", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).get": "/v1/{name=networks/*/roles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=networks/*/roles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "lineItemCustomFieldIds": { - "rule": "repeated", - "type": "int64", - "id": 11, + "ListRoles": { + "requestType": "ListRolesRequest", + "responseType": "ListRolesResponse", "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.http).get": "/v1/{parent=networks/*}/roles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=networks/*}/roles" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "GetRoleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Role" } - }, - "orderCustomFieldIds": { - "rule": "repeated", - "type": "int64", - "id": 12, + } + } + }, + "ListRolesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "creativeCustomFieldIds": { - "rule": "repeated", - "type": "int64", - "id": 13, + "pageSize": { + "type": "int32", + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "reportType": { - "type": "Report.ReportType", - "id": 8, + "pageToken": { + "type": "string", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "timePeriodColumn": { - "type": "Report.TimePeriodColumn", - "id": 10, + "filter": { + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "flags": { - "rule": "repeated", - "type": "Report.Flag", - "id": 14, + "orderBy": { + "type": "string", + "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "sorts": { - "rule": "repeated", - "type": "Report.Sort", - "id": 15, + "skip": { + "type": "int32", + "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ScheduleOptions": { + "ListRolesResponse": { "fields": { - "schedule": { - "type": "Schedule", + "roles": { + "rule": "repeated", + "type": "Role", "id": 1 }, - "deliveryCondition": { - "type": "DeliveryCondition", + "nextPageToken": { + "type": "string", "id": 2 }, - "flags": { - "rule": "repeated", - "type": "Report.Flag", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "SiteDisapprovalReasonEnum": { + "fields": {}, + "nested": { + "SiteDisapprovalReason": { + "values": { + "SITE_DISAPPROVAL_REASON_UNSPECIFIED": 0, + "CONTENT": 1, + "OTHER": 2, + "OWNERSHIP": 3 } } - }, + } + }, + "SiteApprovalStatusEnum": { + "fields": {}, "nested": { - "DeliveryCondition": { + "SiteApprovalStatus": { "values": { - "NEVER": 0, - "ALWAYS": 1, - "WHEN_FLAG_CONDITIONS_MET": 2 + "SITE_APPROVAL_STATUS_UNSPECIFIED": 0, + "APPROVED": 1, + "DISAPPROVED": 2, + "DRAFT": 3, + "REQUIRES_REVIEW": 4, + "UNCHECKED": 5 } } } }, - "Schedule": { + "Site": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/Site", + "(google.api.resource).pattern": "networks/{network_code}/sites/{site}", + "(google.api.resource).plural": "sites", + "(google.api.resource).singular": "site" + }, "oneofs": { - "frequencySchedule": { + "_url": { + "oneof": [ + "url" + ] + }, + "_childNetworkCode": { + "oneof": [ + "childNetworkCode" + ] + }, + "_approvalStatus": { + "oneof": [ + "approvalStatus" + ] + }, + "_approvalStatusUpdateTime": { "oneof": [ - "weeklySchedule", - "monthlySchedule" + "approvalStatusUpdateTime" ] } }, "fields": { - "weeklySchedule": { - "type": "WeeklySchedule", - "id": 6 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, - "monthlySchedule": { - "type": "MonthlySchedule", - "id": 7 + "url": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } }, - "startDate": { - "type": "google.type.Date", - "id": 1 + "childNetworkCode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } }, - "endDate": { - "type": "google.type.Date", - "id": 2 + "approvalStatus": { + "type": "SiteApprovalStatusEnum.SiteApprovalStatus", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } }, - "frequency": { - "type": "Frequency", - "id": 3 + "approvalStatusUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } }, - "startTime": { - "type": "google.type.TimeOfDay", - "id": 4 - } - }, - "nested": { - "WeeklySchedule": { - "fields": { - "weeklyScheduledDays": { - "rule": "repeated", - "type": "google.type.DayOfWeek", - "id": 1 - } + "disapprovalReasons": { + "rule": "repeated", + "type": "DisapprovalReason", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } + } + } + }, + "DisapprovalReason": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] }, - "MonthlySchedule": { - "fields": { - "monthlyScheduledDays": { - "rule": "repeated", - "type": "int32", - "id": 1 - } + "_details": { + "oneof": [ + "details" + ] + } + }, + "fields": { + "type": { + "type": "SiteDisapprovalReasonEnum.SiteDisapprovalReason", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "Frequency": { - "values": { - "FREQUENCY_UNSPECIFIED": 0, - "HOURLY": 1, - "TWO_TIMES_DAILY": 2, - "THREE_TIMES_DAILY": 3, - "FOUR_TIMES_DAILY": 4, - "DAILY": 5, - "WEEKLY": 6, - "MONTHLY": 7 + "details": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } } } }, - "ReportService": { + "SiteService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetReport": { - "requestType": "GetReportRequest", - "responseType": "Report", + "GetSite": { + "requestType": "GetSiteRequest", + "responseType": "Site", "options": { - "(google.api.http).get": "/v1/{name=networks/*/reports/*}", + "(google.api.http).get": "/v1/{name=networks/*/sites/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/reports/*}" + "get": "/v1/{name=networks/*/sites/*}" } }, { @@ -7421,17 +13223,17 @@ } ] }, - "ListReports": { - "requestType": "ListReportsRequest", - "responseType": "ListReportsResponse", + "ListSites": { + "requestType": "ListSitesRequest", + "responseType": "ListSitesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/reports", + "(google.api.http).get": "/v1/{parent=networks/*}/sites", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/reports" + "get": "/v1/{parent=networks/*}/sites" } }, { @@ -7439,142 +13241,141 @@ } ] }, - "CreateReport": { - "requestType": "CreateReportRequest", - "responseType": "Report", + "CreateSite": { + "requestType": "CreateSiteRequest", + "responseType": "Site", "options": { - "(google.api.http).post": "/v1/{parent=networks/*}/reports", - "(google.api.http).body": "report", - "(google.api.method_signature)": "parent,report" + "(google.api.http).post": "/v1/{parent=networks/*}/sites", + "(google.api.http).body": "site", + "(google.api.method_signature)": "parent,site" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1/{parent=networks/*}/reports", - "body": "report" + "post": "/v1/{parent=networks/*}/sites", + "body": "site" } }, { - "(google.api.method_signature)": "parent,report" + "(google.api.method_signature)": "parent,site" } ] }, - "UpdateReport": { - "requestType": "UpdateReportRequest", - "responseType": "Report", + "BatchCreateSites": { + "requestType": "BatchCreateSitesRequest", + "responseType": "BatchCreateSitesResponse", "options": { - "(google.api.http).patch": "/v1/{report.name=networks/*/reports/*}", - "(google.api.http).body": "report", - "(google.api.method_signature)": "report,update_mask" + "(google.api.http).post": "/v1/{parent=networks/*}/sites:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v1/{report.name=networks/*/reports/*}", - "body": "report" + "post": "/v1/{parent=networks/*}/sites:batchCreate", + "body": "*" } }, { - "(google.api.method_signature)": "report,update_mask" + "(google.api.method_signature)": "parent,requests" } ] }, - "RunReport": { - "requestType": "RunReportRequest", - "responseType": "google.longrunning.Operation", + "UpdateSite": { + "requestType": "UpdateSiteRequest", + "responseType": "Site", "options": { - "(google.api.http).post": "/v1/{name=networks/*/reports/*}:run", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "RunReportResponse", - "(google.longrunning.operation_info).metadata_type": "RunReportMetadata" + "(google.api.http).patch": "/v1/{site.name=networks/*/sites/*}", + "(google.api.http).body": "site", + "(google.api.method_signature)": "site,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1/{name=networks/*/reports/*}:run", - "body": "*" + "patch": "/v1/{site.name=networks/*/sites/*}", + "body": "site" } }, { - "(google.api.method_signature)": "name" - }, + "(google.api.method_signature)": "site,update_mask" + } + ] + }, + "BatchUpdateSites": { + "requestType": "BatchUpdateSitesRequest", + "responseType": "BatchUpdateSitesResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/sites:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ { - "(google.longrunning.operation_info)": { - "response_type": "RunReportResponse", - "metadata_type": "RunReportMetadata" + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/sites:batchUpdate", + "body": "*" } + }, + { + "(google.api.method_signature)": "parent,requests" } ] }, - "FetchReportResultRows": { - "requestType": "FetchReportResultRowsRequest", - "responseType": "FetchReportResultRowsResponse", + "BatchDeactivateSites": { + "requestType": "BatchDeactivateSitesRequest", + "responseType": "BatchDeactivateSitesResponse", "options": { - "(google.api.http).get": "/v1/{name=networks/*/reports/*/results/*}:fetchRows", - "(google.api.method_signature)": "name" + "(google.api.http).post": "/v1/{parent=networks/*}/sites:batchDeactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/reports/*/results/*}:fetchRows" + "post": "/v1/{parent=networks/*}/sites:batchDeactivate", + "body": "*" } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "parent,names" } ] - } - } - }, - "RunReportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Report" - } - } - } - }, - "RunReportMetadata": { - "fields": { - "percentComplete": { - "type": "int32", - "id": 2 }, - "report": { - "type": "string", - "id": 4, + "BatchSubmitSitesForApproval": { + "requestType": "BatchSubmitSitesForApprovalRequest", + "responseType": "BatchSubmitSitesForApprovalResponse", "options": { - "(google.api.resource_reference).type": "admanager.googleapis.com/Report" - } - } - } - }, - "RunReportResponse": { - "fields": { - "reportResult": { - "type": "string", - "id": 1 + "(google.api.http).post": "/v1/{parent=networks/*}/sites:batchSubmitForApproval", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/sites:batchSubmitForApproval", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] } } }, - "GetReportRequest": { + "GetSiteRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Report" + "(google.api.resource_reference).type": "admanager.googleapis.com/Site" } } } }, - "ListReportsRequest": { + "ListSitesRequest": { "fields": { "parent": { "type": "string", @@ -7621,11 +13422,11 @@ } } }, - "ListReportsResponse": { + "ListSitesResponse": { "fields": { - "reports": { + "sites": { "rule": "repeated", - "type": "Report", + "type": "Site", "id": 1 }, "nextPageToken": { @@ -7638,7 +13439,7 @@ } } }, - "CreateReportRequest": { + "CreateSiteRequest": { "fields": { "parent": { "type": "string", @@ -7648,8 +13449,8 @@ "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "report": { - "type": "Report", + "site": { + "type": "Site", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -7657,10 +13458,39 @@ } } }, - "UpdateReportRequest": { + "BatchCreateSitesRequest": { "fields": { - "report": { - "type": "Report", + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateSiteRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateSitesResponse": { + "fields": { + "sites": { + "rule": "repeated", + "type": "Site", + "id": 1 + } + } + }, + "UpdateSiteRequest": { + "fields": { + "site": { + "type": "Site", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -7675,82 +13505,92 @@ } } }, - "FetchReportResultRowsRequest": { + "BatchUpdateSitesRequest": { "fields": { - "name": { + "parent": { "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "pageToken": { - "type": "string", - "id": 3, + "requests": { + "rule": "repeated", + "type": "UpdateSiteRequest", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "FetchReportResultRowsResponse": { + "BatchUpdateSitesResponse": { "fields": { - "rows": { + "sites": { "rule": "repeated", - "type": "Report.DataTable.Row", + "type": "Site", "id": 1 + } + } + }, + "BatchDeactivateSitesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "runTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "dateRanges": { - "rule": "repeated", - "type": "Report.DateRange.FixedDateRange", - "id": 3 - }, - "comparisonDateRanges": { + "names": { "rule": "repeated", - "type": "Report.DateRange.FixedDateRange", - "id": 4 - }, - "totalRowCount": { - "type": "int32", - "id": 5 - }, - "nextPageToken": { "type": "string", - "id": 6 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "RoleStatusEnum": { - "fields": {}, - "nested": { - "RoleStatus": { - "values": { - "ROLE_STATUS_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 + "BatchDeactivateSitesResponse": { + "fields": {} + }, + "BatchSubmitSitesForApprovalRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "Role": { + "BatchSubmitSitesForApprovalResponse": { + "fields": {} + }, + "TaxonomyCategory": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/Role", - "(google.api.resource).pattern": "networks/{network_code}/roles/{role}", - "(google.api.resource).plural": "roles", - "(google.api.resource).singular": "role" + "(google.api.resource).type": "admanager.googleapis.com/TaxonomyCategory", + "(google.api.resource).pattern": "networks/{network_code}/taxonomyCategories/{taxonomy_category}", + "(google.api.resource).plural": "taxonomyCategories", + "(google.api.resource).singular": "taxonomyCategory" }, "oneofs": { - "_roleId": { + "_taxonomyCategoryId": { "oneof": [ - "roleId" + "taxonomyCategoryId" ] }, "_displayName": { @@ -7758,19 +13598,19 @@ "displayName" ] }, - "_description": { + "_groupingOnly": { "oneof": [ - "description" + "groupingOnly" ] }, - "_builtIn": { + "_parentTaxonomyCategoryId": { "oneof": [ - "builtIn" + "parentTaxonomyCategoryId" ] }, - "_status": { + "_taxonomyType": { "oneof": [ - "status" + "taxonomyType" ] } }, @@ -7782,7 +13622,7 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "roleId": { + "taxonomyCategoryId": { "type": "int64", "id": 2, "options": { @@ -7794,53 +13634,85 @@ "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "description": { - "type": "string", - "id": 4, + "groupingOnly": { + "type": "bool", + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "builtIn": { - "type": "bool", - "id": 5, + "parentTaxonomyCategoryId": { + "type": "int64", + "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "status": { - "type": "RoleStatusEnum.RoleStatus", - "id": 6, + "taxonomyType": { + "type": "TaxonomyTypeEnum.TaxonomyType", + "id": 9, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } + }, + "ancestorNames": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ancestorTaxonomyCategoryIds": { + "rule": "repeated", + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "RoleService": { + "TaxonomyTypeEnum": { + "fields": {}, + "nested": { + "TaxonomyType": { + "values": { + "TAXONOMY_TYPE_UNSPECIFIED": 0, + "TAXONOMY_IAB_AUDIENCE_1_1": 3, + "TAXONOMY_IAB_CONTENT_1_0": 8, + "TAXONOMY_IAB_CONTENT_2_1": 4, + "TAXONOMY_IAB_CONTENT_2_2": 6, + "TAXONOMY_IAB_CONTENT_3_0": 5, + "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0": 7 + } + } + } + }, + "TaxonomyCategoryService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetRole": { - "requestType": "GetRoleRequest", - "responseType": "Role", + "GetTaxonomyCategory": { + "requestType": "GetTaxonomyCategoryRequest", + "responseType": "TaxonomyCategory", "options": { - "(google.api.http).get": "/v1/{name=networks/*/roles/*}", + "(google.api.http).get": "/v1/{name=networks/*/taxonomyCategories/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/roles/*}" + "get": "/v1/{name=networks/*/taxonomyCategories/*}" } }, { @@ -7848,17 +13720,17 @@ } ] }, - "ListRoles": { - "requestType": "ListRolesRequest", - "responseType": "ListRolesResponse", + "ListTaxonomyCategories": { + "requestType": "ListTaxonomyCategoriesRequest", + "responseType": "ListTaxonomyCategoriesResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/roles", + "(google.api.http).get": "/v1/{parent=networks/*}/taxonomyCategories", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/roles" + "get": "/v1/{parent=networks/*}/taxonomyCategories" } }, { @@ -7868,19 +13740,19 @@ } } }, - "GetRoleRequest": { + "GetTaxonomyCategoryRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/Role" + "(google.api.resource_reference).type": "admanager.googleapis.com/TaxonomyCategory" } } } }, - "ListRolesRequest": { + "ListTaxonomyCategoriesRequest": { "fields": { "parent": { "type": "string", @@ -7927,11 +13799,11 @@ } } }, - "ListRolesResponse": { + "ListTaxonomyCategoriesResponse": { "fields": { - "roles": { + "taxonomyCategories": { "rule": "repeated", - "type": "Role", + "type": "TaxonomyCategory", "id": 1 }, "nextPageToken": { @@ -7944,37 +13816,67 @@ } } }, - "TaxonomyCategory": { + "TeamStatusEnum": { + "fields": {}, + "nested": { + "TeamStatus": { + "values": { + "TEAM_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + } + } + }, + "TeamAccessTypeEnum": { + "fields": {}, + "nested": { + "TeamAccessType": { + "values": { + "TEAM_ACCESS_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "READ_ONLY": 2, + "READ_WRITE": 3 + } + } + } + }, + "Team": { "options": { - "(google.api.resource).type": "admanager.googleapis.com/TaxonomyCategory", - "(google.api.resource).pattern": "networks/{network_code}/taxonomyCategories/{taxonomy_category}", - "(google.api.resource).plural": "taxonomyCategories", - "(google.api.resource).singular": "taxonomyCategory" + "(google.api.resource).type": "admanager.googleapis.com/Team", + "(google.api.resource).pattern": "networks/{network_code}/teams/{team}", + "(google.api.resource).plural": "teams", + "(google.api.resource).singular": "team" }, "oneofs": { - "_taxonomyCategoryId": { + "_displayName": { "oneof": [ - "taxonomyCategoryId" + "displayName" ] }, - "_displayName": { + "_description": { "oneof": [ - "displayName" + "description" ] }, - "_groupingOnly": { + "_status": { "oneof": [ - "groupingOnly" + "status" ] }, - "_parentTaxonomyCategoryId": { + "_allCompaniesAccess": { "oneof": [ - "parentTaxonomyCategoryId" + "allCompaniesAccess" ] }, - "_taxonomyType": { + "_allInventoryAccess": { "oneof": [ - "taxonomyType" + "allInventoryAccess" + ] + }, + "_accessType": { + "oneof": [ + "accessType" ] } }, @@ -7986,96 +13888,73 @@ "(google.api.field_behavior)": "IDENTIFIER" } }, - "taxonomyCategoryId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, "displayName": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "REQUIRED", "proto3_optional": true } }, - "groupingOnly": { - "type": "bool", - "id": 5, + "description": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "parentTaxonomyCategoryId": { - "type": "int64", - "id": 6, + "status": { + "type": "TeamStatusEnum.TeamStatus", + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, - "taxonomyType": { - "type": "TaxonomyTypeEnum.TaxonomyType", - "id": 9, + "allCompaniesAccess": { + "type": "bool", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, - "ancestorNames": { - "rule": "repeated", - "type": "string", + "allInventoryAccess": { + "type": "bool", "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "ancestorTaxonomyCategoryIds": { - "rule": "repeated", - "type": "int64", + "accessType": { + "type": "TeamAccessTypeEnum.TeamAccessType", "id": 8, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "TaxonomyTypeEnum": { - "fields": {}, - "nested": { - "TaxonomyType": { - "values": { - "TAXONOMY_TYPE_UNSPECIFIED": 0, - "TAXONOMY_IAB_AUDIENCE_1_1": 3, - "TAXONOMY_IAB_CONTENT_2_1": 4, - "TAXONOMY_IAB_CONTENT_2_2": 6, - "TAXONOMY_IAB_CONTENT_3_0": 5, - "TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0": 7 + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } } }, - "TaxonomyCategoryService": { + "TeamService": { "options": { "(google.api.default_host)": "admanager.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/admanager" }, "methods": { - "GetTaxonomyCategory": { - "requestType": "GetTaxonomyCategoryRequest", - "responseType": "TaxonomyCategory", + "GetTeam": { + "requestType": "GetTeamRequest", + "responseType": "Team", "options": { - "(google.api.http).get": "/v1/{name=networks/*/taxonomyCategories/*}", + "(google.api.http).get": "/v1/{name=networks/*/teams/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=networks/*/taxonomyCategories/*}" + "get": "/v1/{name=networks/*/teams/*}" } }, { @@ -8083,39 +13962,159 @@ } ] }, - "ListTaxonomyCategories": { - "requestType": "ListTaxonomyCategoriesRequest", - "responseType": "ListTaxonomyCategoriesResponse", + "ListTeams": { + "requestType": "ListTeamsRequest", + "responseType": "ListTeamsResponse", "options": { - "(google.api.http).get": "/v1/{parent=networks/*}/taxonomyCategories", + "(google.api.http).get": "/v1/{parent=networks/*}/teams", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=networks/*}/taxonomyCategories" + "get": "/v1/{parent=networks/*}/teams" } }, { "(google.api.method_signature)": "parent" } ] + }, + "CreateTeam": { + "requestType": "CreateTeamRequest", + "responseType": "Team", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/teams", + "(google.api.http).body": "team", + "(google.api.method_signature)": "parent,team" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/teams", + "body": "team" + } + }, + { + "(google.api.method_signature)": "parent,team" + } + ] + }, + "BatchCreateTeams": { + "requestType": "BatchCreateTeamsRequest", + "responseType": "BatchCreateTeamsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/teams:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/teams:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "UpdateTeam": { + "requestType": "UpdateTeamRequest", + "responseType": "Team", + "options": { + "(google.api.http).patch": "/v1/{team.name=networks/*/teams/*}", + "(google.api.http).body": "team", + "(google.api.method_signature)": "team,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{team.name=networks/*/teams/*}", + "body": "team" + } + }, + { + "(google.api.method_signature)": "team,update_mask" + } + ] + }, + "BatchUpdateTeams": { + "requestType": "BatchUpdateTeamsRequest", + "responseType": "BatchUpdateTeamsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/teams:batchUpdate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/teams:batchUpdate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "BatchActivateTeams": { + "requestType": "BatchActivateTeamsRequest", + "responseType": "BatchActivateTeamsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/teams:batchActivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/teams:batchActivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] + }, + "BatchDeactivateTeams": { + "requestType": "BatchDeactivateTeamsRequest", + "responseType": "BatchDeactivateTeamsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=networks/*}/teams:batchDeactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,names" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=networks/*}/teams:batchDeactivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,names" + } + ] } } }, - "GetTaxonomyCategoryRequest": { + "GetTeamRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "admanager.googleapis.com/TaxonomyCategory" + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" } } } }, - "ListTaxonomyCategoriesRequest": { + "ListTeamsRequest": { "fields": { "parent": { "type": "string", @@ -8148,54 +14147,180 @@ }, "orderBy": { "type": "string", - "id": 5, + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skip": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTeamsResponse": { + "fields": { + "teams": { + "rule": "repeated", + "type": "Team", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "CreateTeamRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "team": { + "type": "Team", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateTeamsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateTeamRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateTeamsResponse": { + "fields": { + "teams": { + "rule": "repeated", + "type": "Team", + "id": 1 + } + } + }, + "UpdateTeamRequest": { + "fields": { + "team": { + "type": "Team", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateTeamsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" } }, - "skip": { - "type": "int32", - "id": 6, + "requests": { + "rule": "repeated", + "type": "UpdateTeamRequest", + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListTaxonomyCategoriesResponse": { + "BatchUpdateTeamsResponse": { "fields": { - "taxonomyCategories": { + "teams": { "rule": "repeated", - "type": "TaxonomyCategory", + "type": "Team", "id": 1 - }, - "nextPageToken": { + } + } + }, + "BatchActivateTeamsRequest": { + "fields": { + "parent": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } }, - "totalSize": { - "type": "int32", - "id": 3 + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" + } } } }, - "Team": { - "options": { - "(google.api.resource).type": "admanager.googleapis.com/Team", - "(google.api.resource).pattern": "networks/{network_code}/teams/{team}", - "(google.api.resource).plural": "teams", - "(google.api.resource).singular": "team" - }, + "BatchActivateTeamsResponse": { + "fields": {} + }, + "BatchDeactivateTeamsRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Network" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "admanager.googleapis.com/Team" } } } }, + "BatchDeactivateTeamsResponse": { + "fields": {} + }, "User": { "options": { "(google.api.resource).type": "admanager.googleapis.com/User", @@ -8357,6 +14482,44 @@ } } } + }, + "WebProperty": { + "options": { + "(google.api.resource).type": "admanager.googleapis.com/WebProperty", + "(google.api.resource).pattern": "networks/{network_code}/webProperties/{web_property}", + "(google.api.resource).plural": "webProperties", + "(google.api.resource).singular": "webProperty" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "webPropertyCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "productType": { + "type": "ExchangeSyndicationProductEnum.ExchangeSyndicationProduct", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "webPropertyId": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } } @@ -10227,82 +16390,6 @@ } } }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", - "java_multiple_files": true, - "java_outer_classname": "TimeOfDayProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Money": { - "fields": { - "currencyCode": { - "type": "string", - "id": 1 - }, - "units": { - "type": "int64", - "id": 2 - }, - "nanos": { - "type": "int32", - "id": 3 - } - } - }, - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - }, - "DayOfWeek": { - "values": { - "DAY_OF_WEEK_UNSPECIFIED": 0, - "MONDAY": 1, - "TUESDAY": 2, - "WEDNESDAY": 3, - "THURSDAY": 4, - "FRIDAY": 5, - "SATURDAY": 6, - "SUNDAY": 7 - } - }, - "TimeOfDay": { - "fields": { - "hours": { - "type": "int32", - "id": 1 - }, - "minutes": { - "type": "int32", - "id": 2 - }, - "seconds": { - "type": "int32", - "id": 3 - }, - "nanos": { - "type": "int32", - "id": 4 - } - } - } - } - }, "longrunning": { "options": { "cc_enable_arenas": true, @@ -10547,6 +16634,94 @@ } } } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", + "java_multiple_files": true, + "java_outer_classname": "TimeOfDayProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "Money": { + "fields": { + "currencyCode": { + "type": "string", + "id": 1 + }, + "units": { + "type": "int64", + "id": 2 + }, + "nanos": { + "type": "int32", + "id": 3 + } + } + }, + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + }, + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "TimeOfDay": { + "fields": { + "hours": { + "type": "int32", + "id": 1 + }, + "minutes": { + "type": "int32", + "id": 2 + }, + "seconds": { + "type": "int32", + "id": 3 + }, + "nanos": { + "type": "int32", + "id": 4 + } + } + } + } } } } diff --git a/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js new file mode 100644 index 000000000000..3d0f833020d7 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js @@ -0,0 +1,77 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {AdReviewCenterAdServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new AdReviewCenterAdServiceClient(); + + async function callBatchAllowAdReviewCenterAds() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const [operation] = await admanagerClient.batchAllowAdReviewCenterAds(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBatchAllowAdReviewCenterAds(); + // [END admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js new file mode 100644 index 000000000000..93201721e89c --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js @@ -0,0 +1,77 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {AdReviewCenterAdServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new AdReviewCenterAdServiceClient(); + + async function callBatchBlockAdReviewCenterAds() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const [operation] = await admanagerClient.batchBlockAdReviewCenterAds(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBatchBlockAdReviewCenterAds(); + // [END admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.search_ad_review_center_ads.js b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.search_ad_review_center_ads.js new file mode 100644 index 000000000000..432849ae7e04 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/ad_review_center_ad_service.search_ad_review_center_ads.js @@ -0,0 +1,112 @@ +// Copyright 2025 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, status) { + // [START admanager_v1_generated_AdReviewCenterAdService_SearchAdReviewCenterAds_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + */ + // const pageToken = 'abc123' + /** + * Required. Only return ads with the given status. + */ + // const status = {} + /** + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + */ + // const adReviewCenterAdId = ['abc','def'] + /** + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + */ + // const dateTimeRange = {} + /** + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, 'car', 'blue' will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + */ + // const searchText = ['abc','def'] + /** + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + */ + // const buyerAccountId = [1,2,3,4] + + // Imports the Admanager library + const {AdReviewCenterAdServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new AdReviewCenterAdServiceClient(); + + async function callSearchAdReviewCenterAds() { + // Construct request + const request = { + parent, + status, + }; + + // Run request + const iterable = admanagerClient.searchAdReviewCenterAdsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchAdReviewCenterAds(); + // [END admanager_v1_generated_AdReviewCenterAdService_SearchAdReviewCenterAds_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_unit_sizes.js b/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_unit_sizes.js index 924323bbb34c..8c24ca02eefc 100644 --- a/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_unit_sizes.js +++ b/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_unit_sizes.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_units.js b/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_units.js index d62dab378551..4204cdebee71 100644 --- a/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_units.js +++ b/packages/google-ads-admanager/samples/generated/v1/ad_unit_service.list_ad_units.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/application_service.get_application.js b/packages/google-ads-admanager/samples/generated/v1/application_service.get_application.js new file mode 100644 index 000000000000..fae07baf5d8b --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/application_service.get_application.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_ApplicationService_GetApplication_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 resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {ApplicationServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ApplicationServiceClient(); + + async function callGetApplication() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getApplication(request); + console.log(response); + } + + callGetApplication(); + // [END admanager_v1_generated_ApplicationService_GetApplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/application_service.list_applications.js b/packages/google-ads-admanager/samples/generated/v1/application_service.list_applications.js new file mode 100644 index 000000000000..768f784e012a --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/application_service.list_applications.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_ApplicationService_ListApplications_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {ApplicationServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ApplicationServiceClient(); + + async function callListApplications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listApplicationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApplications(); + // [END admanager_v1_generated_ApplicationService_ListApplications_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.get_audience_segment.js b/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.get_audience_segment.js new file mode 100644 index 000000000000..5ec942f32a95 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.get_audience_segment.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_AudienceSegmentService_GetAudienceSegment_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 resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {AudienceSegmentServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new AudienceSegmentServiceClient(); + + async function callGetAudienceSegment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getAudienceSegment(request); + console.log(response); + } + + callGetAudienceSegment(); + // [END admanager_v1_generated_AudienceSegmentService_GetAudienceSegment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.list_audience_segments.js b/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.list_audience_segments.js new file mode 100644 index 000000000000..50a8a9645600 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/audience_segment_service.list_audience_segments.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_AudienceSegmentService_ListAudienceSegments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {AudienceSegmentServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new AudienceSegmentServiceClient(); + + async function callListAudienceSegments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listAudienceSegmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceSegments(); + // [END admanager_v1_generated_AudienceSegmentService_ListAudienceSegments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.list_bandwidth_groups.js b/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.list_bandwidth_groups.js index 9f149b08ea83..aed19948f21e 100644 --- a/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.list_bandwidth_groups.js +++ b/packages/google-ads-admanager/samples/generated/v1/bandwidth_group_service.list_bandwidth_groups.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/browser_language_service.get_browser_language.js b/packages/google-ads-admanager/samples/generated/v1/browser_language_service.get_browser_language.js new file mode 100644 index 000000000000..7f0bdc4f197b --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/browser_language_service.get_browser_language.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_BrowserLanguageService_GetBrowserLanguage_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 resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {BrowserLanguageServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new BrowserLanguageServiceClient(); + + async function callGetBrowserLanguage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getBrowserLanguage(request); + console.log(response); + } + + callGetBrowserLanguage(); + // [END admanager_v1_generated_BrowserLanguageService_GetBrowserLanguage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/browser_language_service.list_browser_languages.js b/packages/google-ads-admanager/samples/generated/v1/browser_language_service.list_browser_languages.js new file mode 100644 index 000000000000..e25538ea9e06 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/browser_language_service.list_browser_languages.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_BrowserLanguageService_ListBrowserLanguages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {BrowserLanguageServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new BrowserLanguageServiceClient(); + + async function callListBrowserLanguages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listBrowserLanguagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBrowserLanguages(); + // [END admanager_v1_generated_BrowserLanguageService_ListBrowserLanguages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/browser_service.get_browser.js b/packages/google-ads-admanager/samples/generated/v1/browser_service.get_browser.js new file mode 100644 index 000000000000..549eb9645af4 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/browser_service.get_browser.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_BrowserService_GetBrowser_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 resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {BrowserServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new BrowserServiceClient(); + + async function callGetBrowser() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getBrowser(request); + console.log(response); + } + + callGetBrowser(); + // [END admanager_v1_generated_BrowserService_GetBrowser_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/browser_service.list_browsers.js b/packages/google-ads-admanager/samples/generated/v1/browser_service.list_browsers.js new file mode 100644 index 000000000000..70f98a5d9e00 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/browser_service.list_browsers.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_BrowserService_ListBrowsers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {BrowserServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new BrowserServiceClient(); + + async function callListBrowsers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listBrowsersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBrowsers(); + // [END admanager_v1_generated_BrowserService_ListBrowsers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.get_cms_metadata_key.js b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.get_cms_metadata_key.js new file mode 100644 index 000000000000..905291f65bd7 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.get_cms_metadata_key.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_CmsMetadataKeyService_GetCmsMetadataKey_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 resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {CmsMetadataKeyServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CmsMetadataKeyServiceClient(); + + async function callGetCmsMetadataKey() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getCmsMetadataKey(request); + console.log(response); + } + + callGetCmsMetadataKey(); + // [END admanager_v1_generated_CmsMetadataKeyService_GetCmsMetadataKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.list_cms_metadata_keys.js b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.list_cms_metadata_keys.js new file mode 100644 index 000000000000..c8881b40abf7 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_key_service.list_cms_metadata_keys.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_CmsMetadataKeyService_ListCmsMetadataKeys_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {CmsMetadataKeyServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CmsMetadataKeyServiceClient(); + + async function callListCmsMetadataKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listCmsMetadataKeysAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCmsMetadataKeys(); + // [END admanager_v1_generated_CmsMetadataKeyService_ListCmsMetadataKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.get_cms_metadata_value.js b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.get_cms_metadata_value.js new file mode 100644 index 000000000000..f588faf5fdde --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.get_cms_metadata_value.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_CmsMetadataValueService_GetCmsMetadataValue_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 resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {CmsMetadataValueServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CmsMetadataValueServiceClient(); + + async function callGetCmsMetadataValue() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getCmsMetadataValue(request); + console.log(response); + } + + callGetCmsMetadataValue(); + // [END admanager_v1_generated_CmsMetadataValueService_GetCmsMetadataValue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.list_cms_metadata_values.js b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.list_cms_metadata_values.js new file mode 100644 index 000000000000..e7e7e4a5f07e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/cms_metadata_value_service.list_cms_metadata_values.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_CmsMetadataValueService_ListCmsMetadataValues_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {CmsMetadataValueServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CmsMetadataValueServiceClient(); + + async function callListCmsMetadataValues() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listCmsMetadataValuesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCmsMetadataValues(); + // [END admanager_v1_generated_CmsMetadataValueService_ListCmsMetadataValues_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/company_service.list_companies.js b/packages/google-ads-admanager/samples/generated/v1/company_service.list_companies.js index 10bab572ea38..f3845b41a1f7 100644 --- a/packages/google-ads-admanager/samples/generated/v1/company_service.list_companies.js +++ b/packages/google-ads-admanager/samples/generated/v1/company_service.list_companies.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_create_contacts.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_create_contacts.js new file mode 100644 index 000000000000..99227852ba2c --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_create_contacts.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_ContactService_BatchCreateContacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callBatchCreateContacts() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchCreateContacts(request); + console.log(response); + } + + callBatchCreateContacts(); + // [END admanager_v1_generated_ContactService_BatchCreateContacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_update_contacts.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_update_contacts.js new file mode 100644 index 000000000000..67fa10a9a1cc --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.batch_update_contacts.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_ContactService_BatchUpdateContacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callBatchUpdateContacts() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchUpdateContacts(request); + console.log(response); + } + + callBatchUpdateContacts(); + // [END admanager_v1_generated_ContactService_BatchUpdateContacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.create_contact.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.create_contact.js new file mode 100644 index 000000000000..3a9137f403ac --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.create_contact.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, contact) { + // [START admanager_v1_generated_ContactService_CreateContact_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The `Contact` to create. + */ + // const contact = {} + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callCreateContact() { + // Construct request + const request = { + parent, + contact, + }; + + // Run request + const response = await admanagerClient.createContact(request); + console.log(response); + } + + callCreateContact(); + // [END admanager_v1_generated_ContactService_CreateContact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.get_contact.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.get_contact.js new file mode 100644 index 000000000000..a78b261c1253 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.get_contact.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_ContactService_GetContact_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 resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callGetContact() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getContact(request); + console.log(response); + } + + callGetContact(); + // [END admanager_v1_generated_ContactService_GetContact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.list_contacts.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.list_contacts.js new file mode 100644 index 000000000000..3a44819f5b3e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.list_contacts.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_ContactService_ListContacts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callListContacts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listContactsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContacts(); + // [END admanager_v1_generated_ContactService_ListContacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/contact_service.update_contact.js b/packages/google-ads-admanager/samples/generated/v1/contact_service.update_contact.js new file mode 100644 index 000000000000..e0c80cf2e96a --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/contact_service.update_contact.js @@ -0,0 +1,67 @@ +// Copyright 2025 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(contact, updateMask) { + // [START admanager_v1_generated_ContactService_UpdateContact_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 `Contact` to update. + * The `Contact`'s `name` is used to identify the `Contact` to update. + */ + // const contact = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admanager library + const {ContactServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContactServiceClient(); + + async function callUpdateContact() { + // Construct request + const request = { + contact, + updateMask, + }; + + // Run request + const response = await admanagerClient.updateContact(request); + console.log(response); + } + + callUpdateContact(); + // [END admanager_v1_generated_ContactService_UpdateContact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.get_content_bundle.js b/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.get_content_bundle.js new file mode 100644 index 000000000000..3d444488a5de --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.get_content_bundle.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_ContentBundleService_GetContentBundle_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 resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {ContentBundleServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentBundleServiceClient(); + + async function callGetContentBundle() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getContentBundle(request); + console.log(response); + } + + callGetContentBundle(); + // [END admanager_v1_generated_ContentBundleService_GetContentBundle_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.list_content_bundles.js b/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.list_content_bundles.js new file mode 100644 index 000000000000..c9ee8aba328f --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_bundle_service.list_content_bundles.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_ContentBundleService_ListContentBundles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {ContentBundleServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentBundleServiceClient(); + + async function callListContentBundles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listContentBundlesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContentBundles(); + // [END admanager_v1_generated_ContentBundleService_ListContentBundles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_label_service.get_content_label.js b/packages/google-ads-admanager/samples/generated/v1/content_label_service.get_content_label.js new file mode 100644 index 000000000000..61e935bec902 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_label_service.get_content_label.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_ContentLabelService_GetContentLabel_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 resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {ContentLabelServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentLabelServiceClient(); + + async function callGetContentLabel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getContentLabel(request); + console.log(response); + } + + callGetContentLabel(); + // [END admanager_v1_generated_ContentLabelService_GetContentLabel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_label_service.list_content_labels.js b/packages/google-ads-admanager/samples/generated/v1/content_label_service.list_content_labels.js new file mode 100644 index 000000000000..cc42fe5ac41e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_label_service.list_content_labels.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_ContentLabelService_ListContentLabels_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {ContentLabelServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentLabelServiceClient(); + + async function callListContentLabels() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listContentLabelsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContentLabels(); + // [END admanager_v1_generated_ContentLabelService_ListContentLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_service.get_content.js b/packages/google-ads-admanager/samples/generated/v1/content_service.get_content.js new file mode 100644 index 000000000000..0ba59fc5bdd6 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_service.get_content.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_ContentService_GetContent_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 resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {ContentServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentServiceClient(); + + async function callGetContent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getContent(request); + console.log(response); + } + + callGetContent(); + // [END admanager_v1_generated_ContentService_GetContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/content_service.list_content.js b/packages/google-ads-admanager/samples/generated/v1/content_service.list_content.js new file mode 100644 index 000000000000..b1d7fa54887b --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/content_service.list_content.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_ContentService_ListContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {ContentServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new ContentServiceClient(); + + async function callListContent() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listContentAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContent(); + // [END admanager_v1_generated_ContentService_ListContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/creative_template_service.get_creative_template.js b/packages/google-ads-admanager/samples/generated/v1/creative_template_service.get_creative_template.js new file mode 100644 index 000000000000..85daab33bc0b --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/creative_template_service.get_creative_template.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_CreativeTemplateService_GetCreativeTemplate_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 resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {CreativeTemplateServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CreativeTemplateServiceClient(); + + async function callGetCreativeTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getCreativeTemplate(request); + console.log(response); + } + + callGetCreativeTemplate(); + // [END admanager_v1_generated_CreativeTemplateService_GetCreativeTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/creative_template_service.list_creative_templates.js b/packages/google-ads-admanager/samples/generated/v1/creative_template_service.list_creative_templates.js new file mode 100644 index 000000000000..0e1b9ffeb0d5 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/creative_template_service.list_creative_templates.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_CreativeTemplateService_ListCreativeTemplates_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {CreativeTemplateServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CreativeTemplateServiceClient(); + + async function callListCreativeTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listCreativeTemplatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCreativeTemplates(); + // [END admanager_v1_generated_CreativeTemplateService_ListCreativeTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_activate_custom_fields.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_activate_custom_fields.js new file mode 100644 index 000000000000..982ff29ce639 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_activate_custom_fields.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_CustomFieldService_BatchActivateCustomFields_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callBatchActivateCustomFields() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchActivateCustomFields(request); + console.log(response); + } + + callBatchActivateCustomFields(); + // [END admanager_v1_generated_CustomFieldService_BatchActivateCustomFields_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_create_custom_fields.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_create_custom_fields.js new file mode 100644 index 000000000000..9ea5e7290960 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_create_custom_fields.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_CustomFieldService_BatchCreateCustomFields_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callBatchCreateCustomFields() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchCreateCustomFields(request); + console.log(response); + } + + callBatchCreateCustomFields(); + // [END admanager_v1_generated_CustomFieldService_BatchCreateCustomFields_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_deactivate_custom_fields.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_deactivate_custom_fields.js new file mode 100644 index 000000000000..6a878becba74 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_deactivate_custom_fields.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_CustomFieldService_BatchDeactivateCustomFields_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callBatchDeactivateCustomFields() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchDeactivateCustomFields(request); + console.log(response); + } + + callBatchDeactivateCustomFields(); + // [END admanager_v1_generated_CustomFieldService_BatchDeactivateCustomFields_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_update_custom_fields.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_update_custom_fields.js new file mode 100644 index 000000000000..77f7c15608d1 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.batch_update_custom_fields.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_CustomFieldService_BatchUpdateCustomFields_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callBatchUpdateCustomFields() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchUpdateCustomFields(request); + console.log(response); + } + + callBatchUpdateCustomFields(); + // [END admanager_v1_generated_CustomFieldService_BatchUpdateCustomFields_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.create_custom_field.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.create_custom_field.js new file mode 100644 index 000000000000..fafe3fc219ca --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.create_custom_field.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, customField) { + // [START admanager_v1_generated_CustomFieldService_CreateCustomField_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The `CustomField` to create. + */ + // const customField = {} + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callCreateCustomField() { + // Construct request + const request = { + parent, + customField, + }; + + // Run request + const response = await admanagerClient.createCustomField(request); + console.log(response); + } + + callCreateCustomField(); + // [END admanager_v1_generated_CustomFieldService_CreateCustomField_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.list_custom_fields.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.list_custom_fields.js index 71e48d77be3f..c926336fffd8 100644 --- a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.list_custom_fields.js +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.list_custom_fields.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `CustomFields` to return. The service may * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/custom_field_service.update_custom_field.js b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.update_custom_field.js new file mode 100644 index 000000000000..8bc03edc8515 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/custom_field_service.update_custom_field.js @@ -0,0 +1,67 @@ +// Copyright 2025 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(customField, updateMask) { + // [START admanager_v1_generated_CustomFieldService_UpdateCustomField_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 `CustomField` to update. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + */ + // const customField = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admanager library + const {CustomFieldServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new CustomFieldServiceClient(); + + async function callUpdateCustomField() { + // Construct request + const request = { + customField, + updateMask, + }; + + // Run request + const response = await admanagerClient.updateCustomField(request); + console.log(response); + } + + callUpdateCustomField(); + // [END admanager_v1_generated_CustomFieldService_UpdateCustomField_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/device_capability_service.get_device_capability.js b/packages/google-ads-admanager/samples/generated/v1/device_capability_service.get_device_capability.js new file mode 100644 index 000000000000..8594e635d68e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/device_capability_service.get_device_capability.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_DeviceCapabilityService_GetDeviceCapability_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 resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {DeviceCapabilityServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new DeviceCapabilityServiceClient(); + + async function callGetDeviceCapability() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getDeviceCapability(request); + console.log(response); + } + + callGetDeviceCapability(); + // [END admanager_v1_generated_DeviceCapabilityService_GetDeviceCapability_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/device_capability_service.list_device_capabilities.js b/packages/google-ads-admanager/samples/generated/v1/device_capability_service.list_device_capabilities.js new file mode 100644 index 000000000000..24a6fc78d439 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/device_capability_service.list_device_capabilities.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_DeviceCapabilityService_ListDeviceCapabilities_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {DeviceCapabilityServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new DeviceCapabilityServiceClient(); + + async function callListDeviceCapabilities() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listDeviceCapabilitiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDeviceCapabilities(); + // [END admanager_v1_generated_DeviceCapabilityService_ListDeviceCapabilities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/device_category_service.list_device_categories.js b/packages/google-ads-admanager/samples/generated/v1/device_category_service.list_device_categories.js index 577c05823589..a44d0ccb41a4 100644 --- a/packages/google-ads-admanager/samples/generated/v1/device_category_service.list_device_categories.js +++ b/packages/google-ads-admanager/samples/generated/v1/device_category_service.list_device_categories.js @@ -37,7 +37,7 @@ function main(parent) { * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.get_device_manufacturer.js b/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.get_device_manufacturer.js new file mode 100644 index 000000000000..a245624a0da9 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.get_device_manufacturer.js @@ -0,0 +1,63 @@ +// Copyright 2025 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 admanager_v1_generated_DeviceManufacturerService_GetDeviceManufacturer_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 resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {DeviceManufacturerServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new DeviceManufacturerServiceClient(); + + async function callGetDeviceManufacturer() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getDeviceManufacturer(request); + console.log(response); + } + + callGetDeviceManufacturer(); + // [END admanager_v1_generated_DeviceManufacturerService_GetDeviceManufacturer_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.list_device_manufacturers.js b/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.list_device_manufacturers.js new file mode 100644 index 000000000000..dc5788bc3a5a --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/device_manufacturer_service.list_device_manufacturers.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_DeviceManufacturerService_ListDeviceManufacturers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {DeviceManufacturerServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new DeviceManufacturerServiceClient(); + + async function callListDeviceManufacturers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listDeviceManufacturersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDeviceManufacturers(); + // [END admanager_v1_generated_DeviceManufacturerService_ListDeviceManufacturers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/geo_target_service.list_geo_targets.js b/packages/google-ads-admanager/samples/generated/v1/geo_target_service.list_geo_targets.js index fc60378d0dd3..cae10c252624 100644 --- a/packages/google-ads-admanager/samples/generated/v1/geo_target_service.list_geo_targets.js +++ b/packages/google-ads-admanager/samples/generated/v1/geo_target_service.list_geo_targets.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.get_mobile_carrier.js b/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.get_mobile_carrier.js new file mode 100644 index 000000000000..e77335ee3dda --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.get_mobile_carrier.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_MobileCarrierService_GetMobileCarrier_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 resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {MobileCarrierServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileCarrierServiceClient(); + + async function callGetMobileCarrier() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getMobileCarrier(request); + console.log(response); + } + + callGetMobileCarrier(); + // [END admanager_v1_generated_MobileCarrierService_GetMobileCarrier_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.list_mobile_carriers.js b/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.list_mobile_carriers.js new file mode 100644 index 000000000000..2aa47715cc82 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_carrier_service.list_mobile_carriers.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_MobileCarrierService_ListMobileCarriers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {MobileCarrierServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileCarrierServiceClient(); + + async function callListMobileCarriers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listMobileCarriersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMobileCarriers(); + // [END admanager_v1_generated_MobileCarrierService_ListMobileCarriers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.get_mobile_device.js b/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.get_mobile_device.js new file mode 100644 index 000000000000..76d4ef68192f --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.get_mobile_device.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_MobileDeviceService_GetMobileDevice_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 resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {MobileDeviceServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileDeviceServiceClient(); + + async function callGetMobileDevice() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getMobileDevice(request); + console.log(response); + } + + callGetMobileDevice(); + // [END admanager_v1_generated_MobileDeviceService_GetMobileDevice_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.list_mobile_devices.js b/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.list_mobile_devices.js new file mode 100644 index 000000000000..8163850096c4 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_device_service.list_mobile_devices.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_MobileDeviceService_ListMobileDevices_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {MobileDeviceServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileDeviceServiceClient(); + + async function callListMobileDevices() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listMobileDevicesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMobileDevices(); + // [END admanager_v1_generated_MobileDeviceService_ListMobileDevices_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.get_mobile_device_submodel.js b/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.get_mobile_device_submodel.js new file mode 100644 index 000000000000..2fc4b699b2ce --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.get_mobile_device_submodel.js @@ -0,0 +1,63 @@ +// Copyright 2025 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 admanager_v1_generated_MobileDeviceSubmodelService_GetMobileDeviceSubmodel_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 resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {MobileDeviceSubmodelServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileDeviceSubmodelServiceClient(); + + async function callGetMobileDeviceSubmodel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getMobileDeviceSubmodel(request); + console.log(response); + } + + callGetMobileDeviceSubmodel(); + // [END admanager_v1_generated_MobileDeviceSubmodelService_GetMobileDeviceSubmodel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.list_mobile_device_submodels.js b/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.list_mobile_device_submodels.js new file mode 100644 index 000000000000..7e2c86a1c13e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/mobile_device_submodel_service.list_mobile_device_submodels.js @@ -0,0 +1,96 @@ +// Copyright 2025 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 admanager_v1_generated_MobileDeviceSubmodelService_ListMobileDeviceSubmodels_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {MobileDeviceSubmodelServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new MobileDeviceSubmodelServiceClient(); + + async function callListMobileDeviceSubmodels() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listMobileDeviceSubmodelsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMobileDeviceSubmodels(); + // [END admanager_v1_generated_MobileDeviceSubmodelService_ListMobileDeviceSubmodels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/operating_system_service.list_operating_systems.js b/packages/google-ads-admanager/samples/generated/v1/operating_system_service.list_operating_systems.js index fa5465f528b2..516d5cbd44f6 100644 --- a/packages/google-ads-admanager/samples/generated/v1/operating_system_service.list_operating_systems.js +++ b/packages/google-ads-admanager/samples/generated/v1/operating_system_service.list_operating_systems.js @@ -37,7 +37,7 @@ function main(parent) { * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/operating_system_version_service.list_operating_system_versions.js b/packages/google-ads-admanager/samples/generated/v1/operating_system_version_service.list_operating_system_versions.js index 364f638944d4..cfd85551775a 100644 --- a/packages/google-ads-admanager/samples/generated/v1/operating_system_version_service.list_operating_system_versions.js +++ b/packages/google-ads-admanager/samples/generated/v1/operating_system_version_service.list_operating_system_versions.js @@ -37,7 +37,7 @@ function main(parent) { * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/order_service.list_orders.js b/packages/google-ads-admanager/samples/generated/v1/order_service.list_orders.js index 74b957f9c6bf..c9760a815930 100644 --- a/packages/google-ads-admanager/samples/generated/v1/order_service.list_orders.js +++ b/packages/google-ads-admanager/samples/generated/v1/order_service.list_orders.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_activate_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_activate_placements.js new file mode 100644 index 000000000000..e80c6c1a05c2 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_activate_placements.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_PlacementService_BatchActivatePlacements_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callBatchActivatePlacements() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchActivatePlacements(request); + console.log(response); + } + + callBatchActivatePlacements(); + // [END admanager_v1_generated_PlacementService_BatchActivatePlacements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_archive_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_archive_placements.js new file mode 100644 index 000000000000..96325b503054 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_archive_placements.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_PlacementService_BatchArchivePlacements_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callBatchArchivePlacements() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchArchivePlacements(request); + console.log(response); + } + + callBatchArchivePlacements(); + // [END admanager_v1_generated_PlacementService_BatchArchivePlacements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_create_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_create_placements.js new file mode 100644 index 000000000000..ce7c1ee60647 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_create_placements.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_PlacementService_BatchCreatePlacements_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callBatchCreatePlacements() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchCreatePlacements(request); + console.log(response); + } + + callBatchCreatePlacements(); + // [END admanager_v1_generated_PlacementService_BatchCreatePlacements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_deactivate_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_deactivate_placements.js new file mode 100644 index 000000000000..f6e85e65528c --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_deactivate_placements.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_PlacementService_BatchDeactivatePlacements_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callBatchDeactivatePlacements() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchDeactivatePlacements(request); + console.log(response); + } + + callBatchDeactivatePlacements(); + // [END admanager_v1_generated_PlacementService_BatchDeactivatePlacements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_update_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_update_placements.js new file mode 100644 index 000000000000..42faf0717ad2 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.batch_update_placements.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_PlacementService_BatchUpdatePlacements_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callBatchUpdatePlacements() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchUpdatePlacements(request); + console.log(response); + } + + callBatchUpdatePlacements(); + // [END admanager_v1_generated_PlacementService_BatchUpdatePlacements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.create_placement.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.create_placement.js new file mode 100644 index 000000000000..e06b83099b1b --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.create_placement.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, placement) { + // [START admanager_v1_generated_PlacementService_CreatePlacement_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The `Placement` to create. + */ + // const placement = {} + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callCreatePlacement() { + // Construct request + const request = { + parent, + placement, + }; + + // Run request + const response = await admanagerClient.createPlacement(request); + console.log(response); + } + + callCreatePlacement(); + // [END admanager_v1_generated_PlacementService_CreatePlacement_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.list_placements.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.list_placements.js index 85cb4d7df52d..073fae90216a 100644 --- a/packages/google-ads-admanager/samples/generated/v1/placement_service.list_placements.js +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.list_placements.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `Placements` to return. The service may * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/placement_service.update_placement.js b/packages/google-ads-admanager/samples/generated/v1/placement_service.update_placement.js new file mode 100644 index 000000000000..3e96c816f9ab --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/placement_service.update_placement.js @@ -0,0 +1,69 @@ +// Copyright 2025 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(placement, updateMask) { + // [START admanager_v1_generated_PlacementService_UpdatePlacement_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 `Placement` to update. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + */ + // const placement = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admanager library + const {PlacementServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new PlacementServiceClient(); + + async function callUpdatePlacement() { + // Construct request + const request = { + placement, + updateMask, + }; + + // Run request + const response = await admanagerClient.updatePlacement(request); + console.log(response); + } + + callUpdatePlacement(); + // [END admanager_v1_generated_PlacementService_UpdatePlacement_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.list_private_auction_deals.js b/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.list_private_auction_deals.js index 15a1ce28f64e..b08e398fb3b5 100644 --- a/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.list_private_auction_deals.js +++ b/packages/google-ads-admanager/samples/generated/v1/private_auction_deal_service.list_private_auction_deals.js @@ -38,7 +38,7 @@ function main(parent) { * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/private_auction_service.list_private_auctions.js b/packages/google-ads-admanager/samples/generated/v1/private_auction_service.list_private_auctions.js index d681bf2e6d95..0a07a29a7634 100644 --- a/packages/google-ads-admanager/samples/generated/v1/private_auction_service.list_private_auctions.js +++ b/packages/google-ads-admanager/samples/generated/v1/private_auction_service.list_private_auctions.js @@ -37,7 +37,7 @@ function main(parent) { * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/report_service.fetch_report_result_rows.js b/packages/google-ads-admanager/samples/generated/v1/report_service.fetch_report_result_rows.js index 02111a7020ac..86bc747dd8bb 100644 --- a/packages/google-ads-admanager/samples/generated/v1/report_service.fetch_report_result_rows.js +++ b/packages/google-ads-admanager/samples/generated/v1/report_service.fetch_report_result_rows.js @@ -37,7 +37,8 @@ function main() { /** * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/report_service.list_reports.js b/packages/google-ads-admanager/samples/generated/v1/report_service.list_reports.js index c50ff2536055..0ed93188d590 100644 --- a/packages/google-ads-admanager/samples/generated/v1/report_service.list_reports.js +++ b/packages/google-ads-admanager/samples/generated/v1/report_service.list_reports.js @@ -36,8 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/role_service.list_roles.js b/packages/google-ads-admanager/samples/generated/v1/role_service.list_roles.js index b9520d0b4b8c..3c79bdd953f7 100644 --- a/packages/google-ads-admanager/samples/generated/v1/role_service.list_roles.js +++ b/packages/google-ads-admanager/samples/generated/v1/role_service.list_roles.js @@ -36,7 +36,8 @@ function main(parent) { /** * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.batch_create_sites.js b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_create_sites.js new file mode 100644 index 000000000000..fdd5dc089c64 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_create_sites.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_SiteService_BatchCreateSites_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callBatchCreateSites() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchCreateSites(request); + console.log(response); + } + + callBatchCreateSites(); + // [END admanager_v1_generated_SiteService_BatchCreateSites_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.batch_deactivate_sites.js b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_deactivate_sites.js new file mode 100644 index 000000000000..77337b9d77c3 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_deactivate_sites.js @@ -0,0 +1,66 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_SiteService_BatchDeactivateSites_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `Site` objects to deactivate. + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callBatchDeactivateSites() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchDeactivateSites(request); + console.log(response); + } + + callBatchDeactivateSites(); + // [END admanager_v1_generated_SiteService_BatchDeactivateSites_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.batch_submit_sites_for_approval.js b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_submit_sites_for_approval.js new file mode 100644 index 000000000000..fd4a9229ce29 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_submit_sites_for_approval.js @@ -0,0 +1,66 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_SiteService_BatchSubmitSitesForApproval_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `Site` objects to submit for approval. + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callBatchSubmitSitesForApproval() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchSubmitSitesForApproval(request); + console.log(response); + } + + callBatchSubmitSitesForApproval(); + // [END admanager_v1_generated_SiteService_BatchSubmitSitesForApproval_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.batch_update_sites.js b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_update_sites.js new file mode 100644 index 000000000000..4db732a96ee2 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.batch_update_sites.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_SiteService_BatchUpdateSites_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callBatchUpdateSites() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchUpdateSites(request); + console.log(response); + } + + callBatchUpdateSites(); + // [END admanager_v1_generated_SiteService_BatchUpdateSites_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.create_site.js b/packages/google-ads-admanager/samples/generated/v1/site_service.create_site.js new file mode 100644 index 000000000000..2e5671d0a1a8 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.create_site.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, site) { + // [START admanager_v1_generated_SiteService_CreateSite_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The `Site` to create. + */ + // const site = {} + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callCreateSite() { + // Construct request + const request = { + parent, + site, + }; + + // Run request + const response = await admanagerClient.createSite(request); + console.log(response); + } + + callCreateSite(); + // [END admanager_v1_generated_SiteService_CreateSite_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.get_site.js b/packages/google-ads-admanager/samples/generated/v1/site_service.get_site.js new file mode 100644 index 000000000000..2afe744cc4cc --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.get_site.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_SiteService_GetSite_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 resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callGetSite() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getSite(request); + console.log(response); + } + + callGetSite(); + // [END admanager_v1_generated_SiteService_GetSite_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.list_sites.js b/packages/google-ads-admanager/samples/generated/v1/site_service.list_sites.js new file mode 100644 index 000000000000..3b83caa1677a --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.list_sites.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_SiteService_ListSites_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callListSites() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listSitesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSites(); + // [END admanager_v1_generated_SiteService_ListSites_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/site_service.update_site.js b/packages/google-ads-admanager/samples/generated/v1/site_service.update_site.js new file mode 100644 index 000000000000..658f56c64c9f --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/site_service.update_site.js @@ -0,0 +1,67 @@ +// Copyright 2025 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(site, updateMask) { + // [START admanager_v1_generated_SiteService_UpdateSite_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 `Site` to update. + * The `Site`'s `name` is used to identify the `Site` to update. + */ + // const site = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admanager library + const {SiteServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new SiteServiceClient(); + + async function callUpdateSite() { + // Construct request + const request = { + site, + updateMask, + }; + + // Run request + const response = await admanagerClient.updateSite(request); + console.log(response); + } + + callUpdateSite(); + // [END admanager_v1_generated_SiteService_UpdateSite_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json index 0bed64cf649d..e0033b9cf460 100644 --- a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json +++ b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json @@ -239,6 +239,162 @@ } } }, + { + "regionTag": "admanager_v1_generated_AdReviewCenterAdService_SearchAdReviewCenterAds_async", + "title": "AdBreakService searchAdReviewCenterAds Sample", + "origin": "API_DEFINITION", + "description": " API to search for AdReviewCenterAds.", + "canonical": true, + "file": "ad_review_center_ad_service.search_ad_review_center_ads.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 104, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.SearchAdReviewCenterAds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "status", + "type": ".google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus" + }, + { + "name": "ad_review_center_ad_id", + "type": "TYPE_STRING[]" + }, + { + "name": "date_time_range", + "type": ".google.type.Interval" + }, + { + "name": "search_text", + "type": "TYPE_STRING[]" + }, + { + "name": "buyer_account_id", + "type": "TYPE_INT64[]" + } + ], + "resultType": ".google.ads.admanager.v1.SearchAdReviewCenterAdsResponse", + "client": { + "shortName": "AdReviewCenterAdServiceClient", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdServiceClient" + }, + "method": { + "shortName": "SearchAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.SearchAdReviewCenterAds", + "service": { + "shortName": "AdReviewCenterAdService", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_async", + "title": "AdBreakService batchAllowAdReviewCenterAds Sample", + "origin": "API_DEFINITION", + "description": " API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.", + "canonical": true, + "file": "ad_review_center_ad_service.batch_allow_ad_review_center_ads.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAllowAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.BatchAllowAdReviewCenterAds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AdReviewCenterAdServiceClient", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdServiceClient" + }, + "method": { + "shortName": "BatchAllowAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.BatchAllowAdReviewCenterAds", + "service": { + "shortName": "AdReviewCenterAdService", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_async", + "title": "AdBreakService batchBlockAdReviewCenterAds Sample", + "origin": "API_DEFINITION", + "description": " API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.", + "canonical": true, + "file": "ad_review_center_ad_service.batch_block_ad_review_center_ads.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchBlockAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.BatchBlockAdReviewCenterAds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AdReviewCenterAdServiceClient", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdServiceClient" + }, + "method": { + "shortName": "BatchBlockAdReviewCenterAds", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService.BatchBlockAdReviewCenterAds", + "service": { + "shortName": "AdReviewCenterAdService", + "fullName": "google.ads.admanager.v1.AdReviewCenterAdService" + } + } + } + }, { "regionTag": "admanager_v1_generated_AdUnitService_GetAdUnit_async", "title": "AdBreakService getAdUnit Sample", @@ -400,12 +556,12 @@ } }, { - "regionTag": "admanager_v1_generated_BandwidthGroupService_GetBandwidthGroup_async", - "title": "AdBreakService getBandwidthGroup Sample", + "regionTag": "admanager_v1_generated_ApplicationService_GetApplication_async", + "title": "AdBreakService getApplication Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `BandwidthGroup` object.", + "description": " API to retrieve a `Application` object.", "canonical": true, - "file": "bandwidth_group_service.get_bandwidth_group.js", + "file": "application_service.get_application.js", "language": "JAVASCRIPT", "segments": [ { @@ -415,8 +571,8 @@ } ], "clientMethod": { - "shortName": "GetBandwidthGroup", - "fullName": "google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroup", + "shortName": "GetApplication", + "fullName": "google.ads.admanager.v1.ApplicationService.GetApplication", "async": true, "parameters": [ { @@ -424,28 +580,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.BandwidthGroup", + "resultType": ".google.ads.admanager.v1.Application", "client": { - "shortName": "BandwidthGroupServiceClient", - "fullName": "google.ads.admanager.v1.BandwidthGroupServiceClient" + "shortName": "ApplicationServiceClient", + "fullName": "google.ads.admanager.v1.ApplicationServiceClient" }, "method": { - "shortName": "GetBandwidthGroup", - "fullName": "google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroup", + "shortName": "GetApplication", + "fullName": "google.ads.admanager.v1.ApplicationService.GetApplication", "service": { - "shortName": "BandwidthGroupService", - "fullName": "google.ads.admanager.v1.BandwidthGroupService" + "shortName": "ApplicationService", + "fullName": "google.ads.admanager.v1.ApplicationService" } } } }, { - "regionTag": "admanager_v1_generated_BandwidthGroupService_ListBandwidthGroups_async", - "title": "AdBreakService listBandwidthGroups Sample", + "regionTag": "admanager_v1_generated_ApplicationService_ListApplications_async", + "title": "AdBreakService listApplications Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `BandwidthGroup` objects.", + "description": " API to retrieve a list of `Application` objects.", "canonical": true, - "file": "bandwidth_group_service.list_bandwidth_groups.js", + "file": "application_service.list_applications.js", "language": "JAVASCRIPT", "segments": [ { @@ -455,8 +611,8 @@ } ], "clientMethod": { - "shortName": "ListBandwidthGroups", - "fullName": "google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroups", + "shortName": "ListApplications", + "fullName": "google.ads.admanager.v1.ApplicationService.ListApplications", "async": true, "parameters": [ { @@ -484,28 +640,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListBandwidthGroupsResponse", + "resultType": ".google.ads.admanager.v1.ListApplicationsResponse", "client": { - "shortName": "BandwidthGroupServiceClient", - "fullName": "google.ads.admanager.v1.BandwidthGroupServiceClient" + "shortName": "ApplicationServiceClient", + "fullName": "google.ads.admanager.v1.ApplicationServiceClient" }, "method": { - "shortName": "ListBandwidthGroups", - "fullName": "google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroups", + "shortName": "ListApplications", + "fullName": "google.ads.admanager.v1.ApplicationService.ListApplications", "service": { - "shortName": "BandwidthGroupService", - "fullName": "google.ads.admanager.v1.BandwidthGroupService" + "shortName": "ApplicationService", + "fullName": "google.ads.admanager.v1.ApplicationService" } } } }, { - "regionTag": "admanager_v1_generated_CompanyService_GetCompany_async", - "title": "AdBreakService getCompany Sample", + "regionTag": "admanager_v1_generated_AudienceSegmentService_GetAudienceSegment_async", + "title": "AdBreakService getAudienceSegment Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `Company` object.", + "description": " API to retrieve an `AudienceSegment` object.", "canonical": true, - "file": "company_service.get_company.js", + "file": "audience_segment_service.get_audience_segment.js", "language": "JAVASCRIPT", "segments": [ { @@ -515,8 +671,8 @@ } ], "clientMethod": { - "shortName": "GetCompany", - "fullName": "google.ads.admanager.v1.CompanyService.GetCompany", + "shortName": "GetAudienceSegment", + "fullName": "google.ads.admanager.v1.AudienceSegmentService.GetAudienceSegment", "async": true, "parameters": [ { @@ -524,28 +680,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.Company", + "resultType": ".google.ads.admanager.v1.AudienceSegment", "client": { - "shortName": "CompanyServiceClient", - "fullName": "google.ads.admanager.v1.CompanyServiceClient" + "shortName": "AudienceSegmentServiceClient", + "fullName": "google.ads.admanager.v1.AudienceSegmentServiceClient" }, "method": { - "shortName": "GetCompany", - "fullName": "google.ads.admanager.v1.CompanyService.GetCompany", + "shortName": "GetAudienceSegment", + "fullName": "google.ads.admanager.v1.AudienceSegmentService.GetAudienceSegment", "service": { - "shortName": "CompanyService", - "fullName": "google.ads.admanager.v1.CompanyService" + "shortName": "AudienceSegmentService", + "fullName": "google.ads.admanager.v1.AudienceSegmentService" } } } }, { - "regionTag": "admanager_v1_generated_CompanyService_ListCompanies_async", - "title": "AdBreakService listCompanies Sample", + "regionTag": "admanager_v1_generated_AudienceSegmentService_ListAudienceSegments_async", + "title": "AdBreakService listAudienceSegments Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `Company` objects.", + "description": " API to retrieve a list of `AudienceSegment` objects.", "canonical": true, - "file": "company_service.list_companies.js", + "file": "audience_segment_service.list_audience_segments.js", "language": "JAVASCRIPT", "segments": [ { @@ -555,8 +711,8 @@ } ], "clientMethod": { - "shortName": "ListCompanies", - "fullName": "google.ads.admanager.v1.CompanyService.ListCompanies", + "shortName": "ListAudienceSegments", + "fullName": "google.ads.admanager.v1.AudienceSegmentService.ListAudienceSegments", "async": true, "parameters": [ { @@ -584,28 +740,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListCompaniesResponse", + "resultType": ".google.ads.admanager.v1.ListAudienceSegmentsResponse", "client": { - "shortName": "CompanyServiceClient", - "fullName": "google.ads.admanager.v1.CompanyServiceClient" + "shortName": "AudienceSegmentServiceClient", + "fullName": "google.ads.admanager.v1.AudienceSegmentServiceClient" }, "method": { - "shortName": "ListCompanies", - "fullName": "google.ads.admanager.v1.CompanyService.ListCompanies", + "shortName": "ListAudienceSegments", + "fullName": "google.ads.admanager.v1.AudienceSegmentService.ListAudienceSegments", "service": { - "shortName": "CompanyService", - "fullName": "google.ads.admanager.v1.CompanyService" + "shortName": "AudienceSegmentService", + "fullName": "google.ads.admanager.v1.AudienceSegmentService" } } } }, { - "regionTag": "admanager_v1_generated_CustomFieldService_GetCustomField_async", - "title": "AdBreakService getCustomField Sample", + "regionTag": "admanager_v1_generated_BandwidthGroupService_GetBandwidthGroup_async", + "title": "AdBreakService getBandwidthGroup Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `CustomField` object.", + "description": " API to retrieve a `BandwidthGroup` object.", "canonical": true, - "file": "custom_field_service.get_custom_field.js", + "file": "bandwidth_group_service.get_bandwidth_group.js", "language": "JAVASCRIPT", "segments": [ { @@ -615,8 +771,8 @@ } ], "clientMethod": { - "shortName": "GetCustomField", - "fullName": "google.ads.admanager.v1.CustomFieldService.GetCustomField", + "shortName": "GetBandwidthGroup", + "fullName": "google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroup", "async": true, "parameters": [ { @@ -624,28 +780,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.CustomField", + "resultType": ".google.ads.admanager.v1.BandwidthGroup", "client": { - "shortName": "CustomFieldServiceClient", - "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" + "shortName": "BandwidthGroupServiceClient", + "fullName": "google.ads.admanager.v1.BandwidthGroupServiceClient" }, "method": { - "shortName": "GetCustomField", - "fullName": "google.ads.admanager.v1.CustomFieldService.GetCustomField", + "shortName": "GetBandwidthGroup", + "fullName": "google.ads.admanager.v1.BandwidthGroupService.GetBandwidthGroup", "service": { - "shortName": "CustomFieldService", - "fullName": "google.ads.admanager.v1.CustomFieldService" + "shortName": "BandwidthGroupService", + "fullName": "google.ads.admanager.v1.BandwidthGroupService" } } } }, { - "regionTag": "admanager_v1_generated_CustomFieldService_ListCustomFields_async", - "title": "AdBreakService listCustomFields Sample", + "regionTag": "admanager_v1_generated_BandwidthGroupService_ListBandwidthGroups_async", + "title": "AdBreakService listBandwidthGroups Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `CustomField` objects.", + "description": " API to retrieve a list of `BandwidthGroup` objects.", "canonical": true, - "file": "custom_field_service.list_custom_fields.js", + "file": "bandwidth_group_service.list_bandwidth_groups.js", "language": "JAVASCRIPT", "segments": [ { @@ -655,8 +811,8 @@ } ], "clientMethod": { - "shortName": "ListCustomFields", - "fullName": "google.ads.admanager.v1.CustomFieldService.ListCustomFields", + "shortName": "ListBandwidthGroups", + "fullName": "google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroups", "async": true, "parameters": [ { @@ -684,39 +840,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListCustomFieldsResponse", + "resultType": ".google.ads.admanager.v1.ListBandwidthGroupsResponse", "client": { - "shortName": "CustomFieldServiceClient", - "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" + "shortName": "BandwidthGroupServiceClient", + "fullName": "google.ads.admanager.v1.BandwidthGroupServiceClient" }, "method": { - "shortName": "ListCustomFields", - "fullName": "google.ads.admanager.v1.CustomFieldService.ListCustomFields", + "shortName": "ListBandwidthGroups", + "fullName": "google.ads.admanager.v1.BandwidthGroupService.ListBandwidthGroups", "service": { - "shortName": "CustomFieldService", - "fullName": "google.ads.admanager.v1.CustomFieldService" + "shortName": "BandwidthGroupService", + "fullName": "google.ads.admanager.v1.BandwidthGroupService" } } } }, { - "regionTag": "admanager_v1_generated_CustomTargetingKeyService_GetCustomTargetingKey_async", - "title": "AdBreakService getCustomTargetingKey Sample", + "regionTag": "admanager_v1_generated_BrowserLanguageService_GetBrowserLanguage_async", + "title": "AdBreakService getBrowserLanguage Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `CustomTargetingKey` object.", + "description": " API to retrieve a `BrowserLanguage` object.", "canonical": true, - "file": "custom_targeting_key_service.get_custom_targeting_key.js", + "file": "browser_language_service.get_browser_language.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "GetCustomTargetingKey", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKey", + "shortName": "GetBrowserLanguage", + "fullName": "google.ads.admanager.v1.BrowserLanguageService.GetBrowserLanguage", "async": true, "parameters": [ { @@ -724,28 +880,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.CustomTargetingKey", + "resultType": ".google.ads.admanager.v1.BrowserLanguage", "client": { - "shortName": "CustomTargetingKeyServiceClient", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyServiceClient" + "shortName": "BrowserLanguageServiceClient", + "fullName": "google.ads.admanager.v1.BrowserLanguageServiceClient" }, "method": { - "shortName": "GetCustomTargetingKey", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKey", + "shortName": "GetBrowserLanguage", + "fullName": "google.ads.admanager.v1.BrowserLanguageService.GetBrowserLanguage", "service": { - "shortName": "CustomTargetingKeyService", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService" + "shortName": "BrowserLanguageService", + "fullName": "google.ads.admanager.v1.BrowserLanguageService" } } } }, { - "regionTag": "admanager_v1_generated_CustomTargetingKeyService_ListCustomTargetingKeys_async", - "title": "AdBreakService listCustomTargetingKeys Sample", + "regionTag": "admanager_v1_generated_BrowserLanguageService_ListBrowserLanguages_async", + "title": "AdBreakService listBrowserLanguages Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `CustomTargetingKey` objects.", + "description": " API to retrieve a list of `BrowserLanguage` objects.", "canonical": true, - "file": "custom_targeting_key_service.list_custom_targeting_keys.js", + "file": "browser_language_service.list_browser_languages.js", "language": "JAVASCRIPT", "segments": [ { @@ -755,8 +911,8 @@ } ], "clientMethod": { - "shortName": "ListCustomTargetingKeys", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeys", + "shortName": "ListBrowserLanguages", + "fullName": "google.ads.admanager.v1.BrowserLanguageService.ListBrowserLanguages", "async": true, "parameters": [ { @@ -784,39 +940,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListCustomTargetingKeysResponse", + "resultType": ".google.ads.admanager.v1.ListBrowserLanguagesResponse", "client": { - "shortName": "CustomTargetingKeyServiceClient", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyServiceClient" + "shortName": "BrowserLanguageServiceClient", + "fullName": "google.ads.admanager.v1.BrowserLanguageServiceClient" }, "method": { - "shortName": "ListCustomTargetingKeys", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeys", + "shortName": "ListBrowserLanguages", + "fullName": "google.ads.admanager.v1.BrowserLanguageService.ListBrowserLanguages", "service": { - "shortName": "CustomTargetingKeyService", - "fullName": "google.ads.admanager.v1.CustomTargetingKeyService" + "shortName": "BrowserLanguageService", + "fullName": "google.ads.admanager.v1.BrowserLanguageService" } } } }, { - "regionTag": "admanager_v1_generated_CustomTargetingValueService_GetCustomTargetingValue_async", - "title": "AdBreakService getCustomTargetingValue Sample", + "regionTag": "admanager_v1_generated_BrowserService_GetBrowser_async", + "title": "AdBreakService getBrowser Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `CustomTargetingValue` object.", + "description": " API to retrieve a `Browser` object.", "canonical": true, - "file": "custom_targeting_value_service.get_custom_targeting_value.js", + "file": "browser_service.get_browser.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "GetCustomTargetingValue", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValue", + "shortName": "GetBrowser", + "fullName": "google.ads.admanager.v1.BrowserService.GetBrowser", "async": true, "parameters": [ { @@ -824,39 +980,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.CustomTargetingValue", + "resultType": ".google.ads.admanager.v1.Browser", "client": { - "shortName": "CustomTargetingValueServiceClient", - "fullName": "google.ads.admanager.v1.CustomTargetingValueServiceClient" + "shortName": "BrowserServiceClient", + "fullName": "google.ads.admanager.v1.BrowserServiceClient" }, "method": { - "shortName": "GetCustomTargetingValue", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValue", + "shortName": "GetBrowser", + "fullName": "google.ads.admanager.v1.BrowserService.GetBrowser", "service": { - "shortName": "CustomTargetingValueService", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService" + "shortName": "BrowserService", + "fullName": "google.ads.admanager.v1.BrowserService" } } } }, { - "regionTag": "admanager_v1_generated_CustomTargetingValueService_ListCustomTargetingValues_async", - "title": "AdBreakService listCustomTargetingValues Sample", + "regionTag": "admanager_v1_generated_BrowserService_ListBrowsers_async", + "title": "AdBreakService listBrowsers Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `CustomTargetingValue` objects.", + "description": " API to retrieve a list of `Browser` objects.", "canonical": true, - "file": "custom_targeting_value_service.list_custom_targeting_values.js", + "file": "browser_service.list_browsers.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 89, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "ListCustomTargetingValues", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValues", + "shortName": "ListBrowsers", + "fullName": "google.ads.admanager.v1.BrowserService.ListBrowsers", "async": true, "parameters": [ { @@ -884,28 +1040,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListCustomTargetingValuesResponse", + "resultType": ".google.ads.admanager.v1.ListBrowsersResponse", "client": { - "shortName": "CustomTargetingValueServiceClient", - "fullName": "google.ads.admanager.v1.CustomTargetingValueServiceClient" + "shortName": "BrowserServiceClient", + "fullName": "google.ads.admanager.v1.BrowserServiceClient" }, "method": { - "shortName": "ListCustomTargetingValues", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValues", + "shortName": "ListBrowsers", + "fullName": "google.ads.admanager.v1.BrowserService.ListBrowsers", "service": { - "shortName": "CustomTargetingValueService", - "fullName": "google.ads.admanager.v1.CustomTargetingValueService" + "shortName": "BrowserService", + "fullName": "google.ads.admanager.v1.BrowserService" } } } }, { - "regionTag": "admanager_v1_generated_DeviceCategoryService_GetDeviceCategory_async", - "title": "AdBreakService getDeviceCategory Sample", + "regionTag": "admanager_v1_generated_CmsMetadataKeyService_GetCmsMetadataKey_async", + "title": "AdBreakService getCmsMetadataKey Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `DeviceCategory` object.", + "description": " API to retrieve a `CmsMetadataKey` object.", "canonical": true, - "file": "device_category_service.get_device_category.js", + "file": "cms_metadata_key_service.get_cms_metadata_key.js", "language": "JAVASCRIPT", "segments": [ { @@ -915,8 +1071,8 @@ } ], "clientMethod": { - "shortName": "GetDeviceCategory", - "fullName": "google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategory", + "shortName": "GetCmsMetadataKey", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService.GetCmsMetadataKey", "async": true, "parameters": [ { @@ -924,28 +1080,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.DeviceCategory", + "resultType": ".google.ads.admanager.v1.CmsMetadataKey", "client": { - "shortName": "DeviceCategoryServiceClient", - "fullName": "google.ads.admanager.v1.DeviceCategoryServiceClient" + "shortName": "CmsMetadataKeyServiceClient", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyServiceClient" }, "method": { - "shortName": "GetDeviceCategory", - "fullName": "google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategory", + "shortName": "GetCmsMetadataKey", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService.GetCmsMetadataKey", "service": { - "shortName": "DeviceCategoryService", - "fullName": "google.ads.admanager.v1.DeviceCategoryService" + "shortName": "CmsMetadataKeyService", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService" } } } }, { - "regionTag": "admanager_v1_generated_DeviceCategoryService_ListDeviceCategories_async", - "title": "AdBreakService listDeviceCategories Sample", + "regionTag": "admanager_v1_generated_CmsMetadataKeyService_ListCmsMetadataKeys_async", + "title": "AdBreakService listCmsMetadataKeys Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `DeviceCategory` objects.", + "description": " API to retrieve a list of `CmsMetadataKey` objects.", "canonical": true, - "file": "device_category_service.list_device_categories.js", + "file": "cms_metadata_key_service.list_cms_metadata_keys.js", "language": "JAVASCRIPT", "segments": [ { @@ -955,8 +1111,8 @@ } ], "clientMethod": { - "shortName": "ListDeviceCategories", - "fullName": "google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategories", + "shortName": "ListCmsMetadataKeys", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService.ListCmsMetadataKeys", "async": true, "parameters": [ { @@ -984,39 +1140,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListDeviceCategoriesResponse", + "resultType": ".google.ads.admanager.v1.ListCmsMetadataKeysResponse", "client": { - "shortName": "DeviceCategoryServiceClient", - "fullName": "google.ads.admanager.v1.DeviceCategoryServiceClient" + "shortName": "CmsMetadataKeyServiceClient", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyServiceClient" }, "method": { - "shortName": "ListDeviceCategories", - "fullName": "google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategories", + "shortName": "ListCmsMetadataKeys", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService.ListCmsMetadataKeys", "service": { - "shortName": "DeviceCategoryService", - "fullName": "google.ads.admanager.v1.DeviceCategoryService" + "shortName": "CmsMetadataKeyService", + "fullName": "google.ads.admanager.v1.CmsMetadataKeyService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_GetEntitySignalsMapping_async", - "title": "AdBreakService getEntitySignalsMapping Sample", + "regionTag": "admanager_v1_generated_CmsMetadataValueService_GetCmsMetadataValue_async", + "title": "AdBreakService getCmsMetadataValue Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `EntitySignalsMapping` object.", + "description": " API to retrieve a `CmsMetadataKey` object.", "canonical": true, - "file": "entity_signals_mapping_service.get_entity_signals_mapping.js", + "file": "cms_metadata_value_service.get_cms_metadata_value.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "GetEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMapping", + "shortName": "GetCmsMetadataValue", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService.GetCmsMetadataValue", "async": true, "parameters": [ { @@ -1024,39 +1180,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", + "resultType": ".google.ads.admanager.v1.CmsMetadataValue", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "CmsMetadataValueServiceClient", + "fullName": "google.ads.admanager.v1.CmsMetadataValueServiceClient" }, "method": { - "shortName": "GetEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMapping", + "shortName": "GetCmsMetadataValue", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService.GetCmsMetadataValue", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "CmsMetadataValueService", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_ListEntitySignalsMappings_async", - "title": "AdBreakService listEntitySignalsMappings Sample", + "regionTag": "admanager_v1_generated_CmsMetadataValueService_ListCmsMetadataValues_async", + "title": "AdBreakService listCmsMetadataValues Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `EntitySignalsMapping` objects.", + "description": " API to retrieve a list of `CmsMetadataValue` objects.", "canonical": true, - "file": "entity_signals_mapping_service.list_entity_signals_mappings.js", + "file": "cms_metadata_value_service.list_cms_metadata_values.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 88, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "ListEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappings", + "shortName": "ListCmsMetadataValues", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService.ListCmsMetadataValues", "async": true, "parameters": [ { @@ -1084,171 +1240,179 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListEntitySignalsMappingsResponse", + "resultType": ".google.ads.admanager.v1.ListCmsMetadataValuesResponse", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "CmsMetadataValueServiceClient", + "fullName": "google.ads.admanager.v1.CmsMetadataValueServiceClient" }, "method": { - "shortName": "ListEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappings", + "shortName": "ListCmsMetadataValues", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService.ListCmsMetadataValues", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "CmsMetadataValueService", + "fullName": "google.ads.admanager.v1.CmsMetadataValueService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_CreateEntitySignalsMapping_async", - "title": "AdBreakService createEntitySignalsMapping Sample", + "regionTag": "admanager_v1_generated_CompanyService_GetCompany_async", + "title": "AdBreakService getCompany Sample", "origin": "API_DEFINITION", - "description": " API to create an `EntitySignalsMapping` object.", + "description": " API to retrieve a `Company` object.", "canonical": true, - "file": "entity_signals_mapping_service.create_entity_signals_mapping.js", + "file": "company_service.get_company.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "CreateEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMapping", + "shortName": "GetCompany", + "fullName": "google.ads.admanager.v1.CompanyService.GetCompany", "async": true, "parameters": [ { - "name": "parent", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "entity_signals_mapping", - "type": ".google.ads.admanager.v1.EntitySignalsMapping" } ], - "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", + "resultType": ".google.ads.admanager.v1.Company", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "CompanyServiceClient", + "fullName": "google.ads.admanager.v1.CompanyServiceClient" }, "method": { - "shortName": "CreateEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMapping", + "shortName": "GetCompany", + "fullName": "google.ads.admanager.v1.CompanyService.GetCompany", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "CompanyService", + "fullName": "google.ads.admanager.v1.CompanyService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_UpdateEntitySignalsMapping_async", - "title": "AdBreakService updateEntitySignalsMapping Sample", + "regionTag": "admanager_v1_generated_CompanyService_ListCompanies_async", + "title": "AdBreakService listCompanies Sample", "origin": "API_DEFINITION", - "description": " API to update an `EntitySignalsMapping` object.", + "description": " API to retrieve a list of `Company` objects.", "canonical": true, - "file": "entity_signals_mapping_service.update_entity_signals_mapping.js", + "file": "company_service.list_companies.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 62, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdateEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMapping", + "shortName": "ListCompanies", + "fullName": "google.ads.admanager.v1.CompanyService.ListCompanies", "async": true, "parameters": [ { - "name": "entity_signals_mapping", - "type": ".google.ads.admanager.v1.EntitySignalsMapping" + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "skip", + "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", + "resultType": ".google.ads.admanager.v1.ListCompaniesResponse", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "CompanyServiceClient", + "fullName": "google.ads.admanager.v1.CompanyServiceClient" }, "method": { - "shortName": "UpdateEntitySignalsMapping", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMapping", + "shortName": "ListCompanies", + "fullName": "google.ads.admanager.v1.CompanyService.ListCompanies", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "CompanyService", + "fullName": "google.ads.admanager.v1.CompanyService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_BatchCreateEntitySignalsMappings_async", - "title": "AdBreakService batchCreateEntitySignalsMappings Sample", + "regionTag": "admanager_v1_generated_ContactService_GetContact_async", + "title": "AdBreakService getContact Sample", "origin": "API_DEFINITION", - "description": " API to batch create `EntitySignalsMapping` objects.", + "description": " API to retrieve a `Contact` object.", "canonical": true, - "file": "entity_signals_mapping_service.batch_create_entity_signals_mappings.js", + "file": "contact_service.get_contact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "BatchCreateEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappings", + "shortName": "GetContact", + "fullName": "google.ads.admanager.v1.ContactService.GetContact", "async": true, "parameters": [ { - "name": "parent", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" } ], - "resultType": ".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse", + "resultType": ".google.ads.admanager.v1.Contact", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "BatchCreateEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappings", + "shortName": "GetContact", + "fullName": "google.ads.admanager.v1.ContactService.GetContact", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_EntitySignalsMappingService_BatchUpdateEntitySignalsMappings_async", - "title": "AdBreakService batchUpdateEntitySignalsMappings Sample", + "regionTag": "admanager_v1_generated_ContactService_ListContacts_async", + "title": "AdBreakService listContacts Sample", "origin": "API_DEFINITION", - "description": " API to batch update `EntitySignalsMapping` objects.", + "description": " API to retrieve a list of `Contact` objects.", "canonical": true, - "file": "entity_signals_mapping_service.batch_update_entity_signals_mappings.js", + "file": "contact_service.list_contacts.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "BatchUpdateEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappings", + "shortName": "ListContacts", + "fullName": "google.ads.admanager.v1.ContactService.ListContacts", "async": true, "parameters": [ { @@ -1256,83 +1420,103 @@ "type": "TYPE_STRING" }, { - "name": "requests", - "type": "TYPE_MESSAGE[]" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "skip", + "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse", + "resultType": ".google.ads.admanager.v1.ListContactsResponse", "client": { - "shortName": "EntitySignalsMappingServiceClient", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "BatchUpdateEntitySignalsMappings", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappings", + "shortName": "ListContacts", + "fullName": "google.ads.admanager.v1.ContactService.ListContacts", "service": { - "shortName": "EntitySignalsMappingService", - "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_GeoTargetService_GetGeoTarget_async", - "title": "AdBreakService getGeoTarget Sample", + "regionTag": "admanager_v1_generated_ContactService_CreateContact_async", + "title": "AdBreakService createContact Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `GeoTarget` object.", + "description": " API to create a `Contact` object.", "canonical": true, - "file": "geo_target_service.get_geo_target.js", + "file": "contact_service.create_contact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 54, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "GetGeoTarget", - "fullName": "google.ads.admanager.v1.GeoTargetService.GetGeoTarget", + "shortName": "CreateContact", + "fullName": "google.ads.admanager.v1.ContactService.CreateContact", "async": true, "parameters": [ { - "name": "name", + "name": "parent", "type": "TYPE_STRING" + }, + { + "name": "contact", + "type": ".google.ads.admanager.v1.Contact" } ], - "resultType": ".google.ads.admanager.v1.GeoTarget", + "resultType": ".google.ads.admanager.v1.Contact", "client": { - "shortName": "GeoTargetServiceClient", - "fullName": "google.ads.admanager.v1.GeoTargetServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "GetGeoTarget", - "fullName": "google.ads.admanager.v1.GeoTargetService.GetGeoTarget", + "shortName": "CreateContact", + "fullName": "google.ads.admanager.v1.ContactService.CreateContact", "service": { - "shortName": "GeoTargetService", - "fullName": "google.ads.admanager.v1.GeoTargetService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_GeoTargetService_ListGeoTargets_async", - "title": "AdBreakService listGeoTargets Sample", + "regionTag": "admanager_v1_generated_ContactService_BatchCreateContacts_async", + "title": "AdBreakService batchCreateContacts Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `GeoTarget` objects.", + "description": " API to batch create `Contact` objects.", "canonical": true, - "file": "geo_target_service.list_geo_targets.js", + "file": "contact_service.batch_create_contacts.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 86, + "end": 62, "type": "FULL" } ], "clientMethod": { - "shortName": "ListGeoTargets", - "fullName": "google.ads.admanager.v1.GeoTargetService.ListGeoTargets", + "shortName": "BatchCreateContacts", + "fullName": "google.ads.admanager.v1.ContactService.BatchCreateContacts", "async": true, "parameters": [ { @@ -1340,123 +1524,120 @@ "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" - }, - { - "name": "skip", - "type": "TYPE_INT32" + "name": "requests", + "type": "TYPE_MESSAGE[]" } ], - "resultType": ".google.ads.admanager.v1.ListGeoTargetsResponse", + "resultType": ".google.ads.admanager.v1.BatchCreateContactsResponse", "client": { - "shortName": "GeoTargetServiceClient", - "fullName": "google.ads.admanager.v1.GeoTargetServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "ListGeoTargets", - "fullName": "google.ads.admanager.v1.GeoTargetService.ListGeoTargets", + "shortName": "BatchCreateContacts", + "fullName": "google.ads.admanager.v1.ContactService.BatchCreateContacts", "service": { - "shortName": "GeoTargetService", - "fullName": "google.ads.admanager.v1.GeoTargetService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_NetworkService_GetNetwork_async", - "title": "AdBreakService getNetwork Sample", + "regionTag": "admanager_v1_generated_ContactService_UpdateContact_async", + "title": "AdBreakService updateContact Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a Network object.", + "description": " API to update a `Contact` object.", "canonical": true, - "file": "network_service.get_network.js", + "file": "contact_service.update_contact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 54, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "GetNetwork", - "fullName": "google.ads.admanager.v1.NetworkService.GetNetwork", + "shortName": "UpdateContact", + "fullName": "google.ads.admanager.v1.ContactService.UpdateContact", "async": true, "parameters": [ { - "name": "name", - "type": "TYPE_STRING" + "name": "contact", + "type": ".google.ads.admanager.v1.Contact" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.ads.admanager.v1.Network", + "resultType": ".google.ads.admanager.v1.Contact", "client": { - "shortName": "NetworkServiceClient", - "fullName": "google.ads.admanager.v1.NetworkServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "GetNetwork", - "fullName": "google.ads.admanager.v1.NetworkService.GetNetwork", + "shortName": "UpdateContact", + "fullName": "google.ads.admanager.v1.ContactService.UpdateContact", "service": { - "shortName": "NetworkService", - "fullName": "google.ads.admanager.v1.NetworkService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_NetworkService_ListNetworks_async", - "title": "AdBreakService listNetworks Sample", + "regionTag": "admanager_v1_generated_ContactService_BatchUpdateContacts_async", + "title": "AdBreakService batchUpdateContacts Sample", "origin": "API_DEFINITION", - "description": " API to retrieve all the networks the current user has access to.", + "description": " API to batch update `Contact` objects.", "canonical": true, - "file": "network_service.list_networks.js", + "file": "contact_service.batch_update_contacts.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 48, + "end": 62, "type": "FULL" } ], "clientMethod": { - "shortName": "ListNetworks", - "fullName": "google.ads.admanager.v1.NetworkService.ListNetworks", + "shortName": "BatchUpdateContacts", + "fullName": "google.ads.admanager.v1.ContactService.BatchUpdateContacts", "async": true, - "parameters": [], - "resultType": ".google.ads.admanager.v1.ListNetworksResponse", + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchUpdateContactsResponse", "client": { - "shortName": "NetworkServiceClient", - "fullName": "google.ads.admanager.v1.NetworkServiceClient" + "shortName": "ContactServiceClient", + "fullName": "google.ads.admanager.v1.ContactServiceClient" }, "method": { - "shortName": "ListNetworks", - "fullName": "google.ads.admanager.v1.NetworkService.ListNetworks", + "shortName": "BatchUpdateContacts", + "fullName": "google.ads.admanager.v1.ContactService.BatchUpdateContacts", "service": { - "shortName": "NetworkService", - "fullName": "google.ads.admanager.v1.NetworkService" + "shortName": "ContactService", + "fullName": "google.ads.admanager.v1.ContactService" } } } }, { - "regionTag": "admanager_v1_generated_OperatingSystemService_GetOperatingSystem_async", - "title": "AdBreakService getOperatingSystem Sample", + "regionTag": "admanager_v1_generated_ContentBundleService_GetContentBundle_async", + "title": "AdBreakService getContentBundle Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `OperatingSystem` object.", + "description": " API to retrieve a `ContentBundle` object.", "canonical": true, - "file": "operating_system_service.get_operating_system.js", + "file": "content_bundle_service.get_content_bundle.js", "language": "JAVASCRIPT", "segments": [ { @@ -1466,8 +1647,8 @@ } ], "clientMethod": { - "shortName": "GetOperatingSystem", - "fullName": "google.ads.admanager.v1.OperatingSystemService.GetOperatingSystem", + "shortName": "GetContentBundle", + "fullName": "google.ads.admanager.v1.ContentBundleService.GetContentBundle", "async": true, "parameters": [ { @@ -1475,28 +1656,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.OperatingSystem", + "resultType": ".google.ads.admanager.v1.ContentBundle", "client": { - "shortName": "OperatingSystemServiceClient", - "fullName": "google.ads.admanager.v1.OperatingSystemServiceClient" + "shortName": "ContentBundleServiceClient", + "fullName": "google.ads.admanager.v1.ContentBundleServiceClient" }, "method": { - "shortName": "GetOperatingSystem", - "fullName": "google.ads.admanager.v1.OperatingSystemService.GetOperatingSystem", + "shortName": "GetContentBundle", + "fullName": "google.ads.admanager.v1.ContentBundleService.GetContentBundle", "service": { - "shortName": "OperatingSystemService", - "fullName": "google.ads.admanager.v1.OperatingSystemService" + "shortName": "ContentBundleService", + "fullName": "google.ads.admanager.v1.ContentBundleService" } } } }, { - "regionTag": "admanager_v1_generated_OperatingSystemService_ListOperatingSystems_async", - "title": "AdBreakService listOperatingSystems Sample", + "regionTag": "admanager_v1_generated_ContentBundleService_ListContentBundles_async", + "title": "AdBreakService listContentBundles Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `OperatingSystem` objects.", + "description": " API to retrieve a list of `ContentBundle` objects.", "canonical": true, - "file": "operating_system_service.list_operating_systems.js", + "file": "content_bundle_service.list_content_bundles.js", "language": "JAVASCRIPT", "segments": [ { @@ -1506,8 +1687,8 @@ } ], "clientMethod": { - "shortName": "ListOperatingSystems", - "fullName": "google.ads.admanager.v1.OperatingSystemService.ListOperatingSystems", + "shortName": "ListContentBundles", + "fullName": "google.ads.admanager.v1.ContentBundleService.ListContentBundles", "async": true, "parameters": [ { @@ -1535,39 +1716,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListOperatingSystemsResponse", + "resultType": ".google.ads.admanager.v1.ListContentBundlesResponse", "client": { - "shortName": "OperatingSystemServiceClient", - "fullName": "google.ads.admanager.v1.OperatingSystemServiceClient" + "shortName": "ContentBundleServiceClient", + "fullName": "google.ads.admanager.v1.ContentBundleServiceClient" }, "method": { - "shortName": "ListOperatingSystems", - "fullName": "google.ads.admanager.v1.OperatingSystemService.ListOperatingSystems", + "shortName": "ListContentBundles", + "fullName": "google.ads.admanager.v1.ContentBundleService.ListContentBundles", "service": { - "shortName": "OperatingSystemService", - "fullName": "google.ads.admanager.v1.OperatingSystemService" + "shortName": "ContentBundleService", + "fullName": "google.ads.admanager.v1.ContentBundleService" } } } }, { - "regionTag": "admanager_v1_generated_OperatingSystemVersionService_GetOperatingSystemVersion_async", - "title": "AdBreakService getOperatingSystemVersion Sample", + "regionTag": "admanager_v1_generated_ContentLabelService_GetContentLabel_async", + "title": "AdBreakService getContentLabel Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `OperatingSystemVersion` object.", + "description": " API to retrieve a `ContentLabel` object.", "canonical": true, - "file": "operating_system_version_service.get_operating_system_version.js", + "file": "content_label_service.get_content_label.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "GetOperatingSystemVersion", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersion", + "shortName": "GetContentLabel", + "fullName": "google.ads.admanager.v1.ContentLabelService.GetContentLabel", "async": true, "parameters": [ { @@ -1575,39 +1756,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.OperatingSystemVersion", + "resultType": ".google.ads.admanager.v1.ContentLabel", "client": { - "shortName": "OperatingSystemVersionServiceClient", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionServiceClient" + "shortName": "ContentLabelServiceClient", + "fullName": "google.ads.admanager.v1.ContentLabelServiceClient" }, "method": { - "shortName": "GetOperatingSystemVersion", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersion", + "shortName": "GetContentLabel", + "fullName": "google.ads.admanager.v1.ContentLabelService.GetContentLabel", "service": { - "shortName": "OperatingSystemVersionService", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService" + "shortName": "ContentLabelService", + "fullName": "google.ads.admanager.v1.ContentLabelService" } } } }, { - "regionTag": "admanager_v1_generated_OperatingSystemVersionService_ListOperatingSystemVersions_async", - "title": "AdBreakService listOperatingSystemVersions Sample", + "regionTag": "admanager_v1_generated_ContentLabelService_ListContentLabels_async", + "title": "AdBreakService listContentLabels Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `OperatingSystemVersion` objects.", + "description": " API to retrieve a list of `ContentLabel` objects.", "canonical": true, - "file": "operating_system_version_service.list_operating_system_versions.js", + "file": "content_label_service.list_content_labels.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 88, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "ListOperatingSystemVersions", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersions", + "shortName": "ListContentLabels", + "fullName": "google.ads.admanager.v1.ContentLabelService.ListContentLabels", "async": true, "parameters": [ { @@ -1635,28 +1816,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListOperatingSystemVersionsResponse", + "resultType": ".google.ads.admanager.v1.ListContentLabelsResponse", "client": { - "shortName": "OperatingSystemVersionServiceClient", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionServiceClient" + "shortName": "ContentLabelServiceClient", + "fullName": "google.ads.admanager.v1.ContentLabelServiceClient" }, "method": { - "shortName": "ListOperatingSystemVersions", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersions", + "shortName": "ListContentLabels", + "fullName": "google.ads.admanager.v1.ContentLabelService.ListContentLabels", "service": { - "shortName": "OperatingSystemVersionService", - "fullName": "google.ads.admanager.v1.OperatingSystemVersionService" + "shortName": "ContentLabelService", + "fullName": "google.ads.admanager.v1.ContentLabelService" } } } }, { - "regionTag": "admanager_v1_generated_OrderService_GetOrder_async", - "title": "AdBreakService getOrder Sample", + "regionTag": "admanager_v1_generated_ContentService_GetContent_async", + "title": "AdBreakService getContent Sample", "origin": "API_DEFINITION", - "description": " API to retrieve an Order object.", + "description": " API to retrieve a `Content` object.", "canonical": true, - "file": "order_service.get_order.js", + "file": "content_service.get_content.js", "language": "JAVASCRIPT", "segments": [ { @@ -1666,8 +1847,8 @@ } ], "clientMethod": { - "shortName": "GetOrder", - "fullName": "google.ads.admanager.v1.OrderService.GetOrder", + "shortName": "GetContent", + "fullName": "google.ads.admanager.v1.ContentService.GetContent", "async": true, "parameters": [ { @@ -1675,28 +1856,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.Order", + "resultType": ".google.ads.admanager.v1.Content", "client": { - "shortName": "OrderServiceClient", - "fullName": "google.ads.admanager.v1.OrderServiceClient" + "shortName": "ContentServiceClient", + "fullName": "google.ads.admanager.v1.ContentServiceClient" }, "method": { - "shortName": "GetOrder", - "fullName": "google.ads.admanager.v1.OrderService.GetOrder", + "shortName": "GetContent", + "fullName": "google.ads.admanager.v1.ContentService.GetContent", "service": { - "shortName": "OrderService", - "fullName": "google.ads.admanager.v1.OrderService" + "shortName": "ContentService", + "fullName": "google.ads.admanager.v1.ContentService" } } } }, { - "regionTag": "admanager_v1_generated_OrderService_ListOrders_async", - "title": "AdBreakService listOrders Sample", + "regionTag": "admanager_v1_generated_ContentService_ListContent_async", + "title": "AdBreakService listContent Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `Order` objects. Fields used for literal matching in filter string: * `order_id` * `display_name` * `external_order_id`", + "description": " API to retrieve a list of `Content` objects.", "canonical": true, - "file": "order_service.list_orders.js", + "file": "content_service.list_content.js", "language": "JAVASCRIPT", "segments": [ { @@ -1706,8 +1887,8 @@ } ], "clientMethod": { - "shortName": "ListOrders", - "fullName": "google.ads.admanager.v1.OrderService.ListOrders", + "shortName": "ListContent", + "fullName": "google.ads.admanager.v1.ContentService.ListContent", "async": true, "parameters": [ { @@ -1735,28 +1916,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListOrdersResponse", + "resultType": ".google.ads.admanager.v1.ListContentResponse", "client": { - "shortName": "OrderServiceClient", - "fullName": "google.ads.admanager.v1.OrderServiceClient" + "shortName": "ContentServiceClient", + "fullName": "google.ads.admanager.v1.ContentServiceClient" }, "method": { - "shortName": "ListOrders", - "fullName": "google.ads.admanager.v1.OrderService.ListOrders", + "shortName": "ListContent", + "fullName": "google.ads.admanager.v1.ContentService.ListContent", "service": { - "shortName": "OrderService", - "fullName": "google.ads.admanager.v1.OrderService" + "shortName": "ContentService", + "fullName": "google.ads.admanager.v1.ContentService" } } } }, { - "regionTag": "admanager_v1_generated_PlacementService_GetPlacement_async", - "title": "AdBreakService getPlacement Sample", + "regionTag": "admanager_v1_generated_CreativeTemplateService_GetCreativeTemplate_async", + "title": "AdBreakService getCreativeTemplate Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `Placement` object.", + "description": " API to retrieve a `CreativeTemplate` object.", "canonical": true, - "file": "placement_service.get_placement.js", + "file": "creative_template_service.get_creative_template.js", "language": "JAVASCRIPT", "segments": [ { @@ -1766,8 +1947,8 @@ } ], "clientMethod": { - "shortName": "GetPlacement", - "fullName": "google.ads.admanager.v1.PlacementService.GetPlacement", + "shortName": "GetCreativeTemplate", + "fullName": "google.ads.admanager.v1.CreativeTemplateService.GetCreativeTemplate", "async": true, "parameters": [ { @@ -1775,28 +1956,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.Placement", + "resultType": ".google.ads.admanager.v1.CreativeTemplate", "client": { - "shortName": "PlacementServiceClient", - "fullName": "google.ads.admanager.v1.PlacementServiceClient" + "shortName": "CreativeTemplateServiceClient", + "fullName": "google.ads.admanager.v1.CreativeTemplateServiceClient" }, "method": { - "shortName": "GetPlacement", - "fullName": "google.ads.admanager.v1.PlacementService.GetPlacement", + "shortName": "GetCreativeTemplate", + "fullName": "google.ads.admanager.v1.CreativeTemplateService.GetCreativeTemplate", "service": { - "shortName": "PlacementService", - "fullName": "google.ads.admanager.v1.PlacementService" + "shortName": "CreativeTemplateService", + "fullName": "google.ads.admanager.v1.CreativeTemplateService" } } } }, { - "regionTag": "admanager_v1_generated_PlacementService_ListPlacements_async", - "title": "AdBreakService listPlacements Sample", + "regionTag": "admanager_v1_generated_CreativeTemplateService_ListCreativeTemplates_async", + "title": "AdBreakService listCreativeTemplates Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `Placement` objects.", + "description": " API to retrieve a list of `CreativeTemplate` objects.", "canonical": true, - "file": "placement_service.list_placements.js", + "file": "creative_template_service.list_creative_templates.js", "language": "JAVASCRIPT", "segments": [ { @@ -1806,8 +1987,8 @@ } ], "clientMethod": { - "shortName": "ListPlacements", - "fullName": "google.ads.admanager.v1.PlacementService.ListPlacements", + "shortName": "ListCreativeTemplates", + "fullName": "google.ads.admanager.v1.CreativeTemplateService.ListCreativeTemplates", "async": true, "parameters": [ { @@ -1835,39 +2016,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListPlacementsResponse", + "resultType": ".google.ads.admanager.v1.ListCreativeTemplatesResponse", "client": { - "shortName": "PlacementServiceClient", - "fullName": "google.ads.admanager.v1.PlacementServiceClient" + "shortName": "CreativeTemplateServiceClient", + "fullName": "google.ads.admanager.v1.CreativeTemplateServiceClient" }, "method": { - "shortName": "ListPlacements", - "fullName": "google.ads.admanager.v1.PlacementService.ListPlacements", + "shortName": "ListCreativeTemplates", + "fullName": "google.ads.admanager.v1.CreativeTemplateService.ListCreativeTemplates", "service": { - "shortName": "PlacementService", - "fullName": "google.ads.admanager.v1.PlacementService" + "shortName": "CreativeTemplateService", + "fullName": "google.ads.admanager.v1.CreativeTemplateService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionDealService_GetPrivateAuctionDeal_async", - "title": "AdBreakService getPrivateAuctionDeal Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_GetCustomField_async", + "title": "AdBreakService getCustomField Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `PrivateAuctionDeal` object.", + "description": " API to retrieve a `CustomField` object.", "canonical": true, - "file": "private_auction_deal_service.get_private_auction_deal.js", + "file": "custom_field_service.get_custom_field.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "GetPrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDeal", + "shortName": "GetCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.GetCustomField", "async": true, "parameters": [ { @@ -1875,39 +2056,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "resultType": ".google.ads.admanager.v1.CustomField", "client": { - "shortName": "PrivateAuctionDealServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "GetPrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDeal", + "shortName": "GetCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.GetCustomField", "service": { - "shortName": "PrivateAuctionDealService", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionDealService_ListPrivateAuctionDeals_async", - "title": "AdBreakService listPrivateAuctionDeals Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_ListCustomFields_async", + "title": "AdBreakService listCustomFields Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `PrivateAuctionDeal` objects.", + "description": " API to retrieve a list of `CustomField` objects.", "canonical": true, - "file": "private_auction_deal_service.list_private_auction_deals.js", + "file": "custom_field_service.list_custom_fields.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 88, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "ListPrivateAuctionDeals", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDeals", + "shortName": "ListCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.ListCustomFields", "async": true, "parameters": [ { @@ -1935,28 +2116,28 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListPrivateAuctionDealsResponse", + "resultType": ".google.ads.admanager.v1.ListCustomFieldsResponse", "client": { - "shortName": "PrivateAuctionDealServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "ListPrivateAuctionDeals", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDeals", + "shortName": "ListCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.ListCustomFields", "service": { - "shortName": "PrivateAuctionDealService", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionDealService_CreatePrivateAuctionDeal_async", - "title": "AdBreakService createPrivateAuctionDeal Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_CreateCustomField_async", + "title": "AdBreakService createCustomField Sample", "origin": "API_DEFINITION", - "description": " API to create a `PrivateAuctionDeal` object.", + "description": " API to create a `CustomField` object.", "canonical": true, - "file": "private_auction_deal_service.create_private_auction_deal.js", + "file": "custom_field_service.create_custom_field.js", "language": "JAVASCRIPT", "segments": [ { @@ -1966,8 +2147,8 @@ } ], "clientMethod": { - "shortName": "CreatePrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDeal", + "shortName": "CreateCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.CreateCustomField", "async": true, "parameters": [ { @@ -1975,127 +2156,131 @@ "type": "TYPE_STRING" }, { - "name": "private_auction_deal", - "type": ".google.ads.admanager.v1.PrivateAuctionDeal" + "name": "custom_field", + "type": ".google.ads.admanager.v1.CustomField" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "resultType": ".google.ads.admanager.v1.CustomField", "client": { - "shortName": "PrivateAuctionDealServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "CreatePrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDeal", + "shortName": "CreateCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.CreateCustomField", "service": { - "shortName": "PrivateAuctionDealService", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionDealService_UpdatePrivateAuctionDeal_async", - "title": "AdBreakService updatePrivateAuctionDeal Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_BatchCreateCustomFields_async", + "title": "AdBreakService batchCreateCustomFields Sample", "origin": "API_DEFINITION", - "description": " API to update a `PrivateAuctionDeal` object.", + "description": " API to batch create `CustomField` objects.", "canonical": true, - "file": "private_auction_deal_service.update_private_auction_deal.js", + "file": "custom_field_service.batch_create_custom_fields.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 62, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdatePrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDeal", + "shortName": "BatchCreateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchCreateCustomFields", "async": true, "parameters": [ { - "name": "private_auction_deal", - "type": ".google.ads.admanager.v1.PrivateAuctionDeal" + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "requests", + "type": "TYPE_MESSAGE[]" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "resultType": ".google.ads.admanager.v1.BatchCreateCustomFieldsResponse", "client": { - "shortName": "PrivateAuctionDealServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "UpdatePrivateAuctionDeal", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDeal", + "shortName": "BatchCreateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchCreateCustomFields", "service": { - "shortName": "PrivateAuctionDealService", - "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionService_GetPrivateAuction_async", - "title": "AdBreakService getPrivateAuction Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_UpdateCustomField_async", + "title": "AdBreakService updateCustomField Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `PrivateAuction` object.", + "description": " API to update a `CustomField` object.", "canonical": true, - "file": "private_auction_service.get_private_auction.js", + "file": "custom_field_service.update_custom_field.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "GetPrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuction", + "shortName": "UpdateCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.UpdateCustomField", "async": true, "parameters": [ { - "name": "name", - "type": "TYPE_STRING" + "name": "custom_field", + "type": ".google.ads.admanager.v1.CustomField" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuction", + "resultType": ".google.ads.admanager.v1.CustomField", "client": { - "shortName": "PrivateAuctionServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "GetPrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuction", + "shortName": "UpdateCustomField", + "fullName": "google.ads.admanager.v1.CustomFieldService.UpdateCustomField", "service": { - "shortName": "PrivateAuctionService", - "fullName": "google.ads.admanager.v1.PrivateAuctionService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionService_ListPrivateAuctions_async", - "title": "AdBreakService listPrivateAuctions Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_BatchUpdateCustomFields_async", + "title": "AdBreakService batchUpdateCustomFields Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `PrivateAuction` objects.", + "description": " API to batch update `CustomField` objects.", "canonical": true, - "file": "private_auction_service.list_private_auctions.js", + "file": "custom_field_service.batch_update_custom_fields.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 87, + "end": 62, "type": "FULL" } ], "clientMethod": { - "shortName": "ListPrivateAuctions", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctions", + "shortName": "BatchUpdateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchUpdateCustomFields", "async": true, "parameters": [ { @@ -2103,48 +2288,32 @@ "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" - }, - { - "name": "skip", - "type": "TYPE_INT32" + "name": "requests", + "type": "TYPE_MESSAGE[]" } ], - "resultType": ".google.ads.admanager.v1.ListPrivateAuctionsResponse", + "resultType": ".google.ads.admanager.v1.BatchUpdateCustomFieldsResponse", "client": { - "shortName": "PrivateAuctionServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "ListPrivateAuctions", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctions", + "shortName": "BatchUpdateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchUpdateCustomFields", "service": { - "shortName": "PrivateAuctionService", - "fullName": "google.ads.admanager.v1.PrivateAuctionService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionService_CreatePrivateAuction_async", - "title": "AdBreakService createPrivateAuction Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_BatchActivateCustomFields_async", + "title": "AdBreakService batchActivateCustomFields Sample", "origin": "API_DEFINITION", - "description": " API to create a `PrivateAuction` object.", + "description": " Activates a list of `CustomField` objects.", "canonical": true, - "file": "private_auction_service.create_private_auction.js", + "file": "custom_field_service.batch_activate_custom_fields.js", "language": "JAVASCRIPT", "segments": [ { @@ -2154,8 +2323,8 @@ } ], "clientMethod": { - "shortName": "CreatePrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuction", + "shortName": "BatchActivateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchActivateCustomFields", "async": true, "parameters": [ { @@ -2163,76 +2332,76 @@ "type": "TYPE_STRING" }, { - "name": "private_auction", - "type": ".google.ads.admanager.v1.PrivateAuction" + "name": "names", + "type": "TYPE_STRING[]" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuction", + "resultType": ".google.ads.admanager.v1.BatchActivateCustomFieldsResponse", "client": { - "shortName": "PrivateAuctionServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "CreatePrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuction", + "shortName": "BatchActivateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchActivateCustomFields", "service": { - "shortName": "PrivateAuctionService", - "fullName": "google.ads.admanager.v1.PrivateAuctionService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_PrivateAuctionService_UpdatePrivateAuction_async", - "title": "AdBreakService updatePrivateAuction Sample", + "regionTag": "admanager_v1_generated_CustomFieldService_BatchDeactivateCustomFields_async", + "title": "AdBreakService batchDeactivateCustomFields Sample", "origin": "API_DEFINITION", - "description": " API to update a `PrivateAuction` object.", + "description": " Deactivates a list of `CustomField` objects.", "canonical": true, - "file": "private_auction_service.update_private_auction.js", + "file": "custom_field_service.batch_deactivate_custom_fields.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdatePrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuction", + "shortName": "BatchDeactivateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchDeactivateCustomFields", "async": true, "parameters": [ { - "name": "private_auction", - "type": ".google.ads.admanager.v1.PrivateAuction" + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "names", + "type": "TYPE_STRING[]" } ], - "resultType": ".google.ads.admanager.v1.PrivateAuction", + "resultType": ".google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse", "client": { - "shortName": "PrivateAuctionServiceClient", - "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + "shortName": "CustomFieldServiceClient", + "fullName": "google.ads.admanager.v1.CustomFieldServiceClient" }, "method": { - "shortName": "UpdatePrivateAuction", - "fullName": "google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuction", + "shortName": "BatchDeactivateCustomFields", + "fullName": "google.ads.admanager.v1.CustomFieldService.BatchDeactivateCustomFields", "service": { - "shortName": "PrivateAuctionService", - "fullName": "google.ads.admanager.v1.PrivateAuctionService" + "shortName": "CustomFieldService", + "fullName": "google.ads.admanager.v1.CustomFieldService" } } } }, { - "regionTag": "admanager_v1_generated_ProgrammaticBuyerService_GetProgrammaticBuyer_async", - "title": "AdBreakService getProgrammaticBuyer Sample", + "regionTag": "admanager_v1_generated_CustomTargetingKeyService_GetCustomTargetingKey_async", + "title": "AdBreakService getCustomTargetingKey Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `ProgrammaticBuyer` object.", + "description": " API to retrieve a `CustomTargetingKey` object.", "canonical": true, - "file": "programmatic_buyer_service.get_programmatic_buyer.js", + "file": "custom_targeting_key_service.get_custom_targeting_key.js", "language": "JAVASCRIPT", "segments": [ { @@ -2242,8 +2411,8 @@ } ], "clientMethod": { - "shortName": "GetProgrammaticBuyer", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyer", + "shortName": "GetCustomTargetingKey", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKey", "async": true, "parameters": [ { @@ -2251,28 +2420,28 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.ProgrammaticBuyer", + "resultType": ".google.ads.admanager.v1.CustomTargetingKey", "client": { - "shortName": "ProgrammaticBuyerServiceClient", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerServiceClient" + "shortName": "CustomTargetingKeyServiceClient", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyServiceClient" }, "method": { - "shortName": "GetProgrammaticBuyer", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyer", + "shortName": "GetCustomTargetingKey", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.GetCustomTargetingKey", "service": { - "shortName": "ProgrammaticBuyerService", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService" + "shortName": "CustomTargetingKeyService", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService" } } } }, { - "regionTag": "admanager_v1_generated_ProgrammaticBuyerService_ListProgrammaticBuyers_async", - "title": "AdBreakService listProgrammaticBuyers Sample", + "regionTag": "admanager_v1_generated_CustomTargetingKeyService_ListCustomTargetingKeys_async", + "title": "AdBreakService listCustomTargetingKeys Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `ProgrammaticBuyer` objects.", + "description": " API to retrieve a list of `CustomTargetingKey` objects.", "canonical": true, - "file": "programmatic_buyer_service.list_programmatic_buyers.js", + "file": "custom_targeting_key_service.list_custom_targeting_keys.js", "language": "JAVASCRIPT", "segments": [ { @@ -2282,8 +2451,8 @@ } ], "clientMethod": { - "shortName": "ListProgrammaticBuyers", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyers", + "shortName": "ListCustomTargetingKeys", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeys", "async": true, "parameters": [ { @@ -2311,39 +2480,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListProgrammaticBuyersResponse", + "resultType": ".google.ads.admanager.v1.ListCustomTargetingKeysResponse", "client": { - "shortName": "ProgrammaticBuyerServiceClient", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerServiceClient" + "shortName": "CustomTargetingKeyServiceClient", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyServiceClient" }, "method": { - "shortName": "ListProgrammaticBuyers", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyers", + "shortName": "ListCustomTargetingKeys", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService.ListCustomTargetingKeys", "service": { - "shortName": "ProgrammaticBuyerService", - "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService" + "shortName": "CustomTargetingKeyService", + "fullName": "google.ads.admanager.v1.CustomTargetingKeyService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_GetReport_async", - "title": "AdBreakService getReport Sample", + "regionTag": "admanager_v1_generated_CustomTargetingValueService_GetCustomTargetingValue_async", + "title": "AdBreakService getCustomTargetingValue Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `Report` object.", + "description": " API to retrieve a `CustomTargetingValue` object.", "canonical": true, - "file": "report_service.get_report.js", + "file": "custom_targeting_value_service.get_custom_targeting_value.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "GetReport", - "fullName": "google.ads.admanager.v1.ReportService.GetReport", + "shortName": "GetCustomTargetingValue", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValue", "async": true, "parameters": [ { @@ -2351,39 +2520,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.Report", + "resultType": ".google.ads.admanager.v1.CustomTargetingValue", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "CustomTargetingValueServiceClient", + "fullName": "google.ads.admanager.v1.CustomTargetingValueServiceClient" }, "method": { - "shortName": "GetReport", - "fullName": "google.ads.admanager.v1.ReportService.GetReport", + "shortName": "GetCustomTargetingValue", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService.GetCustomTargetingValue", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "CustomTargetingValueService", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_ListReports_async", - "title": "AdBreakService listReports Sample", + "regionTag": "admanager_v1_generated_CustomTargetingValueService_ListCustomTargetingValues_async", + "title": "AdBreakService listCustomTargetingValues Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `Report` objects.", + "description": " API to retrieve a list of `CustomTargetingValue` objects.", "canonical": true, - "file": "report_service.list_reports.js", + "file": "custom_targeting_value_service.list_custom_targeting_values.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 86, + "end": 89, "type": "FULL" } ], "clientMethod": { - "shortName": "ListReports", - "fullName": "google.ads.admanager.v1.ReportService.ListReports", + "shortName": "ListCustomTargetingValues", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValues", "async": true, "parameters": [ { @@ -2411,127 +2580,139 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListReportsResponse", + "resultType": ".google.ads.admanager.v1.ListCustomTargetingValuesResponse", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "CustomTargetingValueServiceClient", + "fullName": "google.ads.admanager.v1.CustomTargetingValueServiceClient" }, "method": { - "shortName": "ListReports", - "fullName": "google.ads.admanager.v1.ReportService.ListReports", + "shortName": "ListCustomTargetingValues", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService.ListCustomTargetingValues", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "CustomTargetingValueService", + "fullName": "google.ads.admanager.v1.CustomTargetingValueService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_CreateReport_async", - "title": "AdBreakService createReport Sample", + "regionTag": "admanager_v1_generated_DeviceCapabilityService_GetDeviceCapability_async", + "title": "AdBreakService getDeviceCapability Sample", "origin": "API_DEFINITION", - "description": " API to create a `Report` object.", + "description": " API to retrieve a `DeviceCapability` object.", "canonical": true, - "file": "report_service.create_report.js", + "file": "device_capability_service.get_device_capability.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "CreateReport", - "fullName": "google.ads.admanager.v1.ReportService.CreateReport", + "shortName": "GetDeviceCapability", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService.GetDeviceCapability", "async": true, "parameters": [ { - "name": "parent", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "report", - "type": ".google.ads.admanager.v1.Report" } ], - "resultType": ".google.ads.admanager.v1.Report", + "resultType": ".google.ads.admanager.v1.DeviceCapability", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "DeviceCapabilityServiceClient", + "fullName": "google.ads.admanager.v1.DeviceCapabilityServiceClient" }, "method": { - "shortName": "CreateReport", - "fullName": "google.ads.admanager.v1.ReportService.CreateReport", + "shortName": "GetDeviceCapability", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService.GetDeviceCapability", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "DeviceCapabilityService", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_UpdateReport_async", - "title": "AdBreakService updateReport Sample", + "regionTag": "admanager_v1_generated_DeviceCapabilityService_ListDeviceCapabilities_async", + "title": "AdBreakService listDeviceCapabilities Sample", "origin": "API_DEFINITION", - "description": " API to update a `Report` object.", + "description": " API to retrieve a list of `DeviceCapability` objects.", "canonical": true, - "file": "report_service.update_report.js", + "file": "device_capability_service.list_device_capabilities.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 58, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdateReport", - "fullName": "google.ads.admanager.v1.ReportService.UpdateReport", + "shortName": "ListDeviceCapabilities", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService.ListDeviceCapabilities", "async": true, "parameters": [ { - "name": "report", - "type": ".google.ads.admanager.v1.Report" + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "skip", + "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.Report", + "resultType": ".google.ads.admanager.v1.ListDeviceCapabilitiesResponse", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "DeviceCapabilityServiceClient", + "fullName": "google.ads.admanager.v1.DeviceCapabilityServiceClient" }, "method": { - "shortName": "UpdateReport", - "fullName": "google.ads.admanager.v1.ReportService.UpdateReport", + "shortName": "ListDeviceCapabilities", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService.ListDeviceCapabilities", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "DeviceCapabilityService", + "fullName": "google.ads.admanager.v1.DeviceCapabilityService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_RunReport_async", - "title": "AdBreakService runReport Sample", + "regionTag": "admanager_v1_generated_DeviceCategoryService_GetDeviceCategory_async", + "title": "AdBreakService getDeviceCategory Sample", "origin": "API_DEFINITION", - "description": " Initiates the execution of an existing report asynchronously. Users can get the report by polling this operation via `OperationsService.GetOperation`. Poll every 5 seconds initially, with an exponential backoff. Once a report is complete, the operation will contain a `RunReportResponse` in its response field containing a report_result that can be passed to the `FetchReportResultRows` method to retrieve the report data.", + "description": " API to retrieve a `DeviceCategory` object.", "canonical": true, - "file": "report_service.run_report.js", + "file": "device_category_service.get_device_category.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], "clientMethod": { - "shortName": "RunReport", - "fullName": "google.ads.admanager.v1.ReportService.RunReport", + "shortName": "GetDeviceCategory", + "fullName": "google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategory", "async": true, "parameters": [ { @@ -2539,43 +2720,43 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.longrunning.Operation", + "resultType": ".google.ads.admanager.v1.DeviceCategory", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "DeviceCategoryServiceClient", + "fullName": "google.ads.admanager.v1.DeviceCategoryServiceClient" }, "method": { - "shortName": "RunReport", - "fullName": "google.ads.admanager.v1.ReportService.RunReport", + "shortName": "GetDeviceCategory", + "fullName": "google.ads.admanager.v1.DeviceCategoryService.GetDeviceCategory", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "DeviceCategoryService", + "fullName": "google.ads.admanager.v1.DeviceCategoryService" } } } }, { - "regionTag": "admanager_v1_generated_ReportService_FetchReportResultRows_async", - "title": "AdBreakService fetchReportResultRows Sample", + "regionTag": "admanager_v1_generated_DeviceCategoryService_ListDeviceCategories_async", + "title": "AdBreakService listDeviceCategories Sample", "origin": "API_DEFINITION", - "description": " Returns the result rows from a completed report. The caller must have previously called `RunReport` and waited for that operation to complete. The rows will be returned according to the order specified by the `sorts` member of the report definition.", + "description": " API to retrieve a list of `DeviceCategory` objects.", "canonical": true, - "file": "report_service.fetch_report_result_rows.js", + "file": "device_category_service.list_device_categories.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 67, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "FetchReportResultRows", - "fullName": "google.ads.admanager.v1.ReportService.FetchReportResultRows", + "shortName": "ListDeviceCategories", + "fullName": "google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategories", "async": true, "parameters": [ { - "name": "name", + "name": "parent", "type": "TYPE_STRING" }, { @@ -2585,41 +2766,53 @@ { "name": "page_token", "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "skip", + "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.FetchReportResultRowsResponse", + "resultType": ".google.ads.admanager.v1.ListDeviceCategoriesResponse", "client": { - "shortName": "ReportServiceClient", - "fullName": "google.ads.admanager.v1.ReportServiceClient" + "shortName": "DeviceCategoryServiceClient", + "fullName": "google.ads.admanager.v1.DeviceCategoryServiceClient" }, "method": { - "shortName": "FetchReportResultRows", - "fullName": "google.ads.admanager.v1.ReportService.FetchReportResultRows", + "shortName": "ListDeviceCategories", + "fullName": "google.ads.admanager.v1.DeviceCategoryService.ListDeviceCategories", "service": { - "shortName": "ReportService", - "fullName": "google.ads.admanager.v1.ReportService" + "shortName": "DeviceCategoryService", + "fullName": "google.ads.admanager.v1.DeviceCategoryService" } } } }, { - "regionTag": "admanager_v1_generated_RoleService_GetRole_async", - "title": "AdBreakService getRole Sample", + "regionTag": "admanager_v1_generated_DeviceManufacturerService_GetDeviceManufacturer_async", + "title": "AdBreakService getDeviceManufacturer Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `Role` object.", + "description": " API to retrieve a `DeviceManufacturer` object.", "canonical": true, - "file": "role_service.get_role.js", + "file": "device_manufacturer_service.get_device_manufacturer.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "GetRole", - "fullName": "google.ads.admanager.v1.RoleService.GetRole", + "shortName": "GetDeviceManufacturer", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService.GetDeviceManufacturer", "async": true, "parameters": [ { @@ -2627,39 +2820,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.Role", + "resultType": ".google.ads.admanager.v1.DeviceManufacturer", "client": { - "shortName": "RoleServiceClient", - "fullName": "google.ads.admanager.v1.RoleServiceClient" + "shortName": "DeviceManufacturerServiceClient", + "fullName": "google.ads.admanager.v1.DeviceManufacturerServiceClient" }, "method": { - "shortName": "GetRole", - "fullName": "google.ads.admanager.v1.RoleService.GetRole", + "shortName": "GetDeviceManufacturer", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService.GetDeviceManufacturer", "service": { - "shortName": "RoleService", - "fullName": "google.ads.admanager.v1.RoleService" + "shortName": "DeviceManufacturerService", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService" } } } }, { - "regionTag": "admanager_v1_generated_RoleService_ListRoles_async", - "title": "AdBreakService listRoles Sample", + "regionTag": "admanager_v1_generated_DeviceManufacturerService_ListDeviceManufacturers_async", + "title": "AdBreakService listDeviceManufacturers Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `Role` objects.", + "description": " API to retrieve a list of `DeviceManufacturer` objects.", "canonical": true, - "file": "role_service.list_roles.js", + "file": "device_manufacturer_service.list_device_manufacturers.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 85, + "end": 86, "type": "FULL" } ], "clientMethod": { - "shortName": "ListRoles", - "fullName": "google.ads.admanager.v1.RoleService.ListRoles", + "shortName": "ListDeviceManufacturers", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService.ListDeviceManufacturers", "async": true, "parameters": [ { @@ -2687,39 +2880,39 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListRolesResponse", + "resultType": ".google.ads.admanager.v1.ListDeviceManufacturersResponse", "client": { - "shortName": "RoleServiceClient", - "fullName": "google.ads.admanager.v1.RoleServiceClient" + "shortName": "DeviceManufacturerServiceClient", + "fullName": "google.ads.admanager.v1.DeviceManufacturerServiceClient" }, "method": { - "shortName": "ListRoles", - "fullName": "google.ads.admanager.v1.RoleService.ListRoles", + "shortName": "ListDeviceManufacturers", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService.ListDeviceManufacturers", "service": { - "shortName": "RoleService", - "fullName": "google.ads.admanager.v1.RoleService" + "shortName": "DeviceManufacturerService", + "fullName": "google.ads.admanager.v1.DeviceManufacturerService" } } } }, { - "regionTag": "admanager_v1_generated_TaxonomyCategoryService_GetTaxonomyCategory_async", - "title": "AdBreakService getTaxonomyCategory Sample", + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_GetEntitySignalsMapping_async", + "title": "AdBreakService getEntitySignalsMapping Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a `TaxonomyCategory` object.", + "description": " API to retrieve a `EntitySignalsMapping` object.", "canonical": true, - "file": "taxonomy_category_service.get_taxonomy_category.js", + "file": "entity_signals_mapping_service.get_entity_signals_mapping.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "GetTaxonomyCategory", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategory", + "shortName": "GetEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMapping", "async": true, "parameters": [ { @@ -2727,39 +2920,39 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.ads.admanager.v1.TaxonomyCategory", + "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", "client": { - "shortName": "TaxonomyCategoryServiceClient", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryServiceClient" + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" }, "method": { - "shortName": "GetTaxonomyCategory", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategory", + "shortName": "GetEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.GetEntitySignalsMapping", "service": { - "shortName": "TaxonomyCategoryService", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService" + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" } } } }, { - "regionTag": "admanager_v1_generated_TaxonomyCategoryService_ListTaxonomyCategories_async", - "title": "AdBreakService listTaxonomyCategories Sample", + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_ListEntitySignalsMappings_async", + "title": "AdBreakService listEntitySignalsMappings Sample", "origin": "API_DEFINITION", - "description": " API to retrieve a list of `TaxonomyCategory` objects.", + "description": " API to retrieve a list of `EntitySignalsMapping` objects.", "canonical": true, - "file": "taxonomy_category_service.list_taxonomy_categories.js", + "file": "entity_signals_mapping_service.list_entity_signals_mappings.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 86, + "end": 88, "type": "FULL" } ], "clientMethod": { - "shortName": "ListTaxonomyCategories", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategories", + "shortName": "ListEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappings", "async": true, "parameters": [ { @@ -2787,17 +2980,3056 @@ "type": "TYPE_INT32" } ], - "resultType": ".google.ads.admanager.v1.ListTaxonomyCategoriesResponse", + "resultType": ".google.ads.admanager.v1.ListEntitySignalsMappingsResponse", "client": { - "shortName": "TaxonomyCategoryServiceClient", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryServiceClient" + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" }, "method": { - "shortName": "ListTaxonomyCategories", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategories", + "shortName": "ListEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.ListEntitySignalsMappings", "service": { - "shortName": "TaxonomyCategoryService", - "fullName": "google.ads.admanager.v1.TaxonomyCategoryService" + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_CreateEntitySignalsMapping_async", + "title": "AdBreakService createEntitySignalsMapping Sample", + "origin": "API_DEFINITION", + "description": " API to create an `EntitySignalsMapping` object.", + "canonical": true, + "file": "entity_signals_mapping_service.create_entity_signals_mapping.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMapping", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entity_signals_mapping", + "type": ".google.ads.admanager.v1.EntitySignalsMapping" + } + ], + "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", + "client": { + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + }, + "method": { + "shortName": "CreateEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.CreateEntitySignalsMapping", + "service": { + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_UpdateEntitySignalsMapping_async", + "title": "AdBreakService updateEntitySignalsMapping Sample", + "origin": "API_DEFINITION", + "description": " API to update an `EntitySignalsMapping` object.", + "canonical": true, + "file": "entity_signals_mapping_service.update_entity_signals_mapping.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMapping", + "async": true, + "parameters": [ + { + "name": "entity_signals_mapping", + "type": ".google.ads.admanager.v1.EntitySignalsMapping" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.EntitySignalsMapping", + "client": { + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + }, + "method": { + "shortName": "UpdateEntitySignalsMapping", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.UpdateEntitySignalsMapping", + "service": { + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_BatchCreateEntitySignalsMappings_async", + "title": "AdBreakService batchCreateEntitySignalsMappings Sample", + "origin": "API_DEFINITION", + "description": " API to batch create `EntitySignalsMapping` objects.", + "canonical": true, + "file": "entity_signals_mapping_service.batch_create_entity_signals_mappings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse", + "client": { + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + }, + "method": { + "shortName": "BatchCreateEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchCreateEntitySignalsMappings", + "service": { + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_EntitySignalsMappingService_BatchUpdateEntitySignalsMappings_async", + "title": "AdBreakService batchUpdateEntitySignalsMappings Sample", + "origin": "API_DEFINITION", + "description": " API to batch update `EntitySignalsMapping` objects.", + "canonical": true, + "file": "entity_signals_mapping_service.batch_update_entity_signals_mappings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdateEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse", + "client": { + "shortName": "EntitySignalsMappingServiceClient", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingServiceClient" + }, + "method": { + "shortName": "BatchUpdateEntitySignalsMappings", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService.BatchUpdateEntitySignalsMappings", + "service": { + "shortName": "EntitySignalsMappingService", + "fullName": "google.ads.admanager.v1.EntitySignalsMappingService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_GeoTargetService_GetGeoTarget_async", + "title": "AdBreakService getGeoTarget Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `GeoTarget` object.", + "canonical": true, + "file": "geo_target_service.get_geo_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGeoTarget", + "fullName": "google.ads.admanager.v1.GeoTargetService.GetGeoTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.GeoTarget", + "client": { + "shortName": "GeoTargetServiceClient", + "fullName": "google.ads.admanager.v1.GeoTargetServiceClient" + }, + "method": { + "shortName": "GetGeoTarget", + "fullName": "google.ads.admanager.v1.GeoTargetService.GetGeoTarget", + "service": { + "shortName": "GeoTargetService", + "fullName": "google.ads.admanager.v1.GeoTargetService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_GeoTargetService_ListGeoTargets_async", + "title": "AdBreakService listGeoTargets Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `GeoTarget` objects.", + "canonical": true, + "file": "geo_target_service.list_geo_targets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGeoTargets", + "fullName": "google.ads.admanager.v1.GeoTargetService.ListGeoTargets", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListGeoTargetsResponse", + "client": { + "shortName": "GeoTargetServiceClient", + "fullName": "google.ads.admanager.v1.GeoTargetServiceClient" + }, + "method": { + "shortName": "ListGeoTargets", + "fullName": "google.ads.admanager.v1.GeoTargetService.ListGeoTargets", + "service": { + "shortName": "GeoTargetService", + "fullName": "google.ads.admanager.v1.GeoTargetService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileCarrierService_GetMobileCarrier_async", + "title": "AdBreakService getMobileCarrier Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `MobileCarrier` object.", + "canonical": true, + "file": "mobile_carrier_service.get_mobile_carrier.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMobileCarrier", + "fullName": "google.ads.admanager.v1.MobileCarrierService.GetMobileCarrier", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.MobileCarrier", + "client": { + "shortName": "MobileCarrierServiceClient", + "fullName": "google.ads.admanager.v1.MobileCarrierServiceClient" + }, + "method": { + "shortName": "GetMobileCarrier", + "fullName": "google.ads.admanager.v1.MobileCarrierService.GetMobileCarrier", + "service": { + "shortName": "MobileCarrierService", + "fullName": "google.ads.admanager.v1.MobileCarrierService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileCarrierService_ListMobileCarriers_async", + "title": "AdBreakService listMobileCarriers Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `MobileCarrier` objects.", + "canonical": true, + "file": "mobile_carrier_service.list_mobile_carriers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMobileCarriers", + "fullName": "google.ads.admanager.v1.MobileCarrierService.ListMobileCarriers", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListMobileCarriersResponse", + "client": { + "shortName": "MobileCarrierServiceClient", + "fullName": "google.ads.admanager.v1.MobileCarrierServiceClient" + }, + "method": { + "shortName": "ListMobileCarriers", + "fullName": "google.ads.admanager.v1.MobileCarrierService.ListMobileCarriers", + "service": { + "shortName": "MobileCarrierService", + "fullName": "google.ads.admanager.v1.MobileCarrierService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileDeviceService_GetMobileDevice_async", + "title": "AdBreakService getMobileDevice Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `MobileDevice` object.", + "canonical": true, + "file": "mobile_device_service.get_mobile_device.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMobileDevice", + "fullName": "google.ads.admanager.v1.MobileDeviceService.GetMobileDevice", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.MobileDevice", + "client": { + "shortName": "MobileDeviceServiceClient", + "fullName": "google.ads.admanager.v1.MobileDeviceServiceClient" + }, + "method": { + "shortName": "GetMobileDevice", + "fullName": "google.ads.admanager.v1.MobileDeviceService.GetMobileDevice", + "service": { + "shortName": "MobileDeviceService", + "fullName": "google.ads.admanager.v1.MobileDeviceService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileDeviceService_ListMobileDevices_async", + "title": "AdBreakService listMobileDevices Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `MobileDevice` objects.", + "canonical": true, + "file": "mobile_device_service.list_mobile_devices.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMobileDevices", + "fullName": "google.ads.admanager.v1.MobileDeviceService.ListMobileDevices", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListMobileDevicesResponse", + "client": { + "shortName": "MobileDeviceServiceClient", + "fullName": "google.ads.admanager.v1.MobileDeviceServiceClient" + }, + "method": { + "shortName": "ListMobileDevices", + "fullName": "google.ads.admanager.v1.MobileDeviceService.ListMobileDevices", + "service": { + "shortName": "MobileDeviceService", + "fullName": "google.ads.admanager.v1.MobileDeviceService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileDeviceSubmodelService_GetMobileDeviceSubmodel_async", + "title": "AdBreakService getMobileDeviceSubmodel Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `MobileDeviceSubmodel` object.", + "canonical": true, + "file": "mobile_device_submodel_service.get_mobile_device_submodel.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMobileDeviceSubmodel", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService.GetMobileDeviceSubmodel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.MobileDeviceSubmodel", + "client": { + "shortName": "MobileDeviceSubmodelServiceClient", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelServiceClient" + }, + "method": { + "shortName": "GetMobileDeviceSubmodel", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService.GetMobileDeviceSubmodel", + "service": { + "shortName": "MobileDeviceSubmodelService", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_MobileDeviceSubmodelService_ListMobileDeviceSubmodels_async", + "title": "AdBreakService listMobileDeviceSubmodels Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `MobileDeviceSubmodel` objects.", + "canonical": true, + "file": "mobile_device_submodel_service.list_mobile_device_submodels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMobileDeviceSubmodels", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService.ListMobileDeviceSubmodels", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse", + "client": { + "shortName": "MobileDeviceSubmodelServiceClient", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelServiceClient" + }, + "method": { + "shortName": "ListMobileDeviceSubmodels", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService.ListMobileDeviceSubmodels", + "service": { + "shortName": "MobileDeviceSubmodelService", + "fullName": "google.ads.admanager.v1.MobileDeviceSubmodelService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_NetworkService_GetNetwork_async", + "title": "AdBreakService getNetwork Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a Network object.", + "canonical": true, + "file": "network_service.get_network.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNetwork", + "fullName": "google.ads.admanager.v1.NetworkService.GetNetwork", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Network", + "client": { + "shortName": "NetworkServiceClient", + "fullName": "google.ads.admanager.v1.NetworkServiceClient" + }, + "method": { + "shortName": "GetNetwork", + "fullName": "google.ads.admanager.v1.NetworkService.GetNetwork", + "service": { + "shortName": "NetworkService", + "fullName": "google.ads.admanager.v1.NetworkService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_NetworkService_ListNetworks_async", + "title": "AdBreakService listNetworks Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve all the networks the current user has access to.", + "canonical": true, + "file": "network_service.list_networks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 48, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNetworks", + "fullName": "google.ads.admanager.v1.NetworkService.ListNetworks", + "async": true, + "parameters": [], + "resultType": ".google.ads.admanager.v1.ListNetworksResponse", + "client": { + "shortName": "NetworkServiceClient", + "fullName": "google.ads.admanager.v1.NetworkServiceClient" + }, + "method": { + "shortName": "ListNetworks", + "fullName": "google.ads.admanager.v1.NetworkService.ListNetworks", + "service": { + "shortName": "NetworkService", + "fullName": "google.ads.admanager.v1.NetworkService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OperatingSystemService_GetOperatingSystem_async", + "title": "AdBreakService getOperatingSystem Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `OperatingSystem` object.", + "canonical": true, + "file": "operating_system_service.get_operating_system.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOperatingSystem", + "fullName": "google.ads.admanager.v1.OperatingSystemService.GetOperatingSystem", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.OperatingSystem", + "client": { + "shortName": "OperatingSystemServiceClient", + "fullName": "google.ads.admanager.v1.OperatingSystemServiceClient" + }, + "method": { + "shortName": "GetOperatingSystem", + "fullName": "google.ads.admanager.v1.OperatingSystemService.GetOperatingSystem", + "service": { + "shortName": "OperatingSystemService", + "fullName": "google.ads.admanager.v1.OperatingSystemService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OperatingSystemService_ListOperatingSystems_async", + "title": "AdBreakService listOperatingSystems Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `OperatingSystem` objects.", + "canonical": true, + "file": "operating_system_service.list_operating_systems.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOperatingSystems", + "fullName": "google.ads.admanager.v1.OperatingSystemService.ListOperatingSystems", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListOperatingSystemsResponse", + "client": { + "shortName": "OperatingSystemServiceClient", + "fullName": "google.ads.admanager.v1.OperatingSystemServiceClient" + }, + "method": { + "shortName": "ListOperatingSystems", + "fullName": "google.ads.admanager.v1.OperatingSystemService.ListOperatingSystems", + "service": { + "shortName": "OperatingSystemService", + "fullName": "google.ads.admanager.v1.OperatingSystemService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OperatingSystemVersionService_GetOperatingSystemVersion_async", + "title": "AdBreakService getOperatingSystemVersion Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `OperatingSystemVersion` object.", + "canonical": true, + "file": "operating_system_version_service.get_operating_system_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOperatingSystemVersion", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.OperatingSystemVersion", + "client": { + "shortName": "OperatingSystemVersionServiceClient", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionServiceClient" + }, + "method": { + "shortName": "GetOperatingSystemVersion", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.GetOperatingSystemVersion", + "service": { + "shortName": "OperatingSystemVersionService", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OperatingSystemVersionService_ListOperatingSystemVersions_async", + "title": "AdBreakService listOperatingSystemVersions Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `OperatingSystemVersion` objects.", + "canonical": true, + "file": "operating_system_version_service.list_operating_system_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOperatingSystemVersions", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersions", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListOperatingSystemVersionsResponse", + "client": { + "shortName": "OperatingSystemVersionServiceClient", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionServiceClient" + }, + "method": { + "shortName": "ListOperatingSystemVersions", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService.ListOperatingSystemVersions", + "service": { + "shortName": "OperatingSystemVersionService", + "fullName": "google.ads.admanager.v1.OperatingSystemVersionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OrderService_GetOrder_async", + "title": "AdBreakService getOrder Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve an Order object.", + "canonical": true, + "file": "order_service.get_order.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOrder", + "fullName": "google.ads.admanager.v1.OrderService.GetOrder", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Order", + "client": { + "shortName": "OrderServiceClient", + "fullName": "google.ads.admanager.v1.OrderServiceClient" + }, + "method": { + "shortName": "GetOrder", + "fullName": "google.ads.admanager.v1.OrderService.GetOrder", + "service": { + "shortName": "OrderService", + "fullName": "google.ads.admanager.v1.OrderService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_OrderService_ListOrders_async", + "title": "AdBreakService listOrders Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Order` objects. Fields used for literal matching in filter string: * `order_id` * `display_name` * `external_order_id`", + "canonical": true, + "file": "order_service.list_orders.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOrders", + "fullName": "google.ads.admanager.v1.OrderService.ListOrders", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListOrdersResponse", + "client": { + "shortName": "OrderServiceClient", + "fullName": "google.ads.admanager.v1.OrderServiceClient" + }, + "method": { + "shortName": "ListOrders", + "fullName": "google.ads.admanager.v1.OrderService.ListOrders", + "service": { + "shortName": "OrderService", + "fullName": "google.ads.admanager.v1.OrderService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_GetPlacement_async", + "title": "AdBreakService getPlacement Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `Placement` object.", + "canonical": true, + "file": "placement_service.get_placement.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPlacement", + "fullName": "google.ads.admanager.v1.PlacementService.GetPlacement", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Placement", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "GetPlacement", + "fullName": "google.ads.admanager.v1.PlacementService.GetPlacement", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_ListPlacements_async", + "title": "AdBreakService listPlacements Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Placement` objects.", + "canonical": true, + "file": "placement_service.list_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPlacements", + "fullName": "google.ads.admanager.v1.PlacementService.ListPlacements", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListPlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "ListPlacements", + "fullName": "google.ads.admanager.v1.PlacementService.ListPlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_CreatePlacement_async", + "title": "AdBreakService createPlacement Sample", + "origin": "API_DEFINITION", + "description": " API to create an `Placement` object.", + "canonical": true, + "file": "placement_service.create_placement.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePlacement", + "fullName": "google.ads.admanager.v1.PlacementService.CreatePlacement", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "placement", + "type": ".google.ads.admanager.v1.Placement" + } + ], + "resultType": ".google.ads.admanager.v1.Placement", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "CreatePlacement", + "fullName": "google.ads.admanager.v1.PlacementService.CreatePlacement", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_UpdatePlacement_async", + "title": "AdBreakService updatePlacement Sample", + "origin": "API_DEFINITION", + "description": " API to update an `Placement` object.", + "canonical": true, + "file": "placement_service.update_placement.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePlacement", + "fullName": "google.ads.admanager.v1.PlacementService.UpdatePlacement", + "async": true, + "parameters": [ + { + "name": "placement", + "type": ".google.ads.admanager.v1.Placement" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.Placement", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "UpdatePlacement", + "fullName": "google.ads.admanager.v1.PlacementService.UpdatePlacement", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_BatchCreatePlacements_async", + "title": "AdBreakService batchCreatePlacements Sample", + "origin": "API_DEFINITION", + "description": " API to batch create `Placement` objects.", + "canonical": true, + "file": "placement_service.batch_create_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchCreatePlacements", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchCreatePlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "BatchCreatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchCreatePlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_BatchUpdatePlacements_async", + "title": "AdBreakService batchUpdatePlacements Sample", + "origin": "API_DEFINITION", + "description": " API to batch update `Placement` objects.", + "canonical": true, + "file": "placement_service.batch_update_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchUpdatePlacements", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchUpdatePlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "BatchUpdatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchUpdatePlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_BatchActivatePlacements_async", + "title": "AdBreakService batchActivatePlacements Sample", + "origin": "API_DEFINITION", + "description": " Activates a list of `Placement` objects.", + "canonical": true, + "file": "placement_service.batch_activate_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchActivatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchActivatePlacements", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchActivatePlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "BatchActivatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchActivatePlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_BatchDeactivatePlacements_async", + "title": "AdBreakService batchDeactivatePlacements Sample", + "origin": "API_DEFINITION", + "description": " Deactivates a list of `Placement` objects.", + "canonical": true, + "file": "placement_service.batch_deactivate_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeactivatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchDeactivatePlacements", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchDeactivatePlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "BatchDeactivatePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchDeactivatePlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PlacementService_BatchArchivePlacements_async", + "title": "AdBreakService batchArchivePlacements Sample", + "origin": "API_DEFINITION", + "description": " Archives a list of `Placement` objects.", + "canonical": true, + "file": "placement_service.batch_archive_placements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchArchivePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchArchivePlacements", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchArchivePlacementsResponse", + "client": { + "shortName": "PlacementServiceClient", + "fullName": "google.ads.admanager.v1.PlacementServiceClient" + }, + "method": { + "shortName": "BatchArchivePlacements", + "fullName": "google.ads.admanager.v1.PlacementService.BatchArchivePlacements", + "service": { + "shortName": "PlacementService", + "fullName": "google.ads.admanager.v1.PlacementService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionDealService_GetPrivateAuctionDeal_async", + "title": "AdBreakService getPrivateAuctionDeal Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `PrivateAuctionDeal` object.", + "canonical": true, + "file": "private_auction_deal_service.get_private_auction_deal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDeal", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "client": { + "shortName": "PrivateAuctionDealServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + }, + "method": { + "shortName": "GetPrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.GetPrivateAuctionDeal", + "service": { + "shortName": "PrivateAuctionDealService", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionDealService_ListPrivateAuctionDeals_async", + "title": "AdBreakService listPrivateAuctionDeals Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `PrivateAuctionDeal` objects.", + "canonical": true, + "file": "private_auction_deal_service.list_private_auction_deals.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPrivateAuctionDeals", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDeals", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListPrivateAuctionDealsResponse", + "client": { + "shortName": "PrivateAuctionDealServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + }, + "method": { + "shortName": "ListPrivateAuctionDeals", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.ListPrivateAuctionDeals", + "service": { + "shortName": "PrivateAuctionDealService", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionDealService_CreatePrivateAuctionDeal_async", + "title": "AdBreakService createPrivateAuctionDeal Sample", + "origin": "API_DEFINITION", + "description": " API to create a `PrivateAuctionDeal` object.", + "canonical": true, + "file": "private_auction_deal_service.create_private_auction_deal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDeal", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "private_auction_deal", + "type": ".google.ads.admanager.v1.PrivateAuctionDeal" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "client": { + "shortName": "PrivateAuctionDealServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + }, + "method": { + "shortName": "CreatePrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.CreatePrivateAuctionDeal", + "service": { + "shortName": "PrivateAuctionDealService", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionDealService_UpdatePrivateAuctionDeal_async", + "title": "AdBreakService updatePrivateAuctionDeal Sample", + "origin": "API_DEFINITION", + "description": " API to update a `PrivateAuctionDeal` object.", + "canonical": true, + "file": "private_auction_deal_service.update_private_auction_deal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDeal", + "async": true, + "parameters": [ + { + "name": "private_auction_deal", + "type": ".google.ads.admanager.v1.PrivateAuctionDeal" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuctionDeal", + "client": { + "shortName": "PrivateAuctionDealServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealServiceClient" + }, + "method": { + "shortName": "UpdatePrivateAuctionDeal", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService.UpdatePrivateAuctionDeal", + "service": { + "shortName": "PrivateAuctionDealService", + "fullName": "google.ads.admanager.v1.PrivateAuctionDealService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionService_GetPrivateAuction_async", + "title": "AdBreakService getPrivateAuction Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `PrivateAuction` object.", + "canonical": true, + "file": "private_auction_service.get_private_auction.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuction", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuction", + "client": { + "shortName": "PrivateAuctionServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + }, + "method": { + "shortName": "GetPrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.GetPrivateAuction", + "service": { + "shortName": "PrivateAuctionService", + "fullName": "google.ads.admanager.v1.PrivateAuctionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionService_ListPrivateAuctions_async", + "title": "AdBreakService listPrivateAuctions Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `PrivateAuction` objects.", + "canonical": true, + "file": "private_auction_service.list_private_auctions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPrivateAuctions", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctions", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListPrivateAuctionsResponse", + "client": { + "shortName": "PrivateAuctionServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + }, + "method": { + "shortName": "ListPrivateAuctions", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.ListPrivateAuctions", + "service": { + "shortName": "PrivateAuctionService", + "fullName": "google.ads.admanager.v1.PrivateAuctionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionService_CreatePrivateAuction_async", + "title": "AdBreakService createPrivateAuction Sample", + "origin": "API_DEFINITION", + "description": " API to create a `PrivateAuction` object.", + "canonical": true, + "file": "private_auction_service.create_private_auction.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuction", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "private_auction", + "type": ".google.ads.admanager.v1.PrivateAuction" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuction", + "client": { + "shortName": "PrivateAuctionServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + }, + "method": { + "shortName": "CreatePrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.CreatePrivateAuction", + "service": { + "shortName": "PrivateAuctionService", + "fullName": "google.ads.admanager.v1.PrivateAuctionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_PrivateAuctionService_UpdatePrivateAuction_async", + "title": "AdBreakService updatePrivateAuction Sample", + "origin": "API_DEFINITION", + "description": " API to update a `PrivateAuction` object.", + "canonical": true, + "file": "private_auction_service.update_private_auction.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuction", + "async": true, + "parameters": [ + { + "name": "private_auction", + "type": ".google.ads.admanager.v1.PrivateAuction" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.PrivateAuction", + "client": { + "shortName": "PrivateAuctionServiceClient", + "fullName": "google.ads.admanager.v1.PrivateAuctionServiceClient" + }, + "method": { + "shortName": "UpdatePrivateAuction", + "fullName": "google.ads.admanager.v1.PrivateAuctionService.UpdatePrivateAuction", + "service": { + "shortName": "PrivateAuctionService", + "fullName": "google.ads.admanager.v1.PrivateAuctionService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ProgrammaticBuyerService_GetProgrammaticBuyer_async", + "title": "AdBreakService getProgrammaticBuyer Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `ProgrammaticBuyer` object.", + "canonical": true, + "file": "programmatic_buyer_service.get_programmatic_buyer.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProgrammaticBuyer", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.ProgrammaticBuyer", + "client": { + "shortName": "ProgrammaticBuyerServiceClient", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerServiceClient" + }, + "method": { + "shortName": "GetProgrammaticBuyer", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.GetProgrammaticBuyer", + "service": { + "shortName": "ProgrammaticBuyerService", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ProgrammaticBuyerService_ListProgrammaticBuyers_async", + "title": "AdBreakService listProgrammaticBuyers Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `ProgrammaticBuyer` objects.", + "canonical": true, + "file": "programmatic_buyer_service.list_programmatic_buyers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProgrammaticBuyers", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyers", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListProgrammaticBuyersResponse", + "client": { + "shortName": "ProgrammaticBuyerServiceClient", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerServiceClient" + }, + "method": { + "shortName": "ListProgrammaticBuyers", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService.ListProgrammaticBuyers", + "service": { + "shortName": "ProgrammaticBuyerService", + "fullName": "google.ads.admanager.v1.ProgrammaticBuyerService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_GetReport_async", + "title": "AdBreakService getReport Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `Report` object.", + "canonical": true, + "file": "report_service.get_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReport", + "fullName": "google.ads.admanager.v1.ReportService.GetReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Report", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "GetReport", + "fullName": "google.ads.admanager.v1.ReportService.GetReport", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_ListReports_async", + "title": "AdBreakService listReports Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Report` objects.", + "canonical": true, + "file": "report_service.list_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReports", + "fullName": "google.ads.admanager.v1.ReportService.ListReports", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListReportsResponse", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "ListReports", + "fullName": "google.ads.admanager.v1.ReportService.ListReports", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_CreateReport_async", + "title": "AdBreakService createReport Sample", + "origin": "API_DEFINITION", + "description": " API to create a `Report` object.", + "canonical": true, + "file": "report_service.create_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReport", + "fullName": "google.ads.admanager.v1.ReportService.CreateReport", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "report", + "type": ".google.ads.admanager.v1.Report" + } + ], + "resultType": ".google.ads.admanager.v1.Report", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "CreateReport", + "fullName": "google.ads.admanager.v1.ReportService.CreateReport", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_UpdateReport_async", + "title": "AdBreakService updateReport Sample", + "origin": "API_DEFINITION", + "description": " API to update a `Report` object.", + "canonical": true, + "file": "report_service.update_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateReport", + "fullName": "google.ads.admanager.v1.ReportService.UpdateReport", + "async": true, + "parameters": [ + { + "name": "report", + "type": ".google.ads.admanager.v1.Report" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.Report", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "UpdateReport", + "fullName": "google.ads.admanager.v1.ReportService.UpdateReport", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_RunReport_async", + "title": "AdBreakService runReport Sample", + "origin": "API_DEFINITION", + "description": " Initiates the execution of an existing report asynchronously. Users can get the report by polling this operation using `OperationsService.GetOperation`. Poll every 5 seconds initially, with an exponential backoff. Once a report is complete, the operation will contain a `RunReportResponse` in its response field containing a report_result that can be passed to the `FetchReportResultRows` method to retrieve the report data.", + "canonical": true, + "file": "report_service.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.ads.admanager.v1.ReportService.RunReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.ads.admanager.v1.ReportService.RunReport", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_ReportService_FetchReportResultRows_async", + "title": "AdBreakService fetchReportResultRows Sample", + "origin": "API_DEFINITION", + "description": " Returns the result rows from a completed report. The caller must have previously called `RunReport` and waited for that operation to complete. The rows will be returned according to the order specified by the `sorts` member of the report definition.", + "canonical": true, + "file": "report_service.fetch_report_result_rows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchReportResultRows", + "fullName": "google.ads.admanager.v1.ReportService.FetchReportResultRows", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.FetchReportResultRowsResponse", + "client": { + "shortName": "ReportServiceClient", + "fullName": "google.ads.admanager.v1.ReportServiceClient" + }, + "method": { + "shortName": "FetchReportResultRows", + "fullName": "google.ads.admanager.v1.ReportService.FetchReportResultRows", + "service": { + "shortName": "ReportService", + "fullName": "google.ads.admanager.v1.ReportService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_RoleService_GetRole_async", + "title": "AdBreakService getRole Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `Role` object.", + "canonical": true, + "file": "role_service.get_role.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRole", + "fullName": "google.ads.admanager.v1.RoleService.GetRole", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Role", + "client": { + "shortName": "RoleServiceClient", + "fullName": "google.ads.admanager.v1.RoleServiceClient" + }, + "method": { + "shortName": "GetRole", + "fullName": "google.ads.admanager.v1.RoleService.GetRole", + "service": { + "shortName": "RoleService", + "fullName": "google.ads.admanager.v1.RoleService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_RoleService_ListRoles_async", + "title": "AdBreakService listRoles Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Role` objects.", + "canonical": true, + "file": "role_service.list_roles.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRoles", + "fullName": "google.ads.admanager.v1.RoleService.ListRoles", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListRolesResponse", + "client": { + "shortName": "RoleServiceClient", + "fullName": "google.ads.admanager.v1.RoleServiceClient" + }, + "method": { + "shortName": "ListRoles", + "fullName": "google.ads.admanager.v1.RoleService.ListRoles", + "service": { + "shortName": "RoleService", + "fullName": "google.ads.admanager.v1.RoleService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_GetSite_async", + "title": "AdBreakService getSite Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `Site` object.", + "canonical": true, + "file": "site_service.get_site.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSite", + "fullName": "google.ads.admanager.v1.SiteService.GetSite", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Site", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "GetSite", + "fullName": "google.ads.admanager.v1.SiteService.GetSite", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_ListSites_async", + "title": "AdBreakService listSites Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Site` objects.", + "canonical": true, + "file": "site_service.list_sites.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSites", + "fullName": "google.ads.admanager.v1.SiteService.ListSites", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListSitesResponse", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "ListSites", + "fullName": "google.ads.admanager.v1.SiteService.ListSites", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_CreateSite_async", + "title": "AdBreakService createSite Sample", + "origin": "API_DEFINITION", + "description": " API to create a `Site` object.", + "canonical": true, + "file": "site_service.create_site.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSite", + "fullName": "google.ads.admanager.v1.SiteService.CreateSite", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "site", + "type": ".google.ads.admanager.v1.Site" + } + ], + "resultType": ".google.ads.admanager.v1.Site", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "CreateSite", + "fullName": "google.ads.admanager.v1.SiteService.CreateSite", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_BatchCreateSites_async", + "title": "AdBreakService batchCreateSites Sample", + "origin": "API_DEFINITION", + "description": " API to batch create `Site` objects.", + "canonical": true, + "file": "site_service.batch_create_sites.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchCreateSites", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchCreateSitesResponse", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "BatchCreateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchCreateSites", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_UpdateSite_async", + "title": "AdBreakService updateSite Sample", + "origin": "API_DEFINITION", + "description": " API to update a `Site` object.", + "canonical": true, + "file": "site_service.update_site.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSite", + "fullName": "google.ads.admanager.v1.SiteService.UpdateSite", + "async": true, + "parameters": [ + { + "name": "site", + "type": ".google.ads.admanager.v1.Site" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.Site", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "UpdateSite", + "fullName": "google.ads.admanager.v1.SiteService.UpdateSite", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_BatchUpdateSites_async", + "title": "AdBreakService batchUpdateSites Sample", + "origin": "API_DEFINITION", + "description": " API to batch update `Site` objects.", + "canonical": true, + "file": "site_service.batch_update_sites.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchUpdateSites", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchUpdateSitesResponse", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "BatchUpdateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchUpdateSites", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_BatchDeactivateSites_async", + "title": "AdBreakService batchDeactivateSites Sample", + "origin": "API_DEFINITION", + "description": " Deactivates a list of `Site` objects.", + "canonical": true, + "file": "site_service.batch_deactivate_sites.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeactivateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchDeactivateSites", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchDeactivateSitesResponse", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "BatchDeactivateSites", + "fullName": "google.ads.admanager.v1.SiteService.BatchDeactivateSites", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_SiteService_BatchSubmitSitesForApproval_async", + "title": "AdBreakService batchSubmitSitesForApproval Sample", + "origin": "API_DEFINITION", + "description": " Submits a list of `Site` objects for approval.", + "canonical": true, + "file": "site_service.batch_submit_sites_for_approval.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchSubmitSitesForApproval", + "fullName": "google.ads.admanager.v1.SiteService.BatchSubmitSitesForApproval", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse", + "client": { + "shortName": "SiteServiceClient", + "fullName": "google.ads.admanager.v1.SiteServiceClient" + }, + "method": { + "shortName": "BatchSubmitSitesForApproval", + "fullName": "google.ads.admanager.v1.SiteService.BatchSubmitSitesForApproval", + "service": { + "shortName": "SiteService", + "fullName": "google.ads.admanager.v1.SiteService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TaxonomyCategoryService_GetTaxonomyCategory_async", + "title": "AdBreakService getTaxonomyCategory Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `TaxonomyCategory` object.", + "canonical": true, + "file": "taxonomy_category_service.get_taxonomy_category.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTaxonomyCategory", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.TaxonomyCategory", + "client": { + "shortName": "TaxonomyCategoryServiceClient", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryServiceClient" + }, + "method": { + "shortName": "GetTaxonomyCategory", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.GetTaxonomyCategory", + "service": { + "shortName": "TaxonomyCategoryService", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TaxonomyCategoryService_ListTaxonomyCategories_async", + "title": "AdBreakService listTaxonomyCategories Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `TaxonomyCategory` objects.", + "canonical": true, + "file": "taxonomy_category_service.list_taxonomy_categories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTaxonomyCategories", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategories", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListTaxonomyCategoriesResponse", + "client": { + "shortName": "TaxonomyCategoryServiceClient", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryServiceClient" + }, + "method": { + "shortName": "ListTaxonomyCategories", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService.ListTaxonomyCategories", + "service": { + "shortName": "TaxonomyCategoryService", + "fullName": "google.ads.admanager.v1.TaxonomyCategoryService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_GetTeam_async", + "title": "AdBreakService getTeam Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a `Team` object.", + "canonical": true, + "file": "team_service.get_team.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTeam", + "fullName": "google.ads.admanager.v1.TeamService.GetTeam", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.admanager.v1.Team", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "GetTeam", + "fullName": "google.ads.admanager.v1.TeamService.GetTeam", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_ListTeams_async", + "title": "AdBreakService listTeams Sample", + "origin": "API_DEFINITION", + "description": " API to retrieve a list of `Team` objects.", + "canonical": true, + "file": "team_service.list_teams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTeams", + "fullName": "google.ads.admanager.v1.TeamService.ListTeams", + "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" + }, + { + "name": "skip", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ads.admanager.v1.ListTeamsResponse", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "ListTeams", + "fullName": "google.ads.admanager.v1.TeamService.ListTeams", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_CreateTeam_async", + "title": "AdBreakService createTeam Sample", + "origin": "API_DEFINITION", + "description": " API to create a `Team` object.", + "canonical": true, + "file": "team_service.create_team.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTeam", + "fullName": "google.ads.admanager.v1.TeamService.CreateTeam", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "team", + "type": ".google.ads.admanager.v1.Team" + } + ], + "resultType": ".google.ads.admanager.v1.Team", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "CreateTeam", + "fullName": "google.ads.admanager.v1.TeamService.CreateTeam", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_BatchCreateTeams_async", + "title": "AdBreakService batchCreateTeams Sample", + "origin": "API_DEFINITION", + "description": " API to batch create `Team` objects.", + "canonical": true, + "file": "team_service.batch_create_teams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchCreateTeams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchCreateTeamsResponse", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "BatchCreateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchCreateTeams", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_UpdateTeam_async", + "title": "AdBreakService updateTeam Sample", + "origin": "API_DEFINITION", + "description": " API to update a `Team` object.", + "canonical": true, + "file": "team_service.update_team.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTeam", + "fullName": "google.ads.admanager.v1.TeamService.UpdateTeam", + "async": true, + "parameters": [ + { + "name": "team", + "type": ".google.ads.admanager.v1.Team" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.admanager.v1.Team", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "UpdateTeam", + "fullName": "google.ads.admanager.v1.TeamService.UpdateTeam", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_BatchUpdateTeams_async", + "title": "AdBreakService batchUpdateTeams Sample", + "origin": "API_DEFINITION", + "description": " API to batch update `Team` objects.", + "canonical": true, + "file": "team_service.batch_update_teams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchUpdateTeams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchUpdateTeamsResponse", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "BatchUpdateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchUpdateTeams", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_BatchActivateTeams_async", + "title": "AdBreakService batchActivateTeams Sample", + "origin": "API_DEFINITION", + "description": " API to batch activate `Team` objects.", + "canonical": true, + "file": "team_service.batch_activate_teams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchActivateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchActivateTeams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchActivateTeamsResponse", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "BatchActivateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchActivateTeams", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" + } + } + } + }, + { + "regionTag": "admanager_v1_generated_TeamService_BatchDeactivateTeams_async", + "title": "AdBreakService batchDeactivateTeams Sample", + "origin": "API_DEFINITION", + "description": " API to batch deactivate `Team` objects.", + "canonical": true, + "file": "team_service.batch_deactivate_teams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeactivateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchDeactivateTeams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ads.admanager.v1.BatchDeactivateTeamsResponse", + "client": { + "shortName": "TeamServiceClient", + "fullName": "google.ads.admanager.v1.TeamServiceClient" + }, + "method": { + "shortName": "BatchDeactivateTeams", + "fullName": "google.ads.admanager.v1.TeamService.BatchDeactivateTeams", + "service": { + "shortName": "TeamService", + "fullName": "google.ads.admanager.v1.TeamService" } } } diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.batch_activate_teams.js b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_activate_teams.js new file mode 100644 index 000000000000..924e6e3890c6 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_activate_teams.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_TeamService_BatchActivateTeams_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callBatchActivateTeams() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchActivateTeams(request); + console.log(response); + } + + callBatchActivateTeams(); + // [END admanager_v1_generated_TeamService_BatchActivateTeams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.batch_create_teams.js b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_create_teams.js new file mode 100644 index 000000000000..38dca1c04c32 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_create_teams.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_TeamService_BatchCreateTeams_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callBatchCreateTeams() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchCreateTeams(request); + console.log(response); + } + + callBatchCreateTeams(); + // [END admanager_v1_generated_TeamService_BatchCreateTeams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.batch_deactivate_teams.js b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_deactivate_teams.js new file mode 100644 index 000000000000..64e496e0798a --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_deactivate_teams.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, names) { + // [START admanager_v1_generated_TeamService_BatchDeactivateTeams_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. Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + */ + // const names = ['abc','def'] + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callBatchDeactivateTeams() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await admanagerClient.batchDeactivateTeams(request); + console.log(response); + } + + callBatchDeactivateTeams(); + // [END admanager_v1_generated_TeamService_BatchDeactivateTeams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.batch_update_teams.js b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_update_teams.js new file mode 100644 index 000000000000..c6cc80466b3d --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.batch_update_teams.js @@ -0,0 +1,70 @@ +// Copyright 2025 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, requests) { + // [START admanager_v1_generated_TeamService_BatchUpdateTeams_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + */ + // const parent = 'abc123' + /** + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + */ + // const requests = [1,2,3,4] + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callBatchUpdateTeams() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await admanagerClient.batchUpdateTeams(request); + console.log(response); + } + + callBatchUpdateTeams(); + // [END admanager_v1_generated_TeamService_BatchUpdateTeams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.create_team.js b/packages/google-ads-admanager/samples/generated/v1/team_service.create_team.js new file mode 100644 index 000000000000..07134164b30e --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.create_team.js @@ -0,0 +1,67 @@ +// Copyright 2025 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, team) { + // [START admanager_v1_generated_TeamService_CreateTeam_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Required. The `Team` to create. + */ + // const team = {} + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callCreateTeam() { + // Construct request + const request = { + parent, + team, + }; + + // Run request + const response = await admanagerClient.createTeam(request); + console.log(response); + } + + callCreateTeam(); + // [END admanager_v1_generated_TeamService_CreateTeam_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.get_team.js b/packages/google-ads-admanager/samples/generated/v1/team_service.get_team.js new file mode 100644 index 000000000000..a2f615b18e38 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.get_team.js @@ -0,0 +1,62 @@ +// Copyright 2025 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 admanager_v1_generated_TeamService_GetTeam_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 resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + */ + // const name = 'abc123' + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callGetTeam() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await admanagerClient.getTeam(request); + console.log(response); + } + + callGetTeam(); + // [END admanager_v1_generated_TeamService_GetTeam_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.list_teams.js b/packages/google-ads-admanager/samples/generated/v1/team_service.list_teams.js new file mode 100644 index 000000000000..c3cc016d42ec --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.list_teams.js @@ -0,0 +1,94 @@ +// Copyright 2025 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 admanager_v1_generated_TeamService_ListTeams_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + */ + // const filter = 'abc123' + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + */ + // const orderBy = 'abc123' + /** + * Optional. Number of individual resources to skip while paginating. + */ + // const skip = 1234 + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callListTeams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = admanagerClient.listTeamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTeams(); + // [END admanager_v1_generated_TeamService_ListTeams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/generated/v1/team_service.update_team.js b/packages/google-ads-admanager/samples/generated/v1/team_service.update_team.js new file mode 100644 index 000000000000..2307f9f6c366 --- /dev/null +++ b/packages/google-ads-admanager/samples/generated/v1/team_service.update_team.js @@ -0,0 +1,67 @@ +// Copyright 2025 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(team, updateMask) { + // [START admanager_v1_generated_TeamService_UpdateTeam_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 `Team` to update. + * The `Team`'s `name` is used to identify the `Team` to update. + */ + // const team = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Admanager library + const {TeamServiceClient} = require('@google-ads/admanager').v1; + + // Instantiates a client + const admanagerClient = new TeamServiceClient(); + + async function callUpdateTeam() { + // Construct request + const request = { + team, + updateMask, + }; + + // Run request + const response = await admanagerClient.updateTeam(request); + console.log(response); + } + + callUpdateTeam(); + // [END admanager_v1_generated_TeamService_UpdateTeam_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-admanager/samples/package.json b/packages/google-ads-admanager/samples/package.json index e596a30dcf93..15984c23fe6f 100644 --- a/packages/google-ads-admanager/samples/package.json +++ b/packages/google-ads-admanager/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ads/admanager": "^0.4.1" + "@google-ads/admanager": "^0.5.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-ads-admanager/src/index.ts b/packages/google-ads-admanager/src/index.ts index aadad32d4641..d2dd2b38e1fb 100644 --- a/packages/google-ads-admanager/src/index.ts +++ b/packages/google-ads-admanager/src/index.ts @@ -20,24 +20,58 @@ import * as v1 from './v1'; const AdBreakServiceClient = v1.AdBreakServiceClient; type AdBreakServiceClient = v1.AdBreakServiceClient; +const AdReviewCenterAdServiceClient = v1.AdReviewCenterAdServiceClient; +type AdReviewCenterAdServiceClient = v1.AdReviewCenterAdServiceClient; const AdUnitServiceClient = v1.AdUnitServiceClient; type AdUnitServiceClient = v1.AdUnitServiceClient; +const ApplicationServiceClient = v1.ApplicationServiceClient; +type ApplicationServiceClient = v1.ApplicationServiceClient; +const AudienceSegmentServiceClient = v1.AudienceSegmentServiceClient; +type AudienceSegmentServiceClient = v1.AudienceSegmentServiceClient; const BandwidthGroupServiceClient = v1.BandwidthGroupServiceClient; type BandwidthGroupServiceClient = v1.BandwidthGroupServiceClient; +const BrowserLanguageServiceClient = v1.BrowserLanguageServiceClient; +type BrowserLanguageServiceClient = v1.BrowserLanguageServiceClient; +const BrowserServiceClient = v1.BrowserServiceClient; +type BrowserServiceClient = v1.BrowserServiceClient; +const CmsMetadataKeyServiceClient = v1.CmsMetadataKeyServiceClient; +type CmsMetadataKeyServiceClient = v1.CmsMetadataKeyServiceClient; +const CmsMetadataValueServiceClient = v1.CmsMetadataValueServiceClient; +type CmsMetadataValueServiceClient = v1.CmsMetadataValueServiceClient; const CompanyServiceClient = v1.CompanyServiceClient; type CompanyServiceClient = v1.CompanyServiceClient; +const ContactServiceClient = v1.ContactServiceClient; +type ContactServiceClient = v1.ContactServiceClient; +const ContentBundleServiceClient = v1.ContentBundleServiceClient; +type ContentBundleServiceClient = v1.ContentBundleServiceClient; +const ContentLabelServiceClient = v1.ContentLabelServiceClient; +type ContentLabelServiceClient = v1.ContentLabelServiceClient; +const ContentServiceClient = v1.ContentServiceClient; +type ContentServiceClient = v1.ContentServiceClient; +const CreativeTemplateServiceClient = v1.CreativeTemplateServiceClient; +type CreativeTemplateServiceClient = v1.CreativeTemplateServiceClient; const CustomFieldServiceClient = v1.CustomFieldServiceClient; type CustomFieldServiceClient = v1.CustomFieldServiceClient; const CustomTargetingKeyServiceClient = v1.CustomTargetingKeyServiceClient; type CustomTargetingKeyServiceClient = v1.CustomTargetingKeyServiceClient; const CustomTargetingValueServiceClient = v1.CustomTargetingValueServiceClient; type CustomTargetingValueServiceClient = v1.CustomTargetingValueServiceClient; +const DeviceCapabilityServiceClient = v1.DeviceCapabilityServiceClient; +type DeviceCapabilityServiceClient = v1.DeviceCapabilityServiceClient; const DeviceCategoryServiceClient = v1.DeviceCategoryServiceClient; type DeviceCategoryServiceClient = v1.DeviceCategoryServiceClient; +const DeviceManufacturerServiceClient = v1.DeviceManufacturerServiceClient; +type DeviceManufacturerServiceClient = v1.DeviceManufacturerServiceClient; const EntitySignalsMappingServiceClient = v1.EntitySignalsMappingServiceClient; type EntitySignalsMappingServiceClient = v1.EntitySignalsMappingServiceClient; const GeoTargetServiceClient = v1.GeoTargetServiceClient; type GeoTargetServiceClient = v1.GeoTargetServiceClient; +const MobileCarrierServiceClient = v1.MobileCarrierServiceClient; +type MobileCarrierServiceClient = v1.MobileCarrierServiceClient; +const MobileDeviceServiceClient = v1.MobileDeviceServiceClient; +type MobileDeviceServiceClient = v1.MobileDeviceServiceClient; +const MobileDeviceSubmodelServiceClient = v1.MobileDeviceSubmodelServiceClient; +type MobileDeviceSubmodelServiceClient = v1.MobileDeviceSubmodelServiceClient; const NetworkServiceClient = v1.NetworkServiceClient; type NetworkServiceClient = v1.NetworkServiceClient; const OperatingSystemServiceClient = v1.OperatingSystemServiceClient; @@ -58,12 +92,16 @@ const ReportServiceClient = v1.ReportServiceClient; type ReportServiceClient = v1.ReportServiceClient; const RoleServiceClient = v1.RoleServiceClient; type RoleServiceClient = v1.RoleServiceClient; +const SiteServiceClient = v1.SiteServiceClient; +type SiteServiceClient = v1.SiteServiceClient; const TaxonomyCategoryServiceClient = v1.TaxonomyCategoryServiceClient; type TaxonomyCategoryServiceClient = v1.TaxonomyCategoryServiceClient; +const TeamServiceClient = v1.TeamServiceClient; +type TeamServiceClient = v1.TeamServiceClient; const UserServiceClient = v1.UserServiceClient; type UserServiceClient = v1.UserServiceClient; -export {v1, AdBreakServiceClient, AdUnitServiceClient, BandwidthGroupServiceClient, CompanyServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCategoryServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, TaxonomyCategoryServiceClient, UserServiceClient}; -export default {v1, AdBreakServiceClient, AdUnitServiceClient, BandwidthGroupServiceClient, CompanyServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCategoryServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, TaxonomyCategoryServiceClient, UserServiceClient}; +export {v1, AdBreakServiceClient, AdReviewCenterAdServiceClient, AdUnitServiceClient, ApplicationServiceClient, AudienceSegmentServiceClient, BandwidthGroupServiceClient, BrowserLanguageServiceClient, BrowserServiceClient, CmsMetadataKeyServiceClient, CmsMetadataValueServiceClient, CompanyServiceClient, ContactServiceClient, ContentBundleServiceClient, ContentLabelServiceClient, ContentServiceClient, CreativeTemplateServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCapabilityServiceClient, DeviceCategoryServiceClient, DeviceManufacturerServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, MobileCarrierServiceClient, MobileDeviceServiceClient, MobileDeviceSubmodelServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, SiteServiceClient, TaxonomyCategoryServiceClient, TeamServiceClient, UserServiceClient}; +export default {v1, AdBreakServiceClient, AdReviewCenterAdServiceClient, AdUnitServiceClient, ApplicationServiceClient, AudienceSegmentServiceClient, BandwidthGroupServiceClient, BrowserLanguageServiceClient, BrowserServiceClient, CmsMetadataKeyServiceClient, CmsMetadataValueServiceClient, CompanyServiceClient, ContactServiceClient, ContentBundleServiceClient, ContentLabelServiceClient, ContentServiceClient, CreativeTemplateServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCapabilityServiceClient, DeviceCategoryServiceClient, DeviceManufacturerServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, MobileCarrierServiceClient, MobileDeviceServiceClient, MobileDeviceSubmodelServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, SiteServiceClient, TaxonomyCategoryServiceClient, TeamServiceClient, UserServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-ads-admanager/src/v1/ad_break_service_client.ts b/packages/google-ads-admanager/src/v1/ad_break_service_client.ts index e3d7c8f6c57c..e667ef62100c 100644 --- a/packages/google-ads-admanager/src/v1/ad_break_service_client.ts +++ b/packages/google-ads-admanager/src/v1/ad_break_service_client.ts @@ -186,18 +186,51 @@ export class AdBreakServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class AdBreakServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class AdBreakServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class AdBreakServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class AdBreakServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -1160,6 +1214,55 @@ export class AdBreakServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1196,6 +1299,78 @@ export class AdBreakServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1232,6 +1407,150 @@ export class AdBreakServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1304,6 +1623,150 @@ export class AdBreakServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1412,6 +1875,42 @@ export class AdBreakServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1448,6 +1947,42 @@ export class AdBreakServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1592,6 +2127,114 @@ export class AdBreakServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1939,6 +2582,42 @@ export class AdBreakServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -2047,6 +2726,42 @@ export class AdBreakServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/ad_break_service_proto_list.json b/packages/google-ads-admanager/src/v1/ad_break_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/ad_break_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/ad_break_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client.ts b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client.ts new file mode 100644 index 000000000000..c346c12dc7a0 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client.ts @@ -0,0 +1,2902 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/ad_review_center_ad_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './ad_review_center_ad_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling AdReviewCenterAd objects. + * @class + * @memberof v1 + */ +export class AdReviewCenterAdServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + adReviewCenterAdServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AdReviewCenterAdServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AdReviewCenterAdServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AdReviewCenterAdServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + searchAdReviewCenterAds: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'adReviewCenterAds') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=networks/*/operations/reports/runs/*}',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const batchAllowAdReviewCenterAdsResponse = protoFilesRoot.lookup( + '.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse') as gax.protobuf.Type; + const batchAllowAdReviewCenterAdsMetadata = protoFilesRoot.lookup( + '.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata') as gax.protobuf.Type; + const batchBlockAdReviewCenterAdsResponse = protoFilesRoot.lookup( + '.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse') as gax.protobuf.Type; + const batchBlockAdReviewCenterAdsMetadata = protoFilesRoot.lookup( + '.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + batchAllowAdReviewCenterAds: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + batchAllowAdReviewCenterAdsResponse.decode.bind(batchAllowAdReviewCenterAdsResponse), + batchAllowAdReviewCenterAdsMetadata.decode.bind(batchAllowAdReviewCenterAdsMetadata)), + batchBlockAdReviewCenterAds: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + batchBlockAdReviewCenterAdsResponse.decode.bind(batchBlockAdReviewCenterAdsResponse), + batchBlockAdReviewCenterAdsMetadata.decode.bind(batchBlockAdReviewCenterAdsMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.AdReviewCenterAdService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.adReviewCenterAdServiceStub) { + return this.adReviewCenterAdServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.AdReviewCenterAdService. + this.adReviewCenterAdServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.AdReviewCenterAdService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.AdReviewCenterAdService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const adReviewCenterAdServiceStubMethods = + ['searchAdReviewCenterAds', 'batchAllowAdReviewCenterAds', 'batchBlockAdReviewCenterAds']; + for (const methodName of adReviewCenterAdServiceStubMethods) { + const callPromise = this.adReviewCenterAdServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.adReviewCenterAdServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + +/** + * API to batch allow AdReviewCenterAds. + * This method supports partial success. Some operations may succeed while + * others fail. Callers should check the failedRequests field in the response + * to determine which operations failed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * @param {string[]} request.names + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js + * region_tag:admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_async + */ + batchAllowAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + batchAllowAdReviewCenterAds( + request: protos.google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchAllowAdReviewCenterAds( + request: protos.google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchAllowAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.IBatchAllowAdReviewCenterAdsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('batchAllowAdReviewCenterAds response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('batchAllowAdReviewCenterAds request %j', request); + return this.innerApiCalls.batchAllowAdReviewCenterAds(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('batchAllowAdReviewCenterAds response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `batchAllowAdReviewCenterAds()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ad_review_center_ad_service.batch_allow_ad_review_center_ads.js + * region_tag:admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_async + */ + async checkBatchAllowAdReviewCenterAdsProgress(name: string): Promise>{ + this._log.info('batchAllowAdReviewCenterAds long-running'); + 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.batchAllowAdReviewCenterAds, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * API to batch block AdReviewCenterAds. + * This method supports partial success. Some operations may succeed while + * others fail. Callers should check the failedRequests field in the response + * to determine which operations failed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * @param {string[]} request.names + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js + * region_tag:admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_async + */ + batchBlockAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + batchBlockAdReviewCenterAds( + request: protos.google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchBlockAdReviewCenterAds( + request: protos.google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + batchBlockAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.IBatchBlockAdReviewCenterAdsRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('batchBlockAdReviewCenterAds response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('batchBlockAdReviewCenterAds request %j', request); + return this.innerApiCalls.batchBlockAdReviewCenterAds(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('batchBlockAdReviewCenterAds response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `batchBlockAdReviewCenterAds()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ad_review_center_ad_service.batch_block_ad_review_center_ads.js + * region_tag:admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_async + */ + async checkBatchBlockAdReviewCenterAdsProgress(name: string): Promise>{ + this._log.info('batchBlockAdReviewCenterAds long-running'); + 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.batchBlockAdReviewCenterAds, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * API to search for AdReviewCenterAds. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * @param {number} [request.pageSize] + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * @param {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus} request.status + * Required. Only return ads with the given status. + * @param {string[]} [request.adReviewCenterAdId] + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * @param {google.type.Interval} [request.dateTimeRange] + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * @param {string[]} [request.searchText] + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * @param {number[]} [request.buyerAccountId] + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * @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 protos.google.ads.admanager.v1.AdReviewCenterAd|AdReviewCenterAd}. + * 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 `searchAdReviewCenterAdsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + searchAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IAdReviewCenterAd[], + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest|null, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse + ]>; + searchAdReviewCenterAds( + request: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse|null|undefined, + protos.google.ads.admanager.v1.IAdReviewCenterAd>): void; + searchAdReviewCenterAds( + request: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse|null|undefined, + protos.google.ads.admanager.v1.IAdReviewCenterAd>): void; + searchAdReviewCenterAds( + request?: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse|null|undefined, + protos.google.ads.admanager.v1.IAdReviewCenterAd>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse|null|undefined, + protos.google.ads.admanager.v1.IAdReviewCenterAd>): + Promise<[ + protos.google.ads.admanager.v1.IAdReviewCenterAd[], + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest|null, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse|null|undefined, + protos.google.ads.admanager.v1.IAdReviewCenterAd>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('searchAdReviewCenterAds values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('searchAdReviewCenterAds request %j', request); + return this.innerApiCalls + .searchAdReviewCenterAds(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IAdReviewCenterAd[], + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest|null, + protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsResponse + ]) => { + this._log.info('searchAdReviewCenterAds values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `searchAdReviewCenterAds`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * @param {number} [request.pageSize] + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * @param {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus} request.status + * Required. Only return ads with the given status. + * @param {string[]} [request.adReviewCenterAdId] + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * @param {google.type.Interval} [request.dateTimeRange] + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * @param {string[]} [request.searchText] + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * @param {number[]} [request.buyerAccountId] + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * @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 protos.google.ads.admanager.v1.AdReviewCenterAd|AdReviewCenterAd} 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 `searchAdReviewCenterAdsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + searchAdReviewCenterAdsStream( + request?: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + 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['searchAdReviewCenterAds']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('searchAdReviewCenterAds stream %j', request); + return this.descriptors.page.searchAdReviewCenterAds.createStream( + this.innerApiCalls.searchAdReviewCenterAds as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `searchAdReviewCenterAds`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * @param {number} [request.pageSize] + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * @param {google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus} request.status + * Required. Only return ads with the given status. + * @param {string[]} [request.adReviewCenterAdId] + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * @param {google.type.Interval} [request.dateTimeRange] + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * @param {string[]} [request.searchText] + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * @param {number[]} [request.buyerAccountId] + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.AdReviewCenterAd|AdReviewCenterAd}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ad_review_center_ad_service.search_ad_review_center_ads.js + * region_tag:admanager_v1_generated_AdReviewCenterAdService_SearchAdReviewCenterAds_async + */ + searchAdReviewCenterAdsAsync( + request?: protos.google.ads.admanager.v1.ISearchAdReviewCenterAdsRequest, + 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['searchAdReviewCenterAds']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('searchAdReviewCenterAds iterate %j', request); + return this.descriptors.page.searchAdReviewCenterAds.asyncIterate( + this.innerApiCalls['searchAdReviewCenterAds'] 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, + optionsOrCallback?: + | 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]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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 { + 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 ?? '', + }); + 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, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + 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, + optionsOrCallback?: + | 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 { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.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 ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.adReviewCenterAdServiceStub && !this._terminated) { + return this.adReviewCenterAdServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client_config.json b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client_config.json new file mode 100644 index 000000000000..d03cf39924df --- /dev/null +++ b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_client_config.json @@ -0,0 +1,38 @@ +{ + "interfaces": { + "google.ads.admanager.v1.AdReviewCenterAdService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "SearchAdReviewCenterAds": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchAllowAdReviewCenterAds": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchBlockAdReviewCenterAds": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_proto_list.json b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/ad_review_center_ad_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts b/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts index 75cd1c342fa2..e5725c892ae2 100644 --- a/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts +++ b/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts @@ -186,18 +186,51 @@ export class AdUnitServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class AdUnitServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class AdUnitServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class AdUnitServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class AdUnitServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -526,8 +580,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnits` call. * Provide this to retrieve the subsequent page. @@ -642,8 +696,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnits` call. * Provide this to retrieve the subsequent page. @@ -707,8 +761,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnits` call. * Provide this to retrieve the subsequent page. @@ -771,8 +825,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnitSizes` call. * Provide this to retrieve the subsequent page. @@ -887,8 +941,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnitSizes` call. * Provide this to retrieve the subsequent page. @@ -952,8 +1006,8 @@ export class AdUnitServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListAdUnitSizes` call. * Provide this to retrieve the subsequent page. @@ -1058,6 +1112,55 @@ export class AdUnitServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1094,6 +1197,78 @@ export class AdUnitServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1130,6 +1305,150 @@ export class AdUnitServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1202,6 +1521,150 @@ export class AdUnitServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1310,6 +1773,42 @@ export class AdUnitServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1346,6 +1845,42 @@ export class AdUnitServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1490,6 +2025,114 @@ export class AdUnitServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1837,6 +2480,42 @@ export class AdUnitServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1945,6 +2624,42 @@ export class AdUnitServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/ad_unit_service_proto_list.json b/packages/google-ads-admanager/src/v1/ad_unit_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/ad_unit_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/ad_unit_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/application_service_client.ts b/packages/google-ads-admanager/src/v1/application_service_client.ts new file mode 100644 index 000000000000..02f3894f2391 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/application_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/application_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './application_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Application` objects. + * @class + * @memberof v1 + */ +export class ApplicationServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + applicationServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ApplicationServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ApplicationServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ApplicationServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listApplications: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'applications') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.ApplicationService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.applicationServiceStub) { + return this.applicationServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.ApplicationService. + this.applicationServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.ApplicationService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.ApplicationService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const applicationServiceStubMethods = + ['getApplication', 'listApplications']; + for (const methodName of applicationServiceStubMethods) { + const callPromise = this.applicationServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.applicationServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Application` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_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 protos.google.ads.admanager.v1.Application|Application}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/application_service.get_application.js + * region_tag:admanager_v1_generated_ApplicationService_GetApplication_async + */ + getApplication( + request?: protos.google.ads.admanager.v1.IGetApplicationRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|undefined, {}|undefined + ]>; + getApplication( + request: protos.google.ads.admanager.v1.IGetApplicationRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|null|undefined, + {}|null|undefined>): void; + getApplication( + request: protos.google.ads.admanager.v1.IGetApplicationRequest, + callback: Callback< + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|null|undefined, + {}|null|undefined>): void; + getApplication( + request?: protos.google.ads.admanager.v1.IGetApplicationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|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().catch(err => {throw err}); + this._log.info('getApplication request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getApplication response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getApplication(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IApplication, + protos.google.ads.admanager.v1.IGetApplicationRequest|undefined, + {}|undefined + ]) => { + this._log.info('getApplication response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Application` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Application|Application}. + * 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 `listApplicationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listApplications( + request?: protos.google.ads.admanager.v1.IListApplicationsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IApplication[], + protos.google.ads.admanager.v1.IListApplicationsRequest|null, + protos.google.ads.admanager.v1.IListApplicationsResponse + ]>; + listApplications( + request: protos.google.ads.admanager.v1.IListApplicationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListApplicationsRequest, + protos.google.ads.admanager.v1.IListApplicationsResponse|null|undefined, + protos.google.ads.admanager.v1.IApplication>): void; + listApplications( + request: protos.google.ads.admanager.v1.IListApplicationsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListApplicationsRequest, + protos.google.ads.admanager.v1.IListApplicationsResponse|null|undefined, + protos.google.ads.admanager.v1.IApplication>): void; + listApplications( + request?: protos.google.ads.admanager.v1.IListApplicationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListApplicationsRequest, + protos.google.ads.admanager.v1.IListApplicationsResponse|null|undefined, + protos.google.ads.admanager.v1.IApplication>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListApplicationsRequest, + protos.google.ads.admanager.v1.IListApplicationsResponse|null|undefined, + protos.google.ads.admanager.v1.IApplication>): + Promise<[ + protos.google.ads.admanager.v1.IApplication[], + protos.google.ads.admanager.v1.IListApplicationsRequest|null, + protos.google.ads.admanager.v1.IListApplicationsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListApplicationsRequest, + protos.google.ads.admanager.v1.IListApplicationsResponse|null|undefined, + protos.google.ads.admanager.v1.IApplication>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listApplications values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listApplications request %j', request); + return this.innerApiCalls + .listApplications(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IApplication[], + protos.google.ads.admanager.v1.IListApplicationsRequest|null, + protos.google.ads.admanager.v1.IListApplicationsResponse + ]) => { + this._log.info('listApplications values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listApplications`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Application|Application} 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 `listApplicationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listApplicationsStream( + request?: protos.google.ads.admanager.v1.IListApplicationsRequest, + 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['listApplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listApplications stream %j', request); + return this.descriptors.page.listApplications.createStream( + this.innerApiCalls.listApplications as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listApplications`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Application|Application}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/application_service.list_applications.js + * region_tag:admanager_v1_generated_ApplicationService_ListApplications_async + */ + listApplicationsAsync( + request?: protos.google.ads.admanager.v1.IListApplicationsRequest, + 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['listApplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listApplications iterate %j', request); + return this.descriptors.page.listApplications.asyncIterate( + this.innerApiCalls['listApplications'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.applicationServiceStub && !this._terminated) { + return this.applicationServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/application_service_client_config.json b/packages/google-ads-admanager/src/v1/application_service_client_config.json new file mode 100644 index 000000000000..cce31471dcbe --- /dev/null +++ b/packages/google-ads-admanager/src/v1/application_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ApplicationService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetApplication": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListApplications": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/application_service_proto_list.json b/packages/google-ads-admanager/src/v1/application_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/application_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/audience_segment_service_client.ts b/packages/google-ads-admanager/src/v1/audience_segment_service_client.ts new file mode 100644 index 000000000000..241f5c414368 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/audience_segment_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/audience_segment_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './audience_segment_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `AudienceSegment` objects. + * @class + * @memberof v1 + */ +export class AudienceSegmentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + audienceSegmentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AudienceSegmentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AudienceSegmentServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AudienceSegmentServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceSegments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceSegments') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.AudienceSegmentService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.audienceSegmentServiceStub) { + return this.audienceSegmentServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.AudienceSegmentService. + this.audienceSegmentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.AudienceSegmentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.AudienceSegmentService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const audienceSegmentServiceStubMethods = + ['getAudienceSegment', 'listAudienceSegments']; + for (const methodName of audienceSegmentServiceStubMethods) { + const callPromise = this.audienceSegmentServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.audienceSegmentServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve an `AudienceSegment` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_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 protos.google.ads.admanager.v1.AudienceSegment|AudienceSegment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audience_segment_service.get_audience_segment.js + * region_tag:admanager_v1_generated_AudienceSegmentService_GetAudienceSegment_async + */ + getAudienceSegment( + request?: protos.google.ads.admanager.v1.IGetAudienceSegmentRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|undefined, {}|undefined + ]>; + getAudienceSegment( + request: protos.google.ads.admanager.v1.IGetAudienceSegmentRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|null|undefined, + {}|null|undefined>): void; + getAudienceSegment( + request: protos.google.ads.admanager.v1.IGetAudienceSegmentRequest, + callback: Callback< + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|null|undefined, + {}|null|undefined>): void; + getAudienceSegment( + request?: protos.google.ads.admanager.v1.IGetAudienceSegmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|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().catch(err => {throw err}); + this._log.info('getAudienceSegment request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceSegment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceSegment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IAudienceSegment, + protos.google.ads.admanager.v1.IGetAudienceSegmentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceSegment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `AudienceSegment` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.AudienceSegment|AudienceSegment}. + * 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 `listAudienceSegmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceSegments( + request?: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IAudienceSegment[], + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest|null, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse + ]>; + listAudienceSegments( + request: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse|null|undefined, + protos.google.ads.admanager.v1.IAudienceSegment>): void; + listAudienceSegments( + request: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse|null|undefined, + protos.google.ads.admanager.v1.IAudienceSegment>): void; + listAudienceSegments( + request?: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse|null|undefined, + protos.google.ads.admanager.v1.IAudienceSegment>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse|null|undefined, + protos.google.ads.admanager.v1.IAudienceSegment>): + Promise<[ + protos.google.ads.admanager.v1.IAudienceSegment[], + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest|null, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse|null|undefined, + protos.google.ads.admanager.v1.IAudienceSegment>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceSegments values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceSegments request %j', request); + return this.innerApiCalls + .listAudienceSegments(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IAudienceSegment[], + protos.google.ads.admanager.v1.IListAudienceSegmentsRequest|null, + protos.google.ads.admanager.v1.IListAudienceSegmentsResponse + ]) => { + this._log.info('listAudienceSegments values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceSegments`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.AudienceSegment|AudienceSegment} 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 `listAudienceSegmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceSegmentsStream( + request?: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + 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['listAudienceSegments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceSegments stream %j', request); + return this.descriptors.page.listAudienceSegments.createStream( + this.innerApiCalls.listAudienceSegments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceSegments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.AudienceSegment|AudienceSegment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audience_segment_service.list_audience_segments.js + * region_tag:admanager_v1_generated_AudienceSegmentService_ListAudienceSegments_async + */ + listAudienceSegmentsAsync( + request?: protos.google.ads.admanager.v1.IListAudienceSegmentsRequest, + 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['listAudienceSegments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceSegments iterate %j', request); + return this.descriptors.page.listAudienceSegments.asyncIterate( + this.innerApiCalls['listAudienceSegments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.audienceSegmentServiceStub && !this._terminated) { + return this.audienceSegmentServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/audience_segment_service_client_config.json b/packages/google-ads-admanager/src/v1/audience_segment_service_client_config.json new file mode 100644 index 000000000000..45b0378982de --- /dev/null +++ b/packages/google-ads-admanager/src/v1/audience_segment_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.AudienceSegmentService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAudienceSegment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAudienceSegments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/audience_segment_service_proto_list.json b/packages/google-ads-admanager/src/v1/audience_segment_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/audience_segment_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/bandwidth_group_service_client.ts b/packages/google-ads-admanager/src/v1/bandwidth_group_service_client.ts index 0a5533852032..da8a3425a888 100644 --- a/packages/google-ads-admanager/src/v1/bandwidth_group_service_client.ts +++ b/packages/google-ads-admanager/src/v1/bandwidth_group_service_client.ts @@ -186,18 +186,51 @@ export class BandwidthGroupServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class BandwidthGroupServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class BandwidthGroupServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class BandwidthGroupServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class BandwidthGroupServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -524,8 +578,8 @@ export class BandwidthGroupServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListBandwidthGroups` * call. Provide this to retrieve the subsequent page. @@ -640,8 +694,8 @@ export class BandwidthGroupServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListBandwidthGroups` * call. Provide this to retrieve the subsequent page. @@ -705,8 +759,8 @@ export class BandwidthGroupServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListBandwidthGroups` * call. Provide this to retrieve the subsequent page. @@ -811,6 +865,55 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class BandwidthGroupServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/bandwidth_group_service_proto_list.json b/packages/google-ads-admanager/src/v1/bandwidth_group_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/bandwidth_group_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/bandwidth_group_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/browser_language_service_client.ts b/packages/google-ads-admanager/src/v1/browser_language_service_client.ts new file mode 100644 index 000000000000..7ff369f27256 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_language_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/browser_language_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './browser_language_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `BrowserLanguage` objects. + * @class + * @memberof v1 + */ +export class BrowserLanguageServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + browserLanguageServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BrowserLanguageServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BrowserLanguageServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BrowserLanguageServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listBrowserLanguages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'browserLanguages') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.BrowserLanguageService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.browserLanguageServiceStub) { + return this.browserLanguageServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.BrowserLanguageService. + this.browserLanguageServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.BrowserLanguageService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.BrowserLanguageService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const browserLanguageServiceStubMethods = + ['getBrowserLanguage', 'listBrowserLanguages']; + for (const methodName of browserLanguageServiceStubMethods) { + const callPromise = this.browserLanguageServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.browserLanguageServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `BrowserLanguage` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_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 protos.google.ads.admanager.v1.BrowserLanguage|BrowserLanguage}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/browser_language_service.get_browser_language.js + * region_tag:admanager_v1_generated_BrowserLanguageService_GetBrowserLanguage_async + */ + getBrowserLanguage( + request?: protos.google.ads.admanager.v1.IGetBrowserLanguageRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|undefined, {}|undefined + ]>; + getBrowserLanguage( + request: protos.google.ads.admanager.v1.IGetBrowserLanguageRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|null|undefined, + {}|null|undefined>): void; + getBrowserLanguage( + request: protos.google.ads.admanager.v1.IGetBrowserLanguageRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|null|undefined, + {}|null|undefined>): void; + getBrowserLanguage( + request?: protos.google.ads.admanager.v1.IGetBrowserLanguageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|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().catch(err => {throw err}); + this._log.info('getBrowserLanguage request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBrowserLanguage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getBrowserLanguage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBrowserLanguage, + protos.google.ads.admanager.v1.IGetBrowserLanguageRequest|undefined, + {}|undefined + ]) => { + this._log.info('getBrowserLanguage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `BrowserLanguage` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.BrowserLanguage|BrowserLanguage}. + * 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 `listBrowserLanguagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBrowserLanguages( + request?: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBrowserLanguage[], + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest|null, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse + ]>; + listBrowserLanguages( + request: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowserLanguage>): void; + listBrowserLanguages( + request: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowserLanguage>): void; + listBrowserLanguages( + request?: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowserLanguage>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowserLanguage>): + Promise<[ + protos.google.ads.admanager.v1.IBrowserLanguage[], + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest|null, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowserLanguage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBrowserLanguages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBrowserLanguages request %j', request); + return this.innerApiCalls + .listBrowserLanguages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IBrowserLanguage[], + protos.google.ads.admanager.v1.IListBrowserLanguagesRequest|null, + protos.google.ads.admanager.v1.IListBrowserLanguagesResponse + ]) => { + this._log.info('listBrowserLanguages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listBrowserLanguages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.BrowserLanguage|BrowserLanguage} 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 `listBrowserLanguagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBrowserLanguagesStream( + request?: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + 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['listBrowserLanguages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBrowserLanguages stream %j', request); + return this.descriptors.page.listBrowserLanguages.createStream( + this.innerApiCalls.listBrowserLanguages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBrowserLanguages`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.BrowserLanguage|BrowserLanguage}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/browser_language_service.list_browser_languages.js + * region_tag:admanager_v1_generated_BrowserLanguageService_ListBrowserLanguages_async + */ + listBrowserLanguagesAsync( + request?: protos.google.ads.admanager.v1.IListBrowserLanguagesRequest, + 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['listBrowserLanguages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBrowserLanguages iterate %j', request); + return this.descriptors.page.listBrowserLanguages.asyncIterate( + this.innerApiCalls['listBrowserLanguages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.browserLanguageServiceStub && !this._terminated) { + return this.browserLanguageServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/browser_language_service_client_config.json b/packages/google-ads-admanager/src/v1/browser_language_service_client_config.json new file mode 100644 index 000000000000..55b5f5df2e52 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_language_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.BrowserLanguageService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetBrowserLanguage": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBrowserLanguages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/browser_language_service_proto_list.json b/packages/google-ads-admanager/src/v1/browser_language_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_language_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/browser_service_client.ts b/packages/google-ads-admanager/src/v1/browser_service_client.ts new file mode 100644 index 000000000000..127e97c53520 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/browser_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './browser_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Browser` objects. + * @class + * @memberof v1 + */ +export class BrowserServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + browserServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BrowserServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BrowserServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BrowserServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listBrowsers: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'browsers') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.BrowserService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.browserServiceStub) { + return this.browserServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.BrowserService. + this.browserServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.BrowserService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.BrowserService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const browserServiceStubMethods = + ['getBrowser', 'listBrowsers']; + for (const methodName of browserServiceStubMethods) { + const callPromise = this.browserServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.browserServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Browser` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_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 protos.google.ads.admanager.v1.Browser|Browser}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/browser_service.get_browser.js + * region_tag:admanager_v1_generated_BrowserService_GetBrowser_async + */ + getBrowser( + request?: protos.google.ads.admanager.v1.IGetBrowserRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|undefined, {}|undefined + ]>; + getBrowser( + request: protos.google.ads.admanager.v1.IGetBrowserRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|null|undefined, + {}|null|undefined>): void; + getBrowser( + request: protos.google.ads.admanager.v1.IGetBrowserRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|null|undefined, + {}|null|undefined>): void; + getBrowser( + request?: protos.google.ads.admanager.v1.IGetBrowserRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|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().catch(err => {throw err}); + this._log.info('getBrowser request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBrowser response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getBrowser(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBrowser, + protos.google.ads.admanager.v1.IGetBrowserRequest|undefined, + {}|undefined + ]) => { + this._log.info('getBrowser response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Browser` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Browser|Browser}. + * 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 `listBrowsersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBrowsers( + request?: protos.google.ads.admanager.v1.IListBrowsersRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBrowser[], + protos.google.ads.admanager.v1.IListBrowsersRequest|null, + protos.google.ads.admanager.v1.IListBrowsersResponse + ]>; + listBrowsers( + request: protos.google.ads.admanager.v1.IListBrowsersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowsersRequest, + protos.google.ads.admanager.v1.IListBrowsersResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowser>): void; + listBrowsers( + request: protos.google.ads.admanager.v1.IListBrowsersRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowsersRequest, + protos.google.ads.admanager.v1.IListBrowsersResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowser>): void; + listBrowsers( + request?: protos.google.ads.admanager.v1.IListBrowsersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListBrowsersRequest, + protos.google.ads.admanager.v1.IListBrowsersResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowser>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowsersRequest, + protos.google.ads.admanager.v1.IListBrowsersResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowser>): + Promise<[ + protos.google.ads.admanager.v1.IBrowser[], + protos.google.ads.admanager.v1.IListBrowsersRequest|null, + protos.google.ads.admanager.v1.IListBrowsersResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListBrowsersRequest, + protos.google.ads.admanager.v1.IListBrowsersResponse|null|undefined, + protos.google.ads.admanager.v1.IBrowser>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBrowsers values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBrowsers request %j', request); + return this.innerApiCalls + .listBrowsers(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IBrowser[], + protos.google.ads.admanager.v1.IListBrowsersRequest|null, + protos.google.ads.admanager.v1.IListBrowsersResponse + ]) => { + this._log.info('listBrowsers values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listBrowsers`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Browser|Browser} 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 `listBrowsersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBrowsersStream( + request?: protos.google.ads.admanager.v1.IListBrowsersRequest, + 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['listBrowsers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBrowsers stream %j', request); + return this.descriptors.page.listBrowsers.createStream( + this.innerApiCalls.listBrowsers as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBrowsers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Browser|Browser}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/browser_service.list_browsers.js + * region_tag:admanager_v1_generated_BrowserService_ListBrowsers_async + */ + listBrowsersAsync( + request?: protos.google.ads.admanager.v1.IListBrowsersRequest, + 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['listBrowsers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBrowsers iterate %j', request); + return this.descriptors.page.listBrowsers.asyncIterate( + this.innerApiCalls['listBrowsers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.browserServiceStub && !this._terminated) { + return this.browserServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/browser_service_client_config.json b/packages/google-ads-admanager/src/v1/browser_service_client_config.json new file mode 100644 index 000000000000..92d36c6b9097 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.BrowserService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetBrowser": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBrowsers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/browser_service_proto_list.json b/packages/google-ads-admanager/src/v1/browser_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/browser_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client.ts b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client.ts new file mode 100644 index 000000000000..05929c8a8998 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/cms_metadata_key_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cms_metadata_key_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `CmsMetadataKey` objects. + * @class + * @memberof v1 + */ +export class CmsMetadataKeyServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + cmsMetadataKeyServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CmsMetadataKeyServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new CmsMetadataKeyServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CmsMetadataKeyServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listCmsMetadataKeys: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cmsMetadataKeys') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.CmsMetadataKeyService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cmsMetadataKeyServiceStub) { + return this.cmsMetadataKeyServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.CmsMetadataKeyService. + this.cmsMetadataKeyServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.CmsMetadataKeyService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.CmsMetadataKeyService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cmsMetadataKeyServiceStubMethods = + ['getCmsMetadataKey', 'listCmsMetadataKeys']; + for (const methodName of cmsMetadataKeyServiceStubMethods) { + const callPromise = this.cmsMetadataKeyServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cmsMetadataKeyServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `CmsMetadataKey` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_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 protos.google.ads.admanager.v1.CmsMetadataKey|CmsMetadataKey}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cms_metadata_key_service.get_cms_metadata_key.js + * region_tag:admanager_v1_generated_CmsMetadataKeyService_GetCmsMetadataKey_async + */ + getCmsMetadataKey( + request?: protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|undefined, {}|undefined + ]>; + getCmsMetadataKey( + request: protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|null|undefined, + {}|null|undefined>): void; + getCmsMetadataKey( + request: protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest, + callback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|null|undefined, + {}|null|undefined>): void; + getCmsMetadataKey( + request?: protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|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().catch(err => {throw err}); + this._log.info('getCmsMetadataKey request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCmsMetadataKey response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getCmsMetadataKey(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ICmsMetadataKey, + protos.google.ads.admanager.v1.IGetCmsMetadataKeyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getCmsMetadataKey response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `CmsMetadataKey` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CmsMetadataKey|CmsMetadataKey}. + * 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 `listCmsMetadataKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCmsMetadataKeys( + request?: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataKey[], + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse + ]>; + listCmsMetadataKeys( + request: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataKey>): void; + listCmsMetadataKeys( + request: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataKey>): void; + listCmsMetadataKeys( + request?: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataKey>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataKey>): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataKey[], + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataKey>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCmsMetadataKeys values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCmsMetadataKeys request %j', request); + return this.innerApiCalls + .listCmsMetadataKeys(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ICmsMetadataKey[], + protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataKeysResponse + ]) => { + this._log.info('listCmsMetadataKeys values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCmsMetadataKeys`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CmsMetadataKey|CmsMetadataKey} 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 `listCmsMetadataKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCmsMetadataKeysStream( + request?: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + 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['listCmsMetadataKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCmsMetadataKeys stream %j', request); + return this.descriptors.page.listCmsMetadataKeys.createStream( + this.innerApiCalls.listCmsMetadataKeys as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCmsMetadataKeys`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.CmsMetadataKey|CmsMetadataKey}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cms_metadata_key_service.list_cms_metadata_keys.js + * region_tag:admanager_v1_generated_CmsMetadataKeyService_ListCmsMetadataKeys_async + */ + listCmsMetadataKeysAsync( + request?: protos.google.ads.admanager.v1.IListCmsMetadataKeysRequest, + 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['listCmsMetadataKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCmsMetadataKeys iterate %j', request); + return this.descriptors.page.listCmsMetadataKeys.asyncIterate( + this.innerApiCalls['listCmsMetadataKeys'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.cmsMetadataKeyServiceStub && !this._terminated) { + return this.cmsMetadataKeyServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client_config.json b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client_config.json new file mode 100644 index 000000000000..b6c0ddb87a2c --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CmsMetadataKeyService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCmsMetadataKey": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCmsMetadataKeys": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_key_service_proto_list.json b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_key_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client.ts b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client.ts new file mode 100644 index 000000000000..12c055190ce7 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/cms_metadata_value_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cms_metadata_value_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `CmsMetadataValue` objects. + * @class + * @memberof v1 + */ +export class CmsMetadataValueServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + cmsMetadataValueServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CmsMetadataValueServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new CmsMetadataValueServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CmsMetadataValueServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listCmsMetadataValues: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cmsMetadataValues') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.CmsMetadataValueService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cmsMetadataValueServiceStub) { + return this.cmsMetadataValueServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.CmsMetadataValueService. + this.cmsMetadataValueServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.CmsMetadataValueService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.CmsMetadataValueService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cmsMetadataValueServiceStubMethods = + ['getCmsMetadataValue', 'listCmsMetadataValues']; + for (const methodName of cmsMetadataValueServiceStubMethods) { + const callPromise = this.cmsMetadataValueServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cmsMetadataValueServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `CmsMetadataKey` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_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 protos.google.ads.admanager.v1.CmsMetadataValue|CmsMetadataValue}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cms_metadata_value_service.get_cms_metadata_value.js + * region_tag:admanager_v1_generated_CmsMetadataValueService_GetCmsMetadataValue_async + */ + getCmsMetadataValue( + request?: protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|undefined, {}|undefined + ]>; + getCmsMetadataValue( + request: protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|null|undefined, + {}|null|undefined>): void; + getCmsMetadataValue( + request: protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest, + callback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|null|undefined, + {}|null|undefined>): void; + getCmsMetadataValue( + request?: protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|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().catch(err => {throw err}); + this._log.info('getCmsMetadataValue request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCmsMetadataValue response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getCmsMetadataValue(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ICmsMetadataValue, + protos.google.ads.admanager.v1.IGetCmsMetadataValueRequest|undefined, + {}|undefined + ]) => { + this._log.info('getCmsMetadataValue response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `CmsMetadataValue` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CmsMetadataValue|CmsMetadataValue}. + * 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 `listCmsMetadataValuesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCmsMetadataValues( + request?: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataValue[], + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse + ]>; + listCmsMetadataValues( + request: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataValue>): void; + listCmsMetadataValues( + request: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataValue>): void; + listCmsMetadataValues( + request?: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataValue>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataValue>): + Promise<[ + protos.google.ads.admanager.v1.ICmsMetadataValue[], + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse|null|undefined, + protos.google.ads.admanager.v1.ICmsMetadataValue>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCmsMetadataValues values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCmsMetadataValues request %j', request); + return this.innerApiCalls + .listCmsMetadataValues(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ICmsMetadataValue[], + protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest|null, + protos.google.ads.admanager.v1.IListCmsMetadataValuesResponse + ]) => { + this._log.info('listCmsMetadataValues values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCmsMetadataValues`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CmsMetadataValue|CmsMetadataValue} 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 `listCmsMetadataValuesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCmsMetadataValuesStream( + request?: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + 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['listCmsMetadataValues']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCmsMetadataValues stream %j', request); + return this.descriptors.page.listCmsMetadataValues.createStream( + this.innerApiCalls.listCmsMetadataValues as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCmsMetadataValues`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.CmsMetadataValue|CmsMetadataValue}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cms_metadata_value_service.list_cms_metadata_values.js + * region_tag:admanager_v1_generated_CmsMetadataValueService_ListCmsMetadataValues_async + */ + listCmsMetadataValuesAsync( + request?: protos.google.ads.admanager.v1.IListCmsMetadataValuesRequest, + 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['listCmsMetadataValues']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCmsMetadataValues iterate %j', request); + return this.descriptors.page.listCmsMetadataValues.asyncIterate( + this.innerApiCalls['listCmsMetadataValues'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.cmsMetadataValueServiceStub && !this._terminated) { + return this.cmsMetadataValueServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client_config.json b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client_config.json new file mode 100644 index 000000000000..62ca01a3f3d8 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CmsMetadataValueService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCmsMetadataValue": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCmsMetadataValues": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/cms_metadata_value_service_proto_list.json b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/cms_metadata_value_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/company_service_client.ts b/packages/google-ads-admanager/src/v1/company_service_client.ts index 4e7361c86d8b..25414bda660e 100644 --- a/packages/google-ads-admanager/src/v1/company_service_client.ts +++ b/packages/google-ads-admanager/src/v1/company_service_client.ts @@ -186,18 +186,51 @@ export class CompanyServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class CompanyServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class CompanyServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class CompanyServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class CompanyServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -524,8 +578,8 @@ export class CompanyServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListCompanies` call. * Provide this to retrieve the subsequent page. @@ -640,8 +694,8 @@ export class CompanyServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListCompanies` call. * Provide this to retrieve the subsequent page. @@ -705,8 +759,8 @@ export class CompanyServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListCompanies` call. * Provide this to retrieve the subsequent page. @@ -811,6 +865,55 @@ export class CompanyServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class CompanyServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class CompanyServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class CompanyServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class CompanyServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class CompanyServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class CompanyServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class CompanyServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class CompanyServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/company_service_proto_list.json b/packages/google-ads-admanager/src/v1/company_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/company_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/company_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/contact_service_client.ts b/packages/google-ads-admanager/src/v1/contact_service_client.ts new file mode 100644 index 000000000000..ddd1aed05a85 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/contact_service_client.ts @@ -0,0 +1,2827 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/contact_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './contact_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Contact` objects. + * @class + * @memberof v1 + */ +export class ContactServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + contactServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContactServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ContactServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ContactServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listContacts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'contacts') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.ContactService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.contactServiceStub) { + return this.contactServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.ContactService. + this.contactServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.ContactService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.ContactService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const contactServiceStubMethods = + ['getContact', 'listContacts', 'createContact', 'batchCreateContacts', 'updateContact', 'batchUpdateContacts']; + for (const methodName of contactServiceStubMethods) { + const callPromise = this.contactServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contactServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Contact` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_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 protos.google.ads.admanager.v1.Contact|Contact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.get_contact.js + * region_tag:admanager_v1_generated_ContactService_GetContact_async + */ + getContact( + request?: protos.google.ads.admanager.v1.IGetContactRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|undefined, {}|undefined + ]>; + getContact( + request: protos.google.ads.admanager.v1.IGetContactRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|null|undefined, + {}|null|undefined>): void; + getContact( + request: protos.google.ads.admanager.v1.IGetContactRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|null|undefined, + {}|null|undefined>): void; + getContact( + request?: protos.google.ads.admanager.v1.IGetContactRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|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().catch(err => {throw err}); + this._log.info('getContact request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getContact response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getContact(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IGetContactRequest|undefined, + {}|undefined + ]) => { + this._log.info('getContact response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to create a `Contact` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * @param {google.ads.admanager.v1.Contact} request.contact + * Required. The `Contact` to create. + * @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 protos.google.ads.admanager.v1.Contact|Contact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.create_contact.js + * region_tag:admanager_v1_generated_ContactService_CreateContact_async + */ + createContact( + request?: protos.google.ads.admanager.v1.ICreateContactRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|undefined, {}|undefined + ]>; + createContact( + request: protos.google.ads.admanager.v1.ICreateContactRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|null|undefined, + {}|null|undefined>): void; + createContact( + request: protos.google.ads.admanager.v1.ICreateContactRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|null|undefined, + {}|null|undefined>): void; + createContact( + request?: protos.google.ads.admanager.v1.ICreateContactRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|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().catch(err => {throw err}); + this._log.info('createContact request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createContact response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createContact(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.ICreateContactRequest|undefined, + {}|undefined + ]) => { + this._log.info('createContact response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch create `Contact` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * @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 protos.google.ads.admanager.v1.BatchCreateContactsResponse|BatchCreateContactsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.batch_create_contacts.js + * region_tag:admanager_v1_generated_ContactService_BatchCreateContacts_async + */ + batchCreateContacts( + request?: protos.google.ads.admanager.v1.IBatchCreateContactsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|undefined, {}|undefined + ]>; + batchCreateContacts( + request: protos.google.ads.admanager.v1.IBatchCreateContactsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateContacts( + request: protos.google.ads.admanager.v1.IBatchCreateContactsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateContacts( + request?: protos.google.ads.admanager.v1.IBatchCreateContactsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|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().catch(err => {throw err}); + this._log.info('batchCreateContacts request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchCreateContacts response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchCreateContacts(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchCreateContactsResponse, + protos.google.ads.admanager.v1.IBatchCreateContactsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchCreateContacts response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to update a `Contact` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.admanager.v1.Contact} request.contact + * Required. The `Contact` to update. + * + * The `Contact`'s `name` is used to identify the `Contact` to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @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 protos.google.ads.admanager.v1.Contact|Contact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.update_contact.js + * region_tag:admanager_v1_generated_ContactService_UpdateContact_async + */ + updateContact( + request?: protos.google.ads.admanager.v1.IUpdateContactRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|undefined, {}|undefined + ]>; + updateContact( + request: protos.google.ads.admanager.v1.IUpdateContactRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|null|undefined, + {}|null|undefined>): void; + updateContact( + request: protos.google.ads.admanager.v1.IUpdateContactRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|null|undefined, + {}|null|undefined>): void; + updateContact( + request?: protos.google.ads.admanager.v1.IUpdateContactRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|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({ + 'contact.name': request.contact!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateContact request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateContact response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateContact(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContact, + protos.google.ads.admanager.v1.IUpdateContactRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateContact response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch update `Contact` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * @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 protos.google.ads.admanager.v1.BatchUpdateContactsResponse|BatchUpdateContactsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.batch_update_contacts.js + * region_tag:admanager_v1_generated_ContactService_BatchUpdateContacts_async + */ + batchUpdateContacts( + request?: protos.google.ads.admanager.v1.IBatchUpdateContactsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|undefined, {}|undefined + ]>; + batchUpdateContacts( + request: protos.google.ads.admanager.v1.IBatchUpdateContactsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateContacts( + request: protos.google.ads.admanager.v1.IBatchUpdateContactsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateContacts( + request?: protos.google.ads.admanager.v1.IBatchUpdateContactsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|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().catch(err => {throw err}); + this._log.info('batchUpdateContacts request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchUpdateContacts response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchUpdateContacts(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchUpdateContactsResponse, + protos.google.ads.admanager.v1.IBatchUpdateContactsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchUpdateContacts response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Contact` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Contact|Contact}. + * 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 `listContactsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContacts( + request?: protos.google.ads.admanager.v1.IListContactsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContact[], + protos.google.ads.admanager.v1.IListContactsRequest|null, + protos.google.ads.admanager.v1.IListContactsResponse + ]>; + listContacts( + request: protos.google.ads.admanager.v1.IListContactsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContactsRequest, + protos.google.ads.admanager.v1.IListContactsResponse|null|undefined, + protos.google.ads.admanager.v1.IContact>): void; + listContacts( + request: protos.google.ads.admanager.v1.IListContactsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContactsRequest, + protos.google.ads.admanager.v1.IListContactsResponse|null|undefined, + protos.google.ads.admanager.v1.IContact>): void; + listContacts( + request?: protos.google.ads.admanager.v1.IListContactsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListContactsRequest, + protos.google.ads.admanager.v1.IListContactsResponse|null|undefined, + protos.google.ads.admanager.v1.IContact>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListContactsRequest, + protos.google.ads.admanager.v1.IListContactsResponse|null|undefined, + protos.google.ads.admanager.v1.IContact>): + Promise<[ + protos.google.ads.admanager.v1.IContact[], + protos.google.ads.admanager.v1.IListContactsRequest|null, + protos.google.ads.admanager.v1.IListContactsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListContactsRequest, + protos.google.ads.admanager.v1.IListContactsResponse|null|undefined, + protos.google.ads.admanager.v1.IContact>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listContacts values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listContacts request %j', request); + return this.innerApiCalls + .listContacts(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IContact[], + protos.google.ads.admanager.v1.IListContactsRequest|null, + protos.google.ads.admanager.v1.IListContactsResponse + ]) => { + this._log.info('listContacts values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listContacts`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Contact|Contact} 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 `listContactsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContactsStream( + request?: protos.google.ads.admanager.v1.IListContactsRequest, + 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['listContacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContacts stream %j', request); + return this.descriptors.page.listContacts.createStream( + this.innerApiCalls.listContacts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listContacts`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Contact|Contact}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_service.list_contacts.js + * region_tag:admanager_v1_generated_ContactService_ListContacts_async + */ + listContactsAsync( + request?: protos.google.ads.admanager.v1.IListContactsRequest, + 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['listContacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContacts iterate %j', request); + return this.descriptors.page.listContacts.asyncIterate( + this.innerApiCalls['listContacts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.contactServiceStub && !this._terminated) { + return this.contactServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/contact_service_client_config.json b/packages/google-ads-admanager/src/v1/contact_service_client_config.json new file mode 100644 index 000000000000..9d5e1d5ad1a7 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/contact_service_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContactService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetContact": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContacts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateContact": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateContacts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateContact": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchUpdateContacts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/contact_service_proto_list.json b/packages/google-ads-admanager/src/v1/contact_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/contact_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/content_bundle_service_client.ts b/packages/google-ads-admanager/src/v1/content_bundle_service_client.ts new file mode 100644 index 000000000000..c64e706c11a5 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_bundle_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/content_bundle_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './content_bundle_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `ContentBundle` objects. + * @class + * @memberof v1 + */ +export class ContentBundleServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + contentBundleServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContentBundleServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ContentBundleServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ContentBundleServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listContentBundles: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'contentBundles') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.ContentBundleService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.contentBundleServiceStub) { + return this.contentBundleServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.ContentBundleService. + this.contentBundleServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.ContentBundleService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.ContentBundleService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const contentBundleServiceStubMethods = + ['getContentBundle', 'listContentBundles']; + for (const methodName of contentBundleServiceStubMethods) { + const callPromise = this.contentBundleServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contentBundleServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `ContentBundle` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_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 protos.google.ads.admanager.v1.ContentBundle|ContentBundle}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_bundle_service.get_content_bundle.js + * region_tag:admanager_v1_generated_ContentBundleService_GetContentBundle_async + */ + getContentBundle( + request?: protos.google.ads.admanager.v1.IGetContentBundleRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|undefined, {}|undefined + ]>; + getContentBundle( + request: protos.google.ads.admanager.v1.IGetContentBundleRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|null|undefined, + {}|null|undefined>): void; + getContentBundle( + request: protos.google.ads.admanager.v1.IGetContentBundleRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|null|undefined, + {}|null|undefined>): void; + getContentBundle( + request?: protos.google.ads.admanager.v1.IGetContentBundleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|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().catch(err => {throw err}); + this._log.info('getContentBundle request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getContentBundle response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getContentBundle(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContentBundle, + protos.google.ads.admanager.v1.IGetContentBundleRequest|undefined, + {}|undefined + ]) => { + this._log.info('getContentBundle response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `ContentBundle` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.ContentBundle|ContentBundle}. + * 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 `listContentBundlesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContentBundles( + request?: protos.google.ads.admanager.v1.IListContentBundlesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContentBundle[], + protos.google.ads.admanager.v1.IListContentBundlesRequest|null, + protos.google.ads.admanager.v1.IListContentBundlesResponse + ]>; + listContentBundles( + request: protos.google.ads.admanager.v1.IListContentBundlesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentBundlesRequest, + protos.google.ads.admanager.v1.IListContentBundlesResponse|null|undefined, + protos.google.ads.admanager.v1.IContentBundle>): void; + listContentBundles( + request: protos.google.ads.admanager.v1.IListContentBundlesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentBundlesRequest, + protos.google.ads.admanager.v1.IListContentBundlesResponse|null|undefined, + protos.google.ads.admanager.v1.IContentBundle>): void; + listContentBundles( + request?: protos.google.ads.admanager.v1.IListContentBundlesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListContentBundlesRequest, + protos.google.ads.admanager.v1.IListContentBundlesResponse|null|undefined, + protos.google.ads.admanager.v1.IContentBundle>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListContentBundlesRequest, + protos.google.ads.admanager.v1.IListContentBundlesResponse|null|undefined, + protos.google.ads.admanager.v1.IContentBundle>): + Promise<[ + protos.google.ads.admanager.v1.IContentBundle[], + protos.google.ads.admanager.v1.IListContentBundlesRequest|null, + protos.google.ads.admanager.v1.IListContentBundlesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentBundlesRequest, + protos.google.ads.admanager.v1.IListContentBundlesResponse|null|undefined, + protos.google.ads.admanager.v1.IContentBundle>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listContentBundles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listContentBundles request %j', request); + return this.innerApiCalls + .listContentBundles(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IContentBundle[], + protos.google.ads.admanager.v1.IListContentBundlesRequest|null, + protos.google.ads.admanager.v1.IListContentBundlesResponse + ]) => { + this._log.info('listContentBundles values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listContentBundles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.ContentBundle|ContentBundle} 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 `listContentBundlesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContentBundlesStream( + request?: protos.google.ads.admanager.v1.IListContentBundlesRequest, + 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['listContentBundles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContentBundles stream %j', request); + return this.descriptors.page.listContentBundles.createStream( + this.innerApiCalls.listContentBundles as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listContentBundles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.ContentBundle|ContentBundle}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_bundle_service.list_content_bundles.js + * region_tag:admanager_v1_generated_ContentBundleService_ListContentBundles_async + */ + listContentBundlesAsync( + request?: protos.google.ads.admanager.v1.IListContentBundlesRequest, + 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['listContentBundles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContentBundles iterate %j', request); + return this.descriptors.page.listContentBundles.asyncIterate( + this.innerApiCalls['listContentBundles'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.contentBundleServiceStub && !this._terminated) { + return this.contentBundleServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/content_bundle_service_client_config.json b/packages/google-ads-admanager/src/v1/content_bundle_service_client_config.json new file mode 100644 index 000000000000..cd09bd048a72 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_bundle_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentBundleService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetContentBundle": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContentBundles": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/content_bundle_service_proto_list.json b/packages/google-ads-admanager/src/v1/content_bundle_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_bundle_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/content_label_service_client.ts b/packages/google-ads-admanager/src/v1/content_label_service_client.ts new file mode 100644 index 000000000000..c37a74aef435 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_label_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/content_label_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './content_label_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `ContentLabel` objects. + * @class + * @memberof v1 + */ +export class ContentLabelServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + contentLabelServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContentLabelServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ContentLabelServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ContentLabelServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listContentLabels: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'contentLabels') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.ContentLabelService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.contentLabelServiceStub) { + return this.contentLabelServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.ContentLabelService. + this.contentLabelServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.ContentLabelService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.ContentLabelService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const contentLabelServiceStubMethods = + ['getContentLabel', 'listContentLabels']; + for (const methodName of contentLabelServiceStubMethods) { + const callPromise = this.contentLabelServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contentLabelServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `ContentLabel` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_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 protos.google.ads.admanager.v1.ContentLabel|ContentLabel}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_label_service.get_content_label.js + * region_tag:admanager_v1_generated_ContentLabelService_GetContentLabel_async + */ + getContentLabel( + request?: protos.google.ads.admanager.v1.IGetContentLabelRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|undefined, {}|undefined + ]>; + getContentLabel( + request: protos.google.ads.admanager.v1.IGetContentLabelRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|null|undefined, + {}|null|undefined>): void; + getContentLabel( + request: protos.google.ads.admanager.v1.IGetContentLabelRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|null|undefined, + {}|null|undefined>): void; + getContentLabel( + request?: protos.google.ads.admanager.v1.IGetContentLabelRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|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().catch(err => {throw err}); + this._log.info('getContentLabel request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getContentLabel response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getContentLabel(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContentLabel, + protos.google.ads.admanager.v1.IGetContentLabelRequest|undefined, + {}|undefined + ]) => { + this._log.info('getContentLabel response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `ContentLabel` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.ContentLabel|ContentLabel}. + * 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 `listContentLabelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContentLabels( + request?: protos.google.ads.admanager.v1.IListContentLabelsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContentLabel[], + protos.google.ads.admanager.v1.IListContentLabelsRequest|null, + protos.google.ads.admanager.v1.IListContentLabelsResponse + ]>; + listContentLabels( + request: protos.google.ads.admanager.v1.IListContentLabelsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentLabelsRequest, + protos.google.ads.admanager.v1.IListContentLabelsResponse|null|undefined, + protos.google.ads.admanager.v1.IContentLabel>): void; + listContentLabels( + request: protos.google.ads.admanager.v1.IListContentLabelsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentLabelsRequest, + protos.google.ads.admanager.v1.IListContentLabelsResponse|null|undefined, + protos.google.ads.admanager.v1.IContentLabel>): void; + listContentLabels( + request?: protos.google.ads.admanager.v1.IListContentLabelsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListContentLabelsRequest, + protos.google.ads.admanager.v1.IListContentLabelsResponse|null|undefined, + protos.google.ads.admanager.v1.IContentLabel>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListContentLabelsRequest, + protos.google.ads.admanager.v1.IListContentLabelsResponse|null|undefined, + protos.google.ads.admanager.v1.IContentLabel>): + Promise<[ + protos.google.ads.admanager.v1.IContentLabel[], + protos.google.ads.admanager.v1.IListContentLabelsRequest|null, + protos.google.ads.admanager.v1.IListContentLabelsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentLabelsRequest, + protos.google.ads.admanager.v1.IListContentLabelsResponse|null|undefined, + protos.google.ads.admanager.v1.IContentLabel>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listContentLabels values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listContentLabels request %j', request); + return this.innerApiCalls + .listContentLabels(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IContentLabel[], + protos.google.ads.admanager.v1.IListContentLabelsRequest|null, + protos.google.ads.admanager.v1.IListContentLabelsResponse + ]) => { + this._log.info('listContentLabels values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listContentLabels`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.ContentLabel|ContentLabel} 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 `listContentLabelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContentLabelsStream( + request?: protos.google.ads.admanager.v1.IListContentLabelsRequest, + 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['listContentLabels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContentLabels stream %j', request); + return this.descriptors.page.listContentLabels.createStream( + this.innerApiCalls.listContentLabels as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listContentLabels`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.ContentLabel|ContentLabel}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_label_service.list_content_labels.js + * region_tag:admanager_v1_generated_ContentLabelService_ListContentLabels_async + */ + listContentLabelsAsync( + request?: protos.google.ads.admanager.v1.IListContentLabelsRequest, + 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['listContentLabels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContentLabels iterate %j', request); + return this.descriptors.page.listContentLabels.asyncIterate( + this.innerApiCalls['listContentLabels'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.contentLabelServiceStub && !this._terminated) { + return this.contentLabelServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/content_label_service_client_config.json b/packages/google-ads-admanager/src/v1/content_label_service_client_config.json new file mode 100644 index 000000000000..e541004217a4 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_label_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentLabelService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetContentLabel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContentLabels": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/content_label_service_proto_list.json b/packages/google-ads-admanager/src/v1/content_label_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_label_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/content_service_client.ts b/packages/google-ads-admanager/src/v1/content_service_client.ts new file mode 100644 index 000000000000..28eb1e95ca64 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/content_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './content_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Content` objects. + * @class + * @memberof v1 + */ +export class ContentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + contentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ContentServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ContentServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listContent: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'content') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.ContentService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.contentServiceStub) { + return this.contentServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.ContentService. + this.contentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.ContentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.ContentService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const contentServiceStubMethods = + ['getContent', 'listContent']; + for (const methodName of contentServiceStubMethods) { + const callPromise = this.contentServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contentServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Content` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_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 protos.google.ads.admanager.v1.Content|Content}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_service.get_content.js + * region_tag:admanager_v1_generated_ContentService_GetContent_async + */ + getContent( + request?: protos.google.ads.admanager.v1.IGetContentRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|undefined, {}|undefined + ]>; + getContent( + request: protos.google.ads.admanager.v1.IGetContentRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): void; + getContent( + request: protos.google.ads.admanager.v1.IGetContentRequest, + callback: Callback< + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): void; + getContent( + request?: protos.google.ads.admanager.v1.IGetContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|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().catch(err => {throw err}); + this._log.info('getContent request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getContent(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IContent, + protos.google.ads.admanager.v1.IGetContentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getContent response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Content` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Content|Content}. + * 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 `listContentAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContent( + request?: protos.google.ads.admanager.v1.IListContentRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IContent[], + protos.google.ads.admanager.v1.IListContentRequest|null, + protos.google.ads.admanager.v1.IListContentResponse + ]>; + listContent( + request: protos.google.ads.admanager.v1.IListContentRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentRequest, + protos.google.ads.admanager.v1.IListContentResponse|null|undefined, + protos.google.ads.admanager.v1.IContent>): void; + listContent( + request: protos.google.ads.admanager.v1.IListContentRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentRequest, + protos.google.ads.admanager.v1.IListContentResponse|null|undefined, + protos.google.ads.admanager.v1.IContent>): void; + listContent( + request?: protos.google.ads.admanager.v1.IListContentRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListContentRequest, + protos.google.ads.admanager.v1.IListContentResponse|null|undefined, + protos.google.ads.admanager.v1.IContent>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListContentRequest, + protos.google.ads.admanager.v1.IListContentResponse|null|undefined, + protos.google.ads.admanager.v1.IContent>): + Promise<[ + protos.google.ads.admanager.v1.IContent[], + protos.google.ads.admanager.v1.IListContentRequest|null, + protos.google.ads.admanager.v1.IListContentResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListContentRequest, + protos.google.ads.admanager.v1.IListContentResponse|null|undefined, + protos.google.ads.admanager.v1.IContent>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listContent values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listContent request %j', request); + return this.innerApiCalls + .listContent(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IContent[], + protos.google.ads.admanager.v1.IListContentRequest|null, + protos.google.ads.admanager.v1.IListContentResponse + ]) => { + this._log.info('listContent values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listContent`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Content|Content} 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 `listContentAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listContentStream( + request?: protos.google.ads.admanager.v1.IListContentRequest, + 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['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContent stream %j', request); + return this.descriptors.page.listContent.createStream( + this.innerApiCalls.listContent as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listContent`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Content|Content}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/content_service.list_content.js + * region_tag:admanager_v1_generated_ContentService_ListContent_async + */ + listContentAsync( + request?: protos.google.ads.admanager.v1.IListContentRequest, + 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['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listContent iterate %j', request); + return this.descriptors.page.listContent.asyncIterate( + this.innerApiCalls['listContent'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.contentServiceStub && !this._terminated) { + return this.contentServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/content_service_client_config.json b/packages/google-ads-admanager/src/v1/content_service_client_config.json new file mode 100644 index 000000000000..dc1f1374651b --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/content_service_proto_list.json b/packages/google-ads-admanager/src/v1/content_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/content_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/creative_template_service_client.ts b/packages/google-ads-admanager/src/v1/creative_template_service_client.ts new file mode 100644 index 000000000000..d840852718f6 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/creative_template_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/creative_template_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './creative_template_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `CreativeTemplate` objects. + * @class + * @memberof v1 + */ +export class CreativeTemplateServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + creativeTemplateServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CreativeTemplateServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new CreativeTemplateServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CreativeTemplateServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listCreativeTemplates: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'creativeTemplates') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.CreativeTemplateService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.creativeTemplateServiceStub) { + return this.creativeTemplateServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.CreativeTemplateService. + this.creativeTemplateServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.CreativeTemplateService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.CreativeTemplateService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const creativeTemplateServiceStubMethods = + ['getCreativeTemplate', 'listCreativeTemplates']; + for (const methodName of creativeTemplateServiceStubMethods) { + const callPromise = this.creativeTemplateServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.creativeTemplateServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `CreativeTemplate` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_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 protos.google.ads.admanager.v1.CreativeTemplate|CreativeTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/creative_template_service.get_creative_template.js + * region_tag:admanager_v1_generated_CreativeTemplateService_GetCreativeTemplate_async + */ + getCreativeTemplate( + request?: protos.google.ads.admanager.v1.IGetCreativeTemplateRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|undefined, {}|undefined + ]>; + getCreativeTemplate( + request: protos.google.ads.admanager.v1.IGetCreativeTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|null|undefined, + {}|null|undefined>): void; + getCreativeTemplate( + request: protos.google.ads.admanager.v1.IGetCreativeTemplateRequest, + callback: Callback< + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|null|undefined, + {}|null|undefined>): void; + getCreativeTemplate( + request?: protos.google.ads.admanager.v1.IGetCreativeTemplateRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|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().catch(err => {throw err}); + this._log.info('getCreativeTemplate request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCreativeTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getCreativeTemplate(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ICreativeTemplate, + protos.google.ads.admanager.v1.IGetCreativeTemplateRequest|undefined, + {}|undefined + ]) => { + this._log.info('getCreativeTemplate response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `CreativeTemplate` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CreativeTemplate|CreativeTemplate}. + * 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 `listCreativeTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCreativeTemplates( + request?: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICreativeTemplate[], + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest|null, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse + ]>; + listCreativeTemplates( + request: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse|null|undefined, + protos.google.ads.admanager.v1.ICreativeTemplate>): void; + listCreativeTemplates( + request: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse|null|undefined, + protos.google.ads.admanager.v1.ICreativeTemplate>): void; + listCreativeTemplates( + request?: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse|null|undefined, + protos.google.ads.admanager.v1.ICreativeTemplate>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse|null|undefined, + protos.google.ads.admanager.v1.ICreativeTemplate>): + Promise<[ + protos.google.ads.admanager.v1.ICreativeTemplate[], + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest|null, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse|null|undefined, + protos.google.ads.admanager.v1.ICreativeTemplate>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCreativeTemplates values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCreativeTemplates request %j', request); + return this.innerApiCalls + .listCreativeTemplates(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ICreativeTemplate[], + protos.google.ads.admanager.v1.IListCreativeTemplatesRequest|null, + protos.google.ads.admanager.v1.IListCreativeTemplatesResponse + ]) => { + this._log.info('listCreativeTemplates values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCreativeTemplates`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CreativeTemplate|CreativeTemplate} 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 `listCreativeTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCreativeTemplatesStream( + request?: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + 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['listCreativeTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCreativeTemplates stream %j', request); + return this.descriptors.page.listCreativeTemplates.createStream( + this.innerApiCalls.listCreativeTemplates as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCreativeTemplates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.CreativeTemplate|CreativeTemplate}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/creative_template_service.list_creative_templates.js + * region_tag:admanager_v1_generated_CreativeTemplateService_ListCreativeTemplates_async + */ + listCreativeTemplatesAsync( + request?: protos.google.ads.admanager.v1.IListCreativeTemplatesRequest, + 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['listCreativeTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCreativeTemplates iterate %j', request); + return this.descriptors.page.listCreativeTemplates.asyncIterate( + this.innerApiCalls['listCreativeTemplates'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.creativeTemplateServiceStub && !this._terminated) { + return this.creativeTemplateServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/creative_template_service_client_config.json b/packages/google-ads-admanager/src/v1/creative_template_service_client_config.json new file mode 100644 index 000000000000..cb084043f64f --- /dev/null +++ b/packages/google-ads-admanager/src/v1/creative_template_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CreativeTemplateService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCreativeTemplate": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCreativeTemplates": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/creative_template_service_proto_list.json b/packages/google-ads-admanager/src/v1/creative_template_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/creative_template_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/custom_field_service_client.ts b/packages/google-ads-admanager/src/v1/custom_field_service_client.ts index e36c2b66506d..991a23e9caad 100644 --- a/packages/google-ads-admanager/src/v1/custom_field_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_field_service_client.ts @@ -186,18 +186,51 @@ export class CustomFieldServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class CustomFieldServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class CustomFieldServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class CustomFieldServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class CustomFieldServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -314,7 +368,7 @@ export class CustomFieldServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const customFieldServiceStubMethods = - ['getCustomField', 'listCustomFields']; + ['getCustomField', 'listCustomFields', 'createCustomField', 'batchCreateCustomFields', 'updateCustomField', 'batchUpdateCustomFields', 'batchActivateCustomFields', 'batchDeactivateCustomFields']; for (const methodName of customFieldServiceStubMethods) { const callPromise = this.customFieldServiceStub.then( stub => (...args: Array<{}>) => { @@ -512,83 +566,58 @@ export class CustomFieldServiceClient { throw error; }); } - - /** - * API to retrieve a list of `CustomField` objects. +/** + * API to create a `CustomField` object. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of CustomFields. + * Required. The parent resource where this `CustomField` will be created. * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `CustomFields` to return. The service may - * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListCustomFields` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListCustomFields` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * @param {google.ads.admanager.v1.CustomField} request.customField + * Required. The `CustomField` to create. * @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 protos.google.ads.admanager.v1.CustomField|CustomField}. - * 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 `listCustomFieldsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.CustomField|CustomField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.create_custom_field.js + * region_tag:admanager_v1_generated_CustomFieldService_CreateCustomField_async */ - listCustomFields( - request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + createCustomField( + request?: protos.google.ads.admanager.v1.ICreateCustomFieldRequest, options?: CallOptions): Promise<[ - protos.google.ads.admanager.v1.ICustomField[], - protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, - protos.google.ads.admanager.v1.IListCustomFieldsResponse + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|undefined, {}|undefined ]>; - listCustomFields( - request: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + createCustomField( + request: protos.google.ads.admanager.v1.ICreateCustomFieldRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.ads.admanager.v1.IListCustomFieldsRequest, - protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, - protos.google.ads.admanager.v1.ICustomField>): void; - listCustomFields( - request: protos.google.ads.admanager.v1.IListCustomFieldsRequest, - callback: PaginationCallback< - protos.google.ads.admanager.v1.IListCustomFieldsRequest, - protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, - protos.google.ads.admanager.v1.ICustomField>): void; - listCustomFields( - request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.ads.admanager.v1.IListCustomFieldsRequest, - protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, - protos.google.ads.admanager.v1.ICustomField>, - callback?: PaginationCallback< - protos.google.ads.admanager.v1.IListCustomFieldsRequest, - protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, - protos.google.ads.admanager.v1.ICustomField>): + callback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|null|undefined, + {}|null|undefined>): void; + createCustomField( + request: protos.google.ads.admanager.v1.ICreateCustomFieldRequest, + callback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|null|undefined, + {}|null|undefined>): void; + createCustomField( + request?: protos.google.ads.admanager.v1.ICreateCustomFieldRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|null|undefined, + {}|null|undefined>): Promise<[ - protos.google.ads.admanager.v1.ICustomField[], - protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, - protos.google.ads.admanager.v1.IListCustomFieldsResponse + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -608,72 +637,97 @@ export class CustomFieldServiceClient { 'parent': request.parent ?? '', }); this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.ads.admanager.v1.IListCustomFieldsRequest, - protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, - protos.google.ads.admanager.v1.ICustomField>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listCustomFields values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + this._log.info('createCustomField request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createCustomField response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('listCustomFields request %j', request); - return this.innerApiCalls - .listCustomFields(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.ads.admanager.v1.ICustomField[], - protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, - protos.google.ads.admanager.v1.IListCustomFieldsResponse + return this.innerApiCalls.createCustomField(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.ICreateCustomFieldRequest|undefined, + {}|undefined ]) => { - this._log.info('listCustomFields values %j', response); - return [response, input, output]; + this._log.info('createCustomField response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; }); } - /** - * Equivalent to `listCustomFields`, but returns a NodeJS Stream object. + * API to batch create `CustomField` objects. + * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of CustomFields. + * Required. The parent resource where `CustomFields` will be created. * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `CustomFields` to return. The service may - * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListCustomFields` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListCustomFields` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * The parent field in the CreateCustomFieldRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. * @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 protos.google.ads.admanager.v1.CustomField|CustomField} 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 `listCustomFieldsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.BatchCreateCustomFieldsResponse|BatchCreateCustomFieldsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.batch_create_custom_fields.js + * region_tag:admanager_v1_generated_CustomFieldService_BatchCreateCustomFields_async */ - listCustomFieldsStream( - request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + batchCreateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, options?: CallOptions): - Transform{ + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|undefined, {}|undefined + ]>; + batchCreateCustomFields( + request: protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateCustomFields( + request: protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|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 || {}; @@ -682,74 +736,663 @@ export class CustomFieldServiceClient { ] = this._gaxModule.routingHeader.fromParams({ 'parent': request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomFields']; - const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); - this._log.info('listCustomFields stream %j', request); - return this.descriptors.page.listCustomFields.createStream( - this.innerApiCalls.listCustomFields as GaxCall, - request, - callSettings - ); + this._log.info('batchCreateCustomFields request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchCreateCustomFields response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchCreateCustomFields(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchCreateCustomFieldsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchCreateCustomFields response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } - /** - * Equivalent to `listCustomFields`, but returns an iterable object. + * API to update a `CustomField` object. * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of CustomFields. - * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `CustomFields` to return. The service may - * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListCustomFields` call. - * Provide this to retrieve the subsequent page. + * @param {google.ads.admanager.v1.CustomField} request.customField + * Required. The `CustomField` to update. * - * When paginating, all other parameters provided to `ListCustomFields` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.ads.admanager.v1.CustomField|CustomField}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.CustomField|CustomField}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/custom_field_service.list_custom_fields.js - * region_tag:admanager_v1_generated_CustomFieldService_ListCustomFields_async + * @example include:samples/generated/v1/custom_field_service.update_custom_field.js + * region_tag:admanager_v1_generated_CustomFieldService_UpdateCustomField_async */ - listCustomFieldsAsync( - request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + updateCustomField( + request?: protos.google.ads.admanager.v1.IUpdateCustomFieldRequest, 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['listCustomFields']; - const callSettings = defaultCallSettings.merge(options); + Promise<[ + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|undefined, {}|undefined + ]>; + updateCustomField( + request: protos.google.ads.admanager.v1.IUpdateCustomFieldRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|null|undefined, + {}|null|undefined>): void; + updateCustomField( + request: protos.google.ads.admanager.v1.IUpdateCustomFieldRequest, + callback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|null|undefined, + {}|null|undefined>): void; + updateCustomField( + request?: protos.google.ads.admanager.v1.IUpdateCustomFieldRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|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({ + 'custom_field.name': request.customField!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateCustomField request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateCustomField response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateCustomField(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ICustomField, + protos.google.ads.admanager.v1.IUpdateCustomFieldRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateCustomField response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch update `CustomField` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * @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 protos.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse|BatchUpdateCustomFieldsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.batch_update_custom_fields.js + * region_tag:admanager_v1_generated_CustomFieldService_BatchUpdateCustomFields_async + */ + batchUpdateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|undefined, {}|undefined + ]>; + batchUpdateCustomFields( + request: protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateCustomFields( + request: protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|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().catch(err => {throw err}); + this._log.info('batchUpdateCustomFields request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchUpdateCustomFields response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchUpdateCustomFields(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchUpdateCustomFields response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Activates a list of `CustomField` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_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 protos.google.ads.admanager.v1.BatchActivateCustomFieldsResponse|BatchActivateCustomFieldsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.batch_activate_custom_fields.js + * region_tag:admanager_v1_generated_CustomFieldService_BatchActivateCustomFields_async + */ + batchActivateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|undefined, {}|undefined + ]>; + batchActivateCustomFields( + request: protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchActivateCustomFields( + request: protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchActivateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|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().catch(err => {throw err}); + this._log.info('batchActivateCustomFields request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchActivateCustomFields response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchActivateCustomFields(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchActivateCustomFieldsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchActivateCustomFields response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deactivates a list of `CustomField` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_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 protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse|BatchDeactivateCustomFieldsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.batch_deactivate_custom_fields.js + * region_tag:admanager_v1_generated_CustomFieldService_BatchDeactivateCustomFields_async + */ + batchDeactivateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|undefined, {}|undefined + ]>; + batchDeactivateCustomFields( + request: protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateCustomFields( + request: protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateCustomFields( + request?: protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|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().catch(err => {throw err}); + this._log.info('batchDeactivateCustomFields request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchDeactivateCustomFields response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchDeactivateCustomFields(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchDeactivateCustomFields response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `CustomField` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomFields` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CustomField|CustomField}. + * 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 `listCustomFieldsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCustomFields( + request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ICustomField[], + protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, + protos.google.ads.admanager.v1.IListCustomFieldsResponse + ]>; + listCustomFields( + request: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCustomFieldsRequest, + protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, + protos.google.ads.admanager.v1.ICustomField>): void; + listCustomFields( + request: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListCustomFieldsRequest, + protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, + protos.google.ads.admanager.v1.ICustomField>): void; + listCustomFields( + request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListCustomFieldsRequest, + protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, + protos.google.ads.admanager.v1.ICustomField>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListCustomFieldsRequest, + protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, + protos.google.ads.admanager.v1.ICustomField>): + Promise<[ + protos.google.ads.admanager.v1.ICustomField[], + protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, + protos.google.ads.admanager.v1.IListCustomFieldsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListCustomFieldsRequest, + protos.google.ads.admanager.v1.IListCustomFieldsResponse|null|undefined, + protos.google.ads.admanager.v1.ICustomField>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCustomFields values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCustomFields request %j', request); + return this.innerApiCalls + .listCustomFields(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ICustomField[], + protos.google.ads.admanager.v1.IListCustomFieldsRequest|null, + protos.google.ads.admanager.v1.IListCustomFieldsResponse + ]) => { + this._log.info('listCustomFields values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCustomFields`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomFields` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.CustomField|CustomField} 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 `listCustomFieldsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCustomFieldsStream( + request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + 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['listCustomFields']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCustomFields stream %j', request); + return this.descriptors.page.listCustomFields.createStream( + this.innerApiCalls.listCustomFields as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCustomFields`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomFields` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.CustomField|CustomField}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/custom_field_service.list_custom_fields.js + * region_tag:admanager_v1_generated_CustomFieldService_ListCustomFields_async + */ + listCustomFieldsAsync( + request?: protos.google.ads.admanager.v1.IListCustomFieldsRequest, + 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['listCustomFields']; + const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); this._log.info('listCustomFields iterate %j', request); return this.descriptors.page.listCustomFields.asyncIterate( @@ -807,80 +1450,345 @@ export class CustomFieldServiceClient { * A fully-qualified path representing AdBreak resource. * @returns {string} A string representing the ad_break. */ - matchAdBreakFromAdBreakName(adBreakName: string) { - return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; } /** - * Return a fully-qualified adUnit resource name string. + * Return a fully-qualified cmsMetadataKey resource name string. * * @param {string} network_code - * @param {string} ad_unit + * @param {string} cms_metadata_key * @returns {string} Resource name string. */ - adUnitPath(networkCode:string,adUnit:string) { - return this.pathTemplates.adUnitPathTemplate.render({ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ network_code: networkCode, - ad_unit: adUnit, + cms_metadata_key: cmsMetadataKey, }); } /** - * Parse the network_code from AdUnit resource. + * Parse the network_code from CmsMetadataKey resource. * - * @param {string} adUnitName - * A fully-qualified path representing AdUnit resource. + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. * @returns {string} A string representing the network_code. */ - matchNetworkCodeFromAdUnitName(adUnitName: string) { - return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; } /** - * Parse the ad_unit from AdUnit resource. + * Parse the cms_metadata_key from CmsMetadataKey resource. * - * @param {string} adUnitName - * A fully-qualified path representing AdUnit resource. - * @returns {string} A string representing the ad_unit. + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. */ - matchAdUnitFromAdUnitName(adUnitName: string) { - return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; } /** - * Return a fully-qualified bandwidthGroup resource name string. + * Return a fully-qualified cmsMetadataValue resource name string. * * @param {string} network_code - * @param {string} bandwidth_group + * @param {string} cms_metadata_value * @returns {string} Resource name string. */ - bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { - return this.pathTemplates.bandwidthGroupPathTemplate.render({ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ network_code: networkCode, - bandwidth_group: bandwidthGroup, + cms_metadata_value: cmsMetadataValue, }); } /** - * Parse the network_code from BandwidthGroup resource. + * Parse the network_code from CmsMetadataValue resource. * - * @param {string} bandwidthGroupName - * A fully-qualified path representing BandwidthGroup resource. + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. * @returns {string} A string representing the network_code. */ - matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { - return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; } /** - * Parse the bandwidth_group from BandwidthGroup resource. + * Parse the cms_metadata_value from CmsMetadataValue resource. * - * @param {string} bandwidthGroupName - * A fully-qualified path representing BandwidthGroup resource. - * @returns {string} A string representing the bandwidth_group. + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. */ - matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { - return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; } /** @@ -955,6 +1863,150 @@ export class CustomFieldServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +2115,42 @@ export class CustomFieldServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +2187,42 @@ export class CustomFieldServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +2367,114 @@ export class CustomFieldServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2822,42 @@ export class CustomFieldServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2966,42 @@ export class CustomFieldServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/custom_field_service_client_config.json b/packages/google-ads-admanager/src/v1/custom_field_service_client_config.json index c9521b9a4766..3f137d0ad9fd 100644 --- a/packages/google-ads-admanager/src/v1/custom_field_service_client_config.json +++ b/packages/google-ads-admanager/src/v1/custom_field_service_client_config.json @@ -27,6 +27,30 @@ "ListCustomFields": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateCustomField": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateCustomFields": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCustomField": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchUpdateCustomFields": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchActivateCustomFields": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchDeactivateCustomFields": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-ads-admanager/src/v1/custom_field_service_proto_list.json b/packages/google-ads-admanager/src/v1/custom_field_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/custom_field_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/custom_field_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts index 2d70c833fe57..3d8fb0f897e7 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts @@ -186,18 +186,51 @@ export class CustomTargetingKeyServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class CustomTargetingKeyServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class CustomTargetingKeyServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class CustomTargetingKeyServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class CustomTargetingKeyServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -812,6 +866,55 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -848,6 +951,78 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -884,6 +1059,150 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -956,6 +1275,150 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1064,6 +1527,42 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1100,6 +1599,42 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1244,6 +1779,114 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1591,6 +2234,42 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1699,6 +2378,42 @@ export class CustomTargetingKeyServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_proto_list.json b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts index aeb0d3812675..b81facb7539e 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts @@ -186,18 +186,51 @@ export class CustomTargetingValueServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class CustomTargetingValueServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class CustomTargetingValueServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class CustomTargetingValueServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class CustomTargetingValueServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -821,6 +875,55 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -857,6 +960,78 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -893,6 +1068,150 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -965,6 +1284,150 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1073,6 +1536,42 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1109,6 +1608,42 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1253,6 +1788,114 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1600,6 +2243,42 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1708,6 +2387,42 @@ export class CustomTargetingValueServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_proto_list.json b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/device_capability_service_client.ts b/packages/google-ads-admanager/src/v1/device_capability_service_client.ts new file mode 100644 index 000000000000..43de6a231021 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_capability_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/device_capability_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './device_capability_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `DeviceCapability` objects. + * @class + * @memberof v1 + */ +export class DeviceCapabilityServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + deviceCapabilityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DeviceCapabilityServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DeviceCapabilityServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DeviceCapabilityServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDeviceCapabilities: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deviceCapabilities') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.DeviceCapabilityService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.deviceCapabilityServiceStub) { + return this.deviceCapabilityServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.DeviceCapabilityService. + this.deviceCapabilityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.DeviceCapabilityService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.DeviceCapabilityService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const deviceCapabilityServiceStubMethods = + ['getDeviceCapability', 'listDeviceCapabilities']; + for (const methodName of deviceCapabilityServiceStubMethods) { + const callPromise = this.deviceCapabilityServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.deviceCapabilityServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `DeviceCapability` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_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 protos.google.ads.admanager.v1.DeviceCapability|DeviceCapability}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/device_capability_service.get_device_capability.js + * region_tag:admanager_v1_generated_DeviceCapabilityService_GetDeviceCapability_async + */ + getDeviceCapability( + request?: protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|undefined, {}|undefined + ]>; + getDeviceCapability( + request: protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|null|undefined, + {}|null|undefined>): void; + getDeviceCapability( + request: protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest, + callback: Callback< + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|null|undefined, + {}|null|undefined>): void; + getDeviceCapability( + request?: protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|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().catch(err => {throw err}); + this._log.info('getDeviceCapability request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDeviceCapability response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDeviceCapability(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IDeviceCapability, + protos.google.ads.admanager.v1.IGetDeviceCapabilityRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDeviceCapability response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `DeviceCapability` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.DeviceCapability|DeviceCapability}. + * 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 `listDeviceCapabilitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeviceCapabilities( + request?: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IDeviceCapability[], + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest|null, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse + ]>; + listDeviceCapabilities( + request: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceCapability>): void; + listDeviceCapabilities( + request: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceCapability>): void; + listDeviceCapabilities( + request?: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceCapability>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceCapability>): + Promise<[ + protos.google.ads.admanager.v1.IDeviceCapability[], + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest|null, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceCapability>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDeviceCapabilities values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDeviceCapabilities request %j', request); + return this.innerApiCalls + .listDeviceCapabilities(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IDeviceCapability[], + protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest|null, + protos.google.ads.admanager.v1.IListDeviceCapabilitiesResponse + ]) => { + this._log.info('listDeviceCapabilities values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDeviceCapabilities`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.DeviceCapability|DeviceCapability} 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 `listDeviceCapabilitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeviceCapabilitiesStream( + request?: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + 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['listDeviceCapabilities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeviceCapabilities stream %j', request); + return this.descriptors.page.listDeviceCapabilities.createStream( + this.innerApiCalls.listDeviceCapabilities as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDeviceCapabilities`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.DeviceCapability|DeviceCapability}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/device_capability_service.list_device_capabilities.js + * region_tag:admanager_v1_generated_DeviceCapabilityService_ListDeviceCapabilities_async + */ + listDeviceCapabilitiesAsync( + request?: protos.google.ads.admanager.v1.IListDeviceCapabilitiesRequest, + 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['listDeviceCapabilities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeviceCapabilities iterate %j', request); + return this.descriptors.page.listDeviceCapabilities.asyncIterate( + this.innerApiCalls['listDeviceCapabilities'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.deviceCapabilityServiceStub && !this._terminated) { + return this.deviceCapabilityServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/device_capability_service_client_config.json b/packages/google-ads-admanager/src/v1/device_capability_service_client_config.json new file mode 100644 index 000000000000..e1ff6a2e4e02 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_capability_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.DeviceCapabilityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetDeviceCapability": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDeviceCapabilities": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/device_capability_service_proto_list.json b/packages/google-ads-admanager/src/v1/device_capability_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_capability_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/device_category_service_client.ts b/packages/google-ads-admanager/src/v1/device_category_service_client.ts index 6fb933f6d925..081415d449be 100644 --- a/packages/google-ads-admanager/src/v1/device_category_service_client.ts +++ b/packages/google-ads-admanager/src/v1/device_category_service_client.ts @@ -186,18 +186,51 @@ export class DeviceCategoryServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class DeviceCategoryServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class DeviceCategoryServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class DeviceCategoryServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class DeviceCategoryServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -525,7 +579,7 @@ export class DeviceCategoryServiceClient { * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListDeviceCategories` * call. Provide this to retrieve the subsequent page. @@ -641,7 +695,7 @@ export class DeviceCategoryServiceClient { * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListDeviceCategories` * call. Provide this to retrieve the subsequent page. @@ -706,7 +760,7 @@ export class DeviceCategoryServiceClient { * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListDeviceCategories` * call. Provide this to retrieve the subsequent page. @@ -811,6 +865,55 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class DeviceCategoryServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/device_category_service_proto_list.json b/packages/google-ads-admanager/src/v1/device_category_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/device_category_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/device_category_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/device_manufacturer_service_client.ts b/packages/google-ads-admanager/src/v1/device_manufacturer_service_client.ts new file mode 100644 index 000000000000..f41ef21acce1 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_manufacturer_service_client.ts @@ -0,0 +1,2433 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/device_manufacturer_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './device_manufacturer_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `DeviceManufacturer` objects. + * @class + * @memberof v1 + */ +export class DeviceManufacturerServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + deviceManufacturerServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DeviceManufacturerServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DeviceManufacturerServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DeviceManufacturerServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDeviceManufacturers: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deviceManufacturers') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.DeviceManufacturerService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.deviceManufacturerServiceStub) { + return this.deviceManufacturerServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.DeviceManufacturerService. + this.deviceManufacturerServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.DeviceManufacturerService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.DeviceManufacturerService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const deviceManufacturerServiceStubMethods = + ['getDeviceManufacturer', 'listDeviceManufacturers']; + for (const methodName of deviceManufacturerServiceStubMethods) { + const callPromise = this.deviceManufacturerServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.deviceManufacturerServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `DeviceManufacturer` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_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 protos.google.ads.admanager.v1.DeviceManufacturer|DeviceManufacturer}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/device_manufacturer_service.get_device_manufacturer.js + * region_tag:admanager_v1_generated_DeviceManufacturerService_GetDeviceManufacturer_async + */ + getDeviceManufacturer( + request?: protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|undefined, {}|undefined + ]>; + getDeviceManufacturer( + request: protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|null|undefined, + {}|null|undefined>): void; + getDeviceManufacturer( + request: protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest, + callback: Callback< + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|null|undefined, + {}|null|undefined>): void; + getDeviceManufacturer( + request?: protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|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().catch(err => {throw err}); + this._log.info('getDeviceManufacturer request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDeviceManufacturer response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDeviceManufacturer(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IDeviceManufacturer, + protos.google.ads.admanager.v1.IGetDeviceManufacturerRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDeviceManufacturer response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `DeviceManufacturer` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.DeviceManufacturer|DeviceManufacturer}. + * 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 `listDeviceManufacturersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeviceManufacturers( + request?: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IDeviceManufacturer[], + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest|null, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse + ]>; + listDeviceManufacturers( + request: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceManufacturer>): void; + listDeviceManufacturers( + request: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceManufacturer>): void; + listDeviceManufacturers( + request?: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceManufacturer>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceManufacturer>): + Promise<[ + protos.google.ads.admanager.v1.IDeviceManufacturer[], + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest|null, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse|null|undefined, + protos.google.ads.admanager.v1.IDeviceManufacturer>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDeviceManufacturers values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDeviceManufacturers request %j', request); + return this.innerApiCalls + .listDeviceManufacturers(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IDeviceManufacturer[], + protos.google.ads.admanager.v1.IListDeviceManufacturersRequest|null, + protos.google.ads.admanager.v1.IListDeviceManufacturersResponse + ]) => { + this._log.info('listDeviceManufacturers values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDeviceManufacturers`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.DeviceManufacturer|DeviceManufacturer} 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 `listDeviceManufacturersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeviceManufacturersStream( + request?: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + 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['listDeviceManufacturers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeviceManufacturers stream %j', request); + return this.descriptors.page.listDeviceManufacturers.createStream( + this.innerApiCalls.listDeviceManufacturers as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDeviceManufacturers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.DeviceManufacturer|DeviceManufacturer}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/device_manufacturer_service.list_device_manufacturers.js + * region_tag:admanager_v1_generated_DeviceManufacturerService_ListDeviceManufacturers_async + */ + listDeviceManufacturersAsync( + request?: protos.google.ads.admanager.v1.IListDeviceManufacturersRequest, + 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['listDeviceManufacturers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeviceManufacturers iterate %j', request); + return this.descriptors.page.listDeviceManufacturers.asyncIterate( + this.innerApiCalls['listDeviceManufacturers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.deviceManufacturerServiceStub && !this._terminated) { + return this.deviceManufacturerServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/device_manufacturer_service_client_config.json b/packages/google-ads-admanager/src/v1/device_manufacturer_service_client_config.json new file mode 100644 index 000000000000..bac5b3909e94 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_manufacturer_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.DeviceManufacturerService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetDeviceManufacturer": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDeviceManufacturers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/device_manufacturer_service_proto_list.json b/packages/google-ads-admanager/src/v1/device_manufacturer_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/device_manufacturer_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts index afcfbb983362..35c52e89c2a8 100644 --- a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts +++ b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts @@ -186,18 +186,51 @@ export class EntitySignalsMappingServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class EntitySignalsMappingServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class EntitySignalsMappingServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class EntitySignalsMappingServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class EntitySignalsMappingServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -1214,6 +1268,55 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1250,6 +1353,78 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1286,6 +1461,150 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1358,6 +1677,150 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1466,6 +1929,42 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1502,6 +2001,42 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1646,6 +2181,114 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1993,6 +2636,42 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -2101,6 +2780,42 @@ export class EntitySignalsMappingServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_proto_list.json b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/gapic_metadata.json b/packages/google-ads-admanager/src/v1/gapic_metadata.json index a73c2b998ddd..2e69e8f6f433 100644 --- a/packages/google-ads-admanager/src/v1/gapic_metadata.json +++ b/packages/google-ads-admanager/src/v1/gapic_metadata.json @@ -73,6 +73,54 @@ } } }, + "AdReviewCenterAdService": { + "clients": { + "grpc": { + "libraryClient": "AdReviewCenterAdServiceClient", + "rpcs": { + "BatchAllowAdReviewCenterAds": { + "methods": [ + "batchAllowAdReviewCenterAds" + ] + }, + "BatchBlockAdReviewCenterAds": { + "methods": [ + "batchBlockAdReviewCenterAds" + ] + }, + "SearchAdReviewCenterAds": { + "methods": [ + "searchAdReviewCenterAds", + "searchAdReviewCenterAdsStream", + "searchAdReviewCenterAdsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AdReviewCenterAdServiceClient", + "rpcs": { + "BatchAllowAdReviewCenterAds": { + "methods": [ + "batchAllowAdReviewCenterAds" + ] + }, + "BatchBlockAdReviewCenterAds": { + "methods": [ + "batchBlockAdReviewCenterAds" + ] + }, + "SearchAdReviewCenterAds": { + "methods": [ + "searchAdReviewCenterAds", + "searchAdReviewCenterAdsStream", + "searchAdReviewCenterAdsAsync" + ] + } + } + } + } + }, "AdUnitService": { "clients": { "grpc": { @@ -125,6 +173,82 @@ } } }, + "ApplicationService": { + "clients": { + "grpc": { + "libraryClient": "ApplicationServiceClient", + "rpcs": { + "GetApplication": { + "methods": [ + "getApplication" + ] + }, + "ListApplications": { + "methods": [ + "listApplications", + "listApplicationsStream", + "listApplicationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ApplicationServiceClient", + "rpcs": { + "GetApplication": { + "methods": [ + "getApplication" + ] + }, + "ListApplications": { + "methods": [ + "listApplications", + "listApplicationsStream", + "listApplicationsAsync" + ] + } + } + } + } + }, + "AudienceSegmentService": { + "clients": { + "grpc": { + "libraryClient": "AudienceSegmentServiceClient", + "rpcs": { + "GetAudienceSegment": { + "methods": [ + "getAudienceSegment" + ] + }, + "ListAudienceSegments": { + "methods": [ + "listAudienceSegments", + "listAudienceSegmentsStream", + "listAudienceSegmentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AudienceSegmentServiceClient", + "rpcs": { + "GetAudienceSegment": { + "methods": [ + "getAudienceSegment" + ] + }, + "ListAudienceSegments": { + "methods": [ + "listAudienceSegments", + "listAudienceSegmentsStream", + "listAudienceSegmentsAsync" + ] + } + } + } + } + }, "BandwidthGroupService": { "clients": { "grpc": { @@ -163,6 +287,158 @@ } } }, + "BrowserLanguageService": { + "clients": { + "grpc": { + "libraryClient": "BrowserLanguageServiceClient", + "rpcs": { + "GetBrowserLanguage": { + "methods": [ + "getBrowserLanguage" + ] + }, + "ListBrowserLanguages": { + "methods": [ + "listBrowserLanguages", + "listBrowserLanguagesStream", + "listBrowserLanguagesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BrowserLanguageServiceClient", + "rpcs": { + "GetBrowserLanguage": { + "methods": [ + "getBrowserLanguage" + ] + }, + "ListBrowserLanguages": { + "methods": [ + "listBrowserLanguages", + "listBrowserLanguagesStream", + "listBrowserLanguagesAsync" + ] + } + } + } + } + }, + "BrowserService": { + "clients": { + "grpc": { + "libraryClient": "BrowserServiceClient", + "rpcs": { + "GetBrowser": { + "methods": [ + "getBrowser" + ] + }, + "ListBrowsers": { + "methods": [ + "listBrowsers", + "listBrowsersStream", + "listBrowsersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BrowserServiceClient", + "rpcs": { + "GetBrowser": { + "methods": [ + "getBrowser" + ] + }, + "ListBrowsers": { + "methods": [ + "listBrowsers", + "listBrowsersStream", + "listBrowsersAsync" + ] + } + } + } + } + }, + "CmsMetadataKeyService": { + "clients": { + "grpc": { + "libraryClient": "CmsMetadataKeyServiceClient", + "rpcs": { + "GetCmsMetadataKey": { + "methods": [ + "getCmsMetadataKey" + ] + }, + "ListCmsMetadataKeys": { + "methods": [ + "listCmsMetadataKeys", + "listCmsMetadataKeysStream", + "listCmsMetadataKeysAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CmsMetadataKeyServiceClient", + "rpcs": { + "GetCmsMetadataKey": { + "methods": [ + "getCmsMetadataKey" + ] + }, + "ListCmsMetadataKeys": { + "methods": [ + "listCmsMetadataKeys", + "listCmsMetadataKeysStream", + "listCmsMetadataKeysAsync" + ] + } + } + } + } + }, + "CmsMetadataValueService": { + "clients": { + "grpc": { + "libraryClient": "CmsMetadataValueServiceClient", + "rpcs": { + "GetCmsMetadataValue": { + "methods": [ + "getCmsMetadataValue" + ] + }, + "ListCmsMetadataValues": { + "methods": [ + "listCmsMetadataValues", + "listCmsMetadataValuesStream", + "listCmsMetadataValuesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CmsMetadataValueServiceClient", + "rpcs": { + "GetCmsMetadataValue": { + "methods": [ + "getCmsMetadataValue" + ] + }, + "ListCmsMetadataValues": { + "methods": [ + "listCmsMetadataValues", + "listCmsMetadataValuesStream", + "listCmsMetadataValuesAsync" + ] + } + } + } + } + }, "CompanyService": { "clients": { "grpc": { @@ -201,6 +477,236 @@ } } }, + "ContactService": { + "clients": { + "grpc": { + "libraryClient": "ContactServiceClient", + "rpcs": { + "GetContact": { + "methods": [ + "getContact" + ] + }, + "CreateContact": { + "methods": [ + "createContact" + ] + }, + "BatchCreateContacts": { + "methods": [ + "batchCreateContacts" + ] + }, + "UpdateContact": { + "methods": [ + "updateContact" + ] + }, + "BatchUpdateContacts": { + "methods": [ + "batchUpdateContacts" + ] + }, + "ListContacts": { + "methods": [ + "listContacts", + "listContactsStream", + "listContactsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContactServiceClient", + "rpcs": { + "GetContact": { + "methods": [ + "getContact" + ] + }, + "CreateContact": { + "methods": [ + "createContact" + ] + }, + "BatchCreateContacts": { + "methods": [ + "batchCreateContacts" + ] + }, + "UpdateContact": { + "methods": [ + "updateContact" + ] + }, + "BatchUpdateContacts": { + "methods": [ + "batchUpdateContacts" + ] + }, + "ListContacts": { + "methods": [ + "listContacts", + "listContactsStream", + "listContactsAsync" + ] + } + } + } + } + }, + "ContentBundleService": { + "clients": { + "grpc": { + "libraryClient": "ContentBundleServiceClient", + "rpcs": { + "GetContentBundle": { + "methods": [ + "getContentBundle" + ] + }, + "ListContentBundles": { + "methods": [ + "listContentBundles", + "listContentBundlesStream", + "listContentBundlesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContentBundleServiceClient", + "rpcs": { + "GetContentBundle": { + "methods": [ + "getContentBundle" + ] + }, + "ListContentBundles": { + "methods": [ + "listContentBundles", + "listContentBundlesStream", + "listContentBundlesAsync" + ] + } + } + } + } + }, + "ContentLabelService": { + "clients": { + "grpc": { + "libraryClient": "ContentLabelServiceClient", + "rpcs": { + "GetContentLabel": { + "methods": [ + "getContentLabel" + ] + }, + "ListContentLabels": { + "methods": [ + "listContentLabels", + "listContentLabelsStream", + "listContentLabelsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContentLabelServiceClient", + "rpcs": { + "GetContentLabel": { + "methods": [ + "getContentLabel" + ] + }, + "ListContentLabels": { + "methods": [ + "listContentLabels", + "listContentLabelsStream", + "listContentLabelsAsync" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "GetContent": { + "methods": [ + "getContent" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "GetContent": { + "methods": [ + "getContent" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + } + } + }, + "CreativeTemplateService": { + "clients": { + "grpc": { + "libraryClient": "CreativeTemplateServiceClient", + "rpcs": { + "GetCreativeTemplate": { + "methods": [ + "getCreativeTemplate" + ] + }, + "ListCreativeTemplates": { + "methods": [ + "listCreativeTemplates", + "listCreativeTemplatesStream", + "listCreativeTemplatesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CreativeTemplateServiceClient", + "rpcs": { + "GetCreativeTemplate": { + "methods": [ + "getCreativeTemplate" + ] + }, + "ListCreativeTemplates": { + "methods": [ + "listCreativeTemplates", + "listCreativeTemplatesStream", + "listCreativeTemplatesAsync" + ] + } + } + } + } + }, "CustomFieldService": { "clients": { "grpc": { @@ -211,6 +717,36 @@ "getCustomField" ] }, + "CreateCustomField": { + "methods": [ + "createCustomField" + ] + }, + "BatchCreateCustomFields": { + "methods": [ + "batchCreateCustomFields" + ] + }, + "UpdateCustomField": { + "methods": [ + "updateCustomField" + ] + }, + "BatchUpdateCustomFields": { + "methods": [ + "batchUpdateCustomFields" + ] + }, + "BatchActivateCustomFields": { + "methods": [ + "batchActivateCustomFields" + ] + }, + "BatchDeactivateCustomFields": { + "methods": [ + "batchDeactivateCustomFields" + ] + }, "ListCustomFields": { "methods": [ "listCustomFields", @@ -228,6 +764,36 @@ "getCustomField" ] }, + "CreateCustomField": { + "methods": [ + "createCustomField" + ] + }, + "BatchCreateCustomFields": { + "methods": [ + "batchCreateCustomFields" + ] + }, + "UpdateCustomField": { + "methods": [ + "updateCustomField" + ] + }, + "BatchUpdateCustomFields": { + "methods": [ + "batchUpdateCustomFields" + ] + }, + "BatchActivateCustomFields": { + "methods": [ + "batchActivateCustomFields" + ] + }, + "BatchDeactivateCustomFields": { + "methods": [ + "batchDeactivateCustomFields" + ] + }, "ListCustomFields": { "methods": [ "listCustomFields", @@ -304,11 +870,49 @@ "getCustomTargetingValue" ] }, - "ListCustomTargetingValues": { + "ListCustomTargetingValues": { + "methods": [ + "listCustomTargetingValues", + "listCustomTargetingValuesStream", + "listCustomTargetingValuesAsync" + ] + } + } + } + } + }, + "DeviceCapabilityService": { + "clients": { + "grpc": { + "libraryClient": "DeviceCapabilityServiceClient", + "rpcs": { + "GetDeviceCapability": { + "methods": [ + "getDeviceCapability" + ] + }, + "ListDeviceCapabilities": { + "methods": [ + "listDeviceCapabilities", + "listDeviceCapabilitiesStream", + "listDeviceCapabilitiesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DeviceCapabilityServiceClient", + "rpcs": { + "GetDeviceCapability": { + "methods": [ + "getDeviceCapability" + ] + }, + "ListDeviceCapabilities": { "methods": [ - "listCustomTargetingValues", - "listCustomTargetingValuesStream", - "listCustomTargetingValuesAsync" + "listDeviceCapabilities", + "listDeviceCapabilitiesStream", + "listDeviceCapabilitiesAsync" ] } } @@ -353,6 +957,44 @@ } } }, + "DeviceManufacturerService": { + "clients": { + "grpc": { + "libraryClient": "DeviceManufacturerServiceClient", + "rpcs": { + "GetDeviceManufacturer": { + "methods": [ + "getDeviceManufacturer" + ] + }, + "ListDeviceManufacturers": { + "methods": [ + "listDeviceManufacturers", + "listDeviceManufacturersStream", + "listDeviceManufacturersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DeviceManufacturerServiceClient", + "rpcs": { + "GetDeviceManufacturer": { + "methods": [ + "getDeviceManufacturer" + ] + }, + "ListDeviceManufacturers": { + "methods": [ + "listDeviceManufacturers", + "listDeviceManufacturersStream", + "listDeviceManufacturersAsync" + ] + } + } + } + } + }, "EntitySignalsMappingService": { "clients": { "grpc": { @@ -469,6 +1111,120 @@ } } }, + "MobileCarrierService": { + "clients": { + "grpc": { + "libraryClient": "MobileCarrierServiceClient", + "rpcs": { + "GetMobileCarrier": { + "methods": [ + "getMobileCarrier" + ] + }, + "ListMobileCarriers": { + "methods": [ + "listMobileCarriers", + "listMobileCarriersStream", + "listMobileCarriersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MobileCarrierServiceClient", + "rpcs": { + "GetMobileCarrier": { + "methods": [ + "getMobileCarrier" + ] + }, + "ListMobileCarriers": { + "methods": [ + "listMobileCarriers", + "listMobileCarriersStream", + "listMobileCarriersAsync" + ] + } + } + } + } + }, + "MobileDeviceService": { + "clients": { + "grpc": { + "libraryClient": "MobileDeviceServiceClient", + "rpcs": { + "GetMobileDevice": { + "methods": [ + "getMobileDevice" + ] + }, + "ListMobileDevices": { + "methods": [ + "listMobileDevices", + "listMobileDevicesStream", + "listMobileDevicesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MobileDeviceServiceClient", + "rpcs": { + "GetMobileDevice": { + "methods": [ + "getMobileDevice" + ] + }, + "ListMobileDevices": { + "methods": [ + "listMobileDevices", + "listMobileDevicesStream", + "listMobileDevicesAsync" + ] + } + } + } + } + }, + "MobileDeviceSubmodelService": { + "clients": { + "grpc": { + "libraryClient": "MobileDeviceSubmodelServiceClient", + "rpcs": { + "GetMobileDeviceSubmodel": { + "methods": [ + "getMobileDeviceSubmodel" + ] + }, + "ListMobileDeviceSubmodels": { + "methods": [ + "listMobileDeviceSubmodels", + "listMobileDeviceSubmodelsStream", + "listMobileDeviceSubmodelsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MobileDeviceSubmodelServiceClient", + "rpcs": { + "GetMobileDeviceSubmodel": { + "methods": [ + "getMobileDeviceSubmodel" + ] + }, + "ListMobileDeviceSubmodels": { + "methods": [ + "listMobileDeviceSubmodels", + "listMobileDeviceSubmodelsStream", + "listMobileDeviceSubmodelsAsync" + ] + } + } + } + } + }, "NetworkService": { "clients": { "grpc": { @@ -627,6 +1383,41 @@ "getPlacement" ] }, + "CreatePlacement": { + "methods": [ + "createPlacement" + ] + }, + "UpdatePlacement": { + "methods": [ + "updatePlacement" + ] + }, + "BatchCreatePlacements": { + "methods": [ + "batchCreatePlacements" + ] + }, + "BatchUpdatePlacements": { + "methods": [ + "batchUpdatePlacements" + ] + }, + "BatchActivatePlacements": { + "methods": [ + "batchActivatePlacements" + ] + }, + "BatchDeactivatePlacements": { + "methods": [ + "batchDeactivatePlacements" + ] + }, + "BatchArchivePlacements": { + "methods": [ + "batchArchivePlacements" + ] + }, "ListPlacements": { "methods": [ "listPlacements", @@ -644,6 +1435,41 @@ "getPlacement" ] }, + "CreatePlacement": { + "methods": [ + "createPlacement" + ] + }, + "UpdatePlacement": { + "methods": [ + "updatePlacement" + ] + }, + "BatchCreatePlacements": { + "methods": [ + "batchCreatePlacements" + ] + }, + "BatchUpdatePlacements": { + "methods": [ + "batchUpdatePlacements" + ] + }, + "BatchActivatePlacements": { + "methods": [ + "batchActivatePlacements" + ] + }, + "BatchDeactivatePlacements": { + "methods": [ + "batchDeactivatePlacements" + ] + }, + "BatchArchivePlacements": { + "methods": [ + "batchArchivePlacements" + ] + }, "ListPlacements": { "methods": [ "listPlacements", @@ -929,6 +1755,104 @@ } } }, + "SiteService": { + "clients": { + "grpc": { + "libraryClient": "SiteServiceClient", + "rpcs": { + "GetSite": { + "methods": [ + "getSite" + ] + }, + "CreateSite": { + "methods": [ + "createSite" + ] + }, + "BatchCreateSites": { + "methods": [ + "batchCreateSites" + ] + }, + "UpdateSite": { + "methods": [ + "updateSite" + ] + }, + "BatchUpdateSites": { + "methods": [ + "batchUpdateSites" + ] + }, + "BatchDeactivateSites": { + "methods": [ + "batchDeactivateSites" + ] + }, + "BatchSubmitSitesForApproval": { + "methods": [ + "batchSubmitSitesForApproval" + ] + }, + "ListSites": { + "methods": [ + "listSites", + "listSitesStream", + "listSitesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "SiteServiceClient", + "rpcs": { + "GetSite": { + "methods": [ + "getSite" + ] + }, + "CreateSite": { + "methods": [ + "createSite" + ] + }, + "BatchCreateSites": { + "methods": [ + "batchCreateSites" + ] + }, + "UpdateSite": { + "methods": [ + "updateSite" + ] + }, + "BatchUpdateSites": { + "methods": [ + "batchUpdateSites" + ] + }, + "BatchDeactivateSites": { + "methods": [ + "batchDeactivateSites" + ] + }, + "BatchSubmitSitesForApproval": { + "methods": [ + "batchSubmitSitesForApproval" + ] + }, + "ListSites": { + "methods": [ + "listSites", + "listSitesStream", + "listSitesAsync" + ] + } + } + } + } + }, "TaxonomyCategoryService": { "clients": { "grpc": { @@ -967,6 +1891,104 @@ } } }, + "TeamService": { + "clients": { + "grpc": { + "libraryClient": "TeamServiceClient", + "rpcs": { + "GetTeam": { + "methods": [ + "getTeam" + ] + }, + "CreateTeam": { + "methods": [ + "createTeam" + ] + }, + "BatchCreateTeams": { + "methods": [ + "batchCreateTeams" + ] + }, + "UpdateTeam": { + "methods": [ + "updateTeam" + ] + }, + "BatchUpdateTeams": { + "methods": [ + "batchUpdateTeams" + ] + }, + "BatchActivateTeams": { + "methods": [ + "batchActivateTeams" + ] + }, + "BatchDeactivateTeams": { + "methods": [ + "batchDeactivateTeams" + ] + }, + "ListTeams": { + "methods": [ + "listTeams", + "listTeamsStream", + "listTeamsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "TeamServiceClient", + "rpcs": { + "GetTeam": { + "methods": [ + "getTeam" + ] + }, + "CreateTeam": { + "methods": [ + "createTeam" + ] + }, + "BatchCreateTeams": { + "methods": [ + "batchCreateTeams" + ] + }, + "UpdateTeam": { + "methods": [ + "updateTeam" + ] + }, + "BatchUpdateTeams": { + "methods": [ + "batchUpdateTeams" + ] + }, + "BatchActivateTeams": { + "methods": [ + "batchActivateTeams" + ] + }, + "BatchDeactivateTeams": { + "methods": [ + "batchDeactivateTeams" + ] + }, + "ListTeams": { + "methods": [ + "listTeams", + "listTeamsStream", + "listTeamsAsync" + ] + } + } + } + } + }, "UserService": { "clients": { "grpc": { diff --git a/packages/google-ads-admanager/src/v1/geo_target_service_client.ts b/packages/google-ads-admanager/src/v1/geo_target_service_client.ts index 7a0d9c3a96ea..802330bd3f13 100644 --- a/packages/google-ads-admanager/src/v1/geo_target_service_client.ts +++ b/packages/google-ads-admanager/src/v1/geo_target_service_client.ts @@ -186,18 +186,51 @@ export class GeoTargetServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class GeoTargetServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class GeoTargetServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class GeoTargetServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class GeoTargetServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -524,8 +578,8 @@ export class GeoTargetServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListGeoTargets` call. * Provide this to retrieve the subsequent page. @@ -640,8 +694,8 @@ export class GeoTargetServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListGeoTargets` call. * Provide this to retrieve the subsequent page. @@ -705,8 +759,8 @@ export class GeoTargetServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListGeoTargets` call. * Provide this to retrieve the subsequent page. @@ -811,6 +865,55 @@ export class GeoTargetServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class GeoTargetServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class GeoTargetServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class GeoTargetServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class GeoTargetServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class GeoTargetServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class GeoTargetServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class GeoTargetServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class GeoTargetServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/geo_target_service_proto_list.json b/packages/google-ads-admanager/src/v1/geo_target_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/geo_target_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/geo_target_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/index.ts b/packages/google-ads-admanager/src/v1/index.ts index 550a79b8620f..02c9f4f07255 100644 --- a/packages/google-ads-admanager/src/v1/index.ts +++ b/packages/google-ads-admanager/src/v1/index.ts @@ -17,15 +17,32 @@ // ** All changes to this file may be overwritten. ** export {AdBreakServiceClient} from './ad_break_service_client'; +export {AdReviewCenterAdServiceClient} from './ad_review_center_ad_service_client'; export {AdUnitServiceClient} from './ad_unit_service_client'; +export {ApplicationServiceClient} from './application_service_client'; +export {AudienceSegmentServiceClient} from './audience_segment_service_client'; export {BandwidthGroupServiceClient} from './bandwidth_group_service_client'; +export {BrowserLanguageServiceClient} from './browser_language_service_client'; +export {BrowserServiceClient} from './browser_service_client'; +export {CmsMetadataKeyServiceClient} from './cms_metadata_key_service_client'; +export {CmsMetadataValueServiceClient} from './cms_metadata_value_service_client'; export {CompanyServiceClient} from './company_service_client'; +export {ContactServiceClient} from './contact_service_client'; +export {ContentBundleServiceClient} from './content_bundle_service_client'; +export {ContentLabelServiceClient} from './content_label_service_client'; +export {ContentServiceClient} from './content_service_client'; +export {CreativeTemplateServiceClient} from './creative_template_service_client'; export {CustomFieldServiceClient} from './custom_field_service_client'; export {CustomTargetingKeyServiceClient} from './custom_targeting_key_service_client'; export {CustomTargetingValueServiceClient} from './custom_targeting_value_service_client'; +export {DeviceCapabilityServiceClient} from './device_capability_service_client'; export {DeviceCategoryServiceClient} from './device_category_service_client'; +export {DeviceManufacturerServiceClient} from './device_manufacturer_service_client'; export {EntitySignalsMappingServiceClient} from './entity_signals_mapping_service_client'; export {GeoTargetServiceClient} from './geo_target_service_client'; +export {MobileCarrierServiceClient} from './mobile_carrier_service_client'; +export {MobileDeviceServiceClient} from './mobile_device_service_client'; +export {MobileDeviceSubmodelServiceClient} from './mobile_device_submodel_service_client'; export {NetworkServiceClient} from './network_service_client'; export {OperatingSystemServiceClient} from './operating_system_service_client'; export {OperatingSystemVersionServiceClient} from './operating_system_version_service_client'; @@ -36,5 +53,7 @@ export {PrivateAuctionServiceClient} from './private_auction_service_client'; export {ProgrammaticBuyerServiceClient} from './programmatic_buyer_service_client'; export {ReportServiceClient} from './report_service_client'; export {RoleServiceClient} from './role_service_client'; +export {SiteServiceClient} from './site_service_client'; export {TaxonomyCategoryServiceClient} from './taxonomy_category_service_client'; +export {TeamServiceClient} from './team_service_client'; export {UserServiceClient} from './user_service_client'; diff --git a/packages/google-ads-admanager/src/v1/mobile_carrier_service_client.ts b/packages/google-ads-admanager/src/v1/mobile_carrier_service_client.ts new file mode 100644 index 000000000000..e621ec4d9d22 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_carrier_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/mobile_carrier_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './mobile_carrier_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `MobileCarrier` objects. + * @class + * @memberof v1 + */ +export class MobileCarrierServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + mobileCarrierServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MobileCarrierServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MobileCarrierServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MobileCarrierServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listMobileCarriers: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mobileCarriers') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.MobileCarrierService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.mobileCarrierServiceStub) { + return this.mobileCarrierServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.MobileCarrierService. + this.mobileCarrierServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.MobileCarrierService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.MobileCarrierService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const mobileCarrierServiceStubMethods = + ['getMobileCarrier', 'listMobileCarriers']; + for (const methodName of mobileCarrierServiceStubMethods) { + const callPromise = this.mobileCarrierServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.mobileCarrierServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `MobileCarrier` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_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 protos.google.ads.admanager.v1.MobileCarrier|MobileCarrier}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_carrier_service.get_mobile_carrier.js + * region_tag:admanager_v1_generated_MobileCarrierService_GetMobileCarrier_async + */ + getMobileCarrier( + request?: protos.google.ads.admanager.v1.IGetMobileCarrierRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|undefined, {}|undefined + ]>; + getMobileCarrier( + request: protos.google.ads.admanager.v1.IGetMobileCarrierRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|null|undefined, + {}|null|undefined>): void; + getMobileCarrier( + request: protos.google.ads.admanager.v1.IGetMobileCarrierRequest, + callback: Callback< + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|null|undefined, + {}|null|undefined>): void; + getMobileCarrier( + request?: protos.google.ads.admanager.v1.IGetMobileCarrierRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|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().catch(err => {throw err}); + this._log.info('getMobileCarrier request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMobileCarrier response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMobileCarrier(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IMobileCarrier, + protos.google.ads.admanager.v1.IGetMobileCarrierRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMobileCarrier response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `MobileCarrier` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileCarrier|MobileCarrier}. + * 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 `listMobileCarriersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileCarriers( + request?: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileCarrier[], + protos.google.ads.admanager.v1.IListMobileCarriersRequest|null, + protos.google.ads.admanager.v1.IListMobileCarriersResponse + ]>; + listMobileCarriers( + request: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileCarriersRequest, + protos.google.ads.admanager.v1.IListMobileCarriersResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileCarrier>): void; + listMobileCarriers( + request: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileCarriersRequest, + protos.google.ads.admanager.v1.IListMobileCarriersResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileCarrier>): void; + listMobileCarriers( + request?: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListMobileCarriersRequest, + protos.google.ads.admanager.v1.IListMobileCarriersResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileCarrier>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileCarriersRequest, + protos.google.ads.admanager.v1.IListMobileCarriersResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileCarrier>): + Promise<[ + protos.google.ads.admanager.v1.IMobileCarrier[], + protos.google.ads.admanager.v1.IListMobileCarriersRequest|null, + protos.google.ads.admanager.v1.IListMobileCarriersResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileCarriersRequest, + protos.google.ads.admanager.v1.IListMobileCarriersResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileCarrier>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMobileCarriers values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMobileCarriers request %j', request); + return this.innerApiCalls + .listMobileCarriers(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IMobileCarrier[], + protos.google.ads.admanager.v1.IListMobileCarriersRequest|null, + protos.google.ads.admanager.v1.IListMobileCarriersResponse + ]) => { + this._log.info('listMobileCarriers values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMobileCarriers`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileCarrier|MobileCarrier} 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 `listMobileCarriersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileCarriersStream( + request?: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + 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['listMobileCarriers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileCarriers stream %j', request); + return this.descriptors.page.listMobileCarriers.createStream( + this.innerApiCalls.listMobileCarriers as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMobileCarriers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.MobileCarrier|MobileCarrier}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_carrier_service.list_mobile_carriers.js + * region_tag:admanager_v1_generated_MobileCarrierService_ListMobileCarriers_async + */ + listMobileCarriersAsync( + request?: protos.google.ads.admanager.v1.IListMobileCarriersRequest, + 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['listMobileCarriers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileCarriers iterate %j', request); + return this.descriptors.page.listMobileCarriers.asyncIterate( + this.innerApiCalls['listMobileCarriers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.mobileCarrierServiceStub && !this._terminated) { + return this.mobileCarrierServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/mobile_carrier_service_client_config.json b/packages/google-ads-admanager/src/v1/mobile_carrier_service_client_config.json new file mode 100644 index 000000000000..d3bed0c80d86 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_carrier_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileCarrierService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetMobileCarrier": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMobileCarriers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/mobile_carrier_service_proto_list.json b/packages/google-ads-admanager/src/v1/mobile_carrier_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_carrier_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/mobile_device_service_client.ts b/packages/google-ads-admanager/src/v1/mobile_device_service_client.ts new file mode 100644 index 000000000000..52d48b9f5cf0 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_service_client.ts @@ -0,0 +1,2432 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/mobile_device_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './mobile_device_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `MobileDevice` objects. + * @class + * @memberof v1 + */ +export class MobileDeviceServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + mobileDeviceServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MobileDeviceServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MobileDeviceServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MobileDeviceServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listMobileDevices: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mobileDevices') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.MobileDeviceService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.mobileDeviceServiceStub) { + return this.mobileDeviceServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.MobileDeviceService. + this.mobileDeviceServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.MobileDeviceService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.MobileDeviceService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const mobileDeviceServiceStubMethods = + ['getMobileDevice', 'listMobileDevices']; + for (const methodName of mobileDeviceServiceStubMethods) { + const callPromise = this.mobileDeviceServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.mobileDeviceServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `MobileDevice` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_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 protos.google.ads.admanager.v1.MobileDevice|MobileDevice}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_device_service.get_mobile_device.js + * region_tag:admanager_v1_generated_MobileDeviceService_GetMobileDevice_async + */ + getMobileDevice( + request?: protos.google.ads.admanager.v1.IGetMobileDeviceRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|undefined, {}|undefined + ]>; + getMobileDevice( + request: protos.google.ads.admanager.v1.IGetMobileDeviceRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|null|undefined, + {}|null|undefined>): void; + getMobileDevice( + request: protos.google.ads.admanager.v1.IGetMobileDeviceRequest, + callback: Callback< + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|null|undefined, + {}|null|undefined>): void; + getMobileDevice( + request?: protos.google.ads.admanager.v1.IGetMobileDeviceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|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().catch(err => {throw err}); + this._log.info('getMobileDevice request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMobileDevice response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMobileDevice(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IMobileDevice, + protos.google.ads.admanager.v1.IGetMobileDeviceRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMobileDevice response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `MobileDevice` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileDevice|MobileDevice}. + * 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 `listMobileDevicesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileDevices( + request?: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileDevice[], + protos.google.ads.admanager.v1.IListMobileDevicesRequest|null, + protos.google.ads.admanager.v1.IListMobileDevicesResponse + ]>; + listMobileDevices( + request: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDevicesRequest, + protos.google.ads.admanager.v1.IListMobileDevicesResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDevice>): void; + listMobileDevices( + request: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDevicesRequest, + protos.google.ads.admanager.v1.IListMobileDevicesResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDevice>): void; + listMobileDevices( + request?: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDevicesRequest, + protos.google.ads.admanager.v1.IListMobileDevicesResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDevice>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDevicesRequest, + protos.google.ads.admanager.v1.IListMobileDevicesResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDevice>): + Promise<[ + protos.google.ads.admanager.v1.IMobileDevice[], + protos.google.ads.admanager.v1.IListMobileDevicesRequest|null, + protos.google.ads.admanager.v1.IListMobileDevicesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDevicesRequest, + protos.google.ads.admanager.v1.IListMobileDevicesResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDevice>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMobileDevices values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMobileDevices request %j', request); + return this.innerApiCalls + .listMobileDevices(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IMobileDevice[], + protos.google.ads.admanager.v1.IListMobileDevicesRequest|null, + protos.google.ads.admanager.v1.IListMobileDevicesResponse + ]) => { + this._log.info('listMobileDevices values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMobileDevices`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileDevice|MobileDevice} 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 `listMobileDevicesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileDevicesStream( + request?: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + 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['listMobileDevices']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileDevices stream %j', request); + return this.descriptors.page.listMobileDevices.createStream( + this.innerApiCalls.listMobileDevices as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMobileDevices`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.MobileDevice|MobileDevice}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_device_service.list_mobile_devices.js + * region_tag:admanager_v1_generated_MobileDeviceService_ListMobileDevices_async + */ + listMobileDevicesAsync( + request?: protos.google.ads.admanager.v1.IListMobileDevicesRequest, + 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['listMobileDevices']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileDevices iterate %j', request); + return this.descriptors.page.listMobileDevices.asyncIterate( + this.innerApiCalls['listMobileDevices'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.mobileDeviceServiceStub && !this._terminated) { + return this.mobileDeviceServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/mobile_device_service_client_config.json b/packages/google-ads-admanager/src/v1/mobile_device_service_client_config.json new file mode 100644 index 000000000000..40c587310aed --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileDeviceService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetMobileDevice": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMobileDevices": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/mobile_device_service_proto_list.json b/packages/google-ads-admanager/src/v1/mobile_device_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client.ts b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client.ts new file mode 100644 index 000000000000..775cd5173855 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client.ts @@ -0,0 +1,2439 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/mobile_device_submodel_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './mobile_device_submodel_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `MobileDeviceSubmodel` objects. + * @class + * @memberof v1 + */ +export class MobileDeviceSubmodelServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + mobileDeviceSubmodelServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MobileDeviceSubmodelServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MobileDeviceSubmodelServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MobileDeviceSubmodelServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listMobileDeviceSubmodels: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mobileDeviceSubmodels') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.MobileDeviceSubmodelService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.mobileDeviceSubmodelServiceStub) { + return this.mobileDeviceSubmodelServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.MobileDeviceSubmodelService. + this.mobileDeviceSubmodelServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.MobileDeviceSubmodelService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.MobileDeviceSubmodelService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const mobileDeviceSubmodelServiceStubMethods = + ['getMobileDeviceSubmodel', 'listMobileDeviceSubmodels']; + for (const methodName of mobileDeviceSubmodelServiceStubMethods) { + const callPromise = this.mobileDeviceSubmodelServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.mobileDeviceSubmodelServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `MobileDeviceSubmodel` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_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 protos.google.ads.admanager.v1.MobileDeviceSubmodel|MobileDeviceSubmodel}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_device_submodel_service.get_mobile_device_submodel.js + * region_tag:admanager_v1_generated_MobileDeviceSubmodelService_GetMobileDeviceSubmodel_async + */ + getMobileDeviceSubmodel( + request?: protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|undefined, {}|undefined + ]>; + getMobileDeviceSubmodel( + request: protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|null|undefined, + {}|null|undefined>): void; + getMobileDeviceSubmodel( + request: protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, + callback: Callback< + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|null|undefined, + {}|null|undefined>): void; + getMobileDeviceSubmodel( + request?: protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|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().catch(err => {throw err}); + this._log.info('getMobileDeviceSubmodel request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMobileDeviceSubmodel response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMobileDeviceSubmodel(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel, + protos.google.ads.admanager.v1.IGetMobileDeviceSubmodelRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMobileDeviceSubmodel response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `MobileDeviceSubmodel` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileDeviceSubmodel|MobileDeviceSubmodel}. + * 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 `listMobileDeviceSubmodelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileDeviceSubmodels( + request?: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel[], + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest|null, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse + ]>; + listMobileDeviceSubmodels( + request: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDeviceSubmodel>): void; + listMobileDeviceSubmodels( + request: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDeviceSubmodel>): void; + listMobileDeviceSubmodels( + request?: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDeviceSubmodel>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDeviceSubmodel>): + Promise<[ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel[], + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest|null, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse|null|undefined, + protos.google.ads.admanager.v1.IMobileDeviceSubmodel>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMobileDeviceSubmodels values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMobileDeviceSubmodels request %j', request); + return this.innerApiCalls + .listMobileDeviceSubmodels(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IMobileDeviceSubmodel[], + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest|null, + protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsResponse + ]) => { + this._log.info('listMobileDeviceSubmodels values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMobileDeviceSubmodels`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.MobileDeviceSubmodel|MobileDeviceSubmodel} 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 `listMobileDeviceSubmodelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMobileDeviceSubmodelsStream( + request?: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + 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['listMobileDeviceSubmodels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileDeviceSubmodels stream %j', request); + return this.descriptors.page.listMobileDeviceSubmodels.createStream( + this.innerApiCalls.listMobileDeviceSubmodels as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMobileDeviceSubmodels`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.MobileDeviceSubmodel|MobileDeviceSubmodel}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/mobile_device_submodel_service.list_mobile_device_submodels.js + * region_tag:admanager_v1_generated_MobileDeviceSubmodelService_ListMobileDeviceSubmodels_async + */ + listMobileDeviceSubmodelsAsync( + request?: protos.google.ads.admanager.v1.IListMobileDeviceSubmodelsRequest, + 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['listMobileDeviceSubmodels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMobileDeviceSubmodels iterate %j', request); + return this.descriptors.page.listMobileDeviceSubmodels.asyncIterate( + this.innerApiCalls['listMobileDeviceSubmodels'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.mobileDeviceSubmodelServiceStub && !this._terminated) { + return this.mobileDeviceSubmodelServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client_config.json b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client_config.json new file mode 100644 index 000000000000..d0cb7a3c8f4e --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileDeviceSubmodelService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetMobileDeviceSubmodel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMobileDeviceSubmodels": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_proto_list.json b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/mobile_device_submodel_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/network_service_client.ts b/packages/google-ads-admanager/src/v1/network_service_client.ts index cc2901940c04..a1761b7561cb 100644 --- a/packages/google-ads-admanager/src/v1/network_service_client.ts +++ b/packages/google-ads-admanager/src/v1/network_service_client.ts @@ -186,18 +186,51 @@ export class NetworkServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class NetworkServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class NetworkServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class NetworkServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class NetworkServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Put together the default options sent with requests. @@ -644,6 +698,55 @@ export class NetworkServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -680,6 +783,78 @@ export class NetworkServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -716,6 +891,150 @@ export class NetworkServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -788,6 +1107,150 @@ export class NetworkServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -896,6 +1359,42 @@ export class NetworkServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -932,6 +1431,42 @@ export class NetworkServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1076,6 +1611,114 @@ export class NetworkServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1423,6 +2066,42 @@ export class NetworkServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1531,6 +2210,42 @@ export class NetworkServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/network_service_proto_list.json b/packages/google-ads-admanager/src/v1/network_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/network_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/network_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/operating_system_service_client.ts b/packages/google-ads-admanager/src/v1/operating_system_service_client.ts index 752ed07c912c..bb61e87ae9fd 100644 --- a/packages/google-ads-admanager/src/v1/operating_system_service_client.ts +++ b/packages/google-ads-admanager/src/v1/operating_system_service_client.ts @@ -186,18 +186,51 @@ export class OperatingSystemServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class OperatingSystemServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class OperatingSystemServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class OperatingSystemServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class OperatingSystemServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -525,7 +579,7 @@ export class OperatingSystemServiceClient { * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOperatingSystems` * call. Provide this to retrieve the subsequent page. @@ -641,7 +695,7 @@ export class OperatingSystemServiceClient { * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOperatingSystems` * call. Provide this to retrieve the subsequent page. @@ -706,7 +760,7 @@ export class OperatingSystemServiceClient { * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOperatingSystems` * call. Provide this to retrieve the subsequent page. @@ -811,6 +865,55 @@ export class OperatingSystemServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class OperatingSystemServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class OperatingSystemServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class OperatingSystemServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class OperatingSystemServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class OperatingSystemServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class OperatingSystemServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class OperatingSystemServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class OperatingSystemServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/operating_system_service_proto_list.json b/packages/google-ads-admanager/src/v1/operating_system_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/operating_system_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/operating_system_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/operating_system_version_service_client.ts b/packages/google-ads-admanager/src/v1/operating_system_version_service_client.ts index 2a77c56d2591..9b6417581992 100644 --- a/packages/google-ads-admanager/src/v1/operating_system_version_service_client.ts +++ b/packages/google-ads-admanager/src/v1/operating_system_version_service_client.ts @@ -186,18 +186,51 @@ export class OperatingSystemVersionServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class OperatingSystemVersionServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class OperatingSystemVersionServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class OperatingSystemVersionServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class OperatingSystemVersionServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -526,7 +580,7 @@ export class OperatingSystemVersionServiceClient { * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous * `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent @@ -644,7 +698,7 @@ export class OperatingSystemVersionServiceClient { * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous * `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent @@ -711,7 +765,7 @@ export class OperatingSystemVersionServiceClient { * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous * `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent @@ -818,6 +872,55 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -854,6 +957,78 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -890,6 +1065,150 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -962,6 +1281,150 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1070,6 +1533,42 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1106,6 +1605,42 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1250,6 +1785,114 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1597,6 +2240,42 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1705,6 +2384,42 @@ export class OperatingSystemVersionServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/operating_system_version_service_proto_list.json b/packages/google-ads-admanager/src/v1/operating_system_version_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/operating_system_version_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/operating_system_version_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/order_service_client.ts b/packages/google-ads-admanager/src/v1/order_service_client.ts index c58fc2fa77cf..d0d9f1860d56 100644 --- a/packages/google-ads-admanager/src/v1/order_service_client.ts +++ b/packages/google-ads-admanager/src/v1/order_service_client.ts @@ -186,18 +186,51 @@ export class OrderServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class OrderServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class OrderServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class OrderServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class OrderServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -529,8 +583,8 @@ export class OrderServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOrders` call. * Provide this to retrieve the subsequent page. @@ -645,8 +699,8 @@ export class OrderServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOrders` call. * Provide this to retrieve the subsequent page. @@ -710,8 +764,8 @@ export class OrderServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListOrders` call. * Provide this to retrieve the subsequent page. @@ -816,6 +870,55 @@ export class OrderServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -852,6 +955,78 @@ export class OrderServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -888,6 +1063,150 @@ export class OrderServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -960,6 +1279,150 @@ export class OrderServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1068,6 +1531,42 @@ export class OrderServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1104,6 +1603,42 @@ export class OrderServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1248,6 +1783,114 @@ export class OrderServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1595,6 +2238,42 @@ export class OrderServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1703,6 +2382,42 @@ export class OrderServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/order_service_proto_list.json b/packages/google-ads-admanager/src/v1/order_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/order_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/order_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/placement_service_client.ts b/packages/google-ads-admanager/src/v1/placement_service_client.ts index 23da83c49c8a..5bf69b50d286 100644 --- a/packages/google-ads-admanager/src/v1/placement_service_client.ts +++ b/packages/google-ads-admanager/src/v1/placement_service_client.ts @@ -186,18 +186,51 @@ export class PlacementServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class PlacementServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class PlacementServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class PlacementServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class PlacementServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -314,7 +368,7 @@ export class PlacementServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const placementServiceStubMethods = - ['getPlacement', 'listPlacements']; + ['getPlacement', 'listPlacements', 'createPlacement', 'updatePlacement', 'batchCreatePlacements', 'batchUpdatePlacements', 'batchActivatePlacements', 'batchDeactivatePlacements', 'batchArchivePlacements']; for (const methodName of placementServiceStubMethods) { const callPromise = this.placementServiceStub.then( stub => (...args: Array<{}>) => { @@ -512,83 +566,58 @@ export class PlacementServiceClient { throw error; }); } - - /** - * API to retrieve a list of `Placement` objects. +/** + * API to create an `Placement` object. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of Placements. + * Required. The parent resource where this `Placement` will be created. * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `Placements` to return. The service may - * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListPlacements` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListPlacements` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * @param {google.ads.admanager.v1.Placement} request.placement + * Required. The `Placement` to create. * @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 protos.google.ads.admanager.v1.Placement|Placement}. - * 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 `listPlacementsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.Placement|Placement}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v1/placement_service.create_placement.js + * region_tag:admanager_v1_generated_PlacementService_CreatePlacement_async */ - listPlacements( - request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + createPlacement( + request?: protos.google.ads.admanager.v1.ICreatePlacementRequest, options?: CallOptions): Promise<[ - protos.google.ads.admanager.v1.IPlacement[], - protos.google.ads.admanager.v1.IListPlacementsRequest|null, - protos.google.ads.admanager.v1.IListPlacementsResponse + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|undefined, {}|undefined ]>; - listPlacements( - request: protos.google.ads.admanager.v1.IListPlacementsRequest, + createPlacement( + request: protos.google.ads.admanager.v1.ICreatePlacementRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.ads.admanager.v1.IListPlacementsRequest, - protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, - protos.google.ads.admanager.v1.IPlacement>): void; - listPlacements( - request: protos.google.ads.admanager.v1.IListPlacementsRequest, - callback: PaginationCallback< - protos.google.ads.admanager.v1.IListPlacementsRequest, - protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, - protos.google.ads.admanager.v1.IPlacement>): void; - listPlacements( - request?: protos.google.ads.admanager.v1.IListPlacementsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.ads.admanager.v1.IListPlacementsRequest, - protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, - protos.google.ads.admanager.v1.IPlacement>, - callback?: PaginationCallback< - protos.google.ads.admanager.v1.IListPlacementsRequest, - protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, - protos.google.ads.admanager.v1.IPlacement>): + callback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|null|undefined, + {}|null|undefined>): void; + createPlacement( + request: protos.google.ads.admanager.v1.ICreatePlacementRequest, + callback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|null|undefined, + {}|null|undefined>): void; + createPlacement( + request?: protos.google.ads.admanager.v1.ICreatePlacementRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|null|undefined, + {}|null|undefined>): Promise<[ - protos.google.ads.admanager.v1.IPlacement[], - protos.google.ads.admanager.v1.IListPlacementsRequest|null, - protos.google.ads.admanager.v1.IListPlacementsResponse + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -608,139 +637,852 @@ export class PlacementServiceClient { 'parent': request.parent ?? '', }); this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.ads.admanager.v1.IListPlacementsRequest, - protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, - protos.google.ads.admanager.v1.IPlacement>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listPlacements values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + this._log.info('createPlacement request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createPlacement response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('listPlacements request %j', request); - return this.innerApiCalls - .listPlacements(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.ads.admanager.v1.IPlacement[], - protos.google.ads.admanager.v1.IListPlacementsRequest|null, - protos.google.ads.admanager.v1.IListPlacementsResponse + return this.innerApiCalls.createPlacement(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.ICreatePlacementRequest|undefined, + {}|undefined ]) => { - this._log.info('listPlacements values %j', response); - return [response, input, output]; + this._log.info('createPlacement response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; }); } - /** - * Equivalent to `listPlacements`, but returns a NodeJS Stream object. + * API to update an `Placement` object. + * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of Placements. - * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `Placements` to return. The service may - * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListPlacements` call. - * Provide this to retrieve the subsequent page. + * @param {google.ads.admanager.v1.Placement} request.placement + * Required. The `Placement` to update. * - * When paginating, all other parameters provided to `ListPlacements` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. * @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 protos.google.ads.admanager.v1.Placement|Placement} 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 `listPlacementsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.Placement|Placement}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v1/placement_service.update_placement.js + * region_tag:admanager_v1_generated_PlacementService_UpdatePlacement_async */ - listPlacementsStream( - request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + updatePlacement( + request?: protos.google.ads.admanager.v1.IUpdatePlacementRequest, options?: CallOptions): - Transform{ + Promise<[ + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|undefined, {}|undefined + ]>; + updatePlacement( + request: protos.google.ads.admanager.v1.IUpdatePlacementRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|null|undefined, + {}|null|undefined>): void; + updatePlacement( + request: protos.google.ads.admanager.v1.IUpdatePlacementRequest, + callback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|null|undefined, + {}|null|undefined>): void; + updatePlacement( + request?: protos.google.ads.admanager.v1.IUpdatePlacementRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|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 ?? '', + 'placement.name': request.placement!.name ?? '', }); - const defaultCallSettings = this._defaults['listPlacements']; - const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); - this._log.info('listPlacements stream %j', request); - return this.descriptors.page.listPlacements.createStream( - this.innerApiCalls.listPlacements as GaxCall, - request, - callSettings - ); + this._log.info('updatePlacement request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updatePlacement response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updatePlacement(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IPlacement, + protos.google.ads.admanager.v1.IUpdatePlacementRequest|undefined, + {}|undefined + ]) => { + this._log.info('updatePlacement response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } - /** - * Equivalent to `listPlacements`, but returns an iterable object. + * API to batch create `Placement` objects. * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of Placements. + * Required. The parent resource where the `Placement`s will be created. * Format: `networks/{network_code}` - * @param {number} [request.pageSize] - * Optional. The maximum number of `Placements` to return. The service may - * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListPlacements` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListPlacements` must - * match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Expression to filter the response. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters - * @param {string} [request.orderBy] - * Optional. Expression to specify sorting order. - * See syntax details at - * https://developers.google.com/ad-manager/api/beta/filters#order - * @param {number} [request.skip] - * Optional. Number of individual resources to skip while paginating. + * The parent field in the CreatePlacementRequest messages match this + * field. + * @param {number[]} request.requests + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.ads.admanager.v1.Placement|Placement}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.ads.admanager.v1.BatchCreatePlacementsResponse|BatchCreatePlacementsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/placement_service.list_placements.js - * region_tag:admanager_v1_generated_PlacementService_ListPlacements_async + * @example include:samples/generated/v1/placement_service.batch_create_placements.js + * region_tag:admanager_v1_generated_PlacementService_BatchCreatePlacements_async */ - listPlacementsAsync( - request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + batchCreatePlacements( + request?: protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest, options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; + Promise<[ + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|undefined, {}|undefined + ]>; + batchCreatePlacements( + request: protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchCreatePlacements( + request: protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchCreatePlacements( + request?: protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|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().catch(err => {throw err}); + this._log.info('batchCreatePlacements request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchCreatePlacements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchCreatePlacements(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchCreatePlacementsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchCreatePlacements response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch update `Placement` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * @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 protos.google.ads.admanager.v1.BatchUpdatePlacementsResponse|BatchUpdatePlacementsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/placement_service.batch_update_placements.js + * region_tag:admanager_v1_generated_PlacementService_BatchUpdatePlacements_async + */ + batchUpdatePlacements( + request?: protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|undefined, {}|undefined + ]>; + batchUpdatePlacements( + request: protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdatePlacements( + request: protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdatePlacements( + request?: protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|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().catch(err => {throw err}); + this._log.info('batchUpdatePlacements request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchUpdatePlacements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchUpdatePlacements(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchUpdatePlacementsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchUpdatePlacements response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Activates a list of `Placement` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_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 protos.google.ads.admanager.v1.BatchActivatePlacementsResponse|BatchActivatePlacementsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/placement_service.batch_activate_placements.js + * region_tag:admanager_v1_generated_PlacementService_BatchActivatePlacements_async + */ + batchActivatePlacements( + request?: protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|undefined, {}|undefined + ]>; + batchActivatePlacements( + request: protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchActivatePlacements( + request: protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchActivatePlacements( + request?: protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|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().catch(err => {throw err}); + this._log.info('batchActivatePlacements request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchActivatePlacements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchActivatePlacements(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchActivatePlacementsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchActivatePlacements response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deactivates a list of `Placement` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_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 protos.google.ads.admanager.v1.BatchDeactivatePlacementsResponse|BatchDeactivatePlacementsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/placement_service.batch_deactivate_placements.js + * region_tag:admanager_v1_generated_PlacementService_BatchDeactivatePlacements_async + */ + batchDeactivatePlacements( + request?: protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|undefined, {}|undefined + ]>; + batchDeactivatePlacements( + request: protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivatePlacements( + request: protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivatePlacements( + request?: protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|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().catch(err => {throw err}); + this._log.info('batchDeactivatePlacements request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchDeactivatePlacements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchDeactivatePlacements(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse, + protos.google.ads.admanager.v1.IBatchDeactivatePlacementsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchDeactivatePlacements response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Archives a list of `Placement` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_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 protos.google.ads.admanager.v1.BatchArchivePlacementsResponse|BatchArchivePlacementsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/placement_service.batch_archive_placements.js + * region_tag:admanager_v1_generated_PlacementService_BatchArchivePlacements_async + */ + batchArchivePlacements( + request?: protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|undefined, {}|undefined + ]>; + batchArchivePlacements( + request: protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchArchivePlacements( + request: protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|null|undefined, + {}|null|undefined>): void; + batchArchivePlacements( + request?: protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|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().catch(err => {throw err}); + this._log.info('batchArchivePlacements request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchArchivePlacements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchArchivePlacements(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse, + protos.google.ads.admanager.v1.IBatchArchivePlacementsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchArchivePlacements response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Placement` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` will + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListPlacements` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Placement|Placement}. + * 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 `listPlacementsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlacements( + request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IPlacement[], + protos.google.ads.admanager.v1.IListPlacementsRequest|null, + protos.google.ads.admanager.v1.IListPlacementsResponse + ]>; + listPlacements( + request: protos.google.ads.admanager.v1.IListPlacementsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListPlacementsRequest, + protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, + protos.google.ads.admanager.v1.IPlacement>): void; + listPlacements( + request: protos.google.ads.admanager.v1.IListPlacementsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListPlacementsRequest, + protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, + protos.google.ads.admanager.v1.IPlacement>): void; + listPlacements( + request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListPlacementsRequest, + protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, + protos.google.ads.admanager.v1.IPlacement>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListPlacementsRequest, + protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, + protos.google.ads.admanager.v1.IPlacement>): + Promise<[ + protos.google.ads.admanager.v1.IPlacement[], + protos.google.ads.admanager.v1.IListPlacementsRequest|null, + protos.google.ads.admanager.v1.IListPlacementsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListPlacementsRequest, + protos.google.ads.admanager.v1.IListPlacementsResponse|null|undefined, + protos.google.ads.admanager.v1.IPlacement>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPlacements values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPlacements request %j', request); + return this.innerApiCalls + .listPlacements(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.IPlacement[], + protos.google.ads.admanager.v1.IListPlacementsRequest|null, + protos.google.ads.admanager.v1.IListPlacementsResponse + ]) => { + this._log.info('listPlacements values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPlacements`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` will + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListPlacements` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Placement|Placement} 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 `listPlacementsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlacementsStream( + request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + 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['listPlacements']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPlacements stream %j', request); + return this.descriptors.page.listPlacements.createStream( + this.innerApiCalls.listPlacements as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPlacements`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` will + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListPlacements` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Placement|Placement}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/placement_service.list_placements.js + * region_tag:admanager_v1_generated_PlacementService_ListPlacements_async + */ + listPlacementsAsync( + request?: protos.google.ads.admanager.v1.IListPlacementsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ @@ -807,80 +1549,345 @@ export class PlacementServiceClient { * A fully-qualified path representing AdBreak resource. * @returns {string} A string representing the ad_break. */ - matchAdBreakFromAdBreakName(adBreakName: string) { - return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; } /** - * Return a fully-qualified adUnit resource name string. + * Return a fully-qualified cmsMetadataKey resource name string. * * @param {string} network_code - * @param {string} ad_unit + * @param {string} cms_metadata_key * @returns {string} Resource name string. */ - adUnitPath(networkCode:string,adUnit:string) { - return this.pathTemplates.adUnitPathTemplate.render({ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ network_code: networkCode, - ad_unit: adUnit, + cms_metadata_key: cmsMetadataKey, }); } /** - * Parse the network_code from AdUnit resource. + * Parse the network_code from CmsMetadataKey resource. * - * @param {string} adUnitName - * A fully-qualified path representing AdUnit resource. + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. * @returns {string} A string representing the network_code. */ - matchNetworkCodeFromAdUnitName(adUnitName: string) { - return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; } /** - * Parse the ad_unit from AdUnit resource. + * Parse the cms_metadata_key from CmsMetadataKey resource. * - * @param {string} adUnitName - * A fully-qualified path representing AdUnit resource. - * @returns {string} A string representing the ad_unit. + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. */ - matchAdUnitFromAdUnitName(adUnitName: string) { - return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; } /** - * Return a fully-qualified bandwidthGroup resource name string. + * Return a fully-qualified cmsMetadataValue resource name string. * * @param {string} network_code - * @param {string} bandwidth_group + * @param {string} cms_metadata_value * @returns {string} Resource name string. */ - bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { - return this.pathTemplates.bandwidthGroupPathTemplate.render({ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ network_code: networkCode, - bandwidth_group: bandwidthGroup, + cms_metadata_value: cmsMetadataValue, }); } /** - * Parse the network_code from BandwidthGroup resource. + * Parse the network_code from CmsMetadataValue resource. * - * @param {string} bandwidthGroupName - * A fully-qualified path representing BandwidthGroup resource. + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. * @returns {string} A string representing the network_code. */ - matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { - return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; } /** - * Parse the bandwidth_group from BandwidthGroup resource. + * Parse the cms_metadata_value from CmsMetadataValue resource. * - * @param {string} bandwidthGroupName - * A fully-qualified path representing BandwidthGroup resource. - * @returns {string} A string representing the bandwidth_group. + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. */ - matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { - return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; } /** @@ -955,6 +1962,150 @@ export class PlacementServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +2214,42 @@ export class PlacementServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +2286,42 @@ export class PlacementServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +2466,114 @@ export class PlacementServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2921,42 @@ export class PlacementServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +3065,42 @@ export class PlacementServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/placement_service_client_config.json b/packages/google-ads-admanager/src/v1/placement_service_client_config.json index a7f1390497ed..da17cfe77fc3 100644 --- a/packages/google-ads-admanager/src/v1/placement_service_client_config.json +++ b/packages/google-ads-admanager/src/v1/placement_service_client_config.json @@ -27,6 +27,34 @@ "ListPlacements": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreatePlacement": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdatePlacement": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreatePlacements": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchUpdatePlacements": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchActivatePlacements": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchDeactivatePlacements": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchArchivePlacements": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-ads-admanager/src/v1/placement_service_proto_list.json b/packages/google-ads-admanager/src/v1/placement_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/placement_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/placement_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/private_auction_deal_service_client.ts b/packages/google-ads-admanager/src/v1/private_auction_deal_service_client.ts index 6551a08d3065..188cefba4f82 100644 --- a/packages/google-ads-admanager/src/v1/private_auction_deal_service_client.ts +++ b/packages/google-ads-admanager/src/v1/private_auction_deal_service_client.ts @@ -186,18 +186,51 @@ export class PrivateAuctionDealServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class PrivateAuctionDealServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class PrivateAuctionDealServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class PrivateAuctionDealServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class PrivateAuctionDealServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -723,7 +777,7 @@ export class PrivateAuctionDealServiceClient { * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctionDeals` * call. Provide this to retrieve the subsequent page. @@ -841,7 +895,7 @@ export class PrivateAuctionDealServiceClient { * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctionDeals` * call. Provide this to retrieve the subsequent page. @@ -908,7 +962,7 @@ export class PrivateAuctionDealServiceClient { * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctionDeals` * call. Provide this to retrieve the subsequent page. @@ -1014,6 +1068,55 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1050,6 +1153,78 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1086,6 +1261,150 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1158,6 +1477,150 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1266,6 +1729,42 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1302,6 +1801,42 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1446,6 +1981,114 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1793,6 +2436,42 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1901,6 +2580,42 @@ export class PrivateAuctionDealServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/private_auction_deal_service_proto_list.json b/packages/google-ads-admanager/src/v1/private_auction_deal_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/private_auction_deal_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/private_auction_deal_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/private_auction_service_client.ts b/packages/google-ads-admanager/src/v1/private_auction_service_client.ts index 3a9ff70cedd6..f2222dad087d 100644 --- a/packages/google-ads-admanager/src/v1/private_auction_service_client.ts +++ b/packages/google-ads-admanager/src/v1/private_auction_service_client.ts @@ -186,18 +186,51 @@ export class PrivateAuctionServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class PrivateAuctionServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class PrivateAuctionServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class PrivateAuctionServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class PrivateAuctionServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -722,7 +776,7 @@ export class PrivateAuctionServiceClient { * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctions` * call. Provide this to retrieve the subsequent page. @@ -839,7 +893,7 @@ export class PrivateAuctionServiceClient { * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctions` * call. Provide this to retrieve the subsequent page. @@ -905,7 +959,7 @@ export class PrivateAuctionServiceClient { * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListPrivateAuctions` * call. Provide this to retrieve the subsequent page. @@ -1011,6 +1065,55 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1047,6 +1150,78 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1083,6 +1258,150 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1155,6 +1474,150 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1263,6 +1726,42 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1299,6 +1798,42 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1443,6 +1978,114 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1790,6 +2433,42 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1898,6 +2577,42 @@ export class PrivateAuctionServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/private_auction_service_proto_list.json b/packages/google-ads-admanager/src/v1/private_auction_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/private_auction_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/private_auction_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/programmatic_buyer_service_client.ts b/packages/google-ads-admanager/src/v1/programmatic_buyer_service_client.ts index 1a077dfa3181..bc8646d6d448 100644 --- a/packages/google-ads-admanager/src/v1/programmatic_buyer_service_client.ts +++ b/packages/google-ads-admanager/src/v1/programmatic_buyer_service_client.ts @@ -186,18 +186,51 @@ export class ProgrammaticBuyerServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class ProgrammaticBuyerServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class ProgrammaticBuyerServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class ProgrammaticBuyerServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class ProgrammaticBuyerServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -812,6 +866,55 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -848,6 +951,78 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -884,6 +1059,150 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -956,6 +1275,150 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1064,6 +1527,42 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1100,6 +1599,42 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1244,6 +1779,114 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1591,6 +2234,42 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1699,6 +2378,42 @@ export class ProgrammaticBuyerServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/programmatic_buyer_service_proto_list.json b/packages/google-ads-admanager/src/v1/programmatic_buyer_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/programmatic_buyer_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/programmatic_buyer_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/report_service_client.ts b/packages/google-ads-admanager/src/v1/report_service_client.ts index 43c189300fb8..d810dc50bc0b 100644 --- a/packages/google-ads-admanager/src/v1/report_service_client.ts +++ b/packages/google-ads-admanager/src/v1/report_service_client.ts @@ -187,18 +187,51 @@ export class ReportServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -208,9 +241,15 @@ export class ReportServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -223,6 +262,15 @@ export class ReportServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -253,6 +301,9 @@ export class ReportServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -262,6 +313,9 @@ export class ReportServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -737,7 +791,7 @@ export class ReportServiceClient { /** * Initiates the execution of an existing report asynchronously. Users can - * get the report by polling this operation via + * get the report by polling this operation using * `OperationsService.GetOperation`. * Poll every 5 seconds initially, with an exponential * backoff. Once a report is complete, the operation will contain a @@ -861,8 +915,8 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListReports` call. * Provide this to retrieve the subsequent page. @@ -977,8 +1031,8 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListReports` call. * Provide this to retrieve the subsequent page. @@ -1042,8 +1096,8 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListReports` call. * Provide this to retrieve the subsequent page. @@ -1110,14 +1164,15 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `FetchReportResultRows` * call. Provide this to retrieve the second and subsequent batches of rows. * @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 protos.google.ads.admanager.v1.Report.DataTable.Row|Row}. + * The first element of the array is Array of {@link protos.google.ads.admanager.v1.ReportDataTable.Row|Row}. * 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. @@ -1130,7 +1185,7 @@ export class ReportServiceClient { request?: protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, options?: CallOptions): Promise<[ - protos.google.ads.admanager.v1.Report.DataTable.IRow[], + protos.google.ads.admanager.v1.ReportDataTable.IRow[], protos.google.ads.admanager.v1.IFetchReportResultRowsRequest|null, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse ]>; @@ -1140,25 +1195,25 @@ export class ReportServiceClient { callback: PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse|null|undefined, - protos.google.ads.admanager.v1.Report.DataTable.IRow>): void; + protos.google.ads.admanager.v1.ReportDataTable.IRow>): void; fetchReportResultRows( request: protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, callback: PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse|null|undefined, - protos.google.ads.admanager.v1.Report.DataTable.IRow>): void; + protos.google.ads.admanager.v1.ReportDataTable.IRow>): void; fetchReportResultRows( request?: protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, optionsOrCallback?: CallOptions|PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse|null|undefined, - protos.google.ads.admanager.v1.Report.DataTable.IRow>, + protos.google.ads.admanager.v1.ReportDataTable.IRow>, callback?: PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse|null|undefined, - protos.google.ads.admanager.v1.Report.DataTable.IRow>): + protos.google.ads.admanager.v1.ReportDataTable.IRow>): Promise<[ - protos.google.ads.admanager.v1.Report.DataTable.IRow[], + protos.google.ads.admanager.v1.ReportDataTable.IRow[], protos.google.ads.admanager.v1.IFetchReportResultRowsRequest|null, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse ]>|void { @@ -1183,7 +1238,7 @@ export class ReportServiceClient { const wrappedCallback: PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse|null|undefined, - protos.google.ads.admanager.v1.Report.DataTable.IRow>|undefined = callback + protos.google.ads.admanager.v1.ReportDataTable.IRow>|undefined = callback ? (error, values, nextPageRequest, rawResponse) => { this._log.info('fetchReportResultRows values %j', values); callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. @@ -1193,7 +1248,7 @@ export class ReportServiceClient { return this.innerApiCalls .fetchReportResultRows(request, options, wrappedCallback) ?.then(([response, input, output]: [ - protos.google.ads.admanager.v1.Report.DataTable.IRow[], + protos.google.ads.admanager.v1.ReportDataTable.IRow[], protos.google.ads.admanager.v1.IFetchReportResultRowsRequest|null, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse ]) => { @@ -1213,14 +1268,15 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `FetchReportResultRows` * call. Provide this to retrieve the second and subsequent batches of rows. * @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 protos.google.ads.admanager.v1.Report.DataTable.Row|Row} on 'data' event. + * An object stream which emits an object representing {@link protos.google.ads.admanager.v1.ReportDataTable.Row|Row} 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 `fetchReportResultRowsAsync()` @@ -1265,7 +1321,8 @@ export class ReportServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `FetchReportResultRows` * call. Provide this to retrieve the second and subsequent batches of rows. @@ -1274,7 +1331,7 @@ export class ReportServiceClient { * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.ads.admanager.v1.Report.DataTable.Row|Row}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.ads.admanager.v1.ReportDataTable.Row|Row}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. @@ -1284,7 +1341,7 @@ export class ReportServiceClient { fetchReportResultRowsAsync( request?: protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, options?: CallOptions): - AsyncIterable{ + AsyncIterable{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1302,7 +1359,7 @@ export class ReportServiceClient { this.innerApiCalls['fetchReportResultRows'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the latest state of a long-running operation. Clients can use this @@ -1581,6 +1638,55 @@ export class ReportServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -1617,6 +1723,78 @@ export class ReportServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -1653,6 +1831,150 @@ export class ReportServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -1725,6 +2047,150 @@ export class ReportServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1833,6 +2299,42 @@ export class ReportServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1869,6 +2371,42 @@ export class ReportServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -2013,6 +2551,114 @@ export class ReportServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -2360,6 +3006,42 @@ export class ReportServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -2468,6 +3150,42 @@ export class ReportServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/report_service_proto_list.json b/packages/google-ads-admanager/src/v1/report_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/report_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/report_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/role_service_client.ts b/packages/google-ads-admanager/src/v1/role_service_client.ts index 5381ac9d144a..19eec2ceaef2 100644 --- a/packages/google-ads-admanager/src/v1/role_service_client.ts +++ b/packages/google-ads-admanager/src/v1/role_service_client.ts @@ -186,18 +186,51 @@ export class RoleServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class RoleServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class RoleServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class RoleServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class RoleServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -524,7 +578,8 @@ export class RoleServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListRoles` call. * Provide this to retrieve the subsequent page. @@ -639,7 +694,8 @@ export class RoleServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListRoles` call. * Provide this to retrieve the subsequent page. @@ -703,7 +759,8 @@ export class RoleServiceClient { * @param {number} [request.pageSize] * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous `ListRoles` call. * Provide this to retrieve the subsequent page. @@ -808,6 +865,55 @@ export class RoleServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -844,6 +950,78 @@ export class RoleServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -880,6 +1058,150 @@ export class RoleServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -952,6 +1274,150 @@ export class RoleServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1060,6 +1526,42 @@ export class RoleServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1096,6 +1598,42 @@ export class RoleServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1240,6 +1778,114 @@ export class RoleServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1587,6 +2233,42 @@ export class RoleServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1695,6 +2377,42 @@ export class RoleServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/role_service_proto_list.json b/packages/google-ads-admanager/src/v1/role_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/role_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/role_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/site_service_client.ts b/packages/google-ads-admanager/src/v1/site_service_client.ts new file mode 100644 index 000000000000..4c525ddca491 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/site_service_client.ts @@ -0,0 +1,3019 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/site_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './site_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Site` objects. + * @class + * @memberof v1 + */ +export class SiteServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + siteServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of SiteServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new SiteServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof SiteServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listSites: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sites') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.SiteService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.siteServiceStub) { + return this.siteServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.SiteService. + this.siteServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.SiteService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.SiteService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const siteServiceStubMethods = + ['getSite', 'listSites', 'createSite', 'batchCreateSites', 'updateSite', 'batchUpdateSites', 'batchDeactivateSites', 'batchSubmitSitesForApproval']; + for (const methodName of siteServiceStubMethods) { + const callPromise = this.siteServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.siteServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Site` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_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 protos.google.ads.admanager.v1.Site|Site}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.get_site.js + * region_tag:admanager_v1_generated_SiteService_GetSite_async + */ + getSite( + request?: protos.google.ads.admanager.v1.IGetSiteRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|undefined, {}|undefined + ]>; + getSite( + request: protos.google.ads.admanager.v1.IGetSiteRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|null|undefined, + {}|null|undefined>): void; + getSite( + request: protos.google.ads.admanager.v1.IGetSiteRequest, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|null|undefined, + {}|null|undefined>): void; + getSite( + request?: protos.google.ads.admanager.v1.IGetSiteRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|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().catch(err => {throw err}); + this._log.info('getSite request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSite response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSite(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IGetSiteRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSite response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to create a `Site` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * @param {google.ads.admanager.v1.Site} request.site + * Required. The `Site` to create. + * @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 protos.google.ads.admanager.v1.Site|Site}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.create_site.js + * region_tag:admanager_v1_generated_SiteService_CreateSite_async + */ + createSite( + request?: protos.google.ads.admanager.v1.ICreateSiteRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|undefined, {}|undefined + ]>; + createSite( + request: protos.google.ads.admanager.v1.ICreateSiteRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|null|undefined, + {}|null|undefined>): void; + createSite( + request: protos.google.ads.admanager.v1.ICreateSiteRequest, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|null|undefined, + {}|null|undefined>): void; + createSite( + request?: protos.google.ads.admanager.v1.ICreateSiteRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|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().catch(err => {throw err}); + this._log.info('createSite request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createSite response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createSite(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.ICreateSiteRequest|undefined, + {}|undefined + ]) => { + this._log.info('createSite response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch create `Site` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * @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 protos.google.ads.admanager.v1.BatchCreateSitesResponse|BatchCreateSitesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.batch_create_sites.js + * region_tag:admanager_v1_generated_SiteService_BatchCreateSites_async + */ + batchCreateSites( + request?: protos.google.ads.admanager.v1.IBatchCreateSitesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|undefined, {}|undefined + ]>; + batchCreateSites( + request: protos.google.ads.admanager.v1.IBatchCreateSitesRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchCreateSites( + request: protos.google.ads.admanager.v1.IBatchCreateSitesRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchCreateSites( + request?: protos.google.ads.admanager.v1.IBatchCreateSitesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|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().catch(err => {throw err}); + this._log.info('batchCreateSites request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchCreateSites response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchCreateSites(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchCreateSitesResponse, + protos.google.ads.admanager.v1.IBatchCreateSitesRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchCreateSites response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to update a `Site` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.admanager.v1.Site} request.site + * Required. The `Site` to update. + * + * The `Site`'s `name` is used to identify the `Site` to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @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 protos.google.ads.admanager.v1.Site|Site}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.update_site.js + * region_tag:admanager_v1_generated_SiteService_UpdateSite_async + */ + updateSite( + request?: protos.google.ads.admanager.v1.IUpdateSiteRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|undefined, {}|undefined + ]>; + updateSite( + request: protos.google.ads.admanager.v1.IUpdateSiteRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|null|undefined, + {}|null|undefined>): void; + updateSite( + request: protos.google.ads.admanager.v1.IUpdateSiteRequest, + callback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|null|undefined, + {}|null|undefined>): void; + updateSite( + request?: protos.google.ads.admanager.v1.IUpdateSiteRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|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({ + 'site.name': request.site!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateSite request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateSite response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateSite(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ISite, + protos.google.ads.admanager.v1.IUpdateSiteRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateSite response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch update `Site` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * @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 protos.google.ads.admanager.v1.BatchUpdateSitesResponse|BatchUpdateSitesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.batch_update_sites.js + * region_tag:admanager_v1_generated_SiteService_BatchUpdateSites_async + */ + batchUpdateSites( + request?: protos.google.ads.admanager.v1.IBatchUpdateSitesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|undefined, {}|undefined + ]>; + batchUpdateSites( + request: protos.google.ads.admanager.v1.IBatchUpdateSitesRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateSites( + request: protos.google.ads.admanager.v1.IBatchUpdateSitesRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateSites( + request?: protos.google.ads.admanager.v1.IBatchUpdateSitesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|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().catch(err => {throw err}); + this._log.info('batchUpdateSites request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchUpdateSites response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchUpdateSites(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchUpdateSitesResponse, + protos.google.ads.admanager.v1.IBatchUpdateSitesRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchUpdateSites response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deactivates a list of `Site` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `Site` objects to deactivate. + * @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 protos.google.ads.admanager.v1.BatchDeactivateSitesResponse|BatchDeactivateSitesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.batch_deactivate_sites.js + * region_tag:admanager_v1_generated_SiteService_BatchDeactivateSites_async + */ + batchDeactivateSites( + request?: protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|undefined, {}|undefined + ]>; + batchDeactivateSites( + request: protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateSites( + request: protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateSites( + request?: protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|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().catch(err => {throw err}); + this._log.info('batchDeactivateSites request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchDeactivateSites response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchDeactivateSites(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse, + protos.google.ads.admanager.v1.IBatchDeactivateSitesRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchDeactivateSites response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Submits a list of `Site` objects for approval. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `Site` objects to submit for approval. + * @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 protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse|BatchSubmitSitesForApprovalResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.batch_submit_sites_for_approval.js + * region_tag:admanager_v1_generated_SiteService_BatchSubmitSitesForApproval_async + */ + batchSubmitSitesForApproval( + request?: protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|undefined, {}|undefined + ]>; + batchSubmitSitesForApproval( + request: protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|null|undefined, + {}|null|undefined>): void; + batchSubmitSitesForApproval( + request: protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|null|undefined, + {}|null|undefined>): void; + batchSubmitSitesForApproval( + request?: protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|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().catch(err => {throw err}); + this._log.info('batchSubmitSitesForApproval request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchSubmitSitesForApproval response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchSubmitSitesForApproval(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse, + protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchSubmitSitesForApproval response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Site` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Site|Site}. + * 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 `listSitesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSites( + request?: protos.google.ads.admanager.v1.IListSitesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ISite[], + protos.google.ads.admanager.v1.IListSitesRequest|null, + protos.google.ads.admanager.v1.IListSitesResponse + ]>; + listSites( + request: protos.google.ads.admanager.v1.IListSitesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListSitesRequest, + protos.google.ads.admanager.v1.IListSitesResponse|null|undefined, + protos.google.ads.admanager.v1.ISite>): void; + listSites( + request: protos.google.ads.admanager.v1.IListSitesRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListSitesRequest, + protos.google.ads.admanager.v1.IListSitesResponse|null|undefined, + protos.google.ads.admanager.v1.ISite>): void; + listSites( + request?: protos.google.ads.admanager.v1.IListSitesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListSitesRequest, + protos.google.ads.admanager.v1.IListSitesResponse|null|undefined, + protos.google.ads.admanager.v1.ISite>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListSitesRequest, + protos.google.ads.admanager.v1.IListSitesResponse|null|undefined, + protos.google.ads.admanager.v1.ISite>): + Promise<[ + protos.google.ads.admanager.v1.ISite[], + protos.google.ads.admanager.v1.IListSitesRequest|null, + protos.google.ads.admanager.v1.IListSitesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListSitesRequest, + protos.google.ads.admanager.v1.IListSitesResponse|null|undefined, + protos.google.ads.admanager.v1.ISite>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listSites values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listSites request %j', request); + return this.innerApiCalls + .listSites(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ISite[], + protos.google.ads.admanager.v1.IListSitesRequest|null, + protos.google.ads.admanager.v1.IListSitesResponse + ]) => { + this._log.info('listSites values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listSites`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Site|Site} 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 `listSitesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSitesStream( + request?: protos.google.ads.admanager.v1.IListSitesRequest, + 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['listSites']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listSites stream %j', request); + return this.descriptors.page.listSites.createStream( + this.innerApiCalls.listSites as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listSites`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Site|Site}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/site_service.list_sites.js + * region_tag:admanager_v1_generated_SiteService_ListSites_async + */ + listSitesAsync( + request?: protos.google.ads.admanager.v1.IListSitesRequest, + 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['listSites']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listSites iterate %j', request); + return this.descriptors.page.listSites.asyncIterate( + this.innerApiCalls['listSites'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.siteServiceStub && !this._terminated) { + return this.siteServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/site_service_client_config.json b/packages/google-ads-admanager/src/v1/site_service_client_config.json new file mode 100644 index 000000000000..79464ae6936d --- /dev/null +++ b/packages/google-ads-admanager/src/v1/site_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.ads.admanager.v1.SiteService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetSite": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSites": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateSite": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateSites": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSite": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchUpdateSites": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchDeactivateSites": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchSubmitSitesForApproval": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/site_service_proto_list.json b/packages/google-ads-admanager/src/v1/site_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/site_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts b/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts index 87e89ca37272..842efbd4619e 100644 --- a/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts +++ b/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts @@ -186,18 +186,51 @@ export class TaxonomyCategoryServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class TaxonomyCategoryServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class TaxonomyCategoryServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class TaxonomyCategoryServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class TaxonomyCategoryServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Some of the methods on this service return "paged" results, @@ -811,6 +865,55 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -847,6 +950,78 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -883,6 +1058,150 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -955,6 +1274,150 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -1063,6 +1526,42 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -1099,6 +1598,42 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -1243,6 +1778,114 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1590,6 +2233,42 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1698,6 +2377,42 @@ export class TaxonomyCategoryServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/taxonomy_category_service_proto_list.json b/packages/google-ads-admanager/src/v1/taxonomy_category_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/taxonomy_category_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/taxonomy_category_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/src/v1/team_service_client.ts b/packages/google-ads-admanager/src/v1/team_service_client.ts new file mode 100644 index 000000000000..a2fa119e8f01 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/team_service_client.ts @@ -0,0 +1,3021 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/team_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './team_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for handling `Team` objects. + * @class + * @memberof v1 + */ +export class TeamServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('admanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + teamServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of TeamServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new TeamServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof TeamServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'admanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). + if (!opts) { + opts = {fallback: true}; + } else { + opts.fallback = opts.fallback ?? true; + } + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + adBreakPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' + ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), + adUnitPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/adUnits/{ad_unit}' + ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), + bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' + ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), + companyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/companies/{company}' + ), + contactPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contacts/{contact}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), + customFieldPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customFields/{custom_field}' + ), + customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}' + ), + customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' + ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), + deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCategories/{device_category}' + ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), + entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' + ), + geoTargetPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/geoTargets/{geo_target}' + ), + labelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/labels/{label}' + ), + liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/liveStreamEvents/{live_stream_event}' + ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), + networkPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}' + ), + operatingSystemPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystems/{operating_system}' + ), + operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/operatingSystemVersions/{operating_system_version}' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/orders/{order}' + ), + placementPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/placements/{placement}' + ), + privateAuctionPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctions/{private_auction}' + ), + privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/privateAuctionDeals/{private_auction_deal}' + ), + programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/programmaticBuyers/{programmatic_buyer}' + ), + reportPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/reports/{report}' + ), + rolePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/roles/{role}' + ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), + taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' + ), + teamPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/teams/{team}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/users/{user}' + ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listTeams: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'teams') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.admanager.v1.TeamService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.teamServiceStub) { + return this.teamServiceStub; + } + + // Put together the "service stub" for + // google.ads.admanager.v1.TeamService. + this.teamServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.admanager.v1.TeamService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.admanager.v1.TeamService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const teamServiceStubMethods = + ['getTeam', 'listTeams', 'createTeam', 'batchCreateTeams', 'updateTeam', 'batchUpdateTeams', 'batchActivateTeams', 'batchDeactivateTeams']; + for (const methodName of teamServiceStubMethods) { + const callPromise = this.teamServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.teamServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'admanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/admanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * API to retrieve a `Team` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_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 protos.google.ads.admanager.v1.Team|Team}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.get_team.js + * region_tag:admanager_v1_generated_TeamService_GetTeam_async + */ + getTeam( + request?: protos.google.ads.admanager.v1.IGetTeamRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|undefined, {}|undefined + ]>; + getTeam( + request: protos.google.ads.admanager.v1.IGetTeamRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|null|undefined, + {}|null|undefined>): void; + getTeam( + request: protos.google.ads.admanager.v1.IGetTeamRequest, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|null|undefined, + {}|null|undefined>): void; + getTeam( + request?: protos.google.ads.admanager.v1.IGetTeamRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|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().catch(err => {throw err}); + this._log.info('getTeam request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTeam response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getTeam(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IGetTeamRequest|undefined, + {}|undefined + ]) => { + this._log.info('getTeam response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to create a `Team` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * @param {google.ads.admanager.v1.Team} request.team + * Required. The `Team` to create. + * @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 protos.google.ads.admanager.v1.Team|Team}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.create_team.js + * region_tag:admanager_v1_generated_TeamService_CreateTeam_async + */ + createTeam( + request?: protos.google.ads.admanager.v1.ICreateTeamRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|undefined, {}|undefined + ]>; + createTeam( + request: protos.google.ads.admanager.v1.ICreateTeamRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|null|undefined, + {}|null|undefined>): void; + createTeam( + request: protos.google.ads.admanager.v1.ICreateTeamRequest, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|null|undefined, + {}|null|undefined>): void; + createTeam( + request?: protos.google.ads.admanager.v1.ICreateTeamRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|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().catch(err => {throw err}); + this._log.info('createTeam request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTeam response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createTeam(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.ICreateTeamRequest|undefined, + {}|undefined + ]) => { + this._log.info('createTeam response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch create `Team` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * @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 protos.google.ads.admanager.v1.BatchCreateTeamsResponse|BatchCreateTeamsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.batch_create_teams.js + * region_tag:admanager_v1_generated_TeamService_BatchCreateTeams_async + */ + batchCreateTeams( + request?: protos.google.ads.admanager.v1.IBatchCreateTeamsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|undefined, {}|undefined + ]>; + batchCreateTeams( + request: protos.google.ads.admanager.v1.IBatchCreateTeamsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateTeams( + request: protos.google.ads.admanager.v1.IBatchCreateTeamsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchCreateTeams( + request?: protos.google.ads.admanager.v1.IBatchCreateTeamsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|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().catch(err => {throw err}); + this._log.info('batchCreateTeams request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchCreateTeams response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchCreateTeams(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchCreateTeamsResponse, + protos.google.ads.admanager.v1.IBatchCreateTeamsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchCreateTeams response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to update a `Team` object. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.admanager.v1.Team} request.team + * Required. The `Team` to update. + * + * The `Team`'s `name` is used to identify the `Team` to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @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 protos.google.ads.admanager.v1.Team|Team}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.update_team.js + * region_tag:admanager_v1_generated_TeamService_UpdateTeam_async + */ + updateTeam( + request?: protos.google.ads.admanager.v1.IUpdateTeamRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|undefined, {}|undefined + ]>; + updateTeam( + request: protos.google.ads.admanager.v1.IUpdateTeamRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|null|undefined, + {}|null|undefined>): void; + updateTeam( + request: protos.google.ads.admanager.v1.IUpdateTeamRequest, + callback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|null|undefined, + {}|null|undefined>): void; + updateTeam( + request?: protos.google.ads.admanager.v1.IUpdateTeamRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|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({ + 'team.name': request.team!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateTeam request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateTeam response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateTeam(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.ITeam, + protos.google.ads.admanager.v1.IUpdateTeamRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateTeam response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch update `Team` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + * @param {number[]} request.requests + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * @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 protos.google.ads.admanager.v1.BatchUpdateTeamsResponse|BatchUpdateTeamsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.batch_update_teams.js + * region_tag:admanager_v1_generated_TeamService_BatchUpdateTeams_async + */ + batchUpdateTeams( + request?: protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|undefined, {}|undefined + ]>; + batchUpdateTeams( + request: protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateTeams( + request: protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchUpdateTeams( + request?: protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|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().catch(err => {throw err}); + this._log.info('batchUpdateTeams request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchUpdateTeams response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchUpdateTeams(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse, + protos.google.ads.admanager.v1.IBatchUpdateTeamsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchUpdateTeams response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch activate `Team` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_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 protos.google.ads.admanager.v1.BatchActivateTeamsResponse|BatchActivateTeamsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.batch_activate_teams.js + * region_tag:admanager_v1_generated_TeamService_BatchActivateTeams_async + */ + batchActivateTeams( + request?: protos.google.ads.admanager.v1.IBatchActivateTeamsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|undefined, {}|undefined + ]>; + batchActivateTeams( + request: protos.google.ads.admanager.v1.IBatchActivateTeamsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchActivateTeams( + request: protos.google.ads.admanager.v1.IBatchActivateTeamsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchActivateTeams( + request?: protos.google.ads.admanager.v1.IBatchActivateTeamsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|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().catch(err => {throw err}); + this._log.info('batchActivateTeams request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchActivateTeams response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchActivateTeams(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchActivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchActivateTeamsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchActivateTeams response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * API to batch deactivate `Team` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `networks/{network_code}` + * @param {string[]} request.names + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_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 protos.google.ads.admanager.v1.BatchDeactivateTeamsResponse|BatchDeactivateTeamsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.batch_deactivate_teams.js + * region_tag:admanager_v1_generated_TeamService_BatchDeactivateTeams_async + */ + batchDeactivateTeams( + request?: protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|undefined, {}|undefined + ]>; + batchDeactivateTeams( + request: protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateTeams( + request: protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest, + callback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|null|undefined, + {}|null|undefined>): void; + batchDeactivateTeams( + request?: protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|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().catch(err => {throw err}); + this._log.info('batchDeactivateTeams request %j', request); + const wrappedCallback: Callback< + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchDeactivateTeams response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchDeactivateTeams(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse, + protos.google.ads.admanager.v1.IBatchDeactivateTeamsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchDeactivateTeams response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * API to retrieve a list of `Team` objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Team|Team}. + * 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 `listTeamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTeams( + request?: protos.google.ads.admanager.v1.IListTeamsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.admanager.v1.ITeam[], + protos.google.ads.admanager.v1.IListTeamsRequest|null, + protos.google.ads.admanager.v1.IListTeamsResponse + ]>; + listTeams( + request: protos.google.ads.admanager.v1.IListTeamsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListTeamsRequest, + protos.google.ads.admanager.v1.IListTeamsResponse|null|undefined, + protos.google.ads.admanager.v1.ITeam>): void; + listTeams( + request: protos.google.ads.admanager.v1.IListTeamsRequest, + callback: PaginationCallback< + protos.google.ads.admanager.v1.IListTeamsRequest, + protos.google.ads.admanager.v1.IListTeamsResponse|null|undefined, + protos.google.ads.admanager.v1.ITeam>): void; + listTeams( + request?: protos.google.ads.admanager.v1.IListTeamsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.admanager.v1.IListTeamsRequest, + protos.google.ads.admanager.v1.IListTeamsResponse|null|undefined, + protos.google.ads.admanager.v1.ITeam>, + callback?: PaginationCallback< + protos.google.ads.admanager.v1.IListTeamsRequest, + protos.google.ads.admanager.v1.IListTeamsResponse|null|undefined, + protos.google.ads.admanager.v1.ITeam>): + Promise<[ + protos.google.ads.admanager.v1.ITeam[], + protos.google.ads.admanager.v1.IListTeamsRequest|null, + protos.google.ads.admanager.v1.IListTeamsResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.ads.admanager.v1.IListTeamsRequest, + protos.google.ads.admanager.v1.IListTeamsResponse|null|undefined, + protos.google.ads.admanager.v1.ITeam>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTeams values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTeams request %j', request); + return this.innerApiCalls + .listTeams(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.admanager.v1.ITeam[], + protos.google.ads.admanager.v1.IListTeamsRequest|null, + protos.google.ads.admanager.v1.IListTeamsResponse + ]) => { + this._log.info('listTeams values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listTeams`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 protos.google.ads.admanager.v1.Team|Team} 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 `listTeamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTeamsStream( + request?: protos.google.ads.admanager.v1.IListTeamsRequest, + 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['listTeams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTeams stream %j', request); + return this.descriptors.page.listTeams.createStream( + this.innerApiCalls.listTeams as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTeams`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * @param {number} [request.pageSize] + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @param {string} [request.orderBy] + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @param {number} [request.skip] + * Optional. Number of individual resources to skip while paginating. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.ads.admanager.v1.Team|Team}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/team_service.list_teams.js + * region_tag:admanager_v1_generated_TeamService_ListTeams_async + */ + listTeamsAsync( + request?: protos.google.ads.admanager.v1.IListTeamsRequest, + 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['listTeams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTeams iterate %j', request); + return this.descriptors.page.listTeams.asyncIterate( + this.innerApiCalls['listTeams'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified adBreak resource name string. + * + * @param {string} network_code + * @param {string} asset_key + * @param {string} ad_break + * @returns {string} Resource name string. + */ + adBreakPath(networkCode:string,assetKey:string,adBreak:string) { + return this.pathTemplates.adBreakPathTemplate.render({ + network_code: networkCode, + asset_key: assetKey, + ad_break: adBreak, + }); + } + + /** + * Parse the network_code from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code; + } + + /** + * Parse the asset_key from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the asset_key. + */ + matchAssetKeyFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key; + } + + /** + * Parse the ad_break from AdBreak resource. + * + * @param {string} adBreakName + * A fully-qualified path representing AdBreak resource. + * @returns {string} A string representing the ad_break. + */ + matchAdBreakFromAdBreakName(adBreakName: string) { + return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; + } + + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + + /** + * Return a fully-qualified adUnit resource name string. + * + * @param {string} network_code + * @param {string} ad_unit + * @returns {string} Resource name string. + */ + adUnitPath(networkCode:string,adUnit:string) { + return this.pathTemplates.adUnitPathTemplate.render({ + network_code: networkCode, + ad_unit: adUnit, + }); + } + + /** + * Parse the network_code from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code; + } + + /** + * Parse the ad_unit from AdUnit resource. + * + * @param {string} adUnitName + * A fully-qualified path representing AdUnit resource. + * @returns {string} A string representing the ad_unit. + */ + matchAdUnitFromAdUnitName(adUnitName: string) { + return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; + } + + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + + /** + * Return a fully-qualified bandwidthGroup resource name string. + * + * @param {string} network_code + * @param {string} bandwidth_group + * @returns {string} Resource name string. + */ + bandwidthGroupPath(networkCode:string,bandwidthGroup:string) { + return this.pathTemplates.bandwidthGroupPathTemplate.render({ + network_code: networkCode, + bandwidth_group: bandwidthGroup, + }); + } + + /** + * Parse the network_code from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code; + } + + /** + * Parse the bandwidth_group from BandwidthGroup resource. + * + * @param {string} bandwidthGroupName + * A fully-qualified path representing BandwidthGroup resource. + * @returns {string} A string representing the bandwidth_group. + */ + matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string) { + return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; + } + + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + + /** + * Return a fully-qualified company resource name string. + * + * @param {string} network_code + * @param {string} company + * @returns {string} Resource name string. + */ + companyPath(networkCode:string,company:string) { + return this.pathTemplates.companyPathTemplate.render({ + network_code: networkCode, + company: company, + }); + } + + /** + * Parse the network_code from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).network_code; + } + + /** + * Parse the company from Company resource. + * + * @param {string} companyName + * A fully-qualified path representing Company resource. + * @returns {string} A string representing the company. + */ + matchCompanyFromCompanyName(companyName: string) { + return this.pathTemplates.companyPathTemplate.match(companyName).company; + } + + /** + * Return a fully-qualified contact resource name string. + * + * @param {string} network_code + * @param {string} contact + * @returns {string} Resource name string. + */ + contactPath(networkCode:string,contact:string) { + return this.pathTemplates.contactPathTemplate.render({ + network_code: networkCode, + contact: contact, + }); + } + + /** + * Parse the network_code from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).network_code; + } + + /** + * Parse the contact from Contact resource. + * + * @param {string} contactName + * A fully-qualified path representing Contact resource. + * @returns {string} A string representing the contact. + */ + matchContactFromContactName(contactName: string) { + return this.pathTemplates.contactPathTemplate.match(contactName).contact; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + + /** + * Return a fully-qualified customField resource name string. + * + * @param {string} network_code + * @param {string} custom_field + * @returns {string} Resource name string. + */ + customFieldPath(networkCode:string,customField:string) { + return this.pathTemplates.customFieldPathTemplate.render({ + network_code: networkCode, + custom_field: customField, + }); + } + + /** + * Parse the network_code from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code; + } + + /** + * Parse the custom_field from CustomField resource. + * + * @param {string} customFieldName + * A fully-qualified path representing CustomField resource. + * @returns {string} A string representing the custom_field. + */ + matchCustomFieldFromCustomFieldName(customFieldName: string) { + return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field; + } + + /** + * Return a fully-qualified customTargetingKey resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_key + * @returns {string} Resource name string. + */ + customTargetingKeyPath(networkCode:string,customTargetingKey:string) { + return this.pathTemplates.customTargetingKeyPathTemplate.render({ + network_code: networkCode, + custom_targeting_key: customTargetingKey, + }); + } + + /** + * Parse the network_code from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code; + } + + /** + * Parse the custom_targeting_key from CustomTargetingKey resource. + * + * @param {string} customTargetingKeyName + * A fully-qualified path representing CustomTargetingKey resource. + * @returns {string} A string representing the custom_targeting_key. + */ + matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName: string) { + return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key; + } + + /** + * Return a fully-qualified customTargetingValue resource name string. + * + * @param {string} network_code + * @param {string} custom_targeting_value + * @returns {string} Resource name string. + */ + customTargetingValuePath(networkCode:string,customTargetingValue:string) { + return this.pathTemplates.customTargetingValuePathTemplate.render({ + network_code: networkCode, + custom_targeting_value: customTargetingValue, + }); + } + + /** + * Parse the network_code from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code; + } + + /** + * Parse the custom_targeting_value from CustomTargetingValue resource. + * + * @param {string} customTargetingValueName + * A fully-qualified path representing CustomTargetingValue resource. + * @returns {string} A string representing the custom_targeting_value. + */ + matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName: string) { + return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; + } + + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + + /** + * Return a fully-qualified deviceCategory resource name string. + * + * @param {string} network_code + * @param {string} device_category + * @returns {string} Resource name string. + */ + deviceCategoryPath(networkCode:string,deviceCategory:string) { + return this.pathTemplates.deviceCategoryPathTemplate.render({ + network_code: networkCode, + device_category: deviceCategory, + }); + } + + /** + * Parse the network_code from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code; + } + + /** + * Parse the device_category from DeviceCategory resource. + * + * @param {string} deviceCategoryName + * A fully-qualified path representing DeviceCategory resource. + * @returns {string} A string representing the device_category. + */ + matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName: string) { + return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; + } + + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + + /** + * Return a fully-qualified entitySignalsMapping resource name string. + * + * @param {string} network_code + * @param {string} entity_signals_mapping + * @returns {string} Resource name string. + */ + entitySignalsMappingPath(networkCode:string,entitySignalsMapping:string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.render({ + network_code: networkCode, + entity_signals_mapping: entitySignalsMapping, + }); + } + + /** + * Parse the network_code from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code; + } + + /** + * Parse the entity_signals_mapping from EntitySignalsMapping resource. + * + * @param {string} entitySignalsMappingName + * A fully-qualified path representing EntitySignalsMapping resource. + * @returns {string} A string representing the entity_signals_mapping. + */ + matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName: string) { + return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping; + } + + /** + * Return a fully-qualified geoTarget resource name string. + * + * @param {string} network_code + * @param {string} geo_target + * @returns {string} Resource name string. + */ + geoTargetPath(networkCode:string,geoTarget:string) { + return this.pathTemplates.geoTargetPathTemplate.render({ + network_code: networkCode, + geo_target: geoTarget, + }); + } + + /** + * Parse the network_code from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code; + } + + /** + * Parse the geo_target from GeoTarget resource. + * + * @param {string} geoTargetName + * A fully-qualified path representing GeoTarget resource. + * @returns {string} A string representing the geo_target. + */ + matchGeoTargetFromGeoTargetName(geoTargetName: string) { + return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target; + } + + /** + * Return a fully-qualified label resource name string. + * + * @param {string} network_code + * @param {string} label + * @returns {string} Resource name string. + */ + labelPath(networkCode:string,label:string) { + return this.pathTemplates.labelPathTemplate.render({ + network_code: networkCode, + label: label, + }); + } + + /** + * Parse the network_code from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).network_code; + } + + /** + * Parse the label from Label resource. + * + * @param {string} labelName + * A fully-qualified path representing Label resource. + * @returns {string} A string representing the label. + */ + matchLabelFromLabelName(labelName: string) { + return this.pathTemplates.labelPathTemplate.match(labelName).label; + } + + /** + * Return a fully-qualified liveStreamEvent resource name string. + * + * @param {string} network_code + * @param {string} live_stream_event + * @returns {string} Resource name string. + */ + liveStreamEventPath(networkCode:string,liveStreamEvent:string) { + return this.pathTemplates.liveStreamEventPathTemplate.render({ + network_code: networkCode, + live_stream_event: liveStreamEvent, + }); + } + + /** + * Parse the network_code from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code; + } + + /** + * Parse the live_stream_event from LiveStreamEvent resource. + * + * @param {string} liveStreamEventName + * A fully-qualified path representing LiveStreamEvent resource. + * @returns {string} A string representing the live_stream_event. + */ + matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName: string) { + return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; + } + + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + + /** + * Return a fully-qualified network resource name string. + * + * @param {string} network_code + * @returns {string} Resource name string. + */ + networkPath(networkCode:string) { + return this.pathTemplates.networkPathTemplate.render({ + network_code: networkCode, + }); + } + + /** + * Parse the network_code from Network resource. + * + * @param {string} networkName + * A fully-qualified path representing Network resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromNetworkName(networkName: string) { + return this.pathTemplates.networkPathTemplate.match(networkName).network_code; + } + + /** + * Return a fully-qualified operatingSystem resource name string. + * + * @param {string} network_code + * @param {string} operating_system + * @returns {string} Resource name string. + */ + operatingSystemPath(networkCode:string,operatingSystem:string) { + return this.pathTemplates.operatingSystemPathTemplate.render({ + network_code: networkCode, + operating_system: operatingSystem, + }); + } + + /** + * Parse the network_code from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code; + } + + /** + * Parse the operating_system from OperatingSystem resource. + * + * @param {string} operatingSystemName + * A fully-qualified path representing OperatingSystem resource. + * @returns {string} A string representing the operating_system. + */ + matchOperatingSystemFromOperatingSystemName(operatingSystemName: string) { + return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system; + } + + /** + * Return a fully-qualified operatingSystemVersion resource name string. + * + * @param {string} network_code + * @param {string} operating_system_version + * @returns {string} Resource name string. + */ + operatingSystemVersionPath(networkCode:string,operatingSystemVersion:string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.render({ + network_code: networkCode, + operating_system_version: operatingSystemVersion, + }); + } + + /** + * Parse the network_code from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code; + } + + /** + * Parse the operating_system_version from OperatingSystemVersion resource. + * + * @param {string} operatingSystemVersionName + * A fully-qualified path representing OperatingSystemVersion resource. + * @returns {string} A string representing the operating_system_version. + */ + matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName: string) { + return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} network_code + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(networkCode:string,order:string) { + return this.pathTemplates.orderPathTemplate.render({ + network_code: networkCode, + order: order, + }); + } + + /** + * Parse the network_code from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).network_code; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * Return a fully-qualified placement resource name string. + * + * @param {string} network_code + * @param {string} placement + * @returns {string} Resource name string. + */ + placementPath(networkCode:string,placement:string) { + return this.pathTemplates.placementPathTemplate.render({ + network_code: networkCode, + placement: placement, + }); + } + + /** + * Parse the network_code from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).network_code; + } + + /** + * Parse the placement from Placement resource. + * + * @param {string} placementName + * A fully-qualified path representing Placement resource. + * @returns {string} A string representing the placement. + */ + matchPlacementFromPlacementName(placementName: string) { + return this.pathTemplates.placementPathTemplate.match(placementName).placement; + } + + /** + * Return a fully-qualified privateAuction resource name string. + * + * @param {string} network_code + * @param {string} private_auction + * @returns {string} Resource name string. + */ + privateAuctionPath(networkCode:string,privateAuction:string) { + return this.pathTemplates.privateAuctionPathTemplate.render({ + network_code: networkCode, + private_auction: privateAuction, + }); + } + + /** + * Parse the network_code from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code; + } + + /** + * Parse the private_auction from PrivateAuction resource. + * + * @param {string} privateAuctionName + * A fully-qualified path representing PrivateAuction resource. + * @returns {string} A string representing the private_auction. + */ + matchPrivateAuctionFromPrivateAuctionName(privateAuctionName: string) { + return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction; + } + + /** + * Return a fully-qualified privateAuctionDeal resource name string. + * + * @param {string} network_code + * @param {string} private_auction_deal + * @returns {string} Resource name string. + */ + privateAuctionDealPath(networkCode:string,privateAuctionDeal:string) { + return this.pathTemplates.privateAuctionDealPathTemplate.render({ + network_code: networkCode, + private_auction_deal: privateAuctionDeal, + }); + } + + /** + * Parse the network_code from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code; + } + + /** + * Parse the private_auction_deal from PrivateAuctionDeal resource. + * + * @param {string} privateAuctionDealName + * A fully-qualified path representing PrivateAuctionDeal resource. + * @returns {string} A string representing the private_auction_deal. + */ + matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName: string) { + return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal; + } + + /** + * Return a fully-qualified programmaticBuyer resource name string. + * + * @param {string} network_code + * @param {string} programmatic_buyer + * @returns {string} Resource name string. + */ + programmaticBuyerPath(networkCode:string,programmaticBuyer:string) { + return this.pathTemplates.programmaticBuyerPathTemplate.render({ + network_code: networkCode, + programmatic_buyer: programmaticBuyer, + }); + } + + /** + * Parse the network_code from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code; + } + + /** + * Parse the programmatic_buyer from ProgrammaticBuyer resource. + * + * @param {string} programmaticBuyerName + * A fully-qualified path representing ProgrammaticBuyer resource. + * @returns {string} A string representing the programmatic_buyer. + */ + matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName: string) { + return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer; + } + + /** + * Return a fully-qualified report resource name string. + * + * @param {string} network_code + * @param {string} report + * @returns {string} Resource name string. + */ + reportPath(networkCode:string,report:string) { + return this.pathTemplates.reportPathTemplate.render({ + network_code: networkCode, + report: report, + }); + } + + /** + * Parse the network_code from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).network_code; + } + + /** + * Parse the report from Report resource. + * + * @param {string} reportName + * A fully-qualified path representing Report resource. + * @returns {string} A string representing the report. + */ + matchReportFromReportName(reportName: string) { + return this.pathTemplates.reportPathTemplate.match(reportName).report; + } + + /** + * Return a fully-qualified role resource name string. + * + * @param {string} network_code + * @param {string} role + * @returns {string} Resource name string. + */ + rolePath(networkCode:string,role:string) { + return this.pathTemplates.rolePathTemplate.render({ + network_code: networkCode, + role: role, + }); + } + + /** + * Parse the network_code from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).network_code; + } + + /** + * Parse the role from Role resource. + * + * @param {string} roleName + * A fully-qualified path representing Role resource. + * @returns {string} A string representing the role. + */ + matchRoleFromRoleName(roleName: string) { + return this.pathTemplates.rolePathTemplate.match(roleName).role; + } + + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + + /** + * Return a fully-qualified taxonomyCategory resource name string. + * + * @param {string} network_code + * @param {string} taxonomy_category + * @returns {string} Resource name string. + */ + taxonomyCategoryPath(networkCode:string,taxonomyCategory:string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.render({ + network_code: networkCode, + taxonomy_category: taxonomyCategory, + }); + } + + /** + * Parse the network_code from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code; + } + + /** + * Parse the taxonomy_category from TaxonomyCategory resource. + * + * @param {string} taxonomyCategoryName + * A fully-qualified path representing TaxonomyCategory resource. + * @returns {string} A string representing the taxonomy_category. + */ + matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName: string) { + return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category; + } + + /** + * Return a fully-qualified team resource name string. + * + * @param {string} network_code + * @param {string} team + * @returns {string} Resource name string. + */ + teamPath(networkCode:string,team:string) { + return this.pathTemplates.teamPathTemplate.render({ + network_code: networkCode, + team: team, + }); + } + + /** + * Parse the network_code from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).network_code; + } + + /** + * Parse the team from Team resource. + * + * @param {string} teamName + * A fully-qualified path representing Team resource. + * @returns {string} A string representing the team. + */ + matchTeamFromTeamName(teamName: string) { + return this.pathTemplates.teamPathTemplate.match(teamName).team; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} network_code + * @param {string} user + * @returns {string} Resource name string. + */ + userPath(networkCode:string,user:string) { + return this.pathTemplates.userPathTemplate.render({ + network_code: networkCode, + user: user, + }); + } + + /** + * Parse the network_code from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).network_code; + } + + /** + * Parse the user from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the user. + */ + matchUserFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).user; + } + + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.teamServiceStub && !this._terminated) { + return this.teamServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-admanager/src/v1/team_service_client_config.json b/packages/google-ads-admanager/src/v1/team_service_client_config.json new file mode 100644 index 000000000000..7ff2afa3fd67 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/team_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.ads.admanager.v1.TeamService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetTeam": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTeams": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTeam": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateTeams": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTeam": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchUpdateTeams": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchActivateTeams": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchDeactivateTeams": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-admanager/src/v1/team_service_proto_list.json b/packages/google-ads-admanager/src/v1/team_service_proto_list.json new file mode 100644 index 000000000000..68d22403d693 --- /dev/null +++ b/packages/google-ads-admanager/src/v1/team_service_proto_list.json @@ -0,0 +1,122 @@ +[ + "../../protos/google/ads/admanager/v1/ad_break_messages.proto", + "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", + "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", + "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", + "../../protos/google/ads/admanager/v1/ad_unit_service.proto", + "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", + "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", + "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", + "../../protos/google/ads/admanager/v1/company_enums.proto", + "../../protos/google/ads/admanager/v1/company_messages.proto", + "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", + "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", + "../../protos/google/ads/admanager/v1/custom_field_enums.proto", + "../../protos/google/ads/admanager/v1/custom_field_messages.proto", + "../../protos/google/ads/admanager/v1/custom_field_service.proto", + "../../protos/google/ads/admanager/v1/custom_field_value.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_key_service.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_enums.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", + "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", + "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", + "../../protos/google/ads/admanager/v1/device_category_messages.proto", + "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", + "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", + "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", + "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", + "../../protos/google/ads/admanager/v1/frequency_cap.proto", + "../../protos/google/ads/admanager/v1/geo_target_messages.proto", + "../../protos/google/ads/admanager/v1/geo_target_service.proto", + "../../protos/google/ads/admanager/v1/label_messages.proto", + "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", + "../../protos/google/ads/admanager/v1/network_messages.proto", + "../../protos/google/ads/admanager/v1/network_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_service.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_messages.proto", + "../../protos/google/ads/admanager/v1/operating_system_version_service.proto", + "../../protos/google/ads/admanager/v1/order_enums.proto", + "../../protos/google/ads/admanager/v1/order_messages.proto", + "../../protos/google/ads/admanager/v1/order_service.proto", + "../../protos/google/ads/admanager/v1/placement_enums.proto", + "../../protos/google/ads/admanager/v1/placement_messages.proto", + "../../protos/google/ads/admanager/v1/placement_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_deal_service.proto", + "../../protos/google/ads/admanager/v1/private_auction_messages.proto", + "../../protos/google/ads/admanager/v1/private_auction_service.proto", + "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", + "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", + "../../protos/google/ads/admanager/v1/report_messages.proto", + "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", + "../../protos/google/ads/admanager/v1/request_platform_enum.proto", + "../../protos/google/ads/admanager/v1/role_enums.proto", + "../../protos/google/ads/admanager/v1/role_messages.proto", + "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", + "../../protos/google/ads/admanager/v1/size.proto", + "../../protos/google/ads/admanager/v1/size_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", + "../../protos/google/ads/admanager/v1/targeting.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", + "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", + "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", + "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", + "../../protos/google/ads/admanager/v1/time_unit_enum.proto", + "../../protos/google/ads/admanager/v1/user_messages.proto", + "../../protos/google/ads/admanager/v1/user_service.proto", + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" +] diff --git a/packages/google-ads-admanager/src/v1/user_service_client.ts b/packages/google-ads-admanager/src/v1/user_service_client.ts index f2d5247a3717..aed609a9eaad 100644 --- a/packages/google-ads-admanager/src/v1/user_service_client.ts +++ b/packages/google-ads-admanager/src/v1/user_service_client.ts @@ -186,18 +186,51 @@ export class UserServiceClient { adBreakPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}' ), + adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}' + ), adUnitPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/adUnits/{ad_unit}' ), + applicationPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/applications/{application}' + ), + audienceSegmentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/audienceSegments/{audience_segment}' + ), bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/bandwidthGroups/{bandwidth_group}' ), + browserPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browsers/{browser}' + ), + browserLanguagePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/browserLanguages/{browser_language}' + ), + cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}' + ), + cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}' + ), companyPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/companies/{company}' ), contactPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/contacts/{contact}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/content/{content}' + ), + contentBundlePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentBundles/{content_bundle}' + ), + contentLabelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/contentLabels/{content_label}' + ), + creativeTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/creativeTemplates/{creative_template}' + ), customFieldPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customFields/{custom_field}' ), @@ -207,9 +240,15 @@ export class UserServiceClient { customTargetingValuePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/customTargetingValues/{custom_targeting_value}' ), + deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceCapabilities/{device_capability}' + ), deviceCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/deviceCategories/{device_category}' ), + deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/deviceManufacturers/{device_manufacturer}' + ), entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}' ), @@ -222,6 +261,15 @@ export class UserServiceClient { liveStreamEventPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/liveStreamEvents/{live_stream_event}' ), + mobileCarrierPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileCarriers/{mobile_carrier}' + ), + mobileDevicePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDevices/{mobile_device}' + ), + mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}' + ), networkPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}' ), @@ -252,6 +300,9 @@ export class UserServiceClient { rolePathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/roles/{role}' ), + sitePathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/sites/{site}' + ), taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/taxonomyCategories/{taxonomy_category}' ), @@ -261,6 +312,9 @@ export class UserServiceClient { userPathTemplate: new this._gaxModule.PathTemplate( 'networks/{network_code}/users/{user}' ), + webPropertyPathTemplate: new this._gaxModule.PathTemplate( + 'networks/{network_code}/webProperties/{web_property}' + ), }; // Put together the default options sent with requests. @@ -560,6 +614,55 @@ export class UserServiceClient { return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break; } + /** + * Return a fully-qualified adReviewCenterAd resource name string. + * + * @param {string} network_code + * @param {string} web_property_code + * @param {string} ad_review_center_ad + * @returns {string} Resource name string. + */ + adReviewCenterAdPath(networkCode:string,webPropertyCode:string,adReviewCenterAd:string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.render({ + network_code: networkCode, + web_property_code: webPropertyCode, + ad_review_center_ad: adReviewCenterAd, + }); + } + + /** + * Parse the network_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code; + } + + /** + * Parse the web_property_code from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the web_property_code. + */ + matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code; + } + + /** + * Parse the ad_review_center_ad from AdReviewCenterAd resource. + * + * @param {string} adReviewCenterAdName + * A fully-qualified path representing AdReviewCenterAd resource. + * @returns {string} A string representing the ad_review_center_ad. + */ + matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string) { + return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad; + } + /** * Return a fully-qualified adUnit resource name string. * @@ -596,6 +699,78 @@ export class UserServiceClient { return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit; } + /** + * Return a fully-qualified application resource name string. + * + * @param {string} network_code + * @param {string} application + * @returns {string} Resource name string. + */ + applicationPath(networkCode:string,application:string) { + return this.pathTemplates.applicationPathTemplate.render({ + network_code: networkCode, + application: application, + }); + } + + /** + * Parse the network_code from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code; + } + + /** + * Parse the application from Application resource. + * + * @param {string} applicationName + * A fully-qualified path representing Application resource. + * @returns {string} A string representing the application. + */ + matchApplicationFromApplicationName(applicationName: string) { + return this.pathTemplates.applicationPathTemplate.match(applicationName).application; + } + + /** + * Return a fully-qualified audienceSegment resource name string. + * + * @param {string} network_code + * @param {string} audience_segment + * @returns {string} Resource name string. + */ + audienceSegmentPath(networkCode:string,audienceSegment:string) { + return this.pathTemplates.audienceSegmentPathTemplate.render({ + network_code: networkCode, + audience_segment: audienceSegment, + }); + } + + /** + * Parse the network_code from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code; + } + + /** + * Parse the audience_segment from AudienceSegment resource. + * + * @param {string} audienceSegmentName + * A fully-qualified path representing AudienceSegment resource. + * @returns {string} A string representing the audience_segment. + */ + matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string) { + return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment; + } + /** * Return a fully-qualified bandwidthGroup resource name string. * @@ -632,6 +807,150 @@ export class UserServiceClient { return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group; } + /** + * Return a fully-qualified browser resource name string. + * + * @param {string} network_code + * @param {string} browser + * @returns {string} Resource name string. + */ + browserPath(networkCode:string,browser:string) { + return this.pathTemplates.browserPathTemplate.render({ + network_code: networkCode, + browser: browser, + }); + } + + /** + * Parse the network_code from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).network_code; + } + + /** + * Parse the browser from Browser resource. + * + * @param {string} browserName + * A fully-qualified path representing Browser resource. + * @returns {string} A string representing the browser. + */ + matchBrowserFromBrowserName(browserName: string) { + return this.pathTemplates.browserPathTemplate.match(browserName).browser; + } + + /** + * Return a fully-qualified browserLanguage resource name string. + * + * @param {string} network_code + * @param {string} browser_language + * @returns {string} Resource name string. + */ + browserLanguagePath(networkCode:string,browserLanguage:string) { + return this.pathTemplates.browserLanguagePathTemplate.render({ + network_code: networkCode, + browser_language: browserLanguage, + }); + } + + /** + * Parse the network_code from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code; + } + + /** + * Parse the browser_language from BrowserLanguage resource. + * + * @param {string} browserLanguageName + * A fully-qualified path representing BrowserLanguage resource. + * @returns {string} A string representing the browser_language. + */ + matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string) { + return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language; + } + + /** + * Return a fully-qualified cmsMetadataKey resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_key + * @returns {string} Resource name string. + */ + cmsMetadataKeyPath(networkCode:string,cmsMetadataKey:string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.render({ + network_code: networkCode, + cms_metadata_key: cmsMetadataKey, + }); + } + + /** + * Parse the network_code from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code; + } + + /** + * Parse the cms_metadata_key from CmsMetadataKey resource. + * + * @param {string} cmsMetadataKeyName + * A fully-qualified path representing CmsMetadataKey resource. + * @returns {string} A string representing the cms_metadata_key. + */ + matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string) { + return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key; + } + + /** + * Return a fully-qualified cmsMetadataValue resource name string. + * + * @param {string} network_code + * @param {string} cms_metadata_value + * @returns {string} Resource name string. + */ + cmsMetadataValuePath(networkCode:string,cmsMetadataValue:string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.render({ + network_code: networkCode, + cms_metadata_value: cmsMetadataValue, + }); + } + + /** + * Parse the network_code from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code; + } + + /** + * Parse the cms_metadata_value from CmsMetadataValue resource. + * + * @param {string} cmsMetadataValueName + * A fully-qualified path representing CmsMetadataValue resource. + * @returns {string} A string representing the cms_metadata_value. + */ + matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string) { + return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value; + } + /** * Return a fully-qualified company resource name string. * @@ -704,6 +1023,150 @@ export class UserServiceClient { return this.pathTemplates.contactPathTemplate.match(contactName).contact; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} network_code + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(networkCode:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + network_code: networkCode, + content: content, + }); + } + + /** + * Parse the network_code from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).network_code; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified contentBundle resource name string. + * + * @param {string} network_code + * @param {string} content_bundle + * @returns {string} Resource name string. + */ + contentBundlePath(networkCode:string,contentBundle:string) { + return this.pathTemplates.contentBundlePathTemplate.render({ + network_code: networkCode, + content_bundle: contentBundle, + }); + } + + /** + * Parse the network_code from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code; + } + + /** + * Parse the content_bundle from ContentBundle resource. + * + * @param {string} contentBundleName + * A fully-qualified path representing ContentBundle resource. + * @returns {string} A string representing the content_bundle. + */ + matchContentBundleFromContentBundleName(contentBundleName: string) { + return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle; + } + + /** + * Return a fully-qualified contentLabel resource name string. + * + * @param {string} network_code + * @param {string} content_label + * @returns {string} Resource name string. + */ + contentLabelPath(networkCode:string,contentLabel:string) { + return this.pathTemplates.contentLabelPathTemplate.render({ + network_code: networkCode, + content_label: contentLabel, + }); + } + + /** + * Parse the network_code from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code; + } + + /** + * Parse the content_label from ContentLabel resource. + * + * @param {string} contentLabelName + * A fully-qualified path representing ContentLabel resource. + * @returns {string} A string representing the content_label. + */ + matchContentLabelFromContentLabelName(contentLabelName: string) { + return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label; + } + + /** + * Return a fully-qualified creativeTemplate resource name string. + * + * @param {string} network_code + * @param {string} creative_template + * @returns {string} Resource name string. + */ + creativeTemplatePath(networkCode:string,creativeTemplate:string) { + return this.pathTemplates.creativeTemplatePathTemplate.render({ + network_code: networkCode, + creative_template: creativeTemplate, + }); + } + + /** + * Parse the network_code from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code; + } + + /** + * Parse the creative_template from CreativeTemplate resource. + * + * @param {string} creativeTemplateName + * A fully-qualified path representing CreativeTemplate resource. + * @returns {string} A string representing the creative_template. + */ + matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName: string) { + return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template; + } + /** * Return a fully-qualified customField resource name string. * @@ -812,6 +1275,42 @@ export class UserServiceClient { return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value; } + /** + * Return a fully-qualified deviceCapability resource name string. + * + * @param {string} network_code + * @param {string} device_capability + * @returns {string} Resource name string. + */ + deviceCapabilityPath(networkCode:string,deviceCapability:string) { + return this.pathTemplates.deviceCapabilityPathTemplate.render({ + network_code: networkCode, + device_capability: deviceCapability, + }); + } + + /** + * Parse the network_code from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code; + } + + /** + * Parse the device_capability from DeviceCapability resource. + * + * @param {string} deviceCapabilityName + * A fully-qualified path representing DeviceCapability resource. + * @returns {string} A string representing the device_capability. + */ + matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName: string) { + return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability; + } + /** * Return a fully-qualified deviceCategory resource name string. * @@ -848,6 +1347,42 @@ export class UserServiceClient { return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category; } + /** + * Return a fully-qualified deviceManufacturer resource name string. + * + * @param {string} network_code + * @param {string} device_manufacturer + * @returns {string} Resource name string. + */ + deviceManufacturerPath(networkCode:string,deviceManufacturer:string) { + return this.pathTemplates.deviceManufacturerPathTemplate.render({ + network_code: networkCode, + device_manufacturer: deviceManufacturer, + }); + } + + /** + * Parse the network_code from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code; + } + + /** + * Parse the device_manufacturer from DeviceManufacturer resource. + * + * @param {string} deviceManufacturerName + * A fully-qualified path representing DeviceManufacturer resource. + * @returns {string} A string representing the device_manufacturer. + */ + matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName: string) { + return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer; + } + /** * Return a fully-qualified entitySignalsMapping resource name string. * @@ -992,6 +1527,114 @@ export class UserServiceClient { return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event; } + /** + * Return a fully-qualified mobileCarrier resource name string. + * + * @param {string} network_code + * @param {string} mobile_carrier + * @returns {string} Resource name string. + */ + mobileCarrierPath(networkCode:string,mobileCarrier:string) { + return this.pathTemplates.mobileCarrierPathTemplate.render({ + network_code: networkCode, + mobile_carrier: mobileCarrier, + }); + } + + /** + * Parse the network_code from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code; + } + + /** + * Parse the mobile_carrier from MobileCarrier resource. + * + * @param {string} mobileCarrierName + * A fully-qualified path representing MobileCarrier resource. + * @returns {string} A string representing the mobile_carrier. + */ + matchMobileCarrierFromMobileCarrierName(mobileCarrierName: string) { + return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier; + } + + /** + * Return a fully-qualified mobileDevice resource name string. + * + * @param {string} network_code + * @param {string} mobile_device + * @returns {string} Resource name string. + */ + mobileDevicePath(networkCode:string,mobileDevice:string) { + return this.pathTemplates.mobileDevicePathTemplate.render({ + network_code: networkCode, + mobile_device: mobileDevice, + }); + } + + /** + * Parse the network_code from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code; + } + + /** + * Parse the mobile_device from MobileDevice resource. + * + * @param {string} mobileDeviceName + * A fully-qualified path representing MobileDevice resource. + * @returns {string} A string representing the mobile_device. + */ + matchMobileDeviceFromMobileDeviceName(mobileDeviceName: string) { + return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device; + } + + /** + * Return a fully-qualified mobileDeviceSubmodel resource name string. + * + * @param {string} network_code + * @param {string} mobile_device_submodel + * @returns {string} Resource name string. + */ + mobileDeviceSubmodelPath(networkCode:string,mobileDeviceSubmodel:string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({ + network_code: networkCode, + mobile_device_submodel: mobileDeviceSubmodel, + }); + } + + /** + * Parse the network_code from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code; + } + + /** + * Parse the mobile_device_submodel from MobileDeviceSubmodel resource. + * + * @param {string} mobileDeviceSubmodelName + * A fully-qualified path representing MobileDeviceSubmodel resource. + * @returns {string} A string representing the mobile_device_submodel. + */ + matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName: string) { + return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel; + } + /** * Return a fully-qualified network resource name string. * @@ -1339,6 +1982,42 @@ export class UserServiceClient { return this.pathTemplates.rolePathTemplate.match(roleName).role; } + /** + * Return a fully-qualified site resource name string. + * + * @param {string} network_code + * @param {string} site + * @returns {string} Resource name string. + */ + sitePath(networkCode:string,site:string) { + return this.pathTemplates.sitePathTemplate.render({ + network_code: networkCode, + site: site, + }); + } + + /** + * Parse the network_code from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).network_code; + } + + /** + * Parse the site from Site resource. + * + * @param {string} siteName + * A fully-qualified path representing Site resource. + * @returns {string} A string representing the site. + */ + matchSiteFromSiteName(siteName: string) { + return this.pathTemplates.sitePathTemplate.match(siteName).site; + } + /** * Return a fully-qualified taxonomyCategory resource name string. * @@ -1447,6 +2126,42 @@ export class UserServiceClient { return this.pathTemplates.userPathTemplate.match(userName).user; } + /** + * Return a fully-qualified webProperty resource name string. + * + * @param {string} network_code + * @param {string} web_property + * @returns {string} Resource name string. + */ + webPropertyPath(networkCode:string,webProperty:string) { + return this.pathTemplates.webPropertyPathTemplate.render({ + network_code: networkCode, + web_property: webProperty, + }); + } + + /** + * Parse the network_code from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the network_code. + */ + matchNetworkCodeFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code; + } + + /** + * Parse the web_property from WebProperty resource. + * + * @param {string} webPropertyName + * A fully-qualified path representing WebProperty resource. + * @returns {string} A string representing the web_property. + */ + matchWebPropertyFromWebPropertyName(webPropertyName: string) { + return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-ads-admanager/src/v1/user_service_proto_list.json b/packages/google-ads-admanager/src/v1/user_service_proto_list.json index de99ef9169f4..68d22403d693 100644 --- a/packages/google-ads-admanager/src/v1/user_service_proto_list.json +++ b/packages/google-ads-admanager/src/v1/user_service_proto_list.json @@ -1,17 +1,46 @@ [ "../../protos/google/ads/admanager/v1/ad_break_messages.proto", "../../protos/google/ads/admanager/v1/ad_break_service.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto", + "../../protos/google/ads/admanager/v1/ad_review_center_ad_service.proto", "../../protos/google/ads/admanager/v1/ad_unit_enums.proto", "../../protos/google/ads/admanager/v1/ad_unit_messages.proto", "../../protos/google/ads/admanager/v1/ad_unit_service.proto", "../../protos/google/ads/admanager/v1/admanager_error.proto", + "../../protos/google/ads/admanager/v1/application_messages.proto", + "../../protos/google/ads/admanager/v1/application_service.proto", "../../protos/google/ads/admanager/v1/applied_label.proto", + "../../protos/google/ads/admanager/v1/audience_segment_messages.proto", + "../../protos/google/ads/admanager/v1/audience_segment_service.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_messages.proto", "../../protos/google/ads/admanager/v1/bandwidth_group_service.proto", + "../../protos/google/ads/admanager/v1/browser_language_messages.proto", + "../../protos/google/ads/admanager/v1/browser_language_service.proto", + "../../protos/google/ads/admanager/v1/browser_messages.proto", + "../../protos/google/ads/admanager/v1/browser_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_key_service.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_enums.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_messages.proto", + "../../protos/google/ads/admanager/v1/cms_metadata_value_service.proto", "../../protos/google/ads/admanager/v1/company_enums.proto", "../../protos/google/ads/admanager/v1/company_messages.proto", "../../protos/google/ads/admanager/v1/company_service.proto", + "../../protos/google/ads/admanager/v1/contact_enums.proto", "../../protos/google/ads/admanager/v1/contact_messages.proto", + "../../protos/google/ads/admanager/v1/contact_service.proto", + "../../protos/google/ads/admanager/v1/content_bundle_messages.proto", + "../../protos/google/ads/admanager/v1/content_bundle_service.proto", + "../../protos/google/ads/admanager/v1/content_label_messages.proto", + "../../protos/google/ads/admanager/v1/content_label_service.proto", + "../../protos/google/ads/admanager/v1/content_messages.proto", + "../../protos/google/ads/admanager/v1/content_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_enums.proto", + "../../protos/google/ads/admanager/v1/creative_template_messages.proto", + "../../protos/google/ads/admanager/v1/creative_template_service.proto", + "../../protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto", "../../protos/google/ads/admanager/v1/custom_field_enums.proto", "../../protos/google/ads/admanager/v1/custom_field_messages.proto", "../../protos/google/ads/admanager/v1/custom_field_service.proto", @@ -23,17 +52,28 @@ "../../protos/google/ads/admanager/v1/custom_targeting_value_messages.proto", "../../protos/google/ads/admanager/v1/custom_targeting_value_service.proto", "../../protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto", + "../../protos/google/ads/admanager/v1/device_capability_messages.proto", + "../../protos/google/ads/admanager/v1/device_capability_service.proto", "../../protos/google/ads/admanager/v1/device_category_messages.proto", "../../protos/google/ads/admanager/v1/device_category_service.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_messages.proto", + "../../protos/google/ads/admanager/v1/device_manufacturer_service.proto", "../../protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto", "../../protos/google/ads/admanager/v1/entity_signals_mapping_service.proto", "../../protos/google/ads/admanager/v1/environment_type_enum.proto", + "../../protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto", "../../protos/google/ads/admanager/v1/frequency_cap.proto", "../../protos/google/ads/admanager/v1/geo_target_messages.proto", "../../protos/google/ads/admanager/v1/geo_target_service.proto", "../../protos/google/ads/admanager/v1/label_messages.proto", "../../protos/google/ads/admanager/v1/live_stream_event_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_carrier_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_service.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto", + "../../protos/google/ads/admanager/v1/mobile_device_submodel_service.proto", "../../protos/google/ads/admanager/v1/network_messages.proto", "../../protos/google/ads/admanager/v1/network_service.proto", "../../protos/google/ads/admanager/v1/operating_system_messages.proto", @@ -53,12 +93,17 @@ "../../protos/google/ads/admanager/v1/private_marketplace_enums.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_messages.proto", "../../protos/google/ads/admanager/v1/programmatic_buyer_service.proto", + "../../protos/google/ads/admanager/v1/report_definition.proto", "../../protos/google/ads/admanager/v1/report_messages.proto", "../../protos/google/ads/admanager/v1/report_service.proto", + "../../protos/google/ads/admanager/v1/report_value.proto", "../../protos/google/ads/admanager/v1/request_platform_enum.proto", "../../protos/google/ads/admanager/v1/role_enums.proto", "../../protos/google/ads/admanager/v1/role_messages.proto", "../../protos/google/ads/admanager/v1/role_service.proto", + "../../protos/google/ads/admanager/v1/site_enums.proto", + "../../protos/google/ads/admanager/v1/site_messages.proto", + "../../protos/google/ads/admanager/v1/site_service.proto", "../../protos/google/ads/admanager/v1/size.proto", "../../protos/google/ads/admanager/v1/size_type_enum.proto", "../../protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto", @@ -66,9 +111,12 @@ "../../protos/google/ads/admanager/v1/taxonomy_category_messages.proto", "../../protos/google/ads/admanager/v1/taxonomy_category_service.proto", "../../protos/google/ads/admanager/v1/taxonomy_type_enum.proto", + "../../protos/google/ads/admanager/v1/team_enums.proto", "../../protos/google/ads/admanager/v1/team_messages.proto", + "../../protos/google/ads/admanager/v1/team_service.proto", "../../protos/google/ads/admanager/v1/time_unit_enum.proto", "../../protos/google/ads/admanager/v1/user_messages.proto", "../../protos/google/ads/admanager/v1/user_service.proto", - "../../protos/google/ads/admanager/v1/video_position_enum.proto" + "../../protos/google/ads/admanager/v1/video_position_enum.proto", + "../../protos/google/ads/admanager/v1/web_property.proto" ] diff --git a/packages/google-ads-admanager/system-test/fixtures/sample/src/index.js b/packages/google-ads-admanager/system-test/fixtures/sample/src/index.js index 0bd7efff0918..8b856eb28721 100644 --- a/packages/google-ads-admanager/system-test/fixtures/sample/src/index.js +++ b/packages/google-ads-admanager/system-test/fixtures/sample/src/index.js @@ -22,15 +22,32 @@ const admanager = require('@google-ads/admanager'); function main() { const adBreakServiceClient = new admanager.AdBreakServiceClient(); + const adReviewCenterAdServiceClient = new admanager.AdReviewCenterAdServiceClient(); const adUnitServiceClient = new admanager.AdUnitServiceClient(); + const applicationServiceClient = new admanager.ApplicationServiceClient(); + const audienceSegmentServiceClient = new admanager.AudienceSegmentServiceClient(); const bandwidthGroupServiceClient = new admanager.BandwidthGroupServiceClient(); + const browserLanguageServiceClient = new admanager.BrowserLanguageServiceClient(); + const browserServiceClient = new admanager.BrowserServiceClient(); + const cmsMetadataKeyServiceClient = new admanager.CmsMetadataKeyServiceClient(); + const cmsMetadataValueServiceClient = new admanager.CmsMetadataValueServiceClient(); const companyServiceClient = new admanager.CompanyServiceClient(); + const contactServiceClient = new admanager.ContactServiceClient(); + const contentBundleServiceClient = new admanager.ContentBundleServiceClient(); + const contentLabelServiceClient = new admanager.ContentLabelServiceClient(); + const contentServiceClient = new admanager.ContentServiceClient(); + const creativeTemplateServiceClient = new admanager.CreativeTemplateServiceClient(); const customFieldServiceClient = new admanager.CustomFieldServiceClient(); const customTargetingKeyServiceClient = new admanager.CustomTargetingKeyServiceClient(); const customTargetingValueServiceClient = new admanager.CustomTargetingValueServiceClient(); + const deviceCapabilityServiceClient = new admanager.DeviceCapabilityServiceClient(); const deviceCategoryServiceClient = new admanager.DeviceCategoryServiceClient(); + const deviceManufacturerServiceClient = new admanager.DeviceManufacturerServiceClient(); const entitySignalsMappingServiceClient = new admanager.EntitySignalsMappingServiceClient(); const geoTargetServiceClient = new admanager.GeoTargetServiceClient(); + const mobileCarrierServiceClient = new admanager.MobileCarrierServiceClient(); + const mobileDeviceServiceClient = new admanager.MobileDeviceServiceClient(); + const mobileDeviceSubmodelServiceClient = new admanager.MobileDeviceSubmodelServiceClient(); const networkServiceClient = new admanager.NetworkServiceClient(); const operatingSystemServiceClient = new admanager.OperatingSystemServiceClient(); const operatingSystemVersionServiceClient = new admanager.OperatingSystemVersionServiceClient(); @@ -41,7 +58,9 @@ function main() { const programmaticBuyerServiceClient = new admanager.ProgrammaticBuyerServiceClient(); const reportServiceClient = new admanager.ReportServiceClient(); const roleServiceClient = new admanager.RoleServiceClient(); + const siteServiceClient = new admanager.SiteServiceClient(); const taxonomyCategoryServiceClient = new admanager.TaxonomyCategoryServiceClient(); + const teamServiceClient = new admanager.TeamServiceClient(); const userServiceClient = new admanager.UserServiceClient(); } diff --git a/packages/google-ads-admanager/system-test/fixtures/sample/src/index.ts b/packages/google-ads-admanager/system-test/fixtures/sample/src/index.ts index f346b279554c..a5ba26de692f 100644 --- a/packages/google-ads-admanager/system-test/fixtures/sample/src/index.ts +++ b/packages/google-ads-admanager/system-test/fixtures/sample/src/index.ts @@ -16,21 +16,57 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {AdBreakServiceClient, AdUnitServiceClient, BandwidthGroupServiceClient, CompanyServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCategoryServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, TaxonomyCategoryServiceClient, UserServiceClient} from '@google-ads/admanager'; +import {AdBreakServiceClient, AdReviewCenterAdServiceClient, AdUnitServiceClient, ApplicationServiceClient, AudienceSegmentServiceClient, BandwidthGroupServiceClient, BrowserLanguageServiceClient, BrowserServiceClient, CmsMetadataKeyServiceClient, CmsMetadataValueServiceClient, CompanyServiceClient, ContactServiceClient, ContentBundleServiceClient, ContentLabelServiceClient, ContentServiceClient, CreativeTemplateServiceClient, CustomFieldServiceClient, CustomTargetingKeyServiceClient, CustomTargetingValueServiceClient, DeviceCapabilityServiceClient, DeviceCategoryServiceClient, DeviceManufacturerServiceClient, EntitySignalsMappingServiceClient, GeoTargetServiceClient, MobileCarrierServiceClient, MobileDeviceServiceClient, MobileDeviceSubmodelServiceClient, NetworkServiceClient, OperatingSystemServiceClient, OperatingSystemVersionServiceClient, OrderServiceClient, PlacementServiceClient, PrivateAuctionDealServiceClient, PrivateAuctionServiceClient, ProgrammaticBuyerServiceClient, ReportServiceClient, RoleServiceClient, SiteServiceClient, TaxonomyCategoryServiceClient, TeamServiceClient, UserServiceClient} from '@google-ads/admanager'; // check that the client class type name can be used function doStuffWithAdBreakServiceClient(client: AdBreakServiceClient) { client.close(); } +function doStuffWithAdReviewCenterAdServiceClient(client: AdReviewCenterAdServiceClient) { + client.close(); +} function doStuffWithAdUnitServiceClient(client: AdUnitServiceClient) { client.close(); } +function doStuffWithApplicationServiceClient(client: ApplicationServiceClient) { + client.close(); +} +function doStuffWithAudienceSegmentServiceClient(client: AudienceSegmentServiceClient) { + client.close(); +} function doStuffWithBandwidthGroupServiceClient(client: BandwidthGroupServiceClient) { client.close(); } +function doStuffWithBrowserLanguageServiceClient(client: BrowserLanguageServiceClient) { + client.close(); +} +function doStuffWithBrowserServiceClient(client: BrowserServiceClient) { + client.close(); +} +function doStuffWithCmsMetadataKeyServiceClient(client: CmsMetadataKeyServiceClient) { + client.close(); +} +function doStuffWithCmsMetadataValueServiceClient(client: CmsMetadataValueServiceClient) { + client.close(); +} function doStuffWithCompanyServiceClient(client: CompanyServiceClient) { client.close(); } +function doStuffWithContactServiceClient(client: ContactServiceClient) { + client.close(); +} +function doStuffWithContentBundleServiceClient(client: ContentBundleServiceClient) { + client.close(); +} +function doStuffWithContentLabelServiceClient(client: ContentLabelServiceClient) { + client.close(); +} +function doStuffWithContentServiceClient(client: ContentServiceClient) { + client.close(); +} +function doStuffWithCreativeTemplateServiceClient(client: CreativeTemplateServiceClient) { + client.close(); +} function doStuffWithCustomFieldServiceClient(client: CustomFieldServiceClient) { client.close(); } @@ -40,15 +76,30 @@ function doStuffWithCustomTargetingKeyServiceClient(client: CustomTargetingKeySe function doStuffWithCustomTargetingValueServiceClient(client: CustomTargetingValueServiceClient) { client.close(); } +function doStuffWithDeviceCapabilityServiceClient(client: DeviceCapabilityServiceClient) { + client.close(); +} function doStuffWithDeviceCategoryServiceClient(client: DeviceCategoryServiceClient) { client.close(); } +function doStuffWithDeviceManufacturerServiceClient(client: DeviceManufacturerServiceClient) { + client.close(); +} function doStuffWithEntitySignalsMappingServiceClient(client: EntitySignalsMappingServiceClient) { client.close(); } function doStuffWithGeoTargetServiceClient(client: GeoTargetServiceClient) { client.close(); } +function doStuffWithMobileCarrierServiceClient(client: MobileCarrierServiceClient) { + client.close(); +} +function doStuffWithMobileDeviceServiceClient(client: MobileDeviceServiceClient) { + client.close(); +} +function doStuffWithMobileDeviceSubmodelServiceClient(client: MobileDeviceSubmodelServiceClient) { + client.close(); +} function doStuffWithNetworkServiceClient(client: NetworkServiceClient) { client.close(); } @@ -79,9 +130,15 @@ function doStuffWithReportServiceClient(client: ReportServiceClient) { function doStuffWithRoleServiceClient(client: RoleServiceClient) { client.close(); } +function doStuffWithSiteServiceClient(client: SiteServiceClient) { + client.close(); +} function doStuffWithTaxonomyCategoryServiceClient(client: TaxonomyCategoryServiceClient) { client.close(); } +function doStuffWithTeamServiceClient(client: TeamServiceClient) { + client.close(); +} function doStuffWithUserServiceClient(client: UserServiceClient) { client.close(); } @@ -91,15 +148,51 @@ function main() { const adBreakServiceClient = new AdBreakServiceClient(); doStuffWithAdBreakServiceClient(adBreakServiceClient); // check that the client instance can be created + const adReviewCenterAdServiceClient = new AdReviewCenterAdServiceClient(); + doStuffWithAdReviewCenterAdServiceClient(adReviewCenterAdServiceClient); + // check that the client instance can be created const adUnitServiceClient = new AdUnitServiceClient(); doStuffWithAdUnitServiceClient(adUnitServiceClient); // check that the client instance can be created + const applicationServiceClient = new ApplicationServiceClient(); + doStuffWithApplicationServiceClient(applicationServiceClient); + // check that the client instance can be created + const audienceSegmentServiceClient = new AudienceSegmentServiceClient(); + doStuffWithAudienceSegmentServiceClient(audienceSegmentServiceClient); + // check that the client instance can be created const bandwidthGroupServiceClient = new BandwidthGroupServiceClient(); doStuffWithBandwidthGroupServiceClient(bandwidthGroupServiceClient); // check that the client instance can be created + const browserLanguageServiceClient = new BrowserLanguageServiceClient(); + doStuffWithBrowserLanguageServiceClient(browserLanguageServiceClient); + // check that the client instance can be created + const browserServiceClient = new BrowserServiceClient(); + doStuffWithBrowserServiceClient(browserServiceClient); + // check that the client instance can be created + const cmsMetadataKeyServiceClient = new CmsMetadataKeyServiceClient(); + doStuffWithCmsMetadataKeyServiceClient(cmsMetadataKeyServiceClient); + // check that the client instance can be created + const cmsMetadataValueServiceClient = new CmsMetadataValueServiceClient(); + doStuffWithCmsMetadataValueServiceClient(cmsMetadataValueServiceClient); + // check that the client instance can be created const companyServiceClient = new CompanyServiceClient(); doStuffWithCompanyServiceClient(companyServiceClient); // check that the client instance can be created + const contactServiceClient = new ContactServiceClient(); + doStuffWithContactServiceClient(contactServiceClient); + // check that the client instance can be created + const contentBundleServiceClient = new ContentBundleServiceClient(); + doStuffWithContentBundleServiceClient(contentBundleServiceClient); + // check that the client instance can be created + const contentLabelServiceClient = new ContentLabelServiceClient(); + doStuffWithContentLabelServiceClient(contentLabelServiceClient); + // check that the client instance can be created + const contentServiceClient = new ContentServiceClient(); + doStuffWithContentServiceClient(contentServiceClient); + // check that the client instance can be created + const creativeTemplateServiceClient = new CreativeTemplateServiceClient(); + doStuffWithCreativeTemplateServiceClient(creativeTemplateServiceClient); + // check that the client instance can be created const customFieldServiceClient = new CustomFieldServiceClient(); doStuffWithCustomFieldServiceClient(customFieldServiceClient); // check that the client instance can be created @@ -109,15 +202,30 @@ function main() { const customTargetingValueServiceClient = new CustomTargetingValueServiceClient(); doStuffWithCustomTargetingValueServiceClient(customTargetingValueServiceClient); // check that the client instance can be created + const deviceCapabilityServiceClient = new DeviceCapabilityServiceClient(); + doStuffWithDeviceCapabilityServiceClient(deviceCapabilityServiceClient); + // check that the client instance can be created const deviceCategoryServiceClient = new DeviceCategoryServiceClient(); doStuffWithDeviceCategoryServiceClient(deviceCategoryServiceClient); // check that the client instance can be created + const deviceManufacturerServiceClient = new DeviceManufacturerServiceClient(); + doStuffWithDeviceManufacturerServiceClient(deviceManufacturerServiceClient); + // check that the client instance can be created const entitySignalsMappingServiceClient = new EntitySignalsMappingServiceClient(); doStuffWithEntitySignalsMappingServiceClient(entitySignalsMappingServiceClient); // check that the client instance can be created const geoTargetServiceClient = new GeoTargetServiceClient(); doStuffWithGeoTargetServiceClient(geoTargetServiceClient); // check that the client instance can be created + const mobileCarrierServiceClient = new MobileCarrierServiceClient(); + doStuffWithMobileCarrierServiceClient(mobileCarrierServiceClient); + // check that the client instance can be created + const mobileDeviceServiceClient = new MobileDeviceServiceClient(); + doStuffWithMobileDeviceServiceClient(mobileDeviceServiceClient); + // check that the client instance can be created + const mobileDeviceSubmodelServiceClient = new MobileDeviceSubmodelServiceClient(); + doStuffWithMobileDeviceSubmodelServiceClient(mobileDeviceSubmodelServiceClient); + // check that the client instance can be created const networkServiceClient = new NetworkServiceClient(); doStuffWithNetworkServiceClient(networkServiceClient); // check that the client instance can be created @@ -148,9 +256,15 @@ function main() { const roleServiceClient = new RoleServiceClient(); doStuffWithRoleServiceClient(roleServiceClient); // check that the client instance can be created + const siteServiceClient = new SiteServiceClient(); + doStuffWithSiteServiceClient(siteServiceClient); + // check that the client instance can be created const taxonomyCategoryServiceClient = new TaxonomyCategoryServiceClient(); doStuffWithTaxonomyCategoryServiceClient(taxonomyCategoryServiceClient); // check that the client instance can be created + const teamServiceClient = new TeamServiceClient(); + doStuffWithTeamServiceClient(teamServiceClient); + // check that the client instance can be created const userServiceClient = new UserServiceClient(); doStuffWithUserServiceClient(userServiceClient); } diff --git a/packages/google-ads-admanager/test/gapic_ad_break_service_v1.ts b/packages/google-ads-admanager/test/gapic_ad_break_service_v1.ts index b78d6aff5f5a..a27ee83d010d 100644 --- a/packages/google-ads-admanager/test/gapic_ad_break_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_ad_break_service_v1.ts @@ -999,6 +999,52 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -1037,6 +1083,82 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -1075,6 +1197,158 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1151,6 +1425,158 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1265,6 +1691,44 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1303,6 +1767,44 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1455,6 +1957,120 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1827,6 +2443,44 @@ describe('v1.AdBreakServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1940,5 +2594,43 @@ describe('v1.AdBreakServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new adbreakserviceModule.v1.AdBreakServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_ad_review_center_ad_service_v1.ts b/packages/google-ads-admanager/test/gapic_ad_review_center_ad_service_v1.ts new file mode 100644 index 000000000000..58dd80dad440 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_ad_review_center_ad_service_v1.ts @@ -0,0 +1,2779 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as adreviewcenteradserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, 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 +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : 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) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.AdReviewCenterAdServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.adReviewCenterAdServiceStub, undefined); + await client.initialize(); + assert(client.adReviewCenterAdServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.adReviewCenterAdServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.adReviewCenterAdServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('batchAllowAdReviewCenterAds', () => { + it('invokes batchAllowAdReviewCenterAds without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchAllowAdReviewCenterAds = stubLongRunningCall(expectedResponse); + const [operation] = await client.batchAllowAdReviewCenterAds(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchAllowAdReviewCenterAds without error using callback', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchAllowAdReviewCenterAds = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchAllowAdReviewCenterAds( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchAllowAdReviewCenterAds with call error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchAllowAdReviewCenterAds = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.batchAllowAdReviewCenterAds(request), expectedError); + const actualRequest = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchAllowAdReviewCenterAds with LRO error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchAllowAdReviewCenterAds = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.batchAllowAdReviewCenterAds(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchAllowAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBatchAllowAdReviewCenterAdsProgress without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await 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.checkBatchAllowAdReviewCenterAdsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBatchAllowAdReviewCenterAdsProgress with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkBatchAllowAdReviewCenterAdsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('batchBlockAdReviewCenterAds', () => { + it('invokes batchBlockAdReviewCenterAds without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchBlockAdReviewCenterAds = stubLongRunningCall(expectedResponse); + const [operation] = await client.batchBlockAdReviewCenterAds(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchBlockAdReviewCenterAds without error using callback', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchBlockAdReviewCenterAds = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchBlockAdReviewCenterAds( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchBlockAdReviewCenterAds with call error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchBlockAdReviewCenterAds = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.batchBlockAdReviewCenterAds(request), expectedError); + const actualRequest = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchBlockAdReviewCenterAds with LRO error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchBlockAdReviewCenterAds = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.batchBlockAdReviewCenterAds(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchBlockAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBatchBlockAdReviewCenterAdsProgress without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await 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.checkBatchBlockAdReviewCenterAdsProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBatchBlockAdReviewCenterAdsProgress with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkBatchBlockAdReviewCenterAdsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('searchAdReviewCenterAds', () => { + it('invokes searchAdReviewCenterAds without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + ]; + client.innerApiCalls.searchAdReviewCenterAds = stubSimpleCall(expectedResponse); + const [response] = await client.searchAdReviewCenterAds(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchAdReviewCenterAds without error using callback', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + ]; + client.innerApiCalls.searchAdReviewCenterAds = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchAdReviewCenterAds( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IAdReviewCenterAd[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchAdReviewCenterAds with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchAdReviewCenterAds = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.searchAdReviewCenterAds(request), expectedError); + const actualRequest = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchAdReviewCenterAds as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchAdReviewCenterAdsStream without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + ]; + client.descriptors.page.searchAdReviewCenterAds.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.searchAdReviewCenterAdsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.AdReviewCenterAd[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.AdReviewCenterAd) => { + 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.searchAdReviewCenterAds.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchAdReviewCenterAds, request)); + assert( + (client.descriptors.page.searchAdReviewCenterAds.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchAdReviewCenterAdsStream with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.searchAdReviewCenterAds.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.searchAdReviewCenterAdsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.AdReviewCenterAd[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.AdReviewCenterAd) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.searchAdReviewCenterAds.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchAdReviewCenterAds, request)); + assert( + (client.descriptors.page.searchAdReviewCenterAds.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchAdReviewCenterAds without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + generateSampleMessage(new protos.google.ads.admanager.v1.AdReviewCenterAd()), + ]; + client.descriptors.page.searchAdReviewCenterAds.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IAdReviewCenterAd[] = []; + const iterable = client.searchAdReviewCenterAdsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.searchAdReviewCenterAds.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchAdReviewCenterAds.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchAdReviewCenterAds with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.searchAdReviewCenterAds.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchAdReviewCenterAdsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IAdReviewCenterAd[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.searchAdReviewCenterAds.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchAdReviewCenterAds.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + 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 adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + 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); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + 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 adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + 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 adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + 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.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + 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 adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + 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.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new adreviewcenteradserviceModule.v1.AdReviewCenterAdServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts b/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts index 291d000bc3ce..5eb07458ae5c 100644 --- a/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts @@ -916,6 +916,52 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -954,6 +1000,82 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -992,6 +1114,158 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1068,6 +1342,158 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1182,6 +1608,44 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1220,6 +1684,44 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1372,6 +1874,120 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1744,6 +2360,44 @@ describe('v1.AdUnitServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1857,5 +2511,43 @@ describe('v1.AdUnitServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new adunitserviceModule.v1.AdUnitServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_application_service_v1.ts b/packages/google-ads-admanager/test/gapic_application_service_v1.ts new file mode 100644 index 000000000000..8b1aac379488 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_application_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as applicationserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ApplicationServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = applicationserviceModule.v1.ApplicationServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = applicationserviceModule.v1.ApplicationServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new applicationserviceModule.v1.ApplicationServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new applicationserviceModule.v1.ApplicationServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new applicationserviceModule.v1.ApplicationServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = applicationserviceModule.v1.ApplicationServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.applicationServiceStub, undefined); + await client.initialize(); + assert(client.applicationServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.applicationServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.applicationServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getApplication', () => { + it('invokes getApplication without error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetApplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetApplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Application() + ); + client.innerApiCalls.getApplication = stubSimpleCall(expectedResponse); + const [response] = await client.getApplication(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getApplication without error using callback', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetApplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetApplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Application() + ); + client.innerApiCalls.getApplication = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApplication( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IApplication|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getApplication with error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetApplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetApplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getApplication = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getApplication(request), expectedError); + const actualRequest = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getApplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getApplication with closed client', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetApplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetApplicationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getApplication(request), expectedError); + }); + }); + + describe('listApplications', () => { + it('invokes listApplications without error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + ]; + client.innerApiCalls.listApplications = stubSimpleCall(expectedResponse); + const [response] = await client.listApplications(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listApplications without error using callback', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + ]; + client.innerApiCalls.listApplications = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApplications( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IApplication[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listApplications with error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listApplications = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listApplications(request), expectedError); + const actualRequest = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listApplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listApplicationsStream without error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + ]; + client.descriptors.page.listApplications.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listApplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Application[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Application) => { + 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.listApplications.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listApplications, request)); + assert( + (client.descriptors.page.listApplications.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listApplicationsStream with error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listApplications.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listApplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Application[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Application) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listApplications.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listApplications, request)); + assert( + (client.descriptors.page.listApplications.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listApplications without error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + generateSampleMessage(new protos.google.ads.admanager.v1.Application()), + ]; + client.descriptors.page.listApplications.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IApplication[] = []; + const iterable = client.listApplicationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listApplications.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listApplications.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listApplications with error', async () => { + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListApplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListApplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listApplications.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApplicationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IApplication[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listApplications.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listApplications.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new applicationserviceModule.v1.ApplicationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_audience_segment_service_v1.ts b/packages/google-ads-admanager/test/gapic_audience_segment_service_v1.ts new file mode 100644 index 000000000000..596ed851acf3 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_audience_segment_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as audiencesegmentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.AudienceSegmentServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = audiencesegmentserviceModule.v1.AudienceSegmentServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = audiencesegmentserviceModule.v1.AudienceSegmentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = audiencesegmentserviceModule.v1.AudienceSegmentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.audienceSegmentServiceStub, undefined); + await client.initialize(); + assert(client.audienceSegmentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.audienceSegmentServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.audienceSegmentServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getAudienceSegment', () => { + it('invokes getAudienceSegment without error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetAudienceSegmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetAudienceSegmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.AudienceSegment() + ); + client.innerApiCalls.getAudienceSegment = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceSegment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceSegment without error using callback', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetAudienceSegmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetAudienceSegmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.AudienceSegment() + ); + client.innerApiCalls.getAudienceSegment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceSegment( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IAudienceSegment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceSegment with error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetAudienceSegmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetAudienceSegmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceSegment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceSegment(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceSegment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceSegment with closed client', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetAudienceSegmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetAudienceSegmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceSegment(request), expectedError); + }); + }); + + describe('listAudienceSegments', () => { + it('invokes listAudienceSegments without error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + ]; + client.innerApiCalls.listAudienceSegments = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceSegments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceSegments without error using callback', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + ]; + client.innerApiCalls.listAudienceSegments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceSegments( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IAudienceSegment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceSegments with error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceSegments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceSegments(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceSegments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceSegmentsStream without error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + ]; + client.descriptors.page.listAudienceSegments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceSegmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.AudienceSegment[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.AudienceSegment) => { + 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.listAudienceSegments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceSegments, request)); + assert( + (client.descriptors.page.listAudienceSegments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceSegmentsStream with error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceSegments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceSegmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.AudienceSegment[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.AudienceSegment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceSegments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceSegments, request)); + assert( + (client.descriptors.page.listAudienceSegments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceSegments without error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + generateSampleMessage(new protos.google.ads.admanager.v1.AudienceSegment()), + ]; + client.descriptors.page.listAudienceSegments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IAudienceSegment[] = []; + const iterable = client.listAudienceSegmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceSegments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceSegments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceSegments with error', async () => { + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListAudienceSegmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListAudienceSegmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceSegments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceSegmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IAudienceSegment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceSegments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceSegments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new audiencesegmentserviceModule.v1.AudienceSegmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_bandwidth_group_service_v1.ts b/packages/google-ads-admanager/test/gapic_bandwidth_group_service_v1.ts index bc47872ddaa0..7c0b1a10942d 100644 --- a/packages/google-ads-admanager/test/gapic_bandwidth_group_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_bandwidth_group_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.BandwidthGroupServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.BandwidthGroupServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new bandwidthgroupserviceModule.v1.BandwidthGroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_browser_language_service_v1.ts b/packages/google-ads-admanager/test/gapic_browser_language_service_v1.ts new file mode 100644 index 000000000000..881049820ae1 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_browser_language_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as browserlanguageserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.BrowserLanguageServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = browserlanguageserviceModule.v1.BrowserLanguageServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = browserlanguageserviceModule.v1.BrowserLanguageServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = browserlanguageserviceModule.v1.BrowserLanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.browserLanguageServiceStub, undefined); + await client.initialize(); + assert(client.browserLanguageServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.browserLanguageServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.browserLanguageServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getBrowserLanguage', () => { + it('invokes getBrowserLanguage without error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserLanguageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserLanguageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BrowserLanguage() + ); + client.innerApiCalls.getBrowserLanguage = stubSimpleCall(expectedResponse); + const [response] = await client.getBrowserLanguage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowserLanguage without error using callback', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserLanguageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserLanguageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BrowserLanguage() + ); + client.innerApiCalls.getBrowserLanguage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBrowserLanguage( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBrowserLanguage|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowserLanguage with error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserLanguageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserLanguageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBrowserLanguage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBrowserLanguage(request), expectedError); + const actualRequest = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowserLanguage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowserLanguage with closed client', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserLanguageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserLanguageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getBrowserLanguage(request), expectedError); + }); + }); + + describe('listBrowserLanguages', () => { + it('invokes listBrowserLanguages without error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + ]; + client.innerApiCalls.listBrowserLanguages = stubSimpleCall(expectedResponse); + const [response] = await client.listBrowserLanguages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowserLanguages without error using callback', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + ]; + client.innerApiCalls.listBrowserLanguages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBrowserLanguages( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBrowserLanguage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowserLanguages with error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBrowserLanguages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBrowserLanguages(request), expectedError); + const actualRequest = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowserLanguages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowserLanguagesStream without error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + ]; + client.descriptors.page.listBrowserLanguages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBrowserLanguagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.BrowserLanguage[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.BrowserLanguage) => { + 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.listBrowserLanguages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBrowserLanguages, request)); + assert( + (client.descriptors.page.listBrowserLanguages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBrowserLanguagesStream with error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBrowserLanguages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBrowserLanguagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.BrowserLanguage[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.BrowserLanguage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBrowserLanguages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBrowserLanguages, request)); + assert( + (client.descriptors.page.listBrowserLanguages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBrowserLanguages without error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + generateSampleMessage(new protos.google.ads.admanager.v1.BrowserLanguage()), + ]; + client.descriptors.page.listBrowserLanguages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IBrowserLanguage[] = []; + const iterable = client.listBrowserLanguagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBrowserLanguages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBrowserLanguages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBrowserLanguages with error', async () => { + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowserLanguagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowserLanguagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBrowserLanguages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBrowserLanguagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IBrowserLanguage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBrowserLanguages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBrowserLanguages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new browserlanguageserviceModule.v1.BrowserLanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_browser_service_v1.ts b/packages/google-ads-admanager/test/gapic_browser_service_v1.ts new file mode 100644 index 000000000000..3743251afce8 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_browser_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as browserserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.BrowserServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new browserserviceModule.v1.BrowserServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new browserserviceModule.v1.BrowserServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = browserserviceModule.v1.BrowserServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = browserserviceModule.v1.BrowserServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new browserserviceModule.v1.BrowserServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new browserserviceModule.v1.BrowserServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new browserserviceModule.v1.BrowserServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new browserserviceModule.v1.BrowserServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new browserserviceModule.v1.BrowserServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = browserserviceModule.v1.BrowserServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new browserserviceModule.v1.BrowserServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.browserServiceStub, undefined); + await client.initialize(); + assert(client.browserServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.browserServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.browserServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getBrowser', () => { + it('invokes getBrowser without error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Browser() + ); + client.innerApiCalls.getBrowser = stubSimpleCall(expectedResponse); + const [response] = await client.getBrowser(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowser without error using callback', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Browser() + ); + client.innerApiCalls.getBrowser = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBrowser( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBrowser|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowser with error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBrowser = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBrowser(request), expectedError); + const actualRequest = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBrowser as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBrowser with closed client', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetBrowserRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetBrowserRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getBrowser(request), expectedError); + }); + }); + + describe('listBrowsers', () => { + it('invokes listBrowsers without error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + ]; + client.innerApiCalls.listBrowsers = stubSimpleCall(expectedResponse); + const [response] = await client.listBrowsers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowsers without error using callback', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + ]; + client.innerApiCalls.listBrowsers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBrowsers( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBrowser[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowsers with error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBrowsers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBrowsers(request), expectedError); + const actualRequest = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBrowsers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBrowsersStream without error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + ]; + client.descriptors.page.listBrowsers.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBrowsersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Browser[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Browser) => { + 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.listBrowsers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBrowsers, request)); + assert( + (client.descriptors.page.listBrowsers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBrowsersStream with error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBrowsers.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBrowsersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Browser[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Browser) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBrowsers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBrowsers, request)); + assert( + (client.descriptors.page.listBrowsers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBrowsers without error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + generateSampleMessage(new protos.google.ads.admanager.v1.Browser()), + ]; + client.descriptors.page.listBrowsers.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IBrowser[] = []; + const iterable = client.listBrowsersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBrowsers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBrowsers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBrowsers with error', async () => { + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListBrowsersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListBrowsersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBrowsers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBrowsersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IBrowser[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBrowsers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBrowsers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new browserserviceModule.v1.BrowserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_cms_metadata_key_service_v1.ts b/packages/google-ads-admanager/test/gapic_cms_metadata_key_service_v1.ts new file mode 100644 index 000000000000..79b472712a10 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_cms_metadata_key_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as cmsmetadatakeyserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CmsMetadataKeyServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.cmsMetadataKeyServiceStub, undefined); + await client.initialize(); + assert(client.cmsMetadataKeyServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.cmsMetadataKeyServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.cmsMetadataKeyServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getCmsMetadataKey', () => { + it('invokes getCmsMetadataKey without error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataKeyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataKeyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CmsMetadataKey() + ); + client.innerApiCalls.getCmsMetadataKey = stubSimpleCall(expectedResponse); + const [response] = await client.getCmsMetadataKey(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataKey without error using callback', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataKeyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataKeyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CmsMetadataKey() + ); + client.innerApiCalls.getCmsMetadataKey = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCmsMetadataKey( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICmsMetadataKey|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataKey with error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataKeyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataKeyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCmsMetadataKey = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCmsMetadataKey(request), expectedError); + const actualRequest = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataKey as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataKey with closed client', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataKeyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataKeyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getCmsMetadataKey(request), expectedError); + }); + }); + + describe('listCmsMetadataKeys', () => { + it('invokes listCmsMetadataKeys without error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + ]; + client.innerApiCalls.listCmsMetadataKeys = stubSimpleCall(expectedResponse); + const [response] = await client.listCmsMetadataKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataKeys without error using callback', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + ]; + client.innerApiCalls.listCmsMetadataKeys = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCmsMetadataKeys( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICmsMetadataKey[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataKeys with error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCmsMetadataKeys = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCmsMetadataKeys(request), expectedError); + const actualRequest = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataKeysStream without error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + ]; + client.descriptors.page.listCmsMetadataKeys.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCmsMetadataKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CmsMetadataKey[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CmsMetadataKey) => { + 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.listCmsMetadataKeys.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCmsMetadataKeys, request)); + assert( + (client.descriptors.page.listCmsMetadataKeys.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCmsMetadataKeysStream with error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCmsMetadataKeys.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCmsMetadataKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CmsMetadataKey[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CmsMetadataKey) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCmsMetadataKeys.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCmsMetadataKeys, request)); + assert( + (client.descriptors.page.listCmsMetadataKeys.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCmsMetadataKeys without error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataKey()), + ]; + client.descriptors.page.listCmsMetadataKeys.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ICmsMetadataKey[] = []; + const iterable = client.listCmsMetadataKeysAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCmsMetadataKeys.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCmsMetadataKeys.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCmsMetadataKeys with error', async () => { + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCmsMetadataKeys.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCmsMetadataKeysAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ICmsMetadataKey[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCmsMetadataKeys.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCmsMetadataKeys.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new cmsmetadatakeyserviceModule.v1.CmsMetadataKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_cms_metadata_value_service_v1.ts b/packages/google-ads-admanager/test/gapic_cms_metadata_value_service_v1.ts new file mode 100644 index 000000000000..1c721ac70eaf --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_cms_metadata_value_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as cmsmetadatavalueserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CmsMetadataValueServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.cmsMetadataValueServiceStub, undefined); + await client.initialize(); + assert(client.cmsMetadataValueServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.cmsMetadataValueServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.cmsMetadataValueServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getCmsMetadataValue', () => { + it('invokes getCmsMetadataValue without error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataValueRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CmsMetadataValue() + ); + client.innerApiCalls.getCmsMetadataValue = stubSimpleCall(expectedResponse); + const [response] = await client.getCmsMetadataValue(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataValue without error using callback', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataValueRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CmsMetadataValue() + ); + client.innerApiCalls.getCmsMetadataValue = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCmsMetadataValue( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICmsMetadataValue|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataValue with error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataValueRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCmsMetadataValue = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCmsMetadataValue(request), expectedError); + const actualRequest = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCmsMetadataValue as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCmsMetadataValue with closed client', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCmsMetadataValueRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCmsMetadataValueRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getCmsMetadataValue(request), expectedError); + }); + }); + + describe('listCmsMetadataValues', () => { + it('invokes listCmsMetadataValues without error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + ]; + client.innerApiCalls.listCmsMetadataValues = stubSimpleCall(expectedResponse); + const [response] = await client.listCmsMetadataValues(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataValues without error using callback', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + ]; + client.innerApiCalls.listCmsMetadataValues = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCmsMetadataValues( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICmsMetadataValue[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataValues with error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCmsMetadataValues = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCmsMetadataValues(request), expectedError); + const actualRequest = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCmsMetadataValues as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCmsMetadataValuesStream without error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + ]; + client.descriptors.page.listCmsMetadataValues.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCmsMetadataValuesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CmsMetadataValue[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CmsMetadataValue) => { + 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.listCmsMetadataValues.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCmsMetadataValues, request)); + assert( + (client.descriptors.page.listCmsMetadataValues.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCmsMetadataValuesStream with error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCmsMetadataValues.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCmsMetadataValuesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CmsMetadataValue[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CmsMetadataValue) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCmsMetadataValues.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCmsMetadataValues, request)); + assert( + (client.descriptors.page.listCmsMetadataValues.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCmsMetadataValues without error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + generateSampleMessage(new protos.google.ads.admanager.v1.CmsMetadataValue()), + ]; + client.descriptors.page.listCmsMetadataValues.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ICmsMetadataValue[] = []; + const iterable = client.listCmsMetadataValuesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCmsMetadataValues.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCmsMetadataValues.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCmsMetadataValues with error', async () => { + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCmsMetadataValuesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCmsMetadataValuesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCmsMetadataValues.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCmsMetadataValuesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ICmsMetadataValue[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCmsMetadataValues.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCmsMetadataValues.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new cmsmetadatavalueserviceModule.v1.CmsMetadataValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_company_service_v1.ts b/packages/google-ads-admanager/test/gapic_company_service_v1.ts index 89a3cdbe3d44..a677aa72c3ca 100644 --- a/packages/google-ads-admanager/test/gapic_company_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_company_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.CompanyServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.CompanyServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new companyserviceModule.v1.CompanyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_contact_service_v1.ts b/packages/google-ads-admanager/test/gapic_contact_service_v1.ts new file mode 100644 index 000000000000..38edeb57a460 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_contact_service_v1.ts @@ -0,0 +1,2744 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as contactserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ContactServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new contactserviceModule.v1.ContactServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new contactserviceModule.v1.ContactServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = contactserviceModule.v1.ContactServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = contactserviceModule.v1.ContactServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new contactserviceModule.v1.ContactServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new contactserviceModule.v1.ContactServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contactserviceModule.v1.ContactServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contactserviceModule.v1.ContactServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new contactserviceModule.v1.ContactServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = contactserviceModule.v1.ContactServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contactserviceModule.v1.ContactServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contactServiceStub, undefined); + await client.initialize(); + assert(client.contactServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.contactServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contactServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getContact', () => { + it('invokes getContact without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.getContact = stubSimpleCall(expectedResponse); + const [response] = await client.getContact(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContact without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.getContact = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContact( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContact|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContact with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContactRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContact = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContact(request), expectedError); + const actualRequest = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContact with closed client', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContactRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getContact(request), expectedError); + }); + }); + + describe('createContact', () => { + it('invokes createContact without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateContactRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.createContact = stubSimpleCall(expectedResponse); + const [response] = await client.createContact(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContact without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateContactRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.createContact = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createContact( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContact|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContact with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateContactRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createContact = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createContact(request), expectedError); + const actualRequest = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContact with closed client', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateContactRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateContactRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createContact(request), expectedError); + }); + }); + + describe('batchCreateContacts', () => { + it('invokes batchCreateContacts without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsResponse() + ); + client.innerApiCalls.batchCreateContacts = stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateContacts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateContacts without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsResponse() + ); + client.innerApiCalls.batchCreateContacts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateContacts( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchCreateContactsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateContacts with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateContacts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchCreateContacts(request), expectedError); + const actualRequest = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateContacts with closed client', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchCreateContacts(request), expectedError); + }); + }); + + describe('updateContact', () => { + it('invokes updateContact without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateContactRequest() + ); + request.contact ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateContactRequest', ['contact', 'name']); + request.contact.name = defaultValue1; + const expectedHeaderRequestParams = `contact.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.updateContact = stubSimpleCall(expectedResponse); + const [response] = await client.updateContact(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContact without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateContactRequest() + ); + request.contact ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateContactRequest', ['contact', 'name']); + request.contact.name = defaultValue1; + const expectedHeaderRequestParams = `contact.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Contact() + ); + client.innerApiCalls.updateContact = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateContact( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContact|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContact with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateContactRequest() + ); + request.contact ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateContactRequest', ['contact', 'name']); + request.contact.name = defaultValue1; + const expectedHeaderRequestParams = `contact.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateContact = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateContact(request), expectedError); + const actualRequest = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContact as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContact with closed client', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateContactRequest() + ); + request.contact ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateContactRequest', ['contact', 'name']); + request.contact.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateContact(request), expectedError); + }); + }); + + describe('batchUpdateContacts', () => { + it('invokes batchUpdateContacts without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsResponse() + ); + client.innerApiCalls.batchUpdateContacts = stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateContacts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateContacts without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsResponse() + ); + client.innerApiCalls.batchUpdateContacts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateContacts( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchUpdateContactsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateContacts with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateContacts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchUpdateContacts(request), expectedError); + const actualRequest = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateContacts with closed client', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchUpdateContacts(request), expectedError); + }); + }); + + describe('listContacts', () => { + it('invokes listContacts without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + ]; + client.innerApiCalls.listContacts = stubSimpleCall(expectedResponse); + const [response] = await client.listContacts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContacts without error using callback', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + ]; + client.innerApiCalls.listContacts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContacts( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContact[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContacts with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContacts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContacts(request), expectedError); + const actualRequest = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContacts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContactsStream without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + ]; + client.descriptors.page.listContacts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listContactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Contact[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Contact) => { + 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.listContacts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContacts, request)); + assert( + (client.descriptors.page.listContacts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listContactsStream with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContacts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listContactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Contact[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Contact) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listContacts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContacts, request)); + assert( + (client.descriptors.page.listContacts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContacts without error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + generateSampleMessage(new protos.google.ads.admanager.v1.Contact()), + ]; + client.descriptors.page.listContacts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IContact[] = []; + const iterable = client.listContactsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContacts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContacts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContacts with error', async () => { + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContactsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContactsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContacts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listContactsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IContact[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContacts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContacts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new contactserviceModule.v1.ContactServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_content_bundle_service_v1.ts b/packages/google-ads-admanager/test/gapic_content_bundle_service_v1.ts new file mode 100644 index 000000000000..99154a3c9136 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_content_bundle_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as contentbundleserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ContentBundleServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = contentbundleserviceModule.v1.ContentBundleServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = contentbundleserviceModule.v1.ContentBundleServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new contentbundleserviceModule.v1.ContentBundleServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = contentbundleserviceModule.v1.ContentBundleServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentBundleServiceStub, undefined); + await client.initialize(); + assert(client.contentBundleServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.contentBundleServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentBundleServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getContentBundle', () => { + it('invokes getContentBundle without error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentBundleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentBundleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.ContentBundle() + ); + client.innerApiCalls.getContentBundle = stubSimpleCall(expectedResponse); + const [response] = await client.getContentBundle(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentBundle without error using callback', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentBundleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentBundleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.ContentBundle() + ); + client.innerApiCalls.getContentBundle = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContentBundle( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContentBundle|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentBundle with error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentBundleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentBundleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContentBundle = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContentBundle(request), expectedError); + const actualRequest = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentBundle as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentBundle with closed client', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentBundleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentBundleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getContentBundle(request), expectedError); + }); + }); + + describe('listContentBundles', () => { + it('invokes listContentBundles without error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + ]; + client.innerApiCalls.listContentBundles = stubSimpleCall(expectedResponse); + const [response] = await client.listContentBundles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentBundles without error using callback', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + ]; + client.innerApiCalls.listContentBundles = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContentBundles( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContentBundle[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentBundles with error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContentBundles = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContentBundles(request), expectedError); + const actualRequest = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentBundles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentBundlesStream without error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + ]; + client.descriptors.page.listContentBundles.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listContentBundlesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.ContentBundle[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ContentBundle) => { + 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.listContentBundles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContentBundles, request)); + assert( + (client.descriptors.page.listContentBundles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listContentBundlesStream with error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContentBundles.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listContentBundlesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.ContentBundle[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ContentBundle) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listContentBundles.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContentBundles, request)); + assert( + (client.descriptors.page.listContentBundles.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContentBundles without error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentBundle()), + ]; + client.descriptors.page.listContentBundles.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IContentBundle[] = []; + const iterable = client.listContentBundlesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContentBundles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContentBundles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContentBundles with error', async () => { + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentBundlesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentBundlesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContentBundles.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listContentBundlesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IContentBundle[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContentBundles.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContentBundles.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new contentbundleserviceModule.v1.ContentBundleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_content_label_service_v1.ts b/packages/google-ads-admanager/test/gapic_content_label_service_v1.ts new file mode 100644 index 000000000000..deb1115eba98 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_content_label_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as contentlabelserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ContentLabelServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = contentlabelserviceModule.v1.ContentLabelServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = contentlabelserviceModule.v1.ContentLabelServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new contentlabelserviceModule.v1.ContentLabelServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = contentlabelserviceModule.v1.ContentLabelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentLabelServiceStub, undefined); + await client.initialize(); + assert(client.contentLabelServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.contentLabelServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentLabelServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getContentLabel', () => { + it('invokes getContentLabel without error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentLabelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentLabelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.ContentLabel() + ); + client.innerApiCalls.getContentLabel = stubSimpleCall(expectedResponse); + const [response] = await client.getContentLabel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentLabel without error using callback', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentLabelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentLabelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.ContentLabel() + ); + client.innerApiCalls.getContentLabel = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContentLabel( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContentLabel|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentLabel with error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentLabelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentLabelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContentLabel = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContentLabel(request), expectedError); + const actualRequest = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContentLabel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContentLabel with closed client', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentLabelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentLabelRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getContentLabel(request), expectedError); + }); + }); + + describe('listContentLabels', () => { + it('invokes listContentLabels without error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + ]; + client.innerApiCalls.listContentLabels = stubSimpleCall(expectedResponse); + const [response] = await client.listContentLabels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentLabels without error using callback', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + ]; + client.innerApiCalls.listContentLabels = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContentLabels( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContentLabel[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentLabels with error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContentLabels = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContentLabels(request), expectedError); + const actualRequest = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContentLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentLabelsStream without error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + ]; + client.descriptors.page.listContentLabels.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listContentLabelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.ContentLabel[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ContentLabel) => { + 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.listContentLabels.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContentLabels, request)); + assert( + (client.descriptors.page.listContentLabels.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listContentLabelsStream with error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContentLabels.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listContentLabelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.ContentLabel[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ContentLabel) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listContentLabels.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContentLabels, request)); + assert( + (client.descriptors.page.listContentLabels.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContentLabels without error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + generateSampleMessage(new protos.google.ads.admanager.v1.ContentLabel()), + ]; + client.descriptors.page.listContentLabels.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IContentLabel[] = []; + const iterable = client.listContentLabelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContentLabels.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContentLabels.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContentLabels with error', async () => { + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentLabelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContentLabels.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listContentLabelsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IContentLabel[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContentLabels.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContentLabels.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new contentlabelserviceModule.v1.ContentLabelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_content_service_v1.ts b/packages/google-ads-admanager/test/gapic_content_service_v1.ts new file mode 100644 index 000000000000..6d99ab183369 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_content_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as contentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ContentServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = contentserviceModule.v1.ContentServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = contentserviceModule.v1.ContentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new contentserviceModule.v1.ContentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentserviceModule.v1.ContentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new contentserviceModule.v1.ContentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = contentserviceModule.v1.ContentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + await client.initialize(); + assert(client.contentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.contentServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getContent', () => { + it('invokes getContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Content() + ); + client.innerApiCalls.getContent = stubSimpleCall(expectedResponse); + const [response] = await client.getContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Content() + ); + client.innerApiCalls.getContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContent( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContent(request), expectedError); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getContent(request), expectedError); + }); + }); + + describe('listContent', () => { + it('invokes listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); + const [response] = await client.listContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContent( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IContent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContent(request), expectedError); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentStream without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + ]; + client.descriptors.page.listContent.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Content[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Content) => { + 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.listContent.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContent, request)); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listContentStream with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Content[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Content) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContent, request)); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + generateSampleMessage(new protos.google.ads.admanager.v1.Content()), + ]; + client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IContent[] = []; + const iterable = client.listContentAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listContentAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IContent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_creative_template_service_v1.ts b/packages/google-ads-admanager/test/gapic_creative_template_service_v1.ts new file mode 100644 index 000000000000..0007fe0dbb2b --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_creative_template_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as creativetemplateserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CreativeTemplateServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = creativetemplateserviceModule.v1.CreativeTemplateServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = creativetemplateserviceModule.v1.CreativeTemplateServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = creativetemplateserviceModule.v1.CreativeTemplateServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.creativeTemplateServiceStub, undefined); + await client.initialize(); + assert(client.creativeTemplateServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.creativeTemplateServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.creativeTemplateServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getCreativeTemplate', () => { + it('invokes getCreativeTemplate without error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCreativeTemplateRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCreativeTemplateRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CreativeTemplate() + ); + client.innerApiCalls.getCreativeTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.getCreativeTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCreativeTemplate without error using callback', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCreativeTemplateRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCreativeTemplateRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CreativeTemplate() + ); + client.innerApiCalls.getCreativeTemplate = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCreativeTemplate( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICreativeTemplate|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCreativeTemplate with error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCreativeTemplateRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCreativeTemplateRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCreativeTemplate = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCreativeTemplate(request), expectedError); + const actualRequest = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCreativeTemplate as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCreativeTemplate with closed client', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetCreativeTemplateRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetCreativeTemplateRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getCreativeTemplate(request), expectedError); + }); + }); + + describe('listCreativeTemplates', () => { + it('invokes listCreativeTemplates without error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + ]; + client.innerApiCalls.listCreativeTemplates = stubSimpleCall(expectedResponse); + const [response] = await client.listCreativeTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCreativeTemplates without error using callback', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + ]; + client.innerApiCalls.listCreativeTemplates = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCreativeTemplates( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICreativeTemplate[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCreativeTemplates with error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCreativeTemplates = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCreativeTemplates(request), expectedError); + const actualRequest = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCreativeTemplates as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCreativeTemplatesStream without error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + ]; + client.descriptors.page.listCreativeTemplates.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCreativeTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CreativeTemplate[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CreativeTemplate) => { + 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.listCreativeTemplates.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCreativeTemplates, request)); + assert( + (client.descriptors.page.listCreativeTemplates.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCreativeTemplatesStream with error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCreativeTemplates.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCreativeTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CreativeTemplate[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CreativeTemplate) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCreativeTemplates.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCreativeTemplates, request)); + assert( + (client.descriptors.page.listCreativeTemplates.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCreativeTemplates without error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + generateSampleMessage(new protos.google.ads.admanager.v1.CreativeTemplate()), + ]; + client.descriptors.page.listCreativeTemplates.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ICreativeTemplate[] = []; + const iterable = client.listCreativeTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCreativeTemplates.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCreativeTemplates.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCreativeTemplates with error', async () => { + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCreativeTemplatesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCreativeTemplatesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCreativeTemplates.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCreativeTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ICreativeTemplate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCreativeTemplates.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCreativeTemplates.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new creativetemplateserviceModule.v1.CreativeTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts index 8fe7c90923fe..8c2f99e7a5a1 100644 --- a/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts @@ -378,57 +378,55 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('listCustomFields', () => { - it('invokes listCustomFields without error', async () => { + describe('createCustomField', () => { + it('invokes createCustomField without error', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.CreateCustomFieldRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreateCustomFieldRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - ]; - client.innerApiCalls.listCustomFields = stubSimpleCall(expectedResponse); - const [response] = await client.listCustomFields(request); + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CustomField() + ); + client.innerApiCalls.createCustomField = stubSimpleCall(expectedResponse); + const [response] = await client.createCustomField(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + const actualRequest = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomFields without error using callback', async () => { + it('invokes createCustomField without error using callback', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.CreateCustomFieldRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreateCustomFieldRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - ]; - client.innerApiCalls.listCustomFields = stubSimpleCallWithCallback(expectedResponse); + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CustomField() + ); + client.innerApiCalls.createCustomField = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCustomFields( + client.createCustomField( request, - (err?: Error|null, result?: protos.google.ads.admanager.v1.ICustomField[]|null) => { + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICustomField|null) => { if (err) { reject(err); } else { @@ -438,387 +436,1467 @@ describe('v1.CustomFieldServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + const actualRequest = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomFields with error', async () => { + it('invokes createCustomField with error', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.CreateCustomFieldRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreateCustomFieldRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.listCustomFields = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listCustomFields(request), expectedError); - const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + client.innerApiCalls.createCustomField = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createCustomField(request), expectedError); + const actualRequest = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createCustomField as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomFieldsStream without error', async () => { + it('invokes createCustomField with closed client', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.CreateCustomFieldRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreateCustomFieldRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - ]; - client.descriptors.page.listCustomFields.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCustomFieldsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.CustomField[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.CustomField) => { - 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.listCustomFields.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCustomFields, request)); - assert( - (client.descriptors.page.listCustomFields.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createCustomField(request), expectedError); }); + }); - it('invokes listCustomFieldsStream with error', async () => { + describe('batchCreateCustomFields', () => { + it('invokes batchCreateCustomFields without error', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateCustomFieldsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listCustomFields.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCustomFieldsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.CustomField[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.CustomField) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listCustomFields.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCustomFields, request)); - assert( - (client.descriptors.page.listCustomFields.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsResponse() ); + client.innerApiCalls.batchCreateCustomFields = stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateCustomFields(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('uses async iteration with listCustomFields without error', async () => { + it('invokes batchCreateCustomFields without error using callback', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ auth: googleAuth, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateCustomFieldsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), - ]; - client.descriptors.page.listCustomFields.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.ads.admanager.v1.ICustomField[] = []; - const iterable = client.listCustomFieldsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsResponse() ); + client.innerApiCalls.batchCreateCustomFields = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateCustomFields( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchCreateCustomFieldsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('uses async iteration with listCustomFields with error', async () => { + it('invokes batchCreateCustomFields with error', async () => { const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateCustomFieldsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomFields.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCustomFieldsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.ads.admanager.v1.ICustomField[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } + client.innerApiCalls.batchCreateCustomFields = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchCreateCustomFields(request), expectedError); + const actualRequest = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateCustomFields with closed client', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', }); - assert.deepStrictEqual( - (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateCustomFieldsRequest() ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchCreateCustomFields(request), expectedError); }); }); - describe('Path templates', () => { + describe('updateCustomField', () => { + it('invokes updateCustomField without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateCustomFieldRequest() + ); + request.customField ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateCustomFieldRequest', ['customField', 'name']); + request.customField.name = defaultValue1; + const expectedHeaderRequestParams = `custom_field.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CustomField() + ); + client.innerApiCalls.updateCustomField = stubSimpleCall(expectedResponse); + const [response] = await client.updateCustomField(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - describe('adBreak', async () => { - const fakePath = "/rendered/path/adBreak"; + it('invokes updateCustomField without error using callback', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateCustomFieldRequest() + ); + request.customField ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateCustomFieldRequest', ['customField', 'name']); + request.customField.name = defaultValue1; + const expectedHeaderRequestParams = `custom_field.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.CustomField() + ); + client.innerApiCalls.updateCustomField = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCustomField( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICustomField|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomField with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateCustomFieldRequest() + ); + request.customField ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateCustomFieldRequest', ['customField', 'name']); + request.customField.name = defaultValue1; + const expectedHeaderRequestParams = `custom_field.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCustomField = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateCustomField(request), expectedError); + const actualRequest = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCustomField as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomField with closed client', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateCustomFieldRequest() + ); + request.customField ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateCustomFieldRequest', ['customField', 'name']); + request.customField.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateCustomField(request), expectedError); + }); + }); + + describe('batchUpdateCustomFields', () => { + it('invokes batchUpdateCustomFields without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse() + ); + client.innerApiCalls.batchUpdateCustomFields = stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateCustomFields(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateCustomFields without error using callback', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse() + ); + client.innerApiCalls.batchUpdateCustomFields = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateCustomFields( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchUpdateCustomFieldsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateCustomFields with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateCustomFields = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchUpdateCustomFields(request), expectedError); + const actualRequest = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateCustomFields with closed client', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchUpdateCustomFields(request), expectedError); + }); + }); + + describe('batchActivateCustomFields', () => { + it('invokes batchActivateCustomFields without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsResponse() + ); + client.innerApiCalls.batchActivateCustomFields = stubSimpleCall(expectedResponse); + const [response] = await client.batchActivateCustomFields(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateCustomFields without error using callback', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsResponse() + ); + client.innerApiCalls.batchActivateCustomFields = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchActivateCustomFields( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchActivateCustomFieldsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateCustomFields with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchActivateCustomFields = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchActivateCustomFields(request), expectedError); + const actualRequest = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateCustomFields with closed client', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchActivateCustomFields(request), expectedError); + }); + }); + + describe('batchDeactivateCustomFields', () => { + it('invokes batchDeactivateCustomFields without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse() + ); + client.innerApiCalls.batchDeactivateCustomFields = stubSimpleCall(expectedResponse); + const [response] = await client.batchDeactivateCustomFields(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateCustomFields without error using callback', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse() + ); + client.innerApiCalls.batchDeactivateCustomFields = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeactivateCustomFields( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchDeactivateCustomFieldsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateCustomFields with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeactivateCustomFields = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchDeactivateCustomFields(request), expectedError); + const actualRequest = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateCustomFields with closed client', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchDeactivateCustomFields(request), expectedError); + }); + }); + + describe('listCustomFields', () => { + it('invokes listCustomFields without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + ]; + client.innerApiCalls.listCustomFields = stubSimpleCall(expectedResponse); + const [response] = await client.listCustomFields(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomFields without error using callback', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + ]; + client.innerApiCalls.listCustomFields = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCustomFields( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ICustomField[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomFields with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCustomFields = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCustomFields(request), expectedError); + const actualRequest = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCustomFields as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomFieldsStream without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + ]; + client.descriptors.page.listCustomFields.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCustomFieldsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CustomField[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CustomField) => { + 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.listCustomFields.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCustomFields, request)); + assert( + (client.descriptors.page.listCustomFields.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCustomFieldsStream with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomFields.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCustomFieldsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.CustomField[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.CustomField) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCustomFields.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCustomFields, request)); + assert( + (client.descriptors.page.listCustomFields.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomFields without error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + generateSampleMessage(new protos.google.ads.admanager.v1.CustomField()), + ]; + client.descriptors.page.listCustomFields.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ICustomField[] = []; + const iterable = client.listCustomFieldsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomFields with error', async () => { + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListCustomFieldsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListCustomFieldsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomFields.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCustomFieldsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ICustomField[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCustomFields.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; const expectedParameters = { network_code: "networkCodeValue", - asset_key: "assetKeyValue", - ad_break: "adBreakValue", + contact: "contactValue", }; const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.adBreakPathTemplate.render = + client.pathTemplates.contactPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.adBreakPathTemplate.match = + client.pathTemplates.contactPathTemplate.match = sinon.stub().returns(expectedParameters); - it('adBreakPath', () => { - const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromAdBreakName', () => { - const result = client.matchNetworkCodeFromAdBreakName(fakePath); + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetKeyFromAdBreakName', () => { - const result = client.matchAssetKeyFromAdBreakName(fakePath); - assert.strictEqual(result, "assetKeyValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchAdBreakFromAdBreakName', () => { - const result = client.matchAdBreakFromAdBreakName(fakePath); - assert.strictEqual(result, "adBreakValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('adUnit', async () => { - const fakePath = "/rendered/path/adUnit"; + describe('content', async () => { + const fakePath = "/rendered/path/content"; const expectedParameters = { network_code: "networkCodeValue", - ad_unit: "adUnitValue", + content: "contentValue", }; const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.adUnitPathTemplate.render = + client.pathTemplates.contentPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.adUnitPathTemplate.match = + client.pathTemplates.contentPathTemplate.match = sinon.stub().returns(expectedParameters); - it('adUnitPath', () => { - const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromAdUnitName', () => { - const result = client.matchNetworkCodeFromAdUnitName(fakePath); + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchAdUnitFromAdUnitName', () => { - const result = client.matchAdUnitFromAdUnitName(fakePath); - assert.strictEqual(result, "adUnitValue"); - assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('bandwidthGroup', async () => { - const fakePath = "/rendered/path/bandwidthGroup"; + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; const expectedParameters = { network_code: "networkCodeValue", - bandwidth_group: "bandwidthGroupValue", + content_bundle: "contentBundleValue", }; const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.bandwidthGroupPathTemplate.render = + client.pathTemplates.contentBundlePathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.bandwidthGroupPathTemplate.match = + client.pathTemplates.contentBundlePathTemplate.match = sinon.stub().returns(expectedParameters); - it('bandwidthGroupPath', () => { - const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromBandwidthGroupName', () => { - const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchBandwidthGroupFromBandwidthGroupName', () => { - const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); - assert.strictEqual(result, "bandwidthGroupValue"); - assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('company', async () => { - const fakePath = "/rendered/path/company"; + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; const expectedParameters = { network_code: "networkCodeValue", - company: "companyValue", + content_label: "contentLabelValue", }; const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.companyPathTemplate.render = + client.pathTemplates.contentLabelPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.companyPathTemplate.match = + client.pathTemplates.contentLabelPathTemplate.match = sinon.stub().returns(expectedParameters); - it('companyPath', () => { - const result = client.companyPath("networkCodeValue", "companyValue"); + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromCompanyName', () => { - const result = client.matchNetworkCodeFromCompanyName(fakePath); + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchCompanyFromCompanyName', () => { - const result = client.matchCompanyFromCompanyName(fakePath); - assert.strictEqual(result, "companyValue"); - assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('contact', async () => { - const fakePath = "/rendered/path/contact"; + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; const expectedParameters = { network_code: "networkCodeValue", - contact: "contactValue", + creative_template: "creativeTemplateValue", }; const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.contactPathTemplate.render = + client.pathTemplates.creativeTemplatePathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.contactPathTemplate.match = + client.pathTemplates.creativeTemplatePathTemplate.match = sinon.stub().returns(expectedParameters); - it('contactPath', () => { - const result = client.contactPath("networkCodeValue", "contactValue"); + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromContactName', () => { - const result = client.matchNetworkCodeFromContactName(fakePath); + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchContactFromContactName', () => { - const result = client.matchContactFromContactName(fakePath); - assert.strictEqual(result, "contactValue"); - assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -937,6 +2015,44 @@ describe('v1.CustomFieldServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +2091,44 @@ describe('v1.CustomFieldServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +2281,120 @@ describe('v1.CustomFieldServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2767,44 @@ describe('v1.CustomFieldServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2918,43 @@ describe('v1.CustomFieldServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new customfieldserviceModule.v1.CustomFieldServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts index 84a6f0964a55..0643d7df4881 100644 --- a/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.CustomTargetingKeyServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new customtargetingkeyserviceModule.v1.CustomTargetingKeyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts index 8e7d9ec67088..16007ed786a7 100644 --- a/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.CustomTargetingValueServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new customtargetingvalueserviceModule.v1.CustomTargetingValueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_device_capability_service_v1.ts b/packages/google-ads-admanager/test/gapic_device_capability_service_v1.ts new file mode 100644 index 000000000000..b8dc7c006d87 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_device_capability_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as devicecapabilityserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DeviceCapabilityServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceCapabilityServiceStub, undefined); + await client.initialize(); + assert(client.deviceCapabilityServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.deviceCapabilityServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceCapabilityServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getDeviceCapability', () => { + it('invokes getDeviceCapability without error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceCapabilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceCapabilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.DeviceCapability() + ); + client.innerApiCalls.getDeviceCapability = stubSimpleCall(expectedResponse); + const [response] = await client.getDeviceCapability(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceCapability without error using callback', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceCapabilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceCapabilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.DeviceCapability() + ); + client.innerApiCalls.getDeviceCapability = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeviceCapability( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IDeviceCapability|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceCapability with error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceCapabilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceCapabilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeviceCapability = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDeviceCapability(request), expectedError); + const actualRequest = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceCapability as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceCapability with closed client', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceCapabilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceCapabilityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDeviceCapability(request), expectedError); + }); + }); + + describe('listDeviceCapabilities', () => { + it('invokes listDeviceCapabilities without error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + ]; + client.innerApiCalls.listDeviceCapabilities = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceCapabilities(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceCapabilities without error using callback', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + ]; + client.innerApiCalls.listDeviceCapabilities = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeviceCapabilities( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IDeviceCapability[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceCapabilities with error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceCapabilities = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDeviceCapabilities(request), expectedError); + const actualRequest = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceCapabilities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceCapabilitiesStream without error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + ]; + client.descriptors.page.listDeviceCapabilities.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDeviceCapabilitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.DeviceCapability[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.DeviceCapability) => { + 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.listDeviceCapabilities.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceCapabilities, request)); + assert( + (client.descriptors.page.listDeviceCapabilities.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDeviceCapabilitiesStream with error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceCapabilities.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeviceCapabilitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.DeviceCapability[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.DeviceCapability) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDeviceCapabilities.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceCapabilities, request)); + assert( + (client.descriptors.page.listDeviceCapabilities.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeviceCapabilities without error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceCapability()), + ]; + client.descriptors.page.listDeviceCapabilities.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IDeviceCapability[] = []; + const iterable = client.listDeviceCapabilitiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceCapabilities.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeviceCapabilities.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeviceCapabilities with error', async () => { + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceCapabilitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceCapabilitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceCapabilities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeviceCapabilitiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IDeviceCapability[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceCapabilities.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeviceCapabilities.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new devicecapabilityserviceModule.v1.DeviceCapabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_device_category_service_v1.ts b/packages/google-ads-admanager/test/gapic_device_category_service_v1.ts index f2ab7c395092..6a13edfc2c33 100644 --- a/packages/google-ads-admanager/test/gapic_device_category_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_device_category_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.DeviceCategoryServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.DeviceCategoryServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new devicecategoryserviceModule.v1.DeviceCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_device_manufacturer_service_v1.ts b/packages/google-ads-admanager/test/gapic_device_manufacturer_service_v1.ts new file mode 100644 index 000000000000..cc514be5c155 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_device_manufacturer_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as devicemanufacturerserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DeviceManufacturerServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManufacturerServiceStub, undefined); + await client.initialize(); + assert(client.deviceManufacturerServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.deviceManufacturerServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.deviceManufacturerServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getDeviceManufacturer', () => { + it('invokes getDeviceManufacturer without error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceManufacturerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceManufacturerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.DeviceManufacturer() + ); + client.innerApiCalls.getDeviceManufacturer = stubSimpleCall(expectedResponse); + const [response] = await client.getDeviceManufacturer(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceManufacturer without error using callback', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceManufacturerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceManufacturerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.DeviceManufacturer() + ); + client.innerApiCalls.getDeviceManufacturer = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeviceManufacturer( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IDeviceManufacturer|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceManufacturer with error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceManufacturerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceManufacturerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeviceManufacturer = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDeviceManufacturer(request), expectedError); + const actualRequest = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeviceManufacturer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeviceManufacturer with closed client', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetDeviceManufacturerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetDeviceManufacturerRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDeviceManufacturer(request), expectedError); + }); + }); + + describe('listDeviceManufacturers', () => { + it('invokes listDeviceManufacturers without error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + ]; + client.innerApiCalls.listDeviceManufacturers = stubSimpleCall(expectedResponse); + const [response] = await client.listDeviceManufacturers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceManufacturers without error using callback', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + ]; + client.innerApiCalls.listDeviceManufacturers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeviceManufacturers( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IDeviceManufacturer[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceManufacturers with error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeviceManufacturers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDeviceManufacturers(request), expectedError); + const actualRequest = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeviceManufacturers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeviceManufacturersStream without error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + ]; + client.descriptors.page.listDeviceManufacturers.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDeviceManufacturersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.DeviceManufacturer[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.DeviceManufacturer) => { + 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.listDeviceManufacturers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceManufacturers, request)); + assert( + (client.descriptors.page.listDeviceManufacturers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDeviceManufacturersStream with error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceManufacturers.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeviceManufacturersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.DeviceManufacturer[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.DeviceManufacturer) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDeviceManufacturers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeviceManufacturers, request)); + assert( + (client.descriptors.page.listDeviceManufacturers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeviceManufacturers without error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + generateSampleMessage(new protos.google.ads.admanager.v1.DeviceManufacturer()), + ]; + client.descriptors.page.listDeviceManufacturers.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IDeviceManufacturer[] = []; + const iterable = client.listDeviceManufacturersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceManufacturers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeviceManufacturers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeviceManufacturers with error', async () => { + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListDeviceManufacturersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListDeviceManufacturersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeviceManufacturers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeviceManufacturersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IDeviceManufacturer[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeviceManufacturers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeviceManufacturers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new devicemanufacturerserviceModule.v1.DeviceManufacturerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts b/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts index 348876044dee..e096aa4fac27 100644 --- a/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts @@ -1107,6 +1107,52 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -1145,6 +1191,82 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -1183,6 +1305,158 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1259,6 +1533,158 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1373,6 +1799,44 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1411,6 +1875,44 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1563,6 +2065,120 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1935,6 +2551,44 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -2048,5 +2702,43 @@ describe('v1.EntitySignalsMappingServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new entitysignalsmappingserviceModule.v1.EntitySignalsMappingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_geo_target_service_v1.ts b/packages/google-ads-admanager/test/gapic_geo_target_service_v1.ts index 7358853950e2..001a45ed09b0 100644 --- a/packages/google-ads-admanager/test/gapic_geo_target_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_geo_target_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.GeoTargetServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.GeoTargetServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new geotargetserviceModule.v1.GeoTargetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_mobile_carrier_service_v1.ts b/packages/google-ads-admanager/test/gapic_mobile_carrier_service_v1.ts new file mode 100644 index 000000000000..9f65f1392996 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_mobile_carrier_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as mobilecarrierserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MobileCarrierServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = mobilecarrierserviceModule.v1.MobileCarrierServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = mobilecarrierserviceModule.v1.MobileCarrierServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = mobilecarrierserviceModule.v1.MobileCarrierServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileCarrierServiceStub, undefined); + await client.initialize(); + assert(client.mobileCarrierServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.mobileCarrierServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileCarrierServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getMobileCarrier', () => { + it('invokes getMobileCarrier without error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileCarrierRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileCarrierRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileCarrier() + ); + client.innerApiCalls.getMobileCarrier = stubSimpleCall(expectedResponse); + const [response] = await client.getMobileCarrier(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileCarrier without error using callback', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileCarrierRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileCarrierRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileCarrier() + ); + client.innerApiCalls.getMobileCarrier = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMobileCarrier( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileCarrier|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileCarrier with error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileCarrierRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileCarrierRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMobileCarrier = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMobileCarrier(request), expectedError); + const actualRequest = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileCarrier as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileCarrier with closed client', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileCarrierRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileCarrierRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMobileCarrier(request), expectedError); + }); + }); + + describe('listMobileCarriers', () => { + it('invokes listMobileCarriers without error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + ]; + client.innerApiCalls.listMobileCarriers = stubSimpleCall(expectedResponse); + const [response] = await client.listMobileCarriers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileCarriers without error using callback', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + ]; + client.innerApiCalls.listMobileCarriers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMobileCarriers( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileCarrier[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileCarriers with error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMobileCarriers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMobileCarriers(request), expectedError); + const actualRequest = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileCarriers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileCarriersStream without error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + ]; + client.descriptors.page.listMobileCarriers.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMobileCarriersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileCarrier[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileCarrier) => { + 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.listMobileCarriers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileCarriers, request)); + assert( + (client.descriptors.page.listMobileCarriers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMobileCarriersStream with error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileCarriers.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMobileCarriersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileCarrier[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileCarrier) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMobileCarriers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileCarriers, request)); + assert( + (client.descriptors.page.listMobileCarriers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileCarriers without error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileCarrier()), + ]; + client.descriptors.page.listMobileCarriers.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IMobileCarrier[] = []; + const iterable = client.listMobileCarriersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMobileCarriers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileCarriers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileCarriers with error', async () => { + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileCarriersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileCarriersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileCarriers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMobileCarriersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IMobileCarrier[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMobileCarriers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileCarriers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new mobilecarrierserviceModule.v1.MobileCarrierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_mobile_device_service_v1.ts b/packages/google-ads-admanager/test/gapic_mobile_device_service_v1.ts new file mode 100644 index 000000000000..ef5bc01be824 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_mobile_device_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as mobiledeviceserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MobileDeviceServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = mobiledeviceserviceModule.v1.MobileDeviceServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = mobiledeviceserviceModule.v1.MobileDeviceServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = mobiledeviceserviceModule.v1.MobileDeviceServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileDeviceServiceStub, undefined); + await client.initialize(); + assert(client.mobileDeviceServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.mobileDeviceServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileDeviceServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getMobileDevice', () => { + it('invokes getMobileDevice without error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileDevice() + ); + client.innerApiCalls.getMobileDevice = stubSimpleCall(expectedResponse); + const [response] = await client.getMobileDevice(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDevice without error using callback', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileDevice() + ); + client.innerApiCalls.getMobileDevice = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMobileDevice( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileDevice|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDevice with error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMobileDevice = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMobileDevice(request), expectedError); + const actualRequest = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDevice as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDevice with closed client', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMobileDevice(request), expectedError); + }); + }); + + describe('listMobileDevices', () => { + it('invokes listMobileDevices without error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + ]; + client.innerApiCalls.listMobileDevices = stubSimpleCall(expectedResponse); + const [response] = await client.listMobileDevices(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDevices without error using callback', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + ]; + client.innerApiCalls.listMobileDevices = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMobileDevices( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileDevice[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDevices with error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMobileDevices = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMobileDevices(request), expectedError); + const actualRequest = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDevices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDevicesStream without error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + ]; + client.descriptors.page.listMobileDevices.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMobileDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileDevice[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileDevice) => { + 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.listMobileDevices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileDevices, request)); + assert( + (client.descriptors.page.listMobileDevices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMobileDevicesStream with error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileDevices.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMobileDevicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileDevice[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileDevice) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMobileDevices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileDevices, request)); + assert( + (client.descriptors.page.listMobileDevices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileDevices without error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDevice()), + ]; + client.descriptors.page.listMobileDevices.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IMobileDevice[] = []; + const iterable = client.listMobileDevicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMobileDevices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileDevices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileDevices with error', async () => { + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDevicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDevicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileDevices.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMobileDevicesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IMobileDevice[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMobileDevices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileDevices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new mobiledeviceserviceModule.v1.MobileDeviceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_mobile_device_submodel_service_v1.ts b/packages/google-ads-admanager/test/gapic_mobile_device_submodel_service_v1.ts new file mode 100644 index 000000000000..c49b4232e247 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_mobile_device_submodel_service_v1.ts @@ -0,0 +1,2308 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as mobiledevicesubmodelserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MobileDeviceSubmodelServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileDeviceSubmodelServiceStub, undefined); + await client.initialize(); + assert(client.mobileDeviceSubmodelServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.mobileDeviceSubmodelServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.mobileDeviceSubmodelServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getMobileDeviceSubmodel', () => { + it('invokes getMobileDeviceSubmodel without error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileDeviceSubmodel() + ); + client.innerApiCalls.getMobileDeviceSubmodel = stubSimpleCall(expectedResponse); + const [response] = await client.getMobileDeviceSubmodel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDeviceSubmodel without error using callback', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.MobileDeviceSubmodel() + ); + client.innerApiCalls.getMobileDeviceSubmodel = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMobileDeviceSubmodel( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileDeviceSubmodel|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDeviceSubmodel with error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMobileDeviceSubmodel = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMobileDeviceSubmodel(request), expectedError); + const actualRequest = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMobileDeviceSubmodel as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMobileDeviceSubmodel with closed client', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetMobileDeviceSubmodelRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMobileDeviceSubmodel(request), expectedError); + }); + }); + + describe('listMobileDeviceSubmodels', () => { + it('invokes listMobileDeviceSubmodels without error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + ]; + client.innerApiCalls.listMobileDeviceSubmodels = stubSimpleCall(expectedResponse); + const [response] = await client.listMobileDeviceSubmodels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDeviceSubmodels without error using callback', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + ]; + client.innerApiCalls.listMobileDeviceSubmodels = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMobileDeviceSubmodels( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IMobileDeviceSubmodel[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDeviceSubmodels with error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMobileDeviceSubmodels = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMobileDeviceSubmodels(request), expectedError); + const actualRequest = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMobileDeviceSubmodels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMobileDeviceSubmodelsStream without error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + ]; + client.descriptors.page.listMobileDeviceSubmodels.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMobileDeviceSubmodelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileDeviceSubmodel[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileDeviceSubmodel) => { + 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.listMobileDeviceSubmodels.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileDeviceSubmodels, request)); + assert( + (client.descriptors.page.listMobileDeviceSubmodels.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMobileDeviceSubmodelsStream with error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileDeviceSubmodels.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMobileDeviceSubmodelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.MobileDeviceSubmodel[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.MobileDeviceSubmodel) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMobileDeviceSubmodels.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMobileDeviceSubmodels, request)); + assert( + (client.descriptors.page.listMobileDeviceSubmodels.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileDeviceSubmodels without error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + generateSampleMessage(new protos.google.ads.admanager.v1.MobileDeviceSubmodel()), + ]; + client.descriptors.page.listMobileDeviceSubmodels.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IMobileDeviceSubmodel[] = []; + const iterable = client.listMobileDeviceSubmodelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMobileDeviceSubmodels.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileDeviceSubmodels.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMobileDeviceSubmodels with error', async () => { + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMobileDeviceSubmodels.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMobileDeviceSubmodelsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IMobileDeviceSubmodel[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMobileDeviceSubmodels.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMobileDeviceSubmodels.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new mobiledevicesubmodelserviceModule.v1.MobileDeviceSubmodelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_network_service_v1.ts b/packages/google-ads-admanager/test/gapic_network_service_v1.ts index 7fbc9ff8408f..4121a7eb77e3 100644 --- a/packages/google-ads-admanager/test/gapic_network_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_network_service_v1.ts @@ -454,6 +454,52 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -492,6 +538,82 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -530,6 +652,158 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -606,6 +880,158 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -720,6 +1146,44 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -758,6 +1222,44 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -910,6 +1412,120 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1282,6 +1898,44 @@ describe('v1.NetworkServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1395,5 +2049,43 @@ describe('v1.NetworkServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new networkserviceModule.v1.NetworkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_operating_system_service_v1.ts b/packages/google-ads-admanager/test/gapic_operating_system_service_v1.ts index e1357e7f1f1e..0c0256c28a45 100644 --- a/packages/google-ads-admanager/test/gapic_operating_system_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_operating_system_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.OperatingSystemServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.OperatingSystemServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new operatingsystemserviceModule.v1.OperatingSystemServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_operating_system_version_service_v1.ts b/packages/google-ads-admanager/test/gapic_operating_system_version_service_v1.ts index c22cf95f8a1f..d757a02b2402 100644 --- a/packages/google-ads-admanager/test/gapic_operating_system_version_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_operating_system_version_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.OperatingSystemVersionServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.OperatingSystemVersionServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new operatingsystemversionserviceModule.v1.OperatingSystemVersionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_order_service_v1.ts b/packages/google-ads-admanager/test/gapic_order_service_v1.ts index 1cc17309f405..944dac4bb1f9 100644 --- a/packages/google-ads-admanager/test/gapic_order_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_order_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.OrderServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.OrderServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new orderserviceModule.v1.OrderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_placement_service_v1.ts b/packages/google-ads-admanager/test/gapic_placement_service_v1.ts index c62c8086a099..d8700c72166e 100644 --- a/packages/google-ads-admanager/test/gapic_placement_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_placement_service_v1.ts @@ -378,57 +378,55 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('listPlacements', () => { - it('invokes listPlacements without error', async () => { + describe('createPlacement', () => { + it('invokes createPlacement without error', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.CreatePlacementRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreatePlacementRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - ]; - client.innerApiCalls.listPlacements = stubSimpleCall(expectedResponse); - const [response] = await client.listPlacements(request); + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Placement() + ); + client.innerApiCalls.createPlacement = stubSimpleCall(expectedResponse); + const [response] = await client.createPlacement(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + const actualRequest = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPlacements without error using callback', async () => { + it('invokes createPlacement without error using callback', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.CreatePlacementRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreatePlacementRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - ]; - client.innerApiCalls.listPlacements = stubSimpleCallWithCallback(expectedResponse); + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Placement() + ); + client.innerApiCalls.createPlacement = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listPlacements( + client.createPlacement( request, - (err?: Error|null, result?: protos.google.ads.admanager.v1.IPlacement[]|null) => { + (err?: Error|null, result?: protos.google.ads.admanager.v1.IPlacement|null) => { if (err) { reject(err); } else { @@ -438,387 +436,1575 @@ describe('v1.PlacementServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + const actualRequest = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPlacements with error', async () => { + it('invokes createPlacement with error', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.CreatePlacementRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreatePlacementRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.listPlacements = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPlacements(request), expectedError); - const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + client.innerApiCalls.createPlacement = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createPlacement(request), expectedError); + const actualRequest = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.createPlacement as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPlacementsStream without error', async () => { + it('invokes createPlacement with closed client', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.CreatePlacementRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.CreatePlacementRequest', ['parent']); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - ]; - client.descriptors.page.listPlacements.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPlacementsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.Placement[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.Placement) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createPlacement(request), expectedError); + }); + }); + + describe('updatePlacement', () => { + it('invokes updatePlacement without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listPlacements.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPlacements, request)); - assert( - (client.descriptors.page.listPlacements.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdatePlacementRequest() + ); + request.placement ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdatePlacementRequest', ['placement', 'name']); + request.placement.name = defaultValue1; + const expectedHeaderRequestParams = `placement.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Placement() ); + client.innerApiCalls.updatePlacement = stubSimpleCall(expectedResponse); + const [response] = await client.updatePlacement(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPlacementsStream with error', async () => { + it('invokes updatePlacement without error using callback', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.UpdatePlacementRequest() ); + request.placement ??= {}; const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPlacements.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPlacementsStream(request); + getTypeDefaultValue('.google.ads.admanager.v1.UpdatePlacementRequest', ['placement', 'name']); + request.placement.name = defaultValue1; + const expectedHeaderRequestParams = `placement.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Placement() + ); + client.innerApiCalls.updatePlacement = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.Placement[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.Placement) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); + client.updatePlacement( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IPlacement|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPlacements.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPlacements, request)); - assert( - (client.descriptors.page.listPlacements.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePlacement with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdatePlacementRequest() ); + request.placement ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdatePlacementRequest', ['placement', 'name']); + request.placement.name = defaultValue1; + const expectedHeaderRequestParams = `placement.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePlacement = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updatePlacement(request), expectedError); + const actualRequest = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlacement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('uses async iteration with listPlacements without error', async () => { + it('invokes updatePlacement with closed client', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ auth: googleAuth, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.UpdatePlacementRequest() ); + request.placement ??= {}; const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.UpdatePlacementRequest', ['placement', 'name']); + request.placement.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updatePlacement(request), expectedError); + }); + }); + + describe('batchCreatePlacements', () => { + it('invokes batchCreatePlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreatePlacementsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), - ]; - client.descriptors.page.listPlacements.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.ads.admanager.v1.IPlacement[] = []; - const iterable = client.listPlacementsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPlacements.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPlacements.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreatePlacementsResponse() ); + client.innerApiCalls.batchCreatePlacements = stubSimpleCall(expectedResponse); + const [response] = await client.batchCreatePlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('uses async iteration with listPlacements with error', async () => { + it('invokes batchCreatePlacements without error using callback', async () => { const client = new placementserviceModule.v1.PlacementServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + auth: googleAuth, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.ads.admanager.v1.ListPlacementsRequest() + new protos.google.ads.admanager.v1.BatchCreatePlacementsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreatePlacementsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPlacements.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPlacementsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.ads.admanager.v1.IPlacement[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPlacements.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPlacements.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreatePlacementsResponse() ); + client.innerApiCalls.batchCreatePlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreatePlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchCreatePlacementsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - }); - describe('Path templates', () => { - - describe('adBreak', async () => { - const fakePath = "/rendered/path/adBreak"; + it('invokes batchCreatePlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreatePlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchCreatePlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreatePlacements with closed client', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchCreatePlacements(request), expectedError); + }); + }); + + describe('batchUpdatePlacements', () => { + it('invokes batchUpdatePlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsResponse() + ); + client.innerApiCalls.batchUpdatePlacements = stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdatePlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdatePlacements without error using callback', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsResponse() + ); + client.innerApiCalls.batchUpdatePlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdatePlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchUpdatePlacementsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdatePlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdatePlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchUpdatePlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdatePlacements with closed client', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchUpdatePlacements(request), expectedError); + }); + }); + + describe('batchActivatePlacements', () => { + it('invokes batchActivatePlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsResponse() + ); + client.innerApiCalls.batchActivatePlacements = stubSimpleCall(expectedResponse); + const [response] = await client.batchActivatePlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivatePlacements without error using callback', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsResponse() + ); + client.innerApiCalls.batchActivatePlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchActivatePlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchActivatePlacementsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivatePlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchActivatePlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchActivatePlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivatePlacements with closed client', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchActivatePlacements(request), expectedError); + }); + }); + + describe('batchDeactivatePlacements', () => { + it('invokes batchDeactivatePlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsResponse() + ); + client.innerApiCalls.batchDeactivatePlacements = stubSimpleCall(expectedResponse); + const [response] = await client.batchDeactivatePlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivatePlacements without error using callback', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsResponse() + ); + client.innerApiCalls.batchDeactivatePlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeactivatePlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchDeactivatePlacementsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivatePlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeactivatePlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchDeactivatePlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivatePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivatePlacements with closed client', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivatePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivatePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchDeactivatePlacements(request), expectedError); + }); + }); + + describe('batchArchivePlacements', () => { + it('invokes batchArchivePlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchArchivePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsResponse() + ); + client.innerApiCalls.batchArchivePlacements = stubSimpleCall(expectedResponse); + const [response] = await client.batchArchivePlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchArchivePlacements without error using callback', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchArchivePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsResponse() + ); + client.innerApiCalls.batchArchivePlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchArchivePlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchArchivePlacementsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchArchivePlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchArchivePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchArchivePlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchArchivePlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchArchivePlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchArchivePlacements with closed client', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchArchivePlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchArchivePlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchArchivePlacements(request), expectedError); + }); + }); + + describe('listPlacements', () => { + it('invokes listPlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + ]; + client.innerApiCalls.listPlacements = stubSimpleCall(expectedResponse); + const [response] = await client.listPlacements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlacements without error using callback', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + ]; + client.innerApiCalls.listPlacements = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPlacements( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IPlacement[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPlacements = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPlacements(request), expectedError); + const actualRequest = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlacements as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlacementsStream without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + ]; + client.descriptors.page.listPlacements.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPlacementsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Placement[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Placement) => { + 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.listPlacements.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlacements, request)); + assert( + (client.descriptors.page.listPlacements.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPlacementsStream with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlacements.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPlacementsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Placement[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Placement) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPlacements.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlacements, request)); + assert( + (client.descriptors.page.listPlacements.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlacements without error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + generateSampleMessage(new protos.google.ads.admanager.v1.Placement()), + ]; + client.descriptors.page.listPlacements.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.IPlacement[] = []; + const iterable = client.listPlacementsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPlacements.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlacements.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlacements with error', async () => { + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListPlacementsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListPlacementsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlacements.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPlacementsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.IPlacement[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPlacements.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlacements.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; const expectedParameters = { network_code: "networkCodeValue", - asset_key: "assetKeyValue", - ad_break: "adBreakValue", + contact: "contactValue", }; const client = new placementserviceModule.v1.PlacementServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.adBreakPathTemplate.render = + client.pathTemplates.contactPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.adBreakPathTemplate.match = + client.pathTemplates.contactPathTemplate.match = sinon.stub().returns(expectedParameters); - it('adBreakPath', () => { - const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromAdBreakName', () => { - const result = client.matchNetworkCodeFromAdBreakName(fakePath); + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetKeyFromAdBreakName', () => { - const result = client.matchAssetKeyFromAdBreakName(fakePath); - assert.strictEqual(result, "assetKeyValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchAdBreakFromAdBreakName', () => { - const result = client.matchAdBreakFromAdBreakName(fakePath); - assert.strictEqual(result, "adBreakValue"); - assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('adUnit', async () => { - const fakePath = "/rendered/path/adUnit"; + describe('content', async () => { + const fakePath = "/rendered/path/content"; const expectedParameters = { network_code: "networkCodeValue", - ad_unit: "adUnitValue", + content: "contentValue", }; const client = new placementserviceModule.v1.PlacementServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.adUnitPathTemplate.render = + client.pathTemplates.contentPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.adUnitPathTemplate.match = + client.pathTemplates.contentPathTemplate.match = sinon.stub().returns(expectedParameters); - it('adUnitPath', () => { - const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromAdUnitName', () => { - const result = client.matchNetworkCodeFromAdUnitName(fakePath); + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchAdUnitFromAdUnitName', () => { - const result = client.matchAdUnitFromAdUnitName(fakePath); - assert.strictEqual(result, "adUnitValue"); - assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('bandwidthGroup', async () => { - const fakePath = "/rendered/path/bandwidthGroup"; + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; const expectedParameters = { network_code: "networkCodeValue", - bandwidth_group: "bandwidthGroupValue", + content_bundle: "contentBundleValue", }; const client = new placementserviceModule.v1.PlacementServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.bandwidthGroupPathTemplate.render = + client.pathTemplates.contentBundlePathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.bandwidthGroupPathTemplate.match = + client.pathTemplates.contentBundlePathTemplate.match = sinon.stub().returns(expectedParameters); - it('bandwidthGroupPath', () => { - const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromBandwidthGroupName', () => { - const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchBandwidthGroupFromBandwidthGroupName', () => { - const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); - assert.strictEqual(result, "bandwidthGroupValue"); - assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('company', async () => { - const fakePath = "/rendered/path/company"; + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; const expectedParameters = { network_code: "networkCodeValue", - company: "companyValue", + content_label: "contentLabelValue", }; const client = new placementserviceModule.v1.PlacementServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.companyPathTemplate.render = + client.pathTemplates.contentLabelPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.companyPathTemplate.match = + client.pathTemplates.contentLabelPathTemplate.match = sinon.stub().returns(expectedParameters); - it('companyPath', () => { - const result = client.companyPath("networkCodeValue", "companyValue"); + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromCompanyName', () => { - const result = client.matchNetworkCodeFromCompanyName(fakePath); + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchCompanyFromCompanyName', () => { - const result = client.matchCompanyFromCompanyName(fakePath); - assert.strictEqual(result, "companyValue"); - assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('contact', async () => { - const fakePath = "/rendered/path/contact"; + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; const expectedParameters = { network_code: "networkCodeValue", - contact: "contactValue", + creative_template: "creativeTemplateValue", }; const client = new placementserviceModule.v1.PlacementServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.contactPathTemplate.render = + client.pathTemplates.creativeTemplatePathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.contactPathTemplate.match = + client.pathTemplates.creativeTemplatePathTemplate.match = sinon.stub().returns(expectedParameters); - it('contactPath', () => { - const result = client.contactPath("networkCodeValue", "contactValue"); + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchNetworkCodeFromContactName', () => { - const result = client.matchNetworkCodeFromContactName(fakePath); + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); assert.strictEqual(result, "networkCodeValue"); - assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchContactFromContactName', () => { - const result = client.matchContactFromContactName(fakePath); - assert.strictEqual(result, "contactValue"); - assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -937,6 +2123,44 @@ describe('v1.PlacementServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +2199,44 @@ describe('v1.PlacementServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +2389,120 @@ describe('v1.PlacementServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2875,44 @@ describe('v1.PlacementServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +3026,43 @@ describe('v1.PlacementServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new placementserviceModule.v1.PlacementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_private_auction_deal_service_v1.ts b/packages/google-ads-admanager/test/gapic_private_auction_deal_service_v1.ts index c9f50ff6d13c..c262a9f50a38 100644 --- a/packages/google-ads-admanager/test/gapic_private_auction_deal_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_private_auction_deal_service_v1.ts @@ -891,6 +891,52 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -929,6 +975,82 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -967,6 +1089,158 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1043,6 +1317,158 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1157,6 +1583,44 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1195,6 +1659,44 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1347,6 +1849,120 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1719,6 +2335,44 @@ describe('v1.PrivateAuctionDealServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1832,5 +2486,43 @@ describe('v1.PrivateAuctionDealServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new privateauctiondealserviceModule.v1.PrivateAuctionDealServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_private_auction_service_v1.ts b/packages/google-ads-admanager/test/gapic_private_auction_service_v1.ts index 4ee4cd62c7a9..231b0ade2665 100644 --- a/packages/google-ads-admanager/test/gapic_private_auction_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_private_auction_service_v1.ts @@ -891,6 +891,52 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -929,6 +975,82 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -967,6 +1089,158 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1043,6 +1317,158 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1157,6 +1583,44 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1195,6 +1659,44 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1347,6 +1849,120 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1719,6 +2335,44 @@ describe('v1.PrivateAuctionServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1832,5 +2486,43 @@ describe('v1.PrivateAuctionServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new privateauctionserviceModule.v1.PrivateAuctionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_programmatic_buyer_service_v1.ts b/packages/google-ads-admanager/test/gapic_programmatic_buyer_service_v1.ts index 4634441d23c5..bd04936efed1 100644 --- a/packages/google-ads-admanager/test/gapic_programmatic_buyer_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_programmatic_buyer_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.ProgrammaticBuyerServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new programmaticbuyerserviceModule.v1.ProgrammaticBuyerServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_report_service_v1.ts b/packages/google-ads-admanager/test/gapic_report_service_v1.ts index 683073676fb4..24e75acdfeb5 100644 --- a/packages/google-ads-admanager/test/gapic_report_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_report_service_v1.ts @@ -1027,9 +1027,9 @@ describe('v1.ReportServiceClient', () => { getTypeDefaultValue('.google.ads.admanager.v1.FetchReportResultRowsRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), ]; client.innerApiCalls.fetchReportResultRows = stubSimpleCall(expectedResponse); const [response] = await client.fetchReportResultRows(request); @@ -1055,15 +1055,15 @@ describe('v1.ReportServiceClient', () => { getTypeDefaultValue('.google.ads.admanager.v1.FetchReportResultRowsRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), ]; client.innerApiCalls.fetchReportResultRows = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.fetchReportResultRows( request, - (err?: Error|null, result?: protos.google.ads.admanager.v1.Report.DataTable.IRow[]|null) => { + (err?: Error|null, result?: protos.google.ads.admanager.v1.ReportDataTable.IRow[]|null) => { if (err) { reject(err); } else { @@ -1119,15 +1119,15 @@ describe('v1.ReportServiceClient', () => { request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), ]; client.descriptors.page.fetchReportResultRows.createStream = stubPageStreamingCall(expectedResponse); const stream = client.fetchReportResultRowsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.Report.DataTable.Row[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.Report.DataTable.Row) => { + const responses: protos.google.ads.admanager.v1.ReportDataTable.Row[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ReportDataTable.Row) => { responses.push(response); }); stream.on('end', () => { @@ -1166,8 +1166,8 @@ describe('v1.ReportServiceClient', () => { client.descriptors.page.fetchReportResultRows.createStream = stubPageStreamingCall(undefined, expectedError); const stream = client.fetchReportResultRowsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.ads.admanager.v1.Report.DataTable.Row[] = []; - stream.on('data', (response: protos.google.ads.admanager.v1.Report.DataTable.Row) => { + const responses: protos.google.ads.admanager.v1.ReportDataTable.Row[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.ReportDataTable.Row) => { responses.push(response); }); stream.on('end', () => { @@ -1202,12 +1202,12 @@ describe('v1.ReportServiceClient', () => { request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), - generateSampleMessage(new protos.google.ads.admanager.v1.Report.DataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), + generateSampleMessage(new protos.google.ads.admanager.v1.ReportDataTable.Row()), ]; client.descriptors.page.fetchReportResultRows.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.ads.admanager.v1.Report.DataTable.IRow[] = []; + const responses: protos.google.ads.admanager.v1.ReportDataTable.IRow[] = []; const iterable = client.fetchReportResultRowsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1241,7 +1241,7 @@ describe('v1.ReportServiceClient', () => { client.descriptors.page.fetchReportResultRows.asyncIterate = stubAsyncIterationCall(undefined, expectedError); const iterable = client.fetchReportResultRowsAsync(request); await assert.rejects(async () => { - const responses: protos.google.ads.admanager.v1.Report.DataTable.IRow[] = []; + const responses: protos.google.ads.admanager.v1.ReportDataTable.IRow[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1561,6 +1561,52 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -1599,6 +1645,82 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -1637,6 +1759,158 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -1713,6 +1987,158 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -1827,6 +2253,44 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -1865,6 +2329,44 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -2017,6 +2519,120 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -2389,6 +3005,44 @@ describe('v1.ReportServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -2502,5 +3156,43 @@ describe('v1.ReportServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new reportserviceModule.v1.ReportServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_role_service_v1.ts b/packages/google-ads-admanager/test/gapic_role_service_v1.ts index 9bedc737ebb2..1cc4f4c6de9c 100644 --- a/packages/google-ads-admanager/test/gapic_role_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_role_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.RoleServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.RoleServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new roleserviceModule.v1.RoleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_site_service_v1.ts b/packages/google-ads-admanager/test/gapic_site_service_v1.ts new file mode 100644 index 000000000000..49a76d1a32ff --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_site_service_v1.ts @@ -0,0 +1,2960 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as siteserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.SiteServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new siteserviceModule.v1.SiteServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new siteserviceModule.v1.SiteServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = siteserviceModule.v1.SiteServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = siteserviceModule.v1.SiteServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new siteserviceModule.v1.SiteServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new siteserviceModule.v1.SiteServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new siteserviceModule.v1.SiteServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new siteserviceModule.v1.SiteServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new siteserviceModule.v1.SiteServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = siteserviceModule.v1.SiteServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new siteserviceModule.v1.SiteServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.siteServiceStub, undefined); + await client.initialize(); + assert(client.siteServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.siteServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.siteServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getSite', () => { + it('invokes getSite without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetSiteRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.getSite = stubSimpleCall(expectedResponse); + const [response] = await client.getSite(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSite without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetSiteRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.getSite = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSite( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ISite|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSite with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetSiteRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSite = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSite(request), expectedError); + const actualRequest = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSite with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetSiteRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSite(request), expectedError); + }); + }); + + describe('createSite', () => { + it('invokes createSite without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateSiteRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.createSite = stubSimpleCall(expectedResponse); + const [response] = await client.createSite(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSite without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateSiteRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.createSite = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSite( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ISite|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSite with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateSiteRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSite = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createSite(request), expectedError); + const actualRequest = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSite with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateSiteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateSiteRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createSite(request), expectedError); + }); + }); + + describe('batchCreateSites', () => { + it('invokes batchCreateSites without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesResponse() + ); + client.innerApiCalls.batchCreateSites = stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateSites(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateSites without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesResponse() + ); + client.innerApiCalls.batchCreateSites = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateSites( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchCreateSitesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateSites with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateSites = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchCreateSites(request), expectedError); + const actualRequest = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateSites with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchCreateSites(request), expectedError); + }); + }); + + describe('updateSite', () => { + it('invokes updateSite without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateSiteRequest() + ); + request.site ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateSiteRequest', ['site', 'name']); + request.site.name = defaultValue1; + const expectedHeaderRequestParams = `site.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.updateSite = stubSimpleCall(expectedResponse); + const [response] = await client.updateSite(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSite without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateSiteRequest() + ); + request.site ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateSiteRequest', ['site', 'name']); + request.site.name = defaultValue1; + const expectedHeaderRequestParams = `site.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Site() + ); + client.innerApiCalls.updateSite = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSite( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ISite|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSite with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateSiteRequest() + ); + request.site ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateSiteRequest', ['site', 'name']); + request.site.name = defaultValue1; + const expectedHeaderRequestParams = `site.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSite = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateSite(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSite as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSite with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateSiteRequest() + ); + request.site ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateSiteRequest', ['site', 'name']); + request.site.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateSite(request), expectedError); + }); + }); + + describe('batchUpdateSites', () => { + it('invokes batchUpdateSites without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesResponse() + ); + client.innerApiCalls.batchUpdateSites = stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateSites(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateSites without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesResponse() + ); + client.innerApiCalls.batchUpdateSites = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateSites( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchUpdateSitesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateSites with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateSites = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchUpdateSites(request), expectedError); + const actualRequest = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateSites with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchUpdateSites(request), expectedError); + }); + }); + + describe('batchDeactivateSites', () => { + it('invokes batchDeactivateSites without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesResponse() + ); + client.innerApiCalls.batchDeactivateSites = stubSimpleCall(expectedResponse); + const [response] = await client.batchDeactivateSites(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateSites without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesResponse() + ); + client.innerApiCalls.batchDeactivateSites = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeactivateSites( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchDeactivateSitesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateSites with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeactivateSites = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchDeactivateSites(request), expectedError); + const actualRequest = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateSites with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchDeactivateSites(request), expectedError); + }); + }); + + describe('batchSubmitSitesForApproval', () => { + it('invokes batchSubmitSitesForApproval without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse() + ); + client.innerApiCalls.batchSubmitSitesForApproval = stubSimpleCall(expectedResponse); + const [response] = await client.batchSubmitSitesForApproval(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchSubmitSitesForApproval without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse() + ); + client.innerApiCalls.batchSubmitSitesForApproval = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchSubmitSitesForApproval( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchSubmitSitesForApprovalResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchSubmitSitesForApproval with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchSubmitSitesForApproval = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchSubmitSitesForApproval(request), expectedError); + const actualRequest = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchSubmitSitesForApproval as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchSubmitSitesForApproval with closed client', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchSubmitSitesForApproval(request), expectedError); + }); + }); + + describe('listSites', () => { + it('invokes listSites without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + ]; + client.innerApiCalls.listSites = stubSimpleCall(expectedResponse); + const [response] = await client.listSites(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSites without error using callback', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + ]; + client.innerApiCalls.listSites = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSites( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ISite[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSites with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSites = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSites(request), expectedError); + const actualRequest = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSites as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSitesStream without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + ]; + client.descriptors.page.listSites.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listSitesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Site[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Site) => { + 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.listSites.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSites, request)); + assert( + (client.descriptors.page.listSites.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSitesStream with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listSites.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listSitesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Site[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Site) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listSites.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSites, request)); + assert( + (client.descriptors.page.listSites.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSites without error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + generateSampleMessage(new protos.google.ads.admanager.v1.Site()), + ]; + client.descriptors.page.listSites.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ISite[] = []; + const iterable = client.listSitesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSites.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSites.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSites with error', async () => { + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListSitesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListSitesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listSites.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSitesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ISite[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSites.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSites.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new siteserviceModule.v1.SiteServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts b/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts index 5b6c6e041f38..8e38734ebe87 100644 --- a/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts @@ -671,6 +671,52 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -709,6 +755,82 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -747,6 +869,158 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -823,6 +1097,158 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -937,6 +1363,44 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -975,6 +1439,44 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -1127,6 +1629,120 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1499,6 +2115,44 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1612,5 +2266,43 @@ describe('v1.TaxonomyCategoryServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new taxonomycategoryserviceModule.v1.TaxonomyCategoryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-admanager/test/gapic_team_service_v1.ts b/packages/google-ads-admanager/test/gapic_team_service_v1.ts new file mode 100644 index 000000000000..ec384ad33bd8 --- /dev/null +++ b/packages/google-ads-admanager/test/gapic_team_service_v1.ts @@ -0,0 +1,2960 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it, beforeEach, afterEach} from 'mocha'; +import * as teamserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {GoogleAuth, protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.TeamServiceClient', () => { + let googleAuth: GoogleAuth; + beforeEach(() => { + googleAuth = { + getClient: sinon.stub().resolves({ + getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), + }) + } as unknown as GoogleAuth; + }); + afterEach(() => { + sinon.restore(); + }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new teamserviceModule.v1.TeamServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new teamserviceModule.v1.TeamServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = teamserviceModule.v1.TeamServiceClient.servicePath; + assert.strictEqual(servicePath, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = teamserviceModule.v1.TeamServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'admanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new teamserviceModule.v1.TeamServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new teamserviceModule.v1.TeamServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new teamserviceModule.v1.TeamServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new teamserviceModule.v1.TeamServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'admanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new teamserviceModule.v1.TeamServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = teamserviceModule.v1.TeamServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new teamserviceModule.v1.TeamServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.teamServiceStub, undefined); + await client.initialize(); + assert(client.teamServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.teamServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + assert.strictEqual(client.teamServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getTeam', () => { + it('invokes getTeam without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetTeamRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.getTeam = stubSimpleCall(expectedResponse); + const [response] = await client.getTeam(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTeam without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetTeamRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.getTeam = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTeam( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ITeam|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTeam with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetTeamRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTeam = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTeam(request), expectedError); + const actualRequest = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTeam with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.GetTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.GetTeamRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getTeam(request), expectedError); + }); + }); + + describe('createTeam', () => { + it('invokes createTeam without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateTeamRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.createTeam = stubSimpleCall(expectedResponse); + const [response] = await client.createTeam(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTeam without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateTeamRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.createTeam = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTeam( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ITeam|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTeam with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateTeamRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTeam = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createTeam(request), expectedError); + const actualRequest = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTeam with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.CreateTeamRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.CreateTeamRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createTeam(request), expectedError); + }); + }); + + describe('batchCreateTeams', () => { + it('invokes batchCreateTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsResponse() + ); + client.innerApiCalls.batchCreateTeams = stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateTeams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateTeams without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsResponse() + ); + client.innerApiCalls.batchCreateTeams = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateTeams( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchCreateTeamsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateTeams = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchCreateTeams(request), expectedError); + const actualRequest = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchCreateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateTeams with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchCreateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchCreateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchCreateTeams(request), expectedError); + }); + }); + + describe('updateTeam', () => { + it('invokes updateTeam without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateTeamRequest() + ); + request.team ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateTeamRequest', ['team', 'name']); + request.team.name = defaultValue1; + const expectedHeaderRequestParams = `team.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.updateTeam = stubSimpleCall(expectedResponse); + const [response] = await client.updateTeam(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTeam without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateTeamRequest() + ); + request.team ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateTeamRequest', ['team', 'name']); + request.team.name = defaultValue1; + const expectedHeaderRequestParams = `team.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.Team() + ); + client.innerApiCalls.updateTeam = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTeam( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ITeam|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTeam with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateTeamRequest() + ); + request.team ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateTeamRequest', ['team', 'name']); + request.team.name = defaultValue1; + const expectedHeaderRequestParams = `team.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTeam = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateTeam(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTeam as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTeam with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.UpdateTeamRequest() + ); + request.team ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.UpdateTeamRequest', ['team', 'name']); + request.team.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateTeam(request), expectedError); + }); + }); + + describe('batchUpdateTeams', () => { + it('invokes batchUpdateTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsResponse() + ); + client.innerApiCalls.batchUpdateTeams = stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateTeams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateTeams without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsResponse() + ); + client.innerApiCalls.batchUpdateTeams = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateTeams( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchUpdateTeamsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateTeams = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchUpdateTeams(request), expectedError); + const actualRequest = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchUpdateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateTeams with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchUpdateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchUpdateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchUpdateTeams(request), expectedError); + }); + }); + + describe('batchActivateTeams', () => { + it('invokes batchActivateTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsResponse() + ); + client.innerApiCalls.batchActivateTeams = stubSimpleCall(expectedResponse); + const [response] = await client.batchActivateTeams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateTeams without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsResponse() + ); + client.innerApiCalls.batchActivateTeams = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchActivateTeams( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchActivateTeamsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchActivateTeams = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchActivateTeams(request), expectedError); + const actualRequest = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchActivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchActivateTeams with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchActivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchActivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchActivateTeams(request), expectedError); + }); + }); + + describe('batchDeactivateTeams', () => { + it('invokes batchDeactivateTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsResponse() + ); + client.innerApiCalls.batchDeactivateTeams = stubSimpleCall(expectedResponse); + const [response] = await client.batchDeactivateTeams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateTeams without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsResponse() + ); + client.innerApiCalls.batchDeactivateTeams = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeactivateTeams( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.IBatchDeactivateTeamsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeactivateTeams = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchDeactivateTeams(request), expectedError); + const actualRequest = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchDeactivateTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeactivateTeams with closed client', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.BatchDeactivateTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.BatchDeactivateTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchDeactivateTeams(request), expectedError); + }); + }); + + describe('listTeams', () => { + it('invokes listTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + ]; + client.innerApiCalls.listTeams = stubSimpleCall(expectedResponse); + const [response] = await client.listTeams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTeams without error using callback', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + ]; + client.innerApiCalls.listTeams = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTeams( + request, + (err?: Error|null, result?: protos.google.ads.admanager.v1.ITeam[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTeams = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTeams(request), expectedError); + const actualRequest = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTeams as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTeamsStream without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + ]; + client.descriptors.page.listTeams.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTeamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Team[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Team) => { + 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.listTeams.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTeams, request)); + assert( + (client.descriptors.page.listTeams.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTeamsStream with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTeams.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTeamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.admanager.v1.Team[] = []; + stream.on('data', (response: protos.google.ads.admanager.v1.Team) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTeams.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTeams, request)); + assert( + (client.descriptors.page.listTeams.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTeams without error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + auth: googleAuth, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + generateSampleMessage(new protos.google.ads.admanager.v1.Team()), + ]; + client.descriptors.page.listTeams.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.admanager.v1.ITeam[] = []; + const iterable = client.listTeamsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTeams.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTeams.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTeams with error', async () => { + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.admanager.v1.ListTeamsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.admanager.v1.ListTeamsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTeams.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTeamsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.admanager.v1.ITeam[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTeams.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTeams.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('adBreak', async () => { + const fakePath = "/rendered/path/adBreak"; + const expectedParameters = { + network_code: "networkCodeValue", + asset_key: "assetKeyValue", + ad_break: "adBreakValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adBreakPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adBreakPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adBreakPath', () => { + const result = client.adBreakPath("networkCodeValue", "assetKeyValue", "adBreakValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adBreakPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdBreakName', () => { + const result = client.matchNetworkCodeFromAdBreakName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetKeyFromAdBreakName', () => { + const result = client.matchAssetKeyFromAdBreakName(fakePath); + assert.strictEqual(result, "assetKeyValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdBreakFromAdBreakName', () => { + const result = client.matchAdBreakFromAdBreakName(fakePath); + assert.strictEqual(result, "adBreakValue"); + assert((client.pathTemplates.adBreakPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('adUnit', async () => { + const fakePath = "/rendered/path/adUnit"; + const expectedParameters = { + network_code: "networkCodeValue", + ad_unit: "adUnitValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adUnitPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adUnitPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adUnitPath', () => { + const result = client.adUnitPath("networkCodeValue", "adUnitValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adUnitPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdUnitName', () => { + const result = client.matchNetworkCodeFromAdUnitName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdUnitFromAdUnitName', () => { + const result = client.matchAdUnitFromAdUnitName(fakePath); + assert.strictEqual(result, "adUnitValue"); + assert((client.pathTemplates.adUnitPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('bandwidthGroup', async () => { + const fakePath = "/rendered/path/bandwidthGroup"; + const expectedParameters = { + network_code: "networkCodeValue", + bandwidth_group: "bandwidthGroupValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bandwidthGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.bandwidthGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('bandwidthGroupPath', () => { + const result = client.bandwidthGroupPath("networkCodeValue", "bandwidthGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.bandwidthGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBandwidthGroupName', () => { + const result = client.matchNetworkCodeFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBandwidthGroupFromBandwidthGroupName', () => { + const result = client.matchBandwidthGroupFromBandwidthGroupName(fakePath); + assert.strictEqual(result, "bandwidthGroupValue"); + assert((client.pathTemplates.bandwidthGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('company', async () => { + const fakePath = "/rendered/path/company"; + const expectedParameters = { + network_code: "networkCodeValue", + company: "companyValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.companyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.companyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('companyPath', () => { + const result = client.companyPath("networkCodeValue", "companyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.companyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCompanyName', () => { + const result = client.matchNetworkCodeFromCompanyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCompanyFromCompanyName', () => { + const result = client.matchCompanyFromCompanyName(fakePath); + assert.strictEqual(result, "companyValue"); + assert((client.pathTemplates.companyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contact', async () => { + const fakePath = "/rendered/path/contact"; + const expectedParameters = { + network_code: "networkCodeValue", + contact: "contactValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contactPath', () => { + const result = client.contactPath("networkCodeValue", "contactValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contactPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContactName', () => { + const result = client.matchNetworkCodeFromContactName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContactFromContactName', () => { + const result = client.matchContactFromContactName(fakePath); + assert.strictEqual(result, "contactValue"); + assert((client.pathTemplates.contactPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customField', async () => { + const fakePath = "/rendered/path/customField"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_field: "customFieldValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customFieldPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customFieldPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customFieldPath', () => { + const result = client.customFieldPath("networkCodeValue", "customFieldValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customFieldPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomFieldName', () => { + const result = client.matchNetworkCodeFromCustomFieldName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomFieldFromCustomFieldName', () => { + const result = client.matchCustomFieldFromCustomFieldName(fakePath); + assert.strictEqual(result, "customFieldValue"); + assert((client.pathTemplates.customFieldPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingKey', async () => { + const fakePath = "/rendered/path/customTargetingKey"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_key: "customTargetingKeyValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingKeyPath', () => { + const result = client.customTargetingKeyPath("networkCodeValue", "customTargetingKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingKeyName', () => { + const result = client.matchNetworkCodeFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingKeyFromCustomTargetingKeyName', () => { + const result = client.matchCustomTargetingKeyFromCustomTargetingKeyName(fakePath); + assert.strictEqual(result, "customTargetingKeyValue"); + assert((client.pathTemplates.customTargetingKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('customTargetingValue', async () => { + const fakePath = "/rendered/path/customTargetingValue"; + const expectedParameters = { + network_code: "networkCodeValue", + custom_targeting_value: "customTargetingValueValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.customTargetingValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.customTargetingValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('customTargetingValuePath', () => { + const result = client.customTargetingValuePath("networkCodeValue", "customTargetingValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.customTargetingValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCustomTargetingValueName', () => { + const result = client.matchNetworkCodeFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCustomTargetingValueFromCustomTargetingValueName', () => { + const result = client.matchCustomTargetingValueFromCustomTargetingValueName(fakePath); + assert.strictEqual(result, "customTargetingValueValue"); + assert((client.pathTemplates.customTargetingValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceCategory', async () => { + const fakePath = "/rendered/path/deviceCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + device_category: "deviceCategoryValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCategoryPath', () => { + const result = client.deviceCategoryPath("networkCodeValue", "deviceCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCategoryName', () => { + const result = client.matchNetworkCodeFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCategoryFromDeviceCategoryName', () => { + const result = client.matchDeviceCategoryFromDeviceCategoryName(fakePath); + assert.strictEqual(result, "deviceCategoryValue"); + assert((client.pathTemplates.deviceCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entitySignalsMapping', async () => { + const fakePath = "/rendered/path/entitySignalsMapping"; + const expectedParameters = { + network_code: "networkCodeValue", + entity_signals_mapping: "entitySignalsMappingValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entitySignalsMappingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entitySignalsMappingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entitySignalsMappingPath', () => { + const result = client.entitySignalsMappingPath("networkCodeValue", "entitySignalsMappingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromEntitySignalsMappingName', () => { + const result = client.matchNetworkCodeFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntitySignalsMappingFromEntitySignalsMappingName', () => { + const result = client.matchEntitySignalsMappingFromEntitySignalsMappingName(fakePath); + assert.strictEqual(result, "entitySignalsMappingValue"); + assert((client.pathTemplates.entitySignalsMappingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('geoTarget', async () => { + const fakePath = "/rendered/path/geoTarget"; + const expectedParameters = { + network_code: "networkCodeValue", + geo_target: "geoTargetValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.geoTargetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.geoTargetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('geoTargetPath', () => { + const result = client.geoTargetPath("networkCodeValue", "geoTargetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.geoTargetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromGeoTargetName', () => { + const result = client.matchNetworkCodeFromGeoTargetName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeoTargetFromGeoTargetName', () => { + const result = client.matchGeoTargetFromGeoTargetName(fakePath); + assert.strictEqual(result, "geoTargetValue"); + assert((client.pathTemplates.geoTargetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('label', async () => { + const fakePath = "/rendered/path/label"; + const expectedParameters = { + network_code: "networkCodeValue", + label: "labelValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.labelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.labelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('labelPath', () => { + const result = client.labelPath("networkCodeValue", "labelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.labelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLabelName', () => { + const result = client.matchNetworkCodeFromLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLabelFromLabelName', () => { + const result = client.matchLabelFromLabelName(fakePath); + assert.strictEqual(result, "labelValue"); + assert((client.pathTemplates.labelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('liveStreamEvent', async () => { + const fakePath = "/rendered/path/liveStreamEvent"; + const expectedParameters = { + network_code: "networkCodeValue", + live_stream_event: "liveStreamEventValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.liveStreamEventPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.liveStreamEventPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('liveStreamEventPath', () => { + const result = client.liveStreamEventPath("networkCodeValue", "liveStreamEventValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.liveStreamEventPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromLiveStreamEventName', () => { + const result = client.matchNetworkCodeFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLiveStreamEventFromLiveStreamEventName', () => { + const result = client.matchLiveStreamEventFromLiveStreamEventName(fakePath); + assert.strictEqual(result, "liveStreamEventValue"); + assert((client.pathTemplates.liveStreamEventPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('network', async () => { + const fakePath = "/rendered/path/network"; + const expectedParameters = { + network_code: "networkCodeValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.networkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.networkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('networkPath', () => { + const result = client.networkPath("networkCodeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.networkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromNetworkName', () => { + const result = client.matchNetworkCodeFromNetworkName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.networkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystem', async () => { + const fakePath = "/rendered/path/operatingSystem"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system: "operatingSystemValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemPath', () => { + const result = client.operatingSystemPath("networkCodeValue", "operatingSystemValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemName', () => { + const result = client.matchNetworkCodeFromOperatingSystemName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemFromOperatingSystemName', () => { + const result = client.matchOperatingSystemFromOperatingSystemName(fakePath); + assert.strictEqual(result, "operatingSystemValue"); + assert((client.pathTemplates.operatingSystemPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('operatingSystemVersion', async () => { + const fakePath = "/rendered/path/operatingSystemVersion"; + const expectedParameters = { + network_code: "networkCodeValue", + operating_system_version: "operatingSystemVersionValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.operatingSystemVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.operatingSystemVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('operatingSystemVersionPath', () => { + const result = client.operatingSystemVersionPath("networkCodeValue", "operatingSystemVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOperatingSystemVersionName', () => { + const result = client.matchNetworkCodeFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOperatingSystemVersionFromOperatingSystemVersionName', () => { + const result = client.matchOperatingSystemVersionFromOperatingSystemVersionName(fakePath); + assert.strictEqual(result, "operatingSystemVersionValue"); + assert((client.pathTemplates.operatingSystemVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('order', async () => { + const fakePath = "/rendered/path/order"; + const expectedParameters = { + network_code: "networkCodeValue", + order: "orderValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.orderPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.orderPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath("networkCodeValue", "orderValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromOrderName', () => { + const result = client.matchNetworkCodeFromOrderName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, "orderValue"); + assert((client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('placement', async () => { + const fakePath = "/rendered/path/placement"; + const expectedParameters = { + network_code: "networkCodeValue", + placement: "placementValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.placementPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placementPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placementPath', () => { + const result = client.placementPath("networkCodeValue", "placementValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placementPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPlacementName', () => { + const result = client.matchNetworkCodeFromPlacementName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlacementFromPlacementName', () => { + const result = client.matchPlacementFromPlacementName(fakePath); + assert.strictEqual(result, "placementValue"); + assert((client.pathTemplates.placementPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuction', async () => { + const fakePath = "/rendered/path/privateAuction"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction: "privateAuctionValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionPath', () => { + const result = client.privateAuctionPath("networkCodeValue", "privateAuctionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionFromPrivateAuctionName', () => { + const result = client.matchPrivateAuctionFromPrivateAuctionName(fakePath); + assert.strictEqual(result, "privateAuctionValue"); + assert((client.pathTemplates.privateAuctionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('privateAuctionDeal', async () => { + const fakePath = "/rendered/path/privateAuctionDeal"; + const expectedParameters = { + network_code: "networkCodeValue", + private_auction_deal: "privateAuctionDealValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.privateAuctionDealPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.privateAuctionDealPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('privateAuctionDealPath', () => { + const result = client.privateAuctionDealPath("networkCodeValue", "privateAuctionDealValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.privateAuctionDealPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromPrivateAuctionDealName', () => { + const result = client.matchNetworkCodeFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPrivateAuctionDealFromPrivateAuctionDealName', () => { + const result = client.matchPrivateAuctionDealFromPrivateAuctionDealName(fakePath); + assert.strictEqual(result, "privateAuctionDealValue"); + assert((client.pathTemplates.privateAuctionDealPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('programmaticBuyer', async () => { + const fakePath = "/rendered/path/programmaticBuyer"; + const expectedParameters = { + network_code: "networkCodeValue", + programmatic_buyer: "programmaticBuyerValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.programmaticBuyerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.programmaticBuyerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('programmaticBuyerPath', () => { + const result = client.programmaticBuyerPath("networkCodeValue", "programmaticBuyerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.programmaticBuyerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromProgrammaticBuyerName', () => { + const result = client.matchNetworkCodeFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProgrammaticBuyerFromProgrammaticBuyerName', () => { + const result = client.matchProgrammaticBuyerFromProgrammaticBuyerName(fakePath); + assert.strictEqual(result, "programmaticBuyerValue"); + assert((client.pathTemplates.programmaticBuyerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('report', async () => { + const fakePath = "/rendered/path/report"; + const expectedParameters = { + network_code: "networkCodeValue", + report: "reportValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportPath', () => { + const result = client.reportPath("networkCodeValue", "reportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromReportName', () => { + const result = client.matchNetworkCodeFromReportName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportFromReportName', () => { + const result = client.matchReportFromReportName(fakePath); + assert.strictEqual(result, "reportValue"); + assert((client.pathTemplates.reportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('role', async () => { + const fakePath = "/rendered/path/role"; + const expectedParameters = { + network_code: "networkCodeValue", + role: "roleValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.rolePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolePath', () => { + const result = client.rolePath("networkCodeValue", "roleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromRoleName', () => { + const result = client.matchNetworkCodeFromRoleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRoleFromRoleName', () => { + const result = client.matchRoleFromRoleName(fakePath); + assert.strictEqual(result, "roleValue"); + assert((client.pathTemplates.rolePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('taxonomyCategory', async () => { + const fakePath = "/rendered/path/taxonomyCategory"; + const expectedParameters = { + network_code: "networkCodeValue", + taxonomy_category: "taxonomyCategoryValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.taxonomyCategoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taxonomyCategoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taxonomyCategoryPath', () => { + const result = client.taxonomyCategoryPath("networkCodeValue", "taxonomyCategoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTaxonomyCategoryName', () => { + const result = client.matchNetworkCodeFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyCategoryFromTaxonomyCategoryName', () => { + const result = client.matchTaxonomyCategoryFromTaxonomyCategoryName(fakePath); + assert.strictEqual(result, "taxonomyCategoryValue"); + assert((client.pathTemplates.taxonomyCategoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('team', async () => { + const fakePath = "/rendered/path/team"; + const expectedParameters = { + network_code: "networkCodeValue", + team: "teamValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.teamPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.teamPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('teamPath', () => { + const result = client.teamPath("networkCodeValue", "teamValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.teamPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromTeamName', () => { + const result = client.matchNetworkCodeFromTeamName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTeamFromTeamName', () => { + const result = client.matchTeamFromTeamName(fakePath); + assert.strictEqual(result, "teamValue"); + assert((client.pathTemplates.teamPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('user', async () => { + const fakePath = "/rendered/path/user"; + const expectedParameters = { + network_code: "networkCodeValue", + user: "userValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath("networkCodeValue", "userValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromUserName', () => { + const result = client.matchNetworkCodeFromUserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserFromUserName', () => { + const result = client.matchUserFromUserName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new teamserviceModule.v1.TeamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-ads-admanager/test/gapic_user_service_v1.ts b/packages/google-ads-admanager/test/gapic_user_service_v1.ts index bd354d2f6d0d..f72999d3f66a 100644 --- a/packages/google-ads-admanager/test/gapic_user_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_user_service_v1.ts @@ -379,6 +379,52 @@ describe('v1.UserServiceClient', () => { }); }); + describe('adReviewCenterAd', async () => { + const fakePath = "/rendered/path/adReviewCenterAd"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property_code: "webPropertyCodeValue", + ad_review_center_ad: "adReviewCenterAdValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.adReviewCenterAdPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.adReviewCenterAdPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('adReviewCenterAdPath', () => { + const result = client.adReviewCenterAdPath("networkCodeValue", "webPropertyCodeValue", "adReviewCenterAdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAdReviewCenterAdName', () => { + const result = client.matchNetworkCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyCodeFromAdReviewCenterAdName', () => { + const result = client.matchWebPropertyCodeFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "webPropertyCodeValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAdReviewCenterAdFromAdReviewCenterAdName', () => { + const result = client.matchAdReviewCenterAdFromAdReviewCenterAdName(fakePath); + assert.strictEqual(result, "adReviewCenterAdValue"); + assert((client.pathTemplates.adReviewCenterAdPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('adUnit', async () => { const fakePath = "/rendered/path/adUnit"; const expectedParameters = { @@ -417,6 +463,82 @@ describe('v1.UserServiceClient', () => { }); }); + describe('application', async () => { + const fakePath = "/rendered/path/application"; + const expectedParameters = { + network_code: "networkCodeValue", + application: "applicationValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.applicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.applicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('applicationPath', () => { + const result = client.applicationPath("networkCodeValue", "applicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.applicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromApplicationName', () => { + const result = client.matchNetworkCodeFromApplicationName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchApplicationFromApplicationName', () => { + const result = client.matchApplicationFromApplicationName(fakePath); + assert.strictEqual(result, "applicationValue"); + assert((client.pathTemplates.applicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('audienceSegment', async () => { + const fakePath = "/rendered/path/audienceSegment"; + const expectedParameters = { + network_code: "networkCodeValue", + audience_segment: "audienceSegmentValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceSegmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceSegmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceSegmentPath', () => { + const result = client.audienceSegmentPath("networkCodeValue", "audienceSegmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceSegmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromAudienceSegmentName', () => { + const result = client.matchNetworkCodeFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceSegmentFromAudienceSegmentName', () => { + const result = client.matchAudienceSegmentFromAudienceSegmentName(fakePath); + assert.strictEqual(result, "audienceSegmentValue"); + assert((client.pathTemplates.audienceSegmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('bandwidthGroup', async () => { const fakePath = "/rendered/path/bandwidthGroup"; const expectedParameters = { @@ -455,6 +577,158 @@ describe('v1.UserServiceClient', () => { }); }); + describe('browser', async () => { + const fakePath = "/rendered/path/browser"; + const expectedParameters = { + network_code: "networkCodeValue", + browser: "browserValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserPath', () => { + const result = client.browserPath("networkCodeValue", "browserValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserName', () => { + const result = client.matchNetworkCodeFromBrowserName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserFromBrowserName', () => { + const result = client.matchBrowserFromBrowserName(fakePath); + assert.strictEqual(result, "browserValue"); + assert((client.pathTemplates.browserPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('browserLanguage', async () => { + const fakePath = "/rendered/path/browserLanguage"; + const expectedParameters = { + network_code: "networkCodeValue", + browser_language: "browserLanguageValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.browserLanguagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.browserLanguagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('browserLanguagePath', () => { + const result = client.browserLanguagePath("networkCodeValue", "browserLanguageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.browserLanguagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromBrowserLanguageName', () => { + const result = client.matchNetworkCodeFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBrowserLanguageFromBrowserLanguageName', () => { + const result = client.matchBrowserLanguageFromBrowserLanguageName(fakePath); + assert.strictEqual(result, "browserLanguageValue"); + assert((client.pathTemplates.browserLanguagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataKey', async () => { + const fakePath = "/rendered/path/cmsMetadataKey"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_key: "cmsMetadataKeyValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataKeyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataKeyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataKeyPath', () => { + const result = client.cmsMetadataKeyPath("networkCodeValue", "cmsMetadataKeyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataKeyName', () => { + const result = client.matchNetworkCodeFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataKeyFromCmsMetadataKeyName', () => { + const result = client.matchCmsMetadataKeyFromCmsMetadataKeyName(fakePath); + assert.strictEqual(result, "cmsMetadataKeyValue"); + assert((client.pathTemplates.cmsMetadataKeyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cmsMetadataValue', async () => { + const fakePath = "/rendered/path/cmsMetadataValue"; + const expectedParameters = { + network_code: "networkCodeValue", + cms_metadata_value: "cmsMetadataValueValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.cmsMetadataValuePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cmsMetadataValuePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cmsMetadataValuePath', () => { + const result = client.cmsMetadataValuePath("networkCodeValue", "cmsMetadataValueValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCmsMetadataValueName', () => { + const result = client.matchNetworkCodeFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCmsMetadataValueFromCmsMetadataValueName', () => { + const result = client.matchCmsMetadataValueFromCmsMetadataValueName(fakePath); + assert.strictEqual(result, "cmsMetadataValueValue"); + assert((client.pathTemplates.cmsMetadataValuePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('company', async () => { const fakePath = "/rendered/path/company"; const expectedParameters = { @@ -531,6 +805,158 @@ describe('v1.UserServiceClient', () => { }); }); + describe('content', async () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + network_code: "networkCodeValue", + content: "contentValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("networkCodeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentName', () => { + const result = client.matchNetworkCodeFromContentName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentBundle', async () => { + const fakePath = "/rendered/path/contentBundle"; + const expectedParameters = { + network_code: "networkCodeValue", + content_bundle: "contentBundleValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentBundlePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentBundlePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentBundlePath', () => { + const result = client.contentBundlePath("networkCodeValue", "contentBundleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentBundlePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentBundleName', () => { + const result = client.matchNetworkCodeFromContentBundleName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentBundleFromContentBundleName', () => { + const result = client.matchContentBundleFromContentBundleName(fakePath); + assert.strictEqual(result, "contentBundleValue"); + assert((client.pathTemplates.contentBundlePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('contentLabel', async () => { + const fakePath = "/rendered/path/contentLabel"; + const expectedParameters = { + network_code: "networkCodeValue", + content_label: "contentLabelValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.contentLabelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentLabelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentLabelPath', () => { + const result = client.contentLabelPath("networkCodeValue", "contentLabelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentLabelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromContentLabelName', () => { + const result = client.matchNetworkCodeFromContentLabelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentLabelFromContentLabelName', () => { + const result = client.matchContentLabelFromContentLabelName(fakePath); + assert.strictEqual(result, "contentLabelValue"); + assert((client.pathTemplates.contentLabelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('creativeTemplate', async () => { + const fakePath = "/rendered/path/creativeTemplate"; + const expectedParameters = { + network_code: "networkCodeValue", + creative_template: "creativeTemplateValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.creativeTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.creativeTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('creativeTemplatePath', () => { + const result = client.creativeTemplatePath("networkCodeValue", "creativeTemplateValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.creativeTemplatePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromCreativeTemplateName', () => { + const result = client.matchNetworkCodeFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCreativeTemplateFromCreativeTemplateName', () => { + const result = client.matchCreativeTemplateFromCreativeTemplateName(fakePath); + assert.strictEqual(result, "creativeTemplateValue"); + assert((client.pathTemplates.creativeTemplatePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('customField', async () => { const fakePath = "/rendered/path/customField"; const expectedParameters = { @@ -645,6 +1071,44 @@ describe('v1.UserServiceClient', () => { }); }); + describe('deviceCapability', async () => { + const fakePath = "/rendered/path/deviceCapability"; + const expectedParameters = { + network_code: "networkCodeValue", + device_capability: "deviceCapabilityValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceCapabilityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceCapabilityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceCapabilityPath', () => { + const result = client.deviceCapabilityPath("networkCodeValue", "deviceCapabilityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceCapabilityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceCapabilityName', () => { + const result = client.matchNetworkCodeFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceCapabilityFromDeviceCapabilityName', () => { + const result = client.matchDeviceCapabilityFromDeviceCapabilityName(fakePath); + assert.strictEqual(result, "deviceCapabilityValue"); + assert((client.pathTemplates.deviceCapabilityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deviceCategory', async () => { const fakePath = "/rendered/path/deviceCategory"; const expectedParameters = { @@ -683,6 +1147,44 @@ describe('v1.UserServiceClient', () => { }); }); + describe('deviceManufacturer', async () => { + const fakePath = "/rendered/path/deviceManufacturer"; + const expectedParameters = { + network_code: "networkCodeValue", + device_manufacturer: "deviceManufacturerValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deviceManufacturerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deviceManufacturerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deviceManufacturerPath', () => { + const result = client.deviceManufacturerPath("networkCodeValue", "deviceManufacturerValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deviceManufacturerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromDeviceManufacturerName', () => { + const result = client.matchNetworkCodeFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeviceManufacturerFromDeviceManufacturerName', () => { + const result = client.matchDeviceManufacturerFromDeviceManufacturerName(fakePath); + assert.strictEqual(result, "deviceManufacturerValue"); + assert((client.pathTemplates.deviceManufacturerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('entitySignalsMapping', async () => { const fakePath = "/rendered/path/entitySignalsMapping"; const expectedParameters = { @@ -835,6 +1337,120 @@ describe('v1.UserServiceClient', () => { }); }); + describe('mobileCarrier', async () => { + const fakePath = "/rendered/path/mobileCarrier"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_carrier: "mobileCarrierValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileCarrierPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileCarrierPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileCarrierPath', () => { + const result = client.mobileCarrierPath("networkCodeValue", "mobileCarrierValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileCarrierPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileCarrierName', () => { + const result = client.matchNetworkCodeFromMobileCarrierName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileCarrierFromMobileCarrierName', () => { + const result = client.matchMobileCarrierFromMobileCarrierName(fakePath); + assert.strictEqual(result, "mobileCarrierValue"); + assert((client.pathTemplates.mobileCarrierPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDevice', async () => { + const fakePath = "/rendered/path/mobileDevice"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device: "mobileDeviceValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDevicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDevicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDevicePath', () => { + const result = client.mobileDevicePath("networkCodeValue", "mobileDeviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDevicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceName', () => { + const result = client.matchNetworkCodeFromMobileDeviceName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceFromMobileDeviceName', () => { + const result = client.matchMobileDeviceFromMobileDeviceName(fakePath); + assert.strictEqual(result, "mobileDeviceValue"); + assert((client.pathTemplates.mobileDevicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('mobileDeviceSubmodel', async () => { + const fakePath = "/rendered/path/mobileDeviceSubmodel"; + const expectedParameters = { + network_code: "networkCodeValue", + mobile_device_submodel: "mobileDeviceSubmodelValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.mobileDeviceSubmodelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('mobileDeviceSubmodelPath', () => { + const result = client.mobileDeviceSubmodelPath("networkCodeValue", "mobileDeviceSubmodelValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromMobileDeviceSubmodelName', () => { + const result = client.matchNetworkCodeFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMobileDeviceSubmodelFromMobileDeviceSubmodelName', () => { + const result = client.matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(fakePath); + assert.strictEqual(result, "mobileDeviceSubmodelValue"); + assert((client.pathTemplates.mobileDeviceSubmodelPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('network', async () => { const fakePath = "/rendered/path/network"; const expectedParameters = { @@ -1207,6 +1823,44 @@ describe('v1.UserServiceClient', () => { }); }); + describe('site', async () => { + const fakePath = "/rendered/path/site"; + const expectedParameters = { + network_code: "networkCodeValue", + site: "siteValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.sitePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sitePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sitePath', () => { + const result = client.sitePath("networkCodeValue", "siteValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sitePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromSiteName', () => { + const result = client.matchNetworkCodeFromSiteName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSiteFromSiteName', () => { + const result = client.matchSiteFromSiteName(fakePath); + assert.strictEqual(result, "siteValue"); + assert((client.pathTemplates.sitePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('taxonomyCategory', async () => { const fakePath = "/rendered/path/taxonomyCategory"; const expectedParameters = { @@ -1320,5 +1974,43 @@ describe('v1.UserServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('webProperty', async () => { + const fakePath = "/rendered/path/webProperty"; + const expectedParameters = { + network_code: "networkCodeValue", + web_property: "webPropertyValue", + }; + const client = new userserviceModule.v1.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webPropertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webPropertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webPropertyPath', () => { + const result = client.webPropertyPath("networkCodeValue", "webPropertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webPropertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchNetworkCodeFromWebPropertyName', () => { + const result = client.matchNetworkCodeFromWebPropertyName(fakePath); + assert.strictEqual(result, "networkCodeValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebPropertyFromWebPropertyName', () => { + const result = client.matchWebPropertyFromWebPropertyName(fakePath); + assert.strictEqual(result, "webPropertyValue"); + assert((client.pathTemplates.webPropertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-ads-datamanager/.OwlBot.yaml b/packages/google-ads-datamanager/.OwlBot.yaml new file mode 100644 index 000000000000..ed8315ac2356 --- /dev/null +++ b/packages/google-ads-datamanager/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 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. + +deep-copy-regex: + - source: /google/ads/datamanager/google-ads-datamanager-nodejs + dest: /owl-bot-staging/google-ads-datamanager + +api-name: datamanager diff --git a/packages/google-ads-datamanager/.eslintignore b/packages/google-ads-datamanager/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/google-ads-datamanager/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/google-ads-datamanager/.eslintrc.json b/packages/google-ads-datamanager/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-ads-datamanager/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-ads-datamanager/.gitattributes b/packages/google-ads-datamanager/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-ads-datamanager/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-ads-datamanager/.gitignore b/packages/google-ads-datamanager/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-ads-datamanager/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-ads-datamanager/.jsdoc.js b/packages/google-ads-datamanager/.jsdoc.js new file mode 100644 index 000000000000..c56f69508833 --- /dev/null +++ b/packages/google-ads-datamanager/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-ads/datamanager', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-ads-datamanager/.mocharc.js b/packages/google-ads-datamanager/.mocharc.js new file mode 100644 index 000000000000..24e9d15257f9 --- /dev/null +++ b/packages/google-ads-datamanager/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-ads-datamanager/.nycrc b/packages/google-ads-datamanager/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/google-ads-datamanager/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/google-ads-datamanager/.prettierignore b/packages/google-ads-datamanager/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-ads-datamanager/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-ads-datamanager/.prettierrc.js b/packages/google-ads-datamanager/.prettierrc.js new file mode 100644 index 000000000000..d89a632f90b0 --- /dev/null +++ b/packages/google-ads-datamanager/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-ads-datamanager/.repo-metadata.json b/packages/google-ads-datamanager/.repo-metadata.json new file mode 100644 index 000000000000..0c861b05dbee --- /dev/null +++ b/packages/google-ads-datamanager/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "datamanager", + "name_pretty": "Data Manager API", + "product_documentation": "https://developers.google.com/data-manager", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datamanager/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-ads/datamanager", + "api_id": "datamanager.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "datamanager" +} + diff --git a/packages/google-ads-datamanager/CHANGELOG.md b/packages/google-ads-datamanager/CHANGELOG.md new file mode 100644 index 000000000000..3683c982fd4d --- /dev/null +++ b/packages/google-ads-datamanager/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## 0.1.0 (2025-11-11) + + +### Features + +* Add initial files for google.ads.datamanager.v1 ([#6841](https://github.com/googleapis/google-cloud-node/issues/6841)) ([947fcf5](https://github.com/googleapis/google-cloud-node/commit/947fcf5468e0923866bbe7c28c262830d748f5ca)) + + +### Bug Fixes + +* [gkeconnect-gateway] remove unused GatewayServiceClient ([#6775](https://github.com/googleapis/google-cloud-node/issues/6775)) ([41c2ff2](https://github.com/googleapis/google-cloud-node/commit/41c2ff2851b5fdadabf4f9bd3500167c34b32ff7)) diff --git a/packages/google-ads-datamanager/CODE_OF_CONDUCT.md b/packages/google-ads-datamanager/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-ads-datamanager/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-ads-datamanager/CONTRIBUTING.md b/packages/google-ads-datamanager/CONTRIBUTING.md new file mode 100644 index 000000000000..07abc83b3011 --- /dev/null +++ b/packages/google-ads-datamanager/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Datamanager API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datamanager.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-ads-datamanager/LICENSE b/packages/google-ads-datamanager/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-ads-datamanager/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/packages/google-ads-datamanager/README.md b/packages/google-ads-datamanager/README.md new file mode 100644 index 000000000000..a3e07d1f8e6b --- /dev/null +++ b/packages/google-ads-datamanager/README.md @@ -0,0 +1,117 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Data Manager API: Nodejs Client][homepage] + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + +[![npm version](https://img.shields.io/npm/v/@google-ads/datamanager.svg)](https://www.npmjs.org/package/@google-ads/datamanager) + +Data Manager API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Data Manager API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/datamanager/latest) +* [Data Manager API Documentation](https://developers.google.com/data-manager) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data Manager API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-ads/datamanager +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| ingest audience members | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js) | +| ingest events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js) | +| remove audience members | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js) | +| retrieve request status | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js) | +| ads | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-ads/datamanager@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datamanager.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager diff --git a/packages/google-ads-datamanager/package.json b/packages/google-ads-datamanager/package.json new file mode 100644 index 000000000000..1c410814b1f7 --- /dev/null +++ b/packages/google-ads-datamanager/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-ads/datamanager", + "version": "0.1.0", + "description": "Data Manager API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-ads-datamanager" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ads-datamanager", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google datamanager", + "datamanager", + "Data Manager API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^5.0.0" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.13.9", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.0", + "gts": "^6.0.2", + "jsdoc": "^4.0.4", + "jsdoc-fresh": "^4.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "^6.1.2", + "long": "^5.3.1", + "mocha": "^11.1.0", + "pack-n-play": "^3.0.0", + "sinon": "^21.0.0", + "typescript": "^5.8.2" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto new file mode 100644 index 000000000000..9940294a00e7 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto @@ -0,0 +1,73 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/ads/datamanager/v1/consent.proto"; +import "google/ads/datamanager/v1/user_data.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "AudienceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The audience member to be operated on. +message AudienceMember { + // Optional. Defines which + // [Destination][google.ads.datamanager.v1.Destination] to send the audience + // member to. + repeated string destination_references = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // The type of identifying data to be operated on. + oneof data { + // User-provided data that identifies the user. + UserData user_data = 2; + + // [Publisher Advertiser Identity Reconciliation (PAIR) + // IDs](//support.google.com/admanager/answer/15067908). + PairData pair_data = 4; + + // Data identifying the user's mobile devices. + MobileData mobile_data = 5; + } + + // Optional. The consent setting for the user. + Consent consent = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// [PAIR](//support.google.com/admanager/answer/15067908) IDs for the audience. +// At least one PAIR ID is required. +message PairData { + // Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted + // with an EC commutative cipher using publisher key for the + // [PAIR]((//support.google.com/admanager/answer/15067908)) user list. At most + // 10 `pairIds` can be provided in a single + // [AudienceMember][google.ads.datamanager.v1.AudienceMember]. + repeated string pair_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Mobile IDs for the audience. At least one mobile ID is required. +message MobileData { + // Required. The list of mobile device IDs (advertising ID/IDFA). At most 10 + // `mobileIds` can be provided in a single + // [AudienceMember][google.ads.datamanager.v1.AudienceMember]. + repeated string mobile_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto new file mode 100644 index 000000000000..3e469cdb3dd1 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto @@ -0,0 +1,61 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "CartDataProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The cart data associated with the event. +message CartData { + // Optional. The Merchant Center ID associated with the items. + string merchant_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Merchant Center feed label associated with the feed of the + // items. + string merchant_feed_label = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language code in ISO 639-1 associated with the Merchant + // Center feed of the items.where your items are uploaded. + string merchant_feed_language_code = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sum of all discounts associated with the transaction. + double transaction_discount = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of items associated with the event. + repeated Item items = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents an item in the cart associated with the event. +message Item { + // Optional. The product ID within the Merchant Center account. + string merchant_product_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of this item associated with the event. + int64 quantity = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The unit price excluding tax, shipping, and any transaction level + // discounts. + double unit_price = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto new file mode 100644 index 000000000000..9e7cad217b67 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto @@ -0,0 +1,50 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "ConsentProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// [Digital Markets Act +// (DMA)](//digital-markets-act.ec.europa.eu/index_en) consent settings +// for the user. +message Consent { + // Optional. Represents if the user consents to ad user data. + ConsentStatus ad_user_data = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents if the user consents to ad personalization. + ConsentStatus ad_personalization = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents if the user granted, denied, or hasn't specified consent. +enum ConsentStatus { + // Not specified. + CONSENT_STATUS_UNSPECIFIED = 0; + + // Granted. + CONSENT_GRANTED = 1; + + // Denied. + CONSENT_DENIED = 2; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto new file mode 100644 index 000000000000..d6ebdcb29a13 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto @@ -0,0 +1,119 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "DestinationProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The Google product you're sending data to. For example, a Google +// Ads account. +message Destination { + // Optional. ID for this `Destination` resource, unique within the request. + // Use to reference this `Destination` in the + // [IngestEventsRequest][google.ads.datamanager.v1.IngestEventsRequest] and + // [IngestAudienceMembersRequest][google.ads.datamanager.v1.IngestAudienceMembersRequest]. + string reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The account used to make this API call. To add or remove data + // from the + // [`operating_account`][google.ads.datamanager.v1.Destination.operating_account], + // this `login_account` must have write access to the `operating_account`. For + // example, a manager account of the `operating_account`, or an account with + // an established link to the `operating_account`. + ProductAccount login_account = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An account that the calling user's + // [`login_account`][google.ads.datamanager.v1.Destination.login_account] has + // access to, through an established account link. For example, a data + // partner's `login_account` might have access to a client's `linked_account`. + // The partner might use this field to send data from the `linked_account` to + // another + // [`operating_account`][google.ads.datamanager.v1.Destination.operating_account]. + ProductAccount linked_account = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The account to send the data to or remove the data from. + ProductAccount operating_account = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The object within the product account to ingest into. For + // example, a Google Ads audience ID, a Display & Video 360 audience ID or a + // Google Ads conversion action ID. + string product_destination_id = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a specific account. +message ProductAccount { + // Represents Google account types. Used to locate accounts and + // destinations. + enum AccountType { + // Unspecified product. Should never be used. + ACCOUNT_TYPE_UNSPECIFIED = 0; + + // Google Ads. + GOOGLE_ADS = 1; + + // Display & Video 360 partner. + DISPLAY_VIDEO_PARTNER = 2; + + // Display & Video 360 advertiser. + DISPLAY_VIDEO_ADVERTISER = 3; + + // Data Partner. + DATA_PARTNER = 4; + } + + // Deprecated. Use + // [`account_type`][google.ads.datamanager.v1.ProductAccount.account_type] + // instead. + Product product = 1 [deprecated = true]; + + // Required. The ID of the account. For example, your Google Ads account ID. + string account_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of the account. For example, `GOOGLE_ADS`. + // Either `account_type` or the deprecated `product` is required. + // If both are set, the values must match. + AccountType account_type = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Deprecated. Use +// [`AccountType`][google.ads.datamanager.v1.ProductAccount.AccountType] +// instead. Represents a specific Google product. +enum Product { + option deprecated = true; + + // Unspecified product. Should never be used. + PRODUCT_UNSPECIFIED = 0; + + // Google Ads. + GOOGLE_ADS = 1; + + // Display & Video 360 partner. + DISPLAY_VIDEO_PARTNER = 2; + + // Display & Video 360 advertiser. + DISPLAY_VIDEO_ADVERTISER = 3; + + // Data Partner. + DATA_PARTNER = 4; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto new file mode 100644 index 000000000000..ed59798b737f --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto @@ -0,0 +1,46 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "DeviceInfoProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Information about the device being used (if any) when the event happened. +message DeviceInfo { + // Optional. The user-agent string of the device for the given context. + string user_agent = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address of the device for the given context. + // + // **Note:** Google Ads does not support IP address matching for end users in + // the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). + // Add logic to conditionally exclude sharing IP addresses from users from + // these regions and ensure that you provide users with clear and + // comprehensive information about the data you collect on your sites, apps, + // and other properties and get consent where required by law or any + // applicable Google policies. See the [About offline conversion + // imports](https://support.google.com/google-ads/answer/2998031) page for + // more details. + string ip_address = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto new file mode 100644 index 000000000000..2a024d9f46d7 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto @@ -0,0 +1,67 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "EncryptionInfoProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Encryption information for the data being ingested. +message EncryptionInfo { + // The [wrapped key](//cloud.google.com/kms/docs/key-wrapping) used to encrypt + // the data. + oneof wrapped_key { + // Google Cloud Platform wrapped key information. + GcpWrappedKeyInfo gcp_wrapped_key_info = 1; + } +} + +// Information about the Google Cloud Platform wrapped +// key. +message GcpWrappedKeyInfo { + // The type of algorithm used to encrypt the data. + enum KeyType { + // Unspecified key type. Should never be used. + KEY_TYPE_UNSPECIFIED = 0; + + // Algorithm XChaCha20-Poly1305 + XCHACHA20_POLY1305 = 1; + } + + // Required. The type of algorithm used to encrypt the data. + KeyType key_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The [Workload + // Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool + // provider required to use KEK. + string wip_provider = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Google Cloud Platform [Cloud Key Management Service resource + // ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the + // format of + // "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}". + string kek_uri = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The base64 encoded encrypted data encryption key. + string encrypted_dek = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto new file mode 100644 index 000000000000..2833be597610 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto @@ -0,0 +1,150 @@ +// Copyright 2025 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.ads.datamanager.v1; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "ErrorProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Error reasons for Data Manager API. +enum ErrorReason { + // Do not use this default value. + ERROR_REASON_UNSPECIFIED = 0; + + // An internal error has occurred. + INTERNAL_ERROR = 1; + + // The request took too long to respond. + DEADLINE_EXCEEDED = 2; + + // Too many requests. + RESOURCE_EXHAUSTED = 3; + + // Resource not found. + NOT_FOUND = 4; + + // The user does not have permission or the resource is not found. + PERMISSION_DENIED = 5; + + // There was a problem with the request. + INVALID_ARGUMENT = 6; + + // Required field is missing. + REQUIRED_FIELD_MISSING = 7; + + // Format is invalid. + INVALID_FORMAT = 8; + + // The HEX encoded value is malformed. + INVALID_HEX_ENCODING = 9; + + // The base64 encoded value is malformed. + INVALID_BASE64_ENCODING = 10; + + // The SHA256 encoded value is malformed. + INVALID_SHA256_FORMAT = 11; + + // Postal code is not valid. + INVALID_POSTAL_CODE = 12; + + // Country code is not valid. + INVALID_COUNTRY_CODE = 13; + + // Enum value cannot be used. + INVALID_ENUM_VALUE = 14; + + // Type of the user list is not applicable for this request. + INVALID_USER_LIST_TYPE = 15; + + // This audience member is not valid. + INVALID_AUDIENCE_MEMBER = 16; + + // Maximum number of audience members allowed per request is 10,000. + TOO_MANY_AUDIENCE_MEMBERS = 17; + + // Maximum number of user identifiers allowed per audience member is 10. + TOO_MANY_USER_IDENTIFIERS = 18; + + // Maximum number of destinations allowed per request is 10. + TOO_MANY_DESTINATIONS = 19; + + // This Destination is not valid. + INVALID_DESTINATION = 20; + + // Data Partner does not have access to the operating account owned userlist. + DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED = 21; + + // Mobile ID format is not valid. + INVALID_MOBILE_ID_FORMAT = 22; + + // User list is not valid. + INVALID_USER_LIST_ID = 23; + + // Multiple data types are not allowed to be ingested in a single request. + MULTIPLE_DATA_TYPES_NOT_ALLOWED = 24; + + // Destination configs containing a DataPartner login account must have the + // same login account across all destination configs. + DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER = 25; + + // Required terms and conditions are not accepted. + TERMS_AND_CONDITIONS_NOT_SIGNED = 26; + + // Invalid number format. + INVALID_NUMBER_FORMAT = 27; + + // Conversion action ID is not valid. + INVALID_CONVERSION_ACTION_ID = 28; + + // The conversion action type is not valid. + INVALID_CONVERSION_ACTION_TYPE = 29; + + // The currency code is not supported. + INVALID_CURRENCY_CODE = 30; + + // This event is not valid. + INVALID_EVENT = 31; + + // Maximum number of events allowed per request is 10,000. + TOO_MANY_EVENTS = 32; + + // The destination account is not enabled for enhanced conversions for leads. + DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS = 33; + + // Enhanced conversions can't be used for the destination account because of + // Google customer data policies. Contact your Google representative.. + DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS = 34; + + // The destination account hasn't agreed to the terms for enhanced + // conversions. + DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED = 35; + + // Two or more destinations in the request have the same reference. + DUPLICATE_DESTINATION_REFERENCE = 36; + + // Events data contains no user identifiers or ad identifiers. + NO_IDENTIFIERS_PROVIDED = 39; + + // The request ID used to retrieve the status of a request is not valid. + // Status can only be retrieved for requests that succeed and don't have + // `validate_only=true`. + INVALID_REQUEST_ID = 48; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto new file mode 100644 index 000000000000..d9c393770720 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto @@ -0,0 +1,163 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/ads/datamanager/v1/cart_data.proto"; +import "google/ads/datamanager/v1/consent.proto"; +import "google/ads/datamanager/v1/device_info.proto"; +import "google/ads/datamanager/v1/experimental_field.proto"; +import "google/ads/datamanager/v1/user_data.proto"; +import "google/ads/datamanager/v1/user_properties.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "EventProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// An event representing a user interaction with an advertiser's website or app. +message Event { + // Optional. Reference string used to determine the destination. If empty, the + // event will be sent to all + // [destinations][google.ads.datamanager.v1.IngestEventsRequest.destinations] + // in the request. + repeated string destination_references = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The unique identifier for this event. Required for conversions + // using multiple data sources. + string transaction_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The time the event occurred. + google.protobuf.Timestamp event_timestamp = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The last time the event was updated. + google.protobuf.Timestamp last_updated_timestamp = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pieces of user provided data, representing the user the event is + // associated with. + UserData user_data = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about whether the associated user has provided + // different types of consent. + Consent consent = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Identifiers and other information used to match the conversion + // event with other online activity (such as ad clicks). + AdIdentifiers ad_identifiers = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The currency code associated with all monetary values within this + // event. + string currency = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The conversion value associated with the event, for value-based + // conversions. + double conversion_value = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Signal for where the event happened (web, app, in-store, etc.). + EventSource event_source = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information gathered about the device being used (if any) when + // the event happened. + DeviceInfo event_device_info = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about the transaction and items associated with the + // event. + CartData cart_data = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional key/value pair information to send to the conversion + // containers (conversion action or FL activity). + repeated CustomVariable custom_variables = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of key/value pairs for experimental fields that may + // eventually be promoted to be part of the API. + repeated ExperimentalField experimental_fields = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Advertiser-assessed information about the user at the time that + // the event happened. + UserProperties user_properties = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// Identifiers and other information used to match the conversion event with +// other online activity (such as ad clicks). +message AdIdentifiers { + // Optional. Session attributes for event attribution and modeling. + string session_attributes = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Google click ID (gclid) associated with this event. + string gclid = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The click identifier for clicks associated with app events and + // originating from iOS devices starting with iOS14. + string gbraid = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The click identifier for clicks associated with web events and + // originating from iOS devices starting with iOS14. + string wbraid = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information gathered about the device being used (if any) at the + // time of landing onto the advertiser’s site after interacting with the ad. + DeviceInfo landing_page_device_info = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Custom variable for ads conversions. +message CustomVariable { + // Optional. The name of the custom variable to set. If the variable is not + // found for the given destination, it will be ignored. + string variable = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value to store for the custom variable. + string value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reference string used to determine which of the + // [Event.destination_references][google.ads.datamanager.v1.Event.destination_references] + // the custom variable should be sent to. If empty, the + // [Event.destination_references][google.ads.datamanager.v1.Event.destination_references] + // will be used. + repeated string destination_references = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The source of the event. +enum EventSource { + // Unspecified EventSource. Should never be used. + EVENT_SOURCE_UNSPECIFIED = 0; + + // The event was generated from a web browser. + WEB = 1; + + // The event was generated from an app. + APP = 2; + + // The event was generated from an in-store transaction. + IN_STORE = 3; + + // The event was generated from a phone call. + PHONE = 4; + + // The event was generated from other sources. + OTHER = 5; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto new file mode 100644 index 000000000000..48ca08b28981 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto @@ -0,0 +1,36 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentalFieldProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Experimental field representing unofficial fields. +message ExperimentalField { + // Optional. The name of the field to use. + string field = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value the field to set. + string value = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto new file mode 100644 index 000000000000..dd6066117c3b --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto @@ -0,0 +1,239 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/ads/datamanager/v1/audience.proto"; +import "google/ads/datamanager/v1/consent.proto"; +import "google/ads/datamanager/v1/destination.proto"; +import "google/ads/datamanager/v1/encryption_info.proto"; +import "google/ads/datamanager/v1/event.proto"; +import "google/ads/datamanager/v1/request_status_per_destination.proto"; +import "google/ads/datamanager/v1/terms_of_service.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "IngestionServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service for sending audience data to supported destinations. +service IngestionService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Uploads a list of + // [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources to the + // provided [Destination][google.ads.datamanager.v1.Destination]. + rpc IngestAudienceMembers(IngestAudienceMembersRequest) + returns (IngestAudienceMembersResponse) { + option (google.api.http) = { + post: "/v1/audienceMembers:ingest" + body: "*" + }; + } + + // Removes a list of + // [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources from + // the provided [Destination][google.ads.datamanager.v1.Destination]. + rpc RemoveAudienceMembers(RemoveAudienceMembersRequest) + returns (RemoveAudienceMembersResponse) { + option (google.api.http) = { + post: "/v1/audienceMembers:remove" + body: "*" + }; + } + + // Uploads a list of + // [Event][google.ads.datamanager.v1.Event] resources from + // the provided [Destination][google.ads.datamanager.v1.Destination]. + rpc IngestEvents(IngestEventsRequest) returns (IngestEventsResponse) { + option (google.api.http) = { + post: "/v1/events:ingest" + body: "*" + }; + } + + // Gets the status of a request given request id. + rpc RetrieveRequestStatus(RetrieveRequestStatusRequest) + returns (RetrieveRequestStatusResponse) { + option (google.api.http) = { + get: "/v1/requestStatus:retrieve" + }; + } +} + +// Request to upload audience members to the provided destinations. Returns an +// [IngestAudienceMembersResponse][google.ads.datamanager.v1.IngestAudienceMembersResponse]. +message IngestAudienceMembersRequest { + // Required. The list of destinations to send the audience members to. + repeated Destination destinations = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of users to send to the specified destinations. At most + // 10000 [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources + // can be sent in a single request. + repeated AudienceMember audience_members = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Request-level consent to apply to all users in the request. + // User-level consent overrides request-level consent, and can be specified in + // each [AudienceMember][google.ads.datamanager.v1.AudienceMember]. + Consent consent = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. For testing purposes. If `true`, the request is validated but not + // executed. Only errors are returned, not results. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Required for [UserData][google.ads.datamanager.v1.UserData] + // uploads. The encoding type of the user identifiers. For hashed user + // identifiers, this is the encoding type of the hashed string. For encrypted + // hashed user identifiers, this is the encoding type of the outer encrypted + // string, but not necessarily the inner hashed string, meaning the inner + // hashed string could be encoded in a different way than the outer encrypted + // string. For non `UserData` uploads, this field is ignored. + Encoding encoding = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encryption information for + // [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's + // assumed that uploaded identifying information is hashed but not encrypted. + // For non `UserData` uploads, this field is ignored. + EncryptionInfo encryption_info = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The terms of service that the user has accepted/rejected. + TermsOfService terms_of_service = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [IngestAudienceMembersRequest][google.ads.datamanager.v1.IngestAudienceMembersRequest]. +message IngestAudienceMembersResponse { + // The auto-generated ID of the request. + string request_id = 1; +} + +// Request to remove users from an audience in the provided destinations. +// Returns a +// [RemoveAudienceMembersResponse][google.ads.datamanager.v1.RemoveAudienceMembersResponse]. +message RemoveAudienceMembersRequest { + // Required. The list of destinations to remove the users from. + repeated Destination destinations = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of users to remove. + repeated AudienceMember audience_members = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. For testing purposes. If `true`, the request is validated but not + // executed. Only errors are returned, not results. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Required for [UserData][google.ads.datamanager.v1.UserData] + // uploads. The encoding type of the user identifiers. Applies to only the + // outer encoding for encrypted user identifiers. For non `UserData` uploads, + // this field is ignored. + Encoding encoding = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encryption information for + // [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's + // assumed that uploaded identifying information is hashed but not encrypted. + // For non `UserData` uploads, this field is ignored. + EncryptionInfo encryption_info = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [RemoveAudienceMembersRequest][google.ads.datamanager.v1.RemoveAudienceMembersRequest]. +message RemoveAudienceMembersResponse { + // The auto-generated ID of the request. + string request_id = 1; +} + +// Request to upload audience members to the provided destinations. Returns an +// [IngestEventsResponse][google.ads.datamanager.v1.IngestEventsResponse]. +message IngestEventsRequest { + // Required. The list of destinations to send the events to. + repeated Destination destinations = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of events to send to the specified destinations. At most + // 2000 [Event][google.ads.datamanager.v1.Event] resources + // can be sent in a single request. + repeated Event events = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Request-level consent to apply to all users in the request. + // User-level consent overrides request-level consent, and can be specified in + // each [Event][google.ads.datamanager.v1.Event]. + Consent consent = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. For testing purposes. If `true`, the request is validated but not + // executed. Only errors are returned, not results. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Required for [UserData][google.ads.datamanager.v1.UserData] + // uploads. The encoding type of the user identifiers. For hashed user + // identifiers, this is the encoding type of the hashed string. For encrypted + // hashed user identifiers, this is the encoding type of the outer encrypted + // string, but not necessarily the inner hashed string, meaning the inner + // hashed string could be encoded in a different way than the outer encrypted + // string. For non `UserData` uploads, this field is ignored. + Encoding encoding = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encryption information for + // [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's + // assumed that uploaded identifying information is hashed but not encrypted. + // For non `UserData` uploads, this field is ignored. + EncryptionInfo encryption_info = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [IngestEventsRequest][google.ads.datamanager.v1.IngestEventsRequest]. +message IngestEventsResponse { + // The auto-generated ID of the request. + string request_id = 1; +} + +// Request to get the status of request made to the DM API for a given request +// ID. Returns a +// [RetrieveRequestStatusResponse][google.ads.datamanager.v1.RetrieveRequestStatusResponse]. +message RetrieveRequestStatusRequest { + // Required. Required. The request ID of the Data Manager API request. + string request_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response from the +// [RetrieveRequestStatusRequest][google.ads.datamanager.v1.RetrieveRequestStatusRequest]. +message RetrieveRequestStatusResponse { + // A list of request statuses per destination. The order of the statuses + // matches the order of the destinations in the original request. + repeated RequestStatusPerDestination request_status_per_destination = 1; +} + +// The encoding type of the hashed identifying information. +enum Encoding { + // Unspecified Encoding type. Should never be used. + ENCODING_UNSPECIFIED = 0; + + // Hex encoding. + HEX = 1; + + // Base 64 encoding. + BASE64 = 2; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto new file mode 100644 index 000000000000..f6309d2e3864 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto @@ -0,0 +1,62 @@ +// Copyright 2025 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.ads.datamanager.v1; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "MatchRateProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The match rate range of the upload or userlist. +enum MatchRateRange { + // The match rate range is unknown. + MATCH_RATE_RANGE_UNKNOWN = 0; + + // The match rate range is not eligible. + MATCH_RATE_RANGE_NOT_ELIGIBLE = 1; + + // The match rate range is less than 20% (in the interval `[0, 20)`). + MATCH_RATE_RANGE_LESS_THAN_20 = 2; + + // The match rate range is between 20% and 30% (in the interval `[20, 31)`). + MATCH_RATE_RANGE_20_TO_30 = 3; + + // The match rate range is between 31% and 40% (in the interval `[31, 41)`). + MATCH_RATE_RANGE_31_TO_40 = 4; + + // The match rate range is between 41% and 50% (in the interval `[41, 51)`). + MATCH_RATE_RANGE_41_TO_50 = 5; + + // The match rate range is between 51% and 60% (in the interval `[51, 61)`. + MATCH_RATE_RANGE_51_TO_60 = 6; + + // The match rate range is between 61% and 70% (in the interval `[61, 71)`). + MATCH_RATE_RANGE_61_TO_70 = 7; + + // The match rate range is between 71% and 80% (in the interval `[71, 81)`). + MATCH_RATE_RANGE_71_TO_80 = 8; + + // The match rate range is between 81% and 90% (in the interval `[81, 91)`). + MATCH_RATE_RANGE_81_TO_90 = 9; + + // The match rate range is between 91% and 100% (in the interval `[91, + // 100]`). + MATCH_RATE_RANGE_91_TO_100 = 10; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto new file mode 100644 index 000000000000..029e8486178a --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto @@ -0,0 +1,184 @@ +// Copyright 2025 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.ads.datamanager.v1; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "ProcessingErrorsProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Error counts for each type of error. +message ErrorInfo { + // A list of errors and counts per error reason. May not be populated + // in all cases. + repeated ErrorCount error_counts = 1; +} + +// The error count for a given error reason. +message ErrorCount { + // The count of records that failed to upload for a given reason. + int64 record_count = 1; + + // The error reason of the failed records. + ProcessingErrorReason reason = 2; +} + +// Warning counts for each type of warning. +message WarningInfo { + // A list of warnings and counts per warning reason. + repeated WarningCount warning_counts = 1; +} + +// The warning count for a given warning reason. +message WarningCount { + // The count of records that have a warning. + int64 record_count = 1; + + // The warning reason. + ProcessingWarningReason reason = 2; +} + +// The processing error reason. +enum ProcessingErrorReason { + // The processing error reason is unknown. + PROCESSING_ERROR_REASON_UNSPECIFIED = 0; + + // The custom variable is invalid. + PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE = 1; + + // The status of the custom variable is not enabled. + PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED = 2; + + // The conversion is older than max supported age. + PROCESSING_ERROR_REASON_EVENT_TOO_OLD = 3; + + // The ad user data is denied, either by the user or in + // the advertiser default settings. + PROCESSING_ERROR_REASON_DENIED_CONSENT = 4; + + // Advertiser did not give 3P consent for the Ads core platform services. + PROCESSING_ERROR_REASON_NO_CONSENT = 5; + + // The overall consent (determined from row level consent, request level + // consent, and account settings) could not be determined for this user + PROCESSING_ERROR_REASON_UNKNOWN_CONSENT = 6; + + // A conversion with the same GCLID and conversion time already exists in + // the system. + PROCESSING_ERROR_REASON_DUPLICATE_GCLID = 7; + + // A conversion with the same order id and conversion action combination was + // already uploaded. + PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID = 8; + + // The gbraid could not be decoded. + PROCESSING_ERROR_REASON_INVALID_GBRAID = 9; + + // The google click ID could not be decoded. + PROCESSING_ERROR_REASON_INVALID_GCLID = 10; + + // Merchant id contains non-digit characters. + PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID = 11; + + // The wbraid could not be decoded. + PROCESSING_ERROR_REASON_INVALID_WBRAID = 12; + + // Internal error. + PROCESSING_ERROR_REASON_INTERNAL_ERROR = 13; + + // Enhanced conversions terms are not signed in the destination account. + PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED = + 14; + + // The event is invalid. + PROCESSING_ERROR_REASON_INVALID_EVENT = 15; + + // The matched transactions are less than the minimum threshold. + PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS = 16; + + // The transactions are less than the minimum threshold. + PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS = 17; + + // The event has format error. + PROCESSING_ERROR_REASON_INVALID_FORMAT = 18; + + // The event has a decryption error. + PROCESSING_ERROR_REASON_DECRYPTION_ERROR = 19; + + // The DEK failed to be decrypted. + PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR = 20; + + // The WIP is formatted incorrectly or the WIP does not exist. + PROCESSING_ERROR_REASON_INVALID_WIP = 21; + + // The KEK cannot decrypt data because it is the wrong KEK, or it does not + // exist. + PROCESSING_ERROR_REASON_INVALID_KEK = 22; + + // The WIP could not be used because it was rejected by its attestation + // condition. + PROCESSING_ERROR_REASON_WIP_AUTH_FAILED = 23; + + // The system did not have the permissions needed to access the KEK. + PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED = 24; + + // Failed to decrypt the + // [UserIdentifier][google.ads.datamanager.v1.UserIdentifier] data using the + // DEK. + PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR = 25; + + // The user attempted to ingest events with an ad identifier that isn't + // from the operating account's ads. + PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER = 26; +} + +// The processing warning reason. +enum ProcessingWarningReason { + // The processing warning reason is unknown. + PROCESSING_WARNING_REASON_UNSPECIFIED = 0; + + // The system did not have the permissions needed to access the KEK. + PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED = 1; + + // The DEK failed to be decrypted. + PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR = 2; + + // The event has a decryption error. + PROCESSING_WARNING_REASON_DECRYPTION_ERROR = 3; + + // The WIP could not be used because it was rejected by its attestation + // condition. + PROCESSING_WARNING_REASON_WIP_AUTH_FAILED = 4; + + // The WIP is formatted incorrectly or the WIP does not exist. + PROCESSING_WARNING_REASON_INVALID_WIP = 5; + + // The KEK cannot decrypt data because it is the wrong KEK, or it does not + // exist. + PROCESSING_WARNING_REASON_INVALID_KEK = 6; + + // Failed to decrypt th + // [UserIdentifier][google.ads.datamanager.v1.UserIdentifier] data using the + // DEK. + PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR = 7; + + // Internal error. + PROCESSING_WARNING_REASON_INTERNAL_ERROR = 8; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto new file mode 100644 index 000000000000..bac562d00988 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto @@ -0,0 +1,198 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/ads/datamanager/v1/destination.proto"; +import "google/ads/datamanager/v1/match_rate.proto"; +import "google/ads/datamanager/v1/processing_errors.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "RequestStatusPerDestinationProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A request status per destination. +message RequestStatusPerDestination { + // The request status. + enum RequestStatus { + // The request status is unknown. + REQUEST_STATUS_UNKNOWN = 0; + + // The request succeeded. + SUCCESS = 1; + + // The request is processing. + PROCESSING = 2; + + // The request failed. + FAILED = 3; + + // The request partially succeeded. + PARTIAL_SUCCESS = 4; + } + + // The status of the ingest audience members request. + message IngestAudienceMembersStatus { + // The status of the audience members ingestion to the destination. + oneof status { + // The status of the user data ingestion to the destination. + IngestUserDataStatus user_data_ingestion_status = 1; + + // The status of the mobile data ingestion to the destination. + IngestMobileDataStatus mobile_data_ingestion_status = 2; + + // The status of the pair data ingestion to the destination. + IngestPairDataStatus pair_data_ingestion_status = 3; + } + } + + // The status of the remove audience members request. + message RemoveAudienceMembersStatus { + // The status of the audience members removal from the destination. + oneof status { + // The status of the user data removal from the destination. + RemoveUserDataStatus user_data_removal_status = 1; + + // The status of the mobile data removal from the destination. + RemoveMobileDataStatus mobile_data_removal_status = 2; + + // The status of the pair data removal from the destination. + RemovePairDataStatus pair_data_removal_status = 3; + } + } + + // The status of the events ingestion to the destination. + message IngestEventsStatus { + // The total count of events sent in the upload request. Includes all + // events in the request, regardless of whether they were successfully + // ingested or not. + int64 record_count = 1; + } + + // The status of the user data ingestion to the destination containing stats + // related to the ingestion. + message IngestUserDataStatus { + // The total count of audience members sent in the upload request for the + // destination. Includes all audience members in the request, regardless of + // whether they were successfully ingested or not. + int64 record_count = 1; + + // The total count of user identifiers sent in the upload request for the + // destination. Includes all user identifiers in the request, regardless of + // whether they were successfully ingested or not. + int64 user_identifier_count = 2; + + // The match rate range of the upload. + MatchRateRange upload_match_rate_range = 3; + } + + // The status of the user data removal from the destination. + message RemoveUserDataStatus { + // The total count of audience members sent in the removal request. Includes + // all audience members in the request, regardless of whether they were + // successfully removed or not. + int64 record_count = 1; + + // The total count of user identifiers sent in the removal request. Includes + // all user identifiers in the request, regardless of whether they were + // successfully removed or not. + int64 user_identifier_count = 2; + } + + // The status of the mobile data ingestion to the destination containing stats + // related to the ingestion. + message IngestMobileDataStatus { + // The total count of audience members sent in the upload request for the + // destination. Includes all audience members in the request, regardless of + // whether they were successfully ingested or not. + int64 record_count = 1; + + // The total count of mobile ids sent in the upload request for the + // destination. Includes all mobile ids in the request, regardless of + // whether they were successfully ingested or not. + int64 mobile_id_count = 2; + } + + // The status of the mobile data removal from the destination. + message RemoveMobileDataStatus { + // The total count of audience members sent in the removal request. Includes + // all audience members in the request, regardless of whether they were + // successfully removed or not. + int64 record_count = 1; + + // The total count of mobile Ids sent in the removal request. Includes all + // mobile ids in the request, regardless of whether they were successfully + // removed or not. + int64 mobile_id_count = 2; + } + + // The status of the pair data ingestion to the destination containing stats + // related to the ingestion. + message IngestPairDataStatus { + // The total count of audience members sent in the upload request for the + // destination. Includes all audience members in the request, regardless of + // whether they were successfully ingested or not. + int64 record_count = 1; + + // The total count of pair ids sent in the upload request for the + // destination. Includes all pair ids in the request, regardless of + // whether they were successfully ingested or not. + int64 pair_id_count = 2; + } + + // The status of the pair data removal from the destination. + message RemovePairDataStatus { + // The total count of audience members sent in the removal request. Includes + // all audience members in the request, regardless of whether they were + // successfully removed or not. + int64 record_count = 1; + + // The total count of pair ids sent in the removal request. Includes all + // pair ids in the request, regardless of whether they were successfully + // removed or not. + int64 pair_id_count = 2; + } + + // A destination within a DM API request. + Destination destination = 1; + + // The request status of the destination. + RequestStatus request_status = 2; + + // An error info error containing the error reason and error counts related to + // the upload. + ErrorInfo error_info = 3; + + // A warning info containing the warning reason and warning counts related to + // the upload. + WarningInfo warning_info = 7; + + // The status of the destination. + oneof status { + // The status of the ingest audience members request. + IngestAudienceMembersStatus audience_members_ingestion_status = 4; + + // The status of the ingest events request. + IngestEventsStatus events_ingestion_status = 5; + + // The status of the remove audience members request. + RemoveAudienceMembersStatus audience_members_removal_status = 6; + } +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto new file mode 100644 index 000000000000..71a6b4ce8994 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto @@ -0,0 +1,51 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "TermsOfServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The terms of service that the user has accepted/rejected. +message TermsOfService { + // Optional. The Customer Match terms of service: + // https://support.google.com/adspolicy/answer/6299717. This must be + // accepted when ingesting + // [UserData][google.ads.datamanager.v1.UserData] + // or [MobileData][google.ads.datamanager.v1.MobileData]. + // This field is not required for Partner Match User list. + TermsOfServiceStatus customer_match_terms_of_service_status = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the caller's decision to accept or reject the terms of service. +enum TermsOfServiceStatus { + // Not specified. + TERMS_OF_SERVICE_STATUS_UNSPECIFIED = 0; + + // Status indicating the caller has chosen to accept the terms of service. + ACCEPTED = 1; + + // Status indicating the caller has chosen to reject the terms of service. + REJECTED = 2; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto new file mode 100644 index 000000000000..649f9f41d150 --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto @@ -0,0 +1,74 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "UserDataProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Data that identifies the user. At least one identifier is required. +message UserData { + // Required. The identifiers for the user. It's possible to provide multiple + // instances of the same type of data (for example, multiple email addresses). + // To increase the likelihood of a match, provide as many identifiers as + // possible. At most 10 `userIdentifiers` can be provided in a single + // [AudienceMember][google.ads.datamanager.v1.AudienceMember] or + // [Event][google.ads.datamanager.v1.Event]. + repeated UserIdentifier user_identifiers = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// A single identifier for the user. +message UserIdentifier { + // Exactly one must be specified. + oneof identifier { + // Hashed email address using SHA-256 hash function after normalization. + string email_address = 1; + + // Hashed phone number using SHA-256 hash function after normalization (E164 + // standard). + string phone_number = 2; + + // The known components of a user's address. Holds a grouping + // of identifiers that are matched all at once. + AddressInfo address = 3; + } +} + +// Address information for the user. +message AddressInfo { + // Required. Given (first) name of the user, all lowercase, with no + // punctuation, no leading or trailing whitespace, and hashed as SHA-256. + string given_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Family (last) name of the user, all lowercase, with no + // punctuation, no leading or trailing whitespace, and hashed as SHA-256. + string family_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's + // address. + string region_code = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The postal code of the user's address. + string postal_code = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto new file mode 100644 index 000000000000..61687701be4b --- /dev/null +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto @@ -0,0 +1,69 @@ +// Copyright 2025 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.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager"; +option java_multiple_files = true; +option java_outer_classname = "UserPropertiesProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Advertiser-assessed information about the user at the time that the event +// happened. See https://support.google.com/google-ads/answer/14007601 for more +// details. +message UserProperties { + // Optional. Type of the customer associated with the event. + CustomerType customer_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The advertiser-assessed value of the customer. + CustomerValueBucket customer_value_bucket = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Type of the customer associated with the event. +enum CustomerType { + // Unspecified CustomerType. Should never be used. + CUSTOMER_TYPE_UNSPECIFIED = 0; + + // The customer is new to the advertiser. + NEW = 1; + + // The customer is returning to the advertiser. + RETURNING = 2; + + // The customer has re-engaged with the advertiser. + REENGAGED = 3; +} + +// The advertiser-assessed value of the customer. +enum CustomerValueBucket { + // Unspecified CustomerValueBucket. Should never be used. + CUSTOMER_VALUE_BUCKET_UNSPECIFIED = 0; + + // The customer is low value. + LOW = 1; + + // The customer is medium value. + MEDIUM = 2; + + // The customer is high value. + HIGH = 3; +} diff --git a/packages/google-ads-datamanager/protos/protos.d.ts b/packages/google-ads-datamanager/protos/protos.d.ts new file mode 100644 index 000000000000..f78d4741d261 --- /dev/null +++ b/packages/google-ads-datamanager/protos/protos.d.ts @@ -0,0 +1,11090 @@ +// Copyright 2025 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace ads. */ + namespace ads { + + /** Namespace datamanager. */ + namespace datamanager { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an AudienceMember. */ + interface IAudienceMember { + + /** AudienceMember destinationReferences */ + destinationReferences?: (string[]|null); + + /** AudienceMember userData */ + userData?: (google.ads.datamanager.v1.IUserData|null); + + /** AudienceMember pairData */ + pairData?: (google.ads.datamanager.v1.IPairData|null); + + /** AudienceMember mobileData */ + mobileData?: (google.ads.datamanager.v1.IMobileData|null); + + /** AudienceMember consent */ + consent?: (google.ads.datamanager.v1.IConsent|null); + } + + /** Represents an AudienceMember. */ + class AudienceMember implements IAudienceMember { + + /** + * Constructs a new AudienceMember. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IAudienceMember); + + /** AudienceMember destinationReferences. */ + public destinationReferences: string[]; + + /** AudienceMember userData. */ + public userData?: (google.ads.datamanager.v1.IUserData|null); + + /** AudienceMember pairData. */ + public pairData?: (google.ads.datamanager.v1.IPairData|null); + + /** AudienceMember mobileData. */ + public mobileData?: (google.ads.datamanager.v1.IMobileData|null); + + /** AudienceMember consent. */ + public consent?: (google.ads.datamanager.v1.IConsent|null); + + /** AudienceMember data. */ + public data?: ("userData"|"pairData"|"mobileData"); + + /** + * Creates a new AudienceMember instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceMember instance + */ + public static create(properties?: google.ads.datamanager.v1.IAudienceMember): google.ads.datamanager.v1.AudienceMember; + + /** + * Encodes the specified AudienceMember message. Does not implicitly {@link google.ads.datamanager.v1.AudienceMember.verify|verify} messages. + * @param message AudienceMember message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IAudienceMember, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceMember message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AudienceMember.verify|verify} messages. + * @param message AudienceMember message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IAudienceMember, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceMember message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceMember + * @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.ads.datamanager.v1.AudienceMember; + + /** + * Decodes an AudienceMember message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceMember + * @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.ads.datamanager.v1.AudienceMember; + + /** + * Verifies an AudienceMember 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 AudienceMember message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceMember + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.AudienceMember; + + /** + * Creates a plain object from an AudienceMember message. Also converts values to other types if specified. + * @param message AudienceMember + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.AudienceMember, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceMember to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceMember + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairData. */ + interface IPairData { + + /** PairData pairIds */ + pairIds?: (string[]|null); + } + + /** Represents a PairData. */ + class PairData implements IPairData { + + /** + * Constructs a new PairData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPairData); + + /** PairData pairIds. */ + public pairIds: string[]; + + /** + * Creates a new PairData instance using the specified properties. + * @param [properties] Properties to set + * @returns PairData instance + */ + public static create(properties?: google.ads.datamanager.v1.IPairData): google.ads.datamanager.v1.PairData; + + /** + * Encodes the specified PairData message. Does not implicitly {@link google.ads.datamanager.v1.PairData.verify|verify} messages. + * @param message PairData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPairData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairData.verify|verify} messages. + * @param message PairData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPairData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairData + * @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.ads.datamanager.v1.PairData; + + /** + * Decodes a PairData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairData + * @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.ads.datamanager.v1.PairData; + + /** + * Verifies a PairData 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 PairData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PairData; + + /** + * Creates a plain object from a PairData message. Also converts values to other types if specified. + * @param message PairData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PairData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileData. */ + interface IMobileData { + + /** MobileData mobileIds */ + mobileIds?: (string[]|null); + } + + /** Represents a MobileData. */ + class MobileData implements IMobileData { + + /** + * Constructs a new MobileData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IMobileData); + + /** MobileData mobileIds. */ + public mobileIds: string[]; + + /** + * Creates a new MobileData instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileData instance + */ + public static create(properties?: google.ads.datamanager.v1.IMobileData): google.ads.datamanager.v1.MobileData; + + /** + * Encodes the specified MobileData message. Does not implicitly {@link google.ads.datamanager.v1.MobileData.verify|verify} messages. + * @param message MobileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IMobileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileData.verify|verify} messages. + * @param message MobileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IMobileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileData + * @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.ads.datamanager.v1.MobileData; + + /** + * Decodes a MobileData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileData + * @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.ads.datamanager.v1.MobileData; + + /** + * Verifies a MobileData 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 MobileData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.MobileData; + + /** + * Creates a plain object from a MobileData message. Also converts values to other types if specified. + * @param message MobileData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.MobileData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Consent. */ + interface IConsent { + + /** Consent adUserData */ + adUserData?: (google.ads.datamanager.v1.ConsentStatus|keyof typeof google.ads.datamanager.v1.ConsentStatus|null); + + /** Consent adPersonalization */ + adPersonalization?: (google.ads.datamanager.v1.ConsentStatus|keyof typeof google.ads.datamanager.v1.ConsentStatus|null); + } + + /** Represents a Consent. */ + class Consent implements IConsent { + + /** + * Constructs a new Consent. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IConsent); + + /** Consent adUserData. */ + public adUserData: (google.ads.datamanager.v1.ConsentStatus|keyof typeof google.ads.datamanager.v1.ConsentStatus); + + /** Consent adPersonalization. */ + public adPersonalization: (google.ads.datamanager.v1.ConsentStatus|keyof typeof google.ads.datamanager.v1.ConsentStatus); + + /** + * Creates a new Consent instance using the specified properties. + * @param [properties] Properties to set + * @returns Consent instance + */ + public static create(properties?: google.ads.datamanager.v1.IConsent): google.ads.datamanager.v1.Consent; + + /** + * Encodes the specified Consent message. Does not implicitly {@link google.ads.datamanager.v1.Consent.verify|verify} messages. + * @param message Consent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IConsent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Consent message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Consent.verify|verify} messages. + * @param message Consent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IConsent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Consent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Consent + * @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.ads.datamanager.v1.Consent; + + /** + * Decodes a Consent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Consent + * @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.ads.datamanager.v1.Consent; + + /** + * Verifies a Consent 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 Consent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Consent + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Consent; + + /** + * Creates a plain object from a Consent message. Also converts values to other types if specified. + * @param message Consent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Consent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Consent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Consent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ConsentStatus enum. */ + enum ConsentStatus { + CONSENT_STATUS_UNSPECIFIED = 0, + CONSENT_GRANTED = 1, + CONSENT_DENIED = 2 + } + + /** Properties of a UserData. */ + interface IUserData { + + /** UserData userIdentifiers */ + userIdentifiers?: (google.ads.datamanager.v1.IUserIdentifier[]|null); + } + + /** Represents a UserData. */ + class UserData implements IUserData { + + /** + * Constructs a new UserData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserData); + + /** UserData userIdentifiers. */ + public userIdentifiers: google.ads.datamanager.v1.IUserIdentifier[]; + + /** + * Creates a new UserData instance using the specified properties. + * @param [properties] Properties to set + * @returns UserData instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserData): google.ads.datamanager.v1.UserData; + + /** + * Encodes the specified UserData message. Does not implicitly {@link google.ads.datamanager.v1.UserData.verify|verify} messages. + * @param message UserData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserData.verify|verify} messages. + * @param message UserData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserData + * @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.ads.datamanager.v1.UserData; + + /** + * Decodes a UserData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserData + * @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.ads.datamanager.v1.UserData; + + /** + * Verifies a UserData 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 UserData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserData; + + /** + * Creates a plain object from a UserData message. Also converts values to other types if specified. + * @param message UserData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserIdentifier. */ + interface IUserIdentifier { + + /** UserIdentifier emailAddress */ + emailAddress?: (string|null); + + /** UserIdentifier phoneNumber */ + phoneNumber?: (string|null); + + /** UserIdentifier address */ + address?: (google.ads.datamanager.v1.IAddressInfo|null); + } + + /** Represents a UserIdentifier. */ + class UserIdentifier implements IUserIdentifier { + + /** + * Constructs a new UserIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserIdentifier); + + /** UserIdentifier emailAddress. */ + public emailAddress?: (string|null); + + /** UserIdentifier phoneNumber. */ + public phoneNumber?: (string|null); + + /** UserIdentifier address. */ + public address?: (google.ads.datamanager.v1.IAddressInfo|null); + + /** UserIdentifier identifier. */ + public identifier?: ("emailAddress"|"phoneNumber"|"address"); + + /** + * Creates a new UserIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns UserIdentifier instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserIdentifier): google.ads.datamanager.v1.UserIdentifier; + + /** + * Encodes the specified UserIdentifier message. Does not implicitly {@link google.ads.datamanager.v1.UserIdentifier.verify|verify} messages. + * @param message UserIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserIdentifier message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdentifier.verify|verify} messages. + * @param message UserIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserIdentifier + * @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.ads.datamanager.v1.UserIdentifier; + + /** + * Decodes a UserIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserIdentifier + * @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.ads.datamanager.v1.UserIdentifier; + + /** + * Verifies a UserIdentifier 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 UserIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdentifier; + + /** + * Creates a plain object from a UserIdentifier message. Also converts values to other types if specified. + * @param message UserIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddressInfo. */ + interface IAddressInfo { + + /** AddressInfo givenName */ + givenName?: (string|null); + + /** AddressInfo familyName */ + familyName?: (string|null); + + /** AddressInfo regionCode */ + regionCode?: (string|null); + + /** AddressInfo postalCode */ + postalCode?: (string|null); + } + + /** Represents an AddressInfo. */ + class AddressInfo implements IAddressInfo { + + /** + * Constructs a new AddressInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IAddressInfo); + + /** AddressInfo givenName. */ + public givenName: string; + + /** AddressInfo familyName. */ + public familyName: string; + + /** AddressInfo regionCode. */ + public regionCode: string; + + /** AddressInfo postalCode. */ + public postalCode: string; + + /** + * Creates a new AddressInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IAddressInfo): google.ads.datamanager.v1.AddressInfo; + + /** + * Encodes the specified AddressInfo message. Does not implicitly {@link google.ads.datamanager.v1.AddressInfo.verify|verify} messages. + * @param message AddressInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IAddressInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddressInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AddressInfo.verify|verify} messages. + * @param message AddressInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IAddressInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddressInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressInfo + * @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.ads.datamanager.v1.AddressInfo; + + /** + * Decodes an AddressInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressInfo + * @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.ads.datamanager.v1.AddressInfo; + + /** + * Verifies an AddressInfo 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 AddressInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.AddressInfo; + + /** + * Creates a plain object from an AddressInfo message. Also converts values to other types if specified. + * @param message AddressInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.AddressInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddressInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddressInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CartData. */ + interface ICartData { + + /** CartData merchantId */ + merchantId?: (string|null); + + /** CartData merchantFeedLabel */ + merchantFeedLabel?: (string|null); + + /** CartData merchantFeedLanguageCode */ + merchantFeedLanguageCode?: (string|null); + + /** CartData transactionDiscount */ + transactionDiscount?: (number|null); + + /** CartData items */ + items?: (google.ads.datamanager.v1.IItem[]|null); + } + + /** Represents a CartData. */ + class CartData implements ICartData { + + /** + * Constructs a new CartData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICartData); + + /** CartData merchantId. */ + public merchantId: string; + + /** CartData merchantFeedLabel. */ + public merchantFeedLabel: string; + + /** CartData merchantFeedLanguageCode. */ + public merchantFeedLanguageCode: string; + + /** CartData transactionDiscount. */ + public transactionDiscount: number; + + /** CartData items. */ + public items: google.ads.datamanager.v1.IItem[]; + + /** + * Creates a new CartData instance using the specified properties. + * @param [properties] Properties to set + * @returns CartData instance + */ + public static create(properties?: google.ads.datamanager.v1.ICartData): google.ads.datamanager.v1.CartData; + + /** + * Encodes the specified CartData message. Does not implicitly {@link google.ads.datamanager.v1.CartData.verify|verify} messages. + * @param message CartData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICartData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CartData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CartData.verify|verify} messages. + * @param message CartData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICartData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CartData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CartData + * @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.ads.datamanager.v1.CartData; + + /** + * Decodes a CartData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CartData + * @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.ads.datamanager.v1.CartData; + + /** + * Verifies a CartData 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 CartData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CartData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CartData; + + /** + * Creates a plain object from a CartData message. Also converts values to other types if specified. + * @param message CartData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CartData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CartData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CartData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Item. */ + interface IItem { + + /** Item merchantProductId */ + merchantProductId?: (string|null); + + /** Item quantity */ + quantity?: (number|Long|string|null); + + /** Item unitPrice */ + unitPrice?: (number|null); + } + + /** Represents an Item. */ + class Item implements IItem { + + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IItem); + + /** Item merchantProductId. */ + public merchantProductId: string; + + /** Item quantity. */ + public quantity: (number|Long|string); + + /** Item unitPrice. */ + public unitPrice: number; + + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.ads.datamanager.v1.IItem): google.ads.datamanager.v1.Item; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.ads.datamanager.v1.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @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.ads.datamanager.v1.Item; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @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.ads.datamanager.v1.Item; + + /** + * Verifies an Item 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 Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Item; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Item + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Destination. */ + interface IDestination { + + /** Destination reference */ + reference?: (string|null); + + /** Destination loginAccount */ + loginAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination linkedAccount */ + linkedAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination operatingAccount */ + operatingAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination productDestinationId */ + productDestinationId?: (string|null); + } + + /** Represents a Destination. */ + class Destination implements IDestination { + + /** + * Constructs a new Destination. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IDestination); + + /** Destination reference. */ + public reference: string; + + /** Destination loginAccount. */ + public loginAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination linkedAccount. */ + public linkedAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination operatingAccount. */ + public operatingAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** Destination productDestinationId. */ + public productDestinationId: string; + + /** + * Creates a new Destination instance using the specified properties. + * @param [properties] Properties to set + * @returns Destination instance + */ + public static create(properties?: google.ads.datamanager.v1.IDestination): google.ads.datamanager.v1.Destination; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.ads.datamanager.v1.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Destination + * @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.ads.datamanager.v1.Destination; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Destination + * @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.ads.datamanager.v1.Destination; + + /** + * Verifies a Destination 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 Destination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Destination + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Destination; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @param message Destination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Destination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Destination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Destination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProductAccount. */ + interface IProductAccount { + + /** ProductAccount product */ + product?: (google.ads.datamanager.v1.Product|keyof typeof google.ads.datamanager.v1.Product|null); + + /** ProductAccount accountId */ + accountId?: (string|null); + + /** ProductAccount accountType */ + accountType?: (google.ads.datamanager.v1.ProductAccount.AccountType|keyof typeof google.ads.datamanager.v1.ProductAccount.AccountType|null); + } + + /** Represents a ProductAccount. */ + class ProductAccount implements IProductAccount { + + /** + * Constructs a new ProductAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IProductAccount); + + /** ProductAccount product. */ + public product: (google.ads.datamanager.v1.Product|keyof typeof google.ads.datamanager.v1.Product); + + /** ProductAccount accountId. */ + public accountId: string; + + /** ProductAccount accountType. */ + public accountType: (google.ads.datamanager.v1.ProductAccount.AccountType|keyof typeof google.ads.datamanager.v1.ProductAccount.AccountType); + + /** + * Creates a new ProductAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductAccount instance + */ + public static create(properties?: google.ads.datamanager.v1.IProductAccount): google.ads.datamanager.v1.ProductAccount; + + /** + * Encodes the specified ProductAccount message. Does not implicitly {@link google.ads.datamanager.v1.ProductAccount.verify|verify} messages. + * @param message ProductAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IProductAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductAccount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ProductAccount.verify|verify} messages. + * @param message ProductAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IProductAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductAccount + * @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.ads.datamanager.v1.ProductAccount; + + /** + * Decodes a ProductAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductAccount + * @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.ads.datamanager.v1.ProductAccount; + + /** + * Verifies a ProductAccount 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 ProductAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductAccount + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ProductAccount; + + /** + * Creates a plain object from a ProductAccount message. Also converts values to other types if specified. + * @param message ProductAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ProductAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProductAccount { + + /** AccountType enum. */ + enum AccountType { + ACCOUNT_TYPE_UNSPECIFIED = 0, + GOOGLE_ADS = 1, + DISPLAY_VIDEO_PARTNER = 2, + DISPLAY_VIDEO_ADVERTISER = 3, + DATA_PARTNER = 4 + } + } + + /** Product enum. */ + enum Product { + PRODUCT_UNSPECIFIED = 0, + GOOGLE_ADS = 1, + DISPLAY_VIDEO_PARTNER = 2, + DISPLAY_VIDEO_ADVERTISER = 3, + DATA_PARTNER = 4 + } + + /** Properties of a DeviceInfo. */ + interface IDeviceInfo { + + /** DeviceInfo userAgent */ + userAgent?: (string|null); + + /** DeviceInfo ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a DeviceInfo. */ + class DeviceInfo implements IDeviceInfo { + + /** + * Constructs a new DeviceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IDeviceInfo); + + /** DeviceInfo userAgent. */ + public userAgent: string; + + /** DeviceInfo ipAddress. */ + public ipAddress: string; + + /** + * Creates a new DeviceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IDeviceInfo): google.ads.datamanager.v1.DeviceInfo; + + /** + * Encodes the specified DeviceInfo message. Does not implicitly {@link google.ads.datamanager.v1.DeviceInfo.verify|verify} messages. + * @param message DeviceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IDeviceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeviceInfo.verify|verify} messages. + * @param message DeviceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IDeviceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceInfo + * @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.ads.datamanager.v1.DeviceInfo; + + /** + * Decodes a DeviceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceInfo + * @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.ads.datamanager.v1.DeviceInfo; + + /** + * Verifies a DeviceInfo 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 DeviceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeviceInfo; + + /** + * Creates a plain object from a DeviceInfo message. Also converts values to other types if specified. + * @param message DeviceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.DeviceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptionInfo. */ + interface IEncryptionInfo { + + /** EncryptionInfo gcpWrappedKeyInfo */ + gcpWrappedKeyInfo?: (google.ads.datamanager.v1.IGcpWrappedKeyInfo|null); + } + + /** Represents an EncryptionInfo. */ + class EncryptionInfo implements IEncryptionInfo { + + /** + * Constructs a new EncryptionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IEncryptionInfo); + + /** EncryptionInfo gcpWrappedKeyInfo. */ + public gcpWrappedKeyInfo?: (google.ads.datamanager.v1.IGcpWrappedKeyInfo|null); + + /** EncryptionInfo wrappedKey. */ + public wrappedKey?: "gcpWrappedKeyInfo"; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IEncryptionInfo): google.ads.datamanager.v1.EncryptionInfo; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.ads.datamanager.v1.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionInfo + * @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.ads.datamanager.v1.EncryptionInfo; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionInfo + * @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.ads.datamanager.v1.EncryptionInfo; + + /** + * Verifies an EncryptionInfo 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 EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.EncryptionInfo; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @param message EncryptionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpWrappedKeyInfo. */ + interface IGcpWrappedKeyInfo { + + /** GcpWrappedKeyInfo keyType */ + keyType?: (google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType|null); + + /** GcpWrappedKeyInfo wipProvider */ + wipProvider?: (string|null); + + /** GcpWrappedKeyInfo kekUri */ + kekUri?: (string|null); + + /** GcpWrappedKeyInfo encryptedDek */ + encryptedDek?: (string|null); + } + + /** Represents a GcpWrappedKeyInfo. */ + class GcpWrappedKeyInfo implements IGcpWrappedKeyInfo { + + /** + * Constructs a new GcpWrappedKeyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGcpWrappedKeyInfo); + + /** GcpWrappedKeyInfo keyType. */ + public keyType: (google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType); + + /** GcpWrappedKeyInfo wipProvider. */ + public wipProvider: string; + + /** GcpWrappedKeyInfo kekUri. */ + public kekUri: string; + + /** GcpWrappedKeyInfo encryptedDek. */ + public encryptedDek: string; + + /** + * Creates a new GcpWrappedKeyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpWrappedKeyInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IGcpWrappedKeyInfo): google.ads.datamanager.v1.GcpWrappedKeyInfo; + + /** + * Encodes the specified GcpWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.GcpWrappedKeyInfo.verify|verify} messages. + * @param message GcpWrappedKeyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGcpWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GcpWrappedKeyInfo.verify|verify} messages. + * @param message GcpWrappedKeyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGcpWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpWrappedKeyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpWrappedKeyInfo + * @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.ads.datamanager.v1.GcpWrappedKeyInfo; + + /** + * Decodes a GcpWrappedKeyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpWrappedKeyInfo + * @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.ads.datamanager.v1.GcpWrappedKeyInfo; + + /** + * Verifies a GcpWrappedKeyInfo 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 GcpWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpWrappedKeyInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GcpWrappedKeyInfo; + + /** + * Creates a plain object from a GcpWrappedKeyInfo message. Also converts values to other types if specified. + * @param message GcpWrappedKeyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GcpWrappedKeyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpWrappedKeyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpWrappedKeyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GcpWrappedKeyInfo { + + /** KeyType enum. */ + enum KeyType { + KEY_TYPE_UNSPECIFIED = 0, + XCHACHA20_POLY1305 = 1 + } + } + + /** ErrorReason enum. */ + enum ErrorReason { + ERROR_REASON_UNSPECIFIED = 0, + INTERNAL_ERROR = 1, + DEADLINE_EXCEEDED = 2, + RESOURCE_EXHAUSTED = 3, + NOT_FOUND = 4, + PERMISSION_DENIED = 5, + INVALID_ARGUMENT = 6, + REQUIRED_FIELD_MISSING = 7, + INVALID_FORMAT = 8, + INVALID_HEX_ENCODING = 9, + INVALID_BASE64_ENCODING = 10, + INVALID_SHA256_FORMAT = 11, + INVALID_POSTAL_CODE = 12, + INVALID_COUNTRY_CODE = 13, + INVALID_ENUM_VALUE = 14, + INVALID_USER_LIST_TYPE = 15, + INVALID_AUDIENCE_MEMBER = 16, + TOO_MANY_AUDIENCE_MEMBERS = 17, + TOO_MANY_USER_IDENTIFIERS = 18, + TOO_MANY_DESTINATIONS = 19, + INVALID_DESTINATION = 20, + DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED = 21, + INVALID_MOBILE_ID_FORMAT = 22, + INVALID_USER_LIST_ID = 23, + MULTIPLE_DATA_TYPES_NOT_ALLOWED = 24, + DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER = 25, + TERMS_AND_CONDITIONS_NOT_SIGNED = 26, + INVALID_NUMBER_FORMAT = 27, + INVALID_CONVERSION_ACTION_ID = 28, + INVALID_CONVERSION_ACTION_TYPE = 29, + INVALID_CURRENCY_CODE = 30, + INVALID_EVENT = 31, + TOO_MANY_EVENTS = 32, + DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS = 33, + DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS = 34, + DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED = 35, + DUPLICATE_DESTINATION_REFERENCE = 36, + NO_IDENTIFIERS_PROVIDED = 39, + INVALID_REQUEST_ID = 48 + } + + /** Properties of an Event. */ + interface IEvent { + + /** Event destinationReferences */ + destinationReferences?: (string[]|null); + + /** Event transactionId */ + transactionId?: (string|null); + + /** Event eventTimestamp */ + eventTimestamp?: (google.protobuf.ITimestamp|null); + + /** Event lastUpdatedTimestamp */ + lastUpdatedTimestamp?: (google.protobuf.ITimestamp|null); + + /** Event userData */ + userData?: (google.ads.datamanager.v1.IUserData|null); + + /** Event consent */ + consent?: (google.ads.datamanager.v1.IConsent|null); + + /** Event adIdentifiers */ + adIdentifiers?: (google.ads.datamanager.v1.IAdIdentifiers|null); + + /** Event currency */ + currency?: (string|null); + + /** Event conversionValue */ + conversionValue?: (number|null); + + /** Event eventSource */ + eventSource?: (google.ads.datamanager.v1.EventSource|keyof typeof google.ads.datamanager.v1.EventSource|null); + + /** Event eventDeviceInfo */ + eventDeviceInfo?: (google.ads.datamanager.v1.IDeviceInfo|null); + + /** Event cartData */ + cartData?: (google.ads.datamanager.v1.ICartData|null); + + /** Event customVariables */ + customVariables?: (google.ads.datamanager.v1.ICustomVariable[]|null); + + /** Event experimentalFields */ + experimentalFields?: (google.ads.datamanager.v1.IExperimentalField[]|null); + + /** Event userProperties */ + userProperties?: (google.ads.datamanager.v1.IUserProperties|null); + } + + /** Represents an Event. */ + class Event implements IEvent { + + /** + * Constructs a new Event. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IEvent); + + /** Event destinationReferences. */ + public destinationReferences: string[]; + + /** Event transactionId. */ + public transactionId: string; + + /** Event eventTimestamp. */ + public eventTimestamp?: (google.protobuf.ITimestamp|null); + + /** Event lastUpdatedTimestamp. */ + public lastUpdatedTimestamp?: (google.protobuf.ITimestamp|null); + + /** Event userData. */ + public userData?: (google.ads.datamanager.v1.IUserData|null); + + /** Event consent. */ + public consent?: (google.ads.datamanager.v1.IConsent|null); + + /** Event adIdentifiers. */ + public adIdentifiers?: (google.ads.datamanager.v1.IAdIdentifiers|null); + + /** Event currency. */ + public currency: string; + + /** Event conversionValue. */ + public conversionValue: number; + + /** Event eventSource. */ + public eventSource: (google.ads.datamanager.v1.EventSource|keyof typeof google.ads.datamanager.v1.EventSource); + + /** Event eventDeviceInfo. */ + public eventDeviceInfo?: (google.ads.datamanager.v1.IDeviceInfo|null); + + /** Event cartData. */ + public cartData?: (google.ads.datamanager.v1.ICartData|null); + + /** Event customVariables. */ + public customVariables: google.ads.datamanager.v1.ICustomVariable[]; + + /** Event experimentalFields. */ + public experimentalFields: google.ads.datamanager.v1.IExperimentalField[]; + + /** Event userProperties. */ + public userProperties?: (google.ads.datamanager.v1.IUserProperties|null); + + /** + * Creates a new Event instance using the specified properties. + * @param [properties] Properties to set + * @returns Event instance + */ + public static create(properties?: google.ads.datamanager.v1.IEvent): google.ads.datamanager.v1.Event; + + /** + * Encodes the specified Event message. Does not implicitly {@link google.ads.datamanager.v1.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Event + * @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.ads.datamanager.v1.Event; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Event + * @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.ads.datamanager.v1.Event; + + /** + * Verifies an Event 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 Event message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Event + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Event; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @param message Event + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Event to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Event + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdIdentifiers. */ + interface IAdIdentifiers { + + /** AdIdentifiers sessionAttributes */ + sessionAttributes?: (string|null); + + /** AdIdentifiers gclid */ + gclid?: (string|null); + + /** AdIdentifiers gbraid */ + gbraid?: (string|null); + + /** AdIdentifiers wbraid */ + wbraid?: (string|null); + + /** AdIdentifiers landingPageDeviceInfo */ + landingPageDeviceInfo?: (google.ads.datamanager.v1.IDeviceInfo|null); + } + + /** Represents an AdIdentifiers. */ + class AdIdentifiers implements IAdIdentifiers { + + /** + * Constructs a new AdIdentifiers. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IAdIdentifiers); + + /** AdIdentifiers sessionAttributes. */ + public sessionAttributes: string; + + /** AdIdentifiers gclid. */ + public gclid: string; + + /** AdIdentifiers gbraid. */ + public gbraid: string; + + /** AdIdentifiers wbraid. */ + public wbraid: string; + + /** AdIdentifiers landingPageDeviceInfo. */ + public landingPageDeviceInfo?: (google.ads.datamanager.v1.IDeviceInfo|null); + + /** + * Creates a new AdIdentifiers instance using the specified properties. + * @param [properties] Properties to set + * @returns AdIdentifiers instance + */ + public static create(properties?: google.ads.datamanager.v1.IAdIdentifiers): google.ads.datamanager.v1.AdIdentifiers; + + /** + * Encodes the specified AdIdentifiers message. Does not implicitly {@link google.ads.datamanager.v1.AdIdentifiers.verify|verify} messages. + * @param message AdIdentifiers message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IAdIdentifiers, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdIdentifiers message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AdIdentifiers.verify|verify} messages. + * @param message AdIdentifiers message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IAdIdentifiers, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdIdentifiers message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdIdentifiers + * @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.ads.datamanager.v1.AdIdentifiers; + + /** + * Decodes an AdIdentifiers message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdIdentifiers + * @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.ads.datamanager.v1.AdIdentifiers; + + /** + * Verifies an AdIdentifiers 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 AdIdentifiers message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdIdentifiers + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.AdIdentifiers; + + /** + * Creates a plain object from an AdIdentifiers message. Also converts values to other types if specified. + * @param message AdIdentifiers + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.AdIdentifiers, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdIdentifiers to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdIdentifiers + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomVariable. */ + interface ICustomVariable { + + /** CustomVariable variable */ + variable?: (string|null); + + /** CustomVariable value */ + value?: (string|null); + + /** CustomVariable destinationReferences */ + destinationReferences?: (string[]|null); + } + + /** Represents a CustomVariable. */ + class CustomVariable implements ICustomVariable { + + /** + * Constructs a new CustomVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICustomVariable); + + /** CustomVariable variable. */ + public variable: string; + + /** CustomVariable value. */ + public value: string; + + /** CustomVariable destinationReferences. */ + public destinationReferences: string[]; + + /** + * Creates a new CustomVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomVariable instance + */ + public static create(properties?: google.ads.datamanager.v1.ICustomVariable): google.ads.datamanager.v1.CustomVariable; + + /** + * Encodes the specified CustomVariable message. Does not implicitly {@link google.ads.datamanager.v1.CustomVariable.verify|verify} messages. + * @param message CustomVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICustomVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomVariable message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CustomVariable.verify|verify} messages. + * @param message CustomVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICustomVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomVariable + * @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.ads.datamanager.v1.CustomVariable; + + /** + * Decodes a CustomVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomVariable + * @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.ads.datamanager.v1.CustomVariable; + + /** + * Verifies a CustomVariable 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 CustomVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomVariable + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CustomVariable; + + /** + * Creates a plain object from a CustomVariable message. Also converts values to other types if specified. + * @param message CustomVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CustomVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventSource enum. */ + enum EventSource { + EVENT_SOURCE_UNSPECIFIED = 0, + WEB = 1, + APP = 2, + IN_STORE = 3, + PHONE = 4, + OTHER = 5 + } + + /** Properties of an ExperimentalField. */ + interface IExperimentalField { + + /** ExperimentalField field */ + field?: (string|null); + + /** ExperimentalField value */ + value?: (string|null); + } + + /** Represents an ExperimentalField. */ + class ExperimentalField implements IExperimentalField { + + /** + * Constructs a new ExperimentalField. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IExperimentalField); + + /** ExperimentalField field. */ + public field: string; + + /** ExperimentalField value. */ + public value: string; + + /** + * Creates a new ExperimentalField instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalField instance + */ + public static create(properties?: google.ads.datamanager.v1.IExperimentalField): google.ads.datamanager.v1.ExperimentalField; + + /** + * Encodes the specified ExperimentalField message. Does not implicitly {@link google.ads.datamanager.v1.ExperimentalField.verify|verify} messages. + * @param message ExperimentalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IExperimentalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalField message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ExperimentalField.verify|verify} messages. + * @param message ExperimentalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IExperimentalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalField + * @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.ads.datamanager.v1.ExperimentalField; + + /** + * Decodes an ExperimentalField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalField + * @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.ads.datamanager.v1.ExperimentalField; + + /** + * Verifies an ExperimentalField 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 ExperimentalField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalField + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ExperimentalField; + + /** + * Creates a plain object from an ExperimentalField message. Also converts values to other types if specified. + * @param message ExperimentalField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ExperimentalField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserProperties. */ + interface IUserProperties { + + /** UserProperties customerType */ + customerType?: (google.ads.datamanager.v1.CustomerType|keyof typeof google.ads.datamanager.v1.CustomerType|null); + + /** UserProperties customerValueBucket */ + customerValueBucket?: (google.ads.datamanager.v1.CustomerValueBucket|keyof typeof google.ads.datamanager.v1.CustomerValueBucket|null); + } + + /** Represents a UserProperties. */ + class UserProperties implements IUserProperties { + + /** + * Constructs a new UserProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserProperties); + + /** UserProperties customerType. */ + public customerType: (google.ads.datamanager.v1.CustomerType|keyof typeof google.ads.datamanager.v1.CustomerType); + + /** UserProperties customerValueBucket. */ + public customerValueBucket: (google.ads.datamanager.v1.CustomerValueBucket|keyof typeof google.ads.datamanager.v1.CustomerValueBucket); + + /** + * Creates a new UserProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns UserProperties instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserProperties): google.ads.datamanager.v1.UserProperties; + + /** + * Encodes the specified UserProperties message. Does not implicitly {@link google.ads.datamanager.v1.UserProperties.verify|verify} messages. + * @param message UserProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserProperties message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperties.verify|verify} messages. + * @param message UserProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserProperties + * @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.ads.datamanager.v1.UserProperties; + + /** + * Decodes a UserProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserProperties + * @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.ads.datamanager.v1.UserProperties; + + /** + * Verifies a UserProperties 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 UserProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserProperties + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserProperties; + + /** + * Creates a plain object from a UserProperties message. Also converts values to other types if specified. + * @param message UserProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** CustomerType enum. */ + enum CustomerType { + CUSTOMER_TYPE_UNSPECIFIED = 0, + NEW = 1, + RETURNING = 2, + REENGAGED = 3 + } + + /** CustomerValueBucket enum. */ + enum CustomerValueBucket { + CUSTOMER_VALUE_BUCKET_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3 + } + + /** Represents an IngestionService */ + class IngestionService extends $protobuf.rpc.Service { + + /** + * Constructs a new IngestionService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IngestionService 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): IngestionService; + + /** + * Calls IngestAudienceMembers. + * @param request IngestAudienceMembersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IngestAudienceMembersResponse + */ + public ingestAudienceMembers(request: google.ads.datamanager.v1.IIngestAudienceMembersRequest, callback: google.ads.datamanager.v1.IngestionService.IngestAudienceMembersCallback): void; + + /** + * Calls IngestAudienceMembers. + * @param request IngestAudienceMembersRequest message or plain object + * @returns Promise + */ + public ingestAudienceMembers(request: google.ads.datamanager.v1.IIngestAudienceMembersRequest): Promise; + + /** + * Calls RemoveAudienceMembers. + * @param request RemoveAudienceMembersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RemoveAudienceMembersResponse + */ + public removeAudienceMembers(request: google.ads.datamanager.v1.IRemoveAudienceMembersRequest, callback: google.ads.datamanager.v1.IngestionService.RemoveAudienceMembersCallback): void; + + /** + * Calls RemoveAudienceMembers. + * @param request RemoveAudienceMembersRequest message or plain object + * @returns Promise + */ + public removeAudienceMembers(request: google.ads.datamanager.v1.IRemoveAudienceMembersRequest): Promise; + + /** + * Calls IngestEvents. + * @param request IngestEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IngestEventsResponse + */ + public ingestEvents(request: google.ads.datamanager.v1.IIngestEventsRequest, callback: google.ads.datamanager.v1.IngestionService.IngestEventsCallback): void; + + /** + * Calls IngestEvents. + * @param request IngestEventsRequest message or plain object + * @returns Promise + */ + public ingestEvents(request: google.ads.datamanager.v1.IIngestEventsRequest): Promise; + + /** + * Calls RetrieveRequestStatus. + * @param request RetrieveRequestStatusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RetrieveRequestStatusResponse + */ + public retrieveRequestStatus(request: google.ads.datamanager.v1.IRetrieveRequestStatusRequest, callback: google.ads.datamanager.v1.IngestionService.RetrieveRequestStatusCallback): void; + + /** + * Calls RetrieveRequestStatus. + * @param request RetrieveRequestStatusRequest message or plain object + * @returns Promise + */ + public retrieveRequestStatus(request: google.ads.datamanager.v1.IRetrieveRequestStatusRequest): Promise; + } + + namespace IngestionService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|ingestAudienceMembers}. + * @param error Error, if any + * @param [response] IngestAudienceMembersResponse + */ + type IngestAudienceMembersCallback = (error: (Error|null), response?: google.ads.datamanager.v1.IngestAudienceMembersResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|removeAudienceMembers}. + * @param error Error, if any + * @param [response] RemoveAudienceMembersResponse + */ + type RemoveAudienceMembersCallback = (error: (Error|null), response?: google.ads.datamanager.v1.RemoveAudienceMembersResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|ingestEvents}. + * @param error Error, if any + * @param [response] IngestEventsResponse + */ + type IngestEventsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.IngestEventsResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|retrieveRequestStatus}. + * @param error Error, if any + * @param [response] RetrieveRequestStatusResponse + */ + type RetrieveRequestStatusCallback = (error: (Error|null), response?: google.ads.datamanager.v1.RetrieveRequestStatusResponse) => void; + } + + /** Properties of an IngestAudienceMembersRequest. */ + interface IIngestAudienceMembersRequest { + + /** IngestAudienceMembersRequest destinations */ + destinations?: (google.ads.datamanager.v1.IDestination[]|null); + + /** IngestAudienceMembersRequest audienceMembers */ + audienceMembers?: (google.ads.datamanager.v1.IAudienceMember[]|null); + + /** IngestAudienceMembersRequest consent */ + consent?: (google.ads.datamanager.v1.IConsent|null); + + /** IngestAudienceMembersRequest validateOnly */ + validateOnly?: (boolean|null); + + /** IngestAudienceMembersRequest encoding */ + encoding?: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding|null); + + /** IngestAudienceMembersRequest encryptionInfo */ + encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + + /** IngestAudienceMembersRequest termsOfService */ + termsOfService?: (google.ads.datamanager.v1.ITermsOfService|null); + } + + /** Represents an IngestAudienceMembersRequest. */ + class IngestAudienceMembersRequest implements IIngestAudienceMembersRequest { + + /** + * Constructs a new IngestAudienceMembersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestAudienceMembersRequest); + + /** IngestAudienceMembersRequest destinations. */ + public destinations: google.ads.datamanager.v1.IDestination[]; + + /** IngestAudienceMembersRequest audienceMembers. */ + public audienceMembers: google.ads.datamanager.v1.IAudienceMember[]; + + /** IngestAudienceMembersRequest consent. */ + public consent?: (google.ads.datamanager.v1.IConsent|null); + + /** IngestAudienceMembersRequest validateOnly. */ + public validateOnly: boolean; + + /** IngestAudienceMembersRequest encoding. */ + public encoding: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding); + + /** IngestAudienceMembersRequest encryptionInfo. */ + public encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + + /** IngestAudienceMembersRequest termsOfService. */ + public termsOfService?: (google.ads.datamanager.v1.ITermsOfService|null); + + /** + * Creates a new IngestAudienceMembersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestAudienceMembersRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestAudienceMembersRequest): google.ads.datamanager.v1.IngestAudienceMembersRequest; + + /** + * Encodes the specified IngestAudienceMembersRequest message. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersRequest.verify|verify} messages. + * @param message IngestAudienceMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestAudienceMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestAudienceMembersRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersRequest.verify|verify} messages. + * @param message IngestAudienceMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestAudienceMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestAudienceMembersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestAudienceMembersRequest + * @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.ads.datamanager.v1.IngestAudienceMembersRequest; + + /** + * Decodes an IngestAudienceMembersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestAudienceMembersRequest + * @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.ads.datamanager.v1.IngestAudienceMembersRequest; + + /** + * Verifies an IngestAudienceMembersRequest 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 IngestAudienceMembersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestAudienceMembersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestAudienceMembersRequest; + + /** + * Creates a plain object from an IngestAudienceMembersRequest message. Also converts values to other types if specified. + * @param message IngestAudienceMembersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestAudienceMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestAudienceMembersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestAudienceMembersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestAudienceMembersResponse. */ + interface IIngestAudienceMembersResponse { + + /** IngestAudienceMembersResponse requestId */ + requestId?: (string|null); + } + + /** Represents an IngestAudienceMembersResponse. */ + class IngestAudienceMembersResponse implements IIngestAudienceMembersResponse { + + /** + * Constructs a new IngestAudienceMembersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestAudienceMembersResponse); + + /** IngestAudienceMembersResponse requestId. */ + public requestId: string; + + /** + * Creates a new IngestAudienceMembersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestAudienceMembersResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestAudienceMembersResponse): google.ads.datamanager.v1.IngestAudienceMembersResponse; + + /** + * Encodes the specified IngestAudienceMembersResponse message. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersResponse.verify|verify} messages. + * @param message IngestAudienceMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestAudienceMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestAudienceMembersResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersResponse.verify|verify} messages. + * @param message IngestAudienceMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestAudienceMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestAudienceMembersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestAudienceMembersResponse + * @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.ads.datamanager.v1.IngestAudienceMembersResponse; + + /** + * Decodes an IngestAudienceMembersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestAudienceMembersResponse + * @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.ads.datamanager.v1.IngestAudienceMembersResponse; + + /** + * Verifies an IngestAudienceMembersResponse 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 IngestAudienceMembersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestAudienceMembersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestAudienceMembersResponse; + + /** + * Creates a plain object from an IngestAudienceMembersResponse message. Also converts values to other types if specified. + * @param message IngestAudienceMembersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestAudienceMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestAudienceMembersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestAudienceMembersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveAudienceMembersRequest. */ + interface IRemoveAudienceMembersRequest { + + /** RemoveAudienceMembersRequest destinations */ + destinations?: (google.ads.datamanager.v1.IDestination[]|null); + + /** RemoveAudienceMembersRequest audienceMembers */ + audienceMembers?: (google.ads.datamanager.v1.IAudienceMember[]|null); + + /** RemoveAudienceMembersRequest validateOnly */ + validateOnly?: (boolean|null); + + /** RemoveAudienceMembersRequest encoding */ + encoding?: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding|null); + + /** RemoveAudienceMembersRequest encryptionInfo */ + encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + } + + /** Represents a RemoveAudienceMembersRequest. */ + class RemoveAudienceMembersRequest implements IRemoveAudienceMembersRequest { + + /** + * Constructs a new RemoveAudienceMembersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRemoveAudienceMembersRequest); + + /** RemoveAudienceMembersRequest destinations. */ + public destinations: google.ads.datamanager.v1.IDestination[]; + + /** RemoveAudienceMembersRequest audienceMembers. */ + public audienceMembers: google.ads.datamanager.v1.IAudienceMember[]; + + /** RemoveAudienceMembersRequest validateOnly. */ + public validateOnly: boolean; + + /** RemoveAudienceMembersRequest encoding. */ + public encoding: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding); + + /** RemoveAudienceMembersRequest encryptionInfo. */ + public encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + + /** + * Creates a new RemoveAudienceMembersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveAudienceMembersRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IRemoveAudienceMembersRequest): google.ads.datamanager.v1.RemoveAudienceMembersRequest; + + /** + * Encodes the specified RemoveAudienceMembersRequest message. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersRequest.verify|verify} messages. + * @param message RemoveAudienceMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRemoveAudienceMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveAudienceMembersRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersRequest.verify|verify} messages. + * @param message RemoveAudienceMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRemoveAudienceMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveAudienceMembersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveAudienceMembersRequest + * @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.ads.datamanager.v1.RemoveAudienceMembersRequest; + + /** + * Decodes a RemoveAudienceMembersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveAudienceMembersRequest + * @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.ads.datamanager.v1.RemoveAudienceMembersRequest; + + /** + * Verifies a RemoveAudienceMembersRequest 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 RemoveAudienceMembersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveAudienceMembersRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RemoveAudienceMembersRequest; + + /** + * Creates a plain object from a RemoveAudienceMembersRequest message. Also converts values to other types if specified. + * @param message RemoveAudienceMembersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RemoveAudienceMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveAudienceMembersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveAudienceMembersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveAudienceMembersResponse. */ + interface IRemoveAudienceMembersResponse { + + /** RemoveAudienceMembersResponse requestId */ + requestId?: (string|null); + } + + /** Represents a RemoveAudienceMembersResponse. */ + class RemoveAudienceMembersResponse implements IRemoveAudienceMembersResponse { + + /** + * Constructs a new RemoveAudienceMembersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRemoveAudienceMembersResponse); + + /** RemoveAudienceMembersResponse requestId. */ + public requestId: string; + + /** + * Creates a new RemoveAudienceMembersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveAudienceMembersResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IRemoveAudienceMembersResponse): google.ads.datamanager.v1.RemoveAudienceMembersResponse; + + /** + * Encodes the specified RemoveAudienceMembersResponse message. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersResponse.verify|verify} messages. + * @param message RemoveAudienceMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRemoveAudienceMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveAudienceMembersResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersResponse.verify|verify} messages. + * @param message RemoveAudienceMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRemoveAudienceMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveAudienceMembersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveAudienceMembersResponse + * @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.ads.datamanager.v1.RemoveAudienceMembersResponse; + + /** + * Decodes a RemoveAudienceMembersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveAudienceMembersResponse + * @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.ads.datamanager.v1.RemoveAudienceMembersResponse; + + /** + * Verifies a RemoveAudienceMembersResponse 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 RemoveAudienceMembersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveAudienceMembersResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RemoveAudienceMembersResponse; + + /** + * Creates a plain object from a RemoveAudienceMembersResponse message. Also converts values to other types if specified. + * @param message RemoveAudienceMembersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RemoveAudienceMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveAudienceMembersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveAudienceMembersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestEventsRequest. */ + interface IIngestEventsRequest { + + /** IngestEventsRequest destinations */ + destinations?: (google.ads.datamanager.v1.IDestination[]|null); + + /** IngestEventsRequest events */ + events?: (google.ads.datamanager.v1.IEvent[]|null); + + /** IngestEventsRequest consent */ + consent?: (google.ads.datamanager.v1.IConsent|null); + + /** IngestEventsRequest validateOnly */ + validateOnly?: (boolean|null); + + /** IngestEventsRequest encoding */ + encoding?: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding|null); + + /** IngestEventsRequest encryptionInfo */ + encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + } + + /** Represents an IngestEventsRequest. */ + class IngestEventsRequest implements IIngestEventsRequest { + + /** + * Constructs a new IngestEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestEventsRequest); + + /** IngestEventsRequest destinations. */ + public destinations: google.ads.datamanager.v1.IDestination[]; + + /** IngestEventsRequest events. */ + public events: google.ads.datamanager.v1.IEvent[]; + + /** IngestEventsRequest consent. */ + public consent?: (google.ads.datamanager.v1.IConsent|null); + + /** IngestEventsRequest validateOnly. */ + public validateOnly: boolean; + + /** IngestEventsRequest encoding. */ + public encoding: (google.ads.datamanager.v1.Encoding|keyof typeof google.ads.datamanager.v1.Encoding); + + /** IngestEventsRequest encryptionInfo. */ + public encryptionInfo?: (google.ads.datamanager.v1.IEncryptionInfo|null); + + /** + * Creates a new IngestEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestEventsRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestEventsRequest): google.ads.datamanager.v1.IngestEventsRequest; + + /** + * Encodes the specified IngestEventsRequest message. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsRequest.verify|verify} messages. + * @param message IngestEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestEventsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsRequest.verify|verify} messages. + * @param message IngestEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestEventsRequest + * @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.ads.datamanager.v1.IngestEventsRequest; + + /** + * Decodes an IngestEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestEventsRequest + * @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.ads.datamanager.v1.IngestEventsRequest; + + /** + * Verifies an IngestEventsRequest 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 IngestEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestEventsRequest; + + /** + * Creates a plain object from an IngestEventsRequest message. Also converts values to other types if specified. + * @param message IngestEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestEventsResponse. */ + interface IIngestEventsResponse { + + /** IngestEventsResponse requestId */ + requestId?: (string|null); + } + + /** Represents an IngestEventsResponse. */ + class IngestEventsResponse implements IIngestEventsResponse { + + /** + * Constructs a new IngestEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestEventsResponse); + + /** IngestEventsResponse requestId. */ + public requestId: string; + + /** + * Creates a new IngestEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestEventsResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestEventsResponse): google.ads.datamanager.v1.IngestEventsResponse; + + /** + * Encodes the specified IngestEventsResponse message. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsResponse.verify|verify} messages. + * @param message IngestEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestEventsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsResponse.verify|verify} messages. + * @param message IngestEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestEventsResponse + * @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.ads.datamanager.v1.IngestEventsResponse; + + /** + * Decodes an IngestEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestEventsResponse + * @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.ads.datamanager.v1.IngestEventsResponse; + + /** + * Verifies an IngestEventsResponse 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 IngestEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestEventsResponse; + + /** + * Creates a plain object from an IngestEventsResponse message. Also converts values to other types if specified. + * @param message IngestEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetrieveRequestStatusRequest. */ + interface IRetrieveRequestStatusRequest { + + /** RetrieveRequestStatusRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RetrieveRequestStatusRequest. */ + class RetrieveRequestStatusRequest implements IRetrieveRequestStatusRequest { + + /** + * Constructs a new RetrieveRequestStatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveRequestStatusRequest); + + /** RetrieveRequestStatusRequest requestId. */ + public requestId: string; + + /** + * Creates a new RetrieveRequestStatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveRequestStatusRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveRequestStatusRequest): google.ads.datamanager.v1.RetrieveRequestStatusRequest; + + /** + * Encodes the specified RetrieveRequestStatusRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusRequest.verify|verify} messages. + * @param message RetrieveRequestStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveRequestStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveRequestStatusRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusRequest.verify|verify} messages. + * @param message RetrieveRequestStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveRequestStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveRequestStatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveRequestStatusRequest + * @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.ads.datamanager.v1.RetrieveRequestStatusRequest; + + /** + * Decodes a RetrieveRequestStatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveRequestStatusRequest + * @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.ads.datamanager.v1.RetrieveRequestStatusRequest; + + /** + * Verifies a RetrieveRequestStatusRequest 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 RetrieveRequestStatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveRequestStatusRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveRequestStatusRequest; + + /** + * Creates a plain object from a RetrieveRequestStatusRequest message. Also converts values to other types if specified. + * @param message RetrieveRequestStatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveRequestStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveRequestStatusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveRequestStatusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetrieveRequestStatusResponse. */ + interface IRetrieveRequestStatusResponse { + + /** RetrieveRequestStatusResponse requestStatusPerDestination */ + requestStatusPerDestination?: (google.ads.datamanager.v1.IRequestStatusPerDestination[]|null); + } + + /** Represents a RetrieveRequestStatusResponse. */ + class RetrieveRequestStatusResponse implements IRetrieveRequestStatusResponse { + + /** + * Constructs a new RetrieveRequestStatusResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveRequestStatusResponse); + + /** RetrieveRequestStatusResponse requestStatusPerDestination. */ + public requestStatusPerDestination: google.ads.datamanager.v1.IRequestStatusPerDestination[]; + + /** + * Creates a new RetrieveRequestStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveRequestStatusResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveRequestStatusResponse): google.ads.datamanager.v1.RetrieveRequestStatusResponse; + + /** + * Encodes the specified RetrieveRequestStatusResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusResponse.verify|verify} messages. + * @param message RetrieveRequestStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveRequestStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveRequestStatusResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusResponse.verify|verify} messages. + * @param message RetrieveRequestStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveRequestStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveRequestStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveRequestStatusResponse + * @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.ads.datamanager.v1.RetrieveRequestStatusResponse; + + /** + * Decodes a RetrieveRequestStatusResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveRequestStatusResponse + * @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.ads.datamanager.v1.RetrieveRequestStatusResponse; + + /** + * Verifies a RetrieveRequestStatusResponse 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 RetrieveRequestStatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveRequestStatusResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveRequestStatusResponse; + + /** + * Creates a plain object from a RetrieveRequestStatusResponse message. Also converts values to other types if specified. + * @param message RetrieveRequestStatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveRequestStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveRequestStatusResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveRequestStatusResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Encoding enum. */ + enum Encoding { + ENCODING_UNSPECIFIED = 0, + HEX = 1, + BASE64 = 2 + } + + /** Properties of a RequestStatusPerDestination. */ + interface IRequestStatusPerDestination { + + /** RequestStatusPerDestination destination */ + destination?: (google.ads.datamanager.v1.IDestination|null); + + /** RequestStatusPerDestination requestStatus */ + requestStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus|keyof typeof google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus|null); + + /** RequestStatusPerDestination errorInfo */ + errorInfo?: (google.ads.datamanager.v1.IErrorInfo|null); + + /** RequestStatusPerDestination warningInfo */ + warningInfo?: (google.ads.datamanager.v1.IWarningInfo|null); + + /** RequestStatusPerDestination audienceMembersIngestionStatus */ + audienceMembersIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus|null); + + /** RequestStatusPerDestination eventsIngestionStatus */ + eventsIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus|null); + + /** RequestStatusPerDestination audienceMembersRemovalStatus */ + audienceMembersRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus|null); + } + + /** Represents a RequestStatusPerDestination. */ + class RequestStatusPerDestination implements IRequestStatusPerDestination { + + /** + * Constructs a new RequestStatusPerDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRequestStatusPerDestination); + + /** RequestStatusPerDestination destination. */ + public destination?: (google.ads.datamanager.v1.IDestination|null); + + /** RequestStatusPerDestination requestStatus. */ + public requestStatus: (google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus|keyof typeof google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus); + + /** RequestStatusPerDestination errorInfo. */ + public errorInfo?: (google.ads.datamanager.v1.IErrorInfo|null); + + /** RequestStatusPerDestination warningInfo. */ + public warningInfo?: (google.ads.datamanager.v1.IWarningInfo|null); + + /** RequestStatusPerDestination audienceMembersIngestionStatus. */ + public audienceMembersIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus|null); + + /** RequestStatusPerDestination eventsIngestionStatus. */ + public eventsIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus|null); + + /** RequestStatusPerDestination audienceMembersRemovalStatus. */ + public audienceMembersRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus|null); + + /** RequestStatusPerDestination status. */ + public status?: ("audienceMembersIngestionStatus"|"eventsIngestionStatus"|"audienceMembersRemovalStatus"); + + /** + * Creates a new RequestStatusPerDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestStatusPerDestination instance + */ + public static create(properties?: google.ads.datamanager.v1.IRequestStatusPerDestination): google.ads.datamanager.v1.RequestStatusPerDestination; + + /** + * Encodes the specified RequestStatusPerDestination message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.verify|verify} messages. + * @param message RequestStatusPerDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRequestStatusPerDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestStatusPerDestination message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.verify|verify} messages. + * @param message RequestStatusPerDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRequestStatusPerDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestStatusPerDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestStatusPerDestination + * @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.ads.datamanager.v1.RequestStatusPerDestination; + + /** + * Decodes a RequestStatusPerDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestStatusPerDestination + * @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.ads.datamanager.v1.RequestStatusPerDestination; + + /** + * Verifies a RequestStatusPerDestination 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 RequestStatusPerDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestStatusPerDestination + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination; + + /** + * Creates a plain object from a RequestStatusPerDestination message. Also converts values to other types if specified. + * @param message RequestStatusPerDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestStatusPerDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestStatusPerDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RequestStatusPerDestination { + + /** RequestStatus enum. */ + enum RequestStatus { + REQUEST_STATUS_UNKNOWN = 0, + SUCCESS = 1, + PROCESSING = 2, + FAILED = 3, + PARTIAL_SUCCESS = 4 + } + + /** Properties of an IngestAudienceMembersStatus. */ + interface IIngestAudienceMembersStatus { + + /** IngestAudienceMembersStatus userDataIngestionStatus */ + userDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus|null); + + /** IngestAudienceMembersStatus mobileDataIngestionStatus */ + mobileDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus|null); + + /** IngestAudienceMembersStatus pairDataIngestionStatus */ + pairDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null); + } + + /** Represents an IngestAudienceMembersStatus. */ + class IngestAudienceMembersStatus implements IIngestAudienceMembersStatus { + + /** + * Constructs a new IngestAudienceMembersStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus); + + /** IngestAudienceMembersStatus userDataIngestionStatus. */ + public userDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus|null); + + /** IngestAudienceMembersStatus mobileDataIngestionStatus. */ + public mobileDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus|null); + + /** IngestAudienceMembersStatus pairDataIngestionStatus. */ + public pairDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null); + + /** IngestAudienceMembersStatus status. */ + public status?: ("userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"); + + /** + * Creates a new IngestAudienceMembersStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestAudienceMembersStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus; + + /** + * Encodes the specified IngestAudienceMembersStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.verify|verify} messages. + * @param message IngestAudienceMembersStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestAudienceMembersStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.verify|verify} messages. + * @param message IngestAudienceMembersStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestAudienceMembersStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestAudienceMembersStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus; + + /** + * Decodes an IngestAudienceMembersStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestAudienceMembersStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus; + + /** + * Verifies an IngestAudienceMembersStatus 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 IngestAudienceMembersStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestAudienceMembersStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus; + + /** + * Creates a plain object from an IngestAudienceMembersStatus message. Also converts values to other types if specified. + * @param message IngestAudienceMembersStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestAudienceMembersStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestAudienceMembersStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveAudienceMembersStatus. */ + interface IRemoveAudienceMembersStatus { + + /** RemoveAudienceMembersStatus userDataRemovalStatus */ + userDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus|null); + + /** RemoveAudienceMembersStatus mobileDataRemovalStatus */ + mobileDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus|null); + + /** RemoveAudienceMembersStatus pairDataRemovalStatus */ + pairDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null); + } + + /** Represents a RemoveAudienceMembersStatus. */ + class RemoveAudienceMembersStatus implements IRemoveAudienceMembersStatus { + + /** + * Constructs a new RemoveAudienceMembersStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus); + + /** RemoveAudienceMembersStatus userDataRemovalStatus. */ + public userDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus|null); + + /** RemoveAudienceMembersStatus mobileDataRemovalStatus. */ + public mobileDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus|null); + + /** RemoveAudienceMembersStatus pairDataRemovalStatus. */ + public pairDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null); + + /** RemoveAudienceMembersStatus status. */ + public status?: ("userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"); + + /** + * Creates a new RemoveAudienceMembersStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveAudienceMembersStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus; + + /** + * Encodes the specified RemoveAudienceMembersStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.verify|verify} messages. + * @param message RemoveAudienceMembersStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveAudienceMembersStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.verify|verify} messages. + * @param message RemoveAudienceMembersStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveAudienceMembersStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveAudienceMembersStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus; + + /** + * Decodes a RemoveAudienceMembersStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveAudienceMembersStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus; + + /** + * Verifies a RemoveAudienceMembersStatus 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 RemoveAudienceMembersStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveAudienceMembersStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus; + + /** + * Creates a plain object from a RemoveAudienceMembersStatus message. Also converts values to other types if specified. + * @param message RemoveAudienceMembersStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveAudienceMembersStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveAudienceMembersStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestEventsStatus. */ + interface IIngestEventsStatus { + + /** IngestEventsStatus recordCount */ + recordCount?: (number|Long|string|null); + } + + /** Represents an IngestEventsStatus. */ + class IngestEventsStatus implements IIngestEventsStatus { + + /** + * Constructs a new IngestEventsStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus); + + /** IngestEventsStatus recordCount. */ + public recordCount: (number|Long|string); + + /** + * Creates a new IngestEventsStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestEventsStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus; + + /** + * Encodes the specified IngestEventsStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.verify|verify} messages. + * @param message IngestEventsStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestEventsStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.verify|verify} messages. + * @param message IngestEventsStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestEventsStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestEventsStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus; + + /** + * Decodes an IngestEventsStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestEventsStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus; + + /** + * Verifies an IngestEventsStatus 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 IngestEventsStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestEventsStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus; + + /** + * Creates a plain object from an IngestEventsStatus message. Also converts values to other types if specified. + * @param message IngestEventsStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestEventsStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestEventsStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestUserDataStatus. */ + interface IIngestUserDataStatus { + + /** IngestUserDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestUserDataStatus userIdentifierCount */ + userIdentifierCount?: (number|Long|string|null); + + /** IngestUserDataStatus uploadMatchRateRange */ + uploadMatchRateRange?: (google.ads.datamanager.v1.MatchRateRange|keyof typeof google.ads.datamanager.v1.MatchRateRange|null); + } + + /** Represents an IngestUserDataStatus. */ + class IngestUserDataStatus implements IIngestUserDataStatus { + + /** + * Constructs a new IngestUserDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus); + + /** IngestUserDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestUserDataStatus userIdentifierCount. */ + public userIdentifierCount: (number|Long|string); + + /** IngestUserDataStatus uploadMatchRateRange. */ + public uploadMatchRateRange: (google.ads.datamanager.v1.MatchRateRange|keyof typeof google.ads.datamanager.v1.MatchRateRange); + + /** + * Creates a new IngestUserDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestUserDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus; + + /** + * Encodes the specified IngestUserDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.verify|verify} messages. + * @param message IngestUserDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestUserDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.verify|verify} messages. + * @param message IngestUserDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestUserDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestUserDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus; + + /** + * Decodes an IngestUserDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestUserDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus; + + /** + * Verifies an IngestUserDataStatus 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 IngestUserDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestUserDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus; + + /** + * Creates a plain object from an IngestUserDataStatus message. Also converts values to other types if specified. + * @param message IngestUserDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestUserDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestUserDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveUserDataStatus. */ + interface IRemoveUserDataStatus { + + /** RemoveUserDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemoveUserDataStatus userIdentifierCount */ + userIdentifierCount?: (number|Long|string|null); + } + + /** Represents a RemoveUserDataStatus. */ + class RemoveUserDataStatus implements IRemoveUserDataStatus { + + /** + * Constructs a new RemoveUserDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus); + + /** RemoveUserDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemoveUserDataStatus userIdentifierCount. */ + public userIdentifierCount: (number|Long|string); + + /** + * Creates a new RemoveUserDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveUserDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus; + + /** + * Encodes the specified RemoveUserDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.verify|verify} messages. + * @param message RemoveUserDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveUserDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.verify|verify} messages. + * @param message RemoveUserDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveUserDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveUserDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus; + + /** + * Decodes a RemoveUserDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveUserDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus; + + /** + * Verifies a RemoveUserDataStatus 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 RemoveUserDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveUserDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus; + + /** + * Creates a plain object from a RemoveUserDataStatus message. Also converts values to other types if specified. + * @param message RemoveUserDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveUserDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveUserDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestMobileDataStatus. */ + interface IIngestMobileDataStatus { + + /** IngestMobileDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestMobileDataStatus mobileIdCount */ + mobileIdCount?: (number|Long|string|null); + } + + /** Represents an IngestMobileDataStatus. */ + class IngestMobileDataStatus implements IIngestMobileDataStatus { + + /** + * Constructs a new IngestMobileDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus); + + /** IngestMobileDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestMobileDataStatus mobileIdCount. */ + public mobileIdCount: (number|Long|string); + + /** + * Creates a new IngestMobileDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestMobileDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus; + + /** + * Encodes the specified IngestMobileDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.verify|verify} messages. + * @param message IngestMobileDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestMobileDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.verify|verify} messages. + * @param message IngestMobileDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestMobileDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestMobileDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus; + + /** + * Decodes an IngestMobileDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestMobileDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus; + + /** + * Verifies an IngestMobileDataStatus 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 IngestMobileDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestMobileDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus; + + /** + * Creates a plain object from an IngestMobileDataStatus message. Also converts values to other types if specified. + * @param message IngestMobileDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestMobileDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestMobileDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveMobileDataStatus. */ + interface IRemoveMobileDataStatus { + + /** RemoveMobileDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemoveMobileDataStatus mobileIdCount */ + mobileIdCount?: (number|Long|string|null); + } + + /** Represents a RemoveMobileDataStatus. */ + class RemoveMobileDataStatus implements IRemoveMobileDataStatus { + + /** + * Constructs a new RemoveMobileDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus); + + /** RemoveMobileDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemoveMobileDataStatus mobileIdCount. */ + public mobileIdCount: (number|Long|string); + + /** + * Creates a new RemoveMobileDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveMobileDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus; + + /** + * Encodes the specified RemoveMobileDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.verify|verify} messages. + * @param message RemoveMobileDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveMobileDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.verify|verify} messages. + * @param message RemoveMobileDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveMobileDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveMobileDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus; + + /** + * Decodes a RemoveMobileDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveMobileDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus; + + /** + * Verifies a RemoveMobileDataStatus 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 RemoveMobileDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveMobileDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus; + + /** + * Creates a plain object from a RemoveMobileDataStatus message. Also converts values to other types if specified. + * @param message RemoveMobileDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveMobileDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveMobileDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestPairDataStatus. */ + interface IIngestPairDataStatus { + + /** IngestPairDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestPairDataStatus pairIdCount */ + pairIdCount?: (number|Long|string|null); + } + + /** Represents an IngestPairDataStatus. */ + class IngestPairDataStatus implements IIngestPairDataStatus { + + /** + * Constructs a new IngestPairDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus); + + /** IngestPairDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestPairDataStatus pairIdCount. */ + public pairIdCount: (number|Long|string); + + /** + * Creates a new IngestPairDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestPairDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus; + + /** + * Encodes the specified IngestPairDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.verify|verify} messages. + * @param message IngestPairDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestPairDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.verify|verify} messages. + * @param message IngestPairDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestPairDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestPairDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus; + + /** + * Decodes an IngestPairDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestPairDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus; + + /** + * Verifies an IngestPairDataStatus 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 IngestPairDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestPairDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus; + + /** + * Creates a plain object from an IngestPairDataStatus message. Also converts values to other types if specified. + * @param message IngestPairDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestPairDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestPairDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePairDataStatus. */ + interface IRemovePairDataStatus { + + /** RemovePairDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemovePairDataStatus pairIdCount */ + pairIdCount?: (number|Long|string|null); + } + + /** Represents a RemovePairDataStatus. */ + class RemovePairDataStatus implements IRemovePairDataStatus { + + /** + * Constructs a new RemovePairDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus); + + /** RemovePairDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemovePairDataStatus pairIdCount. */ + public pairIdCount: (number|Long|string); + + /** + * Creates a new RemovePairDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePairDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus; + + /** + * Encodes the specified RemovePairDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.verify|verify} messages. + * @param message RemovePairDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePairDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.verify|verify} messages. + * @param message RemovePairDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePairDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePairDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus; + + /** + * Decodes a RemovePairDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePairDataStatus + * @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.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus; + + /** + * Verifies a RemovePairDataStatus 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 RemovePairDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePairDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus; + + /** + * Creates a plain object from a RemovePairDataStatus message. Also converts values to other types if specified. + * @param message RemovePairDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePairDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePairDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** MatchRateRange enum. */ + enum MatchRateRange { + MATCH_RATE_RANGE_UNKNOWN = 0, + MATCH_RATE_RANGE_NOT_ELIGIBLE = 1, + MATCH_RATE_RANGE_LESS_THAN_20 = 2, + MATCH_RATE_RANGE_20_TO_30 = 3, + MATCH_RATE_RANGE_31_TO_40 = 4, + MATCH_RATE_RANGE_41_TO_50 = 5, + MATCH_RATE_RANGE_51_TO_60 = 6, + MATCH_RATE_RANGE_61_TO_70 = 7, + MATCH_RATE_RANGE_71_TO_80 = 8, + MATCH_RATE_RANGE_81_TO_90 = 9, + MATCH_RATE_RANGE_91_TO_100 = 10 + } + + /** Properties of an ErrorInfo. */ + interface IErrorInfo { + + /** ErrorInfo errorCounts */ + errorCounts?: (google.ads.datamanager.v1.IErrorCount[]|null); + } + + /** Represents an ErrorInfo. */ + class ErrorInfo implements IErrorInfo { + + /** + * Constructs a new ErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IErrorInfo); + + /** ErrorInfo errorCounts. */ + public errorCounts: google.ads.datamanager.v1.IErrorCount[]; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IErrorInfo): google.ads.datamanager.v1.ErrorInfo; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.ads.datamanager.v1.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorInfo + * @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.ads.datamanager.v1.ErrorInfo; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorInfo + * @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.ads.datamanager.v1.ErrorInfo; + + /** + * Verifies an ErrorInfo 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 ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ErrorInfo; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @param message ErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorCount. */ + interface IErrorCount { + + /** ErrorCount recordCount */ + recordCount?: (number|Long|string|null); + + /** ErrorCount reason */ + reason?: (google.ads.datamanager.v1.ProcessingErrorReason|keyof typeof google.ads.datamanager.v1.ProcessingErrorReason|null); + } + + /** Represents an ErrorCount. */ + class ErrorCount implements IErrorCount { + + /** + * Constructs a new ErrorCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IErrorCount); + + /** ErrorCount recordCount. */ + public recordCount: (number|Long|string); + + /** ErrorCount reason. */ + public reason: (google.ads.datamanager.v1.ProcessingErrorReason|keyof typeof google.ads.datamanager.v1.ProcessingErrorReason); + + /** + * Creates a new ErrorCount instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorCount instance + */ + public static create(properties?: google.ads.datamanager.v1.IErrorCount): google.ads.datamanager.v1.ErrorCount; + + /** + * Encodes the specified ErrorCount message. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * @param message ErrorCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IErrorCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * @param message ErrorCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IErrorCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorCount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorCount + * @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.ads.datamanager.v1.ErrorCount; + + /** + * Decodes an ErrorCount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorCount + * @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.ads.datamanager.v1.ErrorCount; + + /** + * Verifies an ErrorCount 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 ErrorCount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorCount + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ErrorCount; + + /** + * Creates a plain object from an ErrorCount message. Also converts values to other types if specified. + * @param message ErrorCount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ErrorCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorCount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorCount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WarningInfo. */ + interface IWarningInfo { + + /** WarningInfo warningCounts */ + warningCounts?: (google.ads.datamanager.v1.IWarningCount[]|null); + } + + /** Represents a WarningInfo. */ + class WarningInfo implements IWarningInfo { + + /** + * Constructs a new WarningInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IWarningInfo); + + /** WarningInfo warningCounts. */ + public warningCounts: google.ads.datamanager.v1.IWarningCount[]; + + /** + * Creates a new WarningInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WarningInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IWarningInfo): google.ads.datamanager.v1.WarningInfo; + + /** + * Encodes the specified WarningInfo message. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * @param message WarningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IWarningInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WarningInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * @param message WarningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IWarningInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WarningInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WarningInfo + * @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.ads.datamanager.v1.WarningInfo; + + /** + * Decodes a WarningInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WarningInfo + * @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.ads.datamanager.v1.WarningInfo; + + /** + * Verifies a WarningInfo 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 WarningInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WarningInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.WarningInfo; + + /** + * Creates a plain object from a WarningInfo message. Also converts values to other types if specified. + * @param message WarningInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.WarningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WarningInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WarningInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WarningCount. */ + interface IWarningCount { + + /** WarningCount recordCount */ + recordCount?: (number|Long|string|null); + + /** WarningCount reason */ + reason?: (google.ads.datamanager.v1.ProcessingWarningReason|keyof typeof google.ads.datamanager.v1.ProcessingWarningReason|null); + } + + /** Represents a WarningCount. */ + class WarningCount implements IWarningCount { + + /** + * Constructs a new WarningCount. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IWarningCount); + + /** WarningCount recordCount. */ + public recordCount: (number|Long|string); + + /** WarningCount reason. */ + public reason: (google.ads.datamanager.v1.ProcessingWarningReason|keyof typeof google.ads.datamanager.v1.ProcessingWarningReason); + + /** + * Creates a new WarningCount instance using the specified properties. + * @param [properties] Properties to set + * @returns WarningCount instance + */ + public static create(properties?: google.ads.datamanager.v1.IWarningCount): google.ads.datamanager.v1.WarningCount; + + /** + * Encodes the specified WarningCount message. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * @param message WarningCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IWarningCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WarningCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * @param message WarningCount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IWarningCount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WarningCount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WarningCount + * @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.ads.datamanager.v1.WarningCount; + + /** + * Decodes a WarningCount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WarningCount + * @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.ads.datamanager.v1.WarningCount; + + /** + * Verifies a WarningCount 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 WarningCount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WarningCount + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.WarningCount; + + /** + * Creates a plain object from a WarningCount message. Also converts values to other types if specified. + * @param message WarningCount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.WarningCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WarningCount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WarningCount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ProcessingErrorReason enum. */ + enum ProcessingErrorReason { + PROCESSING_ERROR_REASON_UNSPECIFIED = 0, + PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE = 1, + PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED = 2, + PROCESSING_ERROR_REASON_EVENT_TOO_OLD = 3, + PROCESSING_ERROR_REASON_DENIED_CONSENT = 4, + PROCESSING_ERROR_REASON_NO_CONSENT = 5, + PROCESSING_ERROR_REASON_UNKNOWN_CONSENT = 6, + PROCESSING_ERROR_REASON_DUPLICATE_GCLID = 7, + PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID = 8, + PROCESSING_ERROR_REASON_INVALID_GBRAID = 9, + PROCESSING_ERROR_REASON_INVALID_GCLID = 10, + PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID = 11, + PROCESSING_ERROR_REASON_INVALID_WBRAID = 12, + PROCESSING_ERROR_REASON_INTERNAL_ERROR = 13, + PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED = 14, + PROCESSING_ERROR_REASON_INVALID_EVENT = 15, + PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS = 16, + PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS = 17, + PROCESSING_ERROR_REASON_INVALID_FORMAT = 18, + PROCESSING_ERROR_REASON_DECRYPTION_ERROR = 19, + PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR = 20, + PROCESSING_ERROR_REASON_INVALID_WIP = 21, + PROCESSING_ERROR_REASON_INVALID_KEK = 22, + PROCESSING_ERROR_REASON_WIP_AUTH_FAILED = 23, + PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED = 24, + PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR = 25, + PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER = 26 + } + + /** ProcessingWarningReason enum. */ + enum ProcessingWarningReason { + PROCESSING_WARNING_REASON_UNSPECIFIED = 0, + PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED = 1, + PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR = 2, + PROCESSING_WARNING_REASON_DECRYPTION_ERROR = 3, + PROCESSING_WARNING_REASON_WIP_AUTH_FAILED = 4, + PROCESSING_WARNING_REASON_INVALID_WIP = 5, + PROCESSING_WARNING_REASON_INVALID_KEK = 6, + PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR = 7, + PROCESSING_WARNING_REASON_INTERNAL_ERROR = 8 + } + + /** Properties of a TermsOfService. */ + interface ITermsOfService { + + /** TermsOfService customerMatchTermsOfServiceStatus */ + customerMatchTermsOfServiceStatus?: (google.ads.datamanager.v1.TermsOfServiceStatus|keyof typeof google.ads.datamanager.v1.TermsOfServiceStatus|null); + } + + /** Represents a TermsOfService. */ + class TermsOfService implements ITermsOfService { + + /** + * Constructs a new TermsOfService. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ITermsOfService); + + /** TermsOfService customerMatchTermsOfServiceStatus. */ + public customerMatchTermsOfServiceStatus: (google.ads.datamanager.v1.TermsOfServiceStatus|keyof typeof google.ads.datamanager.v1.TermsOfServiceStatus); + + /** + * Creates a new TermsOfService instance using the specified properties. + * @param [properties] Properties to set + * @returns TermsOfService instance + */ + public static create(properties?: google.ads.datamanager.v1.ITermsOfService): google.ads.datamanager.v1.TermsOfService; + + /** + * Encodes the specified TermsOfService message. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * @param message TermsOfService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ITermsOfService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TermsOfService message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * @param message TermsOfService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ITermsOfService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TermsOfService message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TermsOfService + * @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.ads.datamanager.v1.TermsOfService; + + /** + * Decodes a TermsOfService message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TermsOfService + * @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.ads.datamanager.v1.TermsOfService; + + /** + * Verifies a TermsOfService 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 TermsOfService message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TermsOfService + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.TermsOfService; + + /** + * Creates a plain object from a TermsOfService message. Also converts values to other types if specified. + * @param message TermsOfService + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.TermsOfService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TermsOfService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TermsOfService + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TermsOfServiceStatus enum. */ + enum TermsOfServiceStatus { + TERMS_OF_SERVICE_STATUS_UNSPECIFIED = 0, + ACCEPTED = 1, + REJECTED = 2 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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, + IDENTIFIER = 8 + } + + /** 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; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } + + /** 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; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** 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?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * 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); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * 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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.ExtensionRangeOptions; + + /** + * 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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * 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.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** 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); + + /** 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 FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: 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 FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.IFieldDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.FieldDescriptorProto; + + /** + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * 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.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.IOneofDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.OneofDescriptorProto; + + /** + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * 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.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.IEnumDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.protobuf.EnumDescriptorProto; + + /** + * 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * 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.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.IEnumValueDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueDescriptorProto; + + /** + * 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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * 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.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * 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.IServiceDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceDescriptorProto; + + /** + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @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; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * 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.IMethodDescriptorProto, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.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 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 features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|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; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * 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 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; + + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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 }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [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; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * 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.IMessageOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MessageOptions; + + /** + * 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 a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * 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.IFieldOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.FieldOptions; + + /** + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * 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.IOneofOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.OneofOptions; + + /** + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * 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.IEnumOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumOptions; + + /** + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * 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.IEnumValueOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.EnumValueOptions; + + /** + * 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * 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.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * 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.IServiceOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.ServiceOptions; + + /** + * 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * 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.IMethodOptions, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.MethodOptions; + + /** + * 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * 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.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @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|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * 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.IUninterpretedOption, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.UninterpretedOption; + + /** + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 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; + + /** + * 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); + + /** + * 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 FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @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); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * 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.ISourceCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SourceCodeInfo; + + /** + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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); + + /** + * 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 { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * 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.IGeneratedCodeInfo, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.GeneratedCodeInfo; + + /** + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** 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 a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Timestamp; + + /** + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * 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.IDuration, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Duration; + + /** + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + } +} diff --git a/packages/google-ads-datamanager/protos/protos.js b/packages/google-ads-datamanager/protos/protos.js new file mode 100644 index 000000000000..623bb21de5c4 --- /dev/null +++ b/packages/google-ads-datamanager/protos/protos.js @@ -0,0 +1,30194 @@ +// Copyright 2025 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_datamanager_protos || ($protobuf.roots._google_cloud_datamanager_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.ads = (function() { + + /** + * Namespace ads. + * @memberof google + * @namespace + */ + var ads = {}; + + ads.datamanager = (function() { + + /** + * Namespace datamanager. + * @memberof google.ads + * @namespace + */ + var datamanager = {}; + + datamanager.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.ads.datamanager + * @namespace + */ + var v1 = {}; + + v1.AudienceMember = (function() { + + /** + * Properties of an AudienceMember. + * @memberof google.ads.datamanager.v1 + * @interface IAudienceMember + * @property {Array.|null} [destinationReferences] AudienceMember destinationReferences + * @property {google.ads.datamanager.v1.IUserData|null} [userData] AudienceMember userData + * @property {google.ads.datamanager.v1.IPairData|null} [pairData] AudienceMember pairData + * @property {google.ads.datamanager.v1.IMobileData|null} [mobileData] AudienceMember mobileData + * @property {google.ads.datamanager.v1.IConsent|null} [consent] AudienceMember consent + */ + + /** + * Constructs a new AudienceMember. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an AudienceMember. + * @implements IAudienceMember + * @constructor + * @param {google.ads.datamanager.v1.IAudienceMember=} [properties] Properties to set + */ + function AudienceMember(properties) { + this.destinationReferences = []; + 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]]; + } + + /** + * AudienceMember destinationReferences. + * @member {Array.} destinationReferences + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.destinationReferences = $util.emptyArray; + + /** + * AudienceMember userData. + * @member {google.ads.datamanager.v1.IUserData|null|undefined} userData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.userData = null; + + /** + * AudienceMember pairData. + * @member {google.ads.datamanager.v1.IPairData|null|undefined} pairData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.pairData = null; + + /** + * AudienceMember mobileData. + * @member {google.ads.datamanager.v1.IMobileData|null|undefined} mobileData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.mobileData = null; + + /** + * AudienceMember consent. + * @member {google.ads.datamanager.v1.IConsent|null|undefined} consent + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.consent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceMember data. + * @member {"userData"|"pairData"|"mobileData"|undefined} data + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + Object.defineProperty(AudienceMember.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["userData", "pairData", "mobileData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceMember instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {google.ads.datamanager.v1.IAudienceMember=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.AudienceMember} AudienceMember instance + */ + AudienceMember.create = function create(properties) { + return new AudienceMember(properties); + }; + + /** + * Encodes the specified AudienceMember message. Does not implicitly {@link google.ads.datamanager.v1.AudienceMember.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {google.ads.datamanager.v1.IAudienceMember} message AudienceMember message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceMember.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationReferences != null && message.destinationReferences.length) + for (var i = 0; i < message.destinationReferences.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationReferences[i]); + if (message.userData != null && Object.hasOwnProperty.call(message, "userData")) + $root.google.ads.datamanager.v1.UserData.encode(message.userData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + $root.google.ads.datamanager.v1.Consent.encode(message.consent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pairData != null && Object.hasOwnProperty.call(message, "pairData")) + $root.google.ads.datamanager.v1.PairData.encode(message.pairData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mobileData != null && Object.hasOwnProperty.call(message, "mobileData")) + $root.google.ads.datamanager.v1.MobileData.encode(message.mobileData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceMember message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AudienceMember.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {google.ads.datamanager.v1.IAudienceMember} message AudienceMember message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceMember.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceMember message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.AudienceMember} AudienceMember + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceMember.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.AudienceMember(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinationReferences && message.destinationReferences.length)) + message.destinationReferences = []; + message.destinationReferences.push(reader.string()); + break; + } + case 2: { + message.userData = $root.google.ads.datamanager.v1.UserData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.pairData = $root.google.ads.datamanager.v1.PairData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.mobileData = $root.google.ads.datamanager.v1.MobileData.decode(reader, reader.uint32()); + break; + } + case 3: { + message.consent = $root.google.ads.datamanager.v1.Consent.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceMember message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.AudienceMember} AudienceMember + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceMember.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceMember message. + * @function verify + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceMember.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destinationReferences != null && message.hasOwnProperty("destinationReferences")) { + if (!Array.isArray(message.destinationReferences)) + return "destinationReferences: array expected"; + for (var i = 0; i < message.destinationReferences.length; ++i) + if (!$util.isString(message.destinationReferences[i])) + return "destinationReferences: string[] expected"; + } + if (message.userData != null && message.hasOwnProperty("userData")) { + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.UserData.verify(message.userData); + if (error) + return "userData." + error; + } + } + if (message.pairData != null && message.hasOwnProperty("pairData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.PairData.verify(message.pairData); + if (error) + return "pairData." + error; + } + } + if (message.mobileData != null && message.hasOwnProperty("mobileData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.MobileData.verify(message.mobileData); + if (error) + return "mobileData." + error; + } + } + if (message.consent != null && message.hasOwnProperty("consent")) { + var error = $root.google.ads.datamanager.v1.Consent.verify(message.consent); + if (error) + return "consent." + error; + } + return null; + }; + + /** + * Creates an AudienceMember message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.AudienceMember} AudienceMember + */ + AudienceMember.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.AudienceMember) + return object; + var message = new $root.google.ads.datamanager.v1.AudienceMember(); + if (object.destinationReferences) { + if (!Array.isArray(object.destinationReferences)) + throw TypeError(".google.ads.datamanager.v1.AudienceMember.destinationReferences: array expected"); + message.destinationReferences = []; + for (var i = 0; i < object.destinationReferences.length; ++i) + message.destinationReferences[i] = String(object.destinationReferences[i]); + } + if (object.userData != null) { + if (typeof object.userData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.userData: object expected"); + message.userData = $root.google.ads.datamanager.v1.UserData.fromObject(object.userData); + } + if (object.pairData != null) { + if (typeof object.pairData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.pairData: object expected"); + message.pairData = $root.google.ads.datamanager.v1.PairData.fromObject(object.pairData); + } + if (object.mobileData != null) { + if (typeof object.mobileData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.mobileData: object expected"); + message.mobileData = $root.google.ads.datamanager.v1.MobileData.fromObject(object.mobileData); + } + if (object.consent != null) { + if (typeof object.consent !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.consent: object expected"); + message.consent = $root.google.ads.datamanager.v1.Consent.fromObject(object.consent); + } + return message; + }; + + /** + * Creates a plain object from an AudienceMember message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {google.ads.datamanager.v1.AudienceMember} message AudienceMember + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceMember.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinationReferences = []; + if (options.defaults) + object.consent = null; + if (message.destinationReferences && message.destinationReferences.length) { + object.destinationReferences = []; + for (var j = 0; j < message.destinationReferences.length; ++j) + object.destinationReferences[j] = message.destinationReferences[j]; + } + if (message.userData != null && message.hasOwnProperty("userData")) { + object.userData = $root.google.ads.datamanager.v1.UserData.toObject(message.userData, options); + if (options.oneofs) + object.data = "userData"; + } + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = $root.google.ads.datamanager.v1.Consent.toObject(message.consent, options); + if (message.pairData != null && message.hasOwnProperty("pairData")) { + object.pairData = $root.google.ads.datamanager.v1.PairData.toObject(message.pairData, options); + if (options.oneofs) + object.data = "pairData"; + } + if (message.mobileData != null && message.hasOwnProperty("mobileData")) { + object.mobileData = $root.google.ads.datamanager.v1.MobileData.toObject(message.mobileData, options); + if (options.oneofs) + object.data = "mobileData"; + } + return object; + }; + + /** + * Converts this AudienceMember to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + * @returns {Object.} JSON object + */ + AudienceMember.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceMember + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.AudienceMember + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceMember.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.AudienceMember"; + }; + + return AudienceMember; + })(); + + v1.PairData = (function() { + + /** + * Properties of a PairData. + * @memberof google.ads.datamanager.v1 + * @interface IPairData + * @property {Array.|null} [pairIds] PairData pairIds + */ + + /** + * Constructs a new PairData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PairData. + * @implements IPairData + * @constructor + * @param {google.ads.datamanager.v1.IPairData=} [properties] Properties to set + */ + function PairData(properties) { + this.pairIds = []; + 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]]; + } + + /** + * PairData pairIds. + * @member {Array.} pairIds + * @memberof google.ads.datamanager.v1.PairData + * @instance + */ + PairData.prototype.pairIds = $util.emptyArray; + + /** + * Creates a new PairData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {google.ads.datamanager.v1.IPairData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PairData} PairData instance + */ + PairData.create = function create(properties) { + return new PairData(properties); + }; + + /** + * Encodes the specified PairData message. Does not implicitly {@link google.ads.datamanager.v1.PairData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {google.ads.datamanager.v1.IPairData} message PairData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairIds != null && message.pairIds.length) + for (var i = 0; i < message.pairIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pairIds[i]); + return writer; + }; + + /** + * Encodes the specified PairData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {google.ads.datamanager.v1.IPairData} message PairData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.PairData} PairData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.PairData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pairIds && message.pairIds.length)) + message.pairIds = []; + message.pairIds.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PairData} PairData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairData message. + * @function verify + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairIds != null && message.hasOwnProperty("pairIds")) { + if (!Array.isArray(message.pairIds)) + return "pairIds: array expected"; + for (var i = 0; i < message.pairIds.length; ++i) + if (!$util.isString(message.pairIds[i])) + return "pairIds: string[] expected"; + } + return null; + }; + + /** + * Creates a PairData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PairData} PairData + */ + PairData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PairData) + return object; + var message = new $root.google.ads.datamanager.v1.PairData(); + if (object.pairIds) { + if (!Array.isArray(object.pairIds)) + throw TypeError(".google.ads.datamanager.v1.PairData.pairIds: array expected"); + message.pairIds = []; + for (var i = 0; i < object.pairIds.length; ++i) + message.pairIds[i] = String(object.pairIds[i]); + } + return message; + }; + + /** + * Creates a plain object from a PairData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {google.ads.datamanager.v1.PairData} message PairData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pairIds = []; + if (message.pairIds && message.pairIds.length) { + object.pairIds = []; + for (var j = 0; j < message.pairIds.length; ++j) + object.pairIds[j] = message.pairIds[j]; + } + return object; + }; + + /** + * Converts this PairData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PairData + * @instance + * @returns {Object.} JSON object + */ + PairData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PairData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PairData"; + }; + + return PairData; + })(); + + v1.MobileData = (function() { + + /** + * Properties of a MobileData. + * @memberof google.ads.datamanager.v1 + * @interface IMobileData + * @property {Array.|null} [mobileIds] MobileData mobileIds + */ + + /** + * Constructs a new MobileData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a MobileData. + * @implements IMobileData + * @constructor + * @param {google.ads.datamanager.v1.IMobileData=} [properties] Properties to set + */ + function MobileData(properties) { + this.mobileIds = []; + 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]]; + } + + /** + * MobileData mobileIds. + * @member {Array.} mobileIds + * @memberof google.ads.datamanager.v1.MobileData + * @instance + */ + MobileData.prototype.mobileIds = $util.emptyArray; + + /** + * Creates a new MobileData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {google.ads.datamanager.v1.IMobileData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.MobileData} MobileData instance + */ + MobileData.create = function create(properties) { + return new MobileData(properties); + }; + + /** + * Encodes the specified MobileData message. Does not implicitly {@link google.ads.datamanager.v1.MobileData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {google.ads.datamanager.v1.IMobileData} message MobileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mobileIds != null && message.mobileIds.length) + for (var i = 0; i < message.mobileIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mobileIds[i]); + return writer; + }; + + /** + * Encodes the specified MobileData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {google.ads.datamanager.v1.IMobileData} message MobileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.MobileData} MobileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.MobileData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.mobileIds && message.mobileIds.length)) + message.mobileIds = []; + message.mobileIds.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MobileData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.MobileData} MobileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileData message. + * @function verify + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mobileIds != null && message.hasOwnProperty("mobileIds")) { + if (!Array.isArray(message.mobileIds)) + return "mobileIds: array expected"; + for (var i = 0; i < message.mobileIds.length; ++i) + if (!$util.isString(message.mobileIds[i])) + return "mobileIds: string[] expected"; + } + return null; + }; + + /** + * Creates a MobileData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.MobileData} MobileData + */ + MobileData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.MobileData) + return object; + var message = new $root.google.ads.datamanager.v1.MobileData(); + if (object.mobileIds) { + if (!Array.isArray(object.mobileIds)) + throw TypeError(".google.ads.datamanager.v1.MobileData.mobileIds: array expected"); + message.mobileIds = []; + for (var i = 0; i < object.mobileIds.length; ++i) + message.mobileIds[i] = String(object.mobileIds[i]); + } + return message; + }; + + /** + * Creates a plain object from a MobileData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {google.ads.datamanager.v1.MobileData} message MobileData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mobileIds = []; + if (message.mobileIds && message.mobileIds.length) { + object.mobileIds = []; + for (var j = 0; j < message.mobileIds.length; ++j) + object.mobileIds[j] = message.mobileIds[j]; + } + return object; + }; + + /** + * Converts this MobileData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.MobileData + * @instance + * @returns {Object.} JSON object + */ + MobileData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.MobileData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.MobileData"; + }; + + return MobileData; + })(); + + v1.Consent = (function() { + + /** + * Properties of a Consent. + * @memberof google.ads.datamanager.v1 + * @interface IConsent + * @property {google.ads.datamanager.v1.ConsentStatus|null} [adUserData] Consent adUserData + * @property {google.ads.datamanager.v1.ConsentStatus|null} [adPersonalization] Consent adPersonalization + */ + + /** + * Constructs a new Consent. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a Consent. + * @implements IConsent + * @constructor + * @param {google.ads.datamanager.v1.IConsent=} [properties] Properties to set + */ + function Consent(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]]; + } + + /** + * Consent adUserData. + * @member {google.ads.datamanager.v1.ConsentStatus} adUserData + * @memberof google.ads.datamanager.v1.Consent + * @instance + */ + Consent.prototype.adUserData = 0; + + /** + * Consent adPersonalization. + * @member {google.ads.datamanager.v1.ConsentStatus} adPersonalization + * @memberof google.ads.datamanager.v1.Consent + * @instance + */ + Consent.prototype.adPersonalization = 0; + + /** + * Creates a new Consent instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {google.ads.datamanager.v1.IConsent=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Consent} Consent instance + */ + Consent.create = function create(properties) { + return new Consent(properties); + }; + + /** + * Encodes the specified Consent message. Does not implicitly {@link google.ads.datamanager.v1.Consent.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {google.ads.datamanager.v1.IConsent} message Consent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adUserData != null && Object.hasOwnProperty.call(message, "adUserData")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adUserData); + if (message.adPersonalization != null && Object.hasOwnProperty.call(message, "adPersonalization")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.adPersonalization); + return writer; + }; + + /** + * Encodes the specified Consent message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Consent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {google.ads.datamanager.v1.IConsent} message Consent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Consent message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.Consent} Consent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.Consent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.adUserData = reader.int32(); + break; + } + case 2: { + message.adPersonalization = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Consent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Consent} Consent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Consent message. + * @function verify + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adUserData != null && message.hasOwnProperty("adUserData")) + switch (message.adUserData) { + default: + return "adUserData: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.adPersonalization != null && message.hasOwnProperty("adPersonalization")) + switch (message.adPersonalization) { + default: + return "adPersonalization: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Consent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Consent} Consent + */ + Consent.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Consent) + return object; + var message = new $root.google.ads.datamanager.v1.Consent(); + switch (object.adUserData) { + default: + if (typeof object.adUserData === "number") { + message.adUserData = object.adUserData; + break; + } + break; + case "CONSENT_STATUS_UNSPECIFIED": + case 0: + message.adUserData = 0; + break; + case "CONSENT_GRANTED": + case 1: + message.adUserData = 1; + break; + case "CONSENT_DENIED": + case 2: + message.adUserData = 2; + break; + } + switch (object.adPersonalization) { + default: + if (typeof object.adPersonalization === "number") { + message.adPersonalization = object.adPersonalization; + break; + } + break; + case "CONSENT_STATUS_UNSPECIFIED": + case 0: + message.adPersonalization = 0; + break; + case "CONSENT_GRANTED": + case 1: + message.adPersonalization = 1; + break; + case "CONSENT_DENIED": + case 2: + message.adPersonalization = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Consent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {google.ads.datamanager.v1.Consent} message Consent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.adUserData = options.enums === String ? "CONSENT_STATUS_UNSPECIFIED" : 0; + object.adPersonalization = options.enums === String ? "CONSENT_STATUS_UNSPECIFIED" : 0; + } + if (message.adUserData != null && message.hasOwnProperty("adUserData")) + object.adUserData = options.enums === String ? $root.google.ads.datamanager.v1.ConsentStatus[message.adUserData] === undefined ? message.adUserData : $root.google.ads.datamanager.v1.ConsentStatus[message.adUserData] : message.adUserData; + if (message.adPersonalization != null && message.hasOwnProperty("adPersonalization")) + object.adPersonalization = options.enums === String ? $root.google.ads.datamanager.v1.ConsentStatus[message.adPersonalization] === undefined ? message.adPersonalization : $root.google.ads.datamanager.v1.ConsentStatus[message.adPersonalization] : message.adPersonalization; + return object; + }; + + /** + * Converts this Consent to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Consent + * @instance + * @returns {Object.} JSON object + */ + Consent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Consent + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Consent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Consent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Consent"; + }; + + return Consent; + })(); + + /** + * ConsentStatus enum. + * @name google.ads.datamanager.v1.ConsentStatus + * @enum {number} + * @property {number} CONSENT_STATUS_UNSPECIFIED=0 CONSENT_STATUS_UNSPECIFIED value + * @property {number} CONSENT_GRANTED=1 CONSENT_GRANTED value + * @property {number} CONSENT_DENIED=2 CONSENT_DENIED value + */ + v1.ConsentStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONSENT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSENT_GRANTED"] = 1; + values[valuesById[2] = "CONSENT_DENIED"] = 2; + return values; + })(); + + v1.UserData = (function() { + + /** + * Properties of a UserData. + * @memberof google.ads.datamanager.v1 + * @interface IUserData + * @property {Array.|null} [userIdentifiers] UserData userIdentifiers + */ + + /** + * Constructs a new UserData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserData. + * @implements IUserData + * @constructor + * @param {google.ads.datamanager.v1.IUserData=} [properties] Properties to set + */ + function UserData(properties) { + this.userIdentifiers = []; + 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]]; + } + + /** + * UserData userIdentifiers. + * @member {Array.} userIdentifiers + * @memberof google.ads.datamanager.v1.UserData + * @instance + */ + UserData.prototype.userIdentifiers = $util.emptyArray; + + /** + * Creates a new UserData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {google.ads.datamanager.v1.IUserData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserData} UserData instance + */ + UserData.create = function create(properties) { + return new UserData(properties); + }; + + /** + * Encodes the specified UserData message. Does not implicitly {@link google.ads.datamanager.v1.UserData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {google.ads.datamanager.v1.IUserData} message UserData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userIdentifiers != null && message.userIdentifiers.length) + for (var i = 0; i < message.userIdentifiers.length; ++i) + $root.google.ads.datamanager.v1.UserIdentifier.encode(message.userIdentifiers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {google.ads.datamanager.v1.IUserData} message UserData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.UserData} UserData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.UserData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userIdentifiers && message.userIdentifiers.length)) + message.userIdentifiers = []; + message.userIdentifiers.push($root.google.ads.datamanager.v1.UserIdentifier.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserData} UserData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserData message. + * @function verify + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userIdentifiers != null && message.hasOwnProperty("userIdentifiers")) { + if (!Array.isArray(message.userIdentifiers)) + return "userIdentifiers: array expected"; + for (var i = 0; i < message.userIdentifiers.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserIdentifier.verify(message.userIdentifiers[i]); + if (error) + return "userIdentifiers." + error; + } + } + return null; + }; + + /** + * Creates a UserData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserData} UserData + */ + UserData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserData) + return object; + var message = new $root.google.ads.datamanager.v1.UserData(); + if (object.userIdentifiers) { + if (!Array.isArray(object.userIdentifiers)) + throw TypeError(".google.ads.datamanager.v1.UserData.userIdentifiers: array expected"); + message.userIdentifiers = []; + for (var i = 0; i < object.userIdentifiers.length; ++i) { + if (typeof object.userIdentifiers[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserData.userIdentifiers: object expected"); + message.userIdentifiers[i] = $root.google.ads.datamanager.v1.UserIdentifier.fromObject(object.userIdentifiers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {google.ads.datamanager.v1.UserData} message UserData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userIdentifiers = []; + if (message.userIdentifiers && message.userIdentifiers.length) { + object.userIdentifiers = []; + for (var j = 0; j < message.userIdentifiers.length; ++j) + object.userIdentifiers[j] = $root.google.ads.datamanager.v1.UserIdentifier.toObject(message.userIdentifiers[j], options); + } + return object; + }; + + /** + * Converts this UserData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserData + * @instance + * @returns {Object.} JSON object + */ + UserData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserData"; + }; + + return UserData; + })(); + + v1.UserIdentifier = (function() { + + /** + * Properties of a UserIdentifier. + * @memberof google.ads.datamanager.v1 + * @interface IUserIdentifier + * @property {string|null} [emailAddress] UserIdentifier emailAddress + * @property {string|null} [phoneNumber] UserIdentifier phoneNumber + * @property {google.ads.datamanager.v1.IAddressInfo|null} [address] UserIdentifier address + */ + + /** + * Constructs a new UserIdentifier. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserIdentifier. + * @implements IUserIdentifier + * @constructor + * @param {google.ads.datamanager.v1.IUserIdentifier=} [properties] Properties to set + */ + function UserIdentifier(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]]; + } + + /** + * UserIdentifier emailAddress. + * @member {string|null|undefined} emailAddress + * @memberof google.ads.datamanager.v1.UserIdentifier + * @instance + */ + UserIdentifier.prototype.emailAddress = null; + + /** + * UserIdentifier phoneNumber. + * @member {string|null|undefined} phoneNumber + * @memberof google.ads.datamanager.v1.UserIdentifier + * @instance + */ + UserIdentifier.prototype.phoneNumber = null; + + /** + * UserIdentifier address. + * @member {google.ads.datamanager.v1.IAddressInfo|null|undefined} address + * @memberof google.ads.datamanager.v1.UserIdentifier + * @instance + */ + UserIdentifier.prototype.address = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UserIdentifier identifier. + * @member {"emailAddress"|"phoneNumber"|"address"|undefined} identifier + * @memberof google.ads.datamanager.v1.UserIdentifier + * @instance + */ + Object.defineProperty(UserIdentifier.prototype, "identifier", { + get: $util.oneOfGetter($oneOfFields = ["emailAddress", "phoneNumber", "address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserIdentifier instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {google.ads.datamanager.v1.IUserIdentifier=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserIdentifier} UserIdentifier instance + */ + UserIdentifier.create = function create(properties) { + return new UserIdentifier(properties); + }; + + /** + * Encodes the specified UserIdentifier message. Does not implicitly {@link google.ads.datamanager.v1.UserIdentifier.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {google.ads.datamanager.v1.IUserIdentifier} message UserIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdentifier.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.emailAddress); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + $root.google.ads.datamanager.v1.AddressInfo.encode(message.address, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserIdentifier message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdentifier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {google.ads.datamanager.v1.IUserIdentifier} message UserIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserIdentifier message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.UserIdentifier} UserIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdentifier.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.UserIdentifier(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.emailAddress = reader.string(); + break; + } + case 2: { + message.phoneNumber = reader.string(); + break; + } + case 3: { + message.address = $root.google.ads.datamanager.v1.AddressInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserIdentifier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserIdentifier} UserIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdentifier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserIdentifier message. + * @function verify + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserIdentifier.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) { + properties.identifier = 1; + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; + } + if (message.address != null && message.hasOwnProperty("address")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.ads.datamanager.v1.AddressInfo.verify(message.address); + if (error) + return "address." + error; + } + } + return null; + }; + + /** + * Creates a UserIdentifier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserIdentifier} UserIdentifier + */ + UserIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserIdentifier) + return object; + var message = new $root.google.ads.datamanager.v1.UserIdentifier(); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + if (object.address != null) { + if (typeof object.address !== "object") + throw TypeError(".google.ads.datamanager.v1.UserIdentifier.address: object expected"); + message.address = $root.google.ads.datamanager.v1.AddressInfo.fromObject(object.address); + } + return message; + }; + + /** + * Creates a plain object from a UserIdentifier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {google.ads.datamanager.v1.UserIdentifier} message UserIdentifier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserIdentifier.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) { + object.emailAddress = message.emailAddress; + if (options.oneofs) + object.identifier = "emailAddress"; + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + object.phoneNumber = message.phoneNumber; + if (options.oneofs) + object.identifier = "phoneNumber"; + } + if (message.address != null && message.hasOwnProperty("address")) { + object.address = $root.google.ads.datamanager.v1.AddressInfo.toObject(message.address, options); + if (options.oneofs) + object.identifier = "address"; + } + return object; + }; + + /** + * Converts this UserIdentifier to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserIdentifier + * @instance + * @returns {Object.} JSON object + */ + UserIdentifier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserIdentifier + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserIdentifier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdentifier"; + }; + + return UserIdentifier; + })(); + + v1.AddressInfo = (function() { + + /** + * Properties of an AddressInfo. + * @memberof google.ads.datamanager.v1 + * @interface IAddressInfo + * @property {string|null} [givenName] AddressInfo givenName + * @property {string|null} [familyName] AddressInfo familyName + * @property {string|null} [regionCode] AddressInfo regionCode + * @property {string|null} [postalCode] AddressInfo postalCode + */ + + /** + * Constructs a new AddressInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an AddressInfo. + * @implements IAddressInfo + * @constructor + * @param {google.ads.datamanager.v1.IAddressInfo=} [properties] Properties to set + */ + function AddressInfo(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]]; + } + + /** + * AddressInfo givenName. + * @member {string} givenName + * @memberof google.ads.datamanager.v1.AddressInfo + * @instance + */ + AddressInfo.prototype.givenName = ""; + + /** + * AddressInfo familyName. + * @member {string} familyName + * @memberof google.ads.datamanager.v1.AddressInfo + * @instance + */ + AddressInfo.prototype.familyName = ""; + + /** + * AddressInfo regionCode. + * @member {string} regionCode + * @memberof google.ads.datamanager.v1.AddressInfo + * @instance + */ + AddressInfo.prototype.regionCode = ""; + + /** + * AddressInfo postalCode. + * @member {string} postalCode + * @memberof google.ads.datamanager.v1.AddressInfo + * @instance + */ + AddressInfo.prototype.postalCode = ""; + + /** + * Creates a new AddressInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {google.ads.datamanager.v1.IAddressInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.AddressInfo} AddressInfo instance + */ + AddressInfo.create = function create(properties) { + return new AddressInfo(properties); + }; + + /** + * Encodes the specified AddressInfo message. Does not implicitly {@link google.ads.datamanager.v1.AddressInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {google.ads.datamanager.v1.IAddressInfo} message AddressInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.givenName != null && Object.hasOwnProperty.call(message, "givenName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.givenName); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.familyName); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.postalCode != null && Object.hasOwnProperty.call(message, "postalCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.postalCode); + return writer; + }; + + /** + * Encodes the specified AddressInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AddressInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {google.ads.datamanager.v1.IAddressInfo} message AddressInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.AddressInfo} AddressInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.AddressInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.givenName = reader.string(); + break; + } + case 2: { + message.familyName = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.postalCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.AddressInfo} AddressInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.givenName != null && message.hasOwnProperty("givenName")) + if (!$util.isString(message.givenName)) + return "givenName: string expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + if (!$util.isString(message.postalCode)) + return "postalCode: string expected"; + return null; + }; + + /** + * Creates an AddressInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.AddressInfo} AddressInfo + */ + AddressInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.AddressInfo) + return object; + var message = new $root.google.ads.datamanager.v1.AddressInfo(); + if (object.givenName != null) + message.givenName = String(object.givenName); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.postalCode != null) + message.postalCode = String(object.postalCode); + return message; + }; + + /** + * Creates a plain object from an AddressInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {google.ads.datamanager.v1.AddressInfo} message AddressInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.givenName = ""; + object.familyName = ""; + object.regionCode = ""; + object.postalCode = ""; + } + if (message.givenName != null && message.hasOwnProperty("givenName")) + object.givenName = message.givenName; + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + object.postalCode = message.postalCode; + return object; + }; + + /** + * Converts this AddressInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.AddressInfo + * @instance + * @returns {Object.} JSON object + */ + AddressInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddressInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.AddressInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddressInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.AddressInfo"; + }; + + return AddressInfo; + })(); + + v1.CartData = (function() { + + /** + * Properties of a CartData. + * @memberof google.ads.datamanager.v1 + * @interface ICartData + * @property {string|null} [merchantId] CartData merchantId + * @property {string|null} [merchantFeedLabel] CartData merchantFeedLabel + * @property {string|null} [merchantFeedLanguageCode] CartData merchantFeedLanguageCode + * @property {number|null} [transactionDiscount] CartData transactionDiscount + * @property {Array.|null} [items] CartData items + */ + + /** + * Constructs a new CartData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CartData. + * @implements ICartData + * @constructor + * @param {google.ads.datamanager.v1.ICartData=} [properties] Properties to set + */ + function CartData(properties) { + this.items = []; + 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]]; + } + + /** + * CartData merchantId. + * @member {string} merchantId + * @memberof google.ads.datamanager.v1.CartData + * @instance + */ + CartData.prototype.merchantId = ""; + + /** + * CartData merchantFeedLabel. + * @member {string} merchantFeedLabel + * @memberof google.ads.datamanager.v1.CartData + * @instance + */ + CartData.prototype.merchantFeedLabel = ""; + + /** + * CartData merchantFeedLanguageCode. + * @member {string} merchantFeedLanguageCode + * @memberof google.ads.datamanager.v1.CartData + * @instance + */ + CartData.prototype.merchantFeedLanguageCode = ""; + + /** + * CartData transactionDiscount. + * @member {number} transactionDiscount + * @memberof google.ads.datamanager.v1.CartData + * @instance + */ + CartData.prototype.transactionDiscount = 0; + + /** + * CartData items. + * @member {Array.} items + * @memberof google.ads.datamanager.v1.CartData + * @instance + */ + CartData.prototype.items = $util.emptyArray; + + /** + * Creates a new CartData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {google.ads.datamanager.v1.ICartData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CartData} CartData instance + */ + CartData.create = function create(properties) { + return new CartData(properties); + }; + + /** + * Encodes the specified CartData message. Does not implicitly {@link google.ads.datamanager.v1.CartData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {google.ads.datamanager.v1.ICartData} message CartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CartData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.merchantId != null && Object.hasOwnProperty.call(message, "merchantId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.merchantId); + if (message.merchantFeedLabel != null && Object.hasOwnProperty.call(message, "merchantFeedLabel")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.merchantFeedLabel); + if (message.merchantFeedLanguageCode != null && Object.hasOwnProperty.call(message, "merchantFeedLanguageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.merchantFeedLanguageCode); + if (message.transactionDiscount != null && Object.hasOwnProperty.call(message, "transactionDiscount")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.transactionDiscount); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.ads.datamanager.v1.Item.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CartData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CartData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {google.ads.datamanager.v1.ICartData} message CartData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CartData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CartData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.CartData} CartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CartData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.CartData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.merchantId = reader.string(); + break; + } + case 2: { + message.merchantFeedLabel = reader.string(); + break; + } + case 3: { + message.merchantFeedLanguageCode = reader.string(); + break; + } + case 4: { + message.transactionDiscount = reader.double(); + break; + } + case 5: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.ads.datamanager.v1.Item.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CartData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CartData} CartData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CartData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CartData message. + * @function verify + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CartData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.merchantId != null && message.hasOwnProperty("merchantId")) + if (!$util.isString(message.merchantId)) + return "merchantId: string expected"; + if (message.merchantFeedLabel != null && message.hasOwnProperty("merchantFeedLabel")) + if (!$util.isString(message.merchantFeedLabel)) + return "merchantFeedLabel: string expected"; + if (message.merchantFeedLanguageCode != null && message.hasOwnProperty("merchantFeedLanguageCode")) + if (!$util.isString(message.merchantFeedLanguageCode)) + return "merchantFeedLanguageCode: string expected"; + if (message.transactionDiscount != null && message.hasOwnProperty("transactionDiscount")) + if (typeof message.transactionDiscount !== "number") + return "transactionDiscount: number expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.ads.datamanager.v1.Item.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a CartData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CartData} CartData + */ + CartData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CartData) + return object; + var message = new $root.google.ads.datamanager.v1.CartData(); + if (object.merchantId != null) + message.merchantId = String(object.merchantId); + if (object.merchantFeedLabel != null) + message.merchantFeedLabel = String(object.merchantFeedLabel); + if (object.merchantFeedLanguageCode != null) + message.merchantFeedLanguageCode = String(object.merchantFeedLanguageCode); + if (object.transactionDiscount != null) + message.transactionDiscount = Number(object.transactionDiscount); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.ads.datamanager.v1.CartData.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.CartData.items: object expected"); + message.items[i] = $root.google.ads.datamanager.v1.Item.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CartData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {google.ads.datamanager.v1.CartData} message CartData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CartData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (options.defaults) { + object.merchantId = ""; + object.merchantFeedLabel = ""; + object.merchantFeedLanguageCode = ""; + object.transactionDiscount = 0; + } + if (message.merchantId != null && message.hasOwnProperty("merchantId")) + object.merchantId = message.merchantId; + if (message.merchantFeedLabel != null && message.hasOwnProperty("merchantFeedLabel")) + object.merchantFeedLabel = message.merchantFeedLabel; + if (message.merchantFeedLanguageCode != null && message.hasOwnProperty("merchantFeedLanguageCode")) + object.merchantFeedLanguageCode = message.merchantFeedLanguageCode; + if (message.transactionDiscount != null && message.hasOwnProperty("transactionDiscount")) + object.transactionDiscount = options.json && !isFinite(message.transactionDiscount) ? String(message.transactionDiscount) : message.transactionDiscount; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.ads.datamanager.v1.Item.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this CartData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CartData + * @instance + * @returns {Object.} JSON object + */ + CartData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CartData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CartData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CartData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CartData"; + }; + + return CartData; + })(); + + v1.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.ads.datamanager.v1 + * @interface IItem + * @property {string|null} [merchantProductId] Item merchantProductId + * @property {number|Long|null} [quantity] Item quantity + * @property {number|null} [unitPrice] Item unitPrice + */ + + /** + * Constructs a new Item. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.ads.datamanager.v1.IItem=} [properties] Properties to set + */ + function Item(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]]; + } + + /** + * Item merchantProductId. + * @member {string} merchantProductId + * @memberof google.ads.datamanager.v1.Item + * @instance + */ + Item.prototype.merchantProductId = ""; + + /** + * Item quantity. + * @member {number|Long} quantity + * @memberof google.ads.datamanager.v1.Item + * @instance + */ + Item.prototype.quantity = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Item unitPrice. + * @member {number} unitPrice + * @memberof google.ads.datamanager.v1.Item + * @instance + */ + Item.prototype.unitPrice = 0; + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {google.ads.datamanager.v1.IItem=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.ads.datamanager.v1.Item.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {google.ads.datamanager.v1.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.merchantProductId != null && Object.hasOwnProperty.call(message, "merchantProductId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.merchantProductId); + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.quantity); + if (message.unitPrice != null && Object.hasOwnProperty.call(message, "unitPrice")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.unitPrice); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {google.ads.datamanager.v1.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.merchantProductId = reader.string(); + break; + } + case 2: { + message.quantity = reader.int64(); + break; + } + case 3: { + message.unitPrice = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.merchantProductId != null && message.hasOwnProperty("merchantProductId")) + if (!$util.isString(message.merchantProductId)) + return "merchantProductId: string expected"; + if (message.quantity != null && message.hasOwnProperty("quantity")) + if (!$util.isInteger(message.quantity) && !(message.quantity && $util.isInteger(message.quantity.low) && $util.isInteger(message.quantity.high))) + return "quantity: integer|Long expected"; + if (message.unitPrice != null && message.hasOwnProperty("unitPrice")) + if (typeof message.unitPrice !== "number") + return "unitPrice: number expected"; + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Item) + return object; + var message = new $root.google.ads.datamanager.v1.Item(); + if (object.merchantProductId != null) + message.merchantProductId = String(object.merchantProductId); + if (object.quantity != null) + if ($util.Long) + (message.quantity = $util.Long.fromValue(object.quantity)).unsigned = false; + else if (typeof object.quantity === "string") + message.quantity = parseInt(object.quantity, 10); + else if (typeof object.quantity === "number") + message.quantity = object.quantity; + else if (typeof object.quantity === "object") + message.quantity = new $util.LongBits(object.quantity.low >>> 0, object.quantity.high >>> 0).toNumber(); + if (object.unitPrice != null) + message.unitPrice = Number(object.unitPrice); + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {google.ads.datamanager.v1.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.merchantProductId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.quantity = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.quantity = options.longs === String ? "0" : 0; + object.unitPrice = 0; + } + if (message.merchantProductId != null && message.hasOwnProperty("merchantProductId")) + object.merchantProductId = message.merchantProductId; + if (message.quantity != null && message.hasOwnProperty("quantity")) + if (typeof message.quantity === "number") + object.quantity = options.longs === String ? String(message.quantity) : message.quantity; + else + object.quantity = options.longs === String ? $util.Long.prototype.toString.call(message.quantity) : options.longs === Number ? new $util.LongBits(message.quantity.low >>> 0, message.quantity.high >>> 0).toNumber() : message.quantity; + if (message.unitPrice != null && message.hasOwnProperty("unitPrice")) + object.unitPrice = options.json && !isFinite(message.unitPrice) ? String(message.unitPrice) : message.unitPrice; + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Item + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Item + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Item"; + }; + + return Item; + })(); + + v1.Destination = (function() { + + /** + * Properties of a Destination. + * @memberof google.ads.datamanager.v1 + * @interface IDestination + * @property {string|null} [reference] Destination reference + * @property {google.ads.datamanager.v1.IProductAccount|null} [loginAccount] Destination loginAccount + * @property {google.ads.datamanager.v1.IProductAccount|null} [linkedAccount] Destination linkedAccount + * @property {google.ads.datamanager.v1.IProductAccount|null} [operatingAccount] Destination operatingAccount + * @property {string|null} [productDestinationId] Destination productDestinationId + */ + + /** + * Constructs a new Destination. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a Destination. + * @implements IDestination + * @constructor + * @param {google.ads.datamanager.v1.IDestination=} [properties] Properties to set + */ + function Destination(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]]; + } + + /** + * Destination reference. + * @member {string} reference + * @memberof google.ads.datamanager.v1.Destination + * @instance + */ + Destination.prototype.reference = ""; + + /** + * Destination loginAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} loginAccount + * @memberof google.ads.datamanager.v1.Destination + * @instance + */ + Destination.prototype.loginAccount = null; + + /** + * Destination linkedAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} linkedAccount + * @memberof google.ads.datamanager.v1.Destination + * @instance + */ + Destination.prototype.linkedAccount = null; + + /** + * Destination operatingAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} operatingAccount + * @memberof google.ads.datamanager.v1.Destination + * @instance + */ + Destination.prototype.operatingAccount = null; + + /** + * Destination productDestinationId. + * @member {string} productDestinationId + * @memberof google.ads.datamanager.v1.Destination + * @instance + */ + Destination.prototype.productDestinationId = ""; + + /** + * Creates a new Destination instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {google.ads.datamanager.v1.IDestination=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Destination} Destination instance + */ + Destination.create = function create(properties) { + return new Destination(properties); + }; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.ads.datamanager.v1.Destination.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {google.ads.datamanager.v1.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reference); + if (message.loginAccount != null && Object.hasOwnProperty.call(message, "loginAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.loginAccount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.linkedAccount != null && Object.hasOwnProperty.call(message, "linkedAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.linkedAccount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.operatingAccount != null && Object.hasOwnProperty.call(message, "operatingAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.operatingAccount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.productDestinationId != null && Object.hasOwnProperty.call(message, "productDestinationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.productDestinationId); + return writer; + }; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Destination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {google.ads.datamanager.v1.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.Destination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reference = reader.string(); + break; + } + case 2: { + message.loginAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + case 3: { + message.linkedAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + case 4: { + message.operatingAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + case 5: { + message.productDestinationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Destination message. + * @function verify + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Destination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reference != null && message.hasOwnProperty("reference")) + if (!$util.isString(message.reference)) + return "reference: string expected"; + if (message.loginAccount != null && message.hasOwnProperty("loginAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.loginAccount); + if (error) + return "loginAccount." + error; + } + if (message.linkedAccount != null && message.hasOwnProperty("linkedAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.linkedAccount); + if (error) + return "linkedAccount." + error; + } + if (message.operatingAccount != null && message.hasOwnProperty("operatingAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.operatingAccount); + if (error) + return "operatingAccount." + error; + } + if (message.productDestinationId != null && message.hasOwnProperty("productDestinationId")) + if (!$util.isString(message.productDestinationId)) + return "productDestinationId: string expected"; + return null; + }; + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Destination} Destination + */ + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Destination) + return object; + var message = new $root.google.ads.datamanager.v1.Destination(); + if (object.reference != null) + message.reference = String(object.reference); + if (object.loginAccount != null) { + if (typeof object.loginAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.Destination.loginAccount: object expected"); + message.loginAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.loginAccount); + } + if (object.linkedAccount != null) { + if (typeof object.linkedAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.Destination.linkedAccount: object expected"); + message.linkedAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.linkedAccount); + } + if (object.operatingAccount != null) { + if (typeof object.operatingAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.Destination.operatingAccount: object expected"); + message.operatingAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.operatingAccount); + } + if (object.productDestinationId != null) + message.productDestinationId = String(object.productDestinationId); + return message; + }; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {google.ads.datamanager.v1.Destination} message Destination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Destination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.reference = ""; + object.loginAccount = null; + object.linkedAccount = null; + object.operatingAccount = null; + object.productDestinationId = ""; + } + if (message.reference != null && message.hasOwnProperty("reference")) + object.reference = message.reference; + if (message.loginAccount != null && message.hasOwnProperty("loginAccount")) + object.loginAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.loginAccount, options); + if (message.linkedAccount != null && message.hasOwnProperty("linkedAccount")) + object.linkedAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.linkedAccount, options); + if (message.operatingAccount != null && message.hasOwnProperty("operatingAccount")) + object.operatingAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.operatingAccount, options); + if (message.productDestinationId != null && message.hasOwnProperty("productDestinationId")) + object.productDestinationId = message.productDestinationId; + return object; + }; + + /** + * Converts this Destination to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Destination + * @instance + * @returns {Object.} JSON object + */ + Destination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Destination + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Destination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Destination"; + }; + + return Destination; + })(); + + v1.ProductAccount = (function() { + + /** + * Properties of a ProductAccount. + * @memberof google.ads.datamanager.v1 + * @interface IProductAccount + * @property {google.ads.datamanager.v1.Product|null} [product] ProductAccount product + * @property {string|null} [accountId] ProductAccount accountId + * @property {google.ads.datamanager.v1.ProductAccount.AccountType|null} [accountType] ProductAccount accountType + */ + + /** + * Constructs a new ProductAccount. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ProductAccount. + * @implements IProductAccount + * @constructor + * @param {google.ads.datamanager.v1.IProductAccount=} [properties] Properties to set + */ + function ProductAccount(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]]; + } + + /** + * ProductAccount product. + * @member {google.ads.datamanager.v1.Product} product + * @memberof google.ads.datamanager.v1.ProductAccount + * @instance + */ + ProductAccount.prototype.product = 0; + + /** + * ProductAccount accountId. + * @member {string} accountId + * @memberof google.ads.datamanager.v1.ProductAccount + * @instance + */ + ProductAccount.prototype.accountId = ""; + + /** + * ProductAccount accountType. + * @member {google.ads.datamanager.v1.ProductAccount.AccountType} accountType + * @memberof google.ads.datamanager.v1.ProductAccount + * @instance + */ + ProductAccount.prototype.accountType = 0; + + /** + * Creates a new ProductAccount instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {google.ads.datamanager.v1.IProductAccount=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ProductAccount} ProductAccount instance + */ + ProductAccount.create = function create(properties) { + return new ProductAccount(properties); + }; + + /** + * Encodes the specified ProductAccount message. Does not implicitly {@link google.ads.datamanager.v1.ProductAccount.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {google.ads.datamanager.v1.IProductAccount} message ProductAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.product != null && Object.hasOwnProperty.call(message, "product")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.product); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountId); + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accountType); + return writer; + }; + + /** + * Encodes the specified ProductAccount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ProductAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {google.ads.datamanager.v1.IProductAccount} message ProductAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductAccount message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.ProductAccount} ProductAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductAccount.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.ProductAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.product = reader.int32(); + break; + } + case 2: { + message.accountId = reader.string(); + break; + } + case 3: { + message.accountType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ProductAccount} ProductAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductAccount message. + * @function verify + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.product != null && message.hasOwnProperty("product")) + switch (message.product) { + default: + return "product: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isString(message.accountId)) + return "accountId: string expected"; + if (message.accountType != null && message.hasOwnProperty("accountType")) + switch (message.accountType) { + default: + return "accountType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ProductAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ProductAccount} ProductAccount + */ + ProductAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ProductAccount) + return object; + var message = new $root.google.ads.datamanager.v1.ProductAccount(); + switch (object.product) { + default: + if (typeof object.product === "number") { + message.product = object.product; + break; + } + break; + case "PRODUCT_UNSPECIFIED": + case 0: + message.product = 0; + break; + case "GOOGLE_ADS": + case 1: + message.product = 1; + break; + case "DISPLAY_VIDEO_PARTNER": + case 2: + message.product = 2; + break; + case "DISPLAY_VIDEO_ADVERTISER": + case 3: + message.product = 3; + break; + case "DATA_PARTNER": + case 4: + message.product = 4; + break; + } + if (object.accountId != null) + message.accountId = String(object.accountId); + switch (object.accountType) { + default: + if (typeof object.accountType === "number") { + message.accountType = object.accountType; + break; + } + break; + case "ACCOUNT_TYPE_UNSPECIFIED": + case 0: + message.accountType = 0; + break; + case "GOOGLE_ADS": + case 1: + message.accountType = 1; + break; + case "DISPLAY_VIDEO_PARTNER": + case 2: + message.accountType = 2; + break; + case "DISPLAY_VIDEO_ADVERTISER": + case 3: + message.accountType = 3; + break; + case "DATA_PARTNER": + case 4: + message.accountType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProductAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {google.ads.datamanager.v1.ProductAccount} message ProductAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.product = options.enums === String ? "PRODUCT_UNSPECIFIED" : 0; + object.accountId = ""; + object.accountType = options.enums === String ? "ACCOUNT_TYPE_UNSPECIFIED" : 0; + } + if (message.product != null && message.hasOwnProperty("product")) + object.product = options.enums === String ? $root.google.ads.datamanager.v1.Product[message.product] === undefined ? message.product : $root.google.ads.datamanager.v1.Product[message.product] : message.product; + if (message.accountId != null && message.hasOwnProperty("accountId")) + object.accountId = message.accountId; + if (message.accountType != null && message.hasOwnProperty("accountType")) + object.accountType = options.enums === String ? $root.google.ads.datamanager.v1.ProductAccount.AccountType[message.accountType] === undefined ? message.accountType : $root.google.ads.datamanager.v1.ProductAccount.AccountType[message.accountType] : message.accountType; + return object; + }; + + /** + * Converts this ProductAccount to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ProductAccount + * @instance + * @returns {Object.} JSON object + */ + ProductAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProductAccount + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ProductAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ProductAccount"; + }; + + /** + * AccountType enum. + * @name google.ads.datamanager.v1.ProductAccount.AccountType + * @enum {number} + * @property {number} ACCOUNT_TYPE_UNSPECIFIED=0 ACCOUNT_TYPE_UNSPECIFIED value + * @property {number} GOOGLE_ADS=1 GOOGLE_ADS value + * @property {number} DISPLAY_VIDEO_PARTNER=2 DISPLAY_VIDEO_PARTNER value + * @property {number} DISPLAY_VIDEO_ADVERTISER=3 DISPLAY_VIDEO_ADVERTISER value + * @property {number} DATA_PARTNER=4 DATA_PARTNER value + */ + ProductAccount.AccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCOUNT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ADS"] = 1; + values[valuesById[2] = "DISPLAY_VIDEO_PARTNER"] = 2; + values[valuesById[3] = "DISPLAY_VIDEO_ADVERTISER"] = 3; + values[valuesById[4] = "DATA_PARTNER"] = 4; + return values; + })(); + + return ProductAccount; + })(); + + /** + * Product enum. + * @name google.ads.datamanager.v1.Product + * @enum {number} + * @property {number} PRODUCT_UNSPECIFIED=0 PRODUCT_UNSPECIFIED value + * @property {number} GOOGLE_ADS=1 GOOGLE_ADS value + * @property {number} DISPLAY_VIDEO_PARTNER=2 DISPLAY_VIDEO_PARTNER value + * @property {number} DISPLAY_VIDEO_ADVERTISER=3 DISPLAY_VIDEO_ADVERTISER value + * @property {number} DATA_PARTNER=4 DATA_PARTNER value + */ + v1.Product = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRODUCT_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ADS"] = 1; + values[valuesById[2] = "DISPLAY_VIDEO_PARTNER"] = 2; + values[valuesById[3] = "DISPLAY_VIDEO_ADVERTISER"] = 3; + values[valuesById[4] = "DATA_PARTNER"] = 4; + return values; + })(); + + v1.DeviceInfo = (function() { + + /** + * Properties of a DeviceInfo. + * @memberof google.ads.datamanager.v1 + * @interface IDeviceInfo + * @property {string|null} [userAgent] DeviceInfo userAgent + * @property {string|null} [ipAddress] DeviceInfo ipAddress + */ + + /** + * Constructs a new DeviceInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a DeviceInfo. + * @implements IDeviceInfo + * @constructor + * @param {google.ads.datamanager.v1.IDeviceInfo=} [properties] Properties to set + */ + function DeviceInfo(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]]; + } + + /** + * DeviceInfo userAgent. + * @member {string} userAgent + * @memberof google.ads.datamanager.v1.DeviceInfo + * @instance + */ + DeviceInfo.prototype.userAgent = ""; + + /** + * DeviceInfo ipAddress. + * @member {string} ipAddress + * @memberof google.ads.datamanager.v1.DeviceInfo + * @instance + */ + DeviceInfo.prototype.ipAddress = ""; + + /** + * Creates a new DeviceInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {google.ads.datamanager.v1.IDeviceInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.DeviceInfo} DeviceInfo instance + */ + DeviceInfo.create = function create(properties) { + return new DeviceInfo(properties); + }; + + /** + * Encodes the specified DeviceInfo message. Does not implicitly {@link google.ads.datamanager.v1.DeviceInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {google.ads.datamanager.v1.IDeviceInfo} message DeviceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userAgent); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified DeviceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeviceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {google.ads.datamanager.v1.IDeviceInfo} message DeviceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.DeviceInfo} DeviceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.DeviceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userAgent = reader.string(); + break; + } + case 2: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.DeviceInfo} DeviceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a DeviceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.DeviceInfo} DeviceInfo + */ + DeviceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.DeviceInfo) + return object; + var message = new $root.google.ads.datamanager.v1.DeviceInfo(); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a DeviceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {google.ads.datamanager.v1.DeviceInfo} message DeviceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userAgent = ""; + object.ipAddress = ""; + } + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this DeviceInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.DeviceInfo + * @instance + * @returns {Object.} JSON object + */ + DeviceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeviceInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.DeviceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.DeviceInfo"; + }; + + return DeviceInfo; + })(); + + v1.EncryptionInfo = (function() { + + /** + * Properties of an EncryptionInfo. + * @memberof google.ads.datamanager.v1 + * @interface IEncryptionInfo + * @property {google.ads.datamanager.v1.IGcpWrappedKeyInfo|null} [gcpWrappedKeyInfo] EncryptionInfo gcpWrappedKeyInfo + */ + + /** + * Constructs a new EncryptionInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an EncryptionInfo. + * @implements IEncryptionInfo + * @constructor + * @param {google.ads.datamanager.v1.IEncryptionInfo=} [properties] Properties to set + */ + function EncryptionInfo(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]]; + } + + /** + * EncryptionInfo gcpWrappedKeyInfo. + * @member {google.ads.datamanager.v1.IGcpWrappedKeyInfo|null|undefined} gcpWrappedKeyInfo + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.gcpWrappedKeyInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EncryptionInfo wrappedKey. + * @member {"gcpWrappedKeyInfo"|undefined} wrappedKey + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @instance + */ + Object.defineProperty(EncryptionInfo.prototype, "wrappedKey", { + get: $util.oneOfGetter($oneOfFields = ["gcpWrappedKeyInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {google.ads.datamanager.v1.IEncryptionInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.EncryptionInfo} EncryptionInfo instance + */ + EncryptionInfo.create = function create(properties) { + return new EncryptionInfo(properties); + }; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.ads.datamanager.v1.EncryptionInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {google.ads.datamanager.v1.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpWrappedKeyInfo != null && Object.hasOwnProperty.call(message, "gcpWrappedKeyInfo")) + $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.encode(message.gcpWrappedKeyInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EncryptionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {google.ads.datamanager.v1.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.EncryptionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcpWrappedKeyInfo = $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpWrappedKeyInfo != null && message.hasOwnProperty("gcpWrappedKeyInfo")) { + properties.wrappedKey = 1; + { + var error = $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.verify(message.gcpWrappedKeyInfo); + if (error) + return "gcpWrappedKeyInfo." + error; + } + } + return null; + }; + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.EncryptionInfo} EncryptionInfo + */ + EncryptionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.EncryptionInfo) + return object; + var message = new $root.google.ads.datamanager.v1.EncryptionInfo(); + if (object.gcpWrappedKeyInfo != null) { + if (typeof object.gcpWrappedKeyInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.EncryptionInfo.gcpWrappedKeyInfo: object expected"); + message.gcpWrappedKeyInfo = $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.fromObject(object.gcpWrappedKeyInfo); + } + return message; + }; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {google.ads.datamanager.v1.EncryptionInfo} message EncryptionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcpWrappedKeyInfo != null && message.hasOwnProperty("gcpWrappedKeyInfo")) { + object.gcpWrappedKeyInfo = $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.toObject(message.gcpWrappedKeyInfo, options); + if (options.oneofs) + object.wrappedKey = "gcpWrappedKeyInfo"; + } + return object; + }; + + /** + * Converts this EncryptionInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @instance + * @returns {Object.} JSON object + */ + EncryptionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.EncryptionInfo"; + }; + + return EncryptionInfo; + })(); + + v1.GcpWrappedKeyInfo = (function() { + + /** + * Properties of a GcpWrappedKeyInfo. + * @memberof google.ads.datamanager.v1 + * @interface IGcpWrappedKeyInfo + * @property {google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType|null} [keyType] GcpWrappedKeyInfo keyType + * @property {string|null} [wipProvider] GcpWrappedKeyInfo wipProvider + * @property {string|null} [kekUri] GcpWrappedKeyInfo kekUri + * @property {string|null} [encryptedDek] GcpWrappedKeyInfo encryptedDek + */ + + /** + * Constructs a new GcpWrappedKeyInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GcpWrappedKeyInfo. + * @implements IGcpWrappedKeyInfo + * @constructor + * @param {google.ads.datamanager.v1.IGcpWrappedKeyInfo=} [properties] Properties to set + */ + function GcpWrappedKeyInfo(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]]; + } + + /** + * GcpWrappedKeyInfo keyType. + * @member {google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType} keyType + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @instance + */ + GcpWrappedKeyInfo.prototype.keyType = 0; + + /** + * GcpWrappedKeyInfo wipProvider. + * @member {string} wipProvider + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @instance + */ + GcpWrappedKeyInfo.prototype.wipProvider = ""; + + /** + * GcpWrappedKeyInfo kekUri. + * @member {string} kekUri + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @instance + */ + GcpWrappedKeyInfo.prototype.kekUri = ""; + + /** + * GcpWrappedKeyInfo encryptedDek. + * @member {string} encryptedDek + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @instance + */ + GcpWrappedKeyInfo.prototype.encryptedDek = ""; + + /** + * Creates a new GcpWrappedKeyInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IGcpWrappedKeyInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GcpWrappedKeyInfo} GcpWrappedKeyInfo instance + */ + GcpWrappedKeyInfo.create = function create(properties) { + return new GcpWrappedKeyInfo(properties); + }; + + /** + * Encodes the specified GcpWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.GcpWrappedKeyInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IGcpWrappedKeyInfo} message GcpWrappedKeyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpWrappedKeyInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.keyType); + if (message.wipProvider != null && Object.hasOwnProperty.call(message, "wipProvider")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.wipProvider); + if (message.kekUri != null && Object.hasOwnProperty.call(message, "kekUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kekUri); + if (message.encryptedDek != null && Object.hasOwnProperty.call(message, "encryptedDek")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.encryptedDek); + return writer; + }; + + /** + * Encodes the specified GcpWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GcpWrappedKeyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IGcpWrappedKeyInfo} message GcpWrappedKeyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpWrappedKeyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpWrappedKeyInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.GcpWrappedKeyInfo} GcpWrappedKeyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpWrappedKeyInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.GcpWrappedKeyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keyType = reader.int32(); + break; + } + case 2: { + message.wipProvider = reader.string(); + break; + } + case 3: { + message.kekUri = reader.string(); + break; + } + case 4: { + message.encryptedDek = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpWrappedKeyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GcpWrappedKeyInfo} GcpWrappedKeyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpWrappedKeyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpWrappedKeyInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpWrappedKeyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyType != null && message.hasOwnProperty("keyType")) + switch (message.keyType) { + default: + return "keyType: enum value expected"; + case 0: + case 1: + break; + } + if (message.wipProvider != null && message.hasOwnProperty("wipProvider")) + if (!$util.isString(message.wipProvider)) + return "wipProvider: string expected"; + if (message.kekUri != null && message.hasOwnProperty("kekUri")) + if (!$util.isString(message.kekUri)) + return "kekUri: string expected"; + if (message.encryptedDek != null && message.hasOwnProperty("encryptedDek")) + if (!$util.isString(message.encryptedDek)) + return "encryptedDek: string expected"; + return null; + }; + + /** + * Creates a GcpWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GcpWrappedKeyInfo} GcpWrappedKeyInfo + */ + GcpWrappedKeyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GcpWrappedKeyInfo) + return object; + var message = new $root.google.ads.datamanager.v1.GcpWrappedKeyInfo(); + switch (object.keyType) { + default: + if (typeof object.keyType === "number") { + message.keyType = object.keyType; + break; + } + break; + case "KEY_TYPE_UNSPECIFIED": + case 0: + message.keyType = 0; + break; + case "XCHACHA20_POLY1305": + case 1: + message.keyType = 1; + break; + } + if (object.wipProvider != null) + message.wipProvider = String(object.wipProvider); + if (object.kekUri != null) + message.kekUri = String(object.kekUri); + if (object.encryptedDek != null) + message.encryptedDek = String(object.encryptedDek); + return message; + }; + + /** + * Creates a plain object from a GcpWrappedKeyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.GcpWrappedKeyInfo} message GcpWrappedKeyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpWrappedKeyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyType = options.enums === String ? "KEY_TYPE_UNSPECIFIED" : 0; + object.wipProvider = ""; + object.kekUri = ""; + object.encryptedDek = ""; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = options.enums === String ? $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType[message.keyType] === undefined ? message.keyType : $root.google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType[message.keyType] : message.keyType; + if (message.wipProvider != null && message.hasOwnProperty("wipProvider")) + object.wipProvider = message.wipProvider; + if (message.kekUri != null && message.hasOwnProperty("kekUri")) + object.kekUri = message.kekUri; + if (message.encryptedDek != null && message.hasOwnProperty("encryptedDek")) + object.encryptedDek = message.encryptedDek; + return object; + }; + + /** + * Converts this GcpWrappedKeyInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @instance + * @returns {Object.} JSON object + */ + GcpWrappedKeyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpWrappedKeyInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GcpWrappedKeyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpWrappedKeyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GcpWrappedKeyInfo"; + }; + + /** + * KeyType enum. + * @name google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyType + * @enum {number} + * @property {number} KEY_TYPE_UNSPECIFIED=0 KEY_TYPE_UNSPECIFIED value + * @property {number} XCHACHA20_POLY1305=1 XCHACHA20_POLY1305 value + */ + GcpWrappedKeyInfo.KeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "XCHACHA20_POLY1305"] = 1; + return values; + })(); + + return GcpWrappedKeyInfo; + })(); + + /** + * ErrorReason enum. + * @name google.ads.datamanager.v1.ErrorReason + * @enum {number} + * @property {number} ERROR_REASON_UNSPECIFIED=0 ERROR_REASON_UNSPECIFIED value + * @property {number} INTERNAL_ERROR=1 INTERNAL_ERROR value + * @property {number} DEADLINE_EXCEEDED=2 DEADLINE_EXCEEDED value + * @property {number} RESOURCE_EXHAUSTED=3 RESOURCE_EXHAUSTED value + * @property {number} NOT_FOUND=4 NOT_FOUND value + * @property {number} PERMISSION_DENIED=5 PERMISSION_DENIED value + * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value + * @property {number} REQUIRED_FIELD_MISSING=7 REQUIRED_FIELD_MISSING value + * @property {number} INVALID_FORMAT=8 INVALID_FORMAT value + * @property {number} INVALID_HEX_ENCODING=9 INVALID_HEX_ENCODING value + * @property {number} INVALID_BASE64_ENCODING=10 INVALID_BASE64_ENCODING value + * @property {number} INVALID_SHA256_FORMAT=11 INVALID_SHA256_FORMAT value + * @property {number} INVALID_POSTAL_CODE=12 INVALID_POSTAL_CODE value + * @property {number} INVALID_COUNTRY_CODE=13 INVALID_COUNTRY_CODE value + * @property {number} INVALID_ENUM_VALUE=14 INVALID_ENUM_VALUE value + * @property {number} INVALID_USER_LIST_TYPE=15 INVALID_USER_LIST_TYPE value + * @property {number} INVALID_AUDIENCE_MEMBER=16 INVALID_AUDIENCE_MEMBER value + * @property {number} TOO_MANY_AUDIENCE_MEMBERS=17 TOO_MANY_AUDIENCE_MEMBERS value + * @property {number} TOO_MANY_USER_IDENTIFIERS=18 TOO_MANY_USER_IDENTIFIERS value + * @property {number} TOO_MANY_DESTINATIONS=19 TOO_MANY_DESTINATIONS value + * @property {number} INVALID_DESTINATION=20 INVALID_DESTINATION value + * @property {number} DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED=21 DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED value + * @property {number} INVALID_MOBILE_ID_FORMAT=22 INVALID_MOBILE_ID_FORMAT value + * @property {number} INVALID_USER_LIST_ID=23 INVALID_USER_LIST_ID value + * @property {number} MULTIPLE_DATA_TYPES_NOT_ALLOWED=24 MULTIPLE_DATA_TYPES_NOT_ALLOWED value + * @property {number} DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER=25 DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER value + * @property {number} TERMS_AND_CONDITIONS_NOT_SIGNED=26 TERMS_AND_CONDITIONS_NOT_SIGNED value + * @property {number} INVALID_NUMBER_FORMAT=27 INVALID_NUMBER_FORMAT value + * @property {number} INVALID_CONVERSION_ACTION_ID=28 INVALID_CONVERSION_ACTION_ID value + * @property {number} INVALID_CONVERSION_ACTION_TYPE=29 INVALID_CONVERSION_ACTION_TYPE value + * @property {number} INVALID_CURRENCY_CODE=30 INVALID_CURRENCY_CODE value + * @property {number} INVALID_EVENT=31 INVALID_EVENT value + * @property {number} TOO_MANY_EVENTS=32 TOO_MANY_EVENTS value + * @property {number} DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS=33 DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS value + * @property {number} DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS=34 DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS value + * @property {number} DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED=35 DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED value + * @property {number} DUPLICATE_DESTINATION_REFERENCE=36 DUPLICATE_DESTINATION_REFERENCE value + * @property {number} NO_IDENTIFIERS_PROVIDED=39 NO_IDENTIFIERS_PROVIDED value + * @property {number} INVALID_REQUEST_ID=48 INVALID_REQUEST_ID value + */ + v1.ErrorReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_ERROR"] = 1; + values[valuesById[2] = "DEADLINE_EXCEEDED"] = 2; + values[valuesById[3] = "RESOURCE_EXHAUSTED"] = 3; + values[valuesById[4] = "NOT_FOUND"] = 4; + values[valuesById[5] = "PERMISSION_DENIED"] = 5; + values[valuesById[6] = "INVALID_ARGUMENT"] = 6; + values[valuesById[7] = "REQUIRED_FIELD_MISSING"] = 7; + values[valuesById[8] = "INVALID_FORMAT"] = 8; + values[valuesById[9] = "INVALID_HEX_ENCODING"] = 9; + values[valuesById[10] = "INVALID_BASE64_ENCODING"] = 10; + values[valuesById[11] = "INVALID_SHA256_FORMAT"] = 11; + values[valuesById[12] = "INVALID_POSTAL_CODE"] = 12; + values[valuesById[13] = "INVALID_COUNTRY_CODE"] = 13; + values[valuesById[14] = "INVALID_ENUM_VALUE"] = 14; + values[valuesById[15] = "INVALID_USER_LIST_TYPE"] = 15; + values[valuesById[16] = "INVALID_AUDIENCE_MEMBER"] = 16; + values[valuesById[17] = "TOO_MANY_AUDIENCE_MEMBERS"] = 17; + values[valuesById[18] = "TOO_MANY_USER_IDENTIFIERS"] = 18; + values[valuesById[19] = "TOO_MANY_DESTINATIONS"] = 19; + values[valuesById[20] = "INVALID_DESTINATION"] = 20; + values[valuesById[21] = "DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED"] = 21; + values[valuesById[22] = "INVALID_MOBILE_ID_FORMAT"] = 22; + values[valuesById[23] = "INVALID_USER_LIST_ID"] = 23; + values[valuesById[24] = "MULTIPLE_DATA_TYPES_NOT_ALLOWED"] = 24; + values[valuesById[25] = "DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER"] = 25; + values[valuesById[26] = "TERMS_AND_CONDITIONS_NOT_SIGNED"] = 26; + values[valuesById[27] = "INVALID_NUMBER_FORMAT"] = 27; + values[valuesById[28] = "INVALID_CONVERSION_ACTION_ID"] = 28; + values[valuesById[29] = "INVALID_CONVERSION_ACTION_TYPE"] = 29; + values[valuesById[30] = "INVALID_CURRENCY_CODE"] = 30; + values[valuesById[31] = "INVALID_EVENT"] = 31; + values[valuesById[32] = "TOO_MANY_EVENTS"] = 32; + values[valuesById[33] = "DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS"] = 33; + values[valuesById[34] = "DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS"] = 34; + values[valuesById[35] = "DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED"] = 35; + values[valuesById[36] = "DUPLICATE_DESTINATION_REFERENCE"] = 36; + values[valuesById[39] = "NO_IDENTIFIERS_PROVIDED"] = 39; + values[valuesById[48] = "INVALID_REQUEST_ID"] = 48; + return values; + })(); + + v1.Event = (function() { + + /** + * Properties of an Event. + * @memberof google.ads.datamanager.v1 + * @interface IEvent + * @property {Array.|null} [destinationReferences] Event destinationReferences + * @property {string|null} [transactionId] Event transactionId + * @property {google.protobuf.ITimestamp|null} [eventTimestamp] Event eventTimestamp + * @property {google.protobuf.ITimestamp|null} [lastUpdatedTimestamp] Event lastUpdatedTimestamp + * @property {google.ads.datamanager.v1.IUserData|null} [userData] Event userData + * @property {google.ads.datamanager.v1.IConsent|null} [consent] Event consent + * @property {google.ads.datamanager.v1.IAdIdentifiers|null} [adIdentifiers] Event adIdentifiers + * @property {string|null} [currency] Event currency + * @property {number|null} [conversionValue] Event conversionValue + * @property {google.ads.datamanager.v1.EventSource|null} [eventSource] Event eventSource + * @property {google.ads.datamanager.v1.IDeviceInfo|null} [eventDeviceInfo] Event eventDeviceInfo + * @property {google.ads.datamanager.v1.ICartData|null} [cartData] Event cartData + * @property {Array.|null} [customVariables] Event customVariables + * @property {Array.|null} [experimentalFields] Event experimentalFields + * @property {google.ads.datamanager.v1.IUserProperties|null} [userProperties] Event userProperties + */ + + /** + * Constructs a new Event. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {google.ads.datamanager.v1.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.destinationReferences = []; + this.customVariables = []; + this.experimentalFields = []; + 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]]; + } + + /** + * Event destinationReferences. + * @member {Array.} destinationReferences + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.destinationReferences = $util.emptyArray; + + /** + * Event transactionId. + * @member {string} transactionId + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.transactionId = ""; + + /** + * Event eventTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} eventTimestamp + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.eventTimestamp = null; + + /** + * Event lastUpdatedTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdatedTimestamp + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.lastUpdatedTimestamp = null; + + /** + * Event userData. + * @member {google.ads.datamanager.v1.IUserData|null|undefined} userData + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.userData = null; + + /** + * Event consent. + * @member {google.ads.datamanager.v1.IConsent|null|undefined} consent + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.consent = null; + + /** + * Event adIdentifiers. + * @member {google.ads.datamanager.v1.IAdIdentifiers|null|undefined} adIdentifiers + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.adIdentifiers = null; + + /** + * Event currency. + * @member {string} currency + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.currency = ""; + + /** + * Event conversionValue. + * @member {number} conversionValue + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.conversionValue = 0; + + /** + * Event eventSource. + * @member {google.ads.datamanager.v1.EventSource} eventSource + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.eventSource = 0; + + /** + * Event eventDeviceInfo. + * @member {google.ads.datamanager.v1.IDeviceInfo|null|undefined} eventDeviceInfo + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.eventDeviceInfo = null; + + /** + * Event cartData. + * @member {google.ads.datamanager.v1.ICartData|null|undefined} cartData + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.cartData = null; + + /** + * Event customVariables. + * @member {Array.} customVariables + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.customVariables = $util.emptyArray; + + /** + * Event experimentalFields. + * @member {Array.} experimentalFields + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.experimentalFields = $util.emptyArray; + + /** + * Event userProperties. + * @member {google.ads.datamanager.v1.IUserProperties|null|undefined} userProperties + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.userProperties = null; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {google.ads.datamanager.v1.IEvent=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link google.ads.datamanager.v1.Event.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {google.ads.datamanager.v1.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationReferences != null && message.destinationReferences.length) + for (var i = 0; i < message.destinationReferences.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationReferences[i]); + if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.transactionId); + if (message.eventTimestamp != null && Object.hasOwnProperty.call(message, "eventTimestamp")) + $root.google.protobuf.Timestamp.encode(message.eventTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastUpdatedTimestamp != null && Object.hasOwnProperty.call(message, "lastUpdatedTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastUpdatedTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.userData != null && Object.hasOwnProperty.call(message, "userData")) + $root.google.ads.datamanager.v1.UserData.encode(message.userData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + $root.google.ads.datamanager.v1.Consent.encode(message.consent, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.adIdentifiers != null && Object.hasOwnProperty.call(message, "adIdentifiers")) + $root.google.ads.datamanager.v1.AdIdentifiers.encode(message.adIdentifiers, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currency); + if (message.conversionValue != null && Object.hasOwnProperty.call(message, "conversionValue")) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.conversionValue); + if (message.eventSource != null && Object.hasOwnProperty.call(message, "eventSource")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.eventSource); + if (message.eventDeviceInfo != null && Object.hasOwnProperty.call(message, "eventDeviceInfo")) + $root.google.ads.datamanager.v1.DeviceInfo.encode(message.eventDeviceInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cartData != null && Object.hasOwnProperty.call(message, "cartData")) + $root.google.ads.datamanager.v1.CartData.encode(message.cartData, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.customVariables != null && message.customVariables.length) + for (var i = 0; i < message.customVariables.length; ++i) + $root.google.ads.datamanager.v1.CustomVariable.encode(message.customVariables[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.experimentalFields != null && message.experimentalFields.length) + for (var i = 0; i < message.experimentalFields.length; ++i) + $root.google.ads.datamanager.v1.ExperimentalField.encode(message.experimentalFields[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.userProperties != null && Object.hasOwnProperty.call(message, "userProperties")) + $root.google.ads.datamanager.v1.UserProperties.encode(message.userProperties, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {google.ads.datamanager.v1.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinationReferences && message.destinationReferences.length)) + message.destinationReferences = []; + message.destinationReferences.push(reader.string()); + break; + } + case 2: { + message.transactionId = reader.string(); + break; + } + case 3: { + message.eventTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastUpdatedTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.userData = $root.google.ads.datamanager.v1.UserData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.consent = $root.google.ads.datamanager.v1.Consent.decode(reader, reader.uint32()); + break; + } + case 7: { + message.adIdentifiers = $root.google.ads.datamanager.v1.AdIdentifiers.decode(reader, reader.uint32()); + break; + } + case 8: { + message.currency = reader.string(); + break; + } + case 9: { + message.conversionValue = reader.double(); + break; + } + case 10: { + message.eventSource = reader.int32(); + break; + } + case 11: { + message.eventDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cartData = $root.google.ads.datamanager.v1.CartData.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.customVariables && message.customVariables.length)) + message.customVariables = []; + message.customVariables.push($root.google.ads.datamanager.v1.CustomVariable.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.experimentalFields && message.experimentalFields.length)) + message.experimentalFields = []; + message.experimentalFields.push($root.google.ads.datamanager.v1.ExperimentalField.decode(reader, reader.uint32())); + break; + } + case 15: { + message.userProperties = $root.google.ads.datamanager.v1.UserProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinationReferences != null && message.hasOwnProperty("destinationReferences")) { + if (!Array.isArray(message.destinationReferences)) + return "destinationReferences: array expected"; + for (var i = 0; i < message.destinationReferences.length; ++i) + if (!$util.isString(message.destinationReferences[i])) + return "destinationReferences: string[] expected"; + } + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + if (!$util.isString(message.transactionId)) + return "transactionId: string expected"; + if (message.eventTimestamp != null && message.hasOwnProperty("eventTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTimestamp); + if (error) + return "eventTimestamp." + error; + } + if (message.lastUpdatedTimestamp != null && message.hasOwnProperty("lastUpdatedTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdatedTimestamp); + if (error) + return "lastUpdatedTimestamp." + error; + } + if (message.userData != null && message.hasOwnProperty("userData")) { + var error = $root.google.ads.datamanager.v1.UserData.verify(message.userData); + if (error) + return "userData." + error; + } + if (message.consent != null && message.hasOwnProperty("consent")) { + var error = $root.google.ads.datamanager.v1.Consent.verify(message.consent); + if (error) + return "consent." + error; + } + if (message.adIdentifiers != null && message.hasOwnProperty("adIdentifiers")) { + var error = $root.google.ads.datamanager.v1.AdIdentifiers.verify(message.adIdentifiers); + if (error) + return "adIdentifiers." + error; + } + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.conversionValue != null && message.hasOwnProperty("conversionValue")) + if (typeof message.conversionValue !== "number") + return "conversionValue: number expected"; + if (message.eventSource != null && message.hasOwnProperty("eventSource")) + switch (message.eventSource) { + default: + return "eventSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.eventDeviceInfo != null && message.hasOwnProperty("eventDeviceInfo")) { + var error = $root.google.ads.datamanager.v1.DeviceInfo.verify(message.eventDeviceInfo); + if (error) + return "eventDeviceInfo." + error; + } + if (message.cartData != null && message.hasOwnProperty("cartData")) { + var error = $root.google.ads.datamanager.v1.CartData.verify(message.cartData); + if (error) + return "cartData." + error; + } + if (message.customVariables != null && message.hasOwnProperty("customVariables")) { + if (!Array.isArray(message.customVariables)) + return "customVariables: array expected"; + for (var i = 0; i < message.customVariables.length; ++i) { + var error = $root.google.ads.datamanager.v1.CustomVariable.verify(message.customVariables[i]); + if (error) + return "customVariables." + error; + } + } + if (message.experimentalFields != null && message.hasOwnProperty("experimentalFields")) { + if (!Array.isArray(message.experimentalFields)) + return "experimentalFields: array expected"; + for (var i = 0; i < message.experimentalFields.length; ++i) { + var error = $root.google.ads.datamanager.v1.ExperimentalField.verify(message.experimentalFields[i]); + if (error) + return "experimentalFields." + error; + } + } + if (message.userProperties != null && message.hasOwnProperty("userProperties")) { + var error = $root.google.ads.datamanager.v1.UserProperties.verify(message.userProperties); + if (error) + return "userProperties." + error; + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Event) + return object; + var message = new $root.google.ads.datamanager.v1.Event(); + if (object.destinationReferences) { + if (!Array.isArray(object.destinationReferences)) + throw TypeError(".google.ads.datamanager.v1.Event.destinationReferences: array expected"); + message.destinationReferences = []; + for (var i = 0; i < object.destinationReferences.length; ++i) + message.destinationReferences[i] = String(object.destinationReferences[i]); + } + if (object.transactionId != null) + message.transactionId = String(object.transactionId); + if (object.eventTimestamp != null) { + if (typeof object.eventTimestamp !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.eventTimestamp: object expected"); + message.eventTimestamp = $root.google.protobuf.Timestamp.fromObject(object.eventTimestamp); + } + if (object.lastUpdatedTimestamp != null) { + if (typeof object.lastUpdatedTimestamp !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.lastUpdatedTimestamp: object expected"); + message.lastUpdatedTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastUpdatedTimestamp); + } + if (object.userData != null) { + if (typeof object.userData !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.userData: object expected"); + message.userData = $root.google.ads.datamanager.v1.UserData.fromObject(object.userData); + } + if (object.consent != null) { + if (typeof object.consent !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.consent: object expected"); + message.consent = $root.google.ads.datamanager.v1.Consent.fromObject(object.consent); + } + if (object.adIdentifiers != null) { + if (typeof object.adIdentifiers !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.adIdentifiers: object expected"); + message.adIdentifiers = $root.google.ads.datamanager.v1.AdIdentifiers.fromObject(object.adIdentifiers); + } + if (object.currency != null) + message.currency = String(object.currency); + if (object.conversionValue != null) + message.conversionValue = Number(object.conversionValue); + switch (object.eventSource) { + default: + if (typeof object.eventSource === "number") { + message.eventSource = object.eventSource; + break; + } + break; + case "EVENT_SOURCE_UNSPECIFIED": + case 0: + message.eventSource = 0; + break; + case "WEB": + case 1: + message.eventSource = 1; + break; + case "APP": + case 2: + message.eventSource = 2; + break; + case "IN_STORE": + case 3: + message.eventSource = 3; + break; + case "PHONE": + case 4: + message.eventSource = 4; + break; + case "OTHER": + case 5: + message.eventSource = 5; + break; + } + if (object.eventDeviceInfo != null) { + if (typeof object.eventDeviceInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.eventDeviceInfo: object expected"); + message.eventDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.fromObject(object.eventDeviceInfo); + } + if (object.cartData != null) { + if (typeof object.cartData !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.cartData: object expected"); + message.cartData = $root.google.ads.datamanager.v1.CartData.fromObject(object.cartData); + } + if (object.customVariables) { + if (!Array.isArray(object.customVariables)) + throw TypeError(".google.ads.datamanager.v1.Event.customVariables: array expected"); + message.customVariables = []; + for (var i = 0; i < object.customVariables.length; ++i) { + if (typeof object.customVariables[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.customVariables: object expected"); + message.customVariables[i] = $root.google.ads.datamanager.v1.CustomVariable.fromObject(object.customVariables[i]); + } + } + if (object.experimentalFields) { + if (!Array.isArray(object.experimentalFields)) + throw TypeError(".google.ads.datamanager.v1.Event.experimentalFields: array expected"); + message.experimentalFields = []; + for (var i = 0; i < object.experimentalFields.length; ++i) { + if (typeof object.experimentalFields[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.experimentalFields: object expected"); + message.experimentalFields[i] = $root.google.ads.datamanager.v1.ExperimentalField.fromObject(object.experimentalFields[i]); + } + } + if (object.userProperties != null) { + if (typeof object.userProperties !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.userProperties: object expected"); + message.userProperties = $root.google.ads.datamanager.v1.UserProperties.fromObject(object.userProperties); + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {google.ads.datamanager.v1.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.destinationReferences = []; + object.customVariables = []; + object.experimentalFields = []; + } + if (options.defaults) { + object.transactionId = ""; + object.eventTimestamp = null; + object.lastUpdatedTimestamp = null; + object.userData = null; + object.consent = null; + object.adIdentifiers = null; + object.currency = ""; + object.conversionValue = 0; + object.eventSource = options.enums === String ? "EVENT_SOURCE_UNSPECIFIED" : 0; + object.eventDeviceInfo = null; + object.cartData = null; + object.userProperties = null; + } + if (message.destinationReferences && message.destinationReferences.length) { + object.destinationReferences = []; + for (var j = 0; j < message.destinationReferences.length; ++j) + object.destinationReferences[j] = message.destinationReferences[j]; + } + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + object.transactionId = message.transactionId; + if (message.eventTimestamp != null && message.hasOwnProperty("eventTimestamp")) + object.eventTimestamp = $root.google.protobuf.Timestamp.toObject(message.eventTimestamp, options); + if (message.lastUpdatedTimestamp != null && message.hasOwnProperty("lastUpdatedTimestamp")) + object.lastUpdatedTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastUpdatedTimestamp, options); + if (message.userData != null && message.hasOwnProperty("userData")) + object.userData = $root.google.ads.datamanager.v1.UserData.toObject(message.userData, options); + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = $root.google.ads.datamanager.v1.Consent.toObject(message.consent, options); + if (message.adIdentifiers != null && message.hasOwnProperty("adIdentifiers")) + object.adIdentifiers = $root.google.ads.datamanager.v1.AdIdentifiers.toObject(message.adIdentifiers, options); + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.conversionValue != null && message.hasOwnProperty("conversionValue")) + object.conversionValue = options.json && !isFinite(message.conversionValue) ? String(message.conversionValue) : message.conversionValue; + if (message.eventSource != null && message.hasOwnProperty("eventSource")) + object.eventSource = options.enums === String ? $root.google.ads.datamanager.v1.EventSource[message.eventSource] === undefined ? message.eventSource : $root.google.ads.datamanager.v1.EventSource[message.eventSource] : message.eventSource; + if (message.eventDeviceInfo != null && message.hasOwnProperty("eventDeviceInfo")) + object.eventDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.toObject(message.eventDeviceInfo, options); + if (message.cartData != null && message.hasOwnProperty("cartData")) + object.cartData = $root.google.ads.datamanager.v1.CartData.toObject(message.cartData, options); + if (message.customVariables && message.customVariables.length) { + object.customVariables = []; + for (var j = 0; j < message.customVariables.length; ++j) + object.customVariables[j] = $root.google.ads.datamanager.v1.CustomVariable.toObject(message.customVariables[j], options); + } + if (message.experimentalFields && message.experimentalFields.length) { + object.experimentalFields = []; + for (var j = 0; j < message.experimentalFields.length; ++j) + object.experimentalFields[j] = $root.google.ads.datamanager.v1.ExperimentalField.toObject(message.experimentalFields[j], options); + } + if (message.userProperties != null && message.hasOwnProperty("userProperties")) + object.userProperties = $root.google.ads.datamanager.v1.UserProperties.toObject(message.userProperties, options); + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Event + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Event + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Event"; + }; + + return Event; + })(); + + v1.AdIdentifiers = (function() { + + /** + * Properties of an AdIdentifiers. + * @memberof google.ads.datamanager.v1 + * @interface IAdIdentifiers + * @property {string|null} [sessionAttributes] AdIdentifiers sessionAttributes + * @property {string|null} [gclid] AdIdentifiers gclid + * @property {string|null} [gbraid] AdIdentifiers gbraid + * @property {string|null} [wbraid] AdIdentifiers wbraid + * @property {google.ads.datamanager.v1.IDeviceInfo|null} [landingPageDeviceInfo] AdIdentifiers landingPageDeviceInfo + */ + + /** + * Constructs a new AdIdentifiers. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an AdIdentifiers. + * @implements IAdIdentifiers + * @constructor + * @param {google.ads.datamanager.v1.IAdIdentifiers=} [properties] Properties to set + */ + function AdIdentifiers(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]]; + } + + /** + * AdIdentifiers sessionAttributes. + * @member {string} sessionAttributes + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + */ + AdIdentifiers.prototype.sessionAttributes = ""; + + /** + * AdIdentifiers gclid. + * @member {string} gclid + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + */ + AdIdentifiers.prototype.gclid = ""; + + /** + * AdIdentifiers gbraid. + * @member {string} gbraid + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + */ + AdIdentifiers.prototype.gbraid = ""; + + /** + * AdIdentifiers wbraid. + * @member {string} wbraid + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + */ + AdIdentifiers.prototype.wbraid = ""; + + /** + * AdIdentifiers landingPageDeviceInfo. + * @member {google.ads.datamanager.v1.IDeviceInfo|null|undefined} landingPageDeviceInfo + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + */ + AdIdentifiers.prototype.landingPageDeviceInfo = null; + + /** + * Creates a new AdIdentifiers instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {google.ads.datamanager.v1.IAdIdentifiers=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.AdIdentifiers} AdIdentifiers instance + */ + AdIdentifiers.create = function create(properties) { + return new AdIdentifiers(properties); + }; + + /** + * Encodes the specified AdIdentifiers message. Does not implicitly {@link google.ads.datamanager.v1.AdIdentifiers.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {google.ads.datamanager.v1.IAdIdentifiers} message AdIdentifiers message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdIdentifiers.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionAttributes != null && Object.hasOwnProperty.call(message, "sessionAttributes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionAttributes); + if (message.gclid != null && Object.hasOwnProperty.call(message, "gclid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gclid); + if (message.gbraid != null && Object.hasOwnProperty.call(message, "gbraid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gbraid); + if (message.wbraid != null && Object.hasOwnProperty.call(message, "wbraid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.wbraid); + if (message.landingPageDeviceInfo != null && Object.hasOwnProperty.call(message, "landingPageDeviceInfo")) + $root.google.ads.datamanager.v1.DeviceInfo.encode(message.landingPageDeviceInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdIdentifiers message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AdIdentifiers.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {google.ads.datamanager.v1.IAdIdentifiers} message AdIdentifiers message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdIdentifiers.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdIdentifiers message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.AdIdentifiers} AdIdentifiers + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdIdentifiers.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.AdIdentifiers(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionAttributes = reader.string(); + break; + } + case 2: { + message.gclid = reader.string(); + break; + } + case 3: { + message.gbraid = reader.string(); + break; + } + case 4: { + message.wbraid = reader.string(); + break; + } + case 5: { + message.landingPageDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdIdentifiers message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.AdIdentifiers} AdIdentifiers + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdIdentifiers.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdIdentifiers message. + * @function verify + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdIdentifiers.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionAttributes != null && message.hasOwnProperty("sessionAttributes")) + if (!$util.isString(message.sessionAttributes)) + return "sessionAttributes: string expected"; + if (message.gclid != null && message.hasOwnProperty("gclid")) + if (!$util.isString(message.gclid)) + return "gclid: string expected"; + if (message.gbraid != null && message.hasOwnProperty("gbraid")) + if (!$util.isString(message.gbraid)) + return "gbraid: string expected"; + if (message.wbraid != null && message.hasOwnProperty("wbraid")) + if (!$util.isString(message.wbraid)) + return "wbraid: string expected"; + if (message.landingPageDeviceInfo != null && message.hasOwnProperty("landingPageDeviceInfo")) { + var error = $root.google.ads.datamanager.v1.DeviceInfo.verify(message.landingPageDeviceInfo); + if (error) + return "landingPageDeviceInfo." + error; + } + return null; + }; + + /** + * Creates an AdIdentifiers message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.AdIdentifiers} AdIdentifiers + */ + AdIdentifiers.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.AdIdentifiers) + return object; + var message = new $root.google.ads.datamanager.v1.AdIdentifiers(); + if (object.sessionAttributes != null) + message.sessionAttributes = String(object.sessionAttributes); + if (object.gclid != null) + message.gclid = String(object.gclid); + if (object.gbraid != null) + message.gbraid = String(object.gbraid); + if (object.wbraid != null) + message.wbraid = String(object.wbraid); + if (object.landingPageDeviceInfo != null) { + if (typeof object.landingPageDeviceInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.AdIdentifiers.landingPageDeviceInfo: object expected"); + message.landingPageDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.fromObject(object.landingPageDeviceInfo); + } + return message; + }; + + /** + * Creates a plain object from an AdIdentifiers message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {google.ads.datamanager.v1.AdIdentifiers} message AdIdentifiers + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdIdentifiers.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionAttributes = ""; + object.gclid = ""; + object.gbraid = ""; + object.wbraid = ""; + object.landingPageDeviceInfo = null; + } + if (message.sessionAttributes != null && message.hasOwnProperty("sessionAttributes")) + object.sessionAttributes = message.sessionAttributes; + if (message.gclid != null && message.hasOwnProperty("gclid")) + object.gclid = message.gclid; + if (message.gbraid != null && message.hasOwnProperty("gbraid")) + object.gbraid = message.gbraid; + if (message.wbraid != null && message.hasOwnProperty("wbraid")) + object.wbraid = message.wbraid; + if (message.landingPageDeviceInfo != null && message.hasOwnProperty("landingPageDeviceInfo")) + object.landingPageDeviceInfo = $root.google.ads.datamanager.v1.DeviceInfo.toObject(message.landingPageDeviceInfo, options); + return object; + }; + + /** + * Converts this AdIdentifiers to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @instance + * @returns {Object.} JSON object + */ + AdIdentifiers.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdIdentifiers + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.AdIdentifiers + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdIdentifiers.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.AdIdentifiers"; + }; + + return AdIdentifiers; + })(); + + v1.CustomVariable = (function() { + + /** + * Properties of a CustomVariable. + * @memberof google.ads.datamanager.v1 + * @interface ICustomVariable + * @property {string|null} [variable] CustomVariable variable + * @property {string|null} [value] CustomVariable value + * @property {Array.|null} [destinationReferences] CustomVariable destinationReferences + */ + + /** + * Constructs a new CustomVariable. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CustomVariable. + * @implements ICustomVariable + * @constructor + * @param {google.ads.datamanager.v1.ICustomVariable=} [properties] Properties to set + */ + function CustomVariable(properties) { + this.destinationReferences = []; + 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]]; + } + + /** + * CustomVariable variable. + * @member {string} variable + * @memberof google.ads.datamanager.v1.CustomVariable + * @instance + */ + CustomVariable.prototype.variable = ""; + + /** + * CustomVariable value. + * @member {string} value + * @memberof google.ads.datamanager.v1.CustomVariable + * @instance + */ + CustomVariable.prototype.value = ""; + + /** + * CustomVariable destinationReferences. + * @member {Array.} destinationReferences + * @memberof google.ads.datamanager.v1.CustomVariable + * @instance + */ + CustomVariable.prototype.destinationReferences = $util.emptyArray; + + /** + * Creates a new CustomVariable instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {google.ads.datamanager.v1.ICustomVariable=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CustomVariable} CustomVariable instance + */ + CustomVariable.create = function create(properties) { + return new CustomVariable(properties); + }; + + /** + * Encodes the specified CustomVariable message. Does not implicitly {@link google.ads.datamanager.v1.CustomVariable.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {google.ads.datamanager.v1.ICustomVariable} message CustomVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variable != null && Object.hasOwnProperty.call(message, "variable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.variable); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.destinationReferences != null && message.destinationReferences.length) + for (var i = 0; i < message.destinationReferences.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destinationReferences[i]); + return writer; + }; + + /** + * Encodes the specified CustomVariable message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CustomVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {google.ads.datamanager.v1.ICustomVariable} message CustomVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomVariable message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.CustomVariable} CustomVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.CustomVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.variable = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + if (!(message.destinationReferences && message.destinationReferences.length)) + message.destinationReferences = []; + message.destinationReferences.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CustomVariable} CustomVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomVariable message. + * @function verify + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variable != null && message.hasOwnProperty("variable")) + if (!$util.isString(message.variable)) + return "variable: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.destinationReferences != null && message.hasOwnProperty("destinationReferences")) { + if (!Array.isArray(message.destinationReferences)) + return "destinationReferences: array expected"; + for (var i = 0; i < message.destinationReferences.length; ++i) + if (!$util.isString(message.destinationReferences[i])) + return "destinationReferences: string[] expected"; + } + return null; + }; + + /** + * Creates a CustomVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CustomVariable} CustomVariable + */ + CustomVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CustomVariable) + return object; + var message = new $root.google.ads.datamanager.v1.CustomVariable(); + if (object.variable != null) + message.variable = String(object.variable); + if (object.value != null) + message.value = String(object.value); + if (object.destinationReferences) { + if (!Array.isArray(object.destinationReferences)) + throw TypeError(".google.ads.datamanager.v1.CustomVariable.destinationReferences: array expected"); + message.destinationReferences = []; + for (var i = 0; i < object.destinationReferences.length; ++i) + message.destinationReferences[i] = String(object.destinationReferences[i]); + } + return message; + }; + + /** + * Creates a plain object from a CustomVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {google.ads.datamanager.v1.CustomVariable} message CustomVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinationReferences = []; + if (options.defaults) { + object.variable = ""; + object.value = ""; + } + if (message.variable != null && message.hasOwnProperty("variable")) + object.variable = message.variable; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.destinationReferences && message.destinationReferences.length) { + object.destinationReferences = []; + for (var j = 0; j < message.destinationReferences.length; ++j) + object.destinationReferences[j] = message.destinationReferences[j]; + } + return object; + }; + + /** + * Converts this CustomVariable to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CustomVariable + * @instance + * @returns {Object.} JSON object + */ + CustomVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomVariable + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CustomVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CustomVariable"; + }; + + return CustomVariable; + })(); + + /** + * EventSource enum. + * @name google.ads.datamanager.v1.EventSource + * @enum {number} + * @property {number} EVENT_SOURCE_UNSPECIFIED=0 EVENT_SOURCE_UNSPECIFIED value + * @property {number} WEB=1 WEB value + * @property {number} APP=2 APP value + * @property {number} IN_STORE=3 IN_STORE value + * @property {number} PHONE=4 PHONE value + * @property {number} OTHER=5 OTHER value + */ + v1.EventSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEB"] = 1; + values[valuesById[2] = "APP"] = 2; + values[valuesById[3] = "IN_STORE"] = 3; + values[valuesById[4] = "PHONE"] = 4; + values[valuesById[5] = "OTHER"] = 5; + return values; + })(); + + v1.ExperimentalField = (function() { + + /** + * Properties of an ExperimentalField. + * @memberof google.ads.datamanager.v1 + * @interface IExperimentalField + * @property {string|null} [field] ExperimentalField field + * @property {string|null} [value] ExperimentalField value + */ + + /** + * Constructs a new ExperimentalField. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an ExperimentalField. + * @implements IExperimentalField + * @constructor + * @param {google.ads.datamanager.v1.IExperimentalField=} [properties] Properties to set + */ + function ExperimentalField(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]]; + } + + /** + * ExperimentalField field. + * @member {string} field + * @memberof google.ads.datamanager.v1.ExperimentalField + * @instance + */ + ExperimentalField.prototype.field = ""; + + /** + * ExperimentalField value. + * @member {string} value + * @memberof google.ads.datamanager.v1.ExperimentalField + * @instance + */ + ExperimentalField.prototype.value = ""; + + /** + * Creates a new ExperimentalField instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {google.ads.datamanager.v1.IExperimentalField=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ExperimentalField} ExperimentalField instance + */ + ExperimentalField.create = function create(properties) { + return new ExperimentalField(properties); + }; + + /** + * Encodes the specified ExperimentalField message. Does not implicitly {@link google.ads.datamanager.v1.ExperimentalField.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {google.ads.datamanager.v1.IExperimentalField} message ExperimentalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified ExperimentalField message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ExperimentalField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {google.ads.datamanager.v1.IExperimentalField} message ExperimentalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalField message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.ExperimentalField} ExperimentalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalField.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.ExperimentalField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ExperimentalField} ExperimentalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalField message. + * @function verify + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an ExperimentalField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ExperimentalField} ExperimentalField + */ + ExperimentalField.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ExperimentalField) + return object; + var message = new $root.google.ads.datamanager.v1.ExperimentalField(); + if (object.field != null) + message.field = String(object.field); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an ExperimentalField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {google.ads.datamanager.v1.ExperimentalField} message ExperimentalField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.value = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ExperimentalField to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ExperimentalField + * @instance + * @returns {Object.} JSON object + */ + ExperimentalField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalField + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ExperimentalField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ExperimentalField"; + }; + + return ExperimentalField; + })(); + + v1.UserProperties = (function() { + + /** + * Properties of a UserProperties. + * @memberof google.ads.datamanager.v1 + * @interface IUserProperties + * @property {google.ads.datamanager.v1.CustomerType|null} [customerType] UserProperties customerType + * @property {google.ads.datamanager.v1.CustomerValueBucket|null} [customerValueBucket] UserProperties customerValueBucket + */ + + /** + * Constructs a new UserProperties. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserProperties. + * @implements IUserProperties + * @constructor + * @param {google.ads.datamanager.v1.IUserProperties=} [properties] Properties to set + */ + function UserProperties(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]]; + } + + /** + * UserProperties customerType. + * @member {google.ads.datamanager.v1.CustomerType} customerType + * @memberof google.ads.datamanager.v1.UserProperties + * @instance + */ + UserProperties.prototype.customerType = 0; + + /** + * UserProperties customerValueBucket. + * @member {google.ads.datamanager.v1.CustomerValueBucket} customerValueBucket + * @memberof google.ads.datamanager.v1.UserProperties + * @instance + */ + UserProperties.prototype.customerValueBucket = 0; + + /** + * Creates a new UserProperties instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {google.ads.datamanager.v1.IUserProperties=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserProperties} UserProperties instance + */ + UserProperties.create = function create(properties) { + return new UserProperties(properties); + }; + + /** + * Encodes the specified UserProperties message. Does not implicitly {@link google.ads.datamanager.v1.UserProperties.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {google.ads.datamanager.v1.IUserProperties} message UserProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customerType != null && Object.hasOwnProperty.call(message, "customerType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerType); + if (message.customerValueBucket != null && Object.hasOwnProperty.call(message, "customerValueBucket")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.customerValueBucket); + return writer; + }; + + /** + * Encodes the specified UserProperties message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {google.ads.datamanager.v1.IUserProperties} message UserProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserProperties message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.UserProperties} UserProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProperties.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.UserProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.customerType = reader.int32(); + break; + } + case 2: { + message.customerValueBucket = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserProperties} UserProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserProperties message. + * @function verify + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customerType != null && message.hasOwnProperty("customerType")) + switch (message.customerType) { + default: + return "customerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.customerValueBucket != null && message.hasOwnProperty("customerValueBucket")) + switch (message.customerValueBucket) { + default: + return "customerValueBucket: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a UserProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserProperties} UserProperties + */ + UserProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserProperties) + return object; + var message = new $root.google.ads.datamanager.v1.UserProperties(); + switch (object.customerType) { + default: + if (typeof object.customerType === "number") { + message.customerType = object.customerType; + break; + } + break; + case "CUSTOMER_TYPE_UNSPECIFIED": + case 0: + message.customerType = 0; + break; + case "NEW": + case 1: + message.customerType = 1; + break; + case "RETURNING": + case 2: + message.customerType = 2; + break; + case "REENGAGED": + case 3: + message.customerType = 3; + break; + } + switch (object.customerValueBucket) { + default: + if (typeof object.customerValueBucket === "number") { + message.customerValueBucket = object.customerValueBucket; + break; + } + break; + case "CUSTOMER_VALUE_BUCKET_UNSPECIFIED": + case 0: + message.customerValueBucket = 0; + break; + case "LOW": + case 1: + message.customerValueBucket = 1; + break; + case "MEDIUM": + case 2: + message.customerValueBucket = 2; + break; + case "HIGH": + case 3: + message.customerValueBucket = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a UserProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {google.ads.datamanager.v1.UserProperties} message UserProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customerType = options.enums === String ? "CUSTOMER_TYPE_UNSPECIFIED" : 0; + object.customerValueBucket = options.enums === String ? "CUSTOMER_VALUE_BUCKET_UNSPECIFIED" : 0; + } + if (message.customerType != null && message.hasOwnProperty("customerType")) + object.customerType = options.enums === String ? $root.google.ads.datamanager.v1.CustomerType[message.customerType] === undefined ? message.customerType : $root.google.ads.datamanager.v1.CustomerType[message.customerType] : message.customerType; + if (message.customerValueBucket != null && message.hasOwnProperty("customerValueBucket")) + object.customerValueBucket = options.enums === String ? $root.google.ads.datamanager.v1.CustomerValueBucket[message.customerValueBucket] === undefined ? message.customerValueBucket : $root.google.ads.datamanager.v1.CustomerValueBucket[message.customerValueBucket] : message.customerValueBucket; + return object; + }; + + /** + * Converts this UserProperties to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserProperties + * @instance + * @returns {Object.} JSON object + */ + UserProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserProperties + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserProperties"; + }; + + return UserProperties; + })(); + + /** + * CustomerType enum. + * @name google.ads.datamanager.v1.CustomerType + * @enum {number} + * @property {number} CUSTOMER_TYPE_UNSPECIFIED=0 CUSTOMER_TYPE_UNSPECIFIED value + * @property {number} NEW=1 NEW value + * @property {number} RETURNING=2 RETURNING value + * @property {number} REENGAGED=3 REENGAGED value + */ + v1.CustomerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOMER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEW"] = 1; + values[valuesById[2] = "RETURNING"] = 2; + values[valuesById[3] = "REENGAGED"] = 3; + return values; + })(); + + /** + * CustomerValueBucket enum. + * @name google.ads.datamanager.v1.CustomerValueBucket + * @enum {number} + * @property {number} CUSTOMER_VALUE_BUCKET_UNSPECIFIED=0 CUSTOMER_VALUE_BUCKET_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + */ + v1.CustomerValueBucket = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CUSTOMER_VALUE_BUCKET_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + return values; + })(); + + v1.IngestionService = (function() { + + /** + * Constructs a new IngestionService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestionService + * @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 IngestionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IngestionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IngestionService; + + /** + * Creates new IngestionService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.IngestionService + * @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 {IngestionService} RPC service. Useful where requests and/or responses are streamed. + */ + IngestionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|ingestAudienceMembers}. + * @memberof google.ads.datamanager.v1.IngestionService + * @typedef IngestAudienceMembersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.IngestAudienceMembersResponse} [response] IngestAudienceMembersResponse + */ + + /** + * Calls IngestAudienceMembers. + * @function ingestAudienceMembers + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest} request IngestAudienceMembersRequest message or plain object + * @param {google.ads.datamanager.v1.IngestionService.IngestAudienceMembersCallback} callback Node-style callback called with the error, if any, and IngestAudienceMembersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IngestionService.prototype.ingestAudienceMembers = function ingestAudienceMembers(request, callback) { + return this.rpcCall(ingestAudienceMembers, $root.google.ads.datamanager.v1.IngestAudienceMembersRequest, $root.google.ads.datamanager.v1.IngestAudienceMembersResponse, request, callback); + }, "name", { value: "IngestAudienceMembers" }); + + /** + * Calls IngestAudienceMembers. + * @function ingestAudienceMembers + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest} request IngestAudienceMembersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|removeAudienceMembers}. + * @memberof google.ads.datamanager.v1.IngestionService + * @typedef RemoveAudienceMembersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.RemoveAudienceMembersResponse} [response] RemoveAudienceMembersResponse + */ + + /** + * Calls RemoveAudienceMembers. + * @function removeAudienceMembers + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest} request RemoveAudienceMembersRequest message or plain object + * @param {google.ads.datamanager.v1.IngestionService.RemoveAudienceMembersCallback} callback Node-style callback called with the error, if any, and RemoveAudienceMembersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IngestionService.prototype.removeAudienceMembers = function removeAudienceMembers(request, callback) { + return this.rpcCall(removeAudienceMembers, $root.google.ads.datamanager.v1.RemoveAudienceMembersRequest, $root.google.ads.datamanager.v1.RemoveAudienceMembersResponse, request, callback); + }, "name", { value: "RemoveAudienceMembers" }); + + /** + * Calls RemoveAudienceMembers. + * @function removeAudienceMembers + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest} request RemoveAudienceMembersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|ingestEvents}. + * @memberof google.ads.datamanager.v1.IngestionService + * @typedef IngestEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.IngestEventsResponse} [response] IngestEventsResponse + */ + + /** + * Calls IngestEvents. + * @function ingestEvents + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IIngestEventsRequest} request IngestEventsRequest message or plain object + * @param {google.ads.datamanager.v1.IngestionService.IngestEventsCallback} callback Node-style callback called with the error, if any, and IngestEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IngestionService.prototype.ingestEvents = function ingestEvents(request, callback) { + return this.rpcCall(ingestEvents, $root.google.ads.datamanager.v1.IngestEventsRequest, $root.google.ads.datamanager.v1.IngestEventsResponse, request, callback); + }, "name", { value: "IngestEvents" }); + + /** + * Calls IngestEvents. + * @function ingestEvents + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IIngestEventsRequest} request IngestEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.IngestionService|retrieveRequestStatus}. + * @memberof google.ads.datamanager.v1.IngestionService + * @typedef RetrieveRequestStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.RetrieveRequestStatusResponse} [response] RetrieveRequestStatusResponse + */ + + /** + * Calls RetrieveRequestStatus. + * @function retrieveRequestStatus + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest} request RetrieveRequestStatusRequest message or plain object + * @param {google.ads.datamanager.v1.IngestionService.RetrieveRequestStatusCallback} callback Node-style callback called with the error, if any, and RetrieveRequestStatusResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IngestionService.prototype.retrieveRequestStatus = function retrieveRequestStatus(request, callback) { + return this.rpcCall(retrieveRequestStatus, $root.google.ads.datamanager.v1.RetrieveRequestStatusRequest, $root.google.ads.datamanager.v1.RetrieveRequestStatusResponse, request, callback); + }, "name", { value: "RetrieveRequestStatus" }); + + /** + * Calls RetrieveRequestStatus. + * @function retrieveRequestStatus + * @memberof google.ads.datamanager.v1.IngestionService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest} request RetrieveRequestStatusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IngestionService; + })(); + + v1.IngestAudienceMembersRequest = (function() { + + /** + * Properties of an IngestAudienceMembersRequest. + * @memberof google.ads.datamanager.v1 + * @interface IIngestAudienceMembersRequest + * @property {Array.|null} [destinations] IngestAudienceMembersRequest destinations + * @property {Array.|null} [audienceMembers] IngestAudienceMembersRequest audienceMembers + * @property {google.ads.datamanager.v1.IConsent|null} [consent] IngestAudienceMembersRequest consent + * @property {boolean|null} [validateOnly] IngestAudienceMembersRequest validateOnly + * @property {google.ads.datamanager.v1.Encoding|null} [encoding] IngestAudienceMembersRequest encoding + * @property {google.ads.datamanager.v1.IEncryptionInfo|null} [encryptionInfo] IngestAudienceMembersRequest encryptionInfo + * @property {google.ads.datamanager.v1.ITermsOfService|null} [termsOfService] IngestAudienceMembersRequest termsOfService + */ + + /** + * Constructs a new IngestAudienceMembersRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestAudienceMembersRequest. + * @implements IIngestAudienceMembersRequest + * @constructor + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest=} [properties] Properties to set + */ + function IngestAudienceMembersRequest(properties) { + this.destinations = []; + this.audienceMembers = []; + 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]]; + } + + /** + * IngestAudienceMembersRequest destinations. + * @member {Array.} destinations + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.destinations = $util.emptyArray; + + /** + * IngestAudienceMembersRequest audienceMembers. + * @member {Array.} audienceMembers + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.audienceMembers = $util.emptyArray; + + /** + * IngestAudienceMembersRequest consent. + * @member {google.ads.datamanager.v1.IConsent|null|undefined} consent + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.consent = null; + + /** + * IngestAudienceMembersRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.validateOnly = false; + + /** + * IngestAudienceMembersRequest encoding. + * @member {google.ads.datamanager.v1.Encoding} encoding + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.encoding = 0; + + /** + * IngestAudienceMembersRequest encryptionInfo. + * @member {google.ads.datamanager.v1.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.encryptionInfo = null; + + /** + * IngestAudienceMembersRequest termsOfService. + * @member {google.ads.datamanager.v1.ITermsOfService|null|undefined} termsOfService + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + */ + IngestAudienceMembersRequest.prototype.termsOfService = null; + + /** + * Creates a new IngestAudienceMembersRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestAudienceMembersRequest} IngestAudienceMembersRequest instance + */ + IngestAudienceMembersRequest.create = function create(properties) { + return new IngestAudienceMembersRequest(properties); + }; + + /** + * Encodes the specified IngestAudienceMembersRequest message. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest} message IngestAudienceMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.ads.datamanager.v1.Destination.encode(message.destinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceMembers != null && message.audienceMembers.length) + for (var i = 0; i < message.audienceMembers.length; ++i) + $root.google.ads.datamanager.v1.AudienceMember.encode(message.audienceMembers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + $root.google.ads.datamanager.v1.Consent.encode(message.consent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.encoding); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.ads.datamanager.v1.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.termsOfService != null && Object.hasOwnProperty.call(message, "termsOfService")) + $root.google.ads.datamanager.v1.TermsOfService.encode(message.termsOfService, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestAudienceMembersRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersRequest} message IngestAudienceMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestAudienceMembersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.IngestAudienceMembersRequest} IngestAudienceMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.IngestAudienceMembersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.ads.datamanager.v1.Destination.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.audienceMembers && message.audienceMembers.length)) + message.audienceMembers = []; + message.audienceMembers.push($root.google.ads.datamanager.v1.AudienceMember.decode(reader, reader.uint32())); + break; + } + case 3: { + message.consent = $root.google.ads.datamanager.v1.Consent.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.encoding = reader.int32(); + break; + } + case 6: { + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.termsOfService = $root.google.ads.datamanager.v1.TermsOfService.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestAudienceMembersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestAudienceMembersRequest} IngestAudienceMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestAudienceMembersRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestAudienceMembersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.ads.datamanager.v1.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + if (message.audienceMembers != null && message.hasOwnProperty("audienceMembers")) { + if (!Array.isArray(message.audienceMembers)) + return "audienceMembers: array expected"; + for (var i = 0; i < message.audienceMembers.length; ++i) { + var error = $root.google.ads.datamanager.v1.AudienceMember.verify(message.audienceMembers[i]); + if (error) + return "audienceMembers." + error; + } + } + if (message.consent != null && message.hasOwnProperty("consent")) { + var error = $root.google.ads.datamanager.v1.Consent.verify(message.consent); + if (error) + return "consent." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.ads.datamanager.v1.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } + if (message.termsOfService != null && message.hasOwnProperty("termsOfService")) { + var error = $root.google.ads.datamanager.v1.TermsOfService.verify(message.termsOfService); + if (error) + return "termsOfService." + error; + } + return null; + }; + + /** + * Creates an IngestAudienceMembersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestAudienceMembersRequest} IngestAudienceMembersRequest + */ + IngestAudienceMembersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestAudienceMembersRequest) + return object; + var message = new $root.google.ads.datamanager.v1.IngestAudienceMembersRequest(); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.destinations: object expected"); + message.destinations[i] = $root.google.ads.datamanager.v1.Destination.fromObject(object.destinations[i]); + } + } + if (object.audienceMembers) { + if (!Array.isArray(object.audienceMembers)) + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.audienceMembers: array expected"); + message.audienceMembers = []; + for (var i = 0; i < object.audienceMembers.length; ++i) { + if (typeof object.audienceMembers[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.audienceMembers: object expected"); + message.audienceMembers[i] = $root.google.ads.datamanager.v1.AudienceMember.fromObject(object.audienceMembers[i]); + } + } + if (object.consent != null) { + if (typeof object.consent !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.consent: object expected"); + message.consent = $root.google.ads.datamanager.v1.Consent.fromObject(object.consent); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "HEX": + case 1: + message.encoding = 1; + break; + case "BASE64": + case 2: + message.encoding = 2; + break; + } + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.fromObject(object.encryptionInfo); + } + if (object.termsOfService != null) { + if (typeof object.termsOfService !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestAudienceMembersRequest.termsOfService: object expected"); + message.termsOfService = $root.google.ads.datamanager.v1.TermsOfService.fromObject(object.termsOfService); + } + return message; + }; + + /** + * Creates a plain object from an IngestAudienceMembersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IngestAudienceMembersRequest} message IngestAudienceMembersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestAudienceMembersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.destinations = []; + object.audienceMembers = []; + } + if (options.defaults) { + object.consent = null; + object.validateOnly = false; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.encryptionInfo = null; + object.termsOfService = null; + } + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.ads.datamanager.v1.Destination.toObject(message.destinations[j], options); + } + if (message.audienceMembers && message.audienceMembers.length) { + object.audienceMembers = []; + for (var j = 0; j < message.audienceMembers.length; ++j) + object.audienceMembers[j] = $root.google.ads.datamanager.v1.AudienceMember.toObject(message.audienceMembers[j], options); + } + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = $root.google.ads.datamanager.v1.Consent.toObject(message.consent, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.ads.datamanager.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.ads.datamanager.v1.Encoding[message.encoding] : message.encoding; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.toObject(message.encryptionInfo, options); + if (message.termsOfService != null && message.hasOwnProperty("termsOfService")) + object.termsOfService = $root.google.ads.datamanager.v1.TermsOfService.toObject(message.termsOfService, options); + return object; + }; + + /** + * Converts this IngestAudienceMembersRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @instance + * @returns {Object.} JSON object + */ + IngestAudienceMembersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestAudienceMembersRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestAudienceMembersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestAudienceMembersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestAudienceMembersRequest"; + }; + + return IngestAudienceMembersRequest; + })(); + + v1.IngestAudienceMembersResponse = (function() { + + /** + * Properties of an IngestAudienceMembersResponse. + * @memberof google.ads.datamanager.v1 + * @interface IIngestAudienceMembersResponse + * @property {string|null} [requestId] IngestAudienceMembersResponse requestId + */ + + /** + * Constructs a new IngestAudienceMembersResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestAudienceMembersResponse. + * @implements IIngestAudienceMembersResponse + * @constructor + * @param {google.ads.datamanager.v1.IIngestAudienceMembersResponse=} [properties] Properties to set + */ + function IngestAudienceMembersResponse(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]]; + } + + /** + * IngestAudienceMembersResponse requestId. + * @member {string} requestId + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @instance + */ + IngestAudienceMembersResponse.prototype.requestId = ""; + + /** + * Creates a new IngestAudienceMembersResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestAudienceMembersResponse} IngestAudienceMembersResponse instance + */ + IngestAudienceMembersResponse.create = function create(properties) { + return new IngestAudienceMembersResponse(properties); + }; + + /** + * Encodes the specified IngestAudienceMembersResponse message. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersResponse} message IngestAudienceMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified IngestAudienceMembersResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestAudienceMembersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IIngestAudienceMembersResponse} message IngestAudienceMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestAudienceMembersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.IngestAudienceMembersResponse} IngestAudienceMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.IngestAudienceMembersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestAudienceMembersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestAudienceMembersResponse} IngestAudienceMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestAudienceMembersResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestAudienceMembersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an IngestAudienceMembersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestAudienceMembersResponse} IngestAudienceMembersResponse + */ + IngestAudienceMembersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestAudienceMembersResponse) + return object; + var message = new $root.google.ads.datamanager.v1.IngestAudienceMembersResponse(); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an IngestAudienceMembersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IngestAudienceMembersResponse} message IngestAudienceMembersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestAudienceMembersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestId = ""; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this IngestAudienceMembersResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @instance + * @returns {Object.} JSON object + */ + IngestAudienceMembersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestAudienceMembersResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestAudienceMembersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestAudienceMembersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestAudienceMembersResponse"; + }; + + return IngestAudienceMembersResponse; + })(); + + v1.RemoveAudienceMembersRequest = (function() { + + /** + * Properties of a RemoveAudienceMembersRequest. + * @memberof google.ads.datamanager.v1 + * @interface IRemoveAudienceMembersRequest + * @property {Array.|null} [destinations] RemoveAudienceMembersRequest destinations + * @property {Array.|null} [audienceMembers] RemoveAudienceMembersRequest audienceMembers + * @property {boolean|null} [validateOnly] RemoveAudienceMembersRequest validateOnly + * @property {google.ads.datamanager.v1.Encoding|null} [encoding] RemoveAudienceMembersRequest encoding + * @property {google.ads.datamanager.v1.IEncryptionInfo|null} [encryptionInfo] RemoveAudienceMembersRequest encryptionInfo + */ + + /** + * Constructs a new RemoveAudienceMembersRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RemoveAudienceMembersRequest. + * @implements IRemoveAudienceMembersRequest + * @constructor + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest=} [properties] Properties to set + */ + function RemoveAudienceMembersRequest(properties) { + this.destinations = []; + this.audienceMembers = []; + 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]]; + } + + /** + * RemoveAudienceMembersRequest destinations. + * @member {Array.} destinations + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + */ + RemoveAudienceMembersRequest.prototype.destinations = $util.emptyArray; + + /** + * RemoveAudienceMembersRequest audienceMembers. + * @member {Array.} audienceMembers + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + */ + RemoveAudienceMembersRequest.prototype.audienceMembers = $util.emptyArray; + + /** + * RemoveAudienceMembersRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + */ + RemoveAudienceMembersRequest.prototype.validateOnly = false; + + /** + * RemoveAudienceMembersRequest encoding. + * @member {google.ads.datamanager.v1.Encoding} encoding + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + */ + RemoveAudienceMembersRequest.prototype.encoding = 0; + + /** + * RemoveAudienceMembersRequest encryptionInfo. + * @member {google.ads.datamanager.v1.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + */ + RemoveAudienceMembersRequest.prototype.encryptionInfo = null; + + /** + * Creates a new RemoveAudienceMembersRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersRequest} RemoveAudienceMembersRequest instance + */ + RemoveAudienceMembersRequest.create = function create(properties) { + return new RemoveAudienceMembersRequest(properties); + }; + + /** + * Encodes the specified RemoveAudienceMembersRequest message. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest} message RemoveAudienceMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.ads.datamanager.v1.Destination.encode(message.destinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceMembers != null && message.audienceMembers.length) + for (var i = 0; i < message.audienceMembers.length; ++i) + $root.google.ads.datamanager.v1.AudienceMember.encode(message.audienceMembers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.encoding); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.ads.datamanager.v1.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RemoveAudienceMembersRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersRequest} message RemoveAudienceMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveAudienceMembersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersRequest} RemoveAudienceMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RemoveAudienceMembersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.ads.datamanager.v1.Destination.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.audienceMembers && message.audienceMembers.length)) + message.audienceMembers = []; + message.audienceMembers.push($root.google.ads.datamanager.v1.AudienceMember.decode(reader, reader.uint32())); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + case 4: { + message.encoding = reader.int32(); + break; + } + case 5: { + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveAudienceMembersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersRequest} RemoveAudienceMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveAudienceMembersRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveAudienceMembersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.ads.datamanager.v1.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + if (message.audienceMembers != null && message.hasOwnProperty("audienceMembers")) { + if (!Array.isArray(message.audienceMembers)) + return "audienceMembers: array expected"; + for (var i = 0; i < message.audienceMembers.length; ++i) { + var error = $root.google.ads.datamanager.v1.AudienceMember.verify(message.audienceMembers[i]); + if (error) + return "audienceMembers." + error; + } + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.ads.datamanager.v1.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } + return null; + }; + + /** + * Creates a RemoveAudienceMembersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersRequest} RemoveAudienceMembersRequest + */ + RemoveAudienceMembersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RemoveAudienceMembersRequest) + return object; + var message = new $root.google.ads.datamanager.v1.RemoveAudienceMembersRequest(); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.ads.datamanager.v1.RemoveAudienceMembersRequest.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RemoveAudienceMembersRequest.destinations: object expected"); + message.destinations[i] = $root.google.ads.datamanager.v1.Destination.fromObject(object.destinations[i]); + } + } + if (object.audienceMembers) { + if (!Array.isArray(object.audienceMembers)) + throw TypeError(".google.ads.datamanager.v1.RemoveAudienceMembersRequest.audienceMembers: array expected"); + message.audienceMembers = []; + for (var i = 0; i < object.audienceMembers.length; ++i) { + if (typeof object.audienceMembers[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RemoveAudienceMembersRequest.audienceMembers: object expected"); + message.audienceMembers[i] = $root.google.ads.datamanager.v1.AudienceMember.fromObject(object.audienceMembers[i]); + } + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "HEX": + case 1: + message.encoding = 1; + break; + case "BASE64": + case 2: + message.encoding = 2; + break; + } + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.RemoveAudienceMembersRequest.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.fromObject(object.encryptionInfo); + } + return message; + }; + + /** + * Creates a plain object from a RemoveAudienceMembersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {google.ads.datamanager.v1.RemoveAudienceMembersRequest} message RemoveAudienceMembersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveAudienceMembersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.destinations = []; + object.audienceMembers = []; + } + if (options.defaults) { + object.validateOnly = false; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.encryptionInfo = null; + } + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.ads.datamanager.v1.Destination.toObject(message.destinations[j], options); + } + if (message.audienceMembers && message.audienceMembers.length) { + object.audienceMembers = []; + for (var j = 0; j < message.audienceMembers.length; ++j) + object.audienceMembers[j] = $root.google.ads.datamanager.v1.AudienceMember.toObject(message.audienceMembers[j], options); + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.ads.datamanager.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.ads.datamanager.v1.Encoding[message.encoding] : message.encoding; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.toObject(message.encryptionInfo, options); + return object; + }; + + /** + * Converts this RemoveAudienceMembersRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveAudienceMembersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveAudienceMembersRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveAudienceMembersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RemoveAudienceMembersRequest"; + }; + + return RemoveAudienceMembersRequest; + })(); + + v1.RemoveAudienceMembersResponse = (function() { + + /** + * Properties of a RemoveAudienceMembersResponse. + * @memberof google.ads.datamanager.v1 + * @interface IRemoveAudienceMembersResponse + * @property {string|null} [requestId] RemoveAudienceMembersResponse requestId + */ + + /** + * Constructs a new RemoveAudienceMembersResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RemoveAudienceMembersResponse. + * @implements IRemoveAudienceMembersResponse + * @constructor + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersResponse=} [properties] Properties to set + */ + function RemoveAudienceMembersResponse(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]]; + } + + /** + * RemoveAudienceMembersResponse requestId. + * @member {string} requestId + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @instance + */ + RemoveAudienceMembersResponse.prototype.requestId = ""; + + /** + * Creates a new RemoveAudienceMembersResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersResponse} RemoveAudienceMembersResponse instance + */ + RemoveAudienceMembersResponse.create = function create(properties) { + return new RemoveAudienceMembersResponse(properties); + }; + + /** + * Encodes the specified RemoveAudienceMembersResponse message. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersResponse} message RemoveAudienceMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RemoveAudienceMembersResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RemoveAudienceMembersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.IRemoveAudienceMembersResponse} message RemoveAudienceMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveAudienceMembersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersResponse} RemoveAudienceMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RemoveAudienceMembersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveAudienceMembersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersResponse} RemoveAudienceMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveAudienceMembersResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveAudienceMembersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a RemoveAudienceMembersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RemoveAudienceMembersResponse} RemoveAudienceMembersResponse + */ + RemoveAudienceMembersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RemoveAudienceMembersResponse) + return object; + var message = new $root.google.ads.datamanager.v1.RemoveAudienceMembersResponse(); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a RemoveAudienceMembersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {google.ads.datamanager.v1.RemoveAudienceMembersResponse} message RemoveAudienceMembersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveAudienceMembersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestId = ""; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this RemoveAudienceMembersResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @instance + * @returns {Object.} JSON object + */ + RemoveAudienceMembersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveAudienceMembersResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RemoveAudienceMembersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveAudienceMembersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RemoveAudienceMembersResponse"; + }; + + return RemoveAudienceMembersResponse; + })(); + + v1.IngestEventsRequest = (function() { + + /** + * Properties of an IngestEventsRequest. + * @memberof google.ads.datamanager.v1 + * @interface IIngestEventsRequest + * @property {Array.|null} [destinations] IngestEventsRequest destinations + * @property {Array.|null} [events] IngestEventsRequest events + * @property {google.ads.datamanager.v1.IConsent|null} [consent] IngestEventsRequest consent + * @property {boolean|null} [validateOnly] IngestEventsRequest validateOnly + * @property {google.ads.datamanager.v1.Encoding|null} [encoding] IngestEventsRequest encoding + * @property {google.ads.datamanager.v1.IEncryptionInfo|null} [encryptionInfo] IngestEventsRequest encryptionInfo + */ + + /** + * Constructs a new IngestEventsRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestEventsRequest. + * @implements IIngestEventsRequest + * @constructor + * @param {google.ads.datamanager.v1.IIngestEventsRequest=} [properties] Properties to set + */ + function IngestEventsRequest(properties) { + this.destinations = []; + this.events = []; + 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]]; + } + + /** + * IngestEventsRequest destinations. + * @member {Array.} destinations + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.destinations = $util.emptyArray; + + /** + * IngestEventsRequest events. + * @member {Array.} events + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.events = $util.emptyArray; + + /** + * IngestEventsRequest consent. + * @member {google.ads.datamanager.v1.IConsent|null|undefined} consent + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.consent = null; + + /** + * IngestEventsRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.validateOnly = false; + + /** + * IngestEventsRequest encoding. + * @member {google.ads.datamanager.v1.Encoding} encoding + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.encoding = 0; + + /** + * IngestEventsRequest encryptionInfo. + * @member {google.ads.datamanager.v1.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + */ + IngestEventsRequest.prototype.encryptionInfo = null; + + /** + * Creates a new IngestEventsRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {google.ads.datamanager.v1.IIngestEventsRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestEventsRequest} IngestEventsRequest instance + */ + IngestEventsRequest.create = function create(properties) { + return new IngestEventsRequest(properties); + }; + + /** + * Encodes the specified IngestEventsRequest message. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {google.ads.datamanager.v1.IIngestEventsRequest} message IngestEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.ads.datamanager.v1.Destination.encode(message.destinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.ads.datamanager.v1.Event.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + $root.google.ads.datamanager.v1.Consent.encode(message.consent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.encoding); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.ads.datamanager.v1.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestEventsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {google.ads.datamanager.v1.IIngestEventsRequest} message IngestEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.IngestEventsRequest} IngestEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.IngestEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.ads.datamanager.v1.Destination.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.ads.datamanager.v1.Event.decode(reader, reader.uint32())); + break; + } + case 3: { + message.consent = $root.google.ads.datamanager.v1.Consent.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.encoding = reader.int32(); + break; + } + case 6: { + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestEventsRequest} IngestEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestEventsRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.ads.datamanager.v1.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.ads.datamanager.v1.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.consent != null && message.hasOwnProperty("consent")) { + var error = $root.google.ads.datamanager.v1.Consent.verify(message.consent); + if (error) + return "consent." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.ads.datamanager.v1.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } + return null; + }; + + /** + * Creates an IngestEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestEventsRequest} IngestEventsRequest + */ + IngestEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestEventsRequest) + return object; + var message = new $root.google.ads.datamanager.v1.IngestEventsRequest(); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.destinations: object expected"); + message.destinations[i] = $root.google.ads.datamanager.v1.Destination.fromObject(object.destinations[i]); + } + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.events: object expected"); + message.events[i] = $root.google.ads.datamanager.v1.Event.fromObject(object.events[i]); + } + } + if (object.consent != null) { + if (typeof object.consent !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.consent: object expected"); + message.consent = $root.google.ads.datamanager.v1.Consent.fromObject(object.consent); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "HEX": + case 1: + message.encoding = 1; + break; + case "BASE64": + case 2: + message.encoding = 2; + break; + } + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestEventsRequest.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.fromObject(object.encryptionInfo); + } + return message; + }; + + /** + * Creates a plain object from an IngestEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {google.ads.datamanager.v1.IngestEventsRequest} message IngestEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.destinations = []; + object.events = []; + } + if (options.defaults) { + object.consent = null; + object.validateOnly = false; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.encryptionInfo = null; + } + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.ads.datamanager.v1.Destination.toObject(message.destinations[j], options); + } + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.ads.datamanager.v1.Event.toObject(message.events[j], options); + } + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = $root.google.ads.datamanager.v1.Consent.toObject(message.consent, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.ads.datamanager.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.ads.datamanager.v1.Encoding[message.encoding] : message.encoding; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.ads.datamanager.v1.EncryptionInfo.toObject(message.encryptionInfo, options); + return object; + }; + + /** + * Converts this IngestEventsRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @instance + * @returns {Object.} JSON object + */ + IngestEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestEventsRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestEventsRequest"; + }; + + return IngestEventsRequest; + })(); + + v1.IngestEventsResponse = (function() { + + /** + * Properties of an IngestEventsResponse. + * @memberof google.ads.datamanager.v1 + * @interface IIngestEventsResponse + * @property {string|null} [requestId] IngestEventsResponse requestId + */ + + /** + * Constructs a new IngestEventsResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestEventsResponse. + * @implements IIngestEventsResponse + * @constructor + * @param {google.ads.datamanager.v1.IIngestEventsResponse=} [properties] Properties to set + */ + function IngestEventsResponse(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]]; + } + + /** + * IngestEventsResponse requestId. + * @member {string} requestId + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @instance + */ + IngestEventsResponse.prototype.requestId = ""; + + /** + * Creates a new IngestEventsResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {google.ads.datamanager.v1.IIngestEventsResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestEventsResponse} IngestEventsResponse instance + */ + IngestEventsResponse.create = function create(properties) { + return new IngestEventsResponse(properties); + }; + + /** + * Encodes the specified IngestEventsResponse message. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {google.ads.datamanager.v1.IIngestEventsResponse} message IngestEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified IngestEventsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {google.ads.datamanager.v1.IIngestEventsResponse} message IngestEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.IngestEventsResponse} IngestEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.IngestEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestEventsResponse} IngestEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestEventsResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an IngestEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestEventsResponse} IngestEventsResponse + */ + IngestEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestEventsResponse) + return object; + var message = new $root.google.ads.datamanager.v1.IngestEventsResponse(); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an IngestEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {google.ads.datamanager.v1.IngestEventsResponse} message IngestEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestEventsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestId = ""; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this IngestEventsResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @instance + * @returns {Object.} JSON object + */ + IngestEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestEventsResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestEventsResponse"; + }; + + return IngestEventsResponse; + })(); + + v1.RetrieveRequestStatusRequest = (function() { + + /** + * Properties of a RetrieveRequestStatusRequest. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveRequestStatusRequest + * @property {string|null} [requestId] RetrieveRequestStatusRequest requestId + */ + + /** + * Constructs a new RetrieveRequestStatusRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveRequestStatusRequest. + * @implements IRetrieveRequestStatusRequest + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest=} [properties] Properties to set + */ + function RetrieveRequestStatusRequest(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]]; + } + + /** + * RetrieveRequestStatusRequest requestId. + * @member {string} requestId + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @instance + */ + RetrieveRequestStatusRequest.prototype.requestId = ""; + + /** + * Creates a new RetrieveRequestStatusRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusRequest} RetrieveRequestStatusRequest instance + */ + RetrieveRequestStatusRequest.create = function create(properties) { + return new RetrieveRequestStatusRequest(properties); + }; + + /** + * Encodes the specified RetrieveRequestStatusRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest} message RetrieveRequestStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveRequestStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RetrieveRequestStatusRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusRequest} message RetrieveRequestStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveRequestStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveRequestStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusRequest} RetrieveRequestStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveRequestStatusRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RetrieveRequestStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveRequestStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusRequest} RetrieveRequestStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveRequestStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveRequestStatusRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveRequestStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a RetrieveRequestStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusRequest} RetrieveRequestStatusRequest + */ + RetrieveRequestStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveRequestStatusRequest) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveRequestStatusRequest(); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a RetrieveRequestStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {google.ads.datamanager.v1.RetrieveRequestStatusRequest} message RetrieveRequestStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveRequestStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestId = ""; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this RetrieveRequestStatusRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @instance + * @returns {Object.} JSON object + */ + RetrieveRequestStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveRequestStatusRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveRequestStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveRequestStatusRequest"; + }; + + return RetrieveRequestStatusRequest; + })(); + + v1.RetrieveRequestStatusResponse = (function() { + + /** + * Properties of a RetrieveRequestStatusResponse. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveRequestStatusResponse + * @property {Array.|null} [requestStatusPerDestination] RetrieveRequestStatusResponse requestStatusPerDestination + */ + + /** + * Constructs a new RetrieveRequestStatusResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveRequestStatusResponse. + * @implements IRetrieveRequestStatusResponse + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusResponse=} [properties] Properties to set + */ + function RetrieveRequestStatusResponse(properties) { + this.requestStatusPerDestination = []; + 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]]; + } + + /** + * RetrieveRequestStatusResponse requestStatusPerDestination. + * @member {Array.} requestStatusPerDestination + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @instance + */ + RetrieveRequestStatusResponse.prototype.requestStatusPerDestination = $util.emptyArray; + + /** + * Creates a new RetrieveRequestStatusResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusResponse} RetrieveRequestStatusResponse instance + */ + RetrieveRequestStatusResponse.create = function create(properties) { + return new RetrieveRequestStatusResponse(properties); + }; + + /** + * Encodes the specified RetrieveRequestStatusResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusResponse} message RetrieveRequestStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveRequestStatusResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestStatusPerDestination != null && message.requestStatusPerDestination.length) + for (var i = 0; i < message.requestStatusPerDestination.length; ++i) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.encode(message.requestStatusPerDestination[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetrieveRequestStatusResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveRequestStatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveRequestStatusResponse} message RetrieveRequestStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveRequestStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveRequestStatusResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusResponse} RetrieveRequestStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveRequestStatusResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RetrieveRequestStatusResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.requestStatusPerDestination && message.requestStatusPerDestination.length)) + message.requestStatusPerDestination = []; + message.requestStatusPerDestination.push($root.google.ads.datamanager.v1.RequestStatusPerDestination.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveRequestStatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusResponse} RetrieveRequestStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveRequestStatusResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveRequestStatusResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveRequestStatusResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestStatusPerDestination != null && message.hasOwnProperty("requestStatusPerDestination")) { + if (!Array.isArray(message.requestStatusPerDestination)) + return "requestStatusPerDestination: array expected"; + for (var i = 0; i < message.requestStatusPerDestination.length; ++i) { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.verify(message.requestStatusPerDestination[i]); + if (error) + return "requestStatusPerDestination." + error; + } + } + return null; + }; + + /** + * Creates a RetrieveRequestStatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveRequestStatusResponse} RetrieveRequestStatusResponse + */ + RetrieveRequestStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveRequestStatusResponse) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveRequestStatusResponse(); + if (object.requestStatusPerDestination) { + if (!Array.isArray(object.requestStatusPerDestination)) + throw TypeError(".google.ads.datamanager.v1.RetrieveRequestStatusResponse.requestStatusPerDestination: array expected"); + message.requestStatusPerDestination = []; + for (var i = 0; i < object.requestStatusPerDestination.length; ++i) { + if (typeof object.requestStatusPerDestination[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveRequestStatusResponse.requestStatusPerDestination: object expected"); + message.requestStatusPerDestination[i] = $root.google.ads.datamanager.v1.RequestStatusPerDestination.fromObject(object.requestStatusPerDestination[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RetrieveRequestStatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {google.ads.datamanager.v1.RetrieveRequestStatusResponse} message RetrieveRequestStatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveRequestStatusResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requestStatusPerDestination = []; + if (message.requestStatusPerDestination && message.requestStatusPerDestination.length) { + object.requestStatusPerDestination = []; + for (var j = 0; j < message.requestStatusPerDestination.length; ++j) + object.requestStatusPerDestination[j] = $root.google.ads.datamanager.v1.RequestStatusPerDestination.toObject(message.requestStatusPerDestination[j], options); + } + return object; + }; + + /** + * Converts this RetrieveRequestStatusResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @instance + * @returns {Object.} JSON object + */ + RetrieveRequestStatusResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveRequestStatusResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveRequestStatusResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveRequestStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveRequestStatusResponse"; + }; + + return RetrieveRequestStatusResponse; + })(); + + /** + * Encoding enum. + * @name google.ads.datamanager.v1.Encoding + * @enum {number} + * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value + * @property {number} HEX=1 HEX value + * @property {number} BASE64=2 BASE64 value + */ + v1.Encoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "HEX"] = 1; + values[valuesById[2] = "BASE64"] = 2; + return values; + })(); + + v1.RequestStatusPerDestination = (function() { + + /** + * Properties of a RequestStatusPerDestination. + * @memberof google.ads.datamanager.v1 + * @interface IRequestStatusPerDestination + * @property {google.ads.datamanager.v1.IDestination|null} [destination] RequestStatusPerDestination destination + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus|null} [requestStatus] RequestStatusPerDestination requestStatus + * @property {google.ads.datamanager.v1.IErrorInfo|null} [errorInfo] RequestStatusPerDestination errorInfo + * @property {google.ads.datamanager.v1.IWarningInfo|null} [warningInfo] RequestStatusPerDestination warningInfo + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus|null} [audienceMembersIngestionStatus] RequestStatusPerDestination audienceMembersIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus|null} [eventsIngestionStatus] RequestStatusPerDestination eventsIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus|null} [audienceMembersRemovalStatus] RequestStatusPerDestination audienceMembersRemovalStatus + */ + + /** + * Constructs a new RequestStatusPerDestination. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RequestStatusPerDestination. + * @implements IRequestStatusPerDestination + * @constructor + * @param {google.ads.datamanager.v1.IRequestStatusPerDestination=} [properties] Properties to set + */ + function RequestStatusPerDestination(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]]; + } + + /** + * RequestStatusPerDestination destination. + * @member {google.ads.datamanager.v1.IDestination|null|undefined} destination + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.destination = null; + + /** + * RequestStatusPerDestination requestStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus} requestStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.requestStatus = 0; + + /** + * RequestStatusPerDestination errorInfo. + * @member {google.ads.datamanager.v1.IErrorInfo|null|undefined} errorInfo + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.errorInfo = null; + + /** + * RequestStatusPerDestination warningInfo. + * @member {google.ads.datamanager.v1.IWarningInfo|null|undefined} warningInfo + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.warningInfo = null; + + /** + * RequestStatusPerDestination audienceMembersIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus|null|undefined} audienceMembersIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.audienceMembersIngestionStatus = null; + + /** + * RequestStatusPerDestination eventsIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus|null|undefined} eventsIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.eventsIngestionStatus = null; + + /** + * RequestStatusPerDestination audienceMembersRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus|null|undefined} audienceMembersRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + RequestStatusPerDestination.prototype.audienceMembersRemovalStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RequestStatusPerDestination status. + * @member {"audienceMembersIngestionStatus"|"eventsIngestionStatus"|"audienceMembersRemovalStatus"|undefined} status + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + */ + Object.defineProperty(RequestStatusPerDestination.prototype, "status", { + get: $util.oneOfGetter($oneOfFields = ["audienceMembersIngestionStatus", "eventsIngestionStatus", "audienceMembersRemovalStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RequestStatusPerDestination instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {google.ads.datamanager.v1.IRequestStatusPerDestination=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination} RequestStatusPerDestination instance + */ + RequestStatusPerDestination.create = function create(properties) { + return new RequestStatusPerDestination(properties); + }; + + /** + * Encodes the specified RequestStatusPerDestination message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {google.ads.datamanager.v1.IRequestStatusPerDestination} message RequestStatusPerDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestStatusPerDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.ads.datamanager.v1.Destination.encode(message.destination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requestStatus != null && Object.hasOwnProperty.call(message, "requestStatus")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.requestStatus); + if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) + $root.google.ads.datamanager.v1.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.audienceMembersIngestionStatus != null && Object.hasOwnProperty.call(message, "audienceMembersIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.encode(message.audienceMembersIngestionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventsIngestionStatus != null && Object.hasOwnProperty.call(message, "eventsIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.encode(message.eventsIngestionStatus, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.audienceMembersRemovalStatus != null && Object.hasOwnProperty.call(message, "audienceMembersRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.encode(message.audienceMembersRemovalStatus, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.warningInfo != null && Object.hasOwnProperty.call(message, "warningInfo")) + $root.google.ads.datamanager.v1.WarningInfo.encode(message.warningInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestStatusPerDestination message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {google.ads.datamanager.v1.IRequestStatusPerDestination} message RequestStatusPerDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestStatusPerDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestStatusPerDestination message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination} RequestStatusPerDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestStatusPerDestination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.destination = $root.google.ads.datamanager.v1.Destination.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestStatus = reader.int32(); + break; + } + case 3: { + message.errorInfo = $root.google.ads.datamanager.v1.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.warningInfo = $root.google.ads.datamanager.v1.WarningInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.audienceMembersIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.eventsIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.audienceMembersRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestStatusPerDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination} RequestStatusPerDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestStatusPerDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestStatusPerDestination message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestStatusPerDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.ads.datamanager.v1.Destination.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.requestStatus != null && message.hasOwnProperty("requestStatus")) + switch (message.requestStatus) { + default: + return "requestStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { + var error = $root.google.ads.datamanager.v1.ErrorInfo.verify(message.errorInfo); + if (error) + return "errorInfo." + error; + } + if (message.warningInfo != null && message.hasOwnProperty("warningInfo")) { + var error = $root.google.ads.datamanager.v1.WarningInfo.verify(message.warningInfo); + if (error) + return "warningInfo." + error; + } + if (message.audienceMembersIngestionStatus != null && message.hasOwnProperty("audienceMembersIngestionStatus")) { + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.verify(message.audienceMembersIngestionStatus); + if (error) + return "audienceMembersIngestionStatus." + error; + } + } + if (message.eventsIngestionStatus != null && message.hasOwnProperty("eventsIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.verify(message.eventsIngestionStatus); + if (error) + return "eventsIngestionStatus." + error; + } + } + if (message.audienceMembersRemovalStatus != null && message.hasOwnProperty("audienceMembersRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.verify(message.audienceMembersRemovalStatus); + if (error) + return "audienceMembersRemovalStatus." + error; + } + } + return null; + }; + + /** + * Creates a RequestStatusPerDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination} RequestStatusPerDestination + */ + RequestStatusPerDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination(); + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.destination: object expected"); + message.destination = $root.google.ads.datamanager.v1.Destination.fromObject(object.destination); + } + switch (object.requestStatus) { + default: + if (typeof object.requestStatus === "number") { + message.requestStatus = object.requestStatus; + break; + } + break; + case "REQUEST_STATUS_UNKNOWN": + case 0: + message.requestStatus = 0; + break; + case "SUCCESS": + case 1: + message.requestStatus = 1; + break; + case "PROCESSING": + case 2: + message.requestStatus = 2; + break; + case "FAILED": + case 3: + message.requestStatus = 3; + break; + case "PARTIAL_SUCCESS": + case 4: + message.requestStatus = 4; + break; + } + if (object.errorInfo != null) { + if (typeof object.errorInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.errorInfo: object expected"); + message.errorInfo = $root.google.ads.datamanager.v1.ErrorInfo.fromObject(object.errorInfo); + } + if (object.warningInfo != null) { + if (typeof object.warningInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.warningInfo: object expected"); + message.warningInfo = $root.google.ads.datamanager.v1.WarningInfo.fromObject(object.warningInfo); + } + if (object.audienceMembersIngestionStatus != null) { + if (typeof object.audienceMembersIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.audienceMembersIngestionStatus: object expected"); + message.audienceMembersIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.fromObject(object.audienceMembersIngestionStatus); + } + if (object.eventsIngestionStatus != null) { + if (typeof object.eventsIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.eventsIngestionStatus: object expected"); + message.eventsIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.fromObject(object.eventsIngestionStatus); + } + if (object.audienceMembersRemovalStatus != null) { + if (typeof object.audienceMembersRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.audienceMembersRemovalStatus: object expected"); + message.audienceMembersRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.fromObject(object.audienceMembersRemovalStatus); + } + return message; + }; + + /** + * Creates a plain object from a RequestStatusPerDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination} message RequestStatusPerDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestStatusPerDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.destination = null; + object.requestStatus = options.enums === String ? "REQUEST_STATUS_UNKNOWN" : 0; + object.errorInfo = null; + object.warningInfo = null; + } + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.ads.datamanager.v1.Destination.toObject(message.destination, options); + if (message.requestStatus != null && message.hasOwnProperty("requestStatus")) + object.requestStatus = options.enums === String ? $root.google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus[message.requestStatus] === undefined ? message.requestStatus : $root.google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus[message.requestStatus] : message.requestStatus; + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) + object.errorInfo = $root.google.ads.datamanager.v1.ErrorInfo.toObject(message.errorInfo, options); + if (message.audienceMembersIngestionStatus != null && message.hasOwnProperty("audienceMembersIngestionStatus")) { + object.audienceMembersIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.toObject(message.audienceMembersIngestionStatus, options); + if (options.oneofs) + object.status = "audienceMembersIngestionStatus"; + } + if (message.eventsIngestionStatus != null && message.hasOwnProperty("eventsIngestionStatus")) { + object.eventsIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.toObject(message.eventsIngestionStatus, options); + if (options.oneofs) + object.status = "eventsIngestionStatus"; + } + if (message.audienceMembersRemovalStatus != null && message.hasOwnProperty("audienceMembersRemovalStatus")) { + object.audienceMembersRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.toObject(message.audienceMembersRemovalStatus, options); + if (options.oneofs) + object.status = "audienceMembersRemovalStatus"; + } + if (message.warningInfo != null && message.hasOwnProperty("warningInfo")) + object.warningInfo = $root.google.ads.datamanager.v1.WarningInfo.toObject(message.warningInfo, options); + return object; + }; + + /** + * Converts this RequestStatusPerDestination to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @instance + * @returns {Object.} JSON object + */ + RequestStatusPerDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestStatusPerDestination + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestStatusPerDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination"; + }; + + /** + * RequestStatus enum. + * @name google.ads.datamanager.v1.RequestStatusPerDestination.RequestStatus + * @enum {number} + * @property {number} REQUEST_STATUS_UNKNOWN=0 REQUEST_STATUS_UNKNOWN value + * @property {number} SUCCESS=1 SUCCESS value + * @property {number} PROCESSING=2 PROCESSING value + * @property {number} FAILED=3 FAILED value + * @property {number} PARTIAL_SUCCESS=4 PARTIAL_SUCCESS value + */ + RequestStatusPerDestination.RequestStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REQUEST_STATUS_UNKNOWN"] = 0; + values[valuesById[1] = "SUCCESS"] = 1; + values[valuesById[2] = "PROCESSING"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PARTIAL_SUCCESS"] = 4; + return values; + })(); + + RequestStatusPerDestination.IngestAudienceMembersStatus = (function() { + + /** + * Properties of an IngestAudienceMembersStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestAudienceMembersStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus|null} [userDataIngestionStatus] IngestAudienceMembersStatus userDataIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus|null} [mobileDataIngestionStatus] IngestAudienceMembersStatus mobileDataIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null} [pairDataIngestionStatus] IngestAudienceMembersStatus pairDataIngestionStatus + */ + + /** + * Constructs a new IngestAudienceMembersStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestAudienceMembersStatus. + * @implements IIngestAudienceMembersStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus=} [properties] Properties to set + */ + function IngestAudienceMembersStatus(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]]; + } + + /** + * IngestAudienceMembersStatus userDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus|null|undefined} userDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.userDataIngestionStatus = null; + + /** + * IngestAudienceMembersStatus mobileDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus|null|undefined} mobileDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.mobileDataIngestionStatus = null; + + /** + * IngestAudienceMembersStatus pairDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null|undefined} pairDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.pairDataIngestionStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IngestAudienceMembersStatus status. + * @member {"userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|undefined} status + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + Object.defineProperty(IngestAudienceMembersStatus.prototype, "status", { + get: $util.oneOfGetter($oneOfFields = ["userDataIngestionStatus", "mobileDataIngestionStatus", "pairDataIngestionStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IngestAudienceMembersStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus} IngestAudienceMembersStatus instance + */ + IngestAudienceMembersStatus.create = function create(properties) { + return new IngestAudienceMembersStatus(properties); + }; + + /** + * Encodes the specified IngestAudienceMembersStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus} message IngestAudienceMembersStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userDataIngestionStatus != null && Object.hasOwnProperty.call(message, "userDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.encode(message.userDataIngestionStatus, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mobileDataIngestionStatus != null && Object.hasOwnProperty.call(message, "mobileDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.encode(message.mobileDataIngestionStatus, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pairDataIngestionStatus != null && Object.hasOwnProperty.call(message, "pairDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.encode(message.pairDataIngestionStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestAudienceMembersStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestAudienceMembersStatus} message IngestAudienceMembersStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestAudienceMembersStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestAudienceMembersStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus} IngestAudienceMembersStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mobileDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pairDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestAudienceMembersStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus} IngestAudienceMembersStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestAudienceMembersStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestAudienceMembersStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestAudienceMembersStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userDataIngestionStatus != null && message.hasOwnProperty("userDataIngestionStatus")) { + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.verify(message.userDataIngestionStatus); + if (error) + return "userDataIngestionStatus." + error; + } + } + if (message.mobileDataIngestionStatus != null && message.hasOwnProperty("mobileDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.verify(message.mobileDataIngestionStatus); + if (error) + return "mobileDataIngestionStatus." + error; + } + } + if (message.pairDataIngestionStatus != null && message.hasOwnProperty("pairDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.verify(message.pairDataIngestionStatus); + if (error) + return "pairDataIngestionStatus." + error; + } + } + return null; + }; + + /** + * Creates an IngestAudienceMembersStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus} IngestAudienceMembersStatus + */ + IngestAudienceMembersStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus(); + if (object.userDataIngestionStatus != null) { + if (typeof object.userDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.userDataIngestionStatus: object expected"); + message.userDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.fromObject(object.userDataIngestionStatus); + } + if (object.mobileDataIngestionStatus != null) { + if (typeof object.mobileDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.mobileDataIngestionStatus: object expected"); + message.mobileDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.fromObject(object.mobileDataIngestionStatus); + } + if (object.pairDataIngestionStatus != null) { + if (typeof object.pairDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.pairDataIngestionStatus: object expected"); + message.pairDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.fromObject(object.pairDataIngestionStatus); + } + return message; + }; + + /** + * Creates a plain object from an IngestAudienceMembersStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus} message IngestAudienceMembersStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestAudienceMembersStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userDataIngestionStatus != null && message.hasOwnProperty("userDataIngestionStatus")) { + object.userDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.toObject(message.userDataIngestionStatus, options); + if (options.oneofs) + object.status = "userDataIngestionStatus"; + } + if (message.mobileDataIngestionStatus != null && message.hasOwnProperty("mobileDataIngestionStatus")) { + object.mobileDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.toObject(message.mobileDataIngestionStatus, options); + if (options.oneofs) + object.status = "mobileDataIngestionStatus"; + } + if (message.pairDataIngestionStatus != null && message.hasOwnProperty("pairDataIngestionStatus")) { + object.pairDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.toObject(message.pairDataIngestionStatus, options); + if (options.oneofs) + object.status = "pairDataIngestionStatus"; + } + return object; + }; + + /** + * Converts this IngestAudienceMembersStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + * @returns {Object.} JSON object + */ + IngestAudienceMembersStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestAudienceMembersStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestAudienceMembersStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus"; + }; + + return IngestAudienceMembersStatus; + })(); + + RequestStatusPerDestination.RemoveAudienceMembersStatus = (function() { + + /** + * Properties of a RemoveAudienceMembersStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemoveAudienceMembersStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus|null} [userDataRemovalStatus] RemoveAudienceMembersStatus userDataRemovalStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus|null} [mobileDataRemovalStatus] RemoveAudienceMembersStatus mobileDataRemovalStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null} [pairDataRemovalStatus] RemoveAudienceMembersStatus pairDataRemovalStatus + */ + + /** + * Constructs a new RemoveAudienceMembersStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemoveAudienceMembersStatus. + * @implements IRemoveAudienceMembersStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus=} [properties] Properties to set + */ + function RemoveAudienceMembersStatus(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]]; + } + + /** + * RemoveAudienceMembersStatus userDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus|null|undefined} userDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.userDataRemovalStatus = null; + + /** + * RemoveAudienceMembersStatus mobileDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus|null|undefined} mobileDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.mobileDataRemovalStatus = null; + + /** + * RemoveAudienceMembersStatus pairDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null|undefined} pairDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.pairDataRemovalStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RemoveAudienceMembersStatus status. + * @member {"userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|undefined} status + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + Object.defineProperty(RemoveAudienceMembersStatus.prototype, "status", { + get: $util.oneOfGetter($oneOfFields = ["userDataRemovalStatus", "mobileDataRemovalStatus", "pairDataRemovalStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RemoveAudienceMembersStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus} RemoveAudienceMembersStatus instance + */ + RemoveAudienceMembersStatus.create = function create(properties) { + return new RemoveAudienceMembersStatus(properties); + }; + + /** + * Encodes the specified RemoveAudienceMembersStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus} message RemoveAudienceMembersStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userDataRemovalStatus != null && Object.hasOwnProperty.call(message, "userDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.encode(message.userDataRemovalStatus, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mobileDataRemovalStatus != null && Object.hasOwnProperty.call(message, "mobileDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.encode(message.mobileDataRemovalStatus, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pairDataRemovalStatus != null && Object.hasOwnProperty.call(message, "pairDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.encode(message.pairDataRemovalStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RemoveAudienceMembersStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveAudienceMembersStatus} message RemoveAudienceMembersStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveAudienceMembersStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveAudienceMembersStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus} RemoveAudienceMembersStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mobileDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pairDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveAudienceMembersStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus} RemoveAudienceMembersStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveAudienceMembersStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveAudienceMembersStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveAudienceMembersStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userDataRemovalStatus != null && message.hasOwnProperty("userDataRemovalStatus")) { + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.verify(message.userDataRemovalStatus); + if (error) + return "userDataRemovalStatus." + error; + } + } + if (message.mobileDataRemovalStatus != null && message.hasOwnProperty("mobileDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.verify(message.mobileDataRemovalStatus); + if (error) + return "mobileDataRemovalStatus." + error; + } + } + if (message.pairDataRemovalStatus != null && message.hasOwnProperty("pairDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.verify(message.pairDataRemovalStatus); + if (error) + return "pairDataRemovalStatus." + error; + } + } + return null; + }; + + /** + * Creates a RemoveAudienceMembersStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus} RemoveAudienceMembersStatus + */ + RemoveAudienceMembersStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus(); + if (object.userDataRemovalStatus != null) { + if (typeof object.userDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.userDataRemovalStatus: object expected"); + message.userDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.fromObject(object.userDataRemovalStatus); + } + if (object.mobileDataRemovalStatus != null) { + if (typeof object.mobileDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.mobileDataRemovalStatus: object expected"); + message.mobileDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.fromObject(object.mobileDataRemovalStatus); + } + if (object.pairDataRemovalStatus != null) { + if (typeof object.pairDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.pairDataRemovalStatus: object expected"); + message.pairDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.fromObject(object.pairDataRemovalStatus); + } + return message; + }; + + /** + * Creates a plain object from a RemoveAudienceMembersStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus} message RemoveAudienceMembersStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveAudienceMembersStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userDataRemovalStatus != null && message.hasOwnProperty("userDataRemovalStatus")) { + object.userDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.toObject(message.userDataRemovalStatus, options); + if (options.oneofs) + object.status = "userDataRemovalStatus"; + } + if (message.mobileDataRemovalStatus != null && message.hasOwnProperty("mobileDataRemovalStatus")) { + object.mobileDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.toObject(message.mobileDataRemovalStatus, options); + if (options.oneofs) + object.status = "mobileDataRemovalStatus"; + } + if (message.pairDataRemovalStatus != null && message.hasOwnProperty("pairDataRemovalStatus")) { + object.pairDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.toObject(message.pairDataRemovalStatus, options); + if (options.oneofs) + object.status = "pairDataRemovalStatus"; + } + return object; + }; + + /** + * Converts this RemoveAudienceMembersStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + * @returns {Object.} JSON object + */ + RemoveAudienceMembersStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveAudienceMembersStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveAudienceMembersStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus"; + }; + + return RemoveAudienceMembersStatus; + })(); + + RequestStatusPerDestination.IngestEventsStatus = (function() { + + /** + * Properties of an IngestEventsStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestEventsStatus + * @property {number|Long|null} [recordCount] IngestEventsStatus recordCount + */ + + /** + * Constructs a new IngestEventsStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestEventsStatus. + * @implements IIngestEventsStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus=} [properties] Properties to set + */ + function IngestEventsStatus(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]]; + } + + /** + * IngestEventsStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @instance + */ + IngestEventsStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestEventsStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus} IngestEventsStatus instance + */ + IngestEventsStatus.create = function create(properties) { + return new IngestEventsStatus(properties); + }; + + /** + * Encodes the specified IngestEventsStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus} message IngestEventsStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + return writer; + }; + + /** + * Encodes the specified IngestEventsStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestEventsStatus} message IngestEventsStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestEventsStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestEventsStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus} IngestEventsStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestEventsStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus} IngestEventsStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestEventsStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestEventsStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestEventsStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestEventsStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus} IngestEventsStatus + */ + IngestEventsStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestEventsStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus} message IngestEventsStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestEventsStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + return object; + }; + + /** + * Converts this IngestEventsStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @instance + * @returns {Object.} JSON object + */ + IngestEventsStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestEventsStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestEventsStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestEventsStatus"; + }; + + return IngestEventsStatus; + })(); + + RequestStatusPerDestination.IngestUserDataStatus = (function() { + + /** + * Properties of an IngestUserDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestUserDataStatus + * @property {number|Long|null} [recordCount] IngestUserDataStatus recordCount + * @property {number|Long|null} [userIdentifierCount] IngestUserDataStatus userIdentifierCount + * @property {google.ads.datamanager.v1.MatchRateRange|null} [uploadMatchRateRange] IngestUserDataStatus uploadMatchRateRange + */ + + /** + * Constructs a new IngestUserDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestUserDataStatus. + * @implements IIngestUserDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus=} [properties] Properties to set + */ + function IngestUserDataStatus(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]]; + } + + /** + * IngestUserDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @instance + */ + IngestUserDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestUserDataStatus userIdentifierCount. + * @member {number|Long} userIdentifierCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @instance + */ + IngestUserDataStatus.prototype.userIdentifierCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestUserDataStatus uploadMatchRateRange. + * @member {google.ads.datamanager.v1.MatchRateRange} uploadMatchRateRange + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @instance + */ + IngestUserDataStatus.prototype.uploadMatchRateRange = 0; + + /** + * Creates a new IngestUserDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus} IngestUserDataStatus instance + */ + IngestUserDataStatus.create = function create(properties) { + return new IngestUserDataStatus(properties); + }; + + /** + * Encodes the specified IngestUserDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus} message IngestUserDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.userIdentifierCount != null && Object.hasOwnProperty.call(message, "userIdentifierCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdentifierCount); + if (message.uploadMatchRateRange != null && Object.hasOwnProperty.call(message, "uploadMatchRateRange")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.uploadMatchRateRange); + return writer; + }; + + /** + * Encodes the specified IngestUserDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserDataStatus} message IngestUserDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestUserDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus} IngestUserDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.userIdentifierCount = reader.int64(); + break; + } + case 3: { + message.uploadMatchRateRange = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestUserDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus} IngestUserDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestUserDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestUserDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.userIdentifierCount != null && message.hasOwnProperty("userIdentifierCount")) + if (!$util.isInteger(message.userIdentifierCount) && !(message.userIdentifierCount && $util.isInteger(message.userIdentifierCount.low) && $util.isInteger(message.userIdentifierCount.high))) + return "userIdentifierCount: integer|Long expected"; + if (message.uploadMatchRateRange != null && message.hasOwnProperty("uploadMatchRateRange")) + switch (message.uploadMatchRateRange) { + default: + return "uploadMatchRateRange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + return null; + }; + + /** + * Creates an IngestUserDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus} IngestUserDataStatus + */ + IngestUserDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.userIdentifierCount != null) + if ($util.Long) + (message.userIdentifierCount = $util.Long.fromValue(object.userIdentifierCount)).unsigned = false; + else if (typeof object.userIdentifierCount === "string") + message.userIdentifierCount = parseInt(object.userIdentifierCount, 10); + else if (typeof object.userIdentifierCount === "number") + message.userIdentifierCount = object.userIdentifierCount; + else if (typeof object.userIdentifierCount === "object") + message.userIdentifierCount = new $util.LongBits(object.userIdentifierCount.low >>> 0, object.userIdentifierCount.high >>> 0).toNumber(); + switch (object.uploadMatchRateRange) { + default: + if (typeof object.uploadMatchRateRange === "number") { + message.uploadMatchRateRange = object.uploadMatchRateRange; + break; + } + break; + case "MATCH_RATE_RANGE_UNKNOWN": + case 0: + message.uploadMatchRateRange = 0; + break; + case "MATCH_RATE_RANGE_NOT_ELIGIBLE": + case 1: + message.uploadMatchRateRange = 1; + break; + case "MATCH_RATE_RANGE_LESS_THAN_20": + case 2: + message.uploadMatchRateRange = 2; + break; + case "MATCH_RATE_RANGE_20_TO_30": + case 3: + message.uploadMatchRateRange = 3; + break; + case "MATCH_RATE_RANGE_31_TO_40": + case 4: + message.uploadMatchRateRange = 4; + break; + case "MATCH_RATE_RANGE_41_TO_50": + case 5: + message.uploadMatchRateRange = 5; + break; + case "MATCH_RATE_RANGE_51_TO_60": + case 6: + message.uploadMatchRateRange = 6; + break; + case "MATCH_RATE_RANGE_61_TO_70": + case 7: + message.uploadMatchRateRange = 7; + break; + case "MATCH_RATE_RANGE_71_TO_80": + case 8: + message.uploadMatchRateRange = 8; + break; + case "MATCH_RATE_RANGE_81_TO_90": + case 9: + message.uploadMatchRateRange = 9; + break; + case "MATCH_RATE_RANGE_91_TO_100": + case 10: + message.uploadMatchRateRange = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from an IngestUserDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus} message IngestUserDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestUserDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userIdentifierCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdentifierCount = options.longs === String ? "0" : 0; + object.uploadMatchRateRange = options.enums === String ? "MATCH_RATE_RANGE_UNKNOWN" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.userIdentifierCount != null && message.hasOwnProperty("userIdentifierCount")) + if (typeof message.userIdentifierCount === "number") + object.userIdentifierCount = options.longs === String ? String(message.userIdentifierCount) : message.userIdentifierCount; + else + object.userIdentifierCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdentifierCount) : options.longs === Number ? new $util.LongBits(message.userIdentifierCount.low >>> 0, message.userIdentifierCount.high >>> 0).toNumber() : message.userIdentifierCount; + if (message.uploadMatchRateRange != null && message.hasOwnProperty("uploadMatchRateRange")) + object.uploadMatchRateRange = options.enums === String ? $root.google.ads.datamanager.v1.MatchRateRange[message.uploadMatchRateRange] === undefined ? message.uploadMatchRateRange : $root.google.ads.datamanager.v1.MatchRateRange[message.uploadMatchRateRange] : message.uploadMatchRateRange; + return object; + }; + + /** + * Converts this IngestUserDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestUserDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestUserDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestUserDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserDataStatus"; + }; + + return IngestUserDataStatus; + })(); + + RequestStatusPerDestination.RemoveUserDataStatus = (function() { + + /** + * Properties of a RemoveUserDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemoveUserDataStatus + * @property {number|Long|null} [recordCount] RemoveUserDataStatus recordCount + * @property {number|Long|null} [userIdentifierCount] RemoveUserDataStatus userIdentifierCount + */ + + /** + * Constructs a new RemoveUserDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemoveUserDataStatus. + * @implements IRemoveUserDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus=} [properties] Properties to set + */ + function RemoveUserDataStatus(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]]; + } + + /** + * RemoveUserDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @instance + */ + RemoveUserDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemoveUserDataStatus userIdentifierCount. + * @member {number|Long} userIdentifierCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @instance + */ + RemoveUserDataStatus.prototype.userIdentifierCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemoveUserDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus} RemoveUserDataStatus instance + */ + RemoveUserDataStatus.create = function create(properties) { + return new RemoveUserDataStatus(properties); + }; + + /** + * Encodes the specified RemoveUserDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus} message RemoveUserDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.userIdentifierCount != null && Object.hasOwnProperty.call(message, "userIdentifierCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdentifierCount); + return writer; + }; + + /** + * Encodes the specified RemoveUserDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserDataStatus} message RemoveUserDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveUserDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus} RemoveUserDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.userIdentifierCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveUserDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus} RemoveUserDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveUserDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveUserDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.userIdentifierCount != null && message.hasOwnProperty("userIdentifierCount")) + if (!$util.isInteger(message.userIdentifierCount) && !(message.userIdentifierCount && $util.isInteger(message.userIdentifierCount.low) && $util.isInteger(message.userIdentifierCount.high))) + return "userIdentifierCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemoveUserDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus} RemoveUserDataStatus + */ + RemoveUserDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.userIdentifierCount != null) + if ($util.Long) + (message.userIdentifierCount = $util.Long.fromValue(object.userIdentifierCount)).unsigned = false; + else if (typeof object.userIdentifierCount === "string") + message.userIdentifierCount = parseInt(object.userIdentifierCount, 10); + else if (typeof object.userIdentifierCount === "number") + message.userIdentifierCount = object.userIdentifierCount; + else if (typeof object.userIdentifierCount === "object") + message.userIdentifierCount = new $util.LongBits(object.userIdentifierCount.low >>> 0, object.userIdentifierCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemoveUserDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus} message RemoveUserDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveUserDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userIdentifierCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdentifierCount = options.longs === String ? "0" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.userIdentifierCount != null && message.hasOwnProperty("userIdentifierCount")) + if (typeof message.userIdentifierCount === "number") + object.userIdentifierCount = options.longs === String ? String(message.userIdentifierCount) : message.userIdentifierCount; + else + object.userIdentifierCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdentifierCount) : options.longs === Number ? new $util.LongBits(message.userIdentifierCount.low >>> 0, message.userIdentifierCount.high >>> 0).toNumber() : message.userIdentifierCount; + return object; + }; + + /** + * Converts this RemoveUserDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemoveUserDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveUserDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveUserDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserDataStatus"; + }; + + return RemoveUserDataStatus; + })(); + + RequestStatusPerDestination.IngestMobileDataStatus = (function() { + + /** + * Properties of an IngestMobileDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestMobileDataStatus + * @property {number|Long|null} [recordCount] IngestMobileDataStatus recordCount + * @property {number|Long|null} [mobileIdCount] IngestMobileDataStatus mobileIdCount + */ + + /** + * Constructs a new IngestMobileDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestMobileDataStatus. + * @implements IIngestMobileDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus=} [properties] Properties to set + */ + function IngestMobileDataStatus(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]]; + } + + /** + * IngestMobileDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @instance + */ + IngestMobileDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestMobileDataStatus mobileIdCount. + * @member {number|Long} mobileIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @instance + */ + IngestMobileDataStatus.prototype.mobileIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestMobileDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus} IngestMobileDataStatus instance + */ + IngestMobileDataStatus.create = function create(properties) { + return new IngestMobileDataStatus(properties); + }; + + /** + * Encodes the specified IngestMobileDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus} message IngestMobileDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestMobileDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.mobileIdCount != null && Object.hasOwnProperty.call(message, "mobileIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.mobileIdCount); + return writer; + }; + + /** + * Encodes the specified IngestMobileDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestMobileDataStatus} message IngestMobileDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestMobileDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestMobileDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus} IngestMobileDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestMobileDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.mobileIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestMobileDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus} IngestMobileDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestMobileDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestMobileDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestMobileDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.mobileIdCount != null && message.hasOwnProperty("mobileIdCount")) + if (!$util.isInteger(message.mobileIdCount) && !(message.mobileIdCount && $util.isInteger(message.mobileIdCount.low) && $util.isInteger(message.mobileIdCount.high))) + return "mobileIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestMobileDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus} IngestMobileDataStatus + */ + IngestMobileDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.mobileIdCount != null) + if ($util.Long) + (message.mobileIdCount = $util.Long.fromValue(object.mobileIdCount)).unsigned = false; + else if (typeof object.mobileIdCount === "string") + message.mobileIdCount = parseInt(object.mobileIdCount, 10); + else if (typeof object.mobileIdCount === "number") + message.mobileIdCount = object.mobileIdCount; + else if (typeof object.mobileIdCount === "object") + message.mobileIdCount = new $util.LongBits(object.mobileIdCount.low >>> 0, object.mobileIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestMobileDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus} message IngestMobileDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestMobileDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mobileIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mobileIdCount = options.longs === String ? "0" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.mobileIdCount != null && message.hasOwnProperty("mobileIdCount")) + if (typeof message.mobileIdCount === "number") + object.mobileIdCount = options.longs === String ? String(message.mobileIdCount) : message.mobileIdCount; + else + object.mobileIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.mobileIdCount) : options.longs === Number ? new $util.LongBits(message.mobileIdCount.low >>> 0, message.mobileIdCount.high >>> 0).toNumber() : message.mobileIdCount; + return object; + }; + + /** + * Converts this IngestMobileDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestMobileDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestMobileDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestMobileDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestMobileDataStatus"; + }; + + return IngestMobileDataStatus; + })(); + + RequestStatusPerDestination.RemoveMobileDataStatus = (function() { + + /** + * Properties of a RemoveMobileDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemoveMobileDataStatus + * @property {number|Long|null} [recordCount] RemoveMobileDataStatus recordCount + * @property {number|Long|null} [mobileIdCount] RemoveMobileDataStatus mobileIdCount + */ + + /** + * Constructs a new RemoveMobileDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemoveMobileDataStatus. + * @implements IRemoveMobileDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus=} [properties] Properties to set + */ + function RemoveMobileDataStatus(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]]; + } + + /** + * RemoveMobileDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @instance + */ + RemoveMobileDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemoveMobileDataStatus mobileIdCount. + * @member {number|Long} mobileIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @instance + */ + RemoveMobileDataStatus.prototype.mobileIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemoveMobileDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus} RemoveMobileDataStatus instance + */ + RemoveMobileDataStatus.create = function create(properties) { + return new RemoveMobileDataStatus(properties); + }; + + /** + * Encodes the specified RemoveMobileDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus} message RemoveMobileDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveMobileDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.mobileIdCount != null && Object.hasOwnProperty.call(message, "mobileIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.mobileIdCount); + return writer; + }; + + /** + * Encodes the specified RemoveMobileDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveMobileDataStatus} message RemoveMobileDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveMobileDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveMobileDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus} RemoveMobileDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveMobileDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.mobileIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveMobileDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus} RemoveMobileDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveMobileDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveMobileDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveMobileDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.mobileIdCount != null && message.hasOwnProperty("mobileIdCount")) + if (!$util.isInteger(message.mobileIdCount) && !(message.mobileIdCount && $util.isInteger(message.mobileIdCount.low) && $util.isInteger(message.mobileIdCount.high))) + return "mobileIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemoveMobileDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus} RemoveMobileDataStatus + */ + RemoveMobileDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.mobileIdCount != null) + if ($util.Long) + (message.mobileIdCount = $util.Long.fromValue(object.mobileIdCount)).unsigned = false; + else if (typeof object.mobileIdCount === "string") + message.mobileIdCount = parseInt(object.mobileIdCount, 10); + else if (typeof object.mobileIdCount === "number") + message.mobileIdCount = object.mobileIdCount; + else if (typeof object.mobileIdCount === "object") + message.mobileIdCount = new $util.LongBits(object.mobileIdCount.low >>> 0, object.mobileIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemoveMobileDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus} message RemoveMobileDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveMobileDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mobileIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mobileIdCount = options.longs === String ? "0" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.mobileIdCount != null && message.hasOwnProperty("mobileIdCount")) + if (typeof message.mobileIdCount === "number") + object.mobileIdCount = options.longs === String ? String(message.mobileIdCount) : message.mobileIdCount; + else + object.mobileIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.mobileIdCount) : options.longs === Number ? new $util.LongBits(message.mobileIdCount.low >>> 0, message.mobileIdCount.high >>> 0).toNumber() : message.mobileIdCount; + return object; + }; + + /** + * Converts this RemoveMobileDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemoveMobileDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveMobileDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveMobileDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveMobileDataStatus"; + }; + + return RemoveMobileDataStatus; + })(); + + RequestStatusPerDestination.IngestPairDataStatus = (function() { + + /** + * Properties of an IngestPairDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestPairDataStatus + * @property {number|Long|null} [recordCount] IngestPairDataStatus recordCount + * @property {number|Long|null} [pairIdCount] IngestPairDataStatus pairIdCount + */ + + /** + * Constructs a new IngestPairDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestPairDataStatus. + * @implements IIngestPairDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus=} [properties] Properties to set + */ + function IngestPairDataStatus(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]]; + } + + /** + * IngestPairDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @instance + */ + IngestPairDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestPairDataStatus pairIdCount. + * @member {number|Long} pairIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @instance + */ + IngestPairDataStatus.prototype.pairIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestPairDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus} IngestPairDataStatus instance + */ + IngestPairDataStatus.create = function create(properties) { + return new IngestPairDataStatus(properties); + }; + + /** + * Encodes the specified IngestPairDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus} message IngestPairDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPairDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.pairIdCount != null && Object.hasOwnProperty.call(message, "pairIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pairIdCount); + return writer; + }; + + /** + * Encodes the specified IngestPairDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus} message IngestPairDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPairDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestPairDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus} IngestPairDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPairDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.pairIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestPairDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus} IngestPairDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPairDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestPairDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestPairDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.pairIdCount != null && message.hasOwnProperty("pairIdCount")) + if (!$util.isInteger(message.pairIdCount) && !(message.pairIdCount && $util.isInteger(message.pairIdCount.low) && $util.isInteger(message.pairIdCount.high))) + return "pairIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestPairDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus} IngestPairDataStatus + */ + IngestPairDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.pairIdCount != null) + if ($util.Long) + (message.pairIdCount = $util.Long.fromValue(object.pairIdCount)).unsigned = false; + else if (typeof object.pairIdCount === "string") + message.pairIdCount = parseInt(object.pairIdCount, 10); + else if (typeof object.pairIdCount === "number") + message.pairIdCount = object.pairIdCount; + else if (typeof object.pairIdCount === "object") + message.pairIdCount = new $util.LongBits(object.pairIdCount.low >>> 0, object.pairIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestPairDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus} message IngestPairDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestPairDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pairIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pairIdCount = options.longs === String ? "0" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.pairIdCount != null && message.hasOwnProperty("pairIdCount")) + if (typeof message.pairIdCount === "number") + object.pairIdCount = options.longs === String ? String(message.pairIdCount) : message.pairIdCount; + else + object.pairIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.pairIdCount) : options.longs === Number ? new $util.LongBits(message.pairIdCount.low >>> 0, message.pairIdCount.high >>> 0).toNumber() : message.pairIdCount; + return object; + }; + + /** + * Converts this IngestPairDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestPairDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestPairDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestPairDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus"; + }; + + return IngestPairDataStatus; + })(); + + RequestStatusPerDestination.RemovePairDataStatus = (function() { + + /** + * Properties of a RemovePairDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemovePairDataStatus + * @property {number|Long|null} [recordCount] RemovePairDataStatus recordCount + * @property {number|Long|null} [pairIdCount] RemovePairDataStatus pairIdCount + */ + + /** + * Constructs a new RemovePairDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemovePairDataStatus. + * @implements IRemovePairDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus=} [properties] Properties to set + */ + function RemovePairDataStatus(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]]; + } + + /** + * RemovePairDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @instance + */ + RemovePairDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemovePairDataStatus pairIdCount. + * @member {number|Long} pairIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @instance + */ + RemovePairDataStatus.prototype.pairIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemovePairDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus} RemovePairDataStatus instance + */ + RemovePairDataStatus.create = function create(properties) { + return new RemovePairDataStatus(properties); + }; + + /** + * Encodes the specified RemovePairDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus} message RemovePairDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePairDataStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.pairIdCount != null && Object.hasOwnProperty.call(message, "pairIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.pairIdCount); + return writer; + }; + + /** + * Encodes the specified RemovePairDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus} message RemovePairDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePairDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePairDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus} RemovePairDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePairDataStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.pairIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePairDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus} RemovePairDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePairDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePairDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePairDataStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.pairIdCount != null && message.hasOwnProperty("pairIdCount")) + if (!$util.isInteger(message.pairIdCount) && !(message.pairIdCount && $util.isInteger(message.pairIdCount.low) && $util.isInteger(message.pairIdCount.high))) + return "pairIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemovePairDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus} RemovePairDataStatus + */ + RemovePairDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + if (object.pairIdCount != null) + if ($util.Long) + (message.pairIdCount = $util.Long.fromValue(object.pairIdCount)).unsigned = false; + else if (typeof object.pairIdCount === "string") + message.pairIdCount = parseInt(object.pairIdCount, 10); + else if (typeof object.pairIdCount === "number") + message.pairIdCount = object.pairIdCount; + else if (typeof object.pairIdCount === "object") + message.pairIdCount = new $util.LongBits(object.pairIdCount.low >>> 0, object.pairIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemovePairDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus} message RemovePairDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePairDataStatus.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pairIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pairIdCount = options.longs === String ? "0" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.pairIdCount != null && message.hasOwnProperty("pairIdCount")) + if (typeof message.pairIdCount === "number") + object.pairIdCount = options.longs === String ? String(message.pairIdCount) : message.pairIdCount; + else + object.pairIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.pairIdCount) : options.longs === Number ? new $util.LongBits(message.pairIdCount.low >>> 0, message.pairIdCount.high >>> 0).toNumber() : message.pairIdCount; + return object; + }; + + /** + * Converts this RemovePairDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemovePairDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePairDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePairDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus"; + }; + + return RemovePairDataStatus; + })(); + + return RequestStatusPerDestination; + })(); + + /** + * MatchRateRange enum. + * @name google.ads.datamanager.v1.MatchRateRange + * @enum {number} + * @property {number} MATCH_RATE_RANGE_UNKNOWN=0 MATCH_RATE_RANGE_UNKNOWN value + * @property {number} MATCH_RATE_RANGE_NOT_ELIGIBLE=1 MATCH_RATE_RANGE_NOT_ELIGIBLE value + * @property {number} MATCH_RATE_RANGE_LESS_THAN_20=2 MATCH_RATE_RANGE_LESS_THAN_20 value + * @property {number} MATCH_RATE_RANGE_20_TO_30=3 MATCH_RATE_RANGE_20_TO_30 value + * @property {number} MATCH_RATE_RANGE_31_TO_40=4 MATCH_RATE_RANGE_31_TO_40 value + * @property {number} MATCH_RATE_RANGE_41_TO_50=5 MATCH_RATE_RANGE_41_TO_50 value + * @property {number} MATCH_RATE_RANGE_51_TO_60=6 MATCH_RATE_RANGE_51_TO_60 value + * @property {number} MATCH_RATE_RANGE_61_TO_70=7 MATCH_RATE_RANGE_61_TO_70 value + * @property {number} MATCH_RATE_RANGE_71_TO_80=8 MATCH_RATE_RANGE_71_TO_80 value + * @property {number} MATCH_RATE_RANGE_81_TO_90=9 MATCH_RATE_RANGE_81_TO_90 value + * @property {number} MATCH_RATE_RANGE_91_TO_100=10 MATCH_RATE_RANGE_91_TO_100 value + */ + v1.MatchRateRange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_RATE_RANGE_UNKNOWN"] = 0; + values[valuesById[1] = "MATCH_RATE_RANGE_NOT_ELIGIBLE"] = 1; + values[valuesById[2] = "MATCH_RATE_RANGE_LESS_THAN_20"] = 2; + values[valuesById[3] = "MATCH_RATE_RANGE_20_TO_30"] = 3; + values[valuesById[4] = "MATCH_RATE_RANGE_31_TO_40"] = 4; + values[valuesById[5] = "MATCH_RATE_RANGE_41_TO_50"] = 5; + values[valuesById[6] = "MATCH_RATE_RANGE_51_TO_60"] = 6; + values[valuesById[7] = "MATCH_RATE_RANGE_61_TO_70"] = 7; + values[valuesById[8] = "MATCH_RATE_RANGE_71_TO_80"] = 8; + values[valuesById[9] = "MATCH_RATE_RANGE_81_TO_90"] = 9; + values[valuesById[10] = "MATCH_RATE_RANGE_91_TO_100"] = 10; + return values; + })(); + + v1.ErrorInfo = (function() { + + /** + * Properties of an ErrorInfo. + * @memberof google.ads.datamanager.v1 + * @interface IErrorInfo + * @property {Array.|null} [errorCounts] ErrorInfo errorCounts + */ + + /** + * Constructs a new ErrorInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an ErrorInfo. + * @implements IErrorInfo + * @constructor + * @param {google.ads.datamanager.v1.IErrorInfo=} [properties] Properties to set + */ + function ErrorInfo(properties) { + this.errorCounts = []; + 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]]; + } + + /** + * ErrorInfo errorCounts. + * @member {Array.} errorCounts + * @memberof google.ads.datamanager.v1.ErrorInfo + * @instance + */ + ErrorInfo.prototype.errorCounts = $util.emptyArray; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {google.ads.datamanager.v1.IErrorInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ErrorInfo} ErrorInfo instance + */ + ErrorInfo.create = function create(properties) { + return new ErrorInfo(properties); + }; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.ads.datamanager.v1.ErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {google.ads.datamanager.v1.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorCounts != null && message.errorCounts.length) + for (var i = 0; i < message.errorCounts.length; ++i) + $root.google.ads.datamanager.v1.ErrorCount.encode(message.errorCounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {google.ads.datamanager.v1.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.ErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.errorCounts && message.errorCounts.length)) + message.errorCounts = []; + message.errorCounts.push($root.google.ads.datamanager.v1.ErrorCount.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorCounts != null && message.hasOwnProperty("errorCounts")) { + if (!Array.isArray(message.errorCounts)) + return "errorCounts: array expected"; + for (var i = 0; i < message.errorCounts.length; ++i) { + var error = $root.google.ads.datamanager.v1.ErrorCount.verify(message.errorCounts[i]); + if (error) + return "errorCounts." + error; + } + } + return null; + }; + + /** + * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ErrorInfo} ErrorInfo + */ + ErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ErrorInfo) + return object; + var message = new $root.google.ads.datamanager.v1.ErrorInfo(); + if (object.errorCounts) { + if (!Array.isArray(object.errorCounts)) + throw TypeError(".google.ads.datamanager.v1.ErrorInfo.errorCounts: array expected"); + message.errorCounts = []; + for (var i = 0; i < object.errorCounts.length; ++i) { + if (typeof object.errorCounts[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ErrorInfo.errorCounts: object expected"); + message.errorCounts[i] = $root.google.ads.datamanager.v1.ErrorCount.fromObject(object.errorCounts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {google.ads.datamanager.v1.ErrorInfo} message ErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errorCounts = []; + if (message.errorCounts && message.errorCounts.length) { + object.errorCounts = []; + for (var j = 0; j < message.errorCounts.length; ++j) + object.errorCounts[j] = $root.google.ads.datamanager.v1.ErrorCount.toObject(message.errorCounts[j], options); + } + return object; + }; + + /** + * Converts this ErrorInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ErrorInfo"; + }; + + return ErrorInfo; + })(); + + v1.ErrorCount = (function() { + + /** + * Properties of an ErrorCount. + * @memberof google.ads.datamanager.v1 + * @interface IErrorCount + * @property {number|Long|null} [recordCount] ErrorCount recordCount + * @property {google.ads.datamanager.v1.ProcessingErrorReason|null} [reason] ErrorCount reason + */ + + /** + * Constructs a new ErrorCount. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an ErrorCount. + * @implements IErrorCount + * @constructor + * @param {google.ads.datamanager.v1.IErrorCount=} [properties] Properties to set + */ + function ErrorCount(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]]; + } + + /** + * ErrorCount recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.ErrorCount + * @instance + */ + ErrorCount.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ErrorCount reason. + * @member {google.ads.datamanager.v1.ProcessingErrorReason} reason + * @memberof google.ads.datamanager.v1.ErrorCount + * @instance + */ + ErrorCount.prototype.reason = 0; + + /** + * Creates a new ErrorCount instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {google.ads.datamanager.v1.IErrorCount=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount instance + */ + ErrorCount.create = function create(properties) { + return new ErrorCount(properties); + }; + + /** + * Encodes the specified ErrorCount message. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {google.ads.datamanager.v1.IErrorCount} message ErrorCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorCount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reason); + return writer; + }; + + /** + * Encodes the specified ErrorCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {google.ads.datamanager.v1.IErrorCount} message ErrorCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorCount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorCount message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorCount.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.ErrorCount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.reason = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorCount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorCount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorCount message. + * @function verify + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorCount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + 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: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + break; + } + return null; + }; + + /** + * Creates an ErrorCount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount + */ + ErrorCount.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ErrorCount) + return object; + var message = new $root.google.ads.datamanager.v1.ErrorCount(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; + case "PROCESSING_ERROR_REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE": + case 1: + message.reason = 1; + break; + case "PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED": + case 2: + message.reason = 2; + break; + case "PROCESSING_ERROR_REASON_EVENT_TOO_OLD": + case 3: + message.reason = 3; + break; + case "PROCESSING_ERROR_REASON_DENIED_CONSENT": + case 4: + message.reason = 4; + break; + case "PROCESSING_ERROR_REASON_NO_CONSENT": + case 5: + message.reason = 5; + break; + case "PROCESSING_ERROR_REASON_UNKNOWN_CONSENT": + case 6: + message.reason = 6; + break; + case "PROCESSING_ERROR_REASON_DUPLICATE_GCLID": + case 7: + message.reason = 7; + break; + case "PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID": + case 8: + message.reason = 8; + break; + case "PROCESSING_ERROR_REASON_INVALID_GBRAID": + case 9: + message.reason = 9; + break; + case "PROCESSING_ERROR_REASON_INVALID_GCLID": + case 10: + message.reason = 10; + break; + case "PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID": + case 11: + message.reason = 11; + break; + case "PROCESSING_ERROR_REASON_INVALID_WBRAID": + case 12: + message.reason = 12; + break; + case "PROCESSING_ERROR_REASON_INTERNAL_ERROR": + case 13: + message.reason = 13; + break; + case "PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED": + case 14: + message.reason = 14; + break; + case "PROCESSING_ERROR_REASON_INVALID_EVENT": + case 15: + message.reason = 15; + break; + case "PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS": + case 16: + message.reason = 16; + break; + case "PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS": + case 17: + message.reason = 17; + break; + case "PROCESSING_ERROR_REASON_INVALID_FORMAT": + case 18: + message.reason = 18; + break; + case "PROCESSING_ERROR_REASON_DECRYPTION_ERROR": + case 19: + message.reason = 19; + break; + case "PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR": + case 20: + message.reason = 20; + break; + case "PROCESSING_ERROR_REASON_INVALID_WIP": + case 21: + message.reason = 21; + break; + case "PROCESSING_ERROR_REASON_INVALID_KEK": + case 22: + message.reason = 22; + break; + case "PROCESSING_ERROR_REASON_WIP_AUTH_FAILED": + case 23: + message.reason = 23; + break; + case "PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED": + case 24: + message.reason = 24; + break; + case "PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR": + case 25: + message.reason = 25; + break; + case "PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER": + case 26: + message.reason = 26; + break; + } + return message; + }; + + /** + * Creates a plain object from an ErrorCount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {google.ads.datamanager.v1.ErrorCount} message ErrorCount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorCount.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + object.reason = options.enums === String ? "PROCESSING_ERROR_REASON_UNSPECIFIED" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.ads.datamanager.v1.ProcessingErrorReason[message.reason] === undefined ? message.reason : $root.google.ads.datamanager.v1.ProcessingErrorReason[message.reason] : message.reason; + return object; + }; + + /** + * Converts this ErrorCount to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ErrorCount + * @instance + * @returns {Object.} JSON object + */ + ErrorCount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorCount + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ErrorCount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ErrorCount"; + }; + + return ErrorCount; + })(); + + v1.WarningInfo = (function() { + + /** + * Properties of a WarningInfo. + * @memberof google.ads.datamanager.v1 + * @interface IWarningInfo + * @property {Array.|null} [warningCounts] WarningInfo warningCounts + */ + + /** + * Constructs a new WarningInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a WarningInfo. + * @implements IWarningInfo + * @constructor + * @param {google.ads.datamanager.v1.IWarningInfo=} [properties] Properties to set + */ + function WarningInfo(properties) { + this.warningCounts = []; + 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]]; + } + + /** + * WarningInfo warningCounts. + * @member {Array.} warningCounts + * @memberof google.ads.datamanager.v1.WarningInfo + * @instance + */ + WarningInfo.prototype.warningCounts = $util.emptyArray; + + /** + * Creates a new WarningInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {google.ads.datamanager.v1.IWarningInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo instance + */ + WarningInfo.create = function create(properties) { + return new WarningInfo(properties); + }; + + /** + * Encodes the specified WarningInfo message. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {google.ads.datamanager.v1.IWarningInfo} message WarningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WarningInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.warningCounts != null && message.warningCounts.length) + for (var i = 0; i < message.warningCounts.length; ++i) + $root.google.ads.datamanager.v1.WarningCount.encode(message.warningCounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WarningInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {google.ads.datamanager.v1.IWarningInfo} message WarningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WarningInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WarningInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WarningInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.WarningInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.warningCounts && message.warningCounts.length)) + message.warningCounts = []; + message.warningCounts.push($root.google.ads.datamanager.v1.WarningCount.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WarningInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WarningInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WarningInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WarningInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.warningCounts != null && message.hasOwnProperty("warningCounts")) { + if (!Array.isArray(message.warningCounts)) + return "warningCounts: array expected"; + for (var i = 0; i < message.warningCounts.length; ++i) { + var error = $root.google.ads.datamanager.v1.WarningCount.verify(message.warningCounts[i]); + if (error) + return "warningCounts." + error; + } + } + return null; + }; + + /** + * Creates a WarningInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo + */ + WarningInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.WarningInfo) + return object; + var message = new $root.google.ads.datamanager.v1.WarningInfo(); + if (object.warningCounts) { + if (!Array.isArray(object.warningCounts)) + throw TypeError(".google.ads.datamanager.v1.WarningInfo.warningCounts: array expected"); + message.warningCounts = []; + for (var i = 0; i < object.warningCounts.length; ++i) { + if (typeof object.warningCounts[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.WarningInfo.warningCounts: object expected"); + message.warningCounts[i] = $root.google.ads.datamanager.v1.WarningCount.fromObject(object.warningCounts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WarningInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {google.ads.datamanager.v1.WarningInfo} message WarningInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WarningInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.warningCounts = []; + if (message.warningCounts && message.warningCounts.length) { + object.warningCounts = []; + for (var j = 0; j < message.warningCounts.length; ++j) + object.warningCounts[j] = $root.google.ads.datamanager.v1.WarningCount.toObject(message.warningCounts[j], options); + } + return object; + }; + + /** + * Converts this WarningInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.WarningInfo + * @instance + * @returns {Object.} JSON object + */ + WarningInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WarningInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.WarningInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WarningInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.WarningInfo"; + }; + + return WarningInfo; + })(); + + v1.WarningCount = (function() { + + /** + * Properties of a WarningCount. + * @memberof google.ads.datamanager.v1 + * @interface IWarningCount + * @property {number|Long|null} [recordCount] WarningCount recordCount + * @property {google.ads.datamanager.v1.ProcessingWarningReason|null} [reason] WarningCount reason + */ + + /** + * Constructs a new WarningCount. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a WarningCount. + * @implements IWarningCount + * @constructor + * @param {google.ads.datamanager.v1.IWarningCount=} [properties] Properties to set + */ + function WarningCount(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]]; + } + + /** + * WarningCount recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.WarningCount + * @instance + */ + WarningCount.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * WarningCount reason. + * @member {google.ads.datamanager.v1.ProcessingWarningReason} reason + * @memberof google.ads.datamanager.v1.WarningCount + * @instance + */ + WarningCount.prototype.reason = 0; + + /** + * Creates a new WarningCount instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {google.ads.datamanager.v1.IWarningCount=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.WarningCount} WarningCount instance + */ + WarningCount.create = function create(properties) { + return new WarningCount(properties); + }; + + /** + * Encodes the specified WarningCount message. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {google.ads.datamanager.v1.IWarningCount} message WarningCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WarningCount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordCount != null && Object.hasOwnProperty.call(message, "recordCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.recordCount); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reason); + return writer; + }; + + /** + * Encodes the specified WarningCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {google.ads.datamanager.v1.IWarningCount} message WarningCount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WarningCount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WarningCount message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.WarningCount} WarningCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WarningCount.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.WarningCount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordCount = reader.int64(); + break; + } + case 2: { + message.reason = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WarningCount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.WarningCount} WarningCount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WarningCount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WarningCount message. + * @function verify + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WarningCount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (!$util.isInteger(message.recordCount) && !(message.recordCount && $util.isInteger(message.recordCount.low) && $util.isInteger(message.recordCount.high))) + return "recordCount: integer|Long expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + return null; + }; + + /** + * Creates a WarningCount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.WarningCount} WarningCount + */ + WarningCount.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.WarningCount) + return object; + var message = new $root.google.ads.datamanager.v1.WarningCount(); + if (object.recordCount != null) + if ($util.Long) + (message.recordCount = $util.Long.fromValue(object.recordCount)).unsigned = false; + else if (typeof object.recordCount === "string") + message.recordCount = parseInt(object.recordCount, 10); + else if (typeof object.recordCount === "number") + message.recordCount = object.recordCount; + else if (typeof object.recordCount === "object") + message.recordCount = new $util.LongBits(object.recordCount.low >>> 0, object.recordCount.high >>> 0).toNumber(); + switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; + case "PROCESSING_WARNING_REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED": + case 1: + message.reason = 1; + break; + case "PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR": + case 2: + message.reason = 2; + break; + case "PROCESSING_WARNING_REASON_DECRYPTION_ERROR": + case 3: + message.reason = 3; + break; + case "PROCESSING_WARNING_REASON_WIP_AUTH_FAILED": + case 4: + message.reason = 4; + break; + case "PROCESSING_WARNING_REASON_INVALID_WIP": + case 5: + message.reason = 5; + break; + case "PROCESSING_WARNING_REASON_INVALID_KEK": + case 6: + message.reason = 6; + break; + case "PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR": + case 7: + message.reason = 7; + break; + case "PROCESSING_WARNING_REASON_INTERNAL_ERROR": + case 8: + message.reason = 8; + break; + } + return message; + }; + + /** + * Creates a plain object from a WarningCount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {google.ads.datamanager.v1.WarningCount} message WarningCount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WarningCount.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.recordCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordCount = options.longs === String ? "0" : 0; + object.reason = options.enums === String ? "PROCESSING_WARNING_REASON_UNSPECIFIED" : 0; + } + if (message.recordCount != null && message.hasOwnProperty("recordCount")) + if (typeof message.recordCount === "number") + object.recordCount = options.longs === String ? String(message.recordCount) : message.recordCount; + else + object.recordCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordCount) : options.longs === Number ? new $util.LongBits(message.recordCount.low >>> 0, message.recordCount.high >>> 0).toNumber() : message.recordCount; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.ads.datamanager.v1.ProcessingWarningReason[message.reason] === undefined ? message.reason : $root.google.ads.datamanager.v1.ProcessingWarningReason[message.reason] : message.reason; + return object; + }; + + /** + * Converts this WarningCount to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.WarningCount + * @instance + * @returns {Object.} JSON object + */ + WarningCount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WarningCount + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.WarningCount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WarningCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.WarningCount"; + }; + + return WarningCount; + })(); + + /** + * ProcessingErrorReason enum. + * @name google.ads.datamanager.v1.ProcessingErrorReason + * @enum {number} + * @property {number} PROCESSING_ERROR_REASON_UNSPECIFIED=0 PROCESSING_ERROR_REASON_UNSPECIFIED value + * @property {number} PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE=1 PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE value + * @property {number} PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED=2 PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED value + * @property {number} PROCESSING_ERROR_REASON_EVENT_TOO_OLD=3 PROCESSING_ERROR_REASON_EVENT_TOO_OLD value + * @property {number} PROCESSING_ERROR_REASON_DENIED_CONSENT=4 PROCESSING_ERROR_REASON_DENIED_CONSENT value + * @property {number} PROCESSING_ERROR_REASON_NO_CONSENT=5 PROCESSING_ERROR_REASON_NO_CONSENT value + * @property {number} PROCESSING_ERROR_REASON_UNKNOWN_CONSENT=6 PROCESSING_ERROR_REASON_UNKNOWN_CONSENT value + * @property {number} PROCESSING_ERROR_REASON_DUPLICATE_GCLID=7 PROCESSING_ERROR_REASON_DUPLICATE_GCLID value + * @property {number} PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID=8 PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID value + * @property {number} PROCESSING_ERROR_REASON_INVALID_GBRAID=9 PROCESSING_ERROR_REASON_INVALID_GBRAID value + * @property {number} PROCESSING_ERROR_REASON_INVALID_GCLID=10 PROCESSING_ERROR_REASON_INVALID_GCLID value + * @property {number} PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID=11 PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID value + * @property {number} PROCESSING_ERROR_REASON_INVALID_WBRAID=12 PROCESSING_ERROR_REASON_INVALID_WBRAID value + * @property {number} PROCESSING_ERROR_REASON_INTERNAL_ERROR=13 PROCESSING_ERROR_REASON_INTERNAL_ERROR value + * @property {number} PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED=14 PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED value + * @property {number} PROCESSING_ERROR_REASON_INVALID_EVENT=15 PROCESSING_ERROR_REASON_INVALID_EVENT value + * @property {number} PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS=16 PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS value + * @property {number} PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS=17 PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS value + * @property {number} PROCESSING_ERROR_REASON_INVALID_FORMAT=18 PROCESSING_ERROR_REASON_INVALID_FORMAT value + * @property {number} PROCESSING_ERROR_REASON_DECRYPTION_ERROR=19 PROCESSING_ERROR_REASON_DECRYPTION_ERROR value + * @property {number} PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR=20 PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR value + * @property {number} PROCESSING_ERROR_REASON_INVALID_WIP=21 PROCESSING_ERROR_REASON_INVALID_WIP value + * @property {number} PROCESSING_ERROR_REASON_INVALID_KEK=22 PROCESSING_ERROR_REASON_INVALID_KEK value + * @property {number} PROCESSING_ERROR_REASON_WIP_AUTH_FAILED=23 PROCESSING_ERROR_REASON_WIP_AUTH_FAILED value + * @property {number} PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED=24 PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED value + * @property {number} PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR=25 PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR value + * @property {number} PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER=26 PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER value + */ + v1.ProcessingErrorReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROCESSING_ERROR_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE"] = 1; + values[valuesById[2] = "PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED"] = 2; + values[valuesById[3] = "PROCESSING_ERROR_REASON_EVENT_TOO_OLD"] = 3; + values[valuesById[4] = "PROCESSING_ERROR_REASON_DENIED_CONSENT"] = 4; + values[valuesById[5] = "PROCESSING_ERROR_REASON_NO_CONSENT"] = 5; + values[valuesById[6] = "PROCESSING_ERROR_REASON_UNKNOWN_CONSENT"] = 6; + values[valuesById[7] = "PROCESSING_ERROR_REASON_DUPLICATE_GCLID"] = 7; + values[valuesById[8] = "PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID"] = 8; + values[valuesById[9] = "PROCESSING_ERROR_REASON_INVALID_GBRAID"] = 9; + values[valuesById[10] = "PROCESSING_ERROR_REASON_INVALID_GCLID"] = 10; + values[valuesById[11] = "PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID"] = 11; + values[valuesById[12] = "PROCESSING_ERROR_REASON_INVALID_WBRAID"] = 12; + values[valuesById[13] = "PROCESSING_ERROR_REASON_INTERNAL_ERROR"] = 13; + values[valuesById[14] = "PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED"] = 14; + values[valuesById[15] = "PROCESSING_ERROR_REASON_INVALID_EVENT"] = 15; + values[valuesById[16] = "PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS"] = 16; + values[valuesById[17] = "PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS"] = 17; + values[valuesById[18] = "PROCESSING_ERROR_REASON_INVALID_FORMAT"] = 18; + values[valuesById[19] = "PROCESSING_ERROR_REASON_DECRYPTION_ERROR"] = 19; + values[valuesById[20] = "PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR"] = 20; + values[valuesById[21] = "PROCESSING_ERROR_REASON_INVALID_WIP"] = 21; + values[valuesById[22] = "PROCESSING_ERROR_REASON_INVALID_KEK"] = 22; + values[valuesById[23] = "PROCESSING_ERROR_REASON_WIP_AUTH_FAILED"] = 23; + values[valuesById[24] = "PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED"] = 24; + values[valuesById[25] = "PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR"] = 25; + values[valuesById[26] = "PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER"] = 26; + return values; + })(); + + /** + * ProcessingWarningReason enum. + * @name google.ads.datamanager.v1.ProcessingWarningReason + * @enum {number} + * @property {number} PROCESSING_WARNING_REASON_UNSPECIFIED=0 PROCESSING_WARNING_REASON_UNSPECIFIED value + * @property {number} PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED=1 PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED value + * @property {number} PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR=2 PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR value + * @property {number} PROCESSING_WARNING_REASON_DECRYPTION_ERROR=3 PROCESSING_WARNING_REASON_DECRYPTION_ERROR value + * @property {number} PROCESSING_WARNING_REASON_WIP_AUTH_FAILED=4 PROCESSING_WARNING_REASON_WIP_AUTH_FAILED value + * @property {number} PROCESSING_WARNING_REASON_INVALID_WIP=5 PROCESSING_WARNING_REASON_INVALID_WIP value + * @property {number} PROCESSING_WARNING_REASON_INVALID_KEK=6 PROCESSING_WARNING_REASON_INVALID_KEK value + * @property {number} PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR=7 PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR value + * @property {number} PROCESSING_WARNING_REASON_INTERNAL_ERROR=8 PROCESSING_WARNING_REASON_INTERNAL_ERROR value + */ + v1.ProcessingWarningReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROCESSING_WARNING_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED"] = 1; + values[valuesById[2] = "PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR"] = 2; + values[valuesById[3] = "PROCESSING_WARNING_REASON_DECRYPTION_ERROR"] = 3; + values[valuesById[4] = "PROCESSING_WARNING_REASON_WIP_AUTH_FAILED"] = 4; + values[valuesById[5] = "PROCESSING_WARNING_REASON_INVALID_WIP"] = 5; + values[valuesById[6] = "PROCESSING_WARNING_REASON_INVALID_KEK"] = 6; + values[valuesById[7] = "PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR"] = 7; + values[valuesById[8] = "PROCESSING_WARNING_REASON_INTERNAL_ERROR"] = 8; + return values; + })(); + + v1.TermsOfService = (function() { + + /** + * Properties of a TermsOfService. + * @memberof google.ads.datamanager.v1 + * @interface ITermsOfService + * @property {google.ads.datamanager.v1.TermsOfServiceStatus|null} [customerMatchTermsOfServiceStatus] TermsOfService customerMatchTermsOfServiceStatus + */ + + /** + * Constructs a new TermsOfService. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a TermsOfService. + * @implements ITermsOfService + * @constructor + * @param {google.ads.datamanager.v1.ITermsOfService=} [properties] Properties to set + */ + function TermsOfService(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]]; + } + + /** + * TermsOfService customerMatchTermsOfServiceStatus. + * @member {google.ads.datamanager.v1.TermsOfServiceStatus} customerMatchTermsOfServiceStatus + * @memberof google.ads.datamanager.v1.TermsOfService + * @instance + */ + TermsOfService.prototype.customerMatchTermsOfServiceStatus = 0; + + /** + * Creates a new TermsOfService instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {google.ads.datamanager.v1.ITermsOfService=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService instance + */ + TermsOfService.create = function create(properties) { + return new TermsOfService(properties); + }; + + /** + * Encodes the specified TermsOfService message. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {google.ads.datamanager.v1.ITermsOfService} message TermsOfService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TermsOfService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customerMatchTermsOfServiceStatus != null && Object.hasOwnProperty.call(message, "customerMatchTermsOfServiceStatus")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerMatchTermsOfServiceStatus); + return writer; + }; + + /** + * Encodes the specified TermsOfService message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {google.ads.datamanager.v1.ITermsOfService} message TermsOfService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TermsOfService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TermsOfService message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TermsOfService.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.TermsOfService(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.customerMatchTermsOfServiceStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TermsOfService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TermsOfService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TermsOfService message. + * @function verify + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TermsOfService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customerMatchTermsOfServiceStatus != null && message.hasOwnProperty("customerMatchTermsOfServiceStatus")) + switch (message.customerMatchTermsOfServiceStatus) { + default: + return "customerMatchTermsOfServiceStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TermsOfService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService + */ + TermsOfService.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.TermsOfService) + return object; + var message = new $root.google.ads.datamanager.v1.TermsOfService(); + switch (object.customerMatchTermsOfServiceStatus) { + default: + if (typeof object.customerMatchTermsOfServiceStatus === "number") { + message.customerMatchTermsOfServiceStatus = object.customerMatchTermsOfServiceStatus; + break; + } + break; + case "TERMS_OF_SERVICE_STATUS_UNSPECIFIED": + case 0: + message.customerMatchTermsOfServiceStatus = 0; + break; + case "ACCEPTED": + case 1: + message.customerMatchTermsOfServiceStatus = 1; + break; + case "REJECTED": + case 2: + message.customerMatchTermsOfServiceStatus = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TermsOfService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {google.ads.datamanager.v1.TermsOfService} message TermsOfService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TermsOfService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.customerMatchTermsOfServiceStatus = options.enums === String ? "TERMS_OF_SERVICE_STATUS_UNSPECIFIED" : 0; + if (message.customerMatchTermsOfServiceStatus != null && message.hasOwnProperty("customerMatchTermsOfServiceStatus")) + object.customerMatchTermsOfServiceStatus = options.enums === String ? $root.google.ads.datamanager.v1.TermsOfServiceStatus[message.customerMatchTermsOfServiceStatus] === undefined ? message.customerMatchTermsOfServiceStatus : $root.google.ads.datamanager.v1.TermsOfServiceStatus[message.customerMatchTermsOfServiceStatus] : message.customerMatchTermsOfServiceStatus; + return object; + }; + + /** + * Converts this TermsOfService to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.TermsOfService + * @instance + * @returns {Object.} JSON object + */ + TermsOfService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TermsOfService + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.TermsOfService + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TermsOfService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.TermsOfService"; + }; + + return TermsOfService; + })(); + + /** + * TermsOfServiceStatus enum. + * @name google.ads.datamanager.v1.TermsOfServiceStatus + * @enum {number} + * @property {number} TERMS_OF_SERVICE_STATUS_UNSPECIFIED=0 TERMS_OF_SERVICE_STATUS_UNSPECIFIED value + * @property {number} ACCEPTED=1 ACCEPTED value + * @property {number} REJECTED=2 REJECTED value + */ + v1.TermsOfServiceStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TERMS_OF_SERVICE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACCEPTED"] = 1; + values[valuesById[2] = "REJECTED"] = 2; + return values; + })(); + + return v1; + })(); + + return datamanager; + })(); + + return ads; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + 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 {google.protobuf.Edition|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 {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * 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 14, wireType 0 =*/112).int32(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.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, error) { + 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(); + if (tag === error) + break; + 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())); + 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 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @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 + */ + FileDescriptorProto.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 (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")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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.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.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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.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 = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + 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.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 = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.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); + }; + + /** + * 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"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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 + */ + 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 + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @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.protobuf.DescriptorProto} DescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + 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())); + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @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 + */ + DescriptorProto.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.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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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 DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.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.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.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; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + 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 + */ + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } + } + 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()); + }; + + /** + * 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 "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); + } + 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; + }; + + /** + * 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"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * 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]]; + } + + /** + * 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; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @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.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @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 + */ + ExtensionRangeOptions.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.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + 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 + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.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.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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(); + break; + } + case 2: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 3: + case 2: + 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_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + 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.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * 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_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * 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.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @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); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @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 + */ + 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; + }; + + /** + * 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 + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + 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 + */ + 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; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + 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; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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); + }; + + /** + * 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.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @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 + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @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.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @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 + */ + 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.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; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + 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); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + 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. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * 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); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 "method." + 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. + * @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]); + } + } + 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. + * @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); + }; + + /** + * 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"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (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 + */ + + /** + * 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]]; + } + + /** + * 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 + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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()); + }; + + /** + * 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 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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 MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(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]]; + } + + /** + * 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 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * 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 + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @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.FileOptions} FileOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + FileOptions.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.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + 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.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.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"; + }; + + /** + * 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 FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @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 + */ + 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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 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 + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @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.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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()); + }; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + } + 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.deprecatedLegacyJsonFieldConflicts = false; + object.features = 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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); + }; + + /** + * 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"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @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 {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * 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.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.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.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @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.FieldOptions} FieldOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.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: + case 8: + 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.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.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; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + 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.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = 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.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * 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; + })(); + + /** + * 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; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * 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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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 {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 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 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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()); + }; + + /** + * 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + }; + + /** + * 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 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 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 OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @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.EnumOptions} EnumOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @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 + */ + EnumOptions.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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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 EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @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.EnumValueOptions} EnumValueOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @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 + */ + EnumValueOptions.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @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.ServiceOptions} ServiceOptions + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + 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; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @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 + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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[".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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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[".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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + 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 {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * 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 + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * 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 + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * 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 + */ + 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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(); + return writer; + }; + + /** + * 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 + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + MethodOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 + */ + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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"; + } + return null; + }; + + /** + * 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 + */ + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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]); + } + return message; + }; + + /** + * 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 + */ + 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.features = 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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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]; + } + 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. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * 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; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * 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 + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @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.UninterpretedOption} UninterpretedOption + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 "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. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + 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; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @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); + } + 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 UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * 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 + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @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) { + 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; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + 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; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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, error) { + 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(); + if (tag === error) + break; + 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; + }; + + /** + * 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 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 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; + }; + + /** + * 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 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 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 Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.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(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @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 + */ + GeneratedCodeInfo.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; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @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 GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.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); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * 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 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(); + }; + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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 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: + 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + /** + * 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 Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * 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.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.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); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @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.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @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 + */ + Timestamp.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"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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 Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.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; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.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); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @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.Duration} Duration + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @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 + */ + Duration.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"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + 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; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.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; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-ads-datamanager/protos/protos.json b/packages/google-ads-datamanager/protos/protos.json new file mode 100644 index 000000000000..c9fcaff5592d --- /dev/null +++ b/packages/google-ads-datamanager/protos/protos.json @@ -0,0 +1,3026 @@ +{ + "nested": { + "google": { + "nested": { + "ads": { + "nested": { + "datamanager": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Ads.DataManager.V1", + "go_package": "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager", + "java_multiple_files": true, + "java_outer_classname": "TermsOfServiceProto", + "java_package": "com.google.ads.datamanager.v1", + "php_namespace": "Google\\Ads\\DataManager\\V1", + "ruby_package": "Google::Ads::DataManager::V1" + }, + "nested": { + "AudienceMember": { + "oneofs": { + "data": { + "oneof": [ + "userData", + "pairData", + "mobileData" + ] + } + }, + "fields": { + "destinationReferences": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userData": { + "type": "UserData", + "id": 2 + }, + "pairData": { + "type": "PairData", + "id": 4 + }, + "mobileData": { + "type": "MobileData", + "id": 5 + }, + "consent": { + "type": "Consent", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PairData": { + "fields": { + "pairIds": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MobileData": { + "fields": { + "mobileIds": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Consent": { + "fields": { + "adUserData": { + "type": "ConsentStatus", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "adPersonalization": { + "type": "ConsentStatus", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ConsentStatus": { + "values": { + "CONSENT_STATUS_UNSPECIFIED": 0, + "CONSENT_GRANTED": 1, + "CONSENT_DENIED": 2 + } + }, + "UserData": { + "fields": { + "userIdentifiers": { + "rule": "repeated", + "type": "UserIdentifier", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UserIdentifier": { + "oneofs": { + "identifier": { + "oneof": [ + "emailAddress", + "phoneNumber", + "address" + ] + } + }, + "fields": { + "emailAddress": { + "type": "string", + "id": 1 + }, + "phoneNumber": { + "type": "string", + "id": 2 + }, + "address": { + "type": "AddressInfo", + "id": 3 + } + } + }, + "AddressInfo": { + "fields": { + "givenName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "familyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "regionCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "postalCode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CartData": { + "fields": { + "merchantId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "merchantFeedLabel": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "merchantFeedLanguageCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "transactionDiscount": { + "type": "double", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "items": { + "rule": "repeated", + "type": "Item", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Item": { + "fields": { + "merchantProductId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quantity": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "unitPrice": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Destination": { + "fields": { + "reference": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "loginAccount": { + "type": "ProductAccount", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "linkedAccount": { + "type": "ProductAccount", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "operatingAccount": { + "type": "ProductAccount", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "productDestinationId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ProductAccount": { + "fields": { + "product": { + "type": "Product", + "id": 1, + "options": { + "deprecated": true + } + }, + "accountId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "accountType": { + "type": "AccountType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AccountType": { + "values": { + "ACCOUNT_TYPE_UNSPECIFIED": 0, + "GOOGLE_ADS": 1, + "DISPLAY_VIDEO_PARTNER": 2, + "DISPLAY_VIDEO_ADVERTISER": 3, + "DATA_PARTNER": 4 + } + } + } + }, + "Product": { + "options": { + "deprecated": true + }, + "values": { + "PRODUCT_UNSPECIFIED": 0, + "GOOGLE_ADS": 1, + "DISPLAY_VIDEO_PARTNER": 2, + "DISPLAY_VIDEO_ADVERTISER": 3, + "DATA_PARTNER": 4 + } + }, + "DeviceInfo": { + "fields": { + "userAgent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EncryptionInfo": { + "oneofs": { + "wrappedKey": { + "oneof": [ + "gcpWrappedKeyInfo" + ] + } + }, + "fields": { + "gcpWrappedKeyInfo": { + "type": "GcpWrappedKeyInfo", + "id": 1 + } + } + }, + "GcpWrappedKeyInfo": { + "fields": { + "keyType": { + "type": "KeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "wipProvider": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kekUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encryptedDek": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "KeyType": { + "values": { + "KEY_TYPE_UNSPECIFIED": 0, + "XCHACHA20_POLY1305": 1 + } + } + } + }, + "ErrorReason": { + "values": { + "ERROR_REASON_UNSPECIFIED": 0, + "INTERNAL_ERROR": 1, + "DEADLINE_EXCEEDED": 2, + "RESOURCE_EXHAUSTED": 3, + "NOT_FOUND": 4, + "PERMISSION_DENIED": 5, + "INVALID_ARGUMENT": 6, + "REQUIRED_FIELD_MISSING": 7, + "INVALID_FORMAT": 8, + "INVALID_HEX_ENCODING": 9, + "INVALID_BASE64_ENCODING": 10, + "INVALID_SHA256_FORMAT": 11, + "INVALID_POSTAL_CODE": 12, + "INVALID_COUNTRY_CODE": 13, + "INVALID_ENUM_VALUE": 14, + "INVALID_USER_LIST_TYPE": 15, + "INVALID_AUDIENCE_MEMBER": 16, + "TOO_MANY_AUDIENCE_MEMBERS": 17, + "TOO_MANY_USER_IDENTIFIERS": 18, + "TOO_MANY_DESTINATIONS": 19, + "INVALID_DESTINATION": 20, + "DATA_PARTNER_USER_LIST_MUTATE_NOT_ALLOWED": 21, + "INVALID_MOBILE_ID_FORMAT": 22, + "INVALID_USER_LIST_ID": 23, + "MULTIPLE_DATA_TYPES_NOT_ALLOWED": 24, + "DIFFERENT_LOGIN_ACCOUNTS_NOT_ALLOWED_FOR_DATA_PARTNER": 25, + "TERMS_AND_CONDITIONS_NOT_SIGNED": 26, + "INVALID_NUMBER_FORMAT": 27, + "INVALID_CONVERSION_ACTION_ID": 28, + "INVALID_CONVERSION_ACTION_TYPE": 29, + "INVALID_CURRENCY_CODE": 30, + "INVALID_EVENT": 31, + "TOO_MANY_EVENTS": 32, + "DESTINATION_ACCOUNT_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS": 33, + "DESTINATION_ACCOUNT_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS": 34, + "DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED": 35, + "DUPLICATE_DESTINATION_REFERENCE": 36, + "NO_IDENTIFIERS_PROVIDED": 39, + "INVALID_REQUEST_ID": 48 + } + }, + "Event": { + "fields": { + "destinationReferences": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "transactionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "eventTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lastUpdatedTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userData": { + "type": "UserData", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "consent": { + "type": "Consent", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "adIdentifiers": { + "type": "AdIdentifiers", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currency": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversionValue": { + "type": "double", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "eventSource": { + "type": "EventSource", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "eventDeviceInfo": { + "type": "DeviceInfo", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cartData": { + "type": "CartData", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customVariables": { + "rule": "repeated", + "type": "CustomVariable", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "experimentalFields": { + "rule": "repeated", + "type": "ExperimentalField", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userProperties": { + "type": "UserProperties", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AdIdentifiers": { + "fields": { + "sessionAttributes": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gclid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gbraid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "wbraid": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "landingPageDeviceInfo": { + "type": "DeviceInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CustomVariable": { + "fields": { + "variable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "destinationReferences": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EventSource": { + "values": { + "EVENT_SOURCE_UNSPECIFIED": 0, + "WEB": 1, + "APP": 2, + "IN_STORE": 3, + "PHONE": 4, + "OTHER": 5 + } + }, + "ExperimentalField": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UserProperties": { + "fields": { + "customerType": { + "type": "CustomerType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customerValueBucket": { + "type": "CustomerValueBucket", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CustomerType": { + "values": { + "CUSTOMER_TYPE_UNSPECIFIED": 0, + "NEW": 1, + "RETURNING": 2, + "REENGAGED": 3 + } + }, + "CustomerValueBucket": { + "values": { + "CUSTOMER_VALUE_BUCKET_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "HIGH": 3 + } + }, + "IngestionService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "IngestAudienceMembers": { + "requestType": "IngestAudienceMembersRequest", + "responseType": "IngestAudienceMembersResponse", + "options": { + "(google.api.http).post": "/v1/audienceMembers:ingest", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/audienceMembers:ingest", + "body": "*" + } + } + ] + }, + "RemoveAudienceMembers": { + "requestType": "RemoveAudienceMembersRequest", + "responseType": "RemoveAudienceMembersResponse", + "options": { + "(google.api.http).post": "/v1/audienceMembers:remove", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/audienceMembers:remove", + "body": "*" + } + } + ] + }, + "IngestEvents": { + "requestType": "IngestEventsRequest", + "responseType": "IngestEventsResponse", + "options": { + "(google.api.http).post": "/v1/events:ingest", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/events:ingest", + "body": "*" + } + } + ] + }, + "RetrieveRequestStatus": { + "requestType": "RetrieveRequestStatusRequest", + "responseType": "RetrieveRequestStatusResponse", + "options": { + "(google.api.http).get": "/v1/requestStatus:retrieve" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/requestStatus:retrieve" + } + } + ] + } + } + }, + "IngestAudienceMembersRequest": { + "fields": { + "destinations": { + "rule": "repeated", + "type": "Destination", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceMembers": { + "rule": "repeated", + "type": "AudienceMember", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "consent": { + "type": "Consent", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "Encoding", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "termsOfService": { + "type": "TermsOfService", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "IngestAudienceMembersResponse": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + } + } + }, + "RemoveAudienceMembersRequest": { + "fields": { + "destinations": { + "rule": "repeated", + "type": "Destination", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceMembers": { + "rule": "repeated", + "type": "AudienceMember", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "Encoding", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RemoveAudienceMembersResponse": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + } + } + }, + "IngestEventsRequest": { + "fields": { + "destinations": { + "rule": "repeated", + "type": "Destination", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "events": { + "rule": "repeated", + "type": "Event", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "consent": { + "type": "Consent", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "Encoding", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "IngestEventsResponse": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + } + } + }, + "RetrieveRequestStatusRequest": { + "fields": { + "requestId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RetrieveRequestStatusResponse": { + "fields": { + "requestStatusPerDestination": { + "rule": "repeated", + "type": "RequestStatusPerDestination", + "id": 1 + } + } + }, + "Encoding": { + "values": { + "ENCODING_UNSPECIFIED": 0, + "HEX": 1, + "BASE64": 2 + } + }, + "RequestStatusPerDestination": { + "oneofs": { + "status": { + "oneof": [ + "audienceMembersIngestionStatus", + "eventsIngestionStatus", + "audienceMembersRemovalStatus" + ] + } + }, + "fields": { + "destination": { + "type": "Destination", + "id": 1 + }, + "requestStatus": { + "type": "RequestStatus", + "id": 2 + }, + "errorInfo": { + "type": "ErrorInfo", + "id": 3 + }, + "warningInfo": { + "type": "WarningInfo", + "id": 7 + }, + "audienceMembersIngestionStatus": { + "type": "IngestAudienceMembersStatus", + "id": 4 + }, + "eventsIngestionStatus": { + "type": "IngestEventsStatus", + "id": 5 + }, + "audienceMembersRemovalStatus": { + "type": "RemoveAudienceMembersStatus", + "id": 6 + } + }, + "nested": { + "RequestStatus": { + "values": { + "REQUEST_STATUS_UNKNOWN": 0, + "SUCCESS": 1, + "PROCESSING": 2, + "FAILED": 3, + "PARTIAL_SUCCESS": 4 + } + }, + "IngestAudienceMembersStatus": { + "oneofs": { + "status": { + "oneof": [ + "userDataIngestionStatus", + "mobileDataIngestionStatus", + "pairDataIngestionStatus" + ] + } + }, + "fields": { + "userDataIngestionStatus": { + "type": "IngestUserDataStatus", + "id": 1 + }, + "mobileDataIngestionStatus": { + "type": "IngestMobileDataStatus", + "id": 2 + }, + "pairDataIngestionStatus": { + "type": "IngestPairDataStatus", + "id": 3 + } + } + }, + "RemoveAudienceMembersStatus": { + "oneofs": { + "status": { + "oneof": [ + "userDataRemovalStatus", + "mobileDataRemovalStatus", + "pairDataRemovalStatus" + ] + } + }, + "fields": { + "userDataRemovalStatus": { + "type": "RemoveUserDataStatus", + "id": 1 + }, + "mobileDataRemovalStatus": { + "type": "RemoveMobileDataStatus", + "id": 2 + }, + "pairDataRemovalStatus": { + "type": "RemovePairDataStatus", + "id": 3 + } + } + }, + "IngestEventsStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + } + } + }, + "IngestUserDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdentifierCount": { + "type": "int64", + "id": 2 + }, + "uploadMatchRateRange": { + "type": "MatchRateRange", + "id": 3 + } + } + }, + "RemoveUserDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdentifierCount": { + "type": "int64", + "id": 2 + } + } + }, + "IngestMobileDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "mobileIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemoveMobileDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "mobileIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "IngestPairDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "pairIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemovePairDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "pairIdCount": { + "type": "int64", + "id": 2 + } + } + } + } + }, + "MatchRateRange": { + "values": { + "MATCH_RATE_RANGE_UNKNOWN": 0, + "MATCH_RATE_RANGE_NOT_ELIGIBLE": 1, + "MATCH_RATE_RANGE_LESS_THAN_20": 2, + "MATCH_RATE_RANGE_20_TO_30": 3, + "MATCH_RATE_RANGE_31_TO_40": 4, + "MATCH_RATE_RANGE_41_TO_50": 5, + "MATCH_RATE_RANGE_51_TO_60": 6, + "MATCH_RATE_RANGE_61_TO_70": 7, + "MATCH_RATE_RANGE_71_TO_80": 8, + "MATCH_RATE_RANGE_81_TO_90": 9, + "MATCH_RATE_RANGE_91_TO_100": 10 + } + }, + "ErrorInfo": { + "fields": { + "errorCounts": { + "rule": "repeated", + "type": "ErrorCount", + "id": 1 + } + } + }, + "ErrorCount": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "reason": { + "type": "ProcessingErrorReason", + "id": 2 + } + } + }, + "WarningInfo": { + "fields": { + "warningCounts": { + "rule": "repeated", + "type": "WarningCount", + "id": 1 + } + } + }, + "WarningCount": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "reason": { + "type": "ProcessingWarningReason", + "id": 2 + } + } + }, + "ProcessingErrorReason": { + "values": { + "PROCESSING_ERROR_REASON_UNSPECIFIED": 0, + "PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE": 1, + "PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED": 2, + "PROCESSING_ERROR_REASON_EVENT_TOO_OLD": 3, + "PROCESSING_ERROR_REASON_DENIED_CONSENT": 4, + "PROCESSING_ERROR_REASON_NO_CONSENT": 5, + "PROCESSING_ERROR_REASON_UNKNOWN_CONSENT": 6, + "PROCESSING_ERROR_REASON_DUPLICATE_GCLID": 7, + "PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID": 8, + "PROCESSING_ERROR_REASON_INVALID_GBRAID": 9, + "PROCESSING_ERROR_REASON_INVALID_GCLID": 10, + "PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID": 11, + "PROCESSING_ERROR_REASON_INVALID_WBRAID": 12, + "PROCESSING_ERROR_REASON_INTERNAL_ERROR": 13, + "PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED": 14, + "PROCESSING_ERROR_REASON_INVALID_EVENT": 15, + "PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS": 16, + "PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS": 17, + "PROCESSING_ERROR_REASON_INVALID_FORMAT": 18, + "PROCESSING_ERROR_REASON_DECRYPTION_ERROR": 19, + "PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR": 20, + "PROCESSING_ERROR_REASON_INVALID_WIP": 21, + "PROCESSING_ERROR_REASON_INVALID_KEK": 22, + "PROCESSING_ERROR_REASON_WIP_AUTH_FAILED": 23, + "PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED": 24, + "PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR": 25, + "PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER": 26 + } + }, + "ProcessingWarningReason": { + "values": { + "PROCESSING_WARNING_REASON_UNSPECIFIED": 0, + "PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED": 1, + "PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR": 2, + "PROCESSING_WARNING_REASON_DECRYPTION_ERROR": 3, + "PROCESSING_WARNING_REASON_WIP_AUTH_FAILED": 4, + "PROCESSING_WARNING_REASON_INVALID_WIP": 5, + "PROCESSING_WARNING_REASON_INVALID_KEK": 6, + "PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR": 7, + "PROCESSING_WARNING_REASON_INTERNAL_ERROR": 8 + } + }, + "TermsOfService": { + "fields": { + "customerMatchTermsOfServiceStatus": { + "type": "TermsOfServiceStatus", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TermsOfServiceStatus": { + "values": { + "TERMS_OF_SERVICE_STATUS_UNSPECIFIED": 0, + "ACCEPTED": 1, + "REJECTED": 2 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "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": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js new file mode 100644 index 000000000000..0d0a15670c2a --- /dev/null +++ b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js @@ -0,0 +1,100 @@ +// Copyright 2025 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(destinations, audienceMembers) { + // [START datamanager_v1_generated_IngestionService_IngestAudienceMembers_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 list of destinations to send the audience members to. + */ + // const destinations = [1,2,3,4] + /** + * Required. The list of users to send to the specified destinations. At most + * 10000 AudienceMember google.ads.datamanager.v1.AudienceMember resources + * can be sent in a single request. + */ + // const audienceMembers = [1,2,3,4] + /** + * Optional. Request-level consent to apply to all users in the request. + * User-level consent overrides request-level consent, and can be specified in + * each AudienceMember google.ads.datamanager.v1.AudienceMember. + */ + // const consent = {} + /** + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + */ + // const validateOnly = true + /** + * Optional. Required for UserData google.ads.datamanager.v1.UserData + * uploads. The encoding type of the user identifiers. For hashed user + * identifiers, this is the encoding type of the hashed string. For encrypted + * hashed user identifiers, this is the encoding type of the outer encrypted + * string, but not necessarily the inner hashed string, meaning the inner + * hashed string could be encoded in a different way than the outer encrypted + * string. For non `UserData` uploads, this field is ignored. + */ + // const encoding = {} + /** + * Optional. Encryption information for + * UserData google.ads.datamanager.v1.UserData uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + */ + // const encryptionInfo = {} + /** + * Optional. The terms of service that the user has accepted/rejected. + */ + // const termsOfService = {} + + // Imports the Datamanager library + const {IngestionServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new IngestionServiceClient(); + + async function callIngestAudienceMembers() { + // Construct request + const request = { + destinations, + audienceMembers, + }; + + // Run request + const response = await datamanagerClient.ingestAudienceMembers(request); + console.log(response); + } + + callIngestAudienceMembers(); + // [END datamanager_v1_generated_IngestionService_IngestAudienceMembers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js new file mode 100644 index 000000000000..87b47f0197a1 --- /dev/null +++ b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js @@ -0,0 +1,96 @@ +// Copyright 2025 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(destinations, events) { + // [START datamanager_v1_generated_IngestionService_IngestEvents_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 list of destinations to send the events to. + */ + // const destinations = [1,2,3,4] + /** + * Required. The list of events to send to the specified destinations. At most + * 2000 Event google.ads.datamanager.v1.Event resources + * can be sent in a single request. + */ + // const events = [1,2,3,4] + /** + * Optional. Request-level consent to apply to all users in the request. + * User-level consent overrides request-level consent, and can be specified in + * each Event google.ads.datamanager.v1.Event. + */ + // const consent = {} + /** + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + */ + // const validateOnly = true + /** + * Optional. Required for UserData google.ads.datamanager.v1.UserData + * uploads. The encoding type of the user identifiers. For hashed user + * identifiers, this is the encoding type of the hashed string. For encrypted + * hashed user identifiers, this is the encoding type of the outer encrypted + * string, but not necessarily the inner hashed string, meaning the inner + * hashed string could be encoded in a different way than the outer encrypted + * string. For non `UserData` uploads, this field is ignored. + */ + // const encoding = {} + /** + * Optional. Encryption information for + * UserData google.ads.datamanager.v1.UserData uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + */ + // const encryptionInfo = {} + + // Imports the Datamanager library + const {IngestionServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new IngestionServiceClient(); + + async function callIngestEvents() { + // Construct request + const request = { + destinations, + events, + }; + + // Run request + const response = await datamanagerClient.ingestEvents(request); + console.log(response); + } + + callIngestEvents(); + // [END datamanager_v1_generated_IngestionService_IngestEvents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js new file mode 100644 index 000000000000..f144410a1a55 --- /dev/null +++ b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js @@ -0,0 +1,85 @@ +// Copyright 2025 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(destinations, audienceMembers) { + // [START datamanager_v1_generated_IngestionService_RemoveAudienceMembers_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 list of destinations to remove the users from. + */ + // const destinations = [1,2,3,4] + /** + * Required. The list of users to remove. + */ + // const audienceMembers = [1,2,3,4] + /** + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + */ + // const validateOnly = true + /** + * Optional. Required for UserData google.ads.datamanager.v1.UserData + * uploads. The encoding type of the user identifiers. Applies to only the + * outer encoding for encrypted user identifiers. For non `UserData` uploads, + * this field is ignored. + */ + // const encoding = {} + /** + * Optional. Encryption information for + * UserData google.ads.datamanager.v1.UserData uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + */ + // const encryptionInfo = {} + + // Imports the Datamanager library + const {IngestionServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new IngestionServiceClient(); + + async function callRemoveAudienceMembers() { + // Construct request + const request = { + destinations, + audienceMembers, + }; + + // Run request + const response = await datamanagerClient.removeAudienceMembers(request); + console.log(response); + } + + callRemoveAudienceMembers(); + // [END datamanager_v1_generated_IngestionService_RemoveAudienceMembers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js new file mode 100644 index 000000000000..e51e04c21740 --- /dev/null +++ b/packages/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js @@ -0,0 +1,61 @@ +// Copyright 2025 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(requestId) { + // [START datamanager_v1_generated_IngestionService_RetrieveRequestStatus_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. Required. The request ID of the Data Manager API request. + */ + // const requestId = 'abc123' + + // Imports the Datamanager library + const {IngestionServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new IngestionServiceClient(); + + async function callRetrieveRequestStatus() { + // Construct request + const request = { + requestId, + }; + + // Run request + const response = await datamanagerClient.retrieveRequestStatus(request); + console.log(response); + } + + callRetrieveRequestStatus(); + // [END datamanager_v1_generated_IngestionService_RetrieveRequestStatus_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json b/packages/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json new file mode 100644 index 000000000000..18c375ea8317 --- /dev/null +++ b/packages/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json @@ -0,0 +1,235 @@ +{ + "clientLibrary": { + "name": "nodejs-datamanager", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.ads.datamanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "datamanager_v1_generated_IngestionService_IngestAudienceMembers_async", + "title": "IngestionService ingestAudienceMembers Sample", + "origin": "API_DEFINITION", + "description": " Uploads a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources to the provided [Destination][google.ads.datamanager.v1.Destination].", + "canonical": true, + "file": "ingestion_service.ingest_audience_members.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 92, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "IngestAudienceMembers", + "fullName": "google.ads.datamanager.v1.IngestionService.IngestAudienceMembers", + "async": true, + "parameters": [ + { + "name": "destinations", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "audience_members", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "consent", + "type": ".google.ads.datamanager.v1.Consent" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "encoding", + "type": ".google.ads.datamanager.v1.Encoding" + }, + { + "name": "encryption_info", + "type": ".google.ads.datamanager.v1.EncryptionInfo" + }, + { + "name": "terms_of_service", + "type": ".google.ads.datamanager.v1.TermsOfService" + } + ], + "resultType": ".google.ads.datamanager.v1.IngestAudienceMembersResponse", + "client": { + "shortName": "IngestionServiceClient", + "fullName": "google.ads.datamanager.v1.IngestionServiceClient" + }, + "method": { + "shortName": "IngestAudienceMembers", + "fullName": "google.ads.datamanager.v1.IngestionService.IngestAudienceMembers", + "service": { + "shortName": "IngestionService", + "fullName": "google.ads.datamanager.v1.IngestionService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_IngestionService_RemoveAudienceMembers_async", + "title": "IngestionService removeAudienceMembers Sample", + "origin": "API_DEFINITION", + "description": " Removes a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources from the provided [Destination][google.ads.datamanager.v1.Destination].", + "canonical": true, + "file": "ingestion_service.remove_audience_members.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveAudienceMembers", + "fullName": "google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers", + "async": true, + "parameters": [ + { + "name": "destinations", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "audience_members", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "encoding", + "type": ".google.ads.datamanager.v1.Encoding" + }, + { + "name": "encryption_info", + "type": ".google.ads.datamanager.v1.EncryptionInfo" + } + ], + "resultType": ".google.ads.datamanager.v1.RemoveAudienceMembersResponse", + "client": { + "shortName": "IngestionServiceClient", + "fullName": "google.ads.datamanager.v1.IngestionServiceClient" + }, + "method": { + "shortName": "RemoveAudienceMembers", + "fullName": "google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers", + "service": { + "shortName": "IngestionService", + "fullName": "google.ads.datamanager.v1.IngestionService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_IngestionService_IngestEvents_async", + "title": "IngestionService ingestEvents Sample", + "origin": "API_DEFINITION", + "description": " Uploads a list of [Event][google.ads.datamanager.v1.Event] resources from the provided [Destination][google.ads.datamanager.v1.Destination].", + "canonical": true, + "file": "ingestion_service.ingest_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "IngestEvents", + "fullName": "google.ads.datamanager.v1.IngestionService.IngestEvents", + "async": true, + "parameters": [ + { + "name": "destinations", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "events", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "consent", + "type": ".google.ads.datamanager.v1.Consent" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "encoding", + "type": ".google.ads.datamanager.v1.Encoding" + }, + { + "name": "encryption_info", + "type": ".google.ads.datamanager.v1.EncryptionInfo" + } + ], + "resultType": ".google.ads.datamanager.v1.IngestEventsResponse", + "client": { + "shortName": "IngestionServiceClient", + "fullName": "google.ads.datamanager.v1.IngestionServiceClient" + }, + "method": { + "shortName": "IngestEvents", + "fullName": "google.ads.datamanager.v1.IngestionService.IngestEvents", + "service": { + "shortName": "IngestionService", + "fullName": "google.ads.datamanager.v1.IngestionService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_IngestionService_RetrieveRequestStatus_async", + "title": "IngestionService retrieveRequestStatus Sample", + "origin": "API_DEFINITION", + "description": " Gets the status of a request given request id.", + "canonical": true, + "file": "ingestion_service.retrieve_request_status.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetrieveRequestStatus", + "fullName": "google.ads.datamanager.v1.IngestionService.RetrieveRequestStatus", + "async": true, + "parameters": [ + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.RetrieveRequestStatusResponse", + "client": { + "shortName": "IngestionServiceClient", + "fullName": "google.ads.datamanager.v1.IngestionServiceClient" + }, + "method": { + "shortName": "RetrieveRequestStatus", + "fullName": "google.ads.datamanager.v1.IngestionService.RetrieveRequestStatus", + "service": { + "shortName": "IngestionService", + "fullName": "google.ads.datamanager.v1.IngestionService" + } + } + } + } + ] +} diff --git a/packages/google-ads-datamanager/src/index.ts b/packages/google-ads-datamanager/src/index.ts new file mode 100644 index 000000000000..fa151fd1fe70 --- /dev/null +++ b/packages/google-ads-datamanager/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2025 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const IngestionServiceClient = v1.IngestionServiceClient; +type IngestionServiceClient = v1.IngestionServiceClient; + +export {v1, IngestionServiceClient}; +export default {v1, IngestionServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-ads-datamanager/src/v1/gapic_metadata.json b/packages/google-ads-datamanager/src/v1/gapic_metadata.json new file mode 100644 index 000000000000..534830bfeb41 --- /dev/null +++ b/packages/google-ads-datamanager/src/v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.ads.datamanager.v1", + "libraryPackage": "@google-ads/datamanager", + "services": { + "IngestionService": { + "clients": { + "grpc": { + "libraryClient": "IngestionServiceClient", + "rpcs": { + "IngestAudienceMembers": { + "methods": [ + "ingestAudienceMembers" + ] + }, + "RemoveAudienceMembers": { + "methods": [ + "removeAudienceMembers" + ] + }, + "IngestEvents": { + "methods": [ + "ingestEvents" + ] + }, + "RetrieveRequestStatus": { + "methods": [ + "retrieveRequestStatus" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "IngestionServiceClient", + "rpcs": { + "IngestAudienceMembers": { + "methods": [ + "ingestAudienceMembers" + ] + }, + "RemoveAudienceMembers": { + "methods": [ + "removeAudienceMembers" + ] + }, + "IngestEvents": { + "methods": [ + "ingestEvents" + ] + }, + "RetrieveRequestStatus": { + "methods": [ + "retrieveRequestStatus" + ] + } + } + } + } + } + } +} diff --git a/packages/google-ads-datamanager/src/v1/index.ts b/packages/google-ads-datamanager/src/v1/index.ts new file mode 100644 index 000000000000..a82342d3a7a0 --- /dev/null +++ b/packages/google-ads-datamanager/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 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. ** + +export {IngestionServiceClient} from './ingestion_service_client'; diff --git a/packages/google-ads-datamanager/src/v1/ingestion_service_client.ts b/packages/google-ads-datamanager/src/v1/ingestion_service_client.ts new file mode 100644 index 000000000000..23eac549394d --- /dev/null +++ b/packages/google-ads-datamanager/src/v1/ingestion_service_client.ts @@ -0,0 +1,765 @@ +// Copyright 2025 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/ingestion_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './ingestion_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for sending audience data to supported destinations. + * @class + * @memberof v1 + */ +export class IngestionServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('datamanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + ingestionServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of IngestionServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new IngestionServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof IngestionServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'datamanager.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.IngestionService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.ingestionServiceStub) { + return this.ingestionServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.IngestionService. + this.ingestionServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.IngestionService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.IngestionService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const ingestionServiceStubMethods = + ['ingestAudienceMembers', 'removeAudienceMembers', 'ingestEvents', 'retrieveRequestStatus']; + for (const methodName of ingestionServiceStubMethods) { + const callPromise = this.ingestionServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.ingestionServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datamanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'datamanager.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/datamanager' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Uploads a list of + * {@link protos.google.ads.datamanager.v1.AudienceMember|AudienceMember} resources to the + * provided {@link protos.google.ads.datamanager.v1.Destination|Destination}. + * + * @param {Object} request + * The request object that will be sent. + * @param {number[]} request.destinations + * Required. The list of destinations to send the audience members to. + * @param {number[]} request.audienceMembers + * Required. The list of users to send to the specified destinations. At most + * 10000 {@link protos.google.ads.datamanager.v1.AudienceMember|AudienceMember} resources + * can be sent in a single request. + * @param {google.ads.datamanager.v1.Consent} [request.consent] + * Optional. Request-level consent to apply to all users in the request. + * User-level consent overrides request-level consent, and can be specified in + * each {@link protos.google.ads.datamanager.v1.AudienceMember|AudienceMember}. + * @param {boolean} [request.validateOnly] + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + * @param {google.ads.datamanager.v1.Encoding} [request.encoding] + * Optional. Required for {@link protos.google.ads.datamanager.v1.UserData|UserData} + * uploads. The encoding type of the user identifiers. For hashed user + * identifiers, this is the encoding type of the hashed string. For encrypted + * hashed user identifiers, this is the encoding type of the outer encrypted + * string, but not necessarily the inner hashed string, meaning the inner + * hashed string could be encoded in a different way than the outer encrypted + * string. For non `UserData` uploads, this field is ignored. + * @param {google.ads.datamanager.v1.EncryptionInfo} [request.encryptionInfo] + * Optional. Encryption information for + * {@link protos.google.ads.datamanager.v1.UserData|UserData} uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + * @param {google.ads.datamanager.v1.TermsOfService} [request.termsOfService] + * Optional. The terms of service that the user has accepted/rejected. + * @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 protos.google.ads.datamanager.v1.IngestAudienceMembersResponse|IngestAudienceMembersResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ingestion_service.ingest_audience_members.js + * region_tag:datamanager_v1_generated_IngestionService_IngestAudienceMembers_async + */ + ingestAudienceMembers( + request?: protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|undefined, {}|undefined + ]>; + ingestAudienceMembers( + request: protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|null|undefined, + {}|null|undefined>): void; + ingestAudienceMembers( + request: protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|null|undefined, + {}|null|undefined>): void; + ingestAudienceMembers( + request?: protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|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 || {}; + this.initialize().catch(err => {throw err}); + this._log.info('ingestAudienceMembers request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('ingestAudienceMembers response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.ingestAudienceMembers(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse, + protos.google.ads.datamanager.v1.IIngestAudienceMembersRequest|undefined, + {}|undefined + ]) => { + this._log.info('ingestAudienceMembers response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Removes a list of + * {@link protos.google.ads.datamanager.v1.AudienceMember|AudienceMember} resources from + * the provided {@link protos.google.ads.datamanager.v1.Destination|Destination}. + * + * @param {Object} request + * The request object that will be sent. + * @param {number[]} request.destinations + * Required. The list of destinations to remove the users from. + * @param {number[]} request.audienceMembers + * Required. The list of users to remove. + * @param {boolean} [request.validateOnly] + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + * @param {google.ads.datamanager.v1.Encoding} [request.encoding] + * Optional. Required for {@link protos.google.ads.datamanager.v1.UserData|UserData} + * uploads. The encoding type of the user identifiers. Applies to only the + * outer encoding for encrypted user identifiers. For non `UserData` uploads, + * this field is ignored. + * @param {google.ads.datamanager.v1.EncryptionInfo} [request.encryptionInfo] + * Optional. Encryption information for + * {@link protos.google.ads.datamanager.v1.UserData|UserData} uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + * @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 protos.google.ads.datamanager.v1.RemoveAudienceMembersResponse|RemoveAudienceMembersResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ingestion_service.remove_audience_members.js + * region_tag:datamanager_v1_generated_IngestionService_RemoveAudienceMembers_async + */ + removeAudienceMembers( + request?: protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|undefined, {}|undefined + ]>; + removeAudienceMembers( + request: protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|null|undefined, + {}|null|undefined>): void; + removeAudienceMembers( + request: protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|null|undefined, + {}|null|undefined>): void; + removeAudienceMembers( + request?: protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|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 || {}; + this.initialize().catch(err => {throw err}); + this._log.info('removeAudienceMembers request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('removeAudienceMembers response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.removeAudienceMembers(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse, + protos.google.ads.datamanager.v1.IRemoveAudienceMembersRequest|undefined, + {}|undefined + ]) => { + this._log.info('removeAudienceMembers response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Uploads a list of + * {@link protos.google.ads.datamanager.v1.Event|Event} resources from + * the provided {@link protos.google.ads.datamanager.v1.Destination|Destination}. + * + * @param {Object} request + * The request object that will be sent. + * @param {number[]} request.destinations + * Required. The list of destinations to send the events to. + * @param {number[]} request.events + * Required. The list of events to send to the specified destinations. At most + * 2000 {@link protos.google.ads.datamanager.v1.Event|Event} resources + * can be sent in a single request. + * @param {google.ads.datamanager.v1.Consent} [request.consent] + * Optional. Request-level consent to apply to all users in the request. + * User-level consent overrides request-level consent, and can be specified in + * each {@link protos.google.ads.datamanager.v1.Event|Event}. + * @param {boolean} [request.validateOnly] + * Optional. For testing purposes. If `true`, the request is validated but not + * executed. Only errors are returned, not results. + * @param {google.ads.datamanager.v1.Encoding} [request.encoding] + * Optional. Required for {@link protos.google.ads.datamanager.v1.UserData|UserData} + * uploads. The encoding type of the user identifiers. For hashed user + * identifiers, this is the encoding type of the hashed string. For encrypted + * hashed user identifiers, this is the encoding type of the outer encrypted + * string, but not necessarily the inner hashed string, meaning the inner + * hashed string could be encoded in a different way than the outer encrypted + * string. For non `UserData` uploads, this field is ignored. + * @param {google.ads.datamanager.v1.EncryptionInfo} [request.encryptionInfo] + * Optional. Encryption information for + * {@link protos.google.ads.datamanager.v1.UserData|UserData} uploads. If not set, it's + * assumed that uploaded identifying information is hashed but not encrypted. + * For non `UserData` uploads, this field is ignored. + * @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 protos.google.ads.datamanager.v1.IngestEventsResponse|IngestEventsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ingestion_service.ingest_events.js + * region_tag:datamanager_v1_generated_IngestionService_IngestEvents_async + */ + ingestEvents( + request?: protos.google.ads.datamanager.v1.IIngestEventsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|undefined, {}|undefined + ]>; + ingestEvents( + request: protos.google.ads.datamanager.v1.IIngestEventsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|null|undefined, + {}|null|undefined>): void; + ingestEvents( + request: protos.google.ads.datamanager.v1.IIngestEventsRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|null|undefined, + {}|null|undefined>): void; + ingestEvents( + request?: protos.google.ads.datamanager.v1.IIngestEventsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|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 || {}; + this.initialize().catch(err => {throw err}); + this._log.info('ingestEvents request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('ingestEvents response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.ingestEvents(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IIngestEventsResponse, + protos.google.ads.datamanager.v1.IIngestEventsRequest|undefined, + {}|undefined + ]) => { + this._log.info('ingestEvents response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the status of a request given request id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.requestId + * Required. Required. The request ID of the Data Manager API request. + * @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 protos.google.ads.datamanager.v1.RetrieveRequestStatusResponse|RetrieveRequestStatusResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/ingestion_service.retrieve_request_status.js + * region_tag:datamanager_v1_generated_IngestionService_RetrieveRequestStatus_async + */ + retrieveRequestStatus( + request?: protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|undefined, {}|undefined + ]>; + retrieveRequestStatus( + request: protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|null|undefined, + {}|null|undefined>): void; + retrieveRequestStatus( + request: protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|null|undefined, + {}|null|undefined>): void; + retrieveRequestStatus( + request?: protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|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 || {}; + this.initialize().catch(err => {throw err}); + this._log.info('retrieveRequestStatus request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('retrieveRequestStatus response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.retrieveRequestStatus(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse, + protos.google.ads.datamanager.v1.IRetrieveRequestStatusRequest|undefined, + {}|undefined + ]) => { + this._log.info('retrieveRequestStatus response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.ingestionServiceStub && !this._terminated) { + return this.ingestionServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-ads-datamanager/src/v1/ingestion_service_client_config.json b/packages/google-ads-datamanager/src/v1/ingestion_service_client_config.json new file mode 100644 index 000000000000..d198e4f1285d --- /dev/null +++ b/packages/google-ads-datamanager/src/v1/ingestion_service_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.IngestionService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "IngestAudienceMembers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveAudienceMembers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "IngestEvents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RetrieveRequestStatus": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ads-datamanager/src/v1/ingestion_service_proto_list.json b/packages/google-ads-datamanager/src/v1/ingestion_service_proto_list.json new file mode 100644 index 000000000000..879a3e6c5d28 --- /dev/null +++ b/packages/google-ads-datamanager/src/v1/ingestion_service_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../protos/google/ads/datamanager/v1/audience.proto", + "../../protos/google/ads/datamanager/v1/cart_data.proto", + "../../protos/google/ads/datamanager/v1/consent.proto", + "../../protos/google/ads/datamanager/v1/destination.proto", + "../../protos/google/ads/datamanager/v1/device_info.proto", + "../../protos/google/ads/datamanager/v1/encryption_info.proto", + "../../protos/google/ads/datamanager/v1/error.proto", + "../../protos/google/ads/datamanager/v1/event.proto", + "../../protos/google/ads/datamanager/v1/experimental_field.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/processing_errors.proto", + "../../protos/google/ads/datamanager/v1/request_status_per_destination.proto", + "../../protos/google/ads/datamanager/v1/terms_of_service.proto", + "../../protos/google/ads/datamanager/v1/user_data.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.js b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..0fd668329965 --- /dev/null +++ b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const datamanager = require('@google-ads/datamanager'); + +function main() { + const ingestionServiceClient = new datamanager.IngestionServiceClient(); +} + +main(); diff --git a/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.ts b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..d60e623ce7b6 --- /dev/null +++ b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 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. ** + +import {IngestionServiceClient} from '@google-ads/datamanager'; + +// check that the client class type name can be used +function doStuffWithIngestionServiceClient(client: IngestionServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const ingestionServiceClient = new IngestionServiceClient(); + doStuffWithIngestionServiceClient(ingestionServiceClient); +} + +main(); diff --git a/packages/google-ads-datamanager/system-test/install.ts b/packages/google-ads-datamanager/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/google-ads-datamanager/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 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. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts b/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts new file mode 100644 index 000000000000..d4e0aca13000 --- /dev/null +++ b/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts @@ -0,0 +1,514 @@ +// Copyright 2025 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as ingestionserviceModule from '../src'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1.IngestionServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = ingestionserviceModule.v1.IngestionServiceClient.servicePath; + assert.strictEqual(servicePath, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = ingestionserviceModule.v1.IngestionServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new ingestionserviceModule.v1.IngestionServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new ingestionserviceModule.v1.IngestionServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new ingestionserviceModule.v1.IngestionServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = ingestionserviceModule.v1.IngestionServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.ingestionServiceStub, undefined); + await client.initialize(); + assert(client.ingestionServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.ingestionServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.ingestionServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('ingestAudienceMembers', () => { + it('invokes ingestAudienceMembers without error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersResponse() + ); + client.innerApiCalls.ingestAudienceMembers = stubSimpleCall(expectedResponse); + const [response] = await client.ingestAudienceMembers(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes ingestAudienceMembers without error using callback', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersResponse() + ); + client.innerApiCalls.ingestAudienceMembers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.ingestAudienceMembers( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IIngestAudienceMembersResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes ingestAudienceMembers with error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.ingestAudienceMembers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.ingestAudienceMembers(request), expectedError); + }); + + it('invokes ingestAudienceMembers with closed client', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestAudienceMembersRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.ingestAudienceMembers(request), expectedError); + }); + }); + + describe('removeAudienceMembers', () => { + it('invokes removeAudienceMembers without error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersResponse() + ); + client.innerApiCalls.removeAudienceMembers = stubSimpleCall(expectedResponse); + const [response] = await client.removeAudienceMembers(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes removeAudienceMembers without error using callback', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersResponse() + ); + client.innerApiCalls.removeAudienceMembers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeAudienceMembers( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IRemoveAudienceMembersResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes removeAudienceMembers with error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.removeAudienceMembers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.removeAudienceMembers(request), expectedError); + }); + + it('invokes removeAudienceMembers with closed client', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RemoveAudienceMembersRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.removeAudienceMembers(request), expectedError); + }); + }); + + describe('ingestEvents', () => { + it('invokes ingestEvents without error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsResponse() + ); + client.innerApiCalls.ingestEvents = stubSimpleCall(expectedResponse); + const [response] = await client.ingestEvents(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes ingestEvents without error using callback', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsResponse() + ); + client.innerApiCalls.ingestEvents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.ingestEvents( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IIngestEventsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes ingestEvents with error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.ingestEvents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.ingestEvents(request), expectedError); + }); + + it('invokes ingestEvents with closed client', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.IngestEventsRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.ingestEvents(request), expectedError); + }); + }); + + describe('retrieveRequestStatus', () => { + it('invokes retrieveRequestStatus without error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusResponse() + ); + client.innerApiCalls.retrieveRequestStatus = stubSimpleCall(expectedResponse); + const [response] = await client.retrieveRequestStatus(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes retrieveRequestStatus without error using callback', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusResponse() + ); + client.innerApiCalls.retrieveRequestStatus = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retrieveRequestStatus( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IRetrieveRequestStatusResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes retrieveRequestStatus with error', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.retrieveRequestStatus = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retrieveRequestStatus(request), expectedError); + }); + + it('invokes retrieveRequestStatus with closed client', async () => { + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveRequestStatusRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.retrieveRequestStatus(request), expectedError); + }); + }); +}); diff --git a/packages/google-ads-datamanager/tsconfig.json b/packages/google-ads-datamanager/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/google-ads-datamanager/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/google-ads-datamanager/webpack.config.js b/packages/google-ads-datamanager/webpack.config.js new file mode 100644 index 000000000000..1e866c6c2320 --- /dev/null +++ b/packages/google-ads-datamanager/webpack.config.js @@ -0,0 +1,64 @@ +// 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 +// +// 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'IngestionService', + filename: './ingestion-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-ai-generativelanguage/CHANGELOG.md b/packages/google-ai-generativelanguage/CHANGELOG.md index 9ff458c21267..06c427cc2411 100644 --- a/packages/google-ai-generativelanguage/CHANGELOG.md +++ b/packages/google-ai-generativelanguage/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v3.4.1...generativelanguage-v3.5.0) (2025-10-16) + + +### Features + +* [generativelanguage] add support for additional reasons to stop image generation ([#6820](https://github.com/googleapis/google-cloud-node/issues/6820)) ([3290633](https://github.com/googleapis/google-cloud-node/commit/3290633a3b1d99a8c696aebe79f38984fda44460)) + ## [3.4.1](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v3.4.0...generativelanguage-v3.4.1) (2025-10-13) diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json index dfd9eab7480c..7e6610b1f1a0 100644 --- a/packages/google-ai-generativelanguage/package.json +++ b/packages/google-ai-generativelanguage/package.json @@ -1,6 +1,6 @@ { "name": "@google-ai/generativelanguage", - "version": "3.4.1", + "version": "3.5.0", "description": "Generative Language API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/generative_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/generative_service.proto index f3058679ca73..9ab7dd23dafa 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/generative_service.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/generative_service.proto @@ -23,6 +23,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; option go_package = "cloud.google.com/go/ai/generativelanguage/apiv1/generativelanguagepb;generativelanguagepb"; option java_multiple_files = true; @@ -144,6 +145,7 @@ enum TaskType { } // Request to generate a completion from the model. +// NEXT ID: 18 message GenerateContentRequest { // Required. The name of the `Model` to use for generating the completion. // @@ -190,6 +192,7 @@ message GenerateContentRequest { // Configuration options for model generation and outputs. Not all parameters // are configurable for every model. +// Next ID: 29 message GenerationConfig { // Optional. Number of generated responses to return. If unset, this will // default to 1. Please note that this doesn't work for previous generation @@ -248,6 +251,11 @@ message GenerationConfig { // generated seed. optional int32 seed = 8 [(google.api.field_behavior) = OPTIONAL]; + // Optional. An internal detail. Use `responseJsonSchema` rather than this + // field. + google.protobuf.Value response_json_schema_ordered = 28 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Presence penalty applied to the next token's logprobs if the // token has already been seen in the response. // @@ -289,6 +297,7 @@ message GenerationConfig { // [response_logprobs=True][google.ai.generativelanguage.v1.GenerationConfig.response_logprobs]. // This sets the number of top logprobs to return at each decoding step in the // [Candidate.logprobs_result][google.ai.generativelanguage.v1.Candidate.logprobs_result]. + // The number must be in the range of [0, 20]. optional int32 logprobs = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. Enables enhanced civic answers. It may not be available for all @@ -442,8 +451,22 @@ message Candidate { // violations. IMAGE_SAFETY = 11; + // Image generation stopped because generated images has other prohibited + // content. + IMAGE_PROHIBITED_CONTENT = 14; + + // Image generation stopped because of other miscellaneous issue. + IMAGE_OTHER = 15; + + // The model was expected to generate an image, but none was generated. + NO_IMAGE = 16; + // Model generated a tool call but no tools were enabled in the request. UNEXPECTED_TOOL_CALL = 12; + + // Model called too many tools consecutively, thus the system exited + // execution. + TOO_MANY_TOOL_CALLS = 13; } // Output only. Index of the candidate in the list of response candidates. @@ -460,6 +483,13 @@ message Candidate { (google.api.field_behavior) = OUTPUT_ONLY ]; + // Optional. Output only. Details the reason why the model stopped generating + // tokens. This is populated only when `finish_reason` is set. + optional string finish_message = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + // List of ratings for the safety of a response candidate. // // There is at most one rating per category. @@ -512,6 +542,12 @@ message UrlMetadata { // Url retrieval is failed due to error. URL_RETRIEVAL_STATUS_ERROR = 2; + + // Url retrieval is failed because the content is behind paywall. + URL_RETRIEVAL_STATUS_PAYWALL = 3; + + // Url retrieval is failed because the content is unsafe. + URL_RETRIEVAL_STATUS_UNSAFE = 4; } // Retrieved url by the tool. @@ -541,6 +577,9 @@ message LogprobsResult { repeated Candidate candidates = 1; } + // Sum of log probabilities for all tokens. + optional float log_probability_sum = 3; + // Length = total number of decoding steps. repeated TopCandidates top_candidates = 1; diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/safety.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/safety.proto index efd39e380201..635b7f1299d0 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/safety.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1/safety.proto @@ -65,7 +65,8 @@ enum HarmCategory { HARM_CATEGORY_DANGEROUS_CONTENT = 10; // **Gemini** - Content that may be used to harm civic integrity. - HARM_CATEGORY_CIVIC_INTEGRITY = 11; + // DEPRECATED: use enable_enhanced_civic_answers instead. + HARM_CATEGORY_CIVIC_INTEGRITY = 11 [deprecated = true]; } // Safety rating for a piece of content. diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/content.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/content.proto index f030a76fa787..604f3fc46d7f 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/content.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/content.proto @@ -141,6 +141,29 @@ message Part { // Optional. An opaque signature for the thought so it can be reused in // subsequent requests. bytes thought_signature = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Custom metadata associated with the Part. + // Agents using genai.Part as content representation may need to keep track + // of the additional information. For example it can be name of a file/source + // from which the Part originates or a way to multiplex multiple Part streams. + google.protobuf.Struct part_metadata = 8; +} + +// A datatype containing media that is part of a `FunctionResponse` message. +// +// A `FunctionResponsePart` consists of data which has an associated datatype. A +// `FunctionResponsePart` can only contain one of the accepted types in +// `FunctionResponsePart.data`. +// +// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the +// type and subtype of the media if the `inline_data` field is filled with raw +// bytes. +message FunctionResponsePart { + // The data of the function response part. + oneof data { + // Inline media bytes. + FunctionResponseBlob inline_data = 1; + } } // Raw media bytes. @@ -160,6 +183,24 @@ message Blob { bytes data = 2; } +// Raw media bytes for function response. +// +// Text should not be sent as raw bytes, use the 'FunctionResponse.response' +// field. +message FunctionResponseBlob { + // The IANA standard MIME type of the source data. + // Examples: + // - image/png + // - image/jpeg + // If an unsupported MIME type is provided, an error will be returned. For a + // complete list of supported types, see [Supported file + // formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats). + string mime_type = 1; + + // Raw bytes for media formats. + bytes data = 2; +} + // URI based data. message FileData { // Optional. The IANA standard MIME type of the source data. @@ -242,6 +283,8 @@ message CodeExecutionResult { // A `Tool` is a piece of code that enables the system to interact with // external systems to perform an action, or set of actions, outside of // knowledge and scope of the model. +// +// Next ID: 12 message Tool { // GoogleSearch tool type. // Tool to support Google Search in Model. Powered by Google. @@ -253,6 +296,29 @@ message Tool { [(google.api.field_behavior) = OPTIONAL]; } + // Computer Use tool type. + message ComputerUse { + // Represents the environment being operated, such as a web browser. + enum Environment { + // Defaults to browser. + ENVIRONMENT_UNSPECIFIED = 0; + + // Operates in a web browser. + ENVIRONMENT_BROWSER = 1; + } + + // Required. The environment being operated. + Environment environment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. By default, predefined functions are included in the final + // model call. Some of them can be explicitly excluded from being + // automatically included. This can serve two purposes: + // 1. Using a more restricted / different action space. + // 2. Improving the definitions / instructions of predefined functions. + repeated string excluded_predefined_functions = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + // Optional. A list of `FunctionDeclarations` available to the model that can // be used for function calling. // @@ -280,6 +346,11 @@ message Tool { // Tool to support Google Search in Model. Powered by Google. GoogleSearch google_search = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Tool to support the model interacting directly with the computer. + // If enabled, it automatically populates computer-use specific Function + // Declarations. + ComputerUse computer_use = 6 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Tool to support URL context retrieval. UrlContext url_context = 8 [(google.api.field_behavior) = OPTIONAL]; } @@ -352,6 +423,9 @@ message FunctionCallingConfig { // Model decides to predict either a function call // or a natural language response, but will validate function calls with // constrained decoding. + // If "allowed_function_names" are set, the predicted function call will be + // limited to any one of "allowed_function_names", else the predicted + // function call will be any one of the provided "function_declarations". VALIDATED = 4; } @@ -362,9 +436,9 @@ message FunctionCallingConfig { // Optional. A set of function names that, when provided, limits the functions // the model will call. // - // This should only be set when the Mode is ANY. Function names - // should match [FunctionDeclaration.name]. With mode set to ANY, model will - // predict a function call from the set of function names provided. + // This should only be set when the Mode is ANY or VALIDATED. Function names + // should match [FunctionDeclaration.name]. When set, model will + // predict a function call from only allowed function names. repeated string allowed_function_names = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -392,8 +466,8 @@ message FunctionDeclaration { } // Required. The name of the function. - // Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - // length of 63. + // Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, + // with a maximum length of 64. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A brief description of the function. @@ -453,7 +527,7 @@ message FunctionCall { // Required. The name of the function to call. // Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - // length of 63. + // length of 64. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The function parameters and values in JSON object format. @@ -491,12 +565,21 @@ message FunctionResponse { // Required. The name of the function to call. // Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - // length of 63. + // length of 64. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The function response in JSON object format. + // Callers can use any keys of their choice that fit the function's syntax + // to return the function output, e.g. "output", "result", etc. + // In particular, if the function call failed to execute, the response can + // have an "error" key to return error details to the model. google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. Ordered `Parts` that constitute a function response. Parts may + // have different IANA MIME types. + repeated FunctionResponsePart parts = 8 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Signals that function call continues, and more responses will be // returned, turning the function call into a generator. // Is only applicable to NON_BLOCKING function calls, is ignored otherwise. @@ -521,11 +604,8 @@ message Schema { // Required. Data type. Type type = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The format of the data. This is used only for primitive - // datatypes. Supported formats: - // for NUMBER type: float, double - // for INTEGER type: int32, int64 - // for STRING type: enum, date-time + // Optional. The format of the data. Any value is allowed, but most do not + // trigger any special functionality. string format = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The title of the schema. diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/file.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/file.proto index 86adf2c4d5f0..8bb340bdd120 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/file.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/file.proto @@ -61,6 +61,9 @@ message File { // Indicates the file is generated by Google. GENERATED = 2; + + // Indicates the file is a registered, i.e. a Google Cloud Storage file. + REGISTERED = 3; } // Metadata for the File. diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/generative_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/generative_service.proto index c38d5e4bf169..6da72859ea28 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/generative_service.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/generative_service.proto @@ -163,6 +163,7 @@ enum TaskType { } // Request to generate a completion from the model. +// NEXT ID: 18 message GenerateContentRequest { // Required. The name of the `Model` to use for generating the completion. // @@ -303,8 +304,19 @@ message ThinkingConfig { optional int32 thinking_budget = 2; } +// Config for image generation features. +message ImageConfig { + // Optional. The aspect ratio of the image to generate. Supported aspect + // ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9. + // + // If not specified, the model will choose a default aspect ratio based on any + // reference images provided. + optional string aspect_ratio = 1 [(google.api.field_behavior) = OPTIONAL]; +} + // Configuration options for model generation and outputs. Not all parameters // are configurable for every model. +// Next ID: 29 message GenerationConfig { // Supported modalities of the response. enum Modality { @@ -450,8 +462,17 @@ message GenerationConfig { // be used within non-required properties. (Nullable properties are not // sufficient.) If `$ref` is set on a sub-schema, no other properties, except // for than those starting as a `$`, may be set. - google.protobuf.Value response_json_schema = 24 - [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Value response_json_schema = 24 [ + json_name = "_responseJsonSchema", + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. An internal detail. Use `responseJsonSchema` rather than this + // field. + google.protobuf.Value response_json_schema_ordered = 28 [ + json_name = "responseJsonSchema", + (google.api.field_behavior) = OPTIONAL + ]; // Optional. Presence penalty applied to the next token's logprobs if the // token has already been seen in the response. @@ -494,6 +515,7 @@ message GenerationConfig { // [response_logprobs=True][google.ai.generativelanguage.v1beta.GenerationConfig.response_logprobs]. // This sets the number of top logprobs to return at each decoding step in the // [Candidate.logprobs_result][google.ai.generativelanguage.v1beta.Candidate.logprobs_result]. + // The number must be in the range of [0, 20]. optional int32 logprobs = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. Enables enhanced civic answers. It may not be available for all @@ -523,6 +545,12 @@ message GenerationConfig { optional ThinkingConfig thinking_config = 22 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Config for image generation. + // An error will be returned if this field is set for models that don't + // support these config options. + optional ImageConfig image_config = 27 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. If specified, the media resolution specified will be used. optional MediaResolution media_resolution = 23 [(google.api.field_behavior) = OPTIONAL]; @@ -700,8 +728,25 @@ message Candidate { // violations. IMAGE_SAFETY = 11; + // Image generation stopped because generated images has other prohibited + // content. + IMAGE_PROHIBITED_CONTENT = 14; + + // Image generation stopped because of other miscellaneous issue. + IMAGE_OTHER = 15; + + // The model was expected to generate an image, but none was generated. + NO_IMAGE = 16; + + // Image generation stopped due to recitation. + IMAGE_RECITATION = 17; + // Model generated a tool call but no tools were enabled in the request. UNEXPECTED_TOOL_CALL = 12; + + // Model called too many tools consecutively, thus the system exited + // execution. + TOO_MANY_TOOL_CALLS = 13; } // Output only. Index of the candidate in the list of response candidates. @@ -718,6 +763,13 @@ message Candidate { (google.api.field_behavior) = OUTPUT_ONLY ]; + // Optional. Output only. Details the reason why the model stopped generating + // tokens. This is populated only when `finish_reason` is set. + optional string finish_message = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + // List of ratings for the safety of a response candidate. // // There is at most one rating per category. @@ -777,6 +829,12 @@ message UrlMetadata { // Url retrieval is failed due to error. URL_RETRIEVAL_STATUS_ERROR = 2; + + // Url retrieval is failed because the content is behind paywall. + URL_RETRIEVAL_STATUS_PAYWALL = 3; + + // Url retrieval is failed because the content is unsafe. + URL_RETRIEVAL_STATUS_UNSAFE = 4; } // Retrieved url by the tool. @@ -806,6 +864,9 @@ message LogprobsResult { repeated Candidate candidates = 1; } + // Sum of log probabilities for all tokens. + optional float log_probability_sum = 3; + // Length = total number of decoding steps. repeated TopCandidates top_candidates = 1; @@ -1552,8 +1613,7 @@ message BidiGenerateContentToolResponse { message BidiGenerateContentClientMessage { // The type of the message. oneof message_type { - // Optional. Session configuration sent in the first and only first client - // message. + // Optional. Session configuration sent only in the first client message. BidiGenerateContentSetup setup = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Incremental update of the current conversation delivered from @@ -1625,6 +1685,11 @@ message BidiGenerateContentServerContent { UrlContextMetadata url_context_metadata = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If true, indicates that the model is not generating content + // because it is waiting for more input from the user, e.g. because it expects + // the user to continue talking. + bool waiting_for_input = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request for the client to execute the `function_calls` and return the diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/prediction_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/prediction_service.proto index 4853a68ca4d2..7abe5a9460d9 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/prediction_service.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/prediction_service.proto @@ -106,7 +106,7 @@ message PredictLongRunningResponse { // The response of the long running operation. oneof response { // The response of the video generation prediction. - GenerateVideoResponse generate_video_response = 1; + PredictLongRunningGeneratedVideoResponse generate_video_response = 1; } } @@ -135,7 +135,7 @@ message Video { } // Veo response. -message GenerateVideoResponse { +message PredictLongRunningGeneratedVideoResponse { // The generated samples. repeated Media generated_samples = 1; diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/safety.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/safety.proto index b3b2c80962a8..d386fdb79c98 100644 --- a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/safety.proto +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta/safety.proto @@ -65,7 +65,8 @@ enum HarmCategory { HARM_CATEGORY_DANGEROUS_CONTENT = 10; // **Gemini** - Content that may be used to harm civic integrity. - HARM_CATEGORY_CIVIC_INTEGRITY = 11; + // DEPRECATED: use enable_enhanced_civic_answers instead. + HARM_CATEGORY_CIVIC_INTEGRITY = 11 [deprecated = true]; } // Content filtering metadata associated with processing a single request. diff --git a/packages/google-ai-generativelanguage/protos/protos.d.ts b/packages/google-ai-generativelanguage/protos/protos.d.ts index 865434b9a66b..85f11c7d9691 100644 --- a/packages/google-ai-generativelanguage/protos/protos.d.ts +++ b/packages/google-ai-generativelanguage/protos/protos.d.ts @@ -1062,6 +1062,9 @@ export namespace google { /** GenerationConfig seed */ seed?: (number|null); + /** GenerationConfig responseJsonSchemaOrdered */ + responseJsonSchemaOrdered?: (google.protobuf.IValue|null); + /** GenerationConfig presencePenalty */ presencePenalty?: (number|null); @@ -1108,6 +1111,9 @@ export namespace google { /** GenerationConfig seed. */ public seed?: (number|null); + /** GenerationConfig responseJsonSchemaOrdered. */ + public responseJsonSchemaOrdered?: (google.protobuf.IValue|null); + /** GenerationConfig presencePenalty. */ public presencePenalty?: (number|null); @@ -1598,6 +1604,9 @@ export namespace google { /** Candidate finishReason */ finishReason?: (google.ai.generativelanguage.v1.Candidate.FinishReason|keyof typeof google.ai.generativelanguage.v1.Candidate.FinishReason|null); + /** Candidate finishMessage */ + finishMessage?: (string|null); + /** Candidate safetyRatings */ safetyRatings?: (google.ai.generativelanguage.v1.ISafetyRating[]|null); @@ -1638,6 +1647,9 @@ export namespace google { /** Candidate finishReason. */ public finishReason: (google.ai.generativelanguage.v1.Candidate.FinishReason|keyof typeof google.ai.generativelanguage.v1.Candidate.FinishReason); + /** Candidate finishMessage. */ + public finishMessage?: (string|null); + /** Candidate safetyRatings. */ public safetyRatings: google.ai.generativelanguage.v1.ISafetyRating[]; @@ -1753,7 +1765,11 @@ export namespace google { SPII = 9, MALFORMED_FUNCTION_CALL = 10, IMAGE_SAFETY = 11, - UNEXPECTED_TOOL_CALL = 12 + IMAGE_PROHIBITED_CONTENT = 14, + IMAGE_OTHER = 15, + NO_IMAGE = 16, + UNEXPECTED_TOOL_CALL = 12, + TOO_MANY_TOOL_CALLS = 13 } } @@ -1963,13 +1979,18 @@ export namespace google { enum UrlRetrievalStatus { URL_RETRIEVAL_STATUS_UNSPECIFIED = 0, URL_RETRIEVAL_STATUS_SUCCESS = 1, - URL_RETRIEVAL_STATUS_ERROR = 2 + URL_RETRIEVAL_STATUS_ERROR = 2, + URL_RETRIEVAL_STATUS_PAYWALL = 3, + URL_RETRIEVAL_STATUS_UNSAFE = 4 } } /** Properties of a LogprobsResult. */ interface ILogprobsResult { + /** LogprobsResult logProbabilitySum */ + logProbabilitySum?: (number|null); + /** LogprobsResult topCandidates */ topCandidates?: (google.ai.generativelanguage.v1.LogprobsResult.ITopCandidates[]|null); @@ -1986,6 +2007,9 @@ export namespace google { */ constructor(properties?: google.ai.generativelanguage.v1.ILogprobsResult); + /** LogprobsResult logProbabilitySum. */ + public logProbabilitySum?: (number|null); + /** LogprobsResult topCandidates. */ public topCandidates: google.ai.generativelanguage.v1.LogprobsResult.ITopCandidates[]; @@ -25818,6 +25842,9 @@ export namespace google { /** Part thoughtSignature */ thoughtSignature?: (Uint8Array|Buffer|string|null); + + /** Part partMetadata */ + partMetadata?: (google.protobuf.IStruct|null); } /** Represents a Part. */ @@ -25859,6 +25886,9 @@ export namespace google { /** Part thoughtSignature. */ public thoughtSignature: (Uint8Array|Buffer|string); + /** Part partMetadata. */ + public partMetadata?: (google.protobuf.IStruct|null); + /** Part data. */ public data?: ("text"|"inlineData"|"functionCall"|"functionResponse"|"fileData"|"executableCode"|"codeExecutionResult"); @@ -25943,6 +25973,106 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FunctionResponsePart. */ + interface IFunctionResponsePart { + + /** FunctionResponsePart inlineData */ + inlineData?: (google.ai.generativelanguage.v1beta.IFunctionResponseBlob|null); + } + + /** Represents a FunctionResponsePart. */ + class FunctionResponsePart implements IFunctionResponsePart { + + /** + * Constructs a new FunctionResponsePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta.IFunctionResponsePart); + + /** FunctionResponsePart inlineData. */ + public inlineData?: (google.ai.generativelanguage.v1beta.IFunctionResponseBlob|null); + + /** FunctionResponsePart data. */ + public data?: "inlineData"; + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponsePart instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta.IFunctionResponsePart): google.ai.generativelanguage.v1beta.FunctionResponsePart; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponsePart + * @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.ai.generativelanguage.v1beta.FunctionResponsePart; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponsePart + * @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.ai.generativelanguage.v1beta.FunctionResponsePart; + + /** + * Verifies a FunctionResponsePart 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 FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponsePart + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.FunctionResponsePart; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @param message FunctionResponsePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta.FunctionResponsePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponsePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponsePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Blob. */ interface IBlob { @@ -26046,6 +26176,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FunctionResponseBlob. */ + interface IFunctionResponseBlob { + + /** FunctionResponseBlob mimeType */ + mimeType?: (string|null); + + /** FunctionResponseBlob data */ + data?: (Uint8Array|Buffer|string|null); + } + + /** Represents a FunctionResponseBlob. */ + class FunctionResponseBlob implements IFunctionResponseBlob { + + /** + * Constructs a new FunctionResponseBlob. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta.IFunctionResponseBlob); + + /** FunctionResponseBlob mimeType. */ + public mimeType: string; + + /** FunctionResponseBlob data. */ + public data: (Uint8Array|Buffer|string); + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponseBlob instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta.IFunctionResponseBlob): google.ai.generativelanguage.v1beta.FunctionResponseBlob; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponseBlob + * @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.ai.generativelanguage.v1beta.FunctionResponseBlob; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponseBlob + * @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.ai.generativelanguage.v1beta.FunctionResponseBlob; + + /** + * Verifies a FunctionResponseBlob 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 FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponseBlob + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.FunctionResponseBlob; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @param message FunctionResponseBlob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta.FunctionResponseBlob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponseBlob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a FileData. */ interface IFileData { @@ -26499,6 +26732,9 @@ export namespace google { /** Tool googleSearch */ googleSearch?: (google.ai.generativelanguage.v1beta.Tool.IGoogleSearch|null); + /** Tool computerUse */ + computerUse?: (google.ai.generativelanguage.v1beta.Tool.IComputerUse|null); + /** Tool urlContext */ urlContext?: (google.ai.generativelanguage.v1beta.IUrlContext|null); } @@ -26524,6 +26760,9 @@ export namespace google { /** Tool googleSearch. */ public googleSearch?: (google.ai.generativelanguage.v1beta.Tool.IGoogleSearch|null); + /** Tool computerUse. */ + public computerUse?: (google.ai.generativelanguage.v1beta.Tool.IComputerUse|null); + /** Tool urlContext. */ public urlContext?: (google.ai.generativelanguage.v1beta.IUrlContext|null); @@ -26703,6 +26942,118 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a ComputerUse. */ + interface IComputerUse { + + /** ComputerUse environment */ + environment?: (google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment|keyof typeof google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment|null); + + /** ComputerUse excludedPredefinedFunctions */ + excludedPredefinedFunctions?: (string[]|null); + } + + /** Represents a ComputerUse. */ + class ComputerUse implements IComputerUse { + + /** + * Constructs a new ComputerUse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta.Tool.IComputerUse); + + /** ComputerUse environment. */ + public environment: (google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment|keyof typeof google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment); + + /** ComputerUse excludedPredefinedFunctions. */ + public excludedPredefinedFunctions: string[]; + + /** + * Creates a new ComputerUse instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputerUse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta.Tool.IComputerUse): google.ai.generativelanguage.v1beta.Tool.ComputerUse; + + /** + * Encodes the specified ComputerUse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.Tool.ComputerUse.verify|verify} messages. + * @param message ComputerUse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta.Tool.IComputerUse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputerUse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.Tool.ComputerUse.verify|verify} messages. + * @param message ComputerUse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta.Tool.IComputerUse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputerUse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputerUse + * @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.ai.generativelanguage.v1beta.Tool.ComputerUse; + + /** + * Decodes a ComputerUse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputerUse + * @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.ai.generativelanguage.v1beta.Tool.ComputerUse; + + /** + * Verifies a ComputerUse 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 ComputerUse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputerUse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.Tool.ComputerUse; + + /** + * Creates a plain object from a ComputerUse message. Also converts values to other types if specified. + * @param message ComputerUse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta.Tool.ComputerUse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputerUse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputerUse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputerUse { + + /** Environment enum. */ + enum Environment { + ENVIRONMENT_UNSPECIFIED = 0, + ENVIRONMENT_BROWSER = 1 + } + } } /** Properties of an UrlContext. */ @@ -27572,6 +27923,9 @@ export namespace google { /** FunctionResponse response */ response?: (google.protobuf.IStruct|null); + /** FunctionResponse parts */ + parts?: (google.ai.generativelanguage.v1beta.IFunctionResponsePart[]|null); + /** FunctionResponse willContinue */ willContinue?: (boolean|null); @@ -27597,6 +27951,9 @@ export namespace google { /** FunctionResponse response. */ public response?: (google.protobuf.IStruct|null); + /** FunctionResponse parts. */ + public parts: google.ai.generativelanguage.v1beta.IFunctionResponsePart[]; + /** FunctionResponse willContinue. */ public willContinue: boolean; @@ -29914,7 +30271,8 @@ export namespace google { enum Source { SOURCE_UNSPECIFIED = 0, UPLOADED = 1, - GENERATED = 2 + GENERATED = 2, + REGISTERED = 3 } } @@ -31858,6 +32216,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ImageConfig. */ + interface IImageConfig { + + /** ImageConfig aspectRatio */ + aspectRatio?: (string|null); + } + + /** Represents an ImageConfig. */ + class ImageConfig implements IImageConfig { + + /** + * Constructs a new ImageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta.IImageConfig); + + /** ImageConfig aspectRatio. */ + public aspectRatio?: (string|null); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageConfig instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta.IImageConfig): google.ai.generativelanguage.v1beta.ImageConfig; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.ai.generativelanguage.v1beta.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageConfig + * @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.ai.generativelanguage.v1beta.ImageConfig; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageConfig + * @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.ai.generativelanguage.v1beta.ImageConfig; + + /** + * Verifies an ImageConfig 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 ImageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageConfig + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.ImageConfig; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @param message ImageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta.ImageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GenerationConfig. */ interface IGenerationConfig { @@ -31891,6 +32346,9 @@ export namespace google { /** GenerationConfig responseJsonSchema */ responseJsonSchema?: (google.protobuf.IValue|null); + /** GenerationConfig responseJsonSchemaOrdered */ + responseJsonSchemaOrdered?: (google.protobuf.IValue|null); + /** GenerationConfig presencePenalty */ presencePenalty?: (number|null); @@ -31915,6 +32373,9 @@ export namespace google { /** GenerationConfig thinkingConfig */ thinkingConfig?: (google.ai.generativelanguage.v1beta.IThinkingConfig|null); + /** GenerationConfig imageConfig */ + imageConfig?: (google.ai.generativelanguage.v1beta.IImageConfig|null); + /** GenerationConfig mediaResolution */ mediaResolution?: (google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|keyof typeof google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|null); } @@ -31958,6 +32419,9 @@ export namespace google { /** GenerationConfig responseJsonSchema. */ public responseJsonSchema?: (google.protobuf.IValue|null); + /** GenerationConfig responseJsonSchemaOrdered. */ + public responseJsonSchemaOrdered?: (google.protobuf.IValue|null); + /** GenerationConfig presencePenalty. */ public presencePenalty?: (number|null); @@ -31982,6 +32446,9 @@ export namespace google { /** GenerationConfig thinkingConfig. */ public thinkingConfig?: (google.ai.generativelanguage.v1beta.IThinkingConfig|null); + /** GenerationConfig imageConfig. */ + public imageConfig?: (google.ai.generativelanguage.v1beta.IImageConfig|null); + /** GenerationConfig mediaResolution. */ public mediaResolution?: (google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|keyof typeof google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|null); @@ -32606,6 +33073,9 @@ export namespace google { /** Candidate finishReason */ finishReason?: (google.ai.generativelanguage.v1beta.Candidate.FinishReason|keyof typeof google.ai.generativelanguage.v1beta.Candidate.FinishReason|null); + /** Candidate finishMessage */ + finishMessage?: (string|null); + /** Candidate safetyRatings */ safetyRatings?: (google.ai.generativelanguage.v1beta.ISafetyRating[]|null); @@ -32649,6 +33119,9 @@ export namespace google { /** Candidate finishReason. */ public finishReason: (google.ai.generativelanguage.v1beta.Candidate.FinishReason|keyof typeof google.ai.generativelanguage.v1beta.Candidate.FinishReason); + /** Candidate finishMessage. */ + public finishMessage?: (string|null); + /** Candidate safetyRatings. */ public safetyRatings: google.ai.generativelanguage.v1beta.ISafetyRating[]; @@ -32767,7 +33240,12 @@ export namespace google { SPII = 9, MALFORMED_FUNCTION_CALL = 10, IMAGE_SAFETY = 11, - UNEXPECTED_TOOL_CALL = 12 + IMAGE_PROHIBITED_CONTENT = 14, + IMAGE_OTHER = 15, + NO_IMAGE = 16, + IMAGE_RECITATION = 17, + UNEXPECTED_TOOL_CALL = 12, + TOO_MANY_TOOL_CALLS = 13 } } @@ -32977,13 +33455,18 @@ export namespace google { enum UrlRetrievalStatus { URL_RETRIEVAL_STATUS_UNSPECIFIED = 0, URL_RETRIEVAL_STATUS_SUCCESS = 1, - URL_RETRIEVAL_STATUS_ERROR = 2 + URL_RETRIEVAL_STATUS_ERROR = 2, + URL_RETRIEVAL_STATUS_PAYWALL = 3, + URL_RETRIEVAL_STATUS_UNSAFE = 4 } } /** Properties of a LogprobsResult. */ interface ILogprobsResult { + /** LogprobsResult logProbabilitySum */ + logProbabilitySum?: (number|null); + /** LogprobsResult topCandidates */ topCandidates?: (google.ai.generativelanguage.v1beta.LogprobsResult.ITopCandidates[]|null); @@ -33000,6 +33483,9 @@ export namespace google { */ constructor(properties?: google.ai.generativelanguage.v1beta.ILogprobsResult); + /** LogprobsResult logProbabilitySum. */ + public logProbabilitySum?: (number|null); + /** LogprobsResult topCandidates. */ public topCandidates: google.ai.generativelanguage.v1beta.LogprobsResult.ITopCandidates[]; @@ -37129,6 +37615,9 @@ export namespace google { /** BidiGenerateContentServerContent urlContextMetadata */ urlContextMetadata?: (google.ai.generativelanguage.v1beta.IUrlContextMetadata|null); + + /** BidiGenerateContentServerContent waitingForInput */ + waitingForInput?: (boolean|null); } /** Represents a BidiGenerateContentServerContent. */ @@ -37164,6 +37653,9 @@ export namespace google { /** BidiGenerateContentServerContent urlContextMetadata. */ public urlContextMetadata?: (google.ai.generativelanguage.v1beta.IUrlContextMetadata|null); + /** BidiGenerateContentServerContent waitingForInput. */ + public waitingForInput: boolean; + /** * Creates a new BidiGenerateContentServerContent instance using the specified properties. * @param [properties] Properties to set @@ -42734,7 +43226,7 @@ export namespace google { interface IPredictLongRunningResponse { /** PredictLongRunningResponse generateVideoResponse */ - generateVideoResponse?: (google.ai.generativelanguage.v1beta.IGenerateVideoResponse|null); + generateVideoResponse?: (google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse|null); } /** Represents a PredictLongRunningResponse. */ @@ -42747,7 +43239,7 @@ export namespace google { constructor(properties?: google.ai.generativelanguage.v1beta.IPredictLongRunningResponse); /** PredictLongRunningResponse generateVideoResponse. */ - public generateVideoResponse?: (google.ai.generativelanguage.v1beta.IGenerateVideoResponse|null); + public generateVideoResponse?: (google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse|null); /** PredictLongRunningResponse response. */ public response?: "generateVideoResponse"; @@ -43127,109 +43619,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GenerateVideoResponse. */ - interface IGenerateVideoResponse { + /** Properties of a PredictLongRunningGeneratedVideoResponse. */ + interface IPredictLongRunningGeneratedVideoResponse { - /** GenerateVideoResponse generatedSamples */ + /** PredictLongRunningGeneratedVideoResponse generatedSamples */ generatedSamples?: (google.ai.generativelanguage.v1beta.IMedia[]|null); - /** GenerateVideoResponse raiMediaFilteredCount */ + /** PredictLongRunningGeneratedVideoResponse raiMediaFilteredCount */ raiMediaFilteredCount?: (number|null); - /** GenerateVideoResponse raiMediaFilteredReasons */ + /** PredictLongRunningGeneratedVideoResponse raiMediaFilteredReasons */ raiMediaFilteredReasons?: (string[]|null); } - /** Represents a GenerateVideoResponse. */ - class GenerateVideoResponse implements IGenerateVideoResponse { + /** Represents a PredictLongRunningGeneratedVideoResponse. */ + class PredictLongRunningGeneratedVideoResponse implements IPredictLongRunningGeneratedVideoResponse { /** - * Constructs a new GenerateVideoResponse. + * Constructs a new PredictLongRunningGeneratedVideoResponse. * @param [properties] Properties to set */ - constructor(properties?: google.ai.generativelanguage.v1beta.IGenerateVideoResponse); + constructor(properties?: google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse); - /** GenerateVideoResponse generatedSamples. */ + /** PredictLongRunningGeneratedVideoResponse generatedSamples. */ public generatedSamples: google.ai.generativelanguage.v1beta.IMedia[]; - /** GenerateVideoResponse raiMediaFilteredCount. */ + /** PredictLongRunningGeneratedVideoResponse raiMediaFilteredCount. */ public raiMediaFilteredCount: number; - /** GenerateVideoResponse raiMediaFilteredReasons. */ + /** PredictLongRunningGeneratedVideoResponse raiMediaFilteredReasons. */ public raiMediaFilteredReasons: string[]; /** - * Creates a new GenerateVideoResponse instance using the specified properties. + * Creates a new PredictLongRunningGeneratedVideoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GenerateVideoResponse instance + * @returns PredictLongRunningGeneratedVideoResponse instance */ - public static create(properties?: google.ai.generativelanguage.v1beta.IGenerateVideoResponse): google.ai.generativelanguage.v1beta.GenerateVideoResponse; + public static create(properties?: google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse): google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse; /** - * Encodes the specified GenerateVideoResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.GenerateVideoResponse.verify|verify} messages. - * @param message GenerateVideoResponse message or plain object to encode + * Encodes the specified PredictLongRunningGeneratedVideoResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.verify|verify} messages. + * @param message PredictLongRunningGeneratedVideoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.ai.generativelanguage.v1beta.IGenerateVideoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GenerateVideoResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.GenerateVideoResponse.verify|verify} messages. - * @param message GenerateVideoResponse message or plain object to encode + * Encodes the specified PredictLongRunningGeneratedVideoResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.verify|verify} messages. + * @param message PredictLongRunningGeneratedVideoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.ai.generativelanguage.v1beta.IGenerateVideoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerateVideoResponse message from the specified reader or buffer. + * Decodes a PredictLongRunningGeneratedVideoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GenerateVideoResponse + * @returns PredictLongRunningGeneratedVideoResponse * @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.ai.generativelanguage.v1beta.GenerateVideoResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse; /** - * Decodes a GenerateVideoResponse message from the specified reader or buffer, length delimited. + * Decodes a PredictLongRunningGeneratedVideoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerateVideoResponse + * @returns PredictLongRunningGeneratedVideoResponse * @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.ai.generativelanguage.v1beta.GenerateVideoResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse; /** - * Verifies a GenerateVideoResponse message. + * Verifies a PredictLongRunningGeneratedVideoResponse 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 GenerateVideoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PredictLongRunningGeneratedVideoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerateVideoResponse + * @returns PredictLongRunningGeneratedVideoResponse */ - public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.GenerateVideoResponse; + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse; /** - * Creates a plain object from a GenerateVideoResponse message. Also converts values to other types if specified. - * @param message GenerateVideoResponse + * Creates a plain object from a PredictLongRunningGeneratedVideoResponse message. Also converts values to other types if specified. + * @param message PredictLongRunningGeneratedVideoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ai.generativelanguage.v1beta.GenerateVideoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerateVideoResponse to JSON. + * Converts this PredictLongRunningGeneratedVideoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerateVideoResponse + * Gets the default type url for PredictLongRunningGeneratedVideoResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-ai-generativelanguage/protos/protos.js b/packages/google-ai-generativelanguage/protos/protos.js index dfdb75071362..7e4d5379884e 100644 --- a/packages/google-ai-generativelanguage/protos/protos.js +++ b/packages/google-ai-generativelanguage/protos/protos.js @@ -2530,6 +2530,7 @@ * @property {number|null} [topP] GenerationConfig topP * @property {number|null} [topK] GenerationConfig topK * @property {number|null} [seed] GenerationConfig seed + * @property {google.protobuf.IValue|null} [responseJsonSchemaOrdered] GenerationConfig responseJsonSchemaOrdered * @property {number|null} [presencePenalty] GenerationConfig presencePenalty * @property {number|null} [frequencyPenalty] GenerationConfig frequencyPenalty * @property {boolean|null} [responseLogprobs] GenerationConfig responseLogprobs @@ -2609,6 +2610,14 @@ */ GenerationConfig.prototype.seed = null; + /** + * GenerationConfig responseJsonSchemaOrdered. + * @member {google.protobuf.IValue|null|undefined} responseJsonSchemaOrdered + * @memberof google.ai.generativelanguage.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.responseJsonSchemaOrdered = null; + /** * GenerationConfig presencePenalty. * @member {number|null|undefined} presencePenalty @@ -2767,6 +2776,8 @@ writer.uint32(/* id 18, wireType 0 =*/144).int32(message.logprobs); if (message.enableEnhancedCivicAnswers != null && Object.hasOwnProperty.call(message, "enableEnhancedCivicAnswers")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableEnhancedCivicAnswers); + if (message.responseJsonSchemaOrdered != null && Object.hasOwnProperty.call(message, "responseJsonSchemaOrdered")) + $root.google.protobuf.Value.encode(message.responseJsonSchemaOrdered, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); return writer; }; @@ -2833,6 +2844,10 @@ message.seed = reader.int32(); break; } + case 28: { + message.responseJsonSchemaOrdered = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } case 15: { message.presencePenalty = reader.float(); break; @@ -2926,6 +2941,11 @@ if (!$util.isInteger(message.seed)) return "seed: integer expected"; } + if (message.responseJsonSchemaOrdered != null && message.hasOwnProperty("responseJsonSchemaOrdered")) { + var error = $root.google.protobuf.Value.verify(message.responseJsonSchemaOrdered); + if (error) + return "responseJsonSchemaOrdered." + error; + } if (message.presencePenalty != null && message.hasOwnProperty("presencePenalty")) { properties._presencePenalty = 1; if (typeof message.presencePenalty !== "number") @@ -2985,6 +3005,11 @@ message.topK = object.topK | 0; if (object.seed != null) message.seed = object.seed | 0; + if (object.responseJsonSchemaOrdered != null) { + if (typeof object.responseJsonSchemaOrdered !== "object") + throw TypeError(".google.ai.generativelanguage.v1.GenerationConfig.responseJsonSchemaOrdered: object expected"); + message.responseJsonSchemaOrdered = $root.google.protobuf.Value.fromObject(object.responseJsonSchemaOrdered); + } if (object.presencePenalty != null) message.presencePenalty = Number(object.presencePenalty); if (object.frequencyPenalty != null) @@ -3013,6 +3038,8 @@ var object = {}; if (options.arrays || options.defaults) object.stopSequences = []; + if (options.defaults) + object.responseJsonSchemaOrdered = null; if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { object.candidateCount = message.candidateCount; if (options.oneofs) @@ -3073,6 +3100,8 @@ if (options.oneofs) object._enableEnhancedCivicAnswers = "enableEnhancedCivicAnswers"; } + if (message.responseJsonSchemaOrdered != null && message.hasOwnProperty("responseJsonSchemaOrdered")) + object.responseJsonSchemaOrdered = $root.google.protobuf.Value.toObject(message.responseJsonSchemaOrdered, options); return object; }; @@ -4231,6 +4260,7 @@ * @property {number|null} [index] Candidate index * @property {google.ai.generativelanguage.v1.IContent|null} [content] Candidate content * @property {google.ai.generativelanguage.v1.Candidate.FinishReason|null} [finishReason] Candidate finishReason + * @property {string|null} [finishMessage] Candidate finishMessage * @property {Array.|null} [safetyRatings] Candidate safetyRatings * @property {google.ai.generativelanguage.v1.ICitationMetadata|null} [citationMetadata] Candidate citationMetadata * @property {number|null} [tokenCount] Candidate tokenCount @@ -4280,6 +4310,14 @@ */ Candidate.prototype.finishReason = 0; + /** + * Candidate finishMessage. + * @member {string|null|undefined} finishMessage + * @memberof google.ai.generativelanguage.v1.Candidate + * @instance + */ + Candidate.prototype.finishMessage = null; + /** * Candidate safetyRatings. * @member {Array.} safetyRatings @@ -4345,6 +4383,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(Candidate.prototype, "_finishMessage", { + get: $util.oneOfGetter($oneOfFields = ["finishMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Candidate instance using the specified properties. * @function create @@ -4375,6 +4419,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.finishReason); if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.index); + if (message.finishMessage != null && Object.hasOwnProperty.call(message, "finishMessage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.finishMessage); if (message.safetyRatings != null && message.safetyRatings.length) for (var i = 0; i < message.safetyRatings.length; ++i) $root.google.ai.generativelanguage.v1.SafetyRating.encode(message.safetyRatings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); @@ -4438,6 +4484,10 @@ message.finishReason = reader.int32(); break; } + case 4: { + message.finishMessage = reader.string(); + break; + } case 5: { if (!(message.safetyRatings && message.safetyRatings.length)) message.safetyRatings = []; @@ -4530,9 +4580,18 @@ case 9: case 10: case 11: + case 14: + case 15: + case 16: case 12: + case 13: break; } + if (message.finishMessage != null && message.hasOwnProperty("finishMessage")) { + properties._finishMessage = 1; + if (!$util.isString(message.finishMessage)) + return "finishMessage: string expected"; + } if (message.safetyRatings != null && message.hasOwnProperty("safetyRatings")) { if (!Array.isArray(message.safetyRatings)) return "safetyRatings: array expected"; @@ -4645,11 +4704,29 @@ case 11: message.finishReason = 11; break; + case "IMAGE_PROHIBITED_CONTENT": + case 14: + message.finishReason = 14; + break; + case "IMAGE_OTHER": + case 15: + message.finishReason = 15; + break; + case "NO_IMAGE": + case 16: + message.finishReason = 16; + break; case "UNEXPECTED_TOOL_CALL": case 12: message.finishReason = 12; break; + case "TOO_MANY_TOOL_CALLS": + case 13: + message.finishReason = 13; + break; } + if (object.finishMessage != null) + message.finishMessage = String(object.finishMessage); if (object.safetyRatings) { if (!Array.isArray(object.safetyRatings)) throw TypeError(".google.ai.generativelanguage.v1.Candidate.safetyRatings: array expected"); @@ -4721,6 +4798,11 @@ if (options.oneofs) object._index = "index"; } + if (message.finishMessage != null && message.hasOwnProperty("finishMessage")) { + object.finishMessage = message.finishMessage; + if (options.oneofs) + object._finishMessage = "finishMessage"; + } if (message.safetyRatings && message.safetyRatings.length) { object.safetyRatings = []; for (var j = 0; j < message.safetyRatings.length; ++j) @@ -4783,7 +4865,11 @@ * @property {number} SPII=9 SPII value * @property {number} MALFORMED_FUNCTION_CALL=10 MALFORMED_FUNCTION_CALL value * @property {number} IMAGE_SAFETY=11 IMAGE_SAFETY value + * @property {number} IMAGE_PROHIBITED_CONTENT=14 IMAGE_PROHIBITED_CONTENT value + * @property {number} IMAGE_OTHER=15 IMAGE_OTHER value + * @property {number} NO_IMAGE=16 NO_IMAGE value * @property {number} UNEXPECTED_TOOL_CALL=12 UNEXPECTED_TOOL_CALL value + * @property {number} TOO_MANY_TOOL_CALLS=13 TOO_MANY_TOOL_CALLS value */ Candidate.FinishReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4799,7 +4885,11 @@ values[valuesById[9] = "SPII"] = 9; values[valuesById[10] = "MALFORMED_FUNCTION_CALL"] = 10; values[valuesById[11] = "IMAGE_SAFETY"] = 11; + values[valuesById[14] = "IMAGE_PROHIBITED_CONTENT"] = 14; + values[valuesById[15] = "IMAGE_OTHER"] = 15; + values[valuesById[16] = "NO_IMAGE"] = 16; values[valuesById[12] = "UNEXPECTED_TOOL_CALL"] = 12; + values[valuesById[13] = "TOO_MANY_TOOL_CALLS"] = 13; return values; })(); @@ -5190,6 +5280,8 @@ case 0: case 1: case 2: + case 3: + case 4: break; } return null; @@ -5228,6 +5320,14 @@ case 2: message.urlRetrievalStatus = 2; break; + case "URL_RETRIEVAL_STATUS_PAYWALL": + case 3: + message.urlRetrievalStatus = 3; + break; + case "URL_RETRIEVAL_STATUS_UNSAFE": + case 4: + message.urlRetrievalStatus = 4; + break; } return message; }; @@ -5289,12 +5389,16 @@ * @property {number} URL_RETRIEVAL_STATUS_UNSPECIFIED=0 URL_RETRIEVAL_STATUS_UNSPECIFIED value * @property {number} URL_RETRIEVAL_STATUS_SUCCESS=1 URL_RETRIEVAL_STATUS_SUCCESS value * @property {number} URL_RETRIEVAL_STATUS_ERROR=2 URL_RETRIEVAL_STATUS_ERROR value + * @property {number} URL_RETRIEVAL_STATUS_PAYWALL=3 URL_RETRIEVAL_STATUS_PAYWALL value + * @property {number} URL_RETRIEVAL_STATUS_UNSAFE=4 URL_RETRIEVAL_STATUS_UNSAFE value */ UrlMetadata.UrlRetrievalStatus = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "URL_RETRIEVAL_STATUS_UNSPECIFIED"] = 0; values[valuesById[1] = "URL_RETRIEVAL_STATUS_SUCCESS"] = 1; values[valuesById[2] = "URL_RETRIEVAL_STATUS_ERROR"] = 2; + values[valuesById[3] = "URL_RETRIEVAL_STATUS_PAYWALL"] = 3; + values[valuesById[4] = "URL_RETRIEVAL_STATUS_UNSAFE"] = 4; return values; })(); @@ -5307,6 +5411,7 @@ * Properties of a LogprobsResult. * @memberof google.ai.generativelanguage.v1 * @interface ILogprobsResult + * @property {number|null} [logProbabilitySum] LogprobsResult logProbabilitySum * @property {Array.|null} [topCandidates] LogprobsResult topCandidates * @property {Array.|null} [chosenCandidates] LogprobsResult chosenCandidates */ @@ -5328,6 +5433,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * LogprobsResult logProbabilitySum. + * @member {number|null|undefined} logProbabilitySum + * @memberof google.ai.generativelanguage.v1.LogprobsResult + * @instance + */ + LogprobsResult.prototype.logProbabilitySum = null; + /** * LogprobsResult topCandidates. * @member {Array.} topCandidates @@ -5344,6 +5457,15 @@ */ LogprobsResult.prototype.chosenCandidates = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LogprobsResult.prototype, "_logProbabilitySum", { + get: $util.oneOfGetter($oneOfFields = ["logProbabilitySum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LogprobsResult instance using the specified properties. * @function create @@ -5374,6 +5496,8 @@ if (message.chosenCandidates != null && message.chosenCandidates.length) for (var i = 0; i < message.chosenCandidates.length; ++i) $root.google.ai.generativelanguage.v1.LogprobsResult.Candidate.encode(message.chosenCandidates[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.logProbabilitySum != null && Object.hasOwnProperty.call(message, "logProbabilitySum")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.logProbabilitySum); return writer; }; @@ -5410,6 +5534,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 3: { + message.logProbabilitySum = reader.float(); + break; + } case 1: { if (!(message.topCandidates && message.topCandidates.length)) message.topCandidates = []; @@ -5457,6 +5585,12 @@ LogprobsResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.logProbabilitySum != null && message.hasOwnProperty("logProbabilitySum")) { + properties._logProbabilitySum = 1; + if (typeof message.logProbabilitySum !== "number") + return "logProbabilitySum: number expected"; + } if (message.topCandidates != null && message.hasOwnProperty("topCandidates")) { if (!Array.isArray(message.topCandidates)) return "topCandidates: array expected"; @@ -5490,6 +5624,8 @@ if (object instanceof $root.google.ai.generativelanguage.v1.LogprobsResult) return object; var message = new $root.google.ai.generativelanguage.v1.LogprobsResult(); + if (object.logProbabilitySum != null) + message.logProbabilitySum = Number(object.logProbabilitySum); if (object.topCandidates) { if (!Array.isArray(object.topCandidates)) throw TypeError(".google.ai.generativelanguage.v1.LogprobsResult.topCandidates: array expected"); @@ -5540,6 +5676,11 @@ for (var j = 0; j < message.chosenCandidates.length; ++j) object.chosenCandidates[j] = $root.google.ai.generativelanguage.v1.LogprobsResult.Candidate.toObject(message.chosenCandidates[j], options); } + if (message.logProbabilitySum != null && message.hasOwnProperty("logProbabilitySum")) { + object.logProbabilitySum = options.json && !isFinite(message.logProbabilitySum) ? String(message.logProbabilitySum) : message.logProbabilitySum; + if (options.oneofs) + object._logProbabilitySum = "logProbabilitySum"; + } return object; }; @@ -63843,6 +63984,7 @@ * @property {google.ai.generativelanguage.v1beta.IVideoMetadata|null} [videoMetadata] Part videoMetadata * @property {boolean|null} [thought] Part thought * @property {Uint8Array|null} [thoughtSignature] Part thoughtSignature + * @property {google.protobuf.IStruct|null} [partMetadata] Part partMetadata */ /** @@ -63940,6 +64082,14 @@ */ Part.prototype.thoughtSignature = $util.newBuffer([]); + /** + * Part partMetadata. + * @member {google.protobuf.IStruct|null|undefined} partMetadata + * @memberof google.ai.generativelanguage.v1beta.Part + * @instance + */ + Part.prototype.partMetadata = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -63999,6 +64149,8 @@ $root.google.ai.generativelanguage.v1beta.FunctionResponse.encode(message.functionResponse, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.fileData != null && Object.hasOwnProperty.call(message, "fileData")) $root.google.ai.generativelanguage.v1beta.FileData.encode(message.fileData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.partMetadata != null && Object.hasOwnProperty.call(message, "partMetadata")) + $root.google.protobuf.Struct.encode(message.partMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.executableCode != null && Object.hasOwnProperty.call(message, "executableCode")) $root.google.ai.generativelanguage.v1beta.ExecutableCode.encode(message.executableCode, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.codeExecutionResult != null && Object.hasOwnProperty.call(message, "codeExecutionResult")) @@ -64085,6 +64237,10 @@ message.thoughtSignature = reader.bytes(); break; } + case 8: { + message.partMetadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -64200,6 +64356,11 @@ if (message.thoughtSignature != null && message.hasOwnProperty("thoughtSignature")) if (!(message.thoughtSignature && typeof message.thoughtSignature.length === "number" || $util.isString(message.thoughtSignature))) return "thoughtSignature: buffer expected"; + if (message.partMetadata != null && message.hasOwnProperty("partMetadata")) { + var error = $root.google.protobuf.Struct.verify(message.partMetadata); + if (error) + return "partMetadata." + error; + } return null; }; @@ -64259,6 +64420,11 @@ $util.base64.decode(object.thoughtSignature, message.thoughtSignature = $util.newBuffer($util.base64.length(object.thoughtSignature)), 0); else if (object.thoughtSignature.length >= 0) message.thoughtSignature = object.thoughtSignature; + if (object.partMetadata != null) { + if (typeof object.partMetadata !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.Part.partMetadata: object expected"); + message.partMetadata = $root.google.protobuf.Struct.fromObject(object.partMetadata); + } return message; }; @@ -64276,6 +64442,7 @@ options = {}; var object = {}; if (options.defaults) { + object.partMetadata = null; object.thought = false; if (options.bytes === String) object.thoughtSignature = ""; @@ -64310,6 +64477,8 @@ if (options.oneofs) object.data = "fileData"; } + if (message.partMetadata != null && message.hasOwnProperty("partMetadata")) + object.partMetadata = $root.google.protobuf.Struct.toObject(message.partMetadata, options); if (message.executableCode != null && message.hasOwnProperty("executableCode")) { object.executableCode = $root.google.ai.generativelanguage.v1beta.ExecutableCode.toObject(message.executableCode, options); if (options.oneofs) @@ -64361,6 +64530,235 @@ return Part; })(); + v1beta.FunctionResponsePart = (function() { + + /** + * Properties of a FunctionResponsePart. + * @memberof google.ai.generativelanguage.v1beta + * @interface IFunctionResponsePart + * @property {google.ai.generativelanguage.v1beta.IFunctionResponseBlob|null} [inlineData] FunctionResponsePart inlineData + */ + + /** + * Constructs a new FunctionResponsePart. + * @memberof google.ai.generativelanguage.v1beta + * @classdesc Represents a FunctionResponsePart. + * @implements IFunctionResponsePart + * @constructor + * @param {google.ai.generativelanguage.v1beta.IFunctionResponsePart=} [properties] Properties to set + */ + function FunctionResponsePart(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]]; + } + + /** + * FunctionResponsePart inlineData. + * @member {google.ai.generativelanguage.v1beta.IFunctionResponseBlob|null|undefined} inlineData + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @instance + */ + FunctionResponsePart.prototype.inlineData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunctionResponsePart data. + * @member {"inlineData"|undefined} data + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @instance + */ + Object.defineProperty(FunctionResponsePart.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["inlineData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponsePart=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta.FunctionResponsePart} FunctionResponsePart instance + */ + FunctionResponsePart.create = function create(properties) { + return new FunctionResponsePart(properties); + }; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponsePart.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineData != null && Object.hasOwnProperty.call(message, "inlineData")) + $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob.encode(message.inlineData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponsePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.FunctionResponsePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineData = $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponsePart message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponsePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + properties.data = 1; + { + var error = $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob.verify(message.inlineData); + if (error) + return "inlineData." + error; + } + } + return null; + }; + + /** + * Creates a FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta.FunctionResponsePart} FunctionResponsePart + */ + FunctionResponsePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta.FunctionResponsePart) + return object; + var message = new $root.google.ai.generativelanguage.v1beta.FunctionResponsePart(); + if (object.inlineData != null) { + if (typeof object.inlineData !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.FunctionResponsePart.inlineData: object expected"); + message.inlineData = $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob.fromObject(object.inlineData); + } + return message; + }; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {google.ai.generativelanguage.v1beta.FunctionResponsePart} message FunctionResponsePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponsePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + object.inlineData = $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob.toObject(message.inlineData, options); + if (options.oneofs) + object.data = "inlineData"; + } + return object; + }; + + /** + * Converts this FunctionResponsePart to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @instance + * @returns {Object.} JSON object + */ + FunctionResponsePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponsePart + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta.FunctionResponsePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponsePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.FunctionResponsePart"; + }; + + return FunctionResponsePart; + })(); + v1beta.Blob = (function() { /** @@ -64599,6 +64997,244 @@ return Blob; })(); + v1beta.FunctionResponseBlob = (function() { + + /** + * Properties of a FunctionResponseBlob. + * @memberof google.ai.generativelanguage.v1beta + * @interface IFunctionResponseBlob + * @property {string|null} [mimeType] FunctionResponseBlob mimeType + * @property {Uint8Array|null} [data] FunctionResponseBlob data + */ + + /** + * Constructs a new FunctionResponseBlob. + * @memberof google.ai.generativelanguage.v1beta + * @classdesc Represents a FunctionResponseBlob. + * @implements IFunctionResponseBlob + * @constructor + * @param {google.ai.generativelanguage.v1beta.IFunctionResponseBlob=} [properties] Properties to set + */ + function FunctionResponseBlob(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]]; + } + + /** + * FunctionResponseBlob mimeType. + * @member {string} mimeType + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.mimeType = ""; + + /** + * FunctionResponseBlob data. + * @member {Uint8Array} data + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.data = $util.newBuffer([]); + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponseBlob=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta.FunctionResponseBlob} FunctionResponseBlob instance + */ + FunctionResponseBlob.create = function create(properties) { + return new FunctionResponseBlob(properties); + }; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponseBlob.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.FunctionResponseBlob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {google.ai.generativelanguage.v1beta.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponseBlob message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponseBlob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta.FunctionResponseBlob} FunctionResponseBlob + */ + FunctionResponseBlob.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob) + return object; + var message = new $root.google.ai.generativelanguage.v1beta.FunctionResponseBlob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {google.ai.generativelanguage.v1beta.FunctionResponseBlob} message FunctionResponseBlob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponseBlob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @instance + * @returns {Object.} JSON object + */ + FunctionResponseBlob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponseBlob + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta.FunctionResponseBlob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponseBlob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.FunctionResponseBlob"; + }; + + return FunctionResponseBlob; + })(); + v1beta.FileData = (function() { /** @@ -65638,6 +66274,7 @@ * @property {google.ai.generativelanguage.v1beta.IGoogleSearchRetrieval|null} [googleSearchRetrieval] Tool googleSearchRetrieval * @property {google.ai.generativelanguage.v1beta.ICodeExecution|null} [codeExecution] Tool codeExecution * @property {google.ai.generativelanguage.v1beta.Tool.IGoogleSearch|null} [googleSearch] Tool googleSearch + * @property {google.ai.generativelanguage.v1beta.Tool.IComputerUse|null} [computerUse] Tool computerUse * @property {google.ai.generativelanguage.v1beta.IUrlContext|null} [urlContext] Tool urlContext */ @@ -65689,6 +66326,14 @@ */ Tool.prototype.googleSearch = null; + /** + * Tool computerUse. + * @member {google.ai.generativelanguage.v1beta.Tool.IComputerUse|null|undefined} computerUse + * @memberof google.ai.generativelanguage.v1beta.Tool + * @instance + */ + Tool.prototype.computerUse = null; + /** * Tool urlContext. * @member {google.ai.generativelanguage.v1beta.IUrlContext|null|undefined} urlContext @@ -65730,6 +66375,8 @@ $root.google.ai.generativelanguage.v1beta.CodeExecution.encode(message.codeExecution, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.googleSearch != null && Object.hasOwnProperty.call(message, "googleSearch")) $root.google.ai.generativelanguage.v1beta.Tool.GoogleSearch.encode(message.googleSearch, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.computerUse != null && Object.hasOwnProperty.call(message, "computerUse")) + $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.encode(message.computerUse, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.urlContext != null && Object.hasOwnProperty.call(message, "urlContext")) $root.google.ai.generativelanguage.v1beta.UrlContext.encode(message.urlContext, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; @@ -65786,6 +66433,10 @@ message.googleSearch = $root.google.ai.generativelanguage.v1beta.Tool.GoogleSearch.decode(reader, reader.uint32()); break; } + case 6: { + message.computerUse = $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.decode(reader, reader.uint32()); + break; + } case 8: { message.urlContext = $root.google.ai.generativelanguage.v1beta.UrlContext.decode(reader, reader.uint32()); break; @@ -65849,6 +66500,11 @@ if (error) return "googleSearch." + error; } + if (message.computerUse != null && message.hasOwnProperty("computerUse")) { + var error = $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.verify(message.computerUse); + if (error) + return "computerUse." + error; + } if (message.urlContext != null && message.hasOwnProperty("urlContext")) { var error = $root.google.ai.generativelanguage.v1beta.UrlContext.verify(message.urlContext); if (error) @@ -65894,6 +66550,11 @@ throw TypeError(".google.ai.generativelanguage.v1beta.Tool.googleSearch: object expected"); message.googleSearch = $root.google.ai.generativelanguage.v1beta.Tool.GoogleSearch.fromObject(object.googleSearch); } + if (object.computerUse != null) { + if (typeof object.computerUse !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.Tool.computerUse: object expected"); + message.computerUse = $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.fromObject(object.computerUse); + } if (object.urlContext != null) { if (typeof object.urlContext !== "object") throw TypeError(".google.ai.generativelanguage.v1beta.Tool.urlContext: object expected"); @@ -65921,6 +66582,7 @@ object.googleSearchRetrieval = null; object.codeExecution = null; object.googleSearch = null; + object.computerUse = null; object.urlContext = null; } if (message.functionDeclarations && message.functionDeclarations.length) { @@ -65934,6 +66596,8 @@ object.codeExecution = $root.google.ai.generativelanguage.v1beta.CodeExecution.toObject(message.codeExecution, options); if (message.googleSearch != null && message.hasOwnProperty("googleSearch")) object.googleSearch = $root.google.ai.generativelanguage.v1beta.Tool.GoogleSearch.toObject(message.googleSearch, options); + if (message.computerUse != null && message.hasOwnProperty("computerUse")) + object.computerUse = $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.toObject(message.computerUse, options); if (message.urlContext != null && message.hasOwnProperty("urlContext")) object.urlContext = $root.google.ai.generativelanguage.v1beta.UrlContext.toObject(message.urlContext, options); return object; @@ -66175,6 +66839,284 @@ return GoogleSearch; })(); + Tool.ComputerUse = (function() { + + /** + * Properties of a ComputerUse. + * @memberof google.ai.generativelanguage.v1beta.Tool + * @interface IComputerUse + * @property {google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment|null} [environment] ComputerUse environment + * @property {Array.|null} [excludedPredefinedFunctions] ComputerUse excludedPredefinedFunctions + */ + + /** + * Constructs a new ComputerUse. + * @memberof google.ai.generativelanguage.v1beta.Tool + * @classdesc Represents a ComputerUse. + * @implements IComputerUse + * @constructor + * @param {google.ai.generativelanguage.v1beta.Tool.IComputerUse=} [properties] Properties to set + */ + function ComputerUse(properties) { + this.excludedPredefinedFunctions = []; + 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]]; + } + + /** + * ComputerUse environment. + * @member {google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment} environment + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @instance + */ + ComputerUse.prototype.environment = 0; + + /** + * ComputerUse excludedPredefinedFunctions. + * @member {Array.} excludedPredefinedFunctions + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @instance + */ + ComputerUse.prototype.excludedPredefinedFunctions = $util.emptyArray; + + /** + * Creates a new ComputerUse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {google.ai.generativelanguage.v1beta.Tool.IComputerUse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta.Tool.ComputerUse} ComputerUse instance + */ + ComputerUse.create = function create(properties) { + return new ComputerUse(properties); + }; + + /** + * Encodes the specified ComputerUse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.Tool.ComputerUse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {google.ai.generativelanguage.v1beta.Tool.IComputerUse} message ComputerUse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputerUse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.environment); + if (message.excludedPredefinedFunctions != null && message.excludedPredefinedFunctions.length) + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludedPredefinedFunctions[i]); + return writer; + }; + + /** + * Encodes the specified ComputerUse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.Tool.ComputerUse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {google.ai.generativelanguage.v1beta.Tool.IComputerUse} message ComputerUse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputerUse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputerUse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta.Tool.ComputerUse} ComputerUse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputerUse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.environment = reader.int32(); + break; + } + case 5: { + if (!(message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length)) + message.excludedPredefinedFunctions = []; + message.excludedPredefinedFunctions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputerUse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta.Tool.ComputerUse} ComputerUse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputerUse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputerUse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputerUse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + switch (message.environment) { + default: + return "environment: enum value expected"; + case 0: + case 1: + break; + } + if (message.excludedPredefinedFunctions != null && message.hasOwnProperty("excludedPredefinedFunctions")) { + if (!Array.isArray(message.excludedPredefinedFunctions)) + return "excludedPredefinedFunctions: array expected"; + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + if (!$util.isString(message.excludedPredefinedFunctions[i])) + return "excludedPredefinedFunctions: string[] expected"; + } + return null; + }; + + /** + * Creates a ComputerUse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta.Tool.ComputerUse} ComputerUse + */ + ComputerUse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse(); + switch (object.environment) { + default: + if (typeof object.environment === "number") { + message.environment = object.environment; + break; + } + break; + case "ENVIRONMENT_UNSPECIFIED": + case 0: + message.environment = 0; + break; + case "ENVIRONMENT_BROWSER": + case 1: + message.environment = 1; + break; + } + if (object.excludedPredefinedFunctions) { + if (!Array.isArray(object.excludedPredefinedFunctions)) + throw TypeError(".google.ai.generativelanguage.v1beta.Tool.ComputerUse.excludedPredefinedFunctions: array expected"); + message.excludedPredefinedFunctions = []; + for (var i = 0; i < object.excludedPredefinedFunctions.length; ++i) + message.excludedPredefinedFunctions[i] = String(object.excludedPredefinedFunctions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ComputerUse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {google.ai.generativelanguage.v1beta.Tool.ComputerUse} message ComputerUse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputerUse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.excludedPredefinedFunctions = []; + if (options.defaults) + object.environment = options.enums === String ? "ENVIRONMENT_UNSPECIFIED" : 0; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = options.enums === String ? $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment[message.environment] === undefined ? message.environment : $root.google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment[message.environment] : message.environment; + if (message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length) { + object.excludedPredefinedFunctions = []; + for (var j = 0; j < message.excludedPredefinedFunctions.length; ++j) + object.excludedPredefinedFunctions[j] = message.excludedPredefinedFunctions[j]; + } + return object; + }; + + /** + * Converts this ComputerUse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @instance + * @returns {Object.} JSON object + */ + ComputerUse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputerUse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta.Tool.ComputerUse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputerUse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.Tool.ComputerUse"; + }; + + /** + * Environment enum. + * @name google.ai.generativelanguage.v1beta.Tool.ComputerUse.Environment + * @enum {number} + * @property {number} ENVIRONMENT_UNSPECIFIED=0 ENVIRONMENT_UNSPECIFIED value + * @property {number} ENVIRONMENT_BROWSER=1 ENVIRONMENT_BROWSER value + */ + ComputerUse.Environment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENVIRONMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENVIRONMENT_BROWSER"] = 1; + return values; + })(); + + return ComputerUse; + })(); + return Tool; })(); @@ -68259,6 +69201,7 @@ * @property {string|null} [id] FunctionResponse id * @property {string|null} [name] FunctionResponse name * @property {google.protobuf.IStruct|null} [response] FunctionResponse response + * @property {Array.|null} [parts] FunctionResponse parts * @property {boolean|null} [willContinue] FunctionResponse willContinue * @property {google.ai.generativelanguage.v1beta.FunctionResponse.Scheduling|null} [scheduling] FunctionResponse scheduling */ @@ -68272,6 +69215,7 @@ * @param {google.ai.generativelanguage.v1beta.IFunctionResponse=} [properties] Properties to set */ function FunctionResponse(properties) { + this.parts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -68302,6 +69246,14 @@ */ FunctionResponse.prototype.response = null; + /** + * FunctionResponse parts. + * @member {Array.} parts + * @memberof google.ai.generativelanguage.v1beta.FunctionResponse + * @instance + */ + FunctionResponse.prototype.parts = $util.emptyArray; + /** * FunctionResponse willContinue. * @member {boolean} willContinue @@ -68361,6 +69313,9 @@ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.willContinue); if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scheduling); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.ai.generativelanguage.v1beta.FunctionResponsePart.encode(message.parts[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -68409,6 +69364,12 @@ message.response = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 8: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.ai.generativelanguage.v1beta.FunctionResponsePart.decode(reader, reader.uint32())); + break; + } case 4: { message.willContinue = reader.bool(); break; @@ -68464,6 +69425,15 @@ if (error) return "response." + error; } + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta.FunctionResponsePart.verify(message.parts[i]); + if (error) + return "parts." + error; + } + } if (message.willContinue != null && message.hasOwnProperty("willContinue")) if (typeof message.willContinue !== "boolean") return "willContinue: boolean expected"; @@ -68503,6 +69473,16 @@ throw TypeError(".google.ai.generativelanguage.v1beta.FunctionResponse.response: object expected"); message.response = $root.google.protobuf.Struct.fromObject(object.response); } + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.ai.generativelanguage.v1beta.FunctionResponse.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) { + if (typeof object.parts[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.FunctionResponse.parts: object expected"); + message.parts[i] = $root.google.ai.generativelanguage.v1beta.FunctionResponsePart.fromObject(object.parts[i]); + } + } if (object.willContinue != null) message.willContinue = Boolean(object.willContinue); switch (object.scheduling) { @@ -68545,6 +69525,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.parts = []; if (options.defaults) { object.name = ""; object.response = null; @@ -68564,6 +69546,11 @@ if (options.oneofs) object._scheduling = "scheduling"; } + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.ai.generativelanguage.v1beta.FunctionResponsePart.toObject(message.parts[j], options); + } return object; }; @@ -74595,6 +75582,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.error != null && message.hasOwnProperty("error")) { @@ -74704,6 +75692,10 @@ case 2: message.source = 2; break; + case "REGISTERED": + case 3: + message.source = 3; + break; } if (object.error != null) { if (typeof object.error !== "object") @@ -74839,12 +75831,14 @@ * @property {number} SOURCE_UNSPECIFIED=0 SOURCE_UNSPECIFIED value * @property {number} UPLOADED=1 UPLOADED value * @property {number} GENERATED=2 GENERATED value + * @property {number} REGISTERED=3 REGISTERED value */ File.Source = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SOURCE_UNSPECIFIED"] = 0; values[valuesById[1] = "UPLOADED"] = 1; values[valuesById[2] = "GENERATED"] = 2; + values[valuesById[3] = "REGISTERED"] = 3; return values; })(); @@ -79149,6 +80143,224 @@ return ThinkingConfig; })(); + v1beta.ImageConfig = (function() { + + /** + * Properties of an ImageConfig. + * @memberof google.ai.generativelanguage.v1beta + * @interface IImageConfig + * @property {string|null} [aspectRatio] ImageConfig aspectRatio + */ + + /** + * Constructs a new ImageConfig. + * @memberof google.ai.generativelanguage.v1beta + * @classdesc Represents an ImageConfig. + * @implements IImageConfig + * @constructor + * @param {google.ai.generativelanguage.v1beta.IImageConfig=} [properties] Properties to set + */ + function ImageConfig(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]]; + } + + /** + * ImageConfig aspectRatio. + * @member {string|null|undefined} aspectRatio + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @instance + */ + ImageConfig.prototype.aspectRatio = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_aspectRatio", { + get: $util.oneOfGetter($oneOfFields = ["aspectRatio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {google.ai.generativelanguage.v1beta.IImageConfig=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta.ImageConfig} ImageConfig instance + */ + ImageConfig.create = function create(properties) { + return new ImageConfig(properties); + }; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.ai.generativelanguage.v1beta.ImageConfig.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {google.ai.generativelanguage.v1beta.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectRatio != null && Object.hasOwnProperty.call(message, "aspectRatio")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.aspectRatio); + return writer; + }; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.ImageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {google.ai.generativelanguage.v1beta.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.ImageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.aspectRatio = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageConfig message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + properties._aspectRatio = 1; + if (!$util.isString(message.aspectRatio)) + return "aspectRatio: string expected"; + } + return null; + }; + + /** + * Creates an ImageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta.ImageConfig} ImageConfig + */ + ImageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta.ImageConfig) + return object; + var message = new $root.google.ai.generativelanguage.v1beta.ImageConfig(); + if (object.aspectRatio != null) + message.aspectRatio = String(object.aspectRatio); + return message; + }; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {google.ai.generativelanguage.v1beta.ImageConfig} message ImageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + object.aspectRatio = message.aspectRatio; + if (options.oneofs) + object._aspectRatio = "aspectRatio"; + } + return object; + }; + + /** + * Converts this ImageConfig to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @instance + * @returns {Object.} JSON object + */ + ImageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageConfig + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta.ImageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.ImageConfig"; + }; + + return ImageConfig; + })(); + v1beta.GenerationConfig = (function() { /** @@ -79165,6 +80377,7 @@ * @property {string|null} [responseMimeType] GenerationConfig responseMimeType * @property {google.ai.generativelanguage.v1beta.ISchema|null} [responseSchema] GenerationConfig responseSchema * @property {google.protobuf.IValue|null} [responseJsonSchema] GenerationConfig responseJsonSchema + * @property {google.protobuf.IValue|null} [responseJsonSchemaOrdered] GenerationConfig responseJsonSchemaOrdered * @property {number|null} [presencePenalty] GenerationConfig presencePenalty * @property {number|null} [frequencyPenalty] GenerationConfig frequencyPenalty * @property {boolean|null} [responseLogprobs] GenerationConfig responseLogprobs @@ -79173,6 +80386,7 @@ * @property {Array.|null} [responseModalities] GenerationConfig responseModalities * @property {google.ai.generativelanguage.v1beta.ISpeechConfig|null} [speechConfig] GenerationConfig speechConfig * @property {google.ai.generativelanguage.v1beta.IThinkingConfig|null} [thinkingConfig] GenerationConfig thinkingConfig + * @property {google.ai.generativelanguage.v1beta.IImageConfig|null} [imageConfig] GenerationConfig imageConfig * @property {google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|null} [mediaResolution] GenerationConfig mediaResolution */ @@ -79273,6 +80487,14 @@ */ GenerationConfig.prototype.responseJsonSchema = null; + /** + * GenerationConfig responseJsonSchemaOrdered. + * @member {google.protobuf.IValue|null|undefined} responseJsonSchemaOrdered + * @memberof google.ai.generativelanguage.v1beta.GenerationConfig + * @instance + */ + GenerationConfig.prototype.responseJsonSchemaOrdered = null; + /** * GenerationConfig presencePenalty. * @member {number|null|undefined} presencePenalty @@ -79337,6 +80559,14 @@ */ GenerationConfig.prototype.thinkingConfig = null; + /** + * GenerationConfig imageConfig. + * @member {google.ai.generativelanguage.v1beta.IImageConfig|null|undefined} imageConfig + * @memberof google.ai.generativelanguage.v1beta.GenerationConfig + * @instance + */ + GenerationConfig.prototype.imageConfig = null; + /** * GenerationConfig mediaResolution. * @member {google.ai.generativelanguage.v1beta.GenerationConfig.MediaResolution|null|undefined} mediaResolution @@ -79426,6 +80656,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_imageConfig", { + get: $util.oneOfGetter($oneOfFields = ["imageConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(GenerationConfig.prototype, "_mediaResolution", { get: $util.oneOfGetter($oneOfFields = ["mediaResolution"]), @@ -79499,6 +80735,10 @@ writer.uint32(/* id 23, wireType 0 =*/184).int32(message.mediaResolution); if (message.responseJsonSchema != null && Object.hasOwnProperty.call(message, "responseJsonSchema")) $root.google.protobuf.Value.encode(message.responseJsonSchema, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.imageConfig != null && Object.hasOwnProperty.call(message, "imageConfig")) + $root.google.ai.generativelanguage.v1beta.ImageConfig.encode(message.imageConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.responseJsonSchemaOrdered != null && Object.hasOwnProperty.call(message, "responseJsonSchemaOrdered")) + $root.google.protobuf.Value.encode(message.responseJsonSchemaOrdered, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); return writer; }; @@ -79577,6 +80817,10 @@ message.responseJsonSchema = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; } + case 28: { + message.responseJsonSchemaOrdered = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } case 15: { message.presencePenalty = reader.float(); break; @@ -79616,6 +80860,10 @@ message.thinkingConfig = $root.google.ai.generativelanguage.v1beta.ThinkingConfig.decode(reader, reader.uint32()); break; } + case 27: { + message.imageConfig = $root.google.ai.generativelanguage.v1beta.ImageConfig.decode(reader, reader.uint32()); + break; + } case 23: { message.mediaResolution = reader.int32(); break; @@ -79706,6 +80954,11 @@ if (error) return "responseJsonSchema." + error; } + if (message.responseJsonSchemaOrdered != null && message.hasOwnProperty("responseJsonSchemaOrdered")) { + var error = $root.google.protobuf.Value.verify(message.responseJsonSchemaOrdered); + if (error) + return "responseJsonSchemaOrdered." + error; + } if (message.presencePenalty != null && message.hasOwnProperty("presencePenalty")) { properties._presencePenalty = 1; if (typeof message.presencePenalty !== "number") @@ -79761,6 +81014,14 @@ return "thinkingConfig." + error; } } + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + properties._imageConfig = 1; + { + var error = $root.google.ai.generativelanguage.v1beta.ImageConfig.verify(message.imageConfig); + if (error) + return "imageConfig." + error; + } + } if (message.mediaResolution != null && message.hasOwnProperty("mediaResolution")) { properties._mediaResolution = 1; switch (message.mediaResolution) { @@ -79819,6 +81080,11 @@ throw TypeError(".google.ai.generativelanguage.v1beta.GenerationConfig.responseJsonSchema: object expected"); message.responseJsonSchema = $root.google.protobuf.Value.fromObject(object.responseJsonSchema); } + if (object.responseJsonSchemaOrdered != null) { + if (typeof object.responseJsonSchemaOrdered !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.GenerationConfig.responseJsonSchemaOrdered: object expected"); + message.responseJsonSchemaOrdered = $root.google.protobuf.Value.fromObject(object.responseJsonSchemaOrdered); + } if (object.presencePenalty != null) message.presencePenalty = Number(object.presencePenalty); if (object.frequencyPenalty != null) @@ -79868,6 +81134,11 @@ throw TypeError(".google.ai.generativelanguage.v1beta.GenerationConfig.thinkingConfig: object expected"); message.thinkingConfig = $root.google.ai.generativelanguage.v1beta.ThinkingConfig.fromObject(object.thinkingConfig); } + if (object.imageConfig != null) { + if (typeof object.imageConfig !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta.GenerationConfig.imageConfig: object expected"); + message.imageConfig = $root.google.ai.generativelanguage.v1beta.ImageConfig.fromObject(object.imageConfig); + } switch (object.mediaResolution) { default: if (typeof object.mediaResolution === "number") { @@ -79916,6 +81187,7 @@ object.responseMimeType = ""; object.responseSchema = null; object.responseJsonSchema = null; + object.responseJsonSchemaOrdered = null; } if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { object.candidateCount = message.candidateCount; @@ -80003,6 +81275,13 @@ } if (message.responseJsonSchema != null && message.hasOwnProperty("responseJsonSchema")) object.responseJsonSchema = $root.google.protobuf.Value.toObject(message.responseJsonSchema, options); + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + object.imageConfig = $root.google.ai.generativelanguage.v1beta.ImageConfig.toObject(message.imageConfig, options); + if (options.oneofs) + object._imageConfig = "imageConfig"; + } + if (message.responseJsonSchemaOrdered != null && message.hasOwnProperty("responseJsonSchemaOrdered")) + object.responseJsonSchemaOrdered = $root.google.protobuf.Value.toObject(message.responseJsonSchemaOrdered, options); return object; }; @@ -81569,6 +82848,7 @@ * @property {number|null} [index] Candidate index * @property {google.ai.generativelanguage.v1beta.IContent|null} [content] Candidate content * @property {google.ai.generativelanguage.v1beta.Candidate.FinishReason|null} [finishReason] Candidate finishReason + * @property {string|null} [finishMessage] Candidate finishMessage * @property {Array.|null} [safetyRatings] Candidate safetyRatings * @property {google.ai.generativelanguage.v1beta.ICitationMetadata|null} [citationMetadata] Candidate citationMetadata * @property {number|null} [tokenCount] Candidate tokenCount @@ -81620,6 +82900,14 @@ */ Candidate.prototype.finishReason = 0; + /** + * Candidate finishMessage. + * @member {string|null|undefined} finishMessage + * @memberof google.ai.generativelanguage.v1beta.Candidate + * @instance + */ + Candidate.prototype.finishMessage = null; + /** * Candidate safetyRatings. * @member {Array.} safetyRatings @@ -81693,6 +82981,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(Candidate.prototype, "_finishMessage", { + get: $util.oneOfGetter($oneOfFields = ["finishMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Candidate instance using the specified properties. * @function create @@ -81723,6 +83017,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.finishReason); if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.index); + if (message.finishMessage != null && Object.hasOwnProperty.call(message, "finishMessage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.finishMessage); if (message.safetyRatings != null && message.safetyRatings.length) for (var i = 0; i < message.safetyRatings.length; ++i) $root.google.ai.generativelanguage.v1beta.SafetyRating.encode(message.safetyRatings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); @@ -81789,6 +83085,10 @@ message.finishReason = reader.int32(); break; } + case 4: { + message.finishMessage = reader.string(); + break; + } case 5: { if (!(message.safetyRatings && message.safetyRatings.length)) message.safetyRatings = []; @@ -81887,9 +83187,19 @@ case 9: case 10: case 11: + case 14: + case 15: + case 16: + case 17: case 12: + case 13: break; } + if (message.finishMessage != null && message.hasOwnProperty("finishMessage")) { + properties._finishMessage = 1; + if (!$util.isString(message.finishMessage)) + return "finishMessage: string expected"; + } if (message.safetyRatings != null && message.hasOwnProperty("safetyRatings")) { if (!Array.isArray(message.safetyRatings)) return "safetyRatings: array expected"; @@ -82011,11 +83321,33 @@ case 11: message.finishReason = 11; break; + case "IMAGE_PROHIBITED_CONTENT": + case 14: + message.finishReason = 14; + break; + case "IMAGE_OTHER": + case 15: + message.finishReason = 15; + break; + case "NO_IMAGE": + case 16: + message.finishReason = 16; + break; + case "IMAGE_RECITATION": + case 17: + message.finishReason = 17; + break; case "UNEXPECTED_TOOL_CALL": case 12: message.finishReason = 12; break; + case "TOO_MANY_TOOL_CALLS": + case 13: + message.finishReason = 13; + break; } + if (object.finishMessage != null) + message.finishMessage = String(object.finishMessage); if (object.safetyRatings) { if (!Array.isArray(object.safetyRatings)) throw TypeError(".google.ai.generativelanguage.v1beta.Candidate.safetyRatings: array expected"); @@ -82099,6 +83431,11 @@ if (options.oneofs) object._index = "index"; } + if (message.finishMessage != null && message.hasOwnProperty("finishMessage")) { + object.finishMessage = message.finishMessage; + if (options.oneofs) + object._finishMessage = "finishMessage"; + } if (message.safetyRatings && message.safetyRatings.length) { object.safetyRatings = []; for (var j = 0; j < message.safetyRatings.length; ++j) @@ -82166,7 +83503,12 @@ * @property {number} SPII=9 SPII value * @property {number} MALFORMED_FUNCTION_CALL=10 MALFORMED_FUNCTION_CALL value * @property {number} IMAGE_SAFETY=11 IMAGE_SAFETY value + * @property {number} IMAGE_PROHIBITED_CONTENT=14 IMAGE_PROHIBITED_CONTENT value + * @property {number} IMAGE_OTHER=15 IMAGE_OTHER value + * @property {number} NO_IMAGE=16 NO_IMAGE value + * @property {number} IMAGE_RECITATION=17 IMAGE_RECITATION value * @property {number} UNEXPECTED_TOOL_CALL=12 UNEXPECTED_TOOL_CALL value + * @property {number} TOO_MANY_TOOL_CALLS=13 TOO_MANY_TOOL_CALLS value */ Candidate.FinishReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -82182,7 +83524,12 @@ values[valuesById[9] = "SPII"] = 9; values[valuesById[10] = "MALFORMED_FUNCTION_CALL"] = 10; values[valuesById[11] = "IMAGE_SAFETY"] = 11; + values[valuesById[14] = "IMAGE_PROHIBITED_CONTENT"] = 14; + values[valuesById[15] = "IMAGE_OTHER"] = 15; + values[valuesById[16] = "NO_IMAGE"] = 16; + values[valuesById[17] = "IMAGE_RECITATION"] = 17; values[valuesById[12] = "UNEXPECTED_TOOL_CALL"] = 12; + values[valuesById[13] = "TOO_MANY_TOOL_CALLS"] = 13; return values; })(); @@ -82573,6 +83920,8 @@ case 0: case 1: case 2: + case 3: + case 4: break; } return null; @@ -82611,6 +83960,14 @@ case 2: message.urlRetrievalStatus = 2; break; + case "URL_RETRIEVAL_STATUS_PAYWALL": + case 3: + message.urlRetrievalStatus = 3; + break; + case "URL_RETRIEVAL_STATUS_UNSAFE": + case 4: + message.urlRetrievalStatus = 4; + break; } return message; }; @@ -82672,12 +84029,16 @@ * @property {number} URL_RETRIEVAL_STATUS_UNSPECIFIED=0 URL_RETRIEVAL_STATUS_UNSPECIFIED value * @property {number} URL_RETRIEVAL_STATUS_SUCCESS=1 URL_RETRIEVAL_STATUS_SUCCESS value * @property {number} URL_RETRIEVAL_STATUS_ERROR=2 URL_RETRIEVAL_STATUS_ERROR value + * @property {number} URL_RETRIEVAL_STATUS_PAYWALL=3 URL_RETRIEVAL_STATUS_PAYWALL value + * @property {number} URL_RETRIEVAL_STATUS_UNSAFE=4 URL_RETRIEVAL_STATUS_UNSAFE value */ UrlMetadata.UrlRetrievalStatus = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "URL_RETRIEVAL_STATUS_UNSPECIFIED"] = 0; values[valuesById[1] = "URL_RETRIEVAL_STATUS_SUCCESS"] = 1; values[valuesById[2] = "URL_RETRIEVAL_STATUS_ERROR"] = 2; + values[valuesById[3] = "URL_RETRIEVAL_STATUS_PAYWALL"] = 3; + values[valuesById[4] = "URL_RETRIEVAL_STATUS_UNSAFE"] = 4; return values; })(); @@ -82690,6 +84051,7 @@ * Properties of a LogprobsResult. * @memberof google.ai.generativelanguage.v1beta * @interface ILogprobsResult + * @property {number|null} [logProbabilitySum] LogprobsResult logProbabilitySum * @property {Array.|null} [topCandidates] LogprobsResult topCandidates * @property {Array.|null} [chosenCandidates] LogprobsResult chosenCandidates */ @@ -82711,6 +84073,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * LogprobsResult logProbabilitySum. + * @member {number|null|undefined} logProbabilitySum + * @memberof google.ai.generativelanguage.v1beta.LogprobsResult + * @instance + */ + LogprobsResult.prototype.logProbabilitySum = null; + /** * LogprobsResult topCandidates. * @member {Array.} topCandidates @@ -82727,6 +84097,15 @@ */ LogprobsResult.prototype.chosenCandidates = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LogprobsResult.prototype, "_logProbabilitySum", { + get: $util.oneOfGetter($oneOfFields = ["logProbabilitySum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LogprobsResult instance using the specified properties. * @function create @@ -82757,6 +84136,8 @@ if (message.chosenCandidates != null && message.chosenCandidates.length) for (var i = 0; i < message.chosenCandidates.length; ++i) $root.google.ai.generativelanguage.v1beta.LogprobsResult.Candidate.encode(message.chosenCandidates[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.logProbabilitySum != null && Object.hasOwnProperty.call(message, "logProbabilitySum")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.logProbabilitySum); return writer; }; @@ -82793,6 +84174,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 3: { + message.logProbabilitySum = reader.float(); + break; + } case 1: { if (!(message.topCandidates && message.topCandidates.length)) message.topCandidates = []; @@ -82840,6 +84225,12 @@ LogprobsResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.logProbabilitySum != null && message.hasOwnProperty("logProbabilitySum")) { + properties._logProbabilitySum = 1; + if (typeof message.logProbabilitySum !== "number") + return "logProbabilitySum: number expected"; + } if (message.topCandidates != null && message.hasOwnProperty("topCandidates")) { if (!Array.isArray(message.topCandidates)) return "topCandidates: array expected"; @@ -82873,6 +84264,8 @@ if (object instanceof $root.google.ai.generativelanguage.v1beta.LogprobsResult) return object; var message = new $root.google.ai.generativelanguage.v1beta.LogprobsResult(); + if (object.logProbabilitySum != null) + message.logProbabilitySum = Number(object.logProbabilitySum); if (object.topCandidates) { if (!Array.isArray(object.topCandidates)) throw TypeError(".google.ai.generativelanguage.v1beta.LogprobsResult.topCandidates: array expected"); @@ -82923,6 +84316,11 @@ for (var j = 0; j < message.chosenCandidates.length; ++j) object.chosenCandidates[j] = $root.google.ai.generativelanguage.v1beta.LogprobsResult.Candidate.toObject(message.chosenCandidates[j], options); } + if (message.logProbabilitySum != null && message.hasOwnProperty("logProbabilitySum")) { + object.logProbabilitySum = options.json && !isFinite(message.logProbabilitySum) ? String(message.logProbabilitySum) : message.logProbabilitySum; + if (options.oneofs) + object._logProbabilitySum = "logProbabilitySum"; + } return object; }; @@ -93208,6 +94606,7 @@ * @property {google.ai.generativelanguage.v1beta.IBidiGenerateContentTranscription|null} [inputTranscription] BidiGenerateContentServerContent inputTranscription * @property {google.ai.generativelanguage.v1beta.IBidiGenerateContentTranscription|null} [outputTranscription] BidiGenerateContentServerContent outputTranscription * @property {google.ai.generativelanguage.v1beta.IUrlContextMetadata|null} [urlContextMetadata] BidiGenerateContentServerContent urlContextMetadata + * @property {boolean|null} [waitingForInput] BidiGenerateContentServerContent waitingForInput */ /** @@ -93289,6 +94688,14 @@ */ BidiGenerateContentServerContent.prototype.urlContextMetadata = null; + /** + * BidiGenerateContentServerContent waitingForInput. + * @member {boolean} waitingForInput + * @memberof google.ai.generativelanguage.v1beta.BidiGenerateContentServerContent + * @instance + */ + BidiGenerateContentServerContent.prototype.waitingForInput = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -93338,6 +94745,8 @@ $root.google.ai.generativelanguage.v1beta.BidiGenerateContentTranscription.encode(message.outputTranscription, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.urlContextMetadata != null && Object.hasOwnProperty.call(message, "urlContextMetadata")) $root.google.ai.generativelanguage.v1beta.UrlContextMetadata.encode(message.urlContextMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.waitingForInput != null && Object.hasOwnProperty.call(message, "waitingForInput")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.waitingForInput); return writer; }; @@ -93406,6 +94815,10 @@ message.urlContextMetadata = $root.google.ai.generativelanguage.v1beta.UrlContextMetadata.decode(reader, reader.uint32()); break; } + case 10: { + message.waitingForInput = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -93479,6 +94892,9 @@ if (error) return "urlContextMetadata." + error; } + if (message.waitingForInput != null && message.hasOwnProperty("waitingForInput")) + if (typeof message.waitingForInput !== "boolean") + return "waitingForInput: boolean expected"; return null; }; @@ -93525,6 +94941,8 @@ throw TypeError(".google.ai.generativelanguage.v1beta.BidiGenerateContentServerContent.urlContextMetadata: object expected"); message.urlContextMetadata = $root.google.ai.generativelanguage.v1beta.UrlContextMetadata.fromObject(object.urlContextMetadata); } + if (object.waitingForInput != null) + message.waitingForInput = Boolean(object.waitingForInput); return message; }; @@ -93549,6 +94967,7 @@ object.inputTranscription = null; object.outputTranscription = null; object.urlContextMetadata = null; + object.waitingForInput = false; } if (message.modelTurn != null && message.hasOwnProperty("modelTurn")) { object.modelTurn = $root.google.ai.generativelanguage.v1beta.Content.toObject(message.modelTurn, options); @@ -93569,6 +94988,8 @@ object.outputTranscription = $root.google.ai.generativelanguage.v1beta.BidiGenerateContentTranscription.toObject(message.outputTranscription, options); if (message.urlContextMetadata != null && message.hasOwnProperty("urlContextMetadata")) object.urlContextMetadata = $root.google.ai.generativelanguage.v1beta.UrlContextMetadata.toObject(message.urlContextMetadata, options); + if (message.waitingForInput != null && message.hasOwnProperty("waitingForInput")) + object.waitingForInput = message.waitingForInput; return object; }; @@ -107044,7 +108465,7 @@ * Properties of a PredictLongRunningResponse. * @memberof google.ai.generativelanguage.v1beta * @interface IPredictLongRunningResponse - * @property {google.ai.generativelanguage.v1beta.IGenerateVideoResponse|null} [generateVideoResponse] PredictLongRunningResponse generateVideoResponse + * @property {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse|null} [generateVideoResponse] PredictLongRunningResponse generateVideoResponse */ /** @@ -107064,7 +108485,7 @@ /** * PredictLongRunningResponse generateVideoResponse. - * @member {google.ai.generativelanguage.v1beta.IGenerateVideoResponse|null|undefined} generateVideoResponse + * @member {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse|null|undefined} generateVideoResponse * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningResponse * @instance */ @@ -107109,7 +108530,7 @@ if (!writer) writer = $Writer.create(); if (message.generateVideoResponse != null && Object.hasOwnProperty.call(message, "generateVideoResponse")) - $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse.encode(message.generateVideoResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.encode(message.generateVideoResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -107147,7 +108568,7 @@ break; switch (tag >>> 3) { case 1: { - message.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse.decode(reader, reader.uint32()); + message.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.decode(reader, reader.uint32()); break; } default: @@ -107189,7 +108610,7 @@ if (message.generateVideoResponse != null && message.hasOwnProperty("generateVideoResponse")) { properties.response = 1; { - var error = $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse.verify(message.generateVideoResponse); + var error = $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.verify(message.generateVideoResponse); if (error) return "generateVideoResponse." + error; } @@ -107212,7 +108633,7 @@ if (object.generateVideoResponse != null) { if (typeof object.generateVideoResponse !== "object") throw TypeError(".google.ai.generativelanguage.v1beta.PredictLongRunningResponse.generateVideoResponse: object expected"); - message.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse.fromObject(object.generateVideoResponse); + message.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.fromObject(object.generateVideoResponse); } return message; }; @@ -107231,7 +108652,7 @@ options = {}; var object = {}; if (message.generateVideoResponse != null && message.hasOwnProperty("generateVideoResponse")) { - object.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse.toObject(message.generateVideoResponse, options); + object.generateVideoResponse = $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.toObject(message.generateVideoResponse, options); if (options.oneofs) object.response = "generateVideoResponse"; } @@ -107928,26 +109349,26 @@ return Video; })(); - v1beta.GenerateVideoResponse = (function() { + v1beta.PredictLongRunningGeneratedVideoResponse = (function() { /** - * Properties of a GenerateVideoResponse. + * Properties of a PredictLongRunningGeneratedVideoResponse. * @memberof google.ai.generativelanguage.v1beta - * @interface IGenerateVideoResponse - * @property {Array.|null} [generatedSamples] GenerateVideoResponse generatedSamples - * @property {number|null} [raiMediaFilteredCount] GenerateVideoResponse raiMediaFilteredCount - * @property {Array.|null} [raiMediaFilteredReasons] GenerateVideoResponse raiMediaFilteredReasons + * @interface IPredictLongRunningGeneratedVideoResponse + * @property {Array.|null} [generatedSamples] PredictLongRunningGeneratedVideoResponse generatedSamples + * @property {number|null} [raiMediaFilteredCount] PredictLongRunningGeneratedVideoResponse raiMediaFilteredCount + * @property {Array.|null} [raiMediaFilteredReasons] PredictLongRunningGeneratedVideoResponse raiMediaFilteredReasons */ /** - * Constructs a new GenerateVideoResponse. + * Constructs a new PredictLongRunningGeneratedVideoResponse. * @memberof google.ai.generativelanguage.v1beta - * @classdesc Represents a GenerateVideoResponse. - * @implements IGenerateVideoResponse + * @classdesc Represents a PredictLongRunningGeneratedVideoResponse. + * @implements IPredictLongRunningGeneratedVideoResponse * @constructor - * @param {google.ai.generativelanguage.v1beta.IGenerateVideoResponse=} [properties] Properties to set + * @param {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse=} [properties] Properties to set */ - function GenerateVideoResponse(properties) { + function PredictLongRunningGeneratedVideoResponse(properties) { this.generatedSamples = []; this.raiMediaFilteredReasons = []; if (properties) @@ -107957,51 +109378,51 @@ } /** - * GenerateVideoResponse generatedSamples. + * PredictLongRunningGeneratedVideoResponse generatedSamples. * @member {Array.} generatedSamples - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @instance */ - GenerateVideoResponse.prototype.generatedSamples = $util.emptyArray; + PredictLongRunningGeneratedVideoResponse.prototype.generatedSamples = $util.emptyArray; /** - * GenerateVideoResponse raiMediaFilteredCount. + * PredictLongRunningGeneratedVideoResponse raiMediaFilteredCount. * @member {number} raiMediaFilteredCount - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @instance */ - GenerateVideoResponse.prototype.raiMediaFilteredCount = 0; + PredictLongRunningGeneratedVideoResponse.prototype.raiMediaFilteredCount = 0; /** - * GenerateVideoResponse raiMediaFilteredReasons. + * PredictLongRunningGeneratedVideoResponse raiMediaFilteredReasons. * @member {Array.} raiMediaFilteredReasons - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @instance */ - GenerateVideoResponse.prototype.raiMediaFilteredReasons = $util.emptyArray; + PredictLongRunningGeneratedVideoResponse.prototype.raiMediaFilteredReasons = $util.emptyArray; /** - * Creates a new GenerateVideoResponse instance using the specified properties. + * Creates a new PredictLongRunningGeneratedVideoResponse instance using the specified properties. * @function create - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static - * @param {google.ai.generativelanguage.v1beta.IGenerateVideoResponse=} [properties] Properties to set - * @returns {google.ai.generativelanguage.v1beta.GenerateVideoResponse} GenerateVideoResponse instance + * @param {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse} PredictLongRunningGeneratedVideoResponse instance */ - GenerateVideoResponse.create = function create(properties) { - return new GenerateVideoResponse(properties); + PredictLongRunningGeneratedVideoResponse.create = function create(properties) { + return new PredictLongRunningGeneratedVideoResponse(properties); }; /** - * Encodes the specified GenerateVideoResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.GenerateVideoResponse.verify|verify} messages. + * Encodes the specified PredictLongRunningGeneratedVideoResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.verify|verify} messages. * @function encode - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static - * @param {google.ai.generativelanguage.v1beta.IGenerateVideoResponse} message GenerateVideoResponse message or plain object to encode + * @param {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse} message PredictLongRunningGeneratedVideoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateVideoResponse.encode = function encode(message, writer) { + PredictLongRunningGeneratedVideoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.generatedSamples != null && message.generatedSamples.length) @@ -108016,33 +109437,33 @@ }; /** - * Encodes the specified GenerateVideoResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.GenerateVideoResponse.verify|verify} messages. + * Encodes the specified PredictLongRunningGeneratedVideoResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static - * @param {google.ai.generativelanguage.v1beta.IGenerateVideoResponse} message GenerateVideoResponse message or plain object to encode + * @param {google.ai.generativelanguage.v1beta.IPredictLongRunningGeneratedVideoResponse} message PredictLongRunningGeneratedVideoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateVideoResponse.encodeDelimited = function encodeDelimited(message, writer) { + PredictLongRunningGeneratedVideoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateVideoResponse message from the specified reader or buffer. + * Decodes a PredictLongRunningGeneratedVideoResponse message from the specified reader or buffer. * @function decode - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.ai.generativelanguage.v1beta.GenerateVideoResponse} GenerateVideoResponse + * @returns {google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse} PredictLongRunningGeneratedVideoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateVideoResponse.decode = function decode(reader, length, error) { + PredictLongRunningGeneratedVideoResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -108073,30 +109494,30 @@ }; /** - * Decodes a GenerateVideoResponse message from the specified reader or buffer, length delimited. + * Decodes a PredictLongRunningGeneratedVideoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ai.generativelanguage.v1beta.GenerateVideoResponse} GenerateVideoResponse + * @returns {google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse} PredictLongRunningGeneratedVideoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateVideoResponse.decodeDelimited = function decodeDelimited(reader) { + PredictLongRunningGeneratedVideoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateVideoResponse message. + * Verifies a PredictLongRunningGeneratedVideoResponse message. * @function verify - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerateVideoResponse.verify = function verify(message) { + PredictLongRunningGeneratedVideoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.generatedSamples != null && message.hasOwnProperty("generatedSamples")) { @@ -108122,24 +109543,24 @@ }; /** - * Creates a GenerateVideoResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PredictLongRunningGeneratedVideoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static * @param {Object.} object Plain object - * @returns {google.ai.generativelanguage.v1beta.GenerateVideoResponse} GenerateVideoResponse + * @returns {google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse} PredictLongRunningGeneratedVideoResponse */ - GenerateVideoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse) + PredictLongRunningGeneratedVideoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse) return object; - var message = new $root.google.ai.generativelanguage.v1beta.GenerateVideoResponse(); + var message = new $root.google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse(); if (object.generatedSamples) { if (!Array.isArray(object.generatedSamples)) - throw TypeError(".google.ai.generativelanguage.v1beta.GenerateVideoResponse.generatedSamples: array expected"); + throw TypeError(".google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.generatedSamples: array expected"); message.generatedSamples = []; for (var i = 0; i < object.generatedSamples.length; ++i) { if (typeof object.generatedSamples[i] !== "object") - throw TypeError(".google.ai.generativelanguage.v1beta.GenerateVideoResponse.generatedSamples: object expected"); + throw TypeError(".google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.generatedSamples: object expected"); message.generatedSamples[i] = $root.google.ai.generativelanguage.v1beta.Media.fromObject(object.generatedSamples[i]); } } @@ -108147,7 +109568,7 @@ message.raiMediaFilteredCount = object.raiMediaFilteredCount | 0; if (object.raiMediaFilteredReasons) { if (!Array.isArray(object.raiMediaFilteredReasons)) - throw TypeError(".google.ai.generativelanguage.v1beta.GenerateVideoResponse.raiMediaFilteredReasons: array expected"); + throw TypeError(".google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse.raiMediaFilteredReasons: array expected"); message.raiMediaFilteredReasons = []; for (var i = 0; i < object.raiMediaFilteredReasons.length; ++i) message.raiMediaFilteredReasons[i] = String(object.raiMediaFilteredReasons[i]); @@ -108156,15 +109577,15 @@ }; /** - * Creates a plain object from a GenerateVideoResponse message. Also converts values to other types if specified. + * Creates a plain object from a PredictLongRunningGeneratedVideoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static - * @param {google.ai.generativelanguage.v1beta.GenerateVideoResponse} message GenerateVideoResponse + * @param {google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse} message PredictLongRunningGeneratedVideoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateVideoResponse.toObject = function toObject(message, options) { + PredictLongRunningGeneratedVideoResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -108190,32 +109611,32 @@ }; /** - * Converts this GenerateVideoResponse to JSON. + * Converts this PredictLongRunningGeneratedVideoResponse to JSON. * @function toJSON - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @instance * @returns {Object.} JSON object */ - GenerateVideoResponse.prototype.toJSON = function toJSON() { + PredictLongRunningGeneratedVideoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateVideoResponse + * Gets the default type url for PredictLongRunningGeneratedVideoResponse * @function getTypeUrl - * @memberof google.ai.generativelanguage.v1beta.GenerateVideoResponse + * @memberof google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateVideoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PredictLongRunningGeneratedVideoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.GenerateVideoResponse"; + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta.PredictLongRunningGeneratedVideoResponse"; }; - return GenerateVideoResponse; + return PredictLongRunningGeneratedVideoResponse; })(); v1beta.RetrieverService = (function() { diff --git a/packages/google-ai-generativelanguage/protos/protos.json b/packages/google-ai-generativelanguage/protos/protos.json index f30e162e9cd0..0ab8a72eaee6 100644 --- a/packages/google-ai-generativelanguage/protos/protos.json +++ b/packages/google-ai-generativelanguage/protos/protos.json @@ -491,6 +491,13 @@ "proto3_optional": true } }, + "responseJsonSchemaOrdered": { + "type": "google.protobuf.Value", + "id": 28, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "presencePenalty": { "type": "float", "id": 15, @@ -665,6 +672,11 @@ "oneof": [ "index" ] + }, + "_finishMessage": { + "oneof": [ + "finishMessage" + ] } }, "fields": { @@ -690,6 +702,14 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "finishMessage": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, "safetyRatings": { "rule": "repeated", "type": "SafetyRating", @@ -753,7 +773,11 @@ "SPII": 9, "MALFORMED_FUNCTION_CALL": 10, "IMAGE_SAFETY": 11, - "UNEXPECTED_TOOL_CALL": 12 + "IMAGE_PROHIBITED_CONTENT": 14, + "IMAGE_OTHER": 15, + "NO_IMAGE": 16, + "UNEXPECTED_TOOL_CALL": 12, + "TOO_MANY_TOOL_CALLS": 13 } } } @@ -783,13 +807,29 @@ "values": { "URL_RETRIEVAL_STATUS_UNSPECIFIED": 0, "URL_RETRIEVAL_STATUS_SUCCESS": 1, - "URL_RETRIEVAL_STATUS_ERROR": 2 + "URL_RETRIEVAL_STATUS_ERROR": 2, + "URL_RETRIEVAL_STATUS_PAYWALL": 3, + "URL_RETRIEVAL_STATUS_UNSAFE": 4 } } } }, "LogprobsResult": { + "oneofs": { + "_logProbabilitySum": { + "oneof": [ + "logProbabilitySum" + ] + } + }, "fields": { + "logProbabilitySum": { + "type": "float", + "id": 3, + "options": { + "proto3_optional": true + } + }, "topCandidates": { "rule": "repeated", "type": "TopCandidates", @@ -1201,6 +1241,11 @@ } }, "HarmCategory": { + "valuesOptions": { + "HARM_CATEGORY_CIVIC_INTEGRITY": { + "deprecated": true + } + }, "values": { "HARM_CATEGORY_UNSPECIFIED": 0, "HARM_CATEGORY_DEROGATORY": 1, @@ -7654,6 +7699,25 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "partMetadata": { + "type": "google.protobuf.Struct", + "id": 8 + } + } + }, + "FunctionResponsePart": { + "oneofs": { + "data": { + "oneof": [ + "inlineData" + ] + } + }, + "fields": { + "inlineData": { + "type": "FunctionResponseBlob", + "id": 1 } } }, @@ -7669,6 +7733,18 @@ } } }, + "FunctionResponseBlob": { + "fields": { + "mimeType": { + "type": "string", + "id": 1 + }, + "data": { + "type": "bytes", + "id": 2 + } + } + }, "FileData": { "fields": { "mimeType": { @@ -7797,6 +7873,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "computerUse": { + "type": "ComputerUse", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "urlContext": { "type": "UrlContext", "id": 8, @@ -7816,6 +7899,33 @@ } } } + }, + "ComputerUse": { + "fields": { + "environment": { + "type": "Environment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "excludedPredefinedFunctions": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Environment": { + "values": { + "ENVIRONMENT_UNSPECIFIED": 0, + "ENVIRONMENT_BROWSER": 1 + } + } + } } } }, @@ -8055,6 +8165,14 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "parts": { + "rule": "repeated", + "type": "FunctionResponsePart", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "willContinue": { "type": "bool", "id": 4, @@ -8610,6 +8728,11 @@ } }, "HarmCategory": { + "valuesOptions": { + "HARM_CATEGORY_CIVIC_INTEGRITY": { + "deprecated": true + } + }, "values": { "HARM_CATEGORY_UNSPECIFIED": 0, "HARM_CATEGORY_DEROGATORY": 1, @@ -8855,7 +8978,8 @@ "values": { "SOURCE_UNSPECIFIED": 0, "UPLOADED": 1, - "GENERATED": 2 + "GENERATED": 2, + "REGISTERED": 3 } } } @@ -9419,6 +9543,25 @@ } } }, + "ImageConfig": { + "oneofs": { + "_aspectRatio": { + "oneof": [ + "aspectRatio" + ] + } + }, + "fields": { + "aspectRatio": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, "GenerationConfig": { "oneofs": { "_candidateCount": { @@ -9486,6 +9629,11 @@ "thinkingConfig" ] }, + "_imageConfig": { + "oneof": [ + "imageConfig" + ] + }, "_mediaResolution": { "oneof": [ "mediaResolution" @@ -9567,6 +9715,15 @@ "type": "google.protobuf.Value", "id": 24, "options": { + "json_name": "_responseJsonSchema", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "responseJsonSchemaOrdered": { + "type": "google.protobuf.Value", + "id": 28, + "options": { + "json_name": "responseJsonSchema", "(google.api.field_behavior)": "OPTIONAL" } }, @@ -9634,6 +9791,14 @@ "proto3_optional": true } }, + "imageConfig": { + "type": "ImageConfig", + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "mediaResolution": { "type": "MediaResolution", "id": 23, @@ -9852,6 +10017,11 @@ "oneof": [ "index" ] + }, + "_finishMessage": { + "oneof": [ + "finishMessage" + ] } }, "fields": { @@ -9877,6 +10047,14 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "finishMessage": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, "safetyRatings": { "rule": "repeated", "type": "SafetyRating", @@ -9948,7 +10126,12 @@ "SPII": 9, "MALFORMED_FUNCTION_CALL": 10, "IMAGE_SAFETY": 11, - "UNEXPECTED_TOOL_CALL": 12 + "IMAGE_PROHIBITED_CONTENT": 14, + "IMAGE_OTHER": 15, + "NO_IMAGE": 16, + "IMAGE_RECITATION": 17, + "UNEXPECTED_TOOL_CALL": 12, + "TOO_MANY_TOOL_CALLS": 13 } } } @@ -9978,13 +10161,29 @@ "values": { "URL_RETRIEVAL_STATUS_UNSPECIFIED": 0, "URL_RETRIEVAL_STATUS_SUCCESS": 1, - "URL_RETRIEVAL_STATUS_ERROR": 2 + "URL_RETRIEVAL_STATUS_ERROR": 2, + "URL_RETRIEVAL_STATUS_PAYWALL": 3, + "URL_RETRIEVAL_STATUS_UNSAFE": 4 } } } }, "LogprobsResult": { + "oneofs": { + "_logProbabilitySum": { + "oneof": [ + "logProbabilitySum" + ] + } + }, "fields": { + "logProbabilitySum": { + "type": "float", + "id": 3, + "options": { + "proto3_optional": true + } + }, "topCandidates": { "rule": "repeated", "type": "TopCandidates", @@ -11112,6 +11311,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "waitingForInput": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -12796,7 +13002,7 @@ }, "fields": { "generateVideoResponse": { - "type": "GenerateVideoResponse", + "type": "PredictLongRunningGeneratedVideoResponse", "id": 1 } } @@ -12839,7 +13045,7 @@ } } }, - "GenerateVideoResponse": { + "PredictLongRunningGeneratedVideoResponse": { "fields": { "generatedSamples": { "rule": "repeated", diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta/generative_service.bidi_generate_content.js b/packages/google-ai-generativelanguage/samples/generated/v1beta/generative_service.bidi_generate_content.js index 6401ecd1b3d3..5dbe129292d9 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta/generative_service.bidi_generate_content.js +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta/generative_service.bidi_generate_content.js @@ -29,8 +29,7 @@ function main() { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Optional. Session configuration sent in the first and only first client - * message. + * Optional. Session configuration sent only in the first client message. */ // const setup = {} /** diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json index fb43cd8da38e..23b0998bd7b2 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json @@ -886,7 +886,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 69, "type": "FULL" } ], diff --git a/packages/google-ai-generativelanguage/samples/package.json b/packages/google-ai-generativelanguage/samples/package.json index 38b439c7b864..3dda27b36fbd 100644 --- a/packages/google-ai-generativelanguage/samples/package.json +++ b/packages/google-ai-generativelanguage/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ai/generativelanguage": "^3.4.1" + "@google-ai/generativelanguage": "^3.5.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-chat/CHANGELOG.md b/packages/google-chat/CHANGELOG.md index b4c3a4b3662b..d261dce69d99 100644 --- a/packages/google-chat/CHANGELOG.md +++ b/packages/google-chat/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.21.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.20.0...chat-v0.21.0) (2025-10-25) + + +### Features + +* [chat] add ROLE_ASSISTANT_MANAGER to the MembershipRole enum in the Membership proto and assistant_managers_allowed to the PermissionSetting ([#6843](https://github.com/googleapis/google-cloud-node/issues/6843)) ([84654a5](https://github.com/googleapis/google-cloud-node/commit/84654a5c0cc56d940b96a85b0e439dc6ac140699)) + +## [0.20.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.19.1...chat-v0.20.0) (2025-10-16) + + +### Features + +* [chat] Add `Carousel` widget ([#6821](https://github.com/googleapis/google-cloud-node/issues/6821)) ([7365b32](https://github.com/googleapis/google-cloud-node/commit/7365b32f30e259c4839aad81e4c5cc5a91e6ebee)) + ## [0.19.1](https://github.com/googleapis/google-cloud-node/compare/chat-v0.19.0...chat-v0.19.1) (2025-10-13) diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index a5d5f4b5127b..ce3ff168d65c 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -1,6 +1,6 @@ { "name": "@google-apps/chat", - "version": "0.19.1", + "version": "0.21.0", "description": "Google Chat API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-chat/protos/google/apps/card/v1/card.proto b/packages/google-chat/protos/google/apps/card/v1/card.proto index cbeda8e6e7eb..f70c68c2910c 100644 --- a/packages/google-chat/protos/google/apps/card/v1/card.proto +++ b/packages/google-chat/protos/google/apps/card/v1/card.proto @@ -27,7 +27,7 @@ option php_namespace = "Google\\Apps\\Card\\V1"; option ruby_package = "Google::Apps::Card::V1"; // A card interface displayed in a Google Chat message or Google Workspace -// Add-on. +// add-on. // // Cards support a defined layout, interactive UI elements like buttons, and // rich media like images. Use cards to present detailed information, @@ -40,9 +40,13 @@ option ruby_package = "Google::Apps::Card::V1"; // // * For Google Chat apps, see [Design the components of a card or // dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). -// * For Google Workspace Add-ons, see [Card-based +// * For Google Workspace add-ons, see [Card-based // interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). // +// Note: You can add up to 100 widgets per card. Any widgets beyond this +// limit are ignored. This limit applies to both card messages and dialogs +// in Google Chat apps, and to cards in Google Workspace add-ons. +// // **Example: Card message for a Google Chat app** // // ![Example contact @@ -134,7 +138,7 @@ message Card { // Represents a card header. For an example in Google Chat apps, see [Add a // header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message CardHeader { // Required. The title of the card header. @@ -149,7 +153,7 @@ message Card { // The shape used to crop the image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): Widget.ImageType image_type = 3; @@ -163,7 +167,7 @@ message Card { // A section contains a collection of widgets that are rendered // vertically in the order that they're specified. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Section { // Text that appears at the top of a section. @@ -174,7 +178,7 @@ message Card { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). string header = 1; // All the widgets in the section. @@ -200,21 +204,27 @@ message Card { // by default. The `uncollapsibleWidgetsCount` is taken into account only // when `collapsible` is `true`. int32 uncollapsible_widgets_count = 6; + + // Optional. Define the expand and collapse button of the section. + // This button will be shown only if the section is collapsible. + // If this field isn't set, the default button is used. + CollapseControl collapse_control = 8; } // The divider style of a card. Currently only used for dividers betweens card // sections. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum DividerStyle { // Don't use. Unspecified. DIVIDER_STYLE_UNSPECIFIED = 0; - // Default option. Render a solid divider between sections. + // Default option. Render a solid divider. SOLID_DIVIDER = 1; - // If set, no divider is rendered between sections. + // If set, no divider is rendered. This style completely removes the divider + // from the layout. The result is equivalent to not adding a divider at all. NO_DIVIDER = 2; } @@ -223,7 +233,7 @@ message Card { // invoice, or open the invoice in a browser. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): message CardAction { // The label that displays as the action menu item. string action_label = 1; @@ -232,6 +242,22 @@ message Card { OnClick on_click = 2; } + // A list of widgets that can be displayed in a containing layout, such + // as a `CarouselCard`. + // [Google Chat apps](https://developers.google.com/workspace/chat): + message NestedWidget { + oneof data { + // A text paragraph widget. + TextParagraph text_paragraph = 1; + + // A button list widget. + ButtonList button_list = 3; + + // An image widget. + Image image = 10; + } + } + // A persistent (sticky) footer that that appears at the bottom of the card. // // Setting `fixedFooter` without specifying a `primaryButton` or a @@ -244,7 +270,7 @@ message Card { // For an example in Google Chat apps, see [Add a persistent // footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message CardFixedFooter { // The primary button of the fixed footer. The button must be a text button @@ -257,11 +283,11 @@ message Card { Button secondary_button = 2; } - // In Google Workspace Add-ons, + // In Google Workspace add-ons, // determines how a card is displayed. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum DisplayStyle { // Don't use. Unspecified. DISPLAY_STYLE_UNSPECIFIED = 0; @@ -287,13 +313,13 @@ message Card { // card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). repeated Section sections = 2; - // The divider style between sections. + // The divider style between the header, sections and footer. DividerStyle section_divider_style = 9; // The card's actions. Actions are added to the card's toolbar menu. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): // // For example, the following JSON constructs a card action menu with // `Settings` and `Send Feedback` options: @@ -330,7 +356,7 @@ message Card { // Name of the card. Used as a card identifier in card navigation. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): string name = 4; // The fixed footer shown at the bottom of this card. @@ -342,15 +368,15 @@ message Card { // [card // messages](https://developers.google.com/workspace/chat/create-messages#create). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): CardFixedFooter fixed_footer = 5; - // In Google Workspace Add-ons, sets the display properties of the + // In Google Workspace add-ons, sets the display properties of the // `peekCardHeader`. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): DisplayStyle display_style = 6; // When displaying contextual content, the peek card header acts as a @@ -358,7 +384,7 @@ message Card { // cards and the contextual cards. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): CardHeader peek_card_header = 7; } @@ -369,7 +395,7 @@ message Card { message Widget { // The shape used to crop the image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum ImageType { // Default value. Applies a square mask to the image. For example, a 4x3 @@ -402,6 +428,21 @@ message Widget { END = 3; } + // Represents vertical alignment attribute. + enum VerticalAlignment { + // Unspecified type. Do not use. + VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + + // Alignment to the top position. + TOP = 1; + + // Alignment to the middle position. + MIDDLE = 2; + + // Alignment to the bottom position. + BOTTOM = 3; + } + // A widget can only have one of the following items. You can use multiple // widget fields to display more items. oneof data { @@ -412,7 +453,7 @@ message Widget { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). // // For example, the following JSON creates a bolded text: // ``` @@ -470,7 +511,6 @@ message Widget { // "red": 0, // "green": 0, // "blue": 1, - // "alpha": 1 // }, // "disabled": true, // }, @@ -576,7 +616,7 @@ message Widget { // "name": "appointment_time", // "label": "Book your appointment at:", // "type": "DATE_AND_TIME", - // "valueMsEpoch": "796435200000" + // "valueMsEpoch": 796435200000 // } // ``` DateTimePicker date_time_picker = 7; @@ -597,7 +637,7 @@ message Widget { // of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 // items and 2 columns has 6 rows. // - // [Google Workspace Add-ons and + // [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a 2 column grid with a single @@ -673,6 +713,56 @@ message Widget { // } // ``` Columns columns = 11; + + // A carousel contains a collection of nested widgets. + // For example, this is a JSON representation of a carousel that contains + // two text paragraphs. + // + // ``` + // { + // "widgets": [ + // { + // "textParagraph": { + // "text": "First text paragraph in the carousel." + // } + // }, + // { + // "textParagraph": { + // "text": "Second text paragraph in the carousel." + // } + // } + // ] + // } + // ``` + Carousel carousel = 13; + + // A list of chips. + // + // For example, the following JSON creates two chips. The first + // is a text chip and the second is an icon chip that opens a + // link: + // ``` + // "chipList": { + // "chips": [ + // { + // "text": "Edit", + // "disabled": true, + // }, + // { + // "icon": { + // "knownIcon": "INVITE", + // "altText": "check calendar" + // }, + // "onClick": { + // "openLink": { + // "url": "https://example.com/calendar" + // } + // } + // } + // ] + // } + // ``` + ChipList chip_list = 14; } // Specifies whether widgets align to the left, right, or center of a column. @@ -689,20 +779,49 @@ message Widget { // and // [Formatting // text in Google Workspace -// Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). +// add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). // -// [Google Workspace Add-ons and +// [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): message TextParagraph { + // Syntax to use for formatting text. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + enum TextSyntax { + // The text is rendered as HTML if unspecified. + TEXT_SYNTAX_UNSPECIFIED = 0; + + // The text is rendered as HTML. This is the default value. + HTML = 1; + + // The text is rendered as Markdown. + MARKDOWN = 2; + } + // The text that's shown in the widget. string text = 1; + + // The maximum number of lines of text that are displayed in the widget. If + // the text exceeds the specified maximum number of lines, the excess + // content is concealed behind a **show more** button. If the text is equal or + // shorter than the specified maximum number of lines, a **show more** button + // isn't displayed. + // + // The default value is 0, in which case + // all context is displayed. Negative values are ignored. + int32 max_lines = 2; + + // The syntax of the text. If not set, the text is rendered as HTML. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextSyntax text_syntax = 4; } // An image that is specified by a URL and can have an `onClick` action. For an // example, see [Add an // image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Image { // The HTTPS URL that hosts the image. @@ -726,7 +845,7 @@ message Image { // [Add a horizontal divider between // widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a divider: @@ -742,19 +861,19 @@ message Divider {} // Google Chat apps, see [Display text with decorative // text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message DecoratedText { // Either a toggle-style switch or a checkbox inside a `decoratedText` widget. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // Only supported in the `decoratedText` widget. message SwitchControl { // How the switch appears in the user interface. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum ControlType { // A toggle-style switch. @@ -788,7 +907,7 @@ message DecoratedText { // How the switch appears in the user interface. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): ControlType control_type = 5; } @@ -799,9 +918,21 @@ message DecoratedText { // The icon displayed in front of the text. Icon start_icon = 12; + // Optional. Vertical alignment of the start icon. If not set, the icon + // will be vertically centered. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + Widget.VerticalAlignment start_icon_vertical_alignment = 13; + // The text that appears above `text`. Always truncates. string top_label = 3; + // `TextParagraph` equivalent of `top_label`. Always truncates. Allows for + // more complex formatting than `top_label`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph top_label_text = 17; + // Required. The primary text. // // Supports simple formatting. For more information @@ -811,9 +942,15 @@ message DecoratedText { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). string text = 4; + // `TextParagraph` equivalent of `text`. Allows for more complex formatting + // than `text`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph content_text = 18; + // The wrap text setting. If `true`, the text wraps and displays on // multiple lines. Otherwise, the text is truncated. // @@ -823,6 +960,12 @@ message DecoratedText { // The text that appears below `text`. Always wraps. string bottom_label = 6; + // `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for + // more complex formatting than `bottom_label`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph bottom_label_text = 19; + // This action is triggered when users click `topLabel` or `bottomLabel`. OnClick on_click = 7; @@ -848,8 +991,11 @@ message DecoratedText { } // A field in which users can enter text. Supports suggestions and on-change -// actions. For an example in Google Chat apps, see [Add a field in which a user -// can enter +// actions. +// Supports form submission validation. When `Action.all_widgets_are_required` +// is set to `true` or this widget is specified in `Action.required_widgets`, +// the submission action is blocked unless a value is entered. For an example in +// Google Chat apps, see [Add a field in which a user can enter // text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). // // Chat apps receive and can process the value of entered text during form input @@ -860,7 +1006,7 @@ message DecoratedText { // use a text input. To collect defined or enumerated data from users, use the // [SelectionInput][google.apps.card.v1.SelectionInput] widget. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message TextInput { // How a text input field appears in the user interface. For example, @@ -868,7 +1014,7 @@ message TextInput { // `initialSuggestions` is specified, `type` is always `SINGLE_LINE`, // even if it's set to `MULTIPLE_LINE`. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum Type { // The text input field has a fixed height of one line. @@ -934,7 +1080,7 @@ message TextInput { // to `MULTIPLE_LINE`. // // [Google Workspace - // Add-ons and Chat apps](https://developers.google.com/workspace/extend): + // add-ons and Chat apps](https://developers.google.com/workspace/extend): Suggestions initial_suggestions = 7; // Optional. Specify what action to take when the text input field provides @@ -947,9 +1093,15 @@ message TextInput { // a custom function. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Action auto_complete_action = 8; + // Specify the input format validation necessary for this text field. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + Validation validation = 11; + // Text that appears in the text input field when the field is empty. // Use this text to prompt users to enter a value. For example, `Enter a // number from 0 to 100`. @@ -975,11 +1127,11 @@ message TextInput { // to `MULTIPLE_LINE`. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message Suggestions { // One suggested value that users can enter in a text input field. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message SuggestionItem { oneof content { @@ -999,7 +1151,7 @@ message Suggestions { // [Add a // button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ButtonList { // An array of buttons. @@ -1007,9 +1159,12 @@ message ButtonList { } // A widget that creates one or more UI items that users can select. -// For example, a dropdown menu or checkboxes. You can use this widget to -// collect data that can be predicted or enumerated. For an example in Google -// Chat apps, see [Add selectable UI +// Supports form submission validation for `dropdown` and `multiselect` menus +// only. When `Action.all_widgets_are_required` is set to `true` or this widget +// is specified in `Action.required_widgets`, the submission action is blocked +// unless a value is selected. For example, a dropdown menu or checkboxes. You +// can use this widget to collect data that can be predicted or enumerated. For +// an example in Google Chat apps, see [Add selectable UI // elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). // // Chat apps can process the value of items that users select or input. For @@ -1019,7 +1174,7 @@ message ButtonList { // To collect undefined or abstract data from users, use // the [TextInput][google.apps.card.v1.TextInput] widget. // -// [Google Workspace Add-ons +// [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): message SelectionInput { // The format for the items that users can select. Different options support @@ -1029,7 +1184,7 @@ message SelectionInput { // Each selection input supports one type of selection. Mixing checkboxes // and switches, for example, isn't supported. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum SelectionType { // A set of checkboxes. Users can select one or more checkboxes. @@ -1044,36 +1199,34 @@ message SelectionInput { // A dropdown menu. Users can select one item from the menu. DROPDOWN = 3; - // A multiselect menu for static or dynamic data. From the menu bar, - // users select one or more items. Users can also input values to populate - // dynamic data. For example, users can start typing the name of a Google - // Chat space and the widget autosuggests the space. + // A menu with a text box. Users can type and select one or more items. + // For Google Workspace add-ons, you must populate items using a static + // array of `SelectionItem` objects. // - // To populate items for a multiselect menu, you can use one of the - // following types of data sources: + // For Google Chat apps, you can also populate items using a dynamic data + // source and autosuggest items as users type in the menu. For example, + // users can start typing the name of a Google Chat space and the widget + // autosuggests the space. To dynamically populate items for a multiselect + // menu, use one of the following types of data sources: // - // * Static data: Items are specified as `SelectionItem` objects in the - // widget. Up to 100 items. // * Google Workspace data: Items are populated using data from Google // Workspace, such as Google Workspace users or Google Chat spaces. // * External data: Items are populated from an external data // source outside of Google Workspace. // - // For examples of how to implement multiselect menus, see + // For examples of how to implement multiselect menus for Chat apps, see // [Add a multiselect // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): - // Multiselect for Google Workspace Add-ons are in - // Developer Preview. MULTI_SELECT = 4; } // An item that users can select in a selection input, such as a checkbox - // or switch. + // or switch. Supports up to 100 items. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message SelectionItem { // The text that identifies or describes the item to users. @@ -1095,7 +1248,9 @@ message SelectionInput { // the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` // URL. For example, // `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - string start_icon_uri = 4; + oneof start_icon { + string start_icon_uri = 4; + } // For multiselect menus, a text description or label that's // displayed below the item's `text` field. @@ -1131,7 +1286,8 @@ message SelectionInput { } } - // The name that identifies the selection input in a form input event. + // Required. The name that identifies the selection input in a form input + // event. // // For details about working with form inputs, see [Receive form // data](https://developers.google.com/workspace/chat/read-form-data). @@ -1164,22 +1320,26 @@ message SelectionInput { // For multiselect menus, the maximum number of items that a user can select. // Minimum value is 1 item. If unspecified, defaults to 3 items. - int32 multi_select_max_selected_items = 6; + optional int32 multi_select_max_selected_items = 6; // For multiselect menus, the number of text characters that a user inputs - // before the app queries autocomplete and displays suggested items - // in the menu. + // before the menu returns suggested selection items. + // + // If unset, the multiselect menu uses the following default values: // - // If unspecified, defaults to 0 characters for static data sources and 3 - // characters for external data sources. + // * If the menu uses a static array of `SelectionInput` items, defaults to + // 0 characters and immediately populates items from the array. + // * If the menu uses a dynamic data source (`multi_select_data_source`), + // defaults to 3 characters before querying the data source to return + // suggested items. int32 multi_select_min_query_length = 7; - // For a multiselect menu, the data source that populates + // For a multiselect menu, a data source that dynamically populates // selection items. // // [Google Chat apps](https://developers.google.com/workspace/chat): oneof multi_select_data_source { - // An external data source, such as a relational data base. + // An external data source, such as a relational database. Action external_data_source = 8; // A data source from Google Workspace. @@ -1187,8 +1347,11 @@ message SelectionInput { } } -// Lets users input a date, a time, or both a date and a time. For an example in -// Google Chat apps, see [Let a user pick a date and +// Lets users input a date, a time, or both a date and a time. +// Supports form submission validation. When `Action.all_widgets_are_required` +// is set to `true` or this widget is specified in `Action.required_widgets`, +// the submission action is blocked unless a value is selected. For an example +// in Google Chat apps, see [Let a user pick a date and // time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). // // Users can input text or use the picker to select dates and times. If users @@ -1196,12 +1359,12 @@ message SelectionInput { // to input the information correctly. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message DateTimePicker { // The format for the date and time in the `DateTimePicker` widget. // Determines whether users can input a date, a time, or both a date and time. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum DateTimePickerType { // Users input a date and time. @@ -1228,8 +1391,8 @@ message DateTimePicker { // Whether the widget supports inputting a date, a time, or the date and time. DateTimePickerType type = 3; - // The default value displayed in the widget, in milliseconds since [Unix - // epoch time](https://en.wikipedia.org/wiki/Unix_time). + // Optional. The default value displayed in the widget, in milliseconds since + // [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). // // Specify the value based on the type of picker (`DateTimePickerType`): // @@ -1239,7 +1402,7 @@ message DateTimePicker { // January 1, 2023, use `1672531200000`. // * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use // `43200000` (or `12 * 60 * 60 * 1000`). - int64 value_ms_epoch = 4; + optional int64 value_ms_epoch = 4; // The number representing the time zone offset from UTC, in minutes. // If set, the `value_ms_epoch` is displayed in the specified time zone. @@ -1251,6 +1414,40 @@ message DateTimePicker { Action on_change_action = 6; } +// A widget that presents a pop-up menu with one or more actions that users can +// invoke. For example, showing non-primary actions in a card. You can use this +// widget when actions don't fit in the available space. To use, specify this +// widget in the `OnClick` action of widgets that support it. For example, in a +// `Button`. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message OverflowMenu { + // An option that users can invoke in an overflow menu. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + message OverflowMenuItem { + // The icon displayed in front of the text. + Icon start_icon = 1; + + // Required. The text that identifies or describes the item to users. + string text = 2; + + // Required. The action invoked when a menu option is selected. + // This `OnClick` cannot contain an `OverflowMenu`, any specified + // `OverflowMenu` is dropped and the menu item disabled. + OnClick on_click = 3; + + // Whether the menu option is disabled. + // Defaults to false. + bool disabled = 4; + } + + // Required. The list of menu options. + repeated OverflowMenuItem items = 1; +} + // A text, icon, or text and icon button that users can click. For an example in // Google Chat apps, see // [Add a @@ -1262,47 +1459,68 @@ message DateTimePicker { // `onClick` action. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message Button { + // Optional. The + // [type](https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05) + // of a button. If `color` field is set, the `type` is forced to `FILLED`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + enum Type { + // Don't use. Unspecified. + TYPE_UNSPECIFIED = 0; + + // Outlined buttons are medium-emphasis buttons. They usually contain + // actions that are important, but aren’t the primary action in a Chat app + // or an add-on. + OUTLINED = 1; + + // A filled button has a container with a solid color. It has the most + // visual impact and is recommended for the important and primary action in + // a Chat app or an add-on. + FILLED = 2; + + // A filled tonal button is an alternative middle ground between filled and + // outlined buttons. They’re useful in contexts where a lower-priority + // button requires slightly more emphasis than an outline button would give. + FILLED_TONAL = 3; + + // A button does not have an invisible container in its default state. It is + // often used for the lowest priority actions, especially when presenting + // multiple options. + BORDERLESS = 4; + } + // The text displayed inside the button. string text = 1; - // The icon image. If both `icon` and `text` are set, then the icon appears - // before the text. + // An icon displayed inside the button. If both `icon` and `text` are set, + // then the icon appears before the text. Icon icon = 2; - // If set, the button is filled with a solid background color and the font - // color changes to maintain contrast with the background color. For example, - // setting a blue background likely results in white text. - // - // If unset, the image background is white and the font color is blue. - // - // For red, green, and blue, the value of each field is a `float` number that - // you can express in either of two ways: as a number between 0 and 255 - // divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents - // the absence of a color and 1 or 255/255 represent the full presence of that - // color on the RGB scale. + // Optional. The color of the button. If set, the button `type` is set to + // `FILLED` and the color of `text` and `icon` fields are set to a + // contrasting color for readability. For example, if the button color is + // set to blue, any text or icons in the button are set to white. // - // Optionally set `alpha`, which sets a level of transparency using this - // equation: - // - // ``` - // pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - // ``` - // - // For `alpha`, a value of `1` corresponds with a solid color, and a value of - // `0` corresponds with a completely transparent color. + // To set the button color, specify a value for the `red`, `green`, and `blue` + // fields. + // The value must be a float number between 0 and 1 based on the RGB color + // value, where `0` (0/255) represents the absence of color and `1` (255/255) + // represents the maximum intensity of the color. // - // For example, the following color represents a half transparent red: + // For example, the following sets the color to red at its maximum intensity: // // ``` // "color": { // "red": 1, // "green": 0, // "blue": 0, - // "alpha": 0.5 // } // ``` + // + // The `alpha` field is unavailable for button color. If specified, this field + // is ignored. google.type.Color color = 3; // Required. The action to perform when a user clicks the button, such as @@ -1320,6 +1538,11 @@ message Button { // browser tab and navigates to the Google Chat developer documentation at // https://developers.google.com/workspace/chat". string alt_text = 6; + + // Optional. The type of a button. If unset, button type defaults to + // `OUTLINED`. If the `color` field is set, the button type is forced to + // `FILLED` and any value set for this field is ignored. + Type type = 7; } // An icon displayed in a widget on a card. For an example in Google Chat apps, @@ -1332,7 +1555,7 @@ message Button { // [custom](https://developers.google.com/workspace/chat/format-messages#customicons) // icons. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Icon { // The icon displayed in the widget on the card. @@ -1445,7 +1668,7 @@ message MaterialIcon { // Represents the crop style applied to an image. // -// [Google Workspace Add-ons and +// [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): // // For example, here's how to apply a 16:9 aspect ratio: @@ -1459,7 +1682,7 @@ message MaterialIcon { message ImageCropStyle { // Represents the crop style applied to an image. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum ImageCropType { // Don't use. Unspecified. @@ -1498,21 +1721,21 @@ message ImageCropStyle { // The style options for the border of a card or widget, including the border // type and color. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message BorderStyle { // Represents the border types applied to widgets. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum BorderType { // Don't use. Unspecified. BORDER_TYPE_UNSPECIFIED = 0; - // Default value. No border. + // No border. NO_BORDER = 1; - // Outline. + // Default value. Outline. STROKE = 2; } @@ -1520,6 +1743,25 @@ message BorderStyle { BorderType type = 1; // The colors to use when the type is `BORDER_TYPE_STROKE`. + // + // To set the stroke color, specify a value for the `red`, `green`, and `blue` + // fields. + // The value must be a float number between 0 and 1 based on the RGB color + // value, where `0` (0/255) represents the absence of color and `1` (255/255) + // represents the maximum intensity of the color. + // + // For example, the following sets the color to red at its maximum intensity: + // + // ``` + // "color": { + // "red": 1, + // "green": 0, + // "blue": 0, + // } + // ``` + // + // The `alpha` field is unavailable for stroke color. If specified, this field + // is ignored. google.type.Color stroke_color = 2; // The corner radius for the border. @@ -1528,7 +1770,7 @@ message BorderStyle { // Represents an image. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ImageComponent { // The image URL. @@ -1555,7 +1797,7 @@ message ImageComponent { // 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns // has 6 rows. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a 2 column grid with a single @@ -1595,12 +1837,12 @@ message Grid { // Represents an item in a grid layout. Items can contain text, an image, or // both text and an image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message GridItem { // Represents the various layout options available for a grid item. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum GridItemLayout { // Don't use. Unspecified. @@ -1673,29 +1915,28 @@ message Grid { // * On Android devices, the second column wraps if the screen width is // less than or equal to 320 dp. // -// To include more than 2 columns, or to use rows, use the +// To include more than two columns, or to use rows, use the // [`Grid`][google.apps.card.v1.Grid] widget. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): -// Columns for Google Workspace Add-ons are in -// Developer Preview. +// The add-on UIs that support columns include: +// +// * The dialog displayed when users open the add-on from an email draft. +// * The dialog displayed when users open the add-on from the +// **Add attachment** menu in a Google Calendar event. message Columns { // A column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) message Column { // Specifies how a column fills the width of the card. The width of each // column depends on both the `HorizontalSizeStyle` and the width of the // widgets within the column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) enum HorizontalSizeStyle { // Don't use. Unspecified. HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; @@ -1713,10 +1954,8 @@ message Columns { // Specifies whether widgets align to the top, bottom, or center of a // column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) enum VerticalAlignment { // Don't use. Unspecified. VERTICAL_ALIGNMENT_UNSPECIFIED = 0; @@ -1733,10 +1972,8 @@ message Columns { // The supported widgets that you can include in a column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) message Widgets { oneof data { // [TextParagraph][google.apps.card.v1.TextParagraph] widget. @@ -1759,6 +1996,9 @@ message Columns { // [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. DateTimePicker date_time_picker = 7; + + // [ChipList][google.apps.card.v1.ChipList] widget. + ChipList chip_list = 8; } } @@ -1782,10 +2022,89 @@ message Columns { repeated Column column_items = 2; } +// A carousel, also known as a slider, rotates and displays a list of widgets in +// a slideshow format, with buttons navigating to the previous or next widget. +// +// For example, this is a JSON representation of a carousel that contains three +// text paragraph widgets. +// +// ``` +// { +// "carouselCards": [ +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "First text paragraph in carousel", +// } +// } +// ] +// }, +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "Second text paragraph in carousel", +// } +// } +// ] +// }, +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "Third text paragraph in carousel", +// } +// } +// ] +// } +// ] +// } +// ``` +// +// [Google Chat apps](https://developers.google.com/workspace/chat): +message Carousel { + // A card that can be displayed as a carousel item. + // [Google Chat apps](https://developers.google.com/workspace/chat): + message CarouselCard { + // A list of widgets displayed in the carousel card. The widgets are + // displayed in the order that they are specified. + repeated Card.NestedWidget widgets = 1; + + // A list of widgets displayed at the bottom of the carousel card. The + // widgets are displayed in the order that they are specified. + repeated Card.NestedWidget footer_widgets = 2; + } + + // A list of cards included in the carousel. + repeated CarouselCard carousel_cards = 4; +} + +// Represent an expand and collapse control. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message CollapseControl { + // The horizontal alignment of the expand and collapse button. + Widget.HorizontalAlignment horizontal_alignment = 1; + + // Optional. Define a customizable button to expand the section. + // Both expand_button and collapse_button field must be set. Only one + // field set will not take into effect. + // If this field isn't set, the default button is used. + Button expand_button = 2; + + // Optional. Define a customizable button to collapse the section. + // Both expand_button and collapse_button field must be set. Only one + // field set will not take into effect. + // If this field isn't set, the default button is used. + Button collapse_button = 3; +} + // Represents how to respond when users click an interactive element on // a card, such as a button. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message OnClick { oneof data { @@ -1801,20 +2120,23 @@ message OnClick { // web client to do before the open link action response comes back. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Action open_dynamic_link_action = 3; // A new card is pushed to the card stack after clicking if specified. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Card card = 4; + + // If specified, this `onClick` opens an overflow menu. + OverflowMenu overflow_menu = 8; } } // Represents an `onClick` event that opens a hyperlink. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message OpenLink { // When an `OnClick` action opens a link, then the client can either open it @@ -1824,7 +2146,7 @@ message OpenLink { // client doesn't support it. `FULL_SIZE` is supported by all clients. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum OpenAs { // The link opens as a full-size window (if that's the frame used by the // client). @@ -1843,7 +2165,7 @@ message OpenLink { // can't support both values, `OnClose` takes precedence. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum OnClose { // Default value. The card doesn't reload; nothing happens. NOTHING = 0; @@ -1863,14 +2185,14 @@ message OpenLink { // How to open a link. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): OpenAs open_as = 2; // Whether the client forgets about a link after opening it, or observes it // until the window closes. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): OnClose on_close = 3; } @@ -1878,7 +2200,7 @@ message OpenLink { // For example, you can invoke an Apps Script script to handle the form. // If the action is triggered, the form values are sent to the server. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Action { // List of string parameters to supply when the action method is invoked. @@ -1889,7 +2211,7 @@ message Action { // To learn more, see // [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ActionParameter { // The name of the parameter for the action script. @@ -1902,7 +2224,7 @@ message Action { // Specifies the loading indicator that the action displays while // making the call to the action. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum LoadIndicator { // Displays a spinner to indicate that content is loading. @@ -1946,7 +2268,7 @@ message Action { } // A custom function to invoke when the containing element is - // clicked or othrwise activated. + // clicked or otherwise activated. // // For example usage, see [Read form // data](https://developers.google.com/workspace/chat/read-form-data). @@ -1997,4 +2319,121 @@ message Action { // // [Google Chat apps](https://developers.google.com/workspace/chat): Interaction interaction = 5; + + // Optional. Fill this list with the names of widgets that this Action + // needs for a valid submission. + // + // If the widgets listed here don't have a value when this Action is invoked, + // the form submission is aborted. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + repeated string required_widgets = 6; + + // Optional. If this is true, then all widgets are considered required by + // this action. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + bool all_widgets_are_required = 7; +} + +// Represents the necessary data for validating the widget it's attached to. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message Validation { + // The type of the input widget. + enum InputType { + // Unspecified type. Do not use. + INPUT_TYPE_UNSPECIFIED = 0; + + // Regular text that accepts all characters. + TEXT = 1; + + // An integer value. + INTEGER = 2; + + // A float value. + FLOAT = 3; + + // An email address. + EMAIL = 4; + + // A emoji selected from system-provided emoji picker. + EMOJI_PICKER = 5; + } + + // Specify the character limit for text input widgets. Note that this is + // only used for text input and is ignored for other widgets. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + int32 character_limit = 1; + + // Specify the type of the input widgets. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + InputType input_type = 2; +} + +// A list of chips layed out horizontally, which can either scroll horizontally +// or wrap to the next line. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message ChipList { + // The chip list layout. + enum Layout { + // Don't use. Unspecified. + LAYOUT_UNSPECIFIED = 0; + + // Default value. The chip list wraps to the next line if there isn't enough + // horizontal space. + WRAPPED = 1; + + // The chips scroll horizontally if they don't fit in the available space. + HORIZONTAL_SCROLLABLE = 2; + } + + // Specified chip list layout. + Layout layout = 1; + + // An array of chips. + repeated Chip chips = 2; +} + +// A text, icon, or text and icon chip that users can click. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message Chip { + // The icon image. If both `icon` and `text` are set, then the icon appears + // before the text. + Icon icon = 1; + + // The text displayed inside the chip. + string label = 2; + + // Optional. The action to perform when a user clicks the chip, such as + // opening a hyperlink or running a custom function. + OnClick on_click = 3; + + // Whether the chip is in an active state and responds to user actions. + // Defaults to `true`. + // Deprecated. Use `disabled` instead. + bool enabled = 4 [deprecated = true]; + + // Whether the chip is in an inactive state and ignores user actions. + // Defaults to `false`. + bool disabled = 6; + + // The alternative text that's used for accessibility. + // + // Set descriptive text that lets users know what the chip does. For + // example, if a chip opens a hyperlink, write: "Opens a new + // browser tab and navigates to the Google Chat developer documentation at + // https://developers.google.com/workspace/chat". + string alt_text = 5; } diff --git a/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto b/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto index a45b7fb2b4c5..5008e7569352 100644 --- a/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto +++ b/packages/google-chat/protos/google/chat/v1/deletion_metadata.proto @@ -39,7 +39,7 @@ message DeletionMetadata { // User deleted their own message. CREATOR = 1; - // A space manager deleted the message. + // An owner or manager deleted the message. SPACE_OWNER = 2; // A Google Workspace administrator deleted the message. Administrators can diff --git a/packages/google-chat/protos/google/chat/v1/membership.proto b/packages/google-chat/protos/google/chat/v1/membership.proto index 2981658cac89..8b4ba4c7d347 100644 --- a/packages/google-chat/protos/google/chat/v1/membership.proto +++ b/packages/google-chat/protos/google/chat/v1/membership.proto @@ -66,16 +66,66 @@ message Membership { // assigned this role (other enum values might be used in the future). MEMBERSHIP_ROLE_UNSPECIFIED = 0; - // A member of the space. The user has basic permissions, like sending - // messages to the space. In 1:1 and unnamed group conversations, everyone + // A member of the space. In the Chat UI, this role is called Member. + // + // The user has basic permissions, like sending + // messages to the space. + // Managers and owners can grant members additional permissions in a space, + // including: + // + // - Add or remove members. + // - Modify space details. + // - Turn history on or off. + // - Mention everyone in the space with `@all`. + // - Manage Chat apps and webhooks installed in the space. + // + // In direct messages and unnamed group conversations, everyone // has this role. ROLE_MEMBER = 1; - // A space manager. The user has all basic permissions plus administrative - // permissions that let them manage the space, like adding or removing - // members. Only supported in - // [SpaceType.SPACE][google.chat.v1.Space.SpaceType]. + // A space owner. In the Chat UI, this role is called Owner. + // + // The user has the complete set of space permissions to manage the space, + // including: + // + // - Change the role of other members in the space to member, manager, or + // owner. + // - Delete the space. + // + // Only supported in + // [SpaceType.SPACE][google.chat.v1.Space.SpaceType] (named spaces). + // + // To learn more, see + // [Learn more about your role as a space + // owner or manager](https://support.google.com/chat/answer/11833441). ROLE_MANAGER = 2; + + // A space manager. In the Chat UI, this role is called Manager. + // + // The user has all basic permissions of `ROLE_MEMBER`, + // and can be granted a subset of administrative permissions by an owner. + // By default, managers have all the permissions of an owner except for the + // ability to: + // + // - Delete the space. + // - Make another space member an owner. + // - Change an owner's role. + // + // By default, managers permissions include but aren't limited to: + // + // - Make another member a manager. + // - Delete messages in the space. + // - Manage space permissions. + // - Receive notifications for requests to join the space if the manager + // has the "manage members" permission in the space settings. + // - Make a space discoverable. + // + // Only supported in + // [SpaceType.SPACE][google.chat.v1.Space.SpaceType] (named spaces). + // + // To learn more, see + // [Manage space settings](https://support.google.com/chat/answer/13340792). + ROLE_ASSISTANT_MANAGER = 4; } // Identifier. Resource name of the membership, assigned by the server. diff --git a/packages/google-chat/protos/google/chat/v1/space.proto b/packages/google-chat/protos/google/chat/v1/space.proto index 03b533391a48..a2d010d58c06 100644 --- a/packages/google-chat/protos/google/chat/v1/space.proto +++ b/packages/google-chat/protos/google/chat/v1/space.proto @@ -232,10 +232,20 @@ message Space { // Represents a space permission setting. message PermissionSetting { - // Optional. Whether spaces managers have this permission. + // Optional. Whether space owners + // ([`ROLE_MANAGER`][google.chat.v1.Membership.MembershipRole.ROLE_MANAGER]) + // have this permission. bool managers_allowed = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Whether non-manager members have this permission. + // Optional. Whether space managers + // [`ROLE_ASSISTANT_MANAGER`][google.chat.v1.Membership.MembershipRole.ROLE_ASSISTANT_MANAGER]) + // have this permission. + optional bool assistant_managers_allowed = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether basic space members + // ([`ROLE_MEMBER`][google.chat.v1.Membership.MembershipRole.ROLE_MEMBER]) + // have this permission. bool members_allowed = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-chat/protos/protos.d.ts b/packages/google-chat/protos/protos.d.ts index 0217e42a14e0..89113cf64a04 100644 --- a/packages/google-chat/protos/protos.d.ts +++ b/packages/google-chat/protos/protos.d.ts @@ -5681,6 +5681,9 @@ export namespace google { /** Section uncollapsibleWidgetsCount */ uncollapsibleWidgetsCount?: (number|null); + + /** Section collapseControl */ + collapseControl?: (google.apps.card.v1.ICollapseControl|null); } /** Represents a Section. */ @@ -5704,6 +5707,9 @@ export namespace google { /** Section uncollapsibleWidgetsCount. */ public uncollapsibleWidgetsCount: number; + /** Section collapseControl. */ + public collapseControl?: (google.apps.card.v1.ICollapseControl|null); + /** * Creates a new Section instance using the specified properties. * @param [properties] Properties to set @@ -5892,6 +5898,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a NestedWidget. */ + interface INestedWidget { + + /** NestedWidget textParagraph */ + textParagraph?: (google.apps.card.v1.ITextParagraph|null); + + /** NestedWidget buttonList */ + buttonList?: (google.apps.card.v1.IButtonList|null); + + /** NestedWidget image */ + image?: (google.apps.card.v1.IImage|null); + } + + /** Represents a NestedWidget. */ + class NestedWidget implements INestedWidget { + + /** + * Constructs a new NestedWidget. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.Card.INestedWidget); + + /** NestedWidget textParagraph. */ + public textParagraph?: (google.apps.card.v1.ITextParagraph|null); + + /** NestedWidget buttonList. */ + public buttonList?: (google.apps.card.v1.IButtonList|null); + + /** NestedWidget image. */ + public image?: (google.apps.card.v1.IImage|null); + + /** NestedWidget data. */ + public data?: ("textParagraph"|"buttonList"|"image"); + + /** + * Creates a new NestedWidget instance using the specified properties. + * @param [properties] Properties to set + * @returns NestedWidget instance + */ + public static create(properties?: google.apps.card.v1.Card.INestedWidget): google.apps.card.v1.Card.NestedWidget; + + /** + * Encodes the specified NestedWidget message. Does not implicitly {@link google.apps.card.v1.Card.NestedWidget.verify|verify} messages. + * @param message NestedWidget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.Card.INestedWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NestedWidget message, length delimited. Does not implicitly {@link google.apps.card.v1.Card.NestedWidget.verify|verify} messages. + * @param message NestedWidget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.Card.INestedWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NestedWidget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NestedWidget + * @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.apps.card.v1.Card.NestedWidget; + + /** + * Decodes a NestedWidget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NestedWidget + * @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.apps.card.v1.Card.NestedWidget; + + /** + * Verifies a NestedWidget 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 NestedWidget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NestedWidget + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.Card.NestedWidget; + + /** + * Creates a plain object from a NestedWidget message. Also converts values to other types if specified. + * @param message NestedWidget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.Card.NestedWidget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NestedWidget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NestedWidget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CardFixedFooter. */ interface ICardFixedFooter { @@ -6036,6 +6154,12 @@ export namespace google { /** Widget columns */ columns?: (google.apps.card.v1.IColumns|null); + /** Widget carousel */ + carousel?: (google.apps.card.v1.ICarousel|null); + + /** Widget chipList */ + chipList?: (google.apps.card.v1.IChipList|null); + /** Widget horizontalAlignment */ horizontalAlignment?: (google.apps.card.v1.Widget.HorizontalAlignment|keyof typeof google.apps.card.v1.Widget.HorizontalAlignment|null); } @@ -6079,11 +6203,17 @@ export namespace google { /** Widget columns. */ public columns?: (google.apps.card.v1.IColumns|null); + /** Widget carousel. */ + public carousel?: (google.apps.card.v1.ICarousel|null); + + /** Widget chipList. */ + public chipList?: (google.apps.card.v1.IChipList|null); + /** Widget horizontalAlignment. */ public horizontalAlignment: (google.apps.card.v1.Widget.HorizontalAlignment|keyof typeof google.apps.card.v1.Widget.HorizontalAlignment); /** Widget data. */ - public data?: ("textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"divider"|"grid"|"columns"); + public data?: ("textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"divider"|"grid"|"columns"|"carousel"|"chipList"); /** * Creates a new Widget instance using the specified properties. @@ -6178,6 +6308,14 @@ export namespace google { CENTER = 2, END = 3 } + + /** VerticalAlignment enum. */ + enum VerticalAlignment { + VERTICAL_ALIGNMENT_UNSPECIFIED = 0, + TOP = 1, + MIDDLE = 2, + BOTTOM = 3 + } } /** Properties of a TextParagraph. */ @@ -6185,6 +6323,12 @@ export namespace google { /** TextParagraph text */ text?: (string|null); + + /** TextParagraph maxLines */ + maxLines?: (number|null); + + /** TextParagraph textSyntax */ + textSyntax?: (google.apps.card.v1.TextParagraph.TextSyntax|keyof typeof google.apps.card.v1.TextParagraph.TextSyntax|null); } /** Represents a TextParagraph. */ @@ -6199,6 +6343,12 @@ export namespace google { /** TextParagraph text. */ public text: string; + /** TextParagraph maxLines. */ + public maxLines: number; + + /** TextParagraph textSyntax. */ + public textSyntax: (google.apps.card.v1.TextParagraph.TextSyntax|keyof typeof google.apps.card.v1.TextParagraph.TextSyntax); + /** * Creates a new TextParagraph instance using the specified properties. * @param [properties] Properties to set @@ -6277,6 +6427,16 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace TextParagraph { + + /** TextSyntax enum. */ + enum TextSyntax { + TEXT_SYNTAX_UNSPECIFIED = 0, + HTML = 1, + MARKDOWN = 2 + } + } + /** Properties of an Image. */ interface IImage { @@ -6486,18 +6646,30 @@ export namespace google { /** DecoratedText startIcon */ startIcon?: (google.apps.card.v1.IIcon|null); + /** DecoratedText startIconVerticalAlignment */ + startIconVerticalAlignment?: (google.apps.card.v1.Widget.VerticalAlignment|keyof typeof google.apps.card.v1.Widget.VerticalAlignment|null); + /** DecoratedText topLabel */ topLabel?: (string|null); + /** DecoratedText topLabelText */ + topLabelText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText text */ text?: (string|null); + /** DecoratedText contentText */ + contentText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText wrapText */ wrapText?: (boolean|null); /** DecoratedText bottomLabel */ bottomLabel?: (string|null); + /** DecoratedText bottomLabelText */ + bottomLabelText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText onClick */ onClick?: (google.apps.card.v1.IOnClick|null); @@ -6526,18 +6698,30 @@ export namespace google { /** DecoratedText startIcon. */ public startIcon?: (google.apps.card.v1.IIcon|null); + /** DecoratedText startIconVerticalAlignment. */ + public startIconVerticalAlignment: (google.apps.card.v1.Widget.VerticalAlignment|keyof typeof google.apps.card.v1.Widget.VerticalAlignment); + /** DecoratedText topLabel. */ public topLabel: string; + /** DecoratedText topLabelText. */ + public topLabelText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText text. */ public text: string; + /** DecoratedText contentText. */ + public contentText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText wrapText. */ public wrapText: boolean; /** DecoratedText bottomLabel. */ public bottomLabel: string; + /** DecoratedText bottomLabelText. */ + public bottomLabelText?: (google.apps.card.v1.ITextParagraph|null); + /** DecoratedText onClick. */ public onClick?: (google.apps.card.v1.IOnClick|null); @@ -6792,6 +6976,9 @@ export namespace google { /** TextInput autoCompleteAction */ autoCompleteAction?: (google.apps.card.v1.IAction|null); + /** TextInput validation */ + validation?: (google.apps.card.v1.IValidation|null); + /** TextInput placeholderText */ placeholderText?: (string|null); } @@ -6829,6 +7016,9 @@ export namespace google { /** TextInput autoCompleteAction. */ public autoCompleteAction?: (google.apps.card.v1.IAction|null); + /** TextInput validation. */ + public validation?: (google.apps.card.v1.IValidation|null); + /** TextInput placeholderText. */ public placeholderText: string; @@ -7272,7 +7462,7 @@ export namespace google { public onChangeAction?: (google.apps.card.v1.IAction|null); /** SelectionInput multiSelectMaxSelectedItems. */ - public multiSelectMaxSelectedItems: number; + public multiSelectMaxSelectedItems?: (number|null); /** SelectionInput multiSelectMinQueryLength. */ public multiSelectMinQueryLength: number; @@ -7413,11 +7603,14 @@ export namespace google { public selected: boolean; /** SelectionItem startIconUri. */ - public startIconUri: string; + public startIconUri?: (string|null); /** SelectionItem bottomText. */ public bottomText: string; + /** SelectionItem startIcon. */ + public startIcon?: "startIconUri"; + /** * Creates a new SelectionItem instance using the specified properties. * @param [properties] Properties to set @@ -7647,7 +7840,7 @@ export namespace google { public type: (google.apps.card.v1.DateTimePicker.DateTimePickerType|keyof typeof google.apps.card.v1.DateTimePicker.DateTimePickerType); /** DateTimePicker valueMsEpoch. */ - public valueMsEpoch: (number|Long|string); + public valueMsEpoch?: (number|Long|string|null); /** DateTimePicker timezoneOffsetDate. */ public timezoneOffsetDate: number; @@ -7743,6 +7936,221 @@ export namespace google { } } + /** Properties of an OverflowMenu. */ + interface IOverflowMenu { + + /** OverflowMenu items */ + items?: (google.apps.card.v1.OverflowMenu.IOverflowMenuItem[]|null); + } + + /** Represents an OverflowMenu. */ + class OverflowMenu implements IOverflowMenu { + + /** + * Constructs a new OverflowMenu. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.IOverflowMenu); + + /** OverflowMenu items. */ + public items: google.apps.card.v1.OverflowMenu.IOverflowMenuItem[]; + + /** + * Creates a new OverflowMenu instance using the specified properties. + * @param [properties] Properties to set + * @returns OverflowMenu instance + */ + public static create(properties?: google.apps.card.v1.IOverflowMenu): google.apps.card.v1.OverflowMenu; + + /** + * Encodes the specified OverflowMenu message. Does not implicitly {@link google.apps.card.v1.OverflowMenu.verify|verify} messages. + * @param message OverflowMenu message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.IOverflowMenu, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OverflowMenu message, length delimited. Does not implicitly {@link google.apps.card.v1.OverflowMenu.verify|verify} messages. + * @param message OverflowMenu message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.IOverflowMenu, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OverflowMenu message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OverflowMenu + * @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.apps.card.v1.OverflowMenu; + + /** + * Decodes an OverflowMenu message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OverflowMenu + * @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.apps.card.v1.OverflowMenu; + + /** + * Verifies an OverflowMenu 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 OverflowMenu message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OverflowMenu + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.OverflowMenu; + + /** + * Creates a plain object from an OverflowMenu message. Also converts values to other types if specified. + * @param message OverflowMenu + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.OverflowMenu, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OverflowMenu to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OverflowMenu + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OverflowMenu { + + /** Properties of an OverflowMenuItem. */ + interface IOverflowMenuItem { + + /** OverflowMenuItem startIcon */ + startIcon?: (google.apps.card.v1.IIcon|null); + + /** OverflowMenuItem text */ + text?: (string|null); + + /** OverflowMenuItem onClick */ + onClick?: (google.apps.card.v1.IOnClick|null); + + /** OverflowMenuItem disabled */ + disabled?: (boolean|null); + } + + /** Represents an OverflowMenuItem. */ + class OverflowMenuItem implements IOverflowMenuItem { + + /** + * Constructs a new OverflowMenuItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.OverflowMenu.IOverflowMenuItem); + + /** OverflowMenuItem startIcon. */ + public startIcon?: (google.apps.card.v1.IIcon|null); + + /** OverflowMenuItem text. */ + public text: string; + + /** OverflowMenuItem onClick. */ + public onClick?: (google.apps.card.v1.IOnClick|null); + + /** OverflowMenuItem disabled. */ + public disabled: boolean; + + /** + * Creates a new OverflowMenuItem instance using the specified properties. + * @param [properties] Properties to set + * @returns OverflowMenuItem instance + */ + public static create(properties?: google.apps.card.v1.OverflowMenu.IOverflowMenuItem): google.apps.card.v1.OverflowMenu.OverflowMenuItem; + + /** + * Encodes the specified OverflowMenuItem message. Does not implicitly {@link google.apps.card.v1.OverflowMenu.OverflowMenuItem.verify|verify} messages. + * @param message OverflowMenuItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.OverflowMenu.IOverflowMenuItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OverflowMenuItem message, length delimited. Does not implicitly {@link google.apps.card.v1.OverflowMenu.OverflowMenuItem.verify|verify} messages. + * @param message OverflowMenuItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.OverflowMenu.IOverflowMenuItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OverflowMenuItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OverflowMenuItem + * @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.apps.card.v1.OverflowMenu.OverflowMenuItem; + + /** + * Decodes an OverflowMenuItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OverflowMenuItem + * @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.apps.card.v1.OverflowMenu.OverflowMenuItem; + + /** + * Verifies an OverflowMenuItem 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 OverflowMenuItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OverflowMenuItem + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.OverflowMenu.OverflowMenuItem; + + /** + * Creates a plain object from an OverflowMenuItem message. Also converts values to other types if specified. + * @param message OverflowMenuItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.OverflowMenu.OverflowMenuItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OverflowMenuItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OverflowMenuItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a Button. */ interface IButton { @@ -7763,6 +8171,9 @@ export namespace google { /** Button altText */ altText?: (string|null); + + /** Button type */ + type?: (google.apps.card.v1.Button.Type|keyof typeof google.apps.card.v1.Button.Type|null); } /** Represents a Button. */ @@ -7792,6 +8203,9 @@ export namespace google { /** Button altText. */ public altText: string; + /** Button type. */ + public type: (google.apps.card.v1.Button.Type|keyof typeof google.apps.card.v1.Button.Type); + /** * Creates a new Button instance using the specified properties. * @param [properties] Properties to set @@ -7870,6 +8284,18 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Button { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + OUTLINED = 1, + FILLED = 2, + FILLED_TONAL = 3, + BORDERLESS = 4 + } + } + /** Properties of an Icon. */ interface IIcon { @@ -8967,6 +9393,9 @@ export namespace google { /** Widgets dateTimePicker */ dateTimePicker?: (google.apps.card.v1.IDateTimePicker|null); + + /** Widgets chipList */ + chipList?: (google.apps.card.v1.IChipList|null); } /** Represents a Widgets. */ @@ -8999,8 +9428,11 @@ export namespace google { /** Widgets dateTimePicker. */ public dateTimePicker?: (google.apps.card.v1.IDateTimePicker|null); + /** Widgets chipList. */ + public chipList?: (google.apps.card.v1.IChipList|null); + /** Widgets data. */ - public data?: ("textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"); + public data?: ("textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"chipList"); /** * Creates a new Widgets instance using the specified properties. @@ -9066,20 +9498,332 @@ export namespace google { */ public static toObject(message: google.apps.card.v1.Columns.Column.Widgets, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Widgets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Widgets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Widgets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Carousel. */ + interface ICarousel { + + /** Carousel carouselCards */ + carouselCards?: (google.apps.card.v1.Carousel.ICarouselCard[]|null); + } + + /** Represents a Carousel. */ + class Carousel implements ICarousel { + + /** + * Constructs a new Carousel. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.ICarousel); + + /** Carousel carouselCards. */ + public carouselCards: google.apps.card.v1.Carousel.ICarouselCard[]; + + /** + * Creates a new Carousel instance using the specified properties. + * @param [properties] Properties to set + * @returns Carousel instance + */ + public static create(properties?: google.apps.card.v1.ICarousel): google.apps.card.v1.Carousel; + + /** + * Encodes the specified Carousel message. Does not implicitly {@link google.apps.card.v1.Carousel.verify|verify} messages. + * @param message Carousel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.ICarousel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Carousel message, length delimited. Does not implicitly {@link google.apps.card.v1.Carousel.verify|verify} messages. + * @param message Carousel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.ICarousel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Carousel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Carousel + * @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.apps.card.v1.Carousel; + + /** + * Decodes a Carousel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Carousel + * @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.apps.card.v1.Carousel; + + /** + * Verifies a Carousel 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 Carousel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Carousel + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.Carousel; + + /** + * Creates a plain object from a Carousel message. Also converts values to other types if specified. + * @param message Carousel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.Carousel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Carousel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Carousel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Carousel { + + /** Properties of a CarouselCard. */ + interface ICarouselCard { + + /** CarouselCard widgets */ + widgets?: (google.apps.card.v1.Card.INestedWidget[]|null); + + /** CarouselCard footerWidgets */ + footerWidgets?: (google.apps.card.v1.Card.INestedWidget[]|null); + } + + /** Represents a CarouselCard. */ + class CarouselCard implements ICarouselCard { + + /** + * Constructs a new CarouselCard. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.Carousel.ICarouselCard); + + /** CarouselCard widgets. */ + public widgets: google.apps.card.v1.Card.INestedWidget[]; + + /** CarouselCard footerWidgets. */ + public footerWidgets: google.apps.card.v1.Card.INestedWidget[]; + + /** + * Creates a new CarouselCard instance using the specified properties. + * @param [properties] Properties to set + * @returns CarouselCard instance + */ + public static create(properties?: google.apps.card.v1.Carousel.ICarouselCard): google.apps.card.v1.Carousel.CarouselCard; + + /** + * Encodes the specified CarouselCard message. Does not implicitly {@link google.apps.card.v1.Carousel.CarouselCard.verify|verify} messages. + * @param message CarouselCard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.Carousel.ICarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CarouselCard message, length delimited. Does not implicitly {@link google.apps.card.v1.Carousel.CarouselCard.verify|verify} messages. + * @param message CarouselCard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.Carousel.ICarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CarouselCard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CarouselCard + * @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.apps.card.v1.Carousel.CarouselCard; + + /** + * Decodes a CarouselCard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CarouselCard + * @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.apps.card.v1.Carousel.CarouselCard; + + /** + * Verifies a CarouselCard 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 CarouselCard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CarouselCard + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.Carousel.CarouselCard; + + /** + * Creates a plain object from a CarouselCard message. Also converts values to other types if specified. + * @param message CarouselCard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.Carousel.CarouselCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CarouselCard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarouselCard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CollapseControl. */ + interface ICollapseControl { + + /** CollapseControl horizontalAlignment */ + horizontalAlignment?: (google.apps.card.v1.Widget.HorizontalAlignment|keyof typeof google.apps.card.v1.Widget.HorizontalAlignment|null); + + /** CollapseControl expandButton */ + expandButton?: (google.apps.card.v1.IButton|null); + + /** CollapseControl collapseButton */ + collapseButton?: (google.apps.card.v1.IButton|null); + } + + /** Represents a CollapseControl. */ + class CollapseControl implements ICollapseControl { + + /** + * Constructs a new CollapseControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.ICollapseControl); + + /** CollapseControl horizontalAlignment. */ + public horizontalAlignment: (google.apps.card.v1.Widget.HorizontalAlignment|keyof typeof google.apps.card.v1.Widget.HorizontalAlignment); + + /** CollapseControl expandButton. */ + public expandButton?: (google.apps.card.v1.IButton|null); + + /** CollapseControl collapseButton. */ + public collapseButton?: (google.apps.card.v1.IButton|null); + + /** + * Creates a new CollapseControl instance using the specified properties. + * @param [properties] Properties to set + * @returns CollapseControl instance + */ + public static create(properties?: google.apps.card.v1.ICollapseControl): google.apps.card.v1.CollapseControl; + + /** + * Encodes the specified CollapseControl message. Does not implicitly {@link google.apps.card.v1.CollapseControl.verify|verify} messages. + * @param message CollapseControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.ICollapseControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CollapseControl message, length delimited. Does not implicitly {@link google.apps.card.v1.CollapseControl.verify|verify} messages. + * @param message CollapseControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.ICollapseControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CollapseControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CollapseControl + * @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.apps.card.v1.CollapseControl; + + /** + * Decodes a CollapseControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CollapseControl + * @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.apps.card.v1.CollapseControl; + + /** + * Verifies a CollapseControl 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 CollapseControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CollapseControl + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.CollapseControl; + + /** + * Creates a plain object from a CollapseControl message. Also converts values to other types if specified. + * @param message CollapseControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.CollapseControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for Widgets - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Converts this CollapseControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CollapseControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OnClick. */ @@ -9096,6 +9840,9 @@ export namespace google { /** OnClick card */ card?: (google.apps.card.v1.ICard|null); + + /** OnClick overflowMenu */ + overflowMenu?: (google.apps.card.v1.IOverflowMenu|null); } /** Represents an OnClick. */ @@ -9119,8 +9866,11 @@ export namespace google { /** OnClick card. */ public card?: (google.apps.card.v1.ICard|null); + /** OnClick overflowMenu. */ + public overflowMenu?: (google.apps.card.v1.IOverflowMenu|null); + /** OnClick data. */ - public data?: ("action"|"openLink"|"openDynamicLinkAction"|"card"); + public data?: ("action"|"openLink"|"openDynamicLinkAction"|"card"|"overflowMenu"); /** * Creates a new OnClick instance using the specified properties. @@ -9341,6 +10091,12 @@ export namespace google { /** Action interaction */ interaction?: (google.apps.card.v1.Action.Interaction|keyof typeof google.apps.card.v1.Action.Interaction|null); + + /** Action requiredWidgets */ + requiredWidgets?: (string[]|null); + + /** Action allWidgetsAreRequired */ + allWidgetsAreRequired?: (boolean|null); } /** Represents an Action. */ @@ -9367,6 +10123,12 @@ export namespace google { /** Action interaction. */ public interaction: (google.apps.card.v1.Action.Interaction|keyof typeof google.apps.card.v1.Action.Interaction); + /** Action requiredWidgets. */ + public requiredWidgets: string[]; + + /** Action allWidgetsAreRequired. */ + public allWidgetsAreRequired: boolean; + /** * Creates a new Action instance using the specified properties. * @param [properties] Properties to set @@ -9562,6 +10324,362 @@ export namespace google { OPEN_DIALOG = 1 } } + + /** Properties of a Validation. */ + interface IValidation { + + /** Validation characterLimit */ + characterLimit?: (number|null); + + /** Validation inputType */ + inputType?: (google.apps.card.v1.Validation.InputType|keyof typeof google.apps.card.v1.Validation.InputType|null); + } + + /** Represents a Validation. */ + class Validation implements IValidation { + + /** + * Constructs a new Validation. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.IValidation); + + /** Validation characterLimit. */ + public characterLimit: number; + + /** Validation inputType. */ + public inputType: (google.apps.card.v1.Validation.InputType|keyof typeof google.apps.card.v1.Validation.InputType); + + /** + * Creates a new Validation instance using the specified properties. + * @param [properties] Properties to set + * @returns Validation instance + */ + public static create(properties?: google.apps.card.v1.IValidation): google.apps.card.v1.Validation; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.apps.card.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.apps.card.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Validation + * @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.apps.card.v1.Validation; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Validation + * @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.apps.card.v1.Validation; + + /** + * Verifies a Validation 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 Validation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validation + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.Validation; + + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @param message Validation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Validation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Validation { + + /** InputType enum. */ + enum InputType { + INPUT_TYPE_UNSPECIFIED = 0, + TEXT = 1, + INTEGER = 2, + FLOAT = 3, + EMAIL = 4, + EMOJI_PICKER = 5 + } + } + + /** Properties of a ChipList. */ + interface IChipList { + + /** ChipList layout */ + layout?: (google.apps.card.v1.ChipList.Layout|keyof typeof google.apps.card.v1.ChipList.Layout|null); + + /** ChipList chips */ + chips?: (google.apps.card.v1.IChip[]|null); + } + + /** Represents a ChipList. */ + class ChipList implements IChipList { + + /** + * Constructs a new ChipList. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.IChipList); + + /** ChipList layout. */ + public layout: (google.apps.card.v1.ChipList.Layout|keyof typeof google.apps.card.v1.ChipList.Layout); + + /** ChipList chips. */ + public chips: google.apps.card.v1.IChip[]; + + /** + * Creates a new ChipList instance using the specified properties. + * @param [properties] Properties to set + * @returns ChipList instance + */ + public static create(properties?: google.apps.card.v1.IChipList): google.apps.card.v1.ChipList; + + /** + * Encodes the specified ChipList message. Does not implicitly {@link google.apps.card.v1.ChipList.verify|verify} messages. + * @param message ChipList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.IChipList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChipList message, length delimited. Does not implicitly {@link google.apps.card.v1.ChipList.verify|verify} messages. + * @param message ChipList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.IChipList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChipList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChipList + * @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.apps.card.v1.ChipList; + + /** + * Decodes a ChipList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChipList + * @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.apps.card.v1.ChipList; + + /** + * Verifies a ChipList 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 ChipList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChipList + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.ChipList; + + /** + * Creates a plain object from a ChipList message. Also converts values to other types if specified. + * @param message ChipList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.ChipList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChipList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChipList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChipList { + + /** Layout enum. */ + enum Layout { + LAYOUT_UNSPECIFIED = 0, + WRAPPED = 1, + HORIZONTAL_SCROLLABLE = 2 + } + } + + /** Properties of a Chip. */ + interface IChip { + + /** Chip icon */ + icon?: (google.apps.card.v1.IIcon|null); + + /** Chip label */ + label?: (string|null); + + /** Chip onClick */ + onClick?: (google.apps.card.v1.IOnClick|null); + + /** Chip enabled */ + enabled?: (boolean|null); + + /** Chip disabled */ + disabled?: (boolean|null); + + /** Chip altText */ + altText?: (string|null); + } + + /** Represents a Chip. */ + class Chip implements IChip { + + /** + * Constructs a new Chip. + * @param [properties] Properties to set + */ + constructor(properties?: google.apps.card.v1.IChip); + + /** Chip icon. */ + public icon?: (google.apps.card.v1.IIcon|null); + + /** Chip label. */ + public label: string; + + /** Chip onClick. */ + public onClick?: (google.apps.card.v1.IOnClick|null); + + /** Chip enabled. */ + public enabled: boolean; + + /** Chip disabled. */ + public disabled: boolean; + + /** Chip altText. */ + public altText: string; + + /** + * Creates a new Chip instance using the specified properties. + * @param [properties] Properties to set + * @returns Chip instance + */ + public static create(properties?: google.apps.card.v1.IChip): google.apps.card.v1.Chip; + + /** + * Encodes the specified Chip message. Does not implicitly {@link google.apps.card.v1.Chip.verify|verify} messages. + * @param message Chip message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.apps.card.v1.IChip, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Chip message, length delimited. Does not implicitly {@link google.apps.card.v1.Chip.verify|verify} messages. + * @param message Chip message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.apps.card.v1.IChip, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Chip message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Chip + * @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.apps.card.v1.Chip; + + /** + * Decodes a Chip message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Chip + * @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.apps.card.v1.Chip; + + /** + * Verifies a Chip 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 Chip message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Chip + */ + public static fromObject(object: { [k: string]: any }): google.apps.card.v1.Chip; + + /** + * Creates a plain object from a Chip message. Also converts values to other types if specified. + * @param message Chip + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.apps.card.v1.Chip, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Chip to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Chip + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } @@ -14019,7 +15137,8 @@ export namespace google { enum MembershipRole { MEMBERSHIP_ROLE_UNSPECIFIED = 0, ROLE_MEMBER = 1, - ROLE_MANAGER = 2 + ROLE_MANAGER = 2, + ROLE_ASSISTANT_MANAGER = 4 } } @@ -19555,6 +20674,9 @@ export namespace google { /** PermissionSetting managersAllowed */ managersAllowed?: (boolean|null); + /** PermissionSetting assistantManagersAllowed */ + assistantManagersAllowed?: (boolean|null); + /** PermissionSetting membersAllowed */ membersAllowed?: (boolean|null); } @@ -19571,6 +20693,9 @@ export namespace google { /** PermissionSetting managersAllowed. */ public managersAllowed: boolean; + /** PermissionSetting assistantManagersAllowed. */ + public assistantManagersAllowed?: (boolean|null); + /** PermissionSetting membersAllowed. */ public membersAllowed: boolean; diff --git a/packages/google-chat/protos/protos.js b/packages/google-chat/protos/protos.js index 68242099ffa3..b5d8e61d453f 100644 --- a/packages/google-chat/protos/protos.js +++ b/packages/google-chat/protos/protos.js @@ -15742,6 +15742,7 @@ * @property {Array.|null} [widgets] Section widgets * @property {boolean|null} [collapsible] Section collapsible * @property {number|null} [uncollapsibleWidgetsCount] Section uncollapsibleWidgetsCount + * @property {google.apps.card.v1.ICollapseControl|null} [collapseControl] Section collapseControl */ /** @@ -15792,6 +15793,14 @@ */ Section.prototype.uncollapsibleWidgetsCount = 0; + /** + * Section collapseControl. + * @member {google.apps.card.v1.ICollapseControl|null|undefined} collapseControl + * @memberof google.apps.card.v1.Card.Section + * @instance + */ + Section.prototype.collapseControl = null; + /** * Creates a new Section instance using the specified properties. * @function create @@ -15825,6 +15834,8 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.collapsible); if (message.uncollapsibleWidgetsCount != null && Object.hasOwnProperty.call(message, "uncollapsibleWidgetsCount")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.uncollapsibleWidgetsCount); + if (message.collapseControl != null && Object.hasOwnProperty.call(message, "collapseControl")) + $root.google.apps.card.v1.CollapseControl.encode(message.collapseControl, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -15879,6 +15890,10 @@ message.uncollapsibleWidgetsCount = reader.int32(); break; } + case 8: { + message.collapseControl = $root.google.apps.card.v1.CollapseControl.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15932,6 +15947,11 @@ if (message.uncollapsibleWidgetsCount != null && message.hasOwnProperty("uncollapsibleWidgetsCount")) if (!$util.isInteger(message.uncollapsibleWidgetsCount)) return "uncollapsibleWidgetsCount: integer expected"; + if (message.collapseControl != null && message.hasOwnProperty("collapseControl")) { + var error = $root.google.apps.card.v1.CollapseControl.verify(message.collapseControl); + if (error) + return "collapseControl." + error; + } return null; }; @@ -15963,6 +15983,11 @@ message.collapsible = Boolean(object.collapsible); if (object.uncollapsibleWidgetsCount != null) message.uncollapsibleWidgetsCount = object.uncollapsibleWidgetsCount | 0; + if (object.collapseControl != null) { + if (typeof object.collapseControl !== "object") + throw TypeError(".google.apps.card.v1.Card.Section.collapseControl: object expected"); + message.collapseControl = $root.google.apps.card.v1.CollapseControl.fromObject(object.collapseControl); + } return message; }; @@ -15985,6 +16010,7 @@ object.header = ""; object.collapsible = false; object.uncollapsibleWidgetsCount = 0; + object.collapseControl = null; } if (message.header != null && message.hasOwnProperty("header")) object.header = message.header; @@ -15997,6 +16023,8 @@ object.collapsible = message.collapsible; if (message.uncollapsibleWidgetsCount != null && message.hasOwnProperty("uncollapsibleWidgetsCount")) object.uncollapsibleWidgetsCount = message.uncollapsibleWidgetsCount; + if (message.collapseControl != null && message.hasOwnProperty("collapseControl")) + object.collapseControl = $root.google.apps.card.v1.CollapseControl.toObject(message.collapseControl, options); return object; }; @@ -16279,6 +16307,305 @@ return CardAction; })(); + Card.NestedWidget = (function() { + + /** + * Properties of a NestedWidget. + * @memberof google.apps.card.v1.Card + * @interface INestedWidget + * @property {google.apps.card.v1.ITextParagraph|null} [textParagraph] NestedWidget textParagraph + * @property {google.apps.card.v1.IButtonList|null} [buttonList] NestedWidget buttonList + * @property {google.apps.card.v1.IImage|null} [image] NestedWidget image + */ + + /** + * Constructs a new NestedWidget. + * @memberof google.apps.card.v1.Card + * @classdesc Represents a NestedWidget. + * @implements INestedWidget + * @constructor + * @param {google.apps.card.v1.Card.INestedWidget=} [properties] Properties to set + */ + function NestedWidget(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]]; + } + + /** + * NestedWidget textParagraph. + * @member {google.apps.card.v1.ITextParagraph|null|undefined} textParagraph + * @memberof google.apps.card.v1.Card.NestedWidget + * @instance + */ + NestedWidget.prototype.textParagraph = null; + + /** + * NestedWidget buttonList. + * @member {google.apps.card.v1.IButtonList|null|undefined} buttonList + * @memberof google.apps.card.v1.Card.NestedWidget + * @instance + */ + NestedWidget.prototype.buttonList = null; + + /** + * NestedWidget image. + * @member {google.apps.card.v1.IImage|null|undefined} image + * @memberof google.apps.card.v1.Card.NestedWidget + * @instance + */ + NestedWidget.prototype.image = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NestedWidget data. + * @member {"textParagraph"|"buttonList"|"image"|undefined} data + * @memberof google.apps.card.v1.Card.NestedWidget + * @instance + */ + Object.defineProperty(NestedWidget.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["textParagraph", "buttonList", "image"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NestedWidget instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {google.apps.card.v1.Card.INestedWidget=} [properties] Properties to set + * @returns {google.apps.card.v1.Card.NestedWidget} NestedWidget instance + */ + NestedWidget.create = function create(properties) { + return new NestedWidget(properties); + }; + + /** + * Encodes the specified NestedWidget message. Does not implicitly {@link google.apps.card.v1.Card.NestedWidget.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {google.apps.card.v1.Card.INestedWidget} message NestedWidget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NestedWidget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textParagraph != null && Object.hasOwnProperty.call(message, "textParagraph")) + $root.google.apps.card.v1.TextParagraph.encode(message.textParagraph, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.buttonList != null && Object.hasOwnProperty.call(message, "buttonList")) + $root.google.apps.card.v1.ButtonList.encode(message.buttonList, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.apps.card.v1.Image.encode(message.image, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NestedWidget message, length delimited. Does not implicitly {@link google.apps.card.v1.Card.NestedWidget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {google.apps.card.v1.Card.INestedWidget} message NestedWidget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NestedWidget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NestedWidget message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.Card.NestedWidget} NestedWidget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NestedWidget.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Card.NestedWidget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.textParagraph = $root.google.apps.card.v1.TextParagraph.decode(reader, reader.uint32()); + break; + } + case 3: { + message.buttonList = $root.google.apps.card.v1.ButtonList.decode(reader, reader.uint32()); + break; + } + case 10: { + message.image = $root.google.apps.card.v1.Image.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NestedWidget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.Card.NestedWidget} NestedWidget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NestedWidget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NestedWidget message. + * @function verify + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NestedWidget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.textParagraph != null && message.hasOwnProperty("textParagraph")) { + properties.data = 1; + { + var error = $root.google.apps.card.v1.TextParagraph.verify(message.textParagraph); + if (error) + return "textParagraph." + error; + } + } + if (message.buttonList != null && message.hasOwnProperty("buttonList")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.ButtonList.verify(message.buttonList); + if (error) + return "buttonList." + error; + } + } + if (message.image != null && message.hasOwnProperty("image")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.Image.verify(message.image); + if (error) + return "image." + error; + } + } + return null; + }; + + /** + * Creates a NestedWidget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.Card.NestedWidget} NestedWidget + */ + NestedWidget.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Card.NestedWidget) + return object; + var message = new $root.google.apps.card.v1.Card.NestedWidget(); + if (object.textParagraph != null) { + if (typeof object.textParagraph !== "object") + throw TypeError(".google.apps.card.v1.Card.NestedWidget.textParagraph: object expected"); + message.textParagraph = $root.google.apps.card.v1.TextParagraph.fromObject(object.textParagraph); + } + if (object.buttonList != null) { + if (typeof object.buttonList !== "object") + throw TypeError(".google.apps.card.v1.Card.NestedWidget.buttonList: object expected"); + message.buttonList = $root.google.apps.card.v1.ButtonList.fromObject(object.buttonList); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.apps.card.v1.Card.NestedWidget.image: object expected"); + message.image = $root.google.apps.card.v1.Image.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from a NestedWidget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {google.apps.card.v1.Card.NestedWidget} message NestedWidget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NestedWidget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.textParagraph != null && message.hasOwnProperty("textParagraph")) { + object.textParagraph = $root.google.apps.card.v1.TextParagraph.toObject(message.textParagraph, options); + if (options.oneofs) + object.data = "textParagraph"; + } + if (message.buttonList != null && message.hasOwnProperty("buttonList")) { + object.buttonList = $root.google.apps.card.v1.ButtonList.toObject(message.buttonList, options); + if (options.oneofs) + object.data = "buttonList"; + } + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.google.apps.card.v1.Image.toObject(message.image, options); + if (options.oneofs) + object.data = "image"; + } + return object; + }; + + /** + * Converts this NestedWidget to JSON. + * @function toJSON + * @memberof google.apps.card.v1.Card.NestedWidget + * @instance + * @returns {Object.} JSON object + */ + NestedWidget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NestedWidget + * @function getTypeUrl + * @memberof google.apps.card.v1.Card.NestedWidget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NestedWidget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.Card.NestedWidget"; + }; + + return NestedWidget; + })(); + Card.CardFixedFooter = (function() { /** @@ -16553,6 +16880,8 @@ * @property {google.apps.card.v1.IDivider|null} [divider] Widget divider * @property {google.apps.card.v1.IGrid|null} [grid] Widget grid * @property {google.apps.card.v1.IColumns|null} [columns] Widget columns + * @property {google.apps.card.v1.ICarousel|null} [carousel] Widget carousel + * @property {google.apps.card.v1.IChipList|null} [chipList] Widget chipList * @property {google.apps.card.v1.Widget.HorizontalAlignment|null} [horizontalAlignment] Widget horizontalAlignment */ @@ -16651,6 +16980,22 @@ */ Widget.prototype.columns = null; + /** + * Widget carousel. + * @member {google.apps.card.v1.ICarousel|null|undefined} carousel + * @memberof google.apps.card.v1.Widget + * @instance + */ + Widget.prototype.carousel = null; + + /** + * Widget chipList. + * @member {google.apps.card.v1.IChipList|null|undefined} chipList + * @memberof google.apps.card.v1.Widget + * @instance + */ + Widget.prototype.chipList = null; + /** * Widget horizontalAlignment. * @member {google.apps.card.v1.Widget.HorizontalAlignment} horizontalAlignment @@ -16664,12 +17009,12 @@ /** * Widget data. - * @member {"textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"divider"|"grid"|"columns"|undefined} data + * @member {"textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"divider"|"grid"|"columns"|"carousel"|"chipList"|undefined} data * @memberof google.apps.card.v1.Widget * @instance */ Object.defineProperty(Widget.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["textParagraph", "image", "decoratedText", "buttonList", "textInput", "selectionInput", "dateTimePicker", "divider", "grid", "columns"]), + get: $util.oneOfGetter($oneOfFields = ["textParagraph", "image", "decoratedText", "buttonList", "textInput", "selectionInput", "dateTimePicker", "divider", "grid", "columns", "carousel", "chipList"]), set: $util.oneOfSetter($oneOfFields) }); @@ -16719,6 +17064,10 @@ $root.google.apps.card.v1.Grid.encode(message.grid, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) $root.google.apps.card.v1.Columns.encode(message.columns, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carousel != null && Object.hasOwnProperty.call(message, "carousel")) + $root.google.apps.card.v1.Carousel.encode(message.carousel, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.chipList != null && Object.hasOwnProperty.call(message, "chipList")) + $root.google.apps.card.v1.ChipList.encode(message.chipList, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -16795,6 +17144,14 @@ message.columns = $root.google.apps.card.v1.Columns.decode(reader, reader.uint32()); break; } + case 13: { + message.carousel = $root.google.apps.card.v1.Carousel.decode(reader, reader.uint32()); + break; + } + case 14: { + message.chipList = $root.google.apps.card.v1.ChipList.decode(reader, reader.uint32()); + break; + } case 8: { message.horizontalAlignment = reader.int32(); break; @@ -16933,6 +17290,26 @@ return "columns." + error; } } + if (message.carousel != null && message.hasOwnProperty("carousel")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.Carousel.verify(message.carousel); + if (error) + return "carousel." + error; + } + } + if (message.chipList != null && message.hasOwnProperty("chipList")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.ChipList.verify(message.chipList); + if (error) + return "chipList." + error; + } + } if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) switch (message.horizontalAlignment) { default: @@ -17008,6 +17385,16 @@ throw TypeError(".google.apps.card.v1.Widget.columns: object expected"); message.columns = $root.google.apps.card.v1.Columns.fromObject(object.columns); } + if (object.carousel != null) { + if (typeof object.carousel !== "object") + throw TypeError(".google.apps.card.v1.Widget.carousel: object expected"); + message.carousel = $root.google.apps.card.v1.Carousel.fromObject(object.carousel); + } + if (object.chipList != null) { + if (typeof object.chipList !== "object") + throw TypeError(".google.apps.card.v1.Widget.chipList: object expected"); + message.chipList = $root.google.apps.card.v1.ChipList.fromObject(object.chipList); + } switch (object.horizontalAlignment) { default: if (typeof object.horizontalAlignment === "number") { @@ -17102,6 +17489,16 @@ if (options.oneofs) object.data = "columns"; } + if (message.carousel != null && message.hasOwnProperty("carousel")) { + object.carousel = $root.google.apps.card.v1.Carousel.toObject(message.carousel, options); + if (options.oneofs) + object.data = "carousel"; + } + if (message.chipList != null && message.hasOwnProperty("chipList")) { + object.chipList = $root.google.apps.card.v1.ChipList.toObject(message.chipList, options); + if (options.oneofs) + object.data = "chipList"; + } return object; }; @@ -17163,6 +17560,24 @@ return values; })(); + /** + * VerticalAlignment enum. + * @name google.apps.card.v1.Widget.VerticalAlignment + * @enum {number} + * @property {number} VERTICAL_ALIGNMENT_UNSPECIFIED=0 VERTICAL_ALIGNMENT_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} MIDDLE=2 MIDDLE value + * @property {number} BOTTOM=3 BOTTOM value + */ + Widget.VerticalAlignment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERTICAL_ALIGNMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "MIDDLE"] = 2; + values[valuesById[3] = "BOTTOM"] = 3; + return values; + })(); + return Widget; })(); @@ -17173,6 +17588,8 @@ * @memberof google.apps.card.v1 * @interface ITextParagraph * @property {string|null} [text] TextParagraph text + * @property {number|null} [maxLines] TextParagraph maxLines + * @property {google.apps.card.v1.TextParagraph.TextSyntax|null} [textSyntax] TextParagraph textSyntax */ /** @@ -17198,6 +17615,22 @@ */ TextParagraph.prototype.text = ""; + /** + * TextParagraph maxLines. + * @member {number} maxLines + * @memberof google.apps.card.v1.TextParagraph + * @instance + */ + TextParagraph.prototype.maxLines = 0; + + /** + * TextParagraph textSyntax. + * @member {google.apps.card.v1.TextParagraph.TextSyntax} textSyntax + * @memberof google.apps.card.v1.TextParagraph + * @instance + */ + TextParagraph.prototype.textSyntax = 0; + /** * Creates a new TextParagraph instance using the specified properties. * @function create @@ -17224,6 +17657,10 @@ writer = $Writer.create(); if (message.text != null && Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.maxLines != null && Object.hasOwnProperty.call(message, "maxLines")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxLines); + if (message.textSyntax != null && Object.hasOwnProperty.call(message, "textSyntax")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.textSyntax); return writer; }; @@ -17264,6 +17701,14 @@ message.text = reader.string(); break; } + case 2: { + message.maxLines = reader.int32(); + break; + } + case 4: { + message.textSyntax = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17302,6 +17747,18 @@ if (message.text != null && message.hasOwnProperty("text")) if (!$util.isString(message.text)) return "text: string expected"; + if (message.maxLines != null && message.hasOwnProperty("maxLines")) + if (!$util.isInteger(message.maxLines)) + return "maxLines: integer expected"; + if (message.textSyntax != null && message.hasOwnProperty("textSyntax")) + switch (message.textSyntax) { + default: + return "textSyntax: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -17319,6 +17776,28 @@ var message = new $root.google.apps.card.v1.TextParagraph(); if (object.text != null) message.text = String(object.text); + if (object.maxLines != null) + message.maxLines = object.maxLines | 0; + switch (object.textSyntax) { + default: + if (typeof object.textSyntax === "number") { + message.textSyntax = object.textSyntax; + break; + } + break; + case "TEXT_SYNTAX_UNSPECIFIED": + case 0: + message.textSyntax = 0; + break; + case "HTML": + case 1: + message.textSyntax = 1; + break; + case "MARKDOWN": + case 2: + message.textSyntax = 2; + break; + } return message; }; @@ -17335,10 +17814,17 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.text = ""; + object.maxLines = 0; + object.textSyntax = options.enums === String ? "TEXT_SYNTAX_UNSPECIFIED" : 0; + } if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; + if (message.maxLines != null && message.hasOwnProperty("maxLines")) + object.maxLines = message.maxLines; + if (message.textSyntax != null && message.hasOwnProperty("textSyntax")) + object.textSyntax = options.enums === String ? $root.google.apps.card.v1.TextParagraph.TextSyntax[message.textSyntax] === undefined ? message.textSyntax : $root.google.apps.card.v1.TextParagraph.TextSyntax[message.textSyntax] : message.textSyntax; return object; }; @@ -17368,6 +17854,22 @@ return typeUrlPrefix + "/google.apps.card.v1.TextParagraph"; }; + /** + * TextSyntax enum. + * @name google.apps.card.v1.TextParagraph.TextSyntax + * @enum {number} + * @property {number} TEXT_SYNTAX_UNSPECIFIED=0 TEXT_SYNTAX_UNSPECIFIED value + * @property {number} HTML=1 HTML value + * @property {number} MARKDOWN=2 MARKDOWN value + */ + TextParagraph.TextSyntax = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEXT_SYNTAX_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTML"] = 1; + values[valuesById[2] = "MARKDOWN"] = 2; + return values; + })(); + return TextParagraph; })(); @@ -17813,10 +18315,14 @@ * @interface IDecoratedText * @property {google.apps.card.v1.IIcon|null} [icon] DecoratedText icon * @property {google.apps.card.v1.IIcon|null} [startIcon] DecoratedText startIcon + * @property {google.apps.card.v1.Widget.VerticalAlignment|null} [startIconVerticalAlignment] DecoratedText startIconVerticalAlignment * @property {string|null} [topLabel] DecoratedText topLabel + * @property {google.apps.card.v1.ITextParagraph|null} [topLabelText] DecoratedText topLabelText * @property {string|null} [text] DecoratedText text + * @property {google.apps.card.v1.ITextParagraph|null} [contentText] DecoratedText contentText * @property {boolean|null} [wrapText] DecoratedText wrapText * @property {string|null} [bottomLabel] DecoratedText bottomLabel + * @property {google.apps.card.v1.ITextParagraph|null} [bottomLabelText] DecoratedText bottomLabelText * @property {google.apps.card.v1.IOnClick|null} [onClick] DecoratedText onClick * @property {google.apps.card.v1.IButton|null} [button] DecoratedText button * @property {google.apps.card.v1.DecoratedText.ISwitchControl|null} [switchControl] DecoratedText switchControl @@ -17854,6 +18360,14 @@ */ DecoratedText.prototype.startIcon = null; + /** + * DecoratedText startIconVerticalAlignment. + * @member {google.apps.card.v1.Widget.VerticalAlignment} startIconVerticalAlignment + * @memberof google.apps.card.v1.DecoratedText + * @instance + */ + DecoratedText.prototype.startIconVerticalAlignment = 0; + /** * DecoratedText topLabel. * @member {string} topLabel @@ -17862,6 +18376,14 @@ */ DecoratedText.prototype.topLabel = ""; + /** + * DecoratedText topLabelText. + * @member {google.apps.card.v1.ITextParagraph|null|undefined} topLabelText + * @memberof google.apps.card.v1.DecoratedText + * @instance + */ + DecoratedText.prototype.topLabelText = null; + /** * DecoratedText text. * @member {string} text @@ -17870,6 +18392,14 @@ */ DecoratedText.prototype.text = ""; + /** + * DecoratedText contentText. + * @member {google.apps.card.v1.ITextParagraph|null|undefined} contentText + * @memberof google.apps.card.v1.DecoratedText + * @instance + */ + DecoratedText.prototype.contentText = null; + /** * DecoratedText wrapText. * @member {boolean} wrapText @@ -17886,6 +18416,14 @@ */ DecoratedText.prototype.bottomLabel = ""; + /** + * DecoratedText bottomLabelText. + * @member {google.apps.card.v1.ITextParagraph|null|undefined} bottomLabelText + * @memberof google.apps.card.v1.DecoratedText + * @instance + */ + DecoratedText.prototype.bottomLabelText = null; + /** * DecoratedText onClick. * @member {google.apps.card.v1.IOnClick|null|undefined} onClick @@ -17976,6 +18514,14 @@ $root.google.apps.card.v1.Icon.encode(message.endIcon, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.startIcon != null && Object.hasOwnProperty.call(message, "startIcon")) $root.google.apps.card.v1.Icon.encode(message.startIcon, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.startIconVerticalAlignment != null && Object.hasOwnProperty.call(message, "startIconVerticalAlignment")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.startIconVerticalAlignment); + if (message.topLabelText != null && Object.hasOwnProperty.call(message, "topLabelText")) + $root.google.apps.card.v1.TextParagraph.encode(message.topLabelText, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText")) + $root.google.apps.card.v1.TextParagraph.encode(message.contentText, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.bottomLabelText != null && Object.hasOwnProperty.call(message, "bottomLabelText")) + $root.google.apps.card.v1.TextParagraph.encode(message.bottomLabelText, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -18020,14 +18566,26 @@ message.startIcon = $root.google.apps.card.v1.Icon.decode(reader, reader.uint32()); break; } + case 13: { + message.startIconVerticalAlignment = reader.int32(); + break; + } case 3: { message.topLabel = reader.string(); break; } + case 17: { + message.topLabelText = $root.google.apps.card.v1.TextParagraph.decode(reader, reader.uint32()); + break; + } case 4: { message.text = reader.string(); break; } + case 18: { + message.contentText = $root.google.apps.card.v1.TextParagraph.decode(reader, reader.uint32()); + break; + } case 5: { message.wrapText = reader.bool(); break; @@ -18036,6 +18594,10 @@ message.bottomLabel = reader.string(); break; } + case 19: { + message.bottomLabelText = $root.google.apps.card.v1.TextParagraph.decode(reader, reader.uint32()); + break; + } case 7: { message.onClick = $root.google.apps.card.v1.OnClick.decode(reader, reader.uint32()); break; @@ -18098,18 +18660,43 @@ if (error) return "startIcon." + error; } + if (message.startIconVerticalAlignment != null && message.hasOwnProperty("startIconVerticalAlignment")) + switch (message.startIconVerticalAlignment) { + default: + return "startIconVerticalAlignment: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } if (message.topLabel != null && message.hasOwnProperty("topLabel")) if (!$util.isString(message.topLabel)) return "topLabel: string expected"; + if (message.topLabelText != null && message.hasOwnProperty("topLabelText")) { + var error = $root.google.apps.card.v1.TextParagraph.verify(message.topLabelText); + if (error) + return "topLabelText." + error; + } if (message.text != null && message.hasOwnProperty("text")) if (!$util.isString(message.text)) return "text: string expected"; + if (message.contentText != null && message.hasOwnProperty("contentText")) { + var error = $root.google.apps.card.v1.TextParagraph.verify(message.contentText); + if (error) + return "contentText." + error; + } if (message.wrapText != null && message.hasOwnProperty("wrapText")) if (typeof message.wrapText !== "boolean") return "wrapText: boolean expected"; if (message.bottomLabel != null && message.hasOwnProperty("bottomLabel")) if (!$util.isString(message.bottomLabel)) return "bottomLabel: string expected"; + if (message.bottomLabelText != null && message.hasOwnProperty("bottomLabelText")) { + var error = $root.google.apps.card.v1.TextParagraph.verify(message.bottomLabelText); + if (error) + return "bottomLabelText." + error; + } if (message.onClick != null && message.hasOwnProperty("onClick")) { var error = $root.google.apps.card.v1.OnClick.verify(message.onClick); if (error) @@ -18168,14 +18755,53 @@ throw TypeError(".google.apps.card.v1.DecoratedText.startIcon: object expected"); message.startIcon = $root.google.apps.card.v1.Icon.fromObject(object.startIcon); } + switch (object.startIconVerticalAlignment) { + default: + if (typeof object.startIconVerticalAlignment === "number") { + message.startIconVerticalAlignment = object.startIconVerticalAlignment; + break; + } + break; + case "VERTICAL_ALIGNMENT_UNSPECIFIED": + case 0: + message.startIconVerticalAlignment = 0; + break; + case "TOP": + case 1: + message.startIconVerticalAlignment = 1; + break; + case "MIDDLE": + case 2: + message.startIconVerticalAlignment = 2; + break; + case "BOTTOM": + case 3: + message.startIconVerticalAlignment = 3; + break; + } if (object.topLabel != null) message.topLabel = String(object.topLabel); + if (object.topLabelText != null) { + if (typeof object.topLabelText !== "object") + throw TypeError(".google.apps.card.v1.DecoratedText.topLabelText: object expected"); + message.topLabelText = $root.google.apps.card.v1.TextParagraph.fromObject(object.topLabelText); + } if (object.text != null) message.text = String(object.text); + if (object.contentText != null) { + if (typeof object.contentText !== "object") + throw TypeError(".google.apps.card.v1.DecoratedText.contentText: object expected"); + message.contentText = $root.google.apps.card.v1.TextParagraph.fromObject(object.contentText); + } if (object.wrapText != null) message.wrapText = Boolean(object.wrapText); if (object.bottomLabel != null) message.bottomLabel = String(object.bottomLabel); + if (object.bottomLabelText != null) { + if (typeof object.bottomLabelText !== "object") + throw TypeError(".google.apps.card.v1.DecoratedText.bottomLabelText: object expected"); + message.bottomLabelText = $root.google.apps.card.v1.TextParagraph.fromObject(object.bottomLabelText); + } if (object.onClick != null) { if (typeof object.onClick !== "object") throw TypeError(".google.apps.card.v1.DecoratedText.onClick: object expected"); @@ -18220,6 +18846,10 @@ object.bottomLabel = ""; object.onClick = null; object.startIcon = null; + object.startIconVerticalAlignment = options.enums === String ? "VERTICAL_ALIGNMENT_UNSPECIFIED" : 0; + object.topLabelText = null; + object.contentText = null; + object.bottomLabelText = null; } if (message.icon != null && message.hasOwnProperty("icon")) object.icon = $root.google.apps.card.v1.Icon.toObject(message.icon, options); @@ -18250,6 +18880,14 @@ } if (message.startIcon != null && message.hasOwnProperty("startIcon")) object.startIcon = $root.google.apps.card.v1.Icon.toObject(message.startIcon, options); + if (message.startIconVerticalAlignment != null && message.hasOwnProperty("startIconVerticalAlignment")) + object.startIconVerticalAlignment = options.enums === String ? $root.google.apps.card.v1.Widget.VerticalAlignment[message.startIconVerticalAlignment] === undefined ? message.startIconVerticalAlignment : $root.google.apps.card.v1.Widget.VerticalAlignment[message.startIconVerticalAlignment] : message.startIconVerticalAlignment; + if (message.topLabelText != null && message.hasOwnProperty("topLabelText")) + object.topLabelText = $root.google.apps.card.v1.TextParagraph.toObject(message.topLabelText, options); + if (message.contentText != null && message.hasOwnProperty("contentText")) + object.contentText = $root.google.apps.card.v1.TextParagraph.toObject(message.contentText, options); + if (message.bottomLabelText != null && message.hasOwnProperty("bottomLabelText")) + object.bottomLabelText = $root.google.apps.card.v1.TextParagraph.toObject(message.bottomLabelText, options); return object; }; @@ -18639,6 +19277,7 @@ * @property {google.apps.card.v1.IAction|null} [onChangeAction] TextInput onChangeAction * @property {google.apps.card.v1.ISuggestions|null} [initialSuggestions] TextInput initialSuggestions * @property {google.apps.card.v1.IAction|null} [autoCompleteAction] TextInput autoCompleteAction + * @property {google.apps.card.v1.IValidation|null} [validation] TextInput validation * @property {string|null} [placeholderText] TextInput placeholderText */ @@ -18721,6 +19360,14 @@ */ TextInput.prototype.autoCompleteAction = null; + /** + * TextInput validation. + * @member {google.apps.card.v1.IValidation|null|undefined} validation + * @memberof google.apps.card.v1.TextInput + * @instance + */ + TextInput.prototype.validation = null; + /** * TextInput placeholderText. * @member {string} placeholderText @@ -18769,6 +19416,8 @@ $root.google.apps.card.v1.Suggestions.encode(message.initialSuggestions, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.autoCompleteAction != null && Object.hasOwnProperty.call(message, "autoCompleteAction")) $root.google.apps.card.v1.Action.encode(message.autoCompleteAction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.validation != null && Object.hasOwnProperty.call(message, "validation")) + $root.google.apps.card.v1.Validation.encode(message.validation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.placeholderText != null && Object.hasOwnProperty.call(message, "placeholderText")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.placeholderText); return writer; @@ -18839,6 +19488,10 @@ message.autoCompleteAction = $root.google.apps.card.v1.Action.decode(reader, reader.uint32()); break; } + case 11: { + message.validation = $root.google.apps.card.v1.Validation.decode(reader, reader.uint32()); + break; + } case 12: { message.placeholderText = reader.string(); break; @@ -18913,6 +19566,11 @@ if (error) return "autoCompleteAction." + error; } + if (message.validation != null && message.hasOwnProperty("validation")) { + var error = $root.google.apps.card.v1.Validation.verify(message.validation); + if (error) + return "validation." + error; + } if (message.placeholderText != null && message.hasOwnProperty("placeholderText")) if (!$util.isString(message.placeholderText)) return "placeholderText: string expected"; @@ -18970,6 +19628,11 @@ throw TypeError(".google.apps.card.v1.TextInput.autoCompleteAction: object expected"); message.autoCompleteAction = $root.google.apps.card.v1.Action.fromObject(object.autoCompleteAction); } + if (object.validation != null) { + if (typeof object.validation !== "object") + throw TypeError(".google.apps.card.v1.TextInput.validation: object expected"); + message.validation = $root.google.apps.card.v1.Validation.fromObject(object.validation); + } if (object.placeholderText != null) message.placeholderText = String(object.placeholderText); return message; @@ -18997,6 +19660,7 @@ object.onChangeAction = null; object.initialSuggestions = null; object.autoCompleteAction = null; + object.validation = null; object.placeholderText = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -19015,6 +19679,8 @@ object.initialSuggestions = $root.google.apps.card.v1.Suggestions.toObject(message.initialSuggestions, options); if (message.autoCompleteAction != null && message.hasOwnProperty("autoCompleteAction")) object.autoCompleteAction = $root.google.apps.card.v1.Action.toObject(message.autoCompleteAction, options); + if (message.validation != null && message.hasOwnProperty("validation")) + object.validation = $root.google.apps.card.v1.Validation.toObject(message.validation, options); if (message.placeholderText != null && message.hasOwnProperty("placeholderText")) object.placeholderText = message.placeholderText; return object; @@ -19813,11 +20479,11 @@ /** * SelectionInput multiSelectMaxSelectedItems. - * @member {number} multiSelectMaxSelectedItems + * @member {number|null|undefined} multiSelectMaxSelectedItems * @memberof google.apps.card.v1.SelectionInput * @instance */ - SelectionInput.prototype.multiSelectMaxSelectedItems = 0; + SelectionInput.prototype.multiSelectMaxSelectedItems = null; /** * SelectionInput multiSelectMinQueryLength. @@ -19846,6 +20512,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(SelectionInput.prototype, "_multiSelectMaxSelectedItems", { + get: $util.oneOfGetter($oneOfFields = ["multiSelectMaxSelectedItems"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * SelectionInput multiSelectDataSource. * @member {"externalDataSource"|"platformDataSource"|undefined} multiSelectDataSource @@ -20041,9 +20713,11 @@ if (error) return "onChangeAction." + error; } - if (message.multiSelectMaxSelectedItems != null && message.hasOwnProperty("multiSelectMaxSelectedItems")) + if (message.multiSelectMaxSelectedItems != null && message.hasOwnProperty("multiSelectMaxSelectedItems")) { + properties._multiSelectMaxSelectedItems = 1; if (!$util.isInteger(message.multiSelectMaxSelectedItems)) return "multiSelectMaxSelectedItems: integer expected"; + } if (message.multiSelectMinQueryLength != null && message.hasOwnProperty("multiSelectMinQueryLength")) if (!$util.isInteger(message.multiSelectMinQueryLength)) return "multiSelectMinQueryLength: integer expected"; @@ -20164,7 +20838,6 @@ object.label = ""; object.type = options.enums === String ? "CHECK_BOX" : 0; object.onChangeAction = null; - object.multiSelectMaxSelectedItems = 0; object.multiSelectMinQueryLength = 0; } if (message.name != null && message.hasOwnProperty("name")) @@ -20180,8 +20853,11 @@ } if (message.onChangeAction != null && message.hasOwnProperty("onChangeAction")) object.onChangeAction = $root.google.apps.card.v1.Action.toObject(message.onChangeAction, options); - if (message.multiSelectMaxSelectedItems != null && message.hasOwnProperty("multiSelectMaxSelectedItems")) + if (message.multiSelectMaxSelectedItems != null && message.hasOwnProperty("multiSelectMaxSelectedItems")) { object.multiSelectMaxSelectedItems = message.multiSelectMaxSelectedItems; + if (options.oneofs) + object._multiSelectMaxSelectedItems = "multiSelectMaxSelectedItems"; + } if (message.multiSelectMinQueryLength != null && message.hasOwnProperty("multiSelectMinQueryLength")) object.multiSelectMinQueryLength = message.multiSelectMinQueryLength; if (message.externalDataSource != null && message.hasOwnProperty("externalDataSource")) { @@ -20297,11 +20973,11 @@ /** * SelectionItem startIconUri. - * @member {string} startIconUri + * @member {string|null|undefined} startIconUri * @memberof google.apps.card.v1.SelectionInput.SelectionItem * @instance */ - SelectionItem.prototype.startIconUri = ""; + SelectionItem.prototype.startIconUri = null; /** * SelectionItem bottomText. @@ -20311,6 +20987,20 @@ */ SelectionItem.prototype.bottomText = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SelectionItem startIcon. + * @member {"startIconUri"|undefined} startIcon + * @memberof google.apps.card.v1.SelectionInput.SelectionItem + * @instance + */ + Object.defineProperty(SelectionItem.prototype, "startIcon", { + get: $util.oneOfGetter($oneOfFields = ["startIconUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SelectionItem instance using the specified properties. * @function create @@ -20436,6 +21126,7 @@ SelectionItem.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.text != null && message.hasOwnProperty("text")) if (!$util.isString(message.text)) return "text: string expected"; @@ -20445,9 +21136,11 @@ if (message.selected != null && message.hasOwnProperty("selected")) if (typeof message.selected !== "boolean") return "selected: boolean expected"; - if (message.startIconUri != null && message.hasOwnProperty("startIconUri")) + if (message.startIconUri != null && message.hasOwnProperty("startIconUri")) { + properties.startIcon = 1; if (!$util.isString(message.startIconUri)) return "startIconUri: string expected"; + } if (message.bottomText != null && message.hasOwnProperty("bottomText")) if (!$util.isString(message.bottomText)) return "bottomText: string expected"; @@ -20496,7 +21189,6 @@ object.text = ""; object.value = ""; object.selected = false; - object.startIconUri = ""; object.bottomText = ""; } if (message.text != null && message.hasOwnProperty("text")) @@ -20505,8 +21197,11 @@ object.value = message.value; if (message.selected != null && message.hasOwnProperty("selected")) object.selected = message.selected; - if (message.startIconUri != null && message.hasOwnProperty("startIconUri")) + if (message.startIconUri != null && message.hasOwnProperty("startIconUri")) { object.startIconUri = message.startIconUri; + if (options.oneofs) + object.startIcon = "startIconUri"; + } if (message.bottomText != null && message.hasOwnProperty("bottomText")) object.bottomText = message.bottomText; return object; @@ -20855,11 +21550,11 @@ /** * DateTimePicker valueMsEpoch. - * @member {number|Long} valueMsEpoch + * @member {number|Long|null|undefined} valueMsEpoch * @memberof google.apps.card.v1.DateTimePicker * @instance */ - DateTimePicker.prototype.valueMsEpoch = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DateTimePicker.prototype.valueMsEpoch = null; /** * DateTimePicker timezoneOffsetDate. @@ -20877,6 +21572,15 @@ */ DateTimePicker.prototype.onChangeAction = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DateTimePicker.prototype, "_valueMsEpoch", { + get: $util.oneOfGetter($oneOfFields = ["valueMsEpoch"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DateTimePicker instance using the specified properties. * @function create @@ -21008,6 +21712,7 @@ DateTimePicker.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"; @@ -21023,9 +21728,11 @@ case 2: break; } - if (message.valueMsEpoch != null && message.hasOwnProperty("valueMsEpoch")) + if (message.valueMsEpoch != null && message.hasOwnProperty("valueMsEpoch")) { + properties._valueMsEpoch = 1; if (!$util.isInteger(message.valueMsEpoch) && !(message.valueMsEpoch && $util.isInteger(message.valueMsEpoch.low) && $util.isInteger(message.valueMsEpoch.high))) return "valueMsEpoch: integer|Long expected"; + } if (message.timezoneOffsetDate != null && message.hasOwnProperty("timezoneOffsetDate")) if (!$util.isInteger(message.timezoneOffsetDate)) return "timezoneOffsetDate: integer expected"; @@ -21109,11 +21816,6 @@ object.name = ""; object.label = ""; object.type = options.enums === String ? "DATE_AND_TIME" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.valueMsEpoch = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.valueMsEpoch = options.longs === String ? "0" : 0; object.timezoneOffsetDate = 0; object.onChangeAction = null; } @@ -21123,11 +21825,14 @@ object.label = message.label; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.apps.card.v1.DateTimePicker.DateTimePickerType[message.type] === undefined ? message.type : $root.google.apps.card.v1.DateTimePicker.DateTimePickerType[message.type] : message.type; - if (message.valueMsEpoch != null && message.hasOwnProperty("valueMsEpoch")) + if (message.valueMsEpoch != null && message.hasOwnProperty("valueMsEpoch")) { if (typeof message.valueMsEpoch === "number") object.valueMsEpoch = options.longs === String ? String(message.valueMsEpoch) : message.valueMsEpoch; else object.valueMsEpoch = options.longs === String ? $util.Long.prototype.toString.call(message.valueMsEpoch) : options.longs === Number ? new $util.LongBits(message.valueMsEpoch.low >>> 0, message.valueMsEpoch.high >>> 0).toNumber() : message.valueMsEpoch; + if (options.oneofs) + object._valueMsEpoch = "valueMsEpoch"; + } if (message.timezoneOffsetDate != null && message.hasOwnProperty("timezoneOffsetDate")) object.timezoneOffsetDate = message.timezoneOffsetDate; if (message.onChangeAction != null && message.hasOwnProperty("onChangeAction")) @@ -21180,6 +21885,517 @@ return DateTimePicker; })(); + v1.OverflowMenu = (function() { + + /** + * Properties of an OverflowMenu. + * @memberof google.apps.card.v1 + * @interface IOverflowMenu + * @property {Array.|null} [items] OverflowMenu items + */ + + /** + * Constructs a new OverflowMenu. + * @memberof google.apps.card.v1 + * @classdesc Represents an OverflowMenu. + * @implements IOverflowMenu + * @constructor + * @param {google.apps.card.v1.IOverflowMenu=} [properties] Properties to set + */ + function OverflowMenu(properties) { + this.items = []; + 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]]; + } + + /** + * OverflowMenu items. + * @member {Array.} items + * @memberof google.apps.card.v1.OverflowMenu + * @instance + */ + OverflowMenu.prototype.items = $util.emptyArray; + + /** + * Creates a new OverflowMenu instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {google.apps.card.v1.IOverflowMenu=} [properties] Properties to set + * @returns {google.apps.card.v1.OverflowMenu} OverflowMenu instance + */ + OverflowMenu.create = function create(properties) { + return new OverflowMenu(properties); + }; + + /** + * Encodes the specified OverflowMenu message. Does not implicitly {@link google.apps.card.v1.OverflowMenu.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {google.apps.card.v1.IOverflowMenu} message OverflowMenu message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OverflowMenu.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OverflowMenu message, length delimited. Does not implicitly {@link google.apps.card.v1.OverflowMenu.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {google.apps.card.v1.IOverflowMenu} message OverflowMenu message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OverflowMenu.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OverflowMenu message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.OverflowMenu} OverflowMenu + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OverflowMenu.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OverflowMenu(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.apps.card.v1.OverflowMenu.OverflowMenuItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OverflowMenu message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.OverflowMenu} OverflowMenu + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OverflowMenu.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OverflowMenu message. + * @function verify + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OverflowMenu.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates an OverflowMenu message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.OverflowMenu} OverflowMenu + */ + OverflowMenu.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.OverflowMenu) + return object; + var message = new $root.google.apps.card.v1.OverflowMenu(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.apps.card.v1.OverflowMenu.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.apps.card.v1.OverflowMenu.items: object expected"); + message.items[i] = $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OverflowMenu message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {google.apps.card.v1.OverflowMenu} message OverflowMenu + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OverflowMenu.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this OverflowMenu to JSON. + * @function toJSON + * @memberof google.apps.card.v1.OverflowMenu + * @instance + * @returns {Object.} JSON object + */ + OverflowMenu.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OverflowMenu + * @function getTypeUrl + * @memberof google.apps.card.v1.OverflowMenu + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OverflowMenu.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.OverflowMenu"; + }; + + OverflowMenu.OverflowMenuItem = (function() { + + /** + * Properties of an OverflowMenuItem. + * @memberof google.apps.card.v1.OverflowMenu + * @interface IOverflowMenuItem + * @property {google.apps.card.v1.IIcon|null} [startIcon] OverflowMenuItem startIcon + * @property {string|null} [text] OverflowMenuItem text + * @property {google.apps.card.v1.IOnClick|null} [onClick] OverflowMenuItem onClick + * @property {boolean|null} [disabled] OverflowMenuItem disabled + */ + + /** + * Constructs a new OverflowMenuItem. + * @memberof google.apps.card.v1.OverflowMenu + * @classdesc Represents an OverflowMenuItem. + * @implements IOverflowMenuItem + * @constructor + * @param {google.apps.card.v1.OverflowMenu.IOverflowMenuItem=} [properties] Properties to set + */ + function OverflowMenuItem(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]]; + } + + /** + * OverflowMenuItem startIcon. + * @member {google.apps.card.v1.IIcon|null|undefined} startIcon + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @instance + */ + OverflowMenuItem.prototype.startIcon = null; + + /** + * OverflowMenuItem text. + * @member {string} text + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @instance + */ + OverflowMenuItem.prototype.text = ""; + + /** + * OverflowMenuItem onClick. + * @member {google.apps.card.v1.IOnClick|null|undefined} onClick + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @instance + */ + OverflowMenuItem.prototype.onClick = null; + + /** + * OverflowMenuItem disabled. + * @member {boolean} disabled + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @instance + */ + OverflowMenuItem.prototype.disabled = false; + + /** + * Creates a new OverflowMenuItem instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {google.apps.card.v1.OverflowMenu.IOverflowMenuItem=} [properties] Properties to set + * @returns {google.apps.card.v1.OverflowMenu.OverflowMenuItem} OverflowMenuItem instance + */ + OverflowMenuItem.create = function create(properties) { + return new OverflowMenuItem(properties); + }; + + /** + * Encodes the specified OverflowMenuItem message. Does not implicitly {@link google.apps.card.v1.OverflowMenu.OverflowMenuItem.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {google.apps.card.v1.OverflowMenu.IOverflowMenuItem} message OverflowMenuItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OverflowMenuItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startIcon != null && Object.hasOwnProperty.call(message, "startIcon")) + $root.google.apps.card.v1.Icon.encode(message.startIcon, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + if (message.onClick != null && Object.hasOwnProperty.call(message, "onClick")) + $root.google.apps.card.v1.OnClick.encode(message.onClick, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified OverflowMenuItem message, length delimited. Does not implicitly {@link google.apps.card.v1.OverflowMenu.OverflowMenuItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {google.apps.card.v1.OverflowMenu.IOverflowMenuItem} message OverflowMenuItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OverflowMenuItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OverflowMenuItem message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.OverflowMenu.OverflowMenuItem} OverflowMenuItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OverflowMenuItem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startIcon = $root.google.apps.card.v1.Icon.decode(reader, reader.uint32()); + break; + } + case 2: { + message.text = reader.string(); + break; + } + case 3: { + message.onClick = $root.google.apps.card.v1.OnClick.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OverflowMenuItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.OverflowMenu.OverflowMenuItem} OverflowMenuItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OverflowMenuItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OverflowMenuItem message. + * @function verify + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OverflowMenuItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startIcon != null && message.hasOwnProperty("startIcon")) { + var error = $root.google.apps.card.v1.Icon.verify(message.startIcon); + if (error) + return "startIcon." + error; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.onClick != null && message.hasOwnProperty("onClick")) { + var error = $root.google.apps.card.v1.OnClick.verify(message.onClick); + if (error) + return "onClick." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates an OverflowMenuItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.OverflowMenu.OverflowMenuItem} OverflowMenuItem + */ + OverflowMenuItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem) + return object; + var message = new $root.google.apps.card.v1.OverflowMenu.OverflowMenuItem(); + if (object.startIcon != null) { + if (typeof object.startIcon !== "object") + throw TypeError(".google.apps.card.v1.OverflowMenu.OverflowMenuItem.startIcon: object expected"); + message.startIcon = $root.google.apps.card.v1.Icon.fromObject(object.startIcon); + } + if (object.text != null) + message.text = String(object.text); + if (object.onClick != null) { + if (typeof object.onClick !== "object") + throw TypeError(".google.apps.card.v1.OverflowMenu.OverflowMenuItem.onClick: object expected"); + message.onClick = $root.google.apps.card.v1.OnClick.fromObject(object.onClick); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from an OverflowMenuItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {google.apps.card.v1.OverflowMenu.OverflowMenuItem} message OverflowMenuItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OverflowMenuItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startIcon = null; + object.text = ""; + object.onClick = null; + object.disabled = false; + } + if (message.startIcon != null && message.hasOwnProperty("startIcon")) + object.startIcon = $root.google.apps.card.v1.Icon.toObject(message.startIcon, options); + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.onClick != null && message.hasOwnProperty("onClick")) + object.onClick = $root.google.apps.card.v1.OnClick.toObject(message.onClick, options); + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this OverflowMenuItem to JSON. + * @function toJSON + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @instance + * @returns {Object.} JSON object + */ + OverflowMenuItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OverflowMenuItem + * @function getTypeUrl + * @memberof google.apps.card.v1.OverflowMenu.OverflowMenuItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OverflowMenuItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.OverflowMenu.OverflowMenuItem"; + }; + + return OverflowMenuItem; + })(); + + return OverflowMenu; + })(); + v1.Button = (function() { /** @@ -21192,6 +22408,7 @@ * @property {google.apps.card.v1.IOnClick|null} [onClick] Button onClick * @property {boolean|null} [disabled] Button disabled * @property {string|null} [altText] Button altText + * @property {google.apps.card.v1.Button.Type|null} [type] Button type */ /** @@ -21257,6 +22474,14 @@ */ Button.prototype.altText = ""; + /** + * Button type. + * @member {google.apps.card.v1.Button.Type} type + * @memberof google.apps.card.v1.Button + * @instance + */ + Button.prototype.type = 0; + /** * Creates a new Button instance using the specified properties. * @function create @@ -21293,6 +22518,8 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled); if (message.altText != null && Object.hasOwnProperty.call(message, "altText")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.altText); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); return writer; }; @@ -21353,6 +22580,10 @@ message.altText = reader.string(); break; } + case 7: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21412,6 +22643,17 @@ if (message.altText != null && message.hasOwnProperty("altText")) if (!$util.isString(message.altText)) return "altText: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -21448,6 +22690,34 @@ message.disabled = Boolean(object.disabled); if (object.altText != null) message.altText = String(object.altText); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "OUTLINED": + case 1: + message.type = 1; + break; + case "FILLED": + case 2: + message.type = 2; + break; + case "FILLED_TONAL": + case 3: + message.type = 3; + break; + case "BORDERLESS": + case 4: + message.type = 4; + break; + } return message; }; @@ -21471,6 +22741,7 @@ object.onClick = null; object.disabled = false; object.altText = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; @@ -21484,6 +22755,8 @@ object.disabled = message.disabled; if (message.altText != null && message.hasOwnProperty("altText")) object.altText = message.altText; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.apps.card.v1.Button.Type[message.type] === undefined ? message.type : $root.google.apps.card.v1.Button.Type[message.type] : message.type; return object; }; @@ -21513,6 +22786,26 @@ return typeUrlPrefix + "/google.apps.card.v1.Button"; }; + /** + * Type enum. + * @name google.apps.card.v1.Button.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} OUTLINED=1 OUTLINED value + * @property {number} FILLED=2 FILLED value + * @property {number} FILLED_TONAL=3 FILLED_TONAL value + * @property {number} BORDERLESS=4 BORDERLESS value + */ + Button.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTLINED"] = 1; + values[valuesById[2] = "FILLED"] = 2; + values[valuesById[3] = "FILLED_TONAL"] = 3; + values[valuesById[4] = "BORDERLESS"] = 4; + return values; + })(); + return Button; })(); @@ -24329,6 +25622,7 @@ * @property {google.apps.card.v1.ITextInput|null} [textInput] Widgets textInput * @property {google.apps.card.v1.ISelectionInput|null} [selectionInput] Widgets selectionInput * @property {google.apps.card.v1.IDateTimePicker|null} [dateTimePicker] Widgets dateTimePicker + * @property {google.apps.card.v1.IChipList|null} [chipList] Widgets chipList */ /** @@ -24402,17 +25696,25 @@ */ Widgets.prototype.dateTimePicker = null; + /** + * Widgets chipList. + * @member {google.apps.card.v1.IChipList|null|undefined} chipList + * @memberof google.apps.card.v1.Columns.Column.Widgets + * @instance + */ + Widgets.prototype.chipList = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Widgets data. - * @member {"textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|undefined} data + * @member {"textParagraph"|"image"|"decoratedText"|"buttonList"|"textInput"|"selectionInput"|"dateTimePicker"|"chipList"|undefined} data * @memberof google.apps.card.v1.Columns.Column.Widgets * @instance */ Object.defineProperty(Widgets.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["textParagraph", "image", "decoratedText", "buttonList", "textInput", "selectionInput", "dateTimePicker"]), + get: $util.oneOfGetter($oneOfFields = ["textParagraph", "image", "decoratedText", "buttonList", "textInput", "selectionInput", "dateTimePicker", "chipList"]), set: $util.oneOfSetter($oneOfFields) }); @@ -24454,6 +25756,8 @@ $root.google.apps.card.v1.SelectionInput.encode(message.selectionInput, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.dateTimePicker != null && Object.hasOwnProperty.call(message, "dateTimePicker")) $root.google.apps.card.v1.DateTimePicker.encode(message.dateTimePicker, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.chipList != null && Object.hasOwnProperty.call(message, "chipList")) + $root.google.apps.card.v1.ChipList.encode(message.chipList, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -24518,6 +25822,10 @@ message.dateTimePicker = $root.google.apps.card.v1.DateTimePicker.decode(reader, reader.uint32()); break; } + case 8: { + message.chipList = $root.google.apps.card.v1.ChipList.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24622,6 +25930,16 @@ return "dateTimePicker." + error; } } + if (message.chipList != null && message.hasOwnProperty("chipList")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.ChipList.verify(message.chipList); + if (error) + return "chipList." + error; + } + } return null; }; @@ -24672,6 +25990,11 @@ throw TypeError(".google.apps.card.v1.Columns.Column.Widgets.dateTimePicker: object expected"); message.dateTimePicker = $root.google.apps.card.v1.DateTimePicker.fromObject(object.dateTimePicker); } + if (object.chipList != null) { + if (typeof object.chipList !== "object") + throw TypeError(".google.apps.card.v1.Columns.Column.Widgets.chipList: object expected"); + message.chipList = $root.google.apps.card.v1.ChipList.fromObject(object.chipList); + } return message; }; @@ -24723,6 +26046,11 @@ if (options.oneofs) object.data = "dateTimePicker"; } + if (message.chipList != null && message.hasOwnProperty("chipList")) { + object.chipList = $root.google.apps.card.v1.ChipList.toObject(message.chipList, options); + if (options.oneofs) + object.data = "chipList"; + } return object; }; @@ -24761,27 +26089,25 @@ return Columns; })(); - v1.OnClick = (function() { + v1.Carousel = (function() { /** - * Properties of an OnClick. + * Properties of a Carousel. * @memberof google.apps.card.v1 - * @interface IOnClick - * @property {google.apps.card.v1.IAction|null} [action] OnClick action - * @property {google.apps.card.v1.IOpenLink|null} [openLink] OnClick openLink - * @property {google.apps.card.v1.IAction|null} [openDynamicLinkAction] OnClick openDynamicLinkAction - * @property {google.apps.card.v1.ICard|null} [card] OnClick card + * @interface ICarousel + * @property {Array.|null} [carouselCards] Carousel carouselCards */ /** - * Constructs a new OnClick. + * Constructs a new Carousel. * @memberof google.apps.card.v1 - * @classdesc Represents an OnClick. - * @implements IOnClick + * @classdesc Represents a Carousel. + * @implements ICarousel * @constructor - * @param {google.apps.card.v1.IOnClick=} [properties] Properties to set + * @param {google.apps.card.v1.ICarousel=} [properties] Properties to set */ - function OnClick(properties) { + function Carousel(properties) { + this.carouselCards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24789,133 +26115,80 @@ } /** - * OnClick action. - * @member {google.apps.card.v1.IAction|null|undefined} action - * @memberof google.apps.card.v1.OnClick - * @instance - */ - OnClick.prototype.action = null; - - /** - * OnClick openLink. - * @member {google.apps.card.v1.IOpenLink|null|undefined} openLink - * @memberof google.apps.card.v1.OnClick - * @instance - */ - OnClick.prototype.openLink = null; - - /** - * OnClick openDynamicLinkAction. - * @member {google.apps.card.v1.IAction|null|undefined} openDynamicLinkAction - * @memberof google.apps.card.v1.OnClick - * @instance - */ - OnClick.prototype.openDynamicLinkAction = null; - - /** - * OnClick card. - * @member {google.apps.card.v1.ICard|null|undefined} card - * @memberof google.apps.card.v1.OnClick - * @instance - */ - OnClick.prototype.card = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OnClick data. - * @member {"action"|"openLink"|"openDynamicLinkAction"|"card"|undefined} data - * @memberof google.apps.card.v1.OnClick + * Carousel carouselCards. + * @member {Array.} carouselCards + * @memberof google.apps.card.v1.Carousel * @instance */ - Object.defineProperty(OnClick.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["action", "openLink", "openDynamicLinkAction", "card"]), - set: $util.oneOfSetter($oneOfFields) - }); + Carousel.prototype.carouselCards = $util.emptyArray; /** - * Creates a new OnClick instance using the specified properties. + * Creates a new Carousel instance using the specified properties. * @function create - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static - * @param {google.apps.card.v1.IOnClick=} [properties] Properties to set - * @returns {google.apps.card.v1.OnClick} OnClick instance + * @param {google.apps.card.v1.ICarousel=} [properties] Properties to set + * @returns {google.apps.card.v1.Carousel} Carousel instance */ - OnClick.create = function create(properties) { - return new OnClick(properties); + Carousel.create = function create(properties) { + return new Carousel(properties); }; /** - * Encodes the specified OnClick message. Does not implicitly {@link google.apps.card.v1.OnClick.verify|verify} messages. + * Encodes the specified Carousel message. Does not implicitly {@link google.apps.card.v1.Carousel.verify|verify} messages. * @function encode - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static - * @param {google.apps.card.v1.IOnClick} message OnClick message or plain object to encode + * @param {google.apps.card.v1.ICarousel} message Carousel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OnClick.encode = function encode(message, writer) { + Carousel.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.apps.card.v1.Action.encode(message.action, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.openLink != null && Object.hasOwnProperty.call(message, "openLink")) - $root.google.apps.card.v1.OpenLink.encode(message.openLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.openDynamicLinkAction != null && Object.hasOwnProperty.call(message, "openDynamicLinkAction")) - $root.google.apps.card.v1.Action.encode(message.openDynamicLinkAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.card != null && Object.hasOwnProperty.call(message, "card")) - $root.google.apps.card.v1.Card.encode(message.card, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.carouselCards != null && message.carouselCards.length) + for (var i = 0; i < message.carouselCards.length; ++i) + $root.google.apps.card.v1.Carousel.CarouselCard.encode(message.carouselCards[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified OnClick message, length delimited. Does not implicitly {@link google.apps.card.v1.OnClick.verify|verify} messages. + * Encodes the specified Carousel message, length delimited. Does not implicitly {@link google.apps.card.v1.Carousel.verify|verify} messages. * @function encodeDelimited - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static - * @param {google.apps.card.v1.IOnClick} message OnClick message or plain object to encode + * @param {google.apps.card.v1.ICarousel} message Carousel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OnClick.encodeDelimited = function encodeDelimited(message, writer) { + Carousel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OnClick message from the specified reader or buffer. + * Decodes a Carousel message from the specified reader or buffer. * @function decode - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.apps.card.v1.OnClick} OnClick + * @returns {google.apps.card.v1.Carousel} Carousel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OnClick.decode = function decode(reader, length, error) { + Carousel.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OnClick(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Carousel(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.action = $root.google.apps.card.v1.Action.decode(reader, reader.uint32()); - break; - } - case 2: { - message.openLink = $root.google.apps.card.v1.OpenLink.decode(reader, reader.uint32()); - break; - } - case 3: { - message.openDynamicLinkAction = $root.google.apps.card.v1.Action.decode(reader, reader.uint32()); - break; - } case 4: { - message.card = $root.google.apps.card.v1.Card.decode(reader, reader.uint32()); + if (!(message.carouselCards && message.carouselCards.length)) + message.carouselCards = []; + message.carouselCards.push($root.google.apps.card.v1.Carousel.CarouselCard.decode(reader, reader.uint32())); break; } default: @@ -24927,194 +26200,412 @@ }; /** - * Decodes an OnClick message from the specified reader or buffer, length delimited. + * Decodes a Carousel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.apps.card.v1.OnClick} OnClick + * @returns {google.apps.card.v1.Carousel} Carousel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OnClick.decodeDelimited = function decodeDelimited(reader) { + Carousel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OnClick message. + * Verifies a Carousel message. * @function verify - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OnClick.verify = function verify(message) { + Carousel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.action != null && message.hasOwnProperty("action")) { - properties.data = 1; - { - var error = $root.google.apps.card.v1.Action.verify(message.action); - if (error) - return "action." + error; - } - } - if (message.openLink != null && message.hasOwnProperty("openLink")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.apps.card.v1.OpenLink.verify(message.openLink); - if (error) - return "openLink." + error; - } - } - if (message.openDynamicLinkAction != null && message.hasOwnProperty("openDynamicLinkAction")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.apps.card.v1.Action.verify(message.openDynamicLinkAction); - if (error) - return "openDynamicLinkAction." + error; - } - } - if (message.card != null && message.hasOwnProperty("card")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.apps.card.v1.Card.verify(message.card); + if (message.carouselCards != null && message.hasOwnProperty("carouselCards")) { + if (!Array.isArray(message.carouselCards)) + return "carouselCards: array expected"; + for (var i = 0; i < message.carouselCards.length; ++i) { + var error = $root.google.apps.card.v1.Carousel.CarouselCard.verify(message.carouselCards[i]); if (error) - return "card." + error; + return "carouselCards." + error; } } return null; }; /** - * Creates an OnClick message from a plain object. Also converts values to their respective internal types. + * Creates a Carousel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static * @param {Object.} object Plain object - * @returns {google.apps.card.v1.OnClick} OnClick + * @returns {google.apps.card.v1.Carousel} Carousel */ - OnClick.fromObject = function fromObject(object) { - if (object instanceof $root.google.apps.card.v1.OnClick) + Carousel.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Carousel) return object; - var message = new $root.google.apps.card.v1.OnClick(); - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.apps.card.v1.OnClick.action: object expected"); - message.action = $root.google.apps.card.v1.Action.fromObject(object.action); - } - if (object.openLink != null) { - if (typeof object.openLink !== "object") - throw TypeError(".google.apps.card.v1.OnClick.openLink: object expected"); - message.openLink = $root.google.apps.card.v1.OpenLink.fromObject(object.openLink); - } - if (object.openDynamicLinkAction != null) { - if (typeof object.openDynamicLinkAction !== "object") - throw TypeError(".google.apps.card.v1.OnClick.openDynamicLinkAction: object expected"); - message.openDynamicLinkAction = $root.google.apps.card.v1.Action.fromObject(object.openDynamicLinkAction); - } - if (object.card != null) { - if (typeof object.card !== "object") - throw TypeError(".google.apps.card.v1.OnClick.card: object expected"); - message.card = $root.google.apps.card.v1.Card.fromObject(object.card); + var message = new $root.google.apps.card.v1.Carousel(); + if (object.carouselCards) { + if (!Array.isArray(object.carouselCards)) + throw TypeError(".google.apps.card.v1.Carousel.carouselCards: array expected"); + message.carouselCards = []; + for (var i = 0; i < object.carouselCards.length; ++i) { + if (typeof object.carouselCards[i] !== "object") + throw TypeError(".google.apps.card.v1.Carousel.carouselCards: object expected"); + message.carouselCards[i] = $root.google.apps.card.v1.Carousel.CarouselCard.fromObject(object.carouselCards[i]); + } } return message; }; /** - * Creates a plain object from an OnClick message. Also converts values to other types if specified. + * Creates a plain object from a Carousel message. Also converts values to other types if specified. * @function toObject - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static - * @param {google.apps.card.v1.OnClick} message OnClick + * @param {google.apps.card.v1.Carousel} message Carousel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OnClick.toObject = function toObject(message, options) { + Carousel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.apps.card.v1.Action.toObject(message.action, options); - if (options.oneofs) - object.data = "action"; - } - if (message.openLink != null && message.hasOwnProperty("openLink")) { - object.openLink = $root.google.apps.card.v1.OpenLink.toObject(message.openLink, options); - if (options.oneofs) - object.data = "openLink"; - } - if (message.openDynamicLinkAction != null && message.hasOwnProperty("openDynamicLinkAction")) { - object.openDynamicLinkAction = $root.google.apps.card.v1.Action.toObject(message.openDynamicLinkAction, options); - if (options.oneofs) - object.data = "openDynamicLinkAction"; - } - if (message.card != null && message.hasOwnProperty("card")) { - object.card = $root.google.apps.card.v1.Card.toObject(message.card, options); - if (options.oneofs) - object.data = "card"; + if (options.arrays || options.defaults) + object.carouselCards = []; + if (message.carouselCards && message.carouselCards.length) { + object.carouselCards = []; + for (var j = 0; j < message.carouselCards.length; ++j) + object.carouselCards[j] = $root.google.apps.card.v1.Carousel.CarouselCard.toObject(message.carouselCards[j], options); } return object; }; /** - * Converts this OnClick to JSON. + * Converts this Carousel to JSON. * @function toJSON - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @instance * @returns {Object.} JSON object */ - OnClick.prototype.toJSON = function toJSON() { + Carousel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OnClick + * Gets the default type url for Carousel * @function getTypeUrl - * @memberof google.apps.card.v1.OnClick + * @memberof google.apps.card.v1.Carousel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OnClick.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Carousel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.apps.card.v1.OnClick"; + return typeUrlPrefix + "/google.apps.card.v1.Carousel"; }; - return OnClick; + Carousel.CarouselCard = (function() { + + /** + * Properties of a CarouselCard. + * @memberof google.apps.card.v1.Carousel + * @interface ICarouselCard + * @property {Array.|null} [widgets] CarouselCard widgets + * @property {Array.|null} [footerWidgets] CarouselCard footerWidgets + */ + + /** + * Constructs a new CarouselCard. + * @memberof google.apps.card.v1.Carousel + * @classdesc Represents a CarouselCard. + * @implements ICarouselCard + * @constructor + * @param {google.apps.card.v1.Carousel.ICarouselCard=} [properties] Properties to set + */ + function CarouselCard(properties) { + this.widgets = []; + this.footerWidgets = []; + 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]]; + } + + /** + * CarouselCard widgets. + * @member {Array.} widgets + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @instance + */ + CarouselCard.prototype.widgets = $util.emptyArray; + + /** + * CarouselCard footerWidgets. + * @member {Array.} footerWidgets + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @instance + */ + CarouselCard.prototype.footerWidgets = $util.emptyArray; + + /** + * Creates a new CarouselCard instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {google.apps.card.v1.Carousel.ICarouselCard=} [properties] Properties to set + * @returns {google.apps.card.v1.Carousel.CarouselCard} CarouselCard instance + */ + CarouselCard.create = function create(properties) { + return new CarouselCard(properties); + }; + + /** + * Encodes the specified CarouselCard message. Does not implicitly {@link google.apps.card.v1.Carousel.CarouselCard.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {google.apps.card.v1.Carousel.ICarouselCard} message CarouselCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarouselCard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.apps.card.v1.Card.NestedWidget.encode(message.widgets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.footerWidgets != null && message.footerWidgets.length) + for (var i = 0; i < message.footerWidgets.length; ++i) + $root.google.apps.card.v1.Card.NestedWidget.encode(message.footerWidgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarouselCard message, length delimited. Does not implicitly {@link google.apps.card.v1.Carousel.CarouselCard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {google.apps.card.v1.Carousel.ICarouselCard} message CarouselCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarouselCard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarouselCard message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.Carousel.CarouselCard} CarouselCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarouselCard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Carousel.CarouselCard(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.apps.card.v1.Card.NestedWidget.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.footerWidgets && message.footerWidgets.length)) + message.footerWidgets = []; + message.footerWidgets.push($root.google.apps.card.v1.Card.NestedWidget.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CarouselCard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.Carousel.CarouselCard} CarouselCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarouselCard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarouselCard message. + * @function verify + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarouselCard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.apps.card.v1.Card.NestedWidget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + if (message.footerWidgets != null && message.hasOwnProperty("footerWidgets")) { + if (!Array.isArray(message.footerWidgets)) + return "footerWidgets: array expected"; + for (var i = 0; i < message.footerWidgets.length; ++i) { + var error = $root.google.apps.card.v1.Card.NestedWidget.verify(message.footerWidgets[i]); + if (error) + return "footerWidgets." + error; + } + } + return null; + }; + + /** + * Creates a CarouselCard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.Carousel.CarouselCard} CarouselCard + */ + CarouselCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Carousel.CarouselCard) + return object; + var message = new $root.google.apps.card.v1.Carousel.CarouselCard(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.apps.card.v1.Carousel.CarouselCard.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.apps.card.v1.Carousel.CarouselCard.widgets: object expected"); + message.widgets[i] = $root.google.apps.card.v1.Card.NestedWidget.fromObject(object.widgets[i]); + } + } + if (object.footerWidgets) { + if (!Array.isArray(object.footerWidgets)) + throw TypeError(".google.apps.card.v1.Carousel.CarouselCard.footerWidgets: array expected"); + message.footerWidgets = []; + for (var i = 0; i < object.footerWidgets.length; ++i) { + if (typeof object.footerWidgets[i] !== "object") + throw TypeError(".google.apps.card.v1.Carousel.CarouselCard.footerWidgets: object expected"); + message.footerWidgets[i] = $root.google.apps.card.v1.Card.NestedWidget.fromObject(object.footerWidgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarouselCard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {google.apps.card.v1.Carousel.CarouselCard} message CarouselCard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarouselCard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.widgets = []; + object.footerWidgets = []; + } + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.apps.card.v1.Card.NestedWidget.toObject(message.widgets[j], options); + } + if (message.footerWidgets && message.footerWidgets.length) { + object.footerWidgets = []; + for (var j = 0; j < message.footerWidgets.length; ++j) + object.footerWidgets[j] = $root.google.apps.card.v1.Card.NestedWidget.toObject(message.footerWidgets[j], options); + } + return object; + }; + + /** + * Converts this CarouselCard to JSON. + * @function toJSON + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @instance + * @returns {Object.} JSON object + */ + CarouselCard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CarouselCard + * @function getTypeUrl + * @memberof google.apps.card.v1.Carousel.CarouselCard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarouselCard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.Carousel.CarouselCard"; + }; + + return CarouselCard; + })(); + + return Carousel; })(); - v1.OpenLink = (function() { + v1.CollapseControl = (function() { /** - * Properties of an OpenLink. + * Properties of a CollapseControl. * @memberof google.apps.card.v1 - * @interface IOpenLink - * @property {string|null} [url] OpenLink url - * @property {google.apps.card.v1.OpenLink.OpenAs|null} [openAs] OpenLink openAs - * @property {google.apps.card.v1.OpenLink.OnClose|null} [onClose] OpenLink onClose + * @interface ICollapseControl + * @property {google.apps.card.v1.Widget.HorizontalAlignment|null} [horizontalAlignment] CollapseControl horizontalAlignment + * @property {google.apps.card.v1.IButton|null} [expandButton] CollapseControl expandButton + * @property {google.apps.card.v1.IButton|null} [collapseButton] CollapseControl collapseButton */ /** - * Constructs a new OpenLink. + * Constructs a new CollapseControl. * @memberof google.apps.card.v1 - * @classdesc Represents an OpenLink. - * @implements IOpenLink + * @classdesc Represents a CollapseControl. + * @implements ICollapseControl * @constructor - * @param {google.apps.card.v1.IOpenLink=} [properties] Properties to set + * @param {google.apps.card.v1.ICollapseControl=} [properties] Properties to set */ - function OpenLink(properties) { + function CollapseControl(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25122,105 +26613,105 @@ } /** - * OpenLink url. - * @member {string} url - * @memberof google.apps.card.v1.OpenLink + * CollapseControl horizontalAlignment. + * @member {google.apps.card.v1.Widget.HorizontalAlignment} horizontalAlignment + * @memberof google.apps.card.v1.CollapseControl * @instance */ - OpenLink.prototype.url = ""; + CollapseControl.prototype.horizontalAlignment = 0; /** - * OpenLink openAs. - * @member {google.apps.card.v1.OpenLink.OpenAs} openAs - * @memberof google.apps.card.v1.OpenLink + * CollapseControl expandButton. + * @member {google.apps.card.v1.IButton|null|undefined} expandButton + * @memberof google.apps.card.v1.CollapseControl * @instance */ - OpenLink.prototype.openAs = 0; + CollapseControl.prototype.expandButton = null; /** - * OpenLink onClose. - * @member {google.apps.card.v1.OpenLink.OnClose} onClose - * @memberof google.apps.card.v1.OpenLink + * CollapseControl collapseButton. + * @member {google.apps.card.v1.IButton|null|undefined} collapseButton + * @memberof google.apps.card.v1.CollapseControl * @instance */ - OpenLink.prototype.onClose = 0; + CollapseControl.prototype.collapseButton = null; /** - * Creates a new OpenLink instance using the specified properties. + * Creates a new CollapseControl instance using the specified properties. * @function create - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static - * @param {google.apps.card.v1.IOpenLink=} [properties] Properties to set - * @returns {google.apps.card.v1.OpenLink} OpenLink instance + * @param {google.apps.card.v1.ICollapseControl=} [properties] Properties to set + * @returns {google.apps.card.v1.CollapseControl} CollapseControl instance */ - OpenLink.create = function create(properties) { - return new OpenLink(properties); + CollapseControl.create = function create(properties) { + return new CollapseControl(properties); }; /** - * Encodes the specified OpenLink message. Does not implicitly {@link google.apps.card.v1.OpenLink.verify|verify} messages. + * Encodes the specified CollapseControl message. Does not implicitly {@link google.apps.card.v1.CollapseControl.verify|verify} messages. * @function encode - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static - * @param {google.apps.card.v1.IOpenLink} message OpenLink message or plain object to encode + * @param {google.apps.card.v1.ICollapseControl} message CollapseControl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OpenLink.encode = function encode(message, writer) { + CollapseControl.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.openAs != null && Object.hasOwnProperty.call(message, "openAs")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.openAs); - if (message.onClose != null && Object.hasOwnProperty.call(message, "onClose")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.onClose); + if (message.horizontalAlignment != null && Object.hasOwnProperty.call(message, "horizontalAlignment")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.horizontalAlignment); + if (message.expandButton != null && Object.hasOwnProperty.call(message, "expandButton")) + $root.google.apps.card.v1.Button.encode(message.expandButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.collapseButton != null && Object.hasOwnProperty.call(message, "collapseButton")) + $root.google.apps.card.v1.Button.encode(message.collapseButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified OpenLink message, length delimited. Does not implicitly {@link google.apps.card.v1.OpenLink.verify|verify} messages. + * Encodes the specified CollapseControl message, length delimited. Does not implicitly {@link google.apps.card.v1.CollapseControl.verify|verify} messages. * @function encodeDelimited - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static - * @param {google.apps.card.v1.IOpenLink} message OpenLink message or plain object to encode + * @param {google.apps.card.v1.ICollapseControl} message CollapseControl message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OpenLink.encodeDelimited = function encodeDelimited(message, writer) { + CollapseControl.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OpenLink message from the specified reader or buffer. + * Decodes a CollapseControl message from the specified reader or buffer. * @function decode - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.apps.card.v1.OpenLink} OpenLink + * @returns {google.apps.card.v1.CollapseControl} CollapseControl * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OpenLink.decode = function decode(reader, length, error) { + CollapseControl.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OpenLink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.CollapseControl(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.url = reader.string(); + message.horizontalAlignment = reader.int32(); break; } case 2: { - message.openAs = reader.int32(); + message.expandButton = $root.google.apps.card.v1.Button.decode(reader, reader.uint32()); break; } case 3: { - message.onClose = reader.int32(); + message.collapseButton = $root.google.apps.card.v1.Button.decode(reader, reader.uint32()); break; } default: @@ -25232,46 +26723,706 @@ }; /** - * Decodes an OpenLink message from the specified reader or buffer, length delimited. + * Decodes a CollapseControl message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.apps.card.v1.OpenLink} OpenLink + * @returns {google.apps.card.v1.CollapseControl} CollapseControl * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OpenLink.decodeDelimited = function decodeDelimited(reader) { + CollapseControl.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OpenLink message. + * Verifies a CollapseControl message. * @function verify - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.CollapseControl * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OpenLink.verify = function verify(message) { + CollapseControl.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.openAs != null && message.hasOwnProperty("openAs")) - switch (message.openAs) { + if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) + switch (message.horizontalAlignment) { default: - return "openAs: enum value expected"; + return "horizontalAlignment: enum value expected"; case 0: case 1: + case 2: + case 3: break; } - if (message.onClose != null && message.hasOwnProperty("onClose")) - switch (message.onClose) { - default: + if (message.expandButton != null && message.hasOwnProperty("expandButton")) { + var error = $root.google.apps.card.v1.Button.verify(message.expandButton); + if (error) + return "expandButton." + error; + } + if (message.collapseButton != null && message.hasOwnProperty("collapseButton")) { + var error = $root.google.apps.card.v1.Button.verify(message.collapseButton); + if (error) + return "collapseButton." + error; + } + return null; + }; + + /** + * Creates a CollapseControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.CollapseControl + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.CollapseControl} CollapseControl + */ + CollapseControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.CollapseControl) + return object; + var message = new $root.google.apps.card.v1.CollapseControl(); + switch (object.horizontalAlignment) { + default: + if (typeof object.horizontalAlignment === "number") { + message.horizontalAlignment = object.horizontalAlignment; + break; + } + break; + case "HORIZONTAL_ALIGNMENT_UNSPECIFIED": + case 0: + message.horizontalAlignment = 0; + break; + case "START": + case 1: + message.horizontalAlignment = 1; + break; + case "CENTER": + case 2: + message.horizontalAlignment = 2; + break; + case "END": + case 3: + message.horizontalAlignment = 3; + break; + } + if (object.expandButton != null) { + if (typeof object.expandButton !== "object") + throw TypeError(".google.apps.card.v1.CollapseControl.expandButton: object expected"); + message.expandButton = $root.google.apps.card.v1.Button.fromObject(object.expandButton); + } + if (object.collapseButton != null) { + if (typeof object.collapseButton !== "object") + throw TypeError(".google.apps.card.v1.CollapseControl.collapseButton: object expected"); + message.collapseButton = $root.google.apps.card.v1.Button.fromObject(object.collapseButton); + } + return message; + }; + + /** + * Creates a plain object from a CollapseControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.CollapseControl + * @static + * @param {google.apps.card.v1.CollapseControl} message CollapseControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CollapseControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.horizontalAlignment = options.enums === String ? "HORIZONTAL_ALIGNMENT_UNSPECIFIED" : 0; + object.expandButton = null; + object.collapseButton = null; + } + if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) + object.horizontalAlignment = options.enums === String ? $root.google.apps.card.v1.Widget.HorizontalAlignment[message.horizontalAlignment] === undefined ? message.horizontalAlignment : $root.google.apps.card.v1.Widget.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; + if (message.expandButton != null && message.hasOwnProperty("expandButton")) + object.expandButton = $root.google.apps.card.v1.Button.toObject(message.expandButton, options); + if (message.collapseButton != null && message.hasOwnProperty("collapseButton")) + object.collapseButton = $root.google.apps.card.v1.Button.toObject(message.collapseButton, options); + return object; + }; + + /** + * Converts this CollapseControl to JSON. + * @function toJSON + * @memberof google.apps.card.v1.CollapseControl + * @instance + * @returns {Object.} JSON object + */ + CollapseControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CollapseControl + * @function getTypeUrl + * @memberof google.apps.card.v1.CollapseControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CollapseControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.CollapseControl"; + }; + + return CollapseControl; + })(); + + v1.OnClick = (function() { + + /** + * Properties of an OnClick. + * @memberof google.apps.card.v1 + * @interface IOnClick + * @property {google.apps.card.v1.IAction|null} [action] OnClick action + * @property {google.apps.card.v1.IOpenLink|null} [openLink] OnClick openLink + * @property {google.apps.card.v1.IAction|null} [openDynamicLinkAction] OnClick openDynamicLinkAction + * @property {google.apps.card.v1.ICard|null} [card] OnClick card + * @property {google.apps.card.v1.IOverflowMenu|null} [overflowMenu] OnClick overflowMenu + */ + + /** + * Constructs a new OnClick. + * @memberof google.apps.card.v1 + * @classdesc Represents an OnClick. + * @implements IOnClick + * @constructor + * @param {google.apps.card.v1.IOnClick=} [properties] Properties to set + */ + function OnClick(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]]; + } + + /** + * OnClick action. + * @member {google.apps.card.v1.IAction|null|undefined} action + * @memberof google.apps.card.v1.OnClick + * @instance + */ + OnClick.prototype.action = null; + + /** + * OnClick openLink. + * @member {google.apps.card.v1.IOpenLink|null|undefined} openLink + * @memberof google.apps.card.v1.OnClick + * @instance + */ + OnClick.prototype.openLink = null; + + /** + * OnClick openDynamicLinkAction. + * @member {google.apps.card.v1.IAction|null|undefined} openDynamicLinkAction + * @memberof google.apps.card.v1.OnClick + * @instance + */ + OnClick.prototype.openDynamicLinkAction = null; + + /** + * OnClick card. + * @member {google.apps.card.v1.ICard|null|undefined} card + * @memberof google.apps.card.v1.OnClick + * @instance + */ + OnClick.prototype.card = null; + + /** + * OnClick overflowMenu. + * @member {google.apps.card.v1.IOverflowMenu|null|undefined} overflowMenu + * @memberof google.apps.card.v1.OnClick + * @instance + */ + OnClick.prototype.overflowMenu = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OnClick data. + * @member {"action"|"openLink"|"openDynamicLinkAction"|"card"|"overflowMenu"|undefined} data + * @memberof google.apps.card.v1.OnClick + * @instance + */ + Object.defineProperty(OnClick.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["action", "openLink", "openDynamicLinkAction", "card", "overflowMenu"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OnClick instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.OnClick + * @static + * @param {google.apps.card.v1.IOnClick=} [properties] Properties to set + * @returns {google.apps.card.v1.OnClick} OnClick instance + */ + OnClick.create = function create(properties) { + return new OnClick(properties); + }; + + /** + * Encodes the specified OnClick message. Does not implicitly {@link google.apps.card.v1.OnClick.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.OnClick + * @static + * @param {google.apps.card.v1.IOnClick} message OnClick message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnClick.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.apps.card.v1.Action.encode(message.action, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.openLink != null && Object.hasOwnProperty.call(message, "openLink")) + $root.google.apps.card.v1.OpenLink.encode(message.openLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.openDynamicLinkAction != null && Object.hasOwnProperty.call(message, "openDynamicLinkAction")) + $root.google.apps.card.v1.Action.encode(message.openDynamicLinkAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.card != null && Object.hasOwnProperty.call(message, "card")) + $root.google.apps.card.v1.Card.encode(message.card, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.overflowMenu != null && Object.hasOwnProperty.call(message, "overflowMenu")) + $root.google.apps.card.v1.OverflowMenu.encode(message.overflowMenu, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OnClick message, length delimited. Does not implicitly {@link google.apps.card.v1.OnClick.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.OnClick + * @static + * @param {google.apps.card.v1.IOnClick} message OnClick message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnClick.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OnClick message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.OnClick + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.OnClick} OnClick + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnClick.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OnClick(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = $root.google.apps.card.v1.Action.decode(reader, reader.uint32()); + break; + } + case 2: { + message.openLink = $root.google.apps.card.v1.OpenLink.decode(reader, reader.uint32()); + break; + } + case 3: { + message.openDynamicLinkAction = $root.google.apps.card.v1.Action.decode(reader, reader.uint32()); + break; + } + case 4: { + message.card = $root.google.apps.card.v1.Card.decode(reader, reader.uint32()); + break; + } + case 8: { + message.overflowMenu = $root.google.apps.card.v1.OverflowMenu.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OnClick message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.OnClick + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.OnClick} OnClick + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnClick.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OnClick message. + * @function verify + * @memberof google.apps.card.v1.OnClick + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OnClick.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.action != null && message.hasOwnProperty("action")) { + properties.data = 1; + { + var error = $root.google.apps.card.v1.Action.verify(message.action); + if (error) + return "action." + error; + } + } + if (message.openLink != null && message.hasOwnProperty("openLink")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.OpenLink.verify(message.openLink); + if (error) + return "openLink." + error; + } + } + if (message.openDynamicLinkAction != null && message.hasOwnProperty("openDynamicLinkAction")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.Action.verify(message.openDynamicLinkAction); + if (error) + return "openDynamicLinkAction." + error; + } + } + if (message.card != null && message.hasOwnProperty("card")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.Card.verify(message.card); + if (error) + return "card." + error; + } + } + if (message.overflowMenu != null && message.hasOwnProperty("overflowMenu")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.apps.card.v1.OverflowMenu.verify(message.overflowMenu); + if (error) + return "overflowMenu." + error; + } + } + return null; + }; + + /** + * Creates an OnClick message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.OnClick + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.OnClick} OnClick + */ + OnClick.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.OnClick) + return object; + var message = new $root.google.apps.card.v1.OnClick(); + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.apps.card.v1.OnClick.action: object expected"); + message.action = $root.google.apps.card.v1.Action.fromObject(object.action); + } + if (object.openLink != null) { + if (typeof object.openLink !== "object") + throw TypeError(".google.apps.card.v1.OnClick.openLink: object expected"); + message.openLink = $root.google.apps.card.v1.OpenLink.fromObject(object.openLink); + } + if (object.openDynamicLinkAction != null) { + if (typeof object.openDynamicLinkAction !== "object") + throw TypeError(".google.apps.card.v1.OnClick.openDynamicLinkAction: object expected"); + message.openDynamicLinkAction = $root.google.apps.card.v1.Action.fromObject(object.openDynamicLinkAction); + } + if (object.card != null) { + if (typeof object.card !== "object") + throw TypeError(".google.apps.card.v1.OnClick.card: object expected"); + message.card = $root.google.apps.card.v1.Card.fromObject(object.card); + } + if (object.overflowMenu != null) { + if (typeof object.overflowMenu !== "object") + throw TypeError(".google.apps.card.v1.OnClick.overflowMenu: object expected"); + message.overflowMenu = $root.google.apps.card.v1.OverflowMenu.fromObject(object.overflowMenu); + } + return message; + }; + + /** + * Creates a plain object from an OnClick message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.OnClick + * @static + * @param {google.apps.card.v1.OnClick} message OnClick + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OnClick.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.apps.card.v1.Action.toObject(message.action, options); + if (options.oneofs) + object.data = "action"; + } + if (message.openLink != null && message.hasOwnProperty("openLink")) { + object.openLink = $root.google.apps.card.v1.OpenLink.toObject(message.openLink, options); + if (options.oneofs) + object.data = "openLink"; + } + if (message.openDynamicLinkAction != null && message.hasOwnProperty("openDynamicLinkAction")) { + object.openDynamicLinkAction = $root.google.apps.card.v1.Action.toObject(message.openDynamicLinkAction, options); + if (options.oneofs) + object.data = "openDynamicLinkAction"; + } + if (message.card != null && message.hasOwnProperty("card")) { + object.card = $root.google.apps.card.v1.Card.toObject(message.card, options); + if (options.oneofs) + object.data = "card"; + } + if (message.overflowMenu != null && message.hasOwnProperty("overflowMenu")) { + object.overflowMenu = $root.google.apps.card.v1.OverflowMenu.toObject(message.overflowMenu, options); + if (options.oneofs) + object.data = "overflowMenu"; + } + return object; + }; + + /** + * Converts this OnClick to JSON. + * @function toJSON + * @memberof google.apps.card.v1.OnClick + * @instance + * @returns {Object.} JSON object + */ + OnClick.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OnClick + * @function getTypeUrl + * @memberof google.apps.card.v1.OnClick + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OnClick.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.OnClick"; + }; + + return OnClick; + })(); + + v1.OpenLink = (function() { + + /** + * Properties of an OpenLink. + * @memberof google.apps.card.v1 + * @interface IOpenLink + * @property {string|null} [url] OpenLink url + * @property {google.apps.card.v1.OpenLink.OpenAs|null} [openAs] OpenLink openAs + * @property {google.apps.card.v1.OpenLink.OnClose|null} [onClose] OpenLink onClose + */ + + /** + * Constructs a new OpenLink. + * @memberof google.apps.card.v1 + * @classdesc Represents an OpenLink. + * @implements IOpenLink + * @constructor + * @param {google.apps.card.v1.IOpenLink=} [properties] Properties to set + */ + function OpenLink(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]]; + } + + /** + * OpenLink url. + * @member {string} url + * @memberof google.apps.card.v1.OpenLink + * @instance + */ + OpenLink.prototype.url = ""; + + /** + * OpenLink openAs. + * @member {google.apps.card.v1.OpenLink.OpenAs} openAs + * @memberof google.apps.card.v1.OpenLink + * @instance + */ + OpenLink.prototype.openAs = 0; + + /** + * OpenLink onClose. + * @member {google.apps.card.v1.OpenLink.OnClose} onClose + * @memberof google.apps.card.v1.OpenLink + * @instance + */ + OpenLink.prototype.onClose = 0; + + /** + * Creates a new OpenLink instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {google.apps.card.v1.IOpenLink=} [properties] Properties to set + * @returns {google.apps.card.v1.OpenLink} OpenLink instance + */ + OpenLink.create = function create(properties) { + return new OpenLink(properties); + }; + + /** + * Encodes the specified OpenLink message. Does not implicitly {@link google.apps.card.v1.OpenLink.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {google.apps.card.v1.IOpenLink} message OpenLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenLink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.openAs != null && Object.hasOwnProperty.call(message, "openAs")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.openAs); + if (message.onClose != null && Object.hasOwnProperty.call(message, "onClose")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.onClose); + return writer; + }; + + /** + * Encodes the specified OpenLink message, length delimited. Does not implicitly {@link google.apps.card.v1.OpenLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {google.apps.card.v1.IOpenLink} message OpenLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpenLink message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.OpenLink} OpenLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenLink.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.OpenLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.openAs = reader.int32(); + break; + } + case 3: { + message.onClose = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpenLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.OpenLink} OpenLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenLink message. + * @function verify + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenLink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.openAs != null && message.hasOwnProperty("openAs")) + switch (message.openAs) { + default: + return "openAs: enum value expected"; + case 0: + case 1: + break; + } + if (message.onClose != null && message.hasOwnProperty("onClose")) + switch (message.onClose) { + default: return "onClose: enum value expected"; case 0: case 1: @@ -25281,161 +27432,1419 @@ }; /** - * Creates an OpenLink message from a plain object. Also converts values to their respective internal types. + * Creates an OpenLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.OpenLink} OpenLink + */ + OpenLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.OpenLink) + return object; + var message = new $root.google.apps.card.v1.OpenLink(); + if (object.url != null) + message.url = String(object.url); + switch (object.openAs) { + default: + if (typeof object.openAs === "number") { + message.openAs = object.openAs; + break; + } + break; + case "FULL_SIZE": + case 0: + message.openAs = 0; + break; + case "OVERLAY": + case 1: + message.openAs = 1; + break; + } + switch (object.onClose) { + default: + if (typeof object.onClose === "number") { + message.onClose = object.onClose; + break; + } + break; + case "NOTHING": + case 0: + message.onClose = 0; + break; + case "RELOAD": + case 1: + message.onClose = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an OpenLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {google.apps.card.v1.OpenLink} message OpenLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.openAs = options.enums === String ? "FULL_SIZE" : 0; + object.onClose = options.enums === String ? "NOTHING" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.openAs != null && message.hasOwnProperty("openAs")) + object.openAs = options.enums === String ? $root.google.apps.card.v1.OpenLink.OpenAs[message.openAs] === undefined ? message.openAs : $root.google.apps.card.v1.OpenLink.OpenAs[message.openAs] : message.openAs; + if (message.onClose != null && message.hasOwnProperty("onClose")) + object.onClose = options.enums === String ? $root.google.apps.card.v1.OpenLink.OnClose[message.onClose] === undefined ? message.onClose : $root.google.apps.card.v1.OpenLink.OnClose[message.onClose] : message.onClose; + return object; + }; + + /** + * Converts this OpenLink to JSON. + * @function toJSON + * @memberof google.apps.card.v1.OpenLink + * @instance + * @returns {Object.} JSON object + */ + OpenLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpenLink + * @function getTypeUrl + * @memberof google.apps.card.v1.OpenLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpenLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.OpenLink"; + }; + + /** + * OpenAs enum. + * @name google.apps.card.v1.OpenLink.OpenAs + * @enum {number} + * @property {number} FULL_SIZE=0 FULL_SIZE value + * @property {number} OVERLAY=1 OVERLAY value + */ + OpenLink.OpenAs = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FULL_SIZE"] = 0; + values[valuesById[1] = "OVERLAY"] = 1; + return values; + })(); + + /** + * OnClose enum. + * @name google.apps.card.v1.OpenLink.OnClose + * @enum {number} + * @property {number} NOTHING=0 NOTHING value + * @property {number} RELOAD=1 RELOAD value + */ + OpenLink.OnClose = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOTHING"] = 0; + values[valuesById[1] = "RELOAD"] = 1; + return values; + })(); + + return OpenLink; + })(); + + v1.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.apps.card.v1 + * @interface IAction + * @property {string|null} ["function"] Action function + * @property {Array.|null} [parameters] Action parameters + * @property {google.apps.card.v1.Action.LoadIndicator|null} [loadIndicator] Action loadIndicator + * @property {boolean|null} [persistValues] Action persistValues + * @property {google.apps.card.v1.Action.Interaction|null} [interaction] Action interaction + * @property {Array.|null} [requiredWidgets] Action requiredWidgets + * @property {boolean|null} [allWidgetsAreRequired] Action allWidgetsAreRequired + */ + + /** + * Constructs a new Action. + * @memberof google.apps.card.v1 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.apps.card.v1.IAction=} [properties] Properties to set + */ + function Action(properties) { + this.parameters = []; + this.requiredWidgets = []; + 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]]; + } + + /** + * Action function. + * @member {string} function + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype["function"] = ""; + + /** + * Action parameters. + * @member {Array.} parameters + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.parameters = $util.emptyArray; + + /** + * Action loadIndicator. + * @member {google.apps.card.v1.Action.LoadIndicator} loadIndicator + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.loadIndicator = 0; + + /** + * Action persistValues. + * @member {boolean} persistValues + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.persistValues = false; + + /** + * Action interaction. + * @member {google.apps.card.v1.Action.Interaction} interaction + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.interaction = 0; + + /** + * Action requiredWidgets. + * @member {Array.} requiredWidgets + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.requiredWidgets = $util.emptyArray; + + /** + * Action allWidgetsAreRequired. + * @member {boolean} allWidgetsAreRequired + * @memberof google.apps.card.v1.Action + * @instance + */ + Action.prototype.allWidgetsAreRequired = false; + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.Action + * @static + * @param {google.apps.card.v1.IAction=} [properties] Properties to set + * @returns {google.apps.card.v1.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.apps.card.v1.Action.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.Action + * @static + * @param {google.apps.card.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["function"]); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.apps.card.v1.Action.ActionParameter.encode(message.parameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.loadIndicator != null && Object.hasOwnProperty.call(message, "loadIndicator")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadIndicator); + if (message.persistValues != null && Object.hasOwnProperty.call(message, "persistValues")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.persistValues); + if (message.interaction != null && Object.hasOwnProperty.call(message, "interaction")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.interaction); + if (message.requiredWidgets != null && message.requiredWidgets.length) + for (var i = 0; i < message.requiredWidgets.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.requiredWidgets[i]); + if (message.allWidgetsAreRequired != null && Object.hasOwnProperty.call(message, "allWidgetsAreRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allWidgetsAreRequired); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.apps.card.v1.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.Action + * @static + * @param {google.apps.card.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message["function"] = reader.string(); + break; + } + case 2: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.apps.card.v1.Action.ActionParameter.decode(reader, reader.uint32())); + break; + } + case 3: { + message.loadIndicator = reader.int32(); + break; + } + case 4: { + message.persistValues = reader.bool(); + break; + } + case 5: { + message.interaction = reader.int32(); + break; + } + case 6: { + if (!(message.requiredWidgets && message.requiredWidgets.length)) + message.requiredWidgets = []; + message.requiredWidgets.push(reader.string()); + break; + } + case 7: { + message.allWidgetsAreRequired = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.apps.card.v1.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + if (!$util.isString(message["function"])) + return "function: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.apps.card.v1.Action.ActionParameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + if (message.loadIndicator != null && message.hasOwnProperty("loadIndicator")) + switch (message.loadIndicator) { + default: + return "loadIndicator: enum value expected"; + case 0: + case 1: + break; + } + if (message.persistValues != null && message.hasOwnProperty("persistValues")) + if (typeof message.persistValues !== "boolean") + return "persistValues: boolean expected"; + if (message.interaction != null && message.hasOwnProperty("interaction")) + switch (message.interaction) { + default: + return "interaction: enum value expected"; + case 0: + case 1: + break; + } + if (message.requiredWidgets != null && message.hasOwnProperty("requiredWidgets")) { + if (!Array.isArray(message.requiredWidgets)) + return "requiredWidgets: array expected"; + for (var i = 0; i < message.requiredWidgets.length; ++i) + if (!$util.isString(message.requiredWidgets[i])) + return "requiredWidgets: string[] expected"; + } + if (message.allWidgetsAreRequired != null && message.hasOwnProperty("allWidgetsAreRequired")) + if (typeof message.allWidgetsAreRequired !== "boolean") + return "allWidgetsAreRequired: boolean expected"; + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.Action + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Action) + return object; + var message = new $root.google.apps.card.v1.Action(); + if (object["function"] != null) + message["function"] = String(object["function"]); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.apps.card.v1.Action.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.apps.card.v1.Action.parameters: object expected"); + message.parameters[i] = $root.google.apps.card.v1.Action.ActionParameter.fromObject(object.parameters[i]); + } + } + switch (object.loadIndicator) { + default: + if (typeof object.loadIndicator === "number") { + message.loadIndicator = object.loadIndicator; + break; + } + break; + case "SPINNER": + case 0: + message.loadIndicator = 0; + break; + case "NONE": + case 1: + message.loadIndicator = 1; + break; + } + if (object.persistValues != null) + message.persistValues = Boolean(object.persistValues); + switch (object.interaction) { + default: + if (typeof object.interaction === "number") { + message.interaction = object.interaction; + break; + } + break; + case "INTERACTION_UNSPECIFIED": + case 0: + message.interaction = 0; + break; + case "OPEN_DIALOG": + case 1: + message.interaction = 1; + break; + } + if (object.requiredWidgets) { + if (!Array.isArray(object.requiredWidgets)) + throw TypeError(".google.apps.card.v1.Action.requiredWidgets: array expected"); + message.requiredWidgets = []; + for (var i = 0; i < object.requiredWidgets.length; ++i) + message.requiredWidgets[i] = String(object.requiredWidgets[i]); + } + if (object.allWidgetsAreRequired != null) + message.allWidgetsAreRequired = Boolean(object.allWidgetsAreRequired); + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.Action + * @static + * @param {google.apps.card.v1.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.parameters = []; + object.requiredWidgets = []; + } + if (options.defaults) { + object["function"] = ""; + object.loadIndicator = options.enums === String ? "SPINNER" : 0; + object.persistValues = false; + object.interaction = options.enums === String ? "INTERACTION_UNSPECIFIED" : 0; + object.allWidgetsAreRequired = false; + } + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = message["function"]; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.apps.card.v1.Action.ActionParameter.toObject(message.parameters[j], options); + } + if (message.loadIndicator != null && message.hasOwnProperty("loadIndicator")) + object.loadIndicator = options.enums === String ? $root.google.apps.card.v1.Action.LoadIndicator[message.loadIndicator] === undefined ? message.loadIndicator : $root.google.apps.card.v1.Action.LoadIndicator[message.loadIndicator] : message.loadIndicator; + if (message.persistValues != null && message.hasOwnProperty("persistValues")) + object.persistValues = message.persistValues; + if (message.interaction != null && message.hasOwnProperty("interaction")) + object.interaction = options.enums === String ? $root.google.apps.card.v1.Action.Interaction[message.interaction] === undefined ? message.interaction : $root.google.apps.card.v1.Action.Interaction[message.interaction] : message.interaction; + if (message.requiredWidgets && message.requiredWidgets.length) { + object.requiredWidgets = []; + for (var j = 0; j < message.requiredWidgets.length; ++j) + object.requiredWidgets[j] = message.requiredWidgets[j]; + } + if (message.allWidgetsAreRequired != null && message.hasOwnProperty("allWidgetsAreRequired")) + object.allWidgetsAreRequired = message.allWidgetsAreRequired; + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.apps.card.v1.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Action + * @function getTypeUrl + * @memberof google.apps.card.v1.Action + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.Action"; + }; + + Action.ActionParameter = (function() { + + /** + * Properties of an ActionParameter. + * @memberof google.apps.card.v1.Action + * @interface IActionParameter + * @property {string|null} [key] ActionParameter key + * @property {string|null} [value] ActionParameter value + */ + + /** + * Constructs a new ActionParameter. + * @memberof google.apps.card.v1.Action + * @classdesc Represents an ActionParameter. + * @implements IActionParameter + * @constructor + * @param {google.apps.card.v1.Action.IActionParameter=} [properties] Properties to set + */ + function ActionParameter(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]]; + } + + /** + * ActionParameter key. + * @member {string} key + * @memberof google.apps.card.v1.Action.ActionParameter + * @instance + */ + ActionParameter.prototype.key = ""; + + /** + * ActionParameter value. + * @member {string} value + * @memberof google.apps.card.v1.Action.ActionParameter + * @instance + */ + ActionParameter.prototype.value = ""; + + /** + * Creates a new ActionParameter instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {google.apps.card.v1.Action.IActionParameter=} [properties] Properties to set + * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter instance + */ + ActionParameter.create = function create(properties) { + return new ActionParameter(properties); + }; + + /** + * Encodes the specified ActionParameter message. Does not implicitly {@link google.apps.card.v1.Action.ActionParameter.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {google.apps.card.v1.Action.IActionParameter} message ActionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified ActionParameter message, length delimited. Does not implicitly {@link google.apps.card.v1.Action.ActionParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {google.apps.card.v1.Action.IActionParameter} message ActionParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionParameter message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionParameter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Action.ActionParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionParameter message. + * @function verify + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an ActionParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter + */ + ActionParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Action.ActionParameter) + return object; + var message = new $root.google.apps.card.v1.Action.ActionParameter(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an ActionParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {google.apps.card.v1.Action.ActionParameter} message ActionParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ActionParameter to JSON. + * @function toJSON + * @memberof google.apps.card.v1.Action.ActionParameter + * @instance + * @returns {Object.} JSON object + */ + ActionParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActionParameter + * @function getTypeUrl + * @memberof google.apps.card.v1.Action.ActionParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.Action.ActionParameter"; + }; + + return ActionParameter; + })(); + + /** + * LoadIndicator enum. + * @name google.apps.card.v1.Action.LoadIndicator + * @enum {number} + * @property {number} SPINNER=0 SPINNER value + * @property {number} NONE=1 NONE value + */ + Action.LoadIndicator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPINNER"] = 0; + values[valuesById[1] = "NONE"] = 1; + return values; + })(); + + /** + * Interaction enum. + * @name google.apps.card.v1.Action.Interaction + * @enum {number} + * @property {number} INTERACTION_UNSPECIFIED=0 INTERACTION_UNSPECIFIED value + * @property {number} OPEN_DIALOG=1 OPEN_DIALOG value + */ + Action.Interaction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPEN_DIALOG"] = 1; + return values; + })(); + + return Action; + })(); + + v1.Validation = (function() { + + /** + * Properties of a Validation. + * @memberof google.apps.card.v1 + * @interface IValidation + * @property {number|null} [characterLimit] Validation characterLimit + * @property {google.apps.card.v1.Validation.InputType|null} [inputType] Validation inputType + */ + + /** + * Constructs a new Validation. + * @memberof google.apps.card.v1 + * @classdesc Represents a Validation. + * @implements IValidation + * @constructor + * @param {google.apps.card.v1.IValidation=} [properties] Properties to set + */ + function Validation(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]]; + } + + /** + * Validation characterLimit. + * @member {number} characterLimit + * @memberof google.apps.card.v1.Validation + * @instance + */ + Validation.prototype.characterLimit = 0; + + /** + * Validation inputType. + * @member {google.apps.card.v1.Validation.InputType} inputType + * @memberof google.apps.card.v1.Validation + * @instance + */ + Validation.prototype.inputType = 0; + + /** + * Creates a new Validation instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.Validation + * @static + * @param {google.apps.card.v1.IValidation=} [properties] Properties to set + * @returns {google.apps.card.v1.Validation} Validation instance + */ + Validation.create = function create(properties) { + return new Validation(properties); + }; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.apps.card.v1.Validation.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.Validation + * @static + * @param {google.apps.card.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.characterLimit != null && Object.hasOwnProperty.call(message, "characterLimit")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.characterLimit); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inputType); + return writer; + }; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.apps.card.v1.Validation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.Validation + * @static + * @param {google.apps.card.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Validation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.characterLimit = reader.int32(); + break; + } + case 2: { + message.inputType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validation message. + * @function verify + * @memberof google.apps.card.v1.Validation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.characterLimit != null && message.hasOwnProperty("characterLimit")) + if (!$util.isInteger(message.characterLimit)) + return "characterLimit: integer expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + switch (message.inputType) { + default: + return "inputType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a Validation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.Validation * @static * @param {Object.} object Plain object - * @returns {google.apps.card.v1.OpenLink} OpenLink + * @returns {google.apps.card.v1.Validation} Validation */ - OpenLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.apps.card.v1.OpenLink) + Validation.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Validation) return object; - var message = new $root.google.apps.card.v1.OpenLink(); - if (object.url != null) - message.url = String(object.url); - switch (object.openAs) { + var message = new $root.google.apps.card.v1.Validation(); + if (object.characterLimit != null) + message.characterLimit = object.characterLimit | 0; + switch (object.inputType) { default: - if (typeof object.openAs === "number") { - message.openAs = object.openAs; + if (typeof object.inputType === "number") { + message.inputType = object.inputType; break; } break; - case "FULL_SIZE": + case "INPUT_TYPE_UNSPECIFIED": case 0: - message.openAs = 0; + message.inputType = 0; break; - case "OVERLAY": + case "TEXT": case 1: - message.openAs = 1; + message.inputType = 1; break; - } - switch (object.onClose) { - default: - if (typeof object.onClose === "number") { - message.onClose = object.onClose; - break; - } + case "INTEGER": + case 2: + message.inputType = 2; break; - case "NOTHING": - case 0: - message.onClose = 0; + case "FLOAT": + case 3: + message.inputType = 3; break; - case "RELOAD": - case 1: - message.onClose = 1; + case "EMAIL": + case 4: + message.inputType = 4; + break; + case "EMOJI_PICKER": + case 5: + message.inputType = 5; break; } return message; }; /** - * Creates a plain object from an OpenLink message. Also converts values to other types if specified. + * Creates a plain object from a Validation message. Also converts values to other types if specified. * @function toObject - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.Validation * @static - * @param {google.apps.card.v1.OpenLink} message OpenLink + * @param {google.apps.card.v1.Validation} message Validation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OpenLink.toObject = function toObject(message, options) { + Validation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.url = ""; - object.openAs = options.enums === String ? "FULL_SIZE" : 0; - object.onClose = options.enums === String ? "NOTHING" : 0; + object.characterLimit = 0; + object.inputType = options.enums === String ? "INPUT_TYPE_UNSPECIFIED" : 0; } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.openAs != null && message.hasOwnProperty("openAs")) - object.openAs = options.enums === String ? $root.google.apps.card.v1.OpenLink.OpenAs[message.openAs] === undefined ? message.openAs : $root.google.apps.card.v1.OpenLink.OpenAs[message.openAs] : message.openAs; - if (message.onClose != null && message.hasOwnProperty("onClose")) - object.onClose = options.enums === String ? $root.google.apps.card.v1.OpenLink.OnClose[message.onClose] === undefined ? message.onClose : $root.google.apps.card.v1.OpenLink.OnClose[message.onClose] : message.onClose; + if (message.characterLimit != null && message.hasOwnProperty("characterLimit")) + object.characterLimit = message.characterLimit; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = options.enums === String ? $root.google.apps.card.v1.Validation.InputType[message.inputType] === undefined ? message.inputType : $root.google.apps.card.v1.Validation.InputType[message.inputType] : message.inputType; return object; }; /** - * Converts this OpenLink to JSON. + * Converts this Validation to JSON. * @function toJSON - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.Validation * @instance * @returns {Object.} JSON object */ - OpenLink.prototype.toJSON = function toJSON() { + Validation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OpenLink + * Gets the default type url for Validation * @function getTypeUrl - * @memberof google.apps.card.v1.OpenLink + * @memberof google.apps.card.v1.Validation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OpenLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.apps.card.v1.OpenLink"; + return typeUrlPrefix + "/google.apps.card.v1.Validation"; }; /** - * OpenAs enum. - * @name google.apps.card.v1.OpenLink.OpenAs + * InputType enum. + * @name google.apps.card.v1.Validation.InputType * @enum {number} - * @property {number} FULL_SIZE=0 FULL_SIZE value - * @property {number} OVERLAY=1 OVERLAY value - */ - OpenLink.OpenAs = (function() { + * @property {number} INPUT_TYPE_UNSPECIFIED=0 INPUT_TYPE_UNSPECIFIED value + * @property {number} TEXT=1 TEXT value + * @property {number} INTEGER=2 INTEGER value + * @property {number} FLOAT=3 FLOAT value + * @property {number} EMAIL=4 EMAIL value + * @property {number} EMOJI_PICKER=5 EMOJI_PICKER value + */ + Validation.InputType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FULL_SIZE"] = 0; - values[valuesById[1] = "OVERLAY"] = 1; + values[valuesById[0] = "INPUT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "INTEGER"] = 2; + values[valuesById[3] = "FLOAT"] = 3; + values[valuesById[4] = "EMAIL"] = 4; + values[valuesById[5] = "EMOJI_PICKER"] = 5; return values; })(); + return Validation; + })(); + + v1.ChipList = (function() { + /** - * OnClose enum. - * @name google.apps.card.v1.OpenLink.OnClose + * Properties of a ChipList. + * @memberof google.apps.card.v1 + * @interface IChipList + * @property {google.apps.card.v1.ChipList.Layout|null} [layout] ChipList layout + * @property {Array.|null} [chips] ChipList chips + */ + + /** + * Constructs a new ChipList. + * @memberof google.apps.card.v1 + * @classdesc Represents a ChipList. + * @implements IChipList + * @constructor + * @param {google.apps.card.v1.IChipList=} [properties] Properties to set + */ + function ChipList(properties) { + this.chips = []; + 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]]; + } + + /** + * ChipList layout. + * @member {google.apps.card.v1.ChipList.Layout} layout + * @memberof google.apps.card.v1.ChipList + * @instance + */ + ChipList.prototype.layout = 0; + + /** + * ChipList chips. + * @member {Array.} chips + * @memberof google.apps.card.v1.ChipList + * @instance + */ + ChipList.prototype.chips = $util.emptyArray; + + /** + * Creates a new ChipList instance using the specified properties. + * @function create + * @memberof google.apps.card.v1.ChipList + * @static + * @param {google.apps.card.v1.IChipList=} [properties] Properties to set + * @returns {google.apps.card.v1.ChipList} ChipList instance + */ + ChipList.create = function create(properties) { + return new ChipList(properties); + }; + + /** + * Encodes the specified ChipList message. Does not implicitly {@link google.apps.card.v1.ChipList.verify|verify} messages. + * @function encode + * @memberof google.apps.card.v1.ChipList + * @static + * @param {google.apps.card.v1.IChipList} message ChipList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChipList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.layout != null && Object.hasOwnProperty.call(message, "layout")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.layout); + if (message.chips != null && message.chips.length) + for (var i = 0; i < message.chips.length; ++i) + $root.google.apps.card.v1.Chip.encode(message.chips[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChipList message, length delimited. Does not implicitly {@link google.apps.card.v1.ChipList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.apps.card.v1.ChipList + * @static + * @param {google.apps.card.v1.IChipList} message ChipList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChipList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChipList message from the specified reader or buffer. + * @function decode + * @memberof google.apps.card.v1.ChipList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.apps.card.v1.ChipList} ChipList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChipList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.ChipList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.layout = reader.int32(); + break; + } + case 2: { + if (!(message.chips && message.chips.length)) + message.chips = []; + message.chips.push($root.google.apps.card.v1.Chip.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChipList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.apps.card.v1.ChipList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.apps.card.v1.ChipList} ChipList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChipList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChipList message. + * @function verify + * @memberof google.apps.card.v1.ChipList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChipList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.layout != null && message.hasOwnProperty("layout")) + switch (message.layout) { + default: + return "layout: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.chips != null && message.hasOwnProperty("chips")) { + if (!Array.isArray(message.chips)) + return "chips: array expected"; + for (var i = 0; i < message.chips.length; ++i) { + var error = $root.google.apps.card.v1.Chip.verify(message.chips[i]); + if (error) + return "chips." + error; + } + } + return null; + }; + + /** + * Creates a ChipList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.apps.card.v1.ChipList + * @static + * @param {Object.} object Plain object + * @returns {google.apps.card.v1.ChipList} ChipList + */ + ChipList.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.ChipList) + return object; + var message = new $root.google.apps.card.v1.ChipList(); + switch (object.layout) { + default: + if (typeof object.layout === "number") { + message.layout = object.layout; + break; + } + break; + case "LAYOUT_UNSPECIFIED": + case 0: + message.layout = 0; + break; + case "WRAPPED": + case 1: + message.layout = 1; + break; + case "HORIZONTAL_SCROLLABLE": + case 2: + message.layout = 2; + break; + } + if (object.chips) { + if (!Array.isArray(object.chips)) + throw TypeError(".google.apps.card.v1.ChipList.chips: array expected"); + message.chips = []; + for (var i = 0; i < object.chips.length; ++i) { + if (typeof object.chips[i] !== "object") + throw TypeError(".google.apps.card.v1.ChipList.chips: object expected"); + message.chips[i] = $root.google.apps.card.v1.Chip.fromObject(object.chips[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChipList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.apps.card.v1.ChipList + * @static + * @param {google.apps.card.v1.ChipList} message ChipList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChipList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.chips = []; + if (options.defaults) + object.layout = options.enums === String ? "LAYOUT_UNSPECIFIED" : 0; + if (message.layout != null && message.hasOwnProperty("layout")) + object.layout = options.enums === String ? $root.google.apps.card.v1.ChipList.Layout[message.layout] === undefined ? message.layout : $root.google.apps.card.v1.ChipList.Layout[message.layout] : message.layout; + if (message.chips && message.chips.length) { + object.chips = []; + for (var j = 0; j < message.chips.length; ++j) + object.chips[j] = $root.google.apps.card.v1.Chip.toObject(message.chips[j], options); + } + return object; + }; + + /** + * Converts this ChipList to JSON. + * @function toJSON + * @memberof google.apps.card.v1.ChipList + * @instance + * @returns {Object.} JSON object + */ + ChipList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChipList + * @function getTypeUrl + * @memberof google.apps.card.v1.ChipList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChipList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.apps.card.v1.ChipList"; + }; + + /** + * Layout enum. + * @name google.apps.card.v1.ChipList.Layout * @enum {number} - * @property {number} NOTHING=0 NOTHING value - * @property {number} RELOAD=1 RELOAD value + * @property {number} LAYOUT_UNSPECIFIED=0 LAYOUT_UNSPECIFIED value + * @property {number} WRAPPED=1 WRAPPED value + * @property {number} HORIZONTAL_SCROLLABLE=2 HORIZONTAL_SCROLLABLE value */ - OpenLink.OnClose = (function() { + ChipList.Layout = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NOTHING"] = 0; - values[valuesById[1] = "RELOAD"] = 1; + values[valuesById[0] = "LAYOUT_UNSPECIFIED"] = 0; + values[valuesById[1] = "WRAPPED"] = 1; + values[valuesById[2] = "HORIZONTAL_SCROLLABLE"] = 2; return values; })(); - return OpenLink; + return ChipList; })(); - v1.Action = (function() { + v1.Chip = (function() { /** - * Properties of an Action. + * Properties of a Chip. * @memberof google.apps.card.v1 - * @interface IAction - * @property {string|null} ["function"] Action function - * @property {Array.|null} [parameters] Action parameters - * @property {google.apps.card.v1.Action.LoadIndicator|null} [loadIndicator] Action loadIndicator - * @property {boolean|null} [persistValues] Action persistValues - * @property {google.apps.card.v1.Action.Interaction|null} [interaction] Action interaction + * @interface IChip + * @property {google.apps.card.v1.IIcon|null} [icon] Chip icon + * @property {string|null} [label] Chip label + * @property {google.apps.card.v1.IOnClick|null} [onClick] Chip onClick + * @property {boolean|null} [enabled] Chip enabled + * @property {boolean|null} [disabled] Chip disabled + * @property {string|null} [altText] Chip altText */ /** - * Constructs a new Action. + * Constructs a new Chip. * @memberof google.apps.card.v1 - * @classdesc Represents an Action. - * @implements IAction + * @classdesc Represents a Chip. + * @implements IChip * @constructor - * @param {google.apps.card.v1.IAction=} [properties] Properties to set + * @param {google.apps.card.v1.IChip=} [properties] Properties to set */ - function Action(properties) { - this.parameters = []; + function Chip(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25443,136 +28852,147 @@ } /** - * Action function. - * @member {string} function - * @memberof google.apps.card.v1.Action + * Chip icon. + * @member {google.apps.card.v1.IIcon|null|undefined} icon + * @memberof google.apps.card.v1.Chip * @instance */ - Action.prototype["function"] = ""; + Chip.prototype.icon = null; /** - * Action parameters. - * @member {Array.} parameters - * @memberof google.apps.card.v1.Action + * Chip label. + * @member {string} label + * @memberof google.apps.card.v1.Chip + * @instance + */ + Chip.prototype.label = ""; + + /** + * Chip onClick. + * @member {google.apps.card.v1.IOnClick|null|undefined} onClick + * @memberof google.apps.card.v1.Chip * @instance */ - Action.prototype.parameters = $util.emptyArray; + Chip.prototype.onClick = null; /** - * Action loadIndicator. - * @member {google.apps.card.v1.Action.LoadIndicator} loadIndicator - * @memberof google.apps.card.v1.Action + * Chip enabled. + * @member {boolean} enabled + * @memberof google.apps.card.v1.Chip * @instance */ - Action.prototype.loadIndicator = 0; + Chip.prototype.enabled = false; /** - * Action persistValues. - * @member {boolean} persistValues - * @memberof google.apps.card.v1.Action + * Chip disabled. + * @member {boolean} disabled + * @memberof google.apps.card.v1.Chip * @instance */ - Action.prototype.persistValues = false; + Chip.prototype.disabled = false; /** - * Action interaction. - * @member {google.apps.card.v1.Action.Interaction} interaction - * @memberof google.apps.card.v1.Action + * Chip altText. + * @member {string} altText + * @memberof google.apps.card.v1.Chip * @instance */ - Action.prototype.interaction = 0; + Chip.prototype.altText = ""; /** - * Creates a new Action instance using the specified properties. + * Creates a new Chip instance using the specified properties. * @function create - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static - * @param {google.apps.card.v1.IAction=} [properties] Properties to set - * @returns {google.apps.card.v1.Action} Action instance + * @param {google.apps.card.v1.IChip=} [properties] Properties to set + * @returns {google.apps.card.v1.Chip} Chip instance */ - Action.create = function create(properties) { - return new Action(properties); + Chip.create = function create(properties) { + return new Chip(properties); }; /** - * Encodes the specified Action message. Does not implicitly {@link google.apps.card.v1.Action.verify|verify} messages. + * Encodes the specified Chip message. Does not implicitly {@link google.apps.card.v1.Chip.verify|verify} messages. * @function encode - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static - * @param {google.apps.card.v1.IAction} message Action message or plain object to encode + * @param {google.apps.card.v1.IChip} message Chip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Action.encode = function encode(message, writer) { + Chip.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message["function"]); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.apps.card.v1.Action.ActionParameter.encode(message.parameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.loadIndicator != null && Object.hasOwnProperty.call(message, "loadIndicator")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadIndicator); - if (message.persistValues != null && Object.hasOwnProperty.call(message, "persistValues")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.persistValues); - if (message.interaction != null && Object.hasOwnProperty.call(message, "interaction")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.interaction); + if (message.icon != null && Object.hasOwnProperty.call(message, "icon")) + $root.google.apps.card.v1.Icon.encode(message.icon, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.label); + if (message.onClick != null && Object.hasOwnProperty.call(message, "onClick")) + $root.google.apps.card.v1.OnClick.encode(message.onClick, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); + if (message.altText != null && Object.hasOwnProperty.call(message, "altText")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.altText); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disabled); return writer; }; /** - * Encodes the specified Action message, length delimited. Does not implicitly {@link google.apps.card.v1.Action.verify|verify} messages. + * Encodes the specified Chip message, length delimited. Does not implicitly {@link google.apps.card.v1.Chip.verify|verify} messages. * @function encodeDelimited - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static - * @param {google.apps.card.v1.IAction} message Action message or plain object to encode + * @param {google.apps.card.v1.IChip} message Chip message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Action.encodeDelimited = function encodeDelimited(message, writer) { + Chip.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Action message from the specified reader or buffer. + * Decodes a Chip message from the specified reader or buffer. * @function decode - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.apps.card.v1.Action} Action + * @returns {google.apps.card.v1.Chip} Chip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Action.decode = function decode(reader, length, error) { + Chip.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Action(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Chip(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message["function"] = reader.string(); + message.icon = $root.google.apps.card.v1.Icon.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.apps.card.v1.Action.ActionParameter.decode(reader, reader.uint32())); + message.label = reader.string(); break; } case 3: { - message.loadIndicator = reader.int32(); + message.onClick = $root.google.apps.card.v1.OnClick.decode(reader, reader.uint32()); break; } case 4: { - message.persistValues = reader.bool(); + message.enabled = reader.bool(); + break; + } + case 6: { + message.disabled = reader.bool(); break; } case 5: { - message.interaction = reader.int32(); + message.altText = reader.string(); break; } default: @@ -25584,448 +29004,153 @@ }; /** - * Decodes an Action message from the specified reader or buffer, length delimited. + * Decodes a Chip message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.apps.card.v1.Action} Action + * @returns {google.apps.card.v1.Chip} Chip * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Action.decodeDelimited = function decodeDelimited(reader) { + Chip.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Action message. + * Verifies a Chip message. * @function verify - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Action.verify = function verify(message) { + Chip.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message["function"] != null && message.hasOwnProperty("function")) - if (!$util.isString(message["function"])) - return "function: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.apps.card.v1.Action.ActionParameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } + if (message.icon != null && message.hasOwnProperty("icon")) { + var error = $root.google.apps.card.v1.Icon.verify(message.icon); + if (error) + return "icon." + error; } - if (message.loadIndicator != null && message.hasOwnProperty("loadIndicator")) - switch (message.loadIndicator) { - default: - return "loadIndicator: enum value expected"; - case 0: - case 1: - break; - } - if (message.persistValues != null && message.hasOwnProperty("persistValues")) - if (typeof message.persistValues !== "boolean") - return "persistValues: boolean expected"; - if (message.interaction != null && message.hasOwnProperty("interaction")) - switch (message.interaction) { - default: - return "interaction: enum value expected"; - case 0: - case 1: - break; - } + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.onClick != null && message.hasOwnProperty("onClick")) { + var error = $root.google.apps.card.v1.OnClick.verify(message.onClick); + if (error) + return "onClick." + error; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.altText != null && message.hasOwnProperty("altText")) + if (!$util.isString(message.altText)) + return "altText: string expected"; return null; }; /** - * Creates an Action message from a plain object. Also converts values to their respective internal types. + * Creates a Chip message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static * @param {Object.} object Plain object - * @returns {google.apps.card.v1.Action} Action + * @returns {google.apps.card.v1.Chip} Chip */ - Action.fromObject = function fromObject(object) { - if (object instanceof $root.google.apps.card.v1.Action) + Chip.fromObject = function fromObject(object) { + if (object instanceof $root.google.apps.card.v1.Chip) return object; - var message = new $root.google.apps.card.v1.Action(); - if (object["function"] != null) - message["function"] = String(object["function"]); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.apps.card.v1.Action.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.apps.card.v1.Action.parameters: object expected"); - message.parameters[i] = $root.google.apps.card.v1.Action.ActionParameter.fromObject(object.parameters[i]); - } - } - switch (object.loadIndicator) { - default: - if (typeof object.loadIndicator === "number") { - message.loadIndicator = object.loadIndicator; - break; - } - break; - case "SPINNER": - case 0: - message.loadIndicator = 0; - break; - case "NONE": - case 1: - message.loadIndicator = 1; - break; + var message = new $root.google.apps.card.v1.Chip(); + if (object.icon != null) { + if (typeof object.icon !== "object") + throw TypeError(".google.apps.card.v1.Chip.icon: object expected"); + message.icon = $root.google.apps.card.v1.Icon.fromObject(object.icon); } - if (object.persistValues != null) - message.persistValues = Boolean(object.persistValues); - switch (object.interaction) { - default: - if (typeof object.interaction === "number") { - message.interaction = object.interaction; - break; - } - break; - case "INTERACTION_UNSPECIFIED": - case 0: - message.interaction = 0; - break; - case "OPEN_DIALOG": - case 1: - message.interaction = 1; - break; + if (object.label != null) + message.label = String(object.label); + if (object.onClick != null) { + if (typeof object.onClick !== "object") + throw TypeError(".google.apps.card.v1.Chip.onClick: object expected"); + message.onClick = $root.google.apps.card.v1.OnClick.fromObject(object.onClick); } + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.altText != null) + message.altText = String(object.altText); return message; }; /** - * Creates a plain object from an Action message. Also converts values to other types if specified. + * Creates a plain object from a Chip message. Also converts values to other types if specified. * @function toObject - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static - * @param {google.apps.card.v1.Action} message Action + * @param {google.apps.card.v1.Chip} message Chip * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Action.toObject = function toObject(message, options) { + Chip.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; if (options.defaults) { - object["function"] = ""; - object.loadIndicator = options.enums === String ? "SPINNER" : 0; - object.persistValues = false; - object.interaction = options.enums === String ? "INTERACTION_UNSPECIFIED" : 0; - } - if (message["function"] != null && message.hasOwnProperty("function")) - object["function"] = message["function"]; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.apps.card.v1.Action.ActionParameter.toObject(message.parameters[j], options); + object.icon = null; + object.label = ""; + object.onClick = null; + object.enabled = false; + object.altText = ""; + object.disabled = false; } - if (message.loadIndicator != null && message.hasOwnProperty("loadIndicator")) - object.loadIndicator = options.enums === String ? $root.google.apps.card.v1.Action.LoadIndicator[message.loadIndicator] === undefined ? message.loadIndicator : $root.google.apps.card.v1.Action.LoadIndicator[message.loadIndicator] : message.loadIndicator; - if (message.persistValues != null && message.hasOwnProperty("persistValues")) - object.persistValues = message.persistValues; - if (message.interaction != null && message.hasOwnProperty("interaction")) - object.interaction = options.enums === String ? $root.google.apps.card.v1.Action.Interaction[message.interaction] === undefined ? message.interaction : $root.google.apps.card.v1.Action.Interaction[message.interaction] : message.interaction; + if (message.icon != null && message.hasOwnProperty("icon")) + object.icon = $root.google.apps.card.v1.Icon.toObject(message.icon, options); + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.onClick != null && message.hasOwnProperty("onClick")) + object.onClick = $root.google.apps.card.v1.OnClick.toObject(message.onClick, options); + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.altText != null && message.hasOwnProperty("altText")) + object.altText = message.altText; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; return object; }; /** - * Converts this Action to JSON. + * Converts this Chip to JSON. * @function toJSON - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @instance * @returns {Object.} JSON object */ - Action.prototype.toJSON = function toJSON() { + Chip.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Action + * Gets the default type url for Chip * @function getTypeUrl - * @memberof google.apps.card.v1.Action + * @memberof google.apps.card.v1.Chip * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Chip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.apps.card.v1.Action"; + return typeUrlPrefix + "/google.apps.card.v1.Chip"; }; - Action.ActionParameter = (function() { - - /** - * Properties of an ActionParameter. - * @memberof google.apps.card.v1.Action - * @interface IActionParameter - * @property {string|null} [key] ActionParameter key - * @property {string|null} [value] ActionParameter value - */ - - /** - * Constructs a new ActionParameter. - * @memberof google.apps.card.v1.Action - * @classdesc Represents an ActionParameter. - * @implements IActionParameter - * @constructor - * @param {google.apps.card.v1.Action.IActionParameter=} [properties] Properties to set - */ - function ActionParameter(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]]; - } - - /** - * ActionParameter key. - * @member {string} key - * @memberof google.apps.card.v1.Action.ActionParameter - * @instance - */ - ActionParameter.prototype.key = ""; - - /** - * ActionParameter value. - * @member {string} value - * @memberof google.apps.card.v1.Action.ActionParameter - * @instance - */ - ActionParameter.prototype.value = ""; - - /** - * Creates a new ActionParameter instance using the specified properties. - * @function create - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {google.apps.card.v1.Action.IActionParameter=} [properties] Properties to set - * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter instance - */ - ActionParameter.create = function create(properties) { - return new ActionParameter(properties); - }; - - /** - * Encodes the specified ActionParameter message. Does not implicitly {@link google.apps.card.v1.Action.ActionParameter.verify|verify} messages. - * @function encode - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {google.apps.card.v1.Action.IActionParameter} message ActionParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionParameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified ActionParameter message, length delimited. Does not implicitly {@link google.apps.card.v1.Action.ActionParameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {google.apps.card.v1.Action.IActionParameter} message ActionParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActionParameter message from the specified reader or buffer. - * @function decode - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionParameter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.apps.card.v1.Action.ActionParameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActionParameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionParameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActionParameter message. - * @function verify - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActionParameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an ActionParameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {Object.} object Plain object - * @returns {google.apps.card.v1.Action.ActionParameter} ActionParameter - */ - ActionParameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.apps.card.v1.Action.ActionParameter) - return object; - var message = new $root.google.apps.card.v1.Action.ActionParameter(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an ActionParameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {google.apps.card.v1.Action.ActionParameter} message ActionParameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActionParameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.value = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this ActionParameter to JSON. - * @function toJSON - * @memberof google.apps.card.v1.Action.ActionParameter - * @instance - * @returns {Object.} JSON object - */ - ActionParameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActionParameter - * @function getTypeUrl - * @memberof google.apps.card.v1.Action.ActionParameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActionParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.apps.card.v1.Action.ActionParameter"; - }; - - return ActionParameter; - })(); - - /** - * LoadIndicator enum. - * @name google.apps.card.v1.Action.LoadIndicator - * @enum {number} - * @property {number} SPINNER=0 SPINNER value - * @property {number} NONE=1 NONE value - */ - Action.LoadIndicator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPINNER"] = 0; - values[valuesById[1] = "NONE"] = 1; - return values; - })(); - - /** - * Interaction enum. - * @name google.apps.card.v1.Action.Interaction - * @enum {number} - * @property {number} INTERACTION_UNSPECIFIED=0 INTERACTION_UNSPECIFIED value - * @property {number} OPEN_DIALOG=1 OPEN_DIALOG value - */ - Action.Interaction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTERACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPEN_DIALOG"] = 1; - return values; - })(); - - return Action; + return Chip; })(); return v1; @@ -36172,6 +39297,7 @@ case 0: case 1: case 2: + case 4: break; } if (message.member != null && message.hasOwnProperty("member")) { @@ -36262,6 +39388,10 @@ case 2: message.role = 2; break; + case "ROLE_ASSISTANT_MANAGER": + case 4: + message.role = 4; + break; } if (object.member != null) { if (typeof object.member !== "object") @@ -36380,12 +39510,14 @@ * @property {number} MEMBERSHIP_ROLE_UNSPECIFIED=0 MEMBERSHIP_ROLE_UNSPECIFIED value * @property {number} ROLE_MEMBER=1 ROLE_MEMBER value * @property {number} ROLE_MANAGER=2 ROLE_MANAGER value + * @property {number} ROLE_ASSISTANT_MANAGER=4 ROLE_ASSISTANT_MANAGER value */ Membership.MembershipRole = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "MEMBERSHIP_ROLE_UNSPECIFIED"] = 0; values[valuesById[1] = "ROLE_MEMBER"] = 1; values[valuesById[2] = "ROLE_MANAGER"] = 2; + values[valuesById[4] = "ROLE_ASSISTANT_MANAGER"] = 4; return values; })(); @@ -50764,6 +53896,7 @@ * @memberof google.chat.v1.Space * @interface IPermissionSetting * @property {boolean|null} [managersAllowed] PermissionSetting managersAllowed + * @property {boolean|null} [assistantManagersAllowed] PermissionSetting assistantManagersAllowed * @property {boolean|null} [membersAllowed] PermissionSetting membersAllowed */ @@ -50790,6 +53923,14 @@ */ PermissionSetting.prototype.managersAllowed = false; + /** + * PermissionSetting assistantManagersAllowed. + * @member {boolean|null|undefined} assistantManagersAllowed + * @memberof google.chat.v1.Space.PermissionSetting + * @instance + */ + PermissionSetting.prototype.assistantManagersAllowed = null; + /** * PermissionSetting membersAllowed. * @member {boolean} membersAllowed @@ -50798,6 +53939,15 @@ */ PermissionSetting.prototype.membersAllowed = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PermissionSetting.prototype, "_assistantManagersAllowed", { + get: $util.oneOfGetter($oneOfFields = ["assistantManagersAllowed"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PermissionSetting instance using the specified properties. * @function create @@ -50826,6 +53976,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.managersAllowed); if (message.membersAllowed != null && Object.hasOwnProperty.call(message, "membersAllowed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.membersAllowed); + if (message.assistantManagersAllowed != null && Object.hasOwnProperty.call(message, "assistantManagersAllowed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.assistantManagersAllowed); return writer; }; @@ -50866,6 +54018,10 @@ message.managersAllowed = reader.bool(); break; } + case 3: { + message.assistantManagersAllowed = reader.bool(); + break; + } case 2: { message.membersAllowed = reader.bool(); break; @@ -50905,9 +54061,15 @@ PermissionSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.managersAllowed != null && message.hasOwnProperty("managersAllowed")) if (typeof message.managersAllowed !== "boolean") return "managersAllowed: boolean expected"; + if (message.assistantManagersAllowed != null && message.hasOwnProperty("assistantManagersAllowed")) { + properties._assistantManagersAllowed = 1; + if (typeof message.assistantManagersAllowed !== "boolean") + return "assistantManagersAllowed: boolean expected"; + } if (message.membersAllowed != null && message.hasOwnProperty("membersAllowed")) if (typeof message.membersAllowed !== "boolean") return "membersAllowed: boolean expected"; @@ -50928,6 +54090,8 @@ var message = new $root.google.chat.v1.Space.PermissionSetting(); if (object.managersAllowed != null) message.managersAllowed = Boolean(object.managersAllowed); + if (object.assistantManagersAllowed != null) + message.assistantManagersAllowed = Boolean(object.assistantManagersAllowed); if (object.membersAllowed != null) message.membersAllowed = Boolean(object.membersAllowed); return message; @@ -50954,6 +54118,11 @@ object.managersAllowed = message.managersAllowed; if (message.membersAllowed != null && message.hasOwnProperty("membersAllowed")) object.membersAllowed = message.membersAllowed; + if (message.assistantManagersAllowed != null && message.hasOwnProperty("assistantManagersAllowed")) { + object.assistantManagersAllowed = message.assistantManagersAllowed; + if (options.oneofs) + object._assistantManagersAllowed = "assistantManagersAllowed"; + } return object; }; diff --git a/packages/google-chat/protos/protos.json b/packages/google-chat/protos/protos.json index fc963b4f2198..6e59678849bd 100644 --- a/packages/google-chat/protos/protos.json +++ b/packages/google-chat/protos/protos.json @@ -1518,6 +1518,10 @@ "uncollapsibleWidgetsCount": { "type": "int32", "id": 6 + }, + "collapseControl": { + "type": "CollapseControl", + "id": 8 } } }, @@ -1540,6 +1544,31 @@ } } }, + "NestedWidget": { + "oneofs": { + "data": { + "oneof": [ + "textParagraph", + "buttonList", + "image" + ] + } + }, + "fields": { + "textParagraph": { + "type": "TextParagraph", + "id": 1 + }, + "buttonList": { + "type": "ButtonList", + "id": 3 + }, + "image": { + "type": "Image", + "id": 10 + } + } + }, "CardFixedFooter": { "fields": { "primaryButton": { @@ -1574,7 +1603,9 @@ "dateTimePicker", "divider", "grid", - "columns" + "columns", + "carousel", + "chipList" ] } }, @@ -1619,6 +1650,14 @@ "type": "Columns", "id": 11 }, + "carousel": { + "type": "Carousel", + "id": 13 + }, + "chipList": { + "type": "ChipList", + "id": 14 + }, "horizontalAlignment": { "type": "HorizontalAlignment", "id": 8 @@ -1638,6 +1677,14 @@ "CENTER": 2, "END": 3 } + }, + "VerticalAlignment": { + "values": { + "VERTICAL_ALIGNMENT_UNSPECIFIED": 0, + "TOP": 1, + "MIDDLE": 2, + "BOTTOM": 3 + } } } }, @@ -1646,6 +1693,23 @@ "text": { "type": "string", "id": 1 + }, + "maxLines": { + "type": "int32", + "id": 2 + }, + "textSyntax": { + "type": "TextSyntax", + "id": 4 + } + }, + "nested": { + "TextSyntax": { + "values": { + "TEXT_SYNTAX_UNSPECIFIED": 0, + "HTML": 1, + "MARKDOWN": 2 + } } } }, @@ -1690,14 +1754,26 @@ "type": "Icon", "id": 12 }, + "startIconVerticalAlignment": { + "type": "Widget.VerticalAlignment", + "id": 13 + }, "topLabel": { "type": "string", "id": 3 }, + "topLabelText": { + "type": "TextParagraph", + "id": 17 + }, "text": { "type": "string", "id": 4 }, + "contentText": { + "type": "TextParagraph", + "id": 18 + }, "wrapText": { "type": "bool", "id": 5 @@ -1706,6 +1782,10 @@ "type": "string", "id": 6 }, + "bottomLabelText": { + "type": "TextParagraph", + "id": 19 + }, "onClick": { "type": "OnClick", "id": 7 @@ -1793,6 +1873,10 @@ "type": "Action", "id": 8 }, + "validation": { + "type": "Validation", + "id": 11 + }, "placeholderText": { "type": "string", "id": 12 @@ -1844,6 +1928,11 @@ }, "SelectionInput": { "oneofs": { + "_multiSelectMaxSelectedItems": { + "oneof": [ + "multiSelectMaxSelectedItems" + ] + }, "multiSelectDataSource": { "oneof": [ "externalDataSource", @@ -1875,7 +1964,10 @@ }, "multiSelectMaxSelectedItems": { "type": "int32", - "id": 6 + "id": 6, + "options": { + "proto3_optional": true + } }, "multiSelectMinQueryLength": { "type": "int32", @@ -1901,6 +1993,13 @@ } }, "SelectionItem": { + "oneofs": { + "startIcon": { + "oneof": [ + "startIconUri" + ] + } + }, "fields": { "text": { "type": "string", @@ -1950,6 +2049,13 @@ } }, "DateTimePicker": { + "oneofs": { + "_valueMsEpoch": { + "oneof": [ + "valueMsEpoch" + ] + } + }, "fields": { "name": { "type": "string", @@ -1965,7 +2071,10 @@ }, "valueMsEpoch": { "type": "int64", - "id": 4 + "id": 4, + "options": { + "proto3_optional": true + } }, "timezoneOffsetDate": { "type": "int32", @@ -1986,6 +2095,37 @@ } } }, + "OverflowMenu": { + "fields": { + "items": { + "rule": "repeated", + "type": "OverflowMenuItem", + "id": 1 + } + }, + "nested": { + "OverflowMenuItem": { + "fields": { + "startIcon": { + "type": "Icon", + "id": 1 + }, + "text": { + "type": "string", + "id": 2 + }, + "onClick": { + "type": "OnClick", + "id": 3 + }, + "disabled": { + "type": "bool", + "id": 4 + } + } + } + } + }, "Button": { "fields": { "text": { @@ -2011,6 +2151,21 @@ "altText": { "type": "string", "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "OUTLINED": 1, + "FILLED": 2, + "FILLED_TONAL": 3, + "BORDERLESS": 4 + } } } }, @@ -2250,7 +2405,8 @@ "buttonList", "textInput", "selectionInput", - "dateTimePicker" + "dateTimePicker", + "chipList" ] } }, @@ -2282,6 +2438,10 @@ "dateTimePicker": { "type": "DateTimePicker", "id": 7 + }, + "chipList": { + "type": "ChipList", + "id": 8 } } } @@ -2289,6 +2449,47 @@ } } }, + "Carousel": { + "fields": { + "carouselCards": { + "rule": "repeated", + "type": "CarouselCard", + "id": 4 + } + }, + "nested": { + "CarouselCard": { + "fields": { + "widgets": { + "rule": "repeated", + "type": "Card.NestedWidget", + "id": 1 + }, + "footerWidgets": { + "rule": "repeated", + "type": "Card.NestedWidget", + "id": 2 + } + } + } + } + }, + "CollapseControl": { + "fields": { + "horizontalAlignment": { + "type": "Widget.HorizontalAlignment", + "id": 1 + }, + "expandButton": { + "type": "Button", + "id": 2 + }, + "collapseButton": { + "type": "Button", + "id": 3 + } + } + }, "OnClick": { "oneofs": { "data": { @@ -2296,7 +2497,8 @@ "action", "openLink", "openDynamicLinkAction", - "card" + "card", + "overflowMenu" ] } }, @@ -2316,6 +2518,10 @@ "card": { "type": "Card", "id": 4 + }, + "overflowMenu": { + "type": "OverflowMenu", + "id": 8 } } }, @@ -2371,6 +2577,15 @@ "interaction": { "type": "Interaction", "id": 5 + }, + "requiredWidgets": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "allWidgetsAreRequired": { + "type": "bool", + "id": 7 } }, "nested": { @@ -2399,6 +2614,83 @@ } } } + }, + "Validation": { + "fields": { + "characterLimit": { + "type": "int32", + "id": 1 + }, + "inputType": { + "type": "InputType", + "id": 2 + } + }, + "nested": { + "InputType": { + "values": { + "INPUT_TYPE_UNSPECIFIED": 0, + "TEXT": 1, + "INTEGER": 2, + "FLOAT": 3, + "EMAIL": 4, + "EMOJI_PICKER": 5 + } + } + } + }, + "ChipList": { + "fields": { + "layout": { + "type": "Layout", + "id": 1 + }, + "chips": { + "rule": "repeated", + "type": "Chip", + "id": 2 + } + }, + "nested": { + "Layout": { + "values": { + "LAYOUT_UNSPECIFIED": 0, + "WRAPPED": 1, + "HORIZONTAL_SCROLLABLE": 2 + } + } + } + }, + "Chip": { + "fields": { + "icon": { + "type": "Icon", + "id": 1 + }, + "label": { + "type": "string", + "id": 2 + }, + "onClick": { + "type": "OnClick", + "id": 3 + }, + "enabled": { + "type": "bool", + "id": 4, + "options": { + "deprecated": true + } + }, + "disabled": { + "type": "bool", + "id": 6 + }, + "altText": { + "type": "string", + "id": 5 + } + } } } } @@ -3932,7 +4224,8 @@ "values": { "MEMBERSHIP_ROLE_UNSPECIFIED": 0, "ROLE_MEMBER": 1, - "ROLE_MANAGER": 2 + "ROLE_MANAGER": 2, + "ROLE_ASSISTANT_MANAGER": 4 } } } @@ -5417,6 +5710,13 @@ } }, "PermissionSetting": { + "oneofs": { + "_assistantManagersAllowed": { + "oneof": [ + "assistantManagersAllowed" + ] + } + }, "fields": { "managersAllowed": { "type": "bool", @@ -5425,6 +5725,14 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "assistantManagersAllowed": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "membersAllowed": { "type": "bool", "id": 2, diff --git a/packages/google-chat/samples/package.json b/packages/google-chat/samples/package.json index 057cb851930a..3dedee360f8e 100644 --- a/packages/google-chat/samples/package.json +++ b/packages/google-chat/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-apps/chat": "^0.19.1" + "@google-apps/chat": "^0.21.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index e98ac1a097ee..92635868a122 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,50 @@ # Changelog +## [5.14.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.13.0...aiplatform-v5.14.0) (2025-11-21) + + +### Features + +* Add `ReplicatedVoiceConfig` to `VoiceConfig` to enable Gemini TTS voice replication ([#6899](https://github.com/googleapis/google-cloud-node/issues/6899)) ([beb5cac](https://github.com/googleapis/google-cloud-node/commit/beb5cac2dbd8cad292d67e3641306824c3ecab85)) +* Add support for developer connect based deployment ([#6900](https://github.com/googleapis/google-cloud-node/issues/6900)) ([7b6c79b](https://github.com/googleapis/google-cloud-node/commit/7b6c79b20551dde858cd932174c1fb558408172f)) + +## [5.13.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.12.0...aiplatform-v5.13.0) (2025-11-11) + + +### Features + +* Add order_by to list_events ([#6864](https://github.com/googleapis/google-cloud-node/issues/6864)) ([8d71bbf](https://github.com/googleapis/google-cloud-node/commit/8d71bbf30bc7ae1a54a3e37b8740d46dfbe418dd)) + +## [5.12.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.11.0...aiplatform-v5.12.0) (2025-10-25) + + +### Features + +* Add EmbedContent method v1 ([#6844](https://github.com/googleapis/google-cloud-node/issues/6844)) ([da2c718](https://github.com/googleapis/google-cloud-node/commit/da2c71816dc16c6ec4d64d74b7913ae5e399a0bc)) + +## [5.11.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.10.0...aiplatform-v5.11.0) (2025-10-23) + + +### Features + +* Add EmbedContent method v1beta1 ([#6833](https://github.com/googleapis/google-cloud-node/issues/6833)) ([8a7ce8e](https://github.com/googleapis/google-cloud-node/commit/8a7ce8e898273557543277bcdb664d5aee9183ce)) + +## [5.10.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.9.0...aiplatform-v5.10.0) (2025-10-21) + + +### Features + +* Add FunctionResponsePart and excluded_predefined_functions in ComputerUse ([#6825](https://github.com/googleapis/google-cloud-node/issues/6825)) ([0d3274e](https://github.com/googleapis/google-cloud-node/commit/0d3274e0fa00cf2cf9cc15488b2f33672a97fe00)) +* Add FunctionResponsePart and excluded_predefined_functions in ComputerUse ([#6829](https://github.com/googleapis/google-cloud-node/issues/6829)) ([6001de8](https://github.com/googleapis/google-cloud-node/commit/6001de8c9b62274d067b58b346e835c97dc249ea)) + +## [5.9.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.8.0...aiplatform-v5.9.0) (2025-10-16) + + +### Features + +* Add aspect_ratio and image_config for v1 version ([#6817](https://github.com/googleapis/google-cloud-node/issues/6817)) ([9f40bf1](https://github.com/googleapis/google-cloud-node/commit/9f40bf125a2e32fee4da4cd391265e9d4b380bcd)) +* Add aspect_ratio and image_config for v1beta1 version ([#6814](https://github.com/googleapis/google-cloud-node/issues/6814)) ([8d38a09](https://github.com/googleapis/google-cloud-node/commit/8d38a0919218be1c4ba6de4e283786facf2eb0b4)) + ## [5.8.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v5.7.0...aiplatform-v5.8.0) (2025-10-13) diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 8938b00fe0c8..0199bd9a10b1 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -304,6 +304,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list training pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_training_pipelines.js) | | direct predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.direct_predict.js) | | direct raw predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.direct_raw_predict.js) | +| embed content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.embed_content.js) | | explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.explain.js) | | generate content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.generate_content.js) | | predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.predict.js) | @@ -693,6 +694,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | count tokens | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.count_tokens.js) | | direct predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.direct_predict.js) | | direct raw predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.direct_raw_predict.js) | +| embed content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.embed_content.js) | | explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.explain.js) | | generate content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.generate_content.js) | | predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.predict.js) | diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 20059947647d..4b6cd75f0608 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "5.8.0", + "version": "5.14.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto index ec9e47608bad..3f4e89d143f7 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto @@ -184,6 +184,83 @@ message VideoMetadata { [(google.api.field_behavior) = OPTIONAL]; } +// Configuration for a prebuilt voice. +message PrebuiltVoiceConfig { + // The name of the prebuilt voice to use. + optional string voice_name = 1; +} + +// The configuration for the replicated voice to use. +message ReplicatedVoiceConfig { + // Optional. The mimetype of the voice sample. Currently only + // mime_type=audio/pcm is supported, which is raw mono 16-bit signed + // little-endian pcm data, with 24k sampling rate. + string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sample of the custom voice. + bytes voice_sample_audio = 2 [(google.api.field_behavior) = OPTIONAL]; +} + + +// Configuration for a voice. +message VoiceConfig { + // The configuration for the speaker to use. + oneof voice_config { + // The configuration for a prebuilt voice. + PrebuiltVoiceConfig prebuilt_voice_config = 1; + + // Optional. The configuration for a replicated voice. This enables users to + // replicate a voice from an audio sample. + ReplicatedVoiceConfig replicated_voice_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Configuration for a single speaker in a multi-speaker setup. +message SpeakerVoiceConfig { + // Required. The name of the speaker. This should be the same as the speaker + // name used in the prompt. + string speaker = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The configuration for the voice of this speaker. + VoiceConfig voice_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for a multi-speaker text-to-speech request. +message MultiSpeakerVoiceConfig { + // Required. A list of configurations for the voices of the speakers. Exactly + // two speaker voice configurations must be provided. + repeated SpeakerVoiceConfig speaker_voice_configs = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for speech generation. +message SpeechConfig { + // The configuration for the voice to use. + VoiceConfig voice_config = 1; + + // Optional. The language code (ISO 639-1) for the speech synthesis. + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The configuration for a multi-speaker text-to-speech request. + // This field is mutually exclusive with `voice_config`. + MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; +} + +// Config for image generation features. +message ImageConfig { + // Optional. The desired aspect ratio for the generated images. The following + // aspect ratios are supported: + // + // "1:1" + // "2:3", "3:2" + // "3:4", "4:3" + // "4:5", "5:4" + // "9:16", "16:9" + // "21:9" + optional string aspect_ratio = 2 [(google.api.field_behavior) = OPTIONAL]; +} + // Generation config. message GenerationConfig { // The configuration for routing the request to a specific model. @@ -333,10 +410,18 @@ message GenerationConfig { optional RoutingConfig routing_config = 17 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The speech generation config. + optional SpeechConfig speech_config = 23 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Config for thinking features. // An error will be returned if this field is set for models that don't // support thinking. ThinkingConfig thinking_config = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Config for image generation features. + optional ImageConfig image_config = 30 + [(google.api.field_behavior) = OPTIONAL]; } // Safety settings. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_stage.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_stage.proto index a72eb47754c3..653ec52ec0e2 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_stage.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_stage.proto @@ -52,4 +52,10 @@ enum DeploymentStage { // The deployment has terminated. DEPLOYMENT_TERMINATED = 10; + + // The deployment has succeeded. + SUCCESSFULLY_DEPLOYED = 11; + + // The deployment has failed. + FAILED_TO_DEPLOY = 12; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto index 1c4c018c4160..4f75c52bb721 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto @@ -74,12 +74,13 @@ message FeatureOnlineStore { // Required. Autoscaling config applied to Bigtable Instance. AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Whether direct access to the Bigtable instance is enabled or not. - bool enable_direct_bigtable_access = 2 + // Optional. Whether direct access to the Bigtable instance is enabled or + // not. + bool enable_direct_bigtable_access = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. Metadata of the Bigtable instance. Output only. - BigtableMetadata bigtable_metadata = 3 + BigtableMetadata bigtable_metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto index e57dcb3d30d3..79929d4d2090 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto @@ -297,6 +297,6 @@ message FeatureView { } // Metadata containing information about the Cloud Bigtable. - BigtableMetadata bigtable_metadata = 21 + BigtableMetadata bigtable_metadata = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/machine_resources.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/machine_resources.proto index 05310b218145..e82856202e02 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/machine_resources.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/machine_resources.proto @@ -54,6 +54,25 @@ message MachineSpec { // The number of accelerators to attach to the machine. int32 accelerator_count = 3; + // Optional. Immutable. The Nvidia GPU partition size. + // + // When specified, the requested accelerators will be partitioned into + // smaller GPU partitions. For example, if the request is for 8 units of + // NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will + // create 8 * 7 = 56 partitioned MIG instances. + // + // The partition size must be a value supported by the requested accelerator. + // Refer to + // [Nvidia GPU + // Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) + // for the available partition sizes. + // + // If set, the accelerator_count should be set to 1. + string gpu_partition_size = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + // Immutable. The topology of the TPUs. Corresponds to the TPU topologies // available from GKE. (Example: tpu_topology: "2x2x1"). string tpu_topology = 4 [(google.api.field_behavior) = IMMUTABLE]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto index 5ec25c4f1136..cbd9775382f3 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1/content.proto"; import "google/cloud/aiplatform/v1/explanation.proto"; import "google/cloud/aiplatform/v1/tool.proto"; import "google/cloud/aiplatform/v1/types.proto"; +import "google/cloud/aiplatform/v1/usage_metadata.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -208,6 +209,15 @@ service PredictionService { }; option (google.api.method_signature) = "model,contents"; } + + // Embed content with multimodal inputs. + rpc EmbedContent(EmbedContentRequest) returns (EmbedContentResponse) { + option (google.api.http) = { + post: "/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent" + body: "*" + }; + option (google.api.method_signature) = "model,content"; + } } // Request message for @@ -850,3 +860,82 @@ message GenerateContentResponse { // Usage metadata about the response(s). UsageMetadata usage_metadata = 4; } + +// Request message for +// [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. +message EmbedContentRequest { + // Represents a downstream task the embeddings will be used for. + enum EmbeddingTaskType { + // Unset value, which will default to one of the other enum values. + UNSPECIFIED = 0; + + // Specifies the given text is a query in a search/retrieval setting. + RETRIEVAL_QUERY = 2; + + // Specifies the given text is a document from the corpus being searched. + RETRIEVAL_DOCUMENT = 3; + + // Specifies the given text will be used for STS. + SEMANTIC_SIMILARITY = 4; + + // Specifies that the given text will be classified. + CLASSIFICATION = 5; + + // Specifies that the embeddings will be used for clustering. + CLUSTERING = 6; + + // Specifies that the embeddings will be used for question answering. + QUESTION_ANSWERING = 7; + + // Specifies that the embeddings will be used for fact verification. + FACT_VERIFICATION = 8; + + // Specifies that the embeddings will be used for code retrieval. + CODE_RETRIEVAL_QUERY = 9; + } + + // Required. The name of the publisher model requested to serve the + // prediction. Format: + // `projects/{project}/locations/{location}/publishers/*/models/*` + optional string model = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + }]; + + // Required. Input content to be embedded. Required. + optional Content content = 2; + + // Optional. An optional title for the text. + optional string title = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The task type of the embedding. + optional EmbeddingTaskType task_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional reduced dimension for the output embedding. If set, + // excessive values in the output embedding are truncated from the end. + optional int32 output_dimensionality = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to silently truncate the input content if it's longer + // than the maximum sequence length. + optional bool auto_truncate = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. +message EmbedContentResponse { + // A list of floats representing an embedding. + message Embedding { + // Embedding vector values. + repeated float values = 1; + } + + // The embedding generated from the input content. + Embedding embedding = 1; + + // Metadata about the response(s). + UsageMetadata usage_metadata = 2; + + // Whether the input content was truncated before generating the embedding. + bool truncated = 4; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/reasoning_engine.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/reasoning_engine.proto index f4964f7ea736..440d1e19484d 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/reasoning_engine.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/reasoning_engine.proto @@ -31,10 +31,15 @@ option java_outer_classname = "ReasoningEngineProto"; option java_package = "com.google.cloud.aiplatform.v1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; +option (google.api.resource_definition) = { + type: "developerconnect.googleapis.com/GitRepositoryLink" + pattern: "projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}" +}; // ReasoningEngine configurations message ReasoningEngineSpec { - // User provided package spec like pickled object and package requirements. + // User-provided package specification, containing pickled object and package + // requirements. message PackageSpec { // Optional. The Cloud Storage URI of the pickled python object. string pickle_object_gcs_uri = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -46,8 +51,9 @@ message ReasoningEngineSpec { // Optional. The Cloud Storage URI of the `requirements.txt` file string requirements_gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11. - // If not specified, default value is 3.10. + // Optional. The Python version. Supported values + // are 3.9, 3.10, 3.11, 3.12, 3.13. If not specified, the default value + // is 3.10. string python_version = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -98,6 +104,100 @@ message ReasoningEngineSpec { [(google.api.field_behavior) = OPTIONAL]; } + // Specification for deploying from source code. + message SourceCodeSpec { + // Specifies source code provided as a byte stream. + message InlineSource { + // Required. Input only. The application source code archive, provided as + // a compressed tarball (.tar.gz) file. + bytes source_archive = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + } + + // Specifies the configuration for fetching source code from a Git + // repository that is managed by Developer Connect. This includes the + // repository, revision, and directory to use. + message DeveloperConnectConfig { + // Required. The Developer Connect Git repository link, formatted as + // `projects/*/locations/*/connections/*/gitRepositoryLink/*`. + string git_repository_link = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/GitRepositoryLink" + } + ]; + + // Required. Directory, relative to the source root, in which to run the + // build. + string dir = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The revision to fetch from the Git repository such as a + // branch, a tag, a commit SHA, or any Git ref. + string revision = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies source code to be fetched from a Git repository managed through + // the Developer Connect service. + message DeveloperConnectSource { + // Required. The Developer Connect configuration that defines the + // specific repository, revision, and directory to use as the source code + // root. + DeveloperConnectConfig config = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Specification for running a Python application from source. + message PythonSpec { + // Optional. The version of Python to use. Support version + // includes 3.9, 3.10, 3.11, 3.12, 3.13. + // If not specified, default value is 3.10. + string version = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Python module to load as the entrypoint, specified as a + // fully qualified module name. For example: path.to.agent. + // If not specified, defaults to "agent". + // + // The project root will be added to Python sys.path, allowing imports + // to be specified relative to the root. + string entrypoint_module = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the callable object within the + // `entrypoint_module` to use as the application If not specified, + // defaults to "root_agent". + string entrypoint_object = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The path to the requirements file, relative to the source + // root. If not specified, defaults to "requirements.txt". + string requirements_file = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Specifies where the source code is located. + oneof source { + // Source code is provided directly in the request. + InlineSource inline_source = 1; + + // Source code is in a Git repository managed by Developer Connect. + DeveloperConnectSource developer_connect_source = 3; + } + + // Specifies the language-specific configuration for building and running + // the code. + oneof language_spec { + // Configuration for a Python application. + PythonSpec python_spec = 2; + } + } + + // Defines the source for the deployment. + // The `package_spec` field should not be set if `deployment_source` is + // specified. + oneof deployment_source { + // Deploy from source code files with a defined entrypoint. + SourceCodeSpec source_code_spec = 11; + } + // Optional. The service account that the Reasoning Engine artifact runs as. // It should have "roles/storage.objectViewer" for reading the user project's // Cloud Storage and "roles/aiplatform.user" for using Vertex extensions. If @@ -109,6 +209,8 @@ message ReasoningEngineSpec { // Ignored when users directly specify a deployment image through // `deployment_spec.first_party_image_override`, but keeping the // field_behavior to avoid introducing breaking changes. + // The `deployment_source` field should not be set if `package_spec` is + // specified. PackageSpec package_spec = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The specification of a Reasoning Engine deployment. @@ -165,4 +267,7 @@ message ReasoningEngine { // ReasoningEngine and all sub-resources of this ReasoningEngine will be // secured by this key. EncryptionSpec encryption_spec = 11; + + // Labels for the ReasoningEngine. + map labels = 17; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tool.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tool.proto index 7d861c4622b3..cc102b5cbd8b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tool.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tool.proto @@ -99,6 +99,15 @@ message Tool { // Required. The environment being operated. Environment environment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. By default, [predefined + // functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) + // are included in the final model call. Some of them can be explicitly + // excluded from being automatically included. This can serve two purposes: + // 1. Using a more restricted / different action space. + // 2. Improving the definitions / instructions of predefined functions. + repeated string excluded_predefined_functions = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Optional. Function tool type. @@ -232,6 +241,64 @@ message FunctionCall { google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; } +// A datatype containing media that is part of a `FunctionResponse` message. +// +// A `FunctionResponsePart` consists of data which has an associated datatype. A +// `FunctionResponsePart` can only contain one of the accepted types in +// `FunctionResponsePart.data`. +// +// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the +// type and subtype of the media if the `inline_data` field is filled with raw +// bytes. +message FunctionResponsePart { + // The data of the function response part. + oneof data { + // Inline media bytes. + FunctionResponseBlob inline_data = 1; + + // URI based data. + FunctionResponseFileData file_data = 2; + } +} + +// Raw media bytes for function response. +// +// Text should not be sent as raw bytes, use the 'text' field. +message FunctionResponseBlob { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the blob. + // + // Used to provide a label or filename to distinguish blobs. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// URI based data for function response. +message FunctionResponseFileData { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI. + string file_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the file data. + // + // Used to provide a label or filename to distinguish file datas. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // The result output from a [FunctionCall] that contains a string representing // the [FunctionDeclaration.name] and a structured JSON object containing any // output from the function is used as context to the model. This should contain @@ -246,6 +313,11 @@ message FunctionResponse { // error details (if any). If "output" and "error" keys are not specified, // then whole "response" is treated as function output. google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ordered `Parts` that constitute a function response. Parts may + // have different IANA MIME types. + repeated FunctionResponsePart parts = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Code generated by the model that is meant to be executed, and the result diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tuning_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tuning_job.proto index dc773999069a..93134c5ec03b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tuning_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tuning_job.proto @@ -45,6 +45,9 @@ message TuningJob { // The base model that is being tuned. See [Supported // models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). string base_model = 4; + + // The pre-tuned model for continuous tuning. + PreTunedModel pre_tuned_model = 31; } oneof tuning_spec { @@ -61,7 +64,10 @@ message TuningJob { // Optional. The display name of the // [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 - // characters long and can consist of any UTF-8 characters. + // characters long and can consist of any UTF-8 characters. For continuous + // tuning, tuned_model_display_name will by default use the same display name + // as the pre-tuned model. If a new display name is provided, the tuning job + // will create a new model instead of a new version. string tuned_model_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The description of the @@ -147,7 +153,18 @@ message TuningJob { // this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. message TunedModel { // Output only. The resource name of the TunedModel. Format: - // `projects/{project}/locations/{location}/models/{model}`. + // + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // + // When tuning from a base model, the version ID will be 1. + // + // For continuous tuning, if the provided tuned_model_display_name is set and + // different from parent model's display name, the tuned model will have a new + // parent model with version 1. Otherwise the version id will be incremented + // by 1 from the last version ID in the parent model. E.g., + // + // `projects/{project}/locations/{location}/models/{model}@{last_version_id + + // 1}` string model = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -373,3 +390,28 @@ message TunedModelCheckpoint { // `projects/{project}/locations/{location}/endpoints/{endpoint}`. string endpoint = 4; } + +// A pre-tuned model for continuous tuning. +message PreTunedModel { + // The resource name of the Model. + // E.g., a model resource name with a specified version id or alias: + // + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // + // `projects/{project}/locations/{location}/models/{model}@{alias}` + // + // Or, omit the version id to use the default version: + // + // `projects/{project}/locations/{location}/models/{model}` + string tuned_model_name = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + + // Optional. The source checkpoint id. If not specified, the default + // checkpoint will be used. + string checkpoint_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the base model this + // [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from. + string base_model = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/usage_metadata.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/usage_metadata.proto new file mode 100644 index 000000000000..facba96da97c --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/usage_metadata.proto @@ -0,0 +1,96 @@ +// Copyright 2025 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.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/aiplatform/v1/content.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "UsageMetadataProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Usage metadata about the content generation request and response. +// This message provides a detailed breakdown of token usage and other +// relevant metrics. +message UsageMetadata { + // The type of traffic that this request was processed with, indicating which + // quota gets consumed. + enum TrafficType { + // Unspecified request traffic type. + TRAFFIC_TYPE_UNSPECIFIED = 0; + + // Type for Pay-As-You-Go traffic. + ON_DEMAND = 1; + + // Type for Provisioned Throughput traffic. + PROVISIONED_THROUGHPUT = 2; + } + + // The total number of tokens in the prompt. This includes any text, images, + // or other media provided in the request. When `cached_content` is set, + // this also includes the number of tokens in the cached content. + int32 prompt_token_count = 1; + + // The total number of tokens in the generated candidates. + int32 candidates_token_count = 2; + + // The total number of tokens for the entire request. This is the sum of + // `prompt_token_count`, `candidates_token_count`, + // `tool_use_prompt_token_count`, and `thoughts_token_count`. + int32 total_token_count = 3; + + // Output only. The number of tokens in the results from tool executions, + // which are provided back to the model as input, if applicable. + int32 tool_use_prompt_token_count = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tokens that were part of the model's generated + // "thoughts" output, if applicable. + int32 thoughts_token_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tokens in the cached content that was used for + // this request. + int32 cached_content_token_count = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the prompt. + repeated ModalityTokenCount prompt_tokens_details = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the cached content. + repeated ModalityTokenCount cache_tokens_details = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the generated candidates. + repeated ModalityTokenCount candidates_tokens_details = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown by modality of the token counts from the + // results of tool executions, which are provided back to the model as input. + repeated ModalityTokenCount tool_use_prompt_tokens_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The traffic type for this request. + TrafficType traffic_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/content.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/content.proto index ee5abbf44fa4..e37d60b8831d 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/content.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/content.proto @@ -190,19 +190,75 @@ message PrebuiltVoiceConfig { optional string voice_name = 1; } -// The configuration for the voice to use. +// The configuration for the replicated voice to use. +message ReplicatedVoiceConfig { + // Optional. The mimetype of the voice sample. Currently only + // mime_type=audio/pcm is supported, which is raw mono 16-bit signed + // little-endian pcm data, with 24k sampling rate. + string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sample of the custom voice. + bytes voice_sample_audio = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for a voice. message VoiceConfig { // The configuration for the speaker to use. oneof voice_config { - // The configuration for the prebuilt voice to use. + // The configuration for a prebuilt voice. PrebuiltVoiceConfig prebuilt_voice_config = 1; + + // Optional. The configuration for a replicated voice. This enables users to + // replicate a voice from an audio sample. + ReplicatedVoiceConfig replicated_voice_config = 3 + [(google.api.field_behavior) = OPTIONAL]; } } -// The speech generation config. +// Configuration for a single speaker in a multi-speaker setup. +message SpeakerVoiceConfig { + // Required. The name of the speaker. This should be the same as the speaker + // name used in the prompt. + string speaker = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The configuration for the voice of this speaker. + VoiceConfig voice_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for a multi-speaker text-to-speech request. +message MultiSpeakerVoiceConfig { + // Required. A list of configurations for the voices of the speakers. Exactly + // two speaker voice configurations must be provided. + repeated SpeakerVoiceConfig speaker_voice_configs = 2 + [(google.api.field_behavior) = REQUIRED]; +} + + +// Configuration for speech generation. message SpeechConfig { - // The configuration for the speaker to use. + // The configuration for the voice to use. VoiceConfig voice_config = 1; + + // Optional. The language code (ISO 639-1) for the speech synthesis. + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The configuration for a multi-speaker text-to-speech request. + // This field is mutually exclusive with `voice_config`. + MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; +} + +// Config for image generation features. +message ImageConfig { + // Optional. The desired aspect ratio for the generated images. The following + // aspect ratios are supported: + // + // "1:1" + // "2:3", "3:2" + // "3:4", "4:3" + // "4:5", "5:4" + // "9:16", "16:9" + // "21:9" + optional string aspect_ratio = 2 [(google.api.field_behavior) = OPTIONAL]; } // Generation config. @@ -429,6 +485,10 @@ message GenerationConfig { // Optional. Config for model selection. ModelConfig model_config = 27 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Config for image generation features. + optional ImageConfig image_config = 30 + [(google.api.field_behavior) = OPTIONAL]; } // Safety settings. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_stage.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_stage.proto index 7ef233a98f30..c98ce2c8b0ef 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_stage.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_stage.proto @@ -52,4 +52,10 @@ enum DeploymentStage { // The deployment has terminated. DEPLOYMENT_TERMINATED = 10; + + // The deployment has succeeded. + SUCCESSFULLY_DEPLOYED = 11; + + // The deployment has failed. + FAILED_TO_DEPLOY = 12; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto index f89d9e0eafbc..3b37af423ccd 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto @@ -75,11 +75,11 @@ message FeatureOnlineStore { AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; // If true, enable direct access to the Bigtable instance. - bool enable_direct_bigtable_access = 2 + bool enable_direct_bigtable_access = 3 [(google.api.field_behavior) = OPTIONAL]; // Metadata of the Bigtable instance. Output only. - BigtableMetadata bigtable_metadata = 3 + BigtableMetadata bigtable_metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_view.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_view.proto index e2ef1fc96891..0d1b7fd2acf9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_view.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature_view.proto @@ -379,6 +379,6 @@ message FeatureView { } // Metadata containing information about the Cloud Bigtable. - BigtableMetadata bigtable_metadata = 21 + BigtableMetadata bigtable_metadata = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto index 9218beab2fa1..3b3774b6daf6 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto @@ -105,7 +105,7 @@ message DedicatedResources { [(google.api.field_behavior) = OPTIONAL]; // Optional. Duration of no traffic before scaling to zero. - // [MinValue=3600] (5 minutes) + // [MinValue=300] (5 minutes) // [MaxValue=28800] (8 hours) google.protobuf.Duration idle_scaledown_period = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/notebook_software_config.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/notebook_software_config.proto index e983e0a82759..5f069cbba853 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/notebook_software_config.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/notebook_software_config.proto @@ -27,21 +27,33 @@ option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; +// Post-startup script config. message PostStartupScriptConfig { + // Represents a notebook runtime post-startup script behavior. enum PostStartupScriptBehavior { + // Unspecified post-startup script behavior. POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; + // Run the post-startup script only once, during runtime creation. RUN_ONCE = 1; + // Run the post-startup script after every start. RUN_EVERY_START = 2; + // After every start, download the post-startup script from its source and + // run it. DOWNLOAD_AND_RUN_EVERY_START = 3; } + // Optional. Post-startup script to run after runtime is started. string post_startup_script = 1 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Post-startup script url to download. Example: + // https://bucket/script.sh string post_startup_script_url = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Post-startup script behavior that defines download and execution + // behavior. PostStartupScriptBehavior post_startup_script_behavior = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -70,6 +82,8 @@ message NotebookSoftwareConfig { // Optional. Environment variables to be passed to the container. // Maximum limit is 100. repeated EnvVar env = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Post-startup script config. PostStartupScriptConfig post_startup_script_config = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto index c5b7dd890c01..9c20101a7bf4 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1beta1/content.proto"; import "google/cloud/aiplatform/v1beta1/explanation.proto"; import "google/cloud/aiplatform/v1beta1/tool.proto"; import "google/cloud/aiplatform/v1beta1/types.proto"; +import "google/cloud/aiplatform/v1beta1/usage_metadata.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -239,6 +240,15 @@ service PredictionService { }; option (google.api.method_signature) = "endpoint,http_body"; } + + // Embed content with multimodal inputs. + rpc EmbedContent(EmbedContentRequest) returns (EmbedContentResponse) { + option (google.api.http) = { + post: "/v1beta1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent" + body: "*" + }; + option (google.api.method_signature) = "model,content"; + } } // Request message for @@ -950,3 +960,82 @@ message GenerateVideoResponse { // Returns rai failure reasons if any. repeated string rai_media_filtered_reasons = 3; } + +// Request message for +// [PredictionService.EmbedContent][google.cloud.aiplatform.v1beta1.PredictionService.EmbedContent]. +message EmbedContentRequest { + // Represents a downstream task the embeddings will be used for. + enum EmbeddingTaskType { + // Unset value, which will default to one of the other enum values. + UNSPECIFIED = 0; + + // Specifies the given text is a query in a search/retrieval setting. + RETRIEVAL_QUERY = 2; + + // Specifies the given text is a document from the corpus being searched. + RETRIEVAL_DOCUMENT = 3; + + // Specifies the given text will be used for STS. + SEMANTIC_SIMILARITY = 4; + + // Specifies that the given text will be classified. + CLASSIFICATION = 5; + + // Specifies that the embeddings will be used for clustering. + CLUSTERING = 6; + + // Specifies that the embeddings will be used for question answering. + QUESTION_ANSWERING = 7; + + // Specifies that the embeddings will be used for fact verification. + FACT_VERIFICATION = 8; + + // Specifies that the embeddings will be used for code retrieval. + CODE_RETRIEVAL_QUERY = 9; + } + + // Required. The name of the publisher model requested to serve the + // prediction. Format: + // `projects/{project}/locations/{location}/publishers/*/models/*` + optional string model = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + }]; + + // Required. Input content to be embedded. Required. + optional Content content = 2; + + // Optional. An optional title for the text. + optional string title = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The task type of the embedding. + optional EmbeddingTaskType task_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional reduced dimension for the output embedding. If set, + // excessive values in the output embedding are truncated from the end. + optional int32 output_dimensionality = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to silently truncate the input content if it's longer + // than the maximum sequence length. + optional bool auto_truncate = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PredictionService.EmbedContent][google.cloud.aiplatform.v1beta1.PredictionService.EmbedContent]. +message EmbedContentResponse { + // A list of floats representing an embedding. + message Embedding { + // Embedding vector values. + repeated float values = 1; + } + + // The embedding generated from the input content. + Embedding embedding = 1; + + // Metadata about the response(s). + UsageMetadata usage_metadata = 2; + + // Whether the input content was truncated before generating the embedding. + bool truncated = 4; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto index 126f0843b27f..85b43672ca7c 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto @@ -32,10 +32,15 @@ option java_outer_classname = "ReasoningEngineProto"; option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; +option (google.api.resource_definition) = { + type: "developerconnect.googleapis.com/GitRepositoryLink" + pattern: "projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}" +}; // ReasoningEngine configurations message ReasoningEngineSpec { - // User provided package spec like pickled object and package requirements. + // User-provided package specification, containing pickled object and package + // requirements. message PackageSpec { // Optional. The Cloud Storage URI of the pickled python object. string pickle_object_gcs_uri = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -47,8 +52,9 @@ message ReasoningEngineSpec { // Optional. The Cloud Storage URI of the `requirements.txt` file string requirements_gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11. - // If not specified, default value is 3.10. + // Optional. The Python version. Supported values + // are 3.9, 3.10, 3.11, 3.12, 3.13. If not specified, the default value + // is 3.10. string python_version = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -72,20 +78,23 @@ message ReasoningEngineSpec { [(google.api.field_behavior) = OPTIONAL]; // Optional. The minimum number of application instances that will be kept - // running at all times. Defaults to 1. + // running at all times. Defaults to 1. Range: [0, 10]. optional int32 min_instances = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of application instances that can be - // launched to handle increased traffic. Defaults to 100. + // launched to handle increased traffic. Defaults to 100. Range: [1, 1000]. + // + // If VPC-SC or PSC-I is enabled, the acceptable range is [1, 100]. optional int32 max_instances = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Resource limits for each container. Only 'cpu' and 'memory' // keys are supported. Defaults to {"cpu": "4", "memory": "4Gi"}. // - // * The only supported values for CPU are '1', '2', '4', and '8'. For + // * The only supported values for CPU are '1', '2', '4', '6' and '8'. For // more information, go to // https://cloud.google.com/run/docs/configuring/cpu. - // * For supported 'memory' values and syntax, go to + // * The only supported values for memory are '1Gi', '2Gi', ... '32 Gi'. + // * For required cpu on different memory values, go to // https://cloud.google.com/run/docs/configuring/memory-limits map resource_limits = 7 [(google.api.field_behavior) = OPTIONAL]; @@ -96,6 +105,101 @@ message ReasoningEngineSpec { [(google.api.field_behavior) = OPTIONAL]; } + // Specification for deploying from source code. + message SourceCodeSpec { + // Specifies source code provided as a byte stream. + message InlineSource { + // Required. Input only. The application source code archive, provided as + // a compressed tarball + // (.tar.gz) file. + bytes source_archive = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + } + + // Specifies the configuration for fetching source code from a Git + // repository that is managed by Developer Connect. This includes the + // repository, revision, and directory to use. + message DeveloperConnectConfig { + // Required. The Developer Connect Git repository link, formatted as + // `projects/*/locations/*/connections/*/gitRepositoryLink/*`. + string git_repository_link = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/GitRepositoryLink" + } + ]; + + // Required. Directory, relative to the source root, in which to run the + // build. + string dir = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The revision to fetch from the Git repository such as a + // branch, a tag, a commit SHA, or any Git ref. + string revision = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies source code to be fetched from a Git repository managed through + // the Developer Connect service. + message DeveloperConnectSource { + // Required. The Developer Connect configuration that defines the + // specific repository, revision, and directory to use as the source code + // root. + DeveloperConnectConfig config = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Specification for running a Python application from source. + message PythonSpec { + // Optional. The version of Python to use. Support version + // includes 3.9, 3.10, 3.11, 3.12, 3.13. + // If not specified, default value is 3.10. + string version = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Python module to load as the entrypoint, specified as a + // fully qualified module name. For example: path.to.agent. + // If not specified, defaults to "agent". + // + // The project root will be added to Python sys.path, allowing imports + // to be specified relative to the root. + string entrypoint_module = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the callable object within the + // `entrypoint_module` to use as the application If not specified, + // defaults to "root_agent". + string entrypoint_object = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The path to the requirements file, relative to the source + // root. If not specified, defaults to "requirements.txt". + string requirements_file = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Specifies where the source code is located. + oneof source { + // Source code is provided directly in the request. + InlineSource inline_source = 1; + + // Source code is in a Git repository managed by Developer Connect. + DeveloperConnectSource developer_connect_source = 3; + } + + // Specifies the language-specific configuration for building and running + // the code. + oneof language_spec { + // Configuration for a Python application. + PythonSpec python_spec = 2; + } + } + + // Defines the source for the deployment. + // The `package_spec` field should not be set if `deployment_source` is + // specified. + oneof deployment_source { + // Deploy from source code files with a defined entrypoint. + SourceCodeSpec source_code_spec = 11; + } + // Optional. The service account that the Reasoning Engine artifact runs as. // It should have "roles/storage.objectViewer" for reading the user project's // Cloud Storage and "roles/aiplatform.user" for using Vertex extensions. If @@ -107,6 +211,8 @@ message ReasoningEngineSpec { // Ignored when users directly specify a deployment image through // `deployment_spec.first_party_image_override`, but keeping the // field_behavior to avoid introducing breaking changes. + // The `deployment_source` field should not be set if `package_spec` is + // specified. PackageSpec package_spec = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The specification of a Reasoning Engine deployment. @@ -168,6 +274,9 @@ message ReasoningEngine { // ReasoningEngine and all sub-resources of this ReasoningEngine will be // secured by this key. EncryptionSpec encryption_spec = 11; + + // Labels for the ReasoningEngine. + map labels = 17; } // Configuration for how Agent Engine sub-resources should manage context. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session.proto index c64a96b2398a..8e3a7f7049e1 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session.proto @@ -173,9 +173,6 @@ message EventActions { map artifact_delta = 3 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. If set, the event transfers to the specified agent. - bool transfer_to_agent = 5 [deprecated = true]; - // Optional. The agent is escalating to a higher level agent. bool escalate = 6 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session_service.proto index 81435c06e217..bc29ed611af9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/session_service.proto @@ -204,8 +204,9 @@ message ListSessionsRequest { // Optional. The standard list filter. // Supported fields: // * `display_name` + // * `user_id` // - // Example: `display_name=abc`. + // Example: `display_name="abc"`, `user_id="123"`. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. A comma-separated list of fields to order by, sorted in ascending @@ -290,6 +291,13 @@ message ListEventsRequest { // // More detail in [AIP-160](https://google.aip.dev/160). string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. Supported fields: + // * `timestamp` + // + // Example: `timestamp desc`. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response message for diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto index f324634d11c7..177aedfd3f2e 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto @@ -99,6 +99,15 @@ message Tool { // Required. The environment being operated. Environment environment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. By default, [predefined + // functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) + // are included in the final model call. Some of them can be explicitly + // excluded from being automatically included. This can serve two purposes: + // 1. Using a more restricted / different action space. + // 2. Improving the definitions / instructions of predefined functions. + repeated string excluded_predefined_functions = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Optional. Function tool type. @@ -275,6 +284,64 @@ message FunctionCall { google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; } +// A datatype containing media that is part of a `FunctionResponse` message. +// +// A `FunctionResponsePart` consists of data which has an associated datatype. A +// `FunctionResponsePart` can only contain one of the accepted types in +// `FunctionResponsePart.data`. +// +// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the +// type and subtype of the media if the `inline_data` field is filled with raw +// bytes. +message FunctionResponsePart { + // The data of the function response part. + oneof data { + // Inline media bytes. + FunctionResponseBlob inline_data = 1; + + // URI based data. + FunctionResponseFileData file_data = 2; + } +} + +// Raw media bytes for function response. +// +// Text should not be sent as raw bytes, use the 'text' field. +message FunctionResponseBlob { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the blob. + // + // Used to provide a label or filename to distinguish blobs. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// URI based data for function response. +message FunctionResponseFileData { + // Required. The IANA standard MIME type of the source data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI. + string file_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Display name of the file data. + // + // Used to provide a label or filename to distinguish file datas. + // + // This field is only returned in PromptMessage for prompt management. + // It is currently used in the Gemini GenerateContent calls only when server + // side tools (code_execution, google_search, and url_context) are enabled. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // The result output from a [FunctionCall] that contains a string representing // the [FunctionDeclaration.name] and a structured JSON object containing any // output from the function is used as context to the model. This should contain @@ -293,6 +360,11 @@ message FunctionResponse { // error details (if any). If "output" and "error" keys are not specified, // then whole "response" is treated as function output. google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ordered `Parts` that constitute a function response. Parts may + // have different IANA MIME types. + repeated FunctionResponsePart parts = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Code generated by the model that is meant to be executed, and the result diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto new file mode 100644 index 000000000000..2bf358053c37 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto @@ -0,0 +1,96 @@ +// Copyright 2025 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.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/aiplatform/v1beta1/content.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "UsageMetadataProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Usage metadata about the content generation request and response. +// This message provides a detailed breakdown of token usage and other +// relevant metrics. +message UsageMetadata { + // The type of traffic that this request was processed with, indicating which + // quota gets consumed. + enum TrafficType { + // Unspecified request traffic type. + TRAFFIC_TYPE_UNSPECIFIED = 0; + + // Type for Pay-As-You-Go traffic. + ON_DEMAND = 1; + + // Type for Provisioned Throughput traffic. + PROVISIONED_THROUGHPUT = 2; + } + + // The total number of tokens in the prompt. This includes any text, images, + // or other media provided in the request. When `cached_content` is set, + // this also includes the number of tokens in the cached content. + int32 prompt_token_count = 1; + + // The total number of tokens in the generated candidates. + int32 candidates_token_count = 2; + + // The total number of tokens for the entire request. This is the sum of + // `prompt_token_count`, `candidates_token_count`, + // `tool_use_prompt_token_count`, and `thoughts_token_count`. + int32 total_token_count = 3; + + // Output only. The number of tokens in the results from tool executions, + // which are provided back to the model as input, if applicable. + int32 tool_use_prompt_token_count = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tokens that were part of the model's generated + // "thoughts" output, if applicable. + int32 thoughts_token_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tokens in the cached content that was used for + // this request. + int32 cached_content_token_count = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the prompt. + repeated ModalityTokenCount prompt_tokens_details = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the cached content. + repeated ModalityTokenCount cache_tokens_details = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown of the token count for each modality in + // the generated candidates. + repeated ModalityTokenCount candidates_tokens_details = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed breakdown by modality of the token counts from the + // results of tool executions, which are provided back to the model as input. + repeated ModalityTokenCount tool_use_prompt_tokens_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The traffic type for this request. + TrafficType traffic_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 90bc279e080a..5ae411a513ce 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -6702,6 +6702,9 @@ export namespace google { /** MachineSpec acceleratorCount */ acceleratorCount?: (number|null); + /** MachineSpec gpuPartitionSize */ + gpuPartitionSize?: (string|null); + /** MachineSpec tpuTopology */ tpuTopology?: (string|null); @@ -6727,6 +6730,9 @@ export namespace google { /** MachineSpec acceleratorCount. */ public acceleratorCount: number; + /** MachineSpec gpuPartitionSize. */ + public gpuPartitionSize: string; + /** MachineSpec tpuTopology. */ public tpuTopology: string; @@ -11730,6 +11736,718 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PrebuiltVoiceConfig. */ + interface IPrebuiltVoiceConfig { + + /** PrebuiltVoiceConfig voiceName */ + voiceName?: (string|null); + } + + /** Represents a PrebuiltVoiceConfig. */ + class PrebuiltVoiceConfig implements IPrebuiltVoiceConfig { + + /** + * Constructs a new PrebuiltVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IPrebuiltVoiceConfig); + + /** PrebuiltVoiceConfig voiceName. */ + public voiceName?: (string|null); + + /** + * Creates a new PrebuiltVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrebuiltVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IPrebuiltVoiceConfig): google.cloud.aiplatform.v1.PrebuiltVoiceConfig; + + /** + * Encodes the specified PrebuiltVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.PrebuiltVoiceConfig.verify|verify} messages. + * @param message PrebuiltVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IPrebuiltVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrebuiltVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PrebuiltVoiceConfig.verify|verify} messages. + * @param message PrebuiltVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IPrebuiltVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrebuiltVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrebuiltVoiceConfig + * @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.aiplatform.v1.PrebuiltVoiceConfig; + + /** + * Decodes a PrebuiltVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrebuiltVoiceConfig + * @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.aiplatform.v1.PrebuiltVoiceConfig; + + /** + * Verifies a PrebuiltVoiceConfig 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 PrebuiltVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrebuiltVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PrebuiltVoiceConfig; + + /** + * Creates a plain object from a PrebuiltVoiceConfig message. Also converts values to other types if specified. + * @param message PrebuiltVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PrebuiltVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrebuiltVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrebuiltVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReplicatedVoiceConfig. */ + interface IReplicatedVoiceConfig { + + /** ReplicatedVoiceConfig mimeType */ + mimeType?: (string|null); + + /** ReplicatedVoiceConfig voiceSampleAudio */ + voiceSampleAudio?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ReplicatedVoiceConfig. */ + class ReplicatedVoiceConfig implements IReplicatedVoiceConfig { + + /** + * Constructs a new ReplicatedVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IReplicatedVoiceConfig); + + /** ReplicatedVoiceConfig mimeType. */ + public mimeType: string; + + /** ReplicatedVoiceConfig voiceSampleAudio. */ + public voiceSampleAudio: (Uint8Array|Buffer|string); + + /** + * Creates a new ReplicatedVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplicatedVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IReplicatedVoiceConfig): google.cloud.aiplatform.v1.ReplicatedVoiceConfig; + + /** + * Encodes the specified ReplicatedVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ReplicatedVoiceConfig.verify|verify} messages. + * @param message ReplicatedVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IReplicatedVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplicatedVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReplicatedVoiceConfig.verify|verify} messages. + * @param message ReplicatedVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IReplicatedVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplicatedVoiceConfig + * @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.aiplatform.v1.ReplicatedVoiceConfig; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplicatedVoiceConfig + * @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.aiplatform.v1.ReplicatedVoiceConfig; + + /** + * Verifies a ReplicatedVoiceConfig 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 ReplicatedVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplicatedVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReplicatedVoiceConfig; + + /** + * Creates a plain object from a ReplicatedVoiceConfig message. Also converts values to other types if specified. + * @param message ReplicatedVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReplicatedVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplicatedVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplicatedVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VoiceConfig. */ + interface IVoiceConfig { + + /** VoiceConfig prebuiltVoiceConfig */ + prebuiltVoiceConfig?: (google.cloud.aiplatform.v1.IPrebuiltVoiceConfig|null); + + /** VoiceConfig replicatedVoiceConfig */ + replicatedVoiceConfig?: (google.cloud.aiplatform.v1.IReplicatedVoiceConfig|null); + } + + /** Represents a VoiceConfig. */ + class VoiceConfig implements IVoiceConfig { + + /** + * Constructs a new VoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IVoiceConfig); + + /** VoiceConfig prebuiltVoiceConfig. */ + public prebuiltVoiceConfig?: (google.cloud.aiplatform.v1.IPrebuiltVoiceConfig|null); + + /** VoiceConfig replicatedVoiceConfig. */ + public replicatedVoiceConfig?: (google.cloud.aiplatform.v1.IReplicatedVoiceConfig|null); + + /** VoiceConfig voiceConfig. */ + public voiceConfig?: ("prebuiltVoiceConfig"|"replicatedVoiceConfig"); + + /** + * Creates a new VoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IVoiceConfig): google.cloud.aiplatform.v1.VoiceConfig; + + /** + * Encodes the specified VoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.VoiceConfig.verify|verify} messages. + * @param message VoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.VoiceConfig.verify|verify} messages. + * @param message VoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VoiceConfig + * @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.aiplatform.v1.VoiceConfig; + + /** + * Decodes a VoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VoiceConfig + * @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.aiplatform.v1.VoiceConfig; + + /** + * Verifies a VoiceConfig 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 VoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.VoiceConfig; + + /** + * Creates a plain object from a VoiceConfig message. Also converts values to other types if specified. + * @param message VoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.VoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SpeakerVoiceConfig. */ + interface ISpeakerVoiceConfig { + + /** SpeakerVoiceConfig speaker */ + speaker?: (string|null); + + /** SpeakerVoiceConfig voiceConfig */ + voiceConfig?: (google.cloud.aiplatform.v1.IVoiceConfig|null); + } + + /** Represents a SpeakerVoiceConfig. */ + class SpeakerVoiceConfig implements ISpeakerVoiceConfig { + + /** + * Constructs a new SpeakerVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ISpeakerVoiceConfig); + + /** SpeakerVoiceConfig speaker. */ + public speaker: string; + + /** SpeakerVoiceConfig voiceConfig. */ + public voiceConfig?: (google.cloud.aiplatform.v1.IVoiceConfig|null); + + /** + * Creates a new SpeakerVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeakerVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ISpeakerVoiceConfig): google.cloud.aiplatform.v1.SpeakerVoiceConfig; + + /** + * Encodes the specified SpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.SpeakerVoiceConfig.verify|verify} messages. + * @param message SpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ISpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SpeakerVoiceConfig.verify|verify} messages. + * @param message SpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ISpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeakerVoiceConfig + * @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.aiplatform.v1.SpeakerVoiceConfig; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeakerVoiceConfig + * @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.aiplatform.v1.SpeakerVoiceConfig; + + /** + * Verifies a SpeakerVoiceConfig 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 SpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeakerVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.SpeakerVoiceConfig; + + /** + * Creates a plain object from a SpeakerVoiceConfig message. Also converts values to other types if specified. + * @param message SpeakerVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.SpeakerVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpeakerVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpeakerVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MultiSpeakerVoiceConfig. */ + interface IMultiSpeakerVoiceConfig { + + /** MultiSpeakerVoiceConfig speakerVoiceConfigs */ + speakerVoiceConfigs?: (google.cloud.aiplatform.v1.ISpeakerVoiceConfig[]|null); + } + + /** Represents a MultiSpeakerVoiceConfig. */ + class MultiSpeakerVoiceConfig implements IMultiSpeakerVoiceConfig { + + /** + * Constructs a new MultiSpeakerVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig); + + /** MultiSpeakerVoiceConfig speakerVoiceConfigs. */ + public speakerVoiceConfigs: google.cloud.aiplatform.v1.ISpeakerVoiceConfig[]; + + /** + * Creates a new MultiSpeakerVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiSpeakerVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig): google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @param message MultiSpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @param message MultiSpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultiSpeakerVoiceConfig + * @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.aiplatform.v1.MultiSpeakerVoiceConfig; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultiSpeakerVoiceConfig + * @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.aiplatform.v1.MultiSpeakerVoiceConfig; + + /** + * Verifies a MultiSpeakerVoiceConfig 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 MultiSpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiSpeakerVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig; + + /** + * Creates a plain object from a MultiSpeakerVoiceConfig message. Also converts values to other types if specified. + * @param message MultiSpeakerVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiSpeakerVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultiSpeakerVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SpeechConfig. */ + interface ISpeechConfig { + + /** SpeechConfig voiceConfig */ + voiceConfig?: (google.cloud.aiplatform.v1.IVoiceConfig|null); + + /** SpeechConfig languageCode */ + languageCode?: (string|null); + + /** SpeechConfig multiSpeakerVoiceConfig */ + multiSpeakerVoiceConfig?: (google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig|null); + } + + /** Represents a SpeechConfig. */ + class SpeechConfig implements ISpeechConfig { + + /** + * Constructs a new SpeechConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ISpeechConfig); + + /** SpeechConfig voiceConfig. */ + public voiceConfig?: (google.cloud.aiplatform.v1.IVoiceConfig|null); + + /** SpeechConfig languageCode. */ + public languageCode: string; + + /** SpeechConfig multiSpeakerVoiceConfig. */ + public multiSpeakerVoiceConfig?: (google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig|null); + + /** + * Creates a new SpeechConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeechConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ISpeechConfig): google.cloud.aiplatform.v1.SpeechConfig; + + /** + * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.SpeechConfig.verify|verify} messages. + * @param message SpeechConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SpeechConfig.verify|verify} messages. + * @param message SpeechConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpeechConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeechConfig + * @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.aiplatform.v1.SpeechConfig; + + /** + * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeechConfig + * @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.aiplatform.v1.SpeechConfig; + + /** + * Verifies a SpeechConfig 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 SpeechConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeechConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.SpeechConfig; + + /** + * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. + * @param message SpeechConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.SpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpeechConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpeechConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageConfig. */ + interface IImageConfig { + + /** ImageConfig aspectRatio */ + aspectRatio?: (string|null); + } + + /** Represents an ImageConfig. */ + class ImageConfig implements IImageConfig { + + /** + * Constructs a new ImageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IImageConfig); + + /** ImageConfig aspectRatio. */ + public aspectRatio?: (string|null); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IImageConfig): google.cloud.aiplatform.v1.ImageConfig; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageConfig + * @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.aiplatform.v1.ImageConfig; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageConfig + * @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.aiplatform.v1.ImageConfig; + + /** + * Verifies an ImageConfig 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 ImageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ImageConfig; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @param message ImageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ImageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GenerationConfig. */ interface IGenerationConfig { @@ -11778,8 +12496,14 @@ export namespace google { /** GenerationConfig routingConfig */ routingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null); + /** GenerationConfig speechConfig */ + speechConfig?: (google.cloud.aiplatform.v1.ISpeechConfig|null); + /** GenerationConfig thinkingConfig */ thinkingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IThinkingConfig|null); + + /** GenerationConfig imageConfig */ + imageConfig?: (google.cloud.aiplatform.v1.IImageConfig|null); } /** Represents a GenerationConfig. */ @@ -11836,9 +12560,15 @@ export namespace google { /** GenerationConfig routingConfig. */ public routingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null); + /** GenerationConfig speechConfig. */ + public speechConfig?: (google.cloud.aiplatform.v1.ISpeechConfig|null); + /** GenerationConfig thinkingConfig. */ public thinkingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IThinkingConfig|null); + /** GenerationConfig imageConfig. */ + public imageConfig?: (google.cloud.aiplatform.v1.IImageConfig|null); + /** * Creates a new GenerationConfig instance using the specified properties. * @param [properties] Properties to set @@ -15688,6 +16418,9 @@ export namespace google { /** ComputerUse environment */ environment?: (google.cloud.aiplatform.v1.Tool.ComputerUse.Environment|keyof typeof google.cloud.aiplatform.v1.Tool.ComputerUse.Environment|null); + + /** ComputerUse excludedPredefinedFunctions */ + excludedPredefinedFunctions?: (string[]|null); } /** Represents a ComputerUse. */ @@ -15702,6 +16435,9 @@ export namespace google { /** ComputerUse environment. */ public environment: (google.cloud.aiplatform.v1.Tool.ComputerUse.Environment|keyof typeof google.cloud.aiplatform.v1.Tool.ComputerUse.Environment); + /** ComputerUse excludedPredefinedFunctions. */ + public excludedPredefinedFunctions: string[]; + /** * Creates a new ComputerUse instance using the specified properties. * @param [properties] Properties to set @@ -16111,6 +16847,330 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FunctionResponsePart. */ + interface IFunctionResponsePart { + + /** FunctionResponsePart inlineData */ + inlineData?: (google.cloud.aiplatform.v1.IFunctionResponseBlob|null); + + /** FunctionResponsePart fileData */ + fileData?: (google.cloud.aiplatform.v1.IFunctionResponseFileData|null); + } + + /** Represents a FunctionResponsePart. */ + class FunctionResponsePart implements IFunctionResponsePart { + + /** + * Constructs a new FunctionResponsePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IFunctionResponsePart); + + /** FunctionResponsePart inlineData. */ + public inlineData?: (google.cloud.aiplatform.v1.IFunctionResponseBlob|null); + + /** FunctionResponsePart fileData. */ + public fileData?: (google.cloud.aiplatform.v1.IFunctionResponseFileData|null); + + /** FunctionResponsePart data. */ + public data?: ("inlineData"|"fileData"); + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponsePart instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IFunctionResponsePart): google.cloud.aiplatform.v1.FunctionResponsePart; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponsePart + * @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.aiplatform.v1.FunctionResponsePart; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponsePart + * @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.aiplatform.v1.FunctionResponsePart; + + /** + * Verifies a FunctionResponsePart 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 FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponsePart + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FunctionResponsePart; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @param message FunctionResponsePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FunctionResponsePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponsePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponsePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionResponseBlob. */ + interface IFunctionResponseBlob { + + /** FunctionResponseBlob mimeType */ + mimeType?: (string|null); + + /** FunctionResponseBlob data */ + data?: (Uint8Array|Buffer|string|null); + + /** FunctionResponseBlob displayName */ + displayName?: (string|null); + } + + /** Represents a FunctionResponseBlob. */ + class FunctionResponseBlob implements IFunctionResponseBlob { + + /** + * Constructs a new FunctionResponseBlob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IFunctionResponseBlob); + + /** FunctionResponseBlob mimeType. */ + public mimeType: string; + + /** FunctionResponseBlob data. */ + public data: (Uint8Array|Buffer|string); + + /** FunctionResponseBlob displayName. */ + public displayName: string; + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponseBlob instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IFunctionResponseBlob): google.cloud.aiplatform.v1.FunctionResponseBlob; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponseBlob + * @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.aiplatform.v1.FunctionResponseBlob; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponseBlob + * @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.aiplatform.v1.FunctionResponseBlob; + + /** + * Verifies a FunctionResponseBlob 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 FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponseBlob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FunctionResponseBlob; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @param message FunctionResponseBlob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FunctionResponseBlob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponseBlob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionResponseFileData. */ + interface IFunctionResponseFileData { + + /** FunctionResponseFileData mimeType */ + mimeType?: (string|null); + + /** FunctionResponseFileData fileUri */ + fileUri?: (string|null); + + /** FunctionResponseFileData displayName */ + displayName?: (string|null); + } + + /** Represents a FunctionResponseFileData. */ + class FunctionResponseFileData implements IFunctionResponseFileData { + + /** + * Constructs a new FunctionResponseFileData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IFunctionResponseFileData); + + /** FunctionResponseFileData mimeType. */ + public mimeType: string; + + /** FunctionResponseFileData fileUri. */ + public fileUri: string; + + /** FunctionResponseFileData displayName. */ + public displayName: string; + + /** + * Creates a new FunctionResponseFileData instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponseFileData instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IFunctionResponseFileData): google.cloud.aiplatform.v1.FunctionResponseFileData; + + /** + * Encodes the specified FunctionResponseFileData message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseFileData.verify|verify} messages. + * @param message FunctionResponseFileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IFunctionResponseFileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponseFileData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseFileData.verify|verify} messages. + * @param message FunctionResponseFileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IFunctionResponseFileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponseFileData + * @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.aiplatform.v1.FunctionResponseFileData; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponseFileData + * @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.aiplatform.v1.FunctionResponseFileData; + + /** + * Verifies a FunctionResponseFileData 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 FunctionResponseFileData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponseFileData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FunctionResponseFileData; + + /** + * Creates a plain object from a FunctionResponseFileData message. Also converts values to other types if specified. + * @param message FunctionResponseFileData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FunctionResponseFileData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponseFileData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponseFileData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a FunctionResponse. */ interface IFunctionResponse { @@ -16119,6 +17179,9 @@ export namespace google { /** FunctionResponse response */ response?: (google.protobuf.IStruct|null); + + /** FunctionResponse parts */ + parts?: (google.cloud.aiplatform.v1.IFunctionResponsePart[]|null); } /** Represents a FunctionResponse. */ @@ -16136,6 +17199,9 @@ export namespace google { /** FunctionResponse response. */ public response?: (google.protobuf.IStruct|null); + /** FunctionResponse parts. */ + public parts: google.cloud.aiplatform.v1.IFunctionResponsePart[]; + /** * Creates a new FunctionResponse instance using the specified properties. * @param [properties] Properties to set @@ -32438,7 +33504,9 @@ export namespace google { GETTING_CONTAINER_IMAGE = 9, STARTING_MODEL_SERVER = 3, FINISHING_UP = 4, - DEPLOYMENT_TERMINATED = 10 + DEPLOYMENT_TERMINATED = 10, + SUCCESSFULLY_DEPLOYED = 11, + FAILED_TO_DEPLOY = 12 } /** Represents an EndpointService */ @@ -67059,6 +68127,9 @@ export namespace google { /** TuningJob baseModel */ baseModel?: (string|null); + /** TuningJob preTunedModel */ + preTunedModel?: (google.cloud.aiplatform.v1.IPreTunedModel|null); + /** TuningJob supervisedTuningSpec */ supervisedTuningSpec?: (google.cloud.aiplatform.v1.ISupervisedTuningSpec|null); @@ -67120,6 +68191,9 @@ export namespace google { /** TuningJob baseModel. */ public baseModel?: (string|null); + /** TuningJob preTunedModel. */ + public preTunedModel?: (google.cloud.aiplatform.v1.IPreTunedModel|null); + /** TuningJob supervisedTuningSpec. */ public supervisedTuningSpec?: (google.cloud.aiplatform.v1.ISupervisedTuningSpec|null); @@ -67169,7 +68243,7 @@ export namespace google { public serviceAccount: string; /** TuningJob sourceModel. */ - public sourceModel?: "baseModel"; + public sourceModel?: ("baseModel"|"preTunedModel"); /** TuningJob tuningSpec. */ public tuningSpec?: "supervisedTuningSpec"; @@ -68346,6 +69420,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PreTunedModel. */ + interface IPreTunedModel { + + /** PreTunedModel tunedModelName */ + tunedModelName?: (string|null); + + /** PreTunedModel checkpointId */ + checkpointId?: (string|null); + + /** PreTunedModel baseModel */ + baseModel?: (string|null); + } + + /** Represents a PreTunedModel. */ + class PreTunedModel implements IPreTunedModel { + + /** + * Constructs a new PreTunedModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IPreTunedModel); + + /** PreTunedModel tunedModelName. */ + public tunedModelName: string; + + /** PreTunedModel checkpointId. */ + public checkpointId: string; + + /** PreTunedModel baseModel. */ + public baseModel: string; + + /** + * Creates a new PreTunedModel instance using the specified properties. + * @param [properties] Properties to set + * @returns PreTunedModel instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IPreTunedModel): google.cloud.aiplatform.v1.PreTunedModel; + + /** + * Encodes the specified PreTunedModel message. Does not implicitly {@link google.cloud.aiplatform.v1.PreTunedModel.verify|verify} messages. + * @param message PreTunedModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IPreTunedModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreTunedModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PreTunedModel.verify|verify} messages. + * @param message PreTunedModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IPreTunedModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreTunedModel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreTunedModel + * @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.aiplatform.v1.PreTunedModel; + + /** + * Decodes a PreTunedModel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreTunedModel + * @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.aiplatform.v1.PreTunedModel; + + /** + * Verifies a PreTunedModel 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 PreTunedModel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreTunedModel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PreTunedModel; + + /** + * Creates a plain object from a PreTunedModel message. Also converts values to other types if specified. + * @param message PreTunedModel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PreTunedModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreTunedModel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreTunedModel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a HyperparameterTuningJob. */ interface IHyperparameterTuningJob { @@ -85848,6 +87031,20 @@ export namespace google { * @returns Promise */ public streamGenerateContent(request: google.cloud.aiplatform.v1.IGenerateContentRequest): Promise; + + /** + * Calls EmbedContent. + * @param request EmbedContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EmbedContentResponse + */ + public embedContent(request: google.cloud.aiplatform.v1.IEmbedContentRequest, callback: google.cloud.aiplatform.v1.PredictionService.EmbedContentCallback): void; + + /** + * Calls EmbedContent. + * @param request EmbedContentRequest message or plain object + * @returns Promise + */ + public embedContent(request: google.cloud.aiplatform.v1.IEmbedContentRequest): Promise; } namespace PredictionService { @@ -85942,6 +87139,13 @@ export namespace google { * @param [response] GenerateContentResponse */ type StreamGenerateContentCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.GenerateContentResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.PredictionService|embedContent}. + * @param error Error, if any + * @param [response] EmbedContentResponse + */ + type EmbedContentCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.EmbedContentResponse) => void; } /** Properties of a PredictRequest. */ @@ -88661,6 +89865,525 @@ export namespace google { } } + /** Properties of an EmbedContentRequest. */ + interface IEmbedContentRequest { + + /** EmbedContentRequest model */ + model?: (string|null); + + /** EmbedContentRequest content */ + content?: (google.cloud.aiplatform.v1.IContent|null); + + /** EmbedContentRequest title */ + title?: (string|null); + + /** EmbedContentRequest taskType */ + taskType?: (google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|keyof typeof google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|null); + + /** EmbedContentRequest outputDimensionality */ + outputDimensionality?: (number|null); + + /** EmbedContentRequest autoTruncate */ + autoTruncate?: (boolean|null); + } + + /** Represents an EmbedContentRequest. */ + class EmbedContentRequest implements IEmbedContentRequest { + + /** + * Constructs a new EmbedContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IEmbedContentRequest); + + /** EmbedContentRequest model. */ + public model?: (string|null); + + /** EmbedContentRequest content. */ + public content?: (google.cloud.aiplatform.v1.IContent|null); + + /** EmbedContentRequest title. */ + public title?: (string|null); + + /** EmbedContentRequest taskType. */ + public taskType?: (google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|keyof typeof google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|null); + + /** EmbedContentRequest outputDimensionality. */ + public outputDimensionality?: (number|null); + + /** EmbedContentRequest autoTruncate. */ + public autoTruncate?: (boolean|null); + + /** + * Creates a new EmbedContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedContentRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IEmbedContentRequest): google.cloud.aiplatform.v1.EmbedContentRequest; + + /** + * Encodes the specified EmbedContentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentRequest.verify|verify} messages. + * @param message EmbedContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IEmbedContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedContentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentRequest.verify|verify} messages. + * @param message EmbedContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IEmbedContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedContentRequest + * @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.aiplatform.v1.EmbedContentRequest; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedContentRequest + * @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.aiplatform.v1.EmbedContentRequest; + + /** + * Verifies an EmbedContentRequest 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 EmbedContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EmbedContentRequest; + + /** + * Creates a plain object from an EmbedContentRequest message. Also converts values to other types if specified. + * @param message EmbedContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EmbedContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EmbedContentRequest { + + /** EmbeddingTaskType enum. */ + enum EmbeddingTaskType { + UNSPECIFIED = 0, + RETRIEVAL_QUERY = 2, + RETRIEVAL_DOCUMENT = 3, + SEMANTIC_SIMILARITY = 4, + CLASSIFICATION = 5, + CLUSTERING = 6, + QUESTION_ANSWERING = 7, + FACT_VERIFICATION = 8, + CODE_RETRIEVAL_QUERY = 9 + } + } + + /** Properties of an EmbedContentResponse. */ + interface IEmbedContentResponse { + + /** EmbedContentResponse embedding */ + embedding?: (google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding|null); + + /** EmbedContentResponse usageMetadata */ + usageMetadata?: (google.cloud.aiplatform.v1.IUsageMetadata|null); + + /** EmbedContentResponse truncated */ + truncated?: (boolean|null); + } + + /** Represents an EmbedContentResponse. */ + class EmbedContentResponse implements IEmbedContentResponse { + + /** + * Constructs a new EmbedContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IEmbedContentResponse); + + /** EmbedContentResponse embedding. */ + public embedding?: (google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding|null); + + /** EmbedContentResponse usageMetadata. */ + public usageMetadata?: (google.cloud.aiplatform.v1.IUsageMetadata|null); + + /** EmbedContentResponse truncated. */ + public truncated: boolean; + + /** + * Creates a new EmbedContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedContentResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IEmbedContentResponse): google.cloud.aiplatform.v1.EmbedContentResponse; + + /** + * Encodes the specified EmbedContentResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.verify|verify} messages. + * @param message EmbedContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IEmbedContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedContentResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.verify|verify} messages. + * @param message EmbedContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IEmbedContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedContentResponse + * @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.aiplatform.v1.EmbedContentResponse; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedContentResponse + * @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.aiplatform.v1.EmbedContentResponse; + + /** + * Verifies an EmbedContentResponse 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 EmbedContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EmbedContentResponse; + + /** + * Creates a plain object from an EmbedContentResponse message. Also converts values to other types if specified. + * @param message EmbedContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EmbedContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EmbedContentResponse { + + /** Properties of an Embedding. */ + interface IEmbedding { + + /** Embedding values */ + values?: (number[]|null); + } + + /** Represents an Embedding. */ + class Embedding implements IEmbedding { + + /** + * Constructs a new Embedding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding); + + /** Embedding values. */ + public values: number[]; + + /** + * Creates a new Embedding instance using the specified properties. + * @param [properties] Properties to set + * @returns Embedding instance + */ + public static create(properties?: google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding): google.cloud.aiplatform.v1.EmbedContentResponse.Embedding; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Embedding + * @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.aiplatform.v1.EmbedContentResponse.Embedding; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Embedding + * @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.aiplatform.v1.EmbedContentResponse.Embedding; + + /** + * Verifies an Embedding 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 Embedding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Embedding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EmbedContentResponse.Embedding; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @param message Embedding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EmbedContentResponse.Embedding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Embedding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Embedding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UsageMetadata. */ + interface IUsageMetadata { + + /** UsageMetadata promptTokenCount */ + promptTokenCount?: (number|null); + + /** UsageMetadata candidatesTokenCount */ + candidatesTokenCount?: (number|null); + + /** UsageMetadata totalTokenCount */ + totalTokenCount?: (number|null); + + /** UsageMetadata toolUsePromptTokenCount */ + toolUsePromptTokenCount?: (number|null); + + /** UsageMetadata thoughtsTokenCount */ + thoughtsTokenCount?: (number|null); + + /** UsageMetadata cachedContentTokenCount */ + cachedContentTokenCount?: (number|null); + + /** UsageMetadata promptTokensDetails */ + promptTokensDetails?: (google.cloud.aiplatform.v1.IModalityTokenCount[]|null); + + /** UsageMetadata cacheTokensDetails */ + cacheTokensDetails?: (google.cloud.aiplatform.v1.IModalityTokenCount[]|null); + + /** UsageMetadata candidatesTokensDetails */ + candidatesTokensDetails?: (google.cloud.aiplatform.v1.IModalityTokenCount[]|null); + + /** UsageMetadata toolUsePromptTokensDetails */ + toolUsePromptTokensDetails?: (google.cloud.aiplatform.v1.IModalityTokenCount[]|null); + + /** UsageMetadata trafficType */ + trafficType?: (google.cloud.aiplatform.v1.UsageMetadata.TrafficType|keyof typeof google.cloud.aiplatform.v1.UsageMetadata.TrafficType|null); + } + + /** Represents a UsageMetadata. */ + class UsageMetadata implements IUsageMetadata { + + /** + * Constructs a new UsageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IUsageMetadata); + + /** UsageMetadata promptTokenCount. */ + public promptTokenCount: number; + + /** UsageMetadata candidatesTokenCount. */ + public candidatesTokenCount: number; + + /** UsageMetadata totalTokenCount. */ + public totalTokenCount: number; + + /** UsageMetadata toolUsePromptTokenCount. */ + public toolUsePromptTokenCount: number; + + /** UsageMetadata thoughtsTokenCount. */ + public thoughtsTokenCount: number; + + /** UsageMetadata cachedContentTokenCount. */ + public cachedContentTokenCount: number; + + /** UsageMetadata promptTokensDetails. */ + public promptTokensDetails: google.cloud.aiplatform.v1.IModalityTokenCount[]; + + /** UsageMetadata cacheTokensDetails. */ + public cacheTokensDetails: google.cloud.aiplatform.v1.IModalityTokenCount[]; + + /** UsageMetadata candidatesTokensDetails. */ + public candidatesTokensDetails: google.cloud.aiplatform.v1.IModalityTokenCount[]; + + /** UsageMetadata toolUsePromptTokensDetails. */ + public toolUsePromptTokensDetails: google.cloud.aiplatform.v1.IModalityTokenCount[]; + + /** UsageMetadata trafficType. */ + public trafficType: (google.cloud.aiplatform.v1.UsageMetadata.TrafficType|keyof typeof google.cloud.aiplatform.v1.UsageMetadata.TrafficType); + + /** + * Creates a new UsageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UsageMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IUsageMetadata): google.cloud.aiplatform.v1.UsageMetadata; + + /** + * Encodes the specified UsageMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.UsageMetadata.verify|verify} messages. + * @param message UsageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IUsageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UsageMetadata.verify|verify} messages. + * @param message UsageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IUsageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsageMetadata + * @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.aiplatform.v1.UsageMetadata; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsageMetadata + * @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.aiplatform.v1.UsageMetadata; + + /** + * Verifies a UsageMetadata 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 UsageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsageMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.UsageMetadata; + + /** + * Creates a plain object from a UsageMetadata message. Also converts values to other types if specified. + * @param message UsageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.UsageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UsageMetadata { + + /** TrafficType enum. */ + enum TrafficType { + TRAFFIC_TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + PROVISIONED_THROUGHPUT = 2 + } + } + /** Represents a MatchService */ class MatchService extends $protobuf.rpc.Service { @@ -117317,6 +119040,9 @@ export namespace google { /** Properties of a ReasoningEngineSpec. */ interface IReasoningEngineSpec { + /** ReasoningEngineSpec sourceCodeSpec */ + sourceCodeSpec?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec|null); + /** ReasoningEngineSpec serviceAccount */ serviceAccount?: (string|null); @@ -117342,6 +119068,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1.IReasoningEngineSpec); + /** ReasoningEngineSpec sourceCodeSpec. */ + public sourceCodeSpec?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec|null); + /** ReasoningEngineSpec serviceAccount. */ public serviceAccount?: (string|null); @@ -117357,6 +119086,9 @@ export namespace google { /** ReasoningEngineSpec agentFramework. */ public agentFramework: string; + /** ReasoningEngineSpec deploymentSource. */ + public deploymentSource?: "sourceCodeSpec"; + /** * Creates a new ReasoningEngineSpec instance using the specified properties. * @param [properties] Properties to set @@ -117684,6 +119416,542 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a SourceCodeSpec. */ + interface ISourceCodeSpec { + + /** SourceCodeSpec inlineSource */ + inlineSource?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null); + + /** SourceCodeSpec developerConnectSource */ + developerConnectSource?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null); + + /** SourceCodeSpec pythonSpec */ + pythonSpec?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null); + } + + /** Represents a SourceCodeSpec. */ + class SourceCodeSpec implements ISourceCodeSpec { + + /** + * Constructs a new SourceCodeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec); + + /** SourceCodeSpec inlineSource. */ + public inlineSource?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null); + + /** SourceCodeSpec developerConnectSource. */ + public developerConnectSource?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null); + + /** SourceCodeSpec pythonSpec. */ + public pythonSpec?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null); + + /** SourceCodeSpec source. */ + public source?: ("inlineSource"|"developerConnectSource"); + + /** SourceCodeSpec languageSpec. */ + public languageSpec?: "pythonSpec"; + + /** + * Creates a new SourceCodeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Encodes the specified SourceCodeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @param message SourceCodeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @param message SourceCodeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeSpec + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeSpec + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Verifies a SourceCodeSpec 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 SourceCodeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Creates a plain object from a SourceCodeSpec message. Also converts values to other types if specified. + * @param message SourceCodeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeSpec { + + /** Properties of an InlineSource. */ + interface IInlineSource { + + /** InlineSource sourceArchive */ + sourceArchive?: (Uint8Array|Buffer|string|null); + } + + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { + + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource); + + /** InlineSource sourceArchive. */ + public sourceArchive: (Uint8Array|Buffer|string); + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Verifies an InlineSource 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeveloperConnectConfig. */ + interface IDeveloperConnectConfig { + + /** DeveloperConnectConfig gitRepositoryLink */ + gitRepositoryLink?: (string|null); + + /** DeveloperConnectConfig dir */ + dir?: (string|null); + + /** DeveloperConnectConfig revision */ + revision?: (string|null); + } + + /** Represents a DeveloperConnectConfig. */ + class DeveloperConnectConfig implements IDeveloperConnectConfig { + + /** + * Constructs a new DeveloperConnectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig); + + /** DeveloperConnectConfig gitRepositoryLink. */ + public gitRepositoryLink: string; + + /** DeveloperConnectConfig dir. */ + public dir: string; + + /** DeveloperConnectConfig revision. */ + public revision: string; + + /** + * Creates a new DeveloperConnectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DeveloperConnectConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Encodes the specified DeveloperConnectConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @param message DeveloperConnectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeveloperConnectConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @param message DeveloperConnectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeveloperConnectConfig + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeveloperConnectConfig + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Verifies a DeveloperConnectConfig 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 DeveloperConnectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeveloperConnectConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Creates a plain object from a DeveloperConnectConfig message. Also converts values to other types if specified. + * @param message DeveloperConnectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeveloperConnectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeveloperConnectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeveloperConnectSource. */ + interface IDeveloperConnectSource { + + /** DeveloperConnectSource config */ + config?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null); + } + + /** Represents a DeveloperConnectSource. */ + class DeveloperConnectSource implements IDeveloperConnectSource { + + /** + * Constructs a new DeveloperConnectSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource); + + /** DeveloperConnectSource config. */ + public config?: (google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null); + + /** + * Creates a new DeveloperConnectSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DeveloperConnectSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Encodes the specified DeveloperConnectSource message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @param message DeveloperConnectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeveloperConnectSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @param message DeveloperConnectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeveloperConnectSource + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeveloperConnectSource + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Verifies a DeveloperConnectSource 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 DeveloperConnectSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeveloperConnectSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Creates a plain object from a DeveloperConnectSource message. Also converts values to other types if specified. + * @param message DeveloperConnectSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeveloperConnectSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeveloperConnectSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSpec. */ + interface IPythonSpec { + + /** PythonSpec version */ + version?: (string|null); + + /** PythonSpec entrypointModule */ + entrypointModule?: (string|null); + + /** PythonSpec entrypointObject */ + entrypointObject?: (string|null); + + /** PythonSpec requirementsFile */ + requirementsFile?: (string|null); + } + + /** Represents a PythonSpec. */ + class PythonSpec implements IPythonSpec { + + /** + * Constructs a new PythonSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec); + + /** PythonSpec version. */ + public version: string; + + /** PythonSpec entrypointModule. */ + public entrypointModule: string; + + /** PythonSpec entrypointObject. */ + public entrypointObject: string; + + /** PythonSpec requirementsFile. */ + public requirementsFile: string; + + /** + * Creates a new PythonSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Encodes the specified PythonSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @param message PythonSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @param message PythonSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSpec + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Decodes a PythonSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSpec + * @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.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Verifies a PythonSpec 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 PythonSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Creates a plain object from a PythonSpec message. Also converts values to other types if specified. + * @param message PythonSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of a ReasoningEngine. */ @@ -117712,6 +119980,9 @@ export namespace google { /** ReasoningEngine encryptionSpec */ encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); + + /** ReasoningEngine labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a ReasoningEngine. */ @@ -117747,6 +120018,9 @@ export namespace google { /** ReasoningEngine encryptionSpec. */ public encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); + /** ReasoningEngine labels. */ + public labels: { [k: string]: string }; + /** * Creates a new ReasoningEngine instance using the specified properties. * @param [properties] Properties to set @@ -156007,11 +158281,117 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ReplicatedVoiceConfig. */ + interface IReplicatedVoiceConfig { + + /** ReplicatedVoiceConfig mimeType */ + mimeType?: (string|null); + + /** ReplicatedVoiceConfig voiceSampleAudio */ + voiceSampleAudio?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ReplicatedVoiceConfig. */ + class ReplicatedVoiceConfig implements IReplicatedVoiceConfig { + + /** + * Constructs a new ReplicatedVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig); + + /** ReplicatedVoiceConfig mimeType. */ + public mimeType: string; + + /** ReplicatedVoiceConfig voiceSampleAudio. */ + public voiceSampleAudio: (Uint8Array|Buffer|string); + + /** + * Creates a new ReplicatedVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplicatedVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig): google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig; + + /** + * Encodes the specified ReplicatedVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.verify|verify} messages. + * @param message ReplicatedVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplicatedVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.verify|verify} messages. + * @param message ReplicatedVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplicatedVoiceConfig + * @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.aiplatform.v1beta1.ReplicatedVoiceConfig; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplicatedVoiceConfig + * @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.aiplatform.v1beta1.ReplicatedVoiceConfig; + + /** + * Verifies a ReplicatedVoiceConfig 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 ReplicatedVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplicatedVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig; + + /** + * Creates a plain object from a ReplicatedVoiceConfig message. Also converts values to other types if specified. + * @param message ReplicatedVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplicatedVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplicatedVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a VoiceConfig. */ interface IVoiceConfig { /** VoiceConfig prebuiltVoiceConfig */ prebuiltVoiceConfig?: (google.cloud.aiplatform.v1beta1.IPrebuiltVoiceConfig|null); + + /** VoiceConfig replicatedVoiceConfig */ + replicatedVoiceConfig?: (google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig|null); } /** Represents a VoiceConfig. */ @@ -156026,8 +158406,11 @@ export namespace google { /** VoiceConfig prebuiltVoiceConfig. */ public prebuiltVoiceConfig?: (google.cloud.aiplatform.v1beta1.IPrebuiltVoiceConfig|null); + /** VoiceConfig replicatedVoiceConfig. */ + public replicatedVoiceConfig?: (google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig|null); + /** VoiceConfig voiceConfig. */ - public voiceConfig?: "prebuiltVoiceConfig"; + public voiceConfig?: ("prebuiltVoiceConfig"|"replicatedVoiceConfig"); /** * Creates a new VoiceConfig instance using the specified properties. @@ -156107,11 +158490,217 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SpeakerVoiceConfig. */ + interface ISpeakerVoiceConfig { + + /** SpeakerVoiceConfig speaker */ + speaker?: (string|null); + + /** SpeakerVoiceConfig voiceConfig */ + voiceConfig?: (google.cloud.aiplatform.v1beta1.IVoiceConfig|null); + } + + /** Represents a SpeakerVoiceConfig. */ + class SpeakerVoiceConfig implements ISpeakerVoiceConfig { + + /** + * Constructs a new SpeakerVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig); + + /** SpeakerVoiceConfig speaker. */ + public speaker: string; + + /** SpeakerVoiceConfig voiceConfig. */ + public voiceConfig?: (google.cloud.aiplatform.v1beta1.IVoiceConfig|null); + + /** + * Creates a new SpeakerVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeakerVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig): google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig; + + /** + * Encodes the specified SpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.verify|verify} messages. + * @param message SpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.verify|verify} messages. + * @param message SpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeakerVoiceConfig + * @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.aiplatform.v1beta1.SpeakerVoiceConfig; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeakerVoiceConfig + * @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.aiplatform.v1beta1.SpeakerVoiceConfig; + + /** + * Verifies a SpeakerVoiceConfig 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 SpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeakerVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig; + + /** + * Creates a plain object from a SpeakerVoiceConfig message. Also converts values to other types if specified. + * @param message SpeakerVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpeakerVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpeakerVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MultiSpeakerVoiceConfig. */ + interface IMultiSpeakerVoiceConfig { + + /** MultiSpeakerVoiceConfig speakerVoiceConfigs */ + speakerVoiceConfigs?: (google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig[]|null); + } + + /** Represents a MultiSpeakerVoiceConfig. */ + class MultiSpeakerVoiceConfig implements IMultiSpeakerVoiceConfig { + + /** + * Constructs a new MultiSpeakerVoiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig); + + /** MultiSpeakerVoiceConfig speakerVoiceConfigs. */ + public speakerVoiceConfigs: google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig[]; + + /** + * Creates a new MultiSpeakerVoiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiSpeakerVoiceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig): google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @param message MultiSpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @param message MultiSpeakerVoiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultiSpeakerVoiceConfig + * @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.aiplatform.v1beta1.MultiSpeakerVoiceConfig; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultiSpeakerVoiceConfig + * @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.aiplatform.v1beta1.MultiSpeakerVoiceConfig; + + /** + * Verifies a MultiSpeakerVoiceConfig 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 MultiSpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiSpeakerVoiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig; + + /** + * Creates a plain object from a MultiSpeakerVoiceConfig message. Also converts values to other types if specified. + * @param message MultiSpeakerVoiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiSpeakerVoiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultiSpeakerVoiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SpeechConfig. */ interface ISpeechConfig { /** SpeechConfig voiceConfig */ voiceConfig?: (google.cloud.aiplatform.v1beta1.IVoiceConfig|null); + + /** SpeechConfig languageCode */ + languageCode?: (string|null); + + /** SpeechConfig multiSpeakerVoiceConfig */ + multiSpeakerVoiceConfig?: (google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig|null); } /** Represents a SpeechConfig. */ @@ -156126,6 +158715,12 @@ export namespace google { /** SpeechConfig voiceConfig. */ public voiceConfig?: (google.cloud.aiplatform.v1beta1.IVoiceConfig|null); + /** SpeechConfig languageCode. */ + public languageCode: string; + + /** SpeechConfig multiSpeakerVoiceConfig. */ + public multiSpeakerVoiceConfig?: (google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig|null); + /** * Creates a new SpeechConfig instance using the specified properties. * @param [properties] Properties to set @@ -156204,6 +158799,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ImageConfig. */ + interface IImageConfig { + + /** ImageConfig aspectRatio */ + aspectRatio?: (string|null); + } + + /** Represents an ImageConfig. */ + class ImageConfig implements IImageConfig { + + /** + * Constructs a new ImageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IImageConfig); + + /** ImageConfig aspectRatio. */ + public aspectRatio?: (string|null); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IImageConfig): google.cloud.aiplatform.v1beta1.ImageConfig; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ImageConfig.verify|verify} messages. + * @param message ImageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IImageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageConfig + * @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.aiplatform.v1beta1.ImageConfig; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageConfig + * @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.aiplatform.v1beta1.ImageConfig; + + /** + * Verifies an ImageConfig 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 ImageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ImageConfig; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @param message ImageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ImageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GenerationConfig. */ interface IGenerationConfig { @@ -156269,6 +158961,9 @@ export namespace google { /** GenerationConfig modelConfig */ modelConfig?: (google.cloud.aiplatform.v1beta1.GenerationConfig.IModelConfig|null); + + /** GenerationConfig imageConfig */ + imageConfig?: (google.cloud.aiplatform.v1beta1.IImageConfig|null); } /** Represents a GenerationConfig. */ @@ -156343,6 +159038,9 @@ export namespace google { /** GenerationConfig modelConfig. */ public modelConfig?: (google.cloud.aiplatform.v1beta1.GenerationConfig.IModelConfig|null); + /** GenerationConfig imageConfig. */ + public imageConfig?: (google.cloud.aiplatform.v1beta1.IImageConfig|null); + /** * Creates a new GenerationConfig instance using the specified properties. * @param [properties] Properties to set @@ -160316,6 +163014,9 @@ export namespace google { /** ComputerUse environment */ environment?: (google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment|keyof typeof google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment|null); + + /** ComputerUse excludedPredefinedFunctions */ + excludedPredefinedFunctions?: (string[]|null); } /** Represents a ComputerUse. */ @@ -160330,6 +163031,9 @@ export namespace google { /** ComputerUse environment. */ public environment: (google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment|keyof typeof google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment); + /** ComputerUse excludedPredefinedFunctions. */ + public excludedPredefinedFunctions: string[]; + /** * Creates a new ComputerUse instance using the specified properties. * @param [properties] Properties to set @@ -160987,6 +163691,330 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FunctionResponsePart. */ + interface IFunctionResponsePart { + + /** FunctionResponsePart inlineData */ + inlineData?: (google.cloud.aiplatform.v1beta1.IFunctionResponseBlob|null); + + /** FunctionResponsePart fileData */ + fileData?: (google.cloud.aiplatform.v1beta1.IFunctionResponseFileData|null); + } + + /** Represents a FunctionResponsePart. */ + class FunctionResponsePart implements IFunctionResponsePart { + + /** + * Constructs a new FunctionResponsePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponsePart); + + /** FunctionResponsePart inlineData. */ + public inlineData?: (google.cloud.aiplatform.v1beta1.IFunctionResponseBlob|null); + + /** FunctionResponsePart fileData. */ + public fileData?: (google.cloud.aiplatform.v1beta1.IFunctionResponseFileData|null); + + /** FunctionResponsePart data. */ + public data?: ("inlineData"|"fileData"); + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponsePart instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponsePart): google.cloud.aiplatform.v1beta1.FunctionResponsePart; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponsePart.verify|verify} messages. + * @param message FunctionResponsePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFunctionResponsePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponsePart + * @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.aiplatform.v1beta1.FunctionResponsePart; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponsePart + * @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.aiplatform.v1beta1.FunctionResponsePart; + + /** + * Verifies a FunctionResponsePart 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 FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponsePart + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FunctionResponsePart; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @param message FunctionResponsePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FunctionResponsePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponsePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponsePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionResponseBlob. */ + interface IFunctionResponseBlob { + + /** FunctionResponseBlob mimeType */ + mimeType?: (string|null); + + /** FunctionResponseBlob data */ + data?: (Uint8Array|Buffer|string|null); + + /** FunctionResponseBlob displayName */ + displayName?: (string|null); + } + + /** Represents a FunctionResponseBlob. */ + class FunctionResponseBlob implements IFunctionResponseBlob { + + /** + * Constructs a new FunctionResponseBlob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponseBlob); + + /** FunctionResponseBlob mimeType. */ + public mimeType: string; + + /** FunctionResponseBlob data. */ + public data: (Uint8Array|Buffer|string); + + /** FunctionResponseBlob displayName. */ + public displayName: string; + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponseBlob instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponseBlob): google.cloud.aiplatform.v1beta1.FunctionResponseBlob; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseBlob.verify|verify} messages. + * @param message FunctionResponseBlob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFunctionResponseBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponseBlob + * @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.aiplatform.v1beta1.FunctionResponseBlob; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponseBlob + * @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.aiplatform.v1beta1.FunctionResponseBlob; + + /** + * Verifies a FunctionResponseBlob 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 FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponseBlob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FunctionResponseBlob; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @param message FunctionResponseBlob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FunctionResponseBlob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponseBlob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionResponseFileData. */ + interface IFunctionResponseFileData { + + /** FunctionResponseFileData mimeType */ + mimeType?: (string|null); + + /** FunctionResponseFileData fileUri */ + fileUri?: (string|null); + + /** FunctionResponseFileData displayName */ + displayName?: (string|null); + } + + /** Represents a FunctionResponseFileData. */ + class FunctionResponseFileData implements IFunctionResponseFileData { + + /** + * Constructs a new FunctionResponseFileData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponseFileData); + + /** FunctionResponseFileData mimeType. */ + public mimeType: string; + + /** FunctionResponseFileData fileUri. */ + public fileUri: string; + + /** FunctionResponseFileData displayName. */ + public displayName: string; + + /** + * Creates a new FunctionResponseFileData instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionResponseFileData instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFunctionResponseFileData): google.cloud.aiplatform.v1beta1.FunctionResponseFileData; + + /** + * Encodes the specified FunctionResponseFileData message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseFileData.verify|verify} messages. + * @param message FunctionResponseFileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFunctionResponseFileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionResponseFileData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseFileData.verify|verify} messages. + * @param message FunctionResponseFileData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFunctionResponseFileData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionResponseFileData + * @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.aiplatform.v1beta1.FunctionResponseFileData; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionResponseFileData + * @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.aiplatform.v1beta1.FunctionResponseFileData; + + /** + * Verifies a FunctionResponseFileData 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 FunctionResponseFileData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionResponseFileData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FunctionResponseFileData; + + /** + * Creates a plain object from a FunctionResponseFileData message. Also converts values to other types if specified. + * @param message FunctionResponseFileData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FunctionResponseFileData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionResponseFileData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionResponseFileData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a FunctionResponse. */ interface IFunctionResponse { @@ -160998,6 +164026,9 @@ export namespace google { /** FunctionResponse response */ response?: (google.protobuf.IStruct|null); + + /** FunctionResponse parts */ + parts?: (google.cloud.aiplatform.v1beta1.IFunctionResponsePart[]|null); } /** Represents a FunctionResponse. */ @@ -161018,6 +164049,9 @@ export namespace google { /** FunctionResponse response. */ public response?: (google.protobuf.IStruct|null); + /** FunctionResponse parts. */ + public parts: google.cloud.aiplatform.v1beta1.IFunctionResponsePart[]; + /** * Creates a new FunctionResponse instance using the specified properties. * @param [properties] Properties to set @@ -179990,7 +183024,9 @@ export namespace google { GETTING_CONTAINER_IMAGE = 9, STARTING_MODEL_SERVER = 3, FINISHING_UP = 4, - DEPLOYMENT_TERMINATED = 10 + DEPLOYMENT_TERMINATED = 10, + SUCCESSFULLY_DEPLOYED = 11, + FAILED_TO_DEPLOY = 12 } /** Represents an EndpointService */ @@ -289474,6 +292510,20 @@ export namespace google { * @returns Promise */ public chatCompletions(request: google.cloud.aiplatform.v1beta1.IChatCompletionsRequest): Promise; + + /** + * Calls EmbedContent. + * @param request EmbedContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EmbedContentResponse + */ + public embedContent(request: google.cloud.aiplatform.v1beta1.IEmbedContentRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.EmbedContentCallback): void; + + /** + * Calls EmbedContent. + * @param request EmbedContentRequest message or plain object + * @returns Promise + */ + public embedContent(request: google.cloud.aiplatform.v1beta1.IEmbedContentRequest): Promise; } namespace PredictionService { @@ -289582,6 +292632,13 @@ export namespace google { * @param [response] HttpBody */ type ChatCompletionsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PredictionService|embedContent}. + * @param error Error, if any + * @param [response] EmbedContentResponse + */ + type EmbedContentCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.EmbedContentResponse) => void; } /** Properties of a PredictRequest. */ @@ -292815,9 +295872,531 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an EmbedContentRequest. */ + interface IEmbedContentRequest { + + /** EmbedContentRequest model */ + model?: (string|null); + + /** EmbedContentRequest content */ + content?: (google.cloud.aiplatform.v1beta1.IContent|null); + + /** EmbedContentRequest title */ + title?: (string|null); + + /** EmbedContentRequest taskType */ + taskType?: (google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|keyof typeof google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|null); + + /** EmbedContentRequest outputDimensionality */ + outputDimensionality?: (number|null); + + /** EmbedContentRequest autoTruncate */ + autoTruncate?: (boolean|null); + } + + /** Represents an EmbedContentRequest. */ + class EmbedContentRequest implements IEmbedContentRequest { + + /** + * Constructs a new EmbedContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEmbedContentRequest); + + /** EmbedContentRequest model. */ + public model?: (string|null); + + /** EmbedContentRequest content. */ + public content?: (google.cloud.aiplatform.v1beta1.IContent|null); + + /** EmbedContentRequest title. */ + public title?: (string|null); + + /** EmbedContentRequest taskType. */ + public taskType?: (google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|keyof typeof google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|null); + + /** EmbedContentRequest outputDimensionality. */ + public outputDimensionality?: (number|null); + + /** EmbedContentRequest autoTruncate. */ + public autoTruncate?: (boolean|null); + + /** + * Creates a new EmbedContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedContentRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEmbedContentRequest): google.cloud.aiplatform.v1beta1.EmbedContentRequest; + + /** + * Encodes the specified EmbedContentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentRequest.verify|verify} messages. + * @param message EmbedContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEmbedContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedContentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentRequest.verify|verify} messages. + * @param message EmbedContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEmbedContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedContentRequest + * @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.aiplatform.v1beta1.EmbedContentRequest; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedContentRequest + * @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.aiplatform.v1beta1.EmbedContentRequest; + + /** + * Verifies an EmbedContentRequest 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 EmbedContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EmbedContentRequest; + + /** + * Creates a plain object from an EmbedContentRequest message. Also converts values to other types if specified. + * @param message EmbedContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EmbedContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EmbedContentRequest { + + /** EmbeddingTaskType enum. */ + enum EmbeddingTaskType { + UNSPECIFIED = 0, + RETRIEVAL_QUERY = 2, + RETRIEVAL_DOCUMENT = 3, + SEMANTIC_SIMILARITY = 4, + CLASSIFICATION = 5, + CLUSTERING = 6, + QUESTION_ANSWERING = 7, + FACT_VERIFICATION = 8, + CODE_RETRIEVAL_QUERY = 9 + } + } + + /** Properties of an EmbedContentResponse. */ + interface IEmbedContentResponse { + + /** EmbedContentResponse embedding */ + embedding?: (google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding|null); + + /** EmbedContentResponse usageMetadata */ + usageMetadata?: (google.cloud.aiplatform.v1beta1.IUsageMetadata|null); + + /** EmbedContentResponse truncated */ + truncated?: (boolean|null); + } + + /** Represents an EmbedContentResponse. */ + class EmbedContentResponse implements IEmbedContentResponse { + + /** + * Constructs a new EmbedContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEmbedContentResponse); + + /** EmbedContentResponse embedding. */ + public embedding?: (google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding|null); + + /** EmbedContentResponse usageMetadata. */ + public usageMetadata?: (google.cloud.aiplatform.v1beta1.IUsageMetadata|null); + + /** EmbedContentResponse truncated. */ + public truncated: boolean; + + /** + * Creates a new EmbedContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedContentResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEmbedContentResponse): google.cloud.aiplatform.v1beta1.EmbedContentResponse; + + /** + * Encodes the specified EmbedContentResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.verify|verify} messages. + * @param message EmbedContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEmbedContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedContentResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.verify|verify} messages. + * @param message EmbedContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEmbedContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedContentResponse + * @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.aiplatform.v1beta1.EmbedContentResponse; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedContentResponse + * @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.aiplatform.v1beta1.EmbedContentResponse; + + /** + * Verifies an EmbedContentResponse 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 EmbedContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EmbedContentResponse; + + /** + * Creates a plain object from an EmbedContentResponse message. Also converts values to other types if specified. + * @param message EmbedContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EmbedContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EmbedContentResponse { + + /** Properties of an Embedding. */ + interface IEmbedding { + + /** Embedding values */ + values?: (number[]|null); + } + + /** Represents an Embedding. */ + class Embedding implements IEmbedding { + + /** + * Constructs a new Embedding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding); + + /** Embedding values. */ + public values: number[]; + + /** + * Creates a new Embedding instance using the specified properties. + * @param [properties] Properties to set + * @returns Embedding instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding): google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Embedding + * @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.aiplatform.v1beta1.EmbedContentResponse.Embedding; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Embedding + * @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.aiplatform.v1beta1.EmbedContentResponse.Embedding; + + /** + * Verifies an Embedding 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 Embedding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Embedding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @param message Embedding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Embedding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Embedding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UsageMetadata. */ + interface IUsageMetadata { + + /** UsageMetadata promptTokenCount */ + promptTokenCount?: (number|null); + + /** UsageMetadata candidatesTokenCount */ + candidatesTokenCount?: (number|null); + + /** UsageMetadata totalTokenCount */ + totalTokenCount?: (number|null); + + /** UsageMetadata toolUsePromptTokenCount */ + toolUsePromptTokenCount?: (number|null); + + /** UsageMetadata thoughtsTokenCount */ + thoughtsTokenCount?: (number|null); + + /** UsageMetadata cachedContentTokenCount */ + cachedContentTokenCount?: (number|null); + + /** UsageMetadata promptTokensDetails */ + promptTokensDetails?: (google.cloud.aiplatform.v1beta1.IModalityTokenCount[]|null); + + /** UsageMetadata cacheTokensDetails */ + cacheTokensDetails?: (google.cloud.aiplatform.v1beta1.IModalityTokenCount[]|null); + + /** UsageMetadata candidatesTokensDetails */ + candidatesTokensDetails?: (google.cloud.aiplatform.v1beta1.IModalityTokenCount[]|null); + + /** UsageMetadata toolUsePromptTokensDetails */ + toolUsePromptTokensDetails?: (google.cloud.aiplatform.v1beta1.IModalityTokenCount[]|null); + + /** UsageMetadata trafficType */ + trafficType?: (google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType|keyof typeof google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType|null); + } + + /** Represents a UsageMetadata. */ + class UsageMetadata implements IUsageMetadata { + + /** + * Constructs a new UsageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IUsageMetadata); + + /** UsageMetadata promptTokenCount. */ + public promptTokenCount: number; + + /** UsageMetadata candidatesTokenCount. */ + public candidatesTokenCount: number; + + /** UsageMetadata totalTokenCount. */ + public totalTokenCount: number; + + /** UsageMetadata toolUsePromptTokenCount. */ + public toolUsePromptTokenCount: number; + + /** UsageMetadata thoughtsTokenCount. */ + public thoughtsTokenCount: number; + + /** UsageMetadata cachedContentTokenCount. */ + public cachedContentTokenCount: number; + + /** UsageMetadata promptTokensDetails. */ + public promptTokensDetails: google.cloud.aiplatform.v1beta1.IModalityTokenCount[]; + + /** UsageMetadata cacheTokensDetails. */ + public cacheTokensDetails: google.cloud.aiplatform.v1beta1.IModalityTokenCount[]; + + /** UsageMetadata candidatesTokensDetails. */ + public candidatesTokensDetails: google.cloud.aiplatform.v1beta1.IModalityTokenCount[]; + + /** UsageMetadata toolUsePromptTokensDetails. */ + public toolUsePromptTokensDetails: google.cloud.aiplatform.v1beta1.IModalityTokenCount[]; + + /** UsageMetadata trafficType. */ + public trafficType: (google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType|keyof typeof google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType); + + /** + * Creates a new UsageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UsageMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IUsageMetadata): google.cloud.aiplatform.v1beta1.UsageMetadata; + + /** + * Encodes the specified UsageMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UsageMetadata.verify|verify} messages. + * @param message UsageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IUsageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UsageMetadata.verify|verify} messages. + * @param message UsageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IUsageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsageMetadata + * @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.aiplatform.v1beta1.UsageMetadata; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsageMetadata + * @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.aiplatform.v1beta1.UsageMetadata; + + /** + * Verifies a UsageMetadata 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 UsageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsageMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.UsageMetadata; + + /** + * Creates a plain object from a UsageMetadata message. Also converts values to other types if specified. + * @param message UsageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.UsageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UsageMetadata { + + /** TrafficType enum. */ + enum TrafficType { + TRAFFIC_TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + PROVISIONED_THROUGHPUT = 2 + } + } + /** Properties of a ReasoningEngineSpec. */ interface IReasoningEngineSpec { + /** ReasoningEngineSpec sourceCodeSpec */ + sourceCodeSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec|null); + /** ReasoningEngineSpec serviceAccount */ serviceAccount?: (string|null); @@ -292843,6 +296422,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.IReasoningEngineSpec); + /** ReasoningEngineSpec sourceCodeSpec. */ + public sourceCodeSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec|null); + /** ReasoningEngineSpec serviceAccount. */ public serviceAccount?: (string|null); @@ -292858,6 +296440,9 @@ export namespace google { /** ReasoningEngineSpec agentFramework. */ public agentFramework: string; + /** ReasoningEngineSpec deploymentSource. */ + public deploymentSource?: "sourceCodeSpec"; + /** * Creates a new ReasoningEngineSpec instance using the specified properties. * @param [properties] Properties to set @@ -293185,6 +296770,542 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a SourceCodeSpec. */ + interface ISourceCodeSpec { + + /** SourceCodeSpec inlineSource */ + inlineSource?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null); + + /** SourceCodeSpec developerConnectSource */ + developerConnectSource?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null); + + /** SourceCodeSpec pythonSpec */ + pythonSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null); + } + + /** Represents a SourceCodeSpec. */ + class SourceCodeSpec implements ISourceCodeSpec { + + /** + * Constructs a new SourceCodeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec); + + /** SourceCodeSpec inlineSource. */ + public inlineSource?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null); + + /** SourceCodeSpec developerConnectSource. */ + public developerConnectSource?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null); + + /** SourceCodeSpec pythonSpec. */ + public pythonSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null); + + /** SourceCodeSpec source. */ + public source?: ("inlineSource"|"developerConnectSource"); + + /** SourceCodeSpec languageSpec. */ + public languageSpec?: "pythonSpec"; + + /** + * Creates a new SourceCodeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Encodes the specified SourceCodeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @param message SourceCodeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @param message SourceCodeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeSpec + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeSpec + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Verifies a SourceCodeSpec 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 SourceCodeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec; + + /** + * Creates a plain object from a SourceCodeSpec message. Also converts values to other types if specified. + * @param message SourceCodeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeSpec { + + /** Properties of an InlineSource. */ + interface IInlineSource { + + /** InlineSource sourceArchive */ + sourceArchive?: (Uint8Array|Buffer|string|null); + } + + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { + + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource); + + /** InlineSource sourceArchive. */ + public sourceArchive: (Uint8Array|Buffer|string); + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Verifies an InlineSource 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeveloperConnectConfig. */ + interface IDeveloperConnectConfig { + + /** DeveloperConnectConfig gitRepositoryLink */ + gitRepositoryLink?: (string|null); + + /** DeveloperConnectConfig dir */ + dir?: (string|null); + + /** DeveloperConnectConfig revision */ + revision?: (string|null); + } + + /** Represents a DeveloperConnectConfig. */ + class DeveloperConnectConfig implements IDeveloperConnectConfig { + + /** + * Constructs a new DeveloperConnectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig); + + /** DeveloperConnectConfig gitRepositoryLink. */ + public gitRepositoryLink: string; + + /** DeveloperConnectConfig dir. */ + public dir: string; + + /** DeveloperConnectConfig revision. */ + public revision: string; + + /** + * Creates a new DeveloperConnectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DeveloperConnectConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Encodes the specified DeveloperConnectConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @param message DeveloperConnectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeveloperConnectConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @param message DeveloperConnectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeveloperConnectConfig + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeveloperConnectConfig + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Verifies a DeveloperConnectConfig 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 DeveloperConnectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeveloperConnectConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig; + + /** + * Creates a plain object from a DeveloperConnectConfig message. Also converts values to other types if specified. + * @param message DeveloperConnectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeveloperConnectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeveloperConnectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeveloperConnectSource. */ + interface IDeveloperConnectSource { + + /** DeveloperConnectSource config */ + config?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null); + } + + /** Represents a DeveloperConnectSource. */ + class DeveloperConnectSource implements IDeveloperConnectSource { + + /** + * Constructs a new DeveloperConnectSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource); + + /** DeveloperConnectSource config. */ + public config?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null); + + /** + * Creates a new DeveloperConnectSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DeveloperConnectSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Encodes the specified DeveloperConnectSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @param message DeveloperConnectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeveloperConnectSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @param message DeveloperConnectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeveloperConnectSource + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeveloperConnectSource + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Verifies a DeveloperConnectSource 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 DeveloperConnectSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeveloperConnectSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource; + + /** + * Creates a plain object from a DeveloperConnectSource message. Also converts values to other types if specified. + * @param message DeveloperConnectSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeveloperConnectSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeveloperConnectSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSpec. */ + interface IPythonSpec { + + /** PythonSpec version */ + version?: (string|null); + + /** PythonSpec entrypointModule */ + entrypointModule?: (string|null); + + /** PythonSpec entrypointObject */ + entrypointObject?: (string|null); + + /** PythonSpec requirementsFile */ + requirementsFile?: (string|null); + } + + /** Represents a PythonSpec. */ + class PythonSpec implements IPythonSpec { + + /** + * Constructs a new PythonSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec); + + /** PythonSpec version. */ + public version: string; + + /** PythonSpec entrypointModule. */ + public entrypointModule: string; + + /** PythonSpec entrypointObject. */ + public entrypointObject: string; + + /** PythonSpec requirementsFile. */ + public requirementsFile: string; + + /** + * Creates a new PythonSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Encodes the specified PythonSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @param message PythonSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @param message PythonSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSpec + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Decodes a PythonSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSpec + * @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.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Verifies a PythonSpec 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 PythonSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec; + + /** + * Creates a plain object from a PythonSpec message. Also converts values to other types if specified. + * @param message PythonSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of a ReasoningEngine. */ @@ -293216,6 +297337,9 @@ export namespace google { /** ReasoningEngine encryptionSpec */ encryptionSpec?: (google.cloud.aiplatform.v1beta1.IEncryptionSpec|null); + + /** ReasoningEngine labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a ReasoningEngine. */ @@ -293254,6 +297378,9 @@ export namespace google { /** ReasoningEngine encryptionSpec. */ public encryptionSpec?: (google.cloud.aiplatform.v1beta1.IEncryptionSpec|null); + /** ReasoningEngine labels. */ + public labels: { [k: string]: string }; + /** * Creates a new ReasoningEngine instance using the specified properties. * @param [properties] Properties to set @@ -307972,9 +312099,6 @@ export namespace google { /** EventActions artifactDelta */ artifactDelta?: ({ [k: string]: number }|null); - /** EventActions transferToAgent */ - transferToAgent?: (boolean|null); - /** EventActions escalate */ escalate?: (boolean|null); @@ -308003,9 +312127,6 @@ export namespace google { /** EventActions artifactDelta. */ public artifactDelta: { [k: string]: number }; - /** EventActions transferToAgent. */ - public transferToAgent: boolean; - /** EventActions escalate. */ public escalate: boolean; @@ -308999,6 +313120,9 @@ export namespace google { /** ListEventsRequest filter */ filter?: (string|null); + + /** ListEventsRequest orderBy */ + orderBy?: (string|null); } /** Represents a ListEventsRequest. */ @@ -309022,6 +313146,9 @@ export namespace google { /** ListEventsRequest filter. */ public filter: string; + /** ListEventsRequest orderBy. */ + public orderBy: string; + /** * Creates a new ListEventsRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index f0a57ddc09e7..73e95cf5428a 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -17180,6 +17180,7 @@ * @property {string|null} [machineType] MachineSpec machineType * @property {google.cloud.aiplatform.v1.AcceleratorType|null} [acceleratorType] MachineSpec acceleratorType * @property {number|null} [acceleratorCount] MachineSpec acceleratorCount + * @property {string|null} [gpuPartitionSize] MachineSpec gpuPartitionSize * @property {string|null} [tpuTopology] MachineSpec tpuTopology * @property {google.cloud.aiplatform.v1.IReservationAffinity|null} [reservationAffinity] MachineSpec reservationAffinity */ @@ -17223,6 +17224,14 @@ */ MachineSpec.prototype.acceleratorCount = 0; + /** + * MachineSpec gpuPartitionSize. + * @member {string} gpuPartitionSize + * @memberof google.cloud.aiplatform.v1.MachineSpec + * @instance + */ + MachineSpec.prototype.gpuPartitionSize = ""; + /** * MachineSpec tpuTopology. * @member {string} tpuTopology @@ -17273,6 +17282,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.tpuTopology); if (message.reservationAffinity != null && Object.hasOwnProperty.call(message, "reservationAffinity")) $root.google.cloud.aiplatform.v1.ReservationAffinity.encode(message.reservationAffinity, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gpuPartitionSize); return writer; }; @@ -17321,6 +17332,10 @@ message.acceleratorCount = reader.int32(); break; } + case 7: { + message.gpuPartitionSize = reader.string(); + break; + } case 4: { message.tpuTopology = reader.string(); break; @@ -17395,6 +17410,9 @@ if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) if (!$util.isInteger(message.acceleratorCount)) return "acceleratorCount: integer expected"; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + if (!$util.isString(message.gpuPartitionSize)) + return "gpuPartitionSize: string expected"; if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) if (!$util.isString(message.tpuTopology)) return "tpuTopology: string expected"; @@ -17506,6 +17524,8 @@ } if (object.acceleratorCount != null) message.acceleratorCount = object.acceleratorCount | 0; + if (object.gpuPartitionSize != null) + message.gpuPartitionSize = String(object.gpuPartitionSize); if (object.tpuTopology != null) message.tpuTopology = String(object.tpuTopology); if (object.reservationAffinity != null) { @@ -17535,6 +17555,7 @@ object.acceleratorCount = 0; object.tpuTopology = ""; object.reservationAffinity = null; + object.gpuPartitionSize = ""; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -17546,6 +17567,8 @@ object.tpuTopology = message.tpuTopology; if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) object.reservationAffinity = $root.google.cloud.aiplatform.v1.ReservationAffinity.toObject(message.reservationAffinity, options); + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + object.gpuPartitionSize = message.gpuPartitionSize; return object; }; @@ -30364,6 +30387,1666 @@ return VideoMetadata; })(); + v1.PrebuiltVoiceConfig = (function() { + + /** + * Properties of a PrebuiltVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface IPrebuiltVoiceConfig + * @property {string|null} [voiceName] PrebuiltVoiceConfig voiceName + */ + + /** + * Constructs a new PrebuiltVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a PrebuiltVoiceConfig. + * @implements IPrebuiltVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig=} [properties] Properties to set + */ + function PrebuiltVoiceConfig(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]]; + } + + /** + * PrebuiltVoiceConfig voiceName. + * @member {string|null|undefined} voiceName + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @instance + */ + PrebuiltVoiceConfig.prototype.voiceName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrebuiltVoiceConfig.prototype, "_voiceName", { + get: $util.oneOfGetter($oneOfFields = ["voiceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrebuiltVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PrebuiltVoiceConfig} PrebuiltVoiceConfig instance + */ + PrebuiltVoiceConfig.create = function create(properties) { + return new PrebuiltVoiceConfig(properties); + }; + + /** + * Encodes the specified PrebuiltVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.PrebuiltVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig} message PrebuiltVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrebuiltVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.voiceName != null && Object.hasOwnProperty.call(message, "voiceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.voiceName); + return writer; + }; + + /** + * Encodes the specified PrebuiltVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PrebuiltVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig} message PrebuiltVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrebuiltVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrebuiltVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.PrebuiltVoiceConfig} PrebuiltVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrebuiltVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.voiceName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrebuiltVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PrebuiltVoiceConfig} PrebuiltVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrebuiltVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrebuiltVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrebuiltVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.voiceName != null && message.hasOwnProperty("voiceName")) { + properties._voiceName = 1; + if (!$util.isString(message.voiceName)) + return "voiceName: string expected"; + } + return null; + }; + + /** + * Creates a PrebuiltVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PrebuiltVoiceConfig} PrebuiltVoiceConfig + */ + PrebuiltVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig(); + if (object.voiceName != null) + message.voiceName = String(object.voiceName); + return message; + }; + + /** + * Creates a plain object from a PrebuiltVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.PrebuiltVoiceConfig} message PrebuiltVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrebuiltVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.voiceName != null && message.hasOwnProperty("voiceName")) { + object.voiceName = message.voiceName; + if (options.oneofs) + object._voiceName = "voiceName"; + } + return object; + }; + + /** + * Converts this PrebuiltVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + PrebuiltVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrebuiltVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PrebuiltVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrebuiltVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PrebuiltVoiceConfig"; + }; + + return PrebuiltVoiceConfig; + })(); + + v1.ReplicatedVoiceConfig = (function() { + + /** + * Properties of a ReplicatedVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface IReplicatedVoiceConfig + * @property {string|null} [mimeType] ReplicatedVoiceConfig mimeType + * @property {Uint8Array|null} [voiceSampleAudio] ReplicatedVoiceConfig voiceSampleAudio + */ + + /** + * Constructs a new ReplicatedVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a ReplicatedVoiceConfig. + * @implements IReplicatedVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.IReplicatedVoiceConfig=} [properties] Properties to set + */ + function ReplicatedVoiceConfig(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]]; + } + + /** + * ReplicatedVoiceConfig mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @instance + */ + ReplicatedVoiceConfig.prototype.mimeType = ""; + + /** + * ReplicatedVoiceConfig voiceSampleAudio. + * @member {Uint8Array} voiceSampleAudio + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @instance + */ + ReplicatedVoiceConfig.prototype.voiceSampleAudio = $util.newBuffer([]); + + /** + * Creates a new ReplicatedVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IReplicatedVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReplicatedVoiceConfig} ReplicatedVoiceConfig instance + */ + ReplicatedVoiceConfig.create = function create(properties) { + return new ReplicatedVoiceConfig(properties); + }; + + /** + * Encodes the specified ReplicatedVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ReplicatedVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IReplicatedVoiceConfig} message ReplicatedVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicatedVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.voiceSampleAudio != null && Object.hasOwnProperty.call(message, "voiceSampleAudio")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voiceSampleAudio); + return writer; + }; + + /** + * Encodes the specified ReplicatedVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReplicatedVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IReplicatedVoiceConfig} message ReplicatedVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicatedVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicatedVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.voiceSampleAudio = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicatedVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicatedVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicatedVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.voiceSampleAudio != null && message.hasOwnProperty("voiceSampleAudio")) + if (!(message.voiceSampleAudio && typeof message.voiceSampleAudio.length === "number" || $util.isString(message.voiceSampleAudio))) + return "voiceSampleAudio: buffer expected"; + return null; + }; + + /** + * Creates a ReplicatedVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + */ + ReplicatedVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.voiceSampleAudio != null) + if (typeof object.voiceSampleAudio === "string") + $util.base64.decode(object.voiceSampleAudio, message.voiceSampleAudio = $util.newBuffer($util.base64.length(object.voiceSampleAudio)), 0); + else if (object.voiceSampleAudio.length >= 0) + message.voiceSampleAudio = object.voiceSampleAudio; + return message; + }; + + /** + * Creates a plain object from a ReplicatedVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.ReplicatedVoiceConfig} message ReplicatedVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplicatedVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.voiceSampleAudio = ""; + else { + object.voiceSampleAudio = []; + if (options.bytes !== Array) + object.voiceSampleAudio = $util.newBuffer(object.voiceSampleAudio); + } + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.voiceSampleAudio != null && message.hasOwnProperty("voiceSampleAudio")) + object.voiceSampleAudio = options.bytes === String ? $util.base64.encode(message.voiceSampleAudio, 0, message.voiceSampleAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.voiceSampleAudio) : message.voiceSampleAudio; + return object; + }; + + /** + * Converts this ReplicatedVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + ReplicatedVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplicatedVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReplicatedVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplicatedVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReplicatedVoiceConfig"; + }; + + return ReplicatedVoiceConfig; + })(); + + v1.VoiceConfig = (function() { + + /** + * Properties of a VoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface IVoiceConfig + * @property {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig|null} [prebuiltVoiceConfig] VoiceConfig prebuiltVoiceConfig + * @property {google.cloud.aiplatform.v1.IReplicatedVoiceConfig|null} [replicatedVoiceConfig] VoiceConfig replicatedVoiceConfig + */ + + /** + * Constructs a new VoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a VoiceConfig. + * @implements IVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.IVoiceConfig=} [properties] Properties to set + */ + function VoiceConfig(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]]; + } + + /** + * VoiceConfig prebuiltVoiceConfig. + * @member {google.cloud.aiplatform.v1.IPrebuiltVoiceConfig|null|undefined} prebuiltVoiceConfig + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @instance + */ + VoiceConfig.prototype.prebuiltVoiceConfig = null; + + /** + * VoiceConfig replicatedVoiceConfig. + * @member {google.cloud.aiplatform.v1.IReplicatedVoiceConfig|null|undefined} replicatedVoiceConfig + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @instance + */ + VoiceConfig.prototype.replicatedVoiceConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VoiceConfig voiceConfig. + * @member {"prebuiltVoiceConfig"|"replicatedVoiceConfig"|undefined} voiceConfig + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @instance + */ + Object.defineProperty(VoiceConfig.prototype, "voiceConfig", { + get: $util.oneOfGetter($oneOfFields = ["prebuiltVoiceConfig", "replicatedVoiceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.VoiceConfig} VoiceConfig instance + */ + VoiceConfig.create = function create(properties) { + return new VoiceConfig(properties); + }; + + /** + * Encodes the specified VoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.VoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IVoiceConfig} message VoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prebuiltVoiceConfig != null && Object.hasOwnProperty.call(message, "prebuiltVoiceConfig")) + $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig.encode(message.prebuiltVoiceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replicatedVoiceConfig != null && Object.hasOwnProperty.call(message, "replicatedVoiceConfig")) + $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig.encode(message.replicatedVoiceConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.VoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IVoiceConfig} message VoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.VoiceConfig} VoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.VoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.prebuiltVoiceConfig = $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.VoiceConfig} VoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prebuiltVoiceConfig != null && message.hasOwnProperty("prebuiltVoiceConfig")) { + properties.voiceConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig.verify(message.prebuiltVoiceConfig); + if (error) + return "prebuiltVoiceConfig." + error; + } + } + if (message.replicatedVoiceConfig != null && message.hasOwnProperty("replicatedVoiceConfig")) { + if (properties.voiceConfig === 1) + return "voiceConfig: multiple values"; + properties.voiceConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig.verify(message.replicatedVoiceConfig); + if (error) + return "replicatedVoiceConfig." + error; + } + } + return null; + }; + + /** + * Creates a VoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.VoiceConfig} VoiceConfig + */ + VoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.VoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.VoiceConfig(); + if (object.prebuiltVoiceConfig != null) { + if (typeof object.prebuiltVoiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.VoiceConfig.prebuiltVoiceConfig: object expected"); + message.prebuiltVoiceConfig = $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig.fromObject(object.prebuiltVoiceConfig); + } + if (object.replicatedVoiceConfig != null) { + if (typeof object.replicatedVoiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.VoiceConfig.replicatedVoiceConfig: object expected"); + message.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig.fromObject(object.replicatedVoiceConfig); + } + return message; + }; + + /** + * Creates a plain object from a VoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.VoiceConfig} message VoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prebuiltVoiceConfig != null && message.hasOwnProperty("prebuiltVoiceConfig")) { + object.prebuiltVoiceConfig = $root.google.cloud.aiplatform.v1.PrebuiltVoiceConfig.toObject(message.prebuiltVoiceConfig, options); + if (options.oneofs) + object.voiceConfig = "prebuiltVoiceConfig"; + } + if (message.replicatedVoiceConfig != null && message.hasOwnProperty("replicatedVoiceConfig")) { + object.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1.ReplicatedVoiceConfig.toObject(message.replicatedVoiceConfig, options); + if (options.oneofs) + object.voiceConfig = "replicatedVoiceConfig"; + } + return object; + }; + + /** + * Converts this VoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @instance + * @returns {Object.} JSON object + */ + VoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.VoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.VoiceConfig"; + }; + + return VoiceConfig; + })(); + + v1.SpeakerVoiceConfig = (function() { + + /** + * Properties of a SpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface ISpeakerVoiceConfig + * @property {string|null} [speaker] SpeakerVoiceConfig speaker + * @property {google.cloud.aiplatform.v1.IVoiceConfig|null} [voiceConfig] SpeakerVoiceConfig voiceConfig + */ + + /** + * Constructs a new SpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a SpeakerVoiceConfig. + * @implements ISpeakerVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.ISpeakerVoiceConfig=} [properties] Properties to set + */ + function SpeakerVoiceConfig(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]]; + } + + /** + * SpeakerVoiceConfig speaker. + * @member {string} speaker + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @instance + */ + SpeakerVoiceConfig.prototype.speaker = ""; + + /** + * SpeakerVoiceConfig voiceConfig. + * @member {google.cloud.aiplatform.v1.IVoiceConfig|null|undefined} voiceConfig + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @instance + */ + SpeakerVoiceConfig.prototype.voiceConfig = null; + + /** + * Creates a new SpeakerVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeakerVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.SpeakerVoiceConfig} SpeakerVoiceConfig instance + */ + SpeakerVoiceConfig.create = function create(properties) { + return new SpeakerVoiceConfig(properties); + }; + + /** + * Encodes the specified SpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.SpeakerVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeakerVoiceConfig} message SpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeakerVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speaker != null && Object.hasOwnProperty.call(message, "speaker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.speaker); + if (message.voiceConfig != null && Object.hasOwnProperty.call(message, "voiceConfig")) + $root.google.cloud.aiplatform.v1.VoiceConfig.encode(message.voiceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SpeakerVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeakerVoiceConfig} message SpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeakerVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.SpeakerVoiceConfig} SpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeakerVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.speaker = reader.string(); + break; + } + case 2: { + message.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.SpeakerVoiceConfig} SpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeakerVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpeakerVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpeakerVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speaker != null && message.hasOwnProperty("speaker")) + if (!$util.isString(message.speaker)) + return "speaker: string expected"; + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) { + var error = $root.google.cloud.aiplatform.v1.VoiceConfig.verify(message.voiceConfig); + if (error) + return "voiceConfig." + error; + } + return null; + }; + + /** + * Creates a SpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.SpeakerVoiceConfig} SpeakerVoiceConfig + */ + SpeakerVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig(); + if (object.speaker != null) + message.speaker = String(object.speaker); + if (object.voiceConfig != null) { + if (typeof object.voiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.SpeakerVoiceConfig.voiceConfig: object expected"); + message.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.fromObject(object.voiceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SpeakerVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.SpeakerVoiceConfig} message SpeakerVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpeakerVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.speaker = ""; + object.voiceConfig = null; + } + if (message.speaker != null && message.hasOwnProperty("speaker")) + object.speaker = message.speaker; + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) + object.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.toObject(message.voiceConfig, options); + return object; + }; + + /** + * Converts this SpeakerVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + SpeakerVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpeakerVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.SpeakerVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpeakerVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.SpeakerVoiceConfig"; + }; + + return SpeakerVoiceConfig; + })(); + + v1.MultiSpeakerVoiceConfig = (function() { + + /** + * Properties of a MultiSpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface IMultiSpeakerVoiceConfig + * @property {Array.|null} [speakerVoiceConfigs] MultiSpeakerVoiceConfig speakerVoiceConfigs + */ + + /** + * Constructs a new MultiSpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MultiSpeakerVoiceConfig. + * @implements IMultiSpeakerVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig=} [properties] Properties to set + */ + function MultiSpeakerVoiceConfig(properties) { + this.speakerVoiceConfigs = []; + 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]]; + } + + /** + * MultiSpeakerVoiceConfig speakerVoiceConfigs. + * @member {Array.} speakerVoiceConfigs + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @instance + */ + MultiSpeakerVoiceConfig.prototype.speakerVoiceConfigs = $util.emptyArray; + + /** + * Creates a new MultiSpeakerVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig instance + */ + MultiSpeakerVoiceConfig.create = function create(properties) { + return new MultiSpeakerVoiceConfig(properties); + }; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSpeakerVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speakerVoiceConfigs != null && message.speakerVoiceConfigs.length) + for (var i = 0; i < message.speakerVoiceConfigs.length; ++i) + $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig.encode(message.speakerVoiceConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSpeakerVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSpeakerVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.speakerVoiceConfigs && message.speakerVoiceConfigs.length)) + message.speakerVoiceConfigs = []; + message.speakerVoiceConfigs.push($root.google.cloud.aiplatform.v1.SpeakerVoiceConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSpeakerVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSpeakerVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSpeakerVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speakerVoiceConfigs != null && message.hasOwnProperty("speakerVoiceConfigs")) { + if (!Array.isArray(message.speakerVoiceConfigs)) + return "speakerVoiceConfigs: array expected"; + for (var i = 0; i < message.speakerVoiceConfigs.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig.verify(message.speakerVoiceConfigs[i]); + if (error) + return "speakerVoiceConfigs." + error; + } + } + return null; + }; + + /** + * Creates a MultiSpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + */ + MultiSpeakerVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig(); + if (object.speakerVoiceConfigs) { + if (!Array.isArray(object.speakerVoiceConfigs)) + throw TypeError(".google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.speakerVoiceConfigs: array expected"); + message.speakerVoiceConfigs = []; + for (var i = 0; i < object.speakerVoiceConfigs.length; ++i) { + if (typeof object.speakerVoiceConfigs[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.speakerVoiceConfigs: object expected"); + message.speakerVoiceConfigs[i] = $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig.fromObject(object.speakerVoiceConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MultiSpeakerVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSpeakerVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.speakerVoiceConfigs = []; + if (message.speakerVoiceConfigs && message.speakerVoiceConfigs.length) { + object.speakerVoiceConfigs = []; + for (var j = 0; j < message.speakerVoiceConfigs.length; ++j) + object.speakerVoiceConfigs[j] = $root.google.cloud.aiplatform.v1.SpeakerVoiceConfig.toObject(message.speakerVoiceConfigs[j], options); + } + return object; + }; + + /** + * Converts this MultiSpeakerVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + MultiSpeakerVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MultiSpeakerVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultiSpeakerVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig"; + }; + + return MultiSpeakerVoiceConfig; + })(); + + v1.SpeechConfig = (function() { + + /** + * Properties of a SpeechConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface ISpeechConfig + * @property {google.cloud.aiplatform.v1.IVoiceConfig|null} [voiceConfig] SpeechConfig voiceConfig + * @property {string|null} [languageCode] SpeechConfig languageCode + * @property {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig|null} [multiSpeakerVoiceConfig] SpeechConfig multiSpeakerVoiceConfig + */ + + /** + * Constructs a new SpeechConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a SpeechConfig. + * @implements ISpeechConfig + * @constructor + * @param {google.cloud.aiplatform.v1.ISpeechConfig=} [properties] Properties to set + */ + function SpeechConfig(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]]; + } + + /** + * SpeechConfig voiceConfig. + * @member {google.cloud.aiplatform.v1.IVoiceConfig|null|undefined} voiceConfig + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @instance + */ + SpeechConfig.prototype.voiceConfig = null; + + /** + * SpeechConfig languageCode. + * @member {string} languageCode + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @instance + */ + SpeechConfig.prototype.languageCode = ""; + + /** + * SpeechConfig multiSpeakerVoiceConfig. + * @member {google.cloud.aiplatform.v1.IMultiSpeakerVoiceConfig|null|undefined} multiSpeakerVoiceConfig + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @instance + */ + SpeechConfig.prototype.multiSpeakerVoiceConfig = null; + + /** + * Creates a new SpeechConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeechConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.SpeechConfig} SpeechConfig instance + */ + SpeechConfig.create = function create(properties) { + return new SpeechConfig(properties); + }; + + /** + * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.SpeechConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeechConfig} message SpeechConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeechConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.voiceConfig != null && Object.hasOwnProperty.call(message, "voiceConfig")) + $root.google.cloud.aiplatform.v1.VoiceConfig.encode(message.voiceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.multiSpeakerVoiceConfig != null && Object.hasOwnProperty.call(message, "multiSpeakerVoiceConfig")) + $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.encode(message.multiSpeakerVoiceConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.SpeechConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {google.cloud.aiplatform.v1.ISpeechConfig} message SpeechConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpeechConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.SpeechConfig} SpeechConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeechConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.SpeechConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.SpeechConfig} SpeechConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeechConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpeechConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpeechConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) { + var error = $root.google.cloud.aiplatform.v1.VoiceConfig.verify(message.voiceConfig); + if (error) + return "voiceConfig." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.multiSpeakerVoiceConfig != null && message.hasOwnProperty("multiSpeakerVoiceConfig")) { + var error = $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.verify(message.multiSpeakerVoiceConfig); + if (error) + return "multiSpeakerVoiceConfig." + error; + } + return null; + }; + + /** + * Creates a SpeechConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.SpeechConfig} SpeechConfig + */ + SpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.SpeechConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.SpeechConfig(); + if (object.voiceConfig != null) { + if (typeof object.voiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.SpeechConfig.voiceConfig: object expected"); + message.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.fromObject(object.voiceConfig); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.multiSpeakerVoiceConfig != null) { + if (typeof object.multiSpeakerVoiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.SpeechConfig.multiSpeakerVoiceConfig: object expected"); + message.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.fromObject(object.multiSpeakerVoiceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {google.cloud.aiplatform.v1.SpeechConfig} message SpeechConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpeechConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.voiceConfig = null; + object.languageCode = ""; + object.multiSpeakerVoiceConfig = null; + } + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) + object.voiceConfig = $root.google.cloud.aiplatform.v1.VoiceConfig.toObject(message.voiceConfig, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.multiSpeakerVoiceConfig != null && message.hasOwnProperty("multiSpeakerVoiceConfig")) + object.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1.MultiSpeakerVoiceConfig.toObject(message.multiSpeakerVoiceConfig, options); + return object; + }; + + /** + * Converts this SpeechConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @instance + * @returns {Object.} JSON object + */ + SpeechConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpeechConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.SpeechConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.SpeechConfig"; + }; + + return SpeechConfig; + })(); + + v1.ImageConfig = (function() { + + /** + * Properties of an ImageConfig. + * @memberof google.cloud.aiplatform.v1 + * @interface IImageConfig + * @property {string|null} [aspectRatio] ImageConfig aspectRatio + */ + + /** + * Constructs a new ImageConfig. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an ImageConfig. + * @implements IImageConfig + * @constructor + * @param {google.cloud.aiplatform.v1.IImageConfig=} [properties] Properties to set + */ + function ImageConfig(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]]; + } + + /** + * ImageConfig aspectRatio. + * @member {string|null|undefined} aspectRatio + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @instance + */ + ImageConfig.prototype.aspectRatio = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_aspectRatio", { + get: $util.oneOfGetter($oneOfFields = ["aspectRatio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1.IImageConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ImageConfig} ImageConfig instance + */ + ImageConfig.create = function create(properties) { + return new ImageConfig(properties); + }; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectRatio != null && Object.hasOwnProperty.call(message, "aspectRatio")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aspectRatio); + return writer; + }; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ImageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.aspectRatio = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + properties._aspectRatio = 1; + if (!$util.isString(message.aspectRatio)) + return "aspectRatio: string expected"; + } + return null; + }; + + /** + * Creates an ImageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ImageConfig} ImageConfig + */ + ImageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ImageConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.ImageConfig(); + if (object.aspectRatio != null) + message.aspectRatio = String(object.aspectRatio); + return message; + }; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1.ImageConfig} message ImageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + object.aspectRatio = message.aspectRatio; + if (options.oneofs) + object._aspectRatio = "aspectRatio"; + } + return object; + }; + + /** + * Converts this ImageConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @instance + * @returns {Object.} JSON object + */ + ImageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ImageConfig"; + }; + + return ImageConfig; + })(); + v1.GenerationConfig = (function() { /** @@ -30385,7 +32068,9 @@ * @property {google.cloud.aiplatform.v1.ISchema|null} [responseSchema] GenerationConfig responseSchema * @property {google.protobuf.IValue|null} [responseJsonSchema] GenerationConfig responseJsonSchema * @property {google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null} [routingConfig] GenerationConfig routingConfig + * @property {google.cloud.aiplatform.v1.ISpeechConfig|null} [speechConfig] GenerationConfig speechConfig * @property {google.cloud.aiplatform.v1.GenerationConfig.IThinkingConfig|null} [thinkingConfig] GenerationConfig thinkingConfig + * @property {google.cloud.aiplatform.v1.IImageConfig|null} [imageConfig] GenerationConfig imageConfig */ /** @@ -30524,6 +32209,14 @@ */ GenerationConfig.prototype.routingConfig = null; + /** + * GenerationConfig speechConfig. + * @member {google.cloud.aiplatform.v1.ISpeechConfig|null|undefined} speechConfig + * @memberof google.cloud.aiplatform.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.speechConfig = null; + /** * GenerationConfig thinkingConfig. * @member {google.cloud.aiplatform.v1.GenerationConfig.IThinkingConfig|null|undefined} thinkingConfig @@ -30532,6 +32225,14 @@ */ GenerationConfig.prototype.thinkingConfig = null; + /** + * GenerationConfig imageConfig. + * @member {google.cloud.aiplatform.v1.IImageConfig|null|undefined} imageConfig + * @memberof google.cloud.aiplatform.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.imageConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -30613,6 +32314,18 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_speechConfig", { + get: $util.oneOfGetter($oneOfFields = ["speechConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_imageConfig", { + get: $util.oneOfGetter($oneOfFields = ["imageConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new GenerationConfig instance using the specified properties. * @function create @@ -30666,10 +32379,14 @@ $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.encode(message.routingConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.responseLogprobs != null && Object.hasOwnProperty.call(message, "responseLogprobs")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.responseLogprobs); + if (message.speechConfig != null && Object.hasOwnProperty.call(message, "speechConfig")) + $root.google.cloud.aiplatform.v1.SpeechConfig.encode(message.speechConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.thinkingConfig != null && Object.hasOwnProperty.call(message, "thinkingConfig")) $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.encode(message.thinkingConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); if (message.responseJsonSchema != null && Object.hasOwnProperty.call(message, "responseJsonSchema")) $root.google.protobuf.Value.encode(message.responseJsonSchema, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.imageConfig != null && Object.hasOwnProperty.call(message, "imageConfig")) + $root.google.cloud.aiplatform.v1.ImageConfig.encode(message.imageConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; @@ -30768,10 +32485,18 @@ message.routingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.decode(reader, reader.uint32()); break; } + case 23: { + message.speechConfig = $root.google.cloud.aiplatform.v1.SpeechConfig.decode(reader, reader.uint32()); + break; + } case 25: { message.thinkingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.decode(reader, reader.uint32()); break; } + case 30: { + message.imageConfig = $root.google.cloud.aiplatform.v1.ImageConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -30892,11 +32617,27 @@ return "routingConfig." + error; } } + if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { + properties._speechConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.SpeechConfig.verify(message.speechConfig); + if (error) + return "speechConfig." + error; + } + } if (message.thinkingConfig != null && message.hasOwnProperty("thinkingConfig")) { var error = $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.verify(message.thinkingConfig); if (error) return "thinkingConfig." + error; } + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + properties._imageConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.ImageConfig.verify(message.imageConfig); + if (error) + return "imageConfig." + error; + } + } return null; }; @@ -30956,11 +32697,21 @@ throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.routingConfig: object expected"); message.routingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.fromObject(object.routingConfig); } + if (object.speechConfig != null) { + if (typeof object.speechConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.speechConfig: object expected"); + message.speechConfig = $root.google.cloud.aiplatform.v1.SpeechConfig.fromObject(object.speechConfig); + } if (object.thinkingConfig != null) { if (typeof object.thinkingConfig !== "object") throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.thinkingConfig: object expected"); message.thinkingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.fromObject(object.thinkingConfig); } + if (object.imageConfig != null) { + if (typeof object.imageConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.imageConfig: object expected"); + message.imageConfig = $root.google.cloud.aiplatform.v1.ImageConfig.fromObject(object.imageConfig); + } return message; }; @@ -31050,6 +32801,11 @@ if (options.oneofs) object._responseLogprobs = "responseLogprobs"; } + if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { + object.speechConfig = $root.google.cloud.aiplatform.v1.SpeechConfig.toObject(message.speechConfig, options); + if (options.oneofs) + object._speechConfig = "speechConfig"; + } if (message.thinkingConfig != null && message.hasOwnProperty("thinkingConfig")) object.thinkingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.toObject(message.thinkingConfig, options); if (message.responseJsonSchema != null && message.hasOwnProperty("responseJsonSchema")) { @@ -31057,6 +32813,11 @@ if (options.oneofs) object._responseJsonSchema = "responseJsonSchema"; } + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + object.imageConfig = $root.google.cloud.aiplatform.v1.ImageConfig.toObject(message.imageConfig, options); + if (options.oneofs) + object._imageConfig = "imageConfig"; + } return object; }; @@ -41391,6 +43152,7 @@ * @memberof google.cloud.aiplatform.v1.Tool * @interface IComputerUse * @property {google.cloud.aiplatform.v1.Tool.ComputerUse.Environment|null} [environment] ComputerUse environment + * @property {Array.|null} [excludedPredefinedFunctions] ComputerUse excludedPredefinedFunctions */ /** @@ -41402,6 +43164,7 @@ * @param {google.cloud.aiplatform.v1.Tool.IComputerUse=} [properties] Properties to set */ function ComputerUse(properties) { + this.excludedPredefinedFunctions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41416,6 +43179,14 @@ */ ComputerUse.prototype.environment = 0; + /** + * ComputerUse excludedPredefinedFunctions. + * @member {Array.} excludedPredefinedFunctions + * @memberof google.cloud.aiplatform.v1.Tool.ComputerUse + * @instance + */ + ComputerUse.prototype.excludedPredefinedFunctions = $util.emptyArray; + /** * Creates a new ComputerUse instance using the specified properties. * @function create @@ -41442,6 +43213,9 @@ writer = $Writer.create(); if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.environment); + if (message.excludedPredefinedFunctions != null && message.excludedPredefinedFunctions.length) + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludedPredefinedFunctions[i]); return writer; }; @@ -41482,6 +43256,12 @@ message.environment = reader.int32(); break; } + case 2: { + if (!(message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length)) + message.excludedPredefinedFunctions = []; + message.excludedPredefinedFunctions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -41525,6 +43305,13 @@ case 1: break; } + if (message.excludedPredefinedFunctions != null && message.hasOwnProperty("excludedPredefinedFunctions")) { + if (!Array.isArray(message.excludedPredefinedFunctions)) + return "excludedPredefinedFunctions: array expected"; + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + if (!$util.isString(message.excludedPredefinedFunctions[i])) + return "excludedPredefinedFunctions: string[] expected"; + } return null; }; @@ -41556,6 +43343,13 @@ message.environment = 1; break; } + if (object.excludedPredefinedFunctions) { + if (!Array.isArray(object.excludedPredefinedFunctions)) + throw TypeError(".google.cloud.aiplatform.v1.Tool.ComputerUse.excludedPredefinedFunctions: array expected"); + message.excludedPredefinedFunctions = []; + for (var i = 0; i < object.excludedPredefinedFunctions.length; ++i) + message.excludedPredefinedFunctions[i] = String(object.excludedPredefinedFunctions[i]); + } return message; }; @@ -41572,10 +43366,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.excludedPredefinedFunctions = []; if (options.defaults) object.environment = options.enums === String ? "ENVIRONMENT_UNSPECIFIED" : 0; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = options.enums === String ? $root.google.cloud.aiplatform.v1.Tool.ComputerUse.Environment[message.environment] === undefined ? message.environment : $root.google.cloud.aiplatform.v1.Tool.ComputerUse.Environment[message.environment] : message.environment; + if (message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length) { + object.excludedPredefinedFunctions = []; + for (var j = 0; j < message.excludedPredefinedFunctions.length; ++j) + object.excludedPredefinedFunctions[j] = message.excludedPredefinedFunctions[j]; + } return object; }; @@ -42377,6 +44178,783 @@ return FunctionCall; })(); + v1.FunctionResponsePart = (function() { + + /** + * Properties of a FunctionResponsePart. + * @memberof google.cloud.aiplatform.v1 + * @interface IFunctionResponsePart + * @property {google.cloud.aiplatform.v1.IFunctionResponseBlob|null} [inlineData] FunctionResponsePart inlineData + * @property {google.cloud.aiplatform.v1.IFunctionResponseFileData|null} [fileData] FunctionResponsePart fileData + */ + + /** + * Constructs a new FunctionResponsePart. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a FunctionResponsePart. + * @implements IFunctionResponsePart + * @constructor + * @param {google.cloud.aiplatform.v1.IFunctionResponsePart=} [properties] Properties to set + */ + function FunctionResponsePart(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]]; + } + + /** + * FunctionResponsePart inlineData. + * @member {google.cloud.aiplatform.v1.IFunctionResponseBlob|null|undefined} inlineData + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @instance + */ + FunctionResponsePart.prototype.inlineData = null; + + /** + * FunctionResponsePart fileData. + * @member {google.cloud.aiplatform.v1.IFunctionResponseFileData|null|undefined} fileData + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @instance + */ + FunctionResponsePart.prototype.fileData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunctionResponsePart data. + * @member {"inlineData"|"fileData"|undefined} data + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @instance + */ + Object.defineProperty(FunctionResponsePart.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["inlineData", "fileData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponsePart=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FunctionResponsePart} FunctionResponsePart instance + */ + FunctionResponsePart.create = function create(properties) { + return new FunctionResponsePart(properties); + }; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponsePart.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineData != null && Object.hasOwnProperty.call(message, "inlineData")) + $root.google.cloud.aiplatform.v1.FunctionResponseBlob.encode(message.inlineData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fileData != null && Object.hasOwnProperty.call(message, "fileData")) + $root.google.cloud.aiplatform.v1.FunctionResponseFileData.encode(message.fileData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponsePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.FunctionResponsePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineData = $root.google.cloud.aiplatform.v1.FunctionResponseBlob.decode(reader, reader.uint32()); + break; + } + case 2: { + message.fileData = $root.google.cloud.aiplatform.v1.FunctionResponseFileData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponsePart message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponsePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + properties.data = 1; + { + var error = $root.google.cloud.aiplatform.v1.FunctionResponseBlob.verify(message.inlineData); + if (error) + return "inlineData." + error; + } + } + if (message.fileData != null && message.hasOwnProperty("fileData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.aiplatform.v1.FunctionResponseFileData.verify(message.fileData); + if (error) + return "fileData." + error; + } + } + return null; + }; + + /** + * Creates a FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FunctionResponsePart} FunctionResponsePart + */ + FunctionResponsePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FunctionResponsePart) + return object; + var message = new $root.google.cloud.aiplatform.v1.FunctionResponsePart(); + if (object.inlineData != null) { + if (typeof object.inlineData !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FunctionResponsePart.inlineData: object expected"); + message.inlineData = $root.google.cloud.aiplatform.v1.FunctionResponseBlob.fromObject(object.inlineData); + } + if (object.fileData != null) { + if (typeof object.fileData !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FunctionResponsePart.fileData: object expected"); + message.fileData = $root.google.cloud.aiplatform.v1.FunctionResponseFileData.fromObject(object.fileData); + } + return message; + }; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1.FunctionResponsePart} message FunctionResponsePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponsePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + object.inlineData = $root.google.cloud.aiplatform.v1.FunctionResponseBlob.toObject(message.inlineData, options); + if (options.oneofs) + object.data = "inlineData"; + } + if (message.fileData != null && message.hasOwnProperty("fileData")) { + object.fileData = $root.google.cloud.aiplatform.v1.FunctionResponseFileData.toObject(message.fileData, options); + if (options.oneofs) + object.data = "fileData"; + } + return object; + }; + + /** + * Converts this FunctionResponsePart to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @instance + * @returns {Object.} JSON object + */ + FunctionResponsePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponsePart + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FunctionResponsePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponsePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FunctionResponsePart"; + }; + + return FunctionResponsePart; + })(); + + v1.FunctionResponseBlob = (function() { + + /** + * Properties of a FunctionResponseBlob. + * @memberof google.cloud.aiplatform.v1 + * @interface IFunctionResponseBlob + * @property {string|null} [mimeType] FunctionResponseBlob mimeType + * @property {Uint8Array|null} [data] FunctionResponseBlob data + * @property {string|null} [displayName] FunctionResponseBlob displayName + */ + + /** + * Constructs a new FunctionResponseBlob. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a FunctionResponseBlob. + * @implements IFunctionResponseBlob + * @constructor + * @param {google.cloud.aiplatform.v1.IFunctionResponseBlob=} [properties] Properties to set + */ + function FunctionResponseBlob(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]]; + } + + /** + * FunctionResponseBlob mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.mimeType = ""; + + /** + * FunctionResponseBlob data. + * @member {Uint8Array} data + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.data = $util.newBuffer([]); + + /** + * FunctionResponseBlob displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.displayName = ""; + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseBlob=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FunctionResponseBlob} FunctionResponseBlob instance + */ + FunctionResponseBlob.create = function create(properties) { + return new FunctionResponseBlob(properties); + }; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseBlob.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseBlob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.FunctionResponseBlob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponseBlob message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponseBlob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FunctionResponseBlob} FunctionResponseBlob + */ + FunctionResponseBlob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FunctionResponseBlob) + return object; + var message = new $root.google.cloud.aiplatform.v1.FunctionResponseBlob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1.FunctionResponseBlob} message FunctionResponseBlob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponseBlob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.displayName = ""; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @instance + * @returns {Object.} JSON object + */ + FunctionResponseBlob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponseBlob + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FunctionResponseBlob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponseBlob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FunctionResponseBlob"; + }; + + return FunctionResponseBlob; + })(); + + v1.FunctionResponseFileData = (function() { + + /** + * Properties of a FunctionResponseFileData. + * @memberof google.cloud.aiplatform.v1 + * @interface IFunctionResponseFileData + * @property {string|null} [mimeType] FunctionResponseFileData mimeType + * @property {string|null} [fileUri] FunctionResponseFileData fileUri + * @property {string|null} [displayName] FunctionResponseFileData displayName + */ + + /** + * Constructs a new FunctionResponseFileData. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a FunctionResponseFileData. + * @implements IFunctionResponseFileData + * @constructor + * @param {google.cloud.aiplatform.v1.IFunctionResponseFileData=} [properties] Properties to set + */ + function FunctionResponseFileData(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]]; + } + + /** + * FunctionResponseFileData mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.mimeType = ""; + + /** + * FunctionResponseFileData fileUri. + * @member {string} fileUri + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.fileUri = ""; + + /** + * FunctionResponseFileData displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.displayName = ""; + + /** + * Creates a new FunctionResponseFileData instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseFileData=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FunctionResponseFileData} FunctionResponseFileData instance + */ + FunctionResponseFileData.create = function create(properties) { + return new FunctionResponseFileData(properties); + }; + + /** + * Encodes the specified FunctionResponseFileData message. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseFileData.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseFileData} message FunctionResponseFileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseFileData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.fileUri != null && Object.hasOwnProperty.call(message, "fileUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileUri); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FunctionResponseFileData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FunctionResponseFileData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1.IFunctionResponseFileData} message FunctionResponseFileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseFileData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.FunctionResponseFileData} FunctionResponseFileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseFileData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.FunctionResponseFileData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.fileUri = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FunctionResponseFileData} FunctionResponseFileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseFileData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponseFileData message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponseFileData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + if (!$util.isString(message.fileUri)) + return "fileUri: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a FunctionResponseFileData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FunctionResponseFileData} FunctionResponseFileData + */ + FunctionResponseFileData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FunctionResponseFileData) + return object; + var message = new $root.google.cloud.aiplatform.v1.FunctionResponseFileData(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.fileUri != null) + message.fileUri = String(object.fileUri); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a FunctionResponseFileData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1.FunctionResponseFileData} message FunctionResponseFileData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponseFileData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + object.fileUri = ""; + object.displayName = ""; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + object.fileUri = message.fileUri; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FunctionResponseFileData to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @instance + * @returns {Object.} JSON object + */ + FunctionResponseFileData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponseFileData + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FunctionResponseFileData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponseFileData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FunctionResponseFileData"; + }; + + return FunctionResponseFileData; + })(); + v1.FunctionResponse = (function() { /** @@ -42385,6 +44963,7 @@ * @interface IFunctionResponse * @property {string|null} [name] FunctionResponse name * @property {google.protobuf.IStruct|null} [response] FunctionResponse response + * @property {Array.|null} [parts] FunctionResponse parts */ /** @@ -42396,6 +44975,7 @@ * @param {google.cloud.aiplatform.v1.IFunctionResponse=} [properties] Properties to set */ function FunctionResponse(properties) { + this.parts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42418,6 +44998,14 @@ */ FunctionResponse.prototype.response = null; + /** + * FunctionResponse parts. + * @member {Array.} parts + * @memberof google.cloud.aiplatform.v1.FunctionResponse + * @instance + */ + FunctionResponse.prototype.parts = $util.emptyArray; + /** * Creates a new FunctionResponse instance using the specified properties. * @function create @@ -42446,6 +45034,9 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.response != null && Object.hasOwnProperty.call(message, "response")) $root.google.protobuf.Struct.encode(message.response, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.aiplatform.v1.FunctionResponsePart.encode(message.parts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -42490,6 +45081,12 @@ message.response = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 4: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.aiplatform.v1.FunctionResponsePart.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -42533,6 +45130,15 @@ if (error) return "response." + error; } + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.FunctionResponsePart.verify(message.parts[i]); + if (error) + return "parts." + error; + } + } return null; }; @@ -42555,6 +45161,16 @@ throw TypeError(".google.cloud.aiplatform.v1.FunctionResponse.response: object expected"); message.response = $root.google.protobuf.Struct.fromObject(object.response); } + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.aiplatform.v1.FunctionResponse.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) { + if (typeof object.parts[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FunctionResponse.parts: object expected"); + message.parts[i] = $root.google.cloud.aiplatform.v1.FunctionResponsePart.fromObject(object.parts[i]); + } + } return message; }; @@ -42571,6 +45187,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.parts = []; if (options.defaults) { object.name = ""; object.response = null; @@ -42579,6 +45197,11 @@ object.name = message.name; if (message.response != null && message.hasOwnProperty("response")) object.response = $root.google.protobuf.Struct.toObject(message.response, options); + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.aiplatform.v1.FunctionResponsePart.toObject(message.parts[j], options); + } return object; }; @@ -83201,6 +85824,8 @@ * @property {number} STARTING_MODEL_SERVER=3 STARTING_MODEL_SERVER value * @property {number} FINISHING_UP=4 FINISHING_UP value * @property {number} DEPLOYMENT_TERMINATED=10 DEPLOYMENT_TERMINATED value + * @property {number} SUCCESSFULLY_DEPLOYED=11 SUCCESSFULLY_DEPLOYED value + * @property {number} FAILED_TO_DEPLOY=12 FAILED_TO_DEPLOY value */ v1.DeploymentStage = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -83213,6 +85838,8 @@ values[valuesById[3] = "STARTING_MODEL_SERVER"] = 3; values[valuesById[4] = "FINISHING_UP"] = 4; values[valuesById[10] = "DEPLOYMENT_TERMINATED"] = 10; + values[valuesById[11] = "SUCCESSFULLY_DEPLOYED"] = 11; + values[valuesById[12] = "FAILED_TO_DEPLOY"] = 12; return values; })(); @@ -83971,6 +86598,8 @@ case 3: case 4: case 10: + case 11: + case 12: break; } return null; @@ -84036,6 +86665,14 @@ case 10: message.deploymentStage = 10; break; + case "SUCCESSFULLY_DEPLOYED": + case 11: + message.deploymentStage = 11; + break; + case "FAILED_TO_DEPLOY": + case 12: + message.deploymentStage = 12; + break; } return message; }; @@ -86407,6 +89044,8 @@ case 3: case 4: case 10: + case 11: + case 12: break; } return null; @@ -86472,6 +89111,14 @@ case 10: message.deploymentStage = 10; break; + case "SUCCESSFULLY_DEPLOYED": + case 11: + message.deploymentStage = 11; + break; + case "FAILED_TO_DEPLOY": + case 12: + message.deploymentStage = 12; + break; } return message; }; @@ -123108,9 +125755,9 @@ if (message.autoScaling != null && Object.hasOwnProperty.call(message, "autoScaling")) $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.encode(message.autoScaling, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.enableDirectBigtableAccess != null && Object.hasOwnProperty.call(message, "enableDirectBigtableAccess")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableDirectBigtableAccess); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableDirectBigtableAccess); if (message.bigtableMetadata != null && Object.hasOwnProperty.call(message, "bigtableMetadata")) - $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -123151,11 +125798,11 @@ message.autoScaling = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling.decode(reader, reader.uint32()); break; } - case 2: { + case 3: { message.enableDirectBigtableAccess = reader.bool(); break; } - case 3: { + case 4: { message.bigtableMetadata = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.BigtableMetadata.decode(reader, reader.uint32()); break; } @@ -129910,7 +132557,7 @@ if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); if (message.bigtableMetadata != null && Object.hasOwnProperty.call(message, "bigtableMetadata")) - $root.google.cloud.aiplatform.v1.FeatureView.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.cloud.aiplatform.v1.FeatureView.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); return writer; }; @@ -130026,7 +132673,7 @@ message.satisfiesPzi = reader.bool(); break; } - case 21: { + case 22: { message.bigtableMetadata = $root.google.cloud.aiplatform.v1.FeatureView.BigtableMetadata.decode(reader, reader.uint32()); break; } @@ -166987,6 +169634,7 @@ * @memberof google.cloud.aiplatform.v1 * @interface ITuningJob * @property {string|null} [baseModel] TuningJob baseModel + * @property {google.cloud.aiplatform.v1.IPreTunedModel|null} [preTunedModel] TuningJob preTunedModel * @property {google.cloud.aiplatform.v1.ISupervisedTuningSpec|null} [supervisedTuningSpec] TuningJob supervisedTuningSpec * @property {string|null} [name] TuningJob name * @property {string|null} [tunedModelDisplayName] TuningJob tunedModelDisplayName @@ -167029,6 +169677,14 @@ */ TuningJob.prototype.baseModel = null; + /** + * TuningJob preTunedModel. + * @member {google.cloud.aiplatform.v1.IPreTunedModel|null|undefined} preTunedModel + * @memberof google.cloud.aiplatform.v1.TuningJob + * @instance + */ + TuningJob.prototype.preTunedModel = null; + /** * TuningJob supervisedTuningSpec. * @member {google.cloud.aiplatform.v1.ISupervisedTuningSpec|null|undefined} supervisedTuningSpec @@ -167162,12 +169818,12 @@ /** * TuningJob sourceModel. - * @member {"baseModel"|undefined} sourceModel + * @member {"baseModel"|"preTunedModel"|undefined} sourceModel * @memberof google.cloud.aiplatform.v1.TuningJob * @instance */ Object.defineProperty(TuningJob.prototype, "sourceModel", { - get: $util.oneOfGetter($oneOfFields = ["baseModel"]), + get: $util.oneOfGetter($oneOfFields = ["baseModel", "preTunedModel"]), set: $util.oneOfSetter($oneOfFields) }); @@ -167241,6 +169897,8 @@ $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.serviceAccount); + if (message.preTunedModel != null && Object.hasOwnProperty.call(message, "preTunedModel")) + $root.google.cloud.aiplatform.v1.PreTunedModel.encode(message.preTunedModel, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); return writer; }; @@ -167281,6 +169939,10 @@ message.baseModel = reader.string(); break; } + case 31: { + message.preTunedModel = $root.google.cloud.aiplatform.v1.PreTunedModel.decode(reader, reader.uint32()); + break; + } case 5: { message.supervisedTuningSpec = $root.google.cloud.aiplatform.v1.SupervisedTuningSpec.decode(reader, reader.uint32()); break; @@ -167405,6 +170067,16 @@ if (!$util.isString(message.baseModel)) return "baseModel: string expected"; } + if (message.preTunedModel != null && message.hasOwnProperty("preTunedModel")) { + if (properties.sourceModel === 1) + return "sourceModel: multiple values"; + properties.sourceModel = 1; + { + var error = $root.google.cloud.aiplatform.v1.PreTunedModel.verify(message.preTunedModel); + if (error) + return "preTunedModel." + error; + } + } if (message.supervisedTuningSpec != null && message.hasOwnProperty("supervisedTuningSpec")) { properties.tuningSpec = 1; { @@ -167511,6 +170183,11 @@ var message = new $root.google.cloud.aiplatform.v1.TuningJob(); if (object.baseModel != null) message.baseModel = String(object.baseModel); + if (object.preTunedModel != null) { + if (typeof object.preTunedModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1.TuningJob.preTunedModel: object expected"); + message.preTunedModel = $root.google.cloud.aiplatform.v1.PreTunedModel.fromObject(object.preTunedModel); + } if (object.supervisedTuningSpec != null) { if (typeof object.supervisedTuningSpec !== "object") throw TypeError(".google.cloud.aiplatform.v1.TuningJob.supervisedTuningSpec: object expected"); @@ -167707,6 +170384,11 @@ object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; + if (message.preTunedModel != null && message.hasOwnProperty("preTunedModel")) { + object.preTunedModel = $root.google.cloud.aiplatform.v1.PreTunedModel.toObject(message.preTunedModel, options); + if (options.oneofs) + object.sourceModel = "preTunedModel"; + } return object; }; @@ -170763,6 +173445,258 @@ return TunedModelCheckpoint; })(); + v1.PreTunedModel = (function() { + + /** + * Properties of a PreTunedModel. + * @memberof google.cloud.aiplatform.v1 + * @interface IPreTunedModel + * @property {string|null} [tunedModelName] PreTunedModel tunedModelName + * @property {string|null} [checkpointId] PreTunedModel checkpointId + * @property {string|null} [baseModel] PreTunedModel baseModel + */ + + /** + * Constructs a new PreTunedModel. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a PreTunedModel. + * @implements IPreTunedModel + * @constructor + * @param {google.cloud.aiplatform.v1.IPreTunedModel=} [properties] Properties to set + */ + function PreTunedModel(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]]; + } + + /** + * PreTunedModel tunedModelName. + * @member {string} tunedModelName + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @instance + */ + PreTunedModel.prototype.tunedModelName = ""; + + /** + * PreTunedModel checkpointId. + * @member {string} checkpointId + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @instance + */ + PreTunedModel.prototype.checkpointId = ""; + + /** + * PreTunedModel baseModel. + * @member {string} baseModel + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @instance + */ + PreTunedModel.prototype.baseModel = ""; + + /** + * Creates a new PreTunedModel instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {google.cloud.aiplatform.v1.IPreTunedModel=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PreTunedModel} PreTunedModel instance + */ + PreTunedModel.create = function create(properties) { + return new PreTunedModel(properties); + }; + + /** + * Encodes the specified PreTunedModel message. Does not implicitly {@link google.cloud.aiplatform.v1.PreTunedModel.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {google.cloud.aiplatform.v1.IPreTunedModel} message PreTunedModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreTunedModel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tunedModelName != null && Object.hasOwnProperty.call(message, "tunedModelName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tunedModelName); + if (message.checkpointId != null && Object.hasOwnProperty.call(message, "checkpointId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.checkpointId); + if (message.baseModel != null && Object.hasOwnProperty.call(message, "baseModel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseModel); + return writer; + }; + + /** + * Encodes the specified PreTunedModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PreTunedModel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {google.cloud.aiplatform.v1.IPreTunedModel} message PreTunedModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreTunedModel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreTunedModel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.PreTunedModel} PreTunedModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreTunedModel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.PreTunedModel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tunedModelName = reader.string(); + break; + } + case 2: { + message.checkpointId = reader.string(); + break; + } + case 3: { + message.baseModel = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreTunedModel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PreTunedModel} PreTunedModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreTunedModel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreTunedModel message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreTunedModel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tunedModelName != null && message.hasOwnProperty("tunedModelName")) + if (!$util.isString(message.tunedModelName)) + return "tunedModelName: string expected"; + if (message.checkpointId != null && message.hasOwnProperty("checkpointId")) + if (!$util.isString(message.checkpointId)) + return "checkpointId: string expected"; + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + if (!$util.isString(message.baseModel)) + return "baseModel: string expected"; + return null; + }; + + /** + * Creates a PreTunedModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PreTunedModel} PreTunedModel + */ + PreTunedModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PreTunedModel) + return object; + var message = new $root.google.cloud.aiplatform.v1.PreTunedModel(); + if (object.tunedModelName != null) + message.tunedModelName = String(object.tunedModelName); + if (object.checkpointId != null) + message.checkpointId = String(object.checkpointId); + if (object.baseModel != null) + message.baseModel = String(object.baseModel); + return message; + }; + + /** + * Creates a plain object from a PreTunedModel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {google.cloud.aiplatform.v1.PreTunedModel} message PreTunedModel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreTunedModel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tunedModelName = ""; + object.checkpointId = ""; + object.baseModel = ""; + } + if (message.tunedModelName != null && message.hasOwnProperty("tunedModelName")) + object.tunedModelName = message.tunedModelName; + if (message.checkpointId != null && message.hasOwnProperty("checkpointId")) + object.checkpointId = message.checkpointId; + if (message.baseModel != null && message.hasOwnProperty("baseModel")) + object.baseModel = message.baseModel; + return object; + }; + + /** + * Converts this PreTunedModel to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @instance + * @returns {Object.} JSON object + */ + PreTunedModel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreTunedModel + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PreTunedModel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreTunedModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PreTunedModel"; + }; + + return PreTunedModel; + })(); + v1.HyperparameterTuningJob = (function() { /** @@ -214011,6 +216945,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.PredictionService|embedContent}. + * @memberof google.cloud.aiplatform.v1.PredictionService + * @typedef EmbedContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.EmbedContentResponse} [response] EmbedContentResponse + */ + + /** + * Calls EmbedContent. + * @function embedContent + * @memberof google.cloud.aiplatform.v1.PredictionService + * @instance + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest} request EmbedContentRequest message or plain object + * @param {google.cloud.aiplatform.v1.PredictionService.EmbedContentCallback} callback Node-style callback called with the error, if any, and EmbedContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PredictionService.prototype.embedContent = function embedContent(request, callback) { + return this.rpcCall(embedContent, $root.google.cloud.aiplatform.v1.EmbedContentRequest, $root.google.cloud.aiplatform.v1.EmbedContentResponse, request, callback); + }, "name", { value: "EmbedContent" }); + + /** + * Calls EmbedContent. + * @function embedContent + * @memberof google.cloud.aiplatform.v1.PredictionService + * @instance + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest} request EmbedContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return PredictionService; })(); @@ -221220,6 +224187,1530 @@ return GenerateContentResponse; })(); + v1.EmbedContentRequest = (function() { + + /** + * Properties of an EmbedContentRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IEmbedContentRequest + * @property {string|null} [model] EmbedContentRequest model + * @property {google.cloud.aiplatform.v1.IContent|null} [content] EmbedContentRequest content + * @property {string|null} [title] EmbedContentRequest title + * @property {google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|null} [taskType] EmbedContentRequest taskType + * @property {number|null} [outputDimensionality] EmbedContentRequest outputDimensionality + * @property {boolean|null} [autoTruncate] EmbedContentRequest autoTruncate + */ + + /** + * Constructs a new EmbedContentRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an EmbedContentRequest. + * @implements IEmbedContentRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest=} [properties] Properties to set + */ + function EmbedContentRequest(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]]; + } + + /** + * EmbedContentRequest model. + * @member {string|null|undefined} model + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.model = null; + + /** + * EmbedContentRequest content. + * @member {google.cloud.aiplatform.v1.IContent|null|undefined} content + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.content = null; + + /** + * EmbedContentRequest title. + * @member {string|null|undefined} title + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.title = null; + + /** + * EmbedContentRequest taskType. + * @member {google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType|null|undefined} taskType + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.taskType = null; + + /** + * EmbedContentRequest outputDimensionality. + * @member {number|null|undefined} outputDimensionality + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.outputDimensionality = null; + + /** + * EmbedContentRequest autoTruncate. + * @member {boolean|null|undefined} autoTruncate + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.autoTruncate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_model", { + get: $util.oneOfGetter($oneOfFields = ["model"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_content", { + get: $util.oneOfGetter($oneOfFields = ["content"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_taskType", { + get: $util.oneOfGetter($oneOfFields = ["taskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_outputDimensionality", { + get: $util.oneOfGetter($oneOfFields = ["outputDimensionality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_autoTruncate", { + get: $util.oneOfGetter($oneOfFields = ["autoTruncate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbedContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EmbedContentRequest} EmbedContentRequest instance + */ + EmbedContentRequest.create = function create(properties) { + return new EmbedContentRequest(properties); + }; + + /** + * Encodes the specified EmbedContentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest} message EmbedContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.aiplatform.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + if (message.taskType != null && Object.hasOwnProperty.call(message, "taskType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.taskType); + if (message.outputDimensionality != null && Object.hasOwnProperty.call(message, "outputDimensionality")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputDimensionality); + if (message.autoTruncate != null && Object.hasOwnProperty.call(message, "autoTruncate")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.autoTruncate); + return writer; + }; + + /** + * Encodes the specified EmbedContentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentRequest} message EmbedContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EmbedContentRequest} EmbedContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EmbedContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.content = $root.google.cloud.aiplatform.v1.Content.decode(reader, reader.uint32()); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.taskType = reader.int32(); + break; + } + case 6: { + message.outputDimensionality = reader.int32(); + break; + } + case 7: { + message.autoTruncate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EmbedContentRequest} EmbedContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedContentRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) { + properties._model = 1; + if (!$util.isString(message.model)) + return "model: string expected"; + } + if (message.content != null && message.hasOwnProperty("content")) { + properties._content = 1; + { + var error = $root.google.cloud.aiplatform.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.taskType != null && message.hasOwnProperty("taskType")) { + properties._taskType = 1; + switch (message.taskType) { + default: + return "taskType: enum value expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.outputDimensionality != null && message.hasOwnProperty("outputDimensionality")) { + properties._outputDimensionality = 1; + if (!$util.isInteger(message.outputDimensionality)) + return "outputDimensionality: integer expected"; + } + if (message.autoTruncate != null && message.hasOwnProperty("autoTruncate")) { + properties._autoTruncate = 1; + if (typeof message.autoTruncate !== "boolean") + return "autoTruncate: boolean expected"; + } + return null; + }; + + /** + * Creates an EmbedContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EmbedContentRequest} EmbedContentRequest + */ + EmbedContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EmbedContentRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.EmbedContentRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EmbedContentRequest.content: object expected"); + message.content = $root.google.cloud.aiplatform.v1.Content.fromObject(object.content); + } + if (object.title != null) + message.title = String(object.title); + switch (object.taskType) { + default: + if (typeof object.taskType === "number") { + message.taskType = object.taskType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.taskType = 0; + break; + case "RETRIEVAL_QUERY": + case 2: + message.taskType = 2; + break; + case "RETRIEVAL_DOCUMENT": + case 3: + message.taskType = 3; + break; + case "SEMANTIC_SIMILARITY": + case 4: + message.taskType = 4; + break; + case "CLASSIFICATION": + case 5: + message.taskType = 5; + break; + case "CLUSTERING": + case 6: + message.taskType = 6; + break; + case "QUESTION_ANSWERING": + case 7: + message.taskType = 7; + break; + case "FACT_VERIFICATION": + case 8: + message.taskType = 8; + break; + case "CODE_RETRIEVAL_QUERY": + case 9: + message.taskType = 9; + break; + } + if (object.outputDimensionality != null) + message.outputDimensionality = object.outputDimensionality | 0; + if (object.autoTruncate != null) + message.autoTruncate = Boolean(object.autoTruncate); + return message; + }; + + /** + * Creates a plain object from an EmbedContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentRequest} message EmbedContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.model != null && message.hasOwnProperty("model")) { + object.model = message.model; + if (options.oneofs) + object._model = "model"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = $root.google.cloud.aiplatform.v1.Content.toObject(message.content, options); + if (options.oneofs) + object._content = "content"; + } + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.taskType != null && message.hasOwnProperty("taskType")) { + object.taskType = options.enums === String ? $root.google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType[message.taskType] === undefined ? message.taskType : $root.google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType[message.taskType] : message.taskType; + if (options.oneofs) + object._taskType = "taskType"; + } + if (message.outputDimensionality != null && message.hasOwnProperty("outputDimensionality")) { + object.outputDimensionality = message.outputDimensionality; + if (options.oneofs) + object._outputDimensionality = "outputDimensionality"; + } + if (message.autoTruncate != null && message.hasOwnProperty("autoTruncate")) { + object.autoTruncate = message.autoTruncate; + if (options.oneofs) + object._autoTruncate = "autoTruncate"; + } + return object; + }; + + /** + * Converts this EmbedContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @instance + * @returns {Object.} JSON object + */ + EmbedContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedContentRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EmbedContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EmbedContentRequest"; + }; + + /** + * EmbeddingTaskType enum. + * @name google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} RETRIEVAL_QUERY=2 RETRIEVAL_QUERY value + * @property {number} RETRIEVAL_DOCUMENT=3 RETRIEVAL_DOCUMENT value + * @property {number} SEMANTIC_SIMILARITY=4 SEMANTIC_SIMILARITY value + * @property {number} CLASSIFICATION=5 CLASSIFICATION value + * @property {number} CLUSTERING=6 CLUSTERING value + * @property {number} QUESTION_ANSWERING=7 QUESTION_ANSWERING value + * @property {number} FACT_VERIFICATION=8 FACT_VERIFICATION value + * @property {number} CODE_RETRIEVAL_QUERY=9 CODE_RETRIEVAL_QUERY value + */ + EmbedContentRequest.EmbeddingTaskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[2] = "RETRIEVAL_QUERY"] = 2; + values[valuesById[3] = "RETRIEVAL_DOCUMENT"] = 3; + values[valuesById[4] = "SEMANTIC_SIMILARITY"] = 4; + values[valuesById[5] = "CLASSIFICATION"] = 5; + values[valuesById[6] = "CLUSTERING"] = 6; + values[valuesById[7] = "QUESTION_ANSWERING"] = 7; + values[valuesById[8] = "FACT_VERIFICATION"] = 8; + values[valuesById[9] = "CODE_RETRIEVAL_QUERY"] = 9; + return values; + })(); + + return EmbedContentRequest; + })(); + + v1.EmbedContentResponse = (function() { + + /** + * Properties of an EmbedContentResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IEmbedContentResponse + * @property {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding|null} [embedding] EmbedContentResponse embedding + * @property {google.cloud.aiplatform.v1.IUsageMetadata|null} [usageMetadata] EmbedContentResponse usageMetadata + * @property {boolean|null} [truncated] EmbedContentResponse truncated + */ + + /** + * Constructs a new EmbedContentResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an EmbedContentResponse. + * @implements IEmbedContentResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IEmbedContentResponse=} [properties] Properties to set + */ + function EmbedContentResponse(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]]; + } + + /** + * EmbedContentResponse embedding. + * @member {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding|null|undefined} embedding + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.embedding = null; + + /** + * EmbedContentResponse usageMetadata. + * @member {google.cloud.aiplatform.v1.IUsageMetadata|null|undefined} usageMetadata + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.usageMetadata = null; + + /** + * EmbedContentResponse truncated. + * @member {boolean} truncated + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.truncated = false; + + /** + * Creates a new EmbedContentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse} EmbedContentResponse instance + */ + EmbedContentResponse.create = function create(properties) { + return new EmbedContentResponse(properties); + }; + + /** + * Encodes the specified EmbedContentResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentResponse} message EmbedContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.embedding != null && Object.hasOwnProperty.call(message, "embedding")) + $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.encode(message.embedding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.usageMetadata != null && Object.hasOwnProperty.call(message, "usageMetadata")) + $root.google.cloud.aiplatform.v1.UsageMetadata.encode(message.usageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.truncated); + return writer; + }; + + /** + * Encodes the specified EmbedContentResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1.IEmbedContentResponse} message EmbedContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse} EmbedContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EmbedContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.embedding = $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.usageMetadata = $root.google.cloud.aiplatform.v1.UsageMetadata.decode(reader, reader.uint32()); + break; + } + case 4: { + message.truncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse} EmbedContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedContentResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedContentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.embedding != null && message.hasOwnProperty("embedding")) { + var error = $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.verify(message.embedding); + if (error) + return "embedding." + error; + } + if (message.usageMetadata != null && message.hasOwnProperty("usageMetadata")) { + var error = $root.google.cloud.aiplatform.v1.UsageMetadata.verify(message.usageMetadata); + if (error) + return "usageMetadata." + error; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; + + /** + * Creates an EmbedContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse} EmbedContentResponse + */ + EmbedContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EmbedContentResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.EmbedContentResponse(); + if (object.embedding != null) { + if (typeof object.embedding !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EmbedContentResponse.embedding: object expected"); + message.embedding = $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.fromObject(object.embedding); + } + if (object.usageMetadata != null) { + if (typeof object.usageMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EmbedContentResponse.usageMetadata: object expected"); + message.usageMetadata = $root.google.cloud.aiplatform.v1.UsageMetadata.fromObject(object.usageMetadata); + } + if (object.truncated != null) + message.truncated = Boolean(object.truncated); + return message; + }; + + /** + * Creates a plain object from an EmbedContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentResponse} message EmbedContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.embedding = null; + object.usageMetadata = null; + object.truncated = false; + } + if (message.embedding != null && message.hasOwnProperty("embedding")) + object.embedding = $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.toObject(message.embedding, options); + if (message.usageMetadata != null && message.hasOwnProperty("usageMetadata")) + object.usageMetadata = $root.google.cloud.aiplatform.v1.UsageMetadata.toObject(message.usageMetadata, options); + if (message.truncated != null && message.hasOwnProperty("truncated")) + object.truncated = message.truncated; + return object; + }; + + /** + * Converts this EmbedContentResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @instance + * @returns {Object.} JSON object + */ + EmbedContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedContentResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EmbedContentResponse"; + }; + + EmbedContentResponse.Embedding = (function() { + + /** + * Properties of an Embedding. + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @interface IEmbedding + * @property {Array.|null} [values] Embedding values + */ + + /** + * Constructs a new Embedding. + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse + * @classdesc Represents an Embedding. + * @implements IEmbedding + * @constructor + * @param {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding=} [properties] Properties to set + */ + function Embedding(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]]; + } + + /** + * Embedding values. + * @member {Array.} values + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @instance + */ + Embedding.prototype.values = $util.emptyArray; + + /** + * Creates a new Embedding instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse.Embedding} Embedding instance + */ + Embedding.create = function create(properties) { + return new Embedding(properties); + }; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.values.length; ++i) + writer.float(message.values[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentResponse.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.values.push(reader.float()); + } else + message.values.push(reader.float()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Embedding message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Embedding.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) + if (typeof message.values[i] !== "number") + return "values: number[] expected"; + } + return null; + }; + + /** + * Creates an Embedding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EmbedContentResponse.Embedding} Embedding + */ + Embedding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding) + return object; + var message = new $root.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.aiplatform.v1.EmbedContentResponse.Embedding.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = Number(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1.EmbedContentResponse.Embedding} message Embedding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Embedding.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] = options.json && !isFinite(message.values[j]) ? String(message.values[j]) : message.values[j]; + } + return object; + }; + + /** + * Converts this Embedding to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @instance + * @returns {Object.} JSON object + */ + Embedding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Embedding + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EmbedContentResponse.Embedding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Embedding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EmbedContentResponse.Embedding"; + }; + + return Embedding; + })(); + + return EmbedContentResponse; + })(); + + v1.UsageMetadata = (function() { + + /** + * Properties of a UsageMetadata. + * @memberof google.cloud.aiplatform.v1 + * @interface IUsageMetadata + * @property {number|null} [promptTokenCount] UsageMetadata promptTokenCount + * @property {number|null} [candidatesTokenCount] UsageMetadata candidatesTokenCount + * @property {number|null} [totalTokenCount] UsageMetadata totalTokenCount + * @property {number|null} [toolUsePromptTokenCount] UsageMetadata toolUsePromptTokenCount + * @property {number|null} [thoughtsTokenCount] UsageMetadata thoughtsTokenCount + * @property {number|null} [cachedContentTokenCount] UsageMetadata cachedContentTokenCount + * @property {Array.|null} [promptTokensDetails] UsageMetadata promptTokensDetails + * @property {Array.|null} [cacheTokensDetails] UsageMetadata cacheTokensDetails + * @property {Array.|null} [candidatesTokensDetails] UsageMetadata candidatesTokensDetails + * @property {Array.|null} [toolUsePromptTokensDetails] UsageMetadata toolUsePromptTokensDetails + * @property {google.cloud.aiplatform.v1.UsageMetadata.TrafficType|null} [trafficType] UsageMetadata trafficType + */ + + /** + * Constructs a new UsageMetadata. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a UsageMetadata. + * @implements IUsageMetadata + * @constructor + * @param {google.cloud.aiplatform.v1.IUsageMetadata=} [properties] Properties to set + */ + function UsageMetadata(properties) { + this.promptTokensDetails = []; + this.cacheTokensDetails = []; + this.candidatesTokensDetails = []; + this.toolUsePromptTokensDetails = []; + 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]]; + } + + /** + * UsageMetadata promptTokenCount. + * @member {number} promptTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.promptTokenCount = 0; + + /** + * UsageMetadata candidatesTokenCount. + * @member {number} candidatesTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.candidatesTokenCount = 0; + + /** + * UsageMetadata totalTokenCount. + * @member {number} totalTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.totalTokenCount = 0; + + /** + * UsageMetadata toolUsePromptTokenCount. + * @member {number} toolUsePromptTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.toolUsePromptTokenCount = 0; + + /** + * UsageMetadata thoughtsTokenCount. + * @member {number} thoughtsTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.thoughtsTokenCount = 0; + + /** + * UsageMetadata cachedContentTokenCount. + * @member {number} cachedContentTokenCount + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.cachedContentTokenCount = 0; + + /** + * UsageMetadata promptTokensDetails. + * @member {Array.} promptTokensDetails + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.promptTokensDetails = $util.emptyArray; + + /** + * UsageMetadata cacheTokensDetails. + * @member {Array.} cacheTokensDetails + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.cacheTokensDetails = $util.emptyArray; + + /** + * UsageMetadata candidatesTokensDetails. + * @member {Array.} candidatesTokensDetails + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.candidatesTokensDetails = $util.emptyArray; + + /** + * UsageMetadata toolUsePromptTokensDetails. + * @member {Array.} toolUsePromptTokensDetails + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.toolUsePromptTokensDetails = $util.emptyArray; + + /** + * UsageMetadata trafficType. + * @member {google.cloud.aiplatform.v1.UsageMetadata.TrafficType} trafficType + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.trafficType = 0; + + /** + * Creates a new UsageMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1.IUsageMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.UsageMetadata} UsageMetadata instance + */ + UsageMetadata.create = function create(properties) { + return new UsageMetadata(properties); + }; + + /** + * Encodes the specified UsageMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.UsageMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1.IUsageMetadata} message UsageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.promptTokenCount != null && Object.hasOwnProperty.call(message, "promptTokenCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.promptTokenCount); + if (message.candidatesTokenCount != null && Object.hasOwnProperty.call(message, "candidatesTokenCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.candidatesTokenCount); + if (message.totalTokenCount != null && Object.hasOwnProperty.call(message, "totalTokenCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalTokenCount); + if (message.cachedContentTokenCount != null && Object.hasOwnProperty.call(message, "cachedContentTokenCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.cachedContentTokenCount); + if (message.trafficType != null && Object.hasOwnProperty.call(message, "trafficType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.trafficType); + if (message.promptTokensDetails != null && message.promptTokensDetails.length) + for (var i = 0; i < message.promptTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1.ModalityTokenCount.encode(message.promptTokensDetails[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cacheTokensDetails != null && message.cacheTokensDetails.length) + for (var i = 0; i < message.cacheTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1.ModalityTokenCount.encode(message.cacheTokensDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.candidatesTokensDetails != null && message.candidatesTokensDetails.length) + for (var i = 0; i < message.candidatesTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1.ModalityTokenCount.encode(message.candidatesTokensDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.toolUsePromptTokensDetails != null && message.toolUsePromptTokensDetails.length) + for (var i = 0; i < message.toolUsePromptTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1.ModalityTokenCount.encode(message.toolUsePromptTokensDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.toolUsePromptTokenCount != null && Object.hasOwnProperty.call(message, "toolUsePromptTokenCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.toolUsePromptTokenCount); + if (message.thoughtsTokenCount != null && Object.hasOwnProperty.call(message, "thoughtsTokenCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.thoughtsTokenCount); + return writer; + }; + + /** + * Encodes the specified UsageMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UsageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1.IUsageMetadata} message UsageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.UsageMetadata} UsageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.UsageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.promptTokenCount = reader.int32(); + break; + } + case 2: { + message.candidatesTokenCount = reader.int32(); + break; + } + case 3: { + message.totalTokenCount = reader.int32(); + break; + } + case 13: { + message.toolUsePromptTokenCount = reader.int32(); + break; + } + case 14: { + message.thoughtsTokenCount = reader.int32(); + break; + } + case 5: { + message.cachedContentTokenCount = reader.int32(); + break; + } + case 9: { + if (!(message.promptTokensDetails && message.promptTokensDetails.length)) + message.promptTokensDetails = []; + message.promptTokensDetails.push($root.google.cloud.aiplatform.v1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.cacheTokensDetails && message.cacheTokensDetails.length)) + message.cacheTokensDetails = []; + message.cacheTokensDetails.push($root.google.cloud.aiplatform.v1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.candidatesTokensDetails && message.candidatesTokensDetails.length)) + message.candidatesTokensDetails = []; + message.candidatesTokensDetails.push($root.google.cloud.aiplatform.v1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.toolUsePromptTokensDetails && message.toolUsePromptTokensDetails.length)) + message.toolUsePromptTokensDetails = []; + message.toolUsePromptTokensDetails.push($root.google.cloud.aiplatform.v1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 8: { + message.trafficType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.UsageMetadata} UsageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsageMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.promptTokenCount != null && message.hasOwnProperty("promptTokenCount")) + if (!$util.isInteger(message.promptTokenCount)) + return "promptTokenCount: integer expected"; + if (message.candidatesTokenCount != null && message.hasOwnProperty("candidatesTokenCount")) + if (!$util.isInteger(message.candidatesTokenCount)) + return "candidatesTokenCount: integer expected"; + if (message.totalTokenCount != null && message.hasOwnProperty("totalTokenCount")) + if (!$util.isInteger(message.totalTokenCount)) + return "totalTokenCount: integer expected"; + if (message.toolUsePromptTokenCount != null && message.hasOwnProperty("toolUsePromptTokenCount")) + if (!$util.isInteger(message.toolUsePromptTokenCount)) + return "toolUsePromptTokenCount: integer expected"; + if (message.thoughtsTokenCount != null && message.hasOwnProperty("thoughtsTokenCount")) + if (!$util.isInteger(message.thoughtsTokenCount)) + return "thoughtsTokenCount: integer expected"; + if (message.cachedContentTokenCount != null && message.hasOwnProperty("cachedContentTokenCount")) + if (!$util.isInteger(message.cachedContentTokenCount)) + return "cachedContentTokenCount: integer expected"; + if (message.promptTokensDetails != null && message.hasOwnProperty("promptTokensDetails")) { + if (!Array.isArray(message.promptTokensDetails)) + return "promptTokensDetails: array expected"; + for (var i = 0; i < message.promptTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModalityTokenCount.verify(message.promptTokensDetails[i]); + if (error) + return "promptTokensDetails." + error; + } + } + if (message.cacheTokensDetails != null && message.hasOwnProperty("cacheTokensDetails")) { + if (!Array.isArray(message.cacheTokensDetails)) + return "cacheTokensDetails: array expected"; + for (var i = 0; i < message.cacheTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModalityTokenCount.verify(message.cacheTokensDetails[i]); + if (error) + return "cacheTokensDetails." + error; + } + } + if (message.candidatesTokensDetails != null && message.hasOwnProperty("candidatesTokensDetails")) { + if (!Array.isArray(message.candidatesTokensDetails)) + return "candidatesTokensDetails: array expected"; + for (var i = 0; i < message.candidatesTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModalityTokenCount.verify(message.candidatesTokensDetails[i]); + if (error) + return "candidatesTokensDetails." + error; + } + } + if (message.toolUsePromptTokensDetails != null && message.hasOwnProperty("toolUsePromptTokensDetails")) { + if (!Array.isArray(message.toolUsePromptTokensDetails)) + return "toolUsePromptTokensDetails: array expected"; + for (var i = 0; i < message.toolUsePromptTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModalityTokenCount.verify(message.toolUsePromptTokensDetails[i]); + if (error) + return "toolUsePromptTokensDetails." + error; + } + } + if (message.trafficType != null && message.hasOwnProperty("trafficType")) + switch (message.trafficType) { + default: + return "trafficType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a UsageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.UsageMetadata} UsageMetadata + */ + UsageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.UsageMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1.UsageMetadata(); + if (object.promptTokenCount != null) + message.promptTokenCount = object.promptTokenCount | 0; + if (object.candidatesTokenCount != null) + message.candidatesTokenCount = object.candidatesTokenCount | 0; + if (object.totalTokenCount != null) + message.totalTokenCount = object.totalTokenCount | 0; + if (object.toolUsePromptTokenCount != null) + message.toolUsePromptTokenCount = object.toolUsePromptTokenCount | 0; + if (object.thoughtsTokenCount != null) + message.thoughtsTokenCount = object.thoughtsTokenCount | 0; + if (object.cachedContentTokenCount != null) + message.cachedContentTokenCount = object.cachedContentTokenCount | 0; + if (object.promptTokensDetails) { + if (!Array.isArray(object.promptTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.promptTokensDetails: array expected"); + message.promptTokensDetails = []; + for (var i = 0; i < object.promptTokensDetails.length; ++i) { + if (typeof object.promptTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.promptTokensDetails: object expected"); + message.promptTokensDetails[i] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.fromObject(object.promptTokensDetails[i]); + } + } + if (object.cacheTokensDetails) { + if (!Array.isArray(object.cacheTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.cacheTokensDetails: array expected"); + message.cacheTokensDetails = []; + for (var i = 0; i < object.cacheTokensDetails.length; ++i) { + if (typeof object.cacheTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.cacheTokensDetails: object expected"); + message.cacheTokensDetails[i] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.fromObject(object.cacheTokensDetails[i]); + } + } + if (object.candidatesTokensDetails) { + if (!Array.isArray(object.candidatesTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.candidatesTokensDetails: array expected"); + message.candidatesTokensDetails = []; + for (var i = 0; i < object.candidatesTokensDetails.length; ++i) { + if (typeof object.candidatesTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.candidatesTokensDetails: object expected"); + message.candidatesTokensDetails[i] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.fromObject(object.candidatesTokensDetails[i]); + } + } + if (object.toolUsePromptTokensDetails) { + if (!Array.isArray(object.toolUsePromptTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.toolUsePromptTokensDetails: array expected"); + message.toolUsePromptTokensDetails = []; + for (var i = 0; i < object.toolUsePromptTokensDetails.length; ++i) { + if (typeof object.toolUsePromptTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UsageMetadata.toolUsePromptTokensDetails: object expected"); + message.toolUsePromptTokensDetails[i] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.fromObject(object.toolUsePromptTokensDetails[i]); + } + } + switch (object.trafficType) { + default: + if (typeof object.trafficType === "number") { + message.trafficType = object.trafficType; + break; + } + break; + case "TRAFFIC_TYPE_UNSPECIFIED": + case 0: + message.trafficType = 0; + break; + case "ON_DEMAND": + case 1: + message.trafficType = 1; + break; + case "PROVISIONED_THROUGHPUT": + case 2: + message.trafficType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a UsageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1.UsageMetadata} message UsageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsageMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.promptTokensDetails = []; + object.cacheTokensDetails = []; + object.candidatesTokensDetails = []; + object.toolUsePromptTokensDetails = []; + } + if (options.defaults) { + object.promptTokenCount = 0; + object.candidatesTokenCount = 0; + object.totalTokenCount = 0; + object.cachedContentTokenCount = 0; + object.trafficType = options.enums === String ? "TRAFFIC_TYPE_UNSPECIFIED" : 0; + object.toolUsePromptTokenCount = 0; + object.thoughtsTokenCount = 0; + } + if (message.promptTokenCount != null && message.hasOwnProperty("promptTokenCount")) + object.promptTokenCount = message.promptTokenCount; + if (message.candidatesTokenCount != null && message.hasOwnProperty("candidatesTokenCount")) + object.candidatesTokenCount = message.candidatesTokenCount; + if (message.totalTokenCount != null && message.hasOwnProperty("totalTokenCount")) + object.totalTokenCount = message.totalTokenCount; + if (message.cachedContentTokenCount != null && message.hasOwnProperty("cachedContentTokenCount")) + object.cachedContentTokenCount = message.cachedContentTokenCount; + if (message.trafficType != null && message.hasOwnProperty("trafficType")) + object.trafficType = options.enums === String ? $root.google.cloud.aiplatform.v1.UsageMetadata.TrafficType[message.trafficType] === undefined ? message.trafficType : $root.google.cloud.aiplatform.v1.UsageMetadata.TrafficType[message.trafficType] : message.trafficType; + if (message.promptTokensDetails && message.promptTokensDetails.length) { + object.promptTokensDetails = []; + for (var j = 0; j < message.promptTokensDetails.length; ++j) + object.promptTokensDetails[j] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.toObject(message.promptTokensDetails[j], options); + } + if (message.cacheTokensDetails && message.cacheTokensDetails.length) { + object.cacheTokensDetails = []; + for (var j = 0; j < message.cacheTokensDetails.length; ++j) + object.cacheTokensDetails[j] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.toObject(message.cacheTokensDetails[j], options); + } + if (message.candidatesTokensDetails && message.candidatesTokensDetails.length) { + object.candidatesTokensDetails = []; + for (var j = 0; j < message.candidatesTokensDetails.length; ++j) + object.candidatesTokensDetails[j] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.toObject(message.candidatesTokensDetails[j], options); + } + if (message.toolUsePromptTokensDetails && message.toolUsePromptTokensDetails.length) { + object.toolUsePromptTokensDetails = []; + for (var j = 0; j < message.toolUsePromptTokensDetails.length; ++j) + object.toolUsePromptTokensDetails[j] = $root.google.cloud.aiplatform.v1.ModalityTokenCount.toObject(message.toolUsePromptTokensDetails[j], options); + } + if (message.toolUsePromptTokenCount != null && message.hasOwnProperty("toolUsePromptTokenCount")) + object.toolUsePromptTokenCount = message.toolUsePromptTokenCount; + if (message.thoughtsTokenCount != null && message.hasOwnProperty("thoughtsTokenCount")) + object.thoughtsTokenCount = message.thoughtsTokenCount; + return object; + }; + + /** + * Converts this UsageMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @instance + * @returns {Object.} JSON object + */ + UsageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsageMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.UsageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.UsageMetadata"; + }; + + /** + * TrafficType enum. + * @name google.cloud.aiplatform.v1.UsageMetadata.TrafficType + * @enum {number} + * @property {number} TRAFFIC_TYPE_UNSPECIFIED=0 TRAFFIC_TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} PROVISIONED_THROUGHPUT=2 PROVISIONED_THROUGHPUT value + */ + UsageMetadata.TrafficType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRAFFIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "PROVISIONED_THROUGHPUT"] = 2; + return values; + })(); + + return UsageMetadata; + })(); + v1.MatchService = (function() { /** @@ -289949,6 +294440,7 @@ * Properties of a ReasoningEngineSpec. * @memberof google.cloud.aiplatform.v1 * @interface IReasoningEngineSpec + * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec|null} [sourceCodeSpec] ReasoningEngineSpec sourceCodeSpec * @property {string|null} [serviceAccount] ReasoningEngineSpec serviceAccount * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.IPackageSpec|null} [packageSpec] ReasoningEngineSpec packageSpec * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.IDeploymentSpec|null} [deploymentSpec] ReasoningEngineSpec deploymentSpec @@ -289972,6 +294464,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ReasoningEngineSpec sourceCodeSpec. + * @member {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec|null|undefined} sourceCodeSpec + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec + * @instance + */ + ReasoningEngineSpec.prototype.sourceCodeSpec = null; + /** * ReasoningEngineSpec serviceAccount. * @member {string|null|undefined} serviceAccount @@ -290015,6 +294515,17 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; + /** + * ReasoningEngineSpec deploymentSource. + * @member {"sourceCodeSpec"|undefined} deploymentSource + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec + * @instance + */ + Object.defineProperty(ReasoningEngineSpec.prototype, "deploymentSource", { + get: $util.oneOfGetter($oneOfFields = ["sourceCodeSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(ReasoningEngineSpec.prototype, "_serviceAccount", { get: $util.oneOfGetter($oneOfFields = ["serviceAccount"]), @@ -290056,6 +294567,8 @@ $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpec.encode(message.deploymentSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.agentFramework != null && Object.hasOwnProperty.call(message, "agentFramework")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentFramework); + if (message.sourceCodeSpec != null && Object.hasOwnProperty.call(message, "sourceCodeSpec")) + $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.encode(message.sourceCodeSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -290092,6 +294605,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 11: { + message.sourceCodeSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.decode(reader, reader.uint32()); + break; + } case 1: { message.serviceAccount = reader.string(); break; @@ -290150,6 +294667,14 @@ if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; + if (message.sourceCodeSpec != null && message.hasOwnProperty("sourceCodeSpec")) { + properties.deploymentSource = 1; + { + var error = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.verify(message.sourceCodeSpec); + if (error) + return "sourceCodeSpec." + error; + } + } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { properties._serviceAccount = 1; if (!$util.isString(message.serviceAccount)) @@ -290192,6 +294717,11 @@ if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec) return object; var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec(); + if (object.sourceCodeSpec != null) { + if (typeof object.sourceCodeSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngineSpec.sourceCodeSpec: object expected"); + message.sourceCodeSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.fromObject(object.sourceCodeSpec); + } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); if (object.packageSpec != null) { @@ -290255,6 +294785,11 @@ object.deploymentSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpec.toObject(message.deploymentSpec, options); if (message.agentFramework != null && message.hasOwnProperty("agentFramework")) object.agentFramework = message.agentFramework; + if (message.sourceCodeSpec != null && message.hasOwnProperty("sourceCodeSpec")) { + object.sourceCodeSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.toObject(message.sourceCodeSpec, options); + if (options.oneofs) + object.deploymentSource = "sourceCodeSpec"; + } return object; }; @@ -291021,6 +295556,1265 @@ return DeploymentSpec; })(); + ReasoningEngineSpec.SourceCodeSpec = (function() { + + /** + * Properties of a SourceCodeSpec. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec + * @interface ISourceCodeSpec + * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null} [inlineSource] SourceCodeSpec inlineSource + * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null} [developerConnectSource] SourceCodeSpec developerConnectSource + * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null} [pythonSpec] SourceCodeSpec pythonSpec + */ + + /** + * Constructs a new SourceCodeSpec. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec + * @classdesc Represents a SourceCodeSpec. + * @implements ISourceCodeSpec + * @constructor + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec=} [properties] Properties to set + */ + function SourceCodeSpec(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]]; + } + + /** + * SourceCodeSpec inlineSource. + * @member {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.inlineSource = null; + + /** + * SourceCodeSpec developerConnectSource. + * @member {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null|undefined} developerConnectSource + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.developerConnectSource = null; + + /** + * SourceCodeSpec pythonSpec. + * @member {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null|undefined} pythonSpec + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.pythonSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceCodeSpec source. + * @member {"inlineSource"|"developerConnectSource"|undefined} source + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + Object.defineProperty(SourceCodeSpec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "developerConnectSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SourceCodeSpec languageSpec. + * @member {"pythonSpec"|undefined} languageSpec + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + Object.defineProperty(SourceCodeSpec.prototype, "languageSpec", { + get: $util.oneOfGetter($oneOfFields = ["pythonSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceCodeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec instance + */ + SourceCodeSpec.create = function create(properties) { + return new SourceCodeSpec(properties); + }; + + /** + * Encodes the specified SourceCodeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec} message SourceCodeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.encode(message.inlineSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pythonSpec != null && Object.hasOwnProperty.call(message, "pythonSpec")) + $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.encode(message.pythonSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.developerConnectSource != null && Object.hasOwnProperty.call(message, "developerConnectSource")) + $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.encode(message.developerConnectSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.ISourceCodeSpec} message SourceCodeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.developerConnectSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pythonSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify(message.inlineSource); + if (error) + return "inlineSource." + error; + } + } + if (message.developerConnectSource != null && message.hasOwnProperty("developerConnectSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify(message.developerConnectSource); + if (error) + return "developerConnectSource." + error; + } + } + if (message.pythonSpec != null && message.hasOwnProperty("pythonSpec")) { + properties.languageSpec = 1; + { + var error = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify(message.pythonSpec); + if (error) + return "pythonSpec." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + */ + SourceCodeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.fromObject(object.inlineSource); + } + if (object.developerConnectSource != null) { + if (typeof object.developerConnectSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.developerConnectSource: object expected"); + message.developerConnectSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.fromObject(object.developerConnectSource); + } + if (object.pythonSpec != null) { + if (typeof object.pythonSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.pythonSpec: object expected"); + message.pythonSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.fromObject(object.pythonSpec); + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec} message SourceCodeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.pythonSpec != null && message.hasOwnProperty("pythonSpec")) { + object.pythonSpec = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.toObject(message.pythonSpec, options); + if (options.oneofs) + object.languageSpec = "pythonSpec"; + } + if (message.developerConnectSource != null && message.hasOwnProperty("developerConnectSource")) { + object.developerConnectSource = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.toObject(message.developerConnectSource, options); + if (options.oneofs) + object.source = "developerConnectSource"; + } + return object; + }; + + /** + * Converts this SourceCodeSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @instance + * @returns {Object.} JSON object + */ + SourceCodeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec"; + }; + + SourceCodeSpec.InlineSource = (function() { + + /** + * Properties of an InlineSource. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @interface IInlineSource + * @property {Uint8Array|null} [sourceArchive] InlineSource sourceArchive + */ + + /** + * Constructs a new InlineSource. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource=} [properties] Properties to set + */ + function InlineSource(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]]; + } + + /** + * InlineSource sourceArchive. + * @member {Uint8Array} sourceArchive + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @instance + */ + InlineSource.prototype.sourceArchive = $util.newBuffer([]); + + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceArchive != null && Object.hasOwnProperty.call(message, "sourceArchive")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sourceArchive); + return writer; + }; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceArchive = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceArchive != null && message.hasOwnProperty("sourceArchive")) + if (!(message.sourceArchive && typeof message.sourceArchive.length === "number" || $util.isString(message.sourceArchive))) + return "sourceArchive: buffer expected"; + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource(); + if (object.sourceArchive != null) + if (typeof object.sourceArchive === "string") + $util.base64.decode(object.sourceArchive, message.sourceArchive = $util.newBuffer($util.base64.length(object.sourceArchive)), 0); + else if (object.sourceArchive.length >= 0) + message.sourceArchive = object.sourceArchive; + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.sourceArchive = ""; + else { + object.sourceArchive = []; + if (options.bytes !== Array) + object.sourceArchive = $util.newBuffer(object.sourceArchive); + } + if (message.sourceArchive != null && message.hasOwnProperty("sourceArchive")) + object.sourceArchive = options.bytes === String ? $util.base64.encode(message.sourceArchive, 0, message.sourceArchive.length) : options.bytes === Array ? Array.prototype.slice.call(message.sourceArchive) : message.sourceArchive; + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.InlineSource"; + }; + + return InlineSource; + })(); + + SourceCodeSpec.DeveloperConnectConfig = (function() { + + /** + * Properties of a DeveloperConnectConfig. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @interface IDeveloperConnectConfig + * @property {string|null} [gitRepositoryLink] DeveloperConnectConfig gitRepositoryLink + * @property {string|null} [dir] DeveloperConnectConfig dir + * @property {string|null} [revision] DeveloperConnectConfig revision + */ + + /** + * Constructs a new DeveloperConnectConfig. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a DeveloperConnectConfig. + * @implements IDeveloperConnectConfig + * @constructor + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig=} [properties] Properties to set + */ + function DeveloperConnectConfig(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]]; + } + + /** + * DeveloperConnectConfig gitRepositoryLink. + * @member {string} gitRepositoryLink + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.gitRepositoryLink = ""; + + /** + * DeveloperConnectConfig dir. + * @member {string} dir + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.dir = ""; + + /** + * DeveloperConnectConfig revision. + * @member {string} revision + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.revision = ""; + + /** + * Creates a new DeveloperConnectConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig instance + */ + DeveloperConnectConfig.create = function create(properties) { + return new DeveloperConnectConfig(properties); + }; + + /** + * Encodes the specified DeveloperConnectConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig} message DeveloperConnectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gitRepositoryLink != null && Object.hasOwnProperty.call(message, "gitRepositoryLink")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gitRepositoryLink); + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dir); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + return writer; + }; + + /** + * Encodes the specified DeveloperConnectConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig} message DeveloperConnectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gitRepositoryLink = reader.string(); + break; + } + case 2: { + message.dir = reader.string(); + break; + } + case 3: { + message.revision = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeveloperConnectConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeveloperConnectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gitRepositoryLink != null && message.hasOwnProperty("gitRepositoryLink")) + if (!$util.isString(message.gitRepositoryLink)) + return "gitRepositoryLink: string expected"; + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + return null; + }; + + /** + * Creates a DeveloperConnectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + */ + DeveloperConnectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig(); + if (object.gitRepositoryLink != null) + message.gitRepositoryLink = String(object.gitRepositoryLink); + if (object.dir != null) + message.dir = String(object.dir); + if (object.revision != null) + message.revision = String(object.revision); + return message; + }; + + /** + * Creates a plain object from a DeveloperConnectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} message DeveloperConnectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeveloperConnectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gitRepositoryLink = ""; + object.dir = ""; + object.revision = ""; + } + if (message.gitRepositoryLink != null && message.hasOwnProperty("gitRepositoryLink")) + object.gitRepositoryLink = message.gitRepositoryLink; + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + return object; + }; + + /** + * Converts this DeveloperConnectConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + * @returns {Object.} JSON object + */ + DeveloperConnectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeveloperConnectConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeveloperConnectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig"; + }; + + return DeveloperConnectConfig; + })(); + + SourceCodeSpec.DeveloperConnectSource = (function() { + + /** + * Properties of a DeveloperConnectSource. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @interface IDeveloperConnectSource + * @property {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null} [config] DeveloperConnectSource config + */ + + /** + * Constructs a new DeveloperConnectSource. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a DeveloperConnectSource. + * @implements IDeveloperConnectSource + * @constructor + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource=} [properties] Properties to set + */ + function DeveloperConnectSource(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]]; + } + + /** + * DeveloperConnectSource config. + * @member {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null|undefined} config + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @instance + */ + DeveloperConnectSource.prototype.config = null; + + /** + * Creates a new DeveloperConnectSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource instance + */ + DeveloperConnectSource.create = function create(properties) { + return new DeveloperConnectSource(properties); + }; + + /** + * Encodes the specified DeveloperConnectSource message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource} message DeveloperConnectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeveloperConnectSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource} message DeveloperConnectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.config = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeveloperConnectSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeveloperConnectSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates a DeveloperConnectSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + */ + DeveloperConnectSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.config: object expected"); + message.config = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from a DeveloperConnectSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} message DeveloperConnectSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeveloperConnectSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.config = null; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.toObject(message.config, options); + return object; + }; + + /** + * Converts this DeveloperConnectSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @instance + * @returns {Object.} JSON object + */ + DeveloperConnectSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeveloperConnectSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeveloperConnectSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource"; + }; + + return DeveloperConnectSource; + })(); + + SourceCodeSpec.PythonSpec = (function() { + + /** + * Properties of a PythonSpec. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @interface IPythonSpec + * @property {string|null} [version] PythonSpec version + * @property {string|null} [entrypointModule] PythonSpec entrypointModule + * @property {string|null} [entrypointObject] PythonSpec entrypointObject + * @property {string|null} [requirementsFile] PythonSpec requirementsFile + */ + + /** + * Constructs a new PythonSpec. + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a PythonSpec. + * @implements IPythonSpec + * @constructor + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec=} [properties] Properties to set + */ + function PythonSpec(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]]; + } + + /** + * PythonSpec version. + * @member {string} version + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.version = ""; + + /** + * PythonSpec entrypointModule. + * @member {string} entrypointModule + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.entrypointModule = ""; + + /** + * PythonSpec entrypointObject. + * @member {string} entrypointObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.entrypointObject = ""; + + /** + * PythonSpec requirementsFile. + * @member {string} requirementsFile + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.requirementsFile = ""; + + /** + * Creates a new PythonSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec instance + */ + PythonSpec.create = function create(properties) { + return new PythonSpec(properties); + }; + + /** + * Encodes the specified PythonSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec} message PythonSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.entrypointModule != null && Object.hasOwnProperty.call(message, "entrypointModule")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entrypointModule); + if (message.entrypointObject != null && Object.hasOwnProperty.call(message, "entrypointObject")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entrypointObject); + if (message.requirementsFile != null && Object.hasOwnProperty.call(message, "requirementsFile")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requirementsFile); + return writer; + }; + + /** + * Encodes the specified PythonSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec} message PythonSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.entrypointModule = reader.string(); + break; + } + case 3: { + message.entrypointObject = reader.string(); + break; + } + case 4: { + message.requirementsFile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.entrypointModule != null && message.hasOwnProperty("entrypointModule")) + if (!$util.isString(message.entrypointModule)) + return "entrypointModule: string expected"; + if (message.entrypointObject != null && message.hasOwnProperty("entrypointObject")) + if (!$util.isString(message.entrypointObject)) + return "entrypointObject: string expected"; + if (message.requirementsFile != null && message.hasOwnProperty("requirementsFile")) + if (!$util.isString(message.requirementsFile)) + return "requirementsFile: string expected"; + return null; + }; + + /** + * Creates a PythonSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + */ + PythonSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec(); + if (object.version != null) + message.version = String(object.version); + if (object.entrypointModule != null) + message.entrypointModule = String(object.entrypointModule); + if (object.entrypointObject != null) + message.entrypointObject = String(object.entrypointObject); + if (object.requirementsFile != null) + message.requirementsFile = String(object.requirementsFile); + return message; + }; + + /** + * Creates a plain object from a PythonSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} message PythonSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.entrypointModule = ""; + object.entrypointObject = ""; + object.requirementsFile = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.entrypointModule != null && message.hasOwnProperty("entrypointModule")) + object.entrypointModule = message.entrypointModule; + if (message.entrypointObject != null && message.hasOwnProperty("entrypointObject")) + object.entrypointObject = message.entrypointObject; + if (message.requirementsFile != null && message.hasOwnProperty("requirementsFile")) + object.requirementsFile = message.requirementsFile; + return object; + }; + + /** + * Converts this PythonSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + * @returns {Object.} JSON object + */ + PythonSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec"; + }; + + return PythonSpec; + })(); + + return SourceCodeSpec; + })(); + return ReasoningEngineSpec; })(); @@ -291038,6 +296832,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] ReasoningEngine updateTime * @property {string|null} [etag] ReasoningEngine etag * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] ReasoningEngine encryptionSpec + * @property {Object.|null} [labels] ReasoningEngine labels */ /** @@ -291049,6 +296844,7 @@ * @param {google.cloud.aiplatform.v1.IReasoningEngine=} [properties] Properties to set */ function ReasoningEngine(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -291119,6 +296915,14 @@ */ ReasoningEngine.prototype.encryptionSpec = null; + /** + * ReasoningEngine labels. + * @member {Object.} labels + * @memberof google.cloud.aiplatform.v1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.labels = $util.emptyObject; + /** * Creates a new ReasoningEngine instance using the specified properties. * @function create @@ -291159,6 +296963,9 @@ writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -291189,7 +296996,7 @@ ReasoningEngine.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngine(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ReasoningEngine(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -291227,6 +297034,29 @@ message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.decode(reader, reader.uint32()); break; } + case 17: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -291294,6 +297124,14 @@ if (error) return "encryptionSpec." + error; } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -291337,6 +297175,13 @@ throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngine.encryptionSpec: object expected"); message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.fromObject(object.encryptionSpec); } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ReasoningEngine.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; @@ -291353,6 +297198,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.displayName = ""; @@ -291379,6 +297226,12 @@ object.description = message.description; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -384400,6 +390253,244 @@ return PrebuiltVoiceConfig; })(); + v1beta1.ReplicatedVoiceConfig = (function() { + + /** + * Properties of a ReplicatedVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IReplicatedVoiceConfig + * @property {string|null} [mimeType] ReplicatedVoiceConfig mimeType + * @property {Uint8Array|null} [voiceSampleAudio] ReplicatedVoiceConfig voiceSampleAudio + */ + + /** + * Constructs a new ReplicatedVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReplicatedVoiceConfig. + * @implements IReplicatedVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig=} [properties] Properties to set + */ + function ReplicatedVoiceConfig(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]]; + } + + /** + * ReplicatedVoiceConfig mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @instance + */ + ReplicatedVoiceConfig.prototype.mimeType = ""; + + /** + * ReplicatedVoiceConfig voiceSampleAudio. + * @member {Uint8Array} voiceSampleAudio + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @instance + */ + ReplicatedVoiceConfig.prototype.voiceSampleAudio = $util.newBuffer([]); + + /** + * Creates a new ReplicatedVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig} ReplicatedVoiceConfig instance + */ + ReplicatedVoiceConfig.create = function create(properties) { + return new ReplicatedVoiceConfig(properties); + }; + + /** + * Encodes the specified ReplicatedVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig} message ReplicatedVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicatedVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.voiceSampleAudio != null && Object.hasOwnProperty.call(message, "voiceSampleAudio")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voiceSampleAudio); + return writer; + }; + + /** + * Encodes the specified ReplicatedVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig} message ReplicatedVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicatedVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicatedVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.voiceSampleAudio = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplicatedVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicatedVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicatedVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicatedVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.voiceSampleAudio != null && message.hasOwnProperty("voiceSampleAudio")) + if (!(message.voiceSampleAudio && typeof message.voiceSampleAudio.length === "number" || $util.isString(message.voiceSampleAudio))) + return "voiceSampleAudio: buffer expected"; + return null; + }; + + /** + * Creates a ReplicatedVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig} ReplicatedVoiceConfig + */ + ReplicatedVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.voiceSampleAudio != null) + if (typeof object.voiceSampleAudio === "string") + $util.base64.decode(object.voiceSampleAudio, message.voiceSampleAudio = $util.newBuffer($util.base64.length(object.voiceSampleAudio)), 0); + else if (object.voiceSampleAudio.length >= 0) + message.voiceSampleAudio = object.voiceSampleAudio; + return message; + }; + + /** + * Creates a plain object from a ReplicatedVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig} message ReplicatedVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplicatedVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.voiceSampleAudio = ""; + else { + object.voiceSampleAudio = []; + if (options.bytes !== Array) + object.voiceSampleAudio = $util.newBuffer(object.voiceSampleAudio); + } + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.voiceSampleAudio != null && message.hasOwnProperty("voiceSampleAudio")) + object.voiceSampleAudio = options.bytes === String ? $util.base64.encode(message.voiceSampleAudio, 0, message.voiceSampleAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.voiceSampleAudio) : message.voiceSampleAudio; + return object; + }; + + /** + * Converts this ReplicatedVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + ReplicatedVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplicatedVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplicatedVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig"; + }; + + return ReplicatedVoiceConfig; + })(); + v1beta1.VoiceConfig = (function() { /** @@ -384407,6 +390498,7 @@ * @memberof google.cloud.aiplatform.v1beta1 * @interface IVoiceConfig * @property {google.cloud.aiplatform.v1beta1.IPrebuiltVoiceConfig|null} [prebuiltVoiceConfig] VoiceConfig prebuiltVoiceConfig + * @property {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig|null} [replicatedVoiceConfig] VoiceConfig replicatedVoiceConfig */ /** @@ -384432,17 +390524,25 @@ */ VoiceConfig.prototype.prebuiltVoiceConfig = null; + /** + * VoiceConfig replicatedVoiceConfig. + * @member {google.cloud.aiplatform.v1beta1.IReplicatedVoiceConfig|null|undefined} replicatedVoiceConfig + * @memberof google.cloud.aiplatform.v1beta1.VoiceConfig + * @instance + */ + VoiceConfig.prototype.replicatedVoiceConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * VoiceConfig voiceConfig. - * @member {"prebuiltVoiceConfig"|undefined} voiceConfig + * @member {"prebuiltVoiceConfig"|"replicatedVoiceConfig"|undefined} voiceConfig * @memberof google.cloud.aiplatform.v1beta1.VoiceConfig * @instance */ Object.defineProperty(VoiceConfig.prototype, "voiceConfig", { - get: $util.oneOfGetter($oneOfFields = ["prebuiltVoiceConfig"]), + get: $util.oneOfGetter($oneOfFields = ["prebuiltVoiceConfig", "replicatedVoiceConfig"]), set: $util.oneOfSetter($oneOfFields) }); @@ -384472,6 +390572,8 @@ writer = $Writer.create(); if (message.prebuiltVoiceConfig != null && Object.hasOwnProperty.call(message, "prebuiltVoiceConfig")) $root.google.cloud.aiplatform.v1beta1.PrebuiltVoiceConfig.encode(message.prebuiltVoiceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replicatedVoiceConfig != null && Object.hasOwnProperty.call(message, "replicatedVoiceConfig")) + $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.encode(message.replicatedVoiceConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -384512,6 +390614,10 @@ message.prebuiltVoiceConfig = $root.google.cloud.aiplatform.v1beta1.PrebuiltVoiceConfig.decode(reader, reader.uint32()); break; } + case 3: { + message.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -384556,6 +390662,16 @@ return "prebuiltVoiceConfig." + error; } } + if (message.replicatedVoiceConfig != null && message.hasOwnProperty("replicatedVoiceConfig")) { + if (properties.voiceConfig === 1) + return "voiceConfig: multiple values"; + properties.voiceConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.verify(message.replicatedVoiceConfig); + if (error) + return "replicatedVoiceConfig." + error; + } + } return null; }; @@ -384576,6 +390692,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.VoiceConfig.prebuiltVoiceConfig: object expected"); message.prebuiltVoiceConfig = $root.google.cloud.aiplatform.v1beta1.PrebuiltVoiceConfig.fromObject(object.prebuiltVoiceConfig); } + if (object.replicatedVoiceConfig != null) { + if (typeof object.replicatedVoiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.VoiceConfig.replicatedVoiceConfig: object expected"); + message.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.fromObject(object.replicatedVoiceConfig); + } return message; }; @@ -384597,6 +390718,11 @@ if (options.oneofs) object.voiceConfig = "prebuiltVoiceConfig"; } + if (message.replicatedVoiceConfig != null && message.hasOwnProperty("replicatedVoiceConfig")) { + object.replicatedVoiceConfig = $root.google.cloud.aiplatform.v1beta1.ReplicatedVoiceConfig.toObject(message.replicatedVoiceConfig, options); + if (options.oneofs) + object.voiceConfig = "replicatedVoiceConfig"; + } return object; }; @@ -384629,6 +390755,466 @@ return VoiceConfig; })(); + v1beta1.SpeakerVoiceConfig = (function() { + + /** + * Properties of a SpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISpeakerVoiceConfig + * @property {string|null} [speaker] SpeakerVoiceConfig speaker + * @property {google.cloud.aiplatform.v1beta1.IVoiceConfig|null} [voiceConfig] SpeakerVoiceConfig voiceConfig + */ + + /** + * Constructs a new SpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SpeakerVoiceConfig. + * @implements ISpeakerVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig=} [properties] Properties to set + */ + function SpeakerVoiceConfig(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]]; + } + + /** + * SpeakerVoiceConfig speaker. + * @member {string} speaker + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @instance + */ + SpeakerVoiceConfig.prototype.speaker = ""; + + /** + * SpeakerVoiceConfig voiceConfig. + * @member {google.cloud.aiplatform.v1beta1.IVoiceConfig|null|undefined} voiceConfig + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @instance + */ + SpeakerVoiceConfig.prototype.voiceConfig = null; + + /** + * Creates a new SpeakerVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig} SpeakerVoiceConfig instance + */ + SpeakerVoiceConfig.create = function create(properties) { + return new SpeakerVoiceConfig(properties); + }; + + /** + * Encodes the specified SpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig} message SpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeakerVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speaker != null && Object.hasOwnProperty.call(message, "speaker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.speaker); + if (message.voiceConfig != null && Object.hasOwnProperty.call(message, "voiceConfig")) + $root.google.cloud.aiplatform.v1beta1.VoiceConfig.encode(message.voiceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ISpeakerVoiceConfig} message SpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeakerVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig} SpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeakerVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.speaker = reader.string(); + break; + } + case 2: { + message.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig} SpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeakerVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpeakerVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpeakerVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speaker != null && message.hasOwnProperty("speaker")) + if (!$util.isString(message.speaker)) + return "speaker: string expected"; + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) { + var error = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.verify(message.voiceConfig); + if (error) + return "voiceConfig." + error; + } + return null; + }; + + /** + * Creates a SpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig} SpeakerVoiceConfig + */ + SpeakerVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig(); + if (object.speaker != null) + message.speaker = String(object.speaker); + if (object.voiceConfig != null) { + if (typeof object.voiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.voiceConfig: object expected"); + message.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.fromObject(object.voiceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SpeakerVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig} message SpeakerVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpeakerVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.speaker = ""; + object.voiceConfig = null; + } + if (message.speaker != null && message.hasOwnProperty("speaker")) + object.speaker = message.speaker; + if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) + object.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.toObject(message.voiceConfig, options); + return object; + }; + + /** + * Converts this SpeakerVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + SpeakerVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpeakerVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpeakerVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig"; + }; + + return SpeakerVoiceConfig; + })(); + + v1beta1.MultiSpeakerVoiceConfig = (function() { + + /** + * Properties of a MultiSpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IMultiSpeakerVoiceConfig + * @property {Array.|null} [speakerVoiceConfigs] MultiSpeakerVoiceConfig speakerVoiceConfigs + */ + + /** + * Constructs a new MultiSpeakerVoiceConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a MultiSpeakerVoiceConfig. + * @implements IMultiSpeakerVoiceConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig=} [properties] Properties to set + */ + function MultiSpeakerVoiceConfig(properties) { + this.speakerVoiceConfigs = []; + 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]]; + } + + /** + * MultiSpeakerVoiceConfig speakerVoiceConfigs. + * @member {Array.} speakerVoiceConfigs + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @instance + */ + MultiSpeakerVoiceConfig.prototype.speakerVoiceConfigs = $util.emptyArray; + + /** + * Creates a new MultiSpeakerVoiceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig instance + */ + MultiSpeakerVoiceConfig.create = function create(properties) { + return new MultiSpeakerVoiceConfig(properties); + }; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSpeakerVoiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speakerVoiceConfigs != null && message.speakerVoiceConfigs.length) + for (var i = 0; i < message.speakerVoiceConfigs.length; ++i) + $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.encode(message.speakerVoiceConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MultiSpeakerVoiceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSpeakerVoiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSpeakerVoiceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.speakerVoiceConfigs && message.speakerVoiceConfigs.length)) + message.speakerVoiceConfigs = []; + message.speakerVoiceConfigs.push($root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSpeakerVoiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSpeakerVoiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSpeakerVoiceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSpeakerVoiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speakerVoiceConfigs != null && message.hasOwnProperty("speakerVoiceConfigs")) { + if (!Array.isArray(message.speakerVoiceConfigs)) + return "speakerVoiceConfigs: array expected"; + for (var i = 0; i < message.speakerVoiceConfigs.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.verify(message.speakerVoiceConfigs[i]); + if (error) + return "speakerVoiceConfigs." + error; + } + } + return null; + }; + + /** + * Creates a MultiSpeakerVoiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig} MultiSpeakerVoiceConfig + */ + MultiSpeakerVoiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig(); + if (object.speakerVoiceConfigs) { + if (!Array.isArray(object.speakerVoiceConfigs)) + throw TypeError(".google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.speakerVoiceConfigs: array expected"); + message.speakerVoiceConfigs = []; + for (var i = 0; i < object.speakerVoiceConfigs.length; ++i) { + if (typeof object.speakerVoiceConfigs[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.speakerVoiceConfigs: object expected"); + message.speakerVoiceConfigs[i] = $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.fromObject(object.speakerVoiceConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MultiSpeakerVoiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig} message MultiSpeakerVoiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSpeakerVoiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.speakerVoiceConfigs = []; + if (message.speakerVoiceConfigs && message.speakerVoiceConfigs.length) { + object.speakerVoiceConfigs = []; + for (var j = 0; j < message.speakerVoiceConfigs.length; ++j) + object.speakerVoiceConfigs[j] = $root.google.cloud.aiplatform.v1beta1.SpeakerVoiceConfig.toObject(message.speakerVoiceConfigs[j], options); + } + return object; + }; + + /** + * Converts this MultiSpeakerVoiceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @instance + * @returns {Object.} JSON object + */ + MultiSpeakerVoiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MultiSpeakerVoiceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultiSpeakerVoiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig"; + }; + + return MultiSpeakerVoiceConfig; + })(); + v1beta1.SpeechConfig = (function() { /** @@ -384636,6 +391222,8 @@ * @memberof google.cloud.aiplatform.v1beta1 * @interface ISpeechConfig * @property {google.cloud.aiplatform.v1beta1.IVoiceConfig|null} [voiceConfig] SpeechConfig voiceConfig + * @property {string|null} [languageCode] SpeechConfig languageCode + * @property {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig|null} [multiSpeakerVoiceConfig] SpeechConfig multiSpeakerVoiceConfig */ /** @@ -384661,6 +391249,22 @@ */ SpeechConfig.prototype.voiceConfig = null; + /** + * SpeechConfig languageCode. + * @member {string} languageCode + * @memberof google.cloud.aiplatform.v1beta1.SpeechConfig + * @instance + */ + SpeechConfig.prototype.languageCode = ""; + + /** + * SpeechConfig multiSpeakerVoiceConfig. + * @member {google.cloud.aiplatform.v1beta1.IMultiSpeakerVoiceConfig|null|undefined} multiSpeakerVoiceConfig + * @memberof google.cloud.aiplatform.v1beta1.SpeechConfig + * @instance + */ + SpeechConfig.prototype.multiSpeakerVoiceConfig = null; + /** * Creates a new SpeechConfig instance using the specified properties. * @function create @@ -384687,6 +391291,10 @@ writer = $Writer.create(); if (message.voiceConfig != null && Object.hasOwnProperty.call(message, "voiceConfig")) $root.google.cloud.aiplatform.v1beta1.VoiceConfig.encode(message.voiceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.multiSpeakerVoiceConfig != null && Object.hasOwnProperty.call(message, "multiSpeakerVoiceConfig")) + $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.encode(message.multiSpeakerVoiceConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -384727,6 +391335,14 @@ message.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.decode(reader, reader.uint32()); break; } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -384767,6 +391383,14 @@ if (error) return "voiceConfig." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.multiSpeakerVoiceConfig != null && message.hasOwnProperty("multiSpeakerVoiceConfig")) { + var error = $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.verify(message.multiSpeakerVoiceConfig); + if (error) + return "multiSpeakerVoiceConfig." + error; + } return null; }; @@ -384787,6 +391411,13 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.SpeechConfig.voiceConfig: object expected"); message.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.fromObject(object.voiceConfig); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.multiSpeakerVoiceConfig != null) { + if (typeof object.multiSpeakerVoiceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SpeechConfig.multiSpeakerVoiceConfig: object expected"); + message.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.fromObject(object.multiSpeakerVoiceConfig); + } return message; }; @@ -384803,10 +391434,17 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.voiceConfig = null; + object.languageCode = ""; + object.multiSpeakerVoiceConfig = null; + } if (message.voiceConfig != null && message.hasOwnProperty("voiceConfig")) object.voiceConfig = $root.google.cloud.aiplatform.v1beta1.VoiceConfig.toObject(message.voiceConfig, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.multiSpeakerVoiceConfig != null && message.hasOwnProperty("multiSpeakerVoiceConfig")) + object.multiSpeakerVoiceConfig = $root.google.cloud.aiplatform.v1beta1.MultiSpeakerVoiceConfig.toObject(message.multiSpeakerVoiceConfig, options); return object; }; @@ -384839,6 +391477,224 @@ return SpeechConfig; })(); + v1beta1.ImageConfig = (function() { + + /** + * Properties of an ImageConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IImageConfig + * @property {string|null} [aspectRatio] ImageConfig aspectRatio + */ + + /** + * Constructs a new ImageConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ImageConfig. + * @implements IImageConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IImageConfig=} [properties] Properties to set + */ + function ImageConfig(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]]; + } + + /** + * ImageConfig aspectRatio. + * @member {string|null|undefined} aspectRatio + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @instance + */ + ImageConfig.prototype.aspectRatio = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_aspectRatio", { + get: $util.oneOfGetter($oneOfFields = ["aspectRatio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IImageConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ImageConfig} ImageConfig instance + */ + ImageConfig.create = function create(properties) { + return new ImageConfig(properties); + }; + + /** + * Encodes the specified ImageConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ImageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectRatio != null && Object.hasOwnProperty.call(message, "aspectRatio")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aspectRatio); + return writer; + }; + + /** + * Encodes the specified ImageConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ImageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IImageConfig} message ImageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ImageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.aspectRatio = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ImageConfig} ImageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + properties._aspectRatio = 1; + if (!$util.isString(message.aspectRatio)) + return "aspectRatio: string expected"; + } + return null; + }; + + /** + * Creates an ImageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ImageConfig} ImageConfig + */ + ImageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ImageConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ImageConfig(); + if (object.aspectRatio != null) + message.aspectRatio = String(object.aspectRatio); + return message; + }; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ImageConfig} message ImageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { + object.aspectRatio = message.aspectRatio; + if (options.oneofs) + object._aspectRatio = "aspectRatio"; + } + return object; + }; + + /** + * Converts this ImageConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @instance + * @returns {Object.} JSON object + */ + ImageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ImageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ImageConfig"; + }; + + return ImageConfig; + })(); + v1beta1.GenerationConfig = (function() { /** @@ -384866,6 +391722,7 @@ * @property {google.cloud.aiplatform.v1beta1.ISpeechConfig|null} [speechConfig] GenerationConfig speechConfig * @property {google.cloud.aiplatform.v1beta1.GenerationConfig.IThinkingConfig|null} [thinkingConfig] GenerationConfig thinkingConfig * @property {google.cloud.aiplatform.v1beta1.GenerationConfig.IModelConfig|null} [modelConfig] GenerationConfig modelConfig + * @property {google.cloud.aiplatform.v1beta1.IImageConfig|null} [imageConfig] GenerationConfig imageConfig */ /** @@ -385053,6 +391910,14 @@ */ GenerationConfig.prototype.modelConfig = null; + /** + * GenerationConfig imageConfig. + * @member {google.cloud.aiplatform.v1beta1.IImageConfig|null|undefined} imageConfig + * @memberof google.cloud.aiplatform.v1beta1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.imageConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -385152,6 +392017,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_imageConfig", { + get: $util.oneOfGetter($oneOfFields = ["imageConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new GenerationConfig instance using the specified properties. * @function create @@ -385223,6 +392094,8 @@ $root.google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig.encode(message.modelConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); if (message.responseJsonSchema != null && Object.hasOwnProperty.call(message, "responseJsonSchema")) $root.google.protobuf.Value.encode(message.responseJsonSchema, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.imageConfig != null && Object.hasOwnProperty.call(message, "imageConfig")) + $root.google.cloud.aiplatform.v1beta1.ImageConfig.encode(message.imageConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; @@ -385352,6 +392225,10 @@ message.modelConfig = $root.google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig.decode(reader, reader.uint32()); break; } + case 30: { + message.imageConfig = $root.google.cloud.aiplatform.v1beta1.ImageConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -385521,6 +392398,14 @@ if (error) return "modelConfig." + error; } + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + properties._imageConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ImageConfig.verify(message.imageConfig); + if (error) + return "imageConfig." + error; + } + } return null; }; @@ -385650,6 +392535,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.GenerationConfig.modelConfig: object expected"); message.modelConfig = $root.google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig.fromObject(object.modelConfig); } + if (object.imageConfig != null) { + if (typeof object.imageConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.GenerationConfig.imageConfig: object expected"); + message.imageConfig = $root.google.cloud.aiplatform.v1beta1.ImageConfig.fromObject(object.imageConfig); + } return message; }; @@ -385771,6 +392661,11 @@ if (options.oneofs) object._responseJsonSchema = "responseJsonSchema"; } + if (message.imageConfig != null && message.hasOwnProperty("imageConfig")) { + object.imageConfig = $root.google.cloud.aiplatform.v1beta1.ImageConfig.toObject(message.imageConfig, options); + if (options.oneofs) + object._imageConfig = "imageConfig"; + } return object; }; @@ -396409,6 +403304,7 @@ * @memberof google.cloud.aiplatform.v1beta1.Tool * @interface IComputerUse * @property {google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment|null} [environment] ComputerUse environment + * @property {Array.|null} [excludedPredefinedFunctions] ComputerUse excludedPredefinedFunctions */ /** @@ -396420,6 +403316,7 @@ * @param {google.cloud.aiplatform.v1beta1.Tool.IComputerUse=} [properties] Properties to set */ function ComputerUse(properties) { + this.excludedPredefinedFunctions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -396434,6 +403331,14 @@ */ ComputerUse.prototype.environment = 0; + /** + * ComputerUse excludedPredefinedFunctions. + * @member {Array.} excludedPredefinedFunctions + * @memberof google.cloud.aiplatform.v1beta1.Tool.ComputerUse + * @instance + */ + ComputerUse.prototype.excludedPredefinedFunctions = $util.emptyArray; + /** * Creates a new ComputerUse instance using the specified properties. * @function create @@ -396460,6 +403365,9 @@ writer = $Writer.create(); if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.environment); + if (message.excludedPredefinedFunctions != null && message.excludedPredefinedFunctions.length) + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludedPredefinedFunctions[i]); return writer; }; @@ -396500,6 +403408,12 @@ message.environment = reader.int32(); break; } + case 2: { + if (!(message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length)) + message.excludedPredefinedFunctions = []; + message.excludedPredefinedFunctions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -396543,6 +403457,13 @@ case 1: break; } + if (message.excludedPredefinedFunctions != null && message.hasOwnProperty("excludedPredefinedFunctions")) { + if (!Array.isArray(message.excludedPredefinedFunctions)) + return "excludedPredefinedFunctions: array expected"; + for (var i = 0; i < message.excludedPredefinedFunctions.length; ++i) + if (!$util.isString(message.excludedPredefinedFunctions[i])) + return "excludedPredefinedFunctions: string[] expected"; + } return null; }; @@ -396574,6 +403495,13 @@ message.environment = 1; break; } + if (object.excludedPredefinedFunctions) { + if (!Array.isArray(object.excludedPredefinedFunctions)) + throw TypeError(".google.cloud.aiplatform.v1beta1.Tool.ComputerUse.excludedPredefinedFunctions: array expected"); + message.excludedPredefinedFunctions = []; + for (var i = 0; i < object.excludedPredefinedFunctions.length; ++i) + message.excludedPredefinedFunctions[i] = String(object.excludedPredefinedFunctions[i]); + } return message; }; @@ -396590,10 +403518,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.excludedPredefinedFunctions = []; if (options.defaults) object.environment = options.enums === String ? "ENVIRONMENT_UNSPECIFIED" : 0; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment[message.environment] === undefined ? message.environment : $root.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Environment[message.environment] : message.environment; + if (message.excludedPredefinedFunctions && message.excludedPredefinedFunctions.length) { + object.excludedPredefinedFunctions = []; + for (var j = 0; j < message.excludedPredefinedFunctions.length; ++j) + object.excludedPredefinedFunctions[j] = message.excludedPredefinedFunctions[j]; + } return object; }; @@ -398032,6 +404967,783 @@ return FunctionCall; })(); + v1beta1.FunctionResponsePart = (function() { + + /** + * Properties of a FunctionResponsePart. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFunctionResponsePart + * @property {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob|null} [inlineData] FunctionResponsePart inlineData + * @property {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData|null} [fileData] FunctionResponsePart fileData + */ + + /** + * Constructs a new FunctionResponsePart. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FunctionResponsePart. + * @implements IFunctionResponsePart + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponsePart=} [properties] Properties to set + */ + function FunctionResponsePart(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]]; + } + + /** + * FunctionResponsePart inlineData. + * @member {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob|null|undefined} inlineData + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @instance + */ + FunctionResponsePart.prototype.inlineData = null; + + /** + * FunctionResponsePart fileData. + * @member {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData|null|undefined} fileData + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @instance + */ + FunctionResponsePart.prototype.fileData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunctionResponsePart data. + * @member {"inlineData"|"fileData"|undefined} data + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @instance + */ + Object.defineProperty(FunctionResponsePart.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["inlineData", "fileData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunctionResponsePart instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponsePart=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponsePart} FunctionResponsePart instance + */ + FunctionResponsePart.create = function create(properties) { + return new FunctionResponsePart(properties); + }; + + /** + * Encodes the specified FunctionResponsePart message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponsePart.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineData != null && Object.hasOwnProperty.call(message, "inlineData")) + $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.encode(message.inlineData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fileData != null && Object.hasOwnProperty.call(message, "fileData")) + $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.encode(message.fileData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunctionResponsePart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponsePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponsePart} message FunctionResponsePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponsePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.decode(reader, reader.uint32()); + break; + } + case 2: { + message.fileData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponsePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponsePart} FunctionResponsePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponsePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponsePart message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponsePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + properties.data = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.verify(message.inlineData); + if (error) + return "inlineData." + error; + } + } + if (message.fileData != null && message.hasOwnProperty("fileData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.verify(message.fileData); + if (error) + return "fileData." + error; + } + } + return null; + }; + + /** + * Creates a FunctionResponsePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponsePart} FunctionResponsePart + */ + FunctionResponsePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart(); + if (object.inlineData != null) { + if (typeof object.inlineData !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionResponsePart.inlineData: object expected"); + message.inlineData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.fromObject(object.inlineData); + } + if (object.fileData != null) { + if (typeof object.fileData !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionResponsePart.fileData: object expected"); + message.fileData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.fromObject(object.fileData); + } + return message; + }; + + /** + * Creates a plain object from a FunctionResponsePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {google.cloud.aiplatform.v1beta1.FunctionResponsePart} message FunctionResponsePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponsePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineData != null && message.hasOwnProperty("inlineData")) { + object.inlineData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob.toObject(message.inlineData, options); + if (options.oneofs) + object.data = "inlineData"; + } + if (message.fileData != null && message.hasOwnProperty("fileData")) { + object.fileData = $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData.toObject(message.fileData, options); + if (options.oneofs) + object.data = "fileData"; + } + return object; + }; + + /** + * Converts this FunctionResponsePart to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @instance + * @returns {Object.} JSON object + */ + FunctionResponsePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponsePart + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponsePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponsePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FunctionResponsePart"; + }; + + return FunctionResponsePart; + })(); + + v1beta1.FunctionResponseBlob = (function() { + + /** + * Properties of a FunctionResponseBlob. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFunctionResponseBlob + * @property {string|null} [mimeType] FunctionResponseBlob mimeType + * @property {Uint8Array|null} [data] FunctionResponseBlob data + * @property {string|null} [displayName] FunctionResponseBlob displayName + */ + + /** + * Constructs a new FunctionResponseBlob. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FunctionResponseBlob. + * @implements IFunctionResponseBlob + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob=} [properties] Properties to set + */ + function FunctionResponseBlob(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]]; + } + + /** + * FunctionResponseBlob mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.mimeType = ""; + + /** + * FunctionResponseBlob data. + * @member {Uint8Array} data + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.data = $util.newBuffer([]); + + /** + * FunctionResponseBlob displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @instance + */ + FunctionResponseBlob.prototype.displayName = ""; + + /** + * Creates a new FunctionResponseBlob instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseBlob} FunctionResponseBlob instance + */ + FunctionResponseBlob.create = function create(properties) { + return new FunctionResponseBlob(properties); + }; + + /** + * Encodes the specified FunctionResponseBlob message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseBlob.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FunctionResponseBlob message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseBlob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseBlob} message FunctionResponseBlob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseBlob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponseBlob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseBlob} FunctionResponseBlob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseBlob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponseBlob message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponseBlob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a FunctionResponseBlob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseBlob} FunctionResponseBlob + */ + FunctionResponseBlob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponseBlob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a FunctionResponseBlob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {google.cloud.aiplatform.v1beta1.FunctionResponseBlob} message FunctionResponseBlob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponseBlob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.displayName = ""; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FunctionResponseBlob to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @instance + * @returns {Object.} JSON object + */ + FunctionResponseBlob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponseBlob + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseBlob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponseBlob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FunctionResponseBlob"; + }; + + return FunctionResponseBlob; + })(); + + v1beta1.FunctionResponseFileData = (function() { + + /** + * Properties of a FunctionResponseFileData. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFunctionResponseFileData + * @property {string|null} [mimeType] FunctionResponseFileData mimeType + * @property {string|null} [fileUri] FunctionResponseFileData fileUri + * @property {string|null} [displayName] FunctionResponseFileData displayName + */ + + /** + * Constructs a new FunctionResponseFileData. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FunctionResponseFileData. + * @implements IFunctionResponseFileData + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData=} [properties] Properties to set + */ + function FunctionResponseFileData(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]]; + } + + /** + * FunctionResponseFileData mimeType. + * @member {string} mimeType + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.mimeType = ""; + + /** + * FunctionResponseFileData fileUri. + * @member {string} fileUri + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.fileUri = ""; + + /** + * FunctionResponseFileData displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @instance + */ + FunctionResponseFileData.prototype.displayName = ""; + + /** + * Creates a new FunctionResponseFileData instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseFileData} FunctionResponseFileData instance + */ + FunctionResponseFileData.create = function create(properties) { + return new FunctionResponseFileData(properties); + }; + + /** + * Encodes the specified FunctionResponseFileData message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseFileData.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData} message FunctionResponseFileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseFileData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.fileUri != null && Object.hasOwnProperty.call(message, "fileUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileUri); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FunctionResponseFileData message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionResponseFileData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionResponseFileData} message FunctionResponseFileData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionResponseFileData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseFileData} FunctionResponseFileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseFileData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.fileUri = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionResponseFileData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseFileData} FunctionResponseFileData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionResponseFileData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionResponseFileData message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionResponseFileData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + if (!$util.isString(message.fileUri)) + return "fileUri: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a FunctionResponseFileData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FunctionResponseFileData} FunctionResponseFileData + */ + FunctionResponseFileData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FunctionResponseFileData(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.fileUri != null) + message.fileUri = String(object.fileUri); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a FunctionResponseFileData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {google.cloud.aiplatform.v1beta1.FunctionResponseFileData} message FunctionResponseFileData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionResponseFileData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + object.fileUri = ""; + object.displayName = ""; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + object.fileUri = message.fileUri; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FunctionResponseFileData to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @instance + * @returns {Object.} JSON object + */ + FunctionResponseFileData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionResponseFileData + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponseFileData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionResponseFileData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FunctionResponseFileData"; + }; + + return FunctionResponseFileData; + })(); + v1beta1.FunctionResponse = (function() { /** @@ -398041,6 +405753,7 @@ * @property {string|null} [id] FunctionResponse id * @property {string|null} [name] FunctionResponse name * @property {google.protobuf.IStruct|null} [response] FunctionResponse response + * @property {Array.|null} [parts] FunctionResponse parts */ /** @@ -398052,6 +405765,7 @@ * @param {google.cloud.aiplatform.v1beta1.IFunctionResponse=} [properties] Properties to set */ function FunctionResponse(properties) { + this.parts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -398082,6 +405796,14 @@ */ FunctionResponse.prototype.response = null; + /** + * FunctionResponse parts. + * @member {Array.} parts + * @memberof google.cloud.aiplatform.v1beta1.FunctionResponse + * @instance + */ + FunctionResponse.prototype.parts = $util.emptyArray; + /** * Creates a new FunctionResponse instance using the specified properties. * @function create @@ -398112,6 +405834,9 @@ $root.google.protobuf.Struct.encode(message.response, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart.encode(message.parts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -398160,6 +405885,12 @@ message.response = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 4: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.aiplatform.v1beta1.FunctionResponsePart.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -398206,6 +405937,15 @@ if (error) return "response." + error; } + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart.verify(message.parts[i]); + if (error) + return "parts." + error; + } + } return null; }; @@ -398230,6 +405970,16 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionResponse.response: object expected"); message.response = $root.google.protobuf.Struct.fromObject(object.response); } + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionResponse.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) { + if (typeof object.parts[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionResponse.parts: object expected"); + message.parts[i] = $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart.fromObject(object.parts[i]); + } + } return message; }; @@ -398246,6 +405996,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.parts = []; if (options.defaults) { object.name = ""; object.response = null; @@ -398257,6 +406009,11 @@ object.response = $root.google.protobuf.Struct.toObject(message.response, options); if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.aiplatform.v1beta1.FunctionResponsePart.toObject(message.parts[j], options); + } return object; }; @@ -445630,6 +453387,8 @@ * @property {number} STARTING_MODEL_SERVER=3 STARTING_MODEL_SERVER value * @property {number} FINISHING_UP=4 FINISHING_UP value * @property {number} DEPLOYMENT_TERMINATED=10 DEPLOYMENT_TERMINATED value + * @property {number} SUCCESSFULLY_DEPLOYED=11 SUCCESSFULLY_DEPLOYED value + * @property {number} FAILED_TO_DEPLOY=12 FAILED_TO_DEPLOY value */ v1beta1.DeploymentStage = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -445642,6 +453401,8 @@ values[valuesById[3] = "STARTING_MODEL_SERVER"] = 3; values[valuesById[4] = "FINISHING_UP"] = 4; values[valuesById[10] = "DEPLOYMENT_TERMINATED"] = 10; + values[valuesById[11] = "SUCCESSFULLY_DEPLOYED"] = 11; + values[valuesById[12] = "FAILED_TO_DEPLOY"] = 12; return values; })(); @@ -446466,6 +454227,8 @@ case 3: case 4: case 10: + case 11: + case 12: break; } return null; @@ -446531,6 +454294,14 @@ case 10: message.deploymentStage = 10; break; + case "SUCCESSFULLY_DEPLOYED": + case 11: + message.deploymentStage = 11; + break; + case "FAILED_TO_DEPLOY": + case 12: + message.deploymentStage = 12; + break; } return message; }; @@ -448879,6 +456650,8 @@ case 3: case 4: case 10: + case 11: + case 12: break; } return null; @@ -448944,6 +456717,14 @@ case 10: message.deploymentStage = 10; break; + case "SUCCESSFULLY_DEPLOYED": + case 11: + message.deploymentStage = 11; + break; + case "FAILED_TO_DEPLOY": + case 12: + message.deploymentStage = 12; + break; } return message; }; @@ -517000,9 +524781,9 @@ if (message.autoScaling != null && Object.hasOwnProperty.call(message, "autoScaling")) $root.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Bigtable.AutoScaling.encode(message.autoScaling, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.enableDirectBigtableAccess != null && Object.hasOwnProperty.call(message, "enableDirectBigtableAccess")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableDirectBigtableAccess); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableDirectBigtableAccess); if (message.bigtableMetadata != null && Object.hasOwnProperty.call(message, "bigtableMetadata")) - $root.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Bigtable.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Bigtable.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -517043,11 +524824,11 @@ message.autoScaling = $root.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Bigtable.AutoScaling.decode(reader, reader.uint32()); break; } - case 2: { + case 3: { message.enableDirectBigtableAccess = reader.bool(); break; } - case 3: { + case 4: { message.bigtableMetadata = $root.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.Bigtable.BigtableMetadata.decode(reader, reader.uint32()); break; } @@ -524018,7 +531799,7 @@ if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); if (message.bigtableMetadata != null && Object.hasOwnProperty.call(message, "bigtableMetadata")) - $root.google.cloud.aiplatform.v1beta1.FeatureView.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.cloud.aiplatform.v1beta1.FeatureView.BigtableMetadata.encode(message.bigtableMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); return writer; }; @@ -524138,7 +531919,7 @@ message.satisfiesPzi = reader.bool(); break; } - case 21: { + case 22: { message.bigtableMetadata = $root.google.cloud.aiplatform.v1beta1.FeatureView.BigtableMetadata.decode(reader, reader.uint32()); break; } @@ -711592,6 +719373,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.PredictionService|embedContent}. + * @memberof google.cloud.aiplatform.v1beta1.PredictionService + * @typedef EmbedContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse} [response] EmbedContentResponse + */ + + /** + * Calls EmbedContent. + * @function embedContent + * @memberof google.cloud.aiplatform.v1beta1.PredictionService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest} request EmbedContentRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.PredictionService.EmbedContentCallback} callback Node-style callback called with the error, if any, and EmbedContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PredictionService.prototype.embedContent = function embedContent(request, callback) { + return this.rpcCall(embedContent, $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest, $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse, request, callback); + }, "name", { value: "EmbedContent" }); + + /** + * Calls EmbedContent. + * @function embedContent + * @memberof google.cloud.aiplatform.v1beta1.PredictionService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest} request EmbedContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return PredictionService; })(); @@ -720090,12 +727904,1537 @@ return GenerateVideoResponse; })(); + v1beta1.EmbedContentRequest = (function() { + + /** + * Properties of an EmbedContentRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEmbedContentRequest + * @property {string|null} [model] EmbedContentRequest model + * @property {google.cloud.aiplatform.v1beta1.IContent|null} [content] EmbedContentRequest content + * @property {string|null} [title] EmbedContentRequest title + * @property {google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|null} [taskType] EmbedContentRequest taskType + * @property {number|null} [outputDimensionality] EmbedContentRequest outputDimensionality + * @property {boolean|null} [autoTruncate] EmbedContentRequest autoTruncate + */ + + /** + * Constructs a new EmbedContentRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EmbedContentRequest. + * @implements IEmbedContentRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest=} [properties] Properties to set + */ + function EmbedContentRequest(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]]; + } + + /** + * EmbedContentRequest model. + * @member {string|null|undefined} model + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.model = null; + + /** + * EmbedContentRequest content. + * @member {google.cloud.aiplatform.v1beta1.IContent|null|undefined} content + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.content = null; + + /** + * EmbedContentRequest title. + * @member {string|null|undefined} title + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.title = null; + + /** + * EmbedContentRequest taskType. + * @member {google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType|null|undefined} taskType + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.taskType = null; + + /** + * EmbedContentRequest outputDimensionality. + * @member {number|null|undefined} outputDimensionality + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.outputDimensionality = null; + + /** + * EmbedContentRequest autoTruncate. + * @member {boolean|null|undefined} autoTruncate + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + */ + EmbedContentRequest.prototype.autoTruncate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_model", { + get: $util.oneOfGetter($oneOfFields = ["model"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_content", { + get: $util.oneOfGetter($oneOfFields = ["content"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_taskType", { + get: $util.oneOfGetter($oneOfFields = ["taskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_outputDimensionality", { + get: $util.oneOfGetter($oneOfFields = ["outputDimensionality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbedContentRequest.prototype, "_autoTruncate", { + get: $util.oneOfGetter($oneOfFields = ["autoTruncate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbedContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentRequest} EmbedContentRequest instance + */ + EmbedContentRequest.create = function create(properties) { + return new EmbedContentRequest(properties); + }; + + /** + * Encodes the specified EmbedContentRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest} message EmbedContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.aiplatform.v1beta1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + if (message.taskType != null && Object.hasOwnProperty.call(message, "taskType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.taskType); + if (message.outputDimensionality != null && Object.hasOwnProperty.call(message, "outputDimensionality")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.outputDimensionality); + if (message.autoTruncate != null && Object.hasOwnProperty.call(message, "autoTruncate")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.autoTruncate); + return writer; + }; + + /** + * Encodes the specified EmbedContentRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentRequest} message EmbedContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentRequest} EmbedContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.content = $root.google.cloud.aiplatform.v1beta1.Content.decode(reader, reader.uint32()); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.taskType = reader.int32(); + break; + } + case 6: { + message.outputDimensionality = reader.int32(); + break; + } + case 7: { + message.autoTruncate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentRequest} EmbedContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedContentRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) { + properties._model = 1; + if (!$util.isString(message.model)) + return "model: string expected"; + } + if (message.content != null && message.hasOwnProperty("content")) { + properties._content = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.Content.verify(message.content); + if (error) + return "content." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.taskType != null && message.hasOwnProperty("taskType")) { + properties._taskType = 1; + switch (message.taskType) { + default: + return "taskType: enum value expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.outputDimensionality != null && message.hasOwnProperty("outputDimensionality")) { + properties._outputDimensionality = 1; + if (!$util.isInteger(message.outputDimensionality)) + return "outputDimensionality: integer expected"; + } + if (message.autoTruncate != null && message.hasOwnProperty("autoTruncate")) { + properties._autoTruncate = 1; + if (typeof message.autoTruncate !== "boolean") + return "autoTruncate: boolean expected"; + } + return null; + }; + + /** + * Creates an EmbedContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentRequest} EmbedContentRequest + */ + EmbedContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EmbedContentRequest.content: object expected"); + message.content = $root.google.cloud.aiplatform.v1beta1.Content.fromObject(object.content); + } + if (object.title != null) + message.title = String(object.title); + switch (object.taskType) { + default: + if (typeof object.taskType === "number") { + message.taskType = object.taskType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.taskType = 0; + break; + case "RETRIEVAL_QUERY": + case 2: + message.taskType = 2; + break; + case "RETRIEVAL_DOCUMENT": + case 3: + message.taskType = 3; + break; + case "SEMANTIC_SIMILARITY": + case 4: + message.taskType = 4; + break; + case "CLASSIFICATION": + case 5: + message.taskType = 5; + break; + case "CLUSTERING": + case 6: + message.taskType = 6; + break; + case "QUESTION_ANSWERING": + case 7: + message.taskType = 7; + break; + case "FACT_VERIFICATION": + case 8: + message.taskType = 8; + break; + case "CODE_RETRIEVAL_QUERY": + case 9: + message.taskType = 9; + break; + } + if (object.outputDimensionality != null) + message.outputDimensionality = object.outputDimensionality | 0; + if (object.autoTruncate != null) + message.autoTruncate = Boolean(object.autoTruncate); + return message; + }; + + /** + * Creates a plain object from an EmbedContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentRequest} message EmbedContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.model != null && message.hasOwnProperty("model")) { + object.model = message.model; + if (options.oneofs) + object._model = "model"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = $root.google.cloud.aiplatform.v1beta1.Content.toObject(message.content, options); + if (options.oneofs) + object._content = "content"; + } + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.taskType != null && message.hasOwnProperty("taskType")) { + object.taskType = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType[message.taskType] === undefined ? message.taskType : $root.google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType[message.taskType] : message.taskType; + if (options.oneofs) + object._taskType = "taskType"; + } + if (message.outputDimensionality != null && message.hasOwnProperty("outputDimensionality")) { + object.outputDimensionality = message.outputDimensionality; + if (options.oneofs) + object._outputDimensionality = "outputDimensionality"; + } + if (message.autoTruncate != null && message.hasOwnProperty("autoTruncate")) { + object.autoTruncate = message.autoTruncate; + if (options.oneofs) + object._autoTruncate = "autoTruncate"; + } + return object; + }; + + /** + * Converts this EmbedContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @instance + * @returns {Object.} JSON object + */ + EmbedContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedContentRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EmbedContentRequest"; + }; + + /** + * EmbeddingTaskType enum. + * @name google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} RETRIEVAL_QUERY=2 RETRIEVAL_QUERY value + * @property {number} RETRIEVAL_DOCUMENT=3 RETRIEVAL_DOCUMENT value + * @property {number} SEMANTIC_SIMILARITY=4 SEMANTIC_SIMILARITY value + * @property {number} CLASSIFICATION=5 CLASSIFICATION value + * @property {number} CLUSTERING=6 CLUSTERING value + * @property {number} QUESTION_ANSWERING=7 QUESTION_ANSWERING value + * @property {number} FACT_VERIFICATION=8 FACT_VERIFICATION value + * @property {number} CODE_RETRIEVAL_QUERY=9 CODE_RETRIEVAL_QUERY value + */ + EmbedContentRequest.EmbeddingTaskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[2] = "RETRIEVAL_QUERY"] = 2; + values[valuesById[3] = "RETRIEVAL_DOCUMENT"] = 3; + values[valuesById[4] = "SEMANTIC_SIMILARITY"] = 4; + values[valuesById[5] = "CLASSIFICATION"] = 5; + values[valuesById[6] = "CLUSTERING"] = 6; + values[valuesById[7] = "QUESTION_ANSWERING"] = 7; + values[valuesById[8] = "FACT_VERIFICATION"] = 8; + values[valuesById[9] = "CODE_RETRIEVAL_QUERY"] = 9; + return values; + })(); + + return EmbedContentRequest; + })(); + + v1beta1.EmbedContentResponse = (function() { + + /** + * Properties of an EmbedContentResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEmbedContentResponse + * @property {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding|null} [embedding] EmbedContentResponse embedding + * @property {google.cloud.aiplatform.v1beta1.IUsageMetadata|null} [usageMetadata] EmbedContentResponse usageMetadata + * @property {boolean|null} [truncated] EmbedContentResponse truncated + */ + + /** + * Constructs a new EmbedContentResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EmbedContentResponse. + * @implements IEmbedContentResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentResponse=} [properties] Properties to set + */ + function EmbedContentResponse(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]]; + } + + /** + * EmbedContentResponse embedding. + * @member {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding|null|undefined} embedding + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.embedding = null; + + /** + * EmbedContentResponse usageMetadata. + * @member {google.cloud.aiplatform.v1beta1.IUsageMetadata|null|undefined} usageMetadata + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.usageMetadata = null; + + /** + * EmbedContentResponse truncated. + * @member {boolean} truncated + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @instance + */ + EmbedContentResponse.prototype.truncated = false; + + /** + * Creates a new EmbedContentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse} EmbedContentResponse instance + */ + EmbedContentResponse.create = function create(properties) { + return new EmbedContentResponse(properties); + }; + + /** + * Encodes the specified EmbedContentResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentResponse} message EmbedContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.embedding != null && Object.hasOwnProperty.call(message, "embedding")) + $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.encode(message.embedding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.usageMetadata != null && Object.hasOwnProperty.call(message, "usageMetadata")) + $root.google.cloud.aiplatform.v1beta1.UsageMetadata.encode(message.usageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.truncated); + return writer; + }; + + /** + * Encodes the specified EmbedContentResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEmbedContentResponse} message EmbedContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse} EmbedContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.embedding = $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.usageMetadata = $root.google.cloud.aiplatform.v1beta1.UsageMetadata.decode(reader, reader.uint32()); + break; + } + case 4: { + message.truncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse} EmbedContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedContentResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedContentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.embedding != null && message.hasOwnProperty("embedding")) { + var error = $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.verify(message.embedding); + if (error) + return "embedding." + error; + } + if (message.usageMetadata != null && message.hasOwnProperty("usageMetadata")) { + var error = $root.google.cloud.aiplatform.v1beta1.UsageMetadata.verify(message.usageMetadata); + if (error) + return "usageMetadata." + error; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; + + /** + * Creates an EmbedContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse} EmbedContentResponse + */ + EmbedContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse(); + if (object.embedding != null) { + if (typeof object.embedding !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EmbedContentResponse.embedding: object expected"); + message.embedding = $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.fromObject(object.embedding); + } + if (object.usageMetadata != null) { + if (typeof object.usageMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EmbedContentResponse.usageMetadata: object expected"); + message.usageMetadata = $root.google.cloud.aiplatform.v1beta1.UsageMetadata.fromObject(object.usageMetadata); + } + if (object.truncated != null) + message.truncated = Boolean(object.truncated); + return message; + }; + + /** + * Creates a plain object from an EmbedContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse} message EmbedContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.embedding = null; + object.usageMetadata = null; + object.truncated = false; + } + if (message.embedding != null && message.hasOwnProperty("embedding")) + object.embedding = $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.toObject(message.embedding, options); + if (message.usageMetadata != null && message.hasOwnProperty("usageMetadata")) + object.usageMetadata = $root.google.cloud.aiplatform.v1beta1.UsageMetadata.toObject(message.usageMetadata, options); + if (message.truncated != null && message.hasOwnProperty("truncated")) + object.truncated = message.truncated; + return object; + }; + + /** + * Converts this EmbedContentResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @instance + * @returns {Object.} JSON object + */ + EmbedContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedContentResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EmbedContentResponse"; + }; + + EmbedContentResponse.Embedding = (function() { + + /** + * Properties of an Embedding. + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @interface IEmbedding + * @property {Array.|null} [values] Embedding values + */ + + /** + * Constructs a new Embedding. + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse + * @classdesc Represents an Embedding. + * @implements IEmbedding + * @constructor + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding=} [properties] Properties to set + */ + function Embedding(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]]; + } + + /** + * Embedding values. + * @member {Array.} values + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @instance + */ + Embedding.prototype.values = $util.emptyArray; + + /** + * Creates a new Embedding instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding} Embedding instance + */ + Embedding.create = function create(properties) { + return new Embedding(properties); + }; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.values.length; ++i) + writer.float(message.values[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.values.push(reader.float()); + } else + message.values.push(reader.float()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Embedding message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Embedding.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) + if (typeof message.values[i] !== "number") + return "values: number[] expected"; + } + return null; + }; + + /** + * Creates an Embedding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding} Embedding + */ + Embedding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = Number(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding} message Embedding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Embedding.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] = options.json && !isFinite(message.values[j]) ? String(message.values[j]) : message.values[j]; + } + return object; + }; + + /** + * Converts this Embedding to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @instance + * @returns {Object.} JSON object + */ + Embedding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Embedding + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Embedding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EmbedContentResponse.Embedding"; + }; + + return Embedding; + })(); + + return EmbedContentResponse; + })(); + + v1beta1.UsageMetadata = (function() { + + /** + * Properties of a UsageMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IUsageMetadata + * @property {number|null} [promptTokenCount] UsageMetadata promptTokenCount + * @property {number|null} [candidatesTokenCount] UsageMetadata candidatesTokenCount + * @property {number|null} [totalTokenCount] UsageMetadata totalTokenCount + * @property {number|null} [toolUsePromptTokenCount] UsageMetadata toolUsePromptTokenCount + * @property {number|null} [thoughtsTokenCount] UsageMetadata thoughtsTokenCount + * @property {number|null} [cachedContentTokenCount] UsageMetadata cachedContentTokenCount + * @property {Array.|null} [promptTokensDetails] UsageMetadata promptTokensDetails + * @property {Array.|null} [cacheTokensDetails] UsageMetadata cacheTokensDetails + * @property {Array.|null} [candidatesTokensDetails] UsageMetadata candidatesTokensDetails + * @property {Array.|null} [toolUsePromptTokensDetails] UsageMetadata toolUsePromptTokensDetails + * @property {google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType|null} [trafficType] UsageMetadata trafficType + */ + + /** + * Constructs a new UsageMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a UsageMetadata. + * @implements IUsageMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IUsageMetadata=} [properties] Properties to set + */ + function UsageMetadata(properties) { + this.promptTokensDetails = []; + this.cacheTokensDetails = []; + this.candidatesTokensDetails = []; + this.toolUsePromptTokensDetails = []; + 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]]; + } + + /** + * UsageMetadata promptTokenCount. + * @member {number} promptTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.promptTokenCount = 0; + + /** + * UsageMetadata candidatesTokenCount. + * @member {number} candidatesTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.candidatesTokenCount = 0; + + /** + * UsageMetadata totalTokenCount. + * @member {number} totalTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.totalTokenCount = 0; + + /** + * UsageMetadata toolUsePromptTokenCount. + * @member {number} toolUsePromptTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.toolUsePromptTokenCount = 0; + + /** + * UsageMetadata thoughtsTokenCount. + * @member {number} thoughtsTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.thoughtsTokenCount = 0; + + /** + * UsageMetadata cachedContentTokenCount. + * @member {number} cachedContentTokenCount + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.cachedContentTokenCount = 0; + + /** + * UsageMetadata promptTokensDetails. + * @member {Array.} promptTokensDetails + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.promptTokensDetails = $util.emptyArray; + + /** + * UsageMetadata cacheTokensDetails. + * @member {Array.} cacheTokensDetails + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.cacheTokensDetails = $util.emptyArray; + + /** + * UsageMetadata candidatesTokensDetails. + * @member {Array.} candidatesTokensDetails + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.candidatesTokensDetails = $util.emptyArray; + + /** + * UsageMetadata toolUsePromptTokensDetails. + * @member {Array.} toolUsePromptTokensDetails + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.toolUsePromptTokensDetails = $util.emptyArray; + + /** + * UsageMetadata trafficType. + * @member {google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType} trafficType + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + */ + UsageMetadata.prototype.trafficType = 0; + + /** + * Creates a new UsageMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IUsageMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.UsageMetadata} UsageMetadata instance + */ + UsageMetadata.create = function create(properties) { + return new UsageMetadata(properties); + }; + + /** + * Encodes the specified UsageMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UsageMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IUsageMetadata} message UsageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.promptTokenCount != null && Object.hasOwnProperty.call(message, "promptTokenCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.promptTokenCount); + if (message.candidatesTokenCount != null && Object.hasOwnProperty.call(message, "candidatesTokenCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.candidatesTokenCount); + if (message.totalTokenCount != null && Object.hasOwnProperty.call(message, "totalTokenCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalTokenCount); + if (message.cachedContentTokenCount != null && Object.hasOwnProperty.call(message, "cachedContentTokenCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.cachedContentTokenCount); + if (message.trafficType != null && Object.hasOwnProperty.call(message, "trafficType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.trafficType); + if (message.promptTokensDetails != null && message.promptTokensDetails.length) + for (var i = 0; i < message.promptTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.encode(message.promptTokensDetails[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cacheTokensDetails != null && message.cacheTokensDetails.length) + for (var i = 0; i < message.cacheTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.encode(message.cacheTokensDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.candidatesTokensDetails != null && message.candidatesTokensDetails.length) + for (var i = 0; i < message.candidatesTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.encode(message.candidatesTokensDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.toolUsePromptTokensDetails != null && message.toolUsePromptTokensDetails.length) + for (var i = 0; i < message.toolUsePromptTokensDetails.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.encode(message.toolUsePromptTokensDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.toolUsePromptTokenCount != null && Object.hasOwnProperty.call(message, "toolUsePromptTokenCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.toolUsePromptTokenCount); + if (message.thoughtsTokenCount != null && Object.hasOwnProperty.call(message, "thoughtsTokenCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.thoughtsTokenCount); + return writer; + }; + + /** + * Encodes the specified UsageMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UsageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IUsageMetadata} message UsageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.UsageMetadata} UsageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.UsageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.promptTokenCount = reader.int32(); + break; + } + case 2: { + message.candidatesTokenCount = reader.int32(); + break; + } + case 3: { + message.totalTokenCount = reader.int32(); + break; + } + case 13: { + message.toolUsePromptTokenCount = reader.int32(); + break; + } + case 14: { + message.thoughtsTokenCount = reader.int32(); + break; + } + case 5: { + message.cachedContentTokenCount = reader.int32(); + break; + } + case 9: { + if (!(message.promptTokensDetails && message.promptTokensDetails.length)) + message.promptTokensDetails = []; + message.promptTokensDetails.push($root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.cacheTokensDetails && message.cacheTokensDetails.length)) + message.cacheTokensDetails = []; + message.cacheTokensDetails.push($root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.candidatesTokensDetails && message.candidatesTokensDetails.length)) + message.candidatesTokensDetails = []; + message.candidatesTokensDetails.push($root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 12: { + if (!(message.toolUsePromptTokensDetails && message.toolUsePromptTokensDetails.length)) + message.toolUsePromptTokensDetails = []; + message.toolUsePromptTokensDetails.push($root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.decode(reader, reader.uint32())); + break; + } + case 8: { + message.trafficType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.UsageMetadata} UsageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsageMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.promptTokenCount != null && message.hasOwnProperty("promptTokenCount")) + if (!$util.isInteger(message.promptTokenCount)) + return "promptTokenCount: integer expected"; + if (message.candidatesTokenCount != null && message.hasOwnProperty("candidatesTokenCount")) + if (!$util.isInteger(message.candidatesTokenCount)) + return "candidatesTokenCount: integer expected"; + if (message.totalTokenCount != null && message.hasOwnProperty("totalTokenCount")) + if (!$util.isInteger(message.totalTokenCount)) + return "totalTokenCount: integer expected"; + if (message.toolUsePromptTokenCount != null && message.hasOwnProperty("toolUsePromptTokenCount")) + if (!$util.isInteger(message.toolUsePromptTokenCount)) + return "toolUsePromptTokenCount: integer expected"; + if (message.thoughtsTokenCount != null && message.hasOwnProperty("thoughtsTokenCount")) + if (!$util.isInteger(message.thoughtsTokenCount)) + return "thoughtsTokenCount: integer expected"; + if (message.cachedContentTokenCount != null && message.hasOwnProperty("cachedContentTokenCount")) + if (!$util.isInteger(message.cachedContentTokenCount)) + return "cachedContentTokenCount: integer expected"; + if (message.promptTokensDetails != null && message.hasOwnProperty("promptTokensDetails")) { + if (!Array.isArray(message.promptTokensDetails)) + return "promptTokensDetails: array expected"; + for (var i = 0; i < message.promptTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.verify(message.promptTokensDetails[i]); + if (error) + return "promptTokensDetails." + error; + } + } + if (message.cacheTokensDetails != null && message.hasOwnProperty("cacheTokensDetails")) { + if (!Array.isArray(message.cacheTokensDetails)) + return "cacheTokensDetails: array expected"; + for (var i = 0; i < message.cacheTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.verify(message.cacheTokensDetails[i]); + if (error) + return "cacheTokensDetails." + error; + } + } + if (message.candidatesTokensDetails != null && message.hasOwnProperty("candidatesTokensDetails")) { + if (!Array.isArray(message.candidatesTokensDetails)) + return "candidatesTokensDetails: array expected"; + for (var i = 0; i < message.candidatesTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.verify(message.candidatesTokensDetails[i]); + if (error) + return "candidatesTokensDetails." + error; + } + } + if (message.toolUsePromptTokensDetails != null && message.hasOwnProperty("toolUsePromptTokensDetails")) { + if (!Array.isArray(message.toolUsePromptTokensDetails)) + return "toolUsePromptTokensDetails: array expected"; + for (var i = 0; i < message.toolUsePromptTokensDetails.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.verify(message.toolUsePromptTokensDetails[i]); + if (error) + return "toolUsePromptTokensDetails." + error; + } + } + if (message.trafficType != null && message.hasOwnProperty("trafficType")) + switch (message.trafficType) { + default: + return "trafficType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a UsageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.UsageMetadata} UsageMetadata + */ + UsageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.UsageMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.UsageMetadata(); + if (object.promptTokenCount != null) + message.promptTokenCount = object.promptTokenCount | 0; + if (object.candidatesTokenCount != null) + message.candidatesTokenCount = object.candidatesTokenCount | 0; + if (object.totalTokenCount != null) + message.totalTokenCount = object.totalTokenCount | 0; + if (object.toolUsePromptTokenCount != null) + message.toolUsePromptTokenCount = object.toolUsePromptTokenCount | 0; + if (object.thoughtsTokenCount != null) + message.thoughtsTokenCount = object.thoughtsTokenCount | 0; + if (object.cachedContentTokenCount != null) + message.cachedContentTokenCount = object.cachedContentTokenCount | 0; + if (object.promptTokensDetails) { + if (!Array.isArray(object.promptTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.promptTokensDetails: array expected"); + message.promptTokensDetails = []; + for (var i = 0; i < object.promptTokensDetails.length; ++i) { + if (typeof object.promptTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.promptTokensDetails: object expected"); + message.promptTokensDetails[i] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.fromObject(object.promptTokensDetails[i]); + } + } + if (object.cacheTokensDetails) { + if (!Array.isArray(object.cacheTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.cacheTokensDetails: array expected"); + message.cacheTokensDetails = []; + for (var i = 0; i < object.cacheTokensDetails.length; ++i) { + if (typeof object.cacheTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.cacheTokensDetails: object expected"); + message.cacheTokensDetails[i] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.fromObject(object.cacheTokensDetails[i]); + } + } + if (object.candidatesTokensDetails) { + if (!Array.isArray(object.candidatesTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.candidatesTokensDetails: array expected"); + message.candidatesTokensDetails = []; + for (var i = 0; i < object.candidatesTokensDetails.length; ++i) { + if (typeof object.candidatesTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.candidatesTokensDetails: object expected"); + message.candidatesTokensDetails[i] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.fromObject(object.candidatesTokensDetails[i]); + } + } + if (object.toolUsePromptTokensDetails) { + if (!Array.isArray(object.toolUsePromptTokensDetails)) + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.toolUsePromptTokensDetails: array expected"); + message.toolUsePromptTokensDetails = []; + for (var i = 0; i < object.toolUsePromptTokensDetails.length; ++i) { + if (typeof object.toolUsePromptTokensDetails[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UsageMetadata.toolUsePromptTokensDetails: object expected"); + message.toolUsePromptTokensDetails[i] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.fromObject(object.toolUsePromptTokensDetails[i]); + } + } + switch (object.trafficType) { + default: + if (typeof object.trafficType === "number") { + message.trafficType = object.trafficType; + break; + } + break; + case "TRAFFIC_TYPE_UNSPECIFIED": + case 0: + message.trafficType = 0; + break; + case "ON_DEMAND": + case 1: + message.trafficType = 1; + break; + case "PROVISIONED_THROUGHPUT": + case 2: + message.trafficType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a UsageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.UsageMetadata} message UsageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsageMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.promptTokensDetails = []; + object.cacheTokensDetails = []; + object.candidatesTokensDetails = []; + object.toolUsePromptTokensDetails = []; + } + if (options.defaults) { + object.promptTokenCount = 0; + object.candidatesTokenCount = 0; + object.totalTokenCount = 0; + object.cachedContentTokenCount = 0; + object.trafficType = options.enums === String ? "TRAFFIC_TYPE_UNSPECIFIED" : 0; + object.toolUsePromptTokenCount = 0; + object.thoughtsTokenCount = 0; + } + if (message.promptTokenCount != null && message.hasOwnProperty("promptTokenCount")) + object.promptTokenCount = message.promptTokenCount; + if (message.candidatesTokenCount != null && message.hasOwnProperty("candidatesTokenCount")) + object.candidatesTokenCount = message.candidatesTokenCount; + if (message.totalTokenCount != null && message.hasOwnProperty("totalTokenCount")) + object.totalTokenCount = message.totalTokenCount; + if (message.cachedContentTokenCount != null && message.hasOwnProperty("cachedContentTokenCount")) + object.cachedContentTokenCount = message.cachedContentTokenCount; + if (message.trafficType != null && message.hasOwnProperty("trafficType")) + object.trafficType = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType[message.trafficType] === undefined ? message.trafficType : $root.google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType[message.trafficType] : message.trafficType; + if (message.promptTokensDetails && message.promptTokensDetails.length) { + object.promptTokensDetails = []; + for (var j = 0; j < message.promptTokensDetails.length; ++j) + object.promptTokensDetails[j] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.toObject(message.promptTokensDetails[j], options); + } + if (message.cacheTokensDetails && message.cacheTokensDetails.length) { + object.cacheTokensDetails = []; + for (var j = 0; j < message.cacheTokensDetails.length; ++j) + object.cacheTokensDetails[j] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.toObject(message.cacheTokensDetails[j], options); + } + if (message.candidatesTokensDetails && message.candidatesTokensDetails.length) { + object.candidatesTokensDetails = []; + for (var j = 0; j < message.candidatesTokensDetails.length; ++j) + object.candidatesTokensDetails[j] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.toObject(message.candidatesTokensDetails[j], options); + } + if (message.toolUsePromptTokensDetails && message.toolUsePromptTokensDetails.length) { + object.toolUsePromptTokensDetails = []; + for (var j = 0; j < message.toolUsePromptTokensDetails.length; ++j) + object.toolUsePromptTokensDetails[j] = $root.google.cloud.aiplatform.v1beta1.ModalityTokenCount.toObject(message.toolUsePromptTokensDetails[j], options); + } + if (message.toolUsePromptTokenCount != null && message.hasOwnProperty("toolUsePromptTokenCount")) + object.toolUsePromptTokenCount = message.toolUsePromptTokenCount; + if (message.thoughtsTokenCount != null && message.hasOwnProperty("thoughtsTokenCount")) + object.thoughtsTokenCount = message.thoughtsTokenCount; + return object; + }; + + /** + * Converts this UsageMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @instance + * @returns {Object.} JSON object + */ + UsageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsageMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.UsageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.UsageMetadata"; + }; + + /** + * TrafficType enum. + * @name google.cloud.aiplatform.v1beta1.UsageMetadata.TrafficType + * @enum {number} + * @property {number} TRAFFIC_TYPE_UNSPECIFIED=0 TRAFFIC_TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} PROVISIONED_THROUGHPUT=2 PROVISIONED_THROUGHPUT value + */ + UsageMetadata.TrafficType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRAFFIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "PROVISIONED_THROUGHPUT"] = 2; + return values; + })(); + + return UsageMetadata; + })(); + v1beta1.ReasoningEngineSpec = (function() { /** * Properties of a ReasoningEngineSpec. * @memberof google.cloud.aiplatform.v1beta1 * @interface IReasoningEngineSpec + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec|null} [sourceCodeSpec] ReasoningEngineSpec sourceCodeSpec * @property {string|null} [serviceAccount] ReasoningEngineSpec serviceAccount * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec|null} [packageSpec] ReasoningEngineSpec packageSpec * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IDeploymentSpec|null} [deploymentSpec] ReasoningEngineSpec deploymentSpec @@ -720119,6 +729458,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ReasoningEngineSpec sourceCodeSpec. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec|null|undefined} sourceCodeSpec + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @instance + */ + ReasoningEngineSpec.prototype.sourceCodeSpec = null; + /** * ReasoningEngineSpec serviceAccount. * @member {string|null|undefined} serviceAccount @@ -720162,6 +729509,17 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; + /** + * ReasoningEngineSpec deploymentSource. + * @member {"sourceCodeSpec"|undefined} deploymentSource + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @instance + */ + Object.defineProperty(ReasoningEngineSpec.prototype, "deploymentSource", { + get: $util.oneOfGetter($oneOfFields = ["sourceCodeSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(ReasoningEngineSpec.prototype, "_serviceAccount", { get: $util.oneOfGetter($oneOfFields = ["serviceAccount"]), @@ -720203,6 +729561,8 @@ $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.DeploymentSpec.encode(message.deploymentSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.agentFramework != null && Object.hasOwnProperty.call(message, "agentFramework")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentFramework); + if (message.sourceCodeSpec != null && Object.hasOwnProperty.call(message, "sourceCodeSpec")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.encode(message.sourceCodeSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -720239,6 +729599,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 11: { + message.sourceCodeSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.decode(reader, reader.uint32()); + break; + } case 1: { message.serviceAccount = reader.string(); break; @@ -720297,6 +729661,14 @@ if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; + if (message.sourceCodeSpec != null && message.hasOwnProperty("sourceCodeSpec")) { + properties.deploymentSource = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.verify(message.sourceCodeSpec); + if (error) + return "sourceCodeSpec." + error; + } + } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { properties._serviceAccount = 1; if (!$util.isString(message.serviceAccount)) @@ -720339,6 +729711,11 @@ if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec) return object; var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec(); + if (object.sourceCodeSpec != null) { + if (typeof object.sourceCodeSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.sourceCodeSpec: object expected"); + message.sourceCodeSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.fromObject(object.sourceCodeSpec); + } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); if (object.packageSpec != null) { @@ -720402,6 +729779,11 @@ object.deploymentSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.DeploymentSpec.toObject(message.deploymentSpec, options); if (message.agentFramework != null && message.hasOwnProperty("agentFramework")) object.agentFramework = message.agentFramework; + if (message.sourceCodeSpec != null && message.hasOwnProperty("sourceCodeSpec")) { + object.sourceCodeSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.toObject(message.sourceCodeSpec, options); + if (options.oneofs) + object.deploymentSource = "sourceCodeSpec"; + } return object; }; @@ -721168,6 +730550,1265 @@ return DeploymentSpec; })(); + ReasoningEngineSpec.SourceCodeSpec = (function() { + + /** + * Properties of a SourceCodeSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @interface ISourceCodeSpec + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null} [inlineSource] SourceCodeSpec inlineSource + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null} [developerConnectSource] SourceCodeSpec developerConnectSource + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null} [pythonSpec] SourceCodeSpec pythonSpec + */ + + /** + * Constructs a new SourceCodeSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @classdesc Represents a SourceCodeSpec. + * @implements ISourceCodeSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec=} [properties] Properties to set + */ + function SourceCodeSpec(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]]; + } + + /** + * SourceCodeSpec inlineSource. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.inlineSource = null; + + /** + * SourceCodeSpec developerConnectSource. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource|null|undefined} developerConnectSource + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.developerConnectSource = null; + + /** + * SourceCodeSpec pythonSpec. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec|null|undefined} pythonSpec + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + SourceCodeSpec.prototype.pythonSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceCodeSpec source. + * @member {"inlineSource"|"developerConnectSource"|undefined} source + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + Object.defineProperty(SourceCodeSpec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "developerConnectSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SourceCodeSpec languageSpec. + * @member {"pythonSpec"|undefined} languageSpec + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + */ + Object.defineProperty(SourceCodeSpec.prototype, "languageSpec", { + get: $util.oneOfGetter($oneOfFields = ["pythonSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceCodeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec instance + */ + SourceCodeSpec.create = function create(properties) { + return new SourceCodeSpec(properties); + }; + + /** + * Encodes the specified SourceCodeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec} message SourceCodeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.encode(message.inlineSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pythonSpec != null && Object.hasOwnProperty.call(message, "pythonSpec")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.encode(message.pythonSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.developerConnectSource != null && Object.hasOwnProperty.call(message, "developerConnectSource")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.encode(message.developerConnectSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.ISourceCodeSpec} message SourceCodeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.developerConnectSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pythonSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify(message.inlineSource); + if (error) + return "inlineSource." + error; + } + } + if (message.developerConnectSource != null && message.hasOwnProperty("developerConnectSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify(message.developerConnectSource); + if (error) + return "developerConnectSource." + error; + } + } + if (message.pythonSpec != null && message.hasOwnProperty("pythonSpec")) { + properties.languageSpec = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify(message.pythonSpec); + if (error) + return "pythonSpec." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec} SourceCodeSpec + */ + SourceCodeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.fromObject(object.inlineSource); + } + if (object.developerConnectSource != null) { + if (typeof object.developerConnectSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.developerConnectSource: object expected"); + message.developerConnectSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.fromObject(object.developerConnectSource); + } + if (object.pythonSpec != null) { + if (typeof object.pythonSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.pythonSpec: object expected"); + message.pythonSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.fromObject(object.pythonSpec); + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec} message SourceCodeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.pythonSpec != null && message.hasOwnProperty("pythonSpec")) { + object.pythonSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.toObject(message.pythonSpec, options); + if (options.oneofs) + object.languageSpec = "pythonSpec"; + } + if (message.developerConnectSource != null && message.hasOwnProperty("developerConnectSource")) { + object.developerConnectSource = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.toObject(message.developerConnectSource, options); + if (options.oneofs) + object.source = "developerConnectSource"; + } + return object; + }; + + /** + * Converts this SourceCodeSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @instance + * @returns {Object.} JSON object + */ + SourceCodeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec"; + }; + + SourceCodeSpec.InlineSource = (function() { + + /** + * Properties of an InlineSource. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @interface IInlineSource + * @property {Uint8Array|null} [sourceArchive] InlineSource sourceArchive + */ + + /** + * Constructs a new InlineSource. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource=} [properties] Properties to set + */ + function InlineSource(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]]; + } + + /** + * InlineSource sourceArchive. + * @member {Uint8Array} sourceArchive + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @instance + */ + InlineSource.prototype.sourceArchive = $util.newBuffer([]); + + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceArchive != null && Object.hasOwnProperty.call(message, "sourceArchive")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sourceArchive); + return writer; + }; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceArchive = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceArchive != null && message.hasOwnProperty("sourceArchive")) + if (!(message.sourceArchive && typeof message.sourceArchive.length === "number" || $util.isString(message.sourceArchive))) + return "sourceArchive: buffer expected"; + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource(); + if (object.sourceArchive != null) + if (typeof object.sourceArchive === "string") + $util.base64.decode(object.sourceArchive, message.sourceArchive = $util.newBuffer($util.base64.length(object.sourceArchive)), 0); + else if (object.sourceArchive.length >= 0) + message.sourceArchive = object.sourceArchive; + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.sourceArchive = ""; + else { + object.sourceArchive = []; + if (options.bytes !== Array) + object.sourceArchive = $util.newBuffer(object.sourceArchive); + } + if (message.sourceArchive != null && message.hasOwnProperty("sourceArchive")) + object.sourceArchive = options.bytes === String ? $util.base64.encode(message.sourceArchive, 0, message.sourceArchive.length) : options.bytes === Array ? Array.prototype.slice.call(message.sourceArchive) : message.sourceArchive; + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.InlineSource"; + }; + + return InlineSource; + })(); + + SourceCodeSpec.DeveloperConnectConfig = (function() { + + /** + * Properties of a DeveloperConnectConfig. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @interface IDeveloperConnectConfig + * @property {string|null} [gitRepositoryLink] DeveloperConnectConfig gitRepositoryLink + * @property {string|null} [dir] DeveloperConnectConfig dir + * @property {string|null} [revision] DeveloperConnectConfig revision + */ + + /** + * Constructs a new DeveloperConnectConfig. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a DeveloperConnectConfig. + * @implements IDeveloperConnectConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig=} [properties] Properties to set + */ + function DeveloperConnectConfig(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]]; + } + + /** + * DeveloperConnectConfig gitRepositoryLink. + * @member {string} gitRepositoryLink + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.gitRepositoryLink = ""; + + /** + * DeveloperConnectConfig dir. + * @member {string} dir + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.dir = ""; + + /** + * DeveloperConnectConfig revision. + * @member {string} revision + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + */ + DeveloperConnectConfig.prototype.revision = ""; + + /** + * Creates a new DeveloperConnectConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig instance + */ + DeveloperConnectConfig.create = function create(properties) { + return new DeveloperConnectConfig(properties); + }; + + /** + * Encodes the specified DeveloperConnectConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig} message DeveloperConnectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gitRepositoryLink != null && Object.hasOwnProperty.call(message, "gitRepositoryLink")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gitRepositoryLink); + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dir); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + return writer; + }; + + /** + * Encodes the specified DeveloperConnectConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig} message DeveloperConnectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gitRepositoryLink = reader.string(); + break; + } + case 2: { + message.dir = reader.string(); + break; + } + case 3: { + message.revision = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeveloperConnectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeveloperConnectConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeveloperConnectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gitRepositoryLink != null && message.hasOwnProperty("gitRepositoryLink")) + if (!$util.isString(message.gitRepositoryLink)) + return "gitRepositoryLink: string expected"; + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + return null; + }; + + /** + * Creates a DeveloperConnectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} DeveloperConnectConfig + */ + DeveloperConnectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig(); + if (object.gitRepositoryLink != null) + message.gitRepositoryLink = String(object.gitRepositoryLink); + if (object.dir != null) + message.dir = String(object.dir); + if (object.revision != null) + message.revision = String(object.revision); + return message; + }; + + /** + * Creates a plain object from a DeveloperConnectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig} message DeveloperConnectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeveloperConnectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gitRepositoryLink = ""; + object.dir = ""; + object.revision = ""; + } + if (message.gitRepositoryLink != null && message.hasOwnProperty("gitRepositoryLink")) + object.gitRepositoryLink = message.gitRepositoryLink; + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + return object; + }; + + /** + * Converts this DeveloperConnectConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @instance + * @returns {Object.} JSON object + */ + DeveloperConnectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeveloperConnectConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeveloperConnectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig"; + }; + + return DeveloperConnectConfig; + })(); + + SourceCodeSpec.DeveloperConnectSource = (function() { + + /** + * Properties of a DeveloperConnectSource. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @interface IDeveloperConnectSource + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null} [config] DeveloperConnectSource config + */ + + /** + * Constructs a new DeveloperConnectSource. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a DeveloperConnectSource. + * @implements IDeveloperConnectSource + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource=} [properties] Properties to set + */ + function DeveloperConnectSource(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]]; + } + + /** + * DeveloperConnectSource config. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectConfig|null|undefined} config + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @instance + */ + DeveloperConnectSource.prototype.config = null; + + /** + * Creates a new DeveloperConnectSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource instance + */ + DeveloperConnectSource.create = function create(properties) { + return new DeveloperConnectSource(properties); + }; + + /** + * Encodes the specified DeveloperConnectSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource} message DeveloperConnectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeveloperConnectSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IDeveloperConnectSource} message DeveloperConnectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeveloperConnectSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.config = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeveloperConnectSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeveloperConnectSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeveloperConnectSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeveloperConnectSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates a DeveloperConnectSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} DeveloperConnectSource + */ + DeveloperConnectSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource.config: object expected"); + message.config = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from a DeveloperConnectSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource} message DeveloperConnectSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeveloperConnectSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.config = null; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectConfig.toObject(message.config, options); + return object; + }; + + /** + * Converts this DeveloperConnectSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @instance + * @returns {Object.} JSON object + */ + DeveloperConnectSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeveloperConnectSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeveloperConnectSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.DeveloperConnectSource"; + }; + + return DeveloperConnectSource; + })(); + + SourceCodeSpec.PythonSpec = (function() { + + /** + * Properties of a PythonSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @interface IPythonSpec + * @property {string|null} [version] PythonSpec version + * @property {string|null} [entrypointModule] PythonSpec entrypointModule + * @property {string|null} [entrypointObject] PythonSpec entrypointObject + * @property {string|null} [requirementsFile] PythonSpec requirementsFile + */ + + /** + * Constructs a new PythonSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec + * @classdesc Represents a PythonSpec. + * @implements IPythonSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec=} [properties] Properties to set + */ + function PythonSpec(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]]; + } + + /** + * PythonSpec version. + * @member {string} version + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.version = ""; + + /** + * PythonSpec entrypointModule. + * @member {string} entrypointModule + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.entrypointModule = ""; + + /** + * PythonSpec entrypointObject. + * @member {string} entrypointObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.entrypointObject = ""; + + /** + * PythonSpec requirementsFile. + * @member {string} requirementsFile + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + */ + PythonSpec.prototype.requirementsFile = ""; + + /** + * Creates a new PythonSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec instance + */ + PythonSpec.create = function create(properties) { + return new PythonSpec(properties); + }; + + /** + * Encodes the specified PythonSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec} message PythonSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.entrypointModule != null && Object.hasOwnProperty.call(message, "entrypointModule")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entrypointModule); + if (message.entrypointObject != null && Object.hasOwnProperty.call(message, "entrypointObject")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entrypointObject); + if (message.requirementsFile != null && Object.hasOwnProperty.call(message, "requirementsFile")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requirementsFile); + return writer; + }; + + /** + * Encodes the specified PythonSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.IPythonSpec} message PythonSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.entrypointModule = reader.string(); + break; + } + case 3: { + message.entrypointObject = reader.string(); + break; + } + case 4: { + message.requirementsFile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.entrypointModule != null && message.hasOwnProperty("entrypointModule")) + if (!$util.isString(message.entrypointModule)) + return "entrypointModule: string expected"; + if (message.entrypointObject != null && message.hasOwnProperty("entrypointObject")) + if (!$util.isString(message.entrypointObject)) + return "entrypointObject: string expected"; + if (message.requirementsFile != null && message.hasOwnProperty("requirementsFile")) + if (!$util.isString(message.requirementsFile)) + return "requirementsFile: string expected"; + return null; + }; + + /** + * Creates a PythonSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} PythonSpec + */ + PythonSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec(); + if (object.version != null) + message.version = String(object.version); + if (object.entrypointModule != null) + message.entrypointModule = String(object.entrypointModule); + if (object.entrypointObject != null) + message.entrypointObject = String(object.entrypointObject); + if (object.requirementsFile != null) + message.requirementsFile = String(object.requirementsFile); + return message; + }; + + /** + * Creates a plain object from a PythonSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec} message PythonSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.entrypointModule = ""; + object.entrypointObject = ""; + object.requirementsFile = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.entrypointModule != null && message.hasOwnProperty("entrypointModule")) + object.entrypointModule = message.entrypointModule; + if (message.entrypointObject != null && message.hasOwnProperty("entrypointObject")) + object.entrypointObject = message.entrypointObject; + if (message.requirementsFile != null && message.hasOwnProperty("requirementsFile")) + object.requirementsFile = message.requirementsFile; + return object; + }; + + /** + * Converts this PythonSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @instance + * @returns {Object.} JSON object + */ + PythonSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.SourceCodeSpec.PythonSpec"; + }; + + return PythonSpec; + })(); + + return SourceCodeSpec; + })(); + return ReasoningEngineSpec; })(); @@ -721186,6 +731827,7 @@ * @property {string|null} [etag] ReasoningEngine etag * @property {google.cloud.aiplatform.v1beta1.IReasoningEngineContextSpec|null} [contextSpec] ReasoningEngine contextSpec * @property {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null} [encryptionSpec] ReasoningEngine encryptionSpec + * @property {Object.|null} [labels] ReasoningEngine labels */ /** @@ -721197,6 +731839,7 @@ * @param {google.cloud.aiplatform.v1beta1.IReasoningEngine=} [properties] Properties to set */ function ReasoningEngine(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -721275,6 +731918,14 @@ */ ReasoningEngine.prototype.encryptionSpec = null; + /** + * ReasoningEngine labels. + * @member {Object.} labels + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.labels = $util.emptyObject; + /** * Creates a new ReasoningEngine instance using the specified properties. * @function create @@ -721317,6 +731968,9 @@ $root.google.cloud.aiplatform.v1beta1.ReasoningEngineContextSpec.encode(message.contextSpec, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -721347,7 +732001,7 @@ ReasoningEngine.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngine(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngine(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -721389,6 +732043,29 @@ message.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.decode(reader, reader.uint32()); break; } + case 17: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -721461,6 +732138,14 @@ if (error) return "encryptionSpec." + error; } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -721509,6 +732194,13 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngine.encryptionSpec: object expected"); message.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.fromObject(object.encryptionSpec); } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngine.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; @@ -721525,6 +732217,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.displayName = ""; @@ -721554,6 +732248,12 @@ object.contextSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineContextSpec.toObject(message.contextSpec, options); if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.toObject(message.encryptionSpec, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -756649,7 +767349,6 @@ * @property {boolean|null} [skipSummarization] EventActions skipSummarization * @property {google.protobuf.IStruct|null} [stateDelta] EventActions stateDelta * @property {Object.|null} [artifactDelta] EventActions artifactDelta - * @property {boolean|null} [transferToAgent] EventActions transferToAgent * @property {boolean|null} [escalate] EventActions escalate * @property {google.protobuf.IStruct|null} [requestedAuthConfigs] EventActions requestedAuthConfigs * @property {string|null} [transferAgent] EventActions transferAgent @@ -756695,14 +767394,6 @@ */ EventActions.prototype.artifactDelta = $util.emptyObject; - /** - * EventActions transferToAgent. - * @member {boolean} transferToAgent - * @memberof google.cloud.aiplatform.v1beta1.EventActions - * @instance - */ - EventActions.prototype.transferToAgent = false; - /** * EventActions escalate. * @member {boolean} escalate @@ -756758,8 +767449,6 @@ if (message.artifactDelta != null && Object.hasOwnProperty.call(message, "artifactDelta")) for (var keys = Object.keys(message.artifactDelta), i = 0; i < keys.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.artifactDelta[keys[i]]).ldelim(); - if (message.transferToAgent != null && Object.hasOwnProperty.call(message, "transferToAgent")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.transferToAgent); if (message.escalate != null && Object.hasOwnProperty.call(message, "escalate")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.escalate); if (message.requestedAuthConfigs != null && Object.hasOwnProperty.call(message, "requestedAuthConfigs")) @@ -756833,10 +767522,6 @@ message.artifactDelta[key] = value; break; } - case 5: { - message.transferToAgent = reader.bool(); - break; - } case 6: { message.escalate = reader.bool(); break; @@ -756900,9 +767585,6 @@ if (!$util.isInteger(message.artifactDelta[key[i]])) return "artifactDelta: integer{k:string} expected"; } - if (message.transferToAgent != null && message.hasOwnProperty("transferToAgent")) - if (typeof message.transferToAgent !== "boolean") - return "transferToAgent: boolean expected"; if (message.escalate != null && message.hasOwnProperty("escalate")) if (typeof message.escalate !== "boolean") return "escalate: boolean expected"; @@ -756943,8 +767625,6 @@ for (var keys = Object.keys(object.artifactDelta), i = 0; i < keys.length; ++i) message.artifactDelta[keys[i]] = object.artifactDelta[keys[i]] | 0; } - if (object.transferToAgent != null) - message.transferToAgent = Boolean(object.transferToAgent); if (object.escalate != null) message.escalate = Boolean(object.escalate); if (object.requestedAuthConfigs != null) { @@ -756975,7 +767655,6 @@ if (options.defaults) { object.skipSummarization = false; object.stateDelta = null; - object.transferToAgent = false; object.escalate = false; object.requestedAuthConfigs = null; object.transferAgent = ""; @@ -756990,8 +767669,6 @@ for (var j = 0; j < keys2.length; ++j) object.artifactDelta[keys2[j]] = message.artifactDelta[keys2[j]]; } - if (message.transferToAgent != null && message.hasOwnProperty("transferToAgent")) - object.transferToAgent = message.transferToAgent; if (message.escalate != null && message.hasOwnProperty("escalate")) object.escalate = message.escalate; if (message.requestedAuthConfigs != null && message.hasOwnProperty("requestedAuthConfigs")) @@ -758947,6 +769624,7 @@ * @property {number|null} [pageSize] ListEventsRequest pageSize * @property {string|null} [pageToken] ListEventsRequest pageToken * @property {string|null} [filter] ListEventsRequest filter + * @property {string|null} [orderBy] ListEventsRequest orderBy */ /** @@ -758996,6 +769674,14 @@ */ ListEventsRequest.prototype.filter = ""; + /** + * ListEventsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.aiplatform.v1beta1.ListEventsRequest + * @instance + */ + ListEventsRequest.prototype.orderBy = ""; + /** * Creates a new ListEventsRequest instance using the specified properties. * @function create @@ -759028,6 +769714,8 @@ 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; }; @@ -759080,6 +769768,10 @@ message.filter = reader.string(); break; } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -759127,6 +769819,9 @@ 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; }; @@ -759150,6 +769845,8 @@ 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; }; @@ -759171,6 +769868,7 @@ object.pageSize = 0; object.pageToken = ""; object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -759180,6 +769878,8 @@ 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; }; diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 33bfeb6ec96a..f89dcc3ed047 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -15,8 +15,8 @@ "java_package": "com.google.cloud.aiplatform.v1", "php_namespace": "Google\\Cloud\\AIPlatform\\V1", "ruby_package": "Google::Cloud::AIPlatform::V1", - "(google.api.resource_definition).type": "compute.googleapis.com/Network", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + "(google.api.resource_definition).type": "developerconnect.googleapis.com/GitRepositoryLink", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}" }, "nested": { "AcceleratorType": { @@ -1632,6 +1632,13 @@ "type": "int32", "id": 3 }, + "gpuPartitionSize": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "tpuTopology": { "type": "string", "id": 4, @@ -2962,6 +2969,133 @@ } } }, + "PrebuiltVoiceConfig": { + "oneofs": { + "_voiceName": { + "oneof": [ + "voiceName" + ] + } + }, + "fields": { + "voiceName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "ReplicatedVoiceConfig": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "voiceSampleAudio": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VoiceConfig": { + "oneofs": { + "voiceConfig": { + "oneof": [ + "prebuiltVoiceConfig", + "replicatedVoiceConfig" + ] + } + }, + "fields": { + "prebuiltVoiceConfig": { + "type": "PrebuiltVoiceConfig", + "id": 1 + }, + "replicatedVoiceConfig": { + "type": "ReplicatedVoiceConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SpeakerVoiceConfig": { + "fields": { + "speaker": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "voiceConfig": { + "type": "VoiceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MultiSpeakerVoiceConfig": { + "fields": { + "speakerVoiceConfigs": { + "rule": "repeated", + "type": "SpeakerVoiceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SpeechConfig": { + "fields": { + "voiceConfig": { + "type": "VoiceConfig", + "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "multiSpeakerVoiceConfig": { + "type": "MultiSpeakerVoiceConfig", + "id": 3 + } + } + }, + "ImageConfig": { + "oneofs": { + "_aspectRatio": { + "oneof": [ + "aspectRatio" + ] + } + }, + "fields": { + "aspectRatio": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, "GenerationConfig": { "oneofs": { "_temperature": { @@ -3028,6 +3162,16 @@ "oneof": [ "routingConfig" ] + }, + "_speechConfig": { + "oneof": [ + "speechConfig" + ] + }, + "_imageConfig": { + "oneof": [ + "imageConfig" + ] } }, "fields": { @@ -3150,12 +3294,28 @@ "proto3_optional": true } }, + "speechConfig": { + "type": "SpeechConfig", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "thinkingConfig": { "type": "ThinkingConfig", "id": 25, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "imageConfig": { + "type": "ImageConfig", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { @@ -4363,6 +4523,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "excludedPredefinedFunctions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -4443,6 +4611,76 @@ } } }, + "FunctionResponsePart": { + "oneofs": { + "data": { + "oneof": [ + "inlineData", + "fileData" + ] + } + }, + "fields": { + "inlineData": { + "type": "FunctionResponseBlob", + "id": 1 + }, + "fileData": { + "type": "FunctionResponseFileData", + "id": 2 + } + } + }, + "FunctionResponseBlob": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "data": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FunctionResponseFileData": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fileUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "FunctionResponse": { "fields": { "name": { @@ -4458,6 +4696,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "parts": { + "rule": "repeated", + "type": "FunctionResponsePart", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8934,7 +9180,9 @@ "GETTING_CONTAINER_IMAGE": 9, "STARTING_MODEL_SERVER": 3, "FINISHING_UP": 4, - "DEPLOYMENT_TERMINATED": 10 + "DEPLOYMENT_TERMINATED": 10, + "SUCCESSFULLY_DEPLOYED": 11, + "FAILED_TO_DEPLOY": 12 } }, "EndpointService": { @@ -13243,14 +13491,14 @@ }, "enableDirectBigtableAccess": { "type": "bool", - "id": 2, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "bigtableMetadata": { "type": "BigtableMetadata", - "id": 3, + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } @@ -14085,7 +14333,7 @@ }, "bigtableMetadata": { "type": "BigtableMetadata", - "id": 21, + "id": 22, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } @@ -17920,7 +18168,8 @@ "oneofs": { "sourceModel": { "oneof": [ - "baseModel" + "baseModel", + "preTunedModel" ] }, "tuningSpec": { @@ -17934,6 +18183,10 @@ "type": "string", "id": 4 }, + "preTunedModel": { + "type": "PreTunedModel", + "id": 31 + }, "supervisedTuningSpec": { "type": "SupervisedTuningSpec", "id": 5 @@ -18395,6 +18648,31 @@ } } }, + "PreTunedModel": { + "fields": { + "tunedModelName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Model" + } + }, + "checkpointId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "baseModel": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "HyperparameterTuningJob": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/HyperparameterTuningJob", @@ -23449,6 +23727,26 @@ "(google.api.method_signature)": "model,contents" } ] + }, + "EmbedContent": { + "requestType": "EmbedContentRequest", + "responseType": "EmbedContentResponse", + "options": { + "(google.api.http).post": "/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,content" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,content" + } + ] } } }, @@ -24123,6 +24421,216 @@ } } }, + "EmbedContentRequest": { + "oneofs": { + "_model": { + "oneof": [ + "model" + ] + }, + "_content": { + "oneof": [ + "content" + ] + }, + "_title": { + "oneof": [ + "title" + ] + }, + "_taskType": { + "oneof": [ + "taskType" + ] + }, + "_outputDimensionality": { + "oneof": [ + "outputDimensionality" + ] + }, + "_autoTruncate": { + "oneof": [ + "autoTruncate" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Endpoint", + "proto3_optional": true + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "title": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "taskType": { + "type": "EmbeddingTaskType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "outputDimensionality": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "autoTruncate": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "EmbeddingTaskType": { + "values": { + "UNSPECIFIED": 0, + "RETRIEVAL_QUERY": 2, + "RETRIEVAL_DOCUMENT": 3, + "SEMANTIC_SIMILARITY": 4, + "CLASSIFICATION": 5, + "CLUSTERING": 6, + "QUESTION_ANSWERING": 7, + "FACT_VERIFICATION": 8, + "CODE_RETRIEVAL_QUERY": 9 + } + } + } + }, + "EmbedContentResponse": { + "fields": { + "embedding": { + "type": "Embedding", + "id": 1 + }, + "usageMetadata": { + "type": "UsageMetadata", + "id": 2 + }, + "truncated": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Embedding": { + "fields": { + "values": { + "rule": "repeated", + "type": "float", + "id": 1 + } + } + } + } + }, + "UsageMetadata": { + "fields": { + "promptTokenCount": { + "type": "int32", + "id": 1 + }, + "candidatesTokenCount": { + "type": "int32", + "id": 2 + }, + "totalTokenCount": { + "type": "int32", + "id": 3 + }, + "toolUsePromptTokenCount": { + "type": "int32", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thoughtsTokenCount": { + "type": "int32", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cachedContentTokenCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "promptTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cacheTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "candidatesTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "toolUsePromptTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "trafficType": { + "type": "TrafficType", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TrafficType": { + "values": { + "TRAFFIC_TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "PROVISIONED_THROUGHPUT": 2 + } + } + } + }, "MatchService": { "options": { "(google.api.default_host)": "aiplatform.googleapis.com", @@ -32038,6 +32546,11 @@ }, "ReasoningEngineSpec": { "oneofs": { + "deploymentSource": { + "oneof": [ + "sourceCodeSpec" + ] + }, "_serviceAccount": { "oneof": [ "serviceAccount" @@ -32045,6 +32558,10 @@ } }, "fields": { + "sourceCodeSpec": { + "type": "SourceCodeSpec", + "id": 11 + }, "serviceAccount": { "type": "string", "id": 1, @@ -32191,6 +32708,117 @@ } } } + }, + "SourceCodeSpec": { + "oneofs": { + "source": { + "oneof": [ + "inlineSource", + "developerConnectSource" + ] + }, + "languageSpec": { + "oneof": [ + "pythonSpec" + ] + } + }, + "fields": { + "inlineSource": { + "type": "InlineSource", + "id": 1 + }, + "developerConnectSource": { + "type": "DeveloperConnectSource", + "id": 3 + }, + "pythonSpec": { + "type": "PythonSpec", + "id": 2 + } + }, + "nested": { + "InlineSource": { + "fields": { + "sourceArchive": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + } + } + }, + "DeveloperConnectConfig": { + "fields": { + "gitRepositoryLink": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "developerconnect.googleapis.com/GitRepositoryLink" + } + }, + "dir": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revision": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeveloperConnectSource": { + "fields": { + "config": { + "type": "DeveloperConnectConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PythonSpec": { + "fields": { + "version": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entrypointModule": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entrypointObject": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requirementsFile": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } } } }, @@ -32254,6 +32882,11 @@ "encryptionSpec": { "type": "EncryptionSpec", "id": 11 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 17 } } }, @@ -37998,8 +38631,8 @@ "java_package": "com.google.cloud.aiplatform.v1beta1", "php_namespace": "Google\\Cloud\\AIPlatform\\V1beta1", "ruby_package": "Google::Cloud::AIPlatform::V1beta1", - "(google.api.resource_definition).type": "compute.googleapis.com/Network", - "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + "(google.api.resource_definition).type": "developerconnect.googleapis.com/GitRepositoryLink", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}" }, "nested": { "AcceleratorType": { @@ -41598,11 +42231,30 @@ } } }, + "ReplicatedVoiceConfig": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "voiceSampleAudio": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "VoiceConfig": { "oneofs": { "voiceConfig": { "oneof": [ - "prebuiltVoiceConfig" + "prebuiltVoiceConfig", + "replicatedVoiceConfig" ] } }, @@ -41610,6 +42262,43 @@ "prebuiltVoiceConfig": { "type": "PrebuiltVoiceConfig", "id": 1 + }, + "replicatedVoiceConfig": { + "type": "ReplicatedVoiceConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SpeakerVoiceConfig": { + "fields": { + "speaker": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "voiceConfig": { + "type": "VoiceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MultiSpeakerVoiceConfig": { + "fields": { + "speakerVoiceConfigs": { + "rule": "repeated", + "type": "SpeakerVoiceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -41618,6 +42307,36 @@ "voiceConfig": { "type": "VoiceConfig", "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "multiSpeakerVoiceConfig": { + "type": "MultiSpeakerVoiceConfig", + "id": 3 + } + } + }, + "ImageConfig": { + "oneofs": { + "_aspectRatio": { + "oneof": [ + "aspectRatio" + ] + } + }, + "fields": { + "aspectRatio": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } } }, @@ -41702,6 +42421,11 @@ "oneof": [ "speechConfig" ] + }, + "_imageConfig": { + "oneof": [ + "imageConfig" + ] } }, "fields": { @@ -41869,6 +42593,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "imageConfig": { + "type": "ImageConfig", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { @@ -43114,6 +43846,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "excludedPredefinedFunctions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -43267,6 +44007,76 @@ } } }, + "FunctionResponsePart": { + "oneofs": { + "data": { + "oneof": [ + "inlineData", + "fileData" + ] + } + }, + "fields": { + "inlineData": { + "type": "FunctionResponseBlob", + "id": 1 + }, + "fileData": { + "type": "FunctionResponseFileData", + "id": 2 + } + } + }, + "FunctionResponseBlob": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "data": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FunctionResponseFileData": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fileUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "FunctionResponse": { "fields": { "id": { @@ -43289,6 +44099,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "parts": { + "rule": "repeated", + "type": "FunctionResponsePart", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -48446,7 +49264,9 @@ "GETTING_CONTAINER_IMAGE": 9, "STARTING_MODEL_SERVER": 3, "FINISHING_UP": 4, - "DEPLOYMENT_TERMINATED": 10 + "DEPLOYMENT_TERMINATED": 10, + "SUCCESSFULLY_DEPLOYED": 11, + "FAILED_TO_DEPLOY": 12 } }, "EndpointService": { @@ -55863,14 +56683,14 @@ }, "enableDirectBigtableAccess": { "type": "bool", - "id": 2, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "bigtableMetadata": { "type": "BigtableMetadata", - "id": 3, + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } @@ -56727,7 +57547,7 @@ }, "bigtableMetadata": { "type": "BigtableMetadata", - "id": 21, + "id": 22, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } @@ -77812,6 +78632,26 @@ "(google.api.method_signature)": "endpoint,http_body" } ] + }, + "EmbedContent": { + "requestType": "EmbedContentRequest", + "responseType": "EmbedContentResponse", + "options": { + "(google.api.http).post": "/v1beta1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,content" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,content" + } + ] } } }, @@ -78574,8 +79414,223 @@ } } }, + "EmbedContentRequest": { + "oneofs": { + "_model": { + "oneof": [ + "model" + ] + }, + "_content": { + "oneof": [ + "content" + ] + }, + "_title": { + "oneof": [ + "title" + ] + }, + "_taskType": { + "oneof": [ + "taskType" + ] + }, + "_outputDimensionality": { + "oneof": [ + "outputDimensionality" + ] + }, + "_autoTruncate": { + "oneof": [ + "autoTruncate" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Endpoint", + "proto3_optional": true + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "title": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "taskType": { + "type": "EmbeddingTaskType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "outputDimensionality": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "autoTruncate": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "EmbeddingTaskType": { + "values": { + "UNSPECIFIED": 0, + "RETRIEVAL_QUERY": 2, + "RETRIEVAL_DOCUMENT": 3, + "SEMANTIC_SIMILARITY": 4, + "CLASSIFICATION": 5, + "CLUSTERING": 6, + "QUESTION_ANSWERING": 7, + "FACT_VERIFICATION": 8, + "CODE_RETRIEVAL_QUERY": 9 + } + } + } + }, + "EmbedContentResponse": { + "fields": { + "embedding": { + "type": "Embedding", + "id": 1 + }, + "usageMetadata": { + "type": "UsageMetadata", + "id": 2 + }, + "truncated": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Embedding": { + "fields": { + "values": { + "rule": "repeated", + "type": "float", + "id": 1 + } + } + } + } + }, + "UsageMetadata": { + "fields": { + "promptTokenCount": { + "type": "int32", + "id": 1 + }, + "candidatesTokenCount": { + "type": "int32", + "id": 2 + }, + "totalTokenCount": { + "type": "int32", + "id": 3 + }, + "toolUsePromptTokenCount": { + "type": "int32", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thoughtsTokenCount": { + "type": "int32", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cachedContentTokenCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "promptTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cacheTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "candidatesTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "toolUsePromptTokensDetails": { + "rule": "repeated", + "type": "ModalityTokenCount", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "trafficType": { + "type": "TrafficType", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TrafficType": { + "values": { + "TRAFFIC_TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "PROVISIONED_THROUGHPUT": 2 + } + } + } + }, "ReasoningEngineSpec": { "oneofs": { + "deploymentSource": { + "oneof": [ + "sourceCodeSpec" + ] + }, "_serviceAccount": { "oneof": [ "serviceAccount" @@ -78583,6 +79638,10 @@ } }, "fields": { + "sourceCodeSpec": { + "type": "SourceCodeSpec", + "id": 11 + }, "serviceAccount": { "type": "string", "id": 1, @@ -78729,6 +79788,117 @@ } } } + }, + "SourceCodeSpec": { + "oneofs": { + "source": { + "oneof": [ + "inlineSource", + "developerConnectSource" + ] + }, + "languageSpec": { + "oneof": [ + "pythonSpec" + ] + } + }, + "fields": { + "inlineSource": { + "type": "InlineSource", + "id": 1 + }, + "developerConnectSource": { + "type": "DeveloperConnectSource", + "id": 3 + }, + "pythonSpec": { + "type": "PythonSpec", + "id": 2 + } + }, + "nested": { + "InlineSource": { + "fields": { + "sourceArchive": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + } + } + }, + "DeveloperConnectConfig": { + "fields": { + "gitRepositoryLink": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "developerconnect.googleapis.com/GitRepositoryLink" + } + }, + "dir": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revision": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeveloperConnectSource": { + "fields": { + "config": { + "type": "DeveloperConnectConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PythonSpec": { + "fields": { + "version": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entrypointModule": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entrypointObject": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requirementsFile": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } } } }, @@ -78799,6 +79969,11 @@ "encryptionSpec": { "type": "EncryptionSpec", "id": 11 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 17 } } }, @@ -81723,13 +82898,6 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "transferToAgent": { - "type": "bool", - "id": 5, - "options": { - "deprecated": true - } - }, "escalate": { "type": "bool", "id": 6, @@ -82095,6 +83263,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.embed_content.js b/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.embed_content.js new file mode 100644 index 000000000000..fa959ff5e39d --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.embed_content.js @@ -0,0 +1,84 @@ +// Copyright 2025 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() { + // [START aiplatform_v1_generated_PredictionService_EmbedContent_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 publisher model requested to serve the + * prediction. Format: + * `projects/{project}/locations/{location}/publishers/* /models/*` + */ + // const model = 'abc123' + /** + * Required. Input content to be embedded. Required. + */ + // const content = {} + /** + * Optional. An optional title for the text. + */ + // const title = 'abc123' + /** + * Optional. The task type of the embedding. + */ + // const taskType = {} + /** + * Optional. Optional reduced dimension for the output embedding. If set, + * excessive values in the output embedding are truncated from the end. + */ + // const outputDimensionality = 1234 + /** + * Optional. Whether to silently truncate the input content if it's longer + * than the maximum sequence length. + */ + // const autoTruncate = true + + // Imports the Aiplatform library + const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new PredictionServiceClient(); + + async function callEmbedContent() { + // Construct request + const request = { + }; + + // Run request + const response = await aiplatformClient.embedContent(request); + console.log(response); + } + + callEmbedContent(); + // [END aiplatform_v1_generated_PredictionService_EmbedContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index c3d2e02772c6..15e2a3864d04 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -12035,6 +12035,66 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_PredictionService_EmbedContent_async", + "title": "DataFoundryService embedContent Sample", + "origin": "API_DEFINITION", + "description": " Embed content with multimodal inputs.", + "canonical": true, + "file": "prediction_service.embed_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EmbedContent", + "fullName": "google.cloud.aiplatform.v1.PredictionService.EmbedContent", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "content", + "type": ".google.cloud.aiplatform.v1.Content" + }, + { + "name": "title", + "type": "TYPE_STRING" + }, + { + "name": "task_type", + "type": ".google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType" + }, + { + "name": "output_dimensionality", + "type": "TYPE_INT32" + }, + { + "name": "auto_truncate", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.aiplatform.v1.EmbedContentResponse", + "client": { + "shortName": "PredictionServiceClient", + "fullName": "google.cloud.aiplatform.v1.PredictionServiceClient" + }, + "method": { + "shortName": "EmbedContent", + "fullName": "google.cloud.aiplatform.v1.PredictionService.EmbedContent", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1.PredictionService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async", "title": "DataFoundryService queryReasoningEngine Sample", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.embed_content.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.embed_content.js new file mode 100644 index 000000000000..4434d504b7bf --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.embed_content.js @@ -0,0 +1,84 @@ +// Copyright 2025 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() { + // [START aiplatform_v1beta1_generated_PredictionService_EmbedContent_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 publisher model requested to serve the + * prediction. Format: + * `projects/{project}/locations/{location}/publishers/* /models/*` + */ + // const model = 'abc123' + /** + * Required. Input content to be embedded. Required. + */ + // const content = {} + /** + * Optional. An optional title for the text. + */ + // const title = 'abc123' + /** + * Optional. The task type of the embedding. + */ + // const taskType = {} + /** + * Optional. Optional reduced dimension for the output embedding. If set, + * excessive values in the output embedding are truncated from the end. + */ + // const outputDimensionality = 1234 + /** + * Optional. Whether to silently truncate the input content if it's longer + * than the maximum sequence length. + */ + // const autoTruncate = true + + // Imports the Aiplatform library + const {PredictionServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new PredictionServiceClient(); + + async function callEmbedContent() { + // Construct request + const request = { + }; + + // Run request + const response = await aiplatformClient.embedContent(request); + console.log(response); + } + + callEmbedContent(); + // [END aiplatform_v1beta1_generated_PredictionService_EmbedContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_events.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_events.js index 5365cadcd97e..c13350990740 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_events.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_events.js @@ -56,6 +56,13 @@ function main(parent) { * More detail in AIP-160 (https://google.aip.dev/160). */ // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `timestamp` + * Example: `timestamp desc`. + */ + // const orderBy = 'abc123' // Imports the Aiplatform library const {SessionServiceClient} = require('@google-cloud/aiplatform').v1beta1; diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_sessions.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_sessions.js index 3f81ca3ab4df..3a74ada11313 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_sessions.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/session_service.list_sessions.js @@ -52,7 +52,8 @@ function main(parent) { * Optional. The standard list filter. * Supported fields: * * `display_name` - * Example: `display_name=abc`. + * * `user_id` + * Example: `display_name="abc"`, `user_id="123"`. */ // const filter = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 47cc92e3a949..f08582d8c42c 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -14715,6 +14715,66 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_PredictionService_EmbedContent_async", + "title": "DatasetService embedContent Sample", + "origin": "API_DEFINITION", + "description": " Embed content with multimodal inputs.", + "canonical": true, + "file": "prediction_service.embed_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EmbedContent", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.EmbedContent", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "content", + "type": ".google.cloud.aiplatform.v1beta1.Content" + }, + { + "name": "title", + "type": "TYPE_STRING" + }, + { + "name": "task_type", + "type": ".google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType" + }, + { + "name": "output_dimensionality", + "type": "TYPE_INT32" + }, + { + "name": "auto_truncate", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.EmbedContentResponse", + "client": { + "shortName": "PredictionServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionServiceClient" + }, + "method": { + "shortName": "EmbedContent", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService.EmbedContent", + "service": { + "shortName": "PredictionService", + "fullName": "google.cloud.aiplatform.v1beta1.PredictionService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async", "title": "DatasetService queryReasoningEngine Sample", @@ -15438,7 +15498,7 @@ "segments": [ { "start": 25, - "end": 86, + "end": 87, "type": "FULL" } ], @@ -15578,7 +15638,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 86, "type": "FULL" } ], @@ -15602,6 +15662,10 @@ { "name": "filter", "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" } ], "resultType": ".google.cloud.aiplatform.v1beta1.ListEventsResponse", diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index b82180f43ec5..cf5e2d91222d 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^5.8.0" + "@google-cloud/aiplatform": "^5.14.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-aiplatform/src/v1/data_foundry_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/data_foundry_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/data_foundry_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/data_foundry_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/evaluation_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/evaluation_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/evaluation_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/evaluation_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/feature_registry_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/feature_registry_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_registry_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/feature_registry_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index 2f30968cd8b7..d35a83b276d4 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -2964,6 +2964,11 @@ "generateContent" ] }, + "EmbedContent": { + "methods": [ + "embedContent" + ] + }, "StreamRawPredict": { "methods": [ "streamRawPredict" @@ -3033,6 +3038,11 @@ "methods": [ "generateContent" ] + }, + "EmbedContent": { + "methods": [ + "embedContent" + ] } } } diff --git a/packages/google-cloud-aiplatform/src/v1/gen_ai_cache_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/gen_ai_cache_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/gen_ai_cache_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/gen_ai_cache_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/match_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/model_garden_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/notebook_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/notebook_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/notebook_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/notebook_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts index e73894c6dc9f..aef82e63874c 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts @@ -408,7 +408,7 @@ export class PredictionServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const predictionServiceStubMethods = - ['predict', 'rawPredict', 'streamRawPredict', 'directPredict', 'directRawPredict', 'streamDirectPredict', 'streamDirectRawPredict', 'streamingPredict', 'serverStreamingPredict', 'streamingRawPredict', 'explain', 'generateContent', 'streamGenerateContent']; + ['predict', 'rawPredict', 'streamRawPredict', 'directPredict', 'directRawPredict', 'streamDirectPredict', 'streamDirectRawPredict', 'streamingPredict', 'serverStreamingPredict', 'streamingRawPredict', 'explain', 'generateContent', 'streamGenerateContent', 'embedContent']; for (const methodName of predictionServiceStubMethods) { const callPromise = this.predictionServiceStub.then( stub => (...args: Array<{}>) => { @@ -1242,6 +1242,114 @@ export class PredictionServiceClient { throw error; }); } +/** + * Embed content with multimodal inputs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The name of the publisher model requested to serve the + * prediction. Format: + * `projects/{project}/locations/{location}/publishers/* /models/*` + * @param {google.cloud.aiplatform.v1.Content} request.content + * Required. Input content to be embedded. Required. + * @param {string} [request.title] + * Optional. An optional title for the text. + * @param {google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType} [request.taskType] + * Optional. The task type of the embedding. + * @param {number} [request.outputDimensionality] + * Optional. Optional reduced dimension for the output embedding. If set, + * excessive values in the output embedding are truncated from the end. + * @param {boolean} [request.autoTruncate] + * Optional. Whether to silently truncate the input content if it's longer + * than the maximum sequence length. + * @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 protos.google.cloud.aiplatform.v1.EmbedContentResponse|EmbedContentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/prediction_service.embed_content.js + * region_tag:aiplatform_v1_generated_PredictionService_EmbedContent_async + */ + embedContent( + request?: protos.google.cloud.aiplatform.v1.IEmbedContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|undefined, {}|undefined + ]>; + embedContent( + request: protos.google.cloud.aiplatform.v1.IEmbedContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): void; + embedContent( + request: protos.google.cloud.aiplatform.v1.IEmbedContentRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): void; + embedContent( + request?: protos.google.cloud.aiplatform.v1.IEmbedContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|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({ + 'model': request.model ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('embedContent request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('embedContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.embedContent(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.aiplatform.v1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1.IEmbedContentRequest|undefined, + {}|undefined + ]) => { + this._log.info('embedContent response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Perform a streaming online prediction with an arbitrary HTTP payload. diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/prediction_service_client_config.json index c29966773148..e8aeab0436d7 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_client_config.json @@ -71,6 +71,10 @@ "StreamGenerateContent": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "EmbedContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/reasoning_engine_execution_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/reasoning_engine_execution_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/reasoning_engine_execution_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/reasoning_engine_execution_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/reasoning_engine_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/reasoning_engine_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/reasoning_engine_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/reasoning_engine_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/schedule_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/schedule_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/schedule_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/schedule_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/vertex_rag_data_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/vertex_rag_data_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/vertex_rag_data_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/vertex_rag_data_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/vertex_rag_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/vertex_rag_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/vertex_rag_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/vertex_rag_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json index 4e81797942ce..cfe864bfec39 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json @@ -150,6 +150,7 @@ "../../protos/google/cloud/aiplatform/v1/tuning_job.proto", "../../protos/google/cloud/aiplatform/v1/types.proto", "../../protos/google/cloud/aiplatform/v1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1/value.proto", "../../protos/google/cloud/aiplatform/v1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/example_store_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/example_store_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/example_store_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/example_store_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 275cefb2264a..2278d0c470cf 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -3594,6 +3594,11 @@ "generateContent" ] }, + "EmbedContent": { + "methods": [ + "embedContent" + ] + }, "StreamRawPredict": { "methods": [ "streamRawPredict" @@ -3673,6 +3678,11 @@ "methods": [ "generateContent" ] + }, + "EmbedContent": { + "methods": [ + "embedContent" + ] } } } diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/memory_bank_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/memory_bank_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/memory_bank_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/memory_bank_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts index 9fb8dfb53c6f..bab352250908 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -436,7 +436,7 @@ export class PredictionServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const predictionServiceStubMethods = - ['predict', 'rawPredict', 'streamRawPredict', 'directPredict', 'directRawPredict', 'streamDirectPredict', 'streamDirectRawPredict', 'streamingPredict', 'serverStreamingPredict', 'streamingRawPredict', 'explain', 'countTokens', 'generateContent', 'streamGenerateContent', 'chatCompletions']; + ['predict', 'rawPredict', 'streamRawPredict', 'directPredict', 'directRawPredict', 'streamDirectPredict', 'streamDirectRawPredict', 'streamingPredict', 'serverStreamingPredict', 'streamingRawPredict', 'explain', 'countTokens', 'generateContent', 'streamGenerateContent', 'chatCompletions', 'embedContent']; for (const methodName of predictionServiceStubMethods) { const callPromise = this.predictionServiceStub.then( stub => (...args: Array<{}>) => { @@ -1399,6 +1399,114 @@ export class PredictionServiceClient { throw error; }); } +/** + * Embed content with multimodal inputs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The name of the publisher model requested to serve the + * prediction. Format: + * `projects/{project}/locations/{location}/publishers/* /models/*` + * @param {google.cloud.aiplatform.v1beta1.Content} request.content + * Required. Input content to be embedded. Required. + * @param {string} [request.title] + * Optional. An optional title for the text. + * @param {google.cloud.aiplatform.v1beta1.EmbedContentRequest.EmbeddingTaskType} [request.taskType] + * Optional. The task type of the embedding. + * @param {number} [request.outputDimensionality] + * Optional. Optional reduced dimension for the output embedding. If set, + * excessive values in the output embedding are truncated from the end. + * @param {boolean} [request.autoTruncate] + * Optional. Whether to silently truncate the input content if it's longer + * than the maximum sequence length. + * @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 protos.google.cloud.aiplatform.v1beta1.EmbedContentResponse|EmbedContentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/prediction_service.embed_content.js + * region_tag:aiplatform_v1beta1_generated_PredictionService_EmbedContent_async + */ + embedContent( + request?: protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|undefined, {}|undefined + ]>; + embedContent( + request: protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): void; + embedContent( + request: protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): void; + embedContent( + request?: protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|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({ + 'model': request.model ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('embedContent request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('embedContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.embedContent(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse, + protos.google.cloud.aiplatform.v1beta1.IEmbedContentRequest|undefined, + {}|undefined + ]) => { + this._log.info('embedContent response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Perform a streaming online prediction with an arbitrary HTTP payload. diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client_config.json index 06551942cc91..b97e020329d8 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client_config.json @@ -81,6 +81,10 @@ "ChatCompletions": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "EmbedContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/session_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/session_service_client.ts index e9d802c08a04..1777785548dd 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/session_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/session_service_client.ts @@ -1121,8 +1121,9 @@ export class SessionServiceClient { * Optional. The standard list filter. * Supported fields: * * `display_name` + * * `user_id` * - * Example: `display_name=abc`. + * Example: `display_name="abc"`, `user_id="123"`. * @param {string} [request.orderBy] * Optional. A comma-separated list of fields to order by, sorted in ascending * order. Use "desc" after a field name for descending. Supported fields: @@ -1240,8 +1241,9 @@ export class SessionServiceClient { * Optional. The standard list filter. * Supported fields: * * `display_name` + * * `user_id` * - * Example: `display_name=abc`. + * Example: `display_name="abc"`, `user_id="123"`. * @param {string} [request.orderBy] * Optional. A comma-separated list of fields to order by, sorted in ascending * order. Use "desc" after a field name for descending. Supported fields: @@ -1308,8 +1310,9 @@ export class SessionServiceClient { * Optional. The standard list filter. * Supported fields: * * `display_name` + * * `user_id` * - * Example: `display_name=abc`. + * Example: `display_name="abc"`, `user_id="123"`. * @param {string} [request.orderBy] * Optional. A comma-separated list of fields to order by, sorted in ascending * order. Use "desc" after a field name for descending. Supported fields: @@ -1378,6 +1381,12 @@ export class SessionServiceClient { * the timestamp is in RFC 3339 format) * * More detail in [AIP-160](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `timestamp` + * + * Example: `timestamp desc`. * @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. @@ -1491,6 +1500,12 @@ export class SessionServiceClient { * the timestamp is in RFC 3339 format) * * More detail in [AIP-160](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `timestamp` + * + * Example: `timestamp desc`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1553,6 +1568,12 @@ export class SessionServiceClient { * the timestamp is in RFC 3339 format) * * More detail in [AIP-160](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `timestamp` + * + * Example: `timestamp desc`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/session_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/session_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/session_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/session_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index 4577bbef0ea9..f09644fb34a9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -175,6 +175,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/types.proto", "../../protos/google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto", "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/usage_metadata.proto", "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", "../../protos/google/cloud/aiplatform/v1beta1/value.proto", "../../protos/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts index 78b017839d44..6182f218727d 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts @@ -903,6 +903,114 @@ describe('v1.PredictionServiceClient', () => { }); }); + describe('embedContent', () => { + it('invokes embedContent without error', async () => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentResponse() + ); + client.innerApiCalls.embedContent = stubSimpleCall(expectedResponse); + const [response] = await client.embedContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent without error using callback', async () => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentResponse() + ); + client.innerApiCalls.embedContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.embedContent( + request, + (err?: Error|null, result?: protos.google.cloud.aiplatform.v1.IEmbedContentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent with error', async () => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.embedContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.embedContent(request), expectedError); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent with closed client', async () => { + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.embedContent(request), expectedError); + }); + }); + describe('streamRawPredict', () => { it('invokes streamRawPredict without error', async () => { const client = new predictionserviceModule.v1.PredictionServiceClient({ diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts index 7dd03af88f7f..14911acca18a 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts @@ -1011,6 +1011,114 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); + describe('embedContent', () => { + it('invokes embedContent without error', async () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1beta1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentResponse() + ); + client.innerApiCalls.embedContent = stubSimpleCall(expectedResponse); + const [response] = await client.embedContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent without error using callback', async () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1beta1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentResponse() + ); + client.innerApiCalls.embedContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.embedContent( + request, + (err?: Error|null, result?: protos.google.cloud.aiplatform.v1beta1.IEmbedContentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent with error', async () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1beta1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.embedContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.embedContent(request), expectedError); + const actualRequest = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.embedContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedContent with closed client', async () => { + const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EmbedContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.aiplatform.v1beta1.EmbedContentRequest', ['model']); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.embedContent(request), expectedError); + }); + }); + describe('streamRawPredict', () => { it('invokes streamRawPredict without error', async () => { const client = new predictionserviceModule.v1beta1.PredictionServiceClient({ diff --git a/packages/google-cloud-backupdr/CHANGELOG.md b/packages/google-cloud-backupdr/CHANGELOG.md index 58be67f4c039..03429ac1547b 100644 --- a/packages/google-cloud-backupdr/CHANGELOG.md +++ b/packages/google-cloud-backupdr/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/backupdr-v0.6.0...backupdr-v0.7.0) (2025-11-21) + + +### Features + +* [backupdr] Adding new fields for CMEK and Retention Inheritance features ([#6901](https://github.com/googleapis/google-cloud-node/issues/6901)) ([b26f79d](https://github.com/googleapis/google-cloud-node/commit/b26f79d452a55f26a309166362ca3a6a1cda89c1)) + +## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/backupdr-v0.5.1...backupdr-v0.6.0) (2025-11-11) + + +### Features + +* [backupdr] Adding `unreachable` field to `ListDataSourceReferences` API ([#6865](https://github.com/googleapis/google-cloud-node/issues/6865)) ([44f08c6](https://github.com/googleapis/google-cloud-node/commit/44f08c6d3e7d9377e7e070c8ba3dcb949e2642c1)) + ## [0.5.1](https://github.com/googleapis/google-cloud-node/compare/backupdr-v0.5.0...backupdr-v0.5.1) (2025-10-13) diff --git a/packages/google-cloud-backupdr/README.md b/packages/google-cloud-backupdr/README.md index a075ffc7fc23..6284940c7539 100644 --- a/packages/google-cloud-backupdr/README.md +++ b/packages/google-cloud-backupdr/README.md @@ -68,6 +68,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | delete backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js) | | delete management server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js) | | fetch backup plan associations for resource type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_backup_plan_associations_for_resource_type.js) | +| fetch backups for resource type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_backups_for_resource_type.js) | | fetch data source references for resource type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_data_source_references_for_resource_type.js) | | fetch usable backup vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js) | | get backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js) | @@ -84,6 +85,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list backup plans | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js) | | list backup vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js) | | list backups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js) | +| list data source references | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_source_references.js) | | list data sources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js) | | list management servers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js) | | restore backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js) | diff --git a/packages/google-cloud-backupdr/package.json b/packages/google-cloud-backupdr/package.json index 20783ba54816..9bdcbe2dd2cf 100644 --- a/packages/google-cloud-backupdr/package.json +++ b/packages/google-cloud-backupdr/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/backupdr", - "version": "0.5.1", + "version": "0.7.0", "description": "Backup and DR Service API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto index bead68e09363..3624e8b2ddd8 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto @@ -200,6 +200,15 @@ service BackupDR { option (google.api.method_signature) = "parent"; } + // Fetch Backups for a given resource type. + rpc FetchBackupsForResourceType(FetchBackupsForResourceTypeRequest) + returns (FetchBackupsForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + // Gets details of a Backup. rpc GetBackup(GetBackupRequest) returns (Backup) { option (google.api.http) = { @@ -417,6 +426,15 @@ service BackupDR { option (google.api.method_signature) = "name"; } + // Lists DataSourceReferences for a given project and location. + rpc ListDataSourceReferences(ListDataSourceReferencesRequest) + returns (ListDataSourceReferencesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataSourceReferences" + }; + option (google.api.method_signature) = "parent"; + } + // Fetch DataSourceReferences for a given project, location and resource type. rpc FetchDataSourceReferencesForResourceType( FetchDataSourceReferencesForResourceTypeRequest) diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto index 45ff43b4c213..8e82cbdb8783 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto @@ -35,6 +35,14 @@ option java_outer_classname = "BackupVaultProto"; option java_package = "com.google.cloud.backupdr.v1"; option php_namespace = "Google\\Cloud\\BackupDR\\V1"; option ruby_package = "Google::Cloud::BackupDR::V1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; // Message describing a BackupVault object. message BackupVault { @@ -45,6 +53,28 @@ message BackupVault { singular: "backupVault" }; + // How a backup's enforced retention end time is inherited. + enum BackupRetentionInheritance { + // Inheritance behavior not set. This will default to + // `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0; + + // The enforced retention end time of a backup will be inherited from the + // backup vault's `backup_minimum_enforced_retention_duration` field. + // + // This is the default behavior. + INHERIT_VAULT_RETENTION = 1; + + // The enforced retention end time of a backup will always match the expire + // time of the backup. + // + // If this is set, the backup's enforced retention end time will be set to + // match the expire time during creation of the backup. When updating, the + // ERET and expire time must be updated together and have the same value. + // Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2; + } + // Holds the state of the backup vault resource. enum State { // State not set. @@ -87,6 +117,21 @@ message BackupVault { WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4; } + // Message describing the EncryptionConfig of backup vault. + // This determines how data within the vault is encrypted at rest. + message EncryptionConfig { + // Optional. The Cloud KMS key name to encrypt backups in this backup vault. + // Must be in the same region as the vault. Some workload backups like + // compute disk backups may use their inherited source key instead. Format: + // projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key} + optional string kms_key_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + } + // Output only. Identifier. Name of the backup vault to create. It must have // the // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. @@ -118,6 +163,11 @@ message BackupVault { optional google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(google.api.field_behavior) = REQUIRED]; + // Optional. Setting for how a backup's enforced retention end time is + // inherited. + optional BackupRetentionInheritance backup_retention_inheritance = 27 + [(google.api.field_behavior) = OPTIONAL]; + // Output only. Set to true when there are no backups nested under this // resource. optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -161,6 +211,10 @@ message BackupVault { // Default value is WITHIN_ORGANIZATION if not provided during creation. AccessRestriction access_restriction = 24 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption config of the backup vault. + optional EncryptionConfig encryption_config = 29 + [(google.api.field_behavior) = OPTIONAL]; } // Message describing a DataSource object. @@ -569,6 +623,11 @@ message Backup { optional google.protobuf.Timestamp enforced_retention_end_time = 6 [(google.api.field_behavior) = OPTIONAL]; + // Output only. Setting for how the enforced retention end time is inherited. + // This value is copied from this backup's BackupVault. + optional BackupVault.BackupRetentionInheritance backup_retention_inheritance = + 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. When this backup is automatically expired. optional google.protobuf.Timestamp expire_time = 7 [(google.api.field_behavior) = OPTIONAL]; @@ -637,6 +696,23 @@ message Backup { (google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL ]; + + // Resource that is being backed up. + oneof source_resource { + // Output only. Unique identifier of the GCP resource that is being backed + // up. + BackupGcpResource gcp_resource = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Optional. Output only. The list of KMS key versions used to encrypt the + // backup. + repeated string kms_key_versions = 33 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; } // Message for creating a BackupVault. @@ -780,6 +856,62 @@ message FetchUsableBackupVaultsResponse { repeated string unreachable = 3; } +// Request for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeRequest { + // Required. Datasources are the parent resource for the backups. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Required. The type of the GCP resource. + // Ex: sqladmin.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of Backups to return. The service may + // return fewer than this value. If unspecified, at most 50 + // Backups will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchBackupsForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchBackupsForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This parameter is used to specify the view of the backup. + // If not specified, the default view is BASIC. + BackupView view = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeResponse { + // The Backups from the specified parent. + repeated Backup backups = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + // Request message for getting a BackupVault. message GetBackupVaultRequest { // Required. Name of the backupvault store resource name, in the format @@ -1159,6 +1291,21 @@ message RestoreBackupRequest { // Disk properties to be overridden during restore. DiskRestoreProperties disk_restore_properties = 7; } + + // Optional. A field mask used to clear server-side default values + // for fields within the `instance_properties` oneof. + // + // When a field in this mask is cleared, the server will not apply its + // default logic (like inheriting a value from the source) for that field. + // + // The most common current use case is clearing default encryption keys. + // + // Examples of field mask paths: + // - Compute Instance Disks: + // `compute_instance_restore_properties.disks.*.disk_encryption_key` + // - Single Disk: `disk_restore_properties.disk_encryption_key` + optional google.protobuf.FieldMask clear_overrides_field_mask = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Response message for restoring from a Backup. @@ -1189,6 +1336,19 @@ message GcpResource { string type = 3; } +// Minimum details to identify a Google Cloud resource for a backup. +message BackupGcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + // Backup configuration state. Is the resource configured for backup? enum BackupConfigState { // The possible states of backup configuration. diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_cloudsql.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_cloudsql.proto index dbc9bd338e27..c50279109b45 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_cloudsql.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_cloudsql.proto @@ -79,9 +79,17 @@ message CloudSqlInstanceBackupProperties { } ]; + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The tier (or machine type) for this instance. Example: // `db-custom-1-3840` string instance_tier = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance delete timestamp. + google.protobuf.Timestamp instance_delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // CloudSqlInstanceDataSourceReferenceProperties represents the properties of a diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/datasourcereference.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/datasourcereference.proto index a84483c96fa8..706266398792 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/datasourcereference.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/datasourcereference.proto @@ -73,6 +73,11 @@ message DataSourceReference { // Output only. The GCP resource that the DataSource is associated with. DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources for the + // referenced datasource. + optional int64 total_stored_bytes = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Information of backup configuration on the DataSource. @@ -122,6 +127,64 @@ message GetDataSourceReferenceRequest { ]; } +// Request for the ListDataSourceReferences method. +message ListDataSourceReferencesRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSourceReference" + } + ]; + + // Optional. The maximum number of DataSourceReferences to return. The service + // may return fewer than this value. If unspecified, at most 50 + // DataSourceReferences will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataSourceReferences` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDataSourceReferences` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. + // + // The following field and operator combinations are supported: + // + // * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + // * data_source_gcp_resource_info.type with `=`, `!=` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // + // * data_source + // * data_source_gcp_resource_info.gcp_resourcename + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the ListDataSourceReferences method. +message ListDataSourceReferencesResponse { + // The DataSourceReferences from the specified parent. + repeated DataSourceReference data_source_references = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + // Request for the FetchDataSourceReferencesForResourceType method. message FetchDataSourceReferencesForResourceTypeRequest { // Required. The parent resource name. diff --git a/packages/google-cloud-backupdr/protos/protos.d.ts b/packages/google-cloud-backupdr/protos/protos.d.ts index e8f13e6da8f1..1795a47a51d7 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -242,6 +242,20 @@ export namespace google { */ public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; + /** + * Calls FetchBackupsForResourceType. + * @param request FetchBackupsForResourceTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchBackupsForResourceTypeResponse + */ + public fetchBackupsForResourceType(request: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceTypeCallback): void; + + /** + * Calls FetchBackupsForResourceType. + * @param request FetchBackupsForResourceTypeRequest message or plain object + * @returns Promise + */ + public fetchBackupsForResourceType(request: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest): Promise; + /** * Calls GetBackup. * @param request GetBackupRequest message or plain object @@ -508,6 +522,20 @@ export namespace google { */ public getDataSourceReference(request: google.cloud.backupdr.v1.IGetDataSourceReferenceRequest): Promise; + /** + * Calls ListDataSourceReferences. + * @param request ListDataSourceReferencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourceReferencesResponse + */ + public listDataSourceReferences(request: google.cloud.backupdr.v1.IListDataSourceReferencesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourceReferencesCallback): void; + + /** + * Calls ListDataSourceReferences. + * @param request ListDataSourceReferencesRequest message or plain object + * @returns Promise + */ + public listDataSourceReferences(request: google.cloud.backupdr.v1.IListDataSourceReferencesRequest): Promise; + /** * Calls FetchDataSourceReferencesForResourceType. * @param request FetchDataSourceReferencesForResourceTypeRequest message or plain object @@ -637,6 +665,13 @@ export namespace google { */ type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchBackupsForResourceType}. + * @param error Error, if any + * @param [response] FetchBackupsForResourceTypeResponse + */ + type FetchBackupsForResourceTypeCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse) => void; + /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. * @param error Error, if any @@ -770,6 +805,13 @@ export namespace google { */ type GetDataSourceReferenceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSourceReference) => void; + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSourceReferences}. + * @param error Error, if any + * @param [response] ListDataSourceReferencesResponse + */ + type ListDataSourceReferencesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourceReferencesResponse) => void; + /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchDataSourceReferencesForResourceType}. * @param error Error, if any @@ -5518,8 +5560,14 @@ export namespace google { /** CloudSqlInstanceBackupProperties sourceInstance */ sourceInstance?: (string|null); + /** CloudSqlInstanceBackupProperties instanceCreateTime */ + instanceCreateTime?: (google.protobuf.ITimestamp|null); + /** CloudSqlInstanceBackupProperties instanceTier */ instanceTier?: (string|null); + + /** CloudSqlInstanceBackupProperties instanceDeleteTime */ + instanceDeleteTime?: (google.protobuf.ITimestamp|null); } /** Represents a CloudSqlInstanceBackupProperties. */ @@ -5540,9 +5588,15 @@ export namespace google { /** CloudSqlInstanceBackupProperties sourceInstance. */ public sourceInstance: string; + /** CloudSqlInstanceBackupProperties instanceCreateTime. */ + public instanceCreateTime?: (google.protobuf.ITimestamp|null); + /** CloudSqlInstanceBackupProperties instanceTier. */ public instanceTier: string; + /** CloudSqlInstanceBackupProperties instanceDeleteTime. */ + public instanceDeleteTime?: (google.protobuf.ITimestamp|null); + /** * Creates a new CloudSqlInstanceBackupProperties instance using the specified properties. * @param [properties] Properties to set @@ -5961,6 +6015,9 @@ export namespace google { /** BackupVault backupMinimumEnforcedRetentionDuration */ backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + /** BackupVault backupRetentionInheritance */ + backupRetentionInheritance?: (google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null); + /** BackupVault deletable */ deletable?: (boolean|null); @@ -5990,6 +6047,9 @@ export namespace google { /** BackupVault accessRestriction */ accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); + + /** BackupVault encryptionConfig */ + encryptionConfig?: (google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null); } /** Represents a BackupVault. */ @@ -6019,6 +6079,9 @@ export namespace google { /** BackupVault backupMinimumEnforcedRetentionDuration. */ public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + /** BackupVault backupRetentionInheritance. */ + public backupRetentionInheritance?: (google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null); + /** BackupVault deletable. */ public deletable?: (boolean|null); @@ -6049,6 +6112,9 @@ export namespace google { /** BackupVault accessRestriction. */ public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); + /** BackupVault encryptionConfig. */ + public encryptionConfig?: (google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null); + /** * Creates a new BackupVault instance using the specified properties. * @param [properties] Properties to set @@ -6129,6 +6195,13 @@ export namespace google { namespace BackupVault { + /** BackupRetentionInheritance enum. */ + enum BackupRetentionInheritance { + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0, + INHERIT_VAULT_RETENTION = 1, + MATCH_BACKUP_EXPIRE_TIME = 2 + } + /** State enum. */ enum State { STATE_UNSPECIFIED = 0, @@ -6147,6 +6220,103 @@ export namespace google { UNRESTRICTED = 3, WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.BackupVault.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.BackupVault.IEncryptionConfig): google.cloud.backupdr.v1.BackupVault.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.BackupVault.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.BackupVault.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @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.backupdr.v1.BackupVault.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @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.backupdr.v1.BackupVault.EncryptionConfig; + + /** + * Verifies an EncryptionConfig 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 EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupVault.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a DataSource. */ @@ -7352,6 +7522,9 @@ export namespace google { /** Backup enforcedRetentionEndTime */ enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + /** Backup backupRetentionInheritance */ + backupRetentionInheritance?: (google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null); + /** Backup expireTime */ expireTime?: (google.protobuf.ITimestamp|null); @@ -7396,6 +7569,12 @@ export namespace google { /** Backup satisfiesPzi */ satisfiesPzi?: (boolean|null); + + /** Backup gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IBackupGcpResource|null); + + /** Backup kmsKeyVersions */ + kmsKeyVersions?: (string[]|null); } /** Represents a Backup. */ @@ -7425,6 +7604,9 @@ export namespace google { /** Backup enforcedRetentionEndTime. */ public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + /** Backup backupRetentionInheritance. */ + public backupRetentionInheritance?: (google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null); + /** Backup expireTime. */ public expireTime?: (google.protobuf.ITimestamp|null); @@ -7470,12 +7652,21 @@ export namespace google { /** Backup satisfiesPzi. */ public satisfiesPzi?: (boolean|null); + /** Backup gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IBackupGcpResource|null); + + /** Backup kmsKeyVersions. */ + public kmsKeyVersions: string[]; + /** Backup backupProperties. */ public backupProperties?: ("computeInstanceBackupProperties"|"cloudSqlInstanceBackupProperties"|"backupApplianceBackupProperties"|"diskBackupProperties"); /** Backup planInfo. */ public planInfo?: "gcpBackupPlanInfo"; + /** Backup sourceResource. */ + public sourceResource?: "gcpResource"; + /** * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set @@ -8277,6 +8468,242 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FetchBackupsForResourceTypeRequest. */ + interface IFetchBackupsForResourceTypeRequest { + + /** FetchBackupsForResourceTypeRequest parent */ + parent?: (string|null); + + /** FetchBackupsForResourceTypeRequest resourceType */ + resourceType?: (string|null); + + /** FetchBackupsForResourceTypeRequest pageSize */ + pageSize?: (number|null); + + /** FetchBackupsForResourceTypeRequest pageToken */ + pageToken?: (string|null); + + /** FetchBackupsForResourceTypeRequest filter */ + filter?: (string|null); + + /** FetchBackupsForResourceTypeRequest orderBy */ + orderBy?: (string|null); + + /** FetchBackupsForResourceTypeRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a FetchBackupsForResourceTypeRequest. */ + class FetchBackupsForResourceTypeRequest implements IFetchBackupsForResourceTypeRequest { + + /** + * Constructs a new FetchBackupsForResourceTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest); + + /** FetchBackupsForResourceTypeRequest parent. */ + public parent: string; + + /** FetchBackupsForResourceTypeRequest resourceType. */ + public resourceType: string; + + /** FetchBackupsForResourceTypeRequest pageSize. */ + public pageSize: number; + + /** FetchBackupsForResourceTypeRequest pageToken. */ + public pageToken: string; + + /** FetchBackupsForResourceTypeRequest filter. */ + public filter: string; + + /** FetchBackupsForResourceTypeRequest orderBy. */ + public orderBy: string; + + /** FetchBackupsForResourceTypeRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new FetchBackupsForResourceTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupsForResourceTypeRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest): google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupsForResourceTypeRequest + * @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.backupdr.v1.FetchBackupsForResourceTypeRequest; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupsForResourceTypeRequest + * @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.backupdr.v1.FetchBackupsForResourceTypeRequest; + + /** + * Verifies a FetchBackupsForResourceTypeRequest 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 FetchBackupsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupsForResourceTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeRequest message. Also converts values to other types if specified. + * @param message FetchBackupsForResourceTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupsForResourceTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchBackupsForResourceTypeResponse. */ + interface IFetchBackupsForResourceTypeResponse { + + /** FetchBackupsForResourceTypeResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); + + /** FetchBackupsForResourceTypeResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchBackupsForResourceTypeResponse. */ + class FetchBackupsForResourceTypeResponse implements IFetchBackupsForResourceTypeResponse { + + /** + * Constructs a new FetchBackupsForResourceTypeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse); + + /** FetchBackupsForResourceTypeResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; + + /** FetchBackupsForResourceTypeResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchBackupsForResourceTypeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupsForResourceTypeResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse): google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse; + + /** + * Encodes the specified FetchBackupsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupsForResourceTypeResponse + * @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.backupdr.v1.FetchBackupsForResourceTypeResponse; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupsForResourceTypeResponse + * @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.backupdr.v1.FetchBackupsForResourceTypeResponse; + + /** + * Verifies a FetchBackupsForResourceTypeResponse 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 FetchBackupsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupsForResourceTypeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeResponse message. Also converts values to other types if specified. + * @param message FetchBackupsForResourceTypeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupsForResourceTypeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetBackupVaultRequest. */ interface IGetBackupVaultRequest { @@ -9656,6 +10083,9 @@ export namespace google { /** RestoreBackupRequest diskRestoreProperties */ diskRestoreProperties?: (google.cloud.backupdr.v1.IDiskRestoreProperties|null); + + /** RestoreBackupRequest clearOverridesFieldMask */ + clearOverridesFieldMask?: (google.protobuf.IFieldMask|null); } /** Represents a RestoreBackupRequest. */ @@ -9688,6 +10118,9 @@ export namespace google { /** RestoreBackupRequest diskRestoreProperties. */ public diskRestoreProperties?: (google.cloud.backupdr.v1.IDiskRestoreProperties|null); + /** RestoreBackupRequest clearOverridesFieldMask. */ + public clearOverridesFieldMask?: (google.protobuf.IFieldMask|null); + /** RestoreBackupRequest targetEnvironment. */ public targetEnvironment?: ("computeInstanceTargetEnvironment"|"diskTargetEnvironment"|"regionDiskTargetEnvironment"); @@ -10078,6 +10511,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BackupGcpResource. */ + interface IBackupGcpResource { + + /** BackupGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** BackupGcpResource location */ + location?: (string|null); + + /** BackupGcpResource type */ + type?: (string|null); + } + + /** Represents a BackupGcpResource. */ + class BackupGcpResource implements IBackupGcpResource { + + /** + * Constructs a new BackupGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupGcpResource); + + /** BackupGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** BackupGcpResource location. */ + public location: string; + + /** BackupGcpResource type. */ + public type: string; + + /** + * Creates a new BackupGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupGcpResource): google.cloud.backupdr.v1.BackupGcpResource; + + /** + * Encodes the specified BackupGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * @param message BackupGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * @param message BackupGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupGcpResource + * @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.backupdr.v1.BackupGcpResource; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupGcpResource + * @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.backupdr.v1.BackupGcpResource; + + /** + * Verifies a BackupGcpResource 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 BackupGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupGcpResource; + + /** + * Creates a plain object from a BackupGcpResource message. Also converts values to other types if specified. + * @param message BackupGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** BackupConfigState enum. */ enum BackupConfigState { BACKUP_CONFIG_STATE_UNSPECIFIED = 0, @@ -14138,6 +14680,9 @@ export namespace google { /** DataSourceReference dataSourceGcpResourceInfo */ dataSourceGcpResourceInfo?: (google.cloud.backupdr.v1.IDataSourceGcpResourceInfo|null); + + /** DataSourceReference totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); } /** Represents a DataSourceReference. */ @@ -14170,6 +14715,9 @@ export namespace google { /** DataSourceReference dataSourceGcpResourceInfo. */ public dataSourceGcpResourceInfo?: (google.cloud.backupdr.v1.IDataSourceGcpResourceInfo|null); + /** DataSourceReference totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + /** * Creates a new DataSourceReference instance using the specified properties. * @param [properties] Properties to set @@ -14566,6 +15114,236 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ListDataSourceReferencesRequest. */ + interface IListDataSourceReferencesRequest { + + /** ListDataSourceReferencesRequest parent */ + parent?: (string|null); + + /** ListDataSourceReferencesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourceReferencesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourceReferencesRequest filter */ + filter?: (string|null); + + /** ListDataSourceReferencesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourceReferencesRequest. */ + class ListDataSourceReferencesRequest implements IListDataSourceReferencesRequest { + + /** + * Constructs a new ListDataSourceReferencesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourceReferencesRequest); + + /** ListDataSourceReferencesRequest parent. */ + public parent: string; + + /** ListDataSourceReferencesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourceReferencesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourceReferencesRequest filter. */ + public filter: string; + + /** ListDataSourceReferencesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourceReferencesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourceReferencesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourceReferencesRequest): google.cloud.backupdr.v1.ListDataSourceReferencesRequest; + + /** + * Encodes the specified ListDataSourceReferencesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesRequest.verify|verify} messages. + * @param message ListDataSourceReferencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourceReferencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourceReferencesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesRequest.verify|verify} messages. + * @param message ListDataSourceReferencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourceReferencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourceReferencesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourceReferencesRequest + * @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.backupdr.v1.ListDataSourceReferencesRequest; + + /** + * Decodes a ListDataSourceReferencesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourceReferencesRequest + * @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.backupdr.v1.ListDataSourceReferencesRequest; + + /** + * Verifies a ListDataSourceReferencesRequest 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 ListDataSourceReferencesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourceReferencesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourceReferencesRequest; + + /** + * Creates a plain object from a ListDataSourceReferencesRequest message. Also converts values to other types if specified. + * @param message ListDataSourceReferencesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourceReferencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourceReferencesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourceReferencesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourceReferencesResponse. */ + interface IListDataSourceReferencesResponse { + + /** ListDataSourceReferencesResponse dataSourceReferences */ + dataSourceReferences?: (google.cloud.backupdr.v1.IDataSourceReference[]|null); + + /** ListDataSourceReferencesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourceReferencesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourceReferencesResponse. */ + class ListDataSourceReferencesResponse implements IListDataSourceReferencesResponse { + + /** + * Constructs a new ListDataSourceReferencesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourceReferencesResponse); + + /** ListDataSourceReferencesResponse dataSourceReferences. */ + public dataSourceReferences: google.cloud.backupdr.v1.IDataSourceReference[]; + + /** ListDataSourceReferencesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourceReferencesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourceReferencesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourceReferencesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourceReferencesResponse): google.cloud.backupdr.v1.ListDataSourceReferencesResponse; + + /** + * Encodes the specified ListDataSourceReferencesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesResponse.verify|verify} messages. + * @param message ListDataSourceReferencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourceReferencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourceReferencesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesResponse.verify|verify} messages. + * @param message ListDataSourceReferencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourceReferencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourceReferencesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourceReferencesResponse + * @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.backupdr.v1.ListDataSourceReferencesResponse; + + /** + * Decodes a ListDataSourceReferencesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourceReferencesResponse + * @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.backupdr.v1.ListDataSourceReferencesResponse; + + /** + * Verifies a ListDataSourceReferencesResponse 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 ListDataSourceReferencesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourceReferencesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourceReferencesResponse; + + /** + * Creates a plain object from a ListDataSourceReferencesResponse message. Also converts values to other types if specified. + * @param message ListDataSourceReferencesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourceReferencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourceReferencesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourceReferencesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a FetchDataSourceReferencesForResourceTypeRequest. */ interface IFetchDataSourceReferencesForResourceTypeRequest { diff --git a/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index b47e783e9f9d..41d226cbad67 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -560,6 +560,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchBackupsForResourceType}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchBackupsForResourceTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} [response] FetchBackupsForResourceTypeResponse + */ + + /** + * Calls FetchBackupsForResourceType. + * @function fetchBackupsForResourceType + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} request FetchBackupsForResourceTypeRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceTypeCallback} callback Node-style callback called with the error, if any, and FetchBackupsForResourceTypeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchBackupsForResourceType = function fetchBackupsForResourceType(request, callback) { + return this.rpcCall(fetchBackupsForResourceType, $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest, $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse, request, callback); + }, "name", { value: "FetchBackupsForResourceType" }); + + /** + * Calls FetchBackupsForResourceType. + * @function fetchBackupsForResourceType + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} request FetchBackupsForResourceTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. * @memberof google.cloud.backupdr.v1.BackupDR @@ -1187,6 +1220,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSourceReferences}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListDataSourceReferencesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} [response] ListDataSourceReferencesResponse + */ + + /** + * Calls ListDataSourceReferences. + * @function listDataSourceReferences + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest} request ListDataSourceReferencesRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourceReferencesCallback} callback Node-style callback called with the error, if any, and ListDataSourceReferencesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listDataSourceReferences = function listDataSourceReferences(request, callback) { + return this.rpcCall(listDataSourceReferences, $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest, $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse, request, callback); + }, "name", { value: "ListDataSourceReferences" }); + + /** + * Calls ListDataSourceReferences. + * @function listDataSourceReferences + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest} request ListDataSourceReferencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchDataSourceReferencesForResourceType}. * @memberof google.cloud.backupdr.v1.BackupDR @@ -13647,7 +13713,9 @@ * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceBackupProperties databaseInstalledVersion * @property {boolean|null} [finalBackup] CloudSqlInstanceBackupProperties finalBackup * @property {string|null} [sourceInstance] CloudSqlInstanceBackupProperties sourceInstance + * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceBackupProperties instanceCreateTime * @property {string|null} [instanceTier] CloudSqlInstanceBackupProperties instanceTier + * @property {google.protobuf.ITimestamp|null} [instanceDeleteTime] CloudSqlInstanceBackupProperties instanceDeleteTime */ /** @@ -13689,6 +13757,14 @@ */ CloudSqlInstanceBackupProperties.prototype.sourceInstance = ""; + /** + * CloudSqlInstanceBackupProperties instanceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.instanceCreateTime = null; + /** * CloudSqlInstanceBackupProperties instanceTier. * @member {string} instanceTier @@ -13697,6 +13773,14 @@ */ CloudSqlInstanceBackupProperties.prototype.instanceTier = ""; + /** + * CloudSqlInstanceBackupProperties instanceDeleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceDeleteTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.instanceDeleteTime = null; + /** * Creates a new CloudSqlInstanceBackupProperties instance using the specified properties. * @function create @@ -13727,8 +13811,12 @@ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.finalBackup); if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceInstance); + if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.instanceTier); + if (message.instanceDeleteTime != null && Object.hasOwnProperty.call(message, "instanceDeleteTime")) + $root.google.protobuf.Timestamp.encode(message.instanceDeleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -13777,10 +13865,18 @@ message.sourceInstance = reader.string(); break; } + case 5: { + message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 6: { message.instanceTier = reader.string(); break; } + case 8: { + message.instanceDeleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13825,9 +13921,19 @@ if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) if (!$util.isString(message.sourceInstance)) return "sourceInstance: string expected"; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); + if (error) + return "instanceCreateTime." + error; + } if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) if (!$util.isString(message.instanceTier)) return "instanceTier: string expected"; + if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceDeleteTime); + if (error) + return "instanceDeleteTime." + error; + } return null; }; @@ -13849,8 +13955,18 @@ message.finalBackup = Boolean(object.finalBackup); if (object.sourceInstance != null) message.sourceInstance = String(object.sourceInstance); + if (object.instanceCreateTime != null) { + if (typeof object.instanceCreateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceCreateTime: object expected"); + message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); + } if (object.instanceTier != null) message.instanceTier = String(object.instanceTier); + if (object.instanceDeleteTime != null) { + if (typeof object.instanceDeleteTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceDeleteTime: object expected"); + message.instanceDeleteTime = $root.google.protobuf.Timestamp.fromObject(object.instanceDeleteTime); + } return message; }; @@ -13871,7 +13987,9 @@ object.databaseInstalledVersion = ""; object.finalBackup = false; object.sourceInstance = ""; + object.instanceCreateTime = null; object.instanceTier = ""; + object.instanceDeleteTime = null; } if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) object.databaseInstalledVersion = message.databaseInstalledVersion; @@ -13879,8 +13997,12 @@ object.finalBackup = message.finalBackup; if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) object.sourceInstance = message.sourceInstance; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) + object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) object.instanceTier = message.instanceTier; + if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) + object.instanceDeleteTime = $root.google.protobuf.Timestamp.toObject(message.instanceDeleteTime, options); return object; }; @@ -14660,6 +14782,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] BackupVault backupRetentionInheritance * @property {boolean|null} [deletable] BackupVault deletable * @property {string|null} [etag] BackupVault etag * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state @@ -14670,6 +14793,7 @@ * @property {string|null} [uid] BackupVault uid * @property {Object.|null} [annotations] BackupVault annotations * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + * @property {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null} [encryptionConfig] BackupVault encryptionConfig */ /** @@ -14737,6 +14861,14 @@ */ BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + /** + * BackupVault backupRetentionInheritance. + * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupRetentionInheritance = null; + /** * BackupVault deletable. * @member {boolean|null|undefined} deletable @@ -14817,6 +14949,14 @@ */ BackupVault.prototype.accessRestriction = 0; + /** + * BackupVault encryptionConfig. + * @member {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.encryptionConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -14844,6 +14984,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_backupRetentionInheritance", { + get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(BackupVault.prototype, "_deletable", { get: $util.oneOfGetter($oneOfFields = ["deletable"]), @@ -14862,6 +15008,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_encryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["encryptionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new BackupVault instance using the specified properties. * @function create @@ -14920,6 +15072,10 @@ writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.backupRetentionInheritance); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); return writer; }; @@ -14999,6 +15155,10 @@ message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 27: { + message.backupRetentionInheritance = reader.int32(); + break; + } case 8: { message.deletable = reader.bool(); break; @@ -15058,6 +15218,10 @@ message.accessRestriction = reader.int32(); break; } + case 29: { + message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15134,6 +15298,17 @@ return "backupMinimumEnforcedRetentionDuration." + error; } } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + properties._backupRetentionInheritance = 1; + switch (message.backupRetentionInheritance) { + default: + return "backupRetentionInheritance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } if (message.deletable != null && message.hasOwnProperty("deletable")) { properties._deletable = 1; if (typeof message.deletable !== "boolean") @@ -15195,6 +15370,14 @@ case 4: break; } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + properties._encryptionConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + } return null; }; @@ -15236,6 +15419,26 @@ throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); } + switch (object.backupRetentionInheritance) { + default: + if (typeof object.backupRetentionInheritance === "number") { + message.backupRetentionInheritance = object.backupRetentionInheritance; + break; + } + break; + case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": + case 0: + message.backupRetentionInheritance = 0; + break; + case "INHERIT_VAULT_RETENTION": + case 1: + message.backupRetentionInheritance = 1; + break; + case "MATCH_BACKUP_EXPIRE_TIME": + case 2: + message.backupRetentionInheritance = 2; + break; + } if (object.deletable != null) message.deletable = Boolean(object.deletable); if (object.etag != null) @@ -15334,6 +15537,11 @@ message.accessRestriction = 4; break; } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.fromObject(object.encryptionConfig); + } return message; }; @@ -15437,6 +15645,16 @@ } if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; + if (options.oneofs) + object._backupRetentionInheritance = "backupRetentionInheritance"; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + object.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.toObject(message.encryptionConfig, options); + if (options.oneofs) + object._encryptionConfig = "encryptionConfig"; + } return object; }; @@ -15466,6 +15684,22 @@ return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; }; + /** + * BackupRetentionInheritance enum. + * @name google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance + * @enum {number} + * @property {number} BACKUP_RETENTION_INHERITANCE_UNSPECIFIED=0 BACKUP_RETENTION_INHERITANCE_UNSPECIFIED value + * @property {number} INHERIT_VAULT_RETENTION=1 INHERIT_VAULT_RETENTION value + * @property {number} MATCH_BACKUP_EXPIRE_TIME=2 MATCH_BACKUP_EXPIRE_TIME value + */ + BackupVault.BackupRetentionInheritance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_VAULT_RETENTION"] = 1; + values[valuesById[2] = "MATCH_BACKUP_EXPIRE_TIME"] = 2; + return values; + })(); + /** * State enum. * @name google.cloud.backupdr.v1.BackupVault.State @@ -15508,6 +15742,224 @@ return values; })(); + BackupVault.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.backupdr.v1.BackupVault + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.backupdr.v1.BackupVault + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(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]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncryptionConfig.prototype, "_kmsKeyName", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + properties._kmsKeyName = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object._kmsKeyName = "kmsKeyName"; + } + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + return BackupVault; })(); @@ -18982,6 +19434,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime * @property {Object.|null} [labels] Backup labels * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] Backup backupRetentionInheritance * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime * @property {string|null} [etag] Backup etag @@ -18997,6 +19450,8 @@ * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes * @property {boolean|null} [satisfiesPzs] Backup satisfiesPzs * @property {boolean|null} [satisfiesPzi] Backup satisfiesPzi + * @property {google.cloud.backupdr.v1.IBackupGcpResource|null} [gcpResource] Backup gcpResource + * @property {Array.|null} [kmsKeyVersions] Backup kmsKeyVersions */ /** @@ -19011,6 +19466,7 @@ this.labels = {}; this.serviceLocks = []; this.backupApplianceLocks = []; + this.kmsKeyVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19065,6 +19521,14 @@ */ Backup.prototype.enforcedRetentionEndTime = null; + /** + * Backup backupRetentionInheritance. + * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupRetentionInheritance = null; + /** * Backup expireTime. * @member {google.protobuf.ITimestamp|null|undefined} expireTime @@ -19185,6 +19649,22 @@ */ Backup.prototype.satisfiesPzi = null; + /** + * Backup gcpResource. + * @member {google.cloud.backupdr.v1.IBackupGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpResource = null; + + /** + * Backup kmsKeyVersions. + * @member {Array.} kmsKeyVersions + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.kmsKeyVersions = $util.emptyArray; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -19212,6 +19692,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_backupRetentionInheritance", { + get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(Backup.prototype, "_expireTime", { get: $util.oneOfGetter($oneOfFields = ["expireTime"]), @@ -19264,6 +19750,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Backup sourceResource. + * @member {"gcpResource"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Backup instance using the specified properties. * @function create @@ -19333,6 +19830,13 @@ $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.encode(message.cloudSqlInstanceBackupProperties, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); if (message.diskBackupProperties != null && Object.hasOwnProperty.call(message, "diskBackupProperties")) $root.google.cloud.backupdr.v1.DiskBackupProperties.encode(message.diskBackupProperties, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.backupRetentionInheritance); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.BackupGcpResource.encode(message.gcpResource, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.kmsKeyVersions != null && message.kmsKeyVersions.length) + for (var i = 0; i < message.kmsKeyVersions.length; ++i) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.kmsKeyVersions[i]); return writer; }; @@ -19412,6 +19916,10 @@ message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 30: { + message.backupRetentionInheritance = reader.int32(); + break; + } case 7: { message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -19476,6 +19984,16 @@ message.satisfiesPzi = reader.bool(); break; } + case 31: { + message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.decode(reader, reader.uint32()); + break; + } + case 33: { + if (!(message.kmsKeyVersions && message.kmsKeyVersions.length)) + message.kmsKeyVersions = []; + message.kmsKeyVersions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -19552,6 +20070,17 @@ return "enforcedRetentionEndTime." + error; } } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + properties._backupRetentionInheritance = 1; + switch (message.backupRetentionInheritance) { + default: + return "backupRetentionInheritance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } if (message.expireTime != null && message.hasOwnProperty("expireTime")) { properties._expireTime = 1; { @@ -19672,6 +20201,21 @@ if (typeof message.satisfiesPzi !== "boolean") return "satisfiesPzi: boolean expected"; } + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupGcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } + if (message.kmsKeyVersions != null && message.hasOwnProperty("kmsKeyVersions")) { + if (!Array.isArray(message.kmsKeyVersions)) + return "kmsKeyVersions: array expected"; + for (var i = 0; i < message.kmsKeyVersions.length; ++i) + if (!$util.isString(message.kmsKeyVersions[i])) + return "kmsKeyVersions: string[] expected"; + } return null; }; @@ -19713,6 +20257,26 @@ throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); } + switch (object.backupRetentionInheritance) { + default: + if (typeof object.backupRetentionInheritance === "number") { + message.backupRetentionInheritance = object.backupRetentionInheritance; + break; + } + break; + case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": + case 0: + message.backupRetentionInheritance = 0; + break; + case "INHERIT_VAULT_RETENTION": + case 1: + message.backupRetentionInheritance = 1; + break; + case "MATCH_BACKUP_EXPIRE_TIME": + case 2: + message.backupRetentionInheritance = 2; + break; + } if (object.expireTime != null) { if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); @@ -19839,6 +20403,18 @@ message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.satisfiesPzi != null) message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.fromObject(object.gcpResource); + } + if (object.kmsKeyVersions) { + if (!Array.isArray(object.kmsKeyVersions)) + throw TypeError(".google.cloud.backupdr.v1.Backup.kmsKeyVersions: array expected"); + message.kmsKeyVersions = []; + for (var i = 0; i < object.kmsKeyVersions.length; ++i) + message.kmsKeyVersions[i] = String(object.kmsKeyVersions[i]); + } return message; }; @@ -19858,6 +20434,7 @@ if (options.arrays || options.defaults) { object.serviceLocks = []; object.backupApplianceLocks = []; + object.kmsKeyVersions = []; } if (options.objects || options.defaults) object.labels = {}; @@ -19968,6 +20545,21 @@ if (options.oneofs) object.backupProperties = "diskBackupProperties"; } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; + if (options.oneofs) + object._backupRetentionInheritance = "backupRetentionInheritance"; + } + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.sourceResource = "gcpResource"; + } + if (message.kmsKeyVersions && message.kmsKeyVersions.length) { + object.kmsKeyVersions = []; + for (var j = 0; j < message.kmsKeyVersions.length; ++j) + object.kmsKeyVersions[j] = message.kmsKeyVersions[j]; + } return object; }; @@ -21841,6 +22433,624 @@ return FetchUsableBackupVaultsResponse; })(); + v1.FetchBackupsForResourceTypeRequest = (function() { + + /** + * Properties of a FetchBackupsForResourceTypeRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchBackupsForResourceTypeRequest + * @property {string|null} [parent] FetchBackupsForResourceTypeRequest parent + * @property {string|null} [resourceType] FetchBackupsForResourceTypeRequest resourceType + * @property {number|null} [pageSize] FetchBackupsForResourceTypeRequest pageSize + * @property {string|null} [pageToken] FetchBackupsForResourceTypeRequest pageToken + * @property {string|null} [filter] FetchBackupsForResourceTypeRequest filter + * @property {string|null} [orderBy] FetchBackupsForResourceTypeRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] FetchBackupsForResourceTypeRequest view + */ + + /** + * Constructs a new FetchBackupsForResourceTypeRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchBackupsForResourceTypeRequest. + * @implements IFetchBackupsForResourceTypeRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set + */ + function FetchBackupsForResourceTypeRequest(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]]; + } + + /** + * FetchBackupsForResourceTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.parent = ""; + + /** + * FetchBackupsForResourceTypeRequest resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.resourceType = ""; + + /** + * FetchBackupsForResourceTypeRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.pageSize = 0; + + /** + * FetchBackupsForResourceTypeRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.pageToken = ""; + + /** + * FetchBackupsForResourceTypeRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.filter = ""; + + /** + * FetchBackupsForResourceTypeRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.orderBy = ""; + + /** + * FetchBackupsForResourceTypeRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.view = 0; + + /** + * Creates a new FetchBackupsForResourceTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest instance + */ + FetchBackupsForResourceTypeRequest.create = function create(properties) { + return new FetchBackupsForResourceTypeRequest(properties); + }; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchBackupsForResourceTypeRequest.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); + return writer; + }; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchBackupsForResourceTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchBackupsForResourceTypeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 7: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchBackupsForResourceTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchBackupsForResourceTypeRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchBackupsForResourceTypeRequest.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.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: 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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FetchBackupsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + */ + FetchBackupsForResourceTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchBackupsForResourceTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.resourceType = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this FetchBackupsForResourceTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + * @returns {Object.} JSON object + */ + FetchBackupsForResourceTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchBackupsForResourceTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest"; + }; + + return FetchBackupsForResourceTypeRequest; + })(); + + v1.FetchBackupsForResourceTypeResponse = (function() { + + /** + * Properties of a FetchBackupsForResourceTypeResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchBackupsForResourceTypeResponse + * @property {Array.|null} [backups] FetchBackupsForResourceTypeResponse backups + * @property {string|null} [nextPageToken] FetchBackupsForResourceTypeResponse nextPageToken + */ + + /** + * Constructs a new FetchBackupsForResourceTypeResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchBackupsForResourceTypeResponse. + * @implements IFetchBackupsForResourceTypeResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set + */ + function FetchBackupsForResourceTypeResponse(properties) { + this.backups = []; + 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]]; + } + + /** + * FetchBackupsForResourceTypeResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @instance + */ + FetchBackupsForResourceTypeResponse.prototype.backups = $util.emptyArray; + + /** + * FetchBackupsForResourceTypeResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @instance + */ + FetchBackupsForResourceTypeResponse.prototype.nextPageToken = ""; + + /** + * Creates a new FetchBackupsForResourceTypeResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse instance + */ + FetchBackupsForResourceTypeResponse.create = function create(properties) { + return new FetchBackupsForResourceTypeResponse(properties); + }; + + /** + * Encodes the specified FetchBackupsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchBackupsForResourceTypeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 FetchBackupsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchBackupsForResourceTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchBackupsForResourceTypeResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchBackupsForResourceTypeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchBackupsForResourceTypeResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchBackupsForResourceTypeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a FetchBackupsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + */ + FetchBackupsForResourceTypeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchBackupsForResourceTypeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backups = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this FetchBackupsForResourceTypeResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @instance + * @returns {Object.} JSON object + */ + FetchBackupsForResourceTypeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchBackupsForResourceTypeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse"; + }; + + return FetchBackupsForResourceTypeResponse; + })(); + v1.GetBackupVaultRequest = (function() { /** @@ -25239,6 +26449,7 @@ * @property {google.cloud.backupdr.v1.IRegionDiskTargetEnvironment|null} [regionDiskTargetEnvironment] RestoreBackupRequest regionDiskTargetEnvironment * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties * @property {google.cloud.backupdr.v1.IDiskRestoreProperties|null} [diskRestoreProperties] RestoreBackupRequest diskRestoreProperties + * @property {google.protobuf.IFieldMask|null} [clearOverridesFieldMask] RestoreBackupRequest clearOverridesFieldMask */ /** @@ -25312,6 +26523,14 @@ */ RestoreBackupRequest.prototype.diskRestoreProperties = null; + /** + * RestoreBackupRequest clearOverridesFieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} clearOverridesFieldMask + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.clearOverridesFieldMask = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -25337,6 +26556,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(RestoreBackupRequest.prototype, "_clearOverridesFieldMask", { + get: $util.oneOfGetter($oneOfFields = ["clearOverridesFieldMask"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new RestoreBackupRequest instance using the specified properties. * @function create @@ -25375,6 +26600,8 @@ $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.encode(message.regionDiskTargetEnvironment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.diskRestoreProperties != null && Object.hasOwnProperty.call(message, "diskRestoreProperties")) $root.google.cloud.backupdr.v1.DiskRestoreProperties.encode(message.diskRestoreProperties, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.clearOverridesFieldMask != null && Object.hasOwnProperty.call(message, "clearOverridesFieldMask")) + $root.google.protobuf.FieldMask.encode(message.clearOverridesFieldMask, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -25439,6 +26666,10 @@ message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.decode(reader, reader.uint32()); break; } + case 8: { + message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25527,6 +26758,14 @@ return "diskRestoreProperties." + error; } } + if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { + properties._clearOverridesFieldMask = 1; + { + var error = $root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask); + if (error) + return "clearOverridesFieldMask." + error; + } + } return null; }; @@ -25571,6 +26810,11 @@ throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.diskRestoreProperties: object expected"); message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.fromObject(object.diskRestoreProperties); } + if (object.clearOverridesFieldMask != null) { + if (typeof object.clearOverridesFieldMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.clearOverridesFieldMask: object expected"); + message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.fromObject(object.clearOverridesFieldMask); + } return message; }; @@ -25620,6 +26864,11 @@ if (options.oneofs) object.instanceProperties = "diskRestoreProperties"; } + if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { + object.clearOverridesFieldMask = $root.google.protobuf.FieldMask.toObject(message.clearOverridesFieldMask, options); + if (options.oneofs) + object._clearOverridesFieldMask = "clearOverridesFieldMask"; + } return object; }; @@ -26343,6 +27592,258 @@ return GcpResource; })(); + v1.BackupGcpResource = (function() { + + /** + * Properties of a BackupGcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupGcpResource + * @property {string|null} [gcpResourcename] BackupGcpResource gcpResourcename + * @property {string|null} [location] BackupGcpResource location + * @property {string|null} [type] BackupGcpResource type + */ + + /** + * Constructs a new BackupGcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupGcpResource. + * @implements IBackupGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set + */ + function BackupGcpResource(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]]; + } + + /** + * BackupGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @instance + */ + BackupGcpResource.prototype.gcpResourcename = ""; + + /** + * BackupGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @instance + */ + BackupGcpResource.prototype.location = ""; + + /** + * BackupGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @instance + */ + BackupGcpResource.prototype.type = ""; + + /** + * Creates a new BackupGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource instance + */ + BackupGcpResource.create = function create(properties) { + return new BackupGcpResource(properties); + }; + + /** + * Encodes the specified BackupGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified BackupGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupGcpResource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupGcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupGcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupGcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a BackupGcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + */ + BackupGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupGcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a BackupGcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {google.cloud.backupdr.v1.BackupGcpResource} message BackupGcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupGcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this BackupGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @instance + * @returns {Object.} JSON object + */ + BackupGcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupGcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupGcpResource"; + }; + + return BackupGcpResource; + })(); + /** * BackupConfigState enum. * @name google.cloud.backupdr.v1.BackupConfigState @@ -39081,6 +40582,7 @@ * @property {number|Long|null} [dataSourceBackupCount] DataSourceReference dataSourceBackupCount * @property {google.cloud.backupdr.v1.IDataSourceBackupConfigInfo|null} [dataSourceBackupConfigInfo] DataSourceReference dataSourceBackupConfigInfo * @property {google.cloud.backupdr.v1.IDataSourceGcpResourceInfo|null} [dataSourceGcpResourceInfo] DataSourceReference dataSourceGcpResourceInfo + * @property {number|Long|null} [totalStoredBytes] DataSourceReference totalStoredBytes */ /** @@ -39154,6 +40656,23 @@ */ DataSourceReference.prototype.dataSourceGcpResourceInfo = null; + /** + * DataSourceReference totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSourceReference + * @instance + */ + DataSourceReference.prototype.totalStoredBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSourceReference.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DataSourceReference instance using the specified properties. * @function create @@ -39192,6 +40711,8 @@ $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.encode(message.dataSourceBackupConfigInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.dataSourceGcpResourceInfo != null && Object.hasOwnProperty.call(message, "dataSourceGcpResourceInfo")) $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.encode(message.dataSourceGcpResourceInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.totalStoredBytes); return writer; }; @@ -39256,6 +40777,10 @@ message.dataSourceGcpResourceInfo = $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.decode(reader, reader.uint32()); break; } + case 8: { + message.totalStoredBytes = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -39291,6 +40816,7 @@ DataSourceReference.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"; @@ -39324,6 +40850,11 @@ if (error) return "dataSourceGcpResourceInfo." + error; } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } return null; }; @@ -39387,6 +40918,15 @@ throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.dataSourceGcpResourceInfo: object expected"); message.dataSourceGcpResourceInfo = $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.fromObject(object.dataSourceGcpResourceInfo); } + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); return message; }; @@ -39433,6 +40973,14 @@ object.dataSourceBackupConfigInfo = $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.toObject(message.dataSourceBackupConfigInfo, options); if (message.dataSourceGcpResourceInfo != null && message.hasOwnProperty("dataSourceGcpResourceInfo")) object.dataSourceGcpResourceInfo = $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.toObject(message.dataSourceGcpResourceInfo, options); + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } return object; }; @@ -40238,6 +41786,594 @@ return GetDataSourceReferenceRequest; })(); + v1.ListDataSourceReferencesRequest = (function() { + + /** + * Properties of a ListDataSourceReferencesRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourceReferencesRequest + * @property {string|null} [parent] ListDataSourceReferencesRequest parent + * @property {number|null} [pageSize] ListDataSourceReferencesRequest pageSize + * @property {string|null} [pageToken] ListDataSourceReferencesRequest pageToken + * @property {string|null} [filter] ListDataSourceReferencesRequest filter + * @property {string|null} [orderBy] ListDataSourceReferencesRequest orderBy + */ + + /** + * Constructs a new ListDataSourceReferencesRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourceReferencesRequest. + * @implements IListDataSourceReferencesRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest=} [properties] Properties to set + */ + function ListDataSourceReferencesRequest(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]]; + } + + /** + * ListDataSourceReferencesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + */ + ListDataSourceReferencesRequest.prototype.parent = ""; + + /** + * ListDataSourceReferencesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + */ + ListDataSourceReferencesRequest.prototype.pageSize = 0; + + /** + * ListDataSourceReferencesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + */ + ListDataSourceReferencesRequest.prototype.pageToken = ""; + + /** + * ListDataSourceReferencesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + */ + ListDataSourceReferencesRequest.prototype.filter = ""; + + /** + * ListDataSourceReferencesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + */ + ListDataSourceReferencesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataSourceReferencesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesRequest} ListDataSourceReferencesRequest instance + */ + ListDataSourceReferencesRequest.create = function create(properties) { + return new ListDataSourceReferencesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourceReferencesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest} message ListDataSourceReferencesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourceReferencesRequest.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 ListDataSourceReferencesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesRequest} message ListDataSourceReferencesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourceReferencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourceReferencesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesRequest} ListDataSourceReferencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourceReferencesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 ListDataSourceReferencesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesRequest} ListDataSourceReferencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourceReferencesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourceReferencesRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourceReferencesRequest.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 ListDataSourceReferencesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesRequest} ListDataSourceReferencesRequest + */ + ListDataSourceReferencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest(); + 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 ListDataSourceReferencesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {google.cloud.backupdr.v1.ListDataSourceReferencesRequest} message ListDataSourceReferencesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourceReferencesRequest.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 ListDataSourceReferencesRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourceReferencesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourceReferencesRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourceReferencesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourceReferencesRequest"; + }; + + return ListDataSourceReferencesRequest; + })(); + + v1.ListDataSourceReferencesResponse = (function() { + + /** + * Properties of a ListDataSourceReferencesResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourceReferencesResponse + * @property {Array.|null} [dataSourceReferences] ListDataSourceReferencesResponse dataSourceReferences + * @property {string|null} [nextPageToken] ListDataSourceReferencesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourceReferencesResponse unreachable + */ + + /** + * Constructs a new ListDataSourceReferencesResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourceReferencesResponse. + * @implements IListDataSourceReferencesResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesResponse=} [properties] Properties to set + */ + function ListDataSourceReferencesResponse(properties) { + this.dataSourceReferences = []; + 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]]; + } + + /** + * ListDataSourceReferencesResponse dataSourceReferences. + * @member {Array.} dataSourceReferences + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @instance + */ + ListDataSourceReferencesResponse.prototype.dataSourceReferences = $util.emptyArray; + + /** + * ListDataSourceReferencesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @instance + */ + ListDataSourceReferencesResponse.prototype.nextPageToken = ""; + + /** + * ListDataSourceReferencesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @instance + */ + ListDataSourceReferencesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataSourceReferencesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} ListDataSourceReferencesResponse instance + */ + ListDataSourceReferencesResponse.create = function create(properties) { + return new ListDataSourceReferencesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourceReferencesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesResponse} message ListDataSourceReferencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourceReferencesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceReferences != null && message.dataSourceReferences.length) + for (var i = 0; i < message.dataSourceReferences.length; ++i) + $root.google.cloud.backupdr.v1.DataSourceReference.encode(message.dataSourceReferences[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 ListDataSourceReferencesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourceReferencesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourceReferencesResponse} message ListDataSourceReferencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourceReferencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourceReferencesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} ListDataSourceReferencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourceReferencesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataSourceReferences && message.dataSourceReferences.length)) + message.dataSourceReferences = []; + message.dataSourceReferences.push($root.google.cloud.backupdr.v1.DataSourceReference.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 ListDataSourceReferencesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} ListDataSourceReferencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourceReferencesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourceReferencesResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourceReferencesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSourceReferences != null && message.hasOwnProperty("dataSourceReferences")) { + if (!Array.isArray(message.dataSourceReferences)) + return "dataSourceReferences: array expected"; + for (var i = 0; i < message.dataSourceReferences.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSourceReference.verify(message.dataSourceReferences[i]); + if (error) + return "dataSourceReferences." + 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 ListDataSourceReferencesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} ListDataSourceReferencesResponse + */ + ListDataSourceReferencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse(); + if (object.dataSourceReferences) { + if (!Array.isArray(object.dataSourceReferences)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourceReferencesResponse.dataSourceReferences: array expected"); + message.dataSourceReferences = []; + for (var i = 0; i < object.dataSourceReferences.length; ++i) { + if (typeof object.dataSourceReferences[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourceReferencesResponse.dataSourceReferences: object expected"); + message.dataSourceReferences[i] = $root.google.cloud.backupdr.v1.DataSourceReference.fromObject(object.dataSourceReferences[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourceReferencesResponse.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 ListDataSourceReferencesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {google.cloud.backupdr.v1.ListDataSourceReferencesResponse} message ListDataSourceReferencesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourceReferencesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSourceReferences = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSourceReferences && message.dataSourceReferences.length) { + object.dataSourceReferences = []; + for (var j = 0; j < message.dataSourceReferences.length; ++j) + object.dataSourceReferences[j] = $root.google.cloud.backupdr.v1.DataSourceReference.toObject(message.dataSourceReferences[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 ListDataSourceReferencesResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourceReferencesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourceReferencesResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourceReferencesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourceReferencesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourceReferencesResponse"; + }; + + return ListDataSourceReferencesResponse; + })(); + v1.FetchDataSourceReferencesForResourceTypeRequest = (function() { /** diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index 8629664fb398..ad1b78a1c71c 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -333,6 +333,24 @@ } ] }, + "FetchBackupsForResourceType": { + "requestType": "FetchBackupsForResourceTypeRequest", + "responseType": "FetchBackupsForResourceTypeResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType", + "(google.api.method_signature)": "parent,resource_type" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType" + } + }, + { + "(google.api.method_signature)": "parent,resource_type" + } + ] + }, "GetBackup": { "requestType": "GetBackupRequest", "responseType": "Backup", @@ -769,6 +787,24 @@ } ] }, + "ListDataSourceReferences": { + "requestType": "ListDataSourceReferencesRequest", + "responseType": "ListDataSourceReferencesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataSourceReferences", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/dataSourceReferences" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, "FetchDataSourceReferencesForResourceType": { "requestType": "FetchDataSourceReferencesForResourceTypeRequest", "responseType": "FetchDataSourceReferencesForResourceTypeResponse", @@ -2283,12 +2319,26 @@ "(google.api.resource_reference).type": "sqladmin.googleapis.com/Instance" } }, + "instanceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "instanceTier": { "type": "string", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "instanceDeleteTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2384,6 +2434,11 @@ "backupMinimumEnforcedRetentionDuration" ] }, + "_backupRetentionInheritance": { + "oneof": [ + "backupRetentionInheritance" + ] + }, "_deletable": { "oneof": [ "deletable" @@ -2398,6 +2453,11 @@ "oneof": [ "effectiveTime" ] + }, + "_encryptionConfig": { + "oneof": [ + "encryptionConfig" + ] } }, "fields": { @@ -2448,6 +2508,14 @@ "proto3_optional": true } }, + "backupRetentionInheritance": { + "type": "BackupRetentionInheritance", + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "deletable": { "type": "bool", "id": 8, @@ -2522,9 +2590,24 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { + "BackupRetentionInheritance": { + "values": { + "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": 0, + "INHERIT_VAULT_RETENTION": 1, + "MATCH_BACKUP_EXPIRE_TIME": 2 + } + }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -2543,6 +2626,26 @@ "UNRESTRICTED": 3, "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA": 4 } + }, + "EncryptionConfig": { + "oneofs": { + "_kmsKeyName": { + "oneof": [ + "kmsKeyName" + ] + } + }, + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey", + "proto3_optional": true + } + } + } } } }, @@ -2997,6 +3100,11 @@ "enforcedRetentionEndTime" ] }, + "_backupRetentionInheritance": { + "oneof": [ + "backupRetentionInheritance" + ] + }, "_expireTime": { "oneof": [ "expireTime" @@ -3034,6 +3142,11 @@ "oneof": [ "satisfiesPzi" ] + }, + "sourceResource": { + "oneof": [ + "gcpResource" + ] } }, "fields": { @@ -3084,6 +3197,14 @@ "proto3_optional": true } }, + "backupRetentionInheritance": { + "type": "BackupVault.BackupRetentionInheritance", + "id": 30, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, "expireTime": { "type": "google.protobuf.Timestamp", "id": 7, @@ -3195,6 +3316,22 @@ "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } + }, + "gcpResource": { + "type": "BackupGcpResource", + "id": 31, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyVersions": { + "rule": "repeated", + "type": "string", + "id": 33, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } } }, "nested": { @@ -3405,6 +3542,73 @@ } } }, + "FetchBackupsForResourceTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchBackupsForResourceTypeResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "GetBackupVaultRequest": { "fields": { "name": { @@ -3770,6 +3974,11 @@ "computeInstanceRestoreProperties", "diskRestoreProperties" ] + }, + "_clearOverridesFieldMask": { + "oneof": [ + "clearOverridesFieldMask" + ] } }, "fields": { @@ -3808,6 +4017,14 @@ "diskRestoreProperties": { "type": "DiskRestoreProperties", "id": 7 + }, + "clearOverridesFieldMask": { + "type": "google.protobuf.FieldMask", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } } }, @@ -3850,6 +4067,22 @@ } } }, + "BackupGcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, "BackupConfigState": { "values": { "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, @@ -6063,6 +6296,13 @@ "(google.api.resource).plural": "dataSourceReferences", "(google.api.resource).singular": "dataSourceReference" }, + "oneofs": { + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + } + }, "fields": { "name": { "type": "string", @@ -6113,6 +6353,14 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "totalStoredBytes": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } } } }, @@ -6185,6 +6433,64 @@ } } }, + "ListDataSourceReferencesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSourceReference" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourceReferencesResponse": { + "fields": { + "dataSourceReferences": { + "rule": "repeated", + "type": "DataSourceReference", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, "FetchDataSourceReferencesForResourceTypeRequest": { "fields": { "parent": { diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_backups_for_resource_type.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_backups_for_resource_type.js new file mode 100644 index 000000000000..9306acf839ca --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_backups_for_resource_type.js @@ -0,0 +1,104 @@ +// Copyright 2025 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, resourceType) { + // [START backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_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. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + */ + // const parent = 'abc123' + /** + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + */ + // const resourceType = 'abc123' + /** + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + */ + // const orderBy = 'abc123' + /** + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchBackupsForResourceType() { + // Construct request + const request = { + parent, + resourceType, + }; + + // Run request + const iterable = backupdrClient.fetchBackupsForResourceTypeAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchBackupsForResourceType(); + // [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_source_references.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_source_references.js new file mode 100644 index 000000000000..94a13d6c9ad6 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_source_references.js @@ -0,0 +1,96 @@ +// Copyright 2025 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 backupdr_v1_generated_BackupDR_ListDataSourceReferences_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * The following field and operator combinations are supported: + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * Supported fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListDataSourceReferences() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listDataSourceReferencesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataSourceReferences(); + // [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js index 1ff5579f62b9..2ab1df9ec149 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js @@ -67,6 +67,18 @@ function main(name) { * Disk properties to be overridden during restore. */ // const diskRestoreProperties = {} + /** + * Optional. A field mask used to clear server-side default values + * for fields within the `instance_properties` oneof. + * When a field in this mask is cleared, the server will not apply its + * default logic (like inheriting a value from the source) for that field. + * The most common current use case is clearing default encryption keys. + * Examples of field mask paths: + * - Compute Instance Disks: + * `compute_instance_restore_properties.disks.*.disk_encryption_key` + * - Single Disk: `disk_restore_properties.disk_encryption_key` + */ + // const clearOverridesFieldMask = {} // Imports the Backupdr library const {BackupDRClient} = require('@google-cloud/backupdr').v1; diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index 6eb50167d88d..38a5feace790 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -751,6 +751,70 @@ } } }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_async", + "title": "BackupDR fetchBackupsForResourceType Sample", + "origin": "API_DEFINITION", + "description": " Fetch Backups for a given resource type.", + "canonical": true, + "file": "backup_d_r.fetch_backups_for_resource_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchBackupsForResourceType", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "resource_type", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchBackupsForResourceType", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, { "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", "title": "BackupDR getBackup Sample", @@ -898,7 +962,7 @@ "segments": [ { "start": 25, - "end": 89, + "end": 101, "type": "FULL" } ], @@ -934,6 +998,10 @@ { "name": "disk_restore_properties", "type": ".google.cloud.backupdr.v1.DiskRestoreProperties" + }, + { + "name": "clear_overrides_field_mask", + "type": ".google.protobuf.FieldMask" } ], "resultType": ".google.longrunning.Operation", @@ -1663,6 +1731,62 @@ } } }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_async", + "title": "BackupDR listDataSourceReferences Sample", + "origin": "API_DEFINITION", + "description": " Lists DataSourceReferences for a given project and location.", + "canonical": true, + "file": "backup_d_r.list_data_source_references.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataSourceReferences", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", + "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.backupdr.v1.ListDataSourceReferencesResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListDataSourceReferences", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, { "regionTag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_async", "title": "BackupDR fetchDataSourceReferencesForResourceType Sample", diff --git a/packages/google-cloud-backupdr/samples/package.json b/packages/google-cloud-backupdr/samples/package.json index aeae8beaf0b6..3602cc942686 100644 --- a/packages/google-cloud-backupdr/samples/package.json +++ b/packages/google-cloud-backupdr/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/backupdr": "^0.5.1" + "@google-cloud/backupdr": "^0.7.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts index 3e39da8cb821..7f2b6f2e8a21 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts @@ -233,6 +233,8 @@ export class BackupDRClient { new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), listBackups: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), + fetchBackupsForResourceType: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), listBackupPlans: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), listBackupPlanRevisions: @@ -241,6 +243,8 @@ export class BackupDRClient { new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations'), fetchBackupPlanAssociationsForResourceType: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations'), + listDataSourceReferences: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSourceReferences'), fetchDataSourceReferencesForResourceType: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSourceReferences') }; @@ -441,7 +445,7 @@ export class BackupDRClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const backupDRStubMethods = - ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'listDataSources', 'getDataSource', 'updateDataSource', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'updateBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'getBackupPlanRevision', 'listBackupPlanRevisions', 'createBackupPlanAssociation', 'updateBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'fetchBackupPlanAssociationsForResourceType', 'deleteBackupPlanAssociation', 'triggerBackup', 'getDataSourceReference', 'fetchDataSourceReferencesForResourceType', 'initializeService']; + ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'listDataSources', 'getDataSource', 'updateDataSource', 'listBackups', 'fetchBackupsForResourceType', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'updateBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'getBackupPlanRevision', 'listBackupPlanRevisions', 'createBackupPlanAssociation', 'updateBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'fetchBackupPlanAssociationsForResourceType', 'deleteBackupPlanAssociation', 'triggerBackup', 'getDataSourceReference', 'listDataSourceReferences', 'fetchDataSourceReferencesForResourceType', 'initializeService']; for (const methodName of backupDRStubMethods) { const callPromise = this.backupDRStub.then( stub => (...args: Array<{}>) => { @@ -2378,6 +2382,19 @@ export class BackupDRClient { * Compute Engine instance properties to be overridden during restore. * @param {google.cloud.backupdr.v1.DiskRestoreProperties} request.diskRestoreProperties * Disk properties to be overridden during restore. + * @param {google.protobuf.FieldMask} [request.clearOverridesFieldMask] + * Optional. A field mask used to clear server-side default values + * for fields within the `instance_properties` oneof. + * + * When a field in this mask is cleared, the server will not apply its + * default logic (like inheriting a value from the source) for that field. + * + * The most common current use case is clearing default encryption keys. + * + * Examples of field mask paths: + * - Compute Instance Disks: + * `compute_instance_restore_properties.disks.*.disk_encryption_key` + * - Single Disk: `disk_restore_properties.disk_encryption_key` * @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. @@ -4619,6 +4636,272 @@ export class BackupDRClient { ) as AsyncIterable; } /** + * Fetch Backups for a given resource type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @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 protos.google.cloud.backupdr.v1.Backup|Backup}. + * 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 `fetchBackupsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupsForResourceType( + request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest|null, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse + ]>; + fetchBackupsForResourceType( + request: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + fetchBackupsForResourceType( + request: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + fetchBackupsForResourceType( + request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest|null, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('fetchBackupsForResourceType values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('fetchBackupsForResourceType request %j', request); + return this.innerApiCalls + .fetchBackupsForResourceType(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest|null, + protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse + ]) => { + this._log.info('fetchBackupsForResourceType values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `fetchBackupsForResourceType`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @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 protos.google.cloud.backupdr.v1.Backup|Backup} 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 `fetchBackupsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupsForResourceTypeStream( + request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + 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['fetchBackupsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('fetchBackupsForResourceType stream %j', request); + return this.descriptors.page.fetchBackupsForResourceType.createStream( + this.innerApiCalls.fetchBackupsForResourceType as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `fetchBackupsForResourceType`, 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. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1.Backup|Backup}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/backup_d_r.fetch_backups_for_resource_type.js + * region_tag:backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_async + */ + fetchBackupsForResourceTypeAsync( + request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, + 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['fetchBackupsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('fetchBackupsForResourceType iterate %j', request); + return this.descriptors.page.fetchBackupsForResourceType.asyncIterate( + this.innerApiCalls['fetchBackupsForResourceType'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** * Lists BackupPlans in a given project and location. * * @param {Object} request @@ -5587,6 +5870,275 @@ export class BackupDRClient { ) as AsyncIterable; } /** + * Lists DataSourceReferences for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @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 protos.google.cloud.backupdr.v1.DataSourceReference|DataSourceReference}. + * 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 `listDataSourceReferencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSourceReferences( + request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSourceReference[], + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse + ]>; + listDataSourceReferences( + request: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSourceReference>): void; + listDataSourceReferences( + request: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSourceReference>): void; + listDataSourceReferences( + request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSourceReference>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSourceReference>): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSourceReference[], + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse + ]>|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().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSourceReference>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataSourceReferences values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataSourceReferences request %j', request); + return this.innerApiCalls + .listDataSourceReferences(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.backupdr.v1.IDataSourceReference[], + protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse + ]) => { + this._log.info('listDataSourceReferences values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataSourceReferences`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @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 protos.google.cloud.backupdr.v1.DataSourceReference|DataSourceReference} 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 `listDataSourceReferencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSourceReferencesStream( + request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + 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['listDataSourceReferences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataSourceReferences stream %j', request); + return this.descriptors.page.listDataSourceReferences.createStream( + this.innerApiCalls.listDataSourceReferences as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataSourceReferences`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1.DataSourceReference|DataSourceReference}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/backup_d_r.list_data_source_references.js + * region_tag:backupdr_v1_generated_BackupDR_ListDataSourceReferences_async + */ + listDataSourceReferencesAsync( + request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, + 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['listDataSourceReferences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataSourceReferences iterate %j', request); + return this.descriptors.page.listDataSourceReferences.asyncIterate( + this.innerApiCalls['listDataSourceReferences'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** * Fetch DataSourceReferences for a given project, location and resource type. * * @param {Object} request diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json index 34ad74b61ba0..4621626acd4b 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json @@ -102,6 +102,10 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "FetchBackupsForResourceType": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetBackup": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -181,6 +185,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ListDataSourceReferences": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "FetchDataSourceReferencesForResourceType": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json index 107b71498425..99e4f4b41c41 100644 --- a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json +++ b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json @@ -170,6 +170,13 @@ "listBackupsAsync" ] }, + "FetchBackupsForResourceType": { + "methods": [ + "fetchBackupsForResourceType", + "fetchBackupsForResourceTypeStream", + "fetchBackupsForResourceTypeAsync" + ] + }, "ListBackupPlans": { "methods": [ "listBackupPlans", @@ -198,6 +205,13 @@ "fetchBackupPlanAssociationsForResourceTypeAsync" ] }, + "ListDataSourceReferences": { + "methods": [ + "listDataSourceReferences", + "listDataSourceReferencesStream", + "listDataSourceReferencesAsync" + ] + }, "FetchDataSourceReferencesForResourceType": { "methods": [ "fetchDataSourceReferencesForResourceType", @@ -370,6 +384,13 @@ "listBackupsAsync" ] }, + "FetchBackupsForResourceType": { + "methods": [ + "fetchBackupsForResourceType", + "fetchBackupsForResourceTypeStream", + "fetchBackupsForResourceTypeAsync" + ] + }, "ListBackupPlans": { "methods": [ "listBackupPlans", @@ -398,6 +419,13 @@ "fetchBackupPlanAssociationsForResourceTypeAsync" ] }, + "ListDataSourceReferences": { + "methods": [ + "listDataSourceReferences", + "listDataSourceReferencesStream", + "listDataSourceReferencesAsync" + ] + }, "FetchDataSourceReferencesForResourceType": { "methods": [ "fetchDataSourceReferencesForResourceType", diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts index aefe7cc28307..985f77897d23 100644 --- a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts @@ -5002,6 +5002,251 @@ describe('v1.BackupDRClient', () => { }); }); + describe('fetchBackupsForResourceType', () => { + it('invokes fetchBackupsForResourceType without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.fetchBackupsForResourceType = stubSimpleCall(expectedResponse); + const [response] = await client.fetchBackupsForResourceType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceType without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.fetchBackupsForResourceType = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchBackupsForResourceType( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceType with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchBackupsForResourceType = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchBackupsForResourceType(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchBackupsForResourceType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceTypeStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.fetchBackupsForResourceType.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.fetchBackupsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + 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.fetchBackupsForResourceType.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchBackupsForResourceType, request)); + assert( + (client.descriptors.page.fetchBackupsForResourceType.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchBackupsForResourceTypeStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupsForResourceType.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchBackupsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.fetchBackupsForResourceType.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchBackupsForResourceType, request)); + assert( + (client.descriptors.page.fetchBackupsForResourceType.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchBackupsForResourceType without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.fetchBackupsForResourceType.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + const iterable = client.fetchBackupsForResourceTypeAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.fetchBackupsForResourceType.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchBackupsForResourceType.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchBackupsForResourceType with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupsForResourceType.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchBackupsForResourceTypeAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.fetchBackupsForResourceType.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchBackupsForResourceType.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('listBackupPlans', () => { it('invokes listBackupPlans without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ @@ -5982,6 +6227,251 @@ describe('v1.BackupDRClient', () => { }); }); + describe('listDataSourceReferences', () => { + it('invokes listDataSourceReferences without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + ]; + client.innerApiCalls.listDataSourceReferences = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSourceReferences(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferences without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + ]; + client.innerApiCalls.listDataSourceReferences = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSourceReferences( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSourceReference[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferences with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSourceReferences = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataSourceReferences(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSourceReferences as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferencesStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + ]; + client.descriptors.page.listDataSourceReferences.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourceReferencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSourceReference[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSourceReference) => { + 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.listDataSourceReferences.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSourceReferences, request)); + assert( + (client.descriptors.page.listDataSourceReferences.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataSourceReferencesStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSourceReferences.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourceReferencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSourceReference[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSourceReference) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataSourceReferences.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSourceReferences, request)); + assert( + (client.descriptors.page.listDataSourceReferences.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSourceReferences without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSourceReference()), + ]; + client.descriptors.page.listDataSourceReferences.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IDataSourceReference[] = []; + const iterable = client.listDataSourceReferencesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataSourceReferences.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSourceReferences.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSourceReferences with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourceReferencesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourceReferencesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSourceReferences.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourceReferencesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IDataSourceReference[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataSourceReferences.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSourceReferences.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('fetchDataSourceReferencesForResourceType', () => { it('invokes fetchDataSourceReferencesForResourceType without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ diff --git a/packages/google-cloud-batch/CHANGELOG.md b/packages/google-cloud-batch/CHANGELOG.md index 70e812578198..f28dc04762a5 100644 --- a/packages/google-cloud-batch/CHANGELOG.md +++ b/packages/google-cloud-batch/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://github.com/googleapis/google-cloud-node/compare/batch-v2.2.1...batch-v2.3.0) (2025-11-21) + + +### Features + +* [batch] added new provisioning models ([#6902](https://github.com/googleapis/google-cloud-node/issues/6902)) ([ea62cf5](https://github.com/googleapis/google-cloud-node/commit/ea62cf5717fb0fcb8eb4d3e37260c9f89c3b8076)) + ## [2.2.1](https://github.com/googleapis/google-cloud-node/compare/batch-v2.2.0...batch-v2.2.1) (2025-10-13) diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index 0340bdf95195..04c755a1bb7f 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/batch", - "version": "2.2.1", + "version": "2.3.0", "description": "Batch client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto index 14c1e576103d..99192f80876a 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto @@ -559,7 +559,14 @@ message AllocationPolicy { // old preemptible VM model (indicated by this field) is the older model, // and has been migrated to use the SPOT model as the underlying technology. // This old model will still be supported. - PREEMPTIBLE = 3; + PREEMPTIBLE = 3 [deprecated = true]; + + // Bound to the lifecycle of the reservation in which it is provisioned. + RESERVATION_BOUND = 4; + + // Instance is provisioned with DWS Flex Start and has limited max run + // duration. + FLEX_START = 5; } // Location where compute resources should be allocated for the Job. diff --git a/packages/google-cloud-batch/protos/protos.d.ts b/packages/google-cloud-batch/protos/protos.d.ts index 85eaad5308a0..1fb4b52f1b79 100644 --- a/packages/google-cloud-batch/protos/protos.d.ts +++ b/packages/google-cloud-batch/protos/protos.d.ts @@ -3494,7 +3494,9 @@ export namespace google { PROVISIONING_MODEL_UNSPECIFIED = 0, STANDARD = 1, SPOT = 2, - PREEMPTIBLE = 3 + PREEMPTIBLE = 3, + RESERVATION_BOUND = 4, + FLEX_START = 5 } } diff --git a/packages/google-cloud-batch/protos/protos.js b/packages/google-cloud-batch/protos/protos.js index 1cd8f833b274..e09fe802bf11 100644 --- a/packages/google-cloud-batch/protos/protos.js +++ b/packages/google-cloud-batch/protos/protos.js @@ -4829,6 +4829,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.taskPack != null && message.hasOwnProperty("taskPack")) @@ -4879,6 +4881,14 @@ case 3: message.provisioningModel = 3; break; + case "RESERVATION_BOUND": + case 4: + message.provisioningModel = 4; + break; + case "FLEX_START": + case 5: + message.provisioningModel = 5; + break; } if (object.taskPack != null) if ($util.Long) @@ -7723,6 +7733,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.accelerators != null && message.hasOwnProperty("accelerators")) { @@ -7793,6 +7805,14 @@ case 3: message.provisioningModel = 3; break; + case "RESERVATION_BOUND": + case 4: + message.provisioningModel = 4; + break; + case "FLEX_START": + case 5: + message.provisioningModel = 5; + break; } if (object.accelerators) { if (!Array.isArray(object.accelerators)) @@ -8958,6 +8978,8 @@ * @property {number} STANDARD=1 STANDARD value * @property {number} SPOT=2 SPOT value * @property {number} PREEMPTIBLE=3 PREEMPTIBLE value + * @property {number} RESERVATION_BOUND=4 RESERVATION_BOUND value + * @property {number} FLEX_START=5 FLEX_START value */ AllocationPolicy.ProvisioningModel = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -8965,6 +8987,8 @@ values[valuesById[1] = "STANDARD"] = 1; values[valuesById[2] = "SPOT"] = 2; values[valuesById[3] = "PREEMPTIBLE"] = 3; + values[valuesById[4] = "RESERVATION_BOUND"] = 4; + values[valuesById[5] = "FLEX_START"] = 5; return values; })(); diff --git a/packages/google-cloud-batch/protos/protos.json b/packages/google-cloud-batch/protos/protos.json index 9682e3d7d273..21166635e367 100644 --- a/packages/google-cloud-batch/protos/protos.json +++ b/packages/google-cloud-batch/protos/protos.json @@ -873,11 +873,18 @@ } }, "ProvisioningModel": { + "valuesOptions": { + "PREEMPTIBLE": { + "deprecated": true + } + }, "values": { "PROVISIONING_MODEL_UNSPECIFIED": 0, "STANDARD": 1, "SPOT": 2, - "PREEMPTIBLE": 3 + "PREEMPTIBLE": 3, + "RESERVATION_BOUND": 4, + "FLEX_START": 5 } } } diff --git a/packages/google-cloud-batch/samples/package.json b/packages/google-cloud-batch/samples/package.json index 1b057b921956..790d718a11a2 100644 --- a/packages/google-cloud-batch/samples/package.json +++ b/packages/google-cloud-batch/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/batch": "^2.2.1" + "@google-cloud/batch": "^2.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md index fc69397ac15d..fe405a849250 100644 --- a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md +++ b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v2.3.1...bigquery-analyticshub-v2.4.0) (2025-11-11) + + +### Features + +* [bigquery-analyticshub] add Stored Procedure Sharing support for analyticshub listings ([#6866](https://github.com/googleapis/google-cloud-node/issues/6866)) ([e4faaba](https://github.com/googleapis/google-cloud-node/commit/e4faaba9f6d3c28cf81d816fbd3758af80b6a45d)) + ## [2.3.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v2.3.0...bigquery-analyticshub-v2.3.1) (2025-10-13) diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index 7a0ed2c40341..96fe813fd011 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-analyticshub", - "version": "2.3.1", + "version": "2.4.0", "description": "Analytics Hub API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto index bc5f41fd0171..19c98207bdf9 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto +++ b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto @@ -1100,6 +1100,11 @@ message Listing { RestrictedExportConfig restricted_export_config = 13 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If set, stored procedure configuration will be propagated and + // enforced on the linked dataset. + StoredProcedureConfig stored_procedure_config = 20 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Type of discovery of the listing on the discovery page. optional DiscoveryType discovery_type = 14 [(google.api.field_behavior) = OPTIONAL]; @@ -1124,6 +1129,26 @@ message Listing { [(google.api.field_behavior) = OPTIONAL]; } +// Stored procedure configuration, used to configure stored procedure sharing +// on linked dataset. +message StoredProcedureConfig { + // Enum to specify the type of stored procedure to share. + enum StoredProcedureType { + // Default value. This value is unused. + STORED_PROCEDURE_TYPE_UNSPECIFIED = 0; + + // SQL stored procedure. + SQL_PROCEDURE = 1; + } + + // Optional. If true, enable sharing of stored procedure. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Types of stored procedure supported to share. + repeated StoredProcedureType allowed_stored_procedure_types = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // A subscription represents a subscribers' access to a particular set of // published data. It contains references to associated listings, // data exchanges, and linked datasets. diff --git a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/pubsub.proto b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/pubsub.proto index 4a92405d1b16..7d1be83a4345 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/pubsub.proto +++ b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/pubsub.proto @@ -162,6 +162,16 @@ message PubSubSubscription { // subscribers. Transforms are applied in the order specified. repeated MessageTransform message_transforms = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + map tags = 26 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A policy that specifies how Pub/Sub retries message delivery. diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts b/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts index d3610e0d9314..98189bad9038 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts @@ -2795,6 +2795,9 @@ export namespace google { /** Listing restrictedExportConfig */ restrictedExportConfig?: (google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null); + /** Listing storedProcedureConfig */ + storedProcedureConfig?: (google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig|null); + /** Listing discoveryType */ discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); @@ -2862,6 +2865,9 @@ export namespace google { /** Listing restrictedExportConfig. */ public restrictedExportConfig?: (google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null); + /** Listing storedProcedureConfig. */ + public storedProcedureConfig?: (google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig|null); + /** Listing discoveryType. */ public discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); @@ -3881,6 +3887,118 @@ export namespace google { } } + /** Properties of a StoredProcedureConfig. */ + interface IStoredProcedureConfig { + + /** StoredProcedureConfig enabled */ + enabled?: (boolean|null); + + /** StoredProcedureConfig allowedStoredProcedureTypes */ + allowedStoredProcedureTypes?: (google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType[]|null); + } + + /** Represents a StoredProcedureConfig. */ + class StoredProcedureConfig implements IStoredProcedureConfig { + + /** + * Constructs a new StoredProcedureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig); + + /** StoredProcedureConfig enabled. */ + public enabled: boolean; + + /** StoredProcedureConfig allowedStoredProcedureTypes. */ + public allowedStoredProcedureTypes: google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType[]; + + /** + * Creates a new StoredProcedureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredProcedureConfig instance + */ + public static create(properties?: google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig): google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig; + + /** + * Encodes the specified StoredProcedureConfig message. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.verify|verify} messages. + * @param message StoredProcedureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredProcedureConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.verify|verify} messages. + * @param message StoredProcedureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredProcedureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredProcedureConfig + * @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.bigquery.analyticshub.v1.StoredProcedureConfig; + + /** + * Decodes a StoredProcedureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredProcedureConfig + * @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.bigquery.analyticshub.v1.StoredProcedureConfig; + + /** + * Verifies a StoredProcedureConfig 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 StoredProcedureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredProcedureConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig; + + /** + * Creates a plain object from a StoredProcedureConfig message. Also converts values to other types if specified. + * @param message StoredProcedureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredProcedureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredProcedureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StoredProcedureConfig { + + /** StoredProcedureType enum. */ + enum StoredProcedureType { + STORED_PROCEDURE_TYPE_UNSPECIFIED = 0, + SQL_PROCEDURE = 1 + } + } + /** Properties of a Subscription. */ interface ISubscription { @@ -7467,6 +7585,9 @@ export namespace google { /** PubSubSubscription messageTransforms */ messageTransforms?: (google.cloud.bigquery.analyticshub.v1.IMessageTransform[]|null); + + /** PubSubSubscription tags */ + tags?: ({ [k: string]: string }|null); } /** Represents a PubSubSubscription. */ @@ -7526,6 +7647,9 @@ export namespace google { /** PubSubSubscription messageTransforms. */ public messageTransforms: google.cloud.bigquery.analyticshub.v1.IMessageTransform[]; + /** PubSubSubscription tags. */ + public tags: { [k: string]: string }; + /** * Creates a new PubSubSubscription instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.js b/packages/google-cloud-bigquery-analyticshub/protos/protos.js index a3b912c70a90..feaf31373779 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.js +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.js @@ -6134,6 +6134,7 @@ * @property {google.cloud.bigquery.analyticshub.v1.IPublisher|null} [publisher] Listing publisher * @property {string|null} [requestAccess] Listing requestAccess * @property {google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null} [restrictedExportConfig] Listing restrictedExportConfig + * @property {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig|null} [storedProcedureConfig] Listing storedProcedureConfig * @property {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null} [discoveryType] Listing discoveryType * @property {google.cloud.bigquery.analyticshub.v1.SharedResourceType|null} [resourceType] Listing resourceType * @property {google.cloud.bigquery.analyticshub.v1.Listing.ICommercialInfo|null} [commercialInfo] Listing commercialInfo @@ -6269,6 +6270,14 @@ */ Listing.prototype.restrictedExportConfig = null; + /** + * Listing storedProcedureConfig. + * @member {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig|null|undefined} storedProcedureConfig + * @memberof google.cloud.bigquery.analyticshub.v1.Listing + * @instance + */ + Listing.prototype.storedProcedureConfig = null; + /** * Listing discoveryType. * @member {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null|undefined} discoveryType @@ -6413,6 +6422,8 @@ writer.uint32(/* id 18, wireType 0 =*/144).bool(message.logLinkedDatasetQueryUserEmail); if (message.allowOnlyMetadataSharing != null && Object.hasOwnProperty.call(message, "allowOnlyMetadataSharing")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.allowOnlyMetadataSharing); + if (message.storedProcedureConfig != null && Object.hasOwnProperty.call(message, "storedProcedureConfig")) + $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.encode(message.storedProcedureConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); return writer; }; @@ -6512,6 +6523,10 @@ message.restrictedExportConfig = $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.decode(reader, reader.uint32()); break; } + case 20: { + message.storedProcedureConfig = $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.decode(reader, reader.uint32()); + break; + } case 14: { message.discoveryType = reader.int32(); break; @@ -6661,6 +6676,11 @@ if (error) return "restrictedExportConfig." + error; } + if (message.storedProcedureConfig != null && message.hasOwnProperty("storedProcedureConfig")) { + var error = $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.verify(message.storedProcedureConfig); + if (error) + return "storedProcedureConfig." + error; + } if (message.discoveryType != null && message.hasOwnProperty("discoveryType")) { properties._discoveryType = 1; switch (message.discoveryType) { @@ -6869,6 +6889,11 @@ throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.restrictedExportConfig: object expected"); message.restrictedExportConfig = $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.fromObject(object.restrictedExportConfig); } + if (object.storedProcedureConfig != null) { + if (typeof object.storedProcedureConfig !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.storedProcedureConfig: object expected"); + message.storedProcedureConfig = $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.fromObject(object.storedProcedureConfig); + } switch (object.discoveryType) { default: if (typeof object.discoveryType === "number") { @@ -6955,6 +6980,7 @@ object.requestAccess = ""; object.restrictedExportConfig = null; object.resourceType = options.enums === String ? "SHARED_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.storedProcedureConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -7015,6 +7041,8 @@ if (options.oneofs) object._allowOnlyMetadataSharing = "allowOnlyMetadataSharing"; } + if (message.storedProcedureConfig != null && message.hasOwnProperty("storedProcedureConfig")) + object.storedProcedureConfig = $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.toObject(message.storedProcedureConfig, options); return object; }; @@ -9346,6 +9374,292 @@ return Listing; })(); + v1.StoredProcedureConfig = (function() { + + /** + * Properties of a StoredProcedureConfig. + * @memberof google.cloud.bigquery.analyticshub.v1 + * @interface IStoredProcedureConfig + * @property {boolean|null} [enabled] StoredProcedureConfig enabled + * @property {Array.|null} [allowedStoredProcedureTypes] StoredProcedureConfig allowedStoredProcedureTypes + */ + + /** + * Constructs a new StoredProcedureConfig. + * @memberof google.cloud.bigquery.analyticshub.v1 + * @classdesc Represents a StoredProcedureConfig. + * @implements IStoredProcedureConfig + * @constructor + * @param {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig=} [properties] Properties to set + */ + function StoredProcedureConfig(properties) { + this.allowedStoredProcedureTypes = []; + 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]]; + } + + /** + * StoredProcedureConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @instance + */ + StoredProcedureConfig.prototype.enabled = false; + + /** + * StoredProcedureConfig allowedStoredProcedureTypes. + * @member {Array.} allowedStoredProcedureTypes + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @instance + */ + StoredProcedureConfig.prototype.allowedStoredProcedureTypes = $util.emptyArray; + + /** + * Creates a new StoredProcedureConfig instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig=} [properties] Properties to set + * @returns {google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig} StoredProcedureConfig instance + */ + StoredProcedureConfig.create = function create(properties) { + return new StoredProcedureConfig(properties); + }; + + /** + * Encodes the specified StoredProcedureConfig message. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig} message StoredProcedureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredProcedureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.allowedStoredProcedureTypes != null && message.allowedStoredProcedureTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.allowedStoredProcedureTypes.length; ++i) + writer.int32(message.allowedStoredProcedureTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified StoredProcedureConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {google.cloud.bigquery.analyticshub.v1.IStoredProcedureConfig} message StoredProcedureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredProcedureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredProcedureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig} StoredProcedureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredProcedureConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.allowedStoredProcedureTypes && message.allowedStoredProcedureTypes.length)) + message.allowedStoredProcedureTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedStoredProcedureTypes.push(reader.int32()); + } else + message.allowedStoredProcedureTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StoredProcedureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig} StoredProcedureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredProcedureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredProcedureConfig message. + * @function verify + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredProcedureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.allowedStoredProcedureTypes != null && message.hasOwnProperty("allowedStoredProcedureTypes")) { + if (!Array.isArray(message.allowedStoredProcedureTypes)) + return "allowedStoredProcedureTypes: array expected"; + for (var i = 0; i < message.allowedStoredProcedureTypes.length; ++i) + switch (message.allowedStoredProcedureTypes[i]) { + default: + return "allowedStoredProcedureTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a StoredProcedureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig} StoredProcedureConfig + */ + StoredProcedureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig) + return object; + var message = new $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.allowedStoredProcedureTypes) { + if (!Array.isArray(object.allowedStoredProcedureTypes)) + throw TypeError(".google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.allowedStoredProcedureTypes: array expected"); + message.allowedStoredProcedureTypes = []; + for (var i = 0; i < object.allowedStoredProcedureTypes.length; ++i) + switch (object.allowedStoredProcedureTypes[i]) { + default: + if (typeof object.allowedStoredProcedureTypes[i] === "number") { + message.allowedStoredProcedureTypes[i] = object.allowedStoredProcedureTypes[i]; + break; + } + case "STORED_PROCEDURE_TYPE_UNSPECIFIED": + case 0: + message.allowedStoredProcedureTypes[i] = 0; + break; + case "SQL_PROCEDURE": + case 1: + message.allowedStoredProcedureTypes[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a StoredProcedureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig} message StoredProcedureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredProcedureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedStoredProcedureTypes = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.allowedStoredProcedureTypes && message.allowedStoredProcedureTypes.length) { + object.allowedStoredProcedureTypes = []; + for (var j = 0; j < message.allowedStoredProcedureTypes.length; ++j) + object.allowedStoredProcedureTypes[j] = options.enums === String ? $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType[message.allowedStoredProcedureTypes[j]] === undefined ? message.allowedStoredProcedureTypes[j] : $root.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType[message.allowedStoredProcedureTypes[j]] : message.allowedStoredProcedureTypes[j]; + } + return object; + }; + + /** + * Converts this StoredProcedureConfig to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @instance + * @returns {Object.} JSON object + */ + StoredProcedureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredProcedureConfig + * @function getTypeUrl + * @memberof google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredProcedureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig"; + }; + + /** + * StoredProcedureType enum. + * @name google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType + * @enum {number} + * @property {number} STORED_PROCEDURE_TYPE_UNSPECIFIED=0 STORED_PROCEDURE_TYPE_UNSPECIFIED value + * @property {number} SQL_PROCEDURE=1 SQL_PROCEDURE value + */ + StoredProcedureConfig.StoredProcedureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORED_PROCEDURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SQL_PROCEDURE"] = 1; + return values; + })(); + + return StoredProcedureConfig; + })(); + v1.Subscription = (function() { /** @@ -17766,6 +18080,7 @@ * @property {boolean|null} [detached] PubSubSubscription detached * @property {boolean|null} [enableExactlyOnceDelivery] PubSubSubscription enableExactlyOnceDelivery * @property {Array.|null} [messageTransforms] PubSubSubscription messageTransforms + * @property {Object.|null} [tags] PubSubSubscription tags */ /** @@ -17779,6 +18094,7 @@ function PubSubSubscription(properties) { this.labels = {}; this.messageTransforms = []; + this.tags = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17913,6 +18229,14 @@ */ PubSubSubscription.prototype.messageTransforms = $util.emptyArray; + /** + * PubSubSubscription tags. + * @member {Object.} tags + * @memberof google.cloud.bigquery.analyticshub.v1.PubSubSubscription + * @instance + */ + PubSubSubscription.prototype.tags = $util.emptyObject; + /** * Creates a new PubSubSubscription instance using the specified properties. * @function create @@ -17971,6 +18295,9 @@ if (message.messageTransforms != null && message.messageTransforms.length) for (var i = 0; i < message.messageTransforms.length; ++i) $root.google.cloud.bigquery.analyticshub.v1.MessageTransform.encode(message.messageTransforms[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 26, wireType 2 =*/210).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); return writer; }; @@ -18092,6 +18419,29 @@ message.messageTransforms.push($root.google.cloud.bigquery.analyticshub.v1.MessageTransform.decode(reader, reader.uint32())); break; } + case 26: { + if (message.tags === $util.emptyObject) + message.tags = {}; + 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.tags[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -18200,6 +18550,14 @@ return "messageTransforms." + error; } } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } return null; }; @@ -18281,6 +18639,13 @@ message.messageTransforms[i] = $root.google.cloud.bigquery.analyticshub.v1.MessageTransform.fromObject(object.messageTransforms[i]); } } + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.PubSubSubscription.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); + } return message; }; @@ -18299,8 +18664,10 @@ var object = {}; if (options.arrays || options.defaults) object.messageTransforms = []; - if (options.objects || options.defaults) + if (options.objects || options.defaults) { object.labels = {}; + object.tags = {}; + } if (options.defaults) { object.name = ""; object.pushConfig = null; @@ -18356,6 +18723,11 @@ for (var j = 0; j < message.messageTransforms.length; ++j) object.messageTransforms[j] = $root.google.cloud.bigquery.analyticshub.v1.MessageTransform.toObject(message.messageTransforms[j], options); } + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; + } return object; }; diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.json b/packages/google-cloud-bigquery-analyticshub/protos/protos.json index 477ce192f4b4..4838746a49bb 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.json +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.json @@ -1278,6 +1278,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "storedProcedureConfig": { + "type": "StoredProcedureConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "discoveryType": { "type": "DiscoveryType", "id": 14, @@ -1606,6 +1613,33 @@ } } }, + "StoredProcedureConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedStoredProcedureTypes": { + "rule": "repeated", + "type": "StoredProcedureType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "StoredProcedureType": { + "values": { + "STORED_PROCEDURE_TYPE_UNSPECIFIED": 0, + "SQL_PROCEDURE": 1 + } + } + } + }, "Subscription": { "options": { "(google.api.resource).type": "analyticshub.googleapis.com/Subscription", @@ -2439,6 +2473,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "tags": { + "keyType": "string", + "type": "string", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-bigquery-analyticshub/samples/package.json b/packages/google-cloud-bigquery-analyticshub/samples/package.json index 298053a638f0..8ed9f794b186 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/package.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/bigquery-analyticshub": "^2.3.1" + "@google-cloud/bigquery-analyticshub": "^2.4.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-capacityplanner/CHANGELOG.md b/packages/google-cloud-capacityplanner/CHANGELOG.md index 32a4076e3c73..96ebec12c4d3 100644 --- a/packages/google-cloud-capacityplanner/CHANGELOG.md +++ b/packages/google-cloud-capacityplanner/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.2](https://github.com/googleapis/google-cloud-node/compare/capacityplanner-v0.1.1...capacityplanner-v0.1.2) (2025-11-11) + + +### Bug Fixes + +* Doc linter issues ([e1c953a](https://github.com/googleapis/google-cloud-node/commit/e1c953ae47d7f6697bd9f048d82d5584239ba0d1)) + ## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/capacityplanner-v0.1.0...capacityplanner-v0.1.1) (2025-10-13) diff --git a/packages/google-cloud-capacityplanner/README.md b/packages/google-cloud-capacityplanner/README.md index 9dee976e7e68..0aab016d96cd 100644 --- a/packages/google-cloud-capacityplanner/README.md +++ b/packages/google-cloud-capacityplanner/README.md @@ -142,4 +142,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[//]: # "partials.introduction" \ No newline at end of file +[//]: # "partials.introduction" diff --git a/packages/google-cloud-capacityplanner/package.json b/packages/google-cloud-capacityplanner/package.json index 86ed031af8bc..01ae48dfd1bd 100644 --- a/packages/google-cloud-capacityplanner/package.json +++ b/packages/google-cloud-capacityplanner/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/capacityplanner", - "version": "0.1.1", + "version": "0.1.2", "description": "Capacity Planner API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md b/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md index df2bb0ae65a0..deffcaa28475 100644 --- a/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md +++ b/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/cloudsecuritycompliance-v0.1.1...cloudsecuritycompliance-v0.2.0) (2025-10-29) + + +### Features + +* [cloudsecuritycompliance] add Audit API surface ([#6852](https://github.com/googleapis/google-cloud-node/issues/6852)) ([704574f](https://github.com/googleapis/google-cloud-node/commit/704574fd5a774a5444938ae1c7229bb7a2d4563e)) + ## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/cloudsecuritycompliance-v0.1.0...cloudsecuritycompliance-v0.1.1) (2025-10-13) diff --git a/packages/google-cloud-cloudsecuritycompliance/README.md b/packages/google-cloud-cloudsecuritycompliance/README.md index 05fbf450a168..3270631ef7d5 100644 --- a/packages/google-cloud-cloudsecuritycompliance/README.md +++ b/packages/google-cloud-cloudsecuritycompliance/README.md @@ -57,6 +57,12 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | Sample | Source Code | | --------------------------- | --------------------------------- | +| create framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js) | +| generate framework audit scope report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js) | +| get framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js) | +| list framework audits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js) | +| calculate effective cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js) | +| update cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js) | | create cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js) | | create framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js) | | delete cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js) | @@ -73,6 +79,11 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | get framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js) | | list cloud control deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js) | | list framework deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js) | +| aggregate framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js) | +| fetch framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js) | +| list control compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js) | +| list finding summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js) | +| list framework compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js) | | cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json) | diff --git a/packages/google-cloud-cloudsecuritycompliance/package.json b/packages/google-cloud-cloudsecuritycompliance/package.json index d7b534d59510..9ea873801890 100644 --- a/packages/google-cloud-cloudsecuritycompliance/package.json +++ b/packages/google-cloud-cloudsecuritycompliance/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloudsecuritycompliance", - "version": "0.1.1", + "version": "0.2.0", "description": "Cloud Security Compliance API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto new file mode 100644 index 000000000000..b5877f199177 --- /dev/null +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto @@ -0,0 +1,512 @@ +// Copyright 2025 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.cloudsecuritycompliance.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/cloudsecuritycompliance/v1/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "AuditProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Service describing handlers for resources +service Audit { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Generates an audit scope report for a framework. + rpc GenerateFrameworkAuditScopeReport( + GenerateFrameworkAuditScopeReportRequest) + returns (GenerateFrameworkAuditScopeReportResponse) { + option (google.api.http) = { + post: "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + additional_bindings { + post: "/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + } + additional_bindings { + post: "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + } + }; + option (google.api.method_signature) = + "scope,report_format,compliance_framework"; + } + + // Creates an audit scope report for a framework. + rpc CreateFrameworkAudit(CreateFrameworkAuditRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" + body: "framework_audit" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/frameworkAudits" + body: "framework_audit" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworkAudits" + body: "framework_audit" + } + }; + option (google.api.method_signature) = + "parent,framework_audit,framework_audit_id"; + option (google.longrunning.operation_info) = { + response_type: "FrameworkAudit" + metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }; + } + + // Lists the framework audits for a given organization, folder, or project. + rpc ListFrameworkAudits(ListFrameworkAuditsRequest) + returns (ListFrameworkAuditsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/frameworkAudits" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkAudits" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details for a framework audit. + rpc GetFrameworkAudit(GetFrameworkAuditRequest) returns (FrameworkAudit) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkAudits/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkAudits/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkAudits/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The state of compliance after evaluation is complete. +enum ComplianceState { + // Default value. This value is unused. + COMPLIANCE_STATE_UNSPECIFIED = 0; + + // The resource is compliant. + COMPLIANT = 1; + + // The resource has a violation. + VIOLATION = 2; + + // The resource requires manual review from you. + MANUAL_REVIEW_NEEDED = 3; + + // An error occurred while computing the resource status. + ERROR = 4; + + // The resource can't be audited. + AUDIT_NOT_SUPPORTED = 5; +} + +// The request message for [GenerateFrameworkAuditScopeReport][]. +message GenerateFrameworkAuditScopeReportRequest { + // The set of options for the audit scope report format. + enum Format { + // Default value. This value is unused. + FORMAT_UNSPECIFIED = 0; + + // The report format is the Open Document Format (ODF). + ODF = 1; + } + + // Required. The organization, folder or project for the audit report. + // + // Supported formats are the following: + // + // * `projects/{project_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The format that the scope report bytes is returned in. + Format report_format = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The compliance framework that the scope report is generated for. + string compliance_framework = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message for [GenerateFrameworkAuditScopeReport][]. +message GenerateFrameworkAuditScopeReportResponse { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse" + pattern: "projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" + pattern: "organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" + plural: "frameworkAuditScopeReports" + singular: "generateFrameworkAuditScopeReportResponse" + }; + + // The set of options that the audit scope report is exported in. + oneof audit_report { + // The audit scope report content in byte format. + bytes scope_report_contents = 3; + } + + // Identifier. The name of the audit report, in the format that was + // given in the request. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The compliance framework that the audit scope report is generated + // for. + string compliance_framework = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Additional information for an audit operation. +message ReportSummary { + // Output only. The total number of checks. + int32 total_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of compliant checks. + int32 compliant_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks with violations. + int32 violation_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks with "manual review needed" status. + int32 manual_review_needed_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks that can't be performed due to errors. + int32 error_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [CreateFrameworkAudit][]. +message CreateFrameworkAuditRequest { + // Required. The parent resource where this framework audit is created. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; + + // Optional. The ID to use for the framework audit. The ID becomes the final + // component of the framework audit's full resource name. + // + // The ID must be between 4-63 characters, and valid characters + // are `\[a-z][0-9]-\`. + string framework_audit_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The framework audit to create. + FrameworkAudit framework_audit = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A destination for the framework audit. +message FrameworkAuditDestination { + // The type of destination. + oneof destination_type { + // The Cloud Storage bucket destination. + BucketDestination bucket = 1; + } +} + +// A Cloud Storage bucket destination. +message BucketDestination { + // The set of options for the framework audit format. + enum Format { + // Default value. This value is unused. + FORMAT_UNSPECIFIED = 0; + + // The format for the framework audit report is Open Document. + ODF = 1; + } + + // Required. The URI of the Cloud Storage bucket. + string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The format of the framework audit. + Format framework_audit_format = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A framework audit. +message FrameworkAudit { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + pattern: "projects/{project}/locations/{location}/frameworkAudits/{framework_audit}" + pattern: "organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}" + plural: "frameworkAudits" + singular: "frameworkAudit" + }; + + // The state of the framework audit. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The audit is scheduled. + SCHEDULED = 1; + + // The audit is running. + RUNNING = 2; + + // The audit results are being uploaded. + UPLOADING = 3; + + // The audit failed. + FAILED = 4; + + // The audit completed successfully. + SUCCEEDED = 5; + } + + // Output only. Identifier. The name of the framework audit. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The ID of the framework audit. + string framework_audit_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance framework used for the audit. + string compliance_framework = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The scope of the audit. + string scope = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The destination for the audit reports. + FrameworkAuditDestination framework_audit_destination = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time that the audit started. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the audit finished. + google.protobuf.Timestamp finish_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall compliance state of the audit. + ComplianceState compliance_state = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The details for the cloud control groups within this audit. + repeated CloudControlGroupAuditDetails cloud_control_group_audit_details = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The details for the cloud controls within this audit. + repeated CloudControlAuditDetails cloud_control_audit_details = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The ID of the long-running operation. + string operation_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The framework audit state of the audit. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [ListFrameworkAudits][]. +message ListFrameworkAuditsRequest { + // Required. The parent resource where the framework audits are listed. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; + + // Optional. The maximum number of framework audits to return. The service + // might return fewer audits than this value. If unspecified, a maximum of 10 + // framework audits are returned. The maximum value is 50; values above 50 are + // limited to 50. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` value that's returned from a previous list + // request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters to apply to the framework audits. + // Supported filters are `compliance_framework`, `compliance_state`, + // `create_time,` and `framework_audit_name`. If the filter is invalid, an + // invalid argument error is returned. + // For syntax details, see [AIP-160][https://google.aip.dev/160]. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFrameworkAudits][]. +message ListFrameworkAuditsResponse { + // The framework audits. + repeated FrameworkAudit framework_audits = 1; + + // A token, which you can send as the `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request message for [GetFrameworkAudit][]. +message GetFrameworkAuditRequest { + // Required. The name of the framework audit to retrieve. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + // * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + // * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; +} + +// The details for a cloud control group. +message CloudControlGroupAuditDetails { + // Output only. The ID of the cloud control group. + string cloud_control_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the cloud control group. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the cloud control group. + string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The responsibility type. + string responsibility_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of Google's responsibility. + string google_responsibility_description = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The implementation of Google's responsibility. + string google_responsibility_implementation = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of your responsibility. + string customer_responsibility_description = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The implementation of your responsibility. + string customer_responsibility_implementation = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance state of the control group. + ComplianceState compliance_state = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the regulatory control. + string control_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The control family. + ControlFamily control_family = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The details for the cloud controls within this group. + repeated CloudControlAuditDetails cloud_control_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details for a finding. +message FindingDetails { + // Output only. The name of the finding. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance state of the finding. + ComplianceState compliance_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The observation details for the finding. + ObservationDetails observation = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The evidence details for the finding. + EvidenceDetails evidence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The observation details for a finding. +message ObservationDetails { + // Output only. The current value. + string current_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The expected value. + string expected_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Any guidance for the observation. + string guidance = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The evidence details for a finding. +message EvidenceDetails { + // Output only. The resource identifier. + string resource = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The service identifier. + string service = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path to the evidence. + string evidence_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details for a cloud control audit. +message CloudControlAuditDetails { + // Output only. The name of the cloud control. + string cloud_control = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the cloud control. + string cloud_control_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the cloud control. + string cloud_control_description = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall status of the findings for the control. + ComplianceState compliance_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The findings for the control. + repeated FindingDetails findings = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto new file mode 100644 index 000000000000..bf41f21c650c --- /dev/null +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto @@ -0,0 +1,159 @@ +// Copyright 2025 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.cloudsecuritycompliance.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "CmEnrollmentServiceProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Service describing CmEnrollment related RPCs for +// complianceManager. +service CmEnrollmentService { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Updates the Compliance Manager enrollment for a resource to facilitate + // an audit. + // Use this method to enroll a resource in Compliance Manager or to + // create or update feature-specific configurations. + rpc UpdateCmEnrollment(UpdateCmEnrollmentRequest) returns (CmEnrollment) { + option (google.api.http) = { + patch: "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + additional_bindings { + patch: "/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + } + additional_bindings { + patch: "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + } + }; + option (google.api.method_signature) = "cm_enrollment,update_mask"; + } + + // Calculates the effective Compliance Manager enrollment for a resource. + // An effective enrollment is either a direct enrollment of a + // resource (if it exists), or an enrollment of the closest parent of a + // resource that's enrolled in Compliance Manager. + rpc CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest) + returns (CalculateEffectiveCmEnrollmentResponse) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/cmEnrollment}:calculate" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for [UpdateCmEnrollment][]. +message UpdateCmEnrollmentRequest { + // Required. The Compliance Manager enrollment to update. + // The `name` field is used to identify the settings that you want to update. + CmEnrollment cm_enrollment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields that you want to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [CalculateEffectiveCmEnrollment][]. +message CalculateEffectiveCmEnrollmentRequest { + // Required. The name of the Compliance Manager enrollment to calculate. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/cmEnrollment` + // * `folders/{folder_id}/locations/{location}/cmEnrollment` + // * `projects/{project_id}/locations/{location}/cmEnrollment` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" + } + ]; +} + +// The settings for Compliance Manager at a specific resource scope.= +message CmEnrollment { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" + pattern: "organizations/{organization}/locations/{location}/cmEnrollment" + pattern: "projects/{project}/locations/{location}/cmEnrollment" + plural: "cmEnrollments" + singular: "cmEnrollment" + }; + + // Identifier. The name of the Compliance Manager enrollment. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/cmEnrollment` + // * `folders/{folder_id}/locations/{location}/cmEnrollment` + // * `projects/{project_id}/locations/{location}/cmEnrollment` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Whether the resource is enrolled in Compliance Manager. + // This setting is inherited by all descendants. + bool enrolled = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The audit configuration for Compliance Manager. + // If set at a scope, this configuration overrides any inherited audit + // configuration. + AuditConfig audit_config = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [CalculateEffectiveCmEnrollment][]. +message CalculateEffectiveCmEnrollmentResponse { + // The effective Compliance Manager enrollment for the resource. + CmEnrollment cm_enrollment = 1; +} + +// The audit configuration for Compliance Manager. +message AuditConfig { + // The destination details where audit reports are + // uploaded. + message CmEligibleDestination { + // Set of options for the report destination location. + oneof cm_eligible_destinations { + // The Cloud Storage bucket where audit reports and evidences can be + // uploaded. The format is `gs://{bucket_name}`. + string gcs_bucket = 1; + } + } + + // Required. The list of destinations that can be selected for uploading audit + // reports to. + repeated CmEligibleDestination destinations = 1 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto index 11ce95477bee..5622291469d9 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto @@ -32,94 +32,109 @@ option (google.api.resource_definition) = { pattern: "organizations/{organization}/locations/{location}" }; -// The enforcement mode of the cloud control. +// The responsibility type for the regulatory control. +enum RegulatoryControlResponsibilityType { + // Default value. This value is unused. + REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0; + + // Google's responsibility. + GOOGLE = 1; + + // Your responsibility. + CUSTOMER = 2; + + // Shared responsibility. + SHARED = 3; +} + +// The enforcement mode for the cloud control. enum EnforcementMode { // Default value. This value is unused. ENFORCEMENT_MODE_UNSPECIFIED = 0; - // The cloud control is enforced to prevent resource non-compliance. + // The cloud control is enforced to prevent non-compliance. PREVENTIVE = 1; - // The cloud control is enforced to detect resource non-compliance. + // The cloud control is enforced to detect non-compliance. DETECTIVE = 2; - // The cloud control is enforced to audit resource non-compliance. + // The cloud control is enforced to audit for non-compliance. AUDIT = 3; } -// The category of the framework. +// The category for the framework. enum FrameworkCategory { // Default value. This value is unused. FRAMEWORK_CATEGORY_UNSPECIFIED = 0; - // Standard framework + // An industry-defined framework. INDUSTRY_DEFINED_STANDARD = 1; - // Assured Workloads framework + // An Assured Workloads framework. ASSURED_WORKLOADS = 2; - // Data Security framework + // A data security posture framework. DATA_SECURITY = 3; - // Google Best Practices framework + // A Google's best practices framework. GOOGLE_BEST_PRACTICES = 4; - // User created framework. + // A user-created framework. CUSTOM_FRAMEWORK = 5; } -// The category of the cloud control. +// The category for the cloud control. enum CloudControlCategory { // Default value. This value is unused. CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0; - // Infrastructure + // The infrastructure security category. CC_CATEGORY_INFRASTRUCTURE = 1; - // Artificial Intelligence + // The artificial intelligence category. CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2; - // Physical Security + // The physical security category. CC_CATEGORY_PHYSICAL_SECURITY = 3; - // Data Security + // The data security category. CC_CATEGORY_DATA_SECURITY = 4; - // Network Security + // The network security category. CC_CATEGORY_NETWORK_SECURITY = 5; - // Incident Management + // The incident management category. CC_CATEGORY_INCIDENT_MANAGEMENT = 6; - // Identity & Access Management + // The identity and access management category. CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7; - // Encryption + // The encryption category. CC_CATEGORY_ENCRYPTION = 8; - // Logs Management & Infrastructure + // The logs management and infrastructure category. CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9; - // HR, Admin & Processes + // The HR, admin, and processes category. CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10; - // Third Party & Sub-Processor Management + // The third-party and sub-processor management category. CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11; - // Legal & Disclosures + // The legal and disclosures category. CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12; - // Vulnerability Management + // The vulnerability management category. CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13; - // Privacy + // The privacy category. CC_CATEGORY_PRIVACY = 14; - // BCDR (Business Continuity and Disaster Recovery) + // The business continuity and disaster recovery (BCDR) category. CC_CATEGORY_BCDR = 15; } -// The cloud platform. +// The cloud provider that's associated with the cloud control. enum CloudProvider { // Default value. This value is unused. CLOUD_PROVIDER_UNSPECIFIED = 0; @@ -136,11 +151,9 @@ enum CloudProvider { // The severity of the finding. enum Severity { - // This value is used for findings when a source doesn't write a severity - // value. + // Default value. This value is unused. SEVERITY_UNSPECIFIED = 0; - // Vulnerability: // A critical vulnerability is easily discoverable by an external actor, // exploitable, and results in the direct ability to execute arbitrary code, // exfiltrate data, and otherwise gain additional access and privileges to @@ -148,28 +161,24 @@ enum Severity { // unprotected user data and public SSH access with weak or no // passwords. // - // Threat: - // Indicates a threat that is able to access, modify, or delete data or + // A critical threat is a threat that can access, modify, or delete data or // execute unauthorized code within existing resources. CRITICAL = 1; - // Vulnerability: - // A high risk vulnerability can be easily discovered and exploited in - // combination with other vulnerabilities in order to gain direct access and + // A high-risk vulnerability can be easily discovered and exploited in + // combination with other vulnerabilities to gain direct access and // the ability to execute arbitrary code, exfiltrate data, and otherwise // gain additional access and privileges to cloud resources and workloads. // An example is a database with weak or no passwords that is only // accessible internally. This database could easily be compromised by an // actor that had access to the internal network. // - // Threat: - // Indicates a threat that is able to create new computational resources in - // an environment but not able to access data or execute code in existing - // resources. + // A high-risk threat is a threat that can create new computational + // resources in an environment but can't access data or execute code in + // existing resources. HIGH = 2; - // Vulnerability: - // A medium risk vulnerability could be used by an actor to gain access to + // A medium-risk vulnerability can be used by an actor to gain access to // resources or privileges that enable them to eventually (through multiple // steps or a complex exploit) gain access and the ability to execute // arbitrary code or exfiltrate data. An example is a service account with @@ -177,20 +186,17 @@ enum Severity { // the service account, they could potentially use that access to manipulate // a project the service account was not intended to. // - // Threat: - // Indicates a threat that is able to cause operational impact but may not + // A medium-risk threat can cause operational impact but might not // access data or execute unauthorized code. MEDIUM = 3; - // Vulnerability: - // A low risk vulnerability hampers a security organization's ability to + // A low-risk vulnerability hampers a security organization's ability to // detect vulnerabilities or active threats in their deployment, or prevents // the root cause investigation of security issues. An example is monitoring // and logs being disabled for resource configurations and access. // - // Threat: - // Indicates a threat that has obtained minimal access to an environment but - // is not able to access data, execute code, or create resources. + // A low-risk threat is a threat that has obtained minimal access to an + // environment but can't access data, execute code, or create resources. LOW = 4; } @@ -199,40 +205,37 @@ enum RuleActionType { // Default value. This value is unused. RULE_ACTION_TYPE_UNSPECIFIED = 0; - // Preventative action type. + // The rule is intended to prevent non-compliance. RULE_ACTION_TYPE_PREVENTIVE = 1; - // Detective action type. + // The rule is intended to detect non-compliance. RULE_ACTION_TYPE_DETECTIVE = 2; - // Audit action type. + // The rule is intended to audit non-compliance. RULE_ACTION_TYPE_AUDIT = 3; } -// TargetResourceType represents the type of resource that a control or -// framework can be applied to. +// The type of resource that a control or framework can be applied to. enum TargetResourceType { // Default value. This value is unused. TARGET_RESOURCE_TYPE_UNSPECIFIED = 0; - // Target resource is an Organization. + // The target resource is a Google Cloud organization. TARGET_RESOURCE_CRM_TYPE_ORG = 1; - // Target resource is a Folder. + // The target resource is a folder. TARGET_RESOURCE_CRM_TYPE_FOLDER = 2; - // Target resource is a Project. + // The target resource is a project. TARGET_RESOURCE_CRM_TYPE_PROJECT = 3; - // Target resource is an Application. + // The target resource is an application in App Hub. TARGET_RESOURCE_TYPE_APPLICATION = 4; } -// A Framework is a collection of CloudControls to address security and -// compliance requirements. Frameworks can be used for prevention, detection, -// and auditing. They can be either built-in, industry-standard frameworks -// provided by GCP/AZURE/AWS (e.g., NIST, FedRAMP) or custom frameworks created -// by users. +// A framework is a collection of cloud controls and regulatory controls +// that represent security best practices or industry-defined standards such as +// FedRAMP or NIST. message Framework { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/Framework" @@ -241,33 +244,31 @@ message Framework { singular: "framework" }; - // The type of the framework. + // The type of framework. enum FrameworkType { // Default value. This value is unused. FRAMEWORK_TYPE_UNSPECIFIED = 0; - // The framework is a built-in framework if it is created and managed by - // GCP. + // A framework that's provided and managed by Google. BUILT_IN = 1; - // The framework is a custom framework if it is created and managed by the - // user. + // A framework that's created and managed by you. CUSTOM = 2; } - // Required. Identifier. The name of the framework. - // Format: - // organizations/{organization}/locations/{location}/frameworks/{framework_id} + // Required. Identifier. The name of the framework, in the format + // `organizations/{organization}/locations/{location}/frameworks/{framework_id}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IDENTIFIER ]; - // Output only. Major revision of the framework incremented in ascending - // order. + // Output only. The major version of the framework, which is incremented in + // ascending order. int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Display name of the framework. The maximum length is 200 + // Optional. The friendly name of the framework. The maximum length is 200 // characters. string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -275,10 +276,10 @@ message Framework { // characters. string description = 5 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The type of the framework. The default is TYPE_CUSTOM. + // Output only. The type of framework. FrameworkType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The details of the cloud controls directly added without any + // Optional. The cloud control details that are directly added without any // grouping in the framework. repeated CloudControlDetails cloud_control_details = 8 [(google.api.field_behavior) = OPTIONAL]; @@ -287,11 +288,11 @@ message Framework { repeated FrameworkCategory category = 9 [(google.api.field_behavior) = OPTIONAL]; - // Output only. cloud providers supported + // Output only. The cloud providers that are supported by the framework. repeated CloudProvider supported_cloud_providers = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. target resource types supported by the Framework. + // Output only. The target resource types that are supported by the framework. repeated TargetResourceType supported_target_resource_types = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -300,48 +301,49 @@ message Framework { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// CloudControlDetails contains the details of a CloudControl. +// The details of a cloud control. message CloudControlDetails { - // Required. The name of the CloudControl in the format: - // “organizations/{organization}/locations/{location}/ - // cloudControls/{cloud-control}” + // Required. The name of the cloud control, in the format + // `organizations/{organization}/locations/{location}/cloudControls/{cloud-control}`. + // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Major revision of cloudcontrol + // Required. The major version of the cloud control. int64 major_revision_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Parameters is a key-value pair that is required by the - // CloudControl. The specification of these parameters will be present in - // cloudcontrol.Eg: { "name": "location","value": "us-west-1"}. + // Optional. Parameters are key-value pairs that let you provide your custom + // location requirements, environment requirements, or other settings that are + // relevant to the cloud control. An example parameter is + // `{"name": "location","value": "us-west-1"}`. repeated Parameter parameters = 4 [(google.api.field_behavior) = OPTIONAL]; } -// FrameworkReference contains the reference of a framework. +// The reference of a framework, in the format +// `organizations/{organization}/locations/{location}/frameworks/{framework}`. +// The only supported location is `global`. message FrameworkReference { - // Required. In the format: - // organizations/{org}/locations/{location}/frameworks/{framework} + // Required. The major version of the framework. If not specified, the version + // corresponds to the latest version of the framework. string framework = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Major revision id of the framework. If not specified, corresponds - // to the latest revision of the framework. + // Optional. The major version of the framework. If not specified, the version + // corresponds to the latest version of the framework. optional int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Parameters is a key-value pair. +// Parameters are key-value pairs that let you provide your custom location +// requirements, environment requirements, or other settings that are +// relevant to the cloud control. message Parameter { - // Required. The name of the parameter. + // Required. The name or key of the parameter. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The value of the parameter + // Required. The value of the parameter. ParamValue parameter_value = 2 [(google.api.field_behavior) = REQUIRED]; } -// A CloudControl is the fundamental unit encapsulating the rules -// to meet a specific security or compliance intent. It can contain -// various rule types (like Organization Policies, CEL expressions, etc.) -// enabling different enforcement modes (Preventive, Detective, Audit). -// CloudControls are often parameterized for reusability and can be either -// BUILT_IN (provided by Google) or CUSTOM (defined by the user). +// A cloud control is a set of rules and associated metadata that you can +// use to define your organization's security or compliance intent. message CloudControl { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/CloudControl" @@ -350,100 +352,113 @@ message CloudControl { singular: "cloudControl" }; - // Required. Identifier. The resource name of the cloud control. - // Format: - // organizations/{organization}/locations/{location}/cloudControls/{cloud_control_id} + // The type of cloud control. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // A cloud control that's created and managed by you. + CUSTOM = 1; + + // A cloud control that's provided and managed by Google. + BUILT_IN = 2; + } + + // Required. Identifier. The name of the cloud control, in the format + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control_id}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IDENTIFIER ]; - // Output only. Major revision of the cloud control incremented in ascending - // order. + // Output only. The major version of the cloud control, which is incremented + // in ascending order. int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. A description of the cloud control. The maximum length is 2000 // characters. string description = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The display name of the cloud control. The maximum length is 200 + // Optional. The friendly name of the cloud control. The maximum length is 200 // characters. string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The supported enforcement mode of the cloud control. Default - // is DETECTIVE. + // Output only. The supported enforcement modes for the cloud control. repeated EnforcementMode supported_enforcement_modes = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The parameter spec of the cloud control. + // Optional. The parameter specifications for the cloud control. repeated ParameterSpec parameter_spec = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Policy to be enforced to prevent/detect resource - // non-compliance. + // Optional. The rules that you can enforce to meet your security or + // compliance intent. repeated Rule rules = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The severity of findings generated by the cloud control. + // Optional. The severity of the findings that are generated by the cloud + // control. Severity severity = 11 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The finding_category of the cloud control. The maximum length is - // 255 characters. + // Optional. The finding category for the cloud control findings. The maximum + // length is 255 characters. string finding_category = 12 [(google.api.field_behavior) = OPTIONAL]; - // Optional. cloud providers supported + // Optional. The supported cloud providers. repeated CloudProvider supported_cloud_providers = 13 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The Frameworks that include this CloudControl + // Output only. The frameworks that include this cloud control. repeated string related_frameworks = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The remediation steps for the findings generated by the cloud - // control. The maximum length is 400 characters. + // Optional. The remediation steps for the cloud control findings. The + // maximum length is 400 characters. string remediation_steps = 15 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The categories of the cloud control. + // Optional. The categories for the cloud control. repeated CloudControlCategory categories = 16 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The last updated time of the cloud control. - // The create_time is used because a new CC is created whenever we update an - // existing CC. + // Output only. The time that the cloud control was last updated. + // `create_time` is used because a new cloud control is created + // whenever an existing cloud control is updated. google.protobuf.Timestamp create_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. target resource types supported by the CloudControl. + // Optional. The target resource types that are supported by the cloud + // control. repeated TargetResourceType supported_target_resource_types = 18 [(google.api.field_behavior) = OPTIONAL]; } -// A parameter spec of the cloud control. +// The parameter specification for the cloud control. message ParameterSpec { - // The type of the parameter value. + // The type of parameter value. enum ValueType { // Default value. This value is unused. VALUE_TYPE_UNSPECIFIED = 0; - // String value. + // A string value. STRING = 3; - // Boolean value. + // A boolean value. BOOLEAN = 4; - // String list value. + // A string list value. STRINGLIST = 5; - // Numeric value. + // A numeric value. NUMBER = 6; - // OneOf value. + // A oneOf value. ONEOF = 7; } // Required. The name of the parameter. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The display name of the parameter. The maximum length is 200 + // Optional. The friendly name of the parameter. The maximum length is 200 // characters. string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -451,148 +466,150 @@ message ParameterSpec { // characters. string description = 3 [(google.api.field_behavior) = OPTIONAL]; - // Required. if the parameter is required + // Required. Whether the parameter is required. bool is_required = 4 [(google.api.field_behavior) = REQUIRED]; - // Required. Parameter value type. + // Required. The parameter value type. ValueType value_type = 5 [(google.api.field_behavior) = REQUIRED]; // Optional. The default value of the parameter. ParamValue default_value = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of parameter substitutions. + // Optional. The list of parameter substitutions. repeated ParameterSubstitutionRule substitution_rules = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. ParameterSpec for oneof attributes. + // Optional. The parameter specification for `oneOf` attributes. repeated ParameterSpec sub_parameters = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The allowed set of values for the parameter. + // Optional. The permitted set of values for the parameter. Validation validation = 9 [(google.api.field_behavior) = OPTIONAL]; } -// Validation of the parameter. +// The validation of the parameter. message Validation { // Defines validators for parameter values. oneof constraint { - // Allowed set of values for the parameter. + // The permitted set of values for the parameter. AllowedValues allowed_values = 1; - // Allowed range for numeric parameters. + // The permitted range for numeric parameters. IntRange int_range = 2; - // Regular expression for string parameters. + // The regular expression for string parameters. RegexpPattern regexp_pattern = 3; } } -// Allowed set of values for the parameter. +// The allowed set of values for the parameter. message AllowedValues { - // Required. List of allowed values for the parameter. + // Required. The list of allowed values for the parameter. repeated ParamValue values = 1 [(google.api.field_behavior) = REQUIRED]; } -// Regular Expression Validator for parameter values. +// The regular expression (regex) validator for parameter values. message RegexpPattern { - // Required. Regex Pattern to match the value(s) of parameter. + // Required. The regex pattern to match the values of the parameter with. string pattern = 1 [(google.api.field_behavior) = REQUIRED]; } -// Number range for number parameters. +// The number range for number parameters. message IntRange { - // Required. Minimum allowed value for the numeric parameter (inclusive). + // Required. The minimum permitted value for the numeric parameter + // (inclusive). int64 min = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Maximum allowed value for the numeric parameter (inclusive). + // Required. The maximum permitted value for the numeric parameter + // (inclusive). int64 max = 2 [(google.api.field_behavior) = REQUIRED]; } -// A list of strings. +// A list of strings for the parameter value. message StringList { // Required. The strings in the list. repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; } -// Possible parameter value types. +// The possible parameter value types. message ParamValue { - // The kind of value. + // The list of possible parameter value types. oneof kind { - // Represents a string value. + // A string value. string string_value = 3; - // Represents a boolean value. + // A boolean value. bool bool_value = 4; - // Represents a repeated string. + // A repeated string. StringList string_list_value = 5; - // Represents a double value. + // A double value. double number_value = 6; - // Represents sub-parameter values. + // Sub-parameter values. Parameter oneof_value = 7; } } -// Parameter substitution rules. +// The parameter substitution rules. message ParameterSubstitutionRule { // The type of substitution. oneof substitution_type { - // Placeholder substitution rule. + // The placeholder substitution rule. PlaceholderSubstitutionRule placeholder_substitution_rule = 1; - // Attribute substitution rule. + // The attribute substitution rule. AttributeSubstitutionRule attribute_substitution_rule = 2; } } -// Attribute at the given path is substituted entirely. +// The attribute at the given path that's substituted entirely. message AttributeSubstitutionRule { - // Fully qualified proto attribute path (in dot notation). - // Example: rules[0].cel_expression.resource_types_values + // The fully qualified proto attribute path, in dot notation. + // For example: `rules[0].cel_expression.resource_types_values` string attribute = 1; } -// Placeholder is substituted in the rendered string. +// The placeholder that's substituted in the rendered string. message PlaceholderSubstitutionRule { - // Fully qualified proto attribute path (e.g., dot notation) + // The fully qualified proto attribute path, in dot notation. string attribute = 1; } -// A rule of the cloud control. +// A rule in the cloud control. message Rule { - // The implementation of the rule. + // The rule implementation. oneof implementation { - // Logic expression in CEL language. + // The rule's logic expression in Common Expression Language (CEL). CELExpression cel_expression = 1; } - // Optional. Description of the Rule. The maximum length is 2000 characters. + // Optional. The rule description. The maximum length is 2000 characters. string description = 10 [(google.api.field_behavior) = OPTIONAL]; - // Required. The functionality enabled by the Rule. + // Required. The functionality that's enabled by the rule. repeated RuleActionType rule_action_types = 16 [(google.api.field_behavior) = REQUIRED]; } -// A [CEL -// expression](https://cloud.google.com/certificate-authority-service/docs/using-cel). +// A Common Expression Language (CEL) expression that's used to create a rule. message CELExpression { // The criteria of the CEL expression. oneof criteria { // The resource instance types on which this expression is defined. - // Format will be of the form : `/` - // Example: `compute.googleapis.com/Instance`. + // The format is `/`. + // For example: `compute.googleapis.com/Instance` StringList resource_types_values = 3; } - // Required. Logic expression in CEL language. - // The max length of the condition is 1000 characters. + // Required. The logical expression in CEL. The maximum length of the + // condition is 1000 characters. For more information, see [CEL + // expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions). string expression = 1 [(google.api.field_behavior) = REQUIRED]; } -// Represents the metadata of the long-running operation. +// The metadata for the long-running operation. message OperationMetadata { // Output only. The time the operation was created. google.protobuf.Timestamp create_time = 1 @@ -602,22 +619,31 @@ message OperationMetadata { google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Server-defined resource path for the target of the operation. + // Output only. The 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. + // Output only. The name of the verb that was executed by the operation. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Human-readable status of the operation, if any. + // Output only. The human-readable status of the operation, if any. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Identifies whether the user has requested cancellation - // of the operation. Operations that have been cancelled successfully - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // Output only. Identifies whether the user has requested that the operation + // be cancelled. If an operation was cancelled successfully, then the field + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED]. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. API version used to start the operation. + // Output only. The API version that was used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// The regulatory family of the control. +message ControlFamily { + // The identifier for the regulatory control family. + string family_id = 1; + + // The friendly name for the regulatory control family. + string display_name = 2; +} diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto index 6258be87c444..9ef74423c8e0 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto @@ -39,9 +39,10 @@ service Config { option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Lists all Frameworks (both Built-in and Custom) available within a given - // parent resource. This method supports pagination. - // The latest major version of each Framework is returned. + // Lists the frameworks (both built-in and custom) that are available within + // the parent resource. The latest major version of each framework is + // returned. + // This method supports pagination. rpc ListFrameworks(ListFrameworksRequest) returns (ListFrameworksResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/locations/*}/frameworks" @@ -49,13 +50,11 @@ service Config { option (google.api.method_signature) = "parent"; } - // Gets details of a single Framework. - // This method retrieves a Framework resource, which can be either Built-in or - // Custom, identified by its name. + // Gets details about a framework. + // This method retrieves the latest major version of the framework. // - // By default, the latest major version of the Framework is returned. - // A specific major version can be retrieved by specifying the - // `major_revision_id` in the request. + // To retrieve a specific major version, include `major_revision_id` in + // the request. rpc GetFramework(GetFrameworkRequest) returns (Framework) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/frameworks/*}" @@ -63,9 +62,9 @@ service Config { option (google.api.method_signature) = "name"; } - // Creates a new Framework with type `Custom` under a given parent resource. - // Frameworks with type `Built-in` are managed by Google and cannot be created - // through this API. + // Creates a custom framework in a given parent resource. + // You can't create built-in frameworks because those are managed by + // Google. rpc CreateFramework(CreateFrameworkRequest) returns (Framework) { option (google.api.http) = { post: "/v1/{parent=organizations/*/locations/*}/frameworks" @@ -74,17 +73,18 @@ service Config { option (google.api.method_signature) = "parent,framework,framework_id"; } - // Updates a single Framework. - // This method allows for partial updates of a Framework resource. The fields - // to be updated are specified using the `update_mask`. + // Updates a custom framework. + // This method allows for partial updates of a framework. Use the + // `update_mask` to specify which fields to update. Consider the following: // - // - If an `update_mask` is provided, only the fields specified in the mask - // will be updated. - // - If no `update_mask` is provided, all fields present in the request's - // `framework` body will be used to overwrite the existing resource. + // - If you provide an `update_mask`, only the fields that are specified + // in the mask are updated. + // - If you don't provide an `update_mask`, all the fields that are present + // in the request's `framework` body are used to overwrite the existing + // resource. // - // This operation can only be performed on Frameworks with type `CUSTOM`. - // A successful update will result in a new version of the Framework. + // You can only update frameworks with the `CUSTOM` type. + // A successful update creates a new version of the framework. rpc UpdateFramework(UpdateFrameworkRequest) returns (Framework) { option (google.api.http) = { patch: "/v1/{framework.name=organizations/*/locations/*/frameworks/*}" @@ -93,14 +93,13 @@ service Config { option (google.api.method_signature) = "framework,update_mask"; } - // Deletes a single Custom Framework, including all its minor and - // minor revisions. + // Deletes a custom framework, including all its major and + // minor revisions. Consider the following: // - // - This operation can only be performed on Frameworks with type `CUSTOM`. - // Built-in Frameworks cannot be deleted. - // - The Framework cannot be deleted if it is currently deployed on any - // resource. - // - This action is permanent and cannot be undone. + // - You can't delete built-in frameworks. You can only delete frameworks + // with type `CUSTOM`. + // - You can't delete frameworks that are deployed to a resource. + // - You can't restore a deleted framework. This action is permanent. rpc DeleteFramework(DeleteFrameworkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=organizations/*/locations/*/frameworks/*}" @@ -108,9 +107,10 @@ service Config { option (google.api.method_signature) = "name"; } - // Lists all CloudControls (both Built-in and Custom) available within a given - // parent resource. This method supports pagination. - // The latest major version of each CloudControl is returned. + // Lists the cloud controls (both built-in and custom) that are available + // in a given parent resource. The latest major version of each cloud control + // is returned. + // This method supports pagination. rpc ListCloudControls(ListCloudControlsRequest) returns (ListCloudControlsResponse) { option (google.api.http) = { @@ -119,13 +119,13 @@ service Config { option (google.api.method_signature) = "parent"; } - // Gets details of a single CloudControl. - // This method retrieves a CloudControl resource, which can be either Built-in - // or Custom, identified by its name. + // Gets details about a cloud control. + // This method retrieves the latest major version of a cloud control that + // you identify by name. // - // By default, the latest major version of the CloudControl is returned. - // A specific major version can be retrieved by specifying the - // `major_revision_id` in the request. + // By default, the latest major version of the cloud control is returned. + // To retrieve a specific major version, include `major_revision_id` in + // the request. rpc GetCloudControl(GetCloudControlRequest) returns (CloudControl) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/cloudControls/*}" @@ -133,9 +133,10 @@ service Config { option (google.api.method_signature) = "name"; } - // Creates a new CloudControl with type `Custom` under a given parent - // resource. `Built-in` CloudControls are managed by Google and cannot be - // created through this API. + // Creates a custom cloud control in a given parent + // resource. + // You can't create built-in cloud controls because those are managed by + // Google. rpc CreateCloudControl(CreateCloudControlRequest) returns (CloudControl) { option (google.api.http) = { post: "/v1/{parent=organizations/*/locations/*}/cloudControls" @@ -145,16 +146,18 @@ service Config { "parent,cloud_control,cloud_control_id"; } - // Updates a single CloudControl. - // This method allows for partial updates of a Custom CloudControl resource. - // Built-in CloudControls cannot be updated. + // Updates a custom cloud control. + // This method allows for partial updates of a cloud control. Use the + // `update_mask` to specify which fields to update. Consider the following: // - // - If an `update_mask` is provided, only the fields specified in the mask - // will be updated. - // - If no `update_mask` is provided, all fields present in the request's - // `cloud_control` body will be used to overwrite the existing resource. + // - If you provide an `update_mask`, only the fields that are specified + // in the mask are updated. + // - If you don't provide an `update_mask`, all the fields that are present + // in the request's `cloud_control` body are used to overwrite the existing + // resource. // - // A successful update will result in a new version of the CloudControl. + // You can only update cloud controls with the `CUSTOM` type. + // A successful update creates a new version of the cloud control. rpc UpdateCloudControl(UpdateCloudControlRequest) returns (CloudControl) { option (google.api.http) = { patch: "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}" @@ -163,14 +166,14 @@ service Config { option (google.api.method_signature) = "cloud_control,update_mask"; } - // Deletes a single Custom CloudControl, including all its - // major and minor revisions. + // Deletes a custom cloud control, including all its + // major and minor revisions. Consider the following: // - // - This operation can only be performed on CloudControls with type `CUSTOM`. - // Built-in CloudControls cannot be deleted. - // - The CloudControl cannot be deleted if any of its revisions are currently - // referenced by any Framework. - // - This action is permanent and cannot be undone. + // - You can't delete built-in cloud controls. You can only delete cloud + // controls with type `CUSTOM`. + // - You can't delete cloud controls if any of the versions are referenced + // by a framework. + // - You can't restore a deleted cloud control. This action is permanent. rpc DeleteCloudControl(DeleteCloudControlRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -180,11 +183,11 @@ service Config { } } -// Request message for listing Frameworks. +// Request message for [ListFrameworks][]. message ListFrameworksRequest { // Required. The parent resource name, in the format // `organizations/{organization}/locations/{location}`. - // Only global location is supported. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -204,10 +207,10 @@ message ListFrameworksRequest { string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing Frameworks. -// Contains a paginated list of Framework resources. +// The response message for [ListFrameworks][]. +// Returns a paginated list of Framework resources. message ListFrameworksResponse { - // The list of Framework resources. + // The list of framework resources. repeated Framework frameworks = 1; // A pagination token. To retrieve the next page of results, call the method @@ -215,11 +218,11 @@ message ListFrameworksResponse { string next_page_token = 2; } -// Request message for getting a Framework. +// The request message for [GetFramework][]. message GetFrameworkRequest { - // Required. The name of the framework to retrieve. - // Format: - // organizations/{organization}/locations/{location}/frameworks/{framework_id} + // Required. The name of the framework to retrieve, in the format + // `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -227,15 +230,16 @@ message GetFrameworkRequest { } ]; - // Optional. The Framework major version to retrieve. If not specified, the - // most recently updated revision_id is retrieved. + // Optional. The framework major version to retrieve. If not specified, the + // most recently updated `revision_id` is retrieved. int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for creating a Framework +// The request message for [CreateFramework][]. message CreateFrameworkRequest { // Required. The parent resource name, in the format // `organizations/{organization}/locations/{location}`. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -243,37 +247,36 @@ message CreateFrameworkRequest { } ]; - // Required. ID of the framework. - // This is not the full name of the framework. - // This is the last part of the full name of the framework. + // Required. The identifier (ID) of the framework. The ID is not the full name + // of the framework; it's the last part of the full name of the framework. string framework_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The resource being created + // Required. The resource being created. Framework framework = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for updating a Framework. +// The request message for [UpdateFramework][]. message UpdateFrameworkRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // Framework resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields present in the request will be - // overwritten. + // Optional. A field mask is used to specify the fields to be overwritten in + // the framework resource by the update. The fields specified in the + // `update_mask` are relative to the resource, not the full request. A field + // is overwritten if it is in the mask. If you don't provide a mask then all + // fields present in the request will be overwritten. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. The resource being updated + // Required. The resource that is being updated. Framework framework = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. The major version ID of the framework to update. int64 major_revision_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for deleting a Framework. +// Request message for [DeleteFramework][]. message DeleteFrameworkRequest { - // Required. Name of the resource, in the format + // Required. The name of the resource, in the format // `organizations/{organization}/locations/{location}/frameworks/{framework}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -282,10 +285,11 @@ message DeleteFrameworkRequest { ]; } -// Request message for listing CloudControls. +// Request message for [ListCloudControls][]. message ListCloudControlsRequest { // Required. The parent resource name, in the format // `organizations/{organization}/locations/{location}`. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -293,23 +297,24 @@ message ListCloudControlsRequest { } ]; - // Optional. The maximum number of CloudControls to return. The default value + // Optional. The maximum number of cloud controls to return. The default value // is `500`. // // If you exceed the maximum value of `1000`, then the service uses the // maximum value. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous request to list - // CloudControls. Provide this token to retrieve the next page of results. + // Optional. A pagination token that's returned from a previous request to + // list cloud controls. Provide this token to retrieve the next page of + // results. // - // When paginating, parent provided to - // ListCloudControls request must match the call that provided the page - // token. + // When paginating, the parent that you provide to the + // [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls] + // request must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for ListCloudControls. +// The response message for [ListCloudControls][]. message ListCloudControlsResponse { // The list of CloudControl resources. repeated CloudControl cloud_controls = 1; @@ -319,22 +324,28 @@ message ListCloudControlsResponse { string next_page_token = 2; } -// Request message for getting a CloudControl. +// The request message for [GetCloudControl][]. message GetCloudControlRequest { - // Required. The name of the cloudcontrol to retrieve in the format: - // organizations/{organization}/locations/{location}/cloudControls/{cloud_control} + // Required. The name of the cloud control to retrieve, in the format + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "cloudsecuritycompliance.googleapis.com/CloudControl" } ]; + + // Optional. The major version of the cloud control to retrieve. If not + // specified, the most recently updated `revision_id` is retrieved. + int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for creating a CloudControl +// The request message for [CreateCloudControl][]. message CreateCloudControlRequest { // Required. The parent resource name, in the format // `organizations/{organization}/locations/{location}`. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -342,39 +353,43 @@ message CreateCloudControlRequest { } ]; - // Required. ID of the CloudControl. - // This is the last segment of the CloudControl resource name. - // Format: `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + // Required. The identifier for the cloud control, which is the last segment + // of the cloud control name. The format is + // `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. string cloud_control_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The resource being created + // Required. The cloud control that's being created. CloudControl cloud_control = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for UpdateCloudControl. +// The request message for [UpdateCloudControl][]. message UpdateCloudControlRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // CloudControl resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields present in the request will be - // overwritten. The fields that can be updated are: - // 1. Display_name - // 2. Description - // 3. Parameters - // 4. Rules - // 5. ParameterSpec. + // Optional. Use a field mask to specify the fields to be overwritten in the + // cloud control during the update. + // The fields that you specify in the `update_mask` are relative to the + // cloud control, not the full request. A field is overwritten if it is in + // the mask. If you don't provide a mask, all fields in the request + // are updated. + // + // You can update the following fields: + // + // - Display name + // - Description + // - Parameters + // - Rules + // - Parameter specification google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. The resource being updated + // Required. The cloud control that you're updating. CloudControl cloud_control = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for deleting a CloudControl. +// The request message for [DeleteCloudControl][]. message DeleteCloudControlRequest { - // Required. Name of the resource, in the format + // Required. The name of the cloud control to delete, in the format // `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto index 964d8d2c0b58..343819f0f4bb 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto @@ -40,7 +40,10 @@ service Deployment { option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Creates a new FrameworkDeployment in a given parent resource. + // Creates a framework deployment in a given parent resource. A + // framework deployment lets you assign a particular framework version to an + // organization, folder, or project so that you can control and monitor + // those resources using the framework's cloud controls. rpc CreateFrameworkDeployment(CreateFrameworkDeploymentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -55,7 +58,7 @@ service Deployment { }; } - // Deletes a single FrameworkDeployment. + // Deletes a framework deployment. rpc DeleteFrameworkDeployment(DeleteFrameworkDeploymentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -68,7 +71,7 @@ service Deployment { }; } - // Gets details of a single FrameworkDeployment. + // Gets details about a framework deployment. rpc GetFrameworkDeployment(GetFrameworkDeploymentRequest) returns (FrameworkDeployment) { option (google.api.http) = { @@ -77,7 +80,7 @@ service Deployment { option (google.api.method_signature) = "name"; } - // Lists FrameworkDeployments in a given parent resource. + // Lists the framework deployments in a given parent resource. rpc ListFrameworkDeployments(ListFrameworkDeploymentsRequest) returns (ListFrameworkDeploymentsResponse) { option (google.api.http) = { @@ -86,7 +89,7 @@ service Deployment { option (google.api.method_signature) = "parent"; } - // Gets details of a single CloudControlDeployment. + // Gets details about a cloud control deployment. rpc GetCloudControlDeployment(GetCloudControlDeploymentRequest) returns (CloudControlDeployment) { option (google.api.http) = { @@ -95,7 +98,7 @@ service Deployment { option (google.api.method_signature) = "name"; } - // Lists CloudControlDeployments in a given parent resource. + // Lists the cloud conrol deployments in a given parent resource. rpc ListCloudControlDeployments(ListCloudControlDeploymentsRequest) returns (ListCloudControlDeploymentsResponse) { option (google.api.http) = { @@ -105,42 +108,42 @@ service Deployment { } } -// DeploymentState represents the state of the Deployment resource. +// The state of the deployment resource. enum DeploymentState { - // Unspecified. Invalid state. + // Default value. This value is unused. DEPLOYMENT_STATE_UNSPECIFIED = 0; // Validating the deployment. DEPLOYMENT_STATE_VALIDATING = 1; - // Deployment is in CREATING state. + // Deployment is being created. DEPLOYMENT_STATE_CREATING = 2; - // Deployment is in DELETING state. + // Deployment is being deleted. DEPLOYMENT_STATE_DELETING = 3; - // Deployment has failed. All the changes made by the deployment have been - // successfully rolled back. A deployment in the FAILED state can be retried - // or deleted. + // Deployment has failed. All the changes made by the deployment were + // successfully rolled back. You can retry or delete a deployment that's + // in this state. DEPLOYMENT_STATE_FAILED = 4; // Deployment is successful and ready to use. DEPLOYMENT_STATE_READY = 5; - // Deployment is partially deployed. All the Cloud Controls were not deployed - // successfully. Retrying the operation will resume from the first failed + // Deployment is partially deployed. All the cloud controls weren't deployed + // successfully. Retrying the operation resumes from the first failed // step. DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6; - // Deployment is partially deleted. All the Cloud Control Deployments were not - // deleted successfully. Retrying the operation will resume from the first + // Deployment is partially deleted. All the cloud control deployments weren't + // deleted successfully. Retrying the operation resumes from the first // failed step. DEPLOYMENT_STATE_PARTIALLY_DELETED = 7; } -// FrameworkDeployment represents deployment of a Framework on a target -// resource. Supported target resources are organizations/{organization}, -// folders/{folder}, and projects/{project}. +// Framework deployments represent the assignment of a framework to a target +// resource. Supported target resources are organizations, folders, and +// projects. message FrameworkDeployment { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" @@ -149,35 +152,37 @@ message FrameworkDeployment { singular: "frameworkDeployment" }; - // Identifier. FrameworkDeployment name in the following format: - // organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id} + // Identifier. The name of the framework deployment, in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Required. The details of the target resource on which the Framework is to - // be deployed. It can either be an existing target resource or a new target - // resource to be created. + // Required. The details of the target resource that you want to deploy the + // framework to. You can specify an existing resource, or create a new one. TargetResourceConfig target_resource_config = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. The resource on which the Framework is deployed based on the - // provided TargetResourceConfig in the following format: - // organizations/{organization}, folders/{folder} or projects/{project} + // Output only. The target resource to deploy the framework to, in one the + // following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` string computed_target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Reference to the framework to be deployed. + // Required. A reference to the framework that you're deploying. FrameworkReference framework = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. User provided description of the Framework deployment + // Optional. A user-provided description of the framework deployment. string description = 5 [(google.api.field_behavior) = OPTIONAL]; - // Required. Deployment mode and parameters for each of the Cloud Controls in - // the framework. Every Cloud Control in the framework must have a - // CloudControlMetadata. + // Required. The deployment mode and parameters for each of the cloud controls + // in the framework. Every cloud control in the framework includes metadata. repeated CloudControlMetadata cloud_control_metadata = 6 [(google.api.field_behavior) = REQUIRED]; - // Output only. State of the Framework Deployment + // Output only. The state for the framework deployment. DeploymentState deployment_state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -190,21 +195,25 @@ message FrameworkDeployment { [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. To prevent concurrent updates from overwriting each other, always - // provide the `etag` when you update a FrameworkDeployment. You can also - // provide the `etag` when you delete a FrameworkDeployment, to help + // provide the `etag` when you update a framework deployment. You can also + // provide the `etag` when you delete a framework deployment, to help // ensure that you're deleting the intended version of the - // FrameworkDeployment. + // framework deployment. string etag = 11 [(google.api.field_behavior) = OPTIONAL]; // Output only. The display name of the target resource. string target_resource_display_name = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The references to the cloud control deployments. It has all - // the CloudControlDeployments which are either directly added in the - // framework or through a CloudControlGroup. Example: If a framework - // deployment deploys two cloud controls, cc-deployment-1 and cc-deployment-2, - // then the cloud_control_deployment_references will be: + // Output only. The references to the cloud control deployments. The reference + // includes all the cloud control deployments that are in the framework or in + // a cloud control group. + // + // For example, if a framework deployment deploys two + // cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the + // references are: + // + // ``` // { // cloud_control_deployment_reference: { // cloud_control_deployment: @@ -214,13 +223,15 @@ message FrameworkDeployment { // cloud_control_deployment: // "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2" // } + // ``` repeated CloudControlDeploymentReference cloud_control_deployment_references = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// CloudControlDeployment represents deployment of a CloudControl on a target -// resource. Supported target resources are organizations/{organization}, -// folders/{folder}, and projects/{project}. +// A cloud control deployment represents the deployment of a particular cloud +// control on a target resource. Supported target resources are +// `organizations/{organizationID}`, `folders/{folderID}`, and +// `projects/{projectID}`. message CloudControlDeployment { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" @@ -229,54 +240,57 @@ message CloudControlDeployment { singular: "cloudControlDeployment" }; - // Identifier. CloudControlDeployment name in the following format: - // organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id} + // Identifier. The name for the cloud control deployment, in the format + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Required. The details of the target resource on which the CloudControl is - // to be deployed. It can either be an existing target resource or a new - // target resource to be created. + // Required. The details of the target resource that the cloud control is + // deployed You can use an existing target resource or create a new target. TargetResourceConfig target_resource_config = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. The resource on which the CloudControl is deployed based on - // the provided TargetResourceConfig in the following format: - // organizations/{organization}, folders/{folder} or projects/{project}. + // Output only. The resource that the cloud control is deployed on, in one of + // the following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Deployment mode and parameters for the Cloud Control. + // Required. The deployment mode and parameters for the cloud control. CloudControlMetadata cloud_control_metadata = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. User provided description of the CloudControl deployment + // Optional. A friendly description for the cloud control deployment. string description = 5 [(google.api.field_behavior) = OPTIONAL]; - // Output only. State of the CloudControl deployment + // Output only. The state of the cloud control deployment. DeploymentState deployment_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time at which the resource was created. + // Output only. The time when the resource was created. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time at which the resource last updated. + // Output only. The time when the resource was last updated. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. To prevent concurrent updates from overwriting each other, always - // provide the `etag` when you update a CloudControlDeployment. You can also - // provide the `etag` when you delete a CloudControlDeployment, to help + // Optional. To prevent concurrent updates from overwriting each other, + // provide the `etag` when you update a cloud control deployment. You can also + // provide the `etag` when you delete a cloud control deployment to help // ensure that you're deleting the intended version of the - // CloudControlDeployment. + // deployment. string etag = 9 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The CloudControl after substitution of given parameters. + // Output only. The cloud control after the given parameters are substituted. CloudControl parameter_substituted_cloud_control = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The references to the Framework deployments that this Cloud - // Control deployment is part of. A Cloud Control deployment can be part of - // multiple Framework deployments. + // Output only. The references to the framework deployments that this cloud + // control deployment is part of. A cloud control deployment can be part of + // multiple framework deployments. repeated FrameworkDeploymentReference framework_deployment_references = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -285,80 +299,81 @@ message CloudControlDeployment { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// TargetResourceConfig contains either the name of the target_resource or -// contains the config to create a new target_resource. +// The name of the target resource or the configuration that's required to +// create a new target resource. message TargetResourceConfig { - // Resource config for the target_resource + // The resource configuration for the target resource. oneof resource_config { - // Optional. CRM node in format organizations/{organization}, - // folders/{folder}, or projects/{project} + // Optional. The resource hierarchy node, in one of the following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` string existing_target_resource = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Config to create a new resource and use that as the - // target_resource for deployment. + // Optional. The details that are required to create a resource and use + // that resource as the target resource for deployment. TargetResourceCreationConfig target_resource_creation_config = 2 [(google.api.field_behavior) = OPTIONAL]; } } -// TargetResourceCreationConfig contains the config to create a new resource to -// be used as the target_resource of a deployment. +// The configuration that's required to create a target resource. message TargetResourceCreationConfig { - // Resource creation config for the target_resource + // The configuration that's required to create the target resource. oneof resource_creation_config { - // Optional. Config to create a new folder to be used as the target_resource - // of a deployment. + // Optional. The configuration that's required to create a folder. FolderCreationConfig folder_creation_config = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Config to create a new project to be used as the - // target_resource of a deployment. + // Optional. The configuration that's required to create a project. ProjectCreationConfig project_creation_config = 2 [(google.api.field_behavior) = OPTIONAL]; } } -// FolderCreationConfig contains the config to create a new folder to be used -// as the target_resource of a deployment. +// The configuration that's required to create a folder to be used +// as the target resource for a deployment. message FolderCreationConfig { - // Required. The parent of the folder to be created. It can be an - // organizations/{org} or folders/{folder} + // Required. The parent of the folder, in the format + // `organizations/{organizationID}` or `folders/{folderID}`. string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Display name of the folder to be created + // Required. The display name of the folder. string folder_display_name = 2 [(google.api.field_behavior) = REQUIRED]; } -// ProjectCreationConfig contains the config to create a new project to be used -// as the target_resource of a deployment. +// The configuration that's required to create a project to be used +// as the target resource of a deployment. message ProjectCreationConfig { - // Required. organizations/{org} or folders/{folder} + // Required. The parent of the project, in the format + // `organizations/{organizationID}` or `folders/{folderID}`. string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Display name of the project to be created. + // Required. The display name of the project. string project_display_name = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Billing account id to be used for the project. + // Required. The billing account ID for the project. string billing_account_id = 3 [(google.api.field_behavior) = REQUIRED]; } -// CloudControlMetadata contains the enforcement mode and parameters of a Cloud -// Control Deployment. +// The enforcement mode and parameters of a cloud +// control deployment. message CloudControlMetadata { - // Required. Cloud control name and parameters. + // Required. The cloud control name and parameters. CloudControlDetails cloud_control_details = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Enforcement mode of the cloud control + // Required. The enforcement mode of the cloud control. EnforcementMode enforcement_mode = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for CreateFrameworkDeployment API. +// The request message for [CreateFrameworkDeployment][]. message CreateFrameworkDeploymentRequest { - // Required. The parent resource of the FrameworkDeployment in the format: - // organizations/{organization}/locations/{location} - // Only global location is supported. + // Required. The parent resource of the framework deployment in the format + // `organizations/{organization}/locations/{location}`. + // Only the global location is supported. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -366,21 +381,22 @@ message CreateFrameworkDeploymentRequest { } ]; - // Optional. User provided identifier. It should be unique in scope of a - // parent. This is optional and if not provided, a random UUID will be + // Optional. An identifier for the framework deployment that's unique in scope + // of the parent. If you don't specify a value, then a random UUID is // generated. string framework_deployment_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. The FrameworkDeployment to be created. + // Required. The framework deployment that you're creating. FrameworkDeployment framework_deployment = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for DeleteFrameworkDeployment. +// The request message for [DeleteFrameworkDeployment][]. message DeleteFrameworkDeploymentRequest { - // Required. name of the FrameworkDeployment to be deleted in the following - // format: - // organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id} + // Required. The name of the framework deployment that you want to delete, + // in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -392,17 +408,18 @@ message DeleteFrameworkDeploymentRequest { // // If you provide this value, then it must match the existing value. If the // values don't match, then the request fails with an - // [ABORTED][google.rpc.Code.ABORTED] error. + // [`ABORTED`][google.rpc.Code.ABORTED] error. // // If you omit this value, then the resource is deleted regardless of its // current `etag` value. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for GetFrameworkDeployment. +// The request message for [GetFrameworkDeployment][]. message GetFrameworkDeploymentRequest { - // Required. FrameworkDeployment name in the following format: - // organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id} + // Required. The name of the framework deployment, in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -411,11 +428,11 @@ message GetFrameworkDeploymentRequest { ]; } -// Request message for ListFrameworkDeployments. +// The request message for [ListFrameworkDeployments][]. message ListFrameworkDeploymentsRequest { - // Required. parent resource of the FrameworkDeployment in the format: - // organizations/{organization}/locations/{location} - // Only global location is supported. + // Required. The parent resource of the framework deployment, in the format + // `organizations/{organization}/locations/{location}`. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -423,34 +440,44 @@ message ListFrameworkDeploymentsRequest { } ]; - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. + // Optional. The requested page size. The server might return fewer items than + // requested. + // If unspecified, the server picks an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A token identifying a page of results the server should return. + // Optional. A token that identifies a page of results the server should + // return. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter to be applied on the resource, defined by EBNF grammar - // https://google.aip.dev/assets/misc/ebnf-filtering.txt. + // Optional. The filter to be applied on the resource, as defined by + // [AIP-160: Filtering](https://google.aip.dev/160). string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Sort results. Supported are "name", "name desc" or "" (unsorted). + // Optional. The sort order for the results. The following values are + // supported: + // + // * `name` + // * `name desc` + // + // If you do not specify a value, then the results are not sorted. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for ListFrameworkDeployments. +// The response message for [ListFrameworkDeployments][]. message ListFrameworkDeploymentsResponse { - // The list of FrameworkDeployments. + // The list of framework deployments. repeated FrameworkDeployment framework_deployments = 1; - // A token identifying a page of results the server should return. + // A token that identifies the next page of results that the server + // should return. string next_page_token = 2; } -// Request message for GetCloudControlDeployment. +// The request message for [GetCloudControlDeployment][]. message GetCloudControlDeploymentRequest { - // Required. CloudControlDeployment name in the following format: - // organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id} + // Required. The name for the cloud control deployment, in the format + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -459,11 +486,11 @@ message GetCloudControlDeploymentRequest { ]; } -// Request message for ListCloudControlDeployments. +// The request message for [ListCloudControlDeployments][]. message ListCloudControlDeploymentsRequest { - // Required. parent resource of the CloudControlDeployment in the format: - // organizations/{organization}/locations/{location} - // Only global location is supported. + // Required. The parent resource for the cloud control deployment, in the + // format `organizations/{organization}/locations/{location}`. The only + // supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -471,34 +498,44 @@ message ListCloudControlDeploymentsRequest { } ]; - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. + // Optional. The requested page size. The server might return fewer items than + // you requested. + // If unspecified, the server picks an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A token identifying a page of results the server should return. + // Optional. A token that identifies the page of results that the server + // should return. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter to be applied on the resource, defined by EBNF grammar - // https://google.aip.dev/assets/misc/ebnf-filtering.txt. + // Optional. The filter to apply on the resource, as defined by + // [AIP-160: Filtering](https://google.aip.dev/160). string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Sort results. Supported are "name", "name desc" or "" (unsorted). + // Optional. The sort order for the results. The following values are + // supported: + // + // * `name` + // * `name desc` + // + // If you do not specify a value, then the results are not sorted. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for ListCloudControlDeployments. +// The response message for [ListCloudControlDeployments][]. message ListCloudControlDeploymentsResponse { - // The list of CloudControlDeployments. + // The list of cloud control deployments. repeated CloudControlDeployment cloud_control_deployments = 1; - // A token identifying a page of results the server should return. + // A token that identifies the next page of results that the server + // should return. string next_page_token = 2; } -// The reference to a CloudControlDeployment. +// The reference to a cloud control deployment. message CloudControlDeploymentReference { - // Output only. The name of the CloudControlDeployment. The format is: - // organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id} + // Output only. The name of the CloudControlDeployment. The format is + // `organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // The only supported location is `global`. string cloud_control_deployment = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -507,10 +544,11 @@ message CloudControlDeploymentReference { ]; } -// The reference to a FrameworkDeployment. +// The reference to a framework deployment. message FrameworkDeploymentReference { - // Output only. The name of the FrameworkDeployment. The format is: - // organizations/{org}/locations/{location}/frameworkDeployments/{framework_deployment_id} + // Output only. The name of the framework deployment, in the format + // `organizations/{org}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // The only supported location is `global`. string framework_deployment = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -518,16 +556,22 @@ message FrameworkDeploymentReference { } ]; - // Optional. The reference to the Framework that this deployment is for. - // Example: { + // Optional. The reference to the framework that this deployment is for. + // For example: + // + // ``` + // { // framework: // "organizations/{org}/locations/{location}/frameworks/{framework}", // major_revision_id: 1 // } + // ``` + // + // The only supported location is `global`. FrameworkReference framework_reference = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The display name of the Framework that this FrameworkDeployment + // Optional. The display name of the framework that this framework deployment // is for. string framework_display_name = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto new file mode 100644 index 000000000000..a8c4fc0ff03e --- /dev/null +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto @@ -0,0 +1,628 @@ +// Copyright 2025 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.cloudsecuritycompliance.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/cloudsecuritycompliance/v1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "MonitoringProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; +option (google.api.resource_definition) = { + type: "cloudsecuritycompliance.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// Service describing handlers for resources +service Monitoring { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the framework compliance summary for a given scope. + rpc ListFrameworkComplianceSummaries(ListFrameworkComplianceSummariesRequest) + returns (ListFrameworkComplianceSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/frameworkComplianceSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the finding summary by category for a given scope. + rpc ListFindingSummaries(ListFindingSummariesRequest) + returns (ListFindingSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/findingSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/findingSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/findingSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches the framework compliance report for a given scope. + rpc FetchFrameworkComplianceReport(FetchFrameworkComplianceReportRequest) + returns (FrameworkComplianceReport) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetch" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the control compliance summary for a given scope. + rpc ListControlComplianceSummaries(ListControlComplianceSummariesRequest) + returns (ListControlComplianceSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the aggregated compliance report over time for a given scope. + rpc AggregateFrameworkComplianceReport( + AggregateFrameworkComplianceReportRequest) + returns (AggregateFrameworkComplianceReportResponse) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregate" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The evaluation state of the control. +enum EvaluationState { + // Default value. This value is unused. + EVALUATION_STATE_UNSPECIFIED = 0; + + // The control is passing. + EVALUATION_STATE_PASSED = 1; + + // The control is failing. + EVALUATION_STATE_FAILED = 2; + + // The control is not assessed. + EVALUATION_STATE_NOT_ASSESSED = 3; +} + +// A finding is a record of assessment data like security, risk, health, or +// privacy. +enum FindingClass { + // Default value. This value is unused. + FINDING_CLASS_UNSPECIFIED = 0; + + // The activity is unwanted or malicious. + THREAT = 1; + + // A potential weakness in software that increases risk to + // confidentiality, integrity, and availability. + VULNERABILITY = 2; + + // A potential weakness in a cloud resource or asset configuration that + // increases risk. + MISCONFIGURATION = 3; + + // A security observation that is for informational purposes. + OBSERVATION = 4; + + // An error that prevents Security Command Center from functioning properly. + SCC_ERROR = 5; + + // A potential security risk that's due to a change in the security + // posture. + POSTURE_VIOLATION = 6; + + // A combination of security issues that represent a more severe + // security problem when taken together. + TOXIC_COMBINATION = 7; + + // A potential security risk to data assets that contain sensitive + // data. + SENSITIVE_DATA_RISK = 8; + + // A resource or resource group where high risk attack paths + // converge, based on attack path simulations (APS). + CHOKEPOINT = 9; +} + +// The request message for +// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]. +message ListFrameworkComplianceSummariesRequest { + // Required. The parent scope for the framework compliance summary. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]. +message ListFrameworkComplianceSummariesResponse { + // The list of framework compliance summaries. + repeated FrameworkComplianceSummary framework_compliance_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The response message for [GetFrameworkComplianceReport][]. +message FrameworkComplianceReport { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + plural: "frameworkComplianceReports" + singular: "frameworkComplianceReport" + }; + + // The name of the framework. + string framework = 1; + + // The description of the framework. + string framework_description = 2; + + // Output only. The last updated time of the report. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 4; + + // The type of framework. + Framework.FrameworkType framework_type = 5; + + // The list of cloud providers supported by the framework. + repeated CloudProvider supported_cloud_providers = 6; + + // The list of framework categories supported. + repeated FrameworkCategory framework_categories = 7; + + // Optional. The display name for the framework. + string framework_display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the framework compliance report. + string name = 9 [(google.api.field_behavior) = IDENTIFIER]; + + // The latest major revision ID of the framework. + int64 major_revision_id = 10; + + // The latest minor revision ID of the latest major revision of the framework. + int64 minor_revision_id = 11; + + // The target resource details of the framework. + repeated TargetResourceDetails target_resource_details = 12; +} + +// The request message for [FetchFrameworkComplianceReport][]. +message FetchFrameworkComplianceReportRequest { + // Required. The name of the framework compliance report to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + ]; + + // Optional. The end time of the report. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [ListFindingSummaries][]. +message ListFindingSummariesRequest { + // Required. The parent scope for the framework overview page. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FindingSummary" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time of the finding summary. + google.protobuf.Timestamp end_time = 5 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFindingSummaries][]. +message ListFindingSummariesResponse { + // List of finding summary by category. + repeated FindingSummary finding_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [ListControlComplianceSummaries][]. +message ListControlComplianceSummariesRequest { + // Required. The parent scope for the framework overview page. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" + } + ]; + + // Optional. The end time of the control compliance summary. + google.protobuf.Timestamp end_time = 2 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListControlComplianceSummaries][]. +message ListControlComplianceSummariesResponse { + // The list of control compliance details. + repeated ControlComplianceSummary control_compliance_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [AggregateFrameworkComplianceReport][]. +message AggregateFrameworkComplianceReportRequest { + // Required. The name of the aggregated compliance report over time to + // retrieve. + // + // The supported format is: + // `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + ]; + + // Optional. The start and end time range for the aggregated compliance + // report. + google.type.Interval interval = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [AggregateFrameworkComplianceReport][]. +message AggregateFrameworkComplianceReportResponse { + // The list of aggregated compliance reports. + repeated AggregatedComplianceReport aggregated_compliance_reports = 1; +} + +// The details for a control assessment. +message ControlAssessmentDetails { + // The number of controls that are passing or not assessed. + int32 passing_controls = 1; + + // The number of controls that are failing. + int32 failing_controls = 2; + + // The number of controls that were assessed and are passing. + int32 assessed_passing_controls = 3; + + // The number of controls that aren't assessed because they require manual + // review. + int32 not_assessed_controls = 4; +} + +// The details for a framework compliance summary. +message FrameworkComplianceSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" + pattern: "projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + plural: "frameworkComplianceSummaries" + singular: "frameworkComplianceSummary" + }; + + // The name of the framework. + string framework = 1; + + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 2; + + // The type of framework. + Framework.FrameworkType framework_type = 3; + + // The list of cloud providers supported by the framework. + repeated CloudProvider supported_cloud_providers = 4; + + // The list of framework categories supported by the framework. + repeated FrameworkCategory framework_categories = 5; + + // Optional. The display name for the framework. + string framework_display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the framework compliance summary. + string name = 7 [(google.api.field_behavior) = IDENTIFIER]; + + // The major revision ID of the framework. + int64 major_revision_id = 8; + + // The minor revision ID of the framework. + int64 minor_revision_id = 9; + + // The target resource details for the framework. + repeated TargetResourceDetails target_resource_details = 10; +} + +// The details for a finding. +message FindingSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FindingSummary" + pattern: "projects/{project}/locations/{location}/findingSummaries/{finding_summary}" + pattern: "folders/{folder}/locations/{location}/findingSummaries/{finding_summary}" + pattern: "organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}" + plural: "findingSummaries" + singular: "findingSummary" + }; + + // The category of the finding. + string finding_category = 1; + + // The class of the finding. + FindingClass finding_class = 2; + + // The severity of the finding. + Severity severity = 3; + + // The count of the finding. + int64 finding_count = 4; + + // Output only. The last updated time of the finding. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of compliance frameworks that the finding belongs to. + repeated string related_frameworks = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the finding summary. + string name = 7 [(google.api.field_behavior) = IDENTIFIER]; +} + +// The details for control compliance. +message ControlComplianceSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" + pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + plural: "controlComplianceSummaries" + singular: "controlComplianceSummary" + }; + + // The name of the control. + string control = 1; + + // The display name of the control. + string display_name = 2; + + // The description of the control. + string description = 3; + + // Output only. The overall evaluation status of the control. + EvaluationState overall_evaluation_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The total number of findings for the control. + int32 total_findings_count = 5; + + // The list of compliance frameworks that the control belongs to. + repeated string compliance_frameworks = 6; + + // The list of similar controls. + repeated SimilarControls similar_controls = 7; + + // The list of cloud control reports. + repeated CloudControlReport cloud_control_reports = 8; + + // The responsibility type for the control. + RegulatoryControlResponsibilityType control_responsibility_type = 9; + + // Whether the control is a fake control. Fake controls are created + // and mapped to cloud controls that don't belong to a control group. + bool is_fake_control = 10; + + // Identifier. The name of the control compliance summary. + string name = 11 [(google.api.field_behavior) = IDENTIFIER]; +} + +// The cloud control report. +message CloudControlReport { + // The assessment details of the cloud control. + oneof assessment_details { + // The details of a manual cloud control assessment. + ManualCloudControlAssessmentDetails + manual_cloud_control_assessment_details = 13; + + // The details of a cloud control assessment. + CloudControlAssessmentDetails cloud_control_assessment_details = 14; + } + + // The name of the cloud control. + string cloud_control = 1; + + // The display name of the cloud control. + string display_name = 2; + + // The description of the cloud control. + string description = 3; + + // The list of categories for the cloud control. + repeated string categories = 6; + + // The list of similar controls. + repeated SimilarControls similar_controls = 9; + + // The type of the cloud control. + CloudControl.Type cloud_control_type = 10; + + // The category of the finding. + string finding_category = 11; + + // The list of rules that correspond to the cloud control. + repeated Rule rules = 12; + + // The severity of the finding. + Severity finding_severity = 15; + + // The enforcement mode of the cloud control. + EnforcementMode enforcement_mode = 16; + + // The name of the cloud control deployment. + string cloud_control_deployment = 17; + + // The major revision ID of the cloud control. + int64 major_revision_id = 18; + + // The minor revision ID of the cloud control. + int64 minor_revision_id = 19; + + // The major revision IDs of the frameworks that the cloud control belongs to. + repeated int64 framework_major_revision_ids = 20; +} + +// The details for a manual cloud control assessment. +message ManualCloudControlAssessmentDetails { + // The guide for assessing a cloud control manually. + repeated string manual_cloud_control_guide = 1; +} + +// The cloud control assessment details for non-manual cloud controls. +message CloudControlAssessmentDetails { + // The number of findings for the cloud control. + int32 findings_count = 1; + + // Output only. The evaluation status of the cloud control. + EvaluationState evaluation_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The similar controls. +message SimilarControls { + // The name of the framework. + string framework = 1; + + // The ID of the control. + string control_id = 2; +} + +// The aggregated compliance report. +message AggregatedComplianceReport { + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 1; + + // The report time of the aggregated compliance report. + google.protobuf.Timestamp report_time = 2; +} + +// The details for a target resource. +message TargetResourceDetails { + // The framework deployment name for the target resource. + // + // For example, + // `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}` + string framework_deployment = 1; + + // The display name of the target resource. For example, `google.com`, + // `staging-project`, or `development-folder`. + string target_resource_display_name = 2; + + // The target resource. For example, `organizations/1234567890`, + // `projects/1234567890`, or `folders/1234567890`. + string target_resource = 3; + + // The create time of the target resource. + google.protobuf.Timestamp create_time = 4; + + // The update time of the target resource. + google.protobuf.Timestamp update_time = 5; + + // The major revision ID of the framework for the target resource. + int64 major_revision_id = 6; + + // The minor revision ID of the framework for the target resource. + int64 minor_revision_id = 7; +} diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts b/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts index adf603aafedf..a003ed5a14f1 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts +++ b/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts @@ -26,5725 +26,11014 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** EnforcementMode enum. */ - enum EnforcementMode { - ENFORCEMENT_MODE_UNSPECIFIED = 0, - PREVENTIVE = 1, - DETECTIVE = 2, - AUDIT = 3 - } - - /** FrameworkCategory enum. */ - enum FrameworkCategory { - FRAMEWORK_CATEGORY_UNSPECIFIED = 0, - INDUSTRY_DEFINED_STANDARD = 1, - ASSURED_WORKLOADS = 2, - DATA_SECURITY = 3, - GOOGLE_BEST_PRACTICES = 4, - CUSTOM_FRAMEWORK = 5 - } - - /** CloudControlCategory enum. */ - enum CloudControlCategory { - CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0, - CC_CATEGORY_INFRASTRUCTURE = 1, - CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2, - CC_CATEGORY_PHYSICAL_SECURITY = 3, - CC_CATEGORY_DATA_SECURITY = 4, - CC_CATEGORY_NETWORK_SECURITY = 5, - CC_CATEGORY_INCIDENT_MANAGEMENT = 6, - CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7, - CC_CATEGORY_ENCRYPTION = 8, - CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9, - CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10, - CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11, - CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12, - CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13, - CC_CATEGORY_PRIVACY = 14, - CC_CATEGORY_BCDR = 15 - } - - /** CloudProvider enum. */ - enum CloudProvider { - CLOUD_PROVIDER_UNSPECIFIED = 0, - AWS = 1, - AZURE = 2, - GCP = 3 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } + /** Represents an Audit */ + class Audit extends $protobuf.rpc.Service { - /** RuleActionType enum. */ - enum RuleActionType { - RULE_ACTION_TYPE_UNSPECIFIED = 0, - RULE_ACTION_TYPE_PREVENTIVE = 1, - RULE_ACTION_TYPE_DETECTIVE = 2, - RULE_ACTION_TYPE_AUDIT = 3 - } + /** + * Constructs a new Audit 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); - /** TargetResourceType enum. */ - enum TargetResourceType { - TARGET_RESOURCE_TYPE_UNSPECIFIED = 0, - TARGET_RESOURCE_CRM_TYPE_ORG = 1, - TARGET_RESOURCE_CRM_TYPE_FOLDER = 2, - TARGET_RESOURCE_CRM_TYPE_PROJECT = 3, - TARGET_RESOURCE_TYPE_APPLICATION = 4 - } + /** + * Creates new Audit 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): Audit; - /** Properties of a Framework. */ - interface IFramework { + /** + * Calls GenerateFrameworkAuditScopeReport. + * @param request GenerateFrameworkAuditScopeReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateFrameworkAuditScopeReportResponse + */ + public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReportCallback): void; - /** Framework name */ - name?: (string|null); + /** + * Calls GenerateFrameworkAuditScopeReport. + * @param request GenerateFrameworkAuditScopeReportRequest message or plain object + * @returns Promise + */ + public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): Promise; - /** Framework majorRevisionId */ - majorRevisionId?: (number|Long|string|null); + /** + * Calls CreateFrameworkAudit. + * @param request CreateFrameworkAuditRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAuditCallback): void; - /** Framework displayName */ - displayName?: (string|null); + /** + * Calls CreateFrameworkAudit. + * @param request CreateFrameworkAuditRequest message or plain object + * @returns Promise + */ + public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): Promise; - /** Framework description */ - description?: (string|null); + /** + * Calls ListFrameworkAudits. + * @param request ListFrameworkAuditsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkAuditsResponse + */ + public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAuditsCallback): void; - /** Framework type */ - type?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + /** + * Calls ListFrameworkAudits. + * @param request ListFrameworkAuditsRequest message or plain object + * @returns Promise + */ + public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): Promise; - /** Framework cloudControlDetails */ - cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]|null); + /** + * Calls GetFrameworkAudit. + * @param request GetFrameworkAuditRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkAudit + */ + public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAuditCallback): void; - /** Framework category */ - category?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + /** + * Calls GetFrameworkAudit. + * @param request GetFrameworkAuditRequest message or plain object + * @returns Promise + */ + public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): Promise; + } - /** Framework supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + namespace Audit { - /** Framework supportedTargetResourceTypes */ - supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|generateFrameworkAuditScopeReport}. + * @param error Error, if any + * @param [response] GenerateFrameworkAuditScopeReportResponse + */ + type GenerateFrameworkAuditScopeReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse) => void; - /** Framework supportedEnforcementModes */ - supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); - } + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|createFrameworkAudit}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFrameworkAuditCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Represents a Framework. */ - class Framework implements IFramework { + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|listFrameworkAudits}. + * @param error Error, if any + * @param [response] ListFrameworkAuditsResponse + */ + type ListFrameworkAuditsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse) => void; /** - * Constructs a new Framework. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|getFrameworkAudit}. + * @param error Error, if any + * @param [response] FrameworkAudit */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework); + type GetFrameworkAuditCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => void; + } - /** Framework name. */ - public name: string; + /** ComplianceState enum. */ + enum ComplianceState { + COMPLIANCE_STATE_UNSPECIFIED = 0, + COMPLIANT = 1, + VIOLATION = 2, + MANUAL_REVIEW_NEEDED = 3, + ERROR = 4, + AUDIT_NOT_SUPPORTED = 5 + } - /** Framework majorRevisionId. */ - public majorRevisionId: (number|Long|string); + /** Properties of a GenerateFrameworkAuditScopeReportRequest. */ + interface IGenerateFrameworkAuditScopeReportRequest { - /** Framework displayName. */ - public displayName: string; + /** GenerateFrameworkAuditScopeReportRequest scope */ + scope?: (string|null); - /** Framework description. */ - public description: string; + /** GenerateFrameworkAuditScopeReportRequest reportFormat */ + reportFormat?: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|null); - /** Framework type. */ - public type: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + /** GenerateFrameworkAuditScopeReportRequest complianceFramework */ + complianceFramework?: (string|null); + } - /** Framework cloudControlDetails. */ - public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]; + /** Represents a GenerateFrameworkAuditScopeReportRequest. */ + class GenerateFrameworkAuditScopeReportRequest implements IGenerateFrameworkAuditScopeReportRequest { - /** Framework category. */ - public category: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + /** + * Constructs a new GenerateFrameworkAuditScopeReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest); - /** Framework supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + /** GenerateFrameworkAuditScopeReportRequest scope. */ + public scope: string; - /** Framework supportedTargetResourceTypes. */ - public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + /** GenerateFrameworkAuditScopeReportRequest reportFormat. */ + public reportFormat: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format); - /** Framework supportedEnforcementModes. */ - public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; + /** GenerateFrameworkAuditScopeReportRequest complianceFramework. */ + public complianceFramework: string; /** - * Creates a new Framework instance using the specified properties. + * Creates a new GenerateFrameworkAuditScopeReportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Framework instance + * @returns GenerateFrameworkAuditScopeReportRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework): google.cloud.cloudsecuritycompliance.v1.Framework; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; /** - * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @param message Framework message or plain object to encode + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @param message Framework message or plain object to encode + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Framework message from the specified reader or buffer. + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Framework + * @returns GenerateFrameworkAuditScopeReportRequest * @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.cloudsecuritycompliance.v1.Framework; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; /** - * Decodes a Framework message from the specified reader or buffer, length delimited. + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Framework + * @returns GenerateFrameworkAuditScopeReportRequest * @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.cloudsecuritycompliance.v1.Framework; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; /** - * Verifies a Framework message. + * Verifies a GenerateFrameworkAuditScopeReportRequest 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 Framework message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateFrameworkAuditScopeReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Framework + * @returns GenerateFrameworkAuditScopeReportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Framework; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; /** - * Creates a plain object from a Framework message. Also converts values to other types if specified. - * @param message Framework + * Creates a plain object from a GenerateFrameworkAuditScopeReportRequest message. Also converts values to other types if specified. + * @param message GenerateFrameworkAuditScopeReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Framework, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Framework to JSON. + * Converts this GenerateFrameworkAuditScopeReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Framework + * Gets the default type url for GenerateFrameworkAuditScopeReportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Framework { + namespace GenerateFrameworkAuditScopeReportRequest { - /** FrameworkType enum. */ - enum FrameworkType { - FRAMEWORK_TYPE_UNSPECIFIED = 0, - BUILT_IN = 1, - CUSTOM = 2 + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + ODF = 1 } } - /** Properties of a CloudControlDetails. */ - interface ICloudControlDetails { + /** Properties of a GenerateFrameworkAuditScopeReportResponse. */ + interface IGenerateFrameworkAuditScopeReportResponse { - /** CloudControlDetails name */ - name?: (string|null); + /** GenerateFrameworkAuditScopeReportResponse scopeReportContents */ + scopeReportContents?: (Uint8Array|Buffer|string|null); - /** CloudControlDetails majorRevisionId */ - majorRevisionId?: (number|Long|string|null); + /** GenerateFrameworkAuditScopeReportResponse name */ + name?: (string|null); - /** CloudControlDetails parameters */ - parameters?: (google.cloud.cloudsecuritycompliance.v1.IParameter[]|null); + /** GenerateFrameworkAuditScopeReportResponse complianceFramework */ + complianceFramework?: (string|null); } - /** Represents a CloudControlDetails. */ - class CloudControlDetails implements ICloudControlDetails { + /** Represents a GenerateFrameworkAuditScopeReportResponse. */ + class GenerateFrameworkAuditScopeReportResponse implements IGenerateFrameworkAuditScopeReportResponse { /** - * Constructs a new CloudControlDetails. + * Constructs a new GenerateFrameworkAuditScopeReportResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse); - /** CloudControlDetails name. */ + /** GenerateFrameworkAuditScopeReportResponse scopeReportContents. */ + public scopeReportContents?: (Uint8Array|Buffer|string|null); + + /** GenerateFrameworkAuditScopeReportResponse name. */ public name: string; - /** CloudControlDetails majorRevisionId. */ - public majorRevisionId: (number|Long|string); + /** GenerateFrameworkAuditScopeReportResponse complianceFramework. */ + public complianceFramework: string; - /** CloudControlDetails parameters. */ - public parameters: google.cloud.cloudsecuritycompliance.v1.IParameter[]; + /** GenerateFrameworkAuditScopeReportResponse auditReport. */ + public auditReport?: "scopeReportContents"; /** - * Creates a new CloudControlDetails instance using the specified properties. + * Creates a new GenerateFrameworkAuditScopeReportResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CloudControlDetails instance + * @returns GenerateFrameworkAuditScopeReportResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; /** - * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @param message CloudControlDetails message or plain object to encode + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @param message CloudControlDetails message or plain object to encode + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudControlDetails message from the specified reader or buffer. + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudControlDetails + * @returns GenerateFrameworkAuditScopeReportResponse * @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.cloudsecuritycompliance.v1.CloudControlDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; /** - * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudControlDetails + * @returns GenerateFrameworkAuditScopeReportResponse * @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.cloudsecuritycompliance.v1.CloudControlDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; /** - * Verifies a CloudControlDetails message. + * Verifies a GenerateFrameworkAuditScopeReportResponse 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 CloudControlDetails message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateFrameworkAuditScopeReportResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudControlDetails + * @returns GenerateFrameworkAuditScopeReportResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; /** - * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. - * @param message CloudControlDetails + * Creates a plain object from a GenerateFrameworkAuditScopeReportResponse message. Also converts values to other types if specified. + * @param message GenerateFrameworkAuditScopeReportResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudControlDetails to JSON. + * Converts this GenerateFrameworkAuditScopeReportResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudControlDetails + * Gets the default type url for GenerateFrameworkAuditScopeReportResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FrameworkReference. */ - interface IFrameworkReference { + /** Properties of a ReportSummary. */ + interface IReportSummary { - /** FrameworkReference framework */ - framework?: (string|null); + /** ReportSummary totalCount */ + totalCount?: (number|null); - /** FrameworkReference majorRevisionId */ - majorRevisionId?: (number|Long|string|null); + /** ReportSummary compliantCount */ + compliantCount?: (number|null); + + /** ReportSummary violationCount */ + violationCount?: (number|null); + + /** ReportSummary manualReviewNeededCount */ + manualReviewNeededCount?: (number|null); + + /** ReportSummary errorCount */ + errorCount?: (number|null); } - /** Represents a FrameworkReference. */ - class FrameworkReference implements IFrameworkReference { + /** Represents a ReportSummary. */ + class ReportSummary implements IReportSummary { /** - * Constructs a new FrameworkReference. + * Constructs a new ReportSummary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary); - /** FrameworkReference framework. */ - public framework: string; + /** ReportSummary totalCount. */ + public totalCount: number; - /** FrameworkReference majorRevisionId. */ - public majorRevisionId?: (number|Long|string|null); + /** ReportSummary compliantCount. */ + public compliantCount: number; + + /** ReportSummary violationCount. */ + public violationCount: number; + + /** ReportSummary manualReviewNeededCount. */ + public manualReviewNeededCount: number; + + /** ReportSummary errorCount. */ + public errorCount: number; /** - * Creates a new FrameworkReference instance using the specified properties. + * Creates a new ReportSummary instance using the specified properties. * @param [properties] Properties to set - * @returns FrameworkReference instance + * @returns ReportSummary instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary): google.cloud.cloudsecuritycompliance.v1.ReportSummary; /** - * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @param message FrameworkReference message or plain object to encode + * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @param message ReportSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @param message FrameworkReference message or plain object to encode + * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @param message ReportSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FrameworkReference message from the specified reader or buffer. + * Decodes a ReportSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FrameworkReference + * @returns ReportSummary * @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.cloudsecuritycompliance.v1.FrameworkReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ReportSummary; /** - * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. + * Decodes a ReportSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FrameworkReference + * @returns ReportSummary * @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.cloudsecuritycompliance.v1.FrameworkReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ReportSummary; /** - * Verifies a FrameworkReference message. + * Verifies a ReportSummary 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 FrameworkReference message from a plain object. Also converts values to their respective internal types. + * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FrameworkReference + * @returns ReportSummary */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ReportSummary; /** - * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. - * @param message FrameworkReference + * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. + * @param message ReportSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ReportSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FrameworkReference to JSON. + * Converts this ReportSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FrameworkReference + * Gets the default type url for ReportSummary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Parameter. */ - interface IParameter { + /** Properties of a CreateFrameworkAuditRequest. */ + interface ICreateFrameworkAuditRequest { - /** Parameter name */ - name?: (string|null); + /** CreateFrameworkAuditRequest parent */ + parent?: (string|null); - /** Parameter parameterValue */ - parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + /** CreateFrameworkAuditRequest frameworkAuditId */ + frameworkAuditId?: (string|null); + + /** CreateFrameworkAuditRequest frameworkAudit */ + frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); } - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** Represents a CreateFrameworkAuditRequest. */ + class CreateFrameworkAuditRequest implements ICreateFrameworkAuditRequest { /** - * Constructs a new Parameter. + * Constructs a new CreateFrameworkAuditRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest); - /** Parameter name. */ - public name: string; + /** CreateFrameworkAuditRequest parent. */ + public parent: string; - /** Parameter parameterValue. */ - public parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + /** CreateFrameworkAuditRequest frameworkAuditId. */ + public frameworkAuditId: string; + + /** CreateFrameworkAuditRequest frameworkAudit. */ + public frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); /** - * Creates a new Parameter instance using the specified properties. + * Creates a new CreateFrameworkAuditRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Parameter instance + * @returns CreateFrameworkAuditRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter): google.cloud.cloudsecuritycompliance.v1.Parameter; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode + * Encodes the specified CreateFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @param message CreateFrameworkAuditRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode + * Encodes the specified CreateFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @param message CreateFrameworkAuditRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Parameter message from the specified reader or buffer. + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Parameter + * @returns CreateFrameworkAuditRequest * @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.cloudsecuritycompliance.v1.Parameter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Parameter + * @returns CreateFrameworkAuditRequest * @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.cloudsecuritycompliance.v1.Parameter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; /** - * Verifies a Parameter message. + * Verifies a CreateFrameworkAuditRequest 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 Parameter message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Parameter + * @returns CreateFrameworkAuditRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Parameter; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter + * Creates a plain object from a CreateFrameworkAuditRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkAuditRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Parameter to JSON. + * Converts this CreateFrameworkAuditRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Parameter + * Gets the default type url for CreateFrameworkAuditRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudControl. */ - interface ICloudControl { - - /** CloudControl name */ - name?: (string|null); - - /** CloudControl majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** CloudControl description */ - description?: (string|null); - - /** CloudControl displayName */ - displayName?: (string|null); - - /** CloudControl supportedEnforcementModes */ - supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); - - /** CloudControl parameterSpec */ - parameterSpec?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); - - /** CloudControl rules */ - rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); - - /** CloudControl severity */ - severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); - - /** CloudControl findingCategory */ - findingCategory?: (string|null); - - /** CloudControl supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - - /** CloudControl relatedFrameworks */ - relatedFrameworks?: (string[]|null); + /** Properties of a FrameworkAuditDestination. */ + interface IFrameworkAuditDestination { - /** CloudControl remediationSteps */ - remediationSteps?: (string|null); + /** FrameworkAuditDestination bucket */ + bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); + } - /** CloudControl categories */ - categories?: (google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]|null); + /** Represents a FrameworkAuditDestination. */ + class FrameworkAuditDestination implements IFrameworkAuditDestination { - /** CloudControl createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new FrameworkAuditDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination); - /** CloudControl supportedTargetResourceTypes */ - supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); - } + /** FrameworkAuditDestination bucket. */ + public bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); - /** Represents a CloudControl. */ - class CloudControl implements ICloudControl { + /** FrameworkAuditDestination destinationType. */ + public destinationType?: "bucket"; /** - * Constructs a new CloudControl. + * Creates a new FrameworkAuditDestination instance using the specified properties. * @param [properties] Properties to set + * @returns FrameworkAuditDestination instance */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl); + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - /** CloudControl name. */ - public name: string; + /** + * Encodes the specified FrameworkAuditDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @param message FrameworkAuditDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; - /** CloudControl majorRevisionId. */ - public majorRevisionId: (number|Long|string); + /** + * Encodes the specified FrameworkAuditDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @param message FrameworkAuditDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; - /** CloudControl description. */ - public description: string; + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkAuditDestination + * @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.cloudsecuritycompliance.v1.FrameworkAuditDestination; - /** CloudControl displayName. */ - public displayName: string; + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkAuditDestination + * @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.cloudsecuritycompliance.v1.FrameworkAuditDestination; - /** CloudControl supportedEnforcementModes. */ - public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; + /** + * Verifies a FrameworkAuditDestination 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); - /** CloudControl parameterSpec. */ - public parameterSpec: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + /** + * Creates a FrameworkAuditDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkAuditDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - /** CloudControl rules. */ - public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; + /** + * Creates a plain object from a FrameworkAuditDestination message. Also converts values to other types if specified. + * @param message FrameworkAuditDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CloudControl severity. */ - public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + /** + * Converts this FrameworkAuditDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** CloudControl findingCategory. */ - public findingCategory: string; + /** + * Gets the default type url for FrameworkAuditDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** CloudControl supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + /** Properties of a BucketDestination. */ + interface IBucketDestination { - /** CloudControl relatedFrameworks. */ - public relatedFrameworks: string[]; + /** BucketDestination bucketUri */ + bucketUri?: (string|null); - /** CloudControl remediationSteps. */ - public remediationSteps: string; + /** BucketDestination frameworkAuditFormat */ + frameworkAuditFormat?: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|null); + } - /** CloudControl categories. */ - public categories: google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]; + /** Represents a BucketDestination. */ + class BucketDestination implements IBucketDestination { - /** CloudControl createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new BucketDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination); - /** CloudControl supportedTargetResourceTypes. */ - public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + /** BucketDestination bucketUri. */ + public bucketUri: string; + + /** BucketDestination frameworkAuditFormat. */ + public frameworkAuditFormat: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format); /** - * Creates a new CloudControl instance using the specified properties. + * Creates a new BucketDestination instance using the specified properties. * @param [properties] Properties to set - * @returns CloudControl instance + * @returns BucketDestination instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl): google.cloud.cloudsecuritycompliance.v1.CloudControl; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination): google.cloud.cloudsecuritycompliance.v1.BucketDestination; /** - * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @param message CloudControl message or plain object to encode + * Encodes the specified BucketDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @param message BucketDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @param message CloudControl message or plain object to encode + * Encodes the specified BucketDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @param message BucketDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudControl message from the specified reader or buffer. + * Decodes a BucketDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudControl + * @returns BucketDestination * @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.cloudsecuritycompliance.v1.CloudControl; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.BucketDestination; /** - * Decodes a CloudControl message from the specified reader or buffer, length delimited. + * Decodes a BucketDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudControl + * @returns BucketDestination * @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.cloudsecuritycompliance.v1.CloudControl; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.BucketDestination; /** - * Verifies a CloudControl message. + * Verifies a BucketDestination 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 CloudControl message from a plain object. Also converts values to their respective internal types. + * Creates a BucketDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudControl + * @returns BucketDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControl; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.BucketDestination; /** - * Creates a plain object from a CloudControl message. Also converts values to other types if specified. - * @param message CloudControl + * Creates a plain object from a BucketDestination message. Also converts values to other types if specified. + * @param message BucketDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.BucketDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudControl to JSON. + * Converts this BucketDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudControl + * Gets the default type url for BucketDestination * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ParameterSpec. */ - interface IParameterSpec { + namespace BucketDestination { - /** ParameterSpec name */ + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + ODF = 1 + } + } + + /** Properties of a FrameworkAudit. */ + interface IFrameworkAudit { + + /** FrameworkAudit name */ name?: (string|null); - /** ParameterSpec displayName */ - displayName?: (string|null); + /** FrameworkAudit frameworkAuditId */ + frameworkAuditId?: (string|null); - /** ParameterSpec description */ - description?: (string|null); + /** FrameworkAudit complianceFramework */ + complianceFramework?: (string|null); - /** ParameterSpec isRequired */ - isRequired?: (boolean|null); + /** FrameworkAudit scope */ + scope?: (string|null); - /** ParameterSpec valueType */ - valueType?: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null); + /** FrameworkAudit frameworkAuditDestination */ + frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); - /** ParameterSpec defaultValue */ - defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + /** FrameworkAudit startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** ParameterSpec substitutionRules */ - substitutionRules?: (google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]|null); + /** FrameworkAudit finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); - /** ParameterSpec subParameters */ - subParameters?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); + /** FrameworkAudit complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - /** ParameterSpec validation */ - validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + /** FrameworkAudit reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** FrameworkAudit cloudControlGroupAuditDetails */ + cloudControlGroupAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]|null); + + /** FrameworkAudit cloudControlAuditDetails */ + cloudControlAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); + + /** FrameworkAudit operationId */ + operationId?: (string|null); + + /** FrameworkAudit state */ + state?: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|null); } - /** Represents a ParameterSpec. */ - class ParameterSpec implements IParameterSpec { + /** Represents a FrameworkAudit. */ + class FrameworkAudit implements IFrameworkAudit { /** - * Constructs a new ParameterSpec. + * Constructs a new FrameworkAudit. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit); - /** ParameterSpec name. */ + /** FrameworkAudit name. */ public name: string; - /** ParameterSpec displayName. */ - public displayName: string; + /** FrameworkAudit frameworkAuditId. */ + public frameworkAuditId: string; - /** ParameterSpec description. */ - public description: string; + /** FrameworkAudit complianceFramework. */ + public complianceFramework: string; - /** ParameterSpec isRequired. */ - public isRequired: boolean; + /** FrameworkAudit scope. */ + public scope: string; - /** ParameterSpec valueType. */ - public valueType: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType); + /** FrameworkAudit frameworkAuditDestination. */ + public frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); - /** ParameterSpec defaultValue. */ - public defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + /** FrameworkAudit startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** ParameterSpec substitutionRules. */ - public substitutionRules: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]; + /** FrameworkAudit finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); - /** ParameterSpec subParameters. */ - public subParameters: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + /** FrameworkAudit complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - /** ParameterSpec validation. */ - public validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + /** FrameworkAudit reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** FrameworkAudit cloudControlGroupAuditDetails. */ + public cloudControlGroupAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]; + + /** FrameworkAudit cloudControlAuditDetails. */ + public cloudControlAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; + + /** FrameworkAudit operationId. */ + public operationId: string; + + /** FrameworkAudit state. */ + public state: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State); /** - * Creates a new ParameterSpec instance using the specified properties. + * Creates a new FrameworkAudit instance using the specified properties. * @param [properties] Properties to set - * @returns ParameterSpec instance + * @returns FrameworkAudit instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; /** - * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @param message ParameterSpec message or plain object to encode + * Encodes the specified FrameworkAudit message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @param message FrameworkAudit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @param message ParameterSpec message or plain object to encode + * Encodes the specified FrameworkAudit message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @param message FrameworkAudit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ParameterSpec message from the specified reader or buffer. + * Decodes a FrameworkAudit message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ParameterSpec + * @returns FrameworkAudit * @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.cloudsecuritycompliance.v1.ParameterSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; /** - * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. + * Decodes a FrameworkAudit message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ParameterSpec + * @returns FrameworkAudit * @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.cloudsecuritycompliance.v1.ParameterSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; /** - * Verifies a ParameterSpec message. + * Verifies a FrameworkAudit 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 ParameterSpec message from a plain object. Also converts values to their respective internal types. + * Creates a FrameworkAudit message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ParameterSpec + * @returns FrameworkAudit */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; /** - * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. - * @param message ParameterSpec + * Creates a plain object from a FrameworkAudit message. Also converts values to other types if specified. + * @param message FrameworkAudit * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ParameterSpec to JSON. + * Converts this FrameworkAudit to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ParameterSpec + * Gets the default type url for FrameworkAudit * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ParameterSpec { + namespace FrameworkAudit { - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - STRING = 3, - BOOLEAN = 4, - STRINGLIST = 5, - NUMBER = 6, - ONEOF = 7 + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + RUNNING = 2, + UPLOADING = 3, + FAILED = 4, + SUCCEEDED = 5 } } - /** Properties of a Validation. */ - interface IValidation { + /** Properties of a ListFrameworkAuditsRequest. */ + interface IListFrameworkAuditsRequest { - /** Validation allowedValues */ - allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + /** ListFrameworkAuditsRequest parent */ + parent?: (string|null); - /** Validation intRange */ - intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + /** ListFrameworkAuditsRequest pageSize */ + pageSize?: (number|null); - /** Validation regexpPattern */ - regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + /** ListFrameworkAuditsRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkAuditsRequest filter */ + filter?: (string|null); } - /** Represents a Validation. */ - class Validation implements IValidation { + /** Represents a ListFrameworkAuditsRequest. */ + class ListFrameworkAuditsRequest implements IListFrameworkAuditsRequest { /** - * Constructs a new Validation. + * Constructs a new ListFrameworkAuditsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest); - /** Validation allowedValues. */ - public allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + /** ListFrameworkAuditsRequest parent. */ + public parent: string; - /** Validation intRange. */ - public intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + /** ListFrameworkAuditsRequest pageSize. */ + public pageSize: number; - /** Validation regexpPattern. */ - public regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + /** ListFrameworkAuditsRequest pageToken. */ + public pageToken: string; - /** Validation constraint. */ - public constraint?: ("allowedValues"|"intRange"|"regexpPattern"); + /** ListFrameworkAuditsRequest filter. */ + public filter: string; /** - * Creates a new Validation instance using the specified properties. + * Creates a new ListFrameworkAuditsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Validation instance + * @returns ListFrameworkAuditsRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation): google.cloud.cloudsecuritycompliance.v1.Validation; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode + * Encodes the specified ListFrameworkAuditsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @param message ListFrameworkAuditsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode + * Encodes the specified ListFrameworkAuditsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @param message ListFrameworkAuditsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Validation message from the specified reader or buffer. + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Validation + * @returns ListFrameworkAuditsRequest * @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.cloudsecuritycompliance.v1.Validation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; /** - * Decodes a Validation message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Validation + * @returns ListFrameworkAuditsRequest * @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.cloudsecuritycompliance.v1.Validation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; /** - * Verifies a Validation message. + * Verifies a ListFrameworkAuditsRequest 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 Validation message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkAuditsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Validation + * @returns ListFrameworkAuditsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Validation; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @param message Validation + * Creates a plain object from a ListFrameworkAuditsRequest message. Also converts values to other types if specified. + * @param message ListFrameworkAuditsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Validation to JSON. + * Converts this ListFrameworkAuditsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Validation + * Gets the default type url for ListFrameworkAuditsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AllowedValues. */ - interface IAllowedValues { + /** Properties of a ListFrameworkAuditsResponse. */ + interface IListFrameworkAuditsResponse { - /** AllowedValues values */ - values?: (google.cloud.cloudsecuritycompliance.v1.IParamValue[]|null); + /** ListFrameworkAuditsResponse frameworkAudits */ + frameworkAudits?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]|null); + + /** ListFrameworkAuditsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an AllowedValues. */ - class AllowedValues implements IAllowedValues { + /** Represents a ListFrameworkAuditsResponse. */ + class ListFrameworkAuditsResponse implements IListFrameworkAuditsResponse { /** - * Constructs a new AllowedValues. + * Constructs a new ListFrameworkAuditsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse); - /** AllowedValues values. */ - public values: google.cloud.cloudsecuritycompliance.v1.IParamValue[]; + /** ListFrameworkAuditsResponse frameworkAudits. */ + public frameworkAudits: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]; + + /** ListFrameworkAuditsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new AllowedValues instance using the specified properties. + * Creates a new ListFrameworkAuditsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AllowedValues instance + * @returns ListFrameworkAuditsResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; /** - * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @param message AllowedValues message or plain object to encode + * Encodes the specified ListFrameworkAuditsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @param message ListFrameworkAuditsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @param message AllowedValues message or plain object to encode + * Encodes the specified ListFrameworkAuditsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @param message ListFrameworkAuditsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AllowedValues message from the specified reader or buffer. + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AllowedValues + * @returns ListFrameworkAuditsResponse * @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.cloudsecuritycompliance.v1.AllowedValues; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; /** - * Decodes an AllowedValues message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AllowedValues + * @returns ListFrameworkAuditsResponse * @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.cloudsecuritycompliance.v1.AllowedValues; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; /** - * Verifies an AllowedValues message. + * Verifies a ListFrameworkAuditsResponse 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 AllowedValues message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkAuditsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AllowedValues + * @returns ListFrameworkAuditsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; /** - * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. - * @param message AllowedValues + * Creates a plain object from a ListFrameworkAuditsResponse message. Also converts values to other types if specified. + * @param message ListFrameworkAuditsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AllowedValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AllowedValues to JSON. + * Converts this ListFrameworkAuditsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AllowedValues + * Gets the default type url for ListFrameworkAuditsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RegexpPattern. */ - interface IRegexpPattern { + /** Properties of a GetFrameworkAuditRequest. */ + interface IGetFrameworkAuditRequest { - /** RegexpPattern pattern */ - pattern?: (string|null); + /** GetFrameworkAuditRequest name */ + name?: (string|null); } - /** Represents a RegexpPattern. */ - class RegexpPattern implements IRegexpPattern { + /** Represents a GetFrameworkAuditRequest. */ + class GetFrameworkAuditRequest implements IGetFrameworkAuditRequest { /** - * Constructs a new RegexpPattern. + * Constructs a new GetFrameworkAuditRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest); - /** RegexpPattern pattern. */ - public pattern: string; + /** GetFrameworkAuditRequest name. */ + public name: string; /** - * Creates a new RegexpPattern instance using the specified properties. + * Creates a new GetFrameworkAuditRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RegexpPattern instance + * @returns GetFrameworkAuditRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; /** - * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @param message RegexpPattern message or plain object to encode + * Encodes the specified GetFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @param message GetFrameworkAuditRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @param message RegexpPattern message or plain object to encode + * Encodes the specified GetFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @param message GetFrameworkAuditRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RegexpPattern message from the specified reader or buffer. + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RegexpPattern + * @returns GetFrameworkAuditRequest * @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.cloudsecuritycompliance.v1.RegexpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; /** - * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RegexpPattern + * @returns GetFrameworkAuditRequest * @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.cloudsecuritycompliance.v1.RegexpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; /** - * Verifies a RegexpPattern message. + * Verifies a GetFrameworkAuditRequest 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 RegexpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a GetFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RegexpPattern + * @returns GetFrameworkAuditRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; /** - * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. - * @param message RegexpPattern + * Creates a plain object from a GetFrameworkAuditRequest message. Also converts values to other types if specified. + * @param message GetFrameworkAuditRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.RegexpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RegexpPattern to JSON. + * Converts this GetFrameworkAuditRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RegexpPattern + * Gets the default type url for GetFrameworkAuditRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IntRange. */ - interface IIntRange { + /** Properties of a CloudControlGroupAuditDetails. */ + interface ICloudControlGroupAuditDetails { - /** IntRange min */ - min?: (number|Long|string|null); + /** CloudControlGroupAuditDetails cloudControlGroupId */ + cloudControlGroupId?: (string|null); - /** IntRange max */ - max?: (number|Long|string|null); + /** CloudControlGroupAuditDetails displayName */ + displayName?: (string|null); + + /** CloudControlGroupAuditDetails description */ + description?: (string|null); + + /** CloudControlGroupAuditDetails responsibilityType */ + responsibilityType?: (string|null); + + /** CloudControlGroupAuditDetails googleResponsibilityDescription */ + googleResponsibilityDescription?: (string|null); + + /** CloudControlGroupAuditDetails googleResponsibilityImplementation */ + googleResponsibilityImplementation?: (string|null); + + /** CloudControlGroupAuditDetails customerResponsibilityDescription */ + customerResponsibilityDescription?: (string|null); + + /** CloudControlGroupAuditDetails customerResponsibilityImplementation */ + customerResponsibilityImplementation?: (string|null); + + /** CloudControlGroupAuditDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** CloudControlGroupAuditDetails controlId */ + controlId?: (string|null); + + /** CloudControlGroupAuditDetails controlFamily */ + controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** CloudControlGroupAuditDetails cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); + + /** CloudControlGroupAuditDetails reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); } - /** Represents an IntRange. */ - class IntRange implements IIntRange { + /** Represents a CloudControlGroupAuditDetails. */ + class CloudControlGroupAuditDetails implements ICloudControlGroupAuditDetails { /** - * Constructs a new IntRange. + * Constructs a new CloudControlGroupAuditDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails); - /** IntRange min. */ - public min: (number|Long|string); + /** CloudControlGroupAuditDetails cloudControlGroupId. */ + public cloudControlGroupId: string; - /** IntRange max. */ - public max: (number|Long|string); + /** CloudControlGroupAuditDetails displayName. */ + public displayName: string; + + /** CloudControlGroupAuditDetails description. */ + public description: string; + + /** CloudControlGroupAuditDetails responsibilityType. */ + public responsibilityType: string; + + /** CloudControlGroupAuditDetails googleResponsibilityDescription. */ + public googleResponsibilityDescription: string; + + /** CloudControlGroupAuditDetails googleResponsibilityImplementation. */ + public googleResponsibilityImplementation: string; + + /** CloudControlGroupAuditDetails customerResponsibilityDescription. */ + public customerResponsibilityDescription: string; + + /** CloudControlGroupAuditDetails customerResponsibilityImplementation. */ + public customerResponsibilityImplementation: string; + + /** CloudControlGroupAuditDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** CloudControlGroupAuditDetails controlId. */ + public controlId: string; + + /** CloudControlGroupAuditDetails controlFamily. */ + public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** CloudControlGroupAuditDetails cloudControlDetails. */ + public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; + + /** CloudControlGroupAuditDetails reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); /** - * Creates a new IntRange instance using the specified properties. + * Creates a new CloudControlGroupAuditDetails instance using the specified properties. * @param [properties] Properties to set - * @returns IntRange instance + * @returns CloudControlGroupAuditDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange): google.cloud.cloudsecuritycompliance.v1.IntRange; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; /** - * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @param message IntRange message or plain object to encode + * Encodes the specified CloudControlGroupAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @param message CloudControlGroupAuditDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @param message IntRange message or plain object to encode + * Encodes the specified CloudControlGroupAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @param message CloudControlGroupAuditDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IntRange message from the specified reader or buffer. + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IntRange + * @returns CloudControlGroupAuditDetails * @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.cloudsecuritycompliance.v1.IntRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; /** - * Decodes an IntRange message from the specified reader or buffer, length delimited. + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IntRange + * @returns CloudControlGroupAuditDetails * @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.cloudsecuritycompliance.v1.IntRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; /** - * Verifies an IntRange message. + * Verifies a CloudControlGroupAuditDetails 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 IntRange message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlGroupAuditDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IntRange + * @returns CloudControlGroupAuditDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.IntRange; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; /** - * Creates a plain object from an IntRange message. Also converts values to other types if specified. - * @param message IntRange + * Creates a plain object from a CloudControlGroupAuditDetails message. Also converts values to other types if specified. + * @param message CloudControlGroupAuditDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.IntRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IntRange to JSON. + * Converts this CloudControlGroupAuditDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IntRange + * Gets the default type url for CloudControlGroupAuditDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StringList. */ - interface IStringList { + /** Properties of a FindingDetails. */ + interface IFindingDetails { - /** StringList values */ - values?: (string[]|null); + /** FindingDetails name */ + name?: (string|null); + + /** FindingDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** FindingDetails observation */ + observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); + + /** FindingDetails evidence */ + evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); } - /** Represents a StringList. */ - class StringList implements IStringList { + /** Represents a FindingDetails. */ + class FindingDetails implements IFindingDetails { /** - * Constructs a new StringList. + * Constructs a new FindingDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails); - /** StringList values. */ - public values: string[]; + /** FindingDetails name. */ + public name: string; + + /** FindingDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** FindingDetails observation. */ + public observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); + + /** FindingDetails evidence. */ + public evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); /** - * Creates a new StringList instance using the specified properties. + * Creates a new FindingDetails instance using the specified properties. * @param [properties] Properties to set - * @returns StringList instance + * @returns FindingDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList): google.cloud.cloudsecuritycompliance.v1.StringList; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails): google.cloud.cloudsecuritycompliance.v1.FindingDetails; /** - * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode + * Encodes the specified FindingDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @param message FindingDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode + * Encodes the specified FindingDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @param message FindingDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StringList message from the specified reader or buffer. + * Decodes a FindingDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StringList + * @returns FindingDetails * @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.cloudsecuritycompliance.v1.StringList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingDetails; /** - * Decodes a StringList message from the specified reader or buffer, length delimited. + * Decodes a FindingDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StringList + * @returns FindingDetails * @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.cloudsecuritycompliance.v1.StringList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingDetails; /** - * Verifies a StringList message. + * Verifies a FindingDetails 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 StringList message from a plain object. Also converts values to their respective internal types. + * Creates a FindingDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StringList + * @returns FindingDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.StringList; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingDetails; /** - * Creates a plain object from a StringList message. Also converts values to other types if specified. - * @param message StringList + * Creates a plain object from a FindingDetails message. Also converts values to other types if specified. + * @param message FindingDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StringList to JSON. + * Converts this FindingDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StringList + * Gets the default type url for FindingDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ParamValue. */ - interface IParamValue { - - /** ParamValue stringValue */ - stringValue?: (string|null); - - /** ParamValue boolValue */ - boolValue?: (boolean|null); + /** Properties of an ObservationDetails. */ + interface IObservationDetails { - /** ParamValue stringListValue */ - stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + /** ObservationDetails currentValue */ + currentValue?: (string|null); - /** ParamValue numberValue */ - numberValue?: (number|null); + /** ObservationDetails expectedValue */ + expectedValue?: (string|null); - /** ParamValue oneofValue */ - oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + /** ObservationDetails guidance */ + guidance?: (string|null); } - /** Represents a ParamValue. */ - class ParamValue implements IParamValue { + /** Represents an ObservationDetails. */ + class ObservationDetails implements IObservationDetails { /** - * Constructs a new ParamValue. + * Constructs a new ObservationDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue); - - /** ParamValue stringValue. */ - public stringValue?: (string|null); - - /** ParamValue boolValue. */ - public boolValue?: (boolean|null); - - /** ParamValue stringListValue. */ - public stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails); - /** ParamValue numberValue. */ - public numberValue?: (number|null); + /** ObservationDetails currentValue. */ + public currentValue: string; - /** ParamValue oneofValue. */ - public oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + /** ObservationDetails expectedValue. */ + public expectedValue: string; - /** ParamValue kind. */ - public kind?: ("stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"); + /** ObservationDetails guidance. */ + public guidance: string; /** - * Creates a new ParamValue instance using the specified properties. + * Creates a new ObservationDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ParamValue instance + * @returns ObservationDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue): google.cloud.cloudsecuritycompliance.v1.ParamValue; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; /** - * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @param message ParamValue message or plain object to encode + * Encodes the specified ObservationDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @param message ObservationDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @param message ParamValue message or plain object to encode + * Encodes the specified ObservationDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @param message ObservationDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ParamValue message from the specified reader or buffer. + * Decodes an ObservationDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ParamValue + * @returns ObservationDetails * @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.cloudsecuritycompliance.v1.ParamValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; /** - * Decodes a ParamValue message from the specified reader or buffer, length delimited. + * Decodes an ObservationDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ParamValue + * @returns ObservationDetails * @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.cloudsecuritycompliance.v1.ParamValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; /** - * Verifies a ParamValue message. + * Verifies an ObservationDetails 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 ParamValue message from a plain object. Also converts values to their respective internal types. + * Creates an ObservationDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ParamValue + * @returns ObservationDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParamValue; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; /** - * Creates a plain object from a ParamValue message. Also converts values to other types if specified. - * @param message ParamValue + * Creates a plain object from an ObservationDetails message. Also converts values to other types if specified. + * @param message ObservationDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParamValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ObservationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ParamValue to JSON. + * Converts this ObservationDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ParamValue + * Gets the default type url for ObservationDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ParameterSubstitutionRule. */ - interface IParameterSubstitutionRule { + /** Properties of an EvidenceDetails. */ + interface IEvidenceDetails { - /** ParameterSubstitutionRule placeholderSubstitutionRule */ - placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + /** EvidenceDetails resource */ + resource?: (string|null); - /** ParameterSubstitutionRule attributeSubstitutionRule */ - attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + /** EvidenceDetails service */ + service?: (string|null); + + /** EvidenceDetails evidencePath */ + evidencePath?: (string|null); } - /** Represents a ParameterSubstitutionRule. */ - class ParameterSubstitutionRule implements IParameterSubstitutionRule { + /** Represents an EvidenceDetails. */ + class EvidenceDetails implements IEvidenceDetails { /** - * Constructs a new ParameterSubstitutionRule. + * Constructs a new EvidenceDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails); - /** ParameterSubstitutionRule placeholderSubstitutionRule. */ - public placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + /** EvidenceDetails resource. */ + public resource: string; - /** ParameterSubstitutionRule attributeSubstitutionRule. */ - public attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + /** EvidenceDetails service. */ + public service: string; - /** ParameterSubstitutionRule substitutionType. */ - public substitutionType?: ("placeholderSubstitutionRule"|"attributeSubstitutionRule"); + /** EvidenceDetails evidencePath. */ + public evidencePath: string; /** - * Creates a new ParameterSubstitutionRule instance using the specified properties. + * Creates a new EvidenceDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ParameterSubstitutionRule instance + * @returns EvidenceDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; /** - * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @param message ParameterSubstitutionRule message or plain object to encode + * Encodes the specified EvidenceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @param message EvidenceDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @param message ParameterSubstitutionRule message or plain object to encode + * Encodes the specified EvidenceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @param message EvidenceDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. + * Decodes an EvidenceDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ParameterSubstitutionRule + * @returns EvidenceDetails * @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.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. + * Decodes an EvidenceDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ParameterSubstitutionRule + * @returns EvidenceDetails * @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.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; /** - * Verifies a ParameterSubstitutionRule message. + * Verifies an EvidenceDetails 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 ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * Creates an EvidenceDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ParameterSubstitutionRule + * @returns EvidenceDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; /** - * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. - * @param message ParameterSubstitutionRule + * Creates a plain object from an EvidenceDetails message. Also converts values to other types if specified. + * @param message EvidenceDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.EvidenceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ParameterSubstitutionRule to JSON. + * Converts this EvidenceDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ParameterSubstitutionRule + * Gets the default type url for EvidenceDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AttributeSubstitutionRule. */ - interface IAttributeSubstitutionRule { - - /** AttributeSubstitutionRule attribute */ - attribute?: (string|null); - } - - /** Represents an AttributeSubstitutionRule. */ - class AttributeSubstitutionRule implements IAttributeSubstitutionRule { - - /** - * Constructs a new AttributeSubstitutionRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule); - - /** AttributeSubstitutionRule attribute. */ - public attribute: string; - - /** - * Creates a new AttributeSubstitutionRule instance using the specified properties. - * @param [properties] Properties to set - * @returns AttributeSubstitutionRule instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + /** Properties of a CloudControlAuditDetails. */ + interface ICloudControlAuditDetails { - /** - * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @param message AttributeSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** CloudControlAuditDetails cloudControl */ + cloudControl?: (string|null); - /** - * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @param message AttributeSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + /** CloudControlAuditDetails cloudControlId */ + cloudControlId?: (string|null); - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttributeSubstitutionRule - * @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.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + /** CloudControlAuditDetails cloudControlDescription */ + cloudControlDescription?: (string|null); - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttributeSubstitutionRule - * @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.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + /** CloudControlAuditDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - /** - * Verifies an AttributeSubstitutionRule 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); + /** CloudControlAuditDetails reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - /** - * Creates an AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttributeSubstitutionRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + /** CloudControlAuditDetails findings */ + findings?: (google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]|null); + } - /** - * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. - * @param message AttributeSubstitutionRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a CloudControlAuditDetails. */ + class CloudControlAuditDetails implements ICloudControlAuditDetails { /** - * Converts this AttributeSubstitutionRule to JSON. - * @returns JSON object + * Constructs a new CloudControlAuditDetails. + * @param [properties] Properties to set */ - public toJSON(): { [k: string]: any }; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails); - /** - * Gets the default type url for AttributeSubstitutionRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** CloudControlAuditDetails cloudControl. */ + public cloudControl: string; - /** Properties of a PlaceholderSubstitutionRule. */ - interface IPlaceholderSubstitutionRule { + /** CloudControlAuditDetails cloudControlId. */ + public cloudControlId: string; - /** PlaceholderSubstitutionRule attribute */ - attribute?: (string|null); - } + /** CloudControlAuditDetails cloudControlDescription. */ + public cloudControlDescription: string; - /** Represents a PlaceholderSubstitutionRule. */ - class PlaceholderSubstitutionRule implements IPlaceholderSubstitutionRule { + /** CloudControlAuditDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - /** - * Constructs a new PlaceholderSubstitutionRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule); + /** CloudControlAuditDetails reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - /** PlaceholderSubstitutionRule attribute. */ - public attribute: string; + /** CloudControlAuditDetails findings. */ + public findings: google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]; /** - * Creates a new PlaceholderSubstitutionRule instance using the specified properties. + * Creates a new CloudControlAuditDetails instance using the specified properties. * @param [properties] Properties to set - * @returns PlaceholderSubstitutionRule instance + * @returns CloudControlAuditDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; /** - * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @param message PlaceholderSubstitutionRule message or plain object to encode + * Encodes the specified CloudControlAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @param message CloudControlAuditDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @param message PlaceholderSubstitutionRule message or plain object to encode + * Encodes the specified CloudControlAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @param message CloudControlAuditDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. + * Decodes a CloudControlAuditDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlaceholderSubstitutionRule + * @returns CloudControlAuditDetails * @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.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. + * Decodes a CloudControlAuditDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlaceholderSubstitutionRule + * @returns CloudControlAuditDetails * @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.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; /** - * Verifies a PlaceholderSubstitutionRule message. + * Verifies a CloudControlAuditDetails 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 PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlAuditDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlaceholderSubstitutionRule + * @returns CloudControlAuditDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; /** - * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. - * @param message PlaceholderSubstitutionRule + * Creates a plain object from a CloudControlAuditDetails message. Also converts values to other types if specified. + * @param message CloudControlAuditDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlaceholderSubstitutionRule to JSON. + * Converts this CloudControlAuditDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PlaceholderSubstitutionRule + * Gets the default type url for CloudControlAuditDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Rule. */ - interface IRule { + /** RegulatoryControlResponsibilityType enum. */ + enum RegulatoryControlResponsibilityType { + REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0, + GOOGLE = 1, + CUSTOMER = 2, + SHARED = 3 + } - /** Rule celExpression */ - celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + /** EnforcementMode enum. */ + enum EnforcementMode { + ENFORCEMENT_MODE_UNSPECIFIED = 0, + PREVENTIVE = 1, + DETECTIVE = 2, + AUDIT = 3 + } - /** Rule description */ + /** FrameworkCategory enum. */ + enum FrameworkCategory { + FRAMEWORK_CATEGORY_UNSPECIFIED = 0, + INDUSTRY_DEFINED_STANDARD = 1, + ASSURED_WORKLOADS = 2, + DATA_SECURITY = 3, + GOOGLE_BEST_PRACTICES = 4, + CUSTOM_FRAMEWORK = 5 + } + + /** CloudControlCategory enum. */ + enum CloudControlCategory { + CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0, + CC_CATEGORY_INFRASTRUCTURE = 1, + CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2, + CC_CATEGORY_PHYSICAL_SECURITY = 3, + CC_CATEGORY_DATA_SECURITY = 4, + CC_CATEGORY_NETWORK_SECURITY = 5, + CC_CATEGORY_INCIDENT_MANAGEMENT = 6, + CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7, + CC_CATEGORY_ENCRYPTION = 8, + CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9, + CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10, + CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11, + CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12, + CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13, + CC_CATEGORY_PRIVACY = 14, + CC_CATEGORY_BCDR = 15 + } + + /** CloudProvider enum. */ + enum CloudProvider { + CLOUD_PROVIDER_UNSPECIFIED = 0, + AWS = 1, + AZURE = 2, + GCP = 3 + } + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + + /** RuleActionType enum. */ + enum RuleActionType { + RULE_ACTION_TYPE_UNSPECIFIED = 0, + RULE_ACTION_TYPE_PREVENTIVE = 1, + RULE_ACTION_TYPE_DETECTIVE = 2, + RULE_ACTION_TYPE_AUDIT = 3 + } + + /** TargetResourceType enum. */ + enum TargetResourceType { + TARGET_RESOURCE_TYPE_UNSPECIFIED = 0, + TARGET_RESOURCE_CRM_TYPE_ORG = 1, + TARGET_RESOURCE_CRM_TYPE_FOLDER = 2, + TARGET_RESOURCE_CRM_TYPE_PROJECT = 3, + TARGET_RESOURCE_TYPE_APPLICATION = 4 + } + + /** Properties of a Framework. */ + interface IFramework { + + /** Framework name */ + name?: (string|null); + + /** Framework majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** Framework displayName */ + displayName?: (string|null); + + /** Framework description */ description?: (string|null); - /** Rule ruleActionTypes */ - ruleActionTypes?: (google.cloud.cloudsecuritycompliance.v1.RuleActionType[]|null); + /** Framework type */ + type?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + + /** Framework cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]|null); + + /** Framework category */ + category?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + + /** Framework supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** Framework supportedTargetResourceTypes */ + supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); + + /** Framework supportedEnforcementModes */ + supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); } - /** Represents a Rule. */ - class Rule implements IRule { + /** Represents a Framework. */ + class Framework implements IFramework { /** - * Constructs a new Rule. + * Constructs a new Framework. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRule); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework); - /** Rule celExpression. */ - public celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + /** Framework name. */ + public name: string; - /** Rule description. */ + /** Framework majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** Framework displayName. */ + public displayName: string; + + /** Framework description. */ public description: string; - /** Rule ruleActionTypes. */ - public ruleActionTypes: google.cloud.cloudsecuritycompliance.v1.RuleActionType[]; + /** Framework type. */ + public type: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); - /** Rule implementation. */ - public implementation?: "celExpression"; + /** Framework cloudControlDetails. */ + public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]; + + /** Framework category. */ + public category: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** Framework supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** Framework supportedTargetResourceTypes. */ + public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + + /** Framework supportedEnforcementModes. */ + public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; /** - * Creates a new Rule instance using the specified properties. + * Creates a new Framework instance using the specified properties. * @param [properties] Properties to set - * @returns Rule instance + * @returns Framework instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRule): google.cloud.cloudsecuritycompliance.v1.Rule; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework): google.cloud.cloudsecuritycompliance.v1.Framework; /** - * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode + * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @param message Framework message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode + * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @param message Framework message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Rule message from the specified reader or buffer. + * Decodes a Framework message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Rule + * @returns Framework * @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.cloudsecuritycompliance.v1.Rule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Framework; /** - * Decodes a Rule message from the specified reader or buffer, length delimited. + * Decodes a Framework message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Rule + * @returns Framework * @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.cloudsecuritycompliance.v1.Rule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Framework; /** - * Verifies a Rule message. + * Verifies a Framework 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 Rule message from a plain object. Also converts values to their respective internal types. + * Creates a Framework message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Rule + * @returns Framework */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Rule; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Framework; /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule + * Creates a plain object from a Framework message. Also converts values to other types if specified. + * @param message Framework * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Framework, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Rule to JSON. + * Converts this Framework to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Rule + * Gets the default type url for Framework * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CELExpression. */ - interface ICELExpression { + namespace Framework { - /** CELExpression resourceTypesValues */ - resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + /** FrameworkType enum. */ + enum FrameworkType { + FRAMEWORK_TYPE_UNSPECIFIED = 0, + BUILT_IN = 1, + CUSTOM = 2 + } + } - /** CELExpression expression */ - expression?: (string|null); + /** Properties of a CloudControlDetails. */ + interface ICloudControlDetails { + + /** CloudControlDetails name */ + name?: (string|null); + + /** CloudControlDetails majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControlDetails parameters */ + parameters?: (google.cloud.cloudsecuritycompliance.v1.IParameter[]|null); } - /** Represents a CELExpression. */ - class CELExpression implements ICELExpression { + /** Represents a CloudControlDetails. */ + class CloudControlDetails implements ICloudControlDetails { /** - * Constructs a new CELExpression. + * Constructs a new CloudControlDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails); - /** CELExpression resourceTypesValues. */ - public resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + /** CloudControlDetails name. */ + public name: string; - /** CELExpression expression. */ - public expression: string; + /** CloudControlDetails majorRevisionId. */ + public majorRevisionId: (number|Long|string); - /** CELExpression criteria. */ - public criteria?: "resourceTypesValues"; + /** CloudControlDetails parameters. */ + public parameters: google.cloud.cloudsecuritycompliance.v1.IParameter[]; /** - * Creates a new CELExpression instance using the specified properties. + * Creates a new CloudControlDetails instance using the specified properties. * @param [properties] Properties to set - * @returns CELExpression instance + * @returns CloudControlDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression): google.cloud.cloudsecuritycompliance.v1.CELExpression; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; /** - * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @param message CELExpression message or plain object to encode + * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @param message CloudControlDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @param message CELExpression message or plain object to encode + * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @param message CloudControlDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CELExpression message from the specified reader or buffer. + * Decodes a CloudControlDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CELExpression + * @returns CloudControlDetails * @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.cloudsecuritycompliance.v1.CELExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; /** - * Decodes a CELExpression message from the specified reader or buffer, length delimited. + * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CELExpression + * @returns CloudControlDetails * @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.cloudsecuritycompliance.v1.CELExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; /** - * Verifies a CELExpression message. + * Verifies a CloudControlDetails 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 CELExpression message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CELExpression + * @returns CloudControlDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CELExpression; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; /** - * Creates a plain object from a CELExpression message. Also converts values to other types if specified. - * @param message CELExpression + * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. + * @param message CloudControlDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CELExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CELExpression to JSON. + * Converts this CloudControlDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CELExpression + * Gets the default type url for CloudControlDetails * @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); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** Properties of a FrameworkReference. */ + interface IFrameworkReference { - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** FrameworkReference framework */ + framework?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** FrameworkReference majorRevisionId */ + majorRevisionId?: (number|Long|string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a FrameworkReference. */ + class FrameworkReference implements IFrameworkReference { /** - * Constructs a new OperationMetadata. + * Constructs a new FrameworkReference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.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; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** FrameworkReference framework. */ + public framework: string; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** FrameworkReference majorRevisionId. */ + public majorRevisionId?: (number|Long|string|null); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new FrameworkReference instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns FrameworkReference instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IOperationMetadata): google.cloud.cloudsecuritycompliance.v1.OperationMetadata; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @param message FrameworkReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @param message FrameworkReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a FrameworkReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns FrameworkReference * @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.cloudsecuritycompliance.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns FrameworkReference * @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.cloudsecuritycompliance.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; /** - * Verifies an OperationMetadata message. + * Verifies a FrameworkReference 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. + * Creates a FrameworkReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns FrameworkReference */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. + * @param message FrameworkReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this FrameworkReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for FrameworkReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Config */ - class Config extends $protobuf.rpc.Service { + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter name */ + name?: (string|null); + + /** Parameter parameterValue */ + parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { /** - * Constructs a new Config service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new Parameter. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter); + + /** Parameter name. */ + public name: string; + + /** Parameter parameterValue. */ + public parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); /** - * Creates new Config service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Config; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter): google.cloud.cloudsecuritycompliance.v1.Parameter; /** - * Calls ListFrameworks. - * @param request ListFrameworksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworksResponse + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback): void; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListFrameworks. - * @param request ListFrameworksRequest message or plain object - * @returns Promise + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): Promise; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetFramework. - * @param request GetFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Parameter; /** - * Calls GetFramework. - * @param request GetFrameworkRequest message or plain object - * @returns Promise + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Parameter; /** - * Calls CreateFramework. - * @param request CreateFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateFramework. - * @param request CreateFrameworkRequest message or plain object - * @returns Promise + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter */ - public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Parameter; /** - * Calls UpdateFramework. - * @param request UpdateFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object */ - public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback): void; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateFramework. - * @param request UpdateFrameworkRequest message or plain object - * @returns Promise + * Converts this Parameter to JSON. + * @returns JSON object */ - public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteFramework. - * @param request DeleteFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControl. */ + interface ICloudControl { + + /** CloudControl name */ + name?: (string|null); + + /** CloudControl majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControl description */ + description?: (string|null); + + /** CloudControl displayName */ + displayName?: (string|null); + + /** CloudControl supportedEnforcementModes */ + supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); + + /** CloudControl parameterSpec */ + parameterSpec?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); + + /** CloudControl rules */ + rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); + + /** CloudControl severity */ + severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** CloudControl findingCategory */ + findingCategory?: (string|null); + + /** CloudControl supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** CloudControl relatedFrameworks */ + relatedFrameworks?: (string[]|null); + + /** CloudControl remediationSteps */ + remediationSteps?: (string|null); + + /** CloudControl categories */ + categories?: (google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]|null); + + /** CloudControl createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControl supportedTargetResourceTypes */ + supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); + } + + /** Represents a CloudControl. */ + class CloudControl implements ICloudControl { + + /** + * Constructs a new CloudControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl); + + /** CloudControl name. */ + public name: string; + + /** CloudControl majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** CloudControl description. */ + public description: string; + + /** CloudControl displayName. */ + public displayName: string; + + /** CloudControl supportedEnforcementModes. */ + public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; + + /** CloudControl parameterSpec. */ + public parameterSpec: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + + /** CloudControl rules. */ + public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; + + /** CloudControl severity. */ + public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** CloudControl findingCategory. */ + public findingCategory: string; + + /** CloudControl supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** CloudControl relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** CloudControl remediationSteps. */ + public remediationSteps: string; + + /** CloudControl categories. */ + public categories: google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]; + + /** CloudControl createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControl supportedTargetResourceTypes. */ + public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + + /** + * Creates a new CloudControl instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControl instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @param message CloudControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @param message CloudControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControl + * @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.cloudsecuritycompliance.v1.CloudControl; + + /** + * Decodes a CloudControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControl + * @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.cloudsecuritycompliance.v1.CloudControl; + + /** + * Verifies a CloudControl 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 CloudControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Creates a plain object from a CloudControl message. Also converts values to other types if specified. + * @param message CloudControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudControl { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CUSTOM = 1, + BUILT_IN = 2 + } + } + + /** Properties of a ParameterSpec. */ + interface IParameterSpec { + + /** ParameterSpec name */ + name?: (string|null); + + /** ParameterSpec displayName */ + displayName?: (string|null); + + /** ParameterSpec description */ + description?: (string|null); + + /** ParameterSpec isRequired */ + isRequired?: (boolean|null); + + /** ParameterSpec valueType */ + valueType?: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null); + + /** ParameterSpec defaultValue */ + defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + + /** ParameterSpec substitutionRules */ + substitutionRules?: (google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]|null); + + /** ParameterSpec subParameters */ + subParameters?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); + + /** ParameterSpec validation */ + validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + } + + /** Represents a ParameterSpec. */ + class ParameterSpec implements IParameterSpec { + + /** + * Constructs a new ParameterSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec); + + /** ParameterSpec name. */ + public name: string; + + /** ParameterSpec displayName. */ + public displayName: string; + + /** ParameterSpec description. */ + public description: string; + + /** ParameterSpec isRequired. */ + public isRequired: boolean; + + /** ParameterSpec valueType. */ + public valueType: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType); + + /** ParameterSpec defaultValue. */ + public defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + + /** ParameterSpec substitutionRules. */ + public substitutionRules: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]; + + /** ParameterSpec subParameters. */ + public subParameters: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + + /** ParameterSpec validation. */ + public validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + + /** + * Creates a new ParameterSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterSpec instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @param message ParameterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @param message ParameterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterSpec + * @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.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterSpec + * @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.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Verifies a ParameterSpec 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 ParameterSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. + * @param message ParameterSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParameterSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ParameterSpec { + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + STRING = 3, + BOOLEAN = 4, + STRINGLIST = 5, + NUMBER = 6, + ONEOF = 7 + } + } + + /** Properties of a Validation. */ + interface IValidation { + + /** Validation allowedValues */ + allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + + /** Validation intRange */ + intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + + /** Validation regexpPattern */ + regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + } + + /** Represents a Validation. */ + class Validation implements IValidation { + + /** + * Constructs a new Validation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation); + + /** Validation allowedValues. */ + public allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + + /** Validation intRange. */ + public intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + + /** Validation regexpPattern. */ + public regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + + /** Validation constraint. */ + public constraint?: ("allowedValues"|"intRange"|"regexpPattern"); + + /** + * Creates a new Validation instance using the specified properties. + * @param [properties] Properties to set + * @returns Validation instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Validation + * @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.cloudsecuritycompliance.v1.Validation; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Validation + * @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.cloudsecuritycompliance.v1.Validation; + + /** + * Verifies a Validation 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 Validation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @param message Validation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Validation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllowedValues. */ + interface IAllowedValues { + + /** AllowedValues values */ + values?: (google.cloud.cloudsecuritycompliance.v1.IParamValue[]|null); + } + + /** Represents an AllowedValues. */ + class AllowedValues implements IAllowedValues { + + /** + * Constructs a new AllowedValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues); + + /** AllowedValues values. */ + public values: google.cloud.cloudsecuritycompliance.v1.IParamValue[]; + + /** + * Creates a new AllowedValues instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedValues instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @param message AllowedValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @param message AllowedValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedValues + * @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.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Decodes an AllowedValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedValues + * @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.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Verifies an AllowedValues 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 AllowedValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedValues + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. + * @param message AllowedValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AllowedValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegexpPattern. */ + interface IRegexpPattern { + + /** RegexpPattern pattern */ + pattern?: (string|null); + } + + /** Represents a RegexpPattern. */ + class RegexpPattern implements IRegexpPattern { + + /** + * Constructs a new RegexpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern); + + /** RegexpPattern pattern. */ + public pattern: string; + + /** + * Creates a new RegexpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns RegexpPattern instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @param message RegexpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @param message RegexpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegexpPattern + * @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.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegexpPattern + * @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.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Verifies a RegexpPattern 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 RegexpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegexpPattern + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. + * @param message RegexpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.RegexpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegexpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegexpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntRange. */ + interface IIntRange { + + /** IntRange min */ + min?: (number|Long|string|null); + + /** IntRange max */ + max?: (number|Long|string|null); + } + + /** Represents an IntRange. */ + class IntRange implements IIntRange { + + /** + * Constructs a new IntRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange); + + /** IntRange min. */ + public min: (number|Long|string); + + /** IntRange max. */ + public max: (number|Long|string); + + /** + * Creates a new IntRange instance using the specified properties. + * @param [properties] Properties to set + * @returns IntRange instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @param message IntRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @param message IntRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntRange + * @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.cloudsecuritycompliance.v1.IntRange; + + /** + * Decodes an IntRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntRange + * @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.cloudsecuritycompliance.v1.IntRange; + + /** + * Verifies an IntRange 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 IntRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Creates a plain object from an IntRange message. Also converts values to other types if specified. + * @param message IntRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.IntRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringList. */ + interface IStringList { + + /** StringList values */ + values?: (string[]|null); + } + + /** Represents a StringList. */ + class StringList implements IStringList { + + /** + * Constructs a new StringList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList); + + /** StringList values. */ + public values: string[]; + + /** + * Creates a new StringList instance using the specified properties. + * @param [properties] Properties to set + * @returns StringList instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringList + * @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.cloudsecuritycompliance.v1.StringList; + + /** + * Decodes a StringList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringList + * @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.cloudsecuritycompliance.v1.StringList; + + /** + * Verifies a StringList 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 StringList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Creates a plain object from a StringList message. Also converts values to other types if specified. + * @param message StringList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParamValue. */ + interface IParamValue { + + /** ParamValue stringValue */ + stringValue?: (string|null); + + /** ParamValue boolValue */ + boolValue?: (boolean|null); + + /** ParamValue stringListValue */ + stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** ParamValue numberValue */ + numberValue?: (number|null); + + /** ParamValue oneofValue */ + oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + } + + /** Represents a ParamValue. */ + class ParamValue implements IParamValue { + + /** + * Constructs a new ParamValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue); + + /** ParamValue stringValue. */ + public stringValue?: (string|null); + + /** ParamValue boolValue. */ + public boolValue?: (boolean|null); + + /** ParamValue stringListValue. */ + public stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** ParamValue numberValue. */ + public numberValue?: (number|null); + + /** ParamValue oneofValue. */ + public oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + + /** ParamValue kind. */ + public kind?: ("stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"); + + /** + * Creates a new ParamValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ParamValue instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @param message ParamValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @param message ParamValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParamValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParamValue + * @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.cloudsecuritycompliance.v1.ParamValue; + + /** + * Decodes a ParamValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParamValue + * @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.cloudsecuritycompliance.v1.ParamValue; + + /** + * Verifies a ParamValue 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 ParamValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParamValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Creates a plain object from a ParamValue message. Also converts values to other types if specified. + * @param message ParamValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParamValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParamValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParamValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParameterSubstitutionRule. */ + interface IParameterSubstitutionRule { + + /** ParameterSubstitutionRule placeholderSubstitutionRule */ + placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + + /** ParameterSubstitutionRule attributeSubstitutionRule */ + attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + } + + /** Represents a ParameterSubstitutionRule. */ + class ParameterSubstitutionRule implements IParameterSubstitutionRule { + + /** + * Constructs a new ParameterSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule); + + /** ParameterSubstitutionRule placeholderSubstitutionRule. */ + public placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + + /** ParameterSubstitutionRule attributeSubstitutionRule. */ + public attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + + /** ParameterSubstitutionRule substitutionType. */ + public substitutionType?: ("placeholderSubstitutionRule"|"attributeSubstitutionRule"); + + /** + * Creates a new ParameterSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @param message ParameterSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @param message ParameterSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterSubstitutionRule + * @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.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterSubstitutionRule + * @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.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Verifies a ParameterSubstitutionRule 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 ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. + * @param message ParameterSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParameterSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttributeSubstitutionRule. */ + interface IAttributeSubstitutionRule { + + /** AttributeSubstitutionRule attribute */ + attribute?: (string|null); + } + + /** Represents an AttributeSubstitutionRule. */ + class AttributeSubstitutionRule implements IAttributeSubstitutionRule { + + /** + * Constructs a new AttributeSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule); + + /** AttributeSubstitutionRule attribute. */ + public attribute: string; + + /** + * Creates a new AttributeSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributeSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @param message AttributeSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @param message AttributeSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributeSubstitutionRule + * @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.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributeSubstitutionRule + * @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.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Verifies an AttributeSubstitutionRule 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 AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributeSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. + * @param message AttributeSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributeSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributeSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceholderSubstitutionRule. */ + interface IPlaceholderSubstitutionRule { + + /** PlaceholderSubstitutionRule attribute */ + attribute?: (string|null); + } + + /** Represents a PlaceholderSubstitutionRule. */ + class PlaceholderSubstitutionRule implements IPlaceholderSubstitutionRule { + + /** + * Constructs a new PlaceholderSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule); + + /** PlaceholderSubstitutionRule attribute. */ + public attribute: string; + + /** + * Creates a new PlaceholderSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceholderSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @param message PlaceholderSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @param message PlaceholderSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceholderSubstitutionRule + * @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.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceholderSubstitutionRule + * @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.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Verifies a PlaceholderSubstitutionRule 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 PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceholderSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. + * @param message PlaceholderSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceholderSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceholderSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Rule. */ + interface IRule { + + /** Rule celExpression */ + celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + + /** Rule description */ + description?: (string|null); + + /** Rule ruleActionTypes */ + ruleActionTypes?: (google.cloud.cloudsecuritycompliance.v1.RuleActionType[]|null); + } + + /** Represents a Rule. */ + class Rule implements IRule { + + /** + * Constructs a new Rule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRule); + + /** Rule celExpression. */ + public celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + + /** Rule description. */ + public description: string; + + /** Rule ruleActionTypes. */ + public ruleActionTypes: google.cloud.cloudsecuritycompliance.v1.RuleActionType[]; + + /** Rule implementation. */ + public implementation?: "celExpression"; + + /** + * Creates a new Rule instance using the specified properties. + * @param [properties] Properties to set + * @returns Rule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRule): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rule + * @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.cloudsecuritycompliance.v1.Rule; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rule + * @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.cloudsecuritycompliance.v1.Rule; + + /** + * Verifies a Rule 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 Rule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @param message Rule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CELExpression. */ + interface ICELExpression { + + /** CELExpression resourceTypesValues */ + resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** CELExpression expression */ + expression?: (string|null); + } + + /** Represents a CELExpression. */ + class CELExpression implements ICELExpression { + + /** + * Constructs a new CELExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression); + + /** CELExpression resourceTypesValues. */ + public resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** CELExpression expression. */ + public expression: string; + + /** CELExpression criteria. */ + public criteria?: "resourceTypesValues"; + + /** + * Creates a new CELExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CELExpression instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @param message CELExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @param message CELExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CELExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CELExpression + * @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.cloudsecuritycompliance.v1.CELExpression; + + /** + * Decodes a CELExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CELExpression + * @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.cloudsecuritycompliance.v1.CELExpression; + + /** + * Verifies a CELExpression 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 CELExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CELExpression + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Creates a plain object from a CELExpression message. Also converts values to other types if specified. + * @param message CELExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CELExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CELExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CELExpression + * @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); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.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; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IOperationMetadata): google.cloud.cloudsecuritycompliance.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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; + } + + /** Properties of a ControlFamily. */ + interface IControlFamily { + + /** ControlFamily familyId */ + familyId?: (string|null); + + /** ControlFamily displayName */ + displayName?: (string|null); + } + + /** Represents a ControlFamily. */ + class ControlFamily implements IControlFamily { + + /** + * Constructs a new ControlFamily. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily); + + /** ControlFamily familyId. */ + public familyId: string; + + /** ControlFamily displayName. */ + public displayName: string; + + /** + * Creates a new ControlFamily instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlFamily instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Encodes the specified ControlFamily message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @param message ControlFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlFamily message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @param message ControlFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ControlFamily message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ControlFamily + * @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.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Decodes a ControlFamily message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ControlFamily + * @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.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Verifies a ControlFamily 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 ControlFamily message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ControlFamily + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Creates a plain object from a ControlFamily message. Also converts values to other types if specified. + * @param message ControlFamily + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ControlFamily to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ControlFamily + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a CmEnrollmentService */ + class CmEnrollmentService extends $protobuf.rpc.Service { + + /** + * Constructs a new CmEnrollmentService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CmEnrollmentService 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): CmEnrollmentService; + + /** + * Calls UpdateCmEnrollment. + * @param request UpdateCmEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmEnrollment + */ + public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollmentCallback): void; + + /** + * Calls UpdateCmEnrollment. + * @param request UpdateCmEnrollmentRequest message or plain object + * @returns Promise + */ + public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): Promise; + + /** + * Calls CalculateEffectiveCmEnrollment. + * @param request CalculateEffectiveCmEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CalculateEffectiveCmEnrollmentResponse + */ + public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollmentCallback): void; + + /** + * Calls CalculateEffectiveCmEnrollment. + * @param request CalculateEffectiveCmEnrollmentRequest message or plain object + * @returns Promise + */ + public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): Promise; + } + + namespace CmEnrollmentService { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|updateCmEnrollment}. + * @param error Error, if any + * @param [response] CmEnrollment + */ + type UpdateCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CmEnrollment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|calculateEffectiveCmEnrollment}. + * @param error Error, if any + * @param [response] CalculateEffectiveCmEnrollmentResponse + */ + type CalculateEffectiveCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse) => void; + } + + /** Properties of an UpdateCmEnrollmentRequest. */ + interface IUpdateCmEnrollmentRequest { + + /** UpdateCmEnrollmentRequest cmEnrollment */ + cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** UpdateCmEnrollmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCmEnrollmentRequest. */ + class UpdateCmEnrollmentRequest implements IUpdateCmEnrollmentRequest { + + /** + * Constructs a new UpdateCmEnrollmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest); + + /** UpdateCmEnrollmentRequest cmEnrollment. */ + public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** UpdateCmEnrollmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCmEnrollmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCmEnrollmentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @param message UpdateCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @param message UpdateCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCmEnrollmentRequest + * @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.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCmEnrollmentRequest + * @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.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Verifies an UpdateCmEnrollmentRequest 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 UpdateCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCmEnrollmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Creates a plain object from an UpdateCmEnrollmentRequest message. Also converts values to other types if specified. + * @param message UpdateCmEnrollmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCmEnrollmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCmEnrollmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateEffectiveCmEnrollmentRequest. */ + interface ICalculateEffectiveCmEnrollmentRequest { + + /** CalculateEffectiveCmEnrollmentRequest name */ + name?: (string|null); + } + + /** Represents a CalculateEffectiveCmEnrollmentRequest. */ + class CalculateEffectiveCmEnrollmentRequest implements ICalculateEffectiveCmEnrollmentRequest { + + /** + * Constructs a new CalculateEffectiveCmEnrollmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest); + + /** CalculateEffectiveCmEnrollmentRequest name. */ + public name: string; + + /** + * Creates a new CalculateEffectiveCmEnrollmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateEffectiveCmEnrollmentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateEffectiveCmEnrollmentRequest + * @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.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateEffectiveCmEnrollmentRequest + * @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.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Verifies a CalculateEffectiveCmEnrollmentRequest 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 CalculateEffectiveCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateEffectiveCmEnrollmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentRequest message. Also converts values to other types if specified. + * @param message CalculateEffectiveCmEnrollmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateEffectiveCmEnrollmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CmEnrollment. */ + interface ICmEnrollment { + + /** CmEnrollment name */ + name?: (string|null); + + /** CmEnrollment enrolled */ + enrolled?: (boolean|null); + + /** CmEnrollment auditConfig */ + auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); + } + + /** Represents a CmEnrollment. */ + class CmEnrollment implements ICmEnrollment { + + /** + * Constructs a new CmEnrollment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment); + + /** CmEnrollment name. */ + public name: string; + + /** CmEnrollment enrolled. */ + public enrolled: boolean; + + /** CmEnrollment auditConfig. */ + public auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); + + /** + * Creates a new CmEnrollment instance using the specified properties. + * @param [properties] Properties to set + * @returns CmEnrollment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Encodes the specified CmEnrollment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @param message CmEnrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CmEnrollment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @param message CmEnrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmEnrollment + * @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.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmEnrollment + * @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.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Verifies a CmEnrollment 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 CmEnrollment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmEnrollment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Creates a plain object from a CmEnrollment message. Also converts values to other types if specified. + * @param message CmEnrollment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CmEnrollment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmEnrollment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmEnrollment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateEffectiveCmEnrollmentResponse. */ + interface ICalculateEffectiveCmEnrollmentResponse { + + /** CalculateEffectiveCmEnrollmentResponse cmEnrollment */ + cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + } + + /** Represents a CalculateEffectiveCmEnrollmentResponse. */ + class CalculateEffectiveCmEnrollmentResponse implements ICalculateEffectiveCmEnrollmentResponse { + + /** + * Constructs a new CalculateEffectiveCmEnrollmentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse); + + /** CalculateEffectiveCmEnrollmentResponse cmEnrollment. */ + public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** + * Creates a new CalculateEffectiveCmEnrollmentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateEffectiveCmEnrollmentResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateEffectiveCmEnrollmentResponse + * @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.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateEffectiveCmEnrollmentResponse + * @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.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Verifies a CalculateEffectiveCmEnrollmentResponse 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 CalculateEffectiveCmEnrollmentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateEffectiveCmEnrollmentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentResponse message. Also converts values to other types if specified. + * @param message CalculateEffectiveCmEnrollmentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateEffectiveCmEnrollmentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig destinations */ + destinations?: (google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig); + + /** AuditConfig destinations. */ + public destinations: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @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.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @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.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Verifies an AuditConfig 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfig { + + /** Properties of a CmEligibleDestination. */ + interface ICmEligibleDestination { + + /** CmEligibleDestination gcsBucket */ + gcsBucket?: (string|null); + } + + /** Represents a CmEligibleDestination. */ + class CmEligibleDestination implements ICmEligibleDestination { + + /** + * Constructs a new CmEligibleDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination); + + /** CmEligibleDestination gcsBucket. */ + public gcsBucket?: (string|null); + + /** CmEligibleDestination cmEligibleDestinations. */ + public cmEligibleDestinations?: "gcsBucket"; + + /** + * Creates a new CmEligibleDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns CmEligibleDestination instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Encodes the specified CmEligibleDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @param message CmEligibleDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CmEligibleDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @param message CmEligibleDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmEligibleDestination + * @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.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmEligibleDestination + * @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.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Verifies a CmEligibleDestination 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 CmEligibleDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmEligibleDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Creates a plain object from a CmEligibleDestination message. Also converts values to other types if specified. + * @param message CmEligibleDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmEligibleDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmEligibleDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a Config */ + class Config extends $protobuf.rpc.Service { + + /** + * Constructs a new Config service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Config 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): Config; + + /** + * Calls ListFrameworks. + * @param request ListFrameworksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworksResponse + */ + public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback): void; + + /** + * Calls ListFrameworks. + * @param request ListFrameworksRequest message or plain object + * @returns Promise + */ + public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): Promise; + + /** + * Calls GetFramework. + * @param request GetFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback): void; + + /** + * Calls GetFramework. + * @param request GetFrameworkRequest message or plain object + * @returns Promise + */ + public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): Promise; + + /** + * Calls CreateFramework. + * @param request CreateFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback): void; + + /** + * Calls CreateFramework. + * @param request CreateFrameworkRequest message or plain object + * @returns Promise + */ + public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): Promise; + + /** + * Calls UpdateFramework. + * @param request UpdateFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback): void; + + /** + * Calls UpdateFramework. + * @param request UpdateFrameworkRequest message or plain object + * @returns Promise + */ + public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): Promise; + + /** + * Calls DeleteFramework. + * @param request DeleteFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback): void; + + /** + * Calls DeleteFramework. + * @param request DeleteFrameworkRequest message or plain object + * @returns Promise + */ + public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): Promise; + + /** + * Calls ListCloudControls. + * @param request ListCloudControlsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCloudControlsResponse + */ + public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback): void; + + /** + * Calls ListCloudControls. + * @param request ListCloudControlsRequest message or plain object + * @returns Promise + */ + public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): Promise; + + /** + * Calls GetCloudControl. + * @param request GetCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback): void; + + /** + * Calls GetCloudControl. + * @param request GetCloudControlRequest message or plain object + * @returns Promise + */ + public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): Promise; + + /** + * Calls CreateCloudControl. + * @param request CreateCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback): void; + + /** + * Calls CreateCloudControl. + * @param request CreateCloudControlRequest message or plain object + * @returns Promise + */ + public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): Promise; + + /** + * Calls UpdateCloudControl. + * @param request UpdateCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback): void; + + /** + * Calls UpdateCloudControl. + * @param request UpdateCloudControlRequest message or plain object + * @returns Promise + */ + public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): Promise; + + /** + * Calls DeleteCloudControl. + * @param request DeleteCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback): void; + + /** + * Calls DeleteCloudControl. + * @param request DeleteCloudControlRequest message or plain object + * @returns Promise + */ + public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): Promise; + } + + namespace Config { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. + * @param error Error, if any + * @param [response] ListFrameworksResponse + */ + type ListFrameworksCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type GetFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type CreateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type UpdateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFrameworkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. + * @param error Error, if any + * @param [response] ListCloudControlsResponse + */ + type ListCloudControlsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type GetCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type CreateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type UpdateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteCloudControlCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a ListFrameworksRequest. */ + interface IListFrameworksRequest { + + /** ListFrameworksRequest parent */ + parent?: (string|null); + + /** ListFrameworksRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFrameworksRequest. */ + class ListFrameworksRequest implements IListFrameworksRequest { + + /** + * Constructs a new ListFrameworksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest); + + /** ListFrameworksRequest parent. */ + public parent: string; + + /** ListFrameworksRequest pageSize. */ + public pageSize: number; + + /** ListFrameworksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListFrameworksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworksRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @param message ListFrameworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @param message ListFrameworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworksRequest + * @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.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworksRequest + * @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.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Verifies a ListFrameworksRequest 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 ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. + * @param message ListFrameworksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworksResponse. */ + interface IListFrameworksResponse { + + /** ListFrameworksResponse frameworks */ + frameworks?: (google.cloud.cloudsecuritycompliance.v1.IFramework[]|null); + + /** ListFrameworksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFrameworksResponse. */ + class ListFrameworksResponse implements IListFrameworksResponse { + + /** + * Constructs a new ListFrameworksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse); + + /** ListFrameworksResponse frameworks. */ + public frameworks: google.cloud.cloudsecuritycompliance.v1.IFramework[]; + + /** ListFrameworksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFrameworksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworksResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @param message ListFrameworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @param message ListFrameworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworksResponse + * @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.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworksResponse + * @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.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Verifies a ListFrameworksResponse 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 ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. + * @param message ListFrameworksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFrameworkRequest. */ + interface IGetFrameworkRequest { + + /** GetFrameworkRequest name */ + name?: (string|null); + + /** GetFrameworkRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents a GetFrameworkRequest. */ + class GetFrameworkRequest implements IGetFrameworkRequest { + + /** + * Constructs a new GetFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest); + + /** GetFrameworkRequest name. */ + public name: string; + + /** GetFrameworkRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new GetFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @param message GetFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @param message GetFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFrameworkRequest + * @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.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFrameworkRequest + * @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.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Verifies a GetFrameworkRequest 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 GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. + * @param message GetFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFrameworkRequest. */ + interface ICreateFrameworkRequest { + + /** CreateFrameworkRequest parent */ + parent?: (string|null); + + /** CreateFrameworkRequest frameworkId */ + frameworkId?: (string|null); + + /** CreateFrameworkRequest framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + } + + /** Represents a CreateFrameworkRequest. */ + class CreateFrameworkRequest implements ICreateFrameworkRequest { + + /** + * Constructs a new CreateFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest); + + /** CreateFrameworkRequest parent. */ + public parent: string; + + /** CreateFrameworkRequest frameworkId. */ + public frameworkId: string; + + /** CreateFrameworkRequest framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** + * Creates a new CreateFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @param message CreateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @param message CreateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFrameworkRequest + * @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.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFrameworkRequest + * @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.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Verifies a CreateFrameworkRequest 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 CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFrameworkRequest. */ + interface IUpdateFrameworkRequest { + + /** UpdateFrameworkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFrameworkRequest framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** UpdateFrameworkRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents an UpdateFrameworkRequest. */ + class UpdateFrameworkRequest implements IUpdateFrameworkRequest { + + /** + * Constructs a new UpdateFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest); + + /** UpdateFrameworkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFrameworkRequest framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** UpdateFrameworkRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new UpdateFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @param message UpdateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @param message UpdateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFrameworkRequest + * @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.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFrameworkRequest + * @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.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Verifies an UpdateFrameworkRequest 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 UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. + * @param message UpdateFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFrameworkRequest. */ + interface IDeleteFrameworkRequest { + + /** DeleteFrameworkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFrameworkRequest. */ + class DeleteFrameworkRequest implements IDeleteFrameworkRequest { + + /** + * Constructs a new DeleteFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest); + + /** DeleteFrameworkRequest name. */ + public name: string; + + /** + * Creates a new DeleteFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @param message DeleteFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @param message DeleteFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFrameworkRequest + * @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.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFrameworkRequest + * @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.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Verifies a DeleteFrameworkRequest 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 DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. + * @param message DeleteFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlsRequest. */ + interface IListCloudControlsRequest { + + /** ListCloudControlsRequest parent */ + parent?: (string|null); + + /** ListCloudControlsRequest pageSize */ + pageSize?: (number|null); + + /** ListCloudControlsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCloudControlsRequest. */ + class ListCloudControlsRequest implements IListCloudControlsRequest { + + /** + * Constructs a new ListCloudControlsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest); + + /** ListCloudControlsRequest parent. */ + public parent: string; + + /** ListCloudControlsRequest pageSize. */ + public pageSize: number; + + /** ListCloudControlsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCloudControlsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlsRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @param message ListCloudControlsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @param message ListCloudControlsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlsRequest + * @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.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlsRequest + * @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.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Verifies a ListCloudControlsRequest 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 ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. + * @param message ListCloudControlsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlsResponse. */ + interface IListCloudControlsResponse { + + /** ListCloudControlsResponse cloudControls */ + cloudControls?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null); + + /** ListCloudControlsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCloudControlsResponse. */ + class ListCloudControlsResponse implements IListCloudControlsResponse { + + /** + * Constructs a new ListCloudControlsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse); + + /** ListCloudControlsResponse cloudControls. */ + public cloudControls: google.cloud.cloudsecuritycompliance.v1.ICloudControl[]; + + /** ListCloudControlsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCloudControlsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlsResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @param message ListCloudControlsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @param message ListCloudControlsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlsResponse + * @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.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlsResponse + * @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.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Verifies a ListCloudControlsResponse 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 ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. + * @param message ListCloudControlsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCloudControlRequest. */ + interface IGetCloudControlRequest { + + /** GetCloudControlRequest name */ + name?: (string|null); + + /** GetCloudControlRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents a GetCloudControlRequest. */ + class GetCloudControlRequest implements IGetCloudControlRequest { + + /** + * Constructs a new GetCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest); + + /** GetCloudControlRequest name. */ + public name: string; + + /** GetCloudControlRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new GetCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @param message GetCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @param message GetCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCloudControlRequest + * @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.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCloudControlRequest + * @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.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Verifies a GetCloudControlRequest 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 GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. + * @param message GetCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCloudControlRequest. */ + interface ICreateCloudControlRequest { + + /** CreateCloudControlRequest parent */ + parent?: (string|null); + + /** CreateCloudControlRequest cloudControlId */ + cloudControlId?: (string|null); + + /** CreateCloudControlRequest cloudControl */ + cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + } + + /** Represents a CreateCloudControlRequest. */ + class CreateCloudControlRequest implements ICreateCloudControlRequest { + + /** + * Constructs a new CreateCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest); + + /** CreateCloudControlRequest parent. */ + public parent: string; + + /** CreateCloudControlRequest cloudControlId. */ + public cloudControlId: string; + + /** CreateCloudControlRequest cloudControl. */ + public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** + * Creates a new CreateCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @param message CreateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @param message CreateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCloudControlRequest + * @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.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCloudControlRequest + * @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.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Verifies a CreateCloudControlRequest 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 CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. + * @param message CreateCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCloudControlRequest. */ + interface IUpdateCloudControlRequest { + + /** UpdateCloudControlRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCloudControlRequest cloudControl */ + cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + } + + /** Represents an UpdateCloudControlRequest. */ + class UpdateCloudControlRequest implements IUpdateCloudControlRequest { + + /** + * Constructs a new UpdateCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest); + + /** UpdateCloudControlRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCloudControlRequest cloudControl. */ + public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** + * Creates a new UpdateCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @param message UpdateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @param message UpdateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCloudControlRequest + * @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.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCloudControlRequest + * @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.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Verifies an UpdateCloudControlRequest 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 UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. + * @param message UpdateCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteCloudControlRequest. */ + interface IDeleteCloudControlRequest { + + /** DeleteCloudControlRequest name */ + name?: (string|null); + } + + /** Represents a DeleteCloudControlRequest. */ + class DeleteCloudControlRequest implements IDeleteCloudControlRequest { + + /** + * Constructs a new DeleteCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest); + + /** DeleteCloudControlRequest name. */ + public name: string; + + /** + * Creates a new DeleteCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @param message DeleteCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @param message DeleteCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCloudControlRequest + * @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.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCloudControlRequest + * @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.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Verifies a DeleteCloudControlRequest 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 DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. + * @param message DeleteCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a Deployment */ + class Deployment extends $protobuf.rpc.Service { + + /** + * Constructs a new Deployment service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Deployment 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): Deployment; + + /** + * Calls CreateFrameworkDeployment. + * @param request CreateFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback): void; + + /** + * Calls CreateFrameworkDeployment. + * @param request CreateFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): Promise; + + /** + * Calls DeleteFrameworkDeployment. + * @param request DeleteFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback): void; + + /** + * Calls DeleteFrameworkDeployment. + * @param request DeleteFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): Promise; + + /** + * Calls GetFrameworkDeployment. + * @param request GetFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkDeployment + */ + public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback): void; + + /** + * Calls GetFrameworkDeployment. + * @param request GetFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): Promise; + + /** + * Calls ListFrameworkDeployments. + * @param request ListFrameworkDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse + */ + public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback): void; + + /** + * Calls ListFrameworkDeployments. + * @param request ListFrameworkDeploymentsRequest message or plain object + * @returns Promise + */ + public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): Promise; + + /** + * Calls GetCloudControlDeployment. + * @param request GetCloudControlDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControlDeployment + */ + public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback): void; + + /** + * Calls GetCloudControlDeployment. + * @param request GetCloudControlDeploymentRequest message or plain object + * @returns Promise + */ + public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): Promise; + + /** + * Calls ListCloudControlDeployments. + * @param request ListCloudControlDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse + */ + public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback): void; + + /** + * Calls ListCloudControlDeployments. + * @param request ListCloudControlDeploymentsRequest message or plain object + * @returns Promise + */ + public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): Promise; + } + + namespace Deployment { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. + * @param error Error, if any + * @param [response] FrameworkDeployment + */ + type GetFrameworkDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. + * @param error Error, if any + * @param [response] ListFrameworkDeploymentsResponse + */ + type ListFrameworkDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. + * @param error Error, if any + * @param [response] CloudControlDeployment + */ + type GetCloudControlDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. + * @param error Error, if any + * @param [response] ListCloudControlDeploymentsResponse + */ + type ListCloudControlDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) => void; + } + + /** DeploymentState enum. */ + enum DeploymentState { + DEPLOYMENT_STATE_UNSPECIFIED = 0, + DEPLOYMENT_STATE_VALIDATING = 1, + DEPLOYMENT_STATE_CREATING = 2, + DEPLOYMENT_STATE_DELETING = 3, + DEPLOYMENT_STATE_FAILED = 4, + DEPLOYMENT_STATE_READY = 5, + DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6, + DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 + } + + /** Properties of a FrameworkDeployment. */ + interface IFrameworkDeployment { + + /** FrameworkDeployment name */ + name?: (string|null); + + /** FrameworkDeployment targetResourceConfig */ + targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** FrameworkDeployment computedTargetResource */ + computedTargetResource?: (string|null); + + /** FrameworkDeployment framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeployment description */ + description?: (string|null); + + /** FrameworkDeployment cloudControlMetadata */ + cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]|null); + + /** FrameworkDeployment deploymentState */ + deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); + + /** FrameworkDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment etag */ + etag?: (string|null); + + /** FrameworkDeployment targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + + /** FrameworkDeployment cloudControlDeploymentReferences */ + cloudControlDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]|null); + } + + /** Represents a FrameworkDeployment. */ + class FrameworkDeployment implements IFrameworkDeployment { + + /** + * Constructs a new FrameworkDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment); + + /** FrameworkDeployment name. */ + public name: string; + + /** FrameworkDeployment targetResourceConfig. */ + public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** FrameworkDeployment computedTargetResource. */ + public computedTargetResource: string; + + /** FrameworkDeployment framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeployment description. */ + public description: string; + + /** FrameworkDeployment cloudControlMetadata. */ + public cloudControlMetadata: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]; + + /** FrameworkDeployment deploymentState. */ + public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); + + /** FrameworkDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment etag. */ + public etag: string; + + /** FrameworkDeployment targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** FrameworkDeployment cloudControlDeploymentReferences. */ + public cloudControlDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]; + + /** + * Creates a new FrameworkDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkDeployment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @param message FrameworkDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @param message FrameworkDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkDeployment + * @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.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkDeployment + * @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.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Verifies a FrameworkDeployment 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 FrameworkDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. + * @param message FrameworkDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlDeployment. */ + interface ICloudControlDeployment { + + /** CloudControlDeployment name */ + name?: (string|null); + + /** CloudControlDeployment targetResourceConfig */ + targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** CloudControlDeployment targetResource */ + targetResource?: (string|null); + + /** CloudControlDeployment cloudControlMetadata */ + cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); + + /** CloudControlDeployment description */ + description?: (string|null); + + /** CloudControlDeployment deploymentState */ + deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); + + /** CloudControlDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment etag */ + etag?: (string|null); + + /** CloudControlDeployment parameterSubstitutedCloudControl */ + parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** CloudControlDeployment frameworkDeploymentReferences */ + frameworkDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]|null); + + /** CloudControlDeployment targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + } + + /** Represents a CloudControlDeployment. */ + class CloudControlDeployment implements ICloudControlDeployment { + + /** + * Constructs a new CloudControlDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment); + + /** CloudControlDeployment name. */ + public name: string; + + /** CloudControlDeployment targetResourceConfig. */ + public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** CloudControlDeployment targetResource. */ + public targetResource: string; + + /** CloudControlDeployment cloudControlMetadata. */ + public cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); + + /** CloudControlDeployment description. */ + public description: string; + + /** CloudControlDeployment deploymentState. */ + public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); + + /** CloudControlDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment etag. */ + public etag: string; + + /** CloudControlDeployment parameterSubstitutedCloudControl. */ + public parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** CloudControlDeployment frameworkDeploymentReferences. */ + public frameworkDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]; + + /** CloudControlDeployment targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** + * Creates a new CloudControlDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlDeployment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @param message CloudControlDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @param message CloudControlDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlDeployment + * @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.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlDeployment + * @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.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Verifies a CloudControlDeployment 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 CloudControlDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. + * @param message CloudControlDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResourceConfig. */ + interface ITargetResourceConfig { + + /** TargetResourceConfig existingTargetResource */ + existingTargetResource?: (string|null); + + /** TargetResourceConfig targetResourceCreationConfig */ + targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + } + + /** Represents a TargetResourceConfig. */ + class TargetResourceConfig implements ITargetResourceConfig { + + /** + * Constructs a new TargetResourceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig); + + /** TargetResourceConfig existingTargetResource. */ + public existingTargetResource?: (string|null); + + /** TargetResourceConfig targetResourceCreationConfig. */ + public targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + + /** TargetResourceConfig resourceConfig. */ + public resourceConfig?: ("existingTargetResource"|"targetResourceCreationConfig"); + + /** + * Creates a new TargetResourceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResourceConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @param message TargetResourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @param message TargetResourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResourceConfig + * @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.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResourceConfig + * @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.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Verifies a TargetResourceConfig 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 TargetResourceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResourceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. + * @param message TargetResourceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResourceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResourceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResourceCreationConfig. */ + interface ITargetResourceCreationConfig { + + /** TargetResourceCreationConfig folderCreationConfig */ + folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + + /** TargetResourceCreationConfig projectCreationConfig */ + projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + } + + /** Represents a TargetResourceCreationConfig. */ + class TargetResourceCreationConfig implements ITargetResourceCreationConfig { + + /** + * Constructs a new TargetResourceCreationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig); + + /** TargetResourceCreationConfig folderCreationConfig. */ + public folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + + /** TargetResourceCreationConfig projectCreationConfig. */ + public projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + + /** TargetResourceCreationConfig resourceCreationConfig. */ + public resourceCreationConfig?: ("folderCreationConfig"|"projectCreationConfig"); + + /** + * Creates a new TargetResourceCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResourceCreationConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @param message TargetResourceCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @param message TargetResourceCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResourceCreationConfig + * @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.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResourceCreationConfig + * @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.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Verifies a TargetResourceCreationConfig 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 TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResourceCreationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. + * @param message TargetResourceCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResourceCreationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResourceCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FolderCreationConfig. */ + interface IFolderCreationConfig { + + /** FolderCreationConfig parent */ + parent?: (string|null); + + /** FolderCreationConfig folderDisplayName */ + folderDisplayName?: (string|null); + } + + /** Represents a FolderCreationConfig. */ + class FolderCreationConfig implements IFolderCreationConfig { + + /** + * Constructs a new FolderCreationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig); + + /** FolderCreationConfig parent. */ + public parent: string; + + /** FolderCreationConfig folderDisplayName. */ + public folderDisplayName: string; + + /** + * Creates a new FolderCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns FolderCreationConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @param message FolderCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @param message FolderCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FolderCreationConfig + * @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.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FolderCreationConfig + * @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.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Verifies a FolderCreationConfig 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 FolderCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FolderCreationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. + * @param message FolderCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteFramework. - * @param request DeleteFrameworkRequest message or plain object - * @returns Promise + * Converts this FolderCreationConfig to JSON. + * @returns JSON object */ - public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ListCloudControls. - * @param request ListCloudControlsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCloudControlsResponse + * Gets the default type url for FolderCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProjectCreationConfig. */ + interface IProjectCreationConfig { + + /** ProjectCreationConfig parent */ + parent?: (string|null); + + /** ProjectCreationConfig projectDisplayName */ + projectDisplayName?: (string|null); + + /** ProjectCreationConfig billingAccountId */ + billingAccountId?: (string|null); + } + + /** Represents a ProjectCreationConfig. */ + class ProjectCreationConfig implements IProjectCreationConfig { /** - * Calls ListCloudControls. - * @param request ListCloudControlsRequest message or plain object - * @returns Promise + * Constructs a new ProjectCreationConfig. + * @param [properties] Properties to set */ - public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): Promise; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig); + + /** ProjectCreationConfig parent. */ + public parent: string; + + /** ProjectCreationConfig projectDisplayName. */ + public projectDisplayName: string; + + /** ProjectCreationConfig billingAccountId. */ + public billingAccountId: string; /** - * Calls GetCloudControl. - * @param request GetCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl + * Creates a new ProjectCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectCreationConfig instance */ - public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback): void; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; /** - * Calls GetCloudControl. - * @param request GetCloudControlRequest message or plain object - * @returns Promise + * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @param message ProjectCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): Promise; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateCloudControl. - * @param request CreateCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl + * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @param message ProjectCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback): void; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateCloudControl. - * @param request CreateCloudControlRequest message or plain object - * @returns Promise + * Decodes a ProjectCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; /** - * Calls UpdateCloudControl. - * @param request UpdateCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl + * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; /** - * Calls UpdateCloudControl. - * @param request UpdateCloudControlRequest message or plain object - * @returns Promise + * Verifies a ProjectCreationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteCloudControl. - * @param request DeleteCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectCreationConfig */ - public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + + /** + * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. + * @param message ProjectCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProjectCreationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProjectCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlMetadata. */ + interface ICloudControlMetadata { + + /** CloudControlMetadata cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + + /** CloudControlMetadata enforcementMode */ + enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); + } + + /** Represents a CloudControlMetadata. */ + class CloudControlMetadata implements ICloudControlMetadata { + + /** + * Constructs a new CloudControlMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata); + + /** CloudControlMetadata cloudControlDetails. */ + public cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + + /** CloudControlMetadata enforcementMode. */ + public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); + + /** + * Creates a new CloudControlMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlMetadata instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @param message CloudControlMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @param message CloudControlMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlMetadata + * @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.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlMetadata + * @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.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Verifies a CloudControlMetadata 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 CloudControlMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. + * @param message CloudControlMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFrameworkDeploymentRequest. */ + interface ICreateFrameworkDeploymentRequest { + + /** CreateFrameworkDeploymentRequest parent */ + parent?: (string|null); + + /** CreateFrameworkDeploymentRequest frameworkDeploymentId */ + frameworkDeploymentId?: (string|null); + + /** CreateFrameworkDeploymentRequest frameworkDeployment */ + frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); + } + + /** Represents a CreateFrameworkDeploymentRequest. */ + class CreateFrameworkDeploymentRequest implements ICreateFrameworkDeploymentRequest { /** - * Calls DeleteCloudControl. - * @param request DeleteCloudControlRequest message or plain object - * @returns Promise + * Constructs a new CreateFrameworkDeploymentRequest. + * @param [properties] Properties to set */ - public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): Promise; - } + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest); - namespace Config { + /** CreateFrameworkDeploymentRequest parent. */ + public parent: string; + + /** CreateFrameworkDeploymentRequest frameworkDeploymentId. */ + public frameworkDeploymentId: string; + + /** CreateFrameworkDeploymentRequest frameworkDeployment. */ + public frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. - * @param error Error, if any - * @param [response] ListFrameworksResponse + * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFrameworkDeploymentRequest instance */ - type ListFrameworksCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) => void; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. - * @param error Error, if any - * @param [response] Framework + * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. - * @param error Error, if any - * @param [response] Framework + * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. - * @param error Error, if any - * @param [response] Framework + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. - * @param error Error, if any - * @param [response] Empty + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteFrameworkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. - * @param error Error, if any - * @param [response] ListCloudControlsResponse + * Verifies a CreateFrameworkDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListCloudControlsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. - * @param error Error, if any - * @param [response] CloudControl + * Creates a CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFrameworkDeploymentRequest */ - type GetCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. - * @param error Error, if any - * @param [response] CloudControl + * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkDeploymentRequest + * @param [options] Conversion options + * @returns Plain object */ - type CreateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. - * @param error Error, if any - * @param [response] CloudControl + * Converts this CreateFrameworkDeploymentRequest to JSON. + * @returns JSON object */ - type UpdateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. - * @param error Error, if any - * @param [response] Empty + * Gets the default type url for CreateFrameworkDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type DeleteCloudControlCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFrameworksRequest. */ - interface IListFrameworksRequest { - - /** ListFrameworksRequest parent */ - parent?: (string|null); + /** Properties of a DeleteFrameworkDeploymentRequest. */ + interface IDeleteFrameworkDeploymentRequest { - /** ListFrameworksRequest pageSize */ - pageSize?: (number|null); + /** DeleteFrameworkDeploymentRequest name */ + name?: (string|null); - /** ListFrameworksRequest pageToken */ - pageToken?: (string|null); + /** DeleteFrameworkDeploymentRequest etag */ + etag?: (string|null); } - /** Represents a ListFrameworksRequest. */ - class ListFrameworksRequest implements IListFrameworksRequest { + /** Represents a DeleteFrameworkDeploymentRequest. */ + class DeleteFrameworkDeploymentRequest implements IDeleteFrameworkDeploymentRequest { /** - * Constructs a new ListFrameworksRequest. + * Constructs a new DeleteFrameworkDeploymentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest); - - /** ListFrameworksRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest); - /** ListFrameworksRequest pageSize. */ - public pageSize: number; + /** DeleteFrameworkDeploymentRequest name. */ + public name: string; - /** ListFrameworksRequest pageToken. */ - public pageToken: string; + /** DeleteFrameworkDeploymentRequest etag. */ + public etag: string; /** - * Creates a new ListFrameworksRequest instance using the specified properties. + * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFrameworksRequest instance + * @returns DeleteFrameworkDeploymentRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; /** - * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @param message ListFrameworksRequest message or plain object to encode + * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @param message DeleteFrameworkDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @param message ListFrameworksRequest message or plain object to encode + * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @param message DeleteFrameworkDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer. + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFrameworksRequest + * @returns DeleteFrameworkDeploymentRequest * @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.cloudsecuritycompliance.v1.ListFrameworksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFrameworksRequest + * @returns DeleteFrameworkDeploymentRequest * @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.cloudsecuritycompliance.v1.ListFrameworksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; /** - * Verifies a ListFrameworksRequest message. + * Verifies a DeleteFrameworkDeploymentRequest 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 ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFrameworksRequest + * @returns DeleteFrameworkDeploymentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; /** - * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. - * @param message ListFrameworksRequest + * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message DeleteFrameworkDeploymentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFrameworksRequest to JSON. + * Converts this DeleteFrameworkDeploymentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFrameworksRequest + * Gets the default type url for DeleteFrameworkDeploymentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFrameworksResponse. */ - interface IListFrameworksResponse { - - /** ListFrameworksResponse frameworks */ - frameworks?: (google.cloud.cloudsecuritycompliance.v1.IFramework[]|null); + /** Properties of a GetFrameworkDeploymentRequest. */ + interface IGetFrameworkDeploymentRequest { - /** ListFrameworksResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetFrameworkDeploymentRequest name */ + name?: (string|null); } - /** Represents a ListFrameworksResponse. */ - class ListFrameworksResponse implements IListFrameworksResponse { + /** Represents a GetFrameworkDeploymentRequest. */ + class GetFrameworkDeploymentRequest implements IGetFrameworkDeploymentRequest { /** - * Constructs a new ListFrameworksResponse. + * Constructs a new GetFrameworkDeploymentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse); - - /** ListFrameworksResponse frameworks. */ - public frameworks: google.cloud.cloudsecuritycompliance.v1.IFramework[]; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest); - /** ListFrameworksResponse nextPageToken. */ - public nextPageToken: string; + /** GetFrameworkDeploymentRequest name. */ + public name: string; /** - * Creates a new ListFrameworksResponse instance using the specified properties. + * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFrameworksResponse instance + * @returns GetFrameworkDeploymentRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; /** - * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @param message ListFrameworksResponse message or plain object to encode + * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @param message GetFrameworkDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @param message ListFrameworksResponse message or plain object to encode + * Encodes the specified GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @param message GetFrameworkDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer. + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFrameworksResponse + * @returns GetFrameworkDeploymentRequest * @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.cloudsecuritycompliance.v1.ListFrameworksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFrameworksResponse + * @returns GetFrameworkDeploymentRequest * @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.cloudsecuritycompliance.v1.ListFrameworksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; /** - * Verifies a ListFrameworksResponse message. + * Verifies a GetFrameworkDeploymentRequest 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 ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFrameworksResponse + * @returns GetFrameworkDeploymentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; /** - * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. - * @param message ListFrameworksResponse + * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message GetFrameworkDeploymentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFrameworksResponse to JSON. + * Converts this GetFrameworkDeploymentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFrameworksResponse + * Gets the default type url for GetFrameworkDeploymentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFrameworkRequest. */ - interface IGetFrameworkRequest { + /** Properties of a ListFrameworkDeploymentsRequest. */ + interface IListFrameworkDeploymentsRequest { - /** GetFrameworkRequest name */ - name?: (string|null); + /** ListFrameworkDeploymentsRequest parent */ + parent?: (string|null); - /** GetFrameworkRequest majorRevisionId */ - majorRevisionId?: (number|Long|string|null); + /** ListFrameworkDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworkDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkDeploymentsRequest filter */ + filter?: (string|null); + + /** ListFrameworkDeploymentsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a GetFrameworkRequest. */ - class GetFrameworkRequest implements IGetFrameworkRequest { + /** Represents a ListFrameworkDeploymentsRequest. */ + class ListFrameworkDeploymentsRequest implements IListFrameworkDeploymentsRequest { /** - * Constructs a new GetFrameworkRequest. + * Constructs a new ListFrameworkDeploymentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest); - /** GetFrameworkRequest name. */ - public name: string; + /** ListFrameworkDeploymentsRequest parent. */ + public parent: string; - /** GetFrameworkRequest majorRevisionId. */ - public majorRevisionId: (number|Long|string); + /** ListFrameworkDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListFrameworkDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListFrameworkDeploymentsRequest filter. */ + public filter: string; + + /** ListFrameworkDeploymentsRequest orderBy. */ + public orderBy: string; /** - * Creates a new GetFrameworkRequest instance using the specified properties. + * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFrameworkRequest instance + * @returns ListFrameworkDeploymentsRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; /** - * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @param message GetFrameworkRequest message or plain object to encode + * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @param message ListFrameworkDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @param message GetFrameworkRequest message or plain object to encode + * Encodes the specified ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @param message ListFrameworkDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer. + * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFrameworkRequest + * @returns ListFrameworkDeploymentsRequest * @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.cloudsecuritycompliance.v1.GetFrameworkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFrameworkRequest + * @returns ListFrameworkDeploymentsRequest * @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.cloudsecuritycompliance.v1.GetFrameworkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; /** - * Verifies a GetFrameworkRequest message. + * Verifies a ListFrameworkDeploymentsRequest 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 GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFrameworkRequest + * @returns ListFrameworkDeploymentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; /** - * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. - * @param message GetFrameworkRequest + * Creates a plain object from a ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListFrameworkDeploymentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFrameworkRequest to JSON. + * Converts this ListFrameworkDeploymentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFrameworkRequest + * Gets the default type url for ListFrameworkDeploymentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFrameworkRequest. */ - interface ICreateFrameworkRequest { - - /** CreateFrameworkRequest parent */ - parent?: (string|null); + /** Properties of a ListFrameworkDeploymentsResponse. */ + interface IListFrameworkDeploymentsResponse { - /** CreateFrameworkRequest frameworkId */ - frameworkId?: (string|null); + /** ListFrameworkDeploymentsResponse frameworkDeployments */ + frameworkDeployments?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null); - /** CreateFrameworkRequest framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + /** ListFrameworkDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateFrameworkRequest. */ - class CreateFrameworkRequest implements ICreateFrameworkRequest { + /** Represents a ListFrameworkDeploymentsResponse. */ + class ListFrameworkDeploymentsResponse implements IListFrameworkDeploymentsResponse { /** - * Constructs a new CreateFrameworkRequest. + * Constructs a new ListFrameworkDeploymentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest); - - /** CreateFrameworkRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse); - /** CreateFrameworkRequest frameworkId. */ - public frameworkId: string; + /** ListFrameworkDeploymentsResponse frameworkDeployments. */ + public frameworkDeployments: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]; - /** CreateFrameworkRequest framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + /** ListFrameworkDeploymentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateFrameworkRequest instance using the specified properties. + * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFrameworkRequest instance + * @returns ListFrameworkDeploymentsResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; /** - * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @param message CreateFrameworkRequest message or plain object to encode + * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @param message ListFrameworkDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @param message CreateFrameworkRequest message or plain object to encode + * Encodes the specified ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @param message ListFrameworkDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer. + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFrameworkRequest + * @returns ListFrameworkDeploymentsResponse * @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.cloudsecuritycompliance.v1.CreateFrameworkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFrameworkRequest + * @returns ListFrameworkDeploymentsResponse * @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.cloudsecuritycompliance.v1.CreateFrameworkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; /** - * Verifies a CreateFrameworkRequest message. + * Verifies a ListFrameworkDeploymentsResponse 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 CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFrameworkRequest + * @returns ListFrameworkDeploymentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; /** - * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. - * @param message CreateFrameworkRequest + * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListFrameworkDeploymentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFrameworkRequest to JSON. + * Converts this ListFrameworkDeploymentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFrameworkRequest + * Gets the default type url for ListFrameworkDeploymentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateFrameworkRequest. */ - interface IUpdateFrameworkRequest { - - /** UpdateFrameworkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateFrameworkRequest framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + /** Properties of a GetCloudControlDeploymentRequest. */ + interface IGetCloudControlDeploymentRequest { - /** UpdateFrameworkRequest majorRevisionId */ - majorRevisionId?: (number|Long|string|null); + /** GetCloudControlDeploymentRequest name */ + name?: (string|null); } - /** Represents an UpdateFrameworkRequest. */ - class UpdateFrameworkRequest implements IUpdateFrameworkRequest { + /** Represents a GetCloudControlDeploymentRequest. */ + class GetCloudControlDeploymentRequest implements IGetCloudControlDeploymentRequest { /** - * Constructs a new UpdateFrameworkRequest. + * Constructs a new GetCloudControlDeploymentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest); - - /** UpdateFrameworkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateFrameworkRequest framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest); - /** UpdateFrameworkRequest majorRevisionId. */ - public majorRevisionId: (number|Long|string); + /** GetCloudControlDeploymentRequest name. */ + public name: string; /** - * Creates a new UpdateFrameworkRequest instance using the specified properties. + * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFrameworkRequest instance + * @returns GetCloudControlDeploymentRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; /** - * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @param message UpdateFrameworkRequest message or plain object to encode + * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @param message GetCloudControlDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @param message UpdateFrameworkRequest message or plain object to encode + * Encodes the specified GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @param message GetCloudControlDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFrameworkRequest + * @returns GetCloudControlDeploymentRequest * @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.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFrameworkRequest + * @returns GetCloudControlDeploymentRequest * @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.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; /** - * Verifies an UpdateFrameworkRequest message. + * Verifies a GetCloudControlDeploymentRequest 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 UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFrameworkRequest + * @returns GetCloudControlDeploymentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; /** - * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. - * @param message UpdateFrameworkRequest + * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. + * @param message GetCloudControlDeploymentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFrameworkRequest to JSON. + * Converts this GetCloudControlDeploymentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateFrameworkRequest + * Gets the default type url for GetCloudControlDeploymentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFrameworkRequest. */ - interface IDeleteFrameworkRequest { + /** Properties of a ListCloudControlDeploymentsRequest. */ + interface IListCloudControlDeploymentsRequest { - /** DeleteFrameworkRequest name */ - name?: (string|null); + /** ListCloudControlDeploymentsRequest parent */ + parent?: (string|null); + + /** ListCloudControlDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListCloudControlDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListCloudControlDeploymentsRequest filter */ + filter?: (string|null); + + /** ListCloudControlDeploymentsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a DeleteFrameworkRequest. */ - class DeleteFrameworkRequest implements IDeleteFrameworkRequest { + /** Represents a ListCloudControlDeploymentsRequest. */ + class ListCloudControlDeploymentsRequest implements IListCloudControlDeploymentsRequest { /** - * Constructs a new DeleteFrameworkRequest. + * Constructs a new ListCloudControlDeploymentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest); - /** DeleteFrameworkRequest name. */ - public name: string; + /** ListCloudControlDeploymentsRequest parent. */ + public parent: string; + + /** ListCloudControlDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListCloudControlDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListCloudControlDeploymentsRequest filter. */ + public filter: string; + + /** ListCloudControlDeploymentsRequest orderBy. */ + public orderBy: string; /** - * Creates a new DeleteFrameworkRequest instance using the specified properties. + * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFrameworkRequest instance + * @returns ListCloudControlDeploymentsRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; /** - * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @param message DeleteFrameworkRequest message or plain object to encode + * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @param message ListCloudControlDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @param message DeleteFrameworkRequest message or plain object to encode + * Encodes the specified ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @param message ListCloudControlDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. + * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFrameworkRequest + * @returns ListCloudControlDeploymentsRequest * @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.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFrameworkRequest + * @returns ListCloudControlDeploymentsRequest * @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.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; /** - * Verifies a DeleteFrameworkRequest message. + * Verifies a ListCloudControlDeploymentsRequest 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 DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFrameworkRequest + * @returns ListCloudControlDeploymentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; /** - * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. - * @param message DeleteFrameworkRequest + * Creates a plain object from a ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListCloudControlDeploymentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFrameworkRequest to JSON. + * Converts this ListCloudControlDeploymentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFrameworkRequest + * Gets the default type url for ListCloudControlDeploymentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCloudControlsRequest. */ - interface IListCloudControlsRequest { - - /** ListCloudControlsRequest parent */ - parent?: (string|null); + /** Properties of a ListCloudControlDeploymentsResponse. */ + interface IListCloudControlDeploymentsResponse { - /** ListCloudControlsRequest pageSize */ - pageSize?: (number|null); + /** ListCloudControlDeploymentsResponse cloudControlDeployments */ + cloudControlDeployments?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null); - /** ListCloudControlsRequest pageToken */ - pageToken?: (string|null); + /** ListCloudControlDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListCloudControlsRequest. */ - class ListCloudControlsRequest implements IListCloudControlsRequest { + /** Represents a ListCloudControlDeploymentsResponse. */ + class ListCloudControlDeploymentsResponse implements IListCloudControlDeploymentsResponse { /** - * Constructs a new ListCloudControlsRequest. + * Constructs a new ListCloudControlDeploymentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest); - - /** ListCloudControlsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse); - /** ListCloudControlsRequest pageSize. */ - public pageSize: number; + /** ListCloudControlDeploymentsResponse cloudControlDeployments. */ + public cloudControlDeployments: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]; - /** ListCloudControlsRequest pageToken. */ - public pageToken: string; + /** ListCloudControlDeploymentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListCloudControlsRequest instance using the specified properties. + * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListCloudControlsRequest instance + * @returns ListCloudControlDeploymentsResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; /** - * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @param message ListCloudControlsRequest message or plain object to encode + * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @param message ListCloudControlDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @param message ListCloudControlsRequest message or plain object to encode + * Encodes the specified ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @param message ListCloudControlDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer. + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCloudControlsRequest + * @returns ListCloudControlDeploymentsResponse * @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.cloudsecuritycompliance.v1.ListCloudControlsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCloudControlsRequest + * @returns ListCloudControlDeploymentsResponse * @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.cloudsecuritycompliance.v1.ListCloudControlsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; /** - * Verifies a ListCloudControlsRequest message. + * Verifies a ListCloudControlDeploymentsResponse 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 ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCloudControlsRequest + * @returns ListCloudControlDeploymentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; /** - * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. - * @param message ListCloudControlsRequest + * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListCloudControlDeploymentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCloudControlsRequest to JSON. + * Converts this ListCloudControlDeploymentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCloudControlsRequest + * Gets the default type url for ListCloudControlDeploymentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCloudControlsResponse. */ - interface IListCloudControlsResponse { - - /** ListCloudControlsResponse cloudControls */ - cloudControls?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null); + /** Properties of a CloudControlDeploymentReference. */ + interface ICloudControlDeploymentReference { - /** ListCloudControlsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CloudControlDeploymentReference cloudControlDeployment */ + cloudControlDeployment?: (string|null); } - /** Represents a ListCloudControlsResponse. */ - class ListCloudControlsResponse implements IListCloudControlsResponse { + /** Represents a CloudControlDeploymentReference. */ + class CloudControlDeploymentReference implements ICloudControlDeploymentReference { /** - * Constructs a new ListCloudControlsResponse. + * Constructs a new CloudControlDeploymentReference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse); - - /** ListCloudControlsResponse cloudControls. */ - public cloudControls: google.cloud.cloudsecuritycompliance.v1.ICloudControl[]; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference); - /** ListCloudControlsResponse nextPageToken. */ - public nextPageToken: string; + /** CloudControlDeploymentReference cloudControlDeployment. */ + public cloudControlDeployment: string; /** - * Creates a new ListCloudControlsResponse instance using the specified properties. + * Creates a new CloudControlDeploymentReference instance using the specified properties. * @param [properties] Properties to set - * @returns ListCloudControlsResponse instance + * @returns CloudControlDeploymentReference instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; /** - * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @param message ListCloudControlsResponse message or plain object to encode + * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @param message CloudControlDeploymentReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @param message ListCloudControlsResponse message or plain object to encode + * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @param message CloudControlDeploymentReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer. + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCloudControlsResponse + * @returns CloudControlDeploymentReference * @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.cloudsecuritycompliance.v1.ListCloudControlsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCloudControlsResponse + * @returns CloudControlDeploymentReference * @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.cloudsecuritycompliance.v1.ListCloudControlsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; /** - * Verifies a ListCloudControlsResponse message. + * Verifies a CloudControlDeploymentReference 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 ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCloudControlsResponse + * @returns CloudControlDeploymentReference */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; /** - * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. - * @param message ListCloudControlsResponse + * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. + * @param message CloudControlDeploymentReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCloudControlsResponse to JSON. + * Converts this CloudControlDeploymentReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCloudControlsResponse + * Gets the default type url for CloudControlDeploymentReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetCloudControlRequest. */ - interface IGetCloudControlRequest { + /** Properties of a FrameworkDeploymentReference. */ + interface IFrameworkDeploymentReference { + + /** FrameworkDeploymentReference frameworkDeployment */ + frameworkDeployment?: (string|null); - /** GetCloudControlRequest name */ - name?: (string|null); + /** FrameworkDeploymentReference frameworkReference */ + frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeploymentReference frameworkDisplayName */ + frameworkDisplayName?: (string|null); } - /** Represents a GetCloudControlRequest. */ - class GetCloudControlRequest implements IGetCloudControlRequest { + /** Represents a FrameworkDeploymentReference. */ + class FrameworkDeploymentReference implements IFrameworkDeploymentReference { /** - * Constructs a new GetCloudControlRequest. + * Constructs a new FrameworkDeploymentReference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference); - /** GetCloudControlRequest name. */ - public name: string; + /** FrameworkDeploymentReference frameworkDeployment. */ + public frameworkDeployment: string; + + /** FrameworkDeploymentReference frameworkReference. */ + public frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeploymentReference frameworkDisplayName. */ + public frameworkDisplayName: string; /** - * Creates a new GetCloudControlRequest instance using the specified properties. + * Creates a new FrameworkDeploymentReference instance using the specified properties. * @param [properties] Properties to set - * @returns GetCloudControlRequest instance + * @returns FrameworkDeploymentReference instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; /** - * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @param message GetCloudControlRequest message or plain object to encode + * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @param message FrameworkDeploymentReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @param message GetCloudControlRequest message or plain object to encode + * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @param message FrameworkDeploymentReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer. + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCloudControlRequest + * @returns FrameworkDeploymentReference * @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.cloudsecuritycompliance.v1.GetCloudControlRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCloudControlRequest + * @returns FrameworkDeploymentReference * @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.cloudsecuritycompliance.v1.GetCloudControlRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; /** - * Verifies a GetCloudControlRequest message. + * Verifies a FrameworkDeploymentReference 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 GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCloudControlRequest + * @returns FrameworkDeploymentReference */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; /** - * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. - * @param message GetCloudControlRequest + * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. + * @param message FrameworkDeploymentReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCloudControlRequest to JSON. + * Converts this FrameworkDeploymentReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCloudControlRequest + * Gets the default type url for FrameworkDeploymentReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateCloudControlRequest. */ - interface ICreateCloudControlRequest { - - /** CreateCloudControlRequest parent */ - parent?: (string|null); + /** Represents a Monitoring */ + class Monitoring extends $protobuf.rpc.Service { - /** CreateCloudControlRequest cloudControlId */ - cloudControlId?: (string|null); + /** + * Constructs a new Monitoring 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); - /** CreateCloudControlRequest cloudControl */ - cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - } + /** + * Creates new Monitoring 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): Monitoring; - /** Represents a CreateCloudControlRequest. */ - class CreateCloudControlRequest implements ICreateCloudControlRequest { + /** + * Calls ListFrameworkComplianceSummaries. + * @param request ListFrameworkComplianceSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkComplianceSummariesResponse + */ + public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummariesCallback): void; /** - * Constructs a new CreateCloudControlRequest. - * @param [properties] Properties to set + * Calls ListFrameworkComplianceSummaries. + * @param request ListFrameworkComplianceSummariesRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest); + public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): Promise; - /** CreateCloudControlRequest parent. */ - public parent: string; + /** + * Calls ListFindingSummaries. + * @param request ListFindingSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFindingSummariesResponse + */ + public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummariesCallback): void; - /** CreateCloudControlRequest cloudControlId. */ - public cloudControlId: string; + /** + * Calls ListFindingSummaries. + * @param request ListFindingSummariesRequest message or plain object + * @returns Promise + */ + public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): Promise; - /** CreateCloudControlRequest cloudControl. */ - public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + /** + * Calls FetchFrameworkComplianceReport. + * @param request FetchFrameworkComplianceReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkComplianceReport + */ + public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReportCallback): void; /** - * Creates a new CreateCloudControlRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateCloudControlRequest instance + * Calls FetchFrameworkComplianceReport. + * @param request FetchFrameworkComplianceReportRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): Promise; /** - * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @param message CreateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListControlComplianceSummaries. + * @param request ListControlComplianceSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListControlComplianceSummariesResponse */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummariesCallback): void; /** - * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @param message CreateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListControlComplianceSummaries. + * @param request ListControlComplianceSummariesRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): Promise; /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls AggregateFrameworkComplianceReport. + * @param request AggregateFrameworkComplianceReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AggregateFrameworkComplianceReportResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReportCallback): void; /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls AggregateFrameworkComplianceReport. + * @param request AggregateFrameworkComplianceReportRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): Promise; + } + + namespace Monitoring { /** - * Verifies a CreateCloudControlRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFrameworkComplianceSummaries}. + * @param error Error, if any + * @param [response] ListFrameworkComplianceSummariesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListFrameworkComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse) => void; /** - * Creates a CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateCloudControlRequest + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFindingSummaries}. + * @param error Error, if any + * @param [response] ListFindingSummariesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + type ListFindingSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse) => void; /** - * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. - * @param message CreateCloudControlRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|fetchFrameworkComplianceReport}. + * @param error Error, if any + * @param [response] FrameworkComplianceReport */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type FetchFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport) => void; /** - * Converts this CreateCloudControlRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listControlComplianceSummaries}. + * @param error Error, if any + * @param [response] ListControlComplianceSummariesResponse */ - public toJSON(): { [k: string]: any }; + type ListControlComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse) => void; /** - * Gets the default type url for CreateCloudControlRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|aggregateFrameworkComplianceReport}. + * @param error Error, if any + * @param [response] AggregateFrameworkComplianceReportResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type AggregateFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse) => void; } - /** Properties of an UpdateCloudControlRequest. */ - interface IUpdateCloudControlRequest { + /** EvaluationState enum. */ + enum EvaluationState { + EVALUATION_STATE_UNSPECIFIED = 0, + EVALUATION_STATE_PASSED = 1, + EVALUATION_STATE_FAILED = 2, + EVALUATION_STATE_NOT_ASSESSED = 3 + } - /** UpdateCloudControlRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** FindingClass enum. */ + enum FindingClass { + FINDING_CLASS_UNSPECIFIED = 0, + THREAT = 1, + VULNERABILITY = 2, + MISCONFIGURATION = 3, + OBSERVATION = 4, + SCC_ERROR = 5, + POSTURE_VIOLATION = 6, + TOXIC_COMBINATION = 7, + SENSITIVE_DATA_RISK = 8, + CHOKEPOINT = 9 + } - /** UpdateCloudControlRequest cloudControl */ - cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + /** Properties of a ListFrameworkComplianceSummariesRequest. */ + interface IListFrameworkComplianceSummariesRequest { + + /** ListFrameworkComplianceSummariesRequest parent */ + parent?: (string|null); + + /** ListFrameworkComplianceSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworkComplianceSummariesRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkComplianceSummariesRequest filter */ + filter?: (string|null); } - /** Represents an UpdateCloudControlRequest. */ - class UpdateCloudControlRequest implements IUpdateCloudControlRequest { + /** Represents a ListFrameworkComplianceSummariesRequest. */ + class ListFrameworkComplianceSummariesRequest implements IListFrameworkComplianceSummariesRequest { /** - * Constructs a new UpdateCloudControlRequest. + * Constructs a new ListFrameworkComplianceSummariesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest); - /** UpdateCloudControlRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListFrameworkComplianceSummariesRequest parent. */ + public parent: string; - /** UpdateCloudControlRequest cloudControl. */ - public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + /** ListFrameworkComplianceSummariesRequest pageSize. */ + public pageSize: number; + + /** ListFrameworkComplianceSummariesRequest pageToken. */ + public pageToken: string; + + /** ListFrameworkComplianceSummariesRequest filter. */ + public filter: string; /** - * Creates a new UpdateCloudControlRequest instance using the specified properties. + * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateCloudControlRequest instance + * @returns ListFrameworkComplianceSummariesRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; /** - * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @param message UpdateCloudControlRequest message or plain object to encode + * Encodes the specified ListFrameworkComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @param message UpdateCloudControlRequest message or plain object to encode + * Encodes the specified ListFrameworkComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateCloudControlRequest + * @returns ListFrameworkComplianceSummariesRequest * @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.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateCloudControlRequest + * @returns ListFrameworkComplianceSummariesRequest * @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.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; /** - * Verifies an UpdateCloudControlRequest message. + * Verifies a ListFrameworkComplianceSummariesRequest 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 UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateCloudControlRequest + * @returns ListFrameworkComplianceSummariesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; /** - * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. - * @param message UpdateCloudControlRequest + * Creates a plain object from a ListFrameworkComplianceSummariesRequest message. Also converts values to other types if specified. + * @param message ListFrameworkComplianceSummariesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateCloudControlRequest to JSON. + * Converts this ListFrameworkComplianceSummariesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateCloudControlRequest + * Gets the default type url for ListFrameworkComplianceSummariesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteCloudControlRequest. */ - interface IDeleteCloudControlRequest { + /** Properties of a ListFrameworkComplianceSummariesResponse. */ + interface IListFrameworkComplianceSummariesResponse { - /** DeleteCloudControlRequest name */ - name?: (string|null); + /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries */ + frameworkComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]|null); + + /** ListFrameworkComplianceSummariesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteCloudControlRequest. */ - class DeleteCloudControlRequest implements IDeleteCloudControlRequest { + /** Represents a ListFrameworkComplianceSummariesResponse. */ + class ListFrameworkComplianceSummariesResponse implements IListFrameworkComplianceSummariesResponse { /** - * Constructs a new DeleteCloudControlRequest. + * Constructs a new ListFrameworkComplianceSummariesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse); - /** DeleteCloudControlRequest name. */ - public name: string; + /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries. */ + public frameworkComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]; + + /** ListFrameworkComplianceSummariesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteCloudControlRequest instance using the specified properties. + * Creates a new ListFrameworkComplianceSummariesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteCloudControlRequest instance + * @returns ListFrameworkComplianceSummariesResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; /** - * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @param message DeleteCloudControlRequest message or plain object to encode + * Encodes the specified ListFrameworkComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @param message DeleteCloudControlRequest message or plain object to encode + /** + * Encodes the specified ListFrameworkComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteCloudControlRequest + * @returns ListFrameworkComplianceSummariesResponse * @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.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteCloudControlRequest + * @returns ListFrameworkComplianceSummariesResponse * @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.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; /** - * Verifies a DeleteCloudControlRequest message. + * Verifies a ListFrameworkComplianceSummariesResponse 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 DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFrameworkComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteCloudControlRequest + * @returns ListFrameworkComplianceSummariesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; /** - * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. - * @param message DeleteCloudControlRequest + * Creates a plain object from a ListFrameworkComplianceSummariesResponse message. Also converts values to other types if specified. + * @param message ListFrameworkComplianceSummariesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteCloudControlRequest to JSON. + * Converts this ListFrameworkComplianceSummariesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteCloudControlRequest + * Gets the default type url for ListFrameworkComplianceSummariesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Deployment */ - class Deployment extends $protobuf.rpc.Service { + /** Properties of a FrameworkComplianceReport. */ + interface IFrameworkComplianceReport { - /** - * Constructs a new Deployment 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); + /** FrameworkComplianceReport framework */ + framework?: (string|null); - /** - * Creates new Deployment 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): Deployment; + /** FrameworkComplianceReport frameworkDescription */ + frameworkDescription?: (string|null); - /** - * Calls CreateFrameworkDeployment. - * @param request CreateFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback): void; + /** FrameworkComplianceReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls CreateFrameworkDeployment. - * @param request CreateFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): Promise; + /** FrameworkComplianceReport controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - /** - * Calls DeleteFrameworkDeployment. - * @param request DeleteFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback): void; + /** FrameworkComplianceReport frameworkType */ + frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); - /** - * Calls DeleteFrameworkDeployment. - * @param request DeleteFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): Promise; + /** FrameworkComplianceReport supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - /** - * Calls GetFrameworkDeployment. - * @param request GetFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FrameworkDeployment - */ - public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback): void; + /** FrameworkComplianceReport frameworkCategories */ + frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); - /** - * Calls GetFrameworkDeployment. - * @param request GetFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): Promise; + /** FrameworkComplianceReport frameworkDisplayName */ + frameworkDisplayName?: (string|null); - /** - * Calls ListFrameworkDeployments. - * @param request ListFrameworkDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse - */ - public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback): void; + /** FrameworkComplianceReport name */ + name?: (string|null); - /** - * Calls ListFrameworkDeployments. - * @param request ListFrameworkDeploymentsRequest message or plain object - * @returns Promise - */ - public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): Promise; + /** FrameworkComplianceReport majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceReport minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceReport targetResourceDetails */ + targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); + } + + /** Represents a FrameworkComplianceReport. */ + class FrameworkComplianceReport implements IFrameworkComplianceReport { /** - * Calls GetCloudControlDeployment. - * @param request GetCloudControlDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControlDeployment + * Constructs a new FrameworkComplianceReport. + * @param [properties] Properties to set */ - public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback): void; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport); + + /** FrameworkComplianceReport framework. */ + public framework: string; + + /** FrameworkComplianceReport frameworkDescription. */ + public frameworkDescription: string; + + /** FrameworkComplianceReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkComplianceReport controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceReport frameworkType. */ + public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + + /** FrameworkComplianceReport supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** FrameworkComplianceReport frameworkCategories. */ + public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** FrameworkComplianceReport frameworkDisplayName. */ + public frameworkDisplayName: string; + + /** FrameworkComplianceReport name. */ + public name: string; + + /** FrameworkComplianceReport majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** FrameworkComplianceReport minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** FrameworkComplianceReport targetResourceDetails. */ + public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; /** - * Calls GetCloudControlDeployment. - * @param request GetCloudControlDeploymentRequest message or plain object - * @returns Promise + * Creates a new FrameworkComplianceReport instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkComplianceReport instance */ - public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): Promise; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; /** - * Calls ListCloudControlDeployments. - * @param request ListCloudControlDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse + * Encodes the specified FrameworkComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @param message FrameworkComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback): void; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListCloudControlDeployments. - * @param request ListCloudControlDeploymentsRequest message or plain object - * @returns Promise + * Encodes the specified FrameworkComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @param message FrameworkComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): Promise; - } - - namespace Deployment { + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. - * @param error Error, if any - * @param [response] Operation + * Decodes a FrameworkComplianceReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. - * @param error Error, if any - * @param [response] Operation + * Decodes a FrameworkComplianceReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. - * @param error Error, if any - * @param [response] FrameworkDeployment + * Verifies a FrameworkComplianceReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetFrameworkDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. - * @param error Error, if any - * @param [response] ListFrameworkDeploymentsResponse + * Creates a FrameworkComplianceReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkComplianceReport */ - type ListFrameworkDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. - * @param error Error, if any - * @param [response] CloudControlDeployment + * Creates a plain object from a FrameworkComplianceReport message. Also converts values to other types if specified. + * @param message FrameworkComplianceReport + * @param [options] Conversion options + * @returns Plain object */ - type GetCloudControlDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => void; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. - * @param error Error, if any - * @param [response] ListCloudControlDeploymentsResponse + * Converts this FrameworkComplianceReport to JSON. + * @returns JSON object */ - type ListCloudControlDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) => void; - } - - /** DeploymentState enum. */ - enum DeploymentState { - DEPLOYMENT_STATE_UNSPECIFIED = 0, - DEPLOYMENT_STATE_VALIDATING = 1, - DEPLOYMENT_STATE_CREATING = 2, - DEPLOYMENT_STATE_DELETING = 3, - DEPLOYMENT_STATE_FAILED = 4, - DEPLOYMENT_STATE_READY = 5, - DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6, - DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 - } - - /** Properties of a FrameworkDeployment. */ - interface IFrameworkDeployment { - - /** FrameworkDeployment name */ - name?: (string|null); - - /** FrameworkDeployment targetResourceConfig */ - targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** FrameworkDeployment computedTargetResource */ - computedTargetResource?: (string|null); - - /** FrameworkDeployment framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeployment description */ - description?: (string|null); - - /** FrameworkDeployment cloudControlMetadata */ - cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]|null); - - /** FrameworkDeployment deploymentState */ - deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); - - /** FrameworkDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment etag */ - etag?: (string|null); - - /** FrameworkDeployment targetResourceDisplayName */ - targetResourceDisplayName?: (string|null); - - /** FrameworkDeployment cloudControlDeploymentReferences */ - cloudControlDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]|null); - } - - /** Represents a FrameworkDeployment. */ - class FrameworkDeployment implements IFrameworkDeployment { + public toJSON(): { [k: string]: any }; /** - * Constructs a new FrameworkDeployment. - * @param [properties] Properties to set + * Gets the default type url for FrameworkComplianceReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment); - - /** FrameworkDeployment name. */ - public name: string; - - /** FrameworkDeployment targetResourceConfig. */ - public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** FrameworkDeployment computedTargetResource. */ - public computedTargetResource: string; - - /** FrameworkDeployment framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeployment description. */ - public description: string; + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FrameworkDeployment cloudControlMetadata. */ - public cloudControlMetadata: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]; + /** Properties of a FetchFrameworkComplianceReportRequest. */ + interface IFetchFrameworkComplianceReportRequest { - /** FrameworkDeployment deploymentState. */ - public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); + /** FetchFrameworkComplianceReportRequest name */ + name?: (string|null); - /** FrameworkDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** FetchFrameworkComplianceReportRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } - /** FrameworkDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a FetchFrameworkComplianceReportRequest. */ + class FetchFrameworkComplianceReportRequest implements IFetchFrameworkComplianceReportRequest { - /** FrameworkDeployment etag. */ - public etag: string; + /** + * Constructs a new FetchFrameworkComplianceReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest); - /** FrameworkDeployment targetResourceDisplayName. */ - public targetResourceDisplayName: string; + /** FetchFrameworkComplianceReportRequest name. */ + public name: string; - /** FrameworkDeployment cloudControlDeploymentReferences. */ - public cloudControlDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]; + /** FetchFrameworkComplianceReportRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new FrameworkDeployment instance using the specified properties. + * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FrameworkDeployment instance + * @returns FetchFrameworkComplianceReportRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; /** - * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @param message FrameworkDeployment message or plain object to encode + * Encodes the specified FetchFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @param message FetchFrameworkComplianceReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @param message FrameworkDeployment message or plain object to encode + * Encodes the specified FetchFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @param message FetchFrameworkComplianceReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FrameworkDeployment message from the specified reader or buffer. + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FrameworkDeployment + * @returns FetchFrameworkComplianceReportRequest * @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.cloudsecuritycompliance.v1.FrameworkDeployment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; /** - * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FrameworkDeployment + * @returns FetchFrameworkComplianceReportRequest * @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.cloudsecuritycompliance.v1.FrameworkDeployment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; /** - * Verifies a FrameworkDeployment message. + * Verifies a FetchFrameworkComplianceReportRequest 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 FrameworkDeployment message from a plain object. Also converts values to their respective internal types. + * Creates a FetchFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FrameworkDeployment + * @returns FetchFrameworkComplianceReportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; /** - * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. - * @param message FrameworkDeployment + * Creates a plain object from a FetchFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @param message FetchFrameworkComplianceReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FrameworkDeployment to JSON. + * Converts this FetchFrameworkComplianceReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FrameworkDeployment + * Gets the default type url for FetchFrameworkComplianceReportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudControlDeployment. */ - interface ICloudControlDeployment { - - /** CloudControlDeployment name */ - name?: (string|null); - - /** CloudControlDeployment targetResourceConfig */ - targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** CloudControlDeployment targetResource */ - targetResource?: (string|null); - - /** CloudControlDeployment cloudControlMetadata */ - cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); - - /** CloudControlDeployment description */ - description?: (string|null); - - /** CloudControlDeployment deploymentState */ - deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); - - /** CloudControlDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListFindingSummariesRequest. */ + interface IListFindingSummariesRequest { - /** CloudControlDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListFindingSummariesRequest parent */ + parent?: (string|null); - /** CloudControlDeployment etag */ - etag?: (string|null); + /** ListFindingSummariesRequest pageSize */ + pageSize?: (number|null); - /** CloudControlDeployment parameterSubstitutedCloudControl */ - parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + /** ListFindingSummariesRequest pageToken */ + pageToken?: (string|null); - /** CloudControlDeployment frameworkDeploymentReferences */ - frameworkDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]|null); + /** ListFindingSummariesRequest filter */ + filter?: (string|null); - /** CloudControlDeployment targetResourceDisplayName */ - targetResourceDisplayName?: (string|null); + /** ListFindingSummariesRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); } - /** Represents a CloudControlDeployment. */ - class CloudControlDeployment implements ICloudControlDeployment { + /** Represents a ListFindingSummariesRequest. */ + class ListFindingSummariesRequest implements IListFindingSummariesRequest { /** - * Constructs a new CloudControlDeployment. + * Constructs a new ListFindingSummariesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment); - - /** CloudControlDeployment name. */ - public name: string; - - /** CloudControlDeployment targetResourceConfig. */ - public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** CloudControlDeployment targetResource. */ - public targetResource: string; - - /** CloudControlDeployment cloudControlMetadata. */ - public cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest); - /** CloudControlDeployment description. */ - public description: string; - - /** CloudControlDeployment deploymentState. */ - public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); - - /** CloudControlDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** CloudControlDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListFindingSummariesRequest parent. */ + public parent: string; - /** CloudControlDeployment etag. */ - public etag: string; + /** ListFindingSummariesRequest pageSize. */ + public pageSize: number; - /** CloudControlDeployment parameterSubstitutedCloudControl. */ - public parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + /** ListFindingSummariesRequest pageToken. */ + public pageToken: string; - /** CloudControlDeployment frameworkDeploymentReferences. */ - public frameworkDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]; + /** ListFindingSummariesRequest filter. */ + public filter: string; - /** CloudControlDeployment targetResourceDisplayName. */ - public targetResourceDisplayName: string; + /** ListFindingSummariesRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new CloudControlDeployment instance using the specified properties. + * Creates a new ListFindingSummariesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CloudControlDeployment instance + * @returns ListFindingSummariesRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; /** - * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @param message CloudControlDeployment message or plain object to encode + * Encodes the specified ListFindingSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @param message ListFindingSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @param message CloudControlDeployment message or plain object to encode + * Encodes the specified ListFindingSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @param message ListFindingSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudControlDeployment message from the specified reader or buffer. + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudControlDeployment + * @returns ListFindingSummariesRequest * @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.cloudsecuritycompliance.v1.CloudControlDeployment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; /** - * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudControlDeployment + * @returns ListFindingSummariesRequest * @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.cloudsecuritycompliance.v1.CloudControlDeployment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; /** - * Verifies a CloudControlDeployment message. + * Verifies a ListFindingSummariesRequest 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 CloudControlDeployment message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingSummariesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudControlDeployment + * @returns ListFindingSummariesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; /** - * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. - * @param message CloudControlDeployment + * Creates a plain object from a ListFindingSummariesRequest message. Also converts values to other types if specified. + * @param message ListFindingSummariesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudControlDeployment to JSON. + * Converts this ListFindingSummariesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudControlDeployment + * Gets the default type url for ListFindingSummariesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TargetResourceConfig. */ - interface ITargetResourceConfig { + /** Properties of a ListFindingSummariesResponse. */ + interface IListFindingSummariesResponse { - /** TargetResourceConfig existingTargetResource */ - existingTargetResource?: (string|null); + /** ListFindingSummariesResponse findingSummaries */ + findingSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]|null); - /** TargetResourceConfig targetResourceCreationConfig */ - targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + /** ListFindingSummariesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a TargetResourceConfig. */ - class TargetResourceConfig implements ITargetResourceConfig { + /** Represents a ListFindingSummariesResponse. */ + class ListFindingSummariesResponse implements IListFindingSummariesResponse { /** - * Constructs a new TargetResourceConfig. + * Constructs a new ListFindingSummariesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig); - - /** TargetResourceConfig existingTargetResource. */ - public existingTargetResource?: (string|null); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse); - /** TargetResourceConfig targetResourceCreationConfig. */ - public targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + /** ListFindingSummariesResponse findingSummaries. */ + public findingSummaries: google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]; - /** TargetResourceConfig resourceConfig. */ - public resourceConfig?: ("existingTargetResource"|"targetResourceCreationConfig"); + /** ListFindingSummariesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new TargetResourceConfig instance using the specified properties. + * Creates a new ListFindingSummariesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TargetResourceConfig instance + * @returns ListFindingSummariesResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; /** - * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @param message TargetResourceConfig message or plain object to encode + * Encodes the specified ListFindingSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @param message ListFindingSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @param message TargetResourceConfig message or plain object to encode + * Encodes the specified ListFindingSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @param message ListFindingSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TargetResourceConfig message from the specified reader or buffer. + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TargetResourceConfig + * @returns ListFindingSummariesResponse * @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.cloudsecuritycompliance.v1.TargetResourceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; /** - * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TargetResourceConfig + * @returns ListFindingSummariesResponse * @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.cloudsecuritycompliance.v1.TargetResourceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; /** - * Verifies a TargetResourceConfig message. + * Verifies a ListFindingSummariesResponse 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 TargetResourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingSummariesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TargetResourceConfig + * @returns ListFindingSummariesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; /** - * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. - * @param message TargetResourceConfig + * Creates a plain object from a ListFindingSummariesResponse message. Also converts values to other types if specified. + * @param message ListFindingSummariesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TargetResourceConfig to JSON. + * Converts this ListFindingSummariesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TargetResourceConfig + * Gets the default type url for ListFindingSummariesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TargetResourceCreationConfig. */ - interface ITargetResourceCreationConfig { + /** Properties of a ListControlComplianceSummariesRequest. */ + interface IListControlComplianceSummariesRequest { - /** TargetResourceCreationConfig folderCreationConfig */ - folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + /** ListControlComplianceSummariesRequest parent */ + parent?: (string|null); - /** TargetResourceCreationConfig projectCreationConfig */ - projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + /** ListControlComplianceSummariesRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ListControlComplianceSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListControlComplianceSummariesRequest pageToken */ + pageToken?: (string|null); + + /** ListControlComplianceSummariesRequest filter */ + filter?: (string|null); } - /** Represents a TargetResourceCreationConfig. */ - class TargetResourceCreationConfig implements ITargetResourceCreationConfig { + /** Represents a ListControlComplianceSummariesRequest. */ + class ListControlComplianceSummariesRequest implements IListControlComplianceSummariesRequest { /** - * Constructs a new TargetResourceCreationConfig. + * Constructs a new ListControlComplianceSummariesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest); - /** TargetResourceCreationConfig folderCreationConfig. */ - public folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + /** ListControlComplianceSummariesRequest parent. */ + public parent: string; - /** TargetResourceCreationConfig projectCreationConfig. */ - public projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + /** ListControlComplianceSummariesRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** TargetResourceCreationConfig resourceCreationConfig. */ - public resourceCreationConfig?: ("folderCreationConfig"|"projectCreationConfig"); + /** ListControlComplianceSummariesRequest pageSize. */ + public pageSize: number; + + /** ListControlComplianceSummariesRequest pageToken. */ + public pageToken: string; + + /** ListControlComplianceSummariesRequest filter. */ + public filter: string; /** - * Creates a new TargetResourceCreationConfig instance using the specified properties. + * Creates a new ListControlComplianceSummariesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TargetResourceCreationConfig instance + * @returns ListControlComplianceSummariesRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; /** - * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @param message TargetResourceCreationConfig message or plain object to encode + * Encodes the specified ListControlComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @param message ListControlComplianceSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @param message TargetResourceCreationConfig message or plain object to encode + * Encodes the specified ListControlComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @param message ListControlComplianceSummariesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TargetResourceCreationConfig + * @returns ListControlComplianceSummariesRequest * @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.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TargetResourceCreationConfig + * @returns ListControlComplianceSummariesRequest * @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.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; /** - * Verifies a TargetResourceCreationConfig message. + * Verifies a ListControlComplianceSummariesRequest 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 TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListControlComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TargetResourceCreationConfig + * @returns ListControlComplianceSummariesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; /** - * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. - * @param message TargetResourceCreationConfig + * Creates a plain object from a ListControlComplianceSummariesRequest message. Also converts values to other types if specified. + * @param message ListControlComplianceSummariesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TargetResourceCreationConfig to JSON. + * Converts this ListControlComplianceSummariesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TargetResourceCreationConfig + * Gets the default type url for ListControlComplianceSummariesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FolderCreationConfig. */ - interface IFolderCreationConfig { + /** Properties of a ListControlComplianceSummariesResponse. */ + interface IListControlComplianceSummariesResponse { - /** FolderCreationConfig parent */ - parent?: (string|null); + /** ListControlComplianceSummariesResponse controlComplianceSummaries */ + controlComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]|null); - /** FolderCreationConfig folderDisplayName */ - folderDisplayName?: (string|null); + /** ListControlComplianceSummariesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a FolderCreationConfig. */ - class FolderCreationConfig implements IFolderCreationConfig { + /** Represents a ListControlComplianceSummariesResponse. */ + class ListControlComplianceSummariesResponse implements IListControlComplianceSummariesResponse { /** - * Constructs a new FolderCreationConfig. + * Constructs a new ListControlComplianceSummariesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig); - - /** FolderCreationConfig parent. */ - public parent: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse); - /** FolderCreationConfig folderDisplayName. */ - public folderDisplayName: string; + /** ListControlComplianceSummariesResponse controlComplianceSummaries. */ + public controlComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]; + + /** ListControlComplianceSummariesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new FolderCreationConfig instance using the specified properties. + * Creates a new ListControlComplianceSummariesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns FolderCreationConfig instance + * @returns ListControlComplianceSummariesResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; /** - * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @param message FolderCreationConfig message or plain object to encode + * Encodes the specified ListControlComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @param message ListControlComplianceSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @param message FolderCreationConfig message or plain object to encode + * Encodes the specified ListControlComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @param message ListControlComplianceSummariesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FolderCreationConfig message from the specified reader or buffer. + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FolderCreationConfig + * @returns ListControlComplianceSummariesResponse * @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.cloudsecuritycompliance.v1.FolderCreationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; /** - * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FolderCreationConfig + * @returns ListControlComplianceSummariesResponse * @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.cloudsecuritycompliance.v1.FolderCreationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; /** - * Verifies a FolderCreationConfig message. + * Verifies a ListControlComplianceSummariesResponse 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 FolderCreationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListControlComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FolderCreationConfig + * @returns ListControlComplianceSummariesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; /** - * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. - * @param message FolderCreationConfig + * Creates a plain object from a ListControlComplianceSummariesResponse message. Also converts values to other types if specified. + * @param message ListControlComplianceSummariesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FolderCreationConfig to JSON. + * Converts this ListControlComplianceSummariesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FolderCreationConfig + * Gets the default type url for ListControlComplianceSummariesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ProjectCreationConfig. */ - interface IProjectCreationConfig { + /** Properties of an AggregateFrameworkComplianceReportRequest. */ + interface IAggregateFrameworkComplianceReportRequest { - /** ProjectCreationConfig parent */ - parent?: (string|null); + /** AggregateFrameworkComplianceReportRequest name */ + name?: (string|null); - /** ProjectCreationConfig projectDisplayName */ - projectDisplayName?: (string|null); + /** AggregateFrameworkComplianceReportRequest interval */ + interval?: (google.type.IInterval|null); - /** ProjectCreationConfig billingAccountId */ - billingAccountId?: (string|null); + /** AggregateFrameworkComplianceReportRequest filter */ + filter?: (string|null); } - /** Represents a ProjectCreationConfig. */ - class ProjectCreationConfig implements IProjectCreationConfig { + /** Represents an AggregateFrameworkComplianceReportRequest. */ + class AggregateFrameworkComplianceReportRequest implements IAggregateFrameworkComplianceReportRequest { /** - * Constructs a new ProjectCreationConfig. + * Constructs a new AggregateFrameworkComplianceReportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest); - /** ProjectCreationConfig parent. */ - public parent: string; + /** AggregateFrameworkComplianceReportRequest name. */ + public name: string; - /** ProjectCreationConfig projectDisplayName. */ - public projectDisplayName: string; + /** AggregateFrameworkComplianceReportRequest interval. */ + public interval?: (google.type.IInterval|null); - /** ProjectCreationConfig billingAccountId. */ - public billingAccountId: string; + /** AggregateFrameworkComplianceReportRequest filter. */ + public filter: string; /** - * Creates a new ProjectCreationConfig instance using the specified properties. + * Creates a new AggregateFrameworkComplianceReportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ProjectCreationConfig instance + * @returns AggregateFrameworkComplianceReportRequest instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; /** - * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @param message ProjectCreationConfig message or plain object to encode + * Encodes the specified AggregateFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @param message ProjectCreationConfig message or plain object to encode + * Encodes the specified AggregateFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer. + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ProjectCreationConfig + * @returns AggregateFrameworkComplianceReportRequest * @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.cloudsecuritycompliance.v1.ProjectCreationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ProjectCreationConfig + * @returns AggregateFrameworkComplianceReportRequest * @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.cloudsecuritycompliance.v1.ProjectCreationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; /** - * Verifies a ProjectCreationConfig message. + * Verifies an AggregateFrameworkComplianceReportRequest 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 ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AggregateFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ProjectCreationConfig + * @returns AggregateFrameworkComplianceReportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; /** - * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. - * @param message ProjectCreationConfig + * Creates a plain object from an AggregateFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @param message AggregateFrameworkComplianceReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ProjectCreationConfig to JSON. + * Converts this AggregateFrameworkComplianceReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ProjectCreationConfig + * Gets the default type url for AggregateFrameworkComplianceReportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudControlMetadata. */ - interface ICloudControlMetadata { - - /** CloudControlMetadata cloudControlDetails */ - cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + /** Properties of an AggregateFrameworkComplianceReportResponse. */ + interface IAggregateFrameworkComplianceReportResponse { - /** CloudControlMetadata enforcementMode */ - enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); + /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports */ + aggregatedComplianceReports?: (google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]|null); } - /** Represents a CloudControlMetadata. */ - class CloudControlMetadata implements ICloudControlMetadata { + /** Represents an AggregateFrameworkComplianceReportResponse. */ + class AggregateFrameworkComplianceReportResponse implements IAggregateFrameworkComplianceReportResponse { /** - * Constructs a new CloudControlMetadata. + * Constructs a new AggregateFrameworkComplianceReportResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata); - - /** CloudControlMetadata cloudControlDetails. */ - public cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse); - /** CloudControlMetadata enforcementMode. */ - public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); + /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports. */ + public aggregatedComplianceReports: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]; /** - * Creates a new CloudControlMetadata instance using the specified properties. + * Creates a new AggregateFrameworkComplianceReportResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CloudControlMetadata instance + * @returns AggregateFrameworkComplianceReportResponse instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; /** - * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @param message CloudControlMetadata message or plain object to encode + * Encodes the specified AggregateFrameworkComplianceReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @param message CloudControlMetadata message or plain object to encode + * Encodes the specified AggregateFrameworkComplianceReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudControlMetadata message from the specified reader or buffer. + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudControlMetadata + * @returns AggregateFrameworkComplianceReportResponse * @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.cloudsecuritycompliance.v1.CloudControlMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; /** - * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudControlMetadata + * @returns AggregateFrameworkComplianceReportResponse * @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.cloudsecuritycompliance.v1.CloudControlMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; /** - * Verifies a CloudControlMetadata message. + * Verifies an AggregateFrameworkComplianceReportResponse 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 CloudControlMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AggregateFrameworkComplianceReportResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudControlMetadata + * @returns AggregateFrameworkComplianceReportResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; /** - * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. - * @param message CloudControlMetadata + * Creates a plain object from an AggregateFrameworkComplianceReportResponse message. Also converts values to other types if specified. + * @param message AggregateFrameworkComplianceReportResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudControlMetadata to JSON. + * Converts this AggregateFrameworkComplianceReportResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudControlMetadata + * Gets the default type url for AggregateFrameworkComplianceReportResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFrameworkDeploymentRequest. */ - interface ICreateFrameworkDeploymentRequest { + /** Properties of a ControlAssessmentDetails. */ + interface IControlAssessmentDetails { - /** CreateFrameworkDeploymentRequest parent */ - parent?: (string|null); + /** ControlAssessmentDetails passingControls */ + passingControls?: (number|null); - /** CreateFrameworkDeploymentRequest frameworkDeploymentId */ - frameworkDeploymentId?: (string|null); + /** ControlAssessmentDetails failingControls */ + failingControls?: (number|null); - /** CreateFrameworkDeploymentRequest frameworkDeployment */ - frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); + /** ControlAssessmentDetails assessedPassingControls */ + assessedPassingControls?: (number|null); + + /** ControlAssessmentDetails notAssessedControls */ + notAssessedControls?: (number|null); } - /** Represents a CreateFrameworkDeploymentRequest. */ - class CreateFrameworkDeploymentRequest implements ICreateFrameworkDeploymentRequest { + /** Represents a ControlAssessmentDetails. */ + class ControlAssessmentDetails implements IControlAssessmentDetails { /** - * Constructs a new CreateFrameworkDeploymentRequest. + * Constructs a new ControlAssessmentDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails); - /** CreateFrameworkDeploymentRequest parent. */ - public parent: string; + /** ControlAssessmentDetails passingControls. */ + public passingControls: number; - /** CreateFrameworkDeploymentRequest frameworkDeploymentId. */ - public frameworkDeploymentId: string; + /** ControlAssessmentDetails failingControls. */ + public failingControls: number; - /** CreateFrameworkDeploymentRequest frameworkDeployment. */ - public frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); + /** ControlAssessmentDetails assessedPassingControls. */ + public assessedPassingControls: number; + + /** ControlAssessmentDetails notAssessedControls. */ + public notAssessedControls: number; /** - * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. + * Creates a new ControlAssessmentDetails instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFrameworkDeploymentRequest instance + * @returns ControlAssessmentDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; /** - * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified ControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @param message ControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified ControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @param message ControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. + * Decodes a ControlAssessmentDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFrameworkDeploymentRequest + * @returns ControlAssessmentDetails * @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.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a ControlAssessmentDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFrameworkDeploymentRequest + * @returns ControlAssessmentDetails * @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.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; /** - * Verifies a CreateFrameworkDeploymentRequest message. + * Verifies a ControlAssessmentDetails 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 CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFrameworkDeploymentRequest + * @returns ControlAssessmentDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; /** - * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message CreateFrameworkDeploymentRequest + * Creates a plain object from a ControlAssessmentDetails message. Also converts values to other types if specified. + * @param message ControlAssessmentDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFrameworkDeploymentRequest to JSON. + * Converts this ControlAssessmentDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFrameworkDeploymentRequest + * Gets the default type url for ControlAssessmentDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFrameworkDeploymentRequest. */ - interface IDeleteFrameworkDeploymentRequest { + /** Properties of a FrameworkComplianceSummary. */ + interface IFrameworkComplianceSummary { - /** DeleteFrameworkDeploymentRequest name */ + /** FrameworkComplianceSummary framework */ + framework?: (string|null); + + /** FrameworkComplianceSummary controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceSummary frameworkType */ + frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + + /** FrameworkComplianceSummary supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** FrameworkComplianceSummary frameworkCategories */ + frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + + /** FrameworkComplianceSummary frameworkDisplayName */ + frameworkDisplayName?: (string|null); + + /** FrameworkComplianceSummary name */ name?: (string|null); - /** DeleteFrameworkDeploymentRequest etag */ - etag?: (string|null); + /** FrameworkComplianceSummary majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceSummary minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceSummary targetResourceDetails */ + targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); } - /** Represents a DeleteFrameworkDeploymentRequest. */ - class DeleteFrameworkDeploymentRequest implements IDeleteFrameworkDeploymentRequest { + /** Represents a FrameworkComplianceSummary. */ + class FrameworkComplianceSummary implements IFrameworkComplianceSummary { /** - * Constructs a new DeleteFrameworkDeploymentRequest. + * Constructs a new FrameworkComplianceSummary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary); - /** DeleteFrameworkDeploymentRequest name. */ + /** FrameworkComplianceSummary framework. */ + public framework: string; + + /** FrameworkComplianceSummary controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceSummary frameworkType. */ + public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + + /** FrameworkComplianceSummary supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** FrameworkComplianceSummary frameworkCategories. */ + public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** FrameworkComplianceSummary frameworkDisplayName. */ + public frameworkDisplayName: string; + + /** FrameworkComplianceSummary name. */ public name: string; - /** DeleteFrameworkDeploymentRequest etag. */ - public etag: string; + /** FrameworkComplianceSummary majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** FrameworkComplianceSummary minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** FrameworkComplianceSummary targetResourceDetails. */ + public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; /** - * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. + * Creates a new FrameworkComplianceSummary instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFrameworkDeploymentRequest instance + * @returns FrameworkComplianceSummary instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; /** - * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @param message DeleteFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified FrameworkComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @param message FrameworkComplianceSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @param message DeleteFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified FrameworkComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @param message FrameworkComplianceSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFrameworkDeploymentRequest + * @returns FrameworkComplianceSummary * @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.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFrameworkDeploymentRequest + * @returns FrameworkComplianceSummary * @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.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; /** - * Verifies a DeleteFrameworkDeploymentRequest message. + * Verifies a FrameworkComplianceSummary 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 DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FrameworkComplianceSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFrameworkDeploymentRequest + * @returns FrameworkComplianceSummary */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; /** - * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message DeleteFrameworkDeploymentRequest + * Creates a plain object from a FrameworkComplianceSummary message. Also converts values to other types if specified. + * @param message FrameworkComplianceSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFrameworkDeploymentRequest to JSON. + * Converts this FrameworkComplianceSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFrameworkDeploymentRequest + * Gets the default type url for FrameworkComplianceSummary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFrameworkDeploymentRequest. */ - interface IGetFrameworkDeploymentRequest { + /** Properties of a FindingSummary. */ + interface IFindingSummary { - /** GetFrameworkDeploymentRequest name */ + /** FindingSummary findingCategory */ + findingCategory?: (string|null); + + /** FindingSummary findingClass */ + findingClass?: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass|null); + + /** FindingSummary severity */ + severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** FindingSummary findingCount */ + findingCount?: (number|Long|string|null); + + /** FindingSummary updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** FindingSummary relatedFrameworks */ + relatedFrameworks?: (string[]|null); + + /** FindingSummary name */ name?: (string|null); } - /** Represents a GetFrameworkDeploymentRequest. */ - class GetFrameworkDeploymentRequest implements IGetFrameworkDeploymentRequest { + /** Represents a FindingSummary. */ + class FindingSummary implements IFindingSummary { /** - * Constructs a new GetFrameworkDeploymentRequest. + * Constructs a new FindingSummary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary); - /** GetFrameworkDeploymentRequest name. */ + /** FindingSummary findingCategory. */ + public findingCategory: string; + + /** FindingSummary findingClass. */ + public findingClass: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass); + + /** FindingSummary severity. */ + public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** FindingSummary findingCount. */ + public findingCount: (number|Long|string); + + /** FindingSummary updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FindingSummary relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** FindingSummary name. */ public name: string; /** - * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. + * Creates a new FindingSummary instance using the specified properties. * @param [properties] Properties to set - * @returns GetFrameworkDeploymentRequest instance + * @returns FindingSummary instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary): google.cloud.cloudsecuritycompliance.v1.FindingSummary; /** - * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @param message GetFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified FindingSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @param message FindingSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @param message GetFrameworkDeploymentRequest message or plain object to encode + * Encodes the specified FindingSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @param message FindingSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. + * Decodes a FindingSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFrameworkDeploymentRequest + * @returns FindingSummary * @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.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingSummary; /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a FindingSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFrameworkDeploymentRequest + * @returns FindingSummary * @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.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingSummary; /** - * Verifies a GetFrameworkDeploymentRequest message. + * Verifies a FindingSummary 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 GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FindingSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFrameworkDeploymentRequest + * @returns FindingSummary */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingSummary; /** - * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message GetFrameworkDeploymentRequest + * Creates a plain object from a FindingSummary message. Also converts values to other types if specified. + * @param message FindingSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFrameworkDeploymentRequest to JSON. + * Converts this FindingSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFrameworkDeploymentRequest + * Gets the default type url for FindingSummary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFrameworkDeploymentsRequest. */ - interface IListFrameworkDeploymentsRequest { + /** Properties of a ControlComplianceSummary. */ + interface IControlComplianceSummary { - /** ListFrameworkDeploymentsRequest parent */ - parent?: (string|null); + /** ControlComplianceSummary control */ + control?: (string|null); - /** ListFrameworkDeploymentsRequest pageSize */ - pageSize?: (number|null); + /** ControlComplianceSummary displayName */ + displayName?: (string|null); - /** ListFrameworkDeploymentsRequest pageToken */ - pageToken?: (string|null); + /** ControlComplianceSummary description */ + description?: (string|null); - /** ListFrameworkDeploymentsRequest filter */ - filter?: (string|null); + /** ControlComplianceSummary overallEvaluationState */ + overallEvaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); - /** ListFrameworkDeploymentsRequest orderBy */ - orderBy?: (string|null); + /** ControlComplianceSummary totalFindingsCount */ + totalFindingsCount?: (number|null); + + /** ControlComplianceSummary complianceFrameworks */ + complianceFrameworks?: (string[]|null); + + /** ControlComplianceSummary similarControls */ + similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); + + /** ControlComplianceSummary cloudControlReports */ + cloudControlReports?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]|null); + + /** ControlComplianceSummary controlResponsibilityType */ + controlResponsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); + + /** ControlComplianceSummary isFakeControl */ + isFakeControl?: (boolean|null); + + /** ControlComplianceSummary name */ + name?: (string|null); } - /** Represents a ListFrameworkDeploymentsRequest. */ - class ListFrameworkDeploymentsRequest implements IListFrameworkDeploymentsRequest { + /** Represents a ControlComplianceSummary. */ + class ControlComplianceSummary implements IControlComplianceSummary { /** - * Constructs a new ListFrameworkDeploymentsRequest. + * Constructs a new ControlComplianceSummary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary); - /** ListFrameworkDeploymentsRequest parent. */ - public parent: string; + /** ControlComplianceSummary control. */ + public control: string; - /** ListFrameworkDeploymentsRequest pageSize. */ - public pageSize: number; + /** ControlComplianceSummary displayName. */ + public displayName: string; - /** ListFrameworkDeploymentsRequest pageToken. */ - public pageToken: string; + /** ControlComplianceSummary description. */ + public description: string; - /** ListFrameworkDeploymentsRequest filter. */ - public filter: string; + /** ControlComplianceSummary overallEvaluationState. */ + public overallEvaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); - /** ListFrameworkDeploymentsRequest orderBy. */ - public orderBy: string; + /** ControlComplianceSummary totalFindingsCount. */ + public totalFindingsCount: number; + + /** ControlComplianceSummary complianceFrameworks. */ + public complianceFrameworks: string[]; + + /** ControlComplianceSummary similarControls. */ + public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; + + /** ControlComplianceSummary cloudControlReports. */ + public cloudControlReports: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]; + + /** ControlComplianceSummary controlResponsibilityType. */ + public controlResponsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); + + /** ControlComplianceSummary isFakeControl. */ + public isFakeControl: boolean; + + /** ControlComplianceSummary name. */ + public name: string; /** - * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. + * Creates a new ControlComplianceSummary instance using the specified properties. * @param [properties] Properties to set - * @returns ListFrameworkDeploymentsRequest instance + * @returns ControlComplianceSummary instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; /** - * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @param message ListFrameworkDeploymentsRequest message or plain object to encode + * Encodes the specified ControlComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @param message ControlComplianceSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @param message ListFrameworkDeploymentsRequest message or plain object to encode + * Encodes the specified ControlComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @param message ControlComplianceSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. + * Decodes a ControlComplianceSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFrameworkDeploymentsRequest + * @returns ControlComplianceSummary * @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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; /** - * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ControlComplianceSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFrameworkDeploymentsRequest + * @returns ControlComplianceSummary * @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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; /** - * Verifies a ListFrameworkDeploymentsRequest message. + * Verifies a ControlComplianceSummary 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 ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ControlComplianceSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFrameworkDeploymentsRequest + * @returns ControlComplianceSummary */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; /** - * Creates a plain object from a ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListFrameworkDeploymentsRequest + * Creates a plain object from a ControlComplianceSummary message. Also converts values to other types if specified. + * @param message ControlComplianceSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFrameworkDeploymentsRequest to JSON. + * Converts this ControlComplianceSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFrameworkDeploymentsRequest + * Gets the default type url for ControlComplianceSummary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFrameworkDeploymentsResponse. */ - interface IListFrameworkDeploymentsResponse { + /** Properties of a CloudControlReport. */ + interface ICloudControlReport { - /** ListFrameworkDeploymentsResponse frameworkDeployments */ - frameworkDeployments?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null); + /** CloudControlReport manualCloudControlAssessmentDetails */ + manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); - /** ListFrameworkDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CloudControlReport cloudControlAssessmentDetails */ + cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControl */ + cloudControl?: (string|null); + + /** CloudControlReport displayName */ + displayName?: (string|null); + + /** CloudControlReport description */ + description?: (string|null); + + /** CloudControlReport categories */ + categories?: (string[]|null); + + /** CloudControlReport similarControls */ + similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); + + /** CloudControlReport cloudControlType */ + cloudControlType?: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|null); + + /** CloudControlReport findingCategory */ + findingCategory?: (string|null); + + /** CloudControlReport rules */ + rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); + + /** CloudControlReport findingSeverity */ + findingSeverity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** CloudControlReport enforcementMode */ + enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); + + /** CloudControlReport cloudControlDeployment */ + cloudControlDeployment?: (string|null); + + /** CloudControlReport majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControlReport minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** CloudControlReport frameworkMajorRevisionIds */ + frameworkMajorRevisionIds?: ((number|Long|string)[]|null); } - /** Represents a ListFrameworkDeploymentsResponse. */ - class ListFrameworkDeploymentsResponse implements IListFrameworkDeploymentsResponse { + /** Represents a CloudControlReport. */ + class CloudControlReport implements ICloudControlReport { /** - * Constructs a new ListFrameworkDeploymentsResponse. + * Constructs a new CloudControlReport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport); - /** ListFrameworkDeploymentsResponse frameworkDeployments. */ - public frameworkDeployments: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]; + /** CloudControlReport manualCloudControlAssessmentDetails. */ + public manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); - /** ListFrameworkDeploymentsResponse nextPageToken. */ - public nextPageToken: string; + /** CloudControlReport cloudControlAssessmentDetails. */ + public cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControl. */ + public cloudControl: string; + + /** CloudControlReport displayName. */ + public displayName: string; + + /** CloudControlReport description. */ + public description: string; + + /** CloudControlReport categories. */ + public categories: string[]; + + /** CloudControlReport similarControls. */ + public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; + + /** CloudControlReport cloudControlType. */ + public cloudControlType: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type); + + /** CloudControlReport findingCategory. */ + public findingCategory: string; + + /** CloudControlReport rules. */ + public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; + + /** CloudControlReport findingSeverity. */ + public findingSeverity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** CloudControlReport enforcementMode. */ + public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); + + /** CloudControlReport cloudControlDeployment. */ + public cloudControlDeployment: string; + + /** CloudControlReport majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** CloudControlReport minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** CloudControlReport frameworkMajorRevisionIds. */ + public frameworkMajorRevisionIds: (number|Long|string)[]; + + /** CloudControlReport assessmentDetails. */ + public assessmentDetails?: ("manualCloudControlAssessmentDetails"|"cloudControlAssessmentDetails"); /** - * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. + * Creates a new CloudControlReport instance using the specified properties. * @param [properties] Properties to set - * @returns ListFrameworkDeploymentsResponse instance + * @returns CloudControlReport instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; /** - * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @param message ListFrameworkDeploymentsResponse message or plain object to encode + * Encodes the specified CloudControlReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @param message CloudControlReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @param message ListFrameworkDeploymentsResponse message or plain object to encode + * Encodes the specified CloudControlReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @param message CloudControlReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. + * Decodes a CloudControlReport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFrameworkDeploymentsResponse + * @returns CloudControlReport * @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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a CloudControlReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFrameworkDeploymentsResponse + * @returns CloudControlReport * @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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; /** - * Verifies a ListFrameworkDeploymentsResponse message. + * Verifies a CloudControlReport 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 ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlReport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFrameworkDeploymentsResponse + * @returns CloudControlReport */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; /** - * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListFrameworkDeploymentsResponse + * Creates a plain object from a CloudControlReport message. Also converts values to other types if specified. + * @param message CloudControlReport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFrameworkDeploymentsResponse to JSON. + * Converts this CloudControlReport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFrameworkDeploymentsResponse + * Gets the default type url for CloudControlReport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetCloudControlDeploymentRequest. */ - interface IGetCloudControlDeploymentRequest { + /** Properties of a ManualCloudControlAssessmentDetails. */ + interface IManualCloudControlAssessmentDetails { - /** GetCloudControlDeploymentRequest name */ - name?: (string|null); + /** ManualCloudControlAssessmentDetails manualCloudControlGuide */ + manualCloudControlGuide?: (string[]|null); } - /** Represents a GetCloudControlDeploymentRequest. */ - class GetCloudControlDeploymentRequest implements IGetCloudControlDeploymentRequest { + /** Represents a ManualCloudControlAssessmentDetails. */ + class ManualCloudControlAssessmentDetails implements IManualCloudControlAssessmentDetails { /** - * Constructs a new GetCloudControlDeploymentRequest. + * Constructs a new ManualCloudControlAssessmentDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails); - /** GetCloudControlDeploymentRequest name. */ - public name: string; + /** ManualCloudControlAssessmentDetails manualCloudControlGuide. */ + public manualCloudControlGuide: string[]; /** - * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. + * Creates a new ManualCloudControlAssessmentDetails instance using the specified properties. * @param [properties] Properties to set - * @returns GetCloudControlDeploymentRequest instance + * @returns ManualCloudControlAssessmentDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; /** - * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @param message GetCloudControlDeploymentRequest message or plain object to encode + * Encodes the specified ManualCloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @param message ManualCloudControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @param message GetCloudControlDeploymentRequest message or plain object to encode + * Encodes the specified ManualCloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @param message ManualCloudControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetCloudControlDeploymentRequest + * @returns ManualCloudControlAssessmentDetails * @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.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetCloudControlDeploymentRequest + * @returns ManualCloudControlAssessmentDetails * @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.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; /** - * Verifies a GetCloudControlDeploymentRequest message. + * Verifies a ManualCloudControlAssessmentDetails 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 GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ManualCloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetCloudControlDeploymentRequest + * @returns ManualCloudControlAssessmentDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; /** - * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. - * @param message GetCloudControlDeploymentRequest + * Creates a plain object from a ManualCloudControlAssessmentDetails message. Also converts values to other types if specified. + * @param message ManualCloudControlAssessmentDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetCloudControlDeploymentRequest to JSON. + * Converts this ManualCloudControlAssessmentDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetCloudControlDeploymentRequest + * Gets the default type url for ManualCloudControlAssessmentDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCloudControlDeploymentsRequest. */ - interface IListCloudControlDeploymentsRequest { - - /** ListCloudControlDeploymentsRequest parent */ - parent?: (string|null); - - /** ListCloudControlDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListCloudControlDeploymentsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a CloudControlAssessmentDetails. */ + interface ICloudControlAssessmentDetails { - /** ListCloudControlDeploymentsRequest filter */ - filter?: (string|null); + /** CloudControlAssessmentDetails findingsCount */ + findingsCount?: (number|null); - /** ListCloudControlDeploymentsRequest orderBy */ - orderBy?: (string|null); + /** CloudControlAssessmentDetails evaluationState */ + evaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); } - /** Represents a ListCloudControlDeploymentsRequest. */ - class ListCloudControlDeploymentsRequest implements IListCloudControlDeploymentsRequest { + /** Represents a CloudControlAssessmentDetails. */ + class CloudControlAssessmentDetails implements ICloudControlAssessmentDetails { /** - * Constructs a new ListCloudControlDeploymentsRequest. + * Constructs a new CloudControlAssessmentDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest); - - /** ListCloudControlDeploymentsRequest parent. */ - public parent: string; - - /** ListCloudControlDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListCloudControlDeploymentsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails); - /** ListCloudControlDeploymentsRequest filter. */ - public filter: string; + /** CloudControlAssessmentDetails findingsCount. */ + public findingsCount: number; - /** ListCloudControlDeploymentsRequest orderBy. */ - public orderBy: string; + /** CloudControlAssessmentDetails evaluationState. */ + public evaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); /** - * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. + * Creates a new CloudControlAssessmentDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ListCloudControlDeploymentsRequest instance + * @returns CloudControlAssessmentDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; /** - * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @param message ListCloudControlDeploymentsRequest message or plain object to encode + * Encodes the specified CloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @param message CloudControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @param message ListCloudControlDeploymentsRequest message or plain object to encode + * Encodes the specified CloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @param message CloudControlAssessmentDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCloudControlDeploymentsRequest + * @returns CloudControlAssessmentDetails * @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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; /** - * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCloudControlDeploymentsRequest + * @returns CloudControlAssessmentDetails * @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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; /** - * Verifies a ListCloudControlDeploymentsRequest message. + * Verifies a CloudControlAssessmentDetails 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 ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCloudControlDeploymentsRequest + * @returns CloudControlAssessmentDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; /** - * Creates a plain object from a ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListCloudControlDeploymentsRequest + * Creates a plain object from a CloudControlAssessmentDetails message. Also converts values to other types if specified. + * @param message CloudControlAssessmentDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCloudControlDeploymentsRequest to JSON. + * Converts this CloudControlAssessmentDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCloudControlDeploymentsRequest + * Gets the default type url for CloudControlAssessmentDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListCloudControlDeploymentsResponse. */ - interface IListCloudControlDeploymentsResponse { - - /** ListCloudControlDeploymentsResponse cloudControlDeployments */ - cloudControlDeployments?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null); + /** Properties of a SimilarControls. */ + interface ISimilarControls { - /** ListCloudControlDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** SimilarControls framework */ + framework?: (string|null); + + /** SimilarControls controlId */ + controlId?: (string|null); } - /** Represents a ListCloudControlDeploymentsResponse. */ - class ListCloudControlDeploymentsResponse implements IListCloudControlDeploymentsResponse { + /** Represents a SimilarControls. */ + class SimilarControls implements ISimilarControls { /** - * Constructs a new ListCloudControlDeploymentsResponse. + * Constructs a new SimilarControls. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls); - /** ListCloudControlDeploymentsResponse cloudControlDeployments. */ - public cloudControlDeployments: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]; + /** SimilarControls framework. */ + public framework: string; - /** ListCloudControlDeploymentsResponse nextPageToken. */ - public nextPageToken: string; + /** SimilarControls controlId. */ + public controlId: string; /** - * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. + * Creates a new SimilarControls instance using the specified properties. * @param [properties] Properties to set - * @returns ListCloudControlDeploymentsResponse instance + * @returns SimilarControls instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls): google.cloud.cloudsecuritycompliance.v1.SimilarControls; /** - * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @param message ListCloudControlDeploymentsResponse message or plain object to encode + * Encodes the specified SimilarControls message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @param message SimilarControls message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @param message ListCloudControlDeploymentsResponse message or plain object to encode + * Encodes the specified SimilarControls message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @param message SimilarControls message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. + * Decodes a SimilarControls message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListCloudControlDeploymentsResponse + * @returns SimilarControls * @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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.SimilarControls; /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a SimilarControls message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListCloudControlDeploymentsResponse + * @returns SimilarControls * @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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.SimilarControls; /** - * Verifies a ListCloudControlDeploymentsResponse message. + * Verifies a SimilarControls 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 ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SimilarControls message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListCloudControlDeploymentsResponse + * @returns SimilarControls */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.SimilarControls; /** - * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListCloudControlDeploymentsResponse + * Creates a plain object from a SimilarControls message. Also converts values to other types if specified. + * @param message SimilarControls * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.SimilarControls, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListCloudControlDeploymentsResponse to JSON. + * Converts this SimilarControls to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListCloudControlDeploymentsResponse + * Gets the default type url for SimilarControls * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudControlDeploymentReference. */ - interface ICloudControlDeploymentReference { + /** Properties of an AggregatedComplianceReport. */ + interface IAggregatedComplianceReport { - /** CloudControlDeploymentReference cloudControlDeployment */ - cloudControlDeployment?: (string|null); + /** AggregatedComplianceReport controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** AggregatedComplianceReport reportTime */ + reportTime?: (google.protobuf.ITimestamp|null); } - /** Represents a CloudControlDeploymentReference. */ - class CloudControlDeploymentReference implements ICloudControlDeploymentReference { + /** Represents an AggregatedComplianceReport. */ + class AggregatedComplianceReport implements IAggregatedComplianceReport { /** - * Constructs a new CloudControlDeploymentReference. + * Constructs a new AggregatedComplianceReport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport); - /** CloudControlDeploymentReference cloudControlDeployment. */ - public cloudControlDeployment: string; + /** AggregatedComplianceReport controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** AggregatedComplianceReport reportTime. */ + public reportTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new CloudControlDeploymentReference instance using the specified properties. + * Creates a new AggregatedComplianceReport instance using the specified properties. * @param [properties] Properties to set - * @returns CloudControlDeploymentReference instance + * @returns AggregatedComplianceReport instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; /** - * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @param message CloudControlDeploymentReference message or plain object to encode + * Encodes the specified AggregatedComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @param message AggregatedComplianceReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @param message CloudControlDeploymentReference message or plain object to encode + * Encodes the specified AggregatedComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @param message AggregatedComplianceReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. + * Decodes an AggregatedComplianceReport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudControlDeploymentReference + * @returns AggregatedComplianceReport * @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.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. + * Decodes an AggregatedComplianceReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudControlDeploymentReference + * @returns AggregatedComplianceReport * @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.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; /** - * Verifies a CloudControlDeploymentReference message. + * Verifies an AggregatedComplianceReport 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 CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. + * Creates an AggregatedComplianceReport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudControlDeploymentReference + * @returns AggregatedComplianceReport */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; /** - * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. - * @param message CloudControlDeploymentReference + * Creates a plain object from an AggregatedComplianceReport message. Also converts values to other types if specified. + * @param message AggregatedComplianceReport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudControlDeploymentReference to JSON. + * Converts this AggregatedComplianceReport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudControlDeploymentReference + * Gets the default type url for AggregatedComplianceReport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FrameworkDeploymentReference. */ - interface IFrameworkDeploymentReference { + /** Properties of a TargetResourceDetails. */ + interface ITargetResourceDetails { - /** FrameworkDeploymentReference frameworkDeployment */ + /** TargetResourceDetails frameworkDeployment */ frameworkDeployment?: (string|null); - /** FrameworkDeploymentReference frameworkReference */ - frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + /** TargetResourceDetails targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); - /** FrameworkDeploymentReference frameworkDisplayName */ - frameworkDisplayName?: (string|null); + /** TargetResourceDetails targetResource */ + targetResource?: (string|null); + + /** TargetResourceDetails createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** TargetResourceDetails minorRevisionId */ + minorRevisionId?: (number|Long|string|null); } - /** Represents a FrameworkDeploymentReference. */ - class FrameworkDeploymentReference implements IFrameworkDeploymentReference { + /** Represents a TargetResourceDetails. */ + class TargetResourceDetails implements ITargetResourceDetails { /** - * Constructs a new FrameworkDeploymentReference. + * Constructs a new TargetResourceDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference); + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails); - /** FrameworkDeploymentReference frameworkDeployment. */ + /** TargetResourceDetails frameworkDeployment. */ public frameworkDeployment: string; - /** FrameworkDeploymentReference frameworkReference. */ - public frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + /** TargetResourceDetails targetResourceDisplayName. */ + public targetResourceDisplayName: string; - /** FrameworkDeploymentReference frameworkDisplayName. */ - public frameworkDisplayName: string; + /** TargetResourceDetails targetResource. */ + public targetResource: string; + + /** TargetResourceDetails createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** TargetResourceDetails minorRevisionId. */ + public minorRevisionId: (number|Long|string); /** - * Creates a new FrameworkDeploymentReference instance using the specified properties. + * Creates a new TargetResourceDetails instance using the specified properties. * @param [properties] Properties to set - * @returns FrameworkDeploymentReference instance + * @returns TargetResourceDetails instance */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; /** - * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @param message FrameworkDeploymentReference message or plain object to encode + * Encodes the specified TargetResourceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @param message TargetResourceDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @param message FrameworkDeploymentReference message or plain object to encode + * Encodes the specified TargetResourceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @param message TargetResourceDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. + * Decodes a TargetResourceDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FrameworkDeploymentReference + * @returns TargetResourceDetails * @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.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. + * Decodes a TargetResourceDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FrameworkDeploymentReference + * @returns TargetResourceDetails * @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.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; /** - * Verifies a FrameworkDeploymentReference message. + * Verifies a TargetResourceDetails 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 FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. + * Creates a TargetResourceDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FrameworkDeploymentReference + * @returns TargetResourceDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; /** - * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. - * @param message FrameworkDeploymentReference + * Creates a plain object from a TargetResourceDetails message. Also converts values to other types if specified. + * @param message TargetResourceDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FrameworkDeploymentReference to JSON. + * Converts this TargetResourceDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FrameworkDeploymentReference + * Gets the default type url for TargetResourceDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -5757,2123 +11046,2123 @@ export namespace google { /** Namespace api. */ namespace api { - /** 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, - IDENTIFIER = 8 + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** 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); - /** ResourceDescriptor type */ - type?: (string|null); + /** HttpRule post */ + post?: (string|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** HttpRule delete */ + "delete"?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** HttpRule patch */ + patch?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** HttpRule body */ + body?: (string|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); + constructor(properties?: google.api.IHttpRule); - /** ResourceDescriptor type. */ - public type: string; + /** HttpRule selector. */ + public selector: string; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** HttpRule get. */ + public get?: (string|null); - /** ResourceDescriptor nameField. */ - public nameField: string; + /** HttpRule put. */ + public put?: (string|null); - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** HttpRule post. */ + public post?: (string|null); - /** ResourceDescriptor plural. */ - public plural: string; + /** HttpRule delete. */ + public delete?: (string|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** HttpRule patch. */ + public patch?: (string|null); - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** 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 ResourceDescriptor instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, 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 + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * 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; } - 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 { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** ResourceReference type */ - type?: (string|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** ResourceReference childType */ - childType?: (string|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.api.ICustomHttpPattern); - /** ResourceReference type. */ - public type: string; + /** CustomHttpPattern kind. */ + public kind: string; - /** ResourceReference childType. */ - public childType: string; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * 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 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.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, 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 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.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * 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 ResourceReference + * @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.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @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.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a ResourceReference message. + * 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * 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 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.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceReference + * 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; } - /** Properties of a Http. */ - interface IHttp { + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { /** - * Constructs a new Http. + * Constructs a new CommonLanguageSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.ICommonLanguageSettings); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; /** - * Creates a new Http instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns CommonLanguageSettings instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; /** - * 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 CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings 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.api.ICommonLanguageSettings, 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 CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings 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.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CommonLanguageSettings 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 CommonLanguageSettings * @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.api.CommonLanguageSettings; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns CommonLanguageSettings * @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.api.CommonLanguageSettings; /** - * Verifies a Http message. + * Verifies a CommonLanguageSettings 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 a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns CommonLanguageSettings */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings * @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.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this CommonLanguageSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Http + * Gets the default type url for CommonLanguageSettings * @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 { + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { - /** HttpRule selector */ - selector?: (string|null); + /** ClientLibrarySettings version */ + version?: (string|null); - /** HttpRule get */ - get?: (string|null); + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** HttpRule put */ - put?: (string|null); + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); - /** HttpRule post */ - post?: (string|null); + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); - /** HttpRule delete */ - "delete"?: (string|null); + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); - /** HttpRule patch */ - patch?: (string|null); + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); - /** HttpRule body */ - body?: (string|null); + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { /** - * Constructs a new HttpRule. + * Constructs a new ClientLibrarySettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); + constructor(properties?: google.api.IClientLibrarySettings); - /** HttpRule selector. */ - public selector: string; + /** ClientLibrarySettings version. */ + public version: string; - /** HttpRule get. */ - public get?: (string|null); + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** HttpRule put. */ - public put?: (string|null); + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; - /** HttpRule post. */ - public post?: (string|null); + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); - /** HttpRule delete. */ - public delete?: (string|null); + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); - /** HttpRule patch. */ - public patch?: (string|null); + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); - /** HttpRule body. */ - public body: string; + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); - /** HttpRule responseBody. */ - public responseBody: string; + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ClientLibrarySettings instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns ClientLibrarySettings instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; /** - * 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 ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings 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.api.IClientLibrarySettings, 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 ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings 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.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ClientLibrarySettings 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 ClientLibrarySettings * @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.api.ClientLibrarySettings; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns ClientLibrarySettings * @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.api.ClientLibrarySettings; /** - * Verifies a HttpRule message. + * Verifies a ClientLibrarySettings 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 a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns ClientLibrarySettings */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings * @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.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this ClientLibrarySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpRule + * Gets the default type url for ClientLibrarySettings * @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 { + /** Properties of a Publishing. */ + interface IPublishing { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a Publishing. */ + class Publishing implements IPublishing { /** - * Constructs a new CustomHttpPattern. + * Constructs a new Publishing. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - /** CustomHttpPattern kind. */ - public kind: string; + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; - /** CustomHttpPattern path. */ - public path: string; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Publishing instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns Publishing instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IPublishing): google.api.Publishing; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing 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; + public static encode(message: google.api.IPublishing, 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 + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing 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; + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Publishing message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns Publishing * @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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Publishing message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns Publishing * @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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; /** - * Verifies a CustomHttpPattern message. + * Verifies a Publishing 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. + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns Publishing */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.Publishing; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Publishing to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for Publishing * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { + /** Properties of a JavaSettings. */ + interface IJavaSettings { - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { /** - * Constructs a new CommonLanguageSettings. + * Constructs a new JavaSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICommonLanguageSettings); + constructor(properties?: google.api.IJavaSettings); - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; + /** JavaSettings libraryPackage. */ + public libraryPackage: string; - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * Creates a new JavaSettings instance using the specified properties. * @param [properties] Properties to set - * @returns CommonLanguageSettings instance + * @returns JavaSettings instance */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes a JavaSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings + * @returns JavaSettings * @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.CommonLanguageSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings + * @returns JavaSettings * @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.CommonLanguageSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; /** - * Verifies a CommonLanguageSettings message. + * Verifies a JavaSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommonLanguageSettings + * @returns JavaSettings */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this JavaSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for JavaSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); + /** Properties of a CppSettings. */ + interface ICppSettings { - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { /** - * Constructs a new ClientLibrarySettings. + * Constructs a new CppSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); + constructor(properties?: google.api.ICppSettings); - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new CppSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ClientLibrarySettings instance + * @returns CppSettings instance */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a CppSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings + * @returns CppSettings * @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.ClientLibrarySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a CppSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings + * @returns CppSettings * @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.ClientLibrarySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; /** - * Verifies a ClientLibrarySettings message. + * Verifies a CppSettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClientLibrarySettings + * @returns CppSettings */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClientLibrarySettings to JSON. + * Converts this CppSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for CppSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); + /** Properties of a PhpSettings. */ + interface IPhpSettings { - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a Publishing. */ - class Publishing implements IPublishing { + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { /** - * Constructs a new Publishing. + * Constructs a new PhpSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; + constructor(properties?: google.api.IPhpSettings); - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new Publishing instance using the specified properties. + * Creates a new PhpSettings instance using the specified properties. * @param [properties] Properties to set - * @returns Publishing instance + * @returns PhpSettings instance */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a PhpSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Publishing + * @returns PhpSettings * @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.Publishing; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Publishing + * @returns PhpSettings * @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.Publishing; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; /** - * Verifies a Publishing message. + * Verifies a PhpSettings 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 Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Publishing + * @returns PhpSettings */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Publishing to JSON. + * Converts this PhpSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Publishing + * Gets the default type url for PhpSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); + /** Properties of a PythonSettings. */ + interface IPythonSettings { - /** JavaSettings common */ + /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { /** - * Constructs a new JavaSettings. + * Constructs a new PythonSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; + constructor(properties?: google.api.IPythonSettings); - /** JavaSettings common. */ + /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set - * @returns JavaSettings instance + * @returns PythonSettings instance */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a PythonSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JavaSettings + * @returns PythonSettings * @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.JavaSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JavaSettings + * @returns PythonSettings * @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.JavaSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; /** - * Verifies a JavaSettings message. + * Verifies a PythonSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JavaSettings + * @returns PythonSettings */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JavaSettings to JSON. + * Converts this PythonSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for PythonSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CppSettings. */ - interface ICppSettings { + /** Properties of a NodeSettings. */ + interface INodeSettings { - /** CppSettings common */ + /** NodeSettings common */ common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { /** - * Constructs a new CppSettings. + * Constructs a new NodeSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICppSettings); + constructor(properties?: google.api.INodeSettings); - /** CppSettings common. */ + /** NodeSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new CppSettings instance using the specified properties. + * Creates a new NodeSettings instance using the specified properties. * @param [properties] Properties to set - * @returns CppSettings instance + * @returns NodeSettings instance */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a NodeSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CppSettings + * @returns NodeSettings * @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.CppSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CppSettings + * @returns NodeSettings * @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.CppSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; /** - * Verifies a CppSettings message. + * Verifies a NodeSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CppSettings + * @returns NodeSettings */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CppSettings to JSON. + * Converts this NodeSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CppSettings + * Gets the default type url for NodeSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PhpSettings. */ - interface IPhpSettings { + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { - /** PhpSettings common */ + /** DotnetSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { /** - * Constructs a new PhpSettings. + * Constructs a new DotnetSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPhpSettings); + constructor(properties?: google.api.IDotnetSettings); - /** PhpSettings common. */ + /** DotnetSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + /** - * Creates a new PhpSettings instance using the specified properties. + * Creates a new DotnetSettings instance using the specified properties. * @param [properties] Properties to set - * @returns PhpSettings instance + * @returns DotnetSettings instance */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * Decodes a DotnetSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PhpSettings + * @returns DotnetSettings * @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.PhpSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhpSettings + * @returns DotnetSettings * @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.PhpSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; /** - * Verifies a PhpSettings message. + * Verifies a DotnetSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhpSettings + * @returns DotnetSettings */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhpSettings to JSON. + * Converts this DotnetSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhpSettings + * Gets the default type url for DotnetSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PythonSettings. */ - interface IPythonSettings { + /** Properties of a RubySettings. */ + interface IRubySettings { - /** PythonSettings common */ + /** RubySettings common */ common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { /** - * Constructs a new PythonSettings. + * Constructs a new RubySettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPythonSettings); + constructor(properties?: google.api.IRubySettings); - /** PythonSettings common. */ + /** RubySettings common. */ public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new PythonSettings instance using the specified properties. + * Creates a new RubySettings instance using the specified properties. * @param [properties] Properties to set - * @returns PythonSettings instance + * @returns RubySettings instance */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PythonSettings message from the specified reader or buffer. + * Decodes a RubySettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PythonSettings + * @returns RubySettings * @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.PythonSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * Decodes a RubySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PythonSettings + * @returns RubySettings * @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.PythonSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; /** - * Verifies a PythonSettings message. + * Verifies a RubySettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PythonSettings + * @returns RubySettings */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PythonSettings to JSON. + * Converts this RubySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PythonSettings + * Gets the default type url for RubySettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NodeSettings. */ - interface INodeSettings { + /** Properties of a GoSettings. */ + interface IGoSettings { - /** NodeSettings common */ + /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { /** - * Constructs a new NodeSettings. + * Constructs a new GoSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.INodeSettings); + constructor(properties?: google.api.IGoSettings); - /** NodeSettings common. */ + /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set - * @returns NodeSettings instance + * @returns GoSettings instance */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NodeSettings + * @returns GoSettings * @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.NodeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodeSettings + * @returns GoSettings * @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.NodeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; /** - * Verifies a NodeSettings message. + * Verifies a GoSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NodeSettings + * @returns GoSettings */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NodeSettings to JSON. + * Converts this GoSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NodeSettings + * Gets the default type url for GoSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); + /** Properties of a MethodSettings. */ + interface IMethodSettings { - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); + /** MethodSettings selector */ + selector?: (string|null); - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); } - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { /** - * Constructs a new DotnetSettings. + * Constructs a new MethodSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; + constructor(properties?: google.api.IMethodSettings); - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; + /** MethodSettings selector. */ + public selector: string; - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @param [properties] Properties to set - * @returns DotnetSettings instance + * @returns MethodSettings instance */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DotnetSettings message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DotnetSettings + * @returns MethodSettings * @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.DotnetSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DotnetSettings + * @returns MethodSettings * @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.DotnetSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; /** - * Verifies a DotnetSettings message. + * Verifies a MethodSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DotnetSettings + * @returns MethodSettings */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DotnetSettings to JSON. + * Converts this MethodSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DotnetSettings + * Gets the default type url for MethodSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RubySettings. */ - interface IRubySettings { + namespace MethodSettings { - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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, + IDENTIFIER = 8 } - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @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.RubySettings; + /** ResourceDescriptor plural */ + plural?: (string|null); - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @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.RubySettings; + /** ResourceDescriptor singular */ + singular?: (string|null); - /** - * Verifies a RubySettings 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 */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + constructor(properties?: google.api.IResourceDescriptor); - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ResourceDescriptor type. */ + public type: string; - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** Properties of a GoSettings. */ - interface IGoSettings { + /** ResourceDescriptor nameField. */ + public nameField: string; - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { + /** ResourceDescriptor plural. */ + public plural: string; - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); + /** ResourceDescriptor singular. */ + public singular: string; - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns GoSettings instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * 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.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * 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.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoSettings message from the specified reader or buffer. + * 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 GoSettings + * @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.GoSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoSettings + * @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.GoSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a GoSettings message. + * 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoSettings + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings + * 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.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoSettings to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoSettings + * 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; } - /** Properties of a MethodSettings. */ - interface IMethodSettings { + namespace ResourceDescriptor { - /** MethodSettings selector */ - selector?: (string|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new MethodSettings. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; + constructor(properties?: google.api.IResourceReference); - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ResourceReference type. */ + public type: string; - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns MethodSettings instance + * @returns ResourceReference instance */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * 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.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * 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.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * 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 MethodSettings + * @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.MethodSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodSettings + * @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.MethodSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a MethodSettings message. + * 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodSettings + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings + * 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.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodSettings to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodSettings + * 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; } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @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.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @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.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } } /** Namespace protobuf. */ @@ -11987,6 +17276,109 @@ export namespace google { } } + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * 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.IDuration, 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Duration; + + /** + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 a Timestamp. */ interface ITimestamp { @@ -12090,103 +17482,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of an Any. */ + interface IAny { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Any type_url */ + type_url?: (string|null); - /** Duration nanos */ - nanos?: (number|null); + /** Any value */ + value?: (Uint8Array|Buffer|string|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Duration. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.protobuf.IAny); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** Any type_url. */ + public type_url: string; - /** Duration nanos. */ - public nanos: number; + /** Any value. */ + public value: (Uint8Array|Buffer|string); /** - * Creates a new Duration instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * 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 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration 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 Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Duration 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 Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Duration 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 Duration 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 Duration + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * Gets the default type url for Any * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -12380,109 +17772,6 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Any; - - /** - * 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 an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 longrunning. */ @@ -13569,4 +18858,111 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @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.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + {"code":"deadline_exceeded","msg":"operation timed out"}